@stenajs-webui/calendar 23.17.1 → 23.17.3

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,23 +1,23 @@
1
1
  import { jsx as o, jsxs as N, Fragment as vt } from "react/jsx-runtime";
2
- import { Box as L, Text as Ce, Clickable as sn, Row as V, Spacing as Fn, useToday as _e, Column as Q, Heading as Fe, exhaustSwitchCase as Ct, Space as Ie, Indent as Ae, SeparatorLine as On, parseIntElseUndefined as Et, useBoolean as mt, useDelayedFalse as Lt, useOnClickOutside as an } from "@stenajs-webui/core";
3
- import { FlatButton as Z, stenaAngleDown as kt, PrimaryButton as xe, stenaAngleLeft as Wn, stenaAngleRight as $n, SecondaryButton as he, stenaAngleLeftDouble as Un, stenaArrowLeft as tt, stenaArrowRight as Oe, stenaAngleRightDouble as Vn, TextInputButton as jn, stenaCalendar as Pe, Icon as on, stenaArrowWideRight as zn, stenaClock as cn, Label as Kn, FlatButtonLink as qn, BaseButton as Gn, stenaBellFilled as Jn, MenuButton as Qn, stenaAngleUp as Zn, CardBody as ln } from "@stenajs-webui/elements";
4
- import { isAfter as G, eachDayOfInterval as dn, isSameDay as P, endOfMonth as un, startOfMonth as fn, min as hn, addDays as te, max as gn, subDays as we, format as z, getISOWeek as St, getDate as nt, startOfWeek as Qe, addWeeks as Xn, getMonth as ye, getYear as He, getWeek as mn, getISODay as er, addHours as pn, isBefore as Ne, parse as ve, addMonths as We, isSameMonth as me, addYears as tr, subMonths as Mt, subYears as nr, setWeek as rr, isValid as sr, isSameYear as ar, intlFormat as Dn, isWithinInterval as or } from "date-fns";
5
- import { enGB as Ze, pl as At, fr as Pt, es as Ht, cs as Yt, fi as Ft, et as Ot, it as Wt, lt as $t, lv as Ut, da as Vt, sv as jt, nb as zt, de as Kt, nl as qt, nlBE as ir, deAT as cr, enIE as lr, enUS as dr } from "date-fns/locale";
2
+ import { Box as L, Text as Ce, Clickable as sn, Row as V, Spacing as Yn, useToday as xe, Column as Q, Heading as Ye, exhaustSwitchCase as Ct, Space as Ie, Indent as Ae, SeparatorLine as On, parseIntElseUndefined as Et, useBoolean as mt, useDelayedFalse as Lt, useOnClickOutside as an } from "@stenajs-webui/core";
3
+ import { FlatButton as Z, stenaAngleDown as kt, PrimaryButton as _e, stenaAngleLeft as Wn, stenaAngleRight as $n, SecondaryButton as he, stenaAngleLeftDouble as Un, stenaArrowLeft as tt, stenaArrowRight as Oe, stenaAngleRightDouble as Vn, TextInputButton as jn, stenaCalendar as Pe, Icon as on, stenaArrowWideRight as zn, stenaClock as cn, Label as Kn, FlatButtonLink as qn, BaseButton as Gn, stenaBellFilled as Jn, MenuButton as Qn, stenaAngleUp as Zn, CardBody as ln } from "@stenajs-webui/elements";
4
+ import { isAfter as G, eachDayOfInterval as dn, isSameDay as P, endOfMonth as un, startOfMonth as fn, min as hn, addDays as te, max as gn, subDays as we, format as z, getISOWeek as St, getDate as nt, startOfWeek as Qe, addWeeks as Xn, getMonth as ye, getYear as Fe, getWeek as mn, getISODay as er, addHours as pn, isBefore as Ne, parse as ve, addMonths as We, isSameMonth as me, addYears as tr, subMonths as Mt, subYears as nr, setWeek as rr, isValid as sr, isSameYear as ar, intlFormat as Dn, isWithinInterval as or } from "date-fns";
5
+ import { enGB as Ze, pl as At, fr as Pt, es as Ft, cs as Ht, fi as Yt, et as Ot, it as Wt, lt as $t, lv as Ut, da as Vt, sv as jt, nb as zt, de as Kt, nl as qt, nlBE as ir, deAT as cr, enIE as lr, enUS as dr } from "date-fns/locale";
6
6
  import { last as ur, chunk as bn, debounce as fr, padStart as hr, range as It } from "lodash-es";
7
7
  import * as Rt from "react";
8
- import { useMemo as _, useRef as $, useEffect as ae, useCallback as w, useId as Tt, useState as M, forwardRef as rt, createContext as gr, useLayoutEffect as wn } from "react";
8
+ import { useMemo as x, useRef as $, useEffect as ae, useCallback as w, useId as Tt, useState as M, forwardRef as rt, createContext as gr, useLayoutEffect as wn } from "react";
9
9
  import ne from "classnames";
10
10
  import dt from "@emotion/styled";
11
11
  import { TextInput as pe, TextInputBox as mr, LabelledTextInput as pr } from "@stenajs-webui/forms";
12
12
  import { ControlledPopover as $e } from "@stenajs-webui/tooltip";
13
- import { cssColor as _t } from "@stenajs-webui/theme";
13
+ import { cssColor as xt } from "@stenajs-webui/theme";
14
14
  import { useMaskedInput as Dr } from "@stenajs-webui/input-mask";
15
15
  import { useMediaQuery as qe } from "react-responsive";
