@midas-ds/components 17.7.2 → 17.7.3

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,9 @@
1
+ ## 17.7.3 (2026-03-10)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **components, tag:** adjust vertical padding when using inline svg ([8258205085](https://github.com/migrationsverket/midas/commit/8258205085))
6
+
1
7
  ## 17.7.2 (2026-03-10)
2
8
 
3
9
  ### 🧱 Updated Dependencies
@@ -1 +1 @@
1
- ._button_13asj_1{color:var(--midas-icon-primary);padding:var(--midas-space-xsmall)!important;border-radius:1.5rem}._button_13asj_1[data-hovered]{background-color:var(--midas-button-icon-hover)}._button_13asj_1[data-pressed]{background-color:var(--midas-button-icon-active)}._button_13asj_1._green_13asj_14[data-hovered],._button_13asj_1._red_13asj_15[data-hovered],._button_13asj_1._blue_13asj_16[data-hovered],._button_13asj_1._yellow_13asj_17[data-hovered]{background-color:var(--midas-button-icon-hover)}._button_13asj_1._green_13asj_14[data-pressed],._button_13asj_1._red_13asj_15[data-pressed],._button_13asj_1._blue_13asj_16[data-pressed],._button_13asj_1._yellow_13asj_17[data-pressed]{background-color:var(--midas-button-icon-active)}._tag_13asj_29{align-items:center;background-color:var(--midas-field-01-base);border-color:var(--midas-border-color-primary);border-radius:1.25rem;border-style:solid;border-width:1px;color:var(--midas-text-primary);display:inline-flex;font-family:var(--midas-typography-font-family);font-size:.875rem}._tag_13asj_29._green_13asj_14{background-color:var(--midas-tag-green-background);border-color:var(--midas-tag-green-border-color)}._tag_13asj_29._blue_13asj_16{background-color:var(--midas-tag-blue-background);border-color:var(--midas-tag-blue-border-color)}._tag_13asj_29._yellow_13asj_17{background-color:var(--midas-tag-yellow-background);border-color:var(--midas-tag-yellow-border-color)}._tag_13asj_29._red_13asj_15{background-color:var(--midas-tag-red-background);border-color:var(--midas-tag-red-border-color)}._tag_13asj_29[data-disabled]{background-color:var(--midas-field-01-base);border-color:var(--midas-border-color-disabled);color:var(--midas-text-disabled);cursor:not-allowed}._tag_13asj_29[data-focused],._tag_13asj_29[data-focus-visible]{outline:none}._tag_13asj_29[data-focus-visible]{box-shadow:var(--midas-state-focus)}@media(forced-colors:active){._tag_13asj_29[data-focus-visible]{outline:3px solid highlight;outline-offset:2px}}._tagText_13asj_83{align-items:center;display:flex;gap:var(--midas-space-xsmall);line-height:var(--midas-typography-line-height-20);padding:7px var(--midas-space-small)}._tagText_13asj_83 svg{width:var(--midas-size-icon-sm);height:var(--midas-size-icon-sm)}._dismissable_13asj_96 ._tagText_13asj_83{padding:var(--midas-space-30) var(--midas-space-10) var(--midas-space-30) var(--midas-space-small)}._tagList_17pz2_1{display:flex;flex-wrap:wrap;gap:var(--midas-space-xsmall)}
1
+ ._button_k5bh7_1{color:var(--midas-icon-primary);padding:var(--midas-space-xsmall)!important;border-radius:1.5rem;margin-left:var(--midas-space-10)}._button_k5bh7_1[data-hovered]{background-color:var(--midas-button-icon-hover)}._button_k5bh7_1[data-pressed]{background-color:var(--midas-button-icon-active)}._button_k5bh7_1._green_k5bh7_15[data-hovered],._button_k5bh7_1._red_k5bh7_16[data-hovered],._button_k5bh7_1._blue_k5bh7_17[data-hovered],._button_k5bh7_1._yellow_k5bh7_18[data-hovered]{background-color:var(--midas-button-icon-hover)}._button_k5bh7_1._green_k5bh7_15[data-pressed],._button_k5bh7_1._red_k5bh7_16[data-pressed],._button_k5bh7_1._blue_k5bh7_17[data-pressed],._button_k5bh7_1._yellow_k5bh7_18[data-pressed]{background-color:var(--midas-button-icon-active)}._tag_k5bh7_30{align-items:center;background-color:var(--midas-field-01-base);border-color:var(--midas-border-color-primary);border-radius:1.25rem;border-style:solid;border-width:1px;color:var(--midas-text-primary);display:inline-flex;font-family:var(--midas-typography-font-family);font-size:var(--midas-typography-font-size-20);line-height:var(--midas-typography-line-height-20)}._tag_k5bh7_30._green_k5bh7_15{background-color:var(--midas-tag-green-background);border-color:var(--midas-tag-green-border-color)}._tag_k5bh7_30._blue_k5bh7_17{background-color:var(--midas-tag-blue-background);border-color:var(--midas-tag-blue-border-color)}._tag_k5bh7_30._yellow_k5bh7_18{background-color:var(--midas-tag-yellow-background);border-color:var(--midas-tag-yellow-border-color)}._tag_k5bh7_30._red_k5bh7_16{background-color:var(--midas-tag-red-background);border-color:var(--midas-tag-red-border-color)}._tag_k5bh7_30[data-disabled]{background-color:var(--midas-field-01-base);border-color:var(--midas-border-color-disabled);color:var(--midas-text-disabled);cursor:not-allowed}._tag_k5bh7_30[data-focused],._tag_k5bh7_30[data-focus-visible]{outline:none}._tag_k5bh7_30[data-focus-visible]{box-shadow:var(--midas-state-focus)}@media(forced-colors:active){._tag_k5bh7_30[data-focus-visible]{outline:3px solid highlight;outline-offset:2px}}._tagText_k5bh7_85{align-items:center;display:flex;gap:var(--midas-space-xsmall);padding:5px var(--midas-space-small);height:var(--midas-size-icon-sm)}._tagText_k5bh7_85 svg{width:var(--midas-size-icon-sm);height:var(--midas-size-icon-sm)}._dismissable_k5bh7_98 ._tagText_k5bh7_85{padding:5px 0 5px var(--midas-space-small)}._tagList_17pz2_1{display:flex;flex-wrap:wrap;gap:var(--midas-space-xsmall)}
@@ -12,7 +12,7 @@ import { useFocusManager as L } from "react-aria";
12
12
  import { X as I } from "./x-B9bYxG31.js";
