@midas-ds/components 15.4.0 → 15.4.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.
Files changed (135) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/accordion/index.js +1 -1
  3. package/badge/index.js +1 -1
  4. package/breadcrumbs/index.js +1 -1
  5. package/button/index.js +2 -2
  6. package/calendar/index.js +1 -1
  7. package/card/index.js +1 -1
  8. package/character-counter/index.js +1 -1
  9. package/checkbox/index.js +2 -2
  10. package/chunks/{AccordionItem-BCoomT4-.js → AccordionItem-69q6FXXl.js} +37 -37
  11. package/chunks/{BadgeContainer-BJAC-kV0.js → BadgeContainer-CKVsfTlF.js} +1 -1
  12. package/chunks/Breadcrumbs-By2bMbQd.js +28 -0
  13. package/chunks/Button-BMf7mX0N.js +46 -0
  14. package/chunks/{ButtonGroup-B6mr4JGY.js → ButtonGroup-Dr6HOBo2.js} +1 -1
  15. package/chunks/Card-ia98VoKL.js +130 -0
  16. package/chunks/CharacterCounter-DeuE2det.js +21 -0
  17. package/chunks/Checkbox-ClhO-AzB.js +122 -0
  18. package/chunks/CheckboxGroup-C3FOm8N8.js +84 -0
  19. package/chunks/{ColorSchemeSwitch-Cd6VSXql.js → ColorSchemeSwitch-DugvPh6T.js} +17 -17
  20. package/chunks/ComboBox-BqRZMi8W.js +108 -0
  21. package/chunks/DateField-12KSJHls.js +46 -0
  22. package/chunks/DateInputDivider-CkTB5q5k.js +36 -0
  23. package/chunks/DateRangePicker-BLRFvUp0.js +117 -0
  24. package/chunks/Dialog-C-X_qUR6.js +66 -0
  25. package/chunks/Dropdown-D7HQo9eM.js +79 -0
  26. package/chunks/FieldError-C0HRIcAx.js +23 -0
  27. package/chunks/FileUpload-h1PxqQmb.js +16 -0
  28. package/chunks/{Grid-DeB7TdcZ.js → Grid-B-WgMwON.js} +2 -2
  29. package/chunks/{GridItem-B_3FFhPs.js → GridItem-5t1Z14sM.js} +1 -1
  30. package/chunks/Heading-D8tNNJkt.js +38 -0
  31. package/chunks/{InfoBanner-Bw3rjGtB.js → InfoBanner-Cc3GhryE.js} +3 -3
  32. package/chunks/Label-D6WuwdAj.js +73 -0
  33. package/chunks/{Layout-InD0Hl7F.js → Layout-DGCDkyf3.js} +70 -70
  34. package/chunks/Link-yTNUNv3C.js +54 -0
  35. package/chunks/LinkButton-3nAekUJ4.js +63 -0
  36. package/chunks/{ListBox-CKDglhFH.js → ListBox-D4tO_OrO.js} +18 -18
  37. package/chunks/ListBoxLoadMoreItem-Bo0eLhpt.js +41 -0
  38. package/chunks/ListBoxSection-DKHba2X0.js +49 -0
  39. package/chunks/{Logo-D80UDT1x.js → Logo-InDSslpO.js} +2 -2
  40. package/chunks/Popover-BAdqdN6C.js +38 -0
  41. package/chunks/ProgressBar-zeJLxHVL.js +53 -0
  42. package/chunks/Radio-kvQP7E9s.js +43 -0
  43. package/chunks/RangeCalendar-CnquULdq.js +99 -0
  44. package/chunks/{SearchField-Dr3DAs9W.js → SearchField-B6ygRRL4.js} +39 -39
  45. package/chunks/Select-Cm5VZRTx.js +576 -0
  46. package/chunks/{Select-fDRXxmLm.js → Select-qmCuJm2x.js} +48 -46
  47. package/chunks/Separator-BcnQEA9f.js +76 -0
  48. package/chunks/{Skeleton-Bcg_xgAx.js → Skeleton-DqIHQLQl.js} +1 -1
  49. package/chunks/Spinner-Pll5zpx8.js +48 -0
  50. package/chunks/TabList-D2XV5ixe.js +81 -0
  51. package/chunks/Table-B1rlSIhS.js +139 -0
  52. package/chunks/Tag-Ca8wKXOy.js +53 -0
  53. package/chunks/{Text-WP6RbnnK.js → Text-TWzJxnto.js} +9 -9
  54. package/chunks/TextArea-UU7gFMEb.js +124 -0
  55. package/chunks/Toast-Cm2Zqq-F.js +162 -0
  56. package/chunks/ToggleButtonGroup-CXKTrLbb.js +29 -0
  57. package/chunks/Tooltip-CtstfI8u.js +46 -0
  58. package/chunks/clsx-AexbMWKp.js +24 -0
  59. package/chunks/useLocalizedStringFormatter-ZgRJmvHC.js +25 -0
  60. package/color-scheme-switch/index.js +1 -1
  61. package/combobox/index.js +1 -1
  62. package/date-field/index.js +2 -2
  63. package/date-picker/index.js +1 -1
  64. package/dropdown/index.js +1 -1
  65. package/field-error/index.js +1 -1
  66. package/file-upload/index.js +1 -1
  67. package/grid/index.js +2 -2
  68. package/heading/index.js +1 -1
  69. package/index.js +68 -68
  70. package/info-banner/index.js +1 -1
  71. package/label/index.js +1 -1
  72. package/layout/index.js +1 -1
  73. package/legacy-select/index.js +1 -1
  74. package/link/index.js +3 -3
  75. package/link-button/index.js +3 -3
  76. package/list-box/index.js +3 -3
  77. package/logo/index.js +1 -1
  78. package/menu/index.js +5 -5
  79. package/modal/index.js +2 -2
  80. package/package.json +2 -3
  81. package/popover/index.js +1 -1
  82. package/progress-bar/index.js +1 -1
  83. package/radio/index.js +1 -1
  84. package/search-field/index.js +1 -1
  85. package/select/index.js +1 -1
  86. package/skeleton/index.js +1 -1
  87. package/spinner/index.js +1 -1
  88. package/table/index.js +1 -1
  89. package/tabs/index.js +1 -1
  90. package/tag/index.js +1 -1
  91. package/text/index.js +1 -1
  92. package/textfield/index.js +1 -1
  93. package/toast/index.js +1 -1
  94. package/toggle-button/index.js +1 -1
  95. package/tooltip/index.js +1 -1
  96. package/chunks/Breadcrumbs-CnuqEeOL.js +0 -28
  97. package/chunks/Button-CHs1wv7n.js +0 -46
  98. package/chunks/Card-D58EJCcV.js +0 -130
  99. package/chunks/CharacterCounter-CzCvDmNP.js +0 -21
  100. package/chunks/Checkbox-CogzFDe3.js +0 -119
  101. package/chunks/CheckboxGroup-BLx25gqn.js +0 -83
  102. package/chunks/ComboBox-8YAwADqL.js +0 -108
  103. package/chunks/DateField-CpbYROK1.js +0 -46
  104. package/chunks/DateInputDivider-C43xP4is.js +0 -36
  105. package/chunks/DateRangePicker-CICkmtXG.js +0 -116
  106. package/chunks/Dialog-DBn9L3SP.js +0 -66
  107. package/chunks/Dropdown-Cctv2Qpv.js +0 -79
  108. package/chunks/FieldError-CZKAYQ-n.js +0 -23
  109. package/chunks/FileUpload-DILt4rAn.js +0 -16
  110. package/chunks/Heading-DIw3iLMN.js +0 -38
  111. package/chunks/Label-CKe9pgXT.js +0 -73
  112. package/chunks/Link-C3w5O2wT.js +0 -54
  113. package/chunks/LinkButton-D6X0Dvoz.js +0 -63
  114. package/chunks/ListBoxLoadMoreItem-y9pCuqRe.js +0 -41
  115. package/chunks/ListBoxSection-CvtRigQb.js +0 -49
  116. package/chunks/Popover-DktRiuCr.js +0 -38
  117. package/chunks/ProgressBar-Bjxi5TgY.js +0 -53
  118. package/chunks/Radio-DqFFcFra.js +0 -43
  119. package/chunks/RangeCalendar-CIxwICEf.js +0 -99
  120. package/chunks/Select-BSqv5Qi-.js +0 -566
  121. package/chunks/Separator-Cw1vlSYO.js +0 -76
  122. package/chunks/Spinner-B2EAm49Z.js +0 -48
  123. package/chunks/TabList-BIBQcX2n.js +0 -81
  124. package/chunks/Table-Cy-R3Ma8.js +0 -139
  125. package/chunks/Tag-BZnq1_yZ.js +0 -53
  126. package/chunks/TextArea-3fPkKmNx.js +0 -124
  127. package/chunks/Toast-CP_V12b3.js +0 -161
  128. package/chunks/ToggleButtonGroup-CgNeypuW.js +0 -29
  129. package/chunks/Tooltip-C53p0sfk.js +0 -46
  130. package/chunks/clsx-CuNqTHjr.js +0 -11
  131. package/chunks/internationalized-C9snpc7V.js +0 -1955
  132. package/chunks/react-aria-components-mIKW9wOa.js +0 -22645
  133. package/chunks/react-stately-DRNKkAB0.js +0 -2586
  134. package/chunks/useLocalizedStringFormatter-CPwiI7nv.js +0 -25
  135. package/chunks/variables-BkqZ2WGF.js +0 -5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 15.4.1 (2025-12-10)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **components:** externalize dependecies ([5e95894058](https://github.com/migrationsverket/midas/commit/5e95894058))
6
+
1
7
  ## 15.4.0 (2025-12-08)
2
8
 
3
9
  ### 🚀 Features
@@ -1,4 +1,4 @@
1
- import { a as r, A as a } from "../chunks/AccordionItem-BCoomT4-.js";
1
+ import { a as r, A as a } from "../chunks/AccordionItem-69q6FXXl.js";
2
2
  export {
3
3
  r as Accordion,
4
4
  a as AccordionItem
package/badge/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as o, a as r } from "../chunks/BadgeContainer-BJAC-kV0.js";
1
+ import { B as o, a as r } from "../chunks/BadgeContainer-CKVsfTlF.js";
2
2
  export {
3
3
  o as Badge,
4
4
  r as BadgeContainer
@@ -1,4 +1,4 @@
1
- import { B as e } from "../chunks/Breadcrumbs-CnuqEeOL.js";
1
+ import { B as e } from "../chunks/Breadcrumbs-By2bMbQd.js";
2
2
  export {
3
3
  e as Breadcrumbs
4
4
  };
package/button/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B as r } from "../chunks/Button-CHs1wv7n.js";
2
- import { B as p } from "../chunks/ButtonGroup-B6mr4JGY.js";
1
+ import { B as r } from "../chunks/Button-BMf7mX0N.js";
2
+ import { B as p } from "../chunks/ButtonGroup-Dr6HOBo2.js";
3
3
  export {
4
4
  r as Button,
5
5
  p as ButtonGroup
package/calendar/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as r, R as n } from "../chunks/RangeCalendar-CIxwICEf.js";
1
+ import { C as r, R as n } from "../chunks/RangeCalendar-CnquULdq.js";
2
2
  export {
3
3
  r as Calendar,
4
4
  n as RangeCalendar
package/card/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C, d, c as s, a as e, e as t, f as n, b as o } from "../chunks/Card-D58EJCcV.js";
1
+ import { C, d, c as s, a as e, e as t, f as n, b as o } from "../chunks/Card-ia98VoKL.js";
2
2
  export {
3
3
  C as Card,
4
4
  d as CardActionArea,
@@ -1,4 +1,4 @@
1
- import { C as e } from "../chunks/CharacterCounter-CzCvDmNP.js";
1
+ import { C as e } from "../chunks/CharacterCounter-DeuE2det.js";
2
2
  export {
3
3
  e as CharacterCounter
4
4
  };
package/checkbox/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as e } from "../chunks/Checkbox-CogzFDe3.js";
2
- import { C } from "../chunks/CheckboxGroup-BLx25gqn.js";
1
+ import { C as e } from "../chunks/Checkbox-ClhO-AzB.js";
2
+ import { C } from "../chunks/CheckboxGroup-C3FOm8N8.js";
3
3
  export {
4
4
  e as Checkbox,
5
5
  C as CheckboxGroup
@@ -1,15 +1,15 @@
1
- import { jsx as n, jsxs as l } from "react/jsx-runtime";
2
- import { c as _ } from "./clsx-CuNqTHjr.js";
3
- import { a6 as v, a7 as I, a8 as N } from "./react-aria-components-mIKW9wOa.js";
1
+ import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
+ import { c as d } from "./clsx-AexbMWKp.js";
3
+ import { DisclosureGroup as I, Disclosure as x, DisclosurePanel as N } from "react-aria-components";
4
4
  import { i as B } from "./icon-map-Ckc-nEUA.js";
5
- import { createContext as $, useContext as b, useEffect as w } from "react";
6
- import { B as A } from "./Button-CHs1wv7n.js";
7
- import { H as M } from "./Heading-DIw3iLMN.js";
8
- import { C as T } from "./chevron-down-DgT-uSF9.js";
9
- import '../assets/AccordionItem.css';const k = "_root_17bdp_1", j = "_contained_17bdp_5", d = {
10
- root: k,
5
+ import { createContext as w, useContext as A, useEffect as M } from "react";
6
+ import { B as T } from "./Button-BMf7mX0N.js";
7
+ import { H as k } from "./Heading-D8tNNJkt.js";
8
+ import { C as D } from "./chevron-down-DgT-uSF9.js";
9
+ import '../assets/AccordionItem.css';const b = "_root_17bdp_1", j = "_contained_17bdp_5", _ = {
10
+ root: b,
11
11
  contained: j
12
- }, u = $(void 0), oe = ({
12
+ }, f = w(void 0), oe = ({
13
13
  variant: o,
14
14
  children: c,
15
15
  className: r,
@@ -18,32 +18,32 @@ import '../assets/AccordionItem.css';const k = "_root_17bdp_1", j = "_contained_
18
18
  ...a
19
19
  }) => {
20
20
  const s = i || o === "contained";
21
- return /* @__PURE__ */ n(u.Provider, { value: { isContained: s, size: t }, children: /* @__PURE__ */ n(
22
- v,
21
+ return /* @__PURE__ */ n(f.Provider, { value: { isContained: s, size: t }, children: /* @__PURE__ */ n(
22
+ I,
23
23
  {
24
- className: _(
25
- d.root,
26
- s ? d.contained : d.uncontained,
24
+ className: d(
25
+ _.root,
26
+ s ? _.contained : _.uncontained,
27
27
  r
28
28
  ),
29
29
  ...a,
30
30
  children: c
31
31
  }
32
32
  ) });
33
- }, z = "_item_1em4f_1", H = "_contained_1em4f_18", y = "_medium_1em4f_28", D = "_success_1em4f_33", E = "_warning_1em4f_39", P = "_info_1em4f_45", R = "_important_1em4f_51", S = "_triggerButton_1em4f_62", W = "_triggerText_1em4f_66", q = "_trigger_1em4f_62", F = "_triggerMainContent_1em4f_77", G = "_chevronIcon_1em4f_94", J = "_statusIcon_1em4f_100", K = "_panel_1em4f_122", L = "_content_1em4f_130", O = "_hasBackground_1em4f_135", Q = "_header_1em4f_139", e = {
33
+ }, z = "_item_1em4f_1", H = "_contained_1em4f_18", P = "_medium_1em4f_28", y = "_success_1em4f_33", E = "_warning_1em4f_39", G = "_info_1em4f_45", R = "_important_1em4f_51", S = "_triggerButton_1em4f_62", W = "_triggerText_1em4f_66", $ = "_trigger_1em4f_62", q = "_triggerMainContent_1em4f_77", F = "_chevronIcon_1em4f_94", J = "_statusIcon_1em4f_100", K = "_panel_1em4f_122", L = "_content_1em4f_130", O = "_hasBackground_1em4f_135", Q = "_header_1em4f_139", e = {
34
34
  item: z,
35
35
  contained: H,
36
- medium: y,
37
- success: D,
36
+ medium: P,
37
+ success: y,
38
38
  warning: E,
39
- info: P,
39
+ info: G,
40
40
  important: R,
41
41
  triggerButton: S,
42
42
  triggerText: W,
43
- trigger: q,
44
- triggerMainContent: F,
43
+ trigger: $,
44
+ triggerMainContent: q,
45
45
  " ": "_ _1em4f_1",
46
- chevronIcon: G,
46
+ chevronIcon: F,
47
47
  statusIcon: J,
48
48
  panel: K,
49
49
  content: L,
@@ -60,47 +60,47 @@ import '../assets/AccordionItem.css';const k = "_root_17bdp_1", j = "_contained_
60
60
  isContained: h,
61
61
  ...p
62
62
  }) => {
63
- const f = b(u), m = h ?? f?.isContained ?? !1, x = typeof o == "object";
64
- w(() => {
63
+ const g = A(f), m = h ?? g?.isContained ?? !1, C = typeof o == "object";
64
+ M(() => {
65
65
  t && !m && console.warn(
66
66
  "AccordionItem: When 'type' is set, it is recommended to also set 'isContained' to true for visual consistency."
67
67
  );
68
68
  }, [t, m]);
69
- const g = t ? B[t] : null, C = g ? /* @__PURE__ */ n(
70
- g,
69
+ const l = t ? B[t] : null, v = l ? /* @__PURE__ */ n(
70
+ l,
71
71
  {
72
72
  size: 20,
73
73
  className: e.statusIcon
74
74
  }
75
75
  ) : null;
76
- return /* @__PURE__ */ l(
77
- I,
76
+ return /* @__PURE__ */ u(
77
+ x,
78
78
  {
79
79
  ...p,
80
- className: _(
80
+ className: d(
81
81
  e.item,
82
82
  t && e[t],
83
- (s === "medium" || f?.size === "medium") && e.medium,
83
+ (s === "medium" || g?.size === "medium") && e.medium,
84
84
  m && e.contained,
85
85
  r
86
86
  ),
87
87
  children: [
88
- /* @__PURE__ */ n("div", { className: e.trigger, children: /* @__PURE__ */ l(
89
- A,
88
+ /* @__PURE__ */ n("div", { className: e.trigger, children: /* @__PURE__ */ u(
89
+ T,
90
90
  {
91
91
  className: e.triggerButton,
92
92
  slot: "trigger",
93
93
  variant: "icon",
94
94
  children: [
95
95
  /* @__PURE__ */ n(
96
- T,
96
+ D,
97
97
  {
98
98
  size: 20,
99
99
  className: e.chevronIcon
100
100
  }
101
101
  ),
102
- /* @__PURE__ */ n("div", { className: e.triggerMainContent, children: x ? o : /* @__PURE__ */ n(
103
- M,
102
+ /* @__PURE__ */ n("div", { className: e.triggerMainContent, children: C ? o : /* @__PURE__ */ n(
103
+ k,
104
104
  {
105
105
  level: 3,
106
106
  elementType: i,
@@ -108,14 +108,14 @@ import '../assets/AccordionItem.css';const k = "_root_17bdp_1", j = "_contained_
108
108
  children: o
109
109
  }
110
110
  ) }),
111
- C
111
+ v
112
112
  ]
113
113
  }
114
114
  ) }),
115
115
  /* @__PURE__ */ n(N, { className: e.panel, children: /* @__PURE__ */ n(
116
116
  "div",
117
117
  {
118
- className: _(
118
+ className: d(
119
119
  e.content,
120
120
  a && e.hasBackground
121
121
  ),
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { c as t } from "./clsx-CuNqTHjr.js";
3
+ import { c as t } from "./clsx-AexbMWKp.js";
4
4
  import '../assets/BadgeContainer.css';const d = "_badge_6i93e_1", c = "_hasChildren_6i93e_10", C = "_badgeContainer_6i93e_19", s = {
5
5
  badge: d,
6
6
  hasChildren: c,
@@ -0,0 +1,28 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Breadcrumbs as t, Breadcrumb as i } from "react-aria-components";
3
+ import { c as d } from "./clsx-AexbMWKp.js";
4
+ import { L as p } from "./Link-yTNUNv3C.js";
5
+ import '../assets/Breadcrumbs.css';const l = "_container_1k7pu_1", u = {
6
+ container: l
7
+ }, h = ({
8
+ items: c,
9
+ className: a,
10
+ ...s
11
+ }) => /* @__PURE__ */ r(
12
+ t,
13
+ {
14
+ className: d(u.container, a),
15
+ ...s,
16
+ children: c.map(({ title: o, href: e, isDisabled: n }, m) => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(
17
+ p,
18
+ {
19
+ href: e,
20
+ isDisabled: n,
21
+ children: o
22
+ }
23
+ ) }, o.toLocaleLowerCase() + m))
24
+ }
25
+ );
26
+ export {
27
+ h as B
28
+ };
@@ -0,0 +1,46 @@
1
+ import { jsx as e, jsxs as c, Fragment as l } from "react/jsx-runtime";
2
+ import { B as r } from "./Button.module-Cm0H98vy.js";
3
+ import { Button as u } from "react-aria-components";
4
+ import { c as p } from "./clsx-AexbMWKp.js";
5
+ import { S as g } from "./Spinner-Pll5zpx8.js";
6
+ const S = ({
7
+ variant: i = "primary",
8
+ fullwidth: o,
9
+ className: m,
10
+ iconPlacement: s,
11
+ size: d = "large",
12
+ icon: n,
13
+ iconSize: a,
14
+ ...t
15
+ }) => /* @__PURE__ */ e(
16
+ u,
17
+ {
18
+ className: p(
19
+ r.button,
20
+ i === "primary" && r.primary,
21
+ i === "secondary" && r.secondary,
22
+ i === "tertiary" && r.tertiary,
23
+ i === "danger" && r.danger,
24
+ i === "icon" && r.iconBtn,
25
+ o && r.fullwidth,
26
+ d === "medium" && r.medium,
27
+ s === "right" && r.iconRight,
28
+ m
29
+ ),
30
+ ...t,
31
+ children: /* @__PURE__ */ c(l, { children: [
32
+ n && !t.isPending && /* @__PURE__ */ e(
33
+ n,
34
+ {
35
+ "aria-hidden": !0,
36
+ size: a ?? 20
37
+ }
38
+ ),
39
+ t.isPending && /* @__PURE__ */ e(g, { small: !0 }),
40
+ t.children
41
+ ] })
42
+ }
43
+ );
44
+ export {
45
+ S as B
46
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { c as a } from "./clsx-CuNqTHjr.js";
2
+ import { c as a } from "./clsx-AexbMWKp.js";
3
3
  import '../assets/ButtonGroup.css';const n = "_buttonGroup_o1hqg_1", p = {
4
4
  buttonGroup: n
5
5
  }, b = ({
@@ -0,0 +1,130 @@
1
+ import { jsx as r, jsxs as l } from "react/jsx-runtime";
2
+ import { c } from "./clsx-AexbMWKp.js";
3
+ import * as i from "react";
4
+ import { H as m } from "./Heading-D8tNNJkt.js";
5
+ import { Button as _, Link as C } from "react-aria-components";
6
+ import { A as x } from "./arrow-right-DNeP8Eqv.js";
7
+ import '../assets/Card.css';const A = "_card_1x9yi_1", h = "_horizontal_1x9yi_11", u = "_cardLink_1x9yi_16", I = "_cardContent_1x9yi_21", z = "_cardActions_1x9yi_40", k = "_cardActionArea_1x9yi_50", p = "_cardImage_1x9yi_83", y = "_cardLinkIcon_1x9yi_115", n = {
8
+ card: A,
9
+ horizontal: h,
10
+ cardLink: u,
11
+ cardContent: I,
12
+ cardActions: z,
13
+ cardActionArea: k,
14
+ cardImage: p,
15
+ cardLinkIcon: y
16
+ }, e = i.createContext({
17
+ horizontal: void 0,
18
+ titleId: void 0
19
+ }), j = ({
20
+ horizontal: a,
21
+ className: o,
22
+ children: t,
23
+ ...s
24
+ }) => {
25
+ const d = `card-title-${i.useId()}`;
26
+ return /* @__PURE__ */ r(e.Provider, { value: { horizontal: a, titleId: d }, children: /* @__PURE__ */ r(
27
+ "div",
28
+ {
29
+ ...s,
30
+ className: c(
31
+ n.card,
32
+ a && n.horizontal,
33
+ o
34
+ ),
35
+ children: t
36
+ }
37
+ ) });
38
+ }, H = ({
39
+ children: a,
40
+ ...o
41
+ }) => {
42
+ const { horizontal: t } = i.useContext(e);
43
+ return /* @__PURE__ */ r(
44
+ "div",
45
+ {
46
+ ...o,
47
+ className: c(n.cardContent, t && n.horizontal),
48
+ children: a
49
+ }
50
+ );
51
+ }, R = ({
52
+ elementType: a = "h2",
53
+ children: o
54
+ }) => {
55
+ const { horizontal: t, titleId: s } = i.useContext(e);
56
+ return /* @__PURE__ */ r(
57
+ m,
58
+ {
59
+ level: t ? 5 : 3,
60
+ elementType: a,
61
+ isExpressive: t,
62
+ className: c(n.cardTitle, t && n.horizontal),
63
+ id: s,
64
+ children: o
65
+ }
66
+ );
67
+ }, T = ({
68
+ children: a,
69
+ ...o
70
+ }) => {
71
+ const { horizontal: t } = i.useContext(e);
72
+ return /* @__PURE__ */ r(
73
+ "div",
74
+ {
75
+ ...o,
76
+ className: c(n.cardActions, t && n.horizontal),
77
+ children: a
78
+ }
79
+ );
80
+ }, w = ({ children: a, className: o, ...t }) => {
81
+ const { titleId: s } = i.useContext(e);
82
+ return /* @__PURE__ */ r(
83
+ _,
84
+ {
85
+ ...t,
86
+ "aria-labelledby": s,
87
+ className: c(n.cardActionArea, o),
88
+ children: a
89
+ }
90
+ );
91
+ }, B = ({
92
+ as: a = "img",
93
+ className: o,
94
+ ...t
95
+ }) => /* @__PURE__ */ r(
96
+ a,
97
+ {
98
+ ...t,
99
+ className: c(n.cardImage, o)
100
+ }
101
+ ), E = ({
102
+ children: a,
103
+ as: o,
104
+ ...t
105
+ }) => /* @__PURE__ */ l(
106
+ o || C,
107
+ {
108
+ ...t,
109
+ className: c(n.cardLink, t.className),
110
+ children: [
111
+ a,
112
+ /* @__PURE__ */ r(
113
+ x,
114
+ {
115
+ className: n.cardLinkIcon,
116
+ size: 24
117
+ }
118
+ )
119
+ ]
120
+ }
121
+ );
122
+ export {
123
+ j as C,
124
+ H as a,
125
+ R as b,
126
+ T as c,
127
+ w as d,
128
+ B as e,
129
+ E as f
130
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { useContextProps as d, InputContext as h } from "react-aria-components";
4
+ import '../assets/CharacterCounter.css';const m = "_characterCounter_1f0mh_1", u = {
5
+ characterCounter: m
6
+ }, f = i.forwardRef((t, a) => {
7
+ [t] = d(t, a, h);
8
+ const { maxLength: e, value: n, isLonely: c } = t, { length: r } = n?.toString() ?? "", o = e !== void 0;
9
+ return /* @__PURE__ */ s(
10
+ "span",
11
+ {
12
+ className: u.characterCounter,
13
+ "data-exceeded": o && r > e || void 0,
14
+ "data-lonely": c || void 0,
15
+ children: o ? `${r} / ${e}` : r
16
+ }
17
+ );
18
+ });
19
+ export {
20
+ f as C
21
+ };
@@ -0,0 +1,122 @@
1
+ import { jsxs as v, jsx as t } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import f from "react";
4
+ import { mergeProps as u, VisuallyHidden as k, useCheckboxGroupItem as C, useCheckbox as R, useHover as _, usePress as I, useFocusRing as P } from "react-aria";
5
+ import { useContextProps as g, CheckboxContext as G, useSlottedContext as y, FormContext as w } from "react-aria-components";
6
+ import { a as h } from "./clsx-AexbMWKp.js";
7
+ import { variables as m } from "@midas-ds/theme";
8
+ import { c as B } from "./createLucideIcon-D4r5Phnh.js";
9
+ import { C as F } from "./check-BxlvVsvD.js";
10
+ import { useToggleState as L } from "@react-stately/toggle";
11
+ import '../assets/Checkbox.css';const N = [["path", { d: "M5 12h14", key: "1ays0h" }]], S = B("minus", N), D = f.createContext(null), H = "_checkboxInner_19c98_1", O = "_checkbox_19c98_1", j = "_checkboxGroup_19c98_143", q = "_checkboxList_19c98_154", x = {
12
+ checkboxInner: H,
13
+ checkbox: O,
14
+ checkboxGroup: j,
15
+ checkboxList: q
16
+ }, b = i.forwardRef((e, o) => {
17
+ const { hoverProps: c, isHovered: s } = e.hoverResult, { pressProps: n, isPressed: a } = e.pressResult, { isFocused: r, isFocusVisible: d, focusProps: l } = e.focusRingAria;
18
+ return /* @__PURE__ */ v(
19
+ "label",
20
+ {
21
+ ref: o,
22
+ ...u(c, n, e.labelProps),
23
+ slot: e.slot || void 0,
24
+ className: h(x.checkbox, e.className),
25
+ "data-hovered": s || void 0,
26
+ "data-selected": e.isSelected || void 0,
27
+ "data-indeterminate": e.isIndeterminate || void 0,
28
+ "data-pressed": a || void 0,
29
+ "data-disabled": e.isDisabled || void 0,
30
+ "data-readonly": e.isReadOnly || void 0,
31
+ "data-invalid": e.isInvalid || void 0,
32
+ "data-focused": r || void 0,
33
+ "data-focus-visible": d || void 0,
34
+ "data-required": e.isRequired || void 0,
35
+ children: [
36
+ /* @__PURE__ */ t("div", { className: h(x.checkboxInner), children: e.isIndeterminate ? /* @__PURE__ */ t(
37
+ S,
38
+ {
39
+ size: 14,
40
+ color: m.iconOnColor
41
+ }
42
+ ) : /* @__PURE__ */ t(
43
+ F,
44
+ {
45
+ size: 14,
46
+ color: m.iconOnColor
47
+ }
48
+ ) }),
49
+ /* @__PURE__ */ t(k, { children: /* @__PURE__ */ t(
50
+ "input",
51
+ {
52
+ ...u(e.inputProps, l),
53
+ ref: e.inputRef
54
+ }
55
+ ) }),
56
+ e.children
57
+ ]
58
+ }
59
+ );
60
+ }), z = i.forwardRef((e, o) => {
61
+ const c = C(
62
+ {
63
+ ...e,
64
+ value: e.value || ""
65
+ },
66
+ e.state,
67
+ e.inputRef
68
+ );
69
+ return /* @__PURE__ */ t(
70
+ b,
71
+ {
72
+ ...e,
73
+ ...c,
74
+ ref: o
75
+ }
76
+ );
77
+ }), A = i.forwardRef((e, o) => {
78
+ const c = R(e, L(e), e.inputRef);
79
+ return /* @__PURE__ */ t(
80
+ b,
81
+ {
82
+ ...e,
83
+ ...c,
84
+ ref: o
85
+ }
86
+ );
87
+ }), X = i.forwardRef(
88
+ (e, o) => {
89
+ [e, o] = g(e, o, G);
90
+ const c = y(w), s = e.validationBehavior ?? c?.validationBehavior ?? "native", n = i.useContext(D), a = i.useRef(null), r = _(e), d = I({
91
+ ref: o,
92
+ isDisabled: e.isDisabled
93
+ }), l = P();
94
+ return n ? /* @__PURE__ */ t(
95
+ z,
96
+ {
97
+ ...e,
98
+ state: n,
99
+ inputRef: a,
100
+ hoverResult: r,
101
+ pressResult: d,
102
+ focusRingAria: l,
103
+ validationBehavior: s
104
+ }
105
+ ) : /* @__PURE__ */ t(
106
+ A,
107
+ {
108
+ ...e,
109
+ inputRef: a,
110
+ hoverResult: r,
111
+ pressResult: d,
112
+ focusRingAria: l,
113
+ validationBehavior: s
114
+ }
115
+ );
116
+ }
117
+ );
118
+ export {
119
+ X as C,
120
+ D as a,
121
+ x as s
122
+ };
@@ -0,0 +1,84 @@
1
+ import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
+ import { useCheckboxGroup as C } from "react-aria";
3
+ import { useCheckboxGroupState as v } from "react-stately";
4
+ import { a as k, L as S } from "./Label-D6WuwdAj.js";
5
+ import { T as y } from "./Text-TWzJxnto.js";
6
+ import * as r from "react";
7
+ import { C as d, s as u, a as g } from "./Checkbox-ClhO-AzB.js";
8
+ import { FieldErrorContext as A } from "react-aria-components";
9
+ import { F as P } from "./FieldError-C0HRIcAx.js";
10
+ import { u as V } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
11
+ const F = (e, { value: t }) => {
12
+ const a = r.Children.toArray(e).filter(
13
+ (l) => r.isValidElement(l) && l.type === d
14
+ ), c = r.Children.count(a), n = r.Children.toArray(e).filter((l) => r.isValidElement(l)).filter((l) => !!l && l.type === d).map((l) => l.props.value), s = t.length === 0, i = t.length === c;
15
+ return {
16
+ allSelected: i,
17
+ someSelected: !s && !i,
18
+ checkboxValues: n
19
+ };
20
+ }, b = ({ state: e, errorMessage: t }) => /* @__PURE__ */ o(A.Provider, { value: e.displayValidation, children: /* @__PURE__ */ o(P, { children: t }) }), G = { selectAll: "Select all" }, L = { selectAll: "Välj alla" }, E = {
21
+ en: G,
22
+ sv: L
23
+ };
24
+ function W(e) {
25
+ const t = v(e), a = V(E), { groupProps: c, labelProps: n, descriptionProps: s } = C(
26
+ e,
27
+ t
28
+ ), { allSelected: i, someSelected: m, checkboxValues: l } = F(
29
+ e.children,
30
+ t
31
+ ), x = (f) => {
32
+ t.setValue(f ? l : []);
33
+ };
34
+ return /* @__PURE__ */ h(
35
+ "div",
36
+ {
37
+ ...c,
38
+ className: u.checkboxGroup,
39
+ "data-readonly": e.isReadOnly || void 0,
40
+ "data-disabled": e.isDisabled || void 0,
41
+ children: [
42
+ /* @__PURE__ */ o(k, { popover: e.popover, children: e.label && /* @__PURE__ */ o(S, { ...n, children: e.label }) }),
43
+ e.description && /* @__PURE__ */ o(
44
+ y,
45
+ {
46
+ slot: "description",
47
+ ...s,
48
+ children: e.description
49
+ }
50
+ ),
51
+ e.errorPosition === "top" && /* @__PURE__ */ o(
52
+ b,
53
+ {
54
+ ...e,
55
+ state: t
56
+ }
57
+ ),
58
+ /* @__PURE__ */ h("div", { className: u.checkboxList, children: [
59
+ e.showSelectAll && /* @__PURE__ */ o(
60
+ d,
61
+ {
62
+ isSelected: i,
63
+ isIndeterminate: m,
64
+ isReadOnly: e.isReadOnly,
65
+ onChange: x,
66
+ children: e.selectAllLabel || a.format("selectAll")
67
+ }
68
+ ),
69
+ /* @__PURE__ */ o(g.Provider, { value: t, children: e.children })
70
+ ] }),
71
+ e.errorPosition === "bottom" && /* @__PURE__ */ o(
72
+ b,
73
+ {
74
+ ...e,
75
+ state: t
76
+ }
77
+ )
78
+ ]
79
+ }
80
+ );
81
+ }
82
+ export {
83
+ W as C
84
+ };