@midas-ds/components 15.4.0 → 15.5.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 +16 -0
- package/accordion/AccordionItem.d.ts +5 -0
- package/accordion/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.js +2 -2
- package/calendar/index.js +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.js +2 -2
- package/chunks/AccordionItem-BDkCTxFM.js +132 -0
- package/chunks/{BadgeContainer-BJAC-kV0.js → BadgeContainer-CKVsfTlF.js} +1 -1
- package/chunks/Breadcrumbs-By2bMbQd.js +28 -0
- package/chunks/Button-DbQwg49l.js +46 -0
- package/chunks/{ButtonGroup-B6mr4JGY.js → ButtonGroup-Dr6HOBo2.js} +1 -1
- package/chunks/Card-ia98VoKL.js +130 -0
- package/chunks/CharacterCounter-DeuE2det.js +21 -0
- package/chunks/Checkbox-ClhO-AzB.js +122 -0
- package/chunks/CheckboxGroup-CIFMaanI.js +84 -0
- package/chunks/{ColorSchemeSwitch-Cd6VSXql.js → ColorSchemeSwitch-DugvPh6T.js} +17 -17
- package/chunks/ComboBox-D86agoIk.js +108 -0
- package/chunks/DateField-CdJdPIuj.js +46 -0
- package/chunks/DateInputDivider-CkTB5q5k.js +36 -0
- package/chunks/DateRangePicker-p0l1tSMb.js +117 -0
- package/chunks/Dialog-BndmKdiv.js +66 -0
- package/chunks/Dropdown-CWP2clB2.js +79 -0
- package/chunks/FeedbackStatusIcon-COWuMusk.js +56 -0
- package/chunks/FieldError-C0HRIcAx.js +23 -0
- package/chunks/FileUpload-h1PxqQmb.js +16 -0
- package/chunks/{Grid-DeB7TdcZ.js → Grid-B-WgMwON.js} +2 -2
- package/chunks/{GridItem-B_3FFhPs.js → GridItem-5t1Z14sM.js} +1 -1
- package/chunks/Heading-D8tNNJkt.js +38 -0
- package/chunks/InfoBanner-tXWNVxpu.js +72 -0
- package/chunks/Label-B7taTXkd.js +73 -0
- package/chunks/{Layout-InD0Hl7F.js → Layout-DPRkHK4y.js} +70 -70
- package/chunks/Link-yTNUNv3C.js +54 -0
- package/chunks/LinkButton-3nAekUJ4.js +63 -0
- package/chunks/{ListBox-CKDglhFH.js → ListBox-D4tO_OrO.js} +18 -18
- package/chunks/ListBoxLoadMoreItem-BKptRAtt.js +41 -0
- package/chunks/ListBoxSection-DKHba2X0.js +49 -0
- package/chunks/{Logo-D80UDT1x.js → Logo-InDSslpO.js} +2 -2
- package/chunks/Popover-BAdqdN6C.js +38 -0
- package/chunks/ProgressBar-B2W7BTjA.js +53 -0
- package/chunks/Radio-BzuxVV_g.js +43 -0
- package/chunks/RangeCalendar-CuXHsT-k.js +99 -0
- package/chunks/{SearchField-Dr3DAs9W.js → SearchField-CLrAjcdA.js} +39 -39
- package/chunks/{Select-fDRXxmLm.js → Select-C-0lWpoz.js} +48 -46
- package/chunks/Select-CzfIyTE7.js +576 -0
- package/chunks/Separator-BcnQEA9f.js +76 -0
- package/chunks/{Skeleton-Bcg_xgAx.js → Skeleton-DqIHQLQl.js} +1 -1
- package/chunks/Spinner-CL9evrHm.js +49 -0
- package/chunks/TabList-D2XV5ixe.js +81 -0
- package/chunks/Table-B1rlSIhS.js +139 -0
- package/chunks/Tag-CEfQksg8.js +53 -0
- package/chunks/{Text-WP6RbnnK.js → Text-TWzJxnto.js} +9 -9
- package/chunks/TextArea-34YgkUEE.js +124 -0
- package/chunks/{Toast-CP_V12b3.js → Toast-CCA9sCnB.js} +46 -45
- package/chunks/ToggleButtonGroup-CXKTrLbb.js +29 -0
- package/chunks/Tooltip-CtstfI8u.js +46 -0
- package/chunks/clsx-AexbMWKp.js +24 -0
- package/chunks/useLocalizedStringFormatter-ZgRJmvHC.js +25 -0
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.js +1 -1
- package/common/FeedbackStatusIcon.d.ts +6 -0
- package/common/intl/translations.json.d.ts +17 -0
- package/date-field/index.js +2 -2
- package/date-picker/index.js +1 -1
- package/dropdown/index.js +1 -1
- package/field-error/index.js +1 -1
- package/file-upload/index.js +1 -1
- package/grid/index.js +2 -2
- package/heading/index.js +1 -1
- package/index.js +68 -68
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/legacy-select/index.js +1 -1
- package/link/index.js +3 -3
- package/link-button/index.js +3 -3
- package/list-box/index.js +3 -3
- package/logo/index.js +1 -1
- package/menu/index.js +5 -5
- package/modal/index.js +2 -2
- package/package.json +2 -3
- package/popover/index.js +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/skeleton/index.js +1 -1
- package/spinner/index.js +1 -1
- package/table/index.js +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.js +1 -1
- package/text/index.js +1 -1
- package/textfield/index.js +1 -1
- package/toast/Toast.d.ts +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.js +1 -1
- package/tooltip/index.js +1 -1
- package/chunks/AccordionItem-BCoomT4-.js +0 -132
- package/chunks/Breadcrumbs-CnuqEeOL.js +0 -28
- package/chunks/Button-CHs1wv7n.js +0 -46
- package/chunks/Card-D58EJCcV.js +0 -130
- package/chunks/CharacterCounter-CzCvDmNP.js +0 -21
- package/chunks/Checkbox-CogzFDe3.js +0 -119
- package/chunks/CheckboxGroup-BLx25gqn.js +0 -83
- package/chunks/ComboBox-8YAwADqL.js +0 -108
- package/chunks/DateField-CpbYROK1.js +0 -46
- package/chunks/DateInputDivider-C43xP4is.js +0 -36
- package/chunks/DateRangePicker-CICkmtXG.js +0 -116
- package/chunks/Dialog-DBn9L3SP.js +0 -66
- package/chunks/Dropdown-Cctv2Qpv.js +0 -79
- package/chunks/FieldError-CZKAYQ-n.js +0 -23
- package/chunks/FileUpload-DILt4rAn.js +0 -16
- package/chunks/Heading-DIw3iLMN.js +0 -38
- package/chunks/InfoBanner-Bw3rjGtB.js +0 -72
- package/chunks/Label-CKe9pgXT.js +0 -73
- package/chunks/Link-C3w5O2wT.js +0 -54
- package/chunks/LinkButton-D6X0Dvoz.js +0 -63
- package/chunks/ListBoxLoadMoreItem-y9pCuqRe.js +0 -41
- package/chunks/ListBoxSection-CvtRigQb.js +0 -49
- package/chunks/Popover-DktRiuCr.js +0 -38
- package/chunks/ProgressBar-Bjxi5TgY.js +0 -53
- package/chunks/Radio-DqFFcFra.js +0 -43
- package/chunks/RangeCalendar-CIxwICEf.js +0 -99
- package/chunks/Select-BSqv5Qi-.js +0 -566
- package/chunks/Separator-Cw1vlSYO.js +0 -76
- package/chunks/Spinner-B2EAm49Z.js +0 -48
- package/chunks/TabList-BIBQcX2n.js +0 -81
- package/chunks/Table-Cy-R3Ma8.js +0 -139
- package/chunks/Tag-BZnq1_yZ.js +0 -53
- package/chunks/TextArea-3fPkKmNx.js +0 -124
- package/chunks/ToggleButtonGroup-CgNeypuW.js +0 -29
- package/chunks/Tooltip-C53p0sfk.js +0 -46
- package/chunks/clsx-CuNqTHjr.js +0 -11
- package/chunks/icon-map-Ckc-nEUA.js +0 -31
- package/chunks/internationalized-C9snpc7V.js +0 -1955
- package/chunks/react-aria-components-mIKW9wOa.js +0 -22645
- package/chunks/react-stately-DRNKkAB0.js +0 -2586
- package/chunks/useLocalizedStringFormatter-CPwiI7nv.js +0 -25
- package/chunks/variables-BkqZ2WGF.js +0 -5
- package/common/icon-map.d.ts +0 -6
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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-B7taTXkd.js";
|
|
5
|
+
import { a as y, c as h } from "./clsx-AexbMWKp.js";
|
|
6
|
+
import { T as B } from "./Text-TWzJxnto.js";
|
|
7
|
+
import { F as b } from "./FieldError-C0HRIcAx.js";
|
|
8
|
+
import f, { useContext as p } from "react";
|
|
9
|
+
import { C as L } from "./Checkbox-ClhO-AzB.js";
|
|
10
|
+
import { u } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
11
|
+
import { useFocusManager as M } from "react-aria";
|
|
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-BAdqdN6C.js";
|
|
15
|
+
import { a as j, T as k } from "./Tag-CEfQksg8.js";
|
|
16
|
+
import { C as R } from "./chevron-down-DgT-uSF9.js";
|
|
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
|
+
en: $,
|
|
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 = {
|
|
21
|
+
select: D,
|
|
22
|
+
triggerContainer: z,
|
|
23
|
+
trigger: E,
|
|
22
24
|
medium: K,
|
|
23
25
|
selectValue: P,
|
|
24
26
|
placeholder: W,
|
|
@@ -29,11 +31,11 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
|
|
|
29
31
|
selectAll: O,
|
|
30
32
|
tagGroup: Q
|
|
31
33
|
}, U = () => {
|
|
32
|
-
const t =
|
|
34
|
+
const t = f.useContext(m), l = u(g), s = () => t?.setValue(
|
|
33
35
|
t?.selectionManager.isSelectAll ? null : Array.from(t.collection.getKeys())
|
|
34
36
|
);
|
|
35
37
|
return /* @__PURE__ */ e(
|
|
36
|
-
|
|
38
|
+
L,
|
|
37
39
|
{
|
|
38
40
|
className: a.selectAll,
|
|
39
41
|
isIndeterminate: !t?.selectionManager.isSelectAll && !t?.selectionManager.isEmpty,
|
|
@@ -47,7 +49,7 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
|
|
|
47
49
|
selectedItems: l,
|
|
48
50
|
selectedText: s
|
|
49
51
|
}) => {
|
|
50
|
-
const c = u(
|
|
52
|
+
const c = u(g), n = () => l.length === 1 ? s : `${l.length} ${c.format("selected")}`;
|
|
51
53
|
return /* @__PURE__ */ d(
|
|
52
54
|
"div",
|
|
53
55
|
{
|
|
@@ -62,11 +64,11 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
|
|
|
62
64
|
}, Z = ({
|
|
63
65
|
isDisabled: t
|
|
64
66
|
}) => {
|
|
65
|
-
const l =
|
|
67
|
+
const l = f.useContext(m), s = u(g), c = M(), n = () => {
|
|
66
68
|
c?.focusFirst(), l?.setValue(null);
|
|
67
69
|
};
|
|
68
70
|
return /* @__PURE__ */ e(
|
|
69
|
-
|
|
71
|
+
_,
|
|
70
72
|
{
|
|
71
73
|
"aria-label": s.format("clearAll"),
|
|
72
74
|
className: a.clearButton,
|
|
@@ -74,7 +76,7 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
|
|
|
74
76
|
slot: null,
|
|
75
77
|
isDisabled: t,
|
|
76
78
|
children: /* @__PURE__ */ e(
|
|
77
|
-
|
|
79
|
+
F,
|
|
78
80
|
{
|
|
79
81
|
width: 20,
|
|
80
82
|
height: 20
|
|
@@ -86,18 +88,18 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
|
|
|
86
88
|
showTags: t,
|
|
87
89
|
isDisabled: l
|
|
88
90
|
}) => {
|
|
89
|
-
const s = u(
|
|
91
|
+
const s = u(g), c = p(m), n = (r) => {
|
|
90
92
|
c?.selectionManager.toggleSelection(Array.from(r)[0]);
|
|
91
93
|
};
|
|
92
94
|
return !c?.selectedItems.length || !t ? null : /* @__PURE__ */ e(
|
|
93
|
-
|
|
95
|
+
j,
|
|
94
96
|
{
|
|
95
97
|
"aria-label": s.format("selectedItems"),
|
|
96
98
|
className: a.tagGroup,
|
|
97
99
|
onRemove: n,
|
|
98
100
|
selectionBehavior: "toggle",
|
|
99
101
|
children: /* @__PURE__ */ e(A, { items: c.selectedItems, children: (r) => /* @__PURE__ */ e(
|
|
100
|
-
|
|
102
|
+
k,
|
|
101
103
|
{
|
|
102
104
|
dismissable: !0,
|
|
103
105
|
id: r.key,
|
|
@@ -112,9 +114,9 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
|
|
|
112
114
|
}, te = ({ size: t }) => {
|
|
113
115
|
const l = p(m);
|
|
114
116
|
return /* @__PURE__ */ e(
|
|
115
|
-
|
|
117
|
+
_,
|
|
116
118
|
{
|
|
117
|
-
className:
|
|
119
|
+
className: y(
|
|
118
120
|
{
|
|
119
121
|
[a.medium]: t === "medium"
|
|
120
122
|
},
|
|
@@ -126,45 +128,45 @@ import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Sel
|
|
|
126
128
|
{
|
|
127
129
|
"aria-hidden": "true",
|
|
128
130
|
style: { display: "flex" },
|
|
129
|
-
children: /* @__PURE__ */ e(
|
|
131
|
+
children: /* @__PURE__ */ e(R, { size: 20 })
|
|
130
132
|
}
|
|
131
133
|
)
|
|
132
134
|
}
|
|
133
135
|
);
|
|
134
136
|
};
|
|
135
|
-
function
|
|
137
|
+
function pe({
|
|
136
138
|
children: t,
|
|
137
139
|
description: l,
|
|
138
140
|
errorMessage: s,
|
|
139
141
|
errorPosition: c = "top",
|
|
140
142
|
items: n,
|
|
141
143
|
label: r,
|
|
142
|
-
popover:
|
|
143
|
-
size:
|
|
144
|
+
popover: S,
|
|
145
|
+
size: v = "large",
|
|
144
146
|
...o
|
|
145
147
|
}) {
|
|
146
|
-
return /* @__PURE__ */ e(
|
|
148
|
+
return /* @__PURE__ */ e(C, { children: /* @__PURE__ */ d(
|
|
147
149
|
V,
|
|
148
150
|
{
|
|
149
151
|
...o,
|
|
150
|
-
className:
|
|
152
|
+
className: h(o.className, a.select),
|
|
151
153
|
children: [
|
|
152
|
-
/* @__PURE__ */ e(T, { popover:
|
|
154
|
+
/* @__PURE__ */ e(T, { popover: S, children: r && /* @__PURE__ */ e(N, { "data-disabled": o.isDisabled || void 0, children: r }) }),
|
|
153
155
|
l && /* @__PURE__ */ e(B, { slot: "description", children: l }),
|
|
154
|
-
c === "top" && /* @__PURE__ */ e(
|
|
156
|
+
c === "top" && /* @__PURE__ */ e(b, { children: s }),
|
|
155
157
|
/* @__PURE__ */ d(
|
|
156
158
|
"div",
|
|
157
159
|
{
|
|
158
160
|
className: a.triggerContainer,
|
|
159
161
|
"data-disabled": o.isDisabled || void 0,
|
|
160
162
|
children: [
|
|
161
|
-
/* @__PURE__ */ e(te, { size:
|
|
163
|
+
/* @__PURE__ */ e(te, { size: v }),
|
|
162
164
|
/* @__PURE__ */ e(
|
|
163
|
-
|
|
165
|
+
x,
|
|
164
166
|
{
|
|
165
167
|
className: a.selectValue,
|
|
166
168
|
"data-disabled": o.isDisabled || void 0,
|
|
167
|
-
children: (i) => i.isPlaceholder || o.selectionMode !== "multiple" ? /* @__PURE__ */ e("div", { className:
|
|
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
170
|
Y,
|
|
169
171
|
{
|
|
170
172
|
...o,
|
|
@@ -176,9 +178,9 @@ function he({
|
|
|
176
178
|
]
|
|
177
179
|
}
|
|
178
180
|
),
|
|
179
|
-
c === "bottom" && /* @__PURE__ */ e(
|
|
181
|
+
c === "bottom" && /* @__PURE__ */ e(b, { children: s }),
|
|
180
182
|
/* @__PURE__ */ d(
|
|
181
|
-
|
|
183
|
+
G,
|
|
182
184
|
{
|
|
183
185
|
className: a.popover,
|
|
184
186
|
offset: 0,
|
|
@@ -186,7 +188,7 @@ function he({
|
|
|
186
188
|
children: [
|
|
187
189
|
o.isSelectableAll && /* @__PURE__ */ e(U, {}),
|
|
188
190
|
/* @__PURE__ */ e(
|
|
189
|
-
|
|
191
|
+
I,
|
|
190
192
|
{
|
|
191
193
|
escapeKeyBehavior: "none",
|
|
192
194
|
items: n,
|
|
@@ -202,5 +204,5 @@ function he({
|
|
|
202
204
|
) });
|
|
203
205
|
}
|
|
204
206
|
export {
|
|
205
|
-
|
|
207
|
+
pe as S
|
|
206
208
|
};
|