16
16
  import './index.css';const de = {
17
17
  yearAndMonth: "yyyy-MM",
18
18
  fullDate: "yyyy-MM-dd",
19
19
  fullMonthName: "LLLL"
20
- }, Ye = (e = {}, t, n) => {
20
+ }, He = (e = {}, t, n) => {
21
21
  if (t && n && G(n, t))
22
22
  return dn({ start: t, end: n }).reduce(
23
23
  (s, a) => {
@@ -34,11 +34,11 @@ import './index.css';const de = {
34
34
  n,
35
35
  fn(r),
36
36
  un(r)
37
- ), wr = (e = {}, t, n, r, s) => t && n ? Ye(
37
+ ), wr = (e = {}, t, n, r, s) => t && n ? He(
38
38
  e,
39
39
  gn([t, we(r, 1)]),
40
40
  hn([n, te(s, 1)])
41
- ) : Ye(e, t, n), Oa = (e, t, n) => {
41
+ ) : He(e, t, n), Oa = (e, t, n) => {
42
42
  const r = z(t, de.yearAndMonth), s = St(t), a = nt(t);
43
43
  return {
44
44
  ...e,
@@ -107,9 +107,9 @@ import './index.css';const de = {
107
107
  return { ...e };
108
108
  const n = t.days[0].date, r = ur(t.days)?.date;
109
109
  return {
110
- ...Ye(e, n, r)
110
+ ...He(e, n, r)
111
111
  };
112
- }, vr = (e, t) => _(() => e ? ge(t, /* @__PURE__ */ new Date(), ["today"]) : t, [e, t]), st = (e) => e.length === 0 ? e : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
112
+ }, vr = (e, t) => x(() => e ? ge(t, /* @__PURE__ */ new Date(), ["today"]) : t, [e, t]), st = (e) => e.length === 0 ? e : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
113
113
  var Cr = /* @__PURE__ */ ((e) => (e[e.JANUARY = 0] = "JANUARY", e[e.FEBRUARY = 1] = "FEBRUARY", e[e.MARCH = 2] = "MARCH", e[e.APRIL = 3] = "APRIL", e[e.MAY = 4] = "MAY", e[e.JUNE = 5] = "JUNE", e[e.JULY = 6] = "JULY", e[e.AUGUST = 7] = "AUGUST", e[e.SEPTEMBER = 8] = "SEPTEMBER", e[e.OCTOBER = 9] = "OCTOBER", e[e.NOVEMBER = 10] = "NOVEMBER", e[e.DECEMBER = 11] = "DECEMBER", e))(Cr || {}), kr = /* @__PURE__ */ ((e) => (e[e.SUNDAY = 0] = "SUNDAY", e[e.MONDAY = 1] = "MONDAY", e[e.TUESDAY = 2] = "TUESDAY", e[e.WEDNESDAY = 3] = "WEDNESDAY", e[e.THURSDAY = 4] = "THURSDAY", e[e.FRIDAY = 5] = "FRIDAY", e[e.SATURDAY = 6] = "SATURDAY", e))(kr || {});
114
114
  const Gt = (e, t, n, r) => {
115
115
  const s = [];
@@ -132,20 +132,20 @@ const Gt = (e, t, n, r) => {
132
132
  }, Sr = (e, t, n, r = !0) => {
133
133
  const s = new Date(e, t, 1), a = Qe(s, { locale: n }), i = [];
134
134
  for (let c = 0; c < 6; c++) {
135
- const l = xt(Xn(a, c), n);
135
+ const l = _t(Xn(a, c), n);
136
136
  if (c > 0 && l.startMonth !== t && !r)
137
137
  return i;
138
138
  i.push(l);
139
139
  }
140
140
  return i;
141
- }, xt = (e, t) => {
141
+ }, _t = (e, t) => {
142
142
  const n = ye(te(e, 7)) !== ye(e);
143
143
  return {
144
144
  weekNumber: mn(e, { locale: t }),
145
145
  startMonth: ye(e),
146
- startYear: He(e),
146
+ startYear: Fe(e),
147
147
  endMonth: ye(te(e, 6)),
148
- endYear: He(te(e, 6)),
148
+ endYear: Fe(te(e, 6)),
149
149
  days: Ir(e, t),
150
150
  isLastWeekOfMonth: n
151
151
  };
@@ -157,7 +157,7 @@ const Gt = (e, t, n, r) => {
157
157
  fullName: z(e, "EEEE", t ? { locale: t } : void 0),
158
158
  dateString: z(pn(e, 12), de.fullDate),
159
159
  weekNumber: mn(e, { locale: t }),
160
- year: He(e),
160
+ year: Fe(e),
161
161
  month: ye(e),
162
162
  dayOfMonth: nt(e),
163
163
  dayOfWeek: n,
@@ -169,10 +169,10 @@ const Gt = (e, t, n, r) => {
169
169
  }, Ir = (e, t) => dn({
170
170
  start: e,
171
171
  end: te(e, 6)
172
- }).map((n) => Mr(n, t)), Rr = (e, t) => t > 11 ? { year: e + Math.floor(t / 12), month: t % 12 } : t < 0 ? { year: e + Math.floor(t / 12), month: 12 + t % 12 } : { year: e, month: t }, Tr = "_calendar_5yxz4_1", _r = "_weekNumberVisible_5yxz4_41", Jt = {
172
+ }).map((n) => Mr(n, t)), Rr = (e, t) => t > 11 ? { year: e + Math.floor(t / 12), month: t % 12 } : t < 0 ? { year: e + Math.floor(t / 12), month: 12 + t % 12 } : { year: e, month: t }, Tr = "_calendar_5yxz4_1", xr = "_weekNumberVisible_5yxz4_41", Jt = {
173
173
  calendar: Tr,
174
- weekNumberVisible: _r
175
- }, xr = (e, t, n) => !!(t && t.indexOf(n) >= 0 || e && e.highlights && e.highlights.indexOf(n) >= 0), fe = (e, t, n, r, s) => {
174
+ weekNumberVisible: xr
175
+ }, _r = (e, t, n) => !!(t && t.indexOf(n) >= 0 || e && e.highlights && e.highlights.indexOf(n) >= 0), fe = (e, t, n, r, s) => {
176
176
  if (n.length !== r.length)
177
177
  throw new Error(
178
178
  "Select highlight failed, number of values do not equal number of highlights."
@@ -180,7 +180,7 @@ const Gt = (e, t, n, r) => {
180
180
  if (n.length === 0)
181
181
  return s;
182
182
  for (let a = 0; a < n.length; a++)
183
- if (typeof n[a] == "boolean" && n[a] || typeof n[a] == "string" && xr(
183
+ if (typeof n[a] == "boolean" && n[a] || typeof n[a] == "string" && _r(
184
184
  e,
185
185
  t,
186
186
  n[a]
@@ -482,7 +482,7 @@ const Gt = (e, t, n, r) => {
482
482
  ) : i
483
483
  }
484
484
  );
485
- }, Pr = (e, t, n) => t && Ne(e, t) ? P(e, t) : n && G(e, n) ? P(e, n) : !0, Hr = function({
485
+ }, Pr = (e, t, n) => t && Ne(e, t) ? P(e, t) : n && G(e, n) ? P(e, n) : !0, Fr = function({
486
486
  dayComponent: t,
487
487
  minDate: n,
488
488
  maxDate: r,
@@ -490,13 +490,13 @@ const Gt = (e, t, n, r) => {
490
490
  day: a,
491
491
  ...i
492
492
  }) {
493
- const c = _(
493
+ const c = x(
494
494
  () => Pr(a.date, n, r) ? s : yn(s, ["disabled"]),
495
495
  [a.date, s, r, n]
496
496
  );
497
497
  return /* @__PURE__ */ o(t, { day: a, ...i, dayState: c });
498
498
  };
499
- function Yr({
499
+ function Hr({
500
500
  month: e,
501
501
  dayComponent: t = vn,
502
502
  statePerWeek: n,
@@ -560,7 +560,7 @@ function Yr({
560
560
  }
561
561
  ) }),
562
562
  C.days.map((m) => /* @__PURE__ */ o(
563
- Hr,
563
+ Fr,
564
564
  {
565
565
  dayComponent: t,
566
566
  day: m,
@@ -581,7 +581,7 @@ function Yr({
581
581
  ] }) })
582
582
  ] }) });
583
583
  }
584
- function Fr({
584
+ function Yr({
585
585
  monthRows: e,
586
586
  dayComponent: t = vn,
587
587
  userDataPerMonth: n,
@@ -600,10 +600,10 @@ function Fr({
600
600
  showWeekNumber: y,
601
601
  theme: v = ke
602
602
  }) {
603
- const C = _(
603
+ const C = x(
604
604
  () => s ? ve(s, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
605
605
  [s]
606
- ), m = _(
606
+ ), m = x(
607
607
  () => a ? ve(a, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
608
608
  [a]
609
609
  );
@@ -614,8 +614,8 @@ function Fr({
614
614
  Jt.calendar,
615
615
  y && Jt.weekNumberVisible
616
616
  ),
617
- children: e.map((b, D) => /* @__PURE__ */ o(Fn, { children: /* @__PURE__ */ o(V, { gap: 2, children: b.map((k) => /* @__PURE__ */ o(
618
- Yr,
617
+ children: e.map((b, D) => /* @__PURE__ */ o(Yn, { children: /* @__PURE__ */ o(V, { gap: 2, children: b.map((k) => /* @__PURE__ */ o(
618
+ Hr,
619
619
  {
620
620
  month: k,
621
621
  dayComponent: t,
@@ -655,7 +655,7 @@ function pt(e) {
655
655
  e.statePerMonth
656
656
  );
657
657
  return /* @__PURE__ */ o(
658
- Fr,
658
+ Yr,
659
659
  {
660
660
  year: n,
661
661
  month: r,
@@ -674,12 +674,12 @@ const Or = (e, t, n) => {
674
674
  if (n)
675
675
  return {
676
676
  month: ye(n),
677
- year: He(n)
677
+ year: Fe(n)
678
678
  };
679
679
  const r = /* @__PURE__ */ new Date();
680
680
  return {
681
681
  month: ye(r),
682
- year: He(r)
682
+ year: Fe(r)
683
683
  };
684
684
  }, Wr = (e, t, n, r, s) => r == null ? [[at(e, t, n)]] : s == null ? [Gt(e, t, r, n)] : bn(Gt(e, t, r, n), s), Cn = (e, t) => `${e.row}-${e.column}-${t}`, $r = (e, t, n, r) => {
685
685
  let s = t;
@@ -711,9 +711,9 @@ const Or = (e, t, n) => {
711
711
  "lt-LT": $t,
712
712
  "it-IT": Wt,
713
713
  "et-EE": Ot,
714
- "fi-FI": Ft,
715
- "cs-CZ": Yt,
716
- "es-ES": Ht,
714
+ "fi-FI": Yt,
715
+ "cs-CZ": Ht,
716
+ "es-ES": Ft,
717
717
  "fr-FR": Pt,
718
718
  "pl-PL": At,
719
719
  nl: qt,
@@ -725,9 +725,9 @@ const Or = (e, t, n) => {
725
725
  lt: $t,
726
726
  it: Wt,
727
727
  et: Ot,
728
- fi: Ft,
729
- cs: Yt,
730
- es: Ht,
728
+ fi: Yt,
729
+ cs: Ht,
730
+ es: Ft,
731
731
  fr: Pt,
732
732
  pl: At
733
733
  }, kn = "en-GB", Va = "sv", Sn = (e, t, n) => {
@@ -759,13 +759,13 @@ const Or = (e, t, n) => {
759
759
  position: i,
760
760
  size: c
761
761
  }) => {
762
- const l = _(
762
+ const l = x(
763
763
  () => Te(r) ?? Te("en-GB"),
764
764
  [r]
765
- ), d = _(
765
+ ), d = x(
766
766
  () => st(z(e, "LLL", { locale: l })),
767
767
  [l, e]
768
- ), u = _(
768
+ ), u = x(
769
769
  () => z(e, "LLLL", { locale: l }),
770
770
  [l, e]
771
771
  ), h = $(null), g = Cn(i, a), f = n ? 0 : -1;
@@ -785,7 +785,7 @@ const Or = (e, t, n) => {
785
785
  [a, i]
786
786
  );
787
787
  return /* @__PURE__ */ o(V, { justifyContent: "center", onKeyDown: p, children: n ? /* @__PURE__ */ o(
788
- xe,
788
+ _e,
789
789
  {
790
790
  id: g,
791
791
  "aria-label": u,
@@ -843,7 +843,7 @@ const Or = (e, t, n) => {
843
843
  onCancel: a,
844
844
  size: i = "medium"
845
845
  }) => {
846
- const c = Tt(), l = _e(), d = s > 0 ? s : 12, [u, h] = M(!1), g = Kr(n, d, Gr(i)), f = _(() => We(n, d), [d, n]);
846
+ const c = Tt(), l = xe(), d = s > 0 ? s : 12, [u, h] = M(!1), g = Kr(n, d, Gr(i)), f = x(() => We(n, d), [d, n]);
847
847
  ae(() => {
848
848
  h(!0);
849
849
  }, []);
@@ -856,7 +856,7 @@ const Or = (e, t, n) => {
856
856
  return /* @__PURE__ */ o(Q, { gap: 1, maxWidth: qr(i), onKeyDown: p, children: g.yearOrder.map((y, v) => {
857
857
  const { rows: C } = g.years[y];
858
858
  return /* @__PURE__ */ N(Rt.Fragment, { children: [
859
- (v !== 0 || y !== l.getFullYear()) && /* @__PURE__ */ o(Fe, { variant: "h4", children: y }),
859
+ (v !== 0 || y !== l.getFullYear()) && /* @__PURE__ */ o(Ye, { variant: "h4", children: y }),
860
860
  /* @__PURE__ */ o("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ o("tbody", { children: C.map((m) => {
861
861
  const { columns: b } = g.rows[m];
862
862
  return /* @__PURE__ */ o("tr", { children: b.map(({ month: D, position: k }) => /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(
@@ -923,7 +923,7 @@ const Or = (e, t, n) => {
923
923
  ], Qr = ({
924
924
  onClickPreset: e
925
925
  }) => {
926
- const [t, n] = M(0), r = _(() => Jr(/* @__PURE__ */ new Date()), []), s = r[t] ?? r[0];
926
+ const [t, n] = M(0), r = x(() => Jr(/* @__PURE__ */ new Date()), []), s = r[t] ?? r[0];
927
927
  return /* @__PURE__ */ N(Q, { children: [
928
928
  /* @__PURE__ */ N(
929
929
  V,
@@ -957,7 +957,7 @@ const Or = (e, t, n) => {
957
957
  /* @__PURE__ */ o(Ie, {}),
958
958
  /* @__PURE__ */ o(Q, { alignItems: "center", children: s.presets.map((a) => /* @__PURE__ */ N(Rt.Fragment, { children: [
959
959
  /* @__PURE__ */ o(
960
- xe,
960
+ _e,
961
961
  {
962
962
  label: a.label,
963
963
  onClick: () => e(a)
@@ -977,10 +977,10 @@ const Or = (e, t, n) => {
977
977
  numMonthsInMonthPicker: l,
978
978
  ...d
979
979
  }) {
980
- const u = _(
980
+ const u = x(
981
981
  () => t == null ? "en-GB" : jr(t) ?? "en-GB",
982
982
  [t]
983
- ), h = _e(), g = w(
983
+ ), h = xe(), g = w(
984
984
  (p) => {
985
985
  r && r(p), a("calendar");
986
986
  },
@@ -1022,7 +1022,7 @@ const Or = (e, t, n) => {
1022
1022
  } });
1023
1023
  default:
1024
1024
  return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ o(
1025
- xe,
1025
+ _e,
1026
1026
  {
1027
1027
  label: "Show calendar",
1028
1028
  onClick: () => a("calendar")
@@ -1200,8 +1200,8 @@ const ns = (e, t) => e || (t || 1) > 1 ? "below" : "header", rs = (e) => ({
1200
1200
  n,
1201
1201
  e,
1202
1202
  r
1203
- ), g = _(
1204
- () => Ye(
1203
+ ), g = x(
1204
+ () => He(
1205
1205
  s,
1206
1206
  t?.startDate,
1207
1207
  t?.endDate
@@ -1242,7 +1242,7 @@ const qa = () => {
1242
1242
  e && e(u.date);
1243
1243
  },
1244
1244
  [e]
1245
- ), d = _(
1245
+ ), d = x(
1246
1246
  () => t ? ge(n, t, [
1247
1247
  "selected",
1248
1248
  "singleSelected"
@@ -1280,7 +1280,7 @@ const cs = ({
1280
1280
  e(t && g ? t.filter((f) => !P(f, h.date)) : [...t || [], h.date]);
1281
1281
  },
1282
1282
  [e, t]
1283
- ), u = _(() => t ? t.reduce(
1283
+ ), u = x(() => t ? t.reduce(
1284
1284
  (h, g) => ge(h, g, ["selected"]),
1285
1285
  n
1286
1286
  ) : n, [n, t]);
@@ -1309,7 +1309,7 @@ const ls = ({
1309
1309
  return f ? f.days[0].date : /* @__PURE__ */ new Date();
1310
1310
  }), { currentPanel: c, setCurrentPanel: l } = ot(r), d = w(
1311
1311
  (f) => {
1312
- e && e(Qt(xt(f.date, s)));
1312
+ e && e(Qt(_t(f.date, s)));
1313
1313
  },
1314
1314
  [s, e]
1315
1315
  ), u = w(
@@ -1317,10 +1317,10 @@ const ls = ({
1317
1317
  e && e(Qt(f));
1318
1318
  },
1319
1319
  [e]
1320
- ), h = _(() => {
1320
+ ), h = x(() => {
1321
1321
  const f = ut(t, s);
1322
1322
  return f ? yr(n, f) : n;
1323
- }, [t, s, n]), g = _(() => {
1323
+ }, [t, s, n]), g = x(() => {
1324
1324
  const f = ut(t, s);
1325
1325
  return f ? f.days[0].date : /* @__PURE__ */ new Date();
1326
1326
  }, [s, t]);
@@ -1343,7 +1343,7 @@ const ls = ({
1343
1343
  const n = e.split("-"), r = parseInt(n[1], 10), s = parseInt(n[0], 10), a = /* @__PURE__ */ new Date();
1344
1344
  a.setFullYear(s);
1345
1345
  const i = Qe(rr(a, r), { locale: t });
1346
- return xt(i, t);
1346
+ return _t(i, t);
1347
1347
  };
1348
1348
  function Ja(e) {
1349
1349
  const t = ls(e);
@@ -1386,6 +1386,8 @@ const Ve = "bottom", ds = (e, t, n) => {
1386
1386
  $e,
1387
1387
  {
1388
1388
  hideArrow: !0,
1389
+ restoreFocus: !1,
1390
+ returnFocus: !1,
1389
1391
  open: v,
1390
1392
  onRequestClose: y,
1391
1393
  appendTo: f,
@@ -1434,7 +1436,7 @@ const Ve = "bottom", ds = (e, t, n) => {
1434
1436
  }), e?.startDate ? setTimeout(u, 150) : (c("startDate"), n.current?.focus()));
1435
1437
  },
1436
1438
  [i, t, c, u, e]
1437
- ), g = _(
1439
+ ), g = x(
1438
1440
  () => e?.startDate && e?.endDate && G(e.startDate, e.endDate),
1439
1441
  [e?.startDate, e?.endDate]
1440
1442
  );
@@ -1478,14 +1480,16 @@ function Za({
1478
1480
  startDateIsAfterEnd: I
1479
1481
  } = us(r, s), [B, R] = M(
1480
1482
  () => (b && r?.[b]) ?? /* @__PURE__ */ new Date()
1481
- ), x = _(
1482
- () => Ye(void 0, r?.startDate, r?.endDate),
1483
+ ), _ = x(
1484
+ () => He(void 0, r?.startDate, r?.endDate),
1483
1485
  [r]
1484
1486
  );
1485
1487
  return /* @__PURE__ */ o(
1486
1488
  $e,
1487
1489
  {
1488
1490
  hideArrow: !0,
1491
+ restoreFocus: !1,
1492
+ returnFocus: !1,
1489
1493
  appendTo: h,
1490
1494
  zIndex: g,
1491
1495
  renderTrigger: (A) => /* @__PURE__ */ N(V, { alignItems: "center", ...A, children: [
@@ -1508,7 +1512,7 @@ function Za({
1508
1512
  on,
1509
1513
  {
1510
1514
  icon: zn,
1511
- color: _t("--lhds-color-ui-500"),
1515
+ color: xt("--lhds-color-ui-500"),
1512
1516
  size: 14
1513
1517
  }
1514
1518
  ),
@@ -1537,7 +1541,7 @@ function Za({
1537
1541
  ...c,
1538
1542
  dateInFocus: B,
1539
1543
  setDateInFocus: R,
1540
- statePerMonth: x,
1544
+ statePerMonth: _,
1541
1545
  theme: i,
1542
1546
  onClickDay: S,
1543
1547
  currentPanel: f,
@@ -1572,13 +1576,13 @@ const Xa = ({
1572
1576
  }, [C, v]), b = w(() => {
1573
1577
  C(!1);
1574
1578
  }, [C]), D = w(
1575
- (x) => {
1576
- s && s(x);
1579
+ (_) => {
1580
+ s && s(_);
1577
1581
  },
1578
1582
  [s]
1579
1583
  ), k = w(
1580
- (x) => {
1581
- x && (D(z(x, n)), t && setTimeout(() => C(!v), 200));
1584
+ (_) => {
1585
+ _ && (D(z(_, n)), t && setTimeout(() => C(!v), 200));
1582
1586
  },
1583
1587
  [
1584
1588
  D,
@@ -1593,7 +1597,7 @@ const Xa = ({
1593
1597
  {
1594
1598
  appendTo: f,
1595
1599
  zIndex: p,
1596
- renderTrigger: ({ ref: x, ...A }) => /* @__PURE__ */ o(
1600
+ renderTrigger: ({ ref: _, ...A }) => /* @__PURE__ */ o(
1597
1601
  pe,
1598
1602
  {
1599
1603
  ...y,
@@ -1614,7 +1618,7 @@ const Xa = ({
1614
1618
  min: u,
1615
1619
  max: h,
1616
1620
  size: 10,
1617
- inputRef: x,
1621
+ inputRef: _,
1618
1622
  ...A
1619
1623
  }
1620
1624
  ),
@@ -1764,11 +1768,11 @@ const Xa = ({
1764
1768
  onBlurLeft: I,
1765
1769
  onBlurRight: B,
1766
1770
  onFocusLeft: R,
1767
- onFocusRight: x,
1771
+ onFocusRight: _,
1768
1772
  inputRefLeft: A,
1769
- inputRefRight: F,
1773
+ inputRefRight: Y,
1770
1774
  variant: E,
1771
- variantLeft: H,
1775
+ variantLeft: F,
1772
1776
  variantRight: q,
1773
1777
  onBlur: J,
1774
1778
  showPresets: T,
@@ -1776,31 +1780,31 @@ const Xa = ({
1776
1780
  widthRight: U,
1777
1781
  disabled: j
1778
1782
  }) => {
1779
- const O = $(0), Y = _(
1783
+ const O = $(0), H = x(
1780
1784
  () => fr((W) => {
1781
1785
  W === 0 && J?.();
1782
1786
  }, 10),
1783
1787
  [J]
1784
1788
  ), X = w(
1785
1789
  (W) => {
1786
- O.current++, Y(O.current), R && R(W);
1790
+ O.current++, H(O.current), R && R(W);
1787
1791
  },
1788
- [R, O, Y]
1792
+ [R, O, H]
1789
1793
  ), re = w(
1790
1794
  (W) => {
1791
- O.current++, Y(O.current), x && x(W);
1795
+ O.current++, H(O.current), _ && _(W);
1792
1796
  },
1793
- [x, O, Y]
1797
+ [_, O, H]
1794
1798
  ), oe = w(
1795
1799
  (W) => {
1796
- O.current--, Y(O.current), I && I(W);
1800
+ O.current--, H(O.current), I && I(W);
1797
1801
  },
1798
- [I, O, Y]
1802
+ [I, O, H]
1799
1803
  ), ue = w(
1800
1804
  (W) => {
1801
- O.current--, Y(O.current), B && B(W);
1805
+ O.current--, H(O.current), B && B(W);
1802
1806
  },
1803
- [B, O, Y]
1807
+ [B, O, H]
1804
1808
  );
1805
1809
  return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ N(
1806
1810
  mr,
@@ -1847,7 +1851,7 @@ const Xa = ({
1847
1851
  onBlur: oe,
1848
1852
  onFocus: X,
1849
1853
  inputRef: A,
1850
- variant: H,
1854
+ variant: F,
1851
1855
  type: d,
1852
1856
  autoFocus: e,
1853
1857
  min: y,
@@ -1859,7 +1863,7 @@ const Xa = ({
1859
1863
  {
1860
1864
  icon: i,
1861
1865
  size: 12,
1862
- color: _t("--lhds-color-ui-500")
1866
+ color: xt("--lhds-color-ui-500")
1863
1867
  }
1864
1868
  ) }),
1865
1869
  /* @__PURE__ */ o(L, { width: U, children: /* @__PURE__ */ o(
@@ -1876,7 +1880,7 @@ const Xa = ({
1876
1880
  onChange: g,
1877
1881
  onBlur: ue,
1878
1882
  onFocus: re,
1879
- inputRef: F,
1883
+ inputRef: Y,
1880
1884
  variant: q,
1881
1885
  type: u,
1882
1886
  autoFocus: t,
@@ -1929,7 +1933,7 @@ const Xa = ({
1929
1933
  };
1930
1934
  }, ms = (e) => `${Xe(String(e.getHours()))}:${et(
1931
1935
  String(e.getMinutes())
1932
- )}`, ps = "_timePicker_1w05d_1", Ds = "_timePickerColumn_1w05d_6", _n = {
1936
+ )}`, ps = "_timePicker_1w05d_1", Ds = "_timePickerColumn_1w05d_6", xn = {
1933
1937
  timePicker: ps,
1934
1938
  timePickerColumn: Ds
1935
1939
  }, bs = ({
@@ -1957,7 +1961,7 @@ const Xa = ({
1957
1961
  indent: 0.5,
1958
1962
  ref: a,
1959
1963
  children: n ? /* @__PURE__ */ o(
1960
- xe,
1964
+ _e,
1961
1965
  {
1962
1966
  label: hr(String(t), 2, "0"),
1963
1967
  onClick: () => e && e(t)
@@ -1978,7 +1982,7 @@ const Xa = ({
1978
1982
  canScrollRef: r
1979
1983
  }) => {
1980
1984
  const s = $(null);
1981
- return /* @__PURE__ */ o(Q, { className: _n.timePickerColumn, ref: s, children: t.map((a) => /* @__PURE__ */ o(
1985
+ return /* @__PURE__ */ o(Q, { className: xn.timePickerColumn, ref: s, children: t.map((a) => /* @__PURE__ */ o(
1982
1986
  bs,
1983
1987
  {
1984
1988
  item: a,
@@ -2015,7 +2019,7 @@ const Xa = ({
2015
2019
  },
2016
2020
  [r, t]
2017
2021
  );
2018
- return /* @__PURE__ */ N(V, { className: _n.timePicker, children: [
2022
+ return /* @__PURE__ */ N(V, { className: xn.timePicker, children: [
2019
2023
  /* @__PURE__ */ o(
2020
2024
  Zt,
2021
2025
  {
@@ -2211,11 +2215,11 @@ const Xa = ({
2211
2215
  localTime: B,
2212
2216
  localDate: R
2213
2217
  } = v, {
2214
- showCalendar: x,
2218
+ showCalendar: _,
2215
2219
  hideCalendar: A,
2216
- inputLeftChangeHandler: F,
2220
+ inputLeftChangeHandler: Y,
2217
2221
  inputRightChangeHandler: E,
2218
- onChangeTime: H,
2222
+ onChangeTime: F,
2219
2223
  onChangeDate: q
2220
2224
  } = ks(e, t, v, p), {
2221
2225
  onKeyDownHandler: J,
@@ -2227,12 +2231,12 @@ const Xa = ({
2227
2231
  } = Ms(
2228
2232
  q,
2229
2233
  p,
2230
- x,
2234
+ _,
2231
2235
  A,
2232
2236
  v
2233
2237
  );
2234
2238
  Cs(e, k, p);
2235
- const Y = _(() => {
2239
+ const H = x(() => {
2236
2240
  const W = e || R;
2237
2241
  return W ? ge(void 0, W, [
2238
2242
  "singleSelected",
@@ -2240,7 +2244,7 @@ const Xa = ({
2240
2244
  ]) : {};
2241
2245
  }, [R, e]), X = w(() => {
2242
2246
  A(), I();
2243
- }, [A, I]), re = _(
2247
+ }, [A, I]), re = x(
2244
2248
  () => e ? ms(e) : B,
2245
2249
  [e, B]
2246
2250
  ), oe = Lt(b, 300), ue = Lt(S, 300);
@@ -2248,6 +2252,8 @@ const Xa = ({
2248
2252
  $e,
2249
2253
  {
2250
2254
  hideArrow: !0,
2255
+ restoreFocus: !1,
2256
+ returnFocus: !1,
2251
2257
  zIndex: g,
2252
2258
  appendTo: f,
2253
2259
  renderTrigger: (W) => /* @__PURE__ */ o(L, { ...W, children: /* @__PURE__ */ o(
@@ -2263,7 +2269,7 @@ const Xa = ({
2263
2269
  typeRight: "time",
2264
2270
  placeholderLeft: "yyyy-mm-dd",
2265
2271
  placeholderRight: "hh:mm",
2266
- onChangeLeft: F,
2272
+ onChangeLeft: Y,
2267
2273
  onChangeRight: E,
2268
2274
  onClickArrowDown: O,
2269
2275
  onClickCalendar: j,
@@ -2287,7 +2293,7 @@ const Xa = ({
2287
2293
  children: (oe || ue) && /* @__PURE__ */ o(Q, { children: oe ? /* @__PURE__ */ o(
2288
2294
  Se,
2289
2295
  {
2290
- statePerMonth: Y,
2296
+ statePerMonth: H,
2291
2297
  onClickDay: U,
2292
2298
  dateInFocus: D,
2293
2299
  setDateInFocus: k,
@@ -2301,11 +2307,11 @@ const Xa = ({
2301
2307
  vs,
2302
2308
  {
2303
2309
  value: re ?? "",
2304
- onValueChange: H
2310
+ onValueChange: F
2305
2311
  }
2306
2312
  ) }),
2307
2313
  /* @__PURE__ */ o(Ie, {}),
2308
- /* @__PURE__ */ o(V, { justifyContent: "flex-end", children: /* @__PURE__ */ o(xe, { label: "Done", onClick: I }) })
2314
+ /* @__PURE__ */ o(V, { justifyContent: "flex-end", children: /* @__PURE__ */ o(_e, { label: "Done", onClick: I }) })
2309
2315
  ] }) : null })
2310
2316
  }
2311
2317
  ) });
@@ -2315,13 +2321,13 @@ const Xa = ({
2315
2321
  year: n
2316
2322
  }) => {
2317
2323
  const r = String(n);
2318
- return /* @__PURE__ */ o(V, { justifyContent: "center", children: e === n ? /* @__PURE__ */ o(xe, { label: r, onClick: () => t?.(n) }) : /* @__PURE__ */ o(Z, { label: r, onClick: () => t?.(n) }) });
2324
+ return /* @__PURE__ */ o(V, { justifyContent: "center", children: e === n ? /* @__PURE__ */ o(_e, { label: r, onClick: () => t?.(n) }) : /* @__PURE__ */ o(Z, { label: r, onClick: () => t?.(n) }) });
2319
2325
  }, no = ({
2320
2326
  value: e,
2321
2327
  onValueChange: t,
2322
2328
  initialLastYear: n
2323
2329
  }) => {
2324
- const [r, s] = M(() => e ? e + 4 : n ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), a = _(() => {
2330
+ const [r, s] = M(() => e ? e + 4 : n ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), a = x(() => {
2325
2331
  const i = r - 11;
2326
2332
  return bn(It(i, r + 1), 3);
2327
2333
  }, [r]);
@@ -2399,7 +2405,7 @@ const Xa = ({
2399
2405
  },
2400
2406
  [t, s]
2401
2407
  );
2402
- }, _s = (e, t, n, {
2408
+ }, xs = (e, t, n, {
2403
2409
  setDateInFocus: r,
2404
2410
  showCalendarInternal: s,
2405
2411
  hideCalendarInternal: a,
@@ -2438,7 +2444,7 @@ const Xa = ({
2438
2444
  setCurrentPanel: c,
2439
2445
  showCalendar: u
2440
2446
  };
2441
- }, xs = (e, t) => {
2447
+ }, _s = (e, t) => {
2442
2448
  const [n, r, s] = mt(!1), [a, i] = M(void 0), [c, l] = M("startDate"), [d, u] = M(() => (c === "startDate" ? e : c === "endDate" ? t : void 0) ?? /* @__PURE__ */ new Date()), [h, g] = M("calendar");
2443
2449
  return {
2444
2450
  isCalendarVisible: n,
@@ -2559,18 +2565,18 @@ function ro({
2559
2565
  appendTo: v,
2560
2566
  renderBelowCalendar: C
2561
2567
  }) {
2562
- const { startDate: m, endDate: b } = e || {}, D = $(null), k = $(null), S = xs(m, b), {
2568
+ const { startDate: m, endDate: b } = e || {}, D = $(null), k = $(null), S = _s(m, b), {
2563
2569
  dateInFocus: I,
2564
2570
  setDateInFocus: B,
2565
2571
  isCalendarVisible: R,
2566
- currentPanel: x,
2572
+ currentPanel: _,
2567
2573
  setCurrentPanel: A
2568
2574
  } = S, {
2569
- showCalendar: F,
2575
+ showCalendar: Y,
2570
2576
  hideCalendar: E,
2571
- inputLeftChangeHandler: H,
2577
+ inputLeftChangeHandler: F,
2572
2578
  inputRightChangeHandler: q
2573
- } = _s(m, b, t, S), {
2579
+ } = xs(m, b, t, S), {
2574
2580
  onKeyDownHandler: J,
2575
2581
  onFocusRight: T,
2576
2582
  onFocusLeft: K,
@@ -2583,7 +2589,7 @@ function ro({
2583
2589
  t,
2584
2590
  D,
2585
2591
  k,
2586
- F,
2592
+ Y,
2587
2593
  E,
2588
2594
  S
2589
2595
  );
@@ -2594,10 +2600,10 @@ function ro({
2594
2600
  D,
2595
2601
  k
2596
2602
  );
2597
- const Y = _(
2603
+ const H = x(
2598
2604
  () => m && b && G(m, b),
2599
2605
  [m, b]
2600
- ), X = _(
2606
+ ), X = x(
2601
2607
  () => br(
2602
2608
  l?.statePerMonth,
2603
2609
  m,
@@ -2627,7 +2633,7 @@ function ro({
2627
2633
  typeRight: "date",
2628
2634
  placeholderLeft: "Start date",
2629
2635
  placeholderRight: "End date",
2630
- onChangeLeft: H,
2636
+ onChangeLeft: F,
2631
2637
  onChangeRight: q,
2632
2638
  onClickArrowDown: O,
2633
2639
  onClickCalendar: j,
@@ -2637,7 +2643,7 @@ function ro({
2637
2643
  onClickRight: T,
2638
2644
  inputRefLeft: D,
2639
2645
  inputRefRight: k,
2640
- variant: Y ? "error" : f,
2646
+ variant: H ? "error" : f,
2641
2647
  widthLeft: d,
2642
2648
  widthRight: u,
2643
2649
  minLeft: i,
@@ -2658,7 +2664,7 @@ function ro({
2658
2664
  firstMonthInMonthPicker: h,
2659
2665
  numMonthsInMonthPicker: g,
2660
2666
  setDateInFocus: B,
2661
- currentPanel: x,
2667
+ currentPanel: _,
2662
2668
  setCurrentPanel: A,
2663
2669
  minDate: i,
2664
2670
  maxDate: c,
@@ -2666,7 +2672,7 @@ function ro({
2666
2672
  statePerMonth: X
2667
2673
  }
2668
2674
  ),
2669
- x === "calendar" && C
2675
+ _ === "calendar" && C
2670
2676
  ] })
2671
2677
  }
2672
2678
  ) });
@@ -2706,7 +2712,7 @@ const bt = ({
2706
2712
  d,
2707
2713
  u,
2708
2714
  S
2709
- ), x = w(
2715
+ ), _ = w(
2710
2716
  (E) => {
2711
2717
  g?.(E), I(!0);
2712
2718
  },
@@ -2716,7 +2722,7 @@ const bt = ({
2716
2722
  f?.(E), I(!1);
2717
2723
  },
2718
2724
  [f]
2719
- ), F = S ? y : p ?? y;
2725
+ ), Y = S ? y : p ?? y;
2720
2726
  return m === "standard" ? /* @__PURE__ */ o(Kn, { text: C ?? "", children: /* @__PURE__ */ o(
2721
2727
  pe,
2722
2728
  {
@@ -2727,8 +2733,8 @@ const bt = ({
2727
2733
  "aria-live": "polite",
2728
2734
  value: (S ? i : v) ?? "",
2729
2735
  inputRef: B,
2730
- placeholder: F,
2731
- onFocus: x,
2736
+ placeholder: Y,
2737
+ onFocus: _,
2732
2738
  onBlur: A,
2733
2739
  onChange: R,
2734
2740
  width: Xt(h),
@@ -2745,8 +2751,8 @@ const bt = ({
2745
2751
  "aria-live": "polite",
2746
2752
  value: (S ? i : v) ?? "",
2747
2753
  ref: B,
2748
- placeholder: F,
2749
- onFocus: x,
2754
+ placeholder: Y,
2755
+ onFocus: _,
2750
2756
  onBlur: A,
2751
2757
  onChange: R,
2752
2758
  width: Xt(h),
@@ -2766,7 +2772,7 @@ const bt = ({
2766
2772
  default:
2767
2773
  return Ct(e, "168px");
2768
2774
  }
2769
- }, Bs = [/[1-2]/, /\d/, /\d/, /\d/], Es = [/[0-1]/, /\d/], Ls = [/[0-3]/, /\d/], xn = (e) => Ps(e).flatMap(As), As = (e) => {
2775
+ }, Bs = [/[1-2]/, /\d/, /\d/, /\d/], Es = [/[0-1]/, /\d/], Ls = [/[0-3]/, /\d/], _n = (e) => Ps(e).flatMap(As), As = (e) => {
2770
2776
  switch (e) {
2771
2777
  case "yyyy":
2772
2778
  return Bs;
@@ -2824,9 +2830,9 @@ const bt = ({
2824
2830
  const n = le(e, t);
2825
2831
  if (n != null)
2826
2832
  return be(n, t);
2827
- }, Hs = "_navBarButton_b3x3w_1", Ys = "_selected_b3x3w_14", en = {
2828
- navBarButton: Hs,
2829
- selected: Ys
2833
+ }, Fs = "_navBarButton_b3x3w_1", Hs = "_selected_b3x3w_14", en = {
2834
+ navBarButton: Fs,
2835
+ selected: Hs
2830
2836
  };
2831
2837
  rt(
2832
2838
  function({ selected: e, className: t, ...n }, r) {
@@ -2844,8 +2850,8 @@ rt(
2844
2850
  );
2845
2851
  }
2846
2852
  );
2847
- const Fs = "_navBarLink_1u1b2_1", Os = "_selected_1u1b2_14", tn = {
2848
- navBarLink: Fs,
2853
+ const Ys = "_navBarLink_1u1b2_1", Os = "_selected_1u1b2_14", tn = {
2854
+ navBarLink: Ys,
2849
2855
  selected: Os
2850
2856
  };
2851
2857
  rt(
@@ -2949,10 +2955,10 @@ const nn = [
2949
2955
  autoFocusStartDate: v,
2950
2956
  autoFocusEndDate: C
2951
2957
  }) => {
2952
- const { deviceSize: m } = Nn(), b = y && !Bn(m, "tablet"), { mask: D, placeholder: k } = _(() => {
2958
+ const { deviceSize: m } = Nn(), b = y && !Bn(m, "tablet"), { mask: D, placeholder: k } = x(() => {
2953
2959
  const S = Be(n);
2954
2960
  return {
2955
- mask: xn(S),
2961
+ mask: _n(S),
2956
2962
  placeholder: S.toLowerCase()
2957
2963
  };
2958
2964
  }, [n]);
@@ -3034,19 +3040,19 @@ function js(e, t, n) {
3034
3040
  } : e;
3035
3041
  }
3036
3042
  const Ln = (e, t, n, r, s, a, i, c, l) => {
3037
- const d = Te(r), u = Tt(), h = _e(), g = $(null), f = _(
3043
+ const d = Te(r), u = Tt(), h = xe(), g = $(null), f = x(
3038
3044
  () => Be(n),
3039
3045
  [n]
3040
- ), p = _(
3046
+ ), p = x(
3041
3047
  () => e?.startDate?.length === f.length ? le(e.startDate, n) : void 0,
3042
3048
  [f.length, n, e?.startDate]
3043
- ), y = _(
3049
+ ), y = x(
3044
3050
  () => e?.endDate?.length === f.length ? le(e.endDate, n) : void 0,
3045
3051
  [f.length, n, e?.endDate]
3046
- ), v = _(
3052
+ ), v = x(
3047
3053
  () => p != null ? yt(p, h, d) : void 0,
3048
3054
  [d, p, h]
3049
- ), C = _(
3055
+ ), C = x(
3050
3056
  () => y != null ? yt(y, h, d) : void 0,
3051
3057
  [d, y, h]
3052
3058
  ), [m, b] = M(
@@ -3056,20 +3062,20 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3056
3062
  me(T, h) || G(T, h) ? b(T) : b(h);
3057
3063
  },
3058
3064
  [h]
3059
- ), k = _(
3065
+ ), k = x(
3060
3066
  () => at(
3061
3067
  m.getFullYear(),
3062
3068
  m.getMonth(),
3063
3069
  d
3064
3070
  ),
3065
3071
  [d, m]
3066
- ), S = _(() => st(
3072
+ ), S = x(() => st(
3067
3073
  Dn(
3068
3074
  m,
3069
3075
  { month: "long", year: "numeric" },
3070
3076
  { locale: d.code }
3071
3077
  )
3072
- ), [d, m]), I = _(() => me(h, m), [h, m]), [B, R] = M(), [x, A] = M("calendar"), F = w(
3078
+ ), [d, m]), I = x(() => me(h, m), [h, m]), [B, R] = M(), [_, A] = M("calendar"), Y = w(
3073
3079
  (T) => {
3074
3080
  const K = T?.startDate?.length === f.length ? le(T.startDate, n) : void 0, U = T?.endDate?.length === f.length ? le(T.endDate, n) : void 0;
3075
3081
  K ? D(K) : U && D(U), t?.({
@@ -3084,20 +3090,20 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3084
3090
  D,
3085
3091
  e
3086
3092
  ]
3087
- ), E = _(
3093
+ ), E = x(
3088
3094
  () => p && y ? G(y, p) || P(y, p) : !1,
3089
3095
  [y, p]
3090
- ), H = _(() => {
3096
+ ), F = x(() => {
3091
3097
  const T = a === "startDate" ? e?.endDate : e?.startDate;
3092
3098
  return T ? le(T, n) : void 0;
3093
- }, [a, n, e?.endDate, e?.startDate]), q = _(() => {
3094
- if (B && H) {
3099
+ }, [a, n, e?.endDate, e?.startDate]), q = x(() => {
3100
+ if (B && F) {
3095
3101
  if (a === "endDate")
3096
3102
  return "right";
3097
3103
  if (a === "startDate")
3098
3104
  return "left";
3099
3105
  }
3100
- }, [a, H, B]);
3106
+ }, [a, F, B]);
3101
3107
  return {
3102
3108
  onClickDate: (T) => {
3103
3109
  if (!(T.getFullYear() === m.getFullYear() && T.getMonth() === m.getMonth()))
@@ -3105,7 +3111,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3105
3111
  const U = (j, O) => t?.(
3106
3112
  js(
3107
3113
  j,
3108
- (Y) => le(Y, n),
3114
+ (H) => le(H, n),
3109
3115
  O
3110
3116
  )
3111
3117
  );
@@ -3135,19 +3141,19 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3135
3141
  "startDate"
3136
3142
  ), c("endDate"));
3137
3143
  },
3138
- onValueChangeByInputs: F,
3144
+ onValueChangeByInputs: Y,
3139
3145
  isValidDateRange: E,
3140
3146
  monthPickerButtonRef: g,
3141
3147
  calendarId: u,
3142
3148
  monthPickerButtonLabel: S,
3143
- visiblePanel: x,
3149
+ visiblePanel: _,
3144
3150
  setVisiblePanel: A,
3145
3151
  setVisibleMonth: b,
3146
3152
  visibleMonthData: k,
3147
3153
  todayIsInVisibleMonth: I,
3148
3154
  hoverDate: B,
3149
3155
  setHoverDate: R,
3150
- hoverAnchor: H,
3156
+ hoverAnchor: F,
3151
3157
  hoverHighlightDirection: q,
3152
3158
  selectedStartDate: p,
3153
3159
  selectedEndDate: y,
@@ -3376,11 +3382,11 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3376
3382
  hoverHighlightDirection: C
3377
3383
  }) => {
3378
3384
  const m = w(
3379
- async (F) => {
3380
- const E = la(r.date, F.key), H = (E && p?.(E)) ?? !1;
3381
- E && !H && (c(E), me(r.date, E) ? document.getElementById(ft(E, f))?.focus() : (n(E), setTimeout(() => {
3385
+ async (Y) => {
3386
+ const E = la(r.date, Y.key), F = (E && p?.(E)) ?? !1;
3387
+ E && !F && (c(E), me(r.date, E) ? document.getElementById(ft(E, f))?.focus() : (n(E), setTimeout(() => {
3382
3388
  document.getElementById(ft(E, f))?.focus();
3383
- }, 10))), (F.key === "Enter" || F.code === "Space") && e(r.date);
3389
+ }, 10))), (Y.key === "Enter" || Y.code === "Space") && e(r.date);
3384
3390
  },
3385
3391
  [
3386
3392
  f,
@@ -3390,7 +3396,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3390
3396
  e,
3391
3397
  c
3392
3398
  ]
3393
- ), b = r.month === t.getMonth(), D = p?.(r.date) ?? !1, k = d && u ? G(d, u) : !1, S = d && u ? P(k ? u : d, r.date) : !1, I = d && u ? P(k ? d : u, r.date) : !1, B = !d && a ? P(a, r.date) : !1, R = !d && i ? P(i, r.date) : !1, x = P(r.date, h), A = oa(
3399
+ ), b = r.month === t.getMonth(), D = p?.(r.date) ?? !1, k = d && u ? G(d, u) : !1, S = d && u ? P(k ? u : d, r.date) : !1, I = d && u ? P(k ? d : u, r.date) : !1, B = !d && a ? P(a, r.date) : !1, R = !d && i ? P(i, r.date) : !1, _ = P(r.date, h), A = oa(
3394
3400
  r.date,
3395
3401
  a,
3396
3402
  i,
@@ -3410,7 +3416,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3410
3416
  tabIndex: D ? void 0 : Da(
3411
3417
  r,
3412
3418
  a,
3413
- x,
3419
+ _,
3414
3420
  t,
3415
3421
  g
3416
3422
  ),
@@ -3433,7 +3439,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3433
3439
  {
3434
3440
  className: ne(
3435
3441
  se.contentWrapper,
3436
- x ? se.isToday : void 0,
3442
+ _ ? se.isToday : void 0,
3437
3443
  a ? se.startSelected : void 0,
3438
3444
  i ? se.endSelected : void 0,
3439
3445
  d && P(d, r.date) ? se.hover : void 0,
@@ -3445,7 +3451,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3445
3451
  Ce,
3446
3452
  {
3447
3453
  variant: "bold",
3448
- color: D ? _t("--lhds-color-ui-500") : void 0,
3454
+ color: D ? xt("--lhds-color-ui-500") : void 0,
3449
3455
  children: r.dayOfMonth
3450
3456
  }
3451
3457
  )
@@ -3543,22 +3549,22 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3543
3549
  dateTestId: I,
3544
3550
  previousMonthButtonTestId: B,
3545
3551
  nextMonthButtonTestId: R,
3546
- textInputVariant: x = "standard",
3552
+ textInputVariant: _ = "standard",
3547
3553
  autoFocusStartDate: A,
3548
- autoFocusEndDate: F
3554
+ autoFocusEndDate: Y
3549
3555
  }) => {
3550
- const [E, H] = M(!1), [q, J] = M(!1), [T, K] = M({
3556
+ const [E, F] = M(!1), [q, J] = M(!1), [T, K] = M({
3551
3557
  // Sane defaults, this will be updated with actual data from DOM.
3552
3558
  width: 336,
3553
3559
  height: 66
3554
- }), [U, j] = M(void 0), O = $(null), Y = $(null), X = (ee) => {
3555
- ee === "startDate" ? O.current?.focus() : ee === "endDate" && Y.current?.focus();
3560
+ }), [U, j] = M(void 0), O = $(null), H = $(null), X = (ee) => {
3561
+ ee === "startDate" ? O.current?.focus() : ee === "endDate" && H.current?.focus();
3556
3562
  }, re = S === "large" ? "8.8rem" : "6.6rem", oe = $(!1), ue = w((ee) => {
3557
3563
  j(ee), oe.current = !0, J(!0), setTimeout(() => {
3558
- H(!0);
3564
+ F(!0);
3559
3565
  }, 10);
3560
3566
  }, []), W = w(() => {
3561
- q && (H(!1), oe.current = !1, D?.(), setTimeout(() => {
3567
+ q && (F(!1), oe.current = !1, D?.(), setTimeout(() => {
3562
3568
  oe.current || J(!1);
3563
3569
  }, 120));
3564
3570
  }, [q, D]), ze = $(null), Me = $(null);
@@ -3580,10 +3586,10 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3580
3586
  visiblePanel: Ke,
3581
3587
  visibleMonth: ce,
3582
3588
  onValueChangeByInputs: Ee,
3583
- setVisibleMonth: Hn,
3589
+ setVisibleMonth: Fn,
3584
3590
  setVisiblePanel: Nt,
3585
3591
  monthPickerButtonRef: Bt
3586
- } = De, Yn = w(
3592
+ } = De, Hn = w(
3587
3593
  (ee) => {
3588
3594
  ee.key === "Escape" && W();
3589
3595
  },
@@ -3595,7 +3601,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3595
3601
  position: "relative",
3596
3602
  className: ht.travelDateRangeInput,
3597
3603
  ref: ze,
3598
- onKeyDown: Yn,
3604
+ onKeyDown: Hn,
3599
3605
  height: T.height,
3600
3606
  width: T.width,
3601
3607
  children: [
@@ -3612,7 +3618,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3612
3618
  value: e,
3613
3619
  onValueChange: Ee,
3614
3620
  startDateRef: O,
3615
- endDateRef: Y,
3621
+ endDateRef: H,
3616
3622
  localeCode: s,
3617
3623
  startDateLabel: n,
3618
3624
  endDateLabel: r,
@@ -3620,9 +3626,9 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3620
3626
  calendarSize: S,
3621
3627
  placeholderWhenBlurredStartDate: d,
3622
3628
  placeholderWhenBlurredEndDate: u,
3623
- variant: x,
3629
+ variant: _,
3624
3630
  autoFocusStartDate: A,
3625
- autoFocusEndDate: F,
3631
+ autoFocusEndDate: Y,
3626
3632
  readOnlyOnMobile: !0
3627
3633
  }
3628
3634
  )
@@ -3643,7 +3649,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3643
3649
  shadow: "popover",
3644
3650
  borderRadius: "var(--swui-border-radius-large)",
3645
3651
  children: /* @__PURE__ */ N(ln, { gap: 3, children: [
3646
- h && /* @__PURE__ */ o(Fe, { variant: "h2", as: g, children: h }),
3652
+ h && /* @__PURE__ */ o(Ye, { variant: "h2", as: g, children: h }),
3647
3653
  /* @__PURE__ */ o(L, { height: re }),
3648
3654
  /* @__PURE__ */ o(
3649
3655
  it,
@@ -3677,7 +3683,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3677
3683
  size: S,
3678
3684
  localeCode: a,
3679
3685
  onValueChange: (ee) => {
3680
- Hn(ee), Nt("calendar"), Bt.current?.focus();
3686
+ Fn(ee), Nt("calendar"), Bt.current?.focus();
3681
3687
  },
3682
3688
  onCancel: () => {
3683
3689
  Nt("calendar"), Bt.current?.focus();
@@ -3710,10 +3716,10 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3710
3716
  variant: d,
3711
3717
  readOnlyOnMobile: u
3712
3718
  }) => {
3713
- const { deviceSize: h } = Nn(), g = u && !Bn(h, "tablet"), { mask: f, placeholder: p } = _(() => {
3719
+ const { deviceSize: h } = Nn(), g = u && !Bn(h, "tablet"), { mask: f, placeholder: p } = x(() => {
3714
3720
  const y = Be(r);
3715
3721
  return {
3716
- mask: xn(y),
3722
+ mask: _n(y),
3717
3723
  placeholder: y.toLowerCase()
3718
3724
  };
3719
3725
  }, [r]);
@@ -3739,13 +3745,13 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3739
3745
  }
3740
3746
  ) });
3741
3747
  }, Pn = (e, t, n, r, s, a) => {
3742
- const i = Te(r), c = Tt(), l = _e(), d = $(null), u = _(
3748
+ const i = Te(r), c = Tt(), l = xe(), d = $(null), u = x(
3743
3749
  () => Be(n),
3744
3750
  [n]
3745
- ), h = _(
3751
+ ), h = x(
3746
3752
  () => e?.length === u.length ? le(e, n) : void 0,
3747
3753
  [u.length, n, e]
3748
- ), g = _(
3754
+ ), g = x(
3749
3755
  () => h != null ? yt(h, l, i) : void 0,
3750
3756
  [i, h, l]
3751
3757
  ), [f, p] = M(
@@ -3755,23 +3761,23 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3755
3761
  me(R, l) || G(R, l) ? p(R) : p(l);
3756
3762
  },
3757
3763
  [l]
3758
- ), v = _(
3764
+ ), v = x(
3759
3765
  () => at(
3760
3766
  f.getFullYear(),
3761
3767
  f.getMonth(),
3762
3768
  i
3763
3769
  ),
3764
3770
  [i, f]
3765
- ), C = _(() => st(
3771
+ ), C = x(() => st(
3766
3772
  Dn(
3767
3773
  f,
3768
3774
  { month: "long", year: "numeric" },
3769
3775
  { locale: i.code }
3770
3776
  )
3771
- ), [i, f]), m = _(() => me(l, f), [l, f]), [b, D] = M(), [k, S] = M("calendar"), I = w(
3777
+ ), [i, f]), m = x(() => me(l, f), [l, f]), [b, D] = M(), [k, S] = M("calendar"), I = w(
3772
3778
  (R) => {
3773
- const x = R?.length === u.length ? le(R, n) : void 0;
3774
- x && y(x), t?.(R);
3779
+ const _ = R?.length === u.length ? le(R, n) : void 0;
3780
+ _ && y(_), t?.(R);
3775
3781
  },
3776
3782
  [u.length, n, t, y]
3777
3783
  );
@@ -3824,7 +3830,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3824
3830
  nextMonthButtonTestId: B,
3825
3831
  textInputVariant: R = "standard"
3826
3832
  }) => {
3827
- const [x, A] = M(!1), [F, E] = M(!1), [H, q] = M({
3833
+ const [_, A] = M(!1), [Y, E] = M(!1), [F, q] = M({
3828
3834
  // Sane defaults, this will be updated with actual data from DOM.
3829
3835
  width: 336,
3830
3836
  height: 66
@@ -3833,18 +3839,18 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3833
3839
  A(!0);
3834
3840
  }, 10);
3835
3841
  }, []), U = w(() => {
3836
- F && (A(!1), T.current = !1, b?.(), setTimeout(() => {
3842
+ Y && (A(!1), T.current = !1, b?.(), setTimeout(() => {
3837
3843
  T.current || E(!1);
3838
3844
  }, 120));
3839
- }, [F, b]), j = w(() => {
3845
+ }, [Y, b]), j = w(() => {
3840
3846
  setTimeout(() => {
3841
3847
  U();
3842
3848
  }, 250);
3843
- }, [U]), O = $(null), Y = $(null);
3849
+ }, [U]), O = $(null), H = $(null);
3844
3850
  an(O, U), wn(() => {
3845
- const ce = Y.current?.offsetWidth, Ee = Y.current?.offsetHeight;
3846
- ce != null && Ee != null && (H.height !== Ee || H.width !== ce) && q({ width: ce, height: Ee });
3847
- }, [H.height, H.width]);
3851
+ const ce = H.current?.offsetWidth, Ee = H.current?.offsetHeight;
3852
+ ce != null && Ee != null && (F.height !== Ee || F.width !== ce) && q({ width: ce, height: Ee });
3853
+ }, [F.height, F.width]);
3848
3854
  const X = Pn(
3849
3855
  e,
3850
3856
  t,
@@ -3873,15 +3879,15 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3873
3879
  className: gt.travelDateInput,
3874
3880
  ref: O,
3875
3881
  onKeyDown: Ke,
3876
- height: H.height,
3877
- width: H.width,
3882
+ height: F.height,
3883
+ width: F.width,
3878
3884
  children: [
3879
3885
  /* @__PURE__ */ o(
3880
3886
  L,
3881
3887
  {
3882
3888
  position: "absolute",
3883
- ref: Y,
3884
- zIndex: F ? C : m,
3889
+ ref: H,
3890
+ zIndex: Y ? C : m,
3885
3891
  children: /* @__PURE__ */ o(
3886
3892
  An,
3887
3893
  {
@@ -3900,14 +3906,14 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3900
3906
  )
3901
3907
  }
3902
3908
  ),
3903
- F && /* @__PURE__ */ o(
3909
+ Y && /* @__PURE__ */ o(
3904
3910
  L,
3905
3911
  {
3906
3912
  position: "absolute",
3907
3913
  zIndex: C - 1,
3908
3914
  left: "-2.4rem",
3909
3915
  top: u ? "-8.0rem" : "-2.4rem",
3910
- className: ne(gt.overlay, x && gt.calendarVisible),
3916
+ className: ne(gt.overlay, _ && gt.calendarVisible),
3911
3917
  children: /* @__PURE__ */ o(
3912
3918
  L,
3913
3919
  {
@@ -3915,7 +3921,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
3915
3921
  shadow: "popover",
3916
3922
  borderRadius: "var(--swui-border-radius-large)",
3917
3923
  children: /* @__PURE__ */ N(ln, { gap: 3, children: [
3918
- u && /* @__PURE__ */ o(Fe, { variant: "h2", as: h, children: u }),
3924
+ u && /* @__PURE__ */ o(Ye, { variant: "h2", as: h, children: u }),
3919
3925
  /* @__PURE__ */ o(L, { height: J }),
3920
3926
  /* @__PURE__ */ o(
3921
3927
  it,
@@ -4003,13 +4009,13 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
4003
4009
  visiblePanel: I,
4004
4010
  visibleMonth: B,
4005
4011
  onValueChangeByInputs: R,
4006
- setVisibleMonth: x,
4012
+ setVisibleMonth: _,
4007
4013
  setVisiblePanel: A,
4008
- monthPickerButtonRef: F,
4014
+ monthPickerButtonRef: Y,
4009
4015
  selectedDate: E
4010
4016
  } = S;
4011
4017
  return /* @__PURE__ */ N(Q, { gap: 3, children: [
4012
- d && /* @__PURE__ */ o(Fe, { variant: "h2", as: u, children: d }),
4018
+ d && /* @__PURE__ */ o(Ye, { variant: "h2", as: u, children: d }),
4013
4019
  /* @__PURE__ */ o(
4014
4020
  An,
4015
4021
  {
@@ -4060,11 +4066,11 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
4060
4066
  value: B,
4061
4067
  localeCode: s,
4062
4068
  size: C,
4063
- onValueChange: (H) => {
4064
- x(H), A("calendar"), F.current?.focus();
4069
+ onValueChange: (F) => {
4070
+ _(F), A("calendar"), Y.current?.focus();
4065
4071
  },
4066
4072
  onCancel: () => {
4067
- A("calendar"), F.current?.focus();
4073
+ A("calendar"), Y.current?.focus();
4068
4074
  }
4069
4075
  }
4070
4076
  )
@@ -4096,20 +4102,20 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
4096
4102
  autoFocusStartDate: I,
4097
4103
  autoFocusEndDate: B
4098
4104
  }) => {
4099
- const [R, x] = M(void 0), A = $(null), F = $(null), E = w((Y) => {
4100
- Y === "startDate" ? A.current?.focus() : Y === "endDate" && F.current?.focus();
4101
- }, []), H = Ln(
4105
+ const [R, _] = M(void 0), A = $(null), Y = $(null), E = w((H) => {
4106
+ H === "startDate" ? A.current?.focus() : H === "endDate" && Y.current?.focus();
4107
+ }, []), F = Ln(
4102
4108
  e,
4103
4109
  t,
4104
4110
  s,
4105
4111
  a,
4106
4112
  i,
4107
4113
  R,
4108
- x,
4114
+ _,
4109
4115
  E,
4110
4116
  void 0
4111
- ), q = w((Y) => {
4112
- x(Y);
4117
+ ), q = w((H) => {
4118
+ _(H);
4113
4119
  }, []), {
4114
4120
  visiblePanel: J,
4115
4121
  visibleMonth: T,
@@ -4117,17 +4123,17 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
4117
4123
  setVisibleMonth: U,
4118
4124
  setVisiblePanel: j,
4119
4125
  monthPickerButtonRef: O
4120
- } = H;
4126
+ } = F;
4121
4127
  return /* @__PURE__ */ N(Q, { gap: 3, children: [
4122
- d && /* @__PURE__ */ o(Fe, { variant: "h2", as: u, children: d }),
4128
+ d && /* @__PURE__ */ o(Ye, { variant: "h2", as: u, children: d }),
4123
4129
  /* @__PURE__ */ o(
4124
4130
  En,
4125
4131
  {
4126
- ...H,
4132
+ ...F,
4127
4133
  value: e,
4128
4134
  onValueChange: K,
4129
4135
  startDateRef: A,
4130
- endDateRef: F,
4136
+ endDateRef: Y,
4131
4137
  localeCode: s,
4132
4138
  startDateLabel: n,
4133
4139
  endDateLabel: r,
@@ -4144,7 +4150,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
4144
4150
  /* @__PURE__ */ o(
4145
4151
  it,
4146
4152
  {
4147
- ...H,
4153
+ ...F,
4148
4154
  previousMonthButtonAriaLabel: c,
4149
4155
  nextMonthButtonAriaLabel: l,
4150
4156
  calendarSize: v,
@@ -4157,7 +4163,7 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
4157
4163
  J === "calendar" && /* @__PURE__ */ o(
4158
4164
  ct,
4159
4165
  {
4160
- ...H,
4166
+ ...F,
4161
4167
  size: v,
4162
4168
  multiSelectable: !0,
4163
4169
  isDateDisabled: g,
@@ -4172,8 +4178,8 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
4172
4178
  value: T,
4173
4179
  size: v,
4174
4180
  localeCode: a,
4175
- onValueChange: (Y) => {
4176
- U(Y), j("calendar"), O.current?.focus();
4181
+ onValueChange: (H) => {
4182
+ U(H), j("calendar"), O.current?.focus();
4177
4183
  },
4178
4184
  onCancel: () => {
4179
4185
  j("calendar"), O.current?.focus();
@@ -4182,13 +4188,13 @@ const Ln = (e, t, n, r, s, a, i, c, l) => {
4182
4188
  )
4183
4189
  ] });
4184
4190
  }, co = () => {
4185
- const e = _e();
4191
+ const e = xe();
4186
4192
  return w(
4187
4193
  (t) => !P(t, e) && Ne(t, e),
4188
4194
  [e]
4189
4195
  );
4190
4196
  }, lo = () => {
4191
- const e = _e();
4197
+ const e = xe();
4192
4198
  return w(
4193
4199
  (t) => me(e, t) || Ne(t, e),
4194
4200
  [e]
@@ -4222,13 +4228,13 @@ export {
4222
4228
  yn as addDayStateHighlightsOnSingleDay,
4223
4229
  yr as addWeekRangeHighlights,
4224
4230
  $a as addWeekStateHighlights,
4225
- Ye as buildDayStateForDateRange,
4231
+ He as buildDayStateForDateRange,
4226
4232
  wr as buildDayStateForRange,
4227
4233
  br as buildDayStateForSingleMonth,
4228
4234
  Rr as calculateOverflowingMonth,
4229
4235
  Mr as createDay,
4230
4236
  rs as dateRangeToStrings,
4231
- xr as dayHasHighlight,
4237
+ _r as dayHasHighlight,
4232
4238
  fe as dayHighlightSelect,
4233
4239
  ke as defaultCalendarTheme,
4234
4240
  Br as defaultTextPropsProvider,
@@ -4246,7 +4252,7 @@ export {
4246
4252
  Gt as getMonthsInYear,
4247
4253
  Sn as getSupportedLocaleCode,
4248
4254
  Vr as getSupportedLocaleCodeMatchingLanguage,
4249
- xt as getWeekForDate,
4255
+ _t as getWeekForDate,
4250
4256
  Sr as getWeeksForMonth,
4251
4257
  Mn as isDateRangeInvalid,
4252
4258
  le as parseLocalizedDateString,