@midas-ds/components 16.1.0 → 16.2.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/accordion/index.js +1 -1
  3. package/assets/AccordionItem.css +1 -1
  4. package/assets/Checkbox.css +1 -1
  5. package/assets/ComboBox.css +1 -1
  6. package/assets/Dialog.css +1 -1
  7. package/assets/Layout.css +1 -1
  8. package/assets/ListBox.css +1 -1
  9. package/assets/Popover.css +1 -1
  10. package/assets/ProgressBar.css +1 -1
  11. package/assets/Radio.css +1 -1
  12. package/assets/Select.css +1 -1
  13. package/assets/Select2.css +1 -1
  14. package/assets/Table.css +1 -1
  15. package/assets/Toast.css +1 -1
  16. package/assets/Tooltip.css +1 -1
  17. package/checkbox/index.js +2 -2
  18. package/chunks/AccordionItem-BUUDZ7l6.js +128 -0
  19. package/chunks/{Checkbox-ClhO-AzB.js → Checkbox-CP6Nv9yx.js} +25 -25
  20. package/chunks/{CheckboxGroup-dofHjXkU.js → CheckboxGroup-C5kaqBcn.js} +2 -2
  21. package/chunks/ComboBox-N97lv5kN.js +108 -0
  22. package/chunks/{DateField-ltU-Jvra.js → DateField-DeuLPe1Y.js} +1 -1
  23. package/chunks/{DateRangePicker-CdoVIV-F.js → DateRangePicker-BqjLArNi.js} +1 -1
  24. package/chunks/Dialog-DC0cGNj5.js +66 -0
  25. package/chunks/{Label-DqmNWnmm.js → Label-Dup4lWaR.js} +1 -1
  26. package/chunks/{Layout-DtwVUZus.js → Layout-BFZSROTl.js} +95 -95
  27. package/chunks/{ListBox-D4tO_OrO.js → ListBox-D5BBeZWL.js} +12 -12
  28. package/chunks/{ListBoxLoadMoreItem-D9X8YnwD.js → ListBoxLoadMoreItem-CB67meAb.js} +1 -1
  29. package/chunks/{ListBoxSection-DKHba2X0.js → ListBoxSection-MZB_5DdD.js} +1 -1
  30. package/chunks/{Popover-D9tAN-g7.js → Popover-BcEtFiU1.js} +8 -8
  31. package/chunks/ProgressBar-CbwvcHvk.js +53 -0
  32. package/chunks/Radio-Dro99zCs.js +43 -0
  33. package/chunks/{Select-Bcu1yvbR.js → Select-D-LtFSZX.js} +42 -42
  34. package/chunks/{Select-DAlreRs2.js → Select-nL9iJMlf.js} +117 -117
  35. package/chunks/{Table-B1rlSIhS.js → Table-CgBjwlIi.js} +47 -47
  36. package/chunks/{TextArea-CEiOylOx.js → TextArea-CRvbqqVZ.js} +1 -1
  37. package/chunks/{Toast-DgQ6BTmK.js → Toast-DTwUGSJ8.js} +39 -39
  38. package/chunks/{Tooltip-uNMG_UU-.js → Tooltip-m032jGgF.js} +5 -5
  39. package/combobox/index.js +1 -1
  40. package/date-field/index.js +1 -1
  41. package/date-picker/index.js +1 -1
  42. package/index.js +21 -21
  43. package/label/index.js +1 -1
  44. package/layout/index.js +1 -1
  45. package/legacy-select/index.js +1 -1
  46. package/list-box/index.js +3 -3
  47. package/modal/index.js +1 -1
  48. package/package.json +2 -2
  49. package/popover/index.js +1 -1
  50. package/progress-bar/index.js +1 -1
  51. package/radio/index.js +1 -1
  52. package/select/index.js +1 -1
  53. package/table/index.js +1 -1
  54. package/textfield/index.js +1 -1
  55. package/toast/index.js +1 -1
  56. package/tooltip/index.js +1 -1
  57. package/chunks/AccordionItem-O3_wicV2.js +0 -128
  58. package/chunks/ComboBox-XQqP_jga.js +0 -108
  59. package/chunks/Dialog-x-HLOQFU.js +0 -66
  60. package/chunks/ProgressBar-DXBCKRe_.js +0 -53
  61. package/chunks/Radio-C1AFopLt.js +0 -43
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { ListLayout as e, Virtualizer as n, ListBox as l } from "react-aria-components";
3
- import { c as x } from "./clsx-AexbMWKp.js";
4
- import '../assets/ListBox.css';class B extends e {
2
+ import { ListLayout as e, Virtualizer as n, ListBox as a } from "react-aria-components";
3
+ import { c as l } from "./clsx-AexbMWKp.js";
4
+ import '../assets/ListBox.css';class x extends e {
5
5
  /**
6
6
  * When using the ListLayout our scroll container height is not calculated properly when the content is partially sectioned.
7
7
  * ```ts
@@ -25,29 +25,29 @@ import '../assets/ListBox.css';class B extends e {
25
25
  }), this.contentSize;
26
26
  }
27
27
  }
28
- const r = "_listBox_1kyjv_4", a = "_listBoxPopover_1kyjv_16", c = "_listBoxSectionHeading_1kyjv_31", _ = "_listBoxButton_1kyjv_43", y = "_listBoxItem_1kyjv_55", m = "_textContent_1kyjv_69", L = "_listBoxLoadMoreItem_1kyjv_175", u = {
29
- listBox: r,
30
- listBoxPopover: a,
28
+ const B = "_listBox_1vajh_4", r = "_listBoxPopover_1vajh_16", c = "_listBoxSectionHeading_1vajh_31", _ = "_listBoxButton_1vajh_43", h = "_listBoxItem_1vajh_55", m = "_textContent_1vajh_69", L = "_listBoxLoadMoreItem_1vajh_175", u = {
29
+ listBox: B,
30
+ listBoxPopover: r,
31
31
  listBoxSectionHeading: c,
32
32
  listBoxButton: _,
33
- listBoxItem: y,
33
+ listBoxItem: h,
34
34
  textContent: m,
35
35
  listBoxLoadMoreItem: L
36
- }, j = ({
36
+ }, g = ({
37
37
  className: s,
38
38
  children: t,
39
39
  ...o
40
40
  }) => /* @__PURE__ */ i(
41
41
  n,
42
42
  {
43
- layout: B,
43
+ layout: x,
44
44
  layoutOptions: {
45
45
  headingHeight: 38
46
46
  },
47
47
  children: /* @__PURE__ */ i(
48
- l,
48
+ a,
49
49
  {
50
- className: x(u.listBox, s),
50
+ className: l(u.listBox, s),
51
51
  ...o,
52
52
  children: t
53
53
  }
@@ -55,6 +55,6 @@ const r = "_listBox_1kyjv_4", a = "_listBoxPopover_1kyjv_16", c = "_listBoxSecti
55
55
  }
56
56
  );
57
57
  export {
58
- j as L,
58
+ g as L,
59
59
  u as s
60
60
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as o, jsxs as m, Fragment as d } from "react/jsx-runtime";
2
2
  import { c as e } from "./clsx-AexbMWKp.js";
3
- import { s as a } from "./ListBox-D4tO_OrO.js";
3
+ import { s as a } from "./ListBox-D5BBeZWL.js";
4
4
  import { ListBoxLoadMoreItem as l } from "react-aria-components";
5
5
  import { S as c } from "./Spinner-BORNnHph.js";
6
6
  import { u as L } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
2
  import { ListBoxItem as m, Popover as n, Header as B, ListBoxSection as l } from "react-aria-components";
3
3
  import { c as a } from "./clsx-AexbMWKp.js";
4
- import { s as i } from "./ListBox-D4tO_OrO.js";
4
+ import { s as i } from "./ListBox-D5BBeZWL.js";
5
5
  const I = ({
6
6
  children: t,
7
7
  className: o,
@@ -1,25 +1,25 @@
1
1
  import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
2
  import { c as i } from "./clsx-AexbMWKp.js";
3
- import { Popover as v, OverlayArrow as h } from "react-aria-components";
4
- import '../assets/Popover.css';const l = "_popover_1hyo5_1", n = "_arrow_1hyo5_23", r = {
5
- popover: l,
6
- arrow: n
3
+ import { Popover as v, OverlayArrow as l } from "react-aria-components";
4
+ import '../assets/Popover.css';const n = "_popover_1wjt3_1", w = "_arrow_1wjt3_23", r = {
5
+ popover: n,
6
+ arrow: w
7
7
  };
8
8
  function d({
9
9
  children: e,
10
10
  className: s,
11
11
  offset: p = 4,
12
- hideArrow: a = !1,
13
- ...t
12
+ hideArrow: t = !1,
13
+ ...a
14
14
  }) {
15
15
  return /* @__PURE__ */ c(
16
16
  v,
17
17
  {
18
- ...t,
18
+ ...a,
19
19
  offset: p,
20
20
  className: i(r.popover, s),
21
21
  children: [
22
- !a && /* @__PURE__ */ o(h, { className: r.arrow, children: /* @__PURE__ */ o(
22
+ !t && /* @__PURE__ */ o(l, { className: r.arrow, children: /* @__PURE__ */ o(
23
23
  "svg",
24
24
  {
25
25
  width: 16,
@@ -0,0 +1,53 @@
1
+ import { jsx as s, jsxs as d, Fragment as _ } from "react/jsx-runtime";
2
+ import { ProgressBar as f } from "react-aria-components";
3
+ import { L as t } from "./Label-Dup4lWaR.js";
4
+ import { c as l } from "./clsx-AexbMWKp.js";
5
+ import '../assets/ProgressBar.css';const N = "_progressBar_1a2ad_1", g = "_label_1a2ad_9", p = "_value_1a2ad_14", v = "_bar_1a2ad_19", h = "_fill_1a2ad_29", e = {
6
+ progressBar: N,
7
+ label: g,
8
+ value: p,
9
+ bar: v,
10
+ fill: h
11
+ }, b = ({
12
+ label: r,
13
+ labelProps: a,
14
+ showValueLabel: m = !1,
15
+ ...c
16
+ }) => /* @__PURE__ */ s(
17
+ f,
18
+ {
19
+ ...c,
20
+ className: l(e.progressBar, c.className),
21
+ children: ({ percentage: i, valueText: n, isIndeterminate: o }) => /* @__PURE__ */ d(_, { children: [
22
+ r && /* @__PURE__ */ s(
23
+ t,
24
+ {
25
+ elementType: "span",
26
+ ...a,
27
+ className: l(a?.className, e.label),
28
+ children: r
29
+ }
30
+ ),
31
+ m && /* @__PURE__ */ s(
32
+ t,
33
+ {
34
+ elementType: "span",
35
+ ...a,
36
+ id: r ? "" : a?.id,
37
+ className: l(a?.className, e.value),
38
+ children: n
39
+ }
40
+ ),
41
+ /* @__PURE__ */ s("div", { className: e.bar, children: /* @__PURE__ */ s(
42
+ "div",
43
+ {
44
+ className: e.fill,
45
+ style: { width: `${o ? 50 : i}%` }
46
+ }
47
+ ) })
48
+ ] })
49
+ }
50
+ );
51
+ export {
52
+ b as P
53
+ };
@@ -0,0 +1,43 @@
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import { Radio as u, RadioGroup as _, Group as f } from "react-aria-components";
3
+ import { c as p } from "./clsx-AexbMWKp.js";
4
+ import { a as G, L as R } from "./Label-Dup4lWaR.js";
5
+ import { T as h } from "./Text-TWzJxnto.js";
6
+ import { F as t } from "./FieldError-C0HRIcAx.js";
7
+ import '../assets/Radio.css';const x = "_radioGroup_1ls9z_1", w = "_wrap_1ls9z_12", z = "_radio_1ls9z_1", s = {
8
+ radioGroup: x,
9
+ wrap: w,
10
+ radio: z
11
+ }, T = ({
12
+ label: o,
13
+ description: a,
14
+ errorMessage: i,
15
+ children: l,
16
+ className: c,
17
+ errorPosition: d = "top",
18
+ popover: e,
19
+ ...m
20
+ }) => /* @__PURE__ */ n(
21
+ _,
22
+ {
23
+ ...m,
24
+ className: p(s.radioGroup, c),
25
+ children: [
26
+ /* @__PURE__ */ r(G, { popover: e, children: o && /* @__PURE__ */ r(R, { children: o }) }),
27
+ a && /* @__PURE__ */ r(h, { slot: "description", children: a }),
28
+ d === "top" && /* @__PURE__ */ r(t, { "data-testid": "fieldError", children: i }),
29
+ /* @__PURE__ */ r(f, { className: s.wrap, children: l }),
30
+ d === "bottom" && /* @__PURE__ */ r(t, { "data-testid": "fieldError", children: i })
31
+ ]
32
+ }
33
+ ), $ = ({ className: o, ...a }) => /* @__PURE__ */ r(
34
+ u,
35
+ {
36
+ className: p(s.radio, o),
37
+ ...a
38
+ }
39
+ );
40
+ export {
41
+ $ as R,
42
+ T as a
43
+ };
@@ -1,23 +1,23 @@
1
1
  import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { SelectStateContext as m, Button as _, TagList as A, Select as V, SelectValue as x } from "react-aria-components";
3
- import { FocusScope as C } from "@react-aria/focus";
4
- import { a as T, L as N } from "./Label-DqmNWnmm.js";
2
+ import { SelectStateContext as m, Button as v, TagList as V, Select as x, SelectValue as C } from "react-aria-components";
3
+ import { FocusScope as b } from "@react-aria/focus";
4
+ import { a as T, L as N } from "./Label-Dup4lWaR.js";
5
5
  import { a as y, c as h } from "./clsx-AexbMWKp.js";
6
6
  import { T as B } from "./Text-TWzJxnto.js";
7
- import { F as b } from "./FieldError-C0HRIcAx.js";
7
+ import { F as _ } from "./FieldError-C0HRIcAx.js";
8
8
  import f, { useContext as p } from "react";
9
- import { C as L } from "./Checkbox-ClhO-AzB.js";
9
+ import { C as L } from "./Checkbox-CP6Nv9yx.js";
10
10
  import { u } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
11
11
  import { useFocusManager as M } from "react-aria";
12
12
  import { X as F } from "./x-BXShoIAM.js";
13
- import { L as I } from "./ListBox-D4tO_OrO.js";
14
- import { P as G } from "./Popover-D9tAN-g7.js";
13
+ import { L as I } from "./ListBox-D5BBeZWL.js";
14
+ import { P as G } from "./Popover-BcEtFiU1.js";
15
15
  import { a as j, T as k } from "./Tag-DxBoeE_n.js";
16
16
  import { C as R } from "./chevron-down-DgT-uSF9.js";
17
17
  import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", selected: "selected" }, w = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", selected: "valda" }, g = {
18
18
  en: $,
19
19
  sv: w
20
- }, D = "_select_17bb3_1", z = "_triggerContainer_17bb3_7", E = "_trigger_17bb3_7", K = "_medium_17bb3_28", P = "_selectValue_17bb3_71", W = "_placeholder_17bb3_81", X = "_selectValueTag_17bb3_95", q = "_clearButton_17bb3_109", H = "_truncate_17bb3_121", J = "_popover_17bb3_158", O = "_selectAll_17bb3_184", Q = "_tagGroup_17bb3_247", a = {
20
+ }, D = "_select_nivht_1", z = "_triggerContainer_nivht_7", E = "_trigger_nivht_7", K = "_medium_nivht_28", P = "_selectValue_nivht_71", W = "_placeholder_nivht_81", X = "_selectValueTag_nivht_95", q = "_clearButton_nivht_109", H = "_truncate_nivht_121", J = "_popover_nivht_158", O = "_selectAll_nivht_184", Q = "_tagGroup_nivht_247", a = {
21
21
  select: D,
22
22
  triggerContainer: z,
23
23
  trigger: E,
@@ -49,14 +49,14 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
49
49
  selectedItems: l,
50
50
  selectedText: s
51
51
  }) => {
52
- const c = u(g), n = () => l.length === 1 ? s : `${l.length} ${c.format("selected")}`;
52
+ const c = u(g), o = () => l.length === 1 ? s : `${l.length} ${c.format("selected")}`;
53
53
  return /* @__PURE__ */ d(
54
54
  "div",
55
55
  {
56
56
  className: a.selectValueTag,
57
57
  "data-disabled": t || void 0,
58
58
  children: [
59
- /* @__PURE__ */ e("span", { className: a.truncate, children: n() }),
59
+ /* @__PURE__ */ e("span", { className: a.truncate, children: o() }),
60
60
  /* @__PURE__ */ e(Z, { isDisabled: t })
61
61
  ]
62
62
  }
@@ -64,15 +64,15 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
64
64
  }, Z = ({
65
65
  isDisabled: t
66
66
  }) => {
67
- const l = f.useContext(m), s = u(g), c = M(), n = () => {
67
+ const l = f.useContext(m), s = u(g), c = M(), o = () => {
68
68
  c?.focusFirst(), l?.setValue(null);
69
69
  };
70
70
  return /* @__PURE__ */ e(
71
- _,
71
+ v,
72
72
  {
73
73
  "aria-label": s.format("clearAll"),
74
74
  className: a.clearButton,
75
- onPress: n,
75
+ onPress: o,
76
76
  slot: null,
77
77
  isDisabled: t,
78
78
  children: /* @__PURE__ */ e(
@@ -88,33 +88,33 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
88
88
  showTags: t,
89
89
  isDisabled: l
90
90
  }) => {
91
- const s = u(g), c = p(m), n = (r) => {
92
- c?.selectionManager.toggleSelection(Array.from(r)[0]);
91
+ const s = u(g), c = p(m), o = (n) => {
92
+ c?.selectionManager.toggleSelection(Array.from(n)[0]);
93
93
  };
94
94
  return !c?.selectedItems.length || !t ? null : /* @__PURE__ */ e(
95
95
  j,
96
96
  {
97
97
  "aria-label": s.format("selectedItems"),
98
98
  className: a.tagGroup,
99
- onRemove: n,
99
+ onRemove: o,
100
100
  selectionBehavior: "toggle",
101
- children: /* @__PURE__ */ e(A, { items: c.selectedItems, children: (r) => /* @__PURE__ */ e(
101
+ children: /* @__PURE__ */ e(V, { items: c.selectedItems, children: (n) => /* @__PURE__ */ e(
102
102
  k,
103
103
  {
104
104
  dismissable: !0,
105
- id: r.key,
105
+ id: n.key,
106
106
  isDisabled: l,
107
- textValue: r.textValue,
108
- children: r.textValue
107
+ textValue: n.textValue,
108
+ children: n.textValue
109
109
  },
110
- r.key
110
+ n.key
111
111
  ) })
112
112
  }
113
113
  );
114
114
  }, te = ({ size: t }) => {
115
115
  const l = p(m);
116
116
  return /* @__PURE__ */ e(
117
- _,
117
+ v,
118
118
  {
119
119
  className: y(
120
120
  {
@@ -139,37 +139,37 @@ function pe({
139
139
  description: l,
140
140
  errorMessage: s,
141
141
  errorPosition: c = "top",
142
- items: n,
143
- label: r,
142
+ items: o,
143
+ label: n,
144
144
  popover: S,
145
- size: v = "large",
146
- ...o
145
+ size: A = "large",
146
+ ...r
147
147
  }) {
148
- return /* @__PURE__ */ e(C, { children: /* @__PURE__ */ d(
149
- V,
148
+ return /* @__PURE__ */ e(b, { children: /* @__PURE__ */ d(
149
+ x,
150
150
  {
151
- ...o,
152
- className: h(o.className, a.select),
151
+ ...r,
152
+ className: h(r.className, a.select),
153
153
  children: [
154
- /* @__PURE__ */ e(T, { popover: S, children: r && /* @__PURE__ */ e(N, { "data-disabled": o.isDisabled || void 0, children: r }) }),
154
+ /* @__PURE__ */ e(T, { popover: S, children: n && /* @__PURE__ */ e(N, { "data-disabled": r.isDisabled || void 0, children: n }) }),
155
155
  l && /* @__PURE__ */ e(B, { slot: "description", children: l }),
156
- c === "top" && /* @__PURE__ */ e(b, { children: s }),
156
+ c === "top" && /* @__PURE__ */ e(_, { children: s }),
157
157
  /* @__PURE__ */ d(
158
158
  "div",
159
159
  {
160
160
  className: a.triggerContainer,
161
- "data-disabled": o.isDisabled || void 0,
161
+ "data-disabled": r.isDisabled || void 0,
162
162
  children: [
163
- /* @__PURE__ */ e(te, { size: v }),
163
+ /* @__PURE__ */ e(te, { size: A }),
164
164
  /* @__PURE__ */ e(
165
- x,
165
+ C,
166
166
  {
167
167
  className: a.selectValue,
168
- "data-disabled": o.isDisabled || void 0,
169
- children: (i) => i.isPlaceholder || o.selectionMode !== "multiple" ? /* @__PURE__ */ e("div", { className: h(a.placeholder), children: /* @__PURE__ */ e("span", { className: h(a.truncate), children: i.selectedText || i.defaultChildren }) }) : /* @__PURE__ */ e(
168
+ "data-disabled": r.isDisabled || void 0,
169
+ children: (i) => i.isPlaceholder || r.selectionMode !== "multiple" ? /* @__PURE__ */ e("div", { className: h(a.placeholder), children: /* @__PURE__ */ e("span", { className: h(a.truncate), children: i.selectedText || i.defaultChildren }) }) : /* @__PURE__ */ e(
170
170
  Y,
171
171
  {
172
- ...o,
172
+ ...r,
173
173
  ...i
174
174
  }
175
175
  )
@@ -178,7 +178,7 @@ function pe({
178
178
  ]
179
179
  }
180
180
  ),
181
- c === "bottom" && /* @__PURE__ */ e(b, { children: s }),
181
+ c === "bottom" && /* @__PURE__ */ e(_, { children: s }),
182
182
  /* @__PURE__ */ d(
183
183
  G,
184
184
  {
@@ -186,19 +186,19 @@ function pe({
186
186
  offset: 0,
187
187
  hideArrow: !0,
188
188
  children: [
189
- o.isSelectableAll && /* @__PURE__ */ e(U, {}),
189
+ r.isSelectableAll && /* @__PURE__ */ e(U, {}),
190
190
  /* @__PURE__ */ e(
191
191
  I,
192
192
  {
193
193
  escapeKeyBehavior: "none",
194
- items: n,
194
+ items: o,
195
195
  children: t
196
196
  }
197
197
  )
198
198
  ]
199
199
  }
200
200
  ),
201
- /* @__PURE__ */ e(ee, { ...o })
201
+ /* @__PURE__ */ e(ee, { ...r })
202
202
  ]
203
203
  }
204
204
  ) });