@midas-ds/components 17.6.5 → 17.7.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/assets/TagGroup.css +1 -1
  3. package/assets/default.css +1 -1
  4. package/checkbox/index.js +1 -1
  5. package/chunks/{CheckboxGroup-DGVV0X_Z.js → CheckboxGroup-C5JLzeJv.js} +1 -1
  6. package/chunks/{ColorSchemeSwitch-DkY8VTVR.js → ColorSchemeSwitch-D52V0sr3.js} +44 -43
  7. package/chunks/{ComboBox-Dx4GD2oe.js → ComboBox-I4tZIYpb.js} +1 -1
  8. package/chunks/{DateField-h3l0qG7u.js → DateField-cAJ_r2cj.js} +1 -1
  9. package/chunks/{DateRangePicker-X6gmcMdv.js → DateRangePicker-BGoKQCZf.js} +1 -1
  10. package/chunks/Label-Bhnpbs10.js +74 -0
  11. package/chunks/{Layout-CmKsh0kv.js → Layout-SqGyudO8.js} +1 -1
  12. package/chunks/{Logo-CCxPAmgw.js → Logo-DDykn5b2.js} +50 -43
  13. package/chunks/{ProgressBar-acc8946-.js → ProgressBar-BGBPAJCv.js} +1 -1
  14. package/chunks/{Radio-DjivEe-_.js → Radio-DebU3D38.js} +1 -1
  15. package/chunks/{Select-DZepyl5C.js → Select-ClD5keNw.js} +2 -2
  16. package/chunks/TagGroup-Bfh6x6iQ.js +97 -0
  17. package/chunks/{TextArea-CBRE_gsN.js → TextArea-BL0NbUHd.js} +1 -1
  18. package/color-scheme-switch/ColorSchemeSwitch.d.ts +1 -1
  19. package/color-scheme-switch/index.js +1 -1
  20. package/combobox/index.js +1 -1
  21. package/date-field/index.js +1 -1
  22. package/date-picker/index.js +1 -1
  23. package/index.js +101 -100
  24. package/label/index.js +1 -1
  25. package/layout/index.js +1 -1
  26. package/logo/LogoContext.d.ts +3 -0
  27. package/logo/index.d.ts +1 -0
  28. package/logo/index.js +3 -2
  29. package/package.json +2 -2
  30. package/progress-bar/index.js +1 -1
  31. package/radio/index.js +1 -1
  32. package/select/index.js +1 -1
  33. package/tag/Tag.stories.d.ts +1 -0
  34. package/tag/index.js +1 -1
  35. package/textfield/index.js +1 -1
  36. package/chunks/Label-s4J9sYdy.js +0 -73
  37. package/chunks/TagGroup-BscTXQ_E.js +0 -97
@@ -1,97 +0,0 @@
1
- import { jsx as i, jsxs as _, Fragment as u } from "react/jsx-runtime";
2
- import { Tag as T, 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 } from "./clsx-AexbMWKp.js";
5
- import { X as y } from "./x-B9bYxG31.js";
6
- import { forwardRef as f, Children as N, isValidElement as w } from "react";
7
- import '../assets/TagGroup.css';const q = "_button_f7q96_1", G = "_green_f7q96_16", C = "_red_f7q96_17", R = "_blue_f7q96_18", V = "_yellow_f7q96_19", $ = "_tag_f7q96_31", z = "_tagText_f7q96_83", E = "_dismissable_f7q96_88", a = {
8
- button: q,
9
- green: G,
10
- red: C,
11
- blue: R,
12
- yellow: V,
13
- tag: $,
14
- tagText: z,
15
- dismissable: E
16
- }, X = ({
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: p(n.children, (l) => /* @__PURE__ */ _(u, { 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
- b
63
- );
64
- return /* @__PURE__ */ i(
65
- x,
66
- {
67
- className: c(o, B.tagList),
68
- ref: s,
69
- ...t
70
- }
71
- );
72
- }, m = f(P), k = f(
73
- (r, e) => {
74
- const [{ className: o, children: t, ...s }, n] = d(
75
- r,
76
- e,
77
- h
78
- ), g = N.toArray(t).filter(w).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
- k.displayName = "TagGroup";
93
- export {
94
- X as T,
95
- k as a,
96
- m as b
97
- };