@caspeco/casper-ui-library 7.7.0 → 7.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,16 +5,16 @@ import { DatePickerDateCell as X } from "./date-picker-date-cell.js";
5
5
  import { DatePickerHeader as Lt } from "./date-picker-header.js";
6
6
  import { DatePickerWeekCell as Pt } from "./date-picker-week-cell.js";
7
7
  import { hasDotOnDate as p, isDateStrikeThrough as Ut, getWeekCellVariant as _t, getDateCellVariant as Z, firstLetterUpperCase as zt, hasDatePassed as At } from "./helper.js";
8
- import { nlBE as Ht } from "../../node_modules/date-fns/locale/nl-BE.js";
9
- import { fr as N } from "../../node_modules/date-fns/locale/fr.js";
10
- import { lv as jt } from "../../node_modules/date-fns/locale/lv.js";
11
- import { lt as Kt } from "../../node_modules/date-fns/locale/lt.js";
12
- import { et as Yt } from "../../node_modules/date-fns/locale/et.js";
13
- import { es as qt } from "../../node_modules/date-fns/locale/es.js";
14
- import { fi as Jt } from "../../node_modules/date-fns/locale/fi.js";
15
- import { nl as Qt } from "../../node_modules/date-fns/locale/nl.js";
16
- import { endOfMonth as R } from "../../node_modules/date-fns/endOfMonth.js";
17
- import { startOfWeek as Xt } from "../../node_modules/date-fns/startOfWeek.js";
8
+ import { lv as Ht } 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 { nlBE as Xt } from "../../node_modules/date-fns/locale/nl-BE.js";
17
+ import { fr as R } from "../../node_modules/date-fns/locale/fr.js";
18
18
  import { sv as Zt } from "../../node_modules/date-fns/locale/sv.js";
19
19
  import { da as Nt } from "../../node_modules/date-fns/locale/da.js";
20
20
  import { nb as Rt } from "../../node_modules/date-fns/locale/nb.js";
@@ -33,15 +33,15 @@ const ar = {
33
33
  "nb-NO": { locale: Rt },
34
34
  "da-DK": { locale: Nt },
35
35
  "sv-SE": { locale: Zt },
36
- "nl-NL": { locale: Qt },
37
- "fi-FI": { locale: Jt },
38
- "es-ES": { locale: qt },
39
- "et-EE": { locale: Yt },
40
- "lt-LT": { locale: Kt },
41
- "lv-LV": { locale: jt },
42
- "fr-FR": { locale: N },
43
- "fr-BE": { locale: N },
44
- "nl-BE": { locale: Ht }
36
+ "nl-NL": { locale: Jt },
37
+ "fi-FI": { locale: qt },
38
+ "es-ES": { locale: Yt },
39
+ "et-EE": { locale: Kt },
40
+ "lt-LT": { locale: jt },
41
+ "lv-LV": { locale: Ht },
42
+ "fr-FR": { locale: R },
43
+ "fr-BE": { locale: R },
44
+ "nl-BE": { locale: Xt }
45
45
  };
