@leabankab/component-library 8.6.1 → 8.8.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 (93) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/dist/component-library.es.js +1930 -1091
  3. package/dist/component-library.es.js.map +1 -1
  4. package/dist/component-library.umd.js +2 -2
  5. package/dist/component-library.umd.js.map +1 -1
  6. package/dist/components/buttons/action-button.d.ts +34 -4
  7. package/dist/components/buttons/button-base.d.ts +5 -2
  8. package/dist/components/buttons/icon-button.d.ts +16 -2
  9. package/dist/components/color-roles.d.ts +7 -1
  10. package/dist/components/data-display/arrow-circle.d.ts +21 -0
  11. package/dist/components/data-display/article-card.d.ts +88 -0
  12. package/dist/components/data-display/avatar.d.ts +33 -0
  13. package/dist/components/data-display/chip.d.ts +8 -3
  14. package/dist/components/data-display/featured-image.d.ts +42 -0
  15. package/dist/components/data-display/index.d.ts +12 -0
  16. package/dist/components/data-display/link-card.d.ts +52 -0
  17. package/dist/components/data-display/media-card.d.ts +102 -0
  18. package/dist/components/data-display/partner-row.d.ts +46 -0
  19. package/dist/components/data-display/rich-text.d.ts +27 -0
  20. package/dist/components/data-display/service-card.d.ts +80 -0
  21. package/dist/components/data-display/star-rating.d.ts +26 -0
  22. package/dist/components/data-display/table.d.ts +93 -0
  23. package/dist/components/data-display/testimonial-card.d.ts +43 -0
  24. package/dist/components/data-display/use-star-rating-labels.d.ts +5 -0
  25. package/dist/components/data-display/use-video-player-labels.d.ts +2 -0
  26. package/dist/components/data-display/video-player.d.ts +22 -0
  27. package/dist/components/data-display/website-card.d.ts +10 -0
  28. package/dist/components/feedback/index.d.ts +1 -0
  29. package/dist/components/feedback/skeleton.d.ts +22 -0
  30. package/dist/components/form/slider.d.ts +15 -2
  31. package/dist/components/navigation/breadcrumbs.d.ts +38 -0
  32. package/dist/components/navigation/index.d.ts +3 -0
  33. package/dist/components/navigation/pagination-dots.d.ts +34 -0
  34. package/dist/components/navigation/pagination.d.ts +37 -0
  35. package/dist/components/navigation/use-breadcrumbs-labels.d.ts +2 -0
  36. package/dist/components/navigation/use-pagination-labels.d.ts +7 -0
  37. package/dist/components/surfaces/accordion.d.ts +5 -1
  38. package/dist/components/surfaces/index.d.ts +1 -0
  39. package/dist/components/surfaces/panel.d.ts +30 -0
  40. package/dist/components/typography/link.d.ts +14 -1
  41. package/dist/cookie-consent-react.cjs +1 -1
  42. package/dist/cookie-consent-react.cjs.map +1 -1
  43. package/dist/cookie-consent-react.mjs +13 -13
  44. package/dist/cookie-consent-react.mjs.map +1 -1
  45. package/dist/cookie-consent.css +1 -1
  46. package/dist/date-picker.cjs +1 -1
  47. package/dist/date-picker.cjs.map +1 -1
  48. package/dist/date-picker.mjs +216 -203
  49. package/dist/date-picker.mjs.map +1 -1
  50. package/dist/index.css +1 -1
  51. package/dist/index.d.ts +1 -1
  52. package/dist/tailwind.css +16 -0
  53. package/dist/theme/index.d.ts +1 -1
  54. package/dist/theme/token-types.d.ts +13 -3
  55. package/dist/theme/tokens/breakpoints.d.ts +20 -0
  56. package/dist/theme/tokens/font-family.d.ts +6 -0
  57. package/dist/theme/tokens/index.d.ts +1 -0
  58. package/dist/theme/tokens/shadows.d.ts +6 -0
  59. package/dist/theme/tokens/text-styles.d.ts +8 -0
  60. package/dist/theme/tokens/widths.d.ts +10 -0
  61. package/dist/theme/types.d.ts +9 -1
  62. package/dist/website/brand-letters.d.ts +40 -0
  63. package/dist/website/calculator.d.ts +58 -0
  64. package/dist/website/carousel.d.ts +55 -0
  65. package/dist/website/cta-banner.d.ts +42 -0
  66. package/dist/website/expanding-cards-context.d.ts +8 -0
  67. package/dist/website/expanding-cards-item.d.ts +69 -0
  68. package/dist/website/expanding-cards.d.ts +48 -0
  69. package/dist/website/hero-service-grid.d.ts +52 -0
  70. package/dist/website/hero.d.ts +57 -0
  71. package/dist/website/index.d.ts +33 -0
  72. package/dist/website/navigation-grid.d.ts +39 -0
  73. package/dist/website/paragraphs.d.ts +11 -0
  74. package/dist/website/partner-list.d.ts +79 -0
  75. package/dist/website/payment-feature.d.ts +85 -0
  76. package/dist/website/promo-grid.d.ts +71 -0
  77. package/dist/website/section-header.d.ts +53 -0
  78. package/dist/website/section.d.ts +53 -0
  79. package/dist/website/service-card-grid.d.ts +33 -0
  80. package/dist/website/split-content.d.ts +69 -0
  81. package/dist/website/stats.d.ts +52 -0
  82. package/dist/website/testimonials.d.ts +100 -0
  83. package/dist/website/use-brand-letters-labels.d.ts +2 -0
  84. package/dist/website/use-carousel-labels.d.ts +6 -0
  85. package/dist/website/use-carousel.d.ts +50 -0
  86. package/dist/website/use-partner-list-labels.d.ts +6 -0
  87. package/dist/website/use-testimonials-labels.d.ts +6 -0
  88. package/dist/website.cjs +2 -0
  89. package/dist/website.cjs.map +1 -0
  90. package/dist/website.css +1 -0
  91. package/dist/website.mjs +1226 -0
  92. package/dist/website.mjs.map +1 -0
  93. package/package.json +7 -2
