@midas-ds/components 17.4.0 → 17.5.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 +21 -0
- package/assets/Breadcrumb.css +1 -1
- package/assets/InfoBanner.css +1 -1
- package/breadcrumbs/index.js +1 -1
- package/chunks/{Breadcrumb-CHldDcyz.js → Breadcrumb-Bs836gOn.js} +9 -9
- package/chunks/InfoBanner-D_pwTOHH.js +76 -0
- package/index.js +3 -3
- package/info-banner/index.js +1 -1
- package/package.json +1 -1
- package/chunks/InfoBanner-otmuemqy.js +0 -72
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## 17.5.1 (2026-02-25)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **components, breadcrumbs:** adjust styling according to spec ([0c08821279](https://github.com/migrationsverket/midas/commit/0c08821279))
|
|
6
|
+
|
|
7
|
+
## 17.5.0 (2026-02-25)
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
|
|
11
|
+
- **components, info-banner:** change HTML element to aside ([e2df5f3877](https://github.com/migrationsverket/midas/commit/e2df5f3877))
|
|
12
|
+
- **components, info-banner:** add styling for unordered lists ([f048a5e9cb](https://github.com/migrationsverket/midas/commit/f048a5e9cb))
|
|
13
|
+
|
|
14
|
+
### 🏭 Refactoring
|
|
15
|
+
|
|
16
|
+
- **components, info-banner:** use react-stately controlled state hook ([d813124151](https://github.com/migrationsverket/midas/commit/d813124151))
|
|
17
|
+
|
|
18
|
+
### 🧪 Tests updated
|
|
19
|
+
|
|
20
|
+
- **components, info-banner:** add tests ([ddee571e0c](https://github.com/migrationsverket/midas/commit/ddee571e0c))
|
|
21
|
+
|
|
1
22
|
## 17.4.0 (2026-02-25)
|
|
2
23
|
|
|
3
24
|
### 🚀 Features
|
package/assets/Breadcrumb.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._container_14dns_1{align-items:center;padding-inline-start:0;font-family:var(--midas-typography-font-family);display:flex;flex-flow:row wrap;list-style:none;margin:0}._container_14dns_1 li{display:flex;align-items:center}._container_14dns_1 li[data-current=true] a{cursor:default}._separator_14dns_20{color:var(--midas-text-disabled);padding:0 var(--midas-space-30)}
|
package/assets/InfoBanner.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._infoBanner_8niki_1{font-family:var(--midas-typography-font-family);color:var(--midas-text-primary);display:flex;font-size:1rem;flex-direction:row;gap:1rem;padding:1rem;line-height:1.3;border-left:3px solid var(--border);background-color:var(--bg)}._infoBanner_8niki_1._success_8niki_11{--border: var(--midas-support-border-success);--bg: var(--midas-support-background-success)}._infoBanner_8niki_1._info_8niki_1{--border: var(--midas-support-border-info);--bg: var(--midas-support-background-info)}._infoBanner_8niki_1._important_8niki_21{--border: var(--midas-support-border-important);--bg: var(--midas-support-background-important)}._infoBanner_8niki_1._warning_8niki_26{--border: var(--midas-support-border-warning);--bg: var(--midas-support-background-warning)}@media(forced-colors:active){._infoBanner_8niki_1{border:1px solid;border-left:3px solid var(--border)}}._content_8niki_40{display:flex;flex-direction:column;flex:1 0 0%}._heading_8niki_46{font-weight:500;margin-bottom:.25rem}._text_8niki_51{line-height:var(--midas-typography-line-height-40);white-space:pre-line;margin:0}._text_8niki_51 ul{margin:var(--midas-space-xsmall) 0 0 var(--midas-space-medium);padding:0}._text_8niki_51 ul li{margin-bottom:var(--midas-space-60)}._icon_8niki_66{color:var(--midas-icon-primary);min-width:20px}@media(forced-colors:active){._icon_8niki_66{color:currentColor}}._dismissable_8niki_75{margin-top:-1rem;margin-right:-1rem;justify-self:flex-end}
|
package/breadcrumbs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s, jsxs as m, Fragment as i } from "react/jsx-runtime";
|
|
2
|
-
import { Breadcrumbs as u, Breadcrumb as
|
|
2
|
+
import { Breadcrumbs as u, Breadcrumb as d } from "react-aria-components";
|
|
3
3
|
import { c as e } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import '../assets/Breadcrumb.css';const
|
|
5
|
-
container:
|
|
4
|
+
import '../assets/Breadcrumb.css';const p = "_container_14dns_1", l = "_separator_14dns_20", n = {
|
|
5
|
+
container: p,
|
|
6
6
|
separator: l
|
|
7
7
|
}, f = ({
|
|
8
8
|
className: a,
|
|
@@ -10,23 +10,23 @@ import '../assets/Breadcrumb.css';const d = "_container_zw1qy_1", l = "_separato
|
|
|
10
10
|
}) => /* @__PURE__ */ s(
|
|
11
11
|
u,
|
|
12
12
|
{
|
|
13
|
-
className: e(
|
|
13
|
+
className: e(n.container, a),
|
|
14
14
|
...r
|
|
15
15
|
}
|
|
16
16
|
), x = ({
|
|
17
17
|
className: a,
|
|
18
18
|
children: r,
|
|
19
|
-
...
|
|
19
|
+
...o
|
|
20
20
|
}) => /* @__PURE__ */ s(
|
|
21
|
-
|
|
21
|
+
d,
|
|
22
22
|
{
|
|
23
23
|
className: e(a),
|
|
24
|
-
...
|
|
24
|
+
...o,
|
|
25
25
|
children: (t) => {
|
|
26
|
-
const
|
|
26
|
+
const c = !t.isCurrent;
|
|
27
27
|
return /* @__PURE__ */ m(i, { children: [
|
|
28
28
|
typeof r == "function" ? r(t) : r,
|
|
29
|
-
|
|
29
|
+
c ? /* @__PURE__ */ s("span", { "aria-hidden": "true", className: n.separator, children: "/" }) : null
|
|
30
30
|
] });
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { c as g } from "./clsx-AexbMWKp.js";
|
|
3
|
+
import { B as h } from "./Button-BhIvfqOc.js";
|
|
4
|
+
import { F as k } from "./FeedbackStatusIcon-X9Bjgeta.js";
|
|
5
|
+
import { useControlledState as x } from "@react-stately/utils";
|
|
6
|
+
import { X as B } from "./x-B9bYxG31.js";
|
|
7
|
+
import { u as N } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
8
|
+
import '../assets/InfoBanner.css';const b = "_infoBanner_8niki_1", v = "_success_8niki_11", I = "_info_8niki_1", S = "_important_8niki_21", w = "_warning_8niki_26", C = "_content_8niki_40", F = "_heading_8niki_46", O = "_text_8niki_51", j = "_icon_8niki_66", z = "_dismissable_8niki_75", n = {
|
|
9
|
+
infoBanner: b,
|
|
10
|
+
success: v,
|
|
11
|
+
info: I,
|
|
12
|
+
important: S,
|
|
13
|
+
warning: w,
|
|
14
|
+
content: C,
|
|
15
|
+
heading: F,
|
|
16
|
+
text: O,
|
|
17
|
+
icon: j,
|
|
18
|
+
dismissable: z
|
|
19
|
+
}, L = { close: "Close" }, P = { close: "Stäng" }, X = {
|
|
20
|
+
en: L,
|
|
21
|
+
sv: P
|
|
22
|
+
}, J = ({
|
|
23
|
+
title: e,
|
|
24
|
+
message: a,
|
|
25
|
+
type: o,
|
|
26
|
+
children: c,
|
|
27
|
+
isDismissable: r = !1,
|
|
28
|
+
defaultOpen: l = !0,
|
|
29
|
+
isOpen: m,
|
|
30
|
+
onOpenChange: _,
|
|
31
|
+
...t
|
|
32
|
+
}) => {
|
|
33
|
+
const [d, f] = x(
|
|
34
|
+
m,
|
|
35
|
+
l,
|
|
36
|
+
_
|
|
37
|
+
), u = N(X), p = () => {
|
|
38
|
+
f(!1);
|
|
39
|
+
};
|
|
40
|
+
return d ? /* @__PURE__ */ i(
|
|
41
|
+
"aside",
|
|
42
|
+
{
|
|
43
|
+
...t,
|
|
44
|
+
className: g(n.infoBanner, n[o], t.className),
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ s(
|
|
47
|
+
k,
|
|
48
|
+
{
|
|
49
|
+
"aria-hidden": !0,
|
|
50
|
+
className: n.icon,
|
|
51
|
+
status: o
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ i("div", { className: n.content, children: [
|
|
55
|
+
e && /* @__PURE__ */ s("strong", { className: n.heading, children: e }),
|
|
56
|
+
/* @__PURE__ */ i("div", { className: n.text, children: [
|
|
57
|
+
a,
|
|
58
|
+
c
|
|
59
|
+
] })
|
|
60
|
+
] }),
|
|
61
|
+
r && /* @__PURE__ */ s("div", { className: n.dismissable, children: /* @__PURE__ */ s(
|
|
62
|
+
h,
|
|
63
|
+
{
|
|
64
|
+
variant: "icon",
|
|
65
|
+
"aria-label": u.format("close"),
|
|
66
|
+
onPress: p,
|
|
67
|
+
children: /* @__PURE__ */ s(B, { size: 20 })
|
|
68
|
+
}
|
|
69
|
+
) })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
) : null;
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
J as I
|
|
76
|
+
};
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { A as s, a as p } from "./chunks/AccordionItem-BuUIdVd_.js";
|
|
3
3
|
import { B as m, a as i } from "./chunks/BadgeContainer-CKVsfTlF.js";
|
|
4
|
-
import { B as n, a as d } from "./chunks/Breadcrumb-
|
|
4
|
+
import { B as n, a as d } from "./chunks/Breadcrumb-Bs836gOn.js";
|
|
5
5
|
import { B as c } from "./chunks/Button-BhIvfqOc.js";
|
|
6
6
|
import { B as u } from "./chunks/ButtonGroup-Dr6HOBo2.js";
|
|
7
7
|
import { C as B, R as C } from "./chunks/RangeCalendar-LheFd9WF.js";
|
|
@@ -19,7 +19,7 @@ import { D as X, F as Y } from "./chunks/FileUpload-Cu8DCSjX.js";
|
|
|
19
19
|
import { G as $ } from "./chunks/Grid-CettmpaZ.js";
|
|
20
20
|
import { G as ao } from "./chunks/GridItem-z7zclNdT.js";
|
|
21
21
|
import { H as eo } from "./chunks/Heading-nfcRc2QF.js";
|
|
22
|
-
import { I as so } from "./chunks/InfoBanner-
|
|
22
|
+
import { I as so } from "./chunks/InfoBanner-D_pwTOHH.js";
|
|
23
23
|
import { L as xo } from "./chunks/Label-s4J9sYdy.js";
|
|
24
24
|
import { H as io, L as fo, N as no, S as To, a as co } from "./chunks/Layout-hXzqx4cY.js";
|
|
25
25
|
import { L as uo } from "./chunks/Link-rqGQvFQq.js";
|
|
@@ -49,7 +49,7 @@ import { c as Na } from "./chunks/clsx-AexbMWKp.js";
|
|
|
49
49
|
import { DialogTrigger as za, MenuTrigger as Oa, RouterProvider as Qa } from "react-aria-components";
|
|
50
50
|
import { u as Za } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
|
|
51
51
|
import { useToastState as qa } from "react-stately";
|
|
52
|
-
const o = "17.
|
|
52
|
+
const o = "17.5.1", a = {
|
|
53
53
|
version: o
|
|
54
54
|
}, r = a.version;
|
|
55
55
|
export {
|
package/info-banner/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsxs as e, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import * as h from "react";
|
|
3
|
-
import { c as j } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import { B as x } from "./Button-BhIvfqOc.js";
|
|
5
|
-
import { F as B } from "./FeedbackStatusIcon-X9Bjgeta.js";
|
|
6
|
-
import { X as N } from "./x-B9bYxG31.js";
|
|
7
|
-
import { u as b } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
8
|
-
import '../assets/InfoBanner.css';const v = "_infoBanner_1oj11_1", S = "_success_1oj11_11", w = "_info_1oj11_1", C = "_important_1oj11_21", F = "_warning_1oj11_26", I = "_content_1oj11_40", z = "_heading_1oj11_46", O = "_text_1oj11_51", k = "_icon_1oj11_57", y = "_dismissable_1oj11_66", s = {
|
|
9
|
-
infoBanner: v,
|
|
10
|
-
success: S,
|
|
11
|
-
info: w,
|
|
12
|
-
important: C,
|
|
13
|
-
warning: F,
|
|
14
|
-
content: I,
|
|
15
|
-
heading: z,
|
|
16
|
-
text: O,
|
|
17
|
-
icon: k,
|
|
18
|
-
dismissable: y
|
|
19
|
-
}, L = { close: "Close" }, P = { close: "Stäng" }, R = {
|
|
20
|
-
en: L,
|
|
21
|
-
sv: P
|
|
22
|
-
}, H = ({
|
|
23
|
-
title: t,
|
|
24
|
-
message: r,
|
|
25
|
-
type: i,
|
|
26
|
-
children: l,
|
|
27
|
-
isDismissable: m = !1,
|
|
28
|
-
defaultOpen: _ = !0,
|
|
29
|
-
isOpen: a,
|
|
30
|
-
onOpenChange: d,
|
|
31
|
-
...c
|
|
32
|
-
}) => {
|
|
33
|
-
const o = typeof a < "u", [f, u] = h.useState(_), p = b(R), g = () => {
|
|
34
|
-
d?.(!1), o || u(!1);
|
|
35
|
-
};
|
|
36
|
-
return o && a || !o && f ? /* @__PURE__ */ e(
|
|
37
|
-
"div",
|
|
38
|
-
{
|
|
39
|
-
...c,
|
|
40
|
-
className: j(s.infoBanner, s[i], c.className),
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ n(
|
|
43
|
-
B,
|
|
44
|
-
{
|
|
45
|
-
"aria-hidden": !0,
|
|
46
|
-
className: s.icon,
|
|
47
|
-
status: i
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
/* @__PURE__ */ e("div", { className: s.content, children: [
|
|
51
|
-
t && /* @__PURE__ */ n("strong", { className: s.heading, children: t }),
|
|
52
|
-
/* @__PURE__ */ e("div", { className: s.text, children: [
|
|
53
|
-
r,
|
|
54
|
-
l
|
|
55
|
-
] })
|
|
56
|
-
] }),
|
|
57
|
-
m && /* @__PURE__ */ n("div", { className: s.dismissable, children: /* @__PURE__ */ n(
|
|
58
|
-
x,
|
|
59
|
-
{
|
|
60
|
-
variant: "icon",
|
|
61
|
-
"aria-label": p.format("close"),
|
|
62
|
-
onPress: g,
|
|
63
|
-
children: /* @__PURE__ */ n(N, { size: 20 })
|
|
64
|
-
}
|
|
65
|
-
) })
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
) : null;
|
|
69
|
-
};
|
|
70
|
-
export {
|
|
71
|
-
H as I
|
|
72
|
-
};
|