46
46
  function Gr({
47
47
  selectedDate: l,
@@ -94,12 +94,12 @@ function Gr({
94
94
  [S, $, E, e?.startDate, s]
95
95
  );
96
96
  function yt() {
97
- const o = Xt(/* @__PURE__ */ new Date(), { locale: D });
97
+ const o = Qt(/* @__PURE__ */ new Date(), { locale: D });
98
98
  return Array.from({ length: 7 }, (r, t) => tt(rt(o, t), "eee", { locale: D }));
99
99
  }
100
100
  const St = tt(F(n), "MMMM yyyy", {
101
101
  locale: D
102
- }), Ct = R(n).getDate(), Mt = [a ? "v." : void 0, ...yt()], Ot = D.options?.weekStartsOn || 0, T = (F(n).getDay() - Ot + 7) % 7, kt = (7 - R(n).getDay()) % 7, gt = ["auto", "auto", "100%"], Bt = ["auto", "auto", "100%"], It = (o) => !mt && At(o) ? !0 : W ? W(o) : !1, vt = Array.from({ length: Ct + T + kt }, (o, r) => {
102
+ }), Ct = N(n).getDate(), Mt = [a ? "v." : void 0, ...yt()], Ot = D.options?.weekStartsOn || 0, T = (F(n).getDay() - Ot + 7) % 7, kt = (7 - N(n).getDay()) % 7, gt = ["auto", "auto", "100%"], Bt = ["auto", "auto", "100%"], It = (o) => !mt && At(o) ? !0 : W ? W(o) : !1, vt = Array.from({ length: Ct + T + kt }, (o, r) => {
103
103
  const t = rt(F(n), r - T), k = et(t, n), g = f(t, /* @__PURE__ */ new Date()), u = It(t) || ct, G = p(t, m?.yellowDotDates), L = p(t, m?.greenDotDates), P = p(t, m?.blueDotDates), U = p(t, m?.redDotDates), _ = p(t, m?.greyDotDates), z = Ut(t, nt) && !u;
104
104
  let B = !1;
105
105
  l && (B = f(t, l));
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker-date-cell.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker-date-cell.tsx"],"names":[],"mappings":"AAIA,KAAK,OAAO,GACT,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,cAAc,GACd,oBAAoB,GACpB,gBAAgB,GAChB,cAAc,CAAC;AAElB,KAAK,qBAAqB,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,IAAI,CAAC;IACV,gBAAgB,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,uLAgBhC,qBAAqB,4CAqGvB,CAAC"}
1
+ {"version":3,"file":"date-picker-date-cell.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker-date-cell.tsx"],"names":[],"mappings":"AAIA,KAAK,OAAO,GACT,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,cAAc,GACd,oBAAoB,GACpB,gBAAgB,GAChB,cAAc,CAAC;AAElB,KAAK,qBAAqB,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,IAAI,CAAC;IACV,gBAAgB,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,uLAgBhC,qBAAqB,4CAuGvB,CAAC"}
@@ -1,46 +1,47 @@
1
- import { jsx as e, Fragment as w, jsxs as p } from "react/jsx-runtime";
2
- import { useStyleConfig as x, Button as O, Box as t, Stack as V } from "@chakra-ui/react";
3
- import { formatDate as W } from "../../node_modules/date-fns/format.js";
4
- import { ThemeColorVariable as r, ThemeSpaceVariable as m } from "../../theme/theme-types.js";
5
- const L = ({
6
- gridColumn: u,
7
- gridRow: b,
8
- gridIndex: C,
9
- day: c,
10
- handleDateChange: g,
1
+ import { jsx as e, Fragment as W, jsxs as p } from "react/jsx-runtime";
2
+ import { useStyleConfig as m, Button as O, Box as t, Stack as V } from "@chakra-ui/react";
3
+ import { formatDate as j } from "../../node_modules/date-fns/format.js";
4
+ import { isToday as x } from "../../node_modules/date-fns/isToday.js";
5
+ import { ThemeColorVariable as r, ThemeSpaceVariable as u } from "../../theme/theme-types.js";
6
+ const N = ({
7
+ gridColumn: b,
8
+ gridRow: f,
9
+ gridIndex: g,
10
+ day: n,
11
+ handleDateChange: h,
11
12
  variant: o,
12
13
  isDisabled: d,
13
14
  isStrikeThrough: s,
14
- hasBlueDot: h,
15
+ hasBlueDot: C,
15
16
  hasYellowDot: k,
16
- hasGreenDot: f,
17
- hasGreyDot: D,
18
- hasRedDot: y,
17
+ hasGreenDot: D,
18
+ hasGreyDot: y,
19
+ hasRedDot: S,
19
20
  selectWeek: a,
20
21
  isHoliday: i
21
22
  }) => {
22
- const S = x("DateCell", { variant: o }), R = x("DateCellWeek", { variant: o }), n = (o === "selectedDay" || o === "startDateRange" || o === "endDateRange") && !a, l = {
23
+ const R = m("DateCell", { variant: o }), B = m("DateCellWeek", { variant: o }), c = (o === "selectedDay" || o === "startDateRange" || o === "endDateRange") && !a, l = {
23
24
  borderRadius: "50%",
24
- border: n ? "solid 1.5px white" : "",
25
- width: n ? "7.5px" : "6px",
26
- height: n ? "7.5px" : "6px"
27
- }, B = C % 7 === 6;
28
- return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ p(
25
+ border: c ? "solid 1.5px white" : "",
26
+ width: c ? "7.5px" : "6px",
27
+ height: c ? "7.5px" : "6px"
28
+ }, w = g % 7 === 6;
29
+ return /* @__PURE__ */ e(W, { children: /* @__PURE__ */ p(
29
30
  O,
30
31
  {
31
- __css: a ? R : S,
32
+ __css: a ? B : R,
32
33
  type: "button",
33
- sx: a && o === "selectedDay" && B ? {
34
+ sx: a && o === "selectedDay" && w ? {
34
35
  borderTopRightRadius: "10px",
35
36
  borderBottomRightRadius: "10px"
36
37
  } : {},
37
38
  variant: o,
38
39
  isDisabled: d || s,
39
40
  onClick: () => {
40
- !d && !s && g(c);
41
+ !d && !s && h(n);
41
42
  },
42
- gridColumn: u,
43
- gridRow: b,
43
+ gridColumn: b,
44
+ gridRow: f,
44
45
  display: "flex",
45
46
  "data-testid": "date-picker-date-cell",
46
47
  children: [
@@ -49,7 +50,9 @@ const L = ({
49
50
  {
50
51
  "data-testid": i ? "holiday" : void 0,
51
52
  sx: { color: i ? r.Error : "inherit" },
52
- children: W(c, "d")
53
+ fontWeight: x(n) ? "bold" : "normal",
54
+ textDecoration: x(n) ? "underline" : "none",
55
+ children: j(n, "d")
53
56
  }
54
57
  ),
55
58
  s && /* @__PURE__ */ e("span", {}),
@@ -57,11 +60,11 @@ const L = ({
57
60
  V,
58
61
  {
59
62
  position: "absolute",
60
- bottom: m.XSmall,
63
+ bottom: u.XSmall,
61
64
  direction: "row",
62
- spacing: m.XSmall,
65
+ spacing: u.XSmall,
63
66
  children: [
64
- h && /* @__PURE__ */ e(
67
+ C && /* @__PURE__ */ e(
65
68
  t,
66
69
  {
67
70
  sx: {
@@ -70,7 +73,7 @@ const L = ({
70
73
  }
71
74
  }
72
75
  ),
73
- f && /* @__PURE__ */ e(
76
+ D && /* @__PURE__ */ e(
74
77
  t,
75
78
  {
76
79
  sx: {
@@ -88,7 +91,7 @@ const L = ({
88
91
  }
89
92
  }
90
93
  ),
91
- D && /* @__PURE__ */ e(
94
+ y && /* @__PURE__ */ e(
92
95
  t,
93
96
  {
94
97
  sx: {
@@ -97,7 +100,7 @@ const L = ({
97
100
  }
98
101
  }
99
102
  ),
100
- y && /* @__PURE__ */ e(
103
+ S && /* @__PURE__ */ e(
101
104
  t,
102
105
  {
103
106
  sx: {
@@ -114,5 +117,5 @@ const L = ({
114
117
  ) });
115
118
  };
116
119
  export {
117
- L as DatePickerDateCell
120
+ N as DatePickerDateCell
118
121
  };
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker-header.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker-header.tsx"],"names":[],"mappings":"AAIA,OAAO,EAaN,KAAK,MAAM,EACX,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,KAAK,qBAAqB,GAAG;IAC5B,aAAa,EAAE,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,IAAI,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,yBAAyB,EAAE,OAAO,CAAC;IACnC,wBAAwB,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,wMAc9B,qBAAqB,4CA4GvB,CAAC"}
1
+ {"version":3,"file":"date-picker-header.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker-header.tsx"],"names":[],"mappings":"AAKA,OAAO,EAeN,KAAK,MAAM,EACX,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,KAAK,qBAAqB,GAAG;IAC5B,aAAa,EAAE,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,IAAI,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,yBAAyB,EAAE,OAAO,CAAC;IACnC,wBAAwB,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,wMAc9B,qBAAqB,4CAiJvB,CAAC"}
@@ -1,107 +1,138 @@
1
- import { jsxs as L, jsx as p } from "react/jsx-runtime";
2
- import { Flex as W, Text as z } from "@chakra-ui/react";
3
- import { firstLetterUpperCase as S } from "./helper.js";
4
- import { startOfMonth as u } from "../../node_modules/date-fns/startOfMonth.js";
5
- import { isBefore as O } from "../../node_modules/date-fns/isBefore.js";
6
- import { isSameMonth as G } from "../../node_modules/date-fns/isSameMonth.js";
7
- import { IconButton as l } from "../icon-button/icon-button.js";
8
- import { Icons as w } from "../icon/types.js";
9
- import { subMonths as Y } from "../../node_modules/date-fns/subMonths.js";
10
- import { subWeeks as q } from "../../node_modules/date-fns/subWeeks.js";
11
- import { subDays as c } from "../../node_modules/date-fns/subDays.js";
12
- import { getISOWeek as A } from "../../node_modules/date-fns/getISOWeek.js";
13
- import { addMonths as C } from "../../node_modules/date-fns/addMonths.js";
14
- import { addWeeks as J } from "../../node_modules/date-fns/addWeeks.js";
15
- import { addDays as D } from "../../node_modules/date-fns/addDays.js";
16
- import { sv as K } from "../../node_modules/date-fns/locale/sv.js";
17
- import { da as N } from "../../node_modules/date-fns/locale/da.js";
18
- import { nb as Q } from "../../node_modules/date-fns/locale/nb.js";
19
- import { enGB as F } from "../../node_modules/date-fns/locale/en-GB.js";
20
- import { enUS as x } from "../../node_modules/date-fns/locale/en-US.js";
21
- import { isSameYear as X } from "../../node_modules/date-fns/isSameYear.js";
22
- import { ThemeSpaceVariable as Z, ThemeFontSizeVariable as _, ThemeFontVariable as E } from "../../theme/theme-types.js";
23
- import { formatDate as b } from "../../node_modules/date-fns/format.js";
24
- const Fr = ({
25
- onMonthChange: k,
26
- selectedMonth: e,
27
- month: d,
1
+ import { jsxs as u, jsx as s } from "react/jsx-runtime";
2
+ import { Flex as p, Text as N } from "@chakra-ui/react";
3
+ import { firstLetterUpperCase as T } from "./helper.js";
4
+ import { startOfMonth as d } from "../../node_modules/date-fns/startOfMonth.js";
5
+ import { isBefore as Q } from "../../node_modules/date-fns/isBefore.js";
6
+ import { isSameMonth as X } from "../../node_modules/date-fns/isSameMonth.js";
7
+ import { startOfDay as Z } from "../../node_modules/date-fns/startOfDay.js";
8
+ import { Button as _ } from "../button/button.js";
9
+ import { IconButton as x } from "../icon-button/icon-button.js";
10
+ import { Icons as B } from "../icon/types.js";
11
+ import { getISOWeek as E } from "../../node_modules/date-fns/getISOWeek.js";
12
+ import { enGB as D } from "../../node_modules/date-fns/locale/en-GB.js";
13
+ import { enUS as k } from "../../node_modules/date-fns/locale/en-US.js";
14
+ import { nlBE as F } from "../../node_modules/date-fns/locale/nl-BE.js";
15
+ import { fr as P } from "../../node_modules/date-fns/locale/fr.js";
16
+ import { sv as V } from "../../node_modules/date-fns/locale/sv.js";
17
+ import { da as v } from "../../node_modules/date-fns/locale/da.js";
18
+ import { nb as j } from "../../node_modules/date-fns/locale/nb.js";
19
+ import { subMonths as R } from "../../node_modules/date-fns/subMonths.js";
20
+ import { subWeeks as rr } from "../../node_modules/date-fns/subWeeks.js";
21
+ import { subDays as l } from "../../node_modules/date-fns/subDays.js";
22
+ import { addMonths as tr } from "../../node_modules/date-fns/addMonths.js";
23
+ import { addWeeks as or } from "../../node_modules/date-fns/addWeeks.js";
24
+ import { addDays as b } from "../../node_modules/date-fns/addDays.js";
25
+ import { isSameYear as er } from "../../node_modules/date-fns/isSameYear.js";
26
+ import { isSameDay as ir } from "../../node_modules/date-fns/isSameDay.js";
27
+ import { ThemeSpaceVariable as H, ThemeFontSizeVariable as ar, ThemeFontVariable as mr } from "../../theme/theme-types.js";
28
+ import { formatDate as S } from "../../node_modules/date-fns/format.js";
29
+ const gr = ({
30
+ onMonthChange: h,
31
+ selectedMonth: a,
32
+ month: w,
28
33
  selectWeek: m,
29
- locale: o,
30
- selectedDate: i,
31
- onDateChange: a,
32
- isExpanded: f,
33
- disablePastMonths: P,
34
- disableBackwardNavigation: B,
35
- disableForwardNavigation: T,
36
- dateRange: t,
37
- onRangeChange: s
34
+ locale: e,
35
+ selectedDate: t,
36
+ onDateChange: i,
37
+ isExpanded: n,
38
+ disablePastMonths: I,
39
+ disableBackwardNavigation: U,
40
+ disableForwardNavigation: $,
41
+ dateRange: o,
42
+ onRangeChange: f
38
43
  }) => {
39
- function V(r) {
44
+ function g(r) {
40
45
  switch (r) {
41
- case x:
42
- case F:
43
- return "Week";
44
- case Q:
46
+ case j:
45
47
  return "Uke";
46
- case N:
48
+ case v:
47
49
  return "Uge";
48
- case K:
49
- default:
50
+ case V:
50
51
  return "Vecka";
52
+ case P:
53
+ return "Semaine";
54
+ case F:
55
+ case k:
56
+ case D:
57
+ default:
58
+ return "Week";
59
+ }
60
+ }
61
+ function z(r) {
62
+ switch (r) {
63
+ case j:
64
+ case v:
65
+ case V:
66
+ return "I dag";
67
+ case P:
68
+ return "Aujourd'hui";
69
+ case F:
70
+ return "Vandaag";
71
+ case k:
72
+ case D:
73
+ default:
74
+ return "Today";
51
75
  }
52
76
  }
53
- function h(r) {
77
+ function L(r) {
54
78
  return !!r?.startDate && !!r?.endDate;
55
79
  }
56
- const n = !m && h(t) && s;
57
- function v(r) {
58
- return X(r.startDate, r.endDate) ? o === F || o === x ? "MMM d" : "d MMM" : "PP";
80
+ const c = !m && L(o) && f;
81
+ function O(r) {
82
+ return er(r.startDate, r.endDate) ? e === D || e === k ? "MMM d" : "d MMM" : "PP";
59
83
  }
60
- const y = () => {
61
- if (f)
62
- return S(d);
84
+ const W = () => {
85
+ if (n)
86
+ return T(w);
63
87
  if (m)
64
- return `${V(o)} ${A(i)}`;
65
- if (n) {
66
- const r = v(t), j = b(t.startDate, r, { locale: o }), I = b(t.endDate, r, { locale: o });
67
- return `${j} - ${I}`.replace(/\./g, "");
88
+ return `${g(e)} ${E(t)}`;
89
+ if (c) {
90
+ const r = O(o), J = S(o.startDate, r, { locale: e }), K = S(o.endDate, r, { locale: e });
91
+ return `${J} - ${K}`.replace(/\./g, "");
68
92
  }
69
- return i ? b(i, "dd MMMM", { locale: o }) : S(d);
70
- }, H = () => {
71
- f ? k(Y(u(e))) : m ? a(q(i)) : n ? s({
72
- startDate: c(t.startDate),
73
- endDate: c(t.endDate)
74
- }) : a(c(i));
75
- }, U = () => {
76
- f ? k(C(u(e), 1)) : m ? a(J(i, 1)) : n ? s({
77
- startDate: D(t.startDate, 1),
78
- endDate: D(t.endDate, 1)
79
- }) : a(D(i, 1));
80
- }, M = u(/* @__PURE__ */ new Date()), $ = B || P && (O(e, M) || G(e, M));
81
- return /* @__PURE__ */ L(W, { justify: "space-between", align: "center", mb: Z.Small, children: [
82
- /* @__PURE__ */ p(
83
- l,
84
- {
85
- icon: w.Back,
86
- "aria-label": "Back",
87
- variant: "ghost",
88
- onClick: H,
89
- isDisabled: $
90
- }
91
- ),
92
- /* @__PURE__ */ p(z, { fontWeight: "500", fontFamily: E.SubHeader, fontSize: _.Large, children: y() }),
93
- /* @__PURE__ */ p(
94
- l,
95
- {
96
- icon: w.Forward,
97
- "aria-label": "Forward",
98
- variant: "ghost",
99
- onClick: U,
100
- isDisabled: T
101
- }
102
- )
93
+ return t ? S(t, "dd MMMM", { locale: e }) : T(w);
94
+ }, A = () => {
95
+ n ? h(R(d(a))) : m ? i(rr(t)) : c ? f({
96
+ startDate: l(o.startDate),
97
+ endDate: l(o.endDate)
98
+ }) : i(l(t));
99
+ }, C = () => {
100
+ n ? h(tr(d(a), 1)) : m ? i(or(t, 1)) : c ? f({
101
+ startDate: b(o.startDate, 1),
102
+ endDate: b(o.endDate, 1)
103
+ }) : i(b(t, 1));
104
+ }, y = d(/* @__PURE__ */ new Date()), G = U || I && (Q(a, y) || X(a, y)), M = Z(/* @__PURE__ */ new Date()), Y = !ir(t, M), q = () => {
105
+ i(M);
106
+ };
107
+ return /* @__PURE__ */ u(p, { justify: "space-between", align: "center", mb: H.Small, children: [
108
+ /* @__PURE__ */ s(N, { fontWeight: "500", fontFamily: mr.SubHeader, fontSize: ar.Large, children: W() }),
109
+ /* @__PURE__ */ u(p, { align: "center", gap: H.Small, children: [
110
+ Y && /* @__PURE__ */ s(_, { variant: "ghost", size: "sm", onClick: q, children: z(e) }),
111
+ /* @__PURE__ */ u(p, { align: "center", children: [
112
+ /* @__PURE__ */ s(
113
+ x,
114
+ {
115
+ icon: B.Back,
116
+ "aria-label": "Back",
117
+ variant: "ghost",
118
+ onClick: A,
119
+ isDisabled: G
120
+ }
121
+ ),
122
+ /* @__PURE__ */ s(
123
+ x,
124
+ {
125
+ icon: B.Forward,
126
+ "aria-label": "Forward",
127
+ variant: "ghost",
128
+ onClick: C,
129
+ isDisabled: $
130
+ }
131
+ )
132
+ ] })
133
+ ] })
103
134
  ] });
104
135
  };
105
136
  export {
106
- Fr as DatePickerHeader
137
+ gr as DatePickerHeader
107
138
  };
@@ -0,0 +1,8 @@
1
+ import { constructFrom as o } from "./constructFrom.js";
2
+ function n(t) {
3
+ return o(t, Date.now());
4
+ }
5
+ export {
6
+ n as constructNow,
7
+ n as default
8
+ };
@@ -0,0 +1,13 @@
1
+ import { constructFrom as r } from "./constructFrom.js";
2
+ import { constructNow as t } from "./constructNow.js";
3
+ import { isSameDay as m } from "./isSameDay.js";
4
+ function f(o, i) {
5
+ return m(
6
+ r(o, o),
7
+ t(o)
8
+ );
9
+ }
10
+ export {
11
+ f as default,
12
+ f as isToday
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caspeco/casper-ui-library",
3
- "version": "7.7.0",
3
+ "version": "7.7.1",
4
4
  "prettier": "@caspeco/prettier-config",
5
5
  "type": "module",
6
6
  "sideEffects": false,