@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.
- 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/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,30 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useMemo as z, useState as V, useCallback as I, useEffect as
|
|
4
|
-
import { c as
|
|
5
|
-
import { filterDOMProps as D, mergeProps as
|
|
6
|
-
import { Section as j, Item as
|
|
1
|
+
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import * as w from "react";
|
|
3
|
+
import { useMemo as z, useState as V, useCallback as I, useEffect as k, useRef as L } from "react";
|
|
4
|
+
import { c as M } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { filterDOMProps as D, mergeProps as x, useId as O, chain as N, useFormReset as R, useObjectRef as E } from "@react-aria/utils";
|
|
6
|
+
import { Section as j, Item as C } from "@react-stately/collections";
|
|
7
7
|
import { Collection as G, FieldErrorContext as H, TextField as $, TagList as W } from "react-aria-components";
|
|
8
|
-
import { L as U } from "./ListBox-
|
|
9
|
-
import { b as q, L as X, a as J } from "./ListBoxSection-
|
|
8
|
+
import { L as U } from "./ListBox-D5BBeZWL.js";
|
|
9
|
+
import { b as q, L as X, a as J } from "./ListBoxSection-MZB_5DdD.js";
|
|
10
10
|
import { useCollator as Q, useField as Y, useButton as Z } from "react-aria";
|
|
11
11
|
import { setInteractionModality as ee } from "@react-aria/interactions";
|
|
12
12
|
import { useMenuTrigger as te } from "@react-aria/menu";
|
|
13
|
-
import { ListKeyboardDelegate as le, useTypeSelect as
|
|
14
|
-
import { useMenuTriggerState as
|
|
13
|
+
import { ListKeyboardDelegate as le, useTypeSelect as ne } from "@react-aria/selection";
|
|
14
|
+
import { useMenuTriggerState as oe } from "@react-stately/menu";
|
|
15
15
|
import { useFormValidationState as ie } from "@react-stately/form";
|
|
16
16
|
import { useListState as re } from "@react-stately/list";
|
|
17
17
|
import { a as se, T as ae } from "./Tag-DxBoeE_n.js";
|
|
18
18
|
import { useFormValidation as ce } from "@react-aria/form";
|
|
19
19
|
import { useVisuallyHidden as de } from "@react-aria/visually-hidden";
|
|
20
|
-
import { a as ue, L as me } from "./Label-
|
|
20
|
+
import { a as ue, L as me } from "./Label-Dup4lWaR.js";
|
|
21
21
|
import { T as ge } from "./Text-TWzJxnto.js";
|
|
22
|
-
import { C as fe } from "./Checkbox-
|
|
22
|
+
import { C as fe } from "./Checkbox-CP6Nv9yx.js";
|
|
23
23
|
import { X as pe } from "./x-BXShoIAM.js";
|
|
24
|
-
import { u as
|
|
24
|
+
import { u as B } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
25
25
|
import { C as ye } from "./chevron-down-DgT-uSF9.js";
|
|
26
26
|
import { F as he } from "./FieldError-C0HRIcAx.js";
|
|
27
|
-
import '../assets/Select2.css';const
|
|
27
|
+
import '../assets/Select2.css';const T = ({ item: e }) => /* @__PURE__ */ o(
|
|
28
28
|
X,
|
|
29
29
|
{
|
|
30
30
|
...e.value,
|
|
@@ -32,10 +32,10 @@ import '../assets/Select2.css';const A = ({ item: e }) => /* @__PURE__ */ n(
|
|
|
32
32
|
"aria-label": e.textValue,
|
|
33
33
|
children: e.rendered
|
|
34
34
|
}
|
|
35
|
-
), be = ({ section: e, state: t }) => /* @__PURE__ */
|
|
35
|
+
), be = ({ section: e, state: t }) => /* @__PURE__ */ o(q, { ...e.value, children: t.collection.getChildren ? /* @__PURE__ */ o(G, { items: t.collection.getChildren(e.key), children: (s) => /* @__PURE__ */ o(T, { item: s }) }) : null }), Se = ({
|
|
36
36
|
state: e,
|
|
37
37
|
...t
|
|
38
|
-
}) => /* @__PURE__ */
|
|
38
|
+
}) => /* @__PURE__ */ o(
|
|
39
39
|
U,
|
|
40
40
|
{
|
|
41
41
|
...t,
|
|
@@ -43,17 +43,17 @@ import '../assets/Select2.css';const A = ({ item: e }) => /* @__PURE__ */ n(
|
|
|
43
43
|
escapeKeyBehavior: "none",
|
|
44
44
|
onSelectionChange: e.setSelectedKeys,
|
|
45
45
|
items: e.collection,
|
|
46
|
-
children: (s) => s.type === "section" ? /* @__PURE__ */
|
|
46
|
+
children: (s) => s.type === "section" ? /* @__PURE__ */ o(
|
|
47
47
|
be,
|
|
48
48
|
{
|
|
49
49
|
state: e,
|
|
50
50
|
section: s
|
|
51
51
|
}
|
|
52
|
-
) : /* @__PURE__ */
|
|
52
|
+
) : /* @__PURE__ */ o(T, { item: s })
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
function ve(e, t, s) {
|
|
56
|
-
const { disallowEmptySelection: r, isDisabled: l } = e, i = Q({ usage: "search", sensitivity: "base" }),
|
|
56
|
+
const { disallowEmptySelection: r, isDisabled: l } = e, i = Q({ usage: "search", sensitivity: "base" }), n = z(
|
|
57
57
|
() => new le(
|
|
58
58
|
t.collection,
|
|
59
59
|
t.disabledKeys,
|
|
@@ -69,24 +69,24 @@ function ve(e, t, s) {
|
|
|
69
69
|
t,
|
|
70
70
|
s
|
|
71
71
|
), u = (g) => {
|
|
72
|
-
const { selectedKeys: v, selectionMode:
|
|
73
|
-
if (
|
|
72
|
+
const { selectedKeys: v, selectionMode: F } = t, P = v.values().next().value;
|
|
73
|
+
if (F === "single")
|
|
74
74
|
switch (g.key) {
|
|
75
75
|
case "ArrowLeft": {
|
|
76
76
|
g.preventDefault();
|
|
77
|
-
const S = v.size > 0 ?
|
|
77
|
+
const S = v.size > 0 ? n.getKeyAbove(P) : n.getFirstKey();
|
|
78
78
|
S && t.setSelectedKeys([S]);
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
81
|
case "ArrowRight": {
|
|
82
82
|
g.preventDefault();
|
|
83
|
-
const S = v.size > 0 ?
|
|
83
|
+
const S = v.size > 0 ? n.getKeyBelow(P) : n.getFirstKey();
|
|
84
84
|
S && t.setSelectedKeys([S]);
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
}, { typeSelectProps: c } =
|
|
89
|
-
keyboardDelegate:
|
|
88
|
+
}, { typeSelectProps: c } = ne({
|
|
89
|
+
keyboardDelegate: n,
|
|
90
90
|
selectionManager: t.selectionManager,
|
|
91
91
|
onTypeSelect(g) {
|
|
92
92
|
t.setSelectedKeys([g]);
|
|
@@ -96,7 +96,7 @@ function ve(e, t, s) {
|
|
|
96
96
|
labelElementType: "span"
|
|
97
97
|
});
|
|
98
98
|
c.onKeyDown = c.onKeyDownCapture, delete c.onKeyDownCapture;
|
|
99
|
-
const m = D(e, { labelable: !0 }), y =
|
|
99
|
+
const m = D(e, { labelable: !0 }), y = x(c, a, p), K = O();
|
|
100
100
|
return {
|
|
101
101
|
labelProps: {
|
|
102
102
|
...b,
|
|
@@ -104,7 +104,7 @@ function ve(e, t, s) {
|
|
|
104
104
|
e.isDisabled || (s.current?.focus(), ee("keyboard"));
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
triggerProps:
|
|
107
|
+
triggerProps: x(m, {
|
|
108
108
|
...y,
|
|
109
109
|
onKeyDown: N(
|
|
110
110
|
y.onKeyDown,
|
|
@@ -115,7 +115,7 @@ function ve(e, t, s) {
|
|
|
115
115
|
"aria-labelledby": [
|
|
116
116
|
y["aria-labelledby"],
|
|
117
117
|
y["aria-label"] && !y["aria-labelledby"] ? y.id : null,
|
|
118
|
-
|
|
118
|
+
K
|
|
119
119
|
].filter(Boolean).join(" "),
|
|
120
120
|
onFocus(g) {
|
|
121
121
|
t.isFocused || (e.onFocus && e.onFocus(g), t.setFocused(!0));
|
|
@@ -125,7 +125,7 @@ function ve(e, t, s) {
|
|
|
125
125
|
}
|
|
126
126
|
}),
|
|
127
127
|
valueProps: {
|
|
128
|
-
id:
|
|
128
|
+
id: K
|
|
129
129
|
},
|
|
130
130
|
menuProps: {
|
|
131
131
|
...d,
|
|
@@ -143,12 +143,12 @@ function ve(e, t, s) {
|
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Ke(e) {
|
|
147
147
|
const {
|
|
148
148
|
collection: t,
|
|
149
149
|
disabledKeys: s,
|
|
150
150
|
selectionManager: r,
|
|
151
|
-
selectionManager: { setSelectedKeys: l, selectedKeys: i, selectionMode:
|
|
151
|
+
selectionManager: { setSelectedKeys: l, selectedKeys: i, selectionMode: n }
|
|
152
152
|
} = re(e), a = [], d = i.size !== 0 ? Array.from(i).map((u) => {
|
|
153
153
|
const c = t.getItem(u);
|
|
154
154
|
return c || a.push(u), c;
|
|
@@ -161,26 +161,26 @@ function we(e) {
|
|
|
161
161
|
collection: t,
|
|
162
162
|
disabledKeys: s,
|
|
163
163
|
selectionManager: r,
|
|
164
|
-
selectionMode:
|
|
164
|
+
selectionMode: n,
|
|
165
165
|
selectedKeys: i,
|
|
166
166
|
setSelectedKeys: l.bind(r),
|
|
167
167
|
selectedItems: d
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
const [t, s] = V(!1), r =
|
|
170
|
+
function Pe(e) {
|
|
171
|
+
const [t, s] = V(!1), r = oe(e), l = e.selectionMode === "single", i = Ke({
|
|
172
172
|
...e,
|
|
173
173
|
onSelectionChange: (c) => {
|
|
174
174
|
e.onSelectionChange && e.onSelectionChange(c), l && r.close();
|
|
175
175
|
}
|
|
176
|
-
}),
|
|
176
|
+
}), n = ie({
|
|
177
177
|
...e,
|
|
178
178
|
validationBehavior: "native",
|
|
179
179
|
value: i.selectedKeys
|
|
180
180
|
}), a = i.collection.size === 0, d = !!i.selectedKeys.size, u = I(() => {
|
|
181
|
-
|
|
182
|
-
}, [
|
|
183
|
-
return
|
|
181
|
+
n.resetValidation(), n.commitValidation();
|
|
182
|
+
}, [n]);
|
|
183
|
+
return k(() => {
|
|
184
184
|
l && d && u();
|
|
185
185
|
}, [d, l, u]), {
|
|
186
186
|
...i,
|
|
@@ -196,25 +196,25 @@ function Ke(e) {
|
|
|
196
196
|
},
|
|
197
197
|
isFocused: t,
|
|
198
198
|
setFocused: s,
|
|
199
|
-
...
|
|
199
|
+
...n
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function xe(e, t = {}) {
|
|
203
203
|
const [s, r] = V({ width: 0, height: 0 }), l = t.delay === void 0 ? 500 : t.delay, i = !!t.includePadding;
|
|
204
|
-
return
|
|
204
|
+
return k(() => {
|
|
205
205
|
if (!e) return;
|
|
206
|
-
const
|
|
207
|
-
|
|
206
|
+
const n = new ResizeObserver(
|
|
207
|
+
Ce(([a]) => {
|
|
208
208
|
const { inlineSize: d, blockSize: u } = i ? a.borderBoxSize[0] : a.contentBoxSize[0];
|
|
209
209
|
r({ width: d, height: u });
|
|
210
210
|
}, l)
|
|
211
211
|
);
|
|
212
|
-
return
|
|
213
|
-
|
|
212
|
+
return n.observe(e), () => {
|
|
213
|
+
n.disconnect();
|
|
214
214
|
};
|
|
215
215
|
}, [l, e, i]), s;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Ce(e, t) {
|
|
218
218
|
let s;
|
|
219
219
|
return (r, l) => {
|
|
220
220
|
clearTimeout(s), s = setTimeout(() => {
|
|
@@ -222,18 +222,18 @@ function xe(e, t) {
|
|
|
222
222
|
}, t);
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function _e({
|
|
226
226
|
autoComplete: e,
|
|
227
227
|
name: t,
|
|
228
228
|
isDisabled: s,
|
|
229
229
|
isRequired: r,
|
|
230
230
|
selectRef: l
|
|
231
|
-
}, i,
|
|
231
|
+
}, i, n) {
|
|
232
232
|
const { visuallyHiddenProps: a } = de();
|
|
233
233
|
return R(l, i.selectedKeys, i.setSelectedKeys), ce(
|
|
234
234
|
{
|
|
235
235
|
validationBehavior: "native",
|
|
236
|
-
focus: () =>
|
|
236
|
+
focus: () => n.current?.focus()
|
|
237
237
|
},
|
|
238
238
|
i,
|
|
239
239
|
l
|
|
@@ -260,13 +260,13 @@ function Ce({
|
|
|
260
260
|
}
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
const { state: t, triggerRef: s, name: r, isDisabled: l } = e, i = `${e.label}-hidden`,
|
|
265
|
-
{ ...e, selectRef:
|
|
263
|
+
function we(e) {
|
|
264
|
+
const { state: t, triggerRef: s, name: r, isDisabled: l } = e, i = `${e.label}-hidden`, n = L(null), { containerProps: a, selectProps: d } = _e(
|
|
265
|
+
{ ...e, selectRef: n },
|
|
266
266
|
t,
|
|
267
267
|
s
|
|
268
268
|
);
|
|
269
|
-
return t.collection.size <= 300 ? /* @__PURE__ */
|
|
269
|
+
return t.collection.size <= 300 ? /* @__PURE__ */ o(
|
|
270
270
|
"div",
|
|
271
271
|
{
|
|
272
272
|
...a,
|
|
@@ -277,12 +277,12 @@ function _e(e) {
|
|
|
277
277
|
"select",
|
|
278
278
|
{
|
|
279
279
|
...d,
|
|
280
|
-
ref:
|
|
280
|
+
ref: n,
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ o("option", {}),
|
|
283
283
|
[...t.collection.getKeys()].map((u) => {
|
|
284
284
|
const c = t.collection.getItem(u);
|
|
285
|
-
return c && c.type === "item" ? /* @__PURE__ */
|
|
285
|
+
return c && c.type === "item" ? /* @__PURE__ */ o(
|
|
286
286
|
"option",
|
|
287
287
|
{
|
|
288
288
|
value: c.key,
|
|
@@ -296,7 +296,7 @@ function _e(e) {
|
|
|
296
296
|
)
|
|
297
297
|
] })
|
|
298
298
|
}
|
|
299
|
-
) : r ? /* @__PURE__ */
|
|
299
|
+
) : r ? /* @__PURE__ */ o(
|
|
300
300
|
"input",
|
|
301
301
|
{
|
|
302
302
|
type: "hidden",
|
|
@@ -307,18 +307,18 @@ function _e(e) {
|
|
|
307
307
|
}
|
|
308
308
|
) : null;
|
|
309
309
|
}
|
|
310
|
-
const Ve = "
|
|
310
|
+
const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32", Be = "_icon_1nkrm_68", Te = "_tagGroup_1nkrm_74", Ae = "_triggerContainer_1nkrm_95", Fe = "_selectValueTag_1nkrm_101", ze = "_clearButton_1nkrm_117", Ie = "_truncate_1nkrm_129", Le = "_selectAll_1nkrm_172", f = {
|
|
311
311
|
wrapper: Ve,
|
|
312
|
-
trigger:
|
|
313
|
-
medium:
|
|
314
|
-
icon:
|
|
315
|
-
tagGroup:
|
|
316
|
-
triggerContainer:
|
|
317
|
-
selectValueTag:
|
|
312
|
+
trigger: ke,
|
|
313
|
+
medium: Me,
|
|
314
|
+
icon: Be,
|
|
315
|
+
tagGroup: Te,
|
|
316
|
+
triggerContainer: Ae,
|
|
317
|
+
selectValueTag: Fe,
|
|
318
318
|
clearButton: ze,
|
|
319
319
|
truncate: Ie,
|
|
320
320
|
selectAll: Le
|
|
321
|
-
}, De = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", chosen: "chosen" }, Oe = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", chosen: "valda" },
|
|
321
|
+
}, De = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", chosen: "chosen" }, Oe = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", chosen: "valda" }, A = {
|
|
322
322
|
en: De,
|
|
323
323
|
sv: Oe
|
|
324
324
|
}, Ne = ({
|
|
@@ -329,31 +329,31 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
329
329
|
triggerRef: l,
|
|
330
330
|
isClearable: i
|
|
331
331
|
}) => {
|
|
332
|
-
const
|
|
332
|
+
const n = B(A);
|
|
333
333
|
return /* @__PURE__ */ h(
|
|
334
334
|
"div",
|
|
335
335
|
{
|
|
336
336
|
className: f.selectValueTag,
|
|
337
337
|
"data-disabled": t || void 0,
|
|
338
338
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ o(
|
|
340
340
|
"span",
|
|
341
341
|
{
|
|
342
342
|
className: f.truncate,
|
|
343
343
|
style: { maxWidth: s - 92 },
|
|
344
|
-
children: e?.length && e.length > 1 ? `${e.length} ${
|
|
344
|
+
children: e?.length && e.length > 1 ? `${e.length} ${n.format("chosen")}` : e?.[0].textValue
|
|
345
345
|
}
|
|
346
346
|
),
|
|
347
|
-
i && /* @__PURE__ */
|
|
347
|
+
i && /* @__PURE__ */ o(
|
|
348
348
|
"button",
|
|
349
349
|
{
|
|
350
350
|
disabled: t,
|
|
351
|
-
"aria-label":
|
|
351
|
+
"aria-label": n.format("clearAll"),
|
|
352
352
|
className: f.clearButton,
|
|
353
353
|
onClick: () => {
|
|
354
354
|
r(), l?.current?.focus();
|
|
355
355
|
},
|
|
356
|
-
children: /* @__PURE__ */
|
|
356
|
+
children: /* @__PURE__ */ o(
|
|
357
357
|
pe,
|
|
358
358
|
{
|
|
359
359
|
width: 20,
|
|
@@ -372,7 +372,7 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
372
372
|
size: r = "large",
|
|
373
373
|
isOpen: l,
|
|
374
374
|
isInvalid: i,
|
|
375
|
-
selectionMode:
|
|
375
|
+
selectionMode: n,
|
|
376
376
|
state: { selectedItems: a },
|
|
377
377
|
placeholder: d,
|
|
378
378
|
children: u,
|
|
@@ -382,7 +382,7 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
382
382
|
const { buttonProps: p } = Z(
|
|
383
383
|
{ autoFocus: e, excludeFromTabOrder: t, isDisabled: s, ...b },
|
|
384
384
|
c
|
|
385
|
-
), m =
|
|
385
|
+
), m = n === "multiple";
|
|
386
386
|
return /* @__PURE__ */ h(
|
|
387
387
|
"div",
|
|
388
388
|
{
|
|
@@ -394,7 +394,7 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
394
394
|
{
|
|
395
395
|
...p,
|
|
396
396
|
autoFocus: e,
|
|
397
|
-
className:
|
|
397
|
+
className: M(f.trigger, {
|
|
398
398
|
[f.medium]: r === "medium"
|
|
399
399
|
}),
|
|
400
400
|
"data-disabled": s || void 0,
|
|
@@ -403,14 +403,14 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
403
403
|
ref: c,
|
|
404
404
|
type: "button",
|
|
405
405
|
children: [
|
|
406
|
-
m && !a ? /* @__PURE__ */
|
|
407
|
-
m ? null : /* @__PURE__ */
|
|
408
|
-
/* @__PURE__ */
|
|
406
|
+
m && !a ? /* @__PURE__ */ o("span", { children: d }) : null,
|
|
407
|
+
m ? null : /* @__PURE__ */ o("span", { children: a ? a[0].textValue : d }),
|
|
408
|
+
/* @__PURE__ */ o(
|
|
409
409
|
"div",
|
|
410
410
|
{
|
|
411
411
|
className: f.icon,
|
|
412
412
|
"aria-hidden": "true",
|
|
413
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ o(ye, { size: 20 })
|
|
414
414
|
}
|
|
415
415
|
)
|
|
416
416
|
]
|
|
@@ -420,10 +420,10 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
|
-
},
|
|
423
|
+
}, _ = ({
|
|
424
424
|
state: e,
|
|
425
425
|
errorMessage: t
|
|
426
|
-
}) => /* @__PURE__ */
|
|
426
|
+
}) => /* @__PURE__ */ o(H.Provider, { value: { ...e.displayValidation }, children: /* @__PURE__ */ o(he, { children: t }) }), Ee = w.forwardRef(
|
|
427
427
|
({ isClearable: e = !0, popover: t, ...s }, r) => {
|
|
428
428
|
const l = {
|
|
429
429
|
selectionMode: "single",
|
|
@@ -433,28 +433,28 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
433
433
|
size: "large",
|
|
434
434
|
popover: t,
|
|
435
435
|
...s
|
|
436
|
-
}, i = E(r),
|
|
436
|
+
}, i = E(r), n = Pe(l), a = B(A), { labelProps: d, triggerProps: u, valueProps: c, menuProps: b } = ve(
|
|
437
437
|
l,
|
|
438
|
-
|
|
438
|
+
n,
|
|
439
439
|
i
|
|
440
|
-
), { width: p } =
|
|
440
|
+
), { width: p } = xe(i.current, {
|
|
441
441
|
includePadding: !0
|
|
442
442
|
});
|
|
443
443
|
return /* @__PURE__ */ h(
|
|
444
444
|
$,
|
|
445
445
|
{
|
|
446
446
|
...l,
|
|
447
|
-
className:
|
|
447
|
+
className: M(f.wrapper, l.className),
|
|
448
448
|
children: [
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
|
|
449
|
+
/* @__PURE__ */ o(
|
|
450
|
+
we,
|
|
451
451
|
{
|
|
452
452
|
...l,
|
|
453
|
-
state:
|
|
453
|
+
state: n,
|
|
454
454
|
triggerRef: i
|
|
455
455
|
}
|
|
456
456
|
),
|
|
457
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ o(ue, { popover: t, children: l.label && /* @__PURE__ */ o(
|
|
458
458
|
me,
|
|
459
459
|
{
|
|
460
460
|
...d,
|
|
@@ -462,79 +462,79 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
462
462
|
children: l.label
|
|
463
463
|
}
|
|
464
464
|
) }),
|
|
465
|
-
l.description && /* @__PURE__ */
|
|
466
|
-
l.errorPosition === "top" && /* @__PURE__ */
|
|
467
|
-
|
|
465
|
+
l.description && /* @__PURE__ */ o(ge, { slot: "description", children: l.description }),
|
|
466
|
+
l.errorPosition === "top" && /* @__PURE__ */ o(
|
|
467
|
+
_,
|
|
468
468
|
{
|
|
469
469
|
...l,
|
|
470
|
-
state:
|
|
470
|
+
state: n
|
|
471
471
|
}
|
|
472
472
|
),
|
|
473
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ o(
|
|
474
474
|
Re,
|
|
475
475
|
{
|
|
476
476
|
...l,
|
|
477
477
|
...u,
|
|
478
|
-
isInvalid:
|
|
478
|
+
isInvalid: n.displayValidation.isInvalid,
|
|
479
479
|
triggerRef: i,
|
|
480
|
-
state:
|
|
481
|
-
children: l.selectionMode === "multiple" &&
|
|
480
|
+
state: n,
|
|
481
|
+
children: l.selectionMode === "multiple" && n.selectedItems ? /* @__PURE__ */ o("span", { ...c, children: /* @__PURE__ */ o(
|
|
482
482
|
Ne,
|
|
483
483
|
{
|
|
484
484
|
...l,
|
|
485
|
-
state:
|
|
485
|
+
state: n,
|
|
486
486
|
parentWidth: p,
|
|
487
|
-
onClear: () =>
|
|
487
|
+
onClear: () => n.selectionManager.clearSelection(),
|
|
488
488
|
triggerRef: i
|
|
489
489
|
}
|
|
490
490
|
) }) : null
|
|
491
491
|
}
|
|
492
492
|
),
|
|
493
|
-
l.errorPosition === "bottom" && /* @__PURE__ */
|
|
494
|
-
|
|
493
|
+
l.errorPosition === "bottom" && /* @__PURE__ */ o(
|
|
494
|
+
_,
|
|
495
495
|
{
|
|
496
496
|
...l,
|
|
497
|
-
state:
|
|
497
|
+
state: n
|
|
498
498
|
}
|
|
499
499
|
),
|
|
500
500
|
/* @__PURE__ */ h(
|
|
501
501
|
J,
|
|
502
502
|
{
|
|
503
|
-
isOpen:
|
|
503
|
+
isOpen: n.isOpen,
|
|
504
504
|
onOpenChange: (m) => {
|
|
505
|
-
m ||
|
|
505
|
+
m || n.close();
|
|
506
506
|
},
|
|
507
507
|
triggerRef: i,
|
|
508
508
|
style: { width: p },
|
|
509
509
|
children: [
|
|
510
|
-
l.isSelectableAll && /* @__PURE__ */
|
|
510
|
+
l.isSelectableAll && /* @__PURE__ */ o(
|
|
511
511
|
fe,
|
|
512
512
|
{
|
|
513
|
-
isSelected:
|
|
514
|
-
isIndeterminate: !
|
|
513
|
+
isSelected: n.selectionManager.isSelectAll,
|
|
514
|
+
isIndeterminate: !n.selectionManager.isSelectAll && !n.selectionManager.isEmpty,
|
|
515
515
|
className: f.selectAll,
|
|
516
|
-
onChange: () =>
|
|
516
|
+
onChange: () => n.selectionManager.toggleSelectAll(),
|
|
517
517
|
children: a.format("selectAll")
|
|
518
518
|
}
|
|
519
519
|
),
|
|
520
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ o(
|
|
521
521
|
Se,
|
|
522
522
|
{
|
|
523
523
|
...b,
|
|
524
|
-
state:
|
|
524
|
+
state: n
|
|
525
525
|
}
|
|
526
526
|
)
|
|
527
527
|
]
|
|
528
528
|
}
|
|
529
529
|
),
|
|
530
|
-
l.showTags && !!
|
|
530
|
+
l.showTags && !!n.selectedItems && /* @__PURE__ */ o(
|
|
531
531
|
se,
|
|
532
532
|
{
|
|
533
533
|
"aria-label": a.format("selectedItems"),
|
|
534
534
|
selectionBehavior: "toggle",
|
|
535
|
-
onRemove: (m) =>
|
|
535
|
+
onRemove: (m) => n.selectionManager.toggleSelection(Array.from(m)[0]),
|
|
536
536
|
className: f.tagGroup,
|
|
537
|
-
children: /* @__PURE__ */
|
|
537
|
+
children: /* @__PURE__ */ o(W, { items: n.selectedItems, children: (m) => /* @__PURE__ */ o(
|
|
538
538
|
ae,
|
|
539
539
|
{
|
|
540
540
|
textValue: m.textValue,
|
|
@@ -551,22 +551,22 @@ const Ve = "_wrapper_1rw0v_7", Me = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32"
|
|
|
551
551
|
}
|
|
552
552
|
);
|
|
553
553
|
}
|
|
554
|
-
), je =
|
|
555
|
-
({ options: e, ...t }, s) => /* @__PURE__ */
|
|
554
|
+
), je = w.forwardRef(
|
|
555
|
+
({ options: e, ...t }, s) => /* @__PURE__ */ o(
|
|
556
556
|
Ee,
|
|
557
557
|
{
|
|
558
558
|
...t,
|
|
559
559
|
items: e,
|
|
560
560
|
ref: s,
|
|
561
|
-
children: (r) => r.children ? /* @__PURE__ */
|
|
561
|
+
children: (r) => r.children ? /* @__PURE__ */ o(
|
|
562
562
|
j,
|
|
563
563
|
{
|
|
564
564
|
items: r.children,
|
|
565
565
|
title: r.name,
|
|
566
|
-
children: (l) => /* @__PURE__ */
|
|
566
|
+
children: (l) => /* @__PURE__ */ o(C, { textValue: l.textValue, children: l.name })
|
|
567
567
|
},
|
|
568
568
|
r.name
|
|
569
|
-
) : /* @__PURE__ */
|
|
569
|
+
) : /* @__PURE__ */ o(C, { textValue: r.textValue, children: r.name })
|
|
570
570
|
}
|
|
571
571
|
)
|
|
572
572
|
);
|