@@ -7,18 +7,18 @@ import { LocalizationProvider as a } from "@mui/x-date-pickers/LocalizationProvi
7
7
  import { esES as o, fiFI as s, nbNO as c, svSE as l } from "@mui/x-date-pickers/locales";
8
8
  import { format as u } from "date-fns";
9
9
  import { es as d, fi as f, nb as p, sv as m } from "date-fns/locale";
10
- import { CalendarSearch as h, ChevronDown as ee, ChevronLeft as te, ChevronRight as g } from "lucide-react";
11
- import { useEffect as _, useMemo as ne, useRef as re, useState as ie } from "react";
12
- import { Drawer as v, createTranslation as y, useLanguage as ae } from "./component-library.es.js";
13
- import b from "@mui/material/Box";
14
- import x from "@mui/material/IconButton";
15
- import { usePickerActionsContext as S, usePickerAdapter as C } from "@mui/x-date-pickers/hooks";
16
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
17
- import E from "@mui/material/Typography";
18
- import { MonthCalendar as oe } from "@mui/x-date-pickers/MonthCalendar";
19
- import { YearCalendar as se } from "@mui/x-date-pickers/YearCalendar";
10
+ import { CalendarSearch as h, ChevronDown as g, ChevronLeft as ee, ChevronRight as te } from "lucide-react";
11
+ import { useEffect as _, useMemo as ne, useRef as v, useState as re } from "react";
12
+ import { Drawer as y, createTranslation as b, useLanguage as ie } from "./component-library.es.js";
13
+ import x from "@mui/material/Box";
14
+ import S from "@mui/material/IconButton";
15
+ import { usePickerActionsContext as C, usePickerAdapter as w } from "@mui/x-date-pickers/hooks";
16
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
17
+ import D from "@mui/material/Typography";
18
+ import { MonthCalendar as O } from "@mui/x-date-pickers/MonthCalendar";
19
+ import { YearCalendar as ae } from "@mui/x-date-pickers/YearCalendar";
20
20
  //#region src/components/form/use-focus-target-ref.ts