13
13
  import { L as G } from "./ListBox-CDlOUvzJ.js";
14
14
  import { P as j } from "./Popover-CaP4LFhg.js";
15
- import { a as k, T as R } from "./TagGroup-CkjoxLIy.js";
15
+ import { a as k, T as R } from "./TagGroup-CntiwvfQ.js";
16
16
  import { C as $ } from "./chevron-down-BBFYYzZq.js";
17
17
  import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", selected: "selected" }, z = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", selected: "valda" }, u = {
18
18
  en: w,
@@ -0,0 +1,97 @@
1
+ import { jsx as i, jsxs as u, Fragment as b } from "react/jsx-runtime";
2
+ import { Tag as T, composeRenderProps as f, useContextProps as d, TagListContext as h, TagList as p, TagGroupContext as x, TagGroup as L } from "react-aria-components";
3
+ import { B as v } from "./Button-BhIvfqOc.js";
4
+ import { c } from "./clsx-AexbMWKp.js";
5
+ import { X as y } from "./x-B9bYxG31.js";
6
+ import { forwardRef as _, Children as N, isValidElement as k } from "react";
7
+ import '../assets/TagGroup.css';const w = "_button_k5bh7_1", G = "_green_k5bh7_15", C = "_red_k5bh7_16", R = "_blue_k5bh7_17", V = "_yellow_k5bh7_18", $ = "_tag_k5bh7_30", z = "_tagText_k5bh7_85", E = "_dismissable_k5bh7_98", a = {
8
+ button: w,
9
+ green: G,
10
+ red: C,
11
+ blue: R,
12
+ yellow: V,
13
+ tag: $,
14
+ tagText: z,
15
+ dismissable: E
16
+ }, q = ({
17
+ className: r,
18
+ color: e,
19
+ dismissable: o = !1,
20
+ isDismissable: t,
21
+ type: s,
22
+ ...n
23
+ }) => {
24
+ const g = t || typeof t > "u" && o;
25
+ return /* @__PURE__ */ i(
26
+ T,
27
+ {
28
+ className: c(
29
+ a.tag,
30
+ g && a.dismissable,
31
+ {
32
+ [a.green]: e ? e === "green" : s === "success",
33
+ [a.blue]: e ? e === "blue" : s === "info",
34
+ [a.yellow]: e ? e === "yellow" : s === "important",
35
+ [a.red]: e ? e === "red" : s === "warning"
36
+ },
37
+ r
38
+ ),
39
+ ...n,
40
+ textValue: n.textValue || (typeof n.children == "string" ? n.children : void 0),
41
+ children: f(n.children, (l) => /* @__PURE__ */ u(b, { children: [
42
+ /* @__PURE__ */ i("div", { className: a.tagText, children: l }),
43
+ g && /* @__PURE__ */ i(
44
+ v,
45
+ {
46
+ variant: "icon",
47
+ size: "medium",
48
+ className: a.button,
49
+ slot: "remove",
50
+ children: /* @__PURE__ */ i(y, { size: 20 })
51
+ }
52
+ )
53
+ ] }))
54
+ }
55
+ );
56
+ }, j = "_tagList_17pz2_1", B = {
57
+ tagList: j
58
+ }, P = (r, e) => {
59
+ const [{ className: o, ...t }, s] = d(
60
+ r,
61
+ e,
62
+ h
63
+ );
64
+ return /* @__PURE__ */ i(
65
+ p,
66
+ {
67
+ className: c(o, B.tagList),
68
+ ref: s,
69
+ ...t
70
+ }
71
+ );
72
+ }, m = _(P), A = _(
73
+ (r, e) => {
74
+ const [{ className: o, children: t, ...s }, n] = d(
75
+ r,
76
+ e,
77
+ x
78
+ ), g = N.toArray(t).filter(k).find((l) => l.type === m);
79
+ return !g && process.env.NODE_ENV === "development" && console.warn(
80
+ "Using a TagGroup without providing a TagList component is deprecated since v17.0.0, see: https://designsystem.migrationsverket.se/components/tag/"
81
+ ), /* @__PURE__ */ i(
82
+ L,
83
+ {
84
+ className: c(o),
85
+ ref: n,
86
+ ...s,
87
+ children: g ? t : /* @__PURE__ */ i(m, { children: t })
88
+ }
89
+ );
90
+ }
91
+ );
92
+ A.displayName = "TagGroup";
93
+ export {
94
+ q as T,
95
+ A as a,
96
+ m as b
97
+ };
package/index.js CHANGED
@@ -30,12 +30,12 @@ import { P as Ro } from "./chunks/Popover-CaP4LFhg.js";
30
30
  import { P as Po } from "./chunks/ProgressBar-BGBPAJCv.js";
31
31
  import { R as vo, a as Fo } from "./chunks/Radio-DebU3D38.js";
32
32
  import { S as Ao } from "./chunks/SearchField-1DYv0w4b.js";
33
- import { S as Ho } from "./chunks/Select-BkLLrCh-.js";
33
+ import { S as Ho } from "./chunks/Select-YGQv4Oxx.js";
34
34
  import { S as Eo } from "./chunks/Skeleton-D6mxKxuu.js";
35
35
  import { S as wo } from "./chunks/Spinner-CfKMn18u.js";
36
36
  import { C as Oo, a as Qo, R as Vo, T as Zo, b as jo, c as qo } from "./chunks/Table-Bg-AKi7d.js";
37
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-CkjoxLIy.js";
38
+ import { T as _o, a as $o, b as oa } from "./chunks/TagGroup-CntiwvfQ.js";
39
39
  import { T as ra } from "./chunks/Text-D0r_W4lH.js";
40
40
  import { I as ta, T as sa, a as pa, b as xa } from "./chunks/TextArea-BL0NbUHd.js";
41
41
  import { G as ia, T as na, a as fa, b as da, t as Ta } from "./chunks/Toast-Cxm230CK.js";
@@ -49,7 +49,7 @@ import { c as wa } from "./chunks/clsx-AexbMWKp.js";
49
49
  import { DialogTrigger as Oa, MenuTrigger as Qa, RouterProvider as Va } from "react-aria-components";
50
50
  import { u as ja } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
51
51
  import { useToastState as Ja } from "react-stately";
52
- const o = "17.7.2", a = {
52
+ const o = "17.7.3", a = {
53
53
  version: o
54
54
  }, r = a.version;
55
55
  export {
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.7.2",
17
+ "version": "17.7.3",
18
18
  "module": "./index.js",
19
19
  "type": "module",
20
20
  "main": "./index.js",
package/select/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as r } from "../chunks/Select-BkLLrCh-.js";
1
+ import { S as r } from "../chunks/Select-YGQv4Oxx.js";
2
2
  export {
3
3
  r as Select
4
4
  };
package/tag/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { T, a as g, b as o } from "../chunks/TagGroup-CkjoxLIy.js";
1
+ import { T, a as g, b as o } from "../chunks/TagGroup-CntiwvfQ.js";
2
2
  export {
3
3
  T as Tag,
4
4
  g as TagGroup,
@@ -1,97 +0,0 @@
1
- import { jsx as i, jsxs as u, Fragment as T } from "react/jsx-runtime";
2
- import { Tag as f, composeRenderProps as p, useContextProps as d, TagListContext as b, TagList as x, TagGroupContext as h, TagGroup as L } from "react-aria-components";
3
- import { B as j } from "./Button-BhIvfqOc.js";
4
- import { c } from "./clsx-AexbMWKp.js";
5
- import { X as v } from "./x-B9bYxG31.js";
6
- import { forwardRef as _, Children as y, isValidElement as N } from "react";
7
- import '../assets/TagGroup.css';const w = "_button_13asj_1", G = "_green_13asj_14", C = "_red_13asj_15", R = "_blue_13asj_16", V = "_yellow_13asj_17", $ = "_tag_13asj_29", z = "_tagText_13asj_83", E = "_dismissable_13asj_96", a = {
8
- button: w,
9
- green: G,
10
- red: C,
11
- blue: R,
12
- yellow: V,
13
- tag: $,
14
- tagText: z,
15
- dismissable: E
16
- }, q = ({
17
- className: r,
18
- color: e,
19
- dismissable: o = !1,
20
- isDismissable: s,
21
- type: t,
22
- ...n
23
- }) => {
24
- const g = s || typeof s > "u" && o;
25
- return /* @__PURE__ */ i(
26
- f,
27
- {
28
- className: c(
29
- a.tag,
30
- g && a.dismissable,
31
- {
32
- [a.green]: e ? e === "green" : t === "success",
33
- [a.blue]: e ? e === "blue" : t === "info",
34
- [a.yellow]: e ? e === "yellow" : t === "important",
35
- [a.red]: e ? e === "red" : t === "warning"
36
- },
37
- r
38
- ),
39
- ...n,
40
- textValue: n.textValue || (typeof n.children == "string" ? n.children : void 0),
41
- children: p(n.children, (l) => /* @__PURE__ */ u(T, { children: [
42
- /* @__PURE__ */ i("div", { className: a.tagText, children: l }),
43
- g && /* @__PURE__ */ i(
44
- j,
45
- {
46
- variant: "icon",
47
- size: "medium",
48
- className: a.button,
49
- slot: "remove",
50
- children: /* @__PURE__ */ i(v, { size: 20 })
51
- }
52
- )
53
- ] }))
54
- }
55
- );
56
- }, B = "_tagList_17pz2_1", P = {
57
- tagList: B
58
- }, k = (r, e) => {
59
- const [{ className: o, ...s }, t] = d(
60
- r,
61
- e,
62
- b
63
- );
64
- return /* @__PURE__ */ i(
65
- x,
66
- {
67
- className: c(o, P.tagList),
68
- ref: t,
69
- ...s
70
- }
71
- );
72
- }, m = _(k), A = _(
73
- (r, e) => {
74
- const [{ className: o, children: s, ...t }, n] = d(
75
- r,
76
- e,
77
- h
78
- ), g = y.toArray(s).filter(N).find((l) => l.type === m);
79
- return !g && process.env.NODE_ENV === "development" && console.warn(
80
- "Using a TagGroup without providing a TagList component is deprecated since v17.0.0, see: https://designsystem.migrationsverket.se/components/tag/"
81
- ), /* @__PURE__ */ i(
82
- L,
83
- {
84
- className: c(o),
85
- ref: n,
86
- ...t,
87
- children: g ? s : /* @__PURE__ */ i(m, { children: s })
88
- }
89
- );
90
- }
91
- );
92
- A.displayName = "TagGroup";
93
- export {
94
- q as T,
95
- A as a,
96
- m as b
97
- };