@caspeco/casper-ui-library 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/components/combobox/combobox-button.d.ts +1 -1
  2. package/dist/components/combobox/combobox-button.d.ts.map +1 -1
  3. package/dist/components/combobox/combobox-button.js +85 -69
  4. package/dist/components/combobox/combobox-item.d.ts +2 -1
  5. package/dist/components/combobox/combobox-item.d.ts.map +1 -1
  6. package/dist/components/combobox/combobox-item.js +10 -10
  7. package/dist/components/combobox/combobox-menu.js +68 -69
  8. package/dist/components/combobox/combobox.d.ts.map +1 -1
  9. package/dist/components/combobox/combobox.js +120 -123
  10. package/dist/components/combobox/types.d.ts +2 -0
  11. package/dist/components/combobox/types.d.ts.map +1 -1
  12. package/dist/components/date-picker/base-date-picker.js +175 -176
  13. package/dist/components/date-picker/date-picker-header.js +10 -10
  14. package/dist/components/date-picker/helper.js +9 -9
  15. package/dist/components/image-upload/image-cropper.js +112 -113
  16. package/dist/components/image-upload/image-upload-dropzone.js +35 -36
  17. package/dist/components/menu/menu-group.js +44 -45
  18. package/dist/components/segmented-control/segmented-control.js +29 -29
  19. package/dist/components/table/table-cell.js +25 -26
  20. package/dist/components/table/table-header-dropdown.js +60 -60
  21. package/dist/components/table/table-header-row.js +19 -20
  22. package/dist/components/table/table-toolbar.js +63 -64
  23. package/dist/components/table/use-controllable-state.js +7 -7
  24. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
  25. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +41 -41
  26. package/dist/node_modules/date-fns/addDays.js +7 -7
  27. package/dist/node_modules/date-fns/addMonths.js +13 -13
  28. package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
  29. package/dist/node_modules/date-fns/endOfDay.js +6 -6
  30. package/dist/node_modules/date-fns/endOfMonth.js +6 -6
  31. package/dist/node_modules/date-fns/format.js +46 -47
  32. package/dist/node_modules/date-fns/getDayOfYear.js +8 -8
  33. package/dist/node_modules/date-fns/getISOWeek.js +9 -9
  34. package/dist/node_modules/date-fns/getISOWeekYear.js +10 -10
  35. package/dist/node_modules/date-fns/getWeek.js +9 -9
  36. package/dist/node_modules/date-fns/getWeekYear.js +13 -14
  37. package/dist/node_modules/date-fns/isSameDay.js +9 -9
  38. package/dist/node_modules/date-fns/isSameMonth.js +9 -9
  39. package/dist/node_modules/date-fns/isSameWeek.js +8 -8
  40. package/dist/node_modules/date-fns/isSameYear.js +9 -9
  41. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
  42. package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +4 -4
  43. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
  44. package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +4 -4
  45. package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +6 -6
  46. package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +17 -17
  47. package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +47 -47
  48. package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +11 -11
  49. package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +3 -3
  50. package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +4 -4
  51. package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +5 -5
  52. package/dist/node_modules/date-fns/startOfDay.js +6 -6
  53. package/dist/node_modules/date-fns/startOfMonth.js +6 -6
  54. package/dist/node_modules/date-fns/startOfWeek.js +7 -8
  55. package/dist/node_modules/date-fns/startOfWeekYear.js +9 -10
  56. package/dist/node_modules/date-fns/startOfYear.js +5 -5
  57. package/dist/theme/theme-config/components/modal-theme.js +13 -15
  58. package/dist/theme/theme-config/components/select-theme.js +15 -19
  59. package/package.json +3 -3