21
- var D = (e, t) => {
21
+ var oe = (e, t) => {
22
22
  if (typeof e == "function") {
23
23
  let n = e(t);
24
24
  return {
@@ -31,27 +31,27 @@ var D = (e, t) => {
31
31
  ref: e,
32
32
  target: t
33
33
  };
34
- }, O = (e) => {
34
+ }, k = (e) => {
35
35
  if (!e) return;
36
36
  let { ref: t, cleanup: n } = e;
37
37
  n ? n() : typeof t == "function" ? t(null) : t && (t.current = null);
38
38
  };
39
- function ce(e, t, n) {
40
- let r = re(null);
39
+ function se(e, t, n) {
40
+ let r = v(null);
41
41
  _(() => {
42
42
  let i = t.current, a = null;
43
43
  if (i) {
44
44
  for (let e of n) if (a = i.querySelector(e), a) break;
45
45
  }
46
46
  let o = r.current;
47
- o && o.ref === e && o.target === a || (O(o), r.current = e ? D(e, a) : null);
47
+ o && o.ref === e && o.target === a || (k(o), r.current = e ? oe(e, a) : null);
48
48
  }), _(() => () => {
49
- O(r.current), r.current = null;
49
+ k(r.current), r.current = null;
50
50
  }, []);
51
51
  }
52
52
  //#endregion
53
53
  //#region src/theme/tokens/breakpoints.ts
54
- var k = {
54
+ var ce = {
55
55
  xs: 0,
56
56
  sm: 600,
57
57
  md: 900,
@@ -188,28 +188,36 @@ var k = {
188
188
  tight: 1.25,
189
189
  snug: 1.4,
190
190
  normal: 1.5
191
- }, { purple: F, teal: I, blue: L, amber: R, red: z, neutral: B, white: V, beige: H } = A, U = {
191
+ }, { purple: F, teal: I, blue: L, amber: R, red: z, neutral: B, white: V, beige: H } = A, U = (e, t) => {
192
+ let [n, r, i] = [
193
+ 1,
194
+ 3,
195
+ 5
196
+ ].map((t) => parseInt(e.slice(t, t + 2), 16));
197
+ return `rgba(${n}, ${r}, ${i}, ${t})`;
198
+ }, W = {
199
+ hover: "#E3D8DA",
200
+ contrastHover: "#241B26",
201
+ textContrastHover: "#CD86D6"
202
+ }, G = {
192
203
  bg: {
193
204
  base: V,
194
205
  subtle: B[50],
195
206
  muted: H[100],
196
207
  contrast: B[950],
197
208
  accent: F[100],
198
- overlay: ((e, t) => {
199
- let [n, r, i] = [
200
- 1,
201
- 3,
202
- 5
203
- ].map((t) => parseInt(e.slice(t, t + 2), 16));
204
- return `rgba(${n}, ${r}, ${i}, ${t})`;
205
- })(B[950], .5)
209
+ overlay: U(B[950], .5),
210
+ hover: W.hover,
211
+ "contrast-hover": W.contrastHover,
212
+ "contrast-accent": F[800]
206
213
  },
207
214
  text: {
208
215
  base: B[950],
209
216
  subtle: B[500],
210
217
  muted: B[400],
211
218
  accent: F[600],
212
- contrast: V
219
+ contrast: V,
220
+ "contrast-hover": W.textContrastHover
213
221
  },
214
222
  border: {
215
223
  base: B[200],
@@ -254,15 +262,16 @@ var k = {
254
262
  subtle: I[100]
255
263
  }
256
264
  }
257
- }, W = {
265
+ }, K = {
258
266
  xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
259
267
  sm: "0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px -1px rgba(0, 0, 0, 0.10)",
260
268
  md: "0px 4px 6px -1px rgba(0, 0, 0, 0.10), 0px 2px 4px -2px rgba(0, 0, 0, 0.10)",
261
269
  lg: "0px 10px 15px -3px rgba(0, 0, 0, 0.10), 0px 4px 6px -4px rgba(0, 0, 0, 0.10)",
262
270
  xl: "0px 20px 25px -5px rgba(0, 0, 0, 0.10), 0px 8px 10px -6px rgba(0, 0, 0, 0.10)",
263
271
  "2xl": "0px 25px 50px -12px rgba(0, 0, 0, 0.25)",
272
+ soft: "0 0 6px 0 rgba(86, 86, 118, 0.10)",
264
273
  inner: "0px 2px 4px 0px rgba(0, 0, 0, 0.05) inset"
265
- }, G = {
274
+ }, q = {
266
275
  sm: 4,
267
276
  md: 5,
268
277
  lg: 6,
@@ -273,56 +282,60 @@ var k = {
273
282
  "5xl": 32,
274
283
  huge: 64,
275
284
  full: 100
276
- }, K = 8, q = 16, J = (e) => `${e * K / q}rem`, le = 16, Y = {
285
+ }, le = 8, ue = 16, J = (e) => `${e * le / ue}rem`, de = 16, fe = {
277
286
  base: 16,
278
287
  ratio: 1.125
279
- }, ue = (e) => Math.round(Y.base * Y.ratio ** e), de = (e) => `${ue(e) / le}rem`, X = (e, t, n, r = "0") => ({
288
+ }, pe = (e) => Math.round(fe.base * fe.ratio ** e), me = (e) => `${pe(e) / de}rem`, Y = (e, t, n, r = "0") => ({
280
289
  step: e,
281
290
  fontWeight: t,
282
291
  lineHeight: n,
283
292
  letterSpacing: r
284
- }), fe = {
293
+ }), he = {
285
294
  display: {
286
- sm: X(10, "semibold", "none"),
287
- md: X(12, "semibold", "none")
295
+ sm: Y(10, "semibold", "none"),
296
+ md: Y(12, "semibold", "none")
288
297
  },
289
298
  heading: {
290
- xs: X(0, "semibold", "snug"),
291
- sm: X(2, "semibold", "snug"),
292
- md: X(4, "semibold", "snug"),
293
- lg: X(6, "semibold", "tight"),
294
- xl: X(8, "semibold", "tight")
299
+ xs: Y(0, "semibold", "snug"),
300
+ sm: Y(2, "semibold", "snug"),
301
+ md: Y(4, "semibold", "snug"),
302
+ lg: Y(6, "semibold", "tight"),
303
+ xl: Y(8, "semibold", "tight")
304
+ },
305
+ title: {
306
+ md: Y(4, "regular", "snug"),
307
+ xl: Y(8, "regular", "tight")
295
308
  },
296
309
  body: {
297
- xs: X(-2, "regular", "normal"),
298
- sm: X(-1, "regular", "normal"),
299
- md: X(0, "regular", "normal"),
300
- lg: X(1, "regular", "normal")
310
+ xs: Y(-2, "regular", "normal"),
311
+ sm: Y(-1, "regular", "normal"),
312
+ md: Y(0, "regular", "normal"),
313
+ lg: Y(1, "regular", "normal")
301
314
  },
302
315
  label: {
303
- sm: X(-2, "medium", "tight"),
304
- md: X(-1, "medium", "tight"),
305
- lg: X(0, "medium", "tight")
316
+ sm: Y(-2, "medium", "tight"),
317
+ md: Y(-1, "medium", "tight"),
318
+ lg: Y(0, "medium", "tight")
306
319
  }
307
- }, pe = Object.entries(fe).flatMap(([e, t]) => Object.entries(t).map(([t, n]) => [`${e}-${t}`, n])), me = Object.fromEntries(pe), he = (e) => {
308
- let { step: t, fontWeight: n, lineHeight: r, letterSpacing: i } = me[e];
320
+ }, ge = Object.entries(he).flatMap(([e, t]) => Object.entries(t).map(([t, n]) => [`${e}-${t}`, n])), _e = Object.fromEntries(ge), ve = (e) => {
321
+ let { step: t, fontWeight: n, lineHeight: r, letterSpacing: i } = _e[e];
309
322
  return {
310
- fontSize: de(t),
323
+ fontSize: me(t),
311
324
  fontWeight: N[n],
312
325
  lineHeight: P[r],
313
326
  letterSpacing: i
314
327
  };
315
- }, Z = {
328
+ }, X = {
316
329
  standard: "ease-in-out",
317
330
  spring: "cubic-bezier(0.34, 1.56, 0.64, 1)"
318
- }, Q = {
331
+ }, Z = {
319
332
  fast: "0.15s",
320
333
  normal: "0.2s",
321
334
  emphasis: "0.3s"
322
- }, ge = (e, t = Q.normal, n = Z.standard) => e.map((e) => `${e} ${t} ${n}`).join(", "), $ = { "&:focus-visible": {
335
+ }, Q = (e, t = Z.normal, n = X.standard) => e.map((e) => `${e} ${t} ${n}`).join(", "), $ = { "&:focus-visible": {
323
336
  outline: "2px solid",
324
- outlineColor: U.text.base
325
- } }, _e = y({
337
+ outlineColor: G.text.base
338
+ } }, ye = b({
326
339
  previousMonth: {
327
340
  no: "Forrige måned",
328
341
  se: "Föregående månad",
@@ -347,7 +360,7 @@ var k = {
347
360
  fi: "vaihda päivänäkymään",
348
361
  es: "cambiar a vista de fecha"
349
362
  }
350
- }), ve = (e) => e.charAt(0).toUpperCase() + e.slice(1), ye = {
363
+ }), be = (e) => e.charAt(0).toUpperCase() + e.slice(1), xe = {
351
364
  width: 40,
352
365
  height: 40,
353
366
  border: "1px solid",
@@ -359,12 +372,12 @@ var k = {
359
372
  color: "text.base"
360
373
  }
361
374
  };
362
- function be({ currentMonth: e, onMonthChange: t, onViewChange: n, view: r, minDate: i, maxDate: a, disabled: o, labels: s }) {
363
- let c = C(), l = {
364
- ..._e(),
375
+ function Se({ currentMonth: e, onMonthChange: t, onViewChange: n, view: r, minDate: i, maxDate: a, disabled: o, labels: s }) {
376
+ let c = w(), l = {
377
+ ...ye(),
365
378
  ...s
366
- }, u = r === "day", d = !!o || i != null && !c.isAfter(e, c.startOfMonth(i)), f = !!o || a != null && !c.isBefore(c.startOfMonth(e), c.startOfMonth(a)), p = `${ve(c.formatByString(e, "LLLL"))} ${c.getYear(e)}`, m = `${p}, ${u ? l.switchToYearView : l.switchToDayView}`;
367
- return /* @__PURE__ */ T(b, {
379
+ }, u = r === "day", d = !!o || i != null && !c.isAfter(e, c.startOfMonth(i)), f = !!o || a != null && !c.isBefore(c.startOfMonth(e), c.startOfMonth(a)), p = `${be(c.formatByString(e, "LLLL"))} ${c.getYear(e)}`, m = `${p}, ${u ? l.switchToYearView : l.switchToDayView}`;
380
+ return /* @__PURE__ */ E(x, {
368
381
  sx: {
369
382
  display: "flex",
370
383
  alignItems: "center",
@@ -374,20 +387,20 @@ function be({ currentMonth: e, onMonthChange: t, onViewChange: n, view: r, minDa
374
387
  pb: 1
375
388
  },
376
389
  children: [
377
- u ? /* @__PURE__ */ w(x, {
390
+ u ? /* @__PURE__ */ T(S, {
378
391
  "aria-label": l.previousMonth,
379
392
  disabled: d,
380
393
  onClick: () => t(c.addMonths(e, -1)),
381
- sx: ye,
382
- children: /* @__PURE__ */ w(te, {
394
+ sx: xe,
395
+ children: /* @__PURE__ */ T(ee, {
383
396
  size: 20,
384
397
  "aria-hidden": !0
385
398
  })
386
- }) : /* @__PURE__ */ w(b, { sx: {
399
+ }) : /* @__PURE__ */ T(x, { sx: {
387
400
  width: 40,
388
401
  height: 40
389
402
  } }),
390
- /* @__PURE__ */ T(b, {
403
+ /* @__PURE__ */ E(x, {
391
404
  component: "button",
392
405
  type: "button",
393
406
  "aria-label": m,
@@ -414,7 +427,7 @@ function be({ currentMonth: e, onMonthChange: t, onViewChange: n, view: r, minDa
414
427
  },
415
428
  ...$
416
429
  },
417
- children: [p, /* @__PURE__ */ w(b, {
430
+ children: [p, /* @__PURE__ */ T(x, {
418
431
  component: "span",
419
432
  sx: {
420
433
  display: "inline-flex",
@@ -422,22 +435,22 @@ function be({ currentMonth: e, onMonthChange: t, onViewChange: n, view: r, minDa
422
435
  transition: "transform .15s",
423
436
  transform: u ? "none" : "rotate(180deg)"
424
437
  },
425
- children: /* @__PURE__ */ w(ee, {
438
+ children: /* @__PURE__ */ T(g, {
426
439
  size: 16,
427
440
  "aria-hidden": !0
428
441
  })
429
442
  })]
430
443
  }),
431
- u ? /* @__PURE__ */ w(x, {
444
+ u ? /* @__PURE__ */ T(S, {
432
445
  "aria-label": l.nextMonth,
433
446
  disabled: f,
434
447
  onClick: () => t(c.addMonths(e, 1)),
435
- sx: ye,
436
- children: /* @__PURE__ */ w(g, {
448
+ sx: xe,
449
+ children: /* @__PURE__ */ T(te, {
437
450
  size: 20,
438
451
  "aria-hidden": !0
439
452
  })
440
- }) : /* @__PURE__ */ w(b, { sx: {
453
+ }) : /* @__PURE__ */ T(x, { sx: {
441
454
  width: 40,
442
455
  height: 40
443
456
  } })
@@ -446,14 +459,14 @@ function be({ currentMonth: e, onMonthChange: t, onViewChange: n, view: r, minDa
446
459
  }
447
460
  //#endregion
448
461
  //#region src/date-picker/drawer-toolbar.tsx
449
- function xe({ eyebrow: e, title: t, titleId: n, hidden: r }) {
450
- return r ? null : /* @__PURE__ */ T(b, {
462
+ function Ce({ eyebrow: e, title: t, titleId: n, hidden: r }) {
463
+ return r ? null : /* @__PURE__ */ E(x, {
451
464
  sx: {
452
465
  px: 3,
453
466
  pt: 1,
454
467
  pb: 1.5
455
468
  },
456
- children: [e != null && /* @__PURE__ */ w(E, {
469
+ children: [e != null && /* @__PURE__ */ T(D, {
457
470
  component: "p",
458
471
  sx: {
459
472
  color: "text.accent",
@@ -464,7 +477,7 @@ function xe({ eyebrow: e, title: t, titleId: n, hidden: r }) {
464
477
  mb: .5
465
478
  },
466
479
  children: e
467
- }), t != null && /* @__PURE__ */ w(E, {
480
+ }), t != null && /* @__PURE__ */ T(D, {
468
481
  component: "h2",
469
482
  id: n,
470
483
  sx: {
@@ -478,53 +491,53 @@ function xe({ eyebrow: e, title: t, titleId: n, hidden: r }) {
478
491
  }
479
492
  //#endregion
480
493
  //#region src/date-picker/theme/field-base.ts
481
- var Se = "54px", Ce = {
494
+ var we = "54px", Te = {
482
495
  paddingInlineStart: "0.9rem",
483
496
  paddingBlockStart: "1.5rem",
484
497
  paddingBlockEnd: "0.5rem"
485
- }, we = (e) => ({
498
+ }, Ee = (e) => ({
486
499
  [`& .${e}`]: {
487
500
  top: 0,
488
501
  inset: 0
489
502
  },
490
503
  [`& .${e} legend`]: { display: "none" }
491
- }), Te = (e) => ({
504
+ }), De = (e) => ({
492
505
  [`&:hover:not(:focus-within):not(.Mui-disabled):not(.Mui-error) .${e}`]: {
493
506
  borderWidth: "2px",
494
- borderColor: U.border.strong
507
+ borderColor: G.border.strong
495
508
  },
496
509
  [`&:focus-within:not(.Mui-error) .${e}`]: {
497
510
  borderWidth: "2px",
498
- borderColor: U.border.accent
511
+ borderColor: G.border.accent
499
512
  },
500
513
  [`&.Mui-error .${e}`]: {
501
514
  borderWidth: "2px",
502
- borderColor: U.status.error.base
515
+ borderColor: G.status.error.base
503
516
  },
504
517
  [`&.Mui-error:hover:not(:focus-within):not(.Mui-disabled) .${e}`]: {
505
518
  borderWidth: "2px",
506
- borderColor: U.status.error.base
519
+ borderColor: G.status.error.base
507
520
  },
508
521
  [`&.Mui-error:focus-within .${e}`]: {
509
522
  borderWidth: "2px",
510
- borderColor: U.status.error.base
523
+ borderColor: G.status.error.base
511
524
  }
512
- }), Ee = "MuiPickersOutlinedInput-notchedOutline", De = {
525
+ }), Oe = "MuiPickersOutlinedInput-notchedOutline", ke = {
513
526
  MuiPickersOutlinedInput: { styleOverrides: {
514
527
  root: {
515
528
  boxSizing: "border-box",
516
529
  alignItems: "flex-start",
517
530
  padding: 0,
518
- borderRadius: G.xl,
519
- height: Se,
531
+ borderRadius: q.xl,
532
+ height: we,
520
533
  lineHeight: "normal",
521
- ...we(Ee),
522
- ...Te(Ee),
534
+ ...Ee(Oe),
535
+ ...De(Oe),
523
536
  "& .MuiInputAdornment-root": { alignSelf: "center" },
524
537
  "& .MuiInputAdornment-positionEnd": { marginRight: J(2) }
525
538
  },
526
539
  sectionsContainer: {
527
- ...Ce,
540
+ ...Te,
528
541
  paddingInlineEnd: "0.9rem"
529
542
  }
530
543
  } },
@@ -549,24 +562,24 @@ var Se = "54px", Ce = {
549
562
  },
550
563
  weekDayLabel: {
551
564
  fontSize: M.sm,
552
- color: U.text.subtle
565
+ color: G.text.subtle
553
566
  }
554
567
  } },
555
568
  MuiPickerDay: { styleOverrides: { root: {
556
569
  width: 40,
557
570
  height: 40,
558
571
  fontSize: M.md,
559
- color: U.text.base,
572
+ color: G.text.base,
560
573
  backgroundColor: "transparent",
561
- "&:hover, &:focus": { backgroundColor: U.bg.subtle },
574
+ "&:hover, &:focus": { backgroundColor: G.bg.subtle },
562
575
  "&.MuiPickerDay-selected": {
563
- backgroundColor: U.primary.base,
564
- color: U.primary.contrast,
565
- "&:hover, &:focus": { backgroundColor: U.primary.hover }
576
+ backgroundColor: G.primary.base,
577
+ color: G.primary.contrast,
578
+ "&:hover, &:focus": { backgroundColor: G.primary.hover }
566
579
  },
567
- "&.Mui-disabled, &.MuiPickerDay-disabled": { color: U.text.muted },
580
+ "&.Mui-disabled, &.MuiPickerDay-disabled": { color: G.text.muted },
568
581
  "&.MuiPickerDay-today:not(.MuiPickerDay-selected)": {
569
- outline: `1px solid ${U.border.base}`,
582
+ outline: `1px solid ${G.border.base}`,
570
583
  outlineOffset: -1
571
584
  }
572
585
  } } },
@@ -582,20 +595,20 @@ var Se = "54px", Ce = {
582
595
  maxWidth: "31%",
583
596
  fontSize: M.md,
584
597
  fontWeight: 500,
585
- color: U.text.base,
598
+ color: G.text.base,
586
599
  backgroundColor: "transparent",
587
- borderRadius: G["3xl"],
600
+ borderRadius: q["3xl"],
588
601
  height: J(6),
589
602
  margin: 0,
590
- "&:hover, &:focus": { backgroundColor: U.bg.subtle },
603
+ "&:hover, &:focus": { backgroundColor: G.bg.subtle },
591
604
  "&.Mui-selected, &.MuiMonthCalendar-selected": {
592
- backgroundColor: U.primary.base,
593
- color: U.primary.contrast,
594
- "&:hover, &:focus": { backgroundColor: U.primary.hover }
605
+ backgroundColor: G.primary.base,
606
+ color: G.primary.contrast,
607
+ "&:hover, &:focus": { backgroundColor: G.primary.hover }
595
608
  },
596
609
  "&.Mui-disabled, &.MuiMonthCalendar-disabled": {
597
610
  backgroundColor: "transparent",
598
- color: U.text.muted
611
+ color: G.text.muted
599
612
  }
600
613
  }
601
614
  } },
@@ -611,42 +624,42 @@ var Se = "54px", Ce = {
611
624
  maxWidth: "31%",
612
625
  fontSize: M.md,
613
626
  fontWeight: 500,
614
- color: U.text.base,
627
+ color: G.text.base,
615
628
  backgroundColor: "transparent",
616
- borderRadius: G["3xl"],
629
+ borderRadius: q["3xl"],
617
630
  height: J(6),
618
631
  margin: 0,
619
- "&:hover, &:focus": { backgroundColor: U.bg.subtle },
632
+ "&:hover, &:focus": { backgroundColor: G.bg.subtle },
620
633
  "&.Mui-selected, &.MuiYearCalendar-selected": {
621
- backgroundColor: U.primary.base,
622
- color: U.primary.contrast,
623
- "&:hover, &:focus": { backgroundColor: U.primary.hover }
634
+ backgroundColor: G.primary.base,
635
+ color: G.primary.contrast,
636
+ "&:hover, &:focus": { backgroundColor: G.primary.hover }
624
637
  },
625
638
  "&.Mui-disabled, &.MuiYearCalendar-disabled": {
626
639
  backgroundColor: "transparent",
627
- color: U.text.muted
640
+ color: G.text.muted
628
641
  }
629
642
  }
630
643
  } },
631
644
  MuiPickerPopper: { styleOverrides: { paper: {
632
645
  width: "100%",
633
646
  boxSizing: "border-box",
634
- borderRadius: G.xl,
635
- boxShadow: W.md,
636
- border: `1px solid ${U.border.subtle}`
647
+ borderRadius: q.xl,
648
+ boxShadow: K.md,
649
+ border: `1px solid ${G.border.subtle}`
637
650
  } } }
638
- }, Oe = {
651
+ }, Ae = {
639
652
  defaultProps: { variant: "outlined" },
640
653
  styleOverrides: { root: { position: "relative" } }
641
- }, ke = { styleOverrides: { root: he("body-sm") } }, Ae = {
654
+ }, je = { styleOverrides: { root: ve("body-sm") } }, Me = {
642
655
  defaultProps: { size: "large" },
643
656
  styleOverrides: {
644
657
  root: {
645
658
  ...$,
646
- borderRadius: G.full,
659
+ borderRadius: q.full,
647
660
  textTransform: "none",
648
661
  border: "2px solid",
649
- transition: [ge(["background-color"], Q.emphasis, Z.spring), ge(["color"], Q.emphasis, Z.spring)].join(", "),
662
+ transition: [Q(["background-color"], Z.emphasis, X.spring), Q(["color"], Z.emphasis, X.spring)].join(", "),
650
663
  svg: { flexShrink: 0 }
651
664
  },
652
665
  sizeSmall: {
@@ -667,34 +680,34 @@ var Se = "54px", Ce = {
667
680
  variants: [{
668
681
  props: { color: "primary" },
669
682
  style: {
670
- borderColor: U.border.strong,
671
- color: U.text.base,
683
+ borderColor: G.border.strong,
684
+ color: G.text.base,
672
685
  "&:hover": {
673
- borderColor: U.primary.base,
674
- backgroundColor: U.primary.base,
675
- color: U.primary.contrast
686
+ borderColor: G.primary.base,
687
+ backgroundColor: G.primary.base,
688
+ color: G.primary.contrast
676
689
  }
677
690
  }
678
691
  }, {
679
692
  props: { color: "secondary" },
680
693
  style: {
681
- borderColor: U.primary.base,
682
- color: U.primary.base,
694
+ borderColor: G.primary.base,
695
+ color: G.primary.base,
683
696
  "&:hover": {
684
- borderColor: U.border.strong,
685
- backgroundColor: U.primary.base,
686
- color: U.primary.contrast
697
+ borderColor: G.border.strong,
698
+ backgroundColor: G.primary.base,
699
+ color: G.primary.contrast
687
700
  }
688
701
  }
689
702
  }]
690
- }, je = { styleOverrides: { shrink: { top: "1rem" } } }, Me = {
703
+ }, Ne = { styleOverrides: { shrink: { top: "1rem" } } }, Pe = {
691
704
  fontFamily: j,
692
705
  fontWeight: N.regular,
693
- color: U.text.base,
706
+ color: G.text.base,
694
707
  "& strong": { fontWeight: N.medium },
695
708
  "& a": {
696
- color: `${U.text.base} !important`,
697
- textDecorationColor: `${U.text.base} !important`,
709
+ color: `${G.text.base} !important`,
710
+ textDecorationColor: `${G.text.base} !important`,
698
711
  fontWeight: N.regular
699
712
  },
700
713
  h1: void 0,
@@ -720,28 +733,28 @@ var Se = "54px", Ce = {
720
733
  },
721
734
  button: void 0,
722
735
  caption: void 0
723
- }, Ne = (e) => ({
736
+ }, Fe = (e) => ({
724
737
  ...e,
725
738
  main: e.base,
726
739
  dark: e.hover,
727
740
  light: e.subtle,
728
741
  contrastText: e.contrast
729
- }), Pe = t({
730
- breakpoints: { values: k },
742
+ }), Ie = t({
743
+ breakpoints: { values: ce },
731
744
  palette: {
732
- ...U,
733
- primary: Ne(U.primary),
734
- secondary: Ne(U.secondary)
745
+ ...G,
746
+ primary: Fe(G.primary),
747
+ secondary: Fe(G.secondary)
735
748
  },
736
- typography: Me,
749
+ typography: Pe,
737
750
  components: {
738
- ...De,
739
- MuiIconButton: Ae,
740
- MuiFormControl: Oe,
741
- MuiFormHelperText: ke,
742
- MuiInputLabel: je
751
+ ...ke,
752
+ MuiIconButton: Me,
753
+ MuiFormControl: Ae,
754
+ MuiFormHelperText: je,
755
+ MuiInputLabel: Ne
743
756
  }
744
- }), Fe = y({
757
+ }), Le = b({
745
758
  selectDate: {
746
759
  no: "Velg dato",
747
760
  se: "Välj datum",
@@ -754,7 +767,7 @@ var Se = "54px", Ce = {
754
767
  fi: "Valitse kuukausi ja vuosi",
755
768
  es: "Seleccionar mes y año"
756
769
  }
757
- }), Ie = y({
770
+ }), Re = b({
758
771
  month: {
759
772
  no: "Måned",
760
773
  se: "Månad",
@@ -773,7 +786,7 @@ var Se = "54px", Ce = {
773
786
  fi: "Valitse näkymä",
774
787
  es: "Seleccionar vista"
775
788
  }
776
- }), Le = (e, t) => {
789
+ }), ze = (e, t) => {
777
790
  let n = {
778
791
  view: "month",
779
792
  label: t.month
@@ -783,12 +796,12 @@ var Se = "54px", Ce = {
783
796
  };
784
797
  return e === "year-month" ? [r, n] : [n, r];
785
798
  };
786
- function Re({ currentView: e, onViewChange: t, order: n = "month-year", labels: r }) {
799
+ function Be({ currentView: e, onViewChange: t, order: n = "month-year", labels: r }) {
787
800
  let i = {
788
- ...Ie(),
801
+ ...Re(),
789
802
  ...r
790
- }, a = Le(n, i);
791
- return /* @__PURE__ */ w(b, {
803
+ }, a = ze(n, i);
804
+ return /* @__PURE__ */ T(x, {
792
805
  role: "group",
793
806
  "aria-label": i.selectView,
794
807
  sx: {
@@ -801,7 +814,7 @@ function Re({ currentView: e, onViewChange: t, order: n = "month-year", labels:
801
814
  },
802
815
  children: a.map(({ view: n, label: r }) => {
803
816
  let i = n === e;
804
- return /* @__PURE__ */ w(b, {
817
+ return /* @__PURE__ */ T(x, {
805
818
  component: "button",
806
819
  type: "button",
807
820
  "aria-pressed": i,
@@ -829,15 +842,15 @@ function Re({ currentView: e, onViewChange: t, order: n = "month-year", labels:
829
842
  }
830
843
  //#endregion
831
844
  //#region src/date-picker/view-renderers.tsx
832
- var ze = (e = "month-year", t) => {
845
+ var Ve = (e = "month-year", t) => {
833
846
  let n = e === "year-month", r = (r) => {
834
- let i = S();
835
- return /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(Re, {
847
+ let i = C();
848
+ return /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(Be, {
836
849
  currentView: "month",
837
850
  onViewChange: (e) => i.setView(e),
838
851
  order: e,
839
852
  labels: t
840
- }), /* @__PURE__ */ w(oe, {
853
+ }), /* @__PURE__ */ T(O, {
841
854
  value: r.value ?? null,
842
855
  referenceDate: r.referenceDate,
843
856
  minDate: r.minDate,
@@ -851,13 +864,13 @@ var ze = (e = "month-year", t) => {
851
864
  }
852
865
  })] });
853
866
  }, i = (r) => {
854
- let i = S();
855
- return /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(Re, {
867
+ let i = C();
868
+ return /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(Be, {
856
869
  currentView: "year",
857
870
  onViewChange: (e) => i.setView(e),
858
871
  order: e,
859
872
  labels: t
860
- }), /* @__PURE__ */ w(se, {
873
+ }), /* @__PURE__ */ T(ae, {
861
874
  value: r.value ?? null,
862
875
  referenceDate: r.referenceDate,
863
876
  minDate: r.minDate,
@@ -872,27 +885,27 @@ var ze = (e = "month-year", t) => {
872
885
  })] });
873
886
  };
874
887
  return {
875
- month: (e) => /* @__PURE__ */ w(r, { ...e }),
876
- year: (e) => /* @__PURE__ */ w(i, { ...e })
888
+ month: (e) => /* @__PURE__ */ T(r, { ...e }),
889
+ year: (e) => /* @__PURE__ */ T(i, { ...e })
877
890
  };
878
- }, Be = [
891
+ }, He = [
879
892
  "year",
880
893
  "month",
881
894
  "day"
882
- ], Ve = Pe.breakpoints.up("sm"), He = { "--drawer-radius": "1.5rem" }, Ue = ["[role=\"spinbutton\"]"], We = {
895
+ ], Ue = Ie.breakpoints.up("sm"), We = { "--drawer-radius": "1.5rem" }, Ge = ["[role=\"spinbutton\"]"], Ke = {
883
896
  no: p,
884
897
  se: m,
885
898
  fi: f,
886
899
  es: d
887
- }, Ge = {
900
+ }, qe = {
888
901
  no: c,
889
902
  se: l,
890
903
  fi: s,
891
904
  es: o
892
- }, Ke = (e) => Ge[e].components.MuiLocalizationProvider.defaultProps.localeText, qe = () => /* @__PURE__ */ w(h, {
905
+ }, Je = (e) => qe[e].components.MuiLocalizationProvider.defaultProps.localeText, Ye = () => /* @__PURE__ */ T(h, {
893
906
  size: 20,
894
907
  "aria-hidden": !0
895
- }), Je = (e) => (t) => u(t, "EEEEEE", { locale: e }).toLowerCase(), Ye = {
908
+ }), Xe = (e) => (t) => u(t, "EEEEEE", { locale: e }).toLowerCase(), Ze = {
896
909
  name: "sameWidth",
897
910
  enabled: !0,
898
911
  phase: "beforeWrite",
@@ -905,40 +918,40 @@ var ze = (e = "month-year", t) => {
905
918
  e.elements.popper.style.width = `${t.offsetWidth}px`;
906
919
  }
907
920
  };
908
- function Xe({ open: e, onClose: t, children: n, slotProps: r }) {
921
+ function Qe({ open: e, onClose: t, children: n, slotProps: r }) {
909
922
  let i = (typeof r?.paper == "object" ? r.paper : void 0)?.["aria-labelledby"];
910
- return /* @__PURE__ */ w(v.Root, {
923
+ return /* @__PURE__ */ T(y.Root, {
911
924
  side: "bottom",
912
925
  open: e,
913
926
  onOpenChange: (e, n) => {
914
927
  e || t?.(n.event, n.reason === "outside-press" ? "backdropClick" : "escapeKeyDown");
915
928
  },
916
- children: /* @__PURE__ */ T(v.Portal, { children: [/* @__PURE__ */ w(v.Backdrop, {}), /* @__PURE__ */ w(v.Viewport, { children: /* @__PURE__ */ T(v.Popup, {
929
+ children: /* @__PURE__ */ E(y.Portal, { children: [/* @__PURE__ */ T(y.Backdrop, {}), /* @__PURE__ */ T(y.Viewport, { children: /* @__PURE__ */ E(y.Popup, {
917
930
  "aria-labelledby": i,
918
- style: He,
919
- children: [/* @__PURE__ */ w(v.Handle, {}), n]
931
+ style: We,
932
+ children: [/* @__PURE__ */ T(y.Handle, {}), n]
920
933
  }) })] })
921
934
  });
922
935
  }
923
- function Ze(t) {
924
- return /* @__PURE__ */ w(e, {
925
- theme: Pe,
926
- children: /* @__PURE__ */ w(Qe, { ...t })
936
+ function $e(t) {
937
+ return /* @__PURE__ */ T(e, {
938
+ theme: Ie,
939
+ children: /* @__PURE__ */ T(et, { ...t })
927
940
  });
928
941
  }
929
- function Qe({ value: e, defaultValue: t, onValueChange: o, onBlur: s, ref: c, name: l, label: u, helperText: d, error: f, disabled: p, required: m, readOnly: h, minDate: ee, maxDate: te, disablePast: g, disableFuture: _, views: v = Be, monthYearOrder: y = "month-year", format: b, referenceDate: x, open: S, onOpenChange: C, desktopModeMediaQuery: T = Ve, eyebrow: E, title: oe, viewToggleLabels: se, calendarHeaderLabels: D, className: O, style: k }) {
930
- let A = ae(), j = Fe(), M = n(T), N = We[A], P = !v.includes("day"), F = oe ?? (P ? j.selectMonthYear : j.selectDate), I = P && y === "year-month", L = b ?? (I ? "yyyy MMMM" : void 0), R = P ? ze(y, se) : void 0, z = I ? "year" : P ? "month" : void 0, B = ne(() => Je(N), [N]), V = re(null);
931
- ce(c, V, Ue);
932
- let [H, U] = ie(!1), W = S ?? H, G = (e) => {
942
+ function et({ value: e, defaultValue: t, onValueChange: o, onBlur: s, ref: c, name: l, label: u, helperText: d, error: f, disabled: p, required: m, readOnly: h, minDate: g, maxDate: ee, disablePast: te, disableFuture: _, views: y = He, monthYearOrder: b = "month-year", format: x, referenceDate: S, open: C, onOpenChange: w, desktopModeMediaQuery: E = Ue, eyebrow: D, title: O, viewToggleLabels: ae, calendarHeaderLabels: oe, className: k, style: ce }) {
943
+ let A = ie(), j = Le(), M = n(E), N = Ke[A], P = !y.includes("day"), F = O ?? (P ? j.selectMonthYear : j.selectDate), I = P && b === "year-month", L = x ?? (I ? "yyyy MMMM" : void 0), R = P ? Ve(b, ae) : void 0, z = I ? "year" : P ? "month" : void 0, B = ne(() => Xe(N), [N]), V = v(null);
944
+ se(c, V, Ge);
945
+ let [H, U] = re(!1), W = C ?? H, G = (e) => {
933
946
  W || e.currentTarget.contains(e.relatedTarget) || s?.();
934
947
  }, K = {
935
- openPickerIcon: qe,
936
- ...P ? {} : { calendarHeader: be }
948
+ openPickerIcon: Ye,
949
+ ...P ? {} : { calendarHeader: Se }
937
950
  }, q = M ? K : {
938
951
  ...K,
939
- dialog: Xe,
940
- toolbar: xe
941
- }, J = {
952
+ dialog: Qe,
953
+ toolbar: Ce
954
+ }, le = {
942
955
  openPickerButton: { sx: {
943
956
  border: "none",
944
957
  color: "text.subtle",
@@ -947,15 +960,15 @@ function Qe({ value: e, defaultValue: t, onValueChange: o, onBlur: s, ref: c, na
947
960
  color: "text.base"
948
961
  }
949
962
  } },
950
- popper: { modifiers: [Ye] },
951
- ...P ? {} : { calendarHeader: { labels: D } },
963
+ popper: { modifiers: [Ze] },
964
+ ...P ? {} : { calendarHeader: { labels: oe } },
952
965
  textField: {
953
966
  error: f,
954
967
  required: m,
955
968
  helperText: d,
956
969
  fullWidth: !0,
957
- className: O,
958
- style: k,
970
+ className: k,
971
+ style: ce,
959
972
  slotProps: { root: {
960
973
  ref: V,
961
974
  onBlur: G
@@ -965,16 +978,16 @@ function Qe({ value: e, defaultValue: t, onValueChange: o, onBlur: s, ref: c, na
965
978
  actionBar: { actions: [] },
966
979
  toolbar: {
967
980
  hidden: !1,
968
- eyebrow: E,
981
+ eyebrow: D,
969
982
  title: F
970
983
  }
971
984
  }
972
985
  };
973
- return /* @__PURE__ */ w(a, {
986
+ return /* @__PURE__ */ T(a, {
974
987
  dateAdapter: r,
975
988
  adapterLocale: N,
976
- localeText: Ke(A),
977
- children: /* @__PURE__ */ w(i, {
989
+ localeText: Je(A),
990
+ children: /* @__PURE__ */ T(i, {
978
991
  value: e,
979
992
  defaultValue: t,
980
993
  onChange: (e, t) => o?.(e, { validationError: t.validationError }),
@@ -982,31 +995,31 @@ function Qe({ value: e, defaultValue: t, onValueChange: o, onBlur: s, ref: c, na
982
995
  label: u,
983
996
  disabled: p,
984
997
  readOnly: h,
985
- minDate: ee,
986
- maxDate: te,
987
- disablePast: g,
998
+ minDate: g,
999
+ maxDate: ee,
1000
+ disablePast: te,
988
1001
  disableFuture: _,
989
- views: v,
1002
+ views: y,
990
1003
  openTo: z,
991
1004
  format: L,
992
- referenceDate: x,
1005
+ referenceDate: S,
993
1006
  viewRenderers: R,
994
1007
  dayOfWeekFormatter: B,
995
- desktopModeMediaQuery: T,
1008
+ desktopModeMediaQuery: E,
996
1009
  closeOnSelect: !0,
997
1010
  slots: q,
998
- slotProps: J,
999
- open: S,
1011
+ slotProps: le,
1012
+ open: C,
1000
1013
  onOpen: () => {
1001
- U(!0), C?.(!0);
1014
+ U(!0), w?.(!0);
1002
1015
  },
1003
1016
  onClose: () => {
1004
- U(!1), C?.(!1), s?.();
1017
+ U(!1), w?.(!1), s?.();
1005
1018
  }
1006
1019
  })
1007
1020
  });
1008
1021
  }
1009
1022
  //#endregion
1010
- export { Ze as DatePicker };
1023
+ export { $e as DatePicker };
1011
1024
 
1012
1025
  //# sourceMappingURL=date-picker.mjs.map