@midas-ds/components 17.29.0 → 17.30.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 (171) hide show
  1. package/CHANGELOG.md +16 -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 +1 -1
  6. package/calendar/index.js +1 -1
  7. package/card/index.js +1 -1
  8. package/checkbox/index.js +1 -1
  9. package/chunks/FeedbackStatusIcon-DvMDGBGL.js +36 -0
  10. package/chunks/{accordion-DIVTJU3O.js → accordion-DlVM6IKH.js} +24 -24
  11. package/chunks/{badge-BfK6XrlL.js → badge-C4bXJmhn.js} +1 -1
  12. package/chunks/{breadcrumbs-DV0ZJc62.js → breadcrumbs-BGnyY3bO.js} +1 -1
  13. package/chunks/{button-CenXTGXL.js → button-dpe6hXmI.js} +2 -2
  14. package/chunks/calendar-BnT8aqrk.js +108 -0
  15. package/chunks/card-C0S9Kyi2.js +103 -0
  16. package/chunks/checkbox-B1RWLsu9.js +106 -0
  17. package/chunks/clear-button-DWtOkhCH.js +17 -0
  18. package/chunks/clsx-DAqHMl_k.js +7 -0
  19. package/chunks/color-scheme-switch-DVyIszaD.js +160 -0
  20. package/chunks/{combobox-DIou4Z-d.js → combobox-BLAVO2ax.js} +25 -25
  21. package/chunks/{date-field-BF2f9bSf.js → date-field-D5QLfSD_.js} +5 -5
  22. package/chunks/date-picker-BWSHiwIN.js +142 -0
  23. package/chunks/{drop-zone-DH3ZyHsr.js → drop-zone-DNhEbH4w.js} +1 -1
  24. package/chunks/{field-error-LtNtEKDp.js → field-error-BHoPnRe4.js} +2 -2
  25. package/chunks/file-list-Ntos8dkG.js +139 -0
  26. package/chunks/{grid-Cn_8RSvj.js → grid-BR68fpvW.js} +1 -1
  27. package/chunks/{heading-BEl_z-5T.js → heading-DcOjYrUM.js} +1 -1
  28. package/chunks/{info-banner-osR4e6nB.js → info-banner-DXjPEG69.js} +15 -15
  29. package/chunks/label-pGlER0ro.js +50 -0
  30. package/chunks/layout-Bue2Lkbc.js +378 -0
  31. package/chunks/link-B76JDA2N.js +44 -0
  32. package/chunks/link-button-BeXxC22w.js +44 -0
  33. package/chunks/{list-box-BN_MSiOD.js → list-box-BzBJX0nP.js} +3 -3
  34. package/chunks/{logo-DyZ2pXt7.js → logo-DSJ1bUJZ.js} +1 -1
  35. package/chunks/menu-DbQ98noD.js +48 -0
  36. package/chunks/modal-C8rs1jfL.js +66 -0
  37. package/chunks/{popover-DGcogqbS.js → popover-B82BcP5n.js} +1 -1
  38. package/chunks/{progress-bar-CknF4qAm.js → progress-bar-S6GNHQRZ.js} +2 -2
  39. package/chunks/{radio-BD1EuxSa.js → radio-uAtTm38S.js} +4 -4
  40. package/chunks/search-field-Bx3JApAJ.js +91 -0
  41. package/chunks/select-CuKVJ1x9.js +177 -0
  42. package/chunks/{skeleton-B_BPRPJy.js → skeleton-R_3dS7Ro.js} +1 -1
  43. package/chunks/spinner-CIjfJeGm.js +29 -0
  44. package/chunks/{stack-LF3ExhH9.js → stack-BAHKom_Q.js} +1 -1
  45. package/chunks/table-DDTeIVh8.js +84 -0
  46. package/chunks/{tabs-Co09VWvC.js → tabs-owuRVJ3N.js} +1 -1
  47. package/chunks/tag-BEawJnJm.js +78 -0
  48. package/chunks/{text-DwmZ-ew8.js → text-DnvD4Cjc.js} +1 -1
  49. package/chunks/textfield-G6u6RJD5.js +113 -0
  50. package/chunks/{time-field-CmjGBQph.js → time-field-Mm1iDLzS.js} +6 -6
  51. package/chunks/{toast-gJgjitZF.js → toast-DZuvVRD_.js} +21 -21
  52. package/chunks/{toggle-button-CIvsOXQf.js → toggle-button-DD_bXanH.js} +1 -1
  53. package/chunks/{tooltip-BkesIUIF.js → tooltip-1GBTeMrm.js} +1 -1
  54. package/clear-button/index.js +1 -1
  55. package/color-scheme-switch/index.js +1 -1
  56. package/combobox/index.js +1 -1
  57. package/date-field/index.js +1 -1
  58. package/date-picker/index.js +1 -1
  59. package/drop-zone/index.js +1 -1
  60. package/field-error/index.js +1 -1
  61. package/file-list/index.js +1 -1
  62. package/grid/index.js +1 -1
  63. package/heading/index.js +1 -1
  64. package/index.js +52 -50
  65. package/info-banner/index.js +1 -1
  66. package/label/index.js +1 -1
  67. package/layout/Layout.d.ts +1 -2
  68. package/layout/context/LayoutContext.d.ts +7 -1
  69. package/layout/index.js +1 -1
  70. package/link/index.js +1 -1
  71. package/link-button/index.js +1 -1
  72. package/list-box/index.js +1 -1
  73. package/logo/index.js +1 -1
  74. package/menu/index.js +1 -1
  75. package/modal/index.js +1 -1
  76. package/package.json +4 -2
  77. package/popover/index.js +1 -1
  78. package/progress-bar/index.js +1 -1
  79. package/radio/index.js +1 -1
  80. package/search-field/index.js +1 -1
  81. package/select/index.js +1 -1
  82. package/skeleton/index.js +1 -1
  83. package/spinner/index.js +1 -1
  84. package/stack/index.js +1 -1
  85. package/table/index.js +1 -1
  86. package/tabs/index.js +1 -1
  87. package/tag/index.js +1 -1
  88. package/text/index.js +1 -1
  89. package/textfield/index.js +1 -1
  90. package/time-field/index.js +1 -1
  91. package/toast/index.js +1 -1
  92. package/toggle-button/index.js +1 -1
  93. package/tooltip/index.js +1 -1
  94. package/accordion/Accordion.stories.d.ts +0 -23
  95. package/accordion/AccordionItem.stories.d.ts +0 -25
  96. package/badge/Badge.stories.d.ts +0 -17
  97. package/breadcrumbs/Breadcrumbs.stories.d.ts +0 -25
  98. package/button/Button.stories.d.ts +0 -25
  99. package/button/ButtonGroup.stories.d.ts +0 -15
  100. package/calendar/Calendar.stories.d.ts +0 -17
  101. package/calendar/RangeCalendar.stories.d.ts +0 -15
  102. package/card/Card.stories.d.ts +0 -19
  103. package/checkbox/Checkbox.stories.d.ts +0 -30
  104. package/checkbox/CheckboxGroup.stories.d.ts +0 -31
  105. package/chunks/FeedbackStatusIcon-DRI7WrSU.js +0 -54
  106. package/chunks/arrow-right-Db_H9KjE.js +0 -10
  107. package/chunks/calendar-Bl_obez5.js +0 -111
  108. package/chunks/card-zIYA-SQh.js +0 -103
  109. package/chunks/check-DV00NPU0.js +0 -7
  110. package/chunks/checkbox-Bqd8B58G.js +0 -110
  111. package/chunks/chevron-down-CP7nEDei.js +0 -7
  112. package/chunks/chevron-right-DwqboCdU.js +0 -7
  113. package/chunks/clear-button-D3I1X3yG.js +0 -17
  114. package/chunks/clsx-Di52oYUU.js +0 -23
  115. package/chunks/color-scheme-switch-DVZjdwc9.js +0 -203
  116. package/chunks/createLucideIcon-BgluSHFG.js +0 -39
  117. package/chunks/date-picker-DZivTUB_.js +0 -187
  118. package/chunks/file-list-B4vG_egr.js +0 -161
  119. package/chunks/info-jCyacVsy.js +0 -19
  120. package/chunks/label-LWlgvAwz.js +0 -50
  121. package/chunks/layout-Db5um0f7.js +0 -426
  122. package/chunks/link-BAgs4RwY.js +0 -59
  123. package/chunks/link-button-BuPMEGUj.js +0 -52
  124. package/chunks/menu-aT2IR0tO.js +0 -49
  125. package/chunks/modal-C-UsxdO0.js +0 -66
  126. package/chunks/search-field-GNTRFpzf.js +0 -100
  127. package/chunks/select-oLCNpryY.js +0 -177
  128. package/chunks/spinner-LdHPVms_.js +0 -32
  129. package/chunks/square-arrow-out-up-right-DkgXD7hj.js +0 -17
  130. package/chunks/table-CmNWoAYO.js +0 -150
  131. package/chunks/tag-BIcqtf7b.js +0 -78
  132. package/chunks/textfield-BSvCsAyC.js +0 -112
  133. package/chunks/x-BJAOO5a5.js +0 -10
  134. package/color-scheme-switch/ColorSchemeSwitch.stories.d.ts +0 -7
  135. package/color-scheme-switch/ColorSchemeSwitchMenu.stories.d.ts +0 -8
  136. package/combobox/ComboBox.stories.d.ts +0 -43
  137. package/date-field/DateField.stories.d.ts +0 -15
  138. package/date-picker/DatePicker.stories.d.ts +0 -17
  139. package/date-picker/DateRangePicker.stories.d.ts +0 -39
  140. package/drop-zone/DropZone.stories.d.ts +0 -16
  141. package/file-list/FileList.stories.d.ts +0 -31
  142. package/grid/Grid.stories.d.ts +0 -28
  143. package/heading/Heading.stories.d.ts +0 -30
  144. package/info-banner/InfoBanner.stories.d.ts +0 -16
  145. package/label/Label.stories.d.ts +0 -10
  146. package/layout/Layout.stories.d.ts +0 -9
  147. package/link/Link.stories.d.ts +0 -14
  148. package/link-button/LinkButton.stories.d.ts +0 -13
  149. package/list-box/ListBox.stories.d.ts +0 -24
  150. package/logo/Logo.stories.d.ts +0 -7
  151. package/menu/Menu.stories.d.ts +0 -35
  152. package/modal/Modal.stories.d.ts +0 -15
  153. package/popover/Popover.stories.d.ts +0 -18
  154. package/progress-bar/ProgressBar.stories.d.ts +0 -18
  155. package/radio/Radio.stories.d.ts +0 -110
  156. package/radio/RadioGroup.stories.d.ts +0 -27
  157. package/search-field/SearchField.stories.d.ts +0 -34
  158. package/select/Select.stories.d.ts +0 -53
  159. package/skeleton/Skeleton.Form.stories.d.ts +0 -20
  160. package/skeleton/Skeleton.stories.d.ts +0 -10
  161. package/spinner/Spinner.stories.d.ts +0 -20
  162. package/stack/Stack.stories.d.ts +0 -24
  163. package/table/Table.stories.d.ts +0 -39
  164. package/tabs/Tabs.stories.d.ts +0 -31
  165. package/tag/Tag.stories.d.ts +0 -17
  166. package/text/Text.stories.d.ts +0 -10
  167. package/textfield/TextArea.stories.d.ts +0 -365
  168. package/textfield/TextField.stories.d.ts +0 -39
  169. package/time-field/TimeField.stories.d.ts +0 -37
  170. package/toast/Toast.stories.d.ts +0 -24
  171. package/tooltip/Tooltip.stories.d.ts +0 -26
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 17.30.1 (2026-10-09)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **components,layout,table-styles:** declare public type packages ([#1406](https://github.com/migrationsverket/midas/pull/1406))
6
+
7
+ ## 17.30.0 (2026-10-09)
8
+
9
+ ### 🚀 Features
10
+
11
+ - **components,layout,table-styles:** depend on lucide-react ([#1405](https://github.com/migrationsverket/midas/pull/1405))
12
+
13
+ ### 🧱 Updated Dependencies
14
+
15
+ - Updated theme to 3.17.7
16
+
1
17
  ## 17.29.0 (2026-10-09)
2
18
 
3
19
  ### 🚀 Features
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/accordion-DIVTJU3O.js";
1
+ import { n as e, t } from "../chunks/accordion-DlVM6IKH.js";
2
2
  export { e as Accordion, t as AccordionItem };
package/badge/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/badge-BfK6XrlL.js";
1
+ import { n as e, t } from "../chunks/badge-C4bXJmhn.js";
2
2
  export { e as Badge, t as BadgeContainer };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/breadcrumbs-DV0ZJc62.js";
1
+ import { n as e, t } from "../chunks/breadcrumbs-BGnyY3bO.js";
2
2
  export { t as Breadcrumb, e as Breadcrumbs };
package/button/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/button-CenXTGXL.js";
1
+ import { n as e, t } from "../chunks/button-dpe6hXmI.js";
2
2
  export { e as Button, t as ButtonGroup };
package/calendar/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/calendar-Bl_obez5.js";
1
+ import { n as e, t } from "../chunks/calendar-BnT8aqrk.js";
2
2
  export { e as Calendar, t as RangeCalendar };
package/card/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../chunks/card-zIYA-SQh.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../chunks/card-C0S9Kyi2.js";
2
2
  export { o as Card, n as CardActionArea, e as CardActions, i as CardBody, a as CardContent, c as CardHeader, s as CardImage, t as CardLink, r as CardTitle };
package/checkbox/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "../chunks/checkbox-Bqd8B58G.js";
1
+ import { i as e, n as t, r as n, t as r } from "../chunks/checkbox-B1RWLsu9.js";
2
2
  export { t as Checkbox, n as CheckboxButton, e as CheckboxField, r as CheckboxGroup };
@@ -0,0 +1,36 @@
1
+ import { t as e } from "./useLocalizedStringFormatter-CeyBc0x0.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { Check as n, Flag as r, Info as i, TriangleAlert as a } from "lucide-react";
4
+ var o = {
5
+ en: {
6
+ ok: "okay",
7
+ information: "information",
8
+ importantInformation: "important information",
9
+ warning: "warning"
10
+ },
11
+ sv: {
12
+ ok: "okej",
13
+ information: "information",
14
+ importantInformation: "viktig information",
15
+ warning: "varning"
16
+ }
17
+ }, s = {
18
+ success: n,
19
+ info: i,
20
+ important: r,
21
+ warning: a
22
+ }, c = {
23
+ success: "ok",
24
+ info: "information",
25
+ important: "importantInformation",
26
+ warning: "warning"
27
+ }, l = ({ status: n, "aria-label": r, size: i = 20, ...a }) => {
28
+ let l = e(o), u = s[n];
29
+ return /* @__PURE__ */ t(u, {
30
+ "aria-label": r || l.format(c[n]),
31
+ size: i,
32
+ ...a
33
+ });
34
+ };
35
+ //#endregion
36
+ export { l as t };
@@ -1,22 +1,22 @@
1
1
  'use client';
2
- import { t as e } from "./clsx-Di52oYUU.js";
3
- import { t } from "./chevron-down-CP7nEDei.js";
4
- import { t as n } from "./FeedbackStatusIcon-DRI7WrSU.js";
5
- import { n as r } from "./button-CenXTGXL.js";
6
- import { t as i } from "./heading-BEl_z-5T.js";
7
- import { createContext as a, useContext as o, useEffect as s } from "react";
8
- import { Disclosure as c, DisclosureGroup as l, DisclosurePanel as u, composeRenderProps as d } from "react-aria-components";
9
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
2
+ import { t as e } from "./clsx-DAqHMl_k.js";
3
+ import { n as t } from "./button-dpe6hXmI.js";
4
+ import { t as n } from "./heading-DcOjYrUM.js";
5
+ import { t as r } from "./FeedbackStatusIcon-DvMDGBGL.js";
6
+ import { createContext as i, useContext as a, useEffect as o } from "react";
7
+ import { Disclosure as s, DisclosureGroup as c, DisclosurePanel as l, composeRenderProps as u } from "react-aria-components";
8
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
9
+ import { ChevronDown as m } from "lucide-react";
10
10
  import '../assets/accordion.css';var h = {
11
11
  root: "_root_17bdp_1",
12
12
  contained: "_contained_17bdp_5",
13
13
  triggerButton: "_triggerButton_17bdp_12"
14
- }, g = a(void 0), _ = ({ children: t, className: n, isContained: r, size: i = "large", ...a }) => /* @__PURE__ */ p(g.Provider, {
14
+ }, g = i(void 0), _ = ({ children: t, className: n, isContained: r, size: i = "large", ...a }) => /* @__PURE__ */ f(g.Provider, {
15
15
  value: {
16
16
  isContained: r,
17
17
  size: i
18
18
  },
19
- children: /* @__PURE__ */ p(l, {
19
+ children: /* @__PURE__ */ f(c, {
20
20
  className: e(h.root, r ? h.contained : h.uncontained, n),
21
21
  ...a,
22
22
  children: t
@@ -40,45 +40,45 @@ import '../assets/accordion.css';var h = {
40
40
  content: "_content_1ghre_133",
41
41
  hasBackground: "_hasBackground_1ghre_138",
42
42
  header: "_header_1ghre_146"
43
- }, y = ({ title: a, children: l, className: h, headingLevel: _ = "h2", type: y, hasBackground: b = !0, size: x = "large", isContained: S, iconAriaLabel: C, ...w }) => {
44
- let T = o(g), E = S ?? T?.isContained ?? !1, D = typeof a == "object";
45
- return s(() => {
43
+ }, y = ({ title: i, children: c, className: h, headingLevel: _ = "h2", type: y, hasBackground: b = !0, size: x = "large", isContained: S, iconAriaLabel: C, ...w }) => {
44
+ let T = a(g), E = S ?? T?.isContained ?? !1, D = typeof i == "object";
45
+ return o(() => {
46
46
  y && !E && console.warn("AccordionItem: When 'type' is set, it is recommended to also set 'isContained' to true for visual consistency.");
47
- }, [y, E]), /* @__PURE__ */ p(c, {
47
+ }, [y, E]), /* @__PURE__ */ f(s, {
48
48
  ...w,
49
49
  className: e(v.item, y && E && v[y], (x === "medium" || T?.size === "medium") && v.medium, E && v.contained, h),
50
- children: d(l, (o) => /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
50
+ children: u(c, (a) => /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
51
51
  className: v.trigger,
52
- children: /* @__PURE__ */ m(r, {
52
+ children: /* @__PURE__ */ p(t, {
53
53
  className: v.triggerButton,
54
54
  slot: "trigger",
55
55
  variant: "icon",
56
56
  children: [
57
- /* @__PURE__ */ p(t, {
57
+ /* @__PURE__ */ f(m, {
58
58
  size: 20,
59
59
  className: v.chevronIcon
60
60
  }),
61
- /* @__PURE__ */ p("div", {
61
+ /* @__PURE__ */ f("div", {
62
62
  className: v.triggerMainContent,
63
- children: D ? a : /* @__PURE__ */ p(i, {
63
+ children: D ? i : /* @__PURE__ */ f(n, {
64
64
  level: 3,
65
65
  elementType: _,
66
66
  className: v.triggerText,
67
- children: a
67
+ children: i
68
68
  })
69
69
  }),
70
- y && E && /* @__PURE__ */ p(n, {
70
+ y && E && /* @__PURE__ */ f(r, {
71
71
  "aria-label": C,
72
72
  className: v.statusIcon,
73
73
  status: y
74
74
  })
75
75
  ]
76
76
  })
77
- }), /* @__PURE__ */ p(u, {
77
+ }), /* @__PURE__ */ f(l, {
78
78
  className: v.panel,
79
- children: /* @__PURE__ */ p("div", {
79
+ children: /* @__PURE__ */ f("div", {
80
80
  className: e(v.content, b && v.hasBackground),
81
- children: o
81
+ children: a
82
82
  })
83
83
  })] }))
84
84
  });
@@ -1,4 +1,4 @@
1
- import { t as e } from "./clsx-Di52oYUU.js";
1
+ import { t as e } from "./clsx-DAqHMl_k.js";
2
2
  import * as t from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  import '../assets/badge.css';var r = {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./clsx-Di52oYUU.js";
1
+ import { t as e } from "./clsx-DAqHMl_k.js";
2
2
  import { Breadcrumb as t, Breadcrumbs as n } from "react-aria-components";
3
3
  import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
4
4
  import '../assets/breadcrumbs.css';var o = {
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { t as e } from "./clsx-Di52oYUU.js";
3
- import { t } from "./spinner-LdHPVms_.js";
2
+ import { t as e } from "./clsx-DAqHMl_k.js";
3
+ import { t } from "./spinner-CIjfJeGm.js";
4
4
  import { t as n } from "./Button.module-0C2ArlRs.js";
5
5
  import { forwardRef as r } from "react";
6
6
  import { Button as i, ButtonContext as a, composeRenderProps as o, useContextProps as s } from "react-aria-components";
@@ -0,0 +1,108 @@
1
+ import { t as e } from "./clsx-DAqHMl_k.js";
2
+ import { n as t } from "./button-dpe6hXmI.js";
3
+ import { t as n } from "./heading-DcOjYrUM.js";
4
+ import { t as r } from "./field-error-BHoPnRe4.js";
5
+ import { n as i } from "./select-CuKVJ1x9.js";
6
+ import { a, c as o, o as s } from "./list-box-BzBJX0nP.js";
7
+ import * as c from "react";
8
+ import { clsx as l } from "clsx";
9
+ import { Calendar as u, CalendarCell as d, CalendarGrid as f, CalendarMonthPicker as p, CalendarYearPicker as m, RangeCalendar as h, RangeCalendarContext as g, Select as _ } from "react-aria-components";
10
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
11
+ import { ChevronLeft as b, ChevronRight as x } from "lucide-react";
12
+ import '../assets/calendar.css';var S = {
13
+ container: "_container_mn6zv_1",
14
+ calendar: "_calendar_mn6zv_6",
15
+ day: "_day_mn6zv_28",
16
+ header: "_header_mn6zv_90",
17
+ pickers: "_pickers_mn6zv_130",
18
+ range: "_range_mn6zv_180"
19
+ }, C = ({ weekdayStyle: t = "short", isReadOnly: n }) => {
20
+ let r = !!c.useContext(g);
21
+ return /* @__PURE__ */ v(f, {
22
+ weekdayStyle: t,
23
+ children: (t) => /* @__PURE__ */ v(d, {
24
+ date: t,
25
+ className: e(S.day, r && S.range),
26
+ "data-readonly": n || void 0
27
+ })
28
+ });
29
+ }, w = ({ isDisabled: e, isReadOnly: t, items: n, ...r }) => /* @__PURE__ */ y(_, {
30
+ isDisabled: e,
31
+ "data-readonly": t || void 0,
32
+ ...r,
33
+ children: [/* @__PURE__ */ v(i, {
34
+ size: "small",
35
+ isDisabled: e
36
+ }), /* @__PURE__ */ v(a, { children: /* @__PURE__ */ v(o, {
37
+ items: n,
38
+ virtualized: !1,
39
+ size: "small",
40
+ children: (e) => /* @__PURE__ */ v(s, {
41
+ id: e.id,
42
+ textValue: e.formatted,
43
+ children: e.formatted
44
+ })
45
+ }) })]
46
+ }), T = ({ isDisabled: e, isReadOnly: r, showMonthYearPicker: i }) => {
47
+ let a = (t) => /* @__PURE__ */ v(w, {
48
+ ...t,
49
+ isDisabled: e,
50
+ isReadOnly: r
51
+ });
52
+ return /* @__PURE__ */ y("header", {
53
+ className: S.header,
54
+ children: [
55
+ /* @__PURE__ */ v(t, {
56
+ slot: "previous",
57
+ size: "medium",
58
+ "data-readonly": r || void 0,
59
+ children: /* @__PURE__ */ v(b, { size: 20 })
60
+ }),
61
+ i ? /* @__PURE__ */ y("div", {
62
+ className: S.pickers,
63
+ children: [/* @__PURE__ */ v(p, { children: a }), /* @__PURE__ */ v(m, { children: a })]
64
+ }) : /* @__PURE__ */ v(n, {
65
+ level: 3,
66
+ elementType: "h2",
67
+ "data-disabled": e || void 0
68
+ }),
69
+ /* @__PURE__ */ v(t, {
70
+ slot: "next",
71
+ size: "medium",
72
+ "data-readonly": r || void 0,
73
+ children: /* @__PURE__ */ v(x, { size: 20 })
74
+ })
75
+ ]
76
+ });
77
+ }, E = ({ className: e, errorMessage: t, showMonthYearPicker: n, ...i }) => /* @__PURE__ */ y("div", {
78
+ className: S.container,
79
+ children: [/* @__PURE__ */ y(u, {
80
+ className: l(S.calendar, e),
81
+ "data-readonly": i.isReadOnly || void 0,
82
+ ...i,
83
+ children: [/* @__PURE__ */ v(T, {
84
+ ...i,
85
+ showMonthYearPicker: n
86
+ }), /* @__PURE__ */ v(C, { ...i })]
87
+ }), /* @__PURE__ */ v(r, {
88
+ isInvalid: i.isInvalid,
89
+ children: t
90
+ })]
91
+ }), D = ({ className: e, errorMessage: t, showMonthYearPicker: n, commitBehavior: i, ...a }) => /* @__PURE__ */ y("div", {
92
+ className: S.container,
93
+ children: [/* @__PURE__ */ y(h, {
94
+ className: l(S.calendar, e),
95
+ "data-readonly": a.isReadOnly || void 0,
96
+ commitBehavior: i ?? (n ? "reset" : void 0),
97
+ ...a,
98
+ children: [/* @__PURE__ */ v(T, {
99
+ ...a,
100
+ showMonthYearPicker: n
101
+ }), /* @__PURE__ */ v(C, { ...a })]
102
+ }), /* @__PURE__ */ v(r, {
103
+ isInvalid: a.isInvalid,
104
+ children: t
105
+ })]
106
+ });
107
+ //#endregion
108
+ export { E as n, D as t };
@@ -0,0 +1,103 @@
1
+ import { t as e } from "./clsx-DAqHMl_k.js";
2
+ import { t } from "./heading-DcOjYrUM.js";
3
+ import { t as n } from "./text-DnvD4Cjc.js";
4
+ import * as r from "react";
5
+ import { Button as i, Link as a } from "react-aria-components";
6
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
+ import { ArrowRight as c } from "lucide-react";
8
+ import '../assets/card.css';var l = {
9
+ card: "_card_yandx_1",
10
+ horizontal: "_horizontal_yandx_26",
11
+ cardLink: "_cardLink_yandx_31",
12
+ cardContent: "_cardContent_yandx_42",
13
+ cardActions: "_cardActions_yandx_61",
14
+ deprecated: "_deprecated_yandx_75",
15
+ cardActionArea: "_cardActionArea_yandx_81",
16
+ cardImage: "_cardImage_yandx_114",
17
+ cardLinkIcon: "_cardLinkIcon_yandx_146"
18
+ }, u = r.createContext({
19
+ horizontal: void 0,
20
+ titleId: void 0
21
+ }), d = r.createContext(void 0), f = ({ horizontal: t, className: n, children: i, ...a }) => {
22
+ let s = `card-title-${r.useId()}`;
23
+ return /* @__PURE__ */ o(u.Provider, {
24
+ value: {
25
+ horizontal: t,
26
+ titleId: s
27
+ },
28
+ children: /* @__PURE__ */ o("div", {
29
+ ...a,
30
+ className: e(l.card, t && l.horizontal, n),
31
+ children: i
32
+ })
33
+ });
34
+ }, p = ({ children: t, ...n }) => {
35
+ let { horizontal: i } = r.useContext(u);
36
+ return /* @__PURE__ */ o(d.Provider, {
37
+ value: {},
38
+ children: /* @__PURE__ */ o("div", {
39
+ ...n,
40
+ className: e(l.cardContent, i && l.horizontal),
41
+ children: t
42
+ })
43
+ });
44
+ }, m = ({ elementType: n = "h2", children: i, className: a, ...s }) => {
45
+ let { horizontal: c, titleId: d } = r.useContext(u);
46
+ return /* @__PURE__ */ o(t, {
47
+ level: 3,
48
+ elementType: n,
49
+ className: e(a, l.cardTitle, c && l.horizontal),
50
+ id: d,
51
+ ...s,
52
+ children: i
53
+ });
54
+ }, h = ({ children: t, ...n }) => {
55
+ let { horizontal: i } = r.useContext(u), a = !!r.useContext(d);
56
+ return /* @__PURE__ */ o("div", {
57
+ ...n,
58
+ className: e(l.cardActions, i && l.horizontal, a && l.deprecated),
59
+ children: t
60
+ });
61
+ }, g = ({ children: t, className: n, ...a }) => {
62
+ let { titleId: s } = r.useContext(u);
63
+ return /* @__PURE__ */ o(i, {
64
+ ...a,
65
+ "aria-labelledby": s,
66
+ className: e(l.cardActionArea, n),
67
+ children: t
68
+ });
69
+ }, _ = ({ as: t = "img", className: n, ...r }) => /* @__PURE__ */ o(t, {
70
+ ...r,
71
+ "data-card-image": !0,
72
+ className: e(l.cardImage, n)
73
+ }), v = ({ children: t, as: n, ...r }) => /* @__PURE__ */ s(n || a, {
74
+ ...r,
75
+ className: e(l.cardLink, r.className),
76
+ children: [t, /* @__PURE__ */ o(c, {
77
+ className: l.cardLinkIcon,
78
+ size: 24
79
+ })]
80
+ }), y = { cardBody: "_cardBody_337uy_1" }, b = ({ className: t, ...n }) => /* @__PURE__ */ o("div", {
81
+ className: e(t, y.cardBody),
82
+ ...n
83
+ }), x = {
84
+ cardHeader: "_cardHeader_1625c_1",
85
+ textContainer: "_textContainer_1625c_14",
86
+ subHeading: "_subHeading_1625c_20"
87
+ }, S = ({ children: t, className: r, heading: i, headingLevel: a, subHeading: c, ...l }) => /* @__PURE__ */ s("div", {
88
+ className: e(r, x.cardHeader),
89
+ ...l,
90
+ children: [/* @__PURE__ */ s("div", {
91
+ className: x.textContainer,
92
+ children: [/* @__PURE__ */ o(m, {
93
+ elementType: a,
94
+ children: i
95
+ }), c && /* @__PURE__ */ o(n, {
96
+ slot: "description",
97
+ className: x.subHeading,
98
+ children: c
99
+ })]
100
+ }), t]
101
+ });
102
+ //#endregion
103
+ export { h as a, v as c, g as i, m as l, b as n, p as o, f as r, _ as s, S as t };
@@ -0,0 +1,106 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-DAqHMl_k.js";
3
+ import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
4
+ import { n, t as r } from "./label-pGlER0ro.js";
5
+ import { t as i } from "./text-DnvD4Cjc.js";
6
+ import { t as a } from "./field-error-BHoPnRe4.js";
7
+ import { t as o } from "./splitDataAttributes-_JTFOOIb.js";
8
+ import * as s from "react";
9
+ import { forwardRef as c, useContext as l } from "react";
10
+ import { CheckboxButton as u, CheckboxField as d, CheckboxGroup as f, CheckboxGroupStateContext as p, composeRenderProps as m } from "react-aria-components";
11
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
12
+ import { Check as v, Minus as y } from "lucide-react";
13
+ import { variables as b } from "@midas-ds/theme";
14
+ import '../assets/checkbox.css';var x = {
15
+ indicator: "_indicator_3jfn4_1",
16
+ checkboxButton: "_checkboxButton_3jfn4_27",
17
+ checkboxField: "_checkboxField_3jfn4_144",
18
+ checkboxGroup: "_checkboxGroup_3jfn4_155",
19
+ checkboxList: "_checkboxList_3jfn4_166"
20
+ }, S = ({ className: t, ...n }) => /* @__PURE__ */ g(d, {
21
+ className: e(x.checkboxField, t),
22
+ ...n
23
+ }), C = c(({ className: t, ...n }, r) => /* @__PURE__ */ g(u, {
24
+ className: e(x.checkboxButton, t),
25
+ ref: r,
26
+ ...n
27
+ })), w = c(({ className: e, description: t, errorMessage: n, errorPosition: r = "top", children: s, ...c }, l) => {
28
+ let [u, d] = o(c);
29
+ return /* @__PURE__ */ _(S, {
30
+ ...d,
31
+ children: [
32
+ t && /* @__PURE__ */ g(i, {
33
+ slot: "description",
34
+ children: t
35
+ }),
36
+ r === "top" && /* @__PURE__ */ g(a, { children: n }),
37
+ /* @__PURE__ */ g(C, {
38
+ ...u,
39
+ ref: l,
40
+ className: e,
41
+ children: ({ isIndeterminate: e }) => /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
42
+ className: x.indicator,
43
+ children: g(e ? y : v, {
44
+ size: 14,
45
+ color: b.iconOnColor
46
+ })
47
+ }), s] })
48
+ }),
49
+ r === "bottom" && /* @__PURE__ */ g(a, { children: n })
50
+ ]
51
+ });
52
+ });
53
+ w.displayName = "Checkbox";
54
+ //#endregion
55
+ //#region src/checkbox/useSelectAll.ts
56
+ var T = (e, t) => {
57
+ let n = t?.value ?? [], r = s.Children.toArray(e).filter((e) => s.isValidElement(e) && e.type === w), i = r.filter((e) => !e.props.isDisabled).map((e) => e.props.value || ""), a = r.filter((e) => e.props.isDisabled).map((e) => e.props.value || "").filter((e) => n.includes(e)), o = n.filter((e) => i.includes(e)).length, c = o === 0, l = o === i.length;
58
+ return {
59
+ allSelected: l,
60
+ someSelected: !c && !l,
61
+ checkboxValues: i,
62
+ disabledSelectedValues: a
63
+ };
64
+ }, E = {
65
+ en: { selectAll: "Select all" },
66
+ sv: { selectAll: "Välj alla" }
67
+ }, D = ({ checkboxes: e, label: n }) => {
68
+ let r = l(p), i = t(E), { allSelected: a, someSelected: o, checkboxValues: s, disabledSelectedValues: c } = T(e, r);
69
+ return /* @__PURE__ */ g(p.Provider, {
70
+ value: null,
71
+ children: /* @__PURE__ */ g(w, {
72
+ isSelected: a,
73
+ isIndeterminate: o,
74
+ isReadOnly: r?.isReadOnly,
75
+ isDisabled: r?.isDisabled,
76
+ onChange: (e) => {
77
+ r?.setValue(e ? [...s, ...c] : c);
78
+ },
79
+ children: n || i.format("selectAll")
80
+ })
81
+ });
82
+ }, O = ({ label: t, description: o, errorMessage: s, errorPosition: c = "top", popover: l, showSelectAll: u, selectAllLabel: d, className: p, children: v, ...y }) => /* @__PURE__ */ g(f, {
83
+ ...y,
84
+ className: e(x.checkboxGroup, p),
85
+ children: m(v, (e) => /* @__PURE__ */ _(h, { children: [
86
+ /* @__PURE__ */ g(n, {
87
+ popover: l,
88
+ children: t && /* @__PURE__ */ g(r, { children: t })
89
+ }),
90
+ o && /* @__PURE__ */ g(i, {
91
+ slot: "description",
92
+ children: o
93
+ }),
94
+ c === "top" && s && /* @__PURE__ */ g(a, { children: s }),
95
+ /* @__PURE__ */ _("div", {
96
+ className: x.checkboxList,
97
+ children: [u && /* @__PURE__ */ g(D, {
98
+ label: d,
99
+ checkboxes: e
100
+ }), e]
101
+ }),
102
+ c === "bottom" && s && /* @__PURE__ */ g(a, { children: s })
103
+ ] }))
104
+ });
105
+ //#endregion
106
+ export { S as i, w as n, C as r, O as t };
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { n as e } from "./button-dpe6hXmI.js";
3
+ import "react";
4
+ import { jsx as t } from "react/jsx-runtime";
5
+ import { X as n } from "lucide-react";
6
+ //#region src/clear-button/ClearButton.tsx
7
+ var r = (r) => /* @__PURE__ */ t(e, {
8
+ variant: "icon",
9
+ slot: null,
10
+ ...r,
11
+ children: /* @__PURE__ */ t(n, {
12
+ size: 20,
13
+ "aria-hidden": !0
14
+ })
15
+ });
16
+ //#endregion
17
+ export { r as t };
@@ -0,0 +1,7 @@
1
+ import { clsx as e } from "clsx";
2
+ //#region src/utils/clsx.ts
3
+ function t(...t) {
4
+ return t.some((e) => typeof e == "function") ? (n) => e(t.map((e) => typeof e == "function" ? e(n) : e)) : e(t);
5
+ }
6
+ //#endregion
7
+ export { t };