prometeo-design-system 2.6.0 → 2.6.2

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.
Files changed (41) hide show
  1. package/dist/CheckBox.es.js +27 -24
  2. package/dist/DatePicker.es.js +276 -272
  3. package/dist/DrawerMobile.es.js +87 -87
  4. package/dist/FAButton.d.ts +4 -0
  5. package/dist/FAButton.es.js +60 -0
  6. package/dist/HelperComponent-8ErmQ_n9.js +24 -0
  7. package/dist/Input-r2N9xkjM.js +280 -0
  8. package/dist/Input.es.js +1 -1
  9. package/dist/InputFormik.es.js +136 -93
  10. package/dist/InputFormikV2.d.ts +6 -0
  11. package/dist/InputFormikV2.es.js +29 -0
  12. package/dist/RadioButton.d.ts +2 -0
  13. package/dist/RadioButton.es.js +77 -0
  14. package/dist/RadioButtonFormik.d.ts +2 -0
  15. package/dist/RadioButtonFormik.es.js +30 -0
  16. package/dist/{Select-B5hkJ8Oy.js → Select-IAQKEfnq.js} +9 -8
  17. package/dist/Select.es.js +1 -1
  18. package/dist/SelectFormik.es.js +1 -1
  19. package/dist/SelectSearch.es.js +1 -1
  20. package/dist/components/DatePicker/DatePicker.d.ts +34 -0
  21. package/dist/components/Drawer/DrawerMobile.d.ts +1 -1
  22. package/dist/components/InputFormik/InputFormik.d.ts +2 -1
  23. package/dist/components/InputFormik/InputFormikV2.d.ts +1 -0
  24. package/dist/components/RadioButton/RadioButton.d.ts +12 -0
  25. package/dist/components/RadioButtonFormik/RadioButtonFormik.d.ts +8 -0
  26. package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +6 -0
  27. package/dist/components/RecurrentDatePicker/PreviewCalendar.d.ts +2 -0
  28. package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +7 -0
  29. package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +11 -0
  30. package/dist/exports/RadioButton.d.ts +1 -0
  31. package/dist/exports/RadioButtonFormik.d.ts +1 -0
  32. package/dist/index.d.ts +4 -0
  33. package/dist/pages/RecurrentDatePicker.page.d.ts +2 -0
  34. package/dist/preview/RadioButtonPreview.d.ts +2 -0
  35. package/dist/preview/RecurrentDatePickerPreview.d.ts +2 -0
  36. package/dist/prometeo-design-system.css +1 -1
  37. package/dist/prometeo-design-system.es.js +286 -354
  38. package/package.json +9 -1
  39. package/src/styles/intellisense.css +1 -0
  40. package/dist/Input-DHdy-pWf.js +0 -295
  41. package/dist/components/Select copy/Select.d.ts +0 -71
@@ -1,7 +1,7 @@
1
- import { j as $ } from "./jsx-runtime-ByW6EXIE.js";
2
- import m, { createContext as mn, useContext as hn, useCallback as q, useRef as Se, useLayoutEffect as yn, useState as he, useEffect as _e, useMemo as fe, memo as pn } from "react";
1
+ import { j as q } from "./jsx-runtime-ByW6EXIE.js";
2
+ import m, { createContext as mn, useContext as hn, useCallback as R, useRef as Se, useLayoutEffect as yn, useState as he, useEffect as _e, useMemo as fe, memo as pn } from "react";
3
3
  import { InputMultiple as gn } from "./InputMultiple.es.js";
4
- import { I as wn } from "./Input-DHdy-pWf.js";
4
+ import { I as wn } from "./Input-r2N9xkjM.js";
5
5
  import { createPortal as bn } from "react-dom";
6
6
  import { Icons as Mt } from "./Icons.es.js";
7
7
  import { c as Be } from "./cn-B6yFEsav.js";
@@ -94,14 +94,14 @@ function _t(e) {
94
94
  const f = ke(e.timeZone, e), w = f > 0 ? Math.floor(f) : Math.ceil(f), W = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - w, b = w !== n, O = W - c;
95
95
  if (b && O) {
96
96
  Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + O);
97
- const y = ke(e.timeZone, e), g = y > 0 ? Math.floor(y) : Math.ceil(y), x = w - g;
98
- x && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + x), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + x));
97
+ const y = ke(e.timeZone, e), p = y > 0 ? Math.floor(y) : Math.ceil(y), C = w - p;
98
+ C && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + C), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + C));
99
99
  }
100
100
  }
