@midas-ds/components 17.7.0 → 17.7.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,10 @@
1
+ ## 17.7.1 (2026-03-10)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **components, select:** merge provided popover styles ([a381092486](https://github.com/migrationsverket/midas/commit/a381092486))
6
+ - **components, tag:** adjust size of inline svgs ([d668bfdf77](https://github.com/migrationsverket/midas/commit/d668bfdf77))
7
+
1
8
  ## 17.7.0 (2026-03-10)
2
9
 
3
10
  ### 🚀 Features
@@ -1 +1 @@
1
- ._button_n1r4c_1{color:var(--midas-icon-primary);padding:var(--midas-space-xsmall)!important;border-radius:1.5rem}._button_n1r4c_1[data-hovered]{background-color:var(--midas-button-icon-hover)}._button_n1r4c_1[data-pressed]{background-color:var(--midas-button-icon-active)}._button_n1r4c_1._green_n1r4c_14[data-hovered],._button_n1r4c_1._red_n1r4c_15[data-hovered],._button_n1r4c_1._blue_n1r4c_16[data-hovered],._button_n1r4c_1._yellow_n1r4c_17[data-hovered]{background-color:var(--midas-button-icon-hover)}._button_n1r4c_1._green_n1r4c_14[data-pressed],._button_n1r4c_1._red_n1r4c_15[data-pressed],._button_n1r4c_1._blue_n1r4c_16[data-pressed],._button_n1r4c_1._yellow_n1r4c_17[data-pressed]{background-color:var(--midas-button-icon-active)}._tag_n1r4c_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_n1r4c_29._green_n1r4c_14{background-color:var(--midas-tag-green-background);border-color:var(--midas-tag-green-border-color)}._tag_n1r4c_29._blue_n1r4c_16{background-color:var(--midas-tag-blue-background);border-color:var(--midas-tag-blue-border-color)}._tag_n1r4c_29._yellow_n1r4c_17{background-color:var(--midas-tag-yellow-background);border-color:var(--midas-tag-yellow-border-color)}._tag_n1r4c_29._red_n1r4c_15{background-color:var(--midas-tag-red-background);border-color:var(--midas-tag-red-border-color)}._tag_n1r4c_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_n1r4c_29[data-focused],._tag_n1r4c_29[data-focus-visible]{outline:none}._tag_n1r4c_29[data-focus-visible]{box-shadow:var(--midas-state-focus)}@media(forced-colors:active){._tag_n1r4c_29[data-focus-visible]{outline:3px solid highlight;outline-offset:2px}}._tagText_n1r4c_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)}._dismissable_n1r4c_91 ._tagText_n1r4c_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_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,27 +1,27 @@
1
- import { jsx as e, Fragment as A, jsxs as i } from "react/jsx-runtime";
2
- import { SelectStateContext as d, SelectValue as g, Button as _, TagList as C, Select as N } from "react-aria-components";
3
- import { FocusScope as x } from "@react-aria/focus";
4
- import { a as b, L as T } from "./Label-Bhnpbs10.js";
5
- import { a as y, c as B } from "./clsx-AexbMWKp.js";
1
+ import { jsx as e, Fragment as C, jsxs as i } from "react/jsx-runtime";
2
+ import { SelectStateContext as d, SelectValue as f, Button as p, TagList as N, Select as x } from "react-aria-components";
3
+ import { FocusScope as b } from "@react-aria/focus";
4
+ import { a as T, L as y } from "./Label-Bhnpbs10.js";
5
+ import { a as B, c as g } from "./clsx-AexbMWKp.js";
6
6
  import { T as M } from "./Text-D0r_W4lH.js";
7
- import { F as h } from "./FieldError-krpMBtie.js";
8
- import p, { useContext as f } from "react";
7
+ import { F as _ } from "./FieldError-krpMBtie.js";
8
+ import S, { useContext as V } from "react";
9
9
  import { C as F } from "./Checkbox-sAkQe7Q9.js";