@@ -1,244 +1,243 @@
1
- import { jsxs as B, jsx as n, Fragment as Tr } from "react/jsx-runtime";
2
- import { GridItem as X, Box as Lr, Grid as Z } from "@chakra-ui/react";
3
- import Er, { useState as N, useEffect as Pr, useCallback as _r } from "react";
4
- import { DatePickerDateCell as d } from "./date-picker-date-cell.js";
5
- import { DatePickerHeader as zr } from "./date-picker-header.js";
6
- import { DatePickerWeekCell as Ar } from "./date-picker-week-cell.js";
7
- import { hasDotOnDate as h, isDateStrikeThrough as Hr, getWeekCellVariant as Ur, getDateCellVariant as g, firstLetterUpperCase as jr, hasDatePassed as Kr } from "./helper.js";
8
- import { lv as Yr } from "../../node_modules/date-fns/locale/lv.js";
9
- import { lt as qr } from "../../node_modules/date-fns/locale/lt.js";
10
- import { et as Jr } from "../../node_modules/date-fns/locale/et.js";
11
- import { es as Qr } from "../../node_modules/date-fns/locale/es.js";
12
- import { fi as Xr } from "../../node_modules/date-fns/locale/fi.js";
13
- import { nl as Zr } from "../../node_modules/date-fns/locale/nl.js";
14
- import { endOfMonth as R } from "../../node_modules/date-fns/endOfMonth.js";
15
- import { startOfWeek as Nr } from "../../node_modules/date-fns/startOfWeek.js";
16
- import { sv as dr } from "../../node_modules/date-fns/locale/sv.js";
17
- import { da as gr } from "../../node_modules/date-fns/locale/da.js";
18
- import { nb as Rr } from "../../node_modules/date-fns/locale/nb.js";
19
- import { enGB as rt } from "../../node_modules/date-fns/locale/en-GB.js";
20
- import { enUS as tt } from "../../node_modules/date-fns/locale/en-US.js";
21
- import { formatDate as rr } from "../../node_modules/date-fns/format.js";
22
- import { startOfMonth as V } from "../../node_modules/date-fns/startOfMonth.js";
23
- import { addDays as tr } from "../../node_modules/date-fns/addDays.js";
24
- import { isSameMonth as or } from "../../node_modules/date-fns/isSameMonth.js";
25
- import { isSameDay as c } from "../../node_modules/date-fns/isSameDay.js";
26
- import { getISOWeek as lr } from "../../node_modules/date-fns/getISOWeek.js";
27
- import { ThemeColorVariable as er, ThemeSpaceVariable as ir, ThemeFontSizeVariable as ot, ThemeFontVariable as lt } from "../../theme/theme-types.js";
28
- const et = {
29
- "en-US": { locale: tt },
30
- "en-GB": { locale: rt },
31
- "nb-NO": { locale: Rr },
32
- "da-DK": { locale: gr },
33
- "sv-SE": { locale: dr },
34
- "nl-NL": { locale: Zr },
35
- "fi-FI": { locale: Xr },
36
- "es-ES": { locale: Qr },
37
- "et-EE": { locale: Jr },
38
- "lt-LT": { locale: qr },
39
- "lv-LV": { locale: Yr }
1
+ import { jsxs as w, jsx as n, Fragment as bt } from "react/jsx-runtime";
2
+ import { GridItem as q, Box as Ft, Grid as J } from "@chakra-ui/react";
3
+ import Gt, { useState as Q, useEffect as Tt, useCallback as Lt } from "react";
4
+ import { DatePickerDateCell as X } from "./date-picker-date-cell.js";
5
+ import { DatePickerHeader as Et } from "./date-picker-header.js";
6
+ import { DatePickerWeekCell as Pt } from "./date-picker-week-cell.js";
7
+ import { hasDotOnDate as h, isDateStrikeThrough as _t, getWeekCellVariant as zt, getDateCellVariant as Z, firstLetterUpperCase as At, hasDatePassed as Ht } from "./helper.js";
8
+ import { lv as Ut } from "../../node_modules/date-fns/locale/lv.js";
9
+ import { lt as jt } from "../../node_modules/date-fns/locale/lt.js";
10
+ import { et as Kt } from "../../node_modules/date-fns/locale/et.js";
11
+ import { es as Yt } from "../../node_modules/date-fns/locale/es.js";
12
+ import { fi as qt } from "../../node_modules/date-fns/locale/fi.js";
13
+ import { nl as Jt } from "../../node_modules/date-fns/locale/nl.js";
14
+ import { endOfMonth as N } from "../../node_modules/date-fns/endOfMonth.js";
15
+ import { startOfWeek as Qt } from "../../node_modules/date-fns/startOfWeek.js";
16
+ import { sv as Xt } from "../../node_modules/date-fns/locale/sv.js";
17
+ import { da as Zt } from "../../node_modules/date-fns/locale/da.js";
18
+ import { nb as Nt } from "../../node_modules/date-fns/locale/nb.js";
19
+ import { enGB as Rt } from "../../node_modules/date-fns/locale/en-GB.js";
20
+ import { enUS as tr } from "../../node_modules/date-fns/locale/en-US.js";
21
+ import { formatDate as R } from "../../node_modules/date-fns/format.js";
22
+ import { startOfMonth as x } from "../../node_modules/date-fns/startOfMonth.js";
23
+ import { addDays as tt } from "../../node_modules/date-fns/addDays.js";
24
+ import { isSameMonth as rt } from "../../node_modules/date-fns/isSameMonth.js";
25
+ import { isSameDay as f } from "../../node_modules/date-fns/isSameDay.js";
26
+ import { getISOWeek as et } from "../../node_modules/date-fns/getISOWeek.js";
27
+ import { ThemeColorVariable as ot, ThemeSpaceVariable as at, ThemeFontSizeVariable as rr, ThemeFontVariable as er } from "../../theme/theme-types.js";
28
+ const or = {
29
+ "en-US": { locale: tr },
30
+ "en-GB": { locale: Rt },
31
+ "nb-NO": { locale: Nt },
32
+ "da-DK": { locale: Zt },
33
+ "sv-SE": { locale: Xt },
34
+ "nl-NL": { locale: Jt },
35
+ "fi-FI": { locale: qt },
36
+ "es-ES": { locale: Yt },
37
+ "et-EE": { locale: Kt },
38
+ "lt-LT": { locale: jt },
39
+ "lv-LV": { locale: Ut }
40
40
  };
41
- function Lt({
42
- selectedDate: f,
43
- onDateChange: C,
44
- onMonthChange: W,
45
- markSundayRed: fr,
46
- strikeThroughDates: sr,
47
- showDaysOutsideMonth: nr = !1,
48
- localeString: ar,
49
- canSelectPastDates: cr,
50
- isExpanded: M = !0,
51
- dots: e,
52
- weekNumbers: i = !1,
41
+ function Fr({
42
+ selectedDate: l,
43
+ onDateChange: S,
44
+ onMonthChange: B,
45
+ markSundayRed: lt,
46
+ strikeThroughDates: st,
47
+ showDaysOutsideMonth: nt = !1,
48
+ localeString: it,
49
+ canSelectPastDates: ft,
50
+ isExpanded: C = !0,
51
+ dots: c,
52
+ weekNumbers: a = !1,
53
53
  selectWeek: m = !1,
54
- shouldDisableDate: $,
55
- selectedMonth: b,
56
- dateRange: r,
57
- isRangeDate: F = !1,
58
- onRangeChange: a,
59
- isDisabled: mr = !1,
60
- redDays: Dr = [],
61
- disablePastMonths: hr = !1,
62
- disableBackwardNavigation: pr = !1,
63
- disableForwardNavigation: ur = !1
54
+ shouldDisableDate: V,
55
+ selectedMonth: W,
56
+ dateRange: o,
57
+ isRangeDate: $ = !1,
58
+ onRangeChange: i,
59
+ isDisabled: ct = !1,
60
+ redDays: mt = [],
61
+ disablePastMonths: Dt = !1,
62
+ disableBackwardNavigation: ht = !1,
63
+ disableForwardNavigation: pt = !1
64
64
  }) {
65
- var P;
66
- const [s, G] = N(b || f || /* @__PURE__ */ new Date()), [T, O] = N(!0), { locale: D } = et[ar];
67
- Pr(() => {
68
- f && G(b || f || /* @__PURE__ */ new Date());
69
- }, [M]);
70
- const yr = (o) => {
71
- G(o), W && W(o);
72
- }, L = (o) => {
73
- if (T)
74
- a && a({ startDate: o, endDate: null }), O(!1);
75
- else if (r != null && r.startDate && r.startDate > o)
76
- a && a({ startDate: o, endDate: null }), O(!1);
65
+ const [s, b] = Q(W || l || /* @__PURE__ */ new Date()), [F, M] = Q(!0), { locale: D } = or[it];
66
+ Tt(() => {
67
+ l && b(W || l || /* @__PURE__ */ new Date());
68
+ }, [C]);
69
+ const ut = (r) => {
70
+ b(r), B && B(r);
71
+ }, G = (r) => {
72
+ if (F)
73
+ i && i({ startDate: r, endDate: null }), M(!1);
74
+ else if (o?.startDate && o.startDate > r)
75
+ i && i({ startDate: r, endDate: null }), M(!1);
77
76
  else {
78
- if (r != null && r.startDate && c(o, r.startDate))
77
+ if (o?.startDate && f(r, o.startDate))
79
78
  return;
80
- if (r != null && r.startDate && a) {
81
- const l = { startDate: r.startDate, endDate: o };
82
- a(l);
79
+ if (o?.startDate && i) {
80
+ const e = { startDate: o.startDate, endDate: r };
81
+ i(e);
83
82
  }
84
- O(!0);
83
+ M(!0);
85
84
  }
86
- }, p = _r(
87
- (o) => {
88
- F ? L(o) : C && C(o);
85
+ }, p = Lt(
86
+ (r) => {
87
+ $ ? G(r) : S && S(r);
89
88
  },
90
- [C, F, T, L]
89
+ [S, $, F, G]
91
90
  );
92
- function Sr() {
93
- const o = Nr(/* @__PURE__ */ new Date(), { locale: D });
94
- return Array.from({ length: 7 }, (l, t) => rr(tr(o, t), "eee", { locale: D }));
91
+ function dt() {
92
+ const r = Qt(/* @__PURE__ */ new Date(), { locale: D });
93
+ return Array.from({ length: 7 }, (e, t) => R(tt(r, t), "eee", { locale: D }));
95
94
  }
96
- const Cr = rr(V(s), "MMMM yyyy", {
95
+ const yt = R(x(s), "MMMM yyyy", {
97
96
  locale: D
98
- }), Mr = R(s).getDate(), Or = [i ? "v." : void 0, ...Sr()], kr = ((P = D.options) == null ? void 0 : P.weekStartsOn) || 0, E = (V(s).getDay() - kr + 7) % 7, Ir = (7 - R(s).getDay()) % 7, vr = ["auto", "auto", "100%"], wr = ["auto", "auto", "100%"], xr = (o) => !cr && Kr(o) ? !0 : $ ? $(o) : !1, Br = Array.from({ length: Mr + E + Ir }, (o, l) => {
99
- const t = tr(V(s), l - E), Vr = or(t, s), k = c(t, /* @__PURE__ */ new Date()), u = xr(t) || mr, _ = h(t, e == null ? void 0 : e.yellowDotDates), z = h(t, e == null ? void 0 : e.greenDotDates), A = h(t, e == null ? void 0 : e.blueDotDates), H = h(t, e == null ? void 0 : e.redDotDates), U = h(t, e == null ? void 0 : e.greyDotDates), j = Hr(t, sr) && !u;
97
+ }), St = N(s).getDate(), Ct = [a ? "v." : void 0, ...dt()], Mt = D.options?.weekStartsOn || 0, T = (x(s).getDay() - Mt + 7) % 7, Ot = (7 - N(s).getDay()) % 7, gt = ["auto", "auto", "100%"], kt = ["auto", "auto", "100%"], It = (r) => !ft && Ht(r) ? !0 : V ? V(r) : !1, vt = Array.from({ length: St + T + Ot }, (r, e) => {
98
+ const t = tt(x(s), e - T), wt = rt(t, s), O = f(t, /* @__PURE__ */ new Date()), u = It(t) || ct, L = h(t, c?.yellowDotDates), E = h(t, c?.greenDotDates), P = h(t, c?.blueDotDates), _ = h(t, c?.redDotDates), z = h(t, c?.greyDotDates), A = _t(t, st) && !u;
99
+ let g = !1;
100
+ l && (g = f(t, l));
101
+ const xt = t.getDay() === 0, H = mt.some(($t) => f($t, t)) || (lt ?? !1) && xt, k = et(t);
102
+ let d = !1;
103
+ m && l && (d = et(l) === k);
104
+ const U = !rt(t, s), j = !!(o?.startDate && o?.endDate && t > o.startDate && t < o.endDate);
100
105
  let I = !1;
101
- f && (I = c(t, f));
102
- const Wr = t.getDay() === 0, K = Dr.some((Gr) => c(Gr, t)) || (fr ?? !1) && Wr, v = lr(t);
103
- let y = !1;
104
- m && f && (y = lr(f) === v);
105
- const Y = !or(t, s), q = !!(r != null && r.startDate && (r != null && r.endDate) && t > r.startDate && t < r.endDate);
106
- let w = !1;
107
- r != null && r.startDate && (w = c(t, r == null ? void 0 : r.startDate));
108
- let x = !1, J = !1;
109
- r != null && r.endDate && (x = c(t, r == null ? void 0 : r.endDate), J = !0);
110
- const $r = g(
111
- I || y,
112
- k,
113
- Y,
114
- q,
115
- w,
116
- x,
117
- J
118
- ), br = Ur(y, k), Fr = g(
119
- I || y,
120
- k,
121
- Y,
122
- q,
123
- w,
124
- x
125
- ), Q = Math.floor(l / 7) + 1, S = l % 7 + 1;
126
- return i ? /* @__PURE__ */ B(Er.Fragment, { children: [
127
- i && l % 7 === 0 && /* @__PURE__ */ n(
128
- X,
106
+ o?.startDate && (I = f(t, o?.startDate));
107
+ let v = !1, K = !1;
108
+ o?.endDate && (v = f(t, o?.endDate), K = !0);
109
+ const Bt = Z(
110
+ g || d,
111
+ O,
112
+ U,
113
+ j,
114
+ I,
115
+ v,
116
+ K
117
+ ), Vt = zt(d, O), Wt = Z(
118
+ g || d,
119
+ O,
120
+ U,
121
+ j,
122
+ I,
123
+ v
124
+ ), Y = Math.floor(e / 7) + 1, y = e % 7 + 1;
125
+ return a ? /* @__PURE__ */ w(Gt.Fragment, { children: [
126
+ a && e % 7 === 0 && /* @__PURE__ */ n(
127
+ q,
129
128
  {
130
129
  gridColumn: 1,
131
130
  gridRow: "1 / span 7",
132
131
  opacity: "0.24",
133
132
  borderRight: "1px solid",
134
- borderColor: er.OnSurfaceBorder
133
+ borderColor: ot.OnSurfaceBorder
135
134
  },
136
- `grid-${l}-${t}`
135
+ `grid-${e}-${t}`
137
136
  ),
138
- i && l % 7 === 0 && /* @__PURE__ */ n(
139
- Ar,
137
+ a && e % 7 === 0 && /* @__PURE__ */ n(
138
+ Pt,
140
139
  {
141
140
  handleWeekChange: p,
142
141
  date: t,
143
- gridIndex: l,
144
- variant: br,
142
+ gridIndex: e,
143
+ variant: Vt,
145
144
  selectWeek: m,
146
145
  isDisabled: u
147
146
  },
148
- `week-${l}-${v}`
147
+ `week-${e}-${k}`
149
148
  ),
150
149
  /* @__PURE__ */ n(
151
- d,
150
+ X,
152
151
  {
153
- hasBlueDot: A,
154
- hasGreenDot: z,
155
- hasYellowDot: _,
156
- hasRedDot: H,
157
- hasGreyDot: U,
158
- gridIndex: l,
159
- gridColumn: i ? S + 2 : S,
160
- gridRow: Q,
152
+ hasBlueDot: P,
153
+ hasGreenDot: E,
154
+ hasYellowDot: L,
155
+ hasRedDot: _,
156
+ hasGreyDot: z,
157
+ gridIndex: e,
158
+ gridColumn: a ? y + 2 : y,
159
+ gridRow: Y,
161
160
  day: t,
162
161
  handleDateChange: p,
163
- variant: Fr,
162
+ variant: Wt,
164
163
  isDisabled: u,
165
- isStrikeThrough: j,
164
+ isStrikeThrough: A,
166
165
  selectWeek: m,
167
- isHoliday: K
166
+ isHoliday: H
168
167
  },
169
- t.toString() + l
168
+ t.toString() + e
170
169
  )
171
- ] }, `fragment-${l}-${v}`) : Vr || nr ? /* @__PURE__ */ n(
172
- d,
170
+ ] }, `fragment-${e}-${k}`) : wt || nt ? /* @__PURE__ */ n(
171
+ X,
173
172
  {
174
- hasBlueDot: A,
175
- hasGreenDot: z,
176
- hasYellowDot: _,
177
- hasRedDot: H,
178
- hasGreyDot: U,
179
- gridIndex: l,
180
- gridColumn: i ? S + 1 : S,
181
- gridRow: Q,
173
+ hasBlueDot: P,
174
+ hasGreenDot: E,
175
+ hasYellowDot: L,
176
+ hasRedDot: _,
177
+ hasGreyDot: z,
178
+ gridIndex: e,
179
+ gridColumn: a ? y + 1 : y,
180
+ gridRow: Y,
182
181
  day: t,
183
182
  handleDateChange: p,
184
- variant: $r,
183
+ variant: Bt,
185
184
  isDisabled: u,
186
- isStrikeThrough: j,
185
+ isStrikeThrough: A,
187
186
  selectWeek: m,
188
- isHoliday: K
187
+ isHoliday: H
189
188
  },
190
- `${t.toString()}-${l}`
189
+ `${t.toString()}-${e}`
191
190
  ) : null;
192
191
  });
193
- return /* @__PURE__ */ B(Lr, { w: wr, h: vr, children: [
192
+ return /* @__PURE__ */ w(Ft, { w: kt, h: gt, children: [
194
193
  /* @__PURE__ */ n(
195
- zr,
194
+ Et,
196
195
  {
197
- selectedDate: f || /* @__PURE__ */ new Date(),
196
+ selectedDate: l || /* @__PURE__ */ new Date(),
198
197
  onDateChange: p,
199
- isExpanded: M,
200
- onMonthChange: yr,
198
+ isExpanded: C,
199
+ onMonthChange: ut,
201
200
  selectedMonth: s,
202
- month: Cr,
201
+ month: yt,
203
202
  locale: D,
204
203
  selectWeek: m,
205
- disablePastMonths: hr,
206
- disableBackwardNavigation: pr,
207
- disableForwardNavigation: ur,
208
- dateRange: r,
209
- onRangeChange: a
204
+ disablePastMonths: Dt,
205
+ disableBackwardNavigation: ht,
206
+ disableForwardNavigation: pt,
207
+ dateRange: o,
208
+ onRangeChange: i
210
209
  }
211
210
  ),
212
- M && /* @__PURE__ */ B(Tr, { children: [
213
- /* @__PURE__ */ n(Z, { templateColumns: i ? "48px 1px 1fr 1fr 1fr 1fr 1fr 1fr 1fr" : "repeat(7, 1fr)", children: Or.map((o, l) => {
211
+ C && /* @__PURE__ */ w(bt, { children: [
212
+ /* @__PURE__ */ n(J, { templateColumns: a ? "48px 1px 1fr 1fr 1fr 1fr 1fr 1fr 1fr" : "repeat(7, 1fr)", children: Ct.map((r, e) => {
214
213
  let t;
215
- return i && l === 0 ? t = 1 : i ? t = l + 2 : t = l, o ? /* @__PURE__ */ n(
216
- X,
214
+ return a && e === 0 ? t = 1 : a ? t = e + 2 : t = e, r ? /* @__PURE__ */ n(
215
+ q,
217
216
  {
218
217
  textAlign: "center",
219
218
  fontWeight: "500",
220
- fontFamily: lt.Body,
221
- fontSize: ot.Small,
219
+ fontFamily: er.Body,
220
+ fontSize: rr.Small,
222
221
  gridColumn: t,
223
- borderRight: i && l === 0 ? `1px solid ${er.OnSurfaceBorder}` : "",
224
- pb: ir.Small,
225
- children: jr(o).slice(0, 2)
222
+ borderRight: a && e === 0 ? `1px solid ${ot.OnSurfaceBorder}` : "",
223
+ pb: at.Small,
224
+ children: At(r).slice(0, 2)
226
225
  },
227
- o
226
+ r
228
227
  ) : null;
229
228
  }) }),
230
229
  /* @__PURE__ */ n(
231
- Z,
230
+ J,
232
231
  {
233
- templateColumns: i ? "48px 1px 1fr 1fr 1fr 1fr 1fr 1fr 1fr" : "repeat(7, 1fr)",
234
- rowGap: ir.Small,
232
+ templateColumns: a ? "48px 1px 1fr 1fr 1fr 1fr 1fr 1fr 1fr" : "repeat(7, 1fr)",
233
+ rowGap: at.Small,
235
234
  flexShrink: 1,
236
- children: Br
235
+ children: vt
237
236
  }
238
237
  )
239
238
  ] })
240
239
  ] });
241
240
  }
242
241
  export {
243
- Lt as BaseDatePicker
242
+ Fr as BaseDatePicker
244
243
  };
@@ -28,13 +28,13 @@ const Fr = ({
28
28
  selectWeek: m,
29
29
  locale: o,
30
30
  selectedDate: i,
31
- onDateChange: f,
32
- isExpanded: s,
31
+ onDateChange: a,
32
+ isExpanded: f,
33
33
  disablePastMonths: P,
34
34
  disableBackwardNavigation: B,
35
35
  disableForwardNavigation: T,
36
36
  dateRange: t,
37
- onRangeChange: a
37
+ onRangeChange: s
38
38
  }) => {
39
39
  function V(r) {
40
40
  switch (r) {
@@ -51,14 +51,14 @@ const Fr = ({
51
51
  }
52
52
  }
53
53
  function h(r) {
54
- return !!(r != null && r.startDate) && !!(r != null && r.endDate);
54
+ return !!r?.startDate && !!r?.endDate;
55
55
  }
56
- const n = !m && h(t) && a;
56
+ const n = !m && h(t) && s;
57
57
  function v(r) {
58
58
  return X(r.startDate, r.endDate) ? o === F || o === x ? "MMM d" : "d MMM" : "PP";
59
59
  }
60
60
  const y = () => {
61
- if (s)
61
+ if (f)
62
62
  return S(d);
63
63
  if (m)
64
64
  return `${V(o)} ${A(i)}`;
@@ -68,15 +68,15 @@ const Fr = ({
68
68
  }
69
69
  return i ? b(i, "dd MMMM", { locale: o }) : S(d);
70
70
  }, H = () => {
71
- s ? k(Y(u(e))) : m ? f(q(i)) : n ? a({
71
+ f ? k(Y(u(e))) : m ? a(q(i)) : n ? s({
72
72
  startDate: c(t.startDate),
73
73
  endDate: c(t.endDate)
74
- }) : f(c(i));
74
+ }) : a(c(i));
75
75
  }, U = () => {
76
- s ? k(C(u(e), 1)) : m ? f(J(i, 1)) : n ? a({
76
+ f ? k(C(u(e), 1)) : m ? a(J(i, 1)) : n ? s({
77
77
  startDate: D(t.startDate, 1),
78
78
  endDate: D(t.endDate, 1)
79
- }) : f(D(i, 1));
79
+ }) : a(D(i, 1));
80
80
  }, M = u(/* @__PURE__ */ new Date()), $ = B || P && (O(e, M) || G(e, M));
81
81
  return /* @__PURE__ */ L(W, { justify: "space-between", align: "center", mb: Z.Small, children: [
82
82
  /* @__PURE__ */ p(
@@ -1,16 +1,16 @@
1
1
  import { isSameDay as n } from "../../node_modules/date-fns/isSameDay.js";
2
- import { endOfDay as s } from "../../node_modules/date-fns/endOfDay.js";
3
- import { isPast as c } from "../../node_modules/date-fns/isPast.js";
4
- const m = (t, e) => e == null ? void 0 : e.some((r) => n(new Date(r), t)), y = (t, e) => !e || e.length === 0 ? !1 : e.some((r) => n(new Date(r), t));
5
- function p(t) {
6
- const e = s(t);
7
- return c(e);
2
+ import { endOfDay as u } from "../../node_modules/date-fns/endOfDay.js";
3
+ import { isPast as f } from "../../node_modules/date-fns/isPast.js";
4
+ const m = (e, t) => t?.some((r) => n(new Date(r), e)), y = (e, t) => !t || t.length === 0 ? !1 : t.some((r) => n(new Date(r), e));
5
+ function p(e) {
6
+ const t = u(e);
7
+ return f(t);
8
8
  }
9
- const d = (t) => `${t.slice(0, 1).toUpperCase()}${t.slice(1)}`, C = (t, e, r, a, i, f, o) => i ? o ? "startDateRange" : "selectedDay" : f ? "endDateRange" : t ? "selectedDay" : a ? "isSelectedRangeDay" : e ? "currentDay" : r ? "outSideMonth" : "normal", S = (t, e) => t ? "selectedDay" : e ? "currentDay" : "normal";
9
+ const d = (e) => `${e.slice(0, 1).toUpperCase()}${e.slice(1)}`, g = (e, t, r, a, i, s, o) => i ? o ? "startDateRange" : "selectedDay" : s ? "endDateRange" : e ? "selectedDay" : a ? "isSelectedRangeDay" : t ? "currentDay" : r ? "outSideMonth" : "normal", h = (e, t) => e ? "selectedDay" : t ? "currentDay" : "normal";
10
10
  export {
11
11
  d as firstLetterUpperCase,
12
- C as getDateCellVariant,
13
- S as getWeekCellVariant,
12
+ g as getDateCellVariant,
13
+ h as getWeekCellVariant,
14
14
  p as hasDatePassed,
15
15
  y as hasDotOnDate,
16
16
  m as isDateStrikeThrough