@midas-ds/components 17.15.6 → 17.16.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 17.16.0 (2026-07-03)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **components,icons:** add ContrastFilled custom icon ([29e29ef5f05](https://github.com/migrationsverket/midas/commit/29e29ef5f05))
6
+
7
+ ## 17.15.7 (2026-07-02)
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **components,link:** add visually hidden label for new-tab and download icons ([afebdc4e492](https://github.com/migrationsverket/midas/commit/afebdc4e492))
12
+
1
13
  ## 17.15.6 (2026-07-02)
2
14
 
3
15
  ### 🧪 Tests updated
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import { forwardRef as e } from "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ //#region packages/components/src/icons/ContrastFilled.tsx
5
+ var r = e(({ size: e = 24, color: r = "currentColor", strokeWidth: i = 2, className: a, ...o }, s) => /* @__PURE__ */ n("svg", {
6
+ ref: s,
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: e,
9
+ height: e,
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ stroke: r,
13
+ strokeWidth: i,
14
+ strokeLinecap: "round",
15
+ strokeLinejoin: "round",
16
+ className: a,
17
+ ...o,
18
+ children: [/* @__PURE__ */ t("circle", {
19
+ cx: "12",
20
+ cy: "12",
21
+ r: "10"
22
+ }), /* @__PURE__ */ t("path", {
23
+ d: "M12 2a10 10 0 0 1 0 20Z",
24
+ fill: r,
25
+ stroke: "none"
26
+ })]
27
+ }));
28
+ r.displayName = "ContrastFilled";
29
+ //#endregion
30
+ export { r as t };
@@ -0,0 +1,59 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-BtlV5Vo3.js";
3
+ import { t } from "./createLucideIcon-DhIhuN5D.js";
4
+ import { t as n } from "./square-arrow-out-up-right-Bobm4VNc.js";
5
+ import { t as r } from "./arrow-right-7yeXXFNV.js";
6
+ import { t as i } from "./useLocalizedStringFormatter-bRLuRzVD.js";
7
+ import { Link as a, RouterProvider as o } from "react-aria-components";
8
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
9
+ import { VisuallyHidden as u } from "react-aria";
10
+ import '../assets/link.css';var d = t("arrow-down-to-line", [
11
+ ["path", {
12
+ d: "M12 17V3",
13
+ key: "1cwfxf"
14
+ }],
15
+ ["path", {
16
+ d: "m6 11 6 6 6-6",
17
+ key: "12ii2o"
18
+ }],
19
+ ["path", {
20
+ d: "M19 21H5",
21
+ key: "150jfl"
22
+ }]
23
+ ]), f = {
24
+ link: "_link_duep2_1",
25
+ icon: "_icon_duep2_53",
26
+ standalone: "_standalone_duep2_57",
27
+ stretched: "_stretched_duep2_76"
28
+ }, p = {
29
+ en: {
30
+ opensInNewTab: "Opens in new tab",
31
+ downloadsFile: "Downloads file"
32
+ },
33
+ sv: {
34
+ opensInNewTab: "Öppnas i ny flik",
35
+ downloadsFile: "Hämtar fil"
36
+ }
37
+ }, m = ({ children: t, standalone: o, target: m, stretched: g, download: _, icon: v, className: y, as: b, ...x }) => {
38
+ let S = b || a, C = i(p), w = v ? { icon: v } : _ ? {
39
+ icon: d,
40
+ label: C.format("downloadsFile")
41
+ } : m === "_blank" ? {
42
+ icon: n,
43
+ label: C.format("opensInNewTab")
44
+ } : o ? { icon: r } : null;
45
+ return /* @__PURE__ */ l(S, {
46
+ className: e(f.link, o && f.standalone, g && f.stretched, y),
47
+ ...x,
48
+ target: m,
49
+ download: _,
50
+ children: [t, w ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(h, {
51
+ className: f.icon,
52
+ icon: w.icon,
53
+ size: 16,
54
+ "aria-hidden": !0
55
+ }), w.label && /* @__PURE__ */ c(u, { children: w.label })] }) : null]
56
+ });
57
+ }, h = ({ icon: e, ...t }) => /* @__PURE__ */ c(e, { ...t });
58
+ //#endregion
59
+ export { o as n, m as t };
@@ -0,0 +1,52 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-BtlV5Vo3.js";
3
+ import { t } from "./createLucideIcon-DhIhuN5D.js";
4
+ import { t as n } from "./square-arrow-out-up-right-Bobm4VNc.js";
5
+ import { t as r } from "./arrow-right-7yeXXFNV.js";
6
+ import { t as i } from "./useLocalizedStringFormatter-bRLuRzVD.js";
7
+ import "react";
8
+ import { Link as a, RouterProvider as o } from "react-aria-components";
9
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
10
+ import { VisuallyHidden as l } from "react-aria";
11
+ import '../assets/link-button.css';var u = t("arrow-left", [["path", {
12
+ d: "m12 19-7-7 7-7",
13
+ key: "1l729n"
14
+ }], ["path", {
15
+ d: "M19 12H5",
16
+ key: "x3x0zl"
17
+ }]]), d = {
18
+ linkButton: "_linkButton_1k5w6_1",
19
+ secondary: "_secondary_1k5w6_58",
20
+ icon: "_icon_1k5w6_63",
21
+ tertiary: "_tertiary_1k5w6_102",
22
+ danger: "_danger_1k5w6_130",
23
+ iconBtn: "_iconBtn_1k5w6_149",
24
+ medium: "_medium_1k5w6_173",
25
+ iconLeft: "_iconLeft_1k5w6_178",
26
+ fullwidth: "_fullwidth_1k5w6_182",
27
+ button: "_button_1k5w6_192"
28
+ }, f = {
29
+ en: { opensInNewTab: "Opens in new tab" },
30
+ sv: { opensInNewTab: "Öppnas i ny flik" }
31
+ }, p = ({ children: t, variant: o, fullwidth: p, icon: h, iconPlacement: g, className: _, as: v, size: y = "large", ...b }) => {
32
+ let x = v || a, S = i(f), C = h ? { icon: h } : b.target === "_blank" ? {
33
+ icon: n,
34
+ label: S.format("opensInNewTab")
35
+ } : g === "left" ? { icon: u } : { icon: r };
36
+ return /* @__PURE__ */ c(x, {
37
+ className: e(d.linkButton, o === "primary" && d.primary, o === "secondary" && d.secondary, o === "tertiary" && d.tertiary, o === "danger" && d.danger, o === "icon" && d.iconBtn, y === "medium" && d.medium, p && d.fullwidth, g === "left" && d.iconLeft, _),
38
+ ...b,
39
+ children: [
40
+ t,
41
+ /* @__PURE__ */ s(m, {
42
+ className: d.icon,
43
+ icon: C.icon,
44
+ size: 20,
45
+ "aria-hidden": !0
46
+ }),
47
+ C.label && /* @__PURE__ */ s(l, { children: C.label })
48
+ ]
49
+ });
50
+ }, m = ({ icon: e, ...t }) => /* @__PURE__ */ s(e, { ...t });
51
+ //#endregion
52
+ export { o as n, p as t };
@@ -0,0 +1,2 @@
1
+ import { LucideProps } from 'lucide-react';
2
+ export declare const ContrastFilled: import('react').ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
@@ -0,0 +1 @@
1
+ export { ContrastFilled } from './ContrastFilled';
package/icons/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../chunks/icons-Dw_ZbztW.js";
2
+ export { e as ContrastFilled };
package/index.d.ts CHANGED
@@ -39,6 +39,7 @@ export * from './time-field';
39
39
  export * from './toast';
40
40
  export * from './toggle-button';
41
41
  export * from './tooltip';
42
+ export * from './icons';
42
43
  export * from './list-box';
43
44
  export * from './menu';
44
45
  export { useLocalizedStringFormatter } from './utils/intl';
package/index.js CHANGED
@@ -4,9 +4,9 @@ import { n as e, t } from "./chunks/accordion-KEgnlzYi.js";
4
4
  import { t as n } from "./chunks/clsx-BtlV5Vo3.js";
5
5
  import { t as r } from "./chunks/spinner-C3WiZYld.js";
6
6
  import { a as i, i as a, n as o, r as s, t as c } from "./chunks/layout-BzK7P4Xn.js";
7
- import { t as l } from "./chunks/link-Q46Ny2Po.js";
7
+ import { t as l } from "./chunks/link-CZNuhFX6.js";
8
8
  import { a as u, i as d, n as f, o as p, r as m, t as h } from "./chunks/table-BZ7VvZaq.js";
9
- import { t as g } from "./chunks/link-button-Cm2B0s4X.js";
9
+ import { t as g } from "./chunks/link-button-ZsK6UGko.js";
10
10
  import { n as _, t as v } from "./chunks/date-picker-ByfWqOZh.js";
11
11
  import { n as y, t as b } from "./chunks/calendar-C0rlcHfr.js";
12
12
  import { t as x } from "./chunks/color-scheme-switch-Ce4vL8Yz.js";
@@ -43,10 +43,11 @@ import { i as Ae, n as je, r as Me, t as Ne } from "./chunks/tabs-eshGdQJJ.js";
43
43
  import { i as Pe, n as Fe, r as Ie, t as Le } from "./chunks/textfield-CZSw2R67.js";
44
44
  import { t as Re } from "./chunks/time-field-DaQfnJQF.js";
45
45
  import { a as ze, i as Be, n as Ve, o as He, r as Ue, t as We } from "./chunks/toast-AYzfHBcQ.js";
46
- import { a as Ge, i as Ke, n as qe, o as Je, r as Ye, t as Xe } from "./chunks/menu-CB6VDQ-u.js";
46
+ import { t as Ge } from "./chunks/icons-Dw_ZbztW.js";
47
+ import { a as Ke, i as qe, n as Je, o as Ye, r as Xe, t as Ze } from "./chunks/menu-CB6VDQ-u.js";
47
48
  //#endregion
48
49
  //#region packages/components/src/version.ts
49
- var Ze = {
50
+ var Qe = {
50
51
  name: "@midas-ds/components",
51
52
  author: { name: "Migrationsverket" },
52
53
  keywords: [
@@ -58,7 +59,7 @@ var Ze = {
58
59
  description: "Midas Components",
59
60
  homepage: "https://designsystem.migrationsverket.se/",
60
61
  license: "CC0-1.0",
61
- version: "17.15.6",
62
+ version: "17.16.0",
62
63
  module: "./index.js",
63
64
  type: "module",
64
65
  main: "./index.js",
@@ -89,4 +90,4 @@ var Ze = {
89
90
  }
90
91
  }.version;
91
92
  //#endregion
92
- export { e as Accordion, t as AccordionItem, j as Badge, M as BadgeContainer, P as Breadcrumb, N as Breadcrumbs, O as Button, k as ButtonGroup, y as Calendar, U as Card, z as CardActionArea, L as CardActions, V as CardBody, H as CardContent, G as CardHeader, W as CardImage, R as CardLink, B as CardTitle, h as Cell, K as CharacterCounter, S as Checkbox, C as CheckboxGroup, x as ColorSchemeSwitch, f as Column, ee as ComboBox, le as DateField, ue as DateInput, fe as DateInputDivider, _ as DatePicker, v as DateRangePicker, de as DateSegment, Z as DialogTrigger, me as DropZone, I as FieldError, T as FileList, E as FileListItem, pe as FileTrigger, We as GlobalToastRegion, he as Grid, ge as GridItem, s as Header, A as Heading, _e as InfoBanner, Ie as Input, q as Label, c as Layout, l as Link, g as LinkButton, ne as ListBox, se as ListBoxButton, ce as ListBoxEmptyState, ie as ListBoxHeader, ae as ListBoxItem, oe as ListBoxLoadMoreItem, te as ListBoxPopover, re as ListBoxSection, xe as Logo, be as LogoContext, Ge as Menu, Ke as MenuItem, Ye as MenuPopover, qe as MenuSection, Je as MenuTrigger, Y as Modal, X as ModalOverlay, o as Navbar, J as Popover, Se as ProgressBar, we as Radio, Ce as RadioGroup, b as RangeCalendar, m as Row, w as SearchField, Te as Select, Xe as Separator, a as Sidebar, i as SidebarLink, ke as Skeleton, r as Spinner, Me as Tab, Ne as TabList, je as TabPanel, d as Table, u as TableBody, p as TableHeader, Ae as Tabs, De as Tag, Oe as TagGroup, Ee as TagList, F as Text, Le as TextArea, Fe as TextField, Pe as TextFieldBase, Re as TimeField, Ve as Toast, Ue as ToastProvider, Be as ToastRegion, Q as ToggleButton, $ as ToggleButtonGroup, ye as Tooltip, ve as TooltipTrigger, Ze as VERSION, n as clsx, ze as toastQueue, D as useLocalizedStringFormatter, He as useToastState };
93
+ export { e as Accordion, t as AccordionItem, j as Badge, M as BadgeContainer, P as Breadcrumb, N as Breadcrumbs, O as Button, k as ButtonGroup, y as Calendar, U as Card, z as CardActionArea, L as CardActions, V as CardBody, H as CardContent, G as CardHeader, W as CardImage, R as CardLink, B as CardTitle, h as Cell, K as CharacterCounter, S as Checkbox, C as CheckboxGroup, x as ColorSchemeSwitch, f as Column, ee as ComboBox, Ge as ContrastFilled, le as DateField, ue as DateInput, fe as DateInputDivider, _ as DatePicker, v as DateRangePicker, de as DateSegment, Z as DialogTrigger, me as DropZone, I as FieldError, T as FileList, E as FileListItem, pe as FileTrigger, We as GlobalToastRegion, he as Grid, ge as GridItem, s as Header, A as Heading, _e as InfoBanner, Ie as Input, q as Label, c as Layout, l as Link, g as LinkButton, ne as ListBox, se as ListBoxButton, ce as ListBoxEmptyState, ie as ListBoxHeader, ae as ListBoxItem, oe as ListBoxLoadMoreItem, te as ListBoxPopover, re as ListBoxSection, xe as Logo, be as LogoContext, Ke as Menu, qe as MenuItem, Xe as MenuPopover, Je as MenuSection, Ye as MenuTrigger, Y as Modal, X as ModalOverlay, o as Navbar, J as Popover, Se as ProgressBar, we as Radio, Ce as RadioGroup, b as RangeCalendar, m as Row, w as SearchField, Te as Select, Ze as Separator, a as Sidebar, i as SidebarLink, ke as Skeleton, r as Spinner, Me as Tab, Ne as TabList, je as TabPanel, d as Table, u as TableBody, p as TableHeader, Ae as Tabs, De as Tag, Oe as TagGroup, Ee as TagList, F as Text, Le as TextArea, Fe as TextField, Pe as TextFieldBase, Re as TimeField, Ve as Toast, Ue as ToastProvider, Be as ToastRegion, Q as ToggleButton, $ as ToggleButtonGroup, ye as Tooltip, ve as TooltipTrigger, Qe as VERSION, n as clsx, ze as toastQueue, D as useLocalizedStringFormatter, He as useToastState };
package/link/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/link-Q46Ny2Po.js";
1
+ import { n as e, t } from "../chunks/link-CZNuhFX6.js";
2
2
  export { t as Link, e as RouterProvider };
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "en": {
3
+ "opensInNewTab": "Opens in new tab",
4
+ "downloadsFile": "Downloads file"
5
+ },
6
+ "sv": {
7
+ "opensInNewTab": "Öppnas i ny flik",
8
+ "downloadsFile": "Hämtar fil"
9
+ }
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -10,3 +10,4 @@ export declare const Previous: Story;
10
10
  export declare const Disabled: Story;
11
11
  export declare const AppLink: Story;
12
12
  export declare const Danger: Story;
13
+ export declare const NewTab: Story;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/link-button-Cm2B0s4X.js";
1
+ import { n as e, t } from "../chunks/link-button-ZsK6UGko.js";
2
2
  export { t as LinkButton, e as RouterProvider };
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ "en": {
3
+ "opensInNewTab": "Opens in new tab"
4
+ },
5
+ "sv": {
6
+ "opensInNewTab": "Öppnas i ny flik"
7
+ }
8
+ }
9
+ ;
10
+
11
+ export default _default;
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.15.6",
17
+ "version": "17.16.0",
18
18
  "module": "./index.js",
19
19
  "type": "module",
20
20
  "main": "./index.js",
@@ -1,40 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./clsx-BtlV5Vo3.js";
3
- import { t } from "./createLucideIcon-DhIhuN5D.js";
4
- import { t as n } from "./square-arrow-out-up-right-Bobm4VNc.js";
5
- import { t as r } from "./arrow-right-7yeXXFNV.js";
6
- import { Link as i, RouterProvider as a } from "react-aria-components";
7
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
- import '../assets/link.css';var l = t("arrow-down-to-line", [
9
- ["path", {
10
- d: "M12 17V3",
11
- key: "1cwfxf"
12
- }],
13
- ["path", {
14
- d: "m6 11 6 6 6-6",
15
- key: "12ii2o"
16
- }],
17
- ["path", {
18
- d: "M19 21H5",
19
- key: "150jfl"
20
- }]
21
- ]), u = {
22
- link: "_link_duep2_1",
23
- icon: "_icon_duep2_53",
24
- standalone: "_standalone_duep2_57",
25
- stretched: "_stretched_duep2_76"
26
- }, d = ({ children: t, standalone: a, target: d, stretched: p, download: m, icon: h, className: g, as: _, ...v }) => {
27
- let y = _ || i, b = h || (m ? l : d === "_blank" ? n : a ? r : null);
28
- return /* @__PURE__ */ s(y, {
29
- className: e(u.link, a && u.standalone, p && u.stretched, g),
30
- ...v,
31
- target: d,
32
- children: /* @__PURE__ */ c(o, { children: [t, b ? /* @__PURE__ */ s(f, {
33
- className: u.icon,
34
- icon: b,
35
- size: 16
36
- }) : null] })
37
- });
38
- }, f = ({ icon: e, ...t }) => /* @__PURE__ */ s(e, { ...t });
39
- //#endregion
40
- export { a as n, d as t };
@@ -1,39 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./clsx-BtlV5Vo3.js";
3
- import { t } from "./createLucideIcon-DhIhuN5D.js";
4
- import { t as n } from "./square-arrow-out-up-right-Bobm4VNc.js";
5
- import { t as r } from "./arrow-right-7yeXXFNV.js";
6
- import "react";
7
- import { Link as i, RouterProvider as a } from "react-aria-components";
8
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
9
- import '../assets/link-button.css';var c = t("arrow-left", [["path", {
10
- d: "m12 19-7-7 7-7",
11
- key: "1l729n"
12
- }], ["path", {
13
- d: "M19 12H5",
14
- key: "x3x0zl"
15
- }]]), l = {
16
- linkButton: "_linkButton_1k5w6_1",
17
- secondary: "_secondary_1k5w6_58",
18
- icon: "_icon_1k5w6_63",
19
- tertiary: "_tertiary_1k5w6_102",
20
- danger: "_danger_1k5w6_130",
21
- iconBtn: "_iconBtn_1k5w6_149",
22
- medium: "_medium_1k5w6_173",
23
- iconLeft: "_iconLeft_1k5w6_178",
24
- fullwidth: "_fullwidth_1k5w6_182",
25
- button: "_button_1k5w6_192"
26
- }, u = ({ children: t, variant: a, fullwidth: u, icon: f, iconPlacement: p, className: m, as: h, size: g = "large", ..._ }) => {
27
- let v = h || i, y = f || (_.target === "_blank" ? n : p === "left" ? c : r);
28
- return /* @__PURE__ */ s(v, {
29
- className: e(l.linkButton, a === "primary" && l.primary, a === "secondary" && l.secondary, a === "tertiary" && l.tertiary, a === "danger" && l.danger, a === "icon" && l.iconBtn, g === "medium" && l.medium, u && l.fullwidth, p === "left" && l.iconLeft, m),
30
- ..._,
31
- children: [t, /* @__PURE__ */ o(d, {
32
- className: l.icon,
33
- icon: y,
34
- size: 20
35
- })]
36
- });
37
- }, d = ({ icon: e, ...t }) => /* @__PURE__ */ o(e, { ...t });
38
- //#endregion
39
- export { a as n, u as t };