@midas-ds/components 17.9.0 → 17.10.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,38 @@
1
+ ## 17.10.1 (2026-03-24)
2
+
3
+ ### 🏭 Refactoring
4
+
5
+ - **components, layout:** remove es2022 array method ([c75c7ace5d](https://github.com/migrationsverket/midas/commit/c75c7ace5d))
6
+
7
+ ## 17.10.0 (2026-03-19)
8
+
9
+ ### 🚀 Features
10
+
11
+ - **components,file-list:** localize delete button aria-label ([30410e821d](https://github.com/migrationsverket/midas/commit/30410e821d))
12
+ - **components,docs:** add FileList component ([dae5f056c2](https://github.com/migrationsverket/midas/commit/dae5f056c2))
13
+ - **components,color-scheme-switch:** deprecate defaultValue in favor of defaultScheme ([1c48d0b7f1](https://github.com/migrationsverket/midas/commit/1c48d0b7f1))
14
+
15
+ ### 🩹 Fixes
16
+
17
+ - **components,file-list:** remove id prop from FileListItem ([688bb0b04a](https://github.com/migrationsverket/midas/commit/688bb0b04a))
18
+ - **components,file-list:** don't forward id to li element ([214378b006](https://github.com/migrationsverket/midas/commit/214378b006))
19
+ - **components,file-list:** correct font size and weight tokens for file name and size ([0ae7b21451](https://github.com/migrationsverket/midas/commit/0ae7b21451))
20
+ - **components,color-scheme-switch:** show focus ring on selected button ([b112b5f823](https://github.com/migrationsverket/midas/commit/b112b5f823))
21
+
22
+ ### 🏭 Refactoring
23
+
24
+ - **components,docs,file-list:** replace GridList with plain list ([6046308cb3](https://github.com/migrationsverket/midas/commit/6046308cb3))
25
+
26
+ ### 🔧 Maintenance
27
+
28
+ - **components,docs,file-list:** remove leftover id props from docs, spec and playground ([4439e37443](https://github.com/migrationsverket/midas/commit/4439e37443))
29
+ - **components,file-list:** remove id prop from stories ([0fb0bba495](https://github.com/migrationsverket/midas/commit/0fb0bba495))
30
+ - **components,file-list:** fix trailing blank line in css ([39b8525728](https://github.com/migrationsverket/midas/commit/39b8525728))
31
+ - **components,file-list:** fix empty interface lint error ([405d702ee9](https://github.com/migrationsverket/midas/commit/405d702ee9))
32
+ - **components,file-list:** fix lint errors ([d175b49ea4](https://github.com/migrationsverket/midas/commit/d175b49ea4))
33
+ - **components,color-scheme-switch:** fix button sizing and selected state styles ([fe5b1dc132](https://github.com/migrationsverket/midas/commit/fe5b1dc132))
34
+ - **components,color-scheme-switch:** replace hardcoded padding with space token ([3f29552fe2](https://github.com/migrationsverket/midas/commit/3f29552fe2))
35
+
1
36
  ## 17.9.0 (2026-03-19)
2
37
 
3
38
  ### 🚀 Features
@@ -1 +1 @@
1
- ._button_1dy1i_1{padding:.685rem}
1
+ ._button_1r8vq_1{padding:calc(var(--midas-space-60) - 1px);position:relative}._button_1r8vq_1[data-selected]:not([data-focus-visible]){box-shadow:none}._button_1r8vq_1[data-focus-visible]{box-shadow:var(--midas-state-focus)}._selectionIndicator_1r8vq_14{background-color:var(--midas-border-color-tertiary);bottom:0;height:2px;left:0;position:absolute;right:0;transition:translate var(--midas-transition-duration-fast) ease}
@@ -0,0 +1 @@
1
+ ._fileList_1jd3b_1{display:flex;flex-direction:column;gap:var(--midas-space-small);list-style:none;margin:0;padding:0}._fileListItem_1jd3b_10{align-items:center;background-color:var(--midas-layer-01-base);box-sizing:border-box;display:flex;font-family:var(--midas-typography-font-family);height:var(--midas-size-control);padding-inline-start:var(--midas-space-medium)}._fileInfo_1jd3b_20{align-items:baseline;display:flex;flex:1;gap:var(--midas-space-small);min-width:0}._fileName_1jd3b_28{color:var(--midas-text-primary);font-size:var(--midas-typography-font-size-30);font-weight:var(--midas-typography-weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._fileSize_1jd3b_37{color:var(--midas-text-secondary);flex-shrink:0;font-size:var(--midas-typography-font-size-30)}._deleteButton_1jd3b_43{color:var(--midas-icon-primary);flex-shrink:0}
@@ -0,0 +1,113 @@
1
+ 'use client';
2
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
3
+ import * as h from "react";
4
+ import { VisuallyHidden as r } from "react-aria";
5
+ import { SelectionIndicator as l } from "react-aria-components";
6
+ import { a as k, T as i } from "./ToggleButtonGroup-DRnEEi5-.js";
7
+ import { c as d } from "./createLucideIcon-CP-mMPfa.js";
8
+ import { u as f } from "./useLocalizedStringFormatter-BHvsRxDk.js";
9
+ import '../assets/ColorSchemeSwitch.css';const M = [
10
+ [
11
+ "path",
12
+ {
13
+ d: "M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",
14
+ key: "1pdavp"
15
+ }
16
+ ],
17
+ ["path", { d: "M20.054 15.987H3.946", key: "14rxg9" }]
18
+ ], S = d("laptop", M);
19
+ const _ = [
20
+ [
21
+ "path",
22
+ {
23
+ d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
24
+ key: "kfwtm"
25
+ }
26
+ ]
27
+ ], N = d("moon", _);
28
+ const v = [
29
+ ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
30
+ ["path", { d: "M12 2v2", key: "tus03m" }],
31
+ ["path", { d: "M12 20v2", key: "1lh1kg" }],
32
+ ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
33
+ ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
34
+ ["path", { d: "M2 12h2", key: "1t8f8n" }],
35
+ ["path", { d: "M20 12h2", key: "1q8mjw" }],
36
+ ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
37
+ ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
38
+ ], I = d("sun", v), b = "_button_1r8vq_1", j = "_selectionIndicator_1r8vq_14", t = {
39
+ button: b,
40
+ selectionIndicator: j
41
+ }, w = { darkMode: "Dark Mode", lightMode: "Light Mode", system: "System Setting" }, x = { darkMode: "Mörkt läge", lightMode: "Ljust läge", system: "Systeminställning" }, L = {
42
+ en: w,
43
+ sv: x
44
+ }, $ = ({
45
+ selector: c = ":root",
46
+ defaultScheme: p = "light dark",
47
+ defaultValue: y,
48
+ className: g
49
+ }) => {
50
+ const [n, u] = h.useState(
51
+ y ?? /* @__PURE__ */ new Set([p])
52
+ );
53
+ h.useEffect(() => {
54
+ const o = document.querySelector(c);
55
+ if (o) {
56
+ const m = Array.from(n).join(" ");
57
+ o.style.removeProperty("color-scheme"), m === "light dark" ? delete o.dataset.colorScheme : o.dataset.colorScheme = m;
58
+ } else
59
+ console.warn(`No element found for selector: "${c}"`);
60
+ }, [n, c]);
61
+ const a = f(L);
62
+ return /* @__PURE__ */ s(
63
+ k,
64
+ {
65
+ selectionMode: "single",
66
+ selectedKeys: n,
67
+ onSelectionChange: u,
68
+ disallowEmptySelection: !0,
69
+ className: g,
70
+ children: [
71
+ /* @__PURE__ */ s(
72
+ i,
73
+ {
74
+ id: "light dark",
75
+ className: t.button,
76
+ children: [
77
+ /* @__PURE__ */ e(S, {}),
78
+ /* @__PURE__ */ e(r, { children: a.format("system") }),
79
+ /* @__PURE__ */ e(l, { className: t.selectionIndicator })
80
+ ]
81
+ }
82
+ ),
83
+ /* @__PURE__ */ s(
84
+ i,
85
+ {
86
+ id: "light",
87
+ className: t.button,
88
+ children: [
89
+ /* @__PURE__ */ e(I, {}),
90
+ /* @__PURE__ */ e(r, { children: a.format("lightMode") }),
91
+ /* @__PURE__ */ e(l, { className: t.selectionIndicator })
92
+ ]
93
+ }
94
+ ),
95
+ /* @__PURE__ */ s(
96
+ i,
97
+ {
98
+ id: "dark",
99
+ className: t.button,
100
+ children: [
101
+ /* @__PURE__ */ e(N, {}),
102
+ /* @__PURE__ */ e(r, { children: a.format("darkMode") }),
103
+ /* @__PURE__ */ e(l, { className: t.selectionIndicator })
104
+ ]
105
+ }
106
+ )
107
+ ]
108
+ }
109
+ );
110
+ };
111
+ export {
112
+ $ as C
113
+ };
@@ -0,0 +1,69 @@
1
+ 'use client';
2
+ import { jsx as t, jsxs as a } from "react/jsx-runtime";
3
+ import { c as l } from "./clsx-AexbMWKp.js";
4
+ import { B as c } from "./Button-GCROAMSl.js";
5
+ import { c as m } from "./createLucideIcon-CP-mMPfa.js";
6
+ import { u as f } from "./useLocalizedStringFormatter-BHvsRxDk.js";
7
+ import '../assets/FileListItem.css';const d = [
8
+ ["path", { d: "M10 11v6", key: "nco0om" }],
9
+ ["path", { d: "M14 11v6", key: "outv1u" }],
10
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
11
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
12
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
13
+ ], _ = m("trash-2", d), h = "_fileList_1jd3b_1", p = "_fileListItem_1jd3b_10", u = "_fileInfo_1jd3b_20", L = "_fileName_1jd3b_28", v = "_fileSize_1jd3b_37", j = "_deleteButton_1jd3b_43", e = {
14
+ fileList: h,
15
+ fileListItem: p,
16
+ fileInfo: u,
17
+ fileName: L,
18
+ fileSize: v,
19
+ deleteButton: j
20
+ }, M = ({ className: s, children: i, ...o }) => /* @__PURE__ */ t(
21
+ "ul",
22
+ {
23
+ ...o,
24
+ className: l(e.fileList, s),
25
+ children: i
26
+ }
27
+ ), I = { removeFile: "Remove" }, N = { removeFile: "Ta bort" }, b = {
28
+ en: I,
29
+ sv: N
30
+ }, x = ({
31
+ fileName: s,
32
+ fileSize: i,
33
+ onDelete: o,
34
+ className: n
35
+ }) => {
36
+ const r = f(b);
37
+ return /* @__PURE__ */ a(
38
+ "li",
39
+ {
40
+ className: l(e.fileListItem, n),
41
+ children: [
42
+ /* @__PURE__ */ a("span", { className: e.fileInfo, children: [
43
+ /* @__PURE__ */ t("span", { className: e.fileName, children: s }),
44
+ i && /* @__PURE__ */ t("span", { className: e.fileSize, children: i })
45
+ ] }),
46
+ o && /* @__PURE__ */ t(
47
+ c,
48
+ {
49
+ variant: "icon",
50
+ onPress: o,
51
+ "aria-label": `${r.format("removeFile")} ${s}`,
52
+ className: e.deleteButton,
53
+ children: /* @__PURE__ */ t(
54
+ _,
55
+ {
56
+ size: 20,
57
+ "aria-hidden": !0
58
+ }
59
+ )
60
+ }
61
+ )
62
+ ]
63
+ }
64
+ );
65
+ };
66
+ export {
67
+ M as F,
68
+ x as a
69
+ };
@@ -378,7 +378,7 @@ const K = [
378
378
  }
379
379
  ) : null;
380
380
  }, De = () => {
381
- const { items: t, clientSideRouter: n, clientSideHref: r } = f(), i = k(C), s = t.at(0)?.items;
381
+ const { items: t, clientSideRouter: n, clientSideHref: r } = f(), i = k(C), s = t?.[0]?.items;
382
382
  return /* @__PURE__ */ e(
383
383
  "nav",
384
384
  {
@@ -1,14 +1,18 @@
1
1
  import * as React from 'react';
2
+ export type ColorScheme = 'light' | 'dark' | 'light dark';
2
3
  export interface ColorSchemeSwitchProps {
3
- /** Choose what element that should be affected by the scheme switch.
4
- * @default :root
4
+ /** The CSS selector for the element to apply the color scheme to.
5
+ * @default ':root'
5
6
  */
6
7
  selector?: string;
7
- /** Set the default value for the color scheme. Default is "light dark" meaning follow system settings
8
- *
9
- * @default new Set(['light dark'])
8
+ /** The default color scheme. Use `'light dark'` to follow the system setting.
9
+ * @default 'light dark'
10
10
  */
11
- defaultValue?: Set<'light' | 'dark' | 'light dark'>;
11
+ defaultScheme?: ColorScheme;
12
+ /**
13
+ * @deprecated since v17.9.0 Use `defaultScheme` instead.
14
+ */
15
+ defaultValue?: Set<ColorScheme>;
12
16
  className?: string;
13
17
  }
14
18
  export declare const ColorSchemeSwitch: React.FC<ColorSchemeSwitchProps>;
@@ -1,4 +1,4 @@
1
- import { C as r } from "../chunks/ColorSchemeSwitch-gD9pFu9h.js";
1
+ import { C as r } from "../chunks/ColorSchemeSwitch-Bp3PSGkA.js";
2
2
  export {
3
3
  r as ColorSchemeSwitch
4
4
  };
@@ -0,0 +1,3 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export type FileListProps = HTMLAttributes<HTMLUListElement>;
3
+ export declare const FileList: ({ className, children, ...props }: FileListProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { FileList } from './FileList';
3
+ type Story = StoryObj<typeof FileList>;
4
+ declare const _default: {
5
+ component: ({ className, children, ...props }: import('./FileList').FileListProps) => import("react/jsx-runtime").JSX.Element;
6
+ subcomponents: {
7
+ FileListItem: ({ fileName, fileSize, onDelete, className, }: import('./FileListItem').FileListItemProps) => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ title: string;
10
+ tags: string[];
11
+ args: {
12
+ 'aria-label': string;
13
+ };
14
+ render: (args: import('./FileList').FileListProps) => import("react/jsx-runtime").JSX.Element;
15
+ };
16
+ export default _default;
17
+ export declare const Default: Story;
18
+ export declare const WithoutFileSize: Story;
19
+ export declare const Empty: Story;
@@ -0,0 +1,7 @@
1
+ export interface FileListItemProps {
2
+ fileName: string;
3
+ fileSize?: string;
4
+ onDelete?: () => void;
5
+ className?: string;
6
+ }
7
+ export declare const FileListItem: ({ fileName, fileSize, onDelete, className, }: FileListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { FileList } from './FileList';
2
+ export type { FileListProps } from './FileList';
3
+ export { FileListItem } from './FileListItem';
4
+ export type { FileListItemProps } from './FileListItem';
@@ -0,0 +1,5 @@
1
+ import { F as s, a as t } from "../chunks/FileListItem-CKF9HPjw.js";
2
+ export {
3
+ s as FileList,
4
+ t as FileListItem
5
+ };
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ "en": {
3
+ "removeFile": "Remove"
4
+ },
5
+ "sv": {
6
+ "removeFile": "Ta bort"
7
+ }
8
+ }
9
+ ;
10
+
11
+ export default _default;
package/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './common/types';
12
12
  export * from './date-field';
13
13
  export * from './date-picker';
14
14
  export * from './field-error';
15
+ export * from './file-list';
15
16
  export * from './file-upload';
16
17
  export * from './grid';
17
18
  export * from './heading';
package/index.js CHANGED
@@ -1,55 +1,56 @@
1
1
  'use client';
2
2
  import { A as s, a as p } from "./chunks/AccordionItem-DHhQDd6o.js";
3
3
  import { B as m, a as i } from "./chunks/BadgeContainer-CKVsfTlF.js";
4
- import { B as f, a as d } from "./chunks/Breadcrumb-Bs836gOn.js";
5
- import { B as c } from "./chunks/Button-GCROAMSl.js";
6
- import { B as l } from "./chunks/ButtonGroup-Dr6HOBo2.js";
7
- import { C, R as L } from "./chunks/RangeCalendar-DL6cCjH3.js";
8
- import { C as b, a as S, b as D, c as I, d as R, e as G, f as P } from "./chunks/Card-CVwiT9zm.js";
9
- import { C as v } from "./chunks/CharacterCounter-Dgnv-orm.js";
4
+ import { B as n, a as d } from "./chunks/Breadcrumb-Bs836gOn.js";
5
+ import { B as l } from "./chunks/Button-GCROAMSl.js";
6
+ import { B as g } from "./chunks/ButtonGroup-Dr6HOBo2.js";
7
+ import { C as L, R as C } from "./chunks/RangeCalendar-DL6cCjH3.js";
8
+ import { C as b, a as S, b as I, c as D, d as F, e as R, f as G } from "./chunks/Card-CVwiT9zm.js";
9
+ import { C as k } from "./chunks/CharacterCounter-Dgnv-orm.js";
10
10
  import { C as M } from "./chunks/Checkbox-DSW-_Qpm.js";
11
11
  import { C as h } from "./chunks/CheckboxGroup-DteJIgnR.js";
12
- import { C as y } from "./chunks/ColorSchemeSwitch-gD9pFu9h.js";
12
+ import { C as y } from "./chunks/ColorSchemeSwitch-Bp3PSGkA.js";
13
13
  import { C as N } from "./chunks/ComboBox-BEUfJ6IN.js";
14
14
  import { D as z } from "./chunks/DateField-Bwis4G2o.js";
15
15
  import { D as Q, a as V, b as Z } from "./chunks/DateInputDivider-DwopMIb9.js";
16
16
  import { D as q, a as J } from "./chunks/DateRangePicker-5E41DzGI.js";
17
17
  import { F as U } from "./chunks/FieldError-krpMBtie.js";
18
- import { D as X, F as Y } from "./chunks/FileUpload-Cu8DCSjX.js";
19
- import { G as $ } from "./chunks/Grid-CettmpaZ.js";
20
- import { G as ao } from "./chunks/GridItem-z7zclNdT.js";
21
- import { H as eo } from "./chunks/Heading-nfcRc2QF.js";
22
- import { I as so } from "./chunks/InfoBanner-CWLvkP6D.js";
23
- import { L as xo } from "./chunks/Label-Cg0aAlnt.js";
24
- import { H as io, L as no, N as fo, S as To, a as co } from "./chunks/Layout-BLP0HVR-.js";
25
- import { L as lo } from "./chunks/Link-CyY3-8M8.js";
26
- import { L as Co } from "./chunks/LinkButton-DWKAbxXF.js";
27
- import { L as Bo, a as bo } from "./chunks/Logo-DDykn5b2.js";
28
- import { M as Do } from "./chunks/Dialog-BSWBlyJI.js";
29
- import { P as Ro } from "./chunks/Popover-CjEPHe4A.js";
30
- import { P as Po } from "./chunks/ProgressBar-CBz_dIOH.js";
31
- import { R as vo, a as Fo } from "./chunks/Radio-CRHdSthr.js";
32
- import { S as Ao } from "./chunks/SearchField-VIMb28RB.js";
33
- import { S as Ho } from "./chunks/Select-C01v_D--.js";
34
- import { S as Eo } from "./chunks/Skeleton-tiP1Syzf.js";
35
- import { S as wo } from "./chunks/Spinner-CfKMn18u.js";
36
- import { C as Oo, a as Qo, R as Vo, T as Zo, b as jo, c as qo } from "./chunks/Table-BpVSZ3aM.js";
37
- import { T as Ko, a as Uo, b as Wo, c as Xo } from "./chunks/TabList-CJSnr6O0.js";
38
- import { T as _o, a as $o, b as oa } from "./chunks/TagGroup-DPFh8qHR.js";
39
- import { T as ra } from "./chunks/Text-D0r_W4lH.js";
40
- import { I as ta, T as sa, a as pa, b as xa } from "./chunks/TextArea-C7l7_Kof.js";
41
- import { G as ia, T as na, a as fa, b as da, t as Ta } from "./chunks/Toast-BFq_0Ue4.js";
42
- import { T as ga, a as la } from "./chunks/ToggleButtonGroup-DRnEEi5-.js";
43
- import { T as Ca, a as La } from "./chunks/Tooltip-BYEaNkZG.js";
44
- import { L as ba } from "./chunks/ListBox-CRtyHPj1.js";
45
- import { L as Da, a as Ia, b as Ra, c as Ga, d as Pa } from "./chunks/ListBoxHeader-DIxY1gOH.js";
46
- import { L as va, a as Fa } from "./chunks/ListBoxEmptyState-D6Jvy1WT.js";
47
- import { M as Aa, a as ha, b as Ha, c as ya, S as Ea } from "./chunks/Separator-CDRwpeHz.js";
48
- import { c as wa } from "./chunks/clsx-AexbMWKp.js";
49
- import { DialogTrigger as Oa, MenuTrigger as Qa, RouterProvider as Va } from "react-aria-components";
50
- import { u as ja } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
51
- import { useToastState as Ja } from "react-stately";
52
- const o = "17.9.0", a = {
18
+ import { F as X, a as Y } from "./chunks/FileListItem-CKF9HPjw.js";
19
+ import { D as $, F as oo } from "./chunks/FileUpload-Cu8DCSjX.js";
20
+ import { G as ro } from "./chunks/Grid-CettmpaZ.js";
21
+ import { G as to } from "./chunks/GridItem-z7zclNdT.js";
22
+ import { H as po } from "./chunks/Heading-nfcRc2QF.js";
23
+ import { I as mo } from "./chunks/InfoBanner-CWLvkP6D.js";
24
+ import { L as fo } from "./chunks/Label-Cg0aAlnt.js";
25
+ import { H as To, L as lo, N as co, S as go, a as uo } from "./chunks/Layout-DLe0UoSw.js";
26
+ import { L as Co } from "./chunks/Link-CyY3-8M8.js";
27
+ import { L as bo } from "./chunks/LinkButton-DWKAbxXF.js";
28
+ import { L as Io, a as Do } from "./chunks/Logo-DDykn5b2.js";
29
+ import { M as Ro } from "./chunks/Dialog-BSWBlyJI.js";
30
+ import { P as Po } from "./chunks/Popover-CjEPHe4A.js";
31
+ import { P as vo } from "./chunks/ProgressBar-CBz_dIOH.js";
32
+ import { R as Ao, a as ho } from "./chunks/Radio-CRHdSthr.js";
33
+ import { S as yo } from "./chunks/SearchField-VIMb28RB.js";
34
+ import { S as No } from "./chunks/Select-C01v_D--.js";
35
+ import { S as zo } from "./chunks/Skeleton-tiP1Syzf.js";
36
+ import { S as Qo } from "./chunks/Spinner-CfKMn18u.js";
37
+ import { C as Zo, a as jo, R as qo, T as Jo, b as Ko, c as Uo } from "./chunks/Table-BpVSZ3aM.js";
38
+ import { T as Xo, a as Yo, b as _o, c as $o } from "./chunks/TabList-CJSnr6O0.js";
39
+ import { T as aa, a as ra, b as ea } from "./chunks/TagGroup-DPFh8qHR.js";
40
+ import { T as sa } from "./chunks/Text-D0r_W4lH.js";
41
+ import { I as xa, T as ma, a as ia, b as fa } from "./chunks/TextArea-C7l7_Kof.js";
42
+ import { G as da, T as Ta, a as la, b as ca, t as ga } from "./chunks/Toast-BFq_0Ue4.js";
43
+ import { T as La, a as Ca } from "./chunks/ToggleButtonGroup-DRnEEi5-.js";
44
+ import { T as ba, a as Sa } from "./chunks/Tooltip-BYEaNkZG.js";
45
+ import { L as Da } from "./chunks/ListBox-CRtyHPj1.js";
46
+ import { L as Ra, a as Ga, b as Pa, c as ka, d as va } from "./chunks/ListBoxHeader-DIxY1gOH.js";
47
+ import { L as Aa, a as ha } from "./chunks/ListBoxEmptyState-D6Jvy1WT.js";
48
+ import { M as ya, a as Ea, b as Na, c as wa, S as za } from "./chunks/Separator-CDRwpeHz.js";
49
+ import { c as Qa } from "./chunks/clsx-AexbMWKp.js";
50
+ import { DialogTrigger as Za, MenuTrigger as ja, RouterProvider as qa } from "react-aria-components";
51
+ import { u as Ka } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
52
+ import { useToastState as Wa } from "react-stately";
53
+ const o = "17.10.1", a = {
53
54
  version: o
54
55
  }, r = a.version;
55
56
  export {
@@ -57,24 +58,24 @@ export {
57
58
  p as AccordionItem,
58
59
  m as Badge,
59
60
  i as BadgeContainer,
60
- f as Breadcrumb,
61
+ n as Breadcrumb,
61
62
  d as Breadcrumbs,
62
- c as Button,
63
- l as ButtonGroup,
64
- C as Calendar,
63
+ l as Button,
64
+ g as ButtonGroup,
65
+ L as Calendar,
65
66
  b as Card,
66
67
  S as CardActionArea,
67
- D as CardActions,
68
- I as CardContent,
69
- R as CardImage,
70
- G as CardLink,
71
- P as CardTitle,
72
- Oo as Cell,
73
- v as CharacterCounter,
68
+ I as CardActions,
69
+ D as CardContent,
70
+ F as CardImage,
71
+ R as CardLink,
72
+ G as CardTitle,
73
+ Zo as Cell,
74
+ k as CharacterCounter,
74
75
  M as Checkbox,
75
76
  h as CheckboxGroup,
76
77
  y as ColorSchemeSwitch,
77
- Qo as Column,
78
+ jo as Column,
78
79
  N as ComboBox,
79
80
  z as DateField,
80
81
  Q as DateInput,
@@ -82,76 +83,78 @@ export {
82
83
  q as DatePicker,
83
84
  J as DateRangePicker,
84
85
  Z as DateSegment,
85
- Oa as DialogTrigger,
86
- X as DropZone,
86
+ Za as DialogTrigger,
87
+ $ as DropZone,
87
88
  U as FieldError,
88
- Y as FileTrigger,
89
- ia as GlobalToastRegion,
90
- $ as Grid,
91
- ao as GridItem,
92
- io as Header,
93
- eo as Heading,
94
- so as InfoBanner,
95
- ta as Input,
96
- xo as Label,
97
- no as Layout,
98
- lo as Link,
99
- Co as LinkButton,
100
- ba as ListBox,
101
- Da as ListBoxButton,
102
- va as ListBoxEmptyState,
103
- Ia as ListBoxHeader,
104
- Ra as ListBoxItem,
105
- Ga as ListBoxLoadMoreItem,
106
- Fa as ListBoxPopover,
107
- Pa as ListBoxSection,
108
- Bo as Logo,
109
- bo as LogoContext,
110
- Aa as Menu,
111
- ha as MenuItem,
112
- Ha as MenuPopover,
113
- ya as MenuSection,
114
- Qa as MenuTrigger,
115
- Do as Modal,
116
- fo as Navbar,
117
- Ro as Popover,
118
- Po as ProgressBar,
119
- vo as Radio,
120
- Fo as RadioGroup,
121
- L as RangeCalendar,
122
- Va as RouterProvider,
123
- Vo as Row,
124
- Ao as SearchField,
125
- Ho as Select,
126
- Ea as Separator,
127
- To as Sidebar,
128
- co as SidebarLink,
129
- Eo as Skeleton,
130
- wo as Spinner,
131
- Ko as Tab,
132
- Uo as TabList,
133
- Wo as TabPanel,
134
- Zo as Table,
135
- jo as TableBody,
136
- qo as TableHeader,
137
- Xo as Tabs,
138
- _o as Tag,
139
- $o as TagGroup,
140
- oa as TagList,
141
- ra as Text,
142
- sa as TextArea,
143
- pa as TextField,
144
- xa as TextFieldBase,
145
- na as Toast,
146
- fa as ToastProvider,
147
- da as ToastRegion,
148
- ga as ToggleButton,
149
- la as ToggleButtonGroup,
150
- Ca as Tooltip,
151
- La as TooltipTrigger,
89
+ X as FileList,
90
+ Y as FileListItem,
91
+ oo as FileTrigger,
92
+ da as GlobalToastRegion,
93
+ ro as Grid,
94
+ to as GridItem,
95
+ To as Header,
96
+ po as Heading,
97
+ mo as InfoBanner,
98
+ xa as Input,
99
+ fo as Label,
100
+ lo as Layout,
101
+ Co as Link,
102
+ bo as LinkButton,
103
+ Da as ListBox,
104
+ Ra as ListBoxButton,
105
+ Aa as ListBoxEmptyState,
106
+ Ga as ListBoxHeader,
107
+ Pa as ListBoxItem,
108
+ ka as ListBoxLoadMoreItem,
109
+ ha as ListBoxPopover,
110
+ va as ListBoxSection,
111
+ Io as Logo,
112
+ Do as LogoContext,
113
+ ya as Menu,
114
+ Ea as MenuItem,
115
+ Na as MenuPopover,
116
+ wa as MenuSection,
117
+ ja as MenuTrigger,
118
+ Ro as Modal,
119
+ co as Navbar,
120
+ Po as Popover,
121
+ vo as ProgressBar,
122
+ Ao as Radio,
123
+ ho as RadioGroup,
124
+ C as RangeCalendar,
125
+ qa as RouterProvider,
126
+ qo as Row,
127
+ yo as SearchField,
128
+ No as Select,
129
+ za as Separator,
130
+ go as Sidebar,
131
+ uo as SidebarLink,
132
+ zo as Skeleton,
133
+ Qo as Spinner,
134
+ Xo as Tab,
135
+ Yo as TabList,
136
+ _o as TabPanel,
137
+ Jo as Table,
138
+ Ko as TableBody,
139
+ Uo as TableHeader,
140
+ $o as Tabs,
141
+ aa as Tag,
142
+ ra as TagGroup,
143
+ ea as TagList,
144
+ sa as Text,
145
+ ma as TextArea,
146
+ ia as TextField,
147
+ fa as TextFieldBase,
148
+ Ta as Toast,
149
+ la as ToastProvider,
150
+ ca as ToastRegion,
151
+ La as ToggleButton,
152
+ Ca as ToggleButtonGroup,
153
+ ba as Tooltip,
154
+ Sa as TooltipTrigger,
152
155
  r as VERSION,
153
- wa as clsx,
154
- Ta as toastQueue,
155
- ja as useLocalizedStringFormatter,
156
- Ja as useToastState
156
+ Qa as clsx,
157
+ ga as toastQueue,
158
+ Ka as useLocalizedStringFormatter,
159
+ Wa as useToastState
157
160
  };
package/layout/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { H as e, L as s, N as b, S as d, a as i } from "../chunks/Layout-BLP0HVR-.js";
1
+ import { H as e, L as s, N as b, S as d, a as i } from "../chunks/Layout-DLe0UoSw.js";
2
2
  export {
3
3
  e as Header,
4
4
  s as Layout,
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "description": "Midas Components",
15
15
  "homepage": "https://designsystem.migrationsverket.se/",
16
16
  "license": "CC0-1.0",
17
- "version": "17.9.0",
17
+ "version": "17.10.1",
18
18
  "module": "./index.js",
19
19
  "type": "module",
20
20
  "main": "./index.js",
@@ -1,105 +0,0 @@
1
- 'use client';
2
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
3
- import * as m from "react";
4
- import { VisuallyHidden as c } from "react-aria";
5
- import { a as g, T as r } from "./ToggleButtonGroup-DRnEEi5-.js";
6
- import { c as l } from "./createLucideIcon-CP-mMPfa.js";
7
- import { u } from "./useLocalizedStringFormatter-BHvsRxDk.js";
8
- import '../assets/ColorSchemeSwitch.css';const k = [
9
- [
10
- "path",
11
- {
12
- d: "M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",
13
- key: "1pdavp"
14
- }
15
- ],
16
- ["path", { d: "M20.054 15.987H3.946", key: "14rxg9" }]
17
- ], f = l("laptop", k);
18
- const M = [
19
- [
20
- "path",
21
- {
22
- d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
23
- key: "kfwtm"
24
- }
25
- ]
26
- ], S = l("moon", M);
27
- const _ = [
28
- ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
29
- ["path", { d: "M12 2v2", key: "tus03m" }],
30
- ["path", { d: "M12 20v2", key: "1lh1kg" }],
31
- ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
32
- ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
33
- ["path", { d: "M2 12h2", key: "1t8f8n" }],
34
- ["path", { d: "M20 12h2", key: "1q8mjw" }],
35
- ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
36
- ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
37
- ], b = l("sun", _), v = "_button_1dy1i_1", d = {
38
- button: v
39
- }, N = { darkMode: "Dark Mode", lightMode: "Light Mode", system: "System Setting" }, j = { darkMode: "Mörkt läge", lightMode: "Ljust läge", system: "Systeminställning" }, w = {
40
- en: N,
41
- sv: j
42
- }, H = ({
43
- selector: s = ":root",
44
- defaultValue: h = /* @__PURE__ */ new Set(["light dark"]),
45
- className: p
46
- }) => {
47
- const [n, y] = m.useState(h);
48
- m.useEffect(() => {
49
- const t = document.querySelector(s);
50
- if (t) {
51
- const i = Array.from(n).join(" ");
52
- t.style.removeProperty("color-scheme"), i === "light dark" ? delete t.dataset.colorScheme : t.dataset.colorScheme = i;
53
- } else
54
- console.warn(`No element found for selector: "${s}"`);
55
- }, [n, s]);
56
- const a = u(w);
57
- return /* @__PURE__ */ o(
58
- g,
59
- {
60
- selectionMode: "single",
61
- selectedKeys: n,
62
- onSelectionChange: y,
63
- disallowEmptySelection: !0,
64
- className: p,
65
- children: [
66
- /* @__PURE__ */ o(
67
- r,
68
- {
69
- id: "light dark",
70
- className: d.button,
71
- children: [
72
- /* @__PURE__ */ e(f, {}),
73
- /* @__PURE__ */ e(c, { children: a.format("system") })
74
- ]
75
- }
76
- ),
77
- /* @__PURE__ */ o(
78
- r,
79
- {
80
- id: "light",
81
- className: d.button,
82
- children: [
83
- /* @__PURE__ */ e(b, {}),
84
- /* @__PURE__ */ e(c, { children: a.format("lightMode") })
85
- ]
86
- }
87
- ),
88
- /* @__PURE__ */ o(
89
- r,
90
- {
91
- id: "dark",
92
- className: d.button,
93
- children: [
94
- /* @__PURE__ */ e(S, {}),
95
- /* @__PURE__ */ e(c, { children: a.format("darkMode") })
96
- ]
97
- }
98
- )
99
- ]
100
- }
101
- );
102
- };
103
- export {
104
- H as C
105
- };