@midas-ds/components 15.4.0 → 15.4.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 +6 -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-BCoomT4-.js → AccordionItem-69q6FXXl.js} +37 -37
- package/chunks/{BadgeContainer-BJAC-kV0.js → BadgeContainer-CKVsfTlF.js} +1 -1
- package/chunks/Breadcrumbs-By2bMbQd.js +28 -0
- package/chunks/Button-BMf7mX0N.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-C3FOm8N8.js +84 -0
- package/chunks/{ColorSchemeSwitch-Cd6VSXql.js → ColorSchemeSwitch-DugvPh6T.js} +17 -17
- package/chunks/ComboBox-BqRZMi8W.js +108 -0
- package/chunks/DateField-12KSJHls.js +46 -0
- package/chunks/DateInputDivider-CkTB5q5k.js +36 -0
- package/chunks/DateRangePicker-BLRFvUp0.js +117 -0
- package/chunks/Dialog-C-X_qUR6.js +66 -0
- package/chunks/Dropdown-D7HQo9eM.js +79 -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-Bw3rjGtB.js → InfoBanner-Cc3GhryE.js} +3 -3
- package/chunks/Label-D6WuwdAj.js +73 -0
- package/chunks/{Layout-InD0Hl7F.js → Layout-DGCDkyf3.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-Bo0eLhpt.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-zeJLxHVL.js +53 -0
- package/chunks/Radio-kvQP7E9s.js +43 -0
- package/chunks/RangeCalendar-CnquULdq.js +99 -0
- package/chunks/{SearchField-Dr3DAs9W.js → SearchField-B6ygRRL4.js} +39 -39
- package/chunks/Select-Cm5VZRTx.js +576 -0
- package/chunks/{Select-fDRXxmLm.js → Select-qmCuJm2x.js} +48 -46
- package/chunks/Separator-BcnQEA9f.js +76 -0
- package/chunks/{Skeleton-Bcg_xgAx.js → Skeleton-DqIHQLQl.js} +1 -1
- package/chunks/Spinner-Pll5zpx8.js +48 -0
- package/chunks/TabList-D2XV5ixe.js +81 -0
- package/chunks/Table-B1rlSIhS.js +139 -0
- package/chunks/Tag-Ca8wKXOy.js +53 -0
- package/chunks/{Text-WP6RbnnK.js → Text-TWzJxnto.js} +9 -9
- package/chunks/TextArea-UU7gFMEb.js +124 -0
- package/chunks/Toast-Cm2Zqq-F.js +162 -0
- 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/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/index.js +1 -1
- package/toggle-button/index.js +1 -1
- package/tooltip/index.js +1 -1
- 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/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/Toast-CP_V12b3.js +0 -161
- package/chunks/ToggleButtonGroup-CgNeypuW.js +0 -29
- package/chunks/Tooltip-C53p0sfk.js +0 -46
- package/chunks/clsx-CuNqTHjr.js +0 -11
- 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
|
@@ -1,566 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
|
-
import * as _ from "react";
|
|
3
|
-
import { useMemo as z, useState as C, useCallback as F, useEffect as V, useRef as I } from "react";
|
|
4
|
-
import { c as B } from "./clsx-CuNqTHjr.js";
|
|
5
|
-
import { V as D, aQ as L, aR as N, aS as O, aT as R, aU as E, aV as j, aG as w, aW as G, aX as W, aY as H, a as U, aZ as X, a_ as q, a$ as Q, b0 as Y, I as Z, b1 as J, b2 as K, b3 as ee, ab as te, w as le } from "./react-aria-components-mIKW9wOa.js";
|
|
6
|
-
import { L as ae } from "./ListBox-CKDglhFH.js";
|
|
7
|
-
import { b as oe, L as ne, a as re } from "./ListBoxSection-CvtRigQb.js";
|
|
8
|
-
import { c as se, e as ie } from "./react-stately-DRNKkAB0.js";
|
|
9
|
-
import { a as ce, T as de } from "./Tag-BZnq1_yZ.js";
|
|
10
|
-
import { a as ue, L as fe } from "./Label-CKe9pgXT.js";
|
|
11
|
-
import { T as ge } from "./Text-WP6RbnnK.js";
|
|
12
|
-
import { C as be } from "./Checkbox-CogzFDe3.js";
|
|
13
|
-
import { X as me } from "./x-BXShoIAM.js";
|
|
14
|
-
import { u as M } from "./useLocalizedStringFormatter-CPwiI7nv.js";
|
|
15
|
-
import { C as pe } from "./chevron-down-DgT-uSF9.js";
|
|
16
|
-
import { F as he } from "./FieldError-CZKAYQ-n.js";
|
|
17
|
-
import '../assets/Select2.css';const A = ({ item: e }) => /* @__PURE__ */ o(
|
|
18
|
-
ne,
|
|
19
|
-
{
|
|
20
|
-
...e.value,
|
|
21
|
-
textValue: e.textValue,
|
|
22
|
-
"aria-label": e.textValue,
|
|
23
|
-
children: e.rendered
|
|
24
|
-
}
|
|
25
|
-
), ye = ({ section: e, state: t }) => /* @__PURE__ */ o(oe, { ...e.value, children: t.collection.getChildren ? /* @__PURE__ */ o(D, { items: t.collection.getChildren(e.key), children: (s) => /* @__PURE__ */ o(A, { item: s }) }) : null }), $e = ({
|
|
26
|
-
state: e,
|
|
27
|
-
...t
|
|
28
|
-
}) => /* @__PURE__ */ o(
|
|
29
|
-
ae,
|
|
30
|
-
{
|
|
31
|
-
...t,
|
|
32
|
-
...e,
|
|
33
|
-
escapeKeyBehavior: "none",
|
|
34
|
-
onSelectionChange: e.setSelectedKeys,
|
|
35
|
-
items: e.collection,
|
|
36
|
-
children: (s) => s.type === "section" ? /* @__PURE__ */ o(
|
|
37
|
-
ye,
|
|
38
|
-
{
|
|
39
|
-
state: e,
|
|
40
|
-
section: s
|
|
41
|
-
}
|
|
42
|
-
) : /* @__PURE__ */ o(A, { item: s })
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
function Se(e, t, s) {
|
|
46
|
-
const { disallowEmptySelection: r, isDisabled: l } = e, n = L({ usage: "search", sensitivity: "base" }), a = z(
|
|
47
|
-
() => new N(
|
|
48
|
-
t.collection,
|
|
49
|
-
t.disabledKeys,
|
|
50
|
-
null,
|
|
51
|
-
n
|
|
52
|
-
),
|
|
53
|
-
[t.collection, t.disabledKeys, n]
|
|
54
|
-
), { menuTriggerProps: i, menuProps: d } = O(
|
|
55
|
-
{
|
|
56
|
-
isDisabled: l,
|
|
57
|
-
type: "listbox"
|
|
58
|
-
},
|
|
59
|
-
t,
|
|
60
|
-
s
|
|
61
|
-
), u = (g) => {
|
|
62
|
-
const { selectedKeys: S, selectionMode: k } = t, x = S.values().next().value;
|
|
63
|
-
if (k === "single")
|
|
64
|
-
switch (g.key) {
|
|
65
|
-
case "ArrowLeft": {
|
|
66
|
-
g.preventDefault();
|
|
67
|
-
const $ = S.size > 0 ? a.getKeyAbove(x) : a.getFirstKey();
|
|
68
|
-
$ && t.setSelectedKeys([$]);
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
case "ArrowRight": {
|
|
72
|
-
g.preventDefault();
|
|
73
|
-
const $ = S.size > 0 ? a.getKeyBelow(x) : a.getFirstKey();
|
|
74
|
-
$ && t.setSelectedKeys([$]);
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, { typeSelectProps: c } = R({
|
|
79
|
-
keyboardDelegate: a,
|
|
80
|
-
selectionManager: t.selectionManager,
|
|
81
|
-
onTypeSelect(g) {
|
|
82
|
-
t.setSelectedKeys([g]);
|
|
83
|
-
}
|
|
84
|
-
}), { labelProps: y, fieldProps: m } = E({
|
|
85
|
-
...e,
|
|
86
|
-
labelElementType: "span"
|
|
87
|
-
});
|
|
88
|
-
c.onKeyDown = c.onKeyDownCapture, delete c.onKeyDownCapture;
|
|
89
|
-
const f = j(e, { labelable: !0 }), p = w(c, i, m), v = G();
|
|
90
|
-
return {
|
|
91
|
-
labelProps: {
|
|
92
|
-
...y,
|
|
93
|
-
onClick: () => {
|
|
94
|
-
e.isDisabled || (s.current?.focus(), H("keyboard"));
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
triggerProps: w(f, {
|
|
98
|
-
...p,
|
|
99
|
-
onKeyDown: W(
|
|
100
|
-
p.onKeyDown,
|
|
101
|
-
u,
|
|
102
|
-
e.onKeyDown
|
|
103
|
-
),
|
|
104
|
-
onKeyUp: e.onKeyUp,
|
|
105
|
-
"aria-labelledby": [
|
|
106
|
-
p["aria-labelledby"],
|
|
107
|
-
p["aria-label"] && !p["aria-labelledby"] ? p.id : null,
|
|
108
|
-
v
|
|
109
|
-
].filter(Boolean).join(" "),
|
|
110
|
-
onFocus(g) {
|
|
111
|
-
t.isFocused || (e.onFocus && e.onFocus(g), t.setFocused(!0));
|
|
112
|
-
},
|
|
113
|
-
onBlur(g) {
|
|
114
|
-
t.isOpen || (e.onBlur && e.onBlur(g), t.setFocused(!1));
|
|
115
|
-
}
|
|
116
|
-
}),
|
|
117
|
-
valueProps: {
|
|
118
|
-
id: v
|
|
119
|
-
},
|
|
120
|
-
menuProps: {
|
|
121
|
-
...d,
|
|
122
|
-
disallowEmptySelection: r,
|
|
123
|
-
autoFocus: t.focusStrategy || !0,
|
|
124
|
-
shouldSelectOnPressUp: !0,
|
|
125
|
-
shouldFocusOnHover: !0,
|
|
126
|
-
onBlur: (g) => {
|
|
127
|
-
g.currentTarget.contains(g.relatedTarget) || (e.onBlur && e.onBlur(g), t.setFocused(!1));
|
|
128
|
-
},
|
|
129
|
-
"aria-labelledby": [
|
|
130
|
-
m["aria-labelledby"],
|
|
131
|
-
p["aria-label"] && !m["aria-labelledby"] ? p.id : null
|
|
132
|
-
].filter(Boolean).join(" ")
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
function ve(e) {
|
|
137
|
-
const {
|
|
138
|
-
collection: t,
|
|
139
|
-
disabledKeys: s,
|
|
140
|
-
selectionManager: r,
|
|
141
|
-
selectionManager: { setSelectedKeys: l, selectedKeys: n, selectionMode: a }
|
|
142
|
-
} = se(e), i = [], d = n.size !== 0 ? Array.from(n).map((u) => {
|
|
143
|
-
const c = t.getItem(u);
|
|
144
|
-
return c || i.push(u), c;
|
|
145
|
-
}).filter(Boolean) : null;
|
|
146
|
-
return i.length && console.warn(
|
|
147
|
-
`Select: Keys "${i.join(
|
|
148
|
-
", "
|
|
149
|
-
)}" passed to "selectedKeys" are not present in the collection.`
|
|
150
|
-
), {
|
|
151
|
-
collection: t,
|
|
152
|
-
disabledKeys: s,
|
|
153
|
-
selectionManager: r,
|
|
154
|
-
selectionMode: a,
|
|
155
|
-
selectedKeys: n,
|
|
156
|
-
setSelectedKeys: l.bind(r),
|
|
157
|
-
selectedItems: d
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
function xe(e) {
|
|
161
|
-
const [t, s] = C(!1), r = ie(e), l = e.selectionMode === "single", n = ve({
|
|
162
|
-
...e,
|
|
163
|
-
onSelectionChange: (c) => {
|
|
164
|
-
e.onSelectionChange && e.onSelectionChange(c), l && r.close();
|
|
165
|
-
}
|
|
166
|
-
}), a = U({
|
|
167
|
-
...e,
|
|
168
|
-
validationBehavior: "native",
|
|
169
|
-
value: n.selectedKeys
|
|
170
|
-
}), i = n.collection.size === 0, d = !!n.selectedKeys.size, u = F(() => {
|
|
171
|
-
a.resetValidation(), a.commitValidation();
|
|
172
|
-
}, [a]);
|
|
173
|
-
return V(() => {
|
|
174
|
-
l && d && u();
|
|
175
|
-
}, [d, l, u]), {
|
|
176
|
-
...n,
|
|
177
|
-
...r,
|
|
178
|
-
close() {
|
|
179
|
-
r.close(), d && u();
|
|
180
|
-
},
|
|
181
|
-
open() {
|
|
182
|
-
i || r.open();
|
|
183
|
-
},
|
|
184
|
-
toggle(c) {
|
|
185
|
-
i || r.toggle(c);
|
|
186
|
-
},
|
|
187
|
-
isFocused: t,
|
|
188
|
-
setFocused: s,
|
|
189
|
-
...a
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
function we(e, t = {}) {
|
|
193
|
-
const [s, r] = C({ width: 0, height: 0 }), l = t.delay === void 0 ? 500 : t.delay, n = !!t.includePadding;
|
|
194
|
-
return V(() => {
|
|
195
|
-
if (!e) return;
|
|
196
|
-
const a = new ResizeObserver(
|
|
197
|
-
Ke(([i]) => {
|
|
198
|
-
const { inlineSize: d, blockSize: u } = n ? i.borderBoxSize[0] : i.contentBoxSize[0];
|
|
199
|
-
r({ width: d, height: u });
|
|
200
|
-
}, l)
|
|
201
|
-
);
|
|
202
|
-
return a.observe(e), () => {
|
|
203
|
-
a.disconnect();
|
|
204
|
-
};
|
|
205
|
-
}, [l, e, n]), s;
|
|
206
|
-
}
|
|
207
|
-
function Ke(e, t) {
|
|
208
|
-
let s;
|
|
209
|
-
return (r, l) => {
|
|
210
|
-
clearTimeout(s), s = setTimeout(() => {
|
|
211
|
-
e(r, l);
|
|
212
|
-
}, t);
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
function Pe({
|
|
216
|
-
autoComplete: e,
|
|
217
|
-
name: t,
|
|
218
|
-
isDisabled: s,
|
|
219
|
-
isRequired: r,
|
|
220
|
-
selectRef: l
|
|
221
|
-
}, n, a) {
|
|
222
|
-
const { visuallyHiddenProps: i } = X();
|
|
223
|
-
return q(l, n.selectedKeys, n.setSelectedKeys), Q(
|
|
224
|
-
{
|
|
225
|
-
validationBehavior: "native",
|
|
226
|
-
focus: () => a.current?.focus()
|
|
227
|
-
},
|
|
228
|
-
n,
|
|
229
|
-
l
|
|
230
|
-
), {
|
|
231
|
-
containerProps: {
|
|
232
|
-
...i,
|
|
233
|
-
"aria-hidden": !0,
|
|
234
|
-
// @ts-expect-error - data-a11y-ignore is not a standard attribute
|
|
235
|
-
"data-react-aria-prevent-focus": !0,
|
|
236
|
-
"data-a11y-ignore": "aria-hidden-focus"
|
|
237
|
-
},
|
|
238
|
-
inputProps: {
|
|
239
|
-
style: { display: "none" }
|
|
240
|
-
},
|
|
241
|
-
selectProps: {
|
|
242
|
-
tabIndex: -1,
|
|
243
|
-
autoComplete: e,
|
|
244
|
-
disabled: s,
|
|
245
|
-
required: r,
|
|
246
|
-
name: t,
|
|
247
|
-
value: Array.from(n.selectedKeys).map((d) => d.toString()),
|
|
248
|
-
onChange: (d) => n.setSelectedKeys(d.target.value),
|
|
249
|
-
multiple: !0
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
function _e(e) {
|
|
254
|
-
const { state: t, triggerRef: s, name: r, isDisabled: l } = e, n = `${e.label}-hidden`, a = I(null), { containerProps: i, selectProps: d } = Pe(
|
|
255
|
-
{ ...e, selectRef: a },
|
|
256
|
-
t,
|
|
257
|
-
s
|
|
258
|
-
);
|
|
259
|
-
return t.collection.size <= 300 ? /* @__PURE__ */ o(
|
|
260
|
-
"div",
|
|
261
|
-
{
|
|
262
|
-
...i,
|
|
263
|
-
"data-testid": "hidden-select-container",
|
|
264
|
-
children: /* @__PURE__ */ h("label", { children: [
|
|
265
|
-
n,
|
|
266
|
-
/* @__PURE__ */ h(
|
|
267
|
-
"select",
|
|
268
|
-
{
|
|
269
|
-
...d,
|
|
270
|
-
ref: a,
|
|
271
|
-
children: [
|
|
272
|
-
/* @__PURE__ */ o("option", {}),
|
|
273
|
-
[...t.collection.getKeys()].map((u) => {
|
|
274
|
-
const c = t.collection.getItem(u);
|
|
275
|
-
return c && c.type === "item" ? /* @__PURE__ */ o(
|
|
276
|
-
"option",
|
|
277
|
-
{
|
|
278
|
-
value: c.key,
|
|
279
|
-
children: c.textValue
|
|
280
|
-
},
|
|
281
|
-
c.key
|
|
282
|
-
) : null;
|
|
283
|
-
})
|
|
284
|
-
]
|
|
285
|
-
}
|
|
286
|
-
)
|
|
287
|
-
] })
|
|
288
|
-
}
|
|
289
|
-
) : r ? /* @__PURE__ */ o(
|
|
290
|
-
"input",
|
|
291
|
-
{
|
|
292
|
-
type: "hidden",
|
|
293
|
-
autoComplete: d.autoComplete,
|
|
294
|
-
name: r,
|
|
295
|
-
disabled: l,
|
|
296
|
-
value: Array.from(t.selectedKeys).map((u) => u.toString()) ?? [""]
|
|
297
|
-
}
|
|
298
|
-
) : null;
|
|
299
|
-
}
|
|
300
|
-
const Ce = "_wrapper_1rw0v_7", Ve = "_trigger_1rw0v_18", Be = "_medium_1rw0v_32", Me = "_icon_1rw0v_68", Ae = "_tagGroup_1rw0v_74", Te = "_triggerContainer_1rw0v_95", ke = "_selectValueTag_1rw0v_101", ze = "_clearButton_1rw0v_117", Fe = "_truncate_1rw0v_129", Ie = "_selectAll_1rw0v_172", b = {
|
|
301
|
-
wrapper: Ce,
|
|
302
|
-
trigger: Ve,
|
|
303
|
-
medium: Be,
|
|
304
|
-
icon: Me,
|
|
305
|
-
tagGroup: Ae,
|
|
306
|
-
triggerContainer: Te,
|
|
307
|
-
selectValueTag: ke,
|
|
308
|
-
clearButton: ze,
|
|
309
|
-
truncate: Fe,
|
|
310
|
-
selectAll: Ie
|
|
311
|
-
}, De = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", chosen: "chosen" }, Le = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", chosen: "valda" }, T = {
|
|
312
|
-
en: De,
|
|
313
|
-
sv: Le
|
|
314
|
-
}, Ne = ({
|
|
315
|
-
state: { selectedItems: e },
|
|
316
|
-
isDisabled: t,
|
|
317
|
-
parentWidth: s,
|
|
318
|
-
onClear: r,
|
|
319
|
-
triggerRef: l,
|
|
320
|
-
isClearable: n
|
|
321
|
-
}) => {
|
|
322
|
-
const a = M(T);
|
|
323
|
-
return /* @__PURE__ */ h(
|
|
324
|
-
"div",
|
|
325
|
-
{
|
|
326
|
-
className: b.selectValueTag,
|
|
327
|
-
"data-disabled": t || void 0,
|
|
328
|
-
children: [
|
|
329
|
-
/* @__PURE__ */ o(
|
|
330
|
-
"span",
|
|
331
|
-
{
|
|
332
|
-
className: b.truncate,
|
|
333
|
-
style: { maxWidth: s - 92 },
|
|
334
|
-
children: e?.length && e.length > 1 ? `${e.length} ${a.format("chosen")}` : e?.[0].textValue
|
|
335
|
-
}
|
|
336
|
-
),
|
|
337
|
-
n && /* @__PURE__ */ o(
|
|
338
|
-
"button",
|
|
339
|
-
{
|
|
340
|
-
disabled: t,
|
|
341
|
-
"aria-label": a.format("clearAll"),
|
|
342
|
-
className: b.clearButton,
|
|
343
|
-
onClick: () => {
|
|
344
|
-
r(), l?.current?.focus();
|
|
345
|
-
},
|
|
346
|
-
children: /* @__PURE__ */ o(
|
|
347
|
-
me,
|
|
348
|
-
{
|
|
349
|
-
width: 20,
|
|
350
|
-
height: 20
|
|
351
|
-
}
|
|
352
|
-
)
|
|
353
|
-
}
|
|
354
|
-
)
|
|
355
|
-
]
|
|
356
|
-
}
|
|
357
|
-
);
|
|
358
|
-
}, Oe = ({
|
|
359
|
-
autoFocus: e,
|
|
360
|
-
excludeFromTabOrder: t,
|
|
361
|
-
isDisabled: s,
|
|
362
|
-
size: r = "large",
|
|
363
|
-
isOpen: l,
|
|
364
|
-
isInvalid: n,
|
|
365
|
-
selectionMode: a,
|
|
366
|
-
state: { selectedItems: i },
|
|
367
|
-
placeholder: d,
|
|
368
|
-
children: u,
|
|
369
|
-
triggerRef: c,
|
|
370
|
-
...y
|
|
371
|
-
}) => {
|
|
372
|
-
const { buttonProps: m } = Y(
|
|
373
|
-
{ autoFocus: e, excludeFromTabOrder: t, isDisabled: s, ...y },
|
|
374
|
-
c
|
|
375
|
-
), f = a === "multiple";
|
|
376
|
-
return /* @__PURE__ */ h(
|
|
377
|
-
"div",
|
|
378
|
-
{
|
|
379
|
-
className: b.triggerContainer,
|
|
380
|
-
"data-disabled": s || void 0,
|
|
381
|
-
children: [
|
|
382
|
-
/* @__PURE__ */ h(
|
|
383
|
-
"button",
|
|
384
|
-
{
|
|
385
|
-
...m,
|
|
386
|
-
autoFocus: e,
|
|
387
|
-
className: B(b.trigger, {
|
|
388
|
-
[b.medium]: r === "medium"
|
|
389
|
-
}),
|
|
390
|
-
"data-disabled": s || void 0,
|
|
391
|
-
"data-invalid": n || void 0,
|
|
392
|
-
"data-open": l || void 0,
|
|
393
|
-
ref: c,
|
|
394
|
-
type: "button",
|
|
395
|
-
children: [
|
|
396
|
-
f && !i ? /* @__PURE__ */ o("span", { children: d }) : null,
|
|
397
|
-
f ? null : /* @__PURE__ */ o("span", { children: i ? i[0].textValue : d }),
|
|
398
|
-
/* @__PURE__ */ o(
|
|
399
|
-
"div",
|
|
400
|
-
{
|
|
401
|
-
className: b.icon,
|
|
402
|
-
"aria-hidden": "true",
|
|
403
|
-
children: /* @__PURE__ */ o(pe, { size: 20 })
|
|
404
|
-
}
|
|
405
|
-
)
|
|
406
|
-
]
|
|
407
|
-
}
|
|
408
|
-
),
|
|
409
|
-
u
|
|
410
|
-
]
|
|
411
|
-
}
|
|
412
|
-
);
|
|
413
|
-
}, P = ({
|
|
414
|
-
state: e,
|
|
415
|
-
errorMessage: t
|
|
416
|
-
}) => /* @__PURE__ */ o(Z.Provider, { value: { ...e.displayValidation }, children: /* @__PURE__ */ o(he, { children: t }) }), Re = _.forwardRef(
|
|
417
|
-
({ isClearable: e = !0, popover: t, ...s }, r) => {
|
|
418
|
-
const l = {
|
|
419
|
-
selectionMode: "single",
|
|
420
|
-
errorPosition: "top",
|
|
421
|
-
disallowEmptySelection: !e,
|
|
422
|
-
isClearable: e,
|
|
423
|
-
size: "large",
|
|
424
|
-
popover: t,
|
|
425
|
-
...s
|
|
426
|
-
}, n = ee(r), a = xe(l), i = M(T), { labelProps: d, triggerProps: u, valueProps: c, menuProps: y } = Se(
|
|
427
|
-
l,
|
|
428
|
-
a,
|
|
429
|
-
n
|
|
430
|
-
), { width: m } = we(n.current, {
|
|
431
|
-
includePadding: !0
|
|
432
|
-
});
|
|
433
|
-
return /* @__PURE__ */ h(
|
|
434
|
-
te,
|
|
435
|
-
{
|
|
436
|
-
...l,
|
|
437
|
-
className: B(b.wrapper, l.className),
|
|
438
|
-
children: [
|
|
439
|
-
/* @__PURE__ */ o(
|
|
440
|
-
_e,
|
|
441
|
-
{
|
|
442
|
-
...l,
|
|
443
|
-
state: a,
|
|
444
|
-
triggerRef: n
|
|
445
|
-
}
|
|
446
|
-
),
|
|
447
|
-
/* @__PURE__ */ o(ue, { popover: t, children: l.label && /* @__PURE__ */ o(
|
|
448
|
-
fe,
|
|
449
|
-
{
|
|
450
|
-
...d,
|
|
451
|
-
"data-disabled": l.isDisabled || void 0,
|
|
452
|
-
children: l.label
|
|
453
|
-
}
|
|
454
|
-
) }),
|
|
455
|
-
l.description && /* @__PURE__ */ o(ge, { slot: "description", children: l.description }),
|
|
456
|
-
l.errorPosition === "top" && /* @__PURE__ */ o(
|
|
457
|
-
P,
|
|
458
|
-
{
|
|
459
|
-
...l,
|
|
460
|
-
state: a
|
|
461
|
-
}
|
|
462
|
-
),
|
|
463
|
-
/* @__PURE__ */ o(
|
|
464
|
-
Oe,
|
|
465
|
-
{
|
|
466
|
-
...l,
|
|
467
|
-
...u,
|
|
468
|
-
isInvalid: a.displayValidation.isInvalid,
|
|
469
|
-
triggerRef: n,
|
|
470
|
-
state: a,
|
|
471
|
-
children: l.selectionMode === "multiple" && a.selectedItems ? /* @__PURE__ */ o("span", { ...c, children: /* @__PURE__ */ o(
|
|
472
|
-
Ne,
|
|
473
|
-
{
|
|
474
|
-
...l,
|
|
475
|
-
state: a,
|
|
476
|
-
parentWidth: m,
|
|
477
|
-
onClear: () => a.selectionManager.clearSelection(),
|
|
478
|
-
triggerRef: n
|
|
479
|
-
}
|
|
480
|
-
) }) : null
|
|
481
|
-
}
|
|
482
|
-
),
|
|
483
|
-
l.errorPosition === "bottom" && /* @__PURE__ */ o(
|
|
484
|
-
P,
|
|
485
|
-
{
|
|
486
|
-
...l,
|
|
487
|
-
state: a
|
|
488
|
-
}
|
|
489
|
-
),
|
|
490
|
-
/* @__PURE__ */ h(
|
|
491
|
-
re,
|
|
492
|
-
{
|
|
493
|
-
isOpen: a.isOpen,
|
|
494
|
-
onOpenChange: (f) => {
|
|
495
|
-
f || a.close();
|
|
496
|
-
},
|
|
497
|
-
triggerRef: n,
|
|
498
|
-
style: { width: m },
|
|
499
|
-
children: [
|
|
500
|
-
l.isSelectableAll && /* @__PURE__ */ o(
|
|
501
|
-
be,
|
|
502
|
-
{
|
|
503
|
-
isSelected: a.selectionManager.isSelectAll,
|
|
504
|
-
isIndeterminate: !a.selectionManager.isSelectAll && !a.selectionManager.isEmpty,
|
|
505
|
-
className: b.selectAll,
|
|
506
|
-
onChange: () => a.selectionManager.toggleSelectAll(),
|
|
507
|
-
children: i.format("selectAll")
|
|
508
|
-
}
|
|
509
|
-
),
|
|
510
|
-
/* @__PURE__ */ o(
|
|
511
|
-
$e,
|
|
512
|
-
{
|
|
513
|
-
...y,
|
|
514
|
-
state: a
|
|
515
|
-
}
|
|
516
|
-
)
|
|
517
|
-
]
|
|
518
|
-
}
|
|
519
|
-
),
|
|
520
|
-
l.showTags && !!a.selectedItems && /* @__PURE__ */ o(
|
|
521
|
-
ce,
|
|
522
|
-
{
|
|
523
|
-
"aria-label": i.format("selectedItems"),
|
|
524
|
-
selectionBehavior: "toggle",
|
|
525
|
-
onRemove: (f) => a.selectionManager.toggleSelection(Array.from(f)[0]),
|
|
526
|
-
className: b.tagGroup,
|
|
527
|
-
children: /* @__PURE__ */ o(le, { items: a.selectedItems, children: (f) => /* @__PURE__ */ o(
|
|
528
|
-
de,
|
|
529
|
-
{
|
|
530
|
-
textValue: f.textValue,
|
|
531
|
-
id: f.key,
|
|
532
|
-
dismissable: !0,
|
|
533
|
-
isDisabled: l.isDisabled,
|
|
534
|
-
children: f.textValue
|
|
535
|
-
},
|
|
536
|
-
f.key
|
|
537
|
-
) })
|
|
538
|
-
}
|
|
539
|
-
)
|
|
540
|
-
]
|
|
541
|
-
}
|
|
542
|
-
);
|
|
543
|
-
}
|
|
544
|
-
), Ee = _.forwardRef(
|
|
545
|
-
({ options: e, ...t }, s) => /* @__PURE__ */ o(
|
|
546
|
-
Re,
|
|
547
|
-
{
|
|
548
|
-
...t,
|
|
549
|
-
items: e,
|
|
550
|
-
ref: s,
|
|
551
|
-
children: (r) => r.children ? /* @__PURE__ */ o(
|
|
552
|
-
J,
|
|
553
|
-
{
|
|
554
|
-
items: r.children,
|
|
555
|
-
title: r.name,
|
|
556
|
-
children: (l) => /* @__PURE__ */ o(K, { textValue: l.textValue, children: l.name })
|
|
557
|
-
},
|
|
558
|
-
r.name
|
|
559
|
-
) : /* @__PURE__ */ o(K, { textValue: r.textValue, children: r.name })
|
|
560
|
-
}
|
|
561
|
-
)
|
|
562
|
-
);
|
|
563
|
-
Ee.displayName = "Select";
|
|
564
|
-
export {
|
|
565
|
-
Ee as S
|
|
566
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as u, Fragment as i } from "react/jsx-runtime";
|
|
2
|
-
import { R as _, S as l, L as d, ar as f, as as b } from "./react-aria-components-mIKW9wOa.js";
|
|
3
|
-
import { c as o } from "./clsx-CuNqTHjr.js";
|
|
4
|
-
import { C as k } from "./check-BxlvVsvD.js";
|
|
5
|
-
import { C as $ } from "./chevron-right-GpyqdYK4.js";
|
|
6
|
-
import '../assets/Separator.css';const h = "_menu_1ku97_1", p = "_menuSection_1ku97_17", x = "_medium_1ku97_29", M = "_menuItem_1ku97_35", S = "_mainContent_1ku97_105", v = "_checkMark_1ku97_116", C = "_separator_1ku97_126", N = "_menuPopover_1ku97_149", t = {
|
|
7
|
-
menu: h,
|
|
8
|
-
menuSection: p,
|
|
9
|
-
medium: x,
|
|
10
|
-
menuItem: M,
|
|
11
|
-
mainContent: S,
|
|
12
|
-
checkMark: v,
|
|
13
|
-
separator: C,
|
|
14
|
-
menuPopover: N
|
|
15
|
-
}, z = ({
|
|
16
|
-
className: e,
|
|
17
|
-
size: c = "large",
|
|
18
|
-
...a
|
|
19
|
-
}) => /* @__PURE__ */ n(
|
|
20
|
-
_,
|
|
21
|
-
{
|
|
22
|
-
className: o(e, t.menu, c === "medium" && t.medium),
|
|
23
|
-
...a
|
|
24
|
-
}
|
|
25
|
-
), R = (e) => /* @__PURE__ */ n(
|
|
26
|
-
l,
|
|
27
|
-
{
|
|
28
|
-
...e,
|
|
29
|
-
textValue: e.textValue || (typeof e.children == "string" ? e.children : void 0),
|
|
30
|
-
className: o(t.menuItem, e.className),
|
|
31
|
-
children: (c) => {
|
|
32
|
-
const { children: a } = e, { selectionMode: s, isSelected: m, hasSubmenu: r } = c;
|
|
33
|
-
return /* @__PURE__ */ u(i, { children: [
|
|
34
|
-
s !== "none" && /* @__PURE__ */ n(
|
|
35
|
-
k,
|
|
36
|
-
{
|
|
37
|
-
size: 16,
|
|
38
|
-
className: t.checkMark,
|
|
39
|
-
"data-selected": m || void 0
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
/* @__PURE__ */ n("div", { className: t.mainContent, children: typeof a == "function" ? a(c) : a }),
|
|
43
|
-
r && /* @__PURE__ */ n($, { size: 20 })
|
|
44
|
-
] });
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
), V = ({ className: e, ...c }) => /* @__PURE__ */ n(
|
|
48
|
-
d,
|
|
49
|
-
{
|
|
50
|
-
className: o(e, t.menuPopover),
|
|
51
|
-
offset: 4,
|
|
52
|
-
...c
|
|
53
|
-
}
|
|
54
|
-
), F = ({
|
|
55
|
-
className: e,
|
|
56
|
-
...c
|
|
57
|
-
}) => /* @__PURE__ */ n(
|
|
58
|
-
f,
|
|
59
|
-
{
|
|
60
|
-
className: o(e, t.menuSection),
|
|
61
|
-
...c
|
|
62
|
-
}
|
|
63
|
-
), L = ({ className: e, ...c }) => /* @__PURE__ */ n(
|
|
64
|
-
b,
|
|
65
|
-
{
|
|
66
|
-
className: o(e, t.separator),
|
|
67
|
-
...c
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
export {
|
|
71
|
-
z as M,
|
|
72
|
-
L as S,
|
|
73
|
-
R as a,
|
|
74
|
-
V as b,
|
|
75
|
-
F as c
|
|
76
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { c as s } from "./clsx-CuNqTHjr.js";
|
|
3
|
-
import { u as d } from "./useLocalizedStringFormatter-CPwiI7nv.js";
|
|
4
|
-
import { c as l } from "./createLucideIcon-D4r5Phnh.js";
|
|
5
|
-
import { a2 as p } from "./react-aria-components-mIKW9wOa.js";
|
|
6
|
-
import '../assets/Spinner.css';const _ = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], m = l("loader-circle", _), f = "_container_vf3ec_1", g = "_spinner_vf3ec_5", v = "_large_vf3ec_18", k = "_dark_vf3ec_23", e = {
|
|
7
|
-
container: f,
|
|
8
|
-
spinner: g,
|
|
9
|
-
large: v,
|
|
10
|
-
dark: k
|
|
11
|
-
}, u = { loadingPleaseWait: "Loading, please wait..." }, h = { loadingPleaseWait: "Laddar, vänligen vänta..." }, x = {
|
|
12
|
-
en: u,
|
|
13
|
-
sv: h
|
|
14
|
-
}, P = ({
|
|
15
|
-
small: a,
|
|
16
|
-
isOnColor: n = !1,
|
|
17
|
-
color: t,
|
|
18
|
-
className: o
|
|
19
|
-
}) => {
|
|
20
|
-
const c = d(x);
|
|
21
|
-
return /* @__PURE__ */ i(
|
|
22
|
-
"div",
|
|
23
|
-
{
|
|
24
|
-
className: s(e.container, o),
|
|
25
|
-
role: "status",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ r(
|
|
28
|
-
m,
|
|
29
|
-
{
|
|
30
|
-
className: s(
|
|
31
|
-
e.spinner,
|
|
32
|
-
!a && e.large,
|
|
33
|
-
n && e.dark
|
|
34
|
-
),
|
|
35
|
-
size: a ? 20 : 96,
|
|
36
|
-
strokeWidth: a ? 2 : 8,
|
|
37
|
-
absoluteStrokeWidth: !0,
|
|
38
|
-
color: t
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ r(p, { children: c.format("loadingPleaseWait") })
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
P as S
|
|
48
|
-
};
|