10
10
  import { u as m } from "./useLocalizedStringFormatter-BHvsRxDk.js";
11
11
  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-Bfh6x6iQ.js";
15
+ import { a as k, T as R } from "./TagGroup-CkjoxLIy.js";
16
16
  import { C as $ } from "./chevron-down-BBFYYzZq.js";
17
- import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", selected: "selected" }, P = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", selected: "valda" }, u = {
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,
19
- sv: P
20
- }, z = "_select_1h0s2_1", D = "_triggerContainer_1h0s2_7", E = "_trigger_1h0s2_7", K = "_medium_1h0s2_29", W = "_icon_1h0s2_66", X = "_selectValue_1h0s2_72", q = "_placeholder_1h0s2_78", H = "_multiSelectValue_1h0s2_88", J = "_selectValueTag_1h0s2_112", O = "_clearButton_1h0s2_126", Q = "_truncate_1h0s2_138", U = "_popover_1h0s2_175", Y = "_selectAll_1h0s2_201", Z = "_tagGroup_1h0s2_269", s = {
21
- select: z,
22
- triggerContainer: D,
23
- trigger: E,
24
- medium: K,
19
+ sv: z
20
+ }, D = "_select_1h0s2_1", E = "_triggerContainer_1h0s2_7", K = "_trigger_1h0s2_7", P = "_medium_1h0s2_29", W = "_icon_1h0s2_66", X = "_selectValue_1h0s2_72", q = "_placeholder_1h0s2_78", H = "_multiSelectValue_1h0s2_88", J = "_selectValueTag_1h0s2_112", O = "_clearButton_1h0s2_126", Q = "_truncate_1h0s2_138", U = "_popover_1h0s2_175", Y = "_selectAll_1h0s2_201", Z = "_tagGroup_1h0s2_269", a = {
21
+ select: D,
22
+ triggerContainer: E,
23
+ trigger: K,
24
+ medium: P,
25
25
  icon: W,
26
26
  selectValue: X,
27
27
  placeholder: q,
@@ -33,7 +33,7 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
33
33
  selectAll: Y,
34
34
  tagGroup: Z
35
35
  }, ee = () => {
36
- const t = p.useContext(d), c = m(u), r = () => {
36
+ const t = S.useContext(d), c = m(u), r = () => {
37
37
  t?.setValue(
38
38
  t?.selectionManager.isSelectAll ? null : Array.from(t.collection.getKeys())
39
39
  ), t?.commitValidation();
@@ -41,7 +41,7 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
41
41
  return /* @__PURE__ */ e(
42
42
  F,
43
43
  {
44
- className: s.selectAll,
44
+ className: a.selectAll,
45
45
  isIndeterminate: !t?.selectionManager.isSelectAll && !t?.selectionManager.isEmpty,
46
46
  isSelected: t?.selectionManager.isSelectAll,
47
47
  onChange: r,
@@ -51,19 +51,19 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
51
51
  }, te = ({
52
52
  isDisabled: t
53
53
  }) => {
54
- const c = m(u), r = (l, o) => l.length === 1 ? o : `${l.length} ${c.format("selected")}`;
54
+ const c = m(u), r = (l, n) => l.length === 1 ? n : `${l.length} ${c.format("selected")}`;
55
55
  return /* @__PURE__ */ e(
56
- g,
56
+ f,
57
57
  {
58
- className: s.multiSelectValue,
58
+ className: a.multiSelectValue,
59
59
  "data-disabled": t || void 0,
60
- children: ({ isPlaceholder: l, selectedItems: o, selectedText: a }) => l ? /* @__PURE__ */ e(A, {}) : /* @__PURE__ */ i(
60
+ children: ({ isPlaceholder: l, selectedItems: n, selectedText: s }) => l ? /* @__PURE__ */ e(C, {}) : /* @__PURE__ */ i(
61
61
  "div",
62
62
  {
63
- className: s.selectValueTag,
63
+ className: a.selectValueTag,
64
64
  "data-disabled": t || void 0,
65
65
  children: [
66
- /* @__PURE__ */ e("span", { className: s.truncate, children: r(o, a) }),
66
+ /* @__PURE__ */ e("span", { className: a.truncate, children: r(n, s) }),
67
67
  /* @__PURE__ */ e(le, { isDisabled: t })
68
68
  ]
69
69
  }
@@ -73,15 +73,15 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
73
73
  }, le = ({
74
74
  isDisabled: t
75
75
  }) => {
76
- const c = p.useContext(d), r = m(u), l = L(), o = () => {
76
+ const c = S.useContext(d), r = m(u), l = L(), n = () => {
77
77
  l?.focusFirst(), c?.setValue(null);
78
78
  };
79
79
  return /* @__PURE__ */ e(
80
- _,
80
+ p,
81
81
  {
82
82
  "aria-label": r.format("clearAll"),
83
- className: s.clearButton,
84
- onPress: o,
83
+ className: a.clearButton,
84
+ onPress: n,
85
85
  slot: null,
86
86
  isDisabled: t,
87
87
  children: /* @__PURE__ */ e(
@@ -93,63 +93,63 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
93
93
  )
94
94
  }
95
95
  );
96
- }, se = ({
96
+ }, ae = ({
97
97
  showTags: t,
98
98
  isDisabled: c
99
99
  }) => {
100
- const r = m(u), l = f(d), o = (a) => {
101
- l?.selectionManager.toggleSelection(Array.from(a)[0]);
100
+ const r = m(u), l = V(d), n = (s) => {
101
+ l?.selectionManager.toggleSelection(Array.from(s)[0]);
102
102
  };
103
103
  return !l?.selectedItems.length || !t ? null : /* @__PURE__ */ e(
104
104
  k,
105
105
  {
106
106
  "aria-label": r.format("selectedItems"),
107
- className: s.tagGroup,
108
- onRemove: o,
107
+ className: a.tagGroup,
108
+ onRemove: n,
109
109
  selectionBehavior: "toggle",
110
- children: /* @__PURE__ */ e(C, { items: l.selectedItems, children: (a) => /* @__PURE__ */ e(
110
+ children: /* @__PURE__ */ e(N, { items: l.selectedItems, children: (s) => /* @__PURE__ */ e(
111
111
  R,
112
112
  {
113
113
  isDismissable: !0,
114
- id: a.key,
114
+ id: s.key,
115
115
  isDisabled: c,
116
- textValue: a.textValue,
117
- children: a.textValue
116
+ textValue: s.textValue,
117
+ children: s.textValue
118
118
  },
119
- a.key
119
+ s.key
120
120
  ) })
121
121
  }
122
122
  );
123
- }, ae = ({
123
+ }, se = ({
124
124
  isDisabled: t,
125
125
  selectionMode: c,
126
126
  size: r
127
127
  }) => {
128
- const l = f(d);
128
+ const l = V(d);
129
129
  return /* @__PURE__ */ i(
130
- _,
130
+ p,
131
131
  {
132
- className: y(
132
+ className: B(
133
133
  {
134
- [s.medium]: r === "medium"
134
+ [a.medium]: r === "medium"
135
135
  },
136
- s.trigger
136
+ a.trigger
137
137
  ),
138
138
  "data-invalid": !!l?.displayValidation.isInvalid || void 0,
139
139
  children: [
140
140
  /* @__PURE__ */ e(
141
- g,
141
+ f,
142
142
  {
143
- className: s.selectValue,
143
+ className: a.selectValue,
144
144
  "data-disabled": t || void 0,
145
- children: ({ selectedText: o, defaultChildren: a }) => /* @__PURE__ */ e("div", { className: s.placeholder, children: /* @__PURE__ */ e("span", { className: s.truncate, children: c === "multiple" && o ? null : o || a }) })
145
+ children: ({ selectedText: n, defaultChildren: s }) => /* @__PURE__ */ e("div", { className: a.placeholder, children: /* @__PURE__ */ e("span", { className: a.truncate, children: c === "multiple" && n ? null : n || s }) })
146
146
  }
147
147
  ),
148
148
  /* @__PURE__ */ e(
149
149
  "span",
150
150
  {
151
151
  "aria-hidden": "true",
152
- className: s.icon,
152
+ className: a.icon,
153
153
  children: /* @__PURE__ */ e($, { size: 20 })
154
154
  }
155
155
  )
@@ -162,61 +162,61 @@ function Ae({
162
162
  description: c,
163
163
  errorMessage: r,
164
164
  errorPosition: l = "top",
165
- items: o,
166
- label: a,
167
- popover: S,
168
- popoverProps: v,
169
- size: V = "large",
170
- ...n
165
+ items: n,
166
+ label: s,
167
+ popover: v,
168
+ popoverProps: h,
169
+ size: A = "large",
170
+ ...o
171
171
  }) {
172
- return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ i(
173
- N,
172
+ return /* @__PURE__ */ e(b, { children: /* @__PURE__ */ i(
173
+ x,
174
174
  {
175
- ...n,
176
- className: B(n.className, s.select),
175
+ ...o,
176
+ className: g(o.className, a.select),
177
177
  children: [
178
- /* @__PURE__ */ e(b, { popover: S, children: a && /* @__PURE__ */ e(T, { "data-disabled": n.isDisabled || void 0, children: a }) }),
178
+ /* @__PURE__ */ e(T, { popover: v, children: s && /* @__PURE__ */ e(y, { "data-disabled": o.isDisabled || void 0, children: s }) }),
179
179
  c && /* @__PURE__ */ e(M, { slot: "description", children: c }),
180
- l === "top" && /* @__PURE__ */ e(h, { children: r }),
180
+ l === "top" && /* @__PURE__ */ e(_, { children: r }),
181
181
  /* @__PURE__ */ i(
182
182
  "div",
183
183
  {
184
- className: s.triggerContainer,
185
- "data-disabled": n.isDisabled || void 0,
184
+ className: a.triggerContainer,
185
+ "data-disabled": o.isDisabled || void 0,
186
186
  children: [
187
187
  /* @__PURE__ */ e(
188
- ae,
188
+ se,
189
189
  {
190
- size: V,
191
- ...n
190
+ size: A,
191
+ ...o
192
192
  }
193
193
  ),
194
- n.selectionMode === "multiple" ? /* @__PURE__ */ e(te, { ...n }) : null
194
+ o.selectionMode === "multiple" ? /* @__PURE__ */ e(te, { ...o }) : null
195
195
  ]
196
196
  }
197
197
  ),
198
- l === "bottom" && /* @__PURE__ */ e(h, { children: r }),
198
+ l === "bottom" && /* @__PURE__ */ e(_, { children: r }),
199
199
  /* @__PURE__ */ i(
200
200
  j,
201
201
  {
202
- className: s.popover,
203
202
  offset: 0,
204
203
  hideArrow: !0,
205
- ...v,
204
+ ...h,
205
+ className: g(h?.className, a.popover),
206
206
  children: [
207
- n.isSelectableAll && /* @__PURE__ */ e(ee, {}),
207
+ o.isSelectableAll && /* @__PURE__ */ e(ee, {}),
208
208
  /* @__PURE__ */ e(
209
209
  G,
210
210
  {
211
211
  escapeKeyBehavior: "none",
212
- items: o,
212
+ items: n,
213
213
  children: t
214
214
  }
215
215
  )
216
216
  ]
217
217
  }
218
218
  ),
219
- /* @__PURE__ */ e(se, { ...n })
219
+ /* @__PURE__ */ e(ae, { ...o })
220
220
  ]
221
221
  }
222
222
  ) });
@@ -0,0 +1,97 @@
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
+ };
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-ClD5keNw.js";
33
+ import { S as Ho } from "./chunks/Select-BkLLrCh-.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-Bfh6x6iQ.js";
38
+ import { T as _o, a as $o, b as oa } from "./chunks/TagGroup-CkjoxLIy.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.0", a = {
52
+ const o = "17.7.1", 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.0",
17
+ "version": "17.7.1",
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-ClD5keNw.js";
1
+ import { S as r } from "../chunks/Select-BkLLrCh-.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-Bfh6x6iQ.js";
1
+ import { T, a as g, b as o } from "../chunks/TagGroup-CkjoxLIy.js";
2
2
  export {
3
3
  T as Tag,
4
4
  g as TagGroup,
@@ -1,97 +0,0 @@
1
- import { jsx as r, 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 v } from "./Button-BhIvfqOc.js";
4
- import { c as l } from "./clsx-AexbMWKp.js";
5
- import { X as y } from "./x-B9bYxG31.js";
6
- import { forwardRef as _, Children as N, isValidElement as w } from "react";
7
- import '../assets/TagGroup.css';const G = "_button_n1r4c_1", C = "_green_n1r4c_14", R = "_red_n1r4c_15", V = "_blue_n1r4c_16", $ = "_yellow_n1r4c_17", z = "_tag_n1r4c_29", E = "_tagText_n1r4c_83", j = "_dismissable_n1r4c_91", n = {
8
- button: G,
9
- green: C,
10
- red: R,
11
- blue: V,
12
- yellow: $,
13
- tag: z,
14
- tagText: E,
15
- dismissable: j
16
- }, q = ({
17
- className: i,
18
- color: e,
19
- dismissable: o = !1,
20
- isDismissable: t,
21
- type: s,
22
- ...a
23
- }) => {
24
- const c = t || typeof t > "u" && o;
25
- return /* @__PURE__ */ r(
26
- f,
27
- {
28
- className: l(
29
- n.tag,
30
- c && n.dismissable,
31
- {
32
- [n.green]: e ? e === "green" : s === "success",
33
- [n.blue]: e ? e === "blue" : s === "info",
34
- [n.yellow]: e ? e === "yellow" : s === "important",
35
- [n.red]: e ? e === "red" : s === "warning"
36
- },
37
- i
38
- ),
39
- ...a,
40
- textValue: a.textValue || (typeof a.children == "string" ? a.children : void 0),
41
- children: p(a.children, (g) => /* @__PURE__ */ u(T, { children: [
42
- /* @__PURE__ */ r("div", { className: n.tagText, children: g }),
43
- c && /* @__PURE__ */ r(
44
- v,
45
- {
46
- variant: "icon",
47
- size: "medium",
48
- className: n.button,
49
- slot: "remove",
50
- children: /* @__PURE__ */ r(y, { size: 20 })
51
- }
52
- )
53
- ] }))
54
- }
55
- );
56
- }, B = "_tagList_17pz2_1", P = {
57
- tagList: B
58
- }, k = (i, e) => {
59
- const [{ className: o, ...t }, s] = d(
60
- i,
61
- e,
62
- b
63
- );
64
- return /* @__PURE__ */ r(
65
- x,
66
- {
67
- className: l(o, P.tagList),
68
- ref: s,
69
- ...t
70
- }
71
- );
72
- }, m = _(k), A = _(
73
- (i, e) => {
74
- const [{ className: o, children: t, ...s }, a] = d(
75
- i,
76
- e,
77
- h
78
- ), c = N.toArray(t).filter(w).find((g) => g.type === m);
79
- return !c && 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__ */ r(
82
- L,
83
- {
84
- className: l(o),
85
- ref: a,
86
- ...s,
87
- children: c ? t : /* @__PURE__ */ r(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
- };