@midas-ds/components 16.5.2 → 16.5.4
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 +27 -0
- package/assets/DateField.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Select2.css +1 -1
- package/assets/TextField.css +1 -1
- package/assets/default.css +1 -1
- package/chunks/DateField-CuNWL_ao.js +91 -0
- package/chunks/{DateRangePicker-DQB5TrfF.js → DateRangePicker-jqrHTmLu.js} +45 -45
- package/chunks/{SearchField-C493CTGJ.js → SearchField-Cd05nl-B.js} +1 -1
- package/chunks/{Select-D9db38XE.js → Select-BpSIhRl_.js} +50 -50
- package/chunks/{Select-CaSZY6w_.js → Select-CRUskZeu.js} +127 -127
- package/chunks/{TextArea-kEpt5DKm.js → TextArea-VkipFRQc.js} +1 -1
- package/chunks/TextField.module-B3n8v1vH.js +13 -0
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/grid/Grid.stories.d.ts +4 -6
- package/index.js +6 -6
- package/legacy-select/index.js +1 -1
- package/package.json +2 -2
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/textfield/index.js +1 -1
- package/chunks/DateField-CodiOrfY.js +0 -91
- package/chunks/TextField.module-DZslrEPC.js +0 -13
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
2
|
-
import { SelectStateContext as
|
|
3
|
-
import { FocusScope as
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as
|
|
6
|
-
import { T
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { SelectStateContext as u, SelectValue as h, Button as _, TagList as A, Select as C } from "react-aria-components";
|
|
3
|
+
import { FocusScope as x } from "@react-aria/focus";
|
|
4
|
+
import { a as z, L as N } from "./Label-xWKvOuML.js";
|
|
5
|
+
import { a as b, c as y } from "./clsx-AexbMWKp.js";
|
|
6
|
+
import { T } from "./Text-TWzJxnto.js";
|
|
7
7
|
import { F as g } from "./FieldError-Bra5aRT3.js";
|
|
8
|
-
import
|
|
9
|
-
import { C as
|
|
10
|
-
import { u as
|
|
11
|
-
import { useFocusManager as
|
|
12
|
-
import { X as
|
|
13
|
-
import { L
|
|
14
|
-
import { P as
|
|
15
|
-
import { a as
|
|
16
|
-
import { C as
|
|
17
|
-
import '../assets/Select.css';const
|
|
18
|
-
en:
|
|
19
|
-
sv:
|
|
20
|
-
},
|
|
21
|
-
select:
|
|
22
|
-
triggerContainer:
|
|
8
|
+
import p, { useContext as f } from "react";
|
|
9
|
+
import { C as B } from "./Checkbox-BTAfwDxU.js";
|
|
10
|
+
import { u as d } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
11
|
+
import { useFocusManager as M } from "react-aria";
|
|
12
|
+
import { X as F } from "./x-BXShoIAM.js";
|
|
13
|
+
import { L } from "./ListBox-D5BBeZWL.js";
|
|
14
|
+
import { P as I } from "./Popover-BcEtFiU1.js";
|
|
15
|
+
import { a as G, T as j } from "./Tag-CZrQBEgv.js";
|
|
16
|
+
import { C as k } from "./chevron-down-DgT-uSF9.js";
|
|
17
|
+
import '../assets/Select.css';const R = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", selected: "selected" }, $ = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", selected: "valda" }, m = {
|
|
18
|
+
en: R,
|
|
19
|
+
sv: $
|
|
20
|
+
}, w = "_select_e81uz_1", P = "_triggerContainer_e81uz_7", E = "_trigger_e81uz_7", K = "_medium_e81uz_29", D = "_selectValue_e81uz_72", W = "_placeholder_e81uz_78", X = "_multiSelectValue_e81uz_88", q = "_selectValueTag_e81uz_112", H = "_clearButton_e81uz_126", J = "_truncate_e81uz_138", O = "_popover_e81uz_175", Q = "_selectAll_e81uz_201", U = "_tagGroup_e81uz_264", a = {
|
|
21
|
+
select: w,
|
|
22
|
+
triggerContainer: P,
|
|
23
23
|
trigger: E,
|
|
24
24
|
medium: K,
|
|
25
25
|
selectValue: D,
|
|
@@ -32,11 +32,11 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
|
|
|
32
32
|
selectAll: Q,
|
|
33
33
|
tagGroup: U
|
|
34
34
|
}, Y = () => {
|
|
35
|
-
const t =
|
|
35
|
+
const t = p.useContext(u), c = d(m), r = () => t?.setValue(
|
|
36
36
|
t?.selectionManager.isSelectAll ? null : Array.from(t.collection.getKeys())
|
|
37
37
|
);
|
|
38
38
|
return /* @__PURE__ */ e(
|
|
39
|
-
|
|
39
|
+
B,
|
|
40
40
|
{
|
|
41
41
|
className: a.selectAll,
|
|
42
42
|
isIndeterminate: !t?.selectionManager.isSelectAll && !t?.selectionManager.isEmpty,
|
|
@@ -48,13 +48,13 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
|
|
|
48
48
|
}, Z = ({
|
|
49
49
|
isDisabled: t
|
|
50
50
|
}) => {
|
|
51
|
-
const c = m
|
|
51
|
+
const c = d(m), r = (l, o) => l.length === 1 ? o : `${l.length} ${c.format("selected")}`;
|
|
52
52
|
return /* @__PURE__ */ e(
|
|
53
|
-
|
|
53
|
+
h,
|
|
54
54
|
{
|
|
55
55
|
className: a.multiSelectValue,
|
|
56
56
|
"data-disabled": t || void 0,
|
|
57
|
-
children: ({ isPlaceholder: l, selectedItems: o, selectedText: s }) => l ? /* @__PURE__ */ e(
|
|
57
|
+
children: ({ isPlaceholder: l, selectedItems: o, selectedText: s }) => l ? /* @__PURE__ */ e(V, {}) : /* @__PURE__ */ i(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
60
|
className: a.selectValueTag,
|
|
@@ -70,11 +70,11 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
|
|
|
70
70
|
}, ee = ({
|
|
71
71
|
isDisabled: t
|
|
72
72
|
}) => {
|
|
73
|
-
const c =
|
|
73
|
+
const c = p.useContext(u), r = d(m), l = M(), o = () => {
|
|
74
74
|
l?.focusFirst(), c?.setValue(null);
|
|
75
75
|
};
|
|
76
76
|
return /* @__PURE__ */ e(
|
|
77
|
-
|
|
77
|
+
_,
|
|
78
78
|
{
|
|
79
79
|
"aria-label": r.format("clearAll"),
|
|
80
80
|
className: a.clearButton,
|
|
@@ -82,7 +82,7 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
|
|
|
82
82
|
slot: null,
|
|
83
83
|
isDisabled: t,
|
|
84
84
|
children: /* @__PURE__ */ e(
|
|
85
|
-
|
|
85
|
+
F,
|
|
86
86
|
{
|
|
87
87
|
width: 20,
|
|
88
88
|
height: 20
|
|
@@ -94,18 +94,18 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
|
|
|
94
94
|
showTags: t,
|
|
95
95
|
isDisabled: c
|
|
96
96
|
}) => {
|
|
97
|
-
const r = m
|
|
97
|
+
const r = d(m), l = f(u), o = (s) => {
|
|
98
98
|
l?.selectionManager.toggleSelection(Array.from(s)[0]);
|
|
99
99
|
};
|
|
100
100
|
return !l?.selectedItems.length || !t ? null : /* @__PURE__ */ e(
|
|
101
|
-
|
|
101
|
+
G,
|
|
102
102
|
{
|
|
103
103
|
"aria-label": r.format("selectedItems"),
|
|
104
104
|
className: a.tagGroup,
|
|
105
105
|
onRemove: o,
|
|
106
106
|
selectionBehavior: "toggle",
|
|
107
|
-
children: /* @__PURE__ */ e(
|
|
108
|
-
|
|
107
|
+
children: /* @__PURE__ */ e(A, { items: l.selectedItems, children: (s) => /* @__PURE__ */ e(
|
|
108
|
+
j,
|
|
109
109
|
{
|
|
110
110
|
dismissable: !0,
|
|
111
111
|
id: s.key,
|
|
@@ -122,11 +122,11 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
|
|
|
122
122
|
selectionMode: c,
|
|
123
123
|
size: r
|
|
124
124
|
}) => {
|
|
125
|
-
const l =
|
|
125
|
+
const l = f(u);
|
|
126
126
|
return /* @__PURE__ */ i(
|
|
127
|
-
|
|
127
|
+
_,
|
|
128
128
|
{
|
|
129
|
-
className:
|
|
129
|
+
className: b(
|
|
130
130
|
{
|
|
131
131
|
[a.medium]: r === "medium"
|
|
132
132
|
},
|
|
@@ -135,7 +135,7 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
|
|
|
135
135
|
"data-invalid": !!l?.displayValidation.isInvalid || void 0,
|
|
136
136
|
children: [
|
|
137
137
|
/* @__PURE__ */ e(
|
|
138
|
-
|
|
138
|
+
h,
|
|
139
139
|
{
|
|
140
140
|
className: a.selectValue,
|
|
141
141
|
"data-disabled": t || void 0,
|
|
@@ -147,32 +147,32 @@ import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Sel
|
|
|
147
147
|
{
|
|
148
148
|
"aria-hidden": "true",
|
|
149
149
|
style: { display: "flex" },
|
|
150
|
-
children: /* @__PURE__ */ e(
|
|
150
|
+
children: /* @__PURE__ */ e(k, { size: 20 })
|
|
151
151
|
}
|
|
152
152
|
)
|
|
153
153
|
]
|
|
154
154
|
}
|
|
155
155
|
);
|
|
156
156
|
};
|
|
157
|
-
function
|
|
157
|
+
function ve({
|
|
158
158
|
children: t,
|
|
159
159
|
description: c,
|
|
160
160
|
errorMessage: r,
|
|
161
161
|
errorPosition: l = "top",
|
|
162
162
|
items: o,
|
|
163
163
|
label: s,
|
|
164
|
-
popover:
|
|
165
|
-
size:
|
|
164
|
+
popover: S,
|
|
165
|
+
size: v = "large",
|
|
166
166
|
...n
|
|
167
167
|
}) {
|
|
168
|
-
return /* @__PURE__ */ e(
|
|
169
|
-
|
|
168
|
+
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ i(
|
|
169
|
+
C,
|
|
170
170
|
{
|
|
171
171
|
...n,
|
|
172
|
-
className:
|
|
172
|
+
className: y(n.className, a.select),
|
|
173
173
|
children: [
|
|
174
|
-
/* @__PURE__ */ e(
|
|
175
|
-
c && /* @__PURE__ */ e(
|
|
174
|
+
/* @__PURE__ */ e(z, { popover: S, children: s && /* @__PURE__ */ e(N, { "data-disabled": n.isDisabled || void 0, children: s }) }),
|
|
175
|
+
c && /* @__PURE__ */ e(T, { slot: "description", children: c }),
|
|
176
176
|
l === "top" && /* @__PURE__ */ e(g, { children: r }),
|
|
177
177
|
/* @__PURE__ */ i(
|
|
178
178
|
"div",
|
|
@@ -183,7 +183,7 @@ function xe({
|
|
|
183
183
|
/* @__PURE__ */ e(
|
|
184
184
|
le,
|
|
185
185
|
{
|
|
186
|
-
size:
|
|
186
|
+
size: v,
|
|
187
187
|
...n
|
|
188
188
|
}
|
|
189
189
|
),
|
|
@@ -193,7 +193,7 @@ function xe({
|
|
|
193
193
|
),
|
|
194
194
|
l === "bottom" && /* @__PURE__ */ e(g, { children: r }),
|
|
195
195
|
/* @__PURE__ */ i(
|
|
196
|
-
|
|
196
|
+
I,
|
|
197
197
|
{
|
|
198
198
|
className: a.popover,
|
|
199
199
|
offset: 0,
|
|
@@ -201,7 +201,7 @@ function xe({
|
|
|
201
201
|
children: [
|
|
202
202
|
n.isSelectableAll && /* @__PURE__ */ e(Y, {}),
|
|
203
203
|
/* @__PURE__ */ e(
|
|
204
|
-
|
|
204
|
+
L,
|
|
205
205
|
{
|
|
206
206
|
escapeKeyBehavior: "none",
|
|
207
207
|
items: o,
|
|
@@ -217,5 +217,5 @@ function xe({
|
|
|
217
217
|
) });
|
|
218
218
|
}
|
|
219
219
|
export {
|
|
220
|
-
|
|
220
|
+
ve as S
|
|
221
221
|
};
|