@midas-ds/components 16.0.0 → 16.2.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.
- package/CHANGELOG.md +12 -0
- package/accordion/index.js +1 -1
- package/assets/AccordionItem.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/ComboBox.css +1 -1
- package/assets/Dialog.css +1 -1
- package/assets/Layout.css +1 -1
- package/assets/ListBox.css +1 -1
- package/assets/Popover.css +1 -1
- package/assets/ProgressBar.css +1 -1
- package/assets/Radio.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Select2.css +1 -1
- package/assets/Table.css +1 -1
- package/assets/Toast.css +1 -1
- package/assets/Tooltip.css +1 -1
- package/assets/default.css +1 -1
- package/checkbox/index.js +2 -2
- package/chunks/AccordionItem-BUUDZ7l6.js +128 -0
- package/chunks/{Checkbox-ClhO-AzB.js → Checkbox-CP6Nv9yx.js} +25 -25
- package/chunks/{CheckboxGroup-dofHjXkU.js → CheckboxGroup-C5kaqBcn.js} +2 -2
- package/chunks/ComboBox-N97lv5kN.js +108 -0
- package/chunks/{DateField-ltU-Jvra.js → DateField-DeuLPe1Y.js} +1 -1
- package/chunks/{DateRangePicker-CdoVIV-F.js → DateRangePicker-BqjLArNi.js} +1 -1
- package/chunks/Dialog-DC0cGNj5.js +66 -0
- package/chunks/{Label-DqmNWnmm.js → Label-Dup4lWaR.js} +1 -1
- package/chunks/{Layout-DtwVUZus.js → Layout-BFZSROTl.js} +95 -95
- package/chunks/{ListBox-D4tO_OrO.js → ListBox-D5BBeZWL.js} +12 -12
- package/chunks/{ListBoxLoadMoreItem-D9X8YnwD.js → ListBoxLoadMoreItem-CB67meAb.js} +1 -1
- package/chunks/{ListBoxSection-DKHba2X0.js → ListBoxSection-MZB_5DdD.js} +1 -1
- package/chunks/{Popover-D9tAN-g7.js → Popover-BcEtFiU1.js} +8 -8
- package/chunks/ProgressBar-CbwvcHvk.js +53 -0
- package/chunks/Radio-Dro99zCs.js +43 -0
- package/chunks/{Select-Bcu1yvbR.js → Select-D-LtFSZX.js} +42 -42
- package/chunks/{Select-DAlreRs2.js → Select-nL9iJMlf.js} +117 -117
- package/chunks/{Table-B1rlSIhS.js → Table-CgBjwlIi.js} +47 -47
- package/chunks/{TextArea-CEiOylOx.js → TextArea-CRvbqqVZ.js} +1 -1
- package/chunks/{Toast-DgQ6BTmK.js → Toast-DTwUGSJ8.js} +39 -39
- package/chunks/{Tooltip-uNMG_UU-.js → Tooltip-m032jGgF.js} +5 -5
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/index.js +21 -21
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/legacy-select/index.js +1 -1
- package/list-box/index.js +3 -3
- package/modal/index.js +1 -1
- package/package.json +2 -2
- package/popover/index.js +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.js +1 -1
- package/select/index.js +1 -1
- package/table/index.js +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.js +1 -1
- package/tooltip/index.js +1 -1
- package/chunks/AccordionItem-O3_wicV2.js +0 -128
- package/chunks/ComboBox-XQqP_jga.js +0 -108
- package/chunks/Dialog-x-HLOQFU.js +0 -66
- package/chunks/ProgressBar-DXBCKRe_.js +0 -53
- package/chunks/Radio-C1AFopLt.js +0 -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
|
|
3
|
-
import { FocusScope as
|
|
4
|
-
import { a as T, L as N } from "./Label-
|
|
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
|
|
7
|
+
import { F as _ } from "./FieldError-C0HRIcAx.js";
|
|
8
8
|
import f, { useContext as p } from "react";
|
|
9
|
-
import { C as L } from "./Checkbox-
|
|
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-
|
|
14
|
-
import { P as G } from "./Popover-
|
|
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 = "
|
|
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),
|
|
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:
|
|
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(),
|
|
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:
|
|
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),
|
|
92
|
-
c?.selectionManager.toggleSelection(Array.from(
|
|
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:
|
|
99
|
+
onRemove: o,
|
|
100
100
|
selectionBehavior: "toggle",
|
|
101
|
-
children: /* @__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:
|
|
105
|
+
id: n.key,
|
|
106
106
|
isDisabled: l,
|
|
107
|
-
textValue:
|
|
108
|
-
children:
|
|
107
|
+
textValue: n.textValue,
|
|
108
|
+
children: n.textValue
|
|
109
109
|
},
|
|
110
|
-
|
|
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:
|
|
143
|
-
label:
|
|
142
|
+
items: o,
|
|
143
|
+
label: n,
|
|
144
144
|
popover: S,
|
|
145
|
-
size:
|
|
146
|
-
...
|
|
145
|
+
size: A = "large",
|
|
146
|
+
...r
|
|
147
147
|
}) {
|
|
148
|
-
return /* @__PURE__ */ e(
|
|
149
|
-
|
|
148
|
+
return /* @__PURE__ */ e(b, { children: /* @__PURE__ */ d(
|
|
149
|
+
x,
|
|
150
150
|
{
|
|
151
|
-
...
|
|
152
|
-
className: h(
|
|
151
|
+
...r,
|
|
152
|
+
className: h(r.className, a.select),
|
|
153
153
|
children: [
|
|
154
|
-
/* @__PURE__ */ e(T, { popover: S, children:
|
|
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(
|
|
156
|
+
c === "top" && /* @__PURE__ */ e(_, { children: s }),
|
|
157
157
|
/* @__PURE__ */ d(
|
|
158
158
|
"div",
|
|
159
159
|
{
|
|
160
160
|
className: a.triggerContainer,
|
|
161
|
-
"data-disabled":
|
|
161
|
+
"data-disabled": r.isDisabled || void 0,
|
|
162
162
|
children: [
|
|
163
|
-
/* @__PURE__ */ e(te, { size:
|
|
163
|
+
/* @__PURE__ */ e(te, { size: A }),
|
|
164
164
|
/* @__PURE__ */ e(
|
|
165
|
-
|
|
165
|
+
C,
|
|
166
166
|
{
|
|
167
167
|
className: a.selectValue,
|
|
168
|
-
"data-disabled":
|
|
169
|
-
children: (i) => i.isPlaceholder ||
|
|
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
|
-
...
|
|
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(
|
|
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
|
-
|
|
189
|
+
r.isSelectableAll && /* @__PURE__ */ e(U, {}),
|
|
190
190
|
/* @__PURE__ */ e(
|
|
191
191
|
I,
|
|
192
192
|
{
|
|
193
193
|
escapeKeyBehavior: "none",
|
|
194
|
-
items:
|
|
194
|
+
items: o,
|
|
195
195
|
children: t
|
|
196
196
|
}
|
|
197
197
|
)
|
|
198
198
|
]
|
|
199
199
|
}
|
|
200
200
|
),
|
|
201
|
-
/* @__PURE__ */ e(ee, { ...
|
|
201
|
+
/* @__PURE__ */ e(ee, { ...r })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
204
|
) });
|