101
- class R extends re {
101
+ class L extends re {
102
102
  //#region static
103
103
  static tz(t, ...n) {
104
- return n.length ? new R(...n, t) : new R(Date.now(), t);
104
+ return n.length ? new L(...n, t) : new L(Date.now(), t);
105
105
  }
106
106
  //#endregion
107
107
  //#region representation
@@ -146,31 +146,31 @@ class R extends re {
146
146
  }
147
147
  //#endregion
148
148
  withTimeZone(t) {
149
- return new R(+this, t);
149
+ return new L(+this, t);
150
150
  }
151
151
  //#region date-fns integration
152
152
  [Symbol.for("constructDateFrom")](t) {
153
- return new R(+new Date(t), this.timeZone);
153
+ return new L(+new Date(t), this.timeZone);
154
154
  }
155
155
  //#endregion
156
156
  }
157
157
  const Ft = 6048e5, On = 864e5, Ot = Symbol.for("constructDateFrom");
158
- function A(e, t) {
158
+ function $(e, t) {
159
159
  return typeof e == "function" ? e(t) : e && typeof e == "object" && Ot in e ? e[Ot](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
160
160
  }
161
161
  function Y(e, t) {
162
- return A(t || e, e);
162
+ return $(t || e, e);
163
163
  }
164
164
  function Bt(e, t, n) {
165
165
  const o = Y(e, n?.in);
166
- return isNaN(t) ? A(e, NaN) : (t && o.setDate(o.getDate() + t), o);
166
+ return isNaN(t) ? $(e, NaN) : (t && o.setDate(o.getDate() + t), o);
167
167
  }
168
168
  function It(e, t, n) {
169
169
  const o = Y(e, n?.in);
170
- if (isNaN(t)) return A(e, NaN);
170
+ if (isNaN(t)) return $(e, NaN);
171
171
  if (!t)
172
172
  return o;
173
- const r = o.getDate(), a = A(e, o.getTime());
173
+ const r = o.getDate(), a = $(e, o.getTime());
174
174
  a.setMonth(o.getMonth() + t + 1, 0);
175
175
  const i = a.getDate();
176
176
  return r >= i ? a : (o.setFullYear(
@@ -191,9 +191,9 @@ function Ie(e, t) {
191
191
  return xe(e, { ...t, weekStartsOn: 1 });
192
192
  }
193
193
  function jt(e, t) {
194
- const n = Y(e, t?.in), o = n.getFullYear(), r = A(n, 0);
194
+ const n = Y(e, t?.in), o = n.getFullYear(), r = $(n, 0);
195
195
  r.setFullYear(o + 1, 0, 4), r.setHours(0, 0, 0, 0);
196
- const a = Ie(r), i = A(n, 0);
196
+ const a = Ie(r), i = $(n, 0);
197
197
  i.setFullYear(o, 0, 4), i.setHours(0, 0, 0, 0);
198
198
  const s = Ie(i);
199
199
  return n.getTime() >= a.getTime() ? o + 1 : n.getTime() >= s.getTime() ? o : o - 1;
@@ -213,7 +213,7 @@ function Wt(e) {
213
213
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
214
214
  }
215
215
  function Ne(e, ...t) {
216
- const n = A.bind(
216
+ const n = $.bind(
217
217
  null,
218
218
  t.find((o) => typeof o == "object")
219
219
  );
@@ -232,7 +232,7 @@ function Ht(e, t, n) {
232
232
  return Math.round((s - c) / On);
233
233
  }
234
234
  function Sn(e, t) {
235
- const n = jt(e, t), o = A(e, 0);
235
+ const n = jt(e, t), o = $(e, 0);
236
236
  return o.setFullYear(n, 0, 4), o.setHours(0, 0, 0, 0), Ie(o);
237
237
  }
238
238
  function Cn(e, t, n) {
@@ -244,18 +244,18 @@ function xn(e, t, n) {
244
244
  function Nn(e, t) {
245
245
  let n, o = t?.in;
246
246
  return e.forEach((r) => {
247
- !o && typeof r == "object" && (o = A.bind(null, r));
247
+ !o && typeof r == "object" && (o = $.bind(null, r));
248
248
  const a = Y(r, o);
249
249
  (!n || n < a || isNaN(+a)) && (n = a);
250
- }), A(o, n || NaN);
250
+ }), $(o, n || NaN);
251
251
  }
252
252
  function Pn(e, t) {
253
253
  let n, o = t?.in;
254
254
  return e.forEach((r) => {
255
- !o && typeof r == "object" && (o = A.bind(null, r));
255
+ !o && typeof r == "object" && (o = $.bind(null, r));
256
256
  const a = Y(r, o);
257
257
  (!n || n > a || isNaN(+a)) && (n = a);
258
- }), A(o, n || NaN);
258
+ }), $(o, n || NaN);
259
259
  }
260
260
  function Tn(e, t, n) {
261
261
  const [o, r] = Ne(
@@ -295,7 +295,7 @@ function Fn(e, t) {
295
295
  let s = 1;
296
296
  const c = [];
297
297
  for (; +i <= a; )
298
- c.push(A(n, i)), i.setMonth(i.getMonth() + s);
298
+ c.push($(n, i)), i.setMonth(i.getMonth() + s);
299
299
  return r ? c.reverse() : c;
300
300
  }
301
301
  function Bn(e, t) {
@@ -318,7 +318,7 @@ function jn(e, t) {
318
318
  let s = 1;
319
319
  const c = [];
320
320
  for (; +i <= a; )
321
- c.push(A(n, i)), i.setFullYear(i.getFullYear() + s);
321
+ c.push($(n, i)), i.setFullYear(i.getFullYear() + s);
322
322
  return r ? c.reverse() : c;
323
323
  }
324
324
  function Rt(e, t) {
@@ -768,15 +768,15 @@ function zt(e, t) {
768
768
  return Math.round(o / Ft) + 1;
769
769
  }
770
770
  function Zt(e, t) {
771
- const n = Y(e, t?.in), o = n.getFullYear(), r = He(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = A(t?.in || e, 0);
771
+ const n = Y(e, t?.in), o = n.getFullYear(), r = He(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = $(t?.in || e, 0);
772
772
  i.setFullYear(o + 1, 0, a), i.setHours(0, 0, 0, 0);
773
- const s = xe(i, t), c = A(t?.in || e, 0);
773
+ const s = xe(i, t), c = $(t?.in || e, 0);
774
774
  c.setFullYear(o, 0, a), c.setHours(0, 0, 0, 0);
775
775
  const d = xe(c, t);
776
776
  return +n >= +s ? o + 1 : +n >= +d ? o : o - 1;
777
777
  }
778
778
  function bo(e, t) {
779
- const n = He(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, r = Zt(e, t), a = A(t?.in || e, 0);
779
+ const n = He(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, r = Zt(e, t), a = $(t?.in || e, 0);
780
780
  return a.setFullYear(r, 0, o), a.setHours(0, 0, 0, 0), xe(a, t);
781
781
  }
782
782
  function Gt(e, t) {
@@ -1522,7 +1522,7 @@ function Fo(e) {
1522
1522
  return t ? t[1].replace(Yo, "'") : e;
1523
1523
  }
1524
1524
  function Bo(e, t) {
1525
- const n = Y(e, t?.in), o = n.getFullYear(), r = n.getMonth(), a = A(n, 0);
1525
+ const n = Y(e, t?.in), o = n.getFullYear(), r = n.getMonth(), a = $(n, 0);
1526
1526
  return a.setFullYear(o, r + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
1527
1527
  }
1528
1528
  function Io(e, t) {
@@ -1554,14 +1554,14 @@ function qo(e, t, n) {
1554
1554
  return o.getFullYear() === r.getFullYear();
1555
1555
  }
1556
1556
  function Ro(e, t, n) {
1557
- const o = Y(e, n?.in), r = o.getFullYear(), a = o.getDate(), i = A(e, 0);
1557
+ const o = Y(e, n?.in), r = o.getFullYear(), a = o.getDate(), i = $(e, 0);
1558
1558
  i.setFullYear(r, t, 15), i.setHours(0, 0, 0, 0);
1559
1559
  const s = Bo(i);
1560
1560
  return o.setMonth(t, Math.min(a, s)), o;
1561
1561
  }
1562
1562
  function Lo(e, t, n) {
1563
1563
  const o = Y(e, n?.in);
1564
- return isNaN(+o) ? A(e, NaN) : (o.setFullYear(t), o);
1564
+ return isNaN(+o) ? $(e, NaN) : (o.setFullYear(t), o);
1565
1565
  }
1566
1566
  const Pt = 5, zo = 4;
1567
1567
  function Zo(e, t) {
@@ -1584,7 +1584,7 @@ class K {
1584
1584
  * @param overrides Custom overrides for the date library functions.
1585
1585
  */
1586
1586
  constructor(t, n) {
1587
- this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? R.tz(this.options.timeZone) : new this.Date(), this.newDate = (o, r, a) => this.overrides?.newDate ? this.overrides.newDate(o, r, a) : this.options.timeZone ? new R(o, r, a, this.options.timeZone) : new Date(o, r, a), this.addDays = (o, r) => this.overrides?.addDays ? this.overrides.addDays(o, r) : Bt(o, r), this.addMonths = (o, r) => this.overrides?.addMonths ? this.overrides.addMonths(o, r) : It(o, r), this.addWeeks = (o, r) => this.overrides?.addWeeks ? this.overrides.addWeeks(o, r) : Cn(o, r), this.addYears = (o, r) => this.overrides?.addYears ? this.overrides.addYears(o, r) : xn(o, r), this.differenceInCalendarDays = (o, r) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(o, r) : Ht(o, r), this.differenceInCalendarMonths = (o, r) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(o, r) : En(o, r), this.eachMonthOfInterval = (o) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(o) : Fn(o), this.eachYearOfInterval = (o) => {
1587
+ this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? L.tz(this.options.timeZone) : new this.Date(), this.newDate = (o, r, a) => this.overrides?.newDate ? this.overrides.newDate(o, r, a) : this.options.timeZone ? new L(o, r, a, this.options.timeZone) : new Date(o, r, a), this.addDays = (o, r) => this.overrides?.addDays ? this.overrides.addDays(o, r) : Bt(o, r), this.addMonths = (o, r) => this.overrides?.addMonths ? this.overrides.addMonths(o, r) : It(o, r), this.addWeeks = (o, r) => this.overrides?.addWeeks ? this.overrides.addWeeks(o, r) : Cn(o, r), this.addYears = (o, r) => this.overrides?.addYears ? this.overrides.addYears(o, r) : xn(o, r), this.differenceInCalendarDays = (o, r) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(o, r) : Ht(o, r), this.differenceInCalendarMonths = (o, r) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(o, r) : En(o, r), this.eachMonthOfInterval = (o) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(o) : Fn(o), this.eachYearOfInterval = (o) => {
1588
1588
  const r = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(o) : jn(o), a = new Set(r.map((s) => this.getYear(s)));
1589
1589
  if (a.size === r.length)
1590
1590
  return r;
@@ -1737,14 +1737,14 @@ function er(e) {
1737
1737
  n.focused && r.current?.focus();
1738
1738
  }, [n.focused]), m.createElement("button", { ref: r, ...o });
1739
1739
  }
1740
- var p;
1740
+ var g;
1741
1741
  (function(e) {
1742
1742
  e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
1743
- })(p || (p = {}));
1744
- var j;
1743
+ })(g || (g = {}));
1744
+ var B;
1745
1745
  (function(e) {
1746
1746
  e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
1747
- })(j || (j = {}));
1747
+ })(B || (B = {}));
1748
1748
  var J;
1749
1749
  (function(e) {
1750
1750
  e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
@@ -1754,16 +1754,16 @@ var U;
1754
1754
  e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
1755
1755
  })(U || (U = {}));
1756
1756
  function tr(e) {
1757
- const { options: t, className: n, components: o, classNames: r, ...a } = e, i = [r[p.Dropdown], n].join(" "), s = t?.find(({ value: c }) => c === a.value);
1757
+ const { options: t, className: n, components: o, classNames: r, ...a } = e, i = [r[g.Dropdown], n].join(" "), s = t?.find(({ value: c }) => c === a.value);
1758
1758
  return m.createElement(
1759
1759
  "span",
1760
- { "data-disabled": a.disabled, className: r[p.DropdownRoot] },
1760
+ { "data-disabled": a.disabled, className: r[g.DropdownRoot] },
1761
1761
  m.createElement(o.Select, { className: i, ...a }, t?.map(({ value: c, label: d, disabled: l }) => m.createElement(o.Option, { key: c, value: c, disabled: l }, d))),
1762
1762
  m.createElement(
1763
1763
  "span",
1764
- { className: r[p.CaptionLabel], "aria-hidden": !0 },
1764
+ { className: r[g.CaptionLabel], "aria-hidden": !0 },
1765
1765
  s?.label,
1766
- m.createElement(o.Chevron, { orientation: "down", size: 18, className: r[p.Chevron] })
1766
+ m.createElement(o.Chevron, { orientation: "down", size: 18, className: r[g.Chevron] })
1767
1767
  )
1768
1768
  );
1769
1769
  }
@@ -1799,9 +1799,9 @@ function cr(e) {
1799
1799
  return m.createElement(t.Dropdown, { ...e });
1800
1800
  }
1801
1801
  function ur(e) {
1802
- const { onPreviousClick: t, onNextClick: n, previousMonth: o, nextMonth: r, ...a } = e, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: d } } = Ae(), l = q((f) => {
1802
+ const { onPreviousClick: t, onNextClick: n, previousMonth: o, nextMonth: r, ...a } = e, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: d } } = Ae(), l = R((f) => {
1803
1803
  r && n?.(f);
1804
- }, [r, n]), u = q((f) => {
1804
+ }, [r, n]), u = R((f) => {
1805
1805
  o && t?.(f);
1806
1806
  }, [o, t]);
1807
1807
  return m.createElement(
@@ -1809,13 +1809,13 @@ function ur(e) {
1809
1809
  { ...a },
1810
1810
  m.createElement(
1811
1811
  i.PreviousMonthButton,
1812
- { type: "button", className: s[p.PreviousMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": c(o), onClick: u },
1813
- m.createElement(i.Chevron, { disabled: o ? void 0 : !0, className: s[p.Chevron], orientation: "left" })
1812
+ { type: "button", className: s[g.PreviousMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": c(o), onClick: u },
1813
+ m.createElement(i.Chevron, { disabled: o ? void 0 : !0, className: s[g.Chevron], orientation: "left" })
1814
1814
  ),
1815
1815
  m.createElement(
1816
1816
  i.NextMonthButton,
1817
- { type: "button", className: s[p.NextMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": d(r), onClick: l },
1818
- m.createElement(i.Chevron, { disabled: r ? void 0 : !0, orientation: "right", className: s[p.Chevron] })
1817
+ { type: "button", className: s[g.NextMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": d(r), onClick: l },
1818
+ m.createElement(i.Chevron, { disabled: r ? void 0 : !0, orientation: "right", className: s[g.Chevron] })
1819
1819
  )
1820
1820
  );
1821
1821
  }
@@ -1938,35 +1938,35 @@ function le(e, t, n = ae) {
1938
1938
  });
1939
1939
  }
1940
1940
  function kr(e, t, n, o, r) {
1941
- const { disabled: a, hidden: i, modifiers: s, showOutsideDays: c, broadcastCalendar: d, today: l } = t, { isSameDay: u, isSameMonth: f, startOfMonth: w, isBefore: D, endOfMonth: W, isAfter: b } = r, O = n && w(n), y = o && W(o), g = {
1942
- [j.focused]: [],
1943
- [j.outside]: [],
1944
- [j.disabled]: [],
1945
- [j.hidden]: [],
1946
- [j.today]: []
1947
- }, x = {};
1941
+ const { disabled: a, hidden: i, modifiers: s, showOutsideDays: c, broadcastCalendar: d, today: l } = t, { isSameDay: u, isSameMonth: f, startOfMonth: w, isBefore: D, endOfMonth: W, isAfter: b } = r, O = n && w(n), y = o && W(o), p = {
1942
+ [B.focused]: [],
1943
+ [B.outside]: [],
1944
+ [B.disabled]: [],
1945
+ [B.hidden]: [],
1946
+ [B.today]: []
1947
+ }, C = {};
1948
1948
  for (const h of e) {
1949
- const { date: v, displayMonth: M } = h, C = !!(M && !f(v, M)), I = !!(O && D(v, O)), _ = !!(y && b(v, y)), H = !!(a && le(v, a, r)), F = !!(i && le(v, i, r)) || I || _ || // Broadcast calendar will show outside days as default
1950
- !d && !c && C || d && c === !1 && C, Z = u(v, l ?? r.today());
1951
- C && g.outside.push(h), H && g.disabled.push(h), F && g.hidden.push(h), Z && g.today.push(h), s && Object.keys(s).forEach((se) => {
1949
+ const { date: v, displayMonth: M } = h, x = !!(M && !f(v, M)), j = !!(O && D(v, O)), _ = !!(y && b(v, y)), H = !!(a && le(v, a, r)), I = !!(i && le(v, i, r)) || j || _ || // Broadcast calendar will show outside days as default
1950
+ !d && !c && x || d && c === !1 && x, A = u(v, l ?? r.today());
1951
+ x && p.outside.push(h), H && p.disabled.push(h), I && p.hidden.push(h), A && p.today.push(h), s && Object.keys(s).forEach((se) => {
1952
1952
  const ee = s?.[se];
1953
- ee && le(v, ee, r) && (x[se] ? x[se].push(h) : x[se] = [h]);
1953
+ ee && le(v, ee, r) && (C[se] ? C[se].push(h) : C[se] = [h]);
1954
1954
  });
1955
1955
  }
1956
1956
  return (h) => {
1957
1957
  const v = {
1958
- [j.focused]: !1,
1959
- [j.disabled]: !1,
1960
- [j.hidden]: !1,
1961
- [j.outside]: !1,
1962
- [j.today]: !1
1958
+ [B.focused]: !1,
1959
+ [B.disabled]: !1,
1960
+ [B.hidden]: !1,
1961
+ [B.outside]: !1,
1962
+ [B.today]: !1
1963
1963
  }, M = {};
1964
- for (const C in g) {
1965
- const I = g[C];
1966
- v[C] = I.some((_) => _ === h);
1964
+ for (const x in p) {
1965
+ const j = p[x];
1966
+ v[x] = j.some((_) => _ === h);
1967
1967
  }
1968
- for (const C in x)
1969
- M[C] = x[C].some((I) => I === h);
1968
+ for (const x in C)
1969
+ M[x] = C[x].some((j) => j === h);
1970
1970
  return {
1971
1971
  ...v,
1972
1972
  // custom modifiers should override all the previous ones
@@ -1975,7 +1975,7 @@ function kr(e, t, n, o, r) {
1975
1975
  };
1976
1976
  }
1977
1977
  function Or(e, t, n = {}) {
1978
- return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [a]) => (n[a] ? r.push(n[a]) : t[j[a]] ? r.push(t[j[a]]) : t[J[a]] && r.push(t[J[a]]), r), [t[p.Day]]);
1978
+ return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [a]) => (n[a] ? r.push(n[a]) : t[B[a]] ? r.push(t[B[a]]) : t[J[a]] && r.push(t[J[a]]), r), [t[g.Day]]);
1979
1979
  }
1980
1980
  function Wr(e) {
1981
1981
  return {
@@ -1998,10 +1998,10 @@ function Sr(e) {
1998
1998
  }
1999
1999
  function Cr() {
2000
2000
  const e = {};
2001
- for (const t in p)
2002
- e[p[t]] = `rdp-${p[t]}`;
2003
- for (const t in j)
2004
- e[j[t]] = `rdp-${j[t]}`;
2001
+ for (const t in g)
2002
+ e[g[t]] = `rdp-${g[t]}`;
2003
+ for (const t in B)
2004
+ e[B[t]] = `rdp-${B[t]}`;
2005
2005
  for (const t in J)
2006
2006
  e[J[t]] = `rdp-${J[t]}`;
2007
2007
  for (const t in U)
@@ -2059,7 +2059,7 @@ function Ir(e, t, n, o, r) {
2059
2059
  });
2060
2060
  }
2061
2061
  function jr(e, t = {}, n = {}) {
2062
- let o = { ...t?.[p.Day] };
2062
+ let o = { ...t?.[g.Day] };
2063
2063
  return Object.entries(e).filter(([, r]) => r === !0).forEach(([r]) => {
2064
2064
  o = {
2065
2065
  ...o,
@@ -2152,14 +2152,14 @@ function na(e, t, { classNames: n, months: o, focused: r, dateLib: a }) {
2152
2152
  o.length === 0 || d.length === 0 || o.length !== d.length)
2153
2153
  return;
2154
2154
  const l = a.isSameMonth(o[0].date, d[0].date), u = a.isAfter(o[0].date, d[0].date), f = u ? n[U.caption_after_enter] : n[U.caption_before_enter], w = u ? n[U.weeks_after_enter] : n[U.weeks_before_enter], D = i.current, W = e.current.cloneNode(!0);
2155
- if (W instanceof HTMLElement ? (lt(W).forEach((g) => {
2156
- if (!(g instanceof HTMLElement))
2155
+ if (W instanceof HTMLElement ? (lt(W).forEach((p) => {
2156
+ if (!(p instanceof HTMLElement))
2157
2157
  return;
2158
- const x = Jr(g);
2159
- x && g.contains(x) && g.removeChild(x);
2160
- const h = ft(g);
2158
+ const C = Jr(p);
2159
+ C && p.contains(C) && p.removeChild(C);
2160
+ const h = ft(p);
2161
2161
  h && h.classList.remove(f);
2162
- const v = mt(g);
2162
+ const v = mt(p);
2163
2163
  v && v.classList.remove(w);
2164
2164
  }), i.current = W) : i.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2165
2165
  r)
@@ -2168,46 +2168,46 @@ function na(e, t, { classNames: n, months: o, focused: r, dateLib: a }) {
2168
2168
  if (O?.every((y) => y instanceof HTMLElement) && b && b.every((y) => y instanceof HTMLElement)) {
2169
2169
  c.current = !0, e.current.style.isolation = "isolate";
2170
2170
  const y = ea(e.current);
2171
- y && (y.style.zIndex = "1"), O.forEach((g, x) => {
2172
- const h = b[x];
2171
+ y && (y.style.zIndex = "1"), O.forEach((p, C) => {
2172
+ const h = b[C];
2173
2173
  if (!h)
2174
2174
  return;
2175
- g.style.position = "relative", g.style.overflow = "hidden";
2176
- const v = ft(g);
2175
+ p.style.position = "relative", p.style.overflow = "hidden";
2176
+ const v = ft(p);
2177
2177
  v && v.classList.add(f);
2178
- const M = mt(g);
2178
+ const M = mt(p);
2179
2179
  M && M.classList.add(w);
2180
- const C = () => {
2181
- c.current = !1, e.current && (e.current.style.isolation = ""), y && (y.style.zIndex = ""), v && v.classList.remove(f), M && M.classList.remove(w), g.style.position = "", g.style.overflow = "", g.contains(h) && g.removeChild(h);
2180
+ const x = () => {
2181
+ c.current = !1, e.current && (e.current.style.isolation = ""), y && (y.style.zIndex = ""), v && v.classList.remove(f), M && M.classList.remove(w), p.style.position = "", p.style.overflow = "", p.contains(h) && p.removeChild(h);
2182
2182
  };
2183
2183
  h.style.pointerEvents = "none", h.style.position = "absolute", h.style.overflow = "hidden", h.setAttribute("aria-hidden", "true");
2184
- const I = ta(h);
2185
- I && (I.style.opacity = "0");
2184
+ const j = ta(h);
2185
+ j && (j.style.opacity = "0");
2186
2186
  const _ = ft(h);
2187
- _ && (_.classList.add(u ? n[U.caption_before_exit] : n[U.caption_after_exit]), _.addEventListener("animationend", C));
2187
+ _ && (_.classList.add(u ? n[U.caption_before_exit] : n[U.caption_after_exit]), _.addEventListener("animationend", x));
2188
2188
  const H = mt(h);
2189
- H && H.classList.add(u ? n[U.weeks_before_exit] : n[U.weeks_after_exit]), g.insertBefore(h, g.firstChild);
2189
+ H && H.classList.add(u ? n[U.weeks_before_exit] : n[U.weeks_after_exit]), p.insertBefore(h, p.firstChild);
2190
2190
  });
2191
2191
  }
2192
2192
  });
2193
2193
  }
2194
2194
  function oa(e, t, n, o) {
2195
- const r = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: f, endOfISOWeek: w, endOfMonth: D, endOfWeek: W, isAfter: b, startOfBroadcastWeek: O, startOfISOWeek: y, startOfWeek: g } = o, x = c ? O(r, o) : i ? y(r) : g(r), h = c ? f(a) : i ? w(D(a)) : W(D(a)), v = l(h, x), M = u(a, r) + 1, C = [];
2195
+ const r = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: f, endOfISOWeek: w, endOfMonth: D, endOfWeek: W, isAfter: b, startOfBroadcastWeek: O, startOfISOWeek: y, startOfWeek: p } = o, C = c ? O(r, o) : i ? y(r) : p(r), h = c ? f(a) : i ? w(D(a)) : W(D(a)), v = l(h, C), M = u(a, r) + 1, x = [];
2196
2196
  for (let H = 0; H <= v; H++) {
2197
- const F = d(x, H);
2198
- if (t && b(F, t))
2197
+ const I = d(C, H);
2198
+ if (t && b(I, t))
2199
2199
  break;
2200
- C.push(F);
2200
+ x.push(I);
2201
2201
  }
2202
2202
  const _ = (c ? 35 : 42) * M;
2203
- if (s && C.length < _) {
2204
- const H = _ - C.length;
2205
- for (let F = 0; F < H; F++) {
2206
- const Z = d(C[C.length - 1], 1);
2207
- C.push(Z);
2203
+ if (s && x.length < _) {
2204
+ const H = _ - x.length;
2205
+ for (let I = 0; I < H; I++) {
2206
+ const A = d(x[x.length - 1], 1);
2207
+ x.push(A);
2208
2208
  }
2209
2209
  }
2210
- return C;
2210
+ return x;
2211
2211
  }
2212
2212
  function ra(e) {
2213
2213
  const t = [];
@@ -2238,17 +2238,17 @@ function Tt(e, t, n, o) {
2238
2238
  }
2239
2239
  function sa(e, t, n, o) {
2240
2240
  const { addDays: r, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: l, startOfBroadcastWeek: u, startOfISOWeek: f, startOfWeek: w } = o, D = e.reduce((W, b) => {
2241
- const O = n.broadcastCalendar ? u(b, o) : n.ISOWeek ? f(b) : w(b), y = n.broadcastCalendar ? a(b) : n.ISOWeek ? i(s(b)) : c(s(b)), g = t.filter((M) => M >= O && M <= y), x = n.broadcastCalendar ? 35 : 42;
2242
- if (n.fixedWeeks && g.length < x) {
2243
- const M = t.filter((C) => {
2244
- const I = x - g.length;
2245
- return C > y && C <= r(y, I);
2241
+ const O = n.broadcastCalendar ? u(b, o) : n.ISOWeek ? f(b) : w(b), y = n.broadcastCalendar ? a(b) : n.ISOWeek ? i(s(b)) : c(s(b)), p = t.filter((M) => M >= O && M <= y), C = n.broadcastCalendar ? 35 : 42;
2242
+ if (n.fixedWeeks && p.length < C) {
2243
+ const M = t.filter((x) => {
2244
+ const j = C - p.length;
2245
+ return x > y && x <= r(y, j);
2246
2246
  });
2247
- g.push(...M);
2247
+ p.push(...M);
2248
2248
  }
2249
- const h = g.reduce((M, C) => {
2250
- const I = n.ISOWeek ? d(C) : l(C), _ = M.find((F) => F.weekNumber === I), H = new Qt(C, b, o);
2251
- return _ ? _.days.push(H) : M.push(new Xo(I, [H])), M;
2249
+ const h = p.reduce((M, x) => {
2250
+ const j = n.ISOWeek ? d(x) : l(x), _ = M.find((I) => I.weekNumber === j), H = new Qt(x, b, o);
2251
+ return _ ? _.days.push(H) : M.push(new Xo(j, [H])), M;
2252
2252
  }, []), v = new Vo(b, h);
2253
2253
  return W.push(v), W;
2254
2254
  }, []);
@@ -2300,7 +2300,7 @@ function la(e, t) {
2300
2300
  const v = Tt(e, n, o, t);
2301
2301
  c(v);
2302
2302
  }, [e.timeZone]);
2303
- const d = aa(s, o, e, t), l = oa(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = sa(d, l, e, t), f = da(u), w = ra(u), D = ua(s, n, e, t), W = ca(s, o, e, t), { disableNavigation: b, onMonthChange: O } = e, y = (v) => f.some((M) => M.days.some((C) => C.isEqualTo(v))), g = (v) => {
2303
+ const d = aa(s, o, e, t), l = oa(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = sa(d, l, e, t), f = da(u), w = ra(u), D = ua(s, n, e, t), W = ca(s, o, e, t), { disableNavigation: b, onMonthChange: O } = e, y = (v) => f.some((M) => M.days.some((x) => x.isEqualTo(v))), p = (v) => {
2304
2304
  if (b)
2305
2305
  return;
2306
2306
  let M = r(v);
@@ -2314,9 +2314,9 @@ function la(e, t) {
2314
2314
  navEnd: o,
2315
2315
  previousMonth: D,
2316
2316
  nextMonth: W,
2317
- goToMonth: g,
2317
+ goToMonth: p,
2318
2318
  goToDay: (v) => {
2319
- y(v) || g(v.date);
2319
+ y(v) || p(v.date);
2320
2320
  }
2321
2321
  };
2322
2322
  }
@@ -2325,24 +2325,24 @@ var te;
2325
2325
  e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
2326
2326
  })(te || (te = {}));
2327
2327
  function Yt(e) {
2328
- return !e[j.disabled] && !e[j.hidden] && !e[j.outside];
2328
+ return !e[B.disabled] && !e[B.hidden] && !e[B.outside];
2329
2329
  }
2330
2330
  function fa(e, t, n, o) {
2331
2331
  let r, a = -1;
2332
2332
  for (const i of e) {
2333
2333
  const s = t(i);
2334
- Yt(s) && (s[j.focused] && a < te.FocusedModifier ? (r = i, a = te.FocusedModifier) : o?.isEqualTo(i) && a < te.LastFocused ? (r = i, a = te.LastFocused) : n(i.date) && a < te.Selected ? (r = i, a = te.Selected) : s[j.today] && a < te.Today && (r = i, a = te.Today));
2334
+ Yt(s) && (s[B.focused] && a < te.FocusedModifier ? (r = i, a = te.FocusedModifier) : o?.isEqualTo(i) && a < te.LastFocused ? (r = i, a = te.LastFocused) : n(i.date) && a < te.Selected ? (r = i, a = te.Selected) : s[B.today] && a < te.Today && (r = i, a = te.Today));
2335
2335
  }
2336
2336
  return r || (r = e.find((i) => Yt(t(i)))), r;
2337
2337
  }
2338
2338
  function ma(e, t, n, o, r, a, i) {
2339
- const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: l, addWeeks: u, addYears: f, endOfBroadcastWeek: w, endOfISOWeek: D, endOfWeek: W, max: b, min: O, startOfBroadcastWeek: y, startOfISOWeek: g, startOfWeek: x } = i;
2339
+ const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: l, addWeeks: u, addYears: f, endOfBroadcastWeek: w, endOfISOWeek: D, endOfWeek: W, max: b, min: O, startOfBroadcastWeek: y, startOfISOWeek: p, startOfWeek: C } = i;
2340
2340
  let v = {
2341
2341
  day: d,
2342
2342
  week: u,
2343
2343
  month: l,
2344
2344
  year: f,
2345
- startOfWeek: (M) => c ? y(M, i) : s ? g(M) : x(M),
2345
+ startOfWeek: (M) => c ? y(M, i) : s ? p(M) : C(M),
2346
2346
  endOfWeek: (M) => c ? w(M) : s ? D(M) : W(M)
2347
2347
  }[e](n, t === "after" ? 1 : -1);
2348
2348
  return t === "before" && o ? v = b([o, v]) : t === "after" && r && (v = O([r, v])), v;
@@ -2366,7 +2366,7 @@ function ha(e, t, n, o, r) {
2366
2366
  if (!d)
2367
2367
  return;
2368
2368
  const O = cn(W, b, d, t.navStart, t.navEnd, e, r);
2369
- O && (e.disableNavigation && !t.days.some((g) => g.isEqualTo(O)) || (t.goToDay(O), l(O)));
2369
+ O && (e.disableNavigation && !t.days.some((p) => p.isEqualTo(O)) || (t.goToDay(O), l(O)));
2370
2370
  }
2371
2371
  };
2372
2372
  }
@@ -2487,9 +2487,9 @@ function ht(e) {
2487
2487
  let t = e;
2488
2488
  t.timeZone && (t = {
2489
2489
  ...e
2490
- }, t.today && (t.today = new R(t.today, t.timeZone)), t.month && (t.month = new R(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new R(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new R(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new R(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new R(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((S) => new R(S, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
2491
- from: t.selected.from ? new R(t.selected.from, t.timeZone) : void 0,
2492
- to: t.selected.to ? new R(t.selected.to, t.timeZone) : void 0
2490
+ }, t.today && (t.today = new L(t.today, t.timeZone)), t.month && (t.month = new L(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new L(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new L(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new L(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new L(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((S) => new L(S, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
2491
+ from: t.selected.from ? new L(t.selected.from, t.timeZone) : void 0,
2492
+ to: t.selected.to ? new L(t.selected.to, t.timeZone) : void 0
2493
2493
  }));
2494
2494
  const { components: n, formatters: o, labels: r, dateLib: a, locale: i, classNames: s } = fe(() => {
2495
2495
  const S = { ...wt, ...t.locale };
@@ -2523,17 +2523,17 @@ function ht(e) {
2523
2523
  t.formatters,
2524
2524
  t.labels,
2525
2525
  t.classNames
2526
- ]), { captionLayout: c, mode: d, navLayout: l, numberOfMonths: u = 1, onDayBlur: f, onDayClick: w, onDayFocus: D, onDayKeyDown: W, onDayMouseEnter: b, onDayMouseLeave: O, onNextClick: y, onPrevClick: g, showWeekNumber: x, styles: h } = t, { formatCaption: v, formatDay: M, formatMonthDropdown: C, formatWeekNumber: I, formatWeekNumberHeader: _, formatWeekdayName: H, formatYearDropdown: F } = o, Z = la(t, a), { days: se, months: ee, navStart: ie, navEnd: ce, previousMonth: G, nextMonth: V, goToMonth: L } = Z, Oe = kr(se, t, ie, ce, a), { isSelected: ye, select: X, selected: pe } = va(t, a) ?? {}, { blur: Pe, focused: qe, isFocusTarget: ot, moveFocus: Re, setFocused: ge } = ha(t, Z, Oe, ye ?? (() => !1), a), { labelDayButton: Le, labelGridcell: ze, labelGrid: rt, labelMonthDropdown: N, labelNav: z, labelPrevious: ue, labelNext: we, labelWeekday: be, labelWeekNumber: Me, labelWeekNumberHeader: at, labelYearDropdown: st } = r, Ze = fe(() => Hr(a, t.ISOWeek), [a, t.ISOWeek]), Te = d !== void 0 || w !== void 0, Ye = q(() => {
2527
- G && (L(G), g?.(G));
2528
- }, [G, L, g]), ve = q(() => {
2529
- V && (L(V), y?.(V));
2530
- }, [L, V, y]), it = q((S, B) => (k) => {
2531
- k.preventDefault(), k.stopPropagation(), ge(S), X?.(S.date, B, k), w?.(S.date, B, k);
2532
- }, [X, w, ge]), Ge = q((S, B) => (k) => {
2533
- ge(S), D?.(S.date, B, k);
2534
- }, [D, ge]), Ve = q((S, B) => (k) => {
2535
- Pe(), f?.(S.date, B, k);
2536
- }, [Pe, f]), Ee = q((S, B) => (k) => {
2526
+ ]), { captionLayout: c, mode: d, navLayout: l, numberOfMonths: u = 1, onDayBlur: f, onDayClick: w, onDayFocus: D, onDayKeyDown: W, onDayMouseEnter: b, onDayMouseLeave: O, onNextClick: y, onPrevClick: p, showWeekNumber: C, styles: h } = t, { formatCaption: v, formatDay: M, formatMonthDropdown: x, formatWeekNumber: j, formatWeekNumberHeader: _, formatWeekdayName: H, formatYearDropdown: I } = o, A = la(t, a), { days: se, months: ee, navStart: ie, navEnd: ce, previousMonth: G, nextMonth: V, goToMonth: z } = A, Oe = kr(se, t, ie, ce, a), { isSelected: ye, select: X, selected: pe } = va(t, a) ?? {}, { blur: Pe, focused: qe, isFocusTarget: ot, moveFocus: Re, setFocused: ge } = ha(t, A, Oe, ye ?? (() => !1), a), { labelDayButton: Le, labelGridcell: ze, labelGrid: rt, labelMonthDropdown: N, labelNav: Z, labelPrevious: ue, labelNext: we, labelWeekday: be, labelWeekNumber: Me, labelWeekNumberHeader: at, labelYearDropdown: st } = r, Ze = fe(() => Hr(a, t.ISOWeek), [a, t.ISOWeek]), Te = d !== void 0 || w !== void 0, Ye = R(() => {
2527
+ G && (z(G), p?.(G));
2528
+ }, [G, z, p]), ve = R(() => {
2529
+ V && (z(V), y?.(V));
2530
+ }, [z, V, y]), it = R((S, F) => (k) => {
2531
+ k.preventDefault(), k.stopPropagation(), ge(S), X?.(S.date, F, k), w?.(S.date, F, k);
2532
+ }, [X, w, ge]), Ge = R((S, F) => (k) => {
2533
+ ge(S), D?.(S.date, F, k);
2534
+ }, [D, ge]), Ve = R((S, F) => (k) => {
2535
+ Pe(), f?.(S.date, F, k);
2536
+ }, [Pe, f]), Ee = R((S, F) => (k) => {
2537
2537
  const E = {
2538
2538
  ArrowLeft: [
2539
2539
  k.shiftKey ? "month" : "day",
@@ -2555,20 +2555,20 @@ function ht(e) {
2555
2555
  const [Q, P] = E[k.key];
2556
2556
  Re(Q, P);
2557
2557
  }
2558
- W?.(S.date, B, k);
2559
- }, [Re, W, t.dir]), Xe = q((S, B) => (k) => {
2560
- b?.(S.date, B, k);
2561
- }, [b]), Qe = q((S, B) => (k) => {
2562
- O?.(S.date, B, k);
2563
- }, [O]), Ue = q((S) => (B) => {
2564
- const k = Number(B.target.value), E = a.setMonth(a.startOfMonth(S), k);
2565
- L(E);
2566
- }, [a, L]), Ke = q((S) => (B) => {
2567
- const k = Number(B.target.value), E = a.setYear(a.startOfMonth(S), k);
2568
- L(E);
2569
- }, [a, L]), { className: ct, style: Je } = fe(() => ({
2570
- className: [s[p.Root], t.className].filter(Boolean).join(" "),
2571
- style: { ...h?.[p.Root], ...t.style }
2558
+ W?.(S.date, F, k);
2559
+ }, [Re, W, t.dir]), Xe = R((S, F) => (k) => {
2560
+ b?.(S.date, F, k);
2561
+ }, [b]), Qe = R((S, F) => (k) => {
2562
+ O?.(S.date, F, k);
2563
+ }, [O]), Ue = R((S) => (F) => {
2564
+ const k = Number(F.target.value), E = a.setMonth(a.startOfMonth(S), k);
2565
+ z(E);
2566
+ }, [a, z]), Ke = R((S) => (F) => {
2567
+ const k = Number(F.target.value), E = a.setYear(a.startOfMonth(S), k);
2568
+ z(E);
2569
+ }, [a, z]), { className: ct, style: Je } = fe(() => ({
2570
+ className: [s[g.Root], t.className].filter(Boolean).join(" "),
2571
+ style: { ...h?.[g.Root], ...t.style }
2572
2572
  }), [s, t.className, t.style, h]), et = Sr(t), tt = Se(null);
2573
2573
  na(tt, !!t.animate, {
2574
2574
  classNames: s,
@@ -2584,7 +2584,7 @@ function ht(e) {
2584
2584
  months: ee,
2585
2585
  nextMonth: V,
2586
2586
  previousMonth: G,
2587
- goToMonth: L,
2587
+ goToMonth: z,
2588
2588
  getModifiers: Oe,
2589
2589
  components: n,
2590
2590
  classNames: s,
@@ -2600,29 +2600,29 @@ function ht(e) {
2600
2600
  { rootRef: t.animate ? tt : void 0, className: ct, style: Je, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...et },
2601
2601
  m.createElement(
2602
2602
  n.Months,
2603
- { className: s[p.Months], style: h?.[p.Months] },
2604
- !t.hideNavigation && !l && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[p.Nav], style: h?.[p.Nav], "aria-label": z(), onPreviousClick: Ye, onNextClick: ve, previousMonth: G, nextMonth: V }),
2605
- ee.map((S, B) => m.createElement(
2603
+ { className: s[g.Months], style: h?.[g.Months] },
2604
+ !t.hideNavigation && !l && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[g.Nav], style: h?.[g.Nav], "aria-label": Z(), onPreviousClick: Ye, onNextClick: ve, previousMonth: G, nextMonth: V }),
2605
+ ee.map((S, F) => m.createElement(
2606
2606
  n.Month,
2607
2607
  {
2608
2608
  "data-animated-month": t.animate ? "true" : void 0,
2609
- className: s[p.Month],
2610
- style: h?.[p.Month],
2609
+ className: s[g.Month],
2610
+ style: h?.[g.Month],
2611
2611
  // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
2612
- key: B,
2613
- displayIndex: B,
2612
+ key: F,
2613
+ displayIndex: F,
2614
2614
  calendarMonth: S
2615
2615
  },
2616
- l === "around" && !t.hideNavigation && B === 0 && m.createElement(
2616
+ l === "around" && !t.hideNavigation && F === 0 && m.createElement(
2617
2617
  n.PreviousMonthButton,
2618
- { type: "button", className: s[p.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": ue(G), onClick: Ye, "data-animated-button": t.animate ? "true" : void 0 },
2619
- m.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: s[p.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
2618
+ { type: "button", className: s[g.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": ue(G), onClick: Ye, "data-animated-button": t.animate ? "true" : void 0 },
2619
+ m.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: s[g.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
2620
2620
  ),
2621
- m.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[p.MonthCaption], style: h?.[p.MonthCaption], calendarMonth: S, displayIndex: B }, c?.startsWith("dropdown") ? m.createElement(
2621
+ m.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[g.MonthCaption], style: h?.[g.MonthCaption], calendarMonth: S, displayIndex: F }, c?.startsWith("dropdown") ? m.createElement(
2622
2622
  n.DropdownNav,
2623
- { className: s[p.Dropdowns], style: h?.[p.Dropdowns] },
2623
+ { className: s[g.Dropdowns], style: h?.[g.Dropdowns] },
2624
2624
  (() => {
2625
- const k = c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: s[p.MonthsDropdown], "aria-label": N(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Ue(S.date), options: Ir(S.date, ie, ce, o, a), style: h?.[p.Dropdown], value: a.getMonth(S.date) }) : m.createElement("span", { key: "month" }, C(S.date, a)), E = c === "dropdown" || c === "dropdown-years" ? m.createElement(n.YearsDropdown, { key: "year", className: s[p.YearsDropdown], "aria-label": st(a.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Ke(S.date), options: Ar(ie, ce, o, a, !!t.reverseYears), style: h?.[p.Dropdown], value: a.getYear(S.date) }) : m.createElement("span", { key: "year" }, F(S.date, a));
2625
+ const k = c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: s[g.MonthsDropdown], "aria-label": N(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Ue(S.date), options: Ir(S.date, ie, ce, o, a), style: h?.[g.Dropdown], value: a.getMonth(S.date) }) : m.createElement("span", { key: "month" }, x(S.date, a)), E = c === "dropdown" || c === "dropdown-years" ? m.createElement(n.YearsDropdown, { key: "year", className: s[g.YearsDropdown], "aria-label": st(a.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Ke(S.date), options: Ar(ie, ce, o, a, !!t.reverseYears), style: h?.[g.Dropdown], value: a.getYear(S.date) }) : m.createElement("span", { key: "year" }, I(S.date, a));
2626
2626
  return a.getMonthYearOrder() === "year-first" ? [E, k] : [k, E];
2627
2627
  })(),
2628
2628
  m.createElement("span", { role: "status", "aria-live": "polite", style: {
@@ -2639,40 +2639,40 @@ function ht(e) {
2639
2639
  } }, v(S.date, a.options, a))
2640
2640
  ) : (
2641
2641
  // biome-ignore lint/a11y/useSemanticElements: breaking change
2642
- m.createElement(n.CaptionLabel, { className: s[p.CaptionLabel], role: "status", "aria-live": "polite" }, v(S.date, a.options, a))
2642
+ m.createElement(n.CaptionLabel, { className: s[g.CaptionLabel], role: "status", "aria-live": "polite" }, v(S.date, a.options, a))
2643
2643
  )),
2644
- l === "around" && !t.hideNavigation && B === u - 1 && m.createElement(
2644
+ l === "around" && !t.hideNavigation && F === u - 1 && m.createElement(
2645
2645
  n.NextMonthButton,
2646
- { type: "button", className: s[p.NextMonthButton], tabIndex: V ? void 0 : -1, "aria-disabled": V ? void 0 : !0, "aria-label": we(V), onClick: ve, "data-animated-button": t.animate ? "true" : void 0 },
2647
- m.createElement(n.Chevron, { disabled: V ? void 0 : !0, className: s[p.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
2646
+ { type: "button", className: s[g.NextMonthButton], tabIndex: V ? void 0 : -1, "aria-disabled": V ? void 0 : !0, "aria-label": we(V), onClick: ve, "data-animated-button": t.animate ? "true" : void 0 },
2647
+ m.createElement(n.Chevron, { disabled: V ? void 0 : !0, className: s[g.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
2648
2648
  ),
2649
- B === u - 1 && l === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[p.Nav], style: h?.[p.Nav], "aria-label": z(), onPreviousClick: Ye, onNextClick: ve, previousMonth: G, nextMonth: V }),
2649
+ F === u - 1 && l === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[g.Nav], style: h?.[g.Nav], "aria-label": Z(), onPreviousClick: Ye, onNextClick: ve, previousMonth: G, nextMonth: V }),
2650
2650
  m.createElement(
2651
2651
  n.MonthGrid,
2652
- { role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": rt(S.date, a.options, a) || void 0, className: s[p.MonthGrid], style: h?.[p.MonthGrid] },
2652
+ { role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": rt(S.date, a.options, a) || void 0, className: s[g.MonthGrid], style: h?.[g.MonthGrid] },
2653
2653
  !t.hideWeekdays && m.createElement(
2654
2654
  n.Weekdays,
2655
- { "data-animated-weekdays": t.animate ? "true" : void 0, className: s[p.Weekdays], style: h?.[p.Weekdays] },
2656
- x && m.createElement(n.WeekNumberHeader, { "aria-label": at(a.options), className: s[p.WeekNumberHeader], style: h?.[p.WeekNumberHeader], scope: "col" }, _()),
2657
- Ze.map((k) => m.createElement(n.Weekday, { "aria-label": be(k, a.options, a), className: s[p.Weekday], key: String(k), style: h?.[p.Weekday], scope: "col" }, H(k, a.options, a)))
2655
+ { "data-animated-weekdays": t.animate ? "true" : void 0, className: s[g.Weekdays], style: h?.[g.Weekdays] },
2656
+ C && m.createElement(n.WeekNumberHeader, { "aria-label": at(a.options), className: s[g.WeekNumberHeader], style: h?.[g.WeekNumberHeader], scope: "col" }, _()),
2657
+ Ze.map((k) => m.createElement(n.Weekday, { "aria-label": be(k, a.options, a), className: s[g.Weekday], key: String(k), style: h?.[g.Weekday], scope: "col" }, H(k, a.options, a)))
2658
2658
  ),
2659
- m.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[p.Weeks], style: h?.[p.Weeks] }, S.weeks.map((k) => m.createElement(
2659
+ m.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[g.Weeks], style: h?.[g.Weeks] }, S.weeks.map((k) => m.createElement(
2660
2660
  n.Week,
2661
- { className: s[p.Week], key: k.weekNumber, style: h?.[p.Week], week: k },
2662
- x && // biome-ignore lint/a11y/useSemanticElements: react component
2663
- m.createElement(n.WeekNumber, { week: k, style: h?.[p.WeekNumber], "aria-label": Me(k.weekNumber, {
2661
+ { className: s[g.Week], key: k.weekNumber, style: h?.[g.Week], week: k },
2662
+ C && // biome-ignore lint/a11y/useSemanticElements: react component
2663
+ m.createElement(n.WeekNumber, { week: k, style: h?.[g.WeekNumber], "aria-label": Me(k.weekNumber, {
2664
2664
  locale: i
2665
- }), className: s[p.WeekNumber], scope: "row", role: "rowheader" }, I(k.weekNumber, a)),
2665
+ }), className: s[g.WeekNumber], scope: "row", role: "rowheader" }, j(k.weekNumber, a)),
2666
2666
  k.days.map((E) => {
2667
2667
  const { date: Q } = E, P = Oe(E);
2668
- if (P[j.focused] = !P.hidden && !!qe?.isEqualTo(E), P[J.selected] = ye?.(Q) || P.selected, bt(pe)) {
2668
+ if (P[B.focused] = !P.hidden && !!qe?.isEqualTo(E), P[J.selected] = ye?.(Q) || P.selected, bt(pe)) {
2669
2669
  const { from: ut, to: dt } = pe;
2670
2670
  P[J.range_start] = !!(ut && dt && a.isSameDay(Q, ut)), P[J.range_end] = !!(ut && dt && a.isSameDay(Q, dt)), P[J.range_middle] = de(pe, Q, !0, a);
2671
2671
  }
2672
2672
  const dn = jr(P, h, t.modifiersStyles), ln = Or(P, s, t.modifiersClassNames), fn = !Te && !P.hidden ? ze(Q, P, a.options, a) : void 0;
2673
2673
  return (
2674
2674
  // biome-ignore lint/a11y/useSemanticElements: react component
2675
- m.createElement(n.Day, { key: `${a.format(Q, "yyyy-MM-dd")}_${a.format(E.displayMonth, "yyyy-MM")}`, day: E, modifiers: P, className: ln.join(" "), style: dn, role: "gridcell", "aria-selected": P.selected || void 0, "aria-label": fn, "data-day": a.format(Q, "yyyy-MM-dd"), "data-month": E.outside ? a.format(Q, "yyyy-MM") : void 0, "data-selected": P.selected || void 0, "data-disabled": P.disabled || void 0, "data-hidden": P.hidden || void 0, "data-outside": E.outside || void 0, "data-focused": P.focused || void 0, "data-today": P.today || void 0 }, !P.hidden && Te ? m.createElement(n.DayButton, { className: s[p.DayButton], style: h?.[p.DayButton], type: "button", day: E, modifiers: P, disabled: P.disabled || void 0, tabIndex: ot(E) ? 0 : -1, "aria-label": Le(Q, P, a.options, a), onClick: it(E, P), onBlur: Ve(E, P), onFocus: Ge(E, P), onKeyDown: Ee(E, P), onMouseEnter: Xe(E, P), onMouseLeave: Qe(E, P) }, M(Q, a.options, a)) : !P.hidden && M(E.date, a.options, a))
2675
+ m.createElement(n.Day, { key: `${a.format(Q, "yyyy-MM-dd")}_${a.format(E.displayMonth, "yyyy-MM")}`, day: E, modifiers: P, className: ln.join(" "), style: dn, role: "gridcell", "aria-selected": P.selected || void 0, "aria-label": fn, "data-day": a.format(Q, "yyyy-MM-dd"), "data-month": E.outside ? a.format(Q, "yyyy-MM") : void 0, "data-selected": P.selected || void 0, "data-disabled": P.disabled || void 0, "data-hidden": P.hidden || void 0, "data-outside": E.outside || void 0, "data-focused": P.focused || void 0, "data-today": P.today || void 0 }, !P.hidden && Te ? m.createElement(n.DayButton, { className: s[g.DayButton], style: h?.[g.DayButton], type: "button", day: E, modifiers: P, disabled: P.disabled || void 0, tabIndex: ot(E) ? 0 : -1, "aria-label": Le(Q, P, a.options, a), onClick: it(E, P), onBlur: Ve(E, P), onFocus: Ge(E, P), onKeyDown: Ee(E, P), onMouseEnter: Xe(E, P), onMouseLeave: Qe(E, P) }, M(Q, a.options, a)) : !P.hidden && M(E.date, a.options, a))
2676
2676
  );
2677
2677
  })
2678
2678
  )))
@@ -2680,7 +2680,7 @@ function ht(e) {
2680
2680
  ))
2681
2681
  ),
2682
2682
  t.footer && // biome-ignore lint/a11y/useSemanticElements: react component
2683
- m.createElement(n.Footer, { className: s[p.Footer], style: h?.[p.Footer], role: "status", "aria-live": "polite" }, t.footer)
2683
+ m.createElement(n.Footer, { className: s[g.Footer], style: h?.[g.Footer], role: "status", "aria-live": "polite" }, t.footer)
2684
2684
  )
2685
2685
  );
2686
2686
  }
@@ -3071,30 +3071,30 @@ const Da = {
3071
3071
  onCancel: b,
3072
3072
  hideFooter: O = !1,
3073
3073
  variant: y = "input",
3074
- inputProps: g,
3075
- label: x = "",
3074
+ inputProps: p,
3075
+ label: C = "",
3076
3076
  name: h = "datepicker",
3077
3077
  className: v
3078
- } = e, M = t === "range" || t === "multiple" ? e.min : void 0, C = t === "range" || t === "multiple" ? e.max : void 0, I = t === "range" ? e.excludeDisabled : void 0, [_, H] = he({}), [F, Z] = he(!1), [se, ee] = he(!1), [ie, ce] = he(o), [G, V] = he(!1), L = Se(null), Oe = Se(null), ye = f ? ie : o, X = f ? o : ye;
3078
+ } = e, M = t === "range" || t === "multiple" ? e.min : void 0, x = t === "range" || t === "multiple" ? e.max : void 0, j = t === "range" ? e.excludeDisabled : void 0, [_, H] = he({}), [I, A] = he(!1), [se, ee] = he(!1), [ie, ce] = he(o), [G, V] = he(!1), z = Se(null), Oe = Se(null), ye = f ? ie : o, X = f ? o : ye;
3079
3079
  _e(() => {
3080
3080
  window.innerWidth < 768 ? V(!0) : V(!1);
3081
3081
  }, []), _e(() => {
3082
3082
  f && ce(o);
3083
3083
  }, [o, f]), _e(() => {
3084
- if (y !== "input" || !F) return;
3085
- const N = (z) => {
3086
- L.current && !L.current.contains(z.target) && (Z(!1), f && ce(o));
3084
+ if (y !== "input" || !I) return;
3085
+ const N = (Z) => {
3086
+ z.current && !z.current.contains(Z.target) && (A(!1), f && ce(o));
3087
3087
  };
3088
3088
  return document.addEventListener("mousedown", N), () => {
3089
3089
  document.removeEventListener("mousedown", N);
3090
3090
  };
3091
- }, [y, F, o, f]), _e(() => {
3092
- if (!F || y !== "input" || !L.current) {
3091
+ }, [y, I, o, f]), _e(() => {
3092
+ if (!I || y !== "input" || !z.current) {
3093
3093
  ee(!1);
3094
3094
  return;
3095
3095
  }
3096
- const N = 16, z = () => {
3097
- const be = L?.current?.getBoundingClientRect(), Me = Oe?.current?.getBoundingClientRect();
3096
+ const N = 16, Z = () => {
3097
+ const be = z?.current?.getBoundingClientRect(), Me = Oe?.current?.getBoundingClientRect();
3098
3098
  if (!be || !Me) return;
3099
3099
  const at = window.innerHeight, st = window.innerWidth, Ze = be.height, Te = be.width, Ye = Me.left, ve = Me.bottom, it = ve, Ge = at - ve, Ve = st - Me.left, Ee = Te - Ve, Xe = Ee > 0 && Ve >= Te + N, Qe = it >= Ze + N, Ue = Ge >= Ze + N, Ke = !Ue && Qe, ct = !Ue && !Qe;
3100
3100
  let Je = Ke ? void 0 : `${ve + 8}px`, et = Ke ? `${Ge + Me.height + 8}px` : void 0;
@@ -3109,18 +3109,18 @@ const Da = {
3109
3109
  }
3110
3110
  ), ee(!0);
3111
3111
  }, ue = () => {
3112
- Z(!1), ee(!1);
3112
+ A(!1), ee(!1);
3113
3113
  };
3114
3114
  window.addEventListener("scroll", ue, !0);
3115
- const we = setTimeout(z, 0);
3115
+ const we = setTimeout(Z, 0);
3116
3116
  return () => {
3117
3117
  clearTimeout(we), window.removeEventListener("scroll", ue, !0);
3118
3118
  };
3119
- }, [F, y]);
3120
- const pe = q(() => {
3121
- W?.(ie), r?.(ie), y === "input" && Z(!1);
3122
- }, [W, r, ie, y]), Pe = q(() => {
3123
- ce(o), b?.(), y === "input" && Z(!1);
3119
+ }, [I, y]);
3120
+ const pe = R(() => {
3121
+ W?.(ie), r?.(ie), y === "input" && A(!1);
3122
+ }, [W, r, ie, y]), Pe = R(() => {
3123
+ ce(o), b?.(), y === "input" && A(!1);
3124
3124
  }, [b, o, y]), qe = fe(() => {
3125
3125
  if (!X) return "";
3126
3126
  if (t === "single")
@@ -3128,84 +3128,84 @@ const Da = {
3128
3128
  if (t === "range") {
3129
3129
  const N = X;
3130
3130
  if (!N.from) return "";
3131
- const z = N.from.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3132
- if (!N.to) return z;
3131
+ const Z = N.from.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3132
+ if (!N.to) return Z;
3133
3133
  const ue = N.to.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3134
- return `${z} - ${ue}`;
3134
+ return `${Z} - ${ue}`;
3135
3135
  }
3136
3136
  if (t === "multiple") {
3137
3137
  const N = X;
3138
3138
  return N.length === 0 ? "" : N.length === 1 ? N[0].toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" }) : `${N.length} fechas seleccionadas`;
3139
3139
  }
3140
3140
  return "";
3141
- }, [X, t]), ot = fe(() => y === "input" || y === "input-and-calendar", [y]), Re = fe(() => y === "only-calendar" || y === "input-and-calendar" || y === "input", [y]), ge = q((N) => {
3141
+ }, [X, t]), ot = fe(() => y === "input" || y === "input-and-calendar", [y]), Re = fe(() => y === "only-calendar" || y === "input-and-calendar" || y === "input", [y]), ge = R((N) => {
3142
3142
  r?.(N);
3143
- }, [r]), Le = q((N) => {
3144
- const z = new Date(parseInt(N.slice(6, 10)), parseInt(N.slice(3, 5)) - 1, parseInt(N.slice(0, 2)));
3143
+ }, [r]), Le = R((N) => {
3144
+ const Z = new Date(parseInt(N.slice(6, 10)), parseInt(N.slice(3, 5)) - 1, parseInt(N.slice(0, 2)));
3145
3145
  if (t === "multiple") {
3146
- const we = (X || []).filter((be) => be.getTime() !== z.getTime());
3146
+ const we = (X || []).filter((be) => be.getTime() !== Z.getTime());
3147
3147
  f ? (r?.(we), ce(we)) : ge(we);
3148
3148
  }
3149
- }, [t, X, f, r, ge]), ze = q((N) => {
3149
+ }, [t, X, f, r, ge]), ze = R((N) => {
3150
3150
  if (f) {
3151
3151
  ce(N);
3152
3152
  return;
3153
3153
  }
3154
- y === "input" && t === "single" && Z(!1), r?.(N);
3155
- }, [f, y, t, r]), rt = q(() => {
3154
+ y === "input" && t === "single" && A(!1), r?.(N);
3155
+ }, [f, y, t, r]), rt = R(() => {
3156
3156
  const N = X || [];
3157
- return /* @__PURE__ */ $.jsx(
3157
+ return /* @__PURE__ */ q.jsx(
3158
3158
  gn,
3159
3159
  {
3160
- label: x,
3160
+ label: C,
3161
3161
  placeholder: "Seleccione una o más fechas",
3162
3162
  name: h,
3163
- value: N.sort((z, ue) => z.getTime() - ue.getTime()).map((z) => z.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })),
3163
+ value: N.sort((Z, ue) => Z.getTime() - ue.getTime()).map((Z) => Z.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })),
3164
3164
  onChange: () => {
3165
3165
  },
3166
- onClick: () => Z(!0),
3167
- className: Be("w-[360px]", g?.className),
3166
+ onClick: () => A(!0),
3167
+ className: Be("w-[360px]", p?.className),
3168
3168
  readonly: !0,
3169
3169
  onValueDelete: Le,
3170
- icon: /* @__PURE__ */ $.jsx(Mt.Calendar, {})
3170
+ icon: /* @__PURE__ */ q.jsx(Mt.Calendar, {})
3171
3171
  }
3172
3172
  );
3173
- }, [X, x, h, Le, g]);
3174
- return /* @__PURE__ */ $.jsxs("div", { className: Be("relative w-max flex flex-col gap-2 lg:min-w-[360px] min-w-auto", g?.className), children: [
3175
- ot && /* @__PURE__ */ $.jsx(
3173
+ }, [X, C, h, Le, p]);
3174
+ return /* @__PURE__ */ q.jsxs("div", { className: Be("relative w-max flex flex-col gap-2 lg:min-w-[360px] min-w-auto", p?.className), children: [
3175
+ ot && /* @__PURE__ */ q.jsx(
3176
3176
  "div",
3177
3177
  {
3178
3178
  ref: Oe,
3179
3179
  className: "relative w-full",
3180
- children: t === "multiple" ? rt() : /* @__PURE__ */ $.jsx(
3180
+ children: t === "multiple" ? rt() : /* @__PURE__ */ q.jsx(
3181
3181
  wn,
3182
3182
  {
3183
3183
  readOnly: !0,
3184
- ...g,
3185
- icon: /* @__PURE__ */ $.jsx(Mt.Calendar, {}),
3184
+ ...p,
3185
+ icon: /* @__PURE__ */ q.jsx(Mt.Calendar, {}),
3186
3186
  iconPosition: "right",
3187
3187
  type: "text",
3188
3188
  value: qe,
3189
3189
  onChange: () => {
3190
3190
  },
3191
3191
  name: h,
3192
- label: x,
3192
+ label: C,
3193
3193
  onFocus: (N) => {
3194
- N.stopPropagation(), y === "input" && Z(!0);
3194
+ N.stopPropagation(), y === "input" && A(!0);
3195
3195
  }
3196
3196
  }
3197
3197
  )
3198
3198
  }
3199
3199
  ),
3200
3200
  Re && (y === "input" ? document?.body && bn(
3201
- /* @__PURE__ */ $.jsx(
3201
+ /* @__PURE__ */ q.jsx(
3202
3202
  gt,
3203
3203
  {
3204
3204
  mode: t,
3205
3205
  footer: s,
3206
3206
  header: i,
3207
3207
  selected: o,
3208
- ref: L,
3208
+ ref: z,
3209
3209
  endMonth: u,
3210
3210
  required: n,
3211
3211
  onApply: pe,
@@ -3221,28 +3221,28 @@ const Da = {
3221
3221
  hideOutsideDays: c,
3222
3222
  showActionButtons: f,
3223
3223
  min: M,
3224
- max: C,
3225
- excludeDisabled: I,
3224
+ max: x,
3225
+ excludeDisabled: j,
3226
3226
  className: Be("bg-neutral-strong-default text-neutral-default-default shadow", v),
3227
3227
  style: {
3228
3228
  top: _?.top,
3229
3229
  left: _?.left,
3230
3230
  bottom: _?.bottom,
3231
3231
  right: _?.right,
3232
- opacity: se && F ? 1 : 0,
3232
+ opacity: se && I ? 1 : 0,
3233
3233
  transition: "opacity 0.15s linear",
3234
3234
  position: "fixed",
3235
3235
  zIndex: 1e3,
3236
- pointerEvents: se && F ? "auto" : "none"
3236
+ pointerEvents: se && I ? "auto" : "none"
3237
3237
  }
3238
3238
  }
3239
3239
  ),
3240
3240
  document.body
3241
- ) : /* @__PURE__ */ $.jsx(
3241
+ ) : /* @__PURE__ */ q.jsx(
3242
3242
  gt,
3243
3243
  {
3244
3244
  min: M,
3245
- max: C,
3245
+ max: x,
3246
3246
  mode: t,
3247
3247
  header: i,
3248
3248
  footer: s,
@@ -3262,7 +3262,7 @@ const Da = {
3262
3262
  onSelect: ze,
3263
3263
  hideOutsideDays: c,
3264
3264
  showActionButtons: f,
3265
- excludeDisabled: I
3265
+ excludeDisabled: j
3266
3266
  }
3267
3267
  ))
3268
3268
  ] });
@@ -3286,35 +3286,36 @@ const Da = {
3286
3286
  disabledDates: b,
3287
3287
  excludeDisabled: O,
3288
3288
  mode: y = "single",
3289
- numberOfMonths: g = 1,
3290
- hideFooter: x = !1,
3291
- applyLabel: h = "Aplicar",
3292
- cancelLabel: v = "Cancelar",
3293
- hideOutsideDays: M = !1,
3294
- showActionButtons: C = !1
3295
- } = e, I = fe(() => {
3289
+ readonly: p = !1,
3290
+ numberOfMonths: C = 1,
3291
+ hideFooter: h = !1,
3292
+ applyLabel: v = "Aplicar",
3293
+ cancelLabel: M = "Cancelar",
3294
+ hideOutsideDays: x = !1,
3295
+ showActionButtons: j = !1
3296
+ } = e, _ = fe(() => {
3296
3297
  if (l) {
3297
3298
  if (y === "single")
3298
3299
  return l;
3299
3300
  if (y === "range")
3300
3301
  return l.from || void 0;
3301
3302
  if (y === "multiple") {
3302
- const F = l;
3303
- return F.length > 0 ? F[0] : void 0;
3303
+ const A = l;
3304
+ return A.length > 0 ? A[0] : void 0;
3304
3305
  }
3305
3306
  }
3306
- }, [l, y]), _ = fe(() => ({
3307
- formatWeekdayName: (F) => F.toLocaleDateString("es-ES", { weekday: "narrow" }).toUpperCase()
3308
- }), []), H = fe(() => ({
3307
+ }, [l, y]), H = fe(() => ({
3308
+ formatWeekdayName: (A) => A.toLocaleDateString("es-ES", { weekday: "narrow" }).toUpperCase()
3309
+ }), []), I = fe(() => ({
3309
3310
  // Días de la semana (cabecera)
3310
3311
  weekday: " prometeo-fonts-body-large text-neutral-default-default h-12 w-12 ",
3311
3312
  // Días del mes
3312
- day: "w-12 h-12 p-1 prometeo-fonts-body-large text-neutral-default-default active:text-neutral-default-focused",
3313
- day_button: "w-full h-full rounded-[4px] cursor-pointer",
3313
+ day: `w-12 h-12 p-1 prometeo-fonts-body-large text-neutral-default-default ${p ? "" : "active:text-neutral-default-focused"}`,
3314
+ day_button: `w-full h-full rounded-[4px] ${p ? "cursor-default" : "cursor-pointer"}`,
3314
3315
  // Día seleccionado
3315
3316
  selected: "selected-day-button",
3316
3317
  // Día de hoy
3317
- today: "today-day-button text-primary-default-default! active:text-primary-default-focused! hover:text-primary-default-hover! opacity-100",
3318
+ today: `today-day-button text-primary-default-default! ${p ? "cursor-default" : "active:text-primary-default-focused! hover:text-primary-default-hover! cursor-pointer"} opacity-100`,
3318
3319
  // Rango de fechas
3319
3320
  range_start: "text-white rounded-l-lg range-start-day-button",
3320
3321
  range_end: "text-white rounded-r-lg range-end-day-button",
@@ -3326,8 +3327,8 @@ const Da = {
3326
3327
  //Contenedor
3327
3328
  months: "flex gap-4 justify-center relative w-full flex-wrap overflow-auto ",
3328
3329
  root: "px-2 text-neutral-default-default "
3329
- }), []);
3330
- return /* @__PURE__ */ $.jsxs(
3330
+ }), [p]);
3331
+ return /* @__PURE__ */ q.jsxs(
3331
3332
  "div",
3332
3333
  {
3333
3334
  ref: t,
@@ -3337,42 +3338,44 @@ const Da = {
3337
3338
  ),
3338
3339
  style: {
3339
3340
  ...r,
3340
- width: g * 360,
3341
+ width: C * 360,
3341
3342
  overflowX: "auto"
3342
3343
  },
3343
3344
  children: [
3344
- a && /* @__PURE__ */ $.jsx("div", { className: "pt-6 pl-6 pr-3 pb-2 min-h-[68px]", children: typeof a == "string" ? /* @__PURE__ */ $.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: a }) : a }),
3345
- y === "single" && /* @__PURE__ */ $.jsx(
3345
+ a && /* @__PURE__ */ q.jsx("div", { className: "pt-6 pl-6 pr-3 pb-2 min-h-[68px]", children: typeof a == "string" ? /* @__PURE__ */ q.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: a }) : a }),
3346
+ y === "single" && /* @__PURE__ */ q.jsx(
3346
3347
  ht,
3347
3348
  {
3348
3349
  locale: yt,
3349
3350
  mode: "single",
3350
- captionLayout: "dropdown-months",
3351
- formatters: _,
3352
- classNames: H,
3351
+ captionLayout: "dropdown",
3352
+ formatters: H,
3353
+ classNames: I,
3353
3354
  required: u,
3354
3355
  disabled: b,
3355
3356
  selected: W,
3356
- defaultMonth: I,
3357
+ defaultMonth: _,
3357
3358
  className: "px-3",
3358
- showOutsideDays: !M,
3359
- numberOfMonths: g,
3359
+ showOutsideDays: !x,
3360
+ numberOfMonths: C,
3360
3361
  startMonth: D,
3361
3362
  endMonth: f,
3362
- onSelect: d
3363
+ onSelect: p ? () => {
3364
+ } : d
3363
3365
  }
3364
3366
  ),
3365
- y === "range" && /* @__PURE__ */ $.jsx(
3367
+ y === "range" && /* @__PURE__ */ q.jsx(
3366
3368
  ht,
3367
3369
  {
3368
3370
  mode: "range",
3369
- captionLayout: "dropdown-months",
3370
- formatters: _,
3371
- classNames: H,
3372
- numberOfMonths: g,
3371
+ captionLayout: "dropdown",
3372
+ formatters: H,
3373
+ classNames: I,
3374
+ numberOfMonths: C,
3373
3375
  selected: W,
3374
- defaultMonth: I,
3375
- onSelect: d,
3376
+ defaultMonth: _,
3377
+ onSelect: p ? () => {
3378
+ } : d,
3376
3379
  required: u,
3377
3380
  disabled: b,
3378
3381
  startMonth: D,
@@ -3384,16 +3387,17 @@ const Da = {
3384
3387
  excludeDisabled: O ?? !0
3385
3388
  }
3386
3389
  ),
3387
- y === "multiple" && /* @__PURE__ */ $.jsx(
3390
+ y === "multiple" && /* @__PURE__ */ q.jsx(
3388
3391
  ht,
3389
3392
  {
3390
3393
  mode: "multiple",
3391
- captionLayout: "dropdown-months",
3392
- formatters: _,
3393
- classNames: H,
3394
+ captionLayout: "dropdown",
3395
+ formatters: H,
3396
+ classNames: I,
3394
3397
  selected: W,
3395
- defaultMonth: I,
3396
- onSelect: d,
3398
+ defaultMonth: _,
3399
+ onSelect: p ? () => {
3400
+ } : d,
3397
3401
  required: u,
3398
3402
  disabled: b,
3399
3403
  startMonth: D,
@@ -3403,26 +3407,26 @@ const Da = {
3403
3407
  locale: yt
3404
3408
  }
3405
3409
  ),
3406
- !x && /* @__PURE__ */ $.jsx("div", { className: Be(
3410
+ !h && /* @__PURE__ */ q.jsx("div", { className: Be(
3407
3411
  "w-full min-h-[40px] pt-2 px-3 pb-3 flex items-center relative"
3408
- ), children: typeof i == "string" ? /* @__PURE__ */ $.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: i }) : i }),
3409
- C && /* @__PURE__ */ $.jsxs("div", { className: "w-full px-3 pb-3 pt-2 flex gap-2 justify-end ", children: [
3410
- /* @__PURE__ */ $.jsx(
3412
+ ), children: typeof i == "string" ? /* @__PURE__ */ q.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: i }) : i }),
3413
+ j && /* @__PURE__ */ q.jsxs("div", { className: "w-full px-3 pb-3 pt-2 flex gap-2 justify-end ", children: [
3414
+ /* @__PURE__ */ q.jsx(
3411
3415
  vt,
3412
3416
  {
3413
3417
  variant: "text",
3414
3418
  onClick: c,
3415
3419
  color: "secondary",
3416
- children: v
3420
+ children: M
3417
3421
  }
3418
3422
  ),
3419
- /* @__PURE__ */ $.jsx(
3423
+ /* @__PURE__ */ q.jsx(
3420
3424
  vt,
3421
3425
  {
3422
3426
  onClick: s,
3423
3427
  variant: "text",
3424
3428
  color: "primary",
3425
- children: h
3429
+ children: v
3426
3430
  }
3427
3431
  )
3428
3432
  ] })