@midas-ds/components 17.28.2 → 17.30.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 +29 -0
- package/accordion/index.js +1 -1
- package/assets/file-list.css +1 -1
- package/assets/progress-bar.css +1 -1
- package/button/Button.stories.d.ts +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +1 -1
- package/card/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/chunks/FeedbackStatusIcon-DvMDGBGL.js +36 -0
- package/chunks/{accordion-DIVTJU3O.js → accordion-BzmYSOS3.js} +23 -23
- package/chunks/{button-CenXTGXL.js → button-C-WkFek9.js} +1 -1
- package/chunks/calendar-Bt1FLxqr.js +107 -0
- package/chunks/card-CdH2UMUW.js +103 -0
- package/chunks/checkbox-DiFQy3MS.js +106 -0
- package/chunks/clear-button-Bv0YGBNG.js +17 -0
- package/chunks/color-scheme-switch-0axiBsna.js +160 -0
- package/chunks/{combobox-DIou4Z-d.js → combobox-DkZbA3o4.js} +24 -24
- package/chunks/{date-field-BF2f9bSf.js → date-field-CPpWZqws.js} +2 -2
- package/chunks/date-picker-DQ7vCG5-.js +142 -0
- package/chunks/file-list-D8Zc1aYS.js +139 -0
- package/chunks/{info-banner-osR4e6nB.js → info-banner-BVKtmVKN.js} +14 -14
- package/chunks/label-Dw5p84T2.js +50 -0
- package/chunks/layout-CUAjEEuH.js +378 -0
- package/chunks/link-DHu1cTmz.js +44 -0
- package/chunks/link-button-DYg_0p4Y.js +44 -0
- package/chunks/{list-box-BN_MSiOD.js → list-box-DmEoMvX1.js} +1 -1
- package/chunks/menu-CP0Xvmx0.js +48 -0
- package/chunks/modal-B_uSoXZM.js +66 -0
- package/chunks/progress-bar-BfFxpqUv.js +65 -0
- package/chunks/{radio-BD1EuxSa.js → radio-_z6ObjYx.js} +1 -1
- package/chunks/search-field-Cp_HHDl4.js +91 -0
- package/chunks/select-Wy6NakdH.js +176 -0
- package/chunks/spinner-COGZlDJB.js +29 -0
- package/chunks/table-O_Y45Sb7.js +84 -0
- package/chunks/tag-RjuYlFZI.js +78 -0
- package/chunks/{textfield-BSvCsAyC.js → textfield-Bu0Hg2pJ.js} +2 -2
- package/chunks/{time-field-CmjGBQph.js → time-field-Cnp-dYhm.js} +3 -3
- package/chunks/{toast-gJgjitZF.js → toast-Dg3fVjSS.js} +20 -20
- package/clear-button/index.js +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/file-list/FileList.stories.d.ts +15 -3
- package/file-list/FileListItem.d.ts +21 -1
- package/file-list/index.js +1 -1
- package/file-list/intl/translations.json.d.ts +10 -2
- package/index.js +49 -48
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/link-button/index.js +1 -1
- package/list-box/index.js +1 -1
- package/menu/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +3 -2
- package/progress-bar/ProgressBar.d.ts +11 -0
- package/progress-bar/ProgressBar.stories.d.ts +3 -0
- 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/spinner/index.js +1 -1
- package/table/index.js +1 -1
- package/tag/index.js +1 -1
- package/textfield/index.js +1 -1
- package/time-field/index.js +1 -1
- package/toast/index.js +1 -1
- package/chunks/FeedbackStatusIcon-DRI7WrSU.js +0 -54
- package/chunks/arrow-right-Db_H9KjE.js +0 -10
- package/chunks/calendar-Bl_obez5.js +0 -111
- package/chunks/card-zIYA-SQh.js +0 -103
- package/chunks/check-DV00NPU0.js +0 -7
- package/chunks/checkbox-Bqd8B58G.js +0 -110
- package/chunks/chevron-down-CP7nEDei.js +0 -7
- package/chunks/chevron-right-DwqboCdU.js +0 -7
- package/chunks/clear-button-D3I1X3yG.js +0 -17
- package/chunks/color-scheme-switch-DVZjdwc9.js +0 -203
- package/chunks/createLucideIcon-BgluSHFG.js +0 -39
- package/chunks/date-picker-DZivTUB_.js +0 -187
- package/chunks/file-list-TmEuO1fJ.js +0 -68
- package/chunks/info-jCyacVsy.js +0 -19
- package/chunks/label-LWlgvAwz.js +0 -50
- package/chunks/layout-Db5um0f7.js +0 -426
- package/chunks/link-BAgs4RwY.js +0 -59
- package/chunks/link-button-BuPMEGUj.js +0 -52
- package/chunks/menu-aT2IR0tO.js +0 -49
- package/chunks/modal-C-UsxdO0.js +0 -66
- package/chunks/progress-bar-7w_kWo2f.js +0 -40
- package/chunks/search-field-GNTRFpzf.js +0 -100
- package/chunks/select-oLCNpryY.js +0 -177
- package/chunks/spinner-LdHPVms_.js +0 -32
- package/chunks/square-arrow-out-up-right-DkgXD7hj.js +0 -17
- package/chunks/table-CmNWoAYO.js +0 -150
- package/chunks/tag-BIcqtf7b.js +0 -78
- package/chunks/x-BJAOO5a5.js +0 -10
package/chunks/modal-C-UsxdO0.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
-
import { t } from "./x-BJAOO5a5.js";
|
|
3
|
-
import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
4
|
-
import { n as r } from "./button-CenXTGXL.js";
|
|
5
|
-
import { t as i } from "./heading-BEl_z-5T.js";
|
|
6
|
-
import { forwardRef as a } from "react";
|
|
7
|
-
import { Dialog as o, DialogTrigger as s, Modal as c, ModalOverlay as l, composeRenderProps as u } from "react-aria-components";
|
|
8
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
-
import '../assets/modal.css';var p = {
|
|
10
|
-
modal: "_modal_x15md_1",
|
|
11
|
-
dialog: "_dialog_x15md_10",
|
|
12
|
-
modalHeader: "_modalHeader_x15md_39",
|
|
13
|
-
modalTitle: "_modalTitle_x15md_50",
|
|
14
|
-
modalBody: "_modalBody_x15md_56"
|
|
15
|
-
}, m = {
|
|
16
|
-
en: { close: "Close" },
|
|
17
|
-
sv: { close: "Stäng" }
|
|
18
|
-
}, h = {
|
|
19
|
-
modalOverlay: "_modalOverlay_gwg3f_1",
|
|
20
|
-
"modal-fade": "_modal-fade_gwg3f_1"
|
|
21
|
-
}, g = a(({ className: t, ...n }, r) => /* @__PURE__ */ d(l, {
|
|
22
|
-
className: e(t, h.modalOverlay),
|
|
23
|
-
ref: r,
|
|
24
|
-
...n
|
|
25
|
-
}));
|
|
26
|
-
g.displayName = "ModalOverlay";
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/modal/Modal.tsx
|
|
29
|
-
var _ = a(({ children: e, title: a, hideCloseButton: s = !1, ...l }, h) => {
|
|
30
|
-
let _ = n(m);
|
|
31
|
-
return /* @__PURE__ */ d(g, {
|
|
32
|
-
...l,
|
|
33
|
-
children: u(e, (e) => /* @__PURE__ */ d(c, {
|
|
34
|
-
className: p.modal,
|
|
35
|
-
ref: h,
|
|
36
|
-
children: /* @__PURE__ */ f(o, {
|
|
37
|
-
className: p.dialog,
|
|
38
|
-
children: [/* @__PURE__ */ f("div", {
|
|
39
|
-
className: p.modalHeader,
|
|
40
|
-
children: [/* @__PURE__ */ d("div", {
|
|
41
|
-
className: p.modalTitle,
|
|
42
|
-
children: a && /* @__PURE__ */ d(i, {
|
|
43
|
-
level: 3,
|
|
44
|
-
elementType: "h2",
|
|
45
|
-
slot: "title",
|
|
46
|
-
children: a
|
|
47
|
-
})
|
|
48
|
-
}), !s && /* @__PURE__ */ d(r, {
|
|
49
|
-
slot: "close",
|
|
50
|
-
variant: "tertiary",
|
|
51
|
-
icon: t,
|
|
52
|
-
iconPlacement: "right",
|
|
53
|
-
children: _.format("close")
|
|
54
|
-
})]
|
|
55
|
-
}), /* @__PURE__ */ d("div", {
|
|
56
|
-
className: p.modalBody,
|
|
57
|
-
tabIndex: -1,
|
|
58
|
-
children: e
|
|
59
|
-
})]
|
|
60
|
-
})
|
|
61
|
-
}))
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
_.displayName = "Modal";
|
|
65
|
-
//#endregion
|
|
66
|
-
export { _ as n, g as r, s as t };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
-
import { t } from "./label-LWlgvAwz.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { ProgressBar as n } from "react-aria-components";
|
|
5
|
-
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
-
import '../assets/progress-bar.css';var o = {
|
|
7
|
-
progressBar: "_progressBar_13dw9_1",
|
|
8
|
-
indeterminate: "_indeterminate_13dw9_1",
|
|
9
|
-
label: "_label_13dw9_9",
|
|
10
|
-
value: "_value_13dw9_14",
|
|
11
|
-
track: "_track_13dw9_19",
|
|
12
|
-
indicator: "_indicator_13dw9_29"
|
|
13
|
-
}, s = ({ label: s, labelProps: c, showValueLabel: l = !1, ...u }) => /* @__PURE__ */ i(n, {
|
|
14
|
-
...u,
|
|
15
|
-
className: e(o.progressBar, u.className),
|
|
16
|
-
children: ({ percentage: n, valueText: u, isIndeterminate: d }) => /* @__PURE__ */ a(r, { children: [
|
|
17
|
-
s && /* @__PURE__ */ i(t, {
|
|
18
|
-
elementType: "span",
|
|
19
|
-
...c,
|
|
20
|
-
className: e(c?.className, o.label),
|
|
21
|
-
children: s
|
|
22
|
-
}),
|
|
23
|
-
l && /* @__PURE__ */ i(t, {
|
|
24
|
-
elementType: "span",
|
|
25
|
-
...c,
|
|
26
|
-
id: s ? "" : c?.id,
|
|
27
|
-
className: e(c?.className, o.value),
|
|
28
|
-
children: u
|
|
29
|
-
}),
|
|
30
|
-
/* @__PURE__ */ i("div", {
|
|
31
|
-
className: o.track,
|
|
32
|
-
children: /* @__PURE__ */ i("div", {
|
|
33
|
-
className: o.indicator,
|
|
34
|
-
style: { width: `${d ? 50 : n}%` }
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
] })
|
|
38
|
-
});
|
|
39
|
-
//#endregion
|
|
40
|
-
export { s as t };
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
-
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
-
import { t as n } from "./x-BJAOO5a5.js";
|
|
5
|
-
import { t as r } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
6
|
-
import { n as i } from "./button-CenXTGXL.js";
|
|
7
|
-
import { n as a, t as o } from "./label-LWlgvAwz.js";
|
|
8
|
-
import { t as s } from "./text-DwmZ-ew8.js";
|
|
9
|
-
import { t as c } from "./field-error-LtNtEKDp.js";
|
|
10
|
-
import { t as l } from "./TextField.module-BLGiCC4q.js";
|
|
11
|
-
import { FormContext as u, Input as d, SearchField as f, useSlottedContext as p } from "react-aria-components";
|
|
12
|
-
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
|
-
import '../assets/search-field.css';var _ = t("search", [["path", {
|
|
14
|
-
d: "m21 21-4.34-4.34",
|
|
15
|
-
key: "14j7rj"
|
|
16
|
-
}], ["circle", {
|
|
17
|
-
cx: "11",
|
|
18
|
-
cy: "11",
|
|
19
|
-
r: "8",
|
|
20
|
-
key: "4ej97u"
|
|
21
|
-
}]]), v = {
|
|
22
|
-
container: "_container_onquj_1",
|
|
23
|
-
inner: "_inner_onquj_12",
|
|
24
|
-
inputContainer: "_inputContainer_onquj_17",
|
|
25
|
-
medium: "_medium_onquj_23",
|
|
26
|
-
icon: "_icon_onquj_28",
|
|
27
|
-
clear: "_clear_onquj_40",
|
|
28
|
-
input: "_input_onquj_17"
|
|
29
|
-
}, y = {
|
|
30
|
-
en: { search: "Search" },
|
|
31
|
-
sv: { search: "Sök" }
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/search-field/SearchField.tsx
|
|
35
|
-
function b(e) {
|
|
36
|
-
return !!e?.length;
|
|
37
|
-
}
|
|
38
|
-
var x = ({ errorPosition: t = "top", size: x = "large", showButton: S, className: C, errorMessage: w, placeholder: T, label: E, description: D, popover: O, validationBehavior: k, inputMode: A = "search", ...j }) => {
|
|
39
|
-
let M = r(y), N = p(u), P = k ?? N?.validationBehavior ?? "aria", F = S !== !1, I = (e) => {
|
|
40
|
-
e && !j.isInvalid && (j.validate && b(j.validate(e)) || j.onSubmit?.(e));
|
|
41
|
-
};
|
|
42
|
-
return /* @__PURE__ */ h(f, {
|
|
43
|
-
...j,
|
|
44
|
-
inputMode: A,
|
|
45
|
-
onSubmit: I,
|
|
46
|
-
"aria-label": E ? j["aria-label"] : j["aria-label"] ?? T,
|
|
47
|
-
className: e(v.container, C),
|
|
48
|
-
validationBehavior: P,
|
|
49
|
-
children: ({ state: r }) => /* @__PURE__ */ g(m, { children: [
|
|
50
|
-
/* @__PURE__ */ h(a, {
|
|
51
|
-
popover: O,
|
|
52
|
-
children: E && /* @__PURE__ */ h(o, { children: E })
|
|
53
|
-
}),
|
|
54
|
-
D && /* @__PURE__ */ h(s, {
|
|
55
|
-
slot: "description",
|
|
56
|
-
children: D
|
|
57
|
-
}),
|
|
58
|
-
t === "top" && /* @__PURE__ */ h(c, { children: ({ validationErrors: e }) => w ?? e.join(" ") }),
|
|
59
|
-
/* @__PURE__ */ g("div", {
|
|
60
|
-
className: v.inner,
|
|
61
|
-
children: [/* @__PURE__ */ g("div", {
|
|
62
|
-
className: e(v.inputContainer, { [v.medium]: x === "medium" }),
|
|
63
|
-
children: [
|
|
64
|
-
/* @__PURE__ */ h(_, {
|
|
65
|
-
size: 20,
|
|
66
|
-
className: v.icon
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ h(d, {
|
|
69
|
-
placeholder: T,
|
|
70
|
-
className: e(l.input, v.input, { [v.medium]: x === "medium" }),
|
|
71
|
-
onKeyDown: j.onSubmit ? void 0 : (e) => {
|
|
72
|
-
e.key === "Enter" && r.value && !j.isInvalid && e.currentTarget.form?.requestSubmit();
|
|
73
|
-
}
|
|
74
|
-
}),
|
|
75
|
-
r.value.length > 0 && /* @__PURE__ */ h(i, {
|
|
76
|
-
variant: "icon",
|
|
77
|
-
size: x,
|
|
78
|
-
className: e(v.clear, { [v.medium]: x === "medium" }),
|
|
79
|
-
children: /* @__PURE__ */ h(n, {
|
|
80
|
-
size: 20,
|
|
81
|
-
"aria-hidden": !0
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
]
|
|
85
|
-
}), F && /* @__PURE__ */ h(i, {
|
|
86
|
-
slot: null,
|
|
87
|
-
excludeFromTabOrder: !0,
|
|
88
|
-
size: x,
|
|
89
|
-
isDisabled: j.isDisabled,
|
|
90
|
-
type: "button",
|
|
91
|
-
onPress: () => I(r.value),
|
|
92
|
-
children: j.buttonText ?? M.format("search")
|
|
93
|
-
})]
|
|
94
|
-
}),
|
|
95
|
-
t === "bottom" && /* @__PURE__ */ h(c, { children: ({ validationErrors: e }) => w ?? e.join(" ") })
|
|
96
|
-
] })
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
//#endregion
|
|
100
|
-
export { x as t };
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { n as e, t } from "./clsx-Di52oYUU.js";
|
|
2
|
-
import { t as n } from "./chevron-down-CP7nEDei.js";
|
|
3
|
-
import { n as r } from "./checkbox-Bqd8B58G.js";
|
|
4
|
-
import { t as i } from "./x-BJAOO5a5.js";
|
|
5
|
-
import { t as a } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
6
|
-
import { n as o, t as s } from "./label-LWlgvAwz.js";
|
|
7
|
-
import { t as c } from "./popover-DGcogqbS.js";
|
|
8
|
-
import { t as l } from "./text-DwmZ-ew8.js";
|
|
9
|
-
import { t as u } from "./field-error-LtNtEKDp.js";
|
|
10
|
-
import { c as d } from "./list-box-BN_MSiOD.js";
|
|
11
|
-
import { n as f, r as p, t as m } from "./tag-BIcqtf7b.js";
|
|
12
|
-
import h, { useContext as g } from "react";
|
|
13
|
-
import { Button as _, Select as v, SelectStateContext as y, SelectValue as b } from "react-aria-components";
|
|
14
|
-
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
15
|
-
import { FocusScope as w, useFocusManager as T } from "react-aria";
|
|
16
|
-
import '../assets/select.css';var E = {
|
|
17
|
-
en: {
|
|
18
|
-
clearAll: "Clear all",
|
|
19
|
-
selectAll: "Select all",
|
|
20
|
-
selectedItems: "Selected items",
|
|
21
|
-
selected: "selected"
|
|
22
|
-
},
|
|
23
|
-
sv: {
|
|
24
|
-
clearAll: "Rensa alla",
|
|
25
|
-
selectAll: "Välj alla",
|
|
26
|
-
selectedItems: "Valda objekt",
|
|
27
|
-
selected: "valda"
|
|
28
|
-
}
|
|
29
|
-
}, D = {
|
|
30
|
-
select: "_select_140qh_1",
|
|
31
|
-
triggerContainer: "_triggerContainer_140qh_7",
|
|
32
|
-
trigger: "_trigger_140qh_7",
|
|
33
|
-
medium: "_medium_140qh_30",
|
|
34
|
-
small: "_small_140qh_37",
|
|
35
|
-
selectValue: "_selectValue_140qh_60",
|
|
36
|
-
icon: "_icon_140qh_110",
|
|
37
|
-
placeholder: "_placeholder_140qh_122",
|
|
38
|
-
multiSelectValue: "_multiSelectValue_140qh_132",
|
|
39
|
-
selectValueTag: "_selectValueTag_140qh_156",
|
|
40
|
-
clearButton: "_clearButton_140qh_170",
|
|
41
|
-
truncate: "_truncate_140qh_185",
|
|
42
|
-
popover: "_popover_140qh_222",
|
|
43
|
-
selectAll: "_selectAll_140qh_250",
|
|
44
|
-
tagGroup: "_tagGroup_140qh_316"
|
|
45
|
-
}, O = () => {
|
|
46
|
-
let e = h.useContext(y), t = a(E);
|
|
47
|
-
return /* @__PURE__ */ S(r, {
|
|
48
|
-
className: D.selectAll,
|
|
49
|
-
isIndeterminate: !e?.selectionManager.isSelectAll && !e?.selectionManager.isEmpty,
|
|
50
|
-
isSelected: e?.selectionManager.isSelectAll,
|
|
51
|
-
onChange: () => {
|
|
52
|
-
if (!e) return;
|
|
53
|
-
let t = Array.from(e.collection.getKeys()).filter((t) => e.collection.getItem(t)?.type === "item" && e.selectionManager.canSelectItem(t)), n = Array.from(e.selectionManager.selectedKeys).filter((t) => !e.selectionManager.canSelectItem(t));
|
|
54
|
-
e.setValue(e.selectionManager.isSelectAll ? n : [...t, ...n]), e.commitValidation();
|
|
55
|
-
},
|
|
56
|
-
children: t.format("selectAll")
|
|
57
|
-
});
|
|
58
|
-
}, k = ({ isDisabled: e }) => {
|
|
59
|
-
let t = a(E), n = (e, n) => e.length === 1 ? n : `${e.length} ${t.format("selected")}`;
|
|
60
|
-
return /* @__PURE__ */ S(b, {
|
|
61
|
-
className: D.multiSelectValue,
|
|
62
|
-
"data-disabled": e || void 0,
|
|
63
|
-
children: ({ isPlaceholder: t, selectedItems: r, selectedText: i }) => t ? /* @__PURE__ */ S(x, {}) : /* @__PURE__ */ C("div", {
|
|
64
|
-
className: D.selectValueTag,
|
|
65
|
-
"data-disabled": e || void 0,
|
|
66
|
-
children: [/* @__PURE__ */ S("span", {
|
|
67
|
-
className: D.truncate,
|
|
68
|
-
children: n(r, i)
|
|
69
|
-
}), /* @__PURE__ */ S(A, { isDisabled: e })]
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
}, A = ({ isDisabled: e }) => {
|
|
73
|
-
let t = h.useContext(y), n = a(E), r = T();
|
|
74
|
-
return /* @__PURE__ */ S(_, {
|
|
75
|
-
"aria-label": n.format("clearAll"),
|
|
76
|
-
className: D.clearButton,
|
|
77
|
-
onPress: () => {
|
|
78
|
-
r?.focusFirst(), t?.selectionManager.clearSelection();
|
|
79
|
-
},
|
|
80
|
-
slot: null,
|
|
81
|
-
isDisabled: e,
|
|
82
|
-
children: /* @__PURE__ */ S(i, {
|
|
83
|
-
width: 20,
|
|
84
|
-
height: 20
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
}, j = ({ showTags: e, isDisabled: t }) => {
|
|
88
|
-
let n = a(E), r = g(y);
|
|
89
|
-
return !r?.selectedItems.length || !e ? null : /* @__PURE__ */ S(m, {
|
|
90
|
-
"aria-label": n.format("selectedItems"),
|
|
91
|
-
className: D.tagGroup,
|
|
92
|
-
onRemove: (e) => {
|
|
93
|
-
r?.selectionManager.toggleSelection(Array.from(e)[0]);
|
|
94
|
-
},
|
|
95
|
-
selectionBehavior: "toggle",
|
|
96
|
-
children: /* @__PURE__ */ S(f, {
|
|
97
|
-
items: r.selectedItems,
|
|
98
|
-
children: (e) => /* @__PURE__ */ S(p, {
|
|
99
|
-
isDismissable: !0,
|
|
100
|
-
id: e.key,
|
|
101
|
-
isDisabled: t,
|
|
102
|
-
textValue: e.textValue,
|
|
103
|
-
children: e.textValue
|
|
104
|
-
}, e.key)
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
}, M = ({ isDisabled: t, selectionMode: r, size: i }) => {
|
|
108
|
-
let a = g(y);
|
|
109
|
-
return /* @__PURE__ */ C(_, {
|
|
110
|
-
className: e({
|
|
111
|
-
[D.medium]: i === "medium",
|
|
112
|
-
[D.small]: i === "small"
|
|
113
|
-
}, D.trigger),
|
|
114
|
-
"data-invalid": !!a?.displayValidation.isInvalid || void 0,
|
|
115
|
-
children: [/* @__PURE__ */ S(b, {
|
|
116
|
-
className: D.selectValue,
|
|
117
|
-
"data-disabled": t || void 0,
|
|
118
|
-
children: ({ selectedText: e, defaultChildren: t }) => /* @__PURE__ */ S("div", {
|
|
119
|
-
className: D.placeholder,
|
|
120
|
-
children: /* @__PURE__ */ S("span", {
|
|
121
|
-
className: D.truncate,
|
|
122
|
-
children: r === "multiple" && e ? null : e || t
|
|
123
|
-
})
|
|
124
|
-
})
|
|
125
|
-
}), /* @__PURE__ */ S("span", {
|
|
126
|
-
"aria-hidden": "true",
|
|
127
|
-
className: D.icon,
|
|
128
|
-
children: /* @__PURE__ */ S(n, { size: 20 })
|
|
129
|
-
})]
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region src/select/Select.tsx
|
|
134
|
-
function N({ children: e, description: n, errorMessage: r, errorPosition: i = "top", items: a, label: f, popover: p, popoverProps: m, listBoxProps: h, size: g = "large", ..._ }) {
|
|
135
|
-
return /* @__PURE__ */ S(w, { children: /* @__PURE__ */ C(v, {
|
|
136
|
-
..._,
|
|
137
|
-
className: t(_.className, D.select),
|
|
138
|
-
children: [
|
|
139
|
-
/* @__PURE__ */ S(o, {
|
|
140
|
-
popover: p,
|
|
141
|
-
children: f && /* @__PURE__ */ S(s, {
|
|
142
|
-
"data-disabled": _.isDisabled || void 0,
|
|
143
|
-
children: f
|
|
144
|
-
})
|
|
145
|
-
}),
|
|
146
|
-
n && /* @__PURE__ */ S(l, {
|
|
147
|
-
slot: "description",
|
|
148
|
-
children: n
|
|
149
|
-
}),
|
|
150
|
-
i === "top" && /* @__PURE__ */ S(u, { children: r }),
|
|
151
|
-
/* @__PURE__ */ C("div", {
|
|
152
|
-
className: D.triggerContainer,
|
|
153
|
-
"data-disabled": _.isDisabled || void 0,
|
|
154
|
-
children: [/* @__PURE__ */ S(M, {
|
|
155
|
-
size: g,
|
|
156
|
-
..._
|
|
157
|
-
}), _.selectionMode === "multiple" ? /* @__PURE__ */ S(k, { ..._ }) : null]
|
|
158
|
-
}),
|
|
159
|
-
i === "bottom" && /* @__PURE__ */ S(u, { children: r }),
|
|
160
|
-
/* @__PURE__ */ C(c, {
|
|
161
|
-
offset: 1,
|
|
162
|
-
hideArrow: !0,
|
|
163
|
-
...m,
|
|
164
|
-
className: t(m?.className, D.popover),
|
|
165
|
-
children: [_.isSelectableAll && /* @__PURE__ */ S(O, {}), /* @__PURE__ */ S(d, {
|
|
166
|
-
escapeKeyBehavior: "none",
|
|
167
|
-
items: a,
|
|
168
|
-
...h,
|
|
169
|
-
children: e
|
|
170
|
-
})]
|
|
171
|
-
}),
|
|
172
|
-
/* @__PURE__ */ S(j, { ..._ })
|
|
173
|
-
]
|
|
174
|
-
}) });
|
|
175
|
-
}
|
|
176
|
-
//#endregion
|
|
177
|
-
export { M as n, N as t };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
-
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
3
|
-
import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
4
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
import { VisuallyHidden as a } from "react-aria";
|
|
6
|
-
import '../assets/spinner.css';var o = {
|
|
7
|
-
container: "_container_1qexx_1",
|
|
8
|
-
spinner: "_spinner_1qexx_5",
|
|
9
|
-
rotating: "_rotating_1qexx_1",
|
|
10
|
-
large: "_large_1qexx_18"
|
|
11
|
-
}, s = t("loader-circle", [["path", {
|
|
12
|
-
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
13
|
-
key: "13zald"
|
|
14
|
-
}]]), c = {
|
|
15
|
-
en: { loadingPleaseWait: "Loading, please wait..." },
|
|
16
|
-
sv: { loadingPleaseWait: "Laddar, vänligen vänta..." }
|
|
17
|
-
}, l = ({ small: t, color: l, className: u }) => {
|
|
18
|
-
let d = n(c);
|
|
19
|
-
return /* @__PURE__ */ i("div", {
|
|
20
|
-
className: e(o.container, u),
|
|
21
|
-
role: "status",
|
|
22
|
-
children: [/* @__PURE__ */ r(s, {
|
|
23
|
-
className: e(o.spinner, !t && o.large),
|
|
24
|
-
size: t ? 20 : 96,
|
|
25
|
-
strokeWidth: t ? 2 : 8,
|
|
26
|
-
absoluteStrokeWidth: !0,
|
|
27
|
-
color: l
|
|
28
|
-
}), /* @__PURE__ */ r(a, { children: d.format("loadingPleaseWait") })]
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
//#endregion
|
|
32
|
-
export { l as t };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./createLucideIcon-BgluSHFG.js";
|
|
2
|
-
var t = e("square-arrow-out-up-right", [
|
|
3
|
-
["path", {
|
|
4
|
-
d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",
|
|
5
|
-
key: "y09zxi"
|
|
6
|
-
}],
|
|
7
|
-
["path", {
|
|
8
|
-
d: "m21 3-9 9",
|
|
9
|
-
key: "mpx6sq"
|
|
10
|
-
}],
|
|
11
|
-
["path", {
|
|
12
|
-
d: "M15 3h6v6",
|
|
13
|
-
key: "1q9fwt"
|
|
14
|
-
}]
|
|
15
|
-
]);
|
|
16
|
-
//#endregion
|
|
17
|
-
export { t };
|
package/chunks/table-CmNWoAYO.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
-
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
-
import { n } from "./checkbox-Bqd8B58G.js";
|
|
5
|
-
import { Button as r, Cell as i, Collection as a, Column as o, Row as s, Table as c, TableBody as l, TableHeader as u, useTableOptions as d } from "react-aria-components";
|
|
6
|
-
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
|
-
import '../assets/table.css';var h = t("arrow-down", [["path", {
|
|
8
|
-
d: "M12 5v14",
|
|
9
|
-
key: "s699le"
|
|
10
|
-
}], ["path", {
|
|
11
|
-
d: "m19 12-7 7-7-7",
|
|
12
|
-
key: "1idqje"
|
|
13
|
-
}]]), g = t("arrow-up-down", [
|
|
14
|
-
["path", {
|
|
15
|
-
d: "m21 16-4 4-4-4",
|
|
16
|
-
key: "f6ql7i"
|
|
17
|
-
}],
|
|
18
|
-
["path", {
|
|
19
|
-
d: "M17 20V4",
|
|
20
|
-
key: "1ejh1v"
|
|
21
|
-
}],
|
|
22
|
-
["path", {
|
|
23
|
-
d: "m3 8 4-4 4 4",
|
|
24
|
-
key: "11wl7u"
|
|
25
|
-
}],
|
|
26
|
-
["path", {
|
|
27
|
-
d: "M7 4v16",
|
|
28
|
-
key: "1glfcx"
|
|
29
|
-
}]
|
|
30
|
-
]), _ = t("arrow-up", [["path", {
|
|
31
|
-
d: "m5 12 7-7 7 7",
|
|
32
|
-
key: "hav0vg"
|
|
33
|
-
}], ["path", {
|
|
34
|
-
d: "M12 19V5",
|
|
35
|
-
key: "x0mq9r"
|
|
36
|
-
}]]), v = t("grip-vertical", [
|
|
37
|
-
["circle", {
|
|
38
|
-
cx: "9",
|
|
39
|
-
cy: "12",
|
|
40
|
-
r: "1",
|
|
41
|
-
key: "1vctgf"
|
|
42
|
-
}],
|
|
43
|
-
["circle", {
|
|
44
|
-
cx: "9",
|
|
45
|
-
cy: "5",
|
|
46
|
-
r: "1",
|
|
47
|
-
key: "hp0tcf"
|
|
48
|
-
}],
|
|
49
|
-
["circle", {
|
|
50
|
-
cx: "9",
|
|
51
|
-
cy: "19",
|
|
52
|
-
r: "1",
|
|
53
|
-
key: "fkjjf6"
|
|
54
|
-
}],
|
|
55
|
-
["circle", {
|
|
56
|
-
cx: "15",
|
|
57
|
-
cy: "12",
|
|
58
|
-
r: "1",
|
|
59
|
-
key: "1tmaij"
|
|
60
|
-
}],
|
|
61
|
-
["circle", {
|
|
62
|
-
cx: "15",
|
|
63
|
-
cy: "5",
|
|
64
|
-
r: "1",
|
|
65
|
-
key: "19l28e"
|
|
66
|
-
}],
|
|
67
|
-
["circle", {
|
|
68
|
-
cx: "15",
|
|
69
|
-
cy: "19",
|
|
70
|
-
r: "1",
|
|
71
|
-
key: "f4zoj3"
|
|
72
|
-
}]
|
|
73
|
-
]), y = {
|
|
74
|
-
table: "_table_1lyes_1",
|
|
75
|
-
tableHeader: "_tableHeader_1lyes_11",
|
|
76
|
-
column: "_column_1lyes_12",
|
|
77
|
-
sortIndicator: "_sortIndicator_1lyes_29",
|
|
78
|
-
sortIconNeutral: "_sortIconNeutral_1lyes_37",
|
|
79
|
-
selection: "_selection_1lyes_56",
|
|
80
|
-
row: "_row_1lyes_62",
|
|
81
|
-
cell: "_cell_1lyes_81",
|
|
82
|
-
narrow: "_narrow_1lyes_98",
|
|
83
|
-
medium: "_medium_1lyes_121",
|
|
84
|
-
striped: "_striped_1lyes_132"
|
|
85
|
-
}, b = ({ size: t = "large", striped: n = !1, className: r, ...i }) => /* @__PURE__ */ p(c, {
|
|
86
|
-
className: e(y.table, r, {
|
|
87
|
-
[y.medium]: t === "medium",
|
|
88
|
-
[y.striped]: n
|
|
89
|
-
}),
|
|
90
|
-
...i
|
|
91
|
-
}), x = ({ columns: t, children: r, className: i }) => {
|
|
92
|
-
let { selectionBehavior: o, selectionMode: s, allowsDragging: c } = d();
|
|
93
|
-
return /* @__PURE__ */ m(u, {
|
|
94
|
-
className: e(i, y.tableHeader),
|
|
95
|
-
children: [
|
|
96
|
-
c && /* @__PURE__ */ p(C, {}),
|
|
97
|
-
o === "toggle" && /* @__PURE__ */ p(C, {
|
|
98
|
-
width: 50,
|
|
99
|
-
children: s === "multiple" && /* @__PURE__ */ p(n, {
|
|
100
|
-
className: y.selection,
|
|
101
|
-
slot: "selection"
|
|
102
|
-
})
|
|
103
|
-
}),
|
|
104
|
-
/* @__PURE__ */ p(a, {
|
|
105
|
-
items: t,
|
|
106
|
-
children: r
|
|
107
|
-
})
|
|
108
|
-
]
|
|
109
|
-
});
|
|
110
|
-
}, S = ({ id: t, columns: i, children: o, className: c, ...l }) => {
|
|
111
|
-
let { selectionBehavior: u, allowsDragging: f } = d();
|
|
112
|
-
return /* @__PURE__ */ m(s, {
|
|
113
|
-
id: t,
|
|
114
|
-
className: e(c, y.row),
|
|
115
|
-
...l,
|
|
116
|
-
children: [
|
|
117
|
-
f && /* @__PURE__ */ p(w, { children: /* @__PURE__ */ p(r, {
|
|
118
|
-
slot: "drag",
|
|
119
|
-
children: /* @__PURE__ */ p(v, { size: 20 })
|
|
120
|
-
}) }),
|
|
121
|
-
u === "toggle" && /* @__PURE__ */ p(w, { children: /* @__PURE__ */ p(n, {
|
|
122
|
-
className: y.selection,
|
|
123
|
-
slot: "selection"
|
|
124
|
-
}) }),
|
|
125
|
-
/* @__PURE__ */ p(a, {
|
|
126
|
-
items: i,
|
|
127
|
-
children: o
|
|
128
|
-
})
|
|
129
|
-
]
|
|
130
|
-
});
|
|
131
|
-
}, C = ({ children: t, className: n, ...r }) => /* @__PURE__ */ p(o, {
|
|
132
|
-
className: e(n, y.column),
|
|
133
|
-
...r,
|
|
134
|
-
children: ({ allowsSorting: e, sortDirection: n }) => /* @__PURE__ */ m(f, { children: [t, e && /* @__PURE__ */ p("span", {
|
|
135
|
-
"aria-hidden": "true",
|
|
136
|
-
className: y.sortIndicator,
|
|
137
|
-
children: n === "ascending" ? /* @__PURE__ */ p(_, { size: 16 }) : n === "descending" ? /* @__PURE__ */ p(h, { size: 16 }) : /* @__PURE__ */ p(g, {
|
|
138
|
-
size: 16,
|
|
139
|
-
className: y.sortIconNeutral
|
|
140
|
-
})
|
|
141
|
-
})] })
|
|
142
|
-
}), w = ({ className: t, ...n }) => /* @__PURE__ */ p(i, {
|
|
143
|
-
className: e(t, y.cell),
|
|
144
|
-
...n
|
|
145
|
-
}), T = ({ className: t, ...n }) => /* @__PURE__ */ p(l, {
|
|
146
|
-
className: e(t, y.tableBody),
|
|
147
|
-
...n
|
|
148
|
-
});
|
|
149
|
-
//#endregion
|
|
150
|
-
export { T as a, b as i, C as n, x as o, S as r, w as t };
|
package/chunks/tag-BIcqtf7b.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
-
import { t } from "./x-BJAOO5a5.js";
|
|
3
|
-
import { n } from "./button-CenXTGXL.js";
|
|
4
|
-
import { Children as r, forwardRef as i, isValidElement as a } from "react";
|
|
5
|
-
import { Tag as o, TagGroup as s, TagGroupContext as c, TagList as l, TagListContext as u, composeRenderProps as d, useContextProps as f } from "react-aria-components";
|
|
6
|
-
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
7
|
-
import '../assets/tag.css';var g = {
|
|
8
|
-
button: "_button_14ocl_1",
|
|
9
|
-
tag: "_tag_14ocl_8",
|
|
10
|
-
sky: "_sky_14ocl_21",
|
|
11
|
-
blue: "_blue_14ocl_22",
|
|
12
|
-
mint: "_mint_14ocl_27",
|
|
13
|
-
green: "_green_14ocl_28",
|
|
14
|
-
cream: "_cream_14ocl_33",
|
|
15
|
-
yellow: "_yellow_14ocl_34",
|
|
16
|
-
teal: "_teal_14ocl_39",
|
|
17
|
-
lagoon: "_lagoon_14ocl_44",
|
|
18
|
-
lagoonblue: "_lagoonblue_14ocl_45",
|
|
19
|
-
lavender: "_lavender_14ocl_50",
|
|
20
|
-
purple: "_purple_14ocl_51",
|
|
21
|
-
peach: "_peach_14ocl_56",
|
|
22
|
-
orange: "_orange_14ocl_57",
|
|
23
|
-
pippin: "_pippin_14ocl_62",
|
|
24
|
-
red: "_red_14ocl_63",
|
|
25
|
-
tagText: "_tagText_14ocl_90",
|
|
26
|
-
dismissable: "_dismissable_14ocl_104"
|
|
27
|
-
}, _ = ({ className: r, color: i, dismissable: a = !1, isDismissable: s, type: c, ...l }) => {
|
|
28
|
-
let u = s || s === void 0 && a;
|
|
29
|
-
return /* @__PURE__ */ m(o, {
|
|
30
|
-
className: e(g.tag, u && g.dismissable, {
|
|
31
|
-
[g.sky]: i === "sky",
|
|
32
|
-
[g.blue]: i === "blue" || !i && c === "info",
|
|
33
|
-
[g.mint]: i === "mint",
|
|
34
|
-
[g.green]: i === "green" || !i && c === "success",
|
|
35
|
-
[g.cream]: i === "cream",
|
|
36
|
-
[g.yellow]: i === "yellow" || !i && c === "important",
|
|
37
|
-
[g.teal]: i === "teal",
|
|
38
|
-
[g.lagoon]: i === "lagoon",
|
|
39
|
-
[g.lagoonblue]: i === "lagoonblue",
|
|
40
|
-
[g.lavender]: i === "lavender",
|
|
41
|
-
[g.purple]: i === "purple",
|
|
42
|
-
[g.peach]: i === "peach",
|
|
43
|
-
[g.orange]: i === "orange",
|
|
44
|
-
[g.pippin]: i === "pippin",
|
|
45
|
-
[g.red]: i === "red" || !i && c === "warning"
|
|
46
|
-
}, r),
|
|
47
|
-
...l,
|
|
48
|
-
textValue: l.textValue || (typeof l.children == "string" ? l.children : void 0),
|
|
49
|
-
children: d(l.children, (e) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
|
|
50
|
-
className: g.tagText,
|
|
51
|
-
children: e
|
|
52
|
-
}), u && /* @__PURE__ */ m(n, {
|
|
53
|
-
variant: "icon",
|
|
54
|
-
size: "medium",
|
|
55
|
-
className: g.button,
|
|
56
|
-
slot: "remove",
|
|
57
|
-
children: /* @__PURE__ */ m(t, { size: 20 })
|
|
58
|
-
})] }))
|
|
59
|
-
});
|
|
60
|
-
}, v = { tagList: "_tagList_17pz2_1" }, y = i((t, n) => {
|
|
61
|
-
let [{ className: r, ...i }, a] = f(t, n, u);
|
|
62
|
-
return /* @__PURE__ */ m(l, {
|
|
63
|
-
className: e(r, v.tagList),
|
|
64
|
-
ref: a,
|
|
65
|
-
...i
|
|
66
|
-
});
|
|
67
|
-
}), b = i((t, n) => {
|
|
68
|
-
let [{ className: i, children: o, ...l }, u] = f(t, n, c), d = r.toArray(o).filter(a).find((e) => e.type === y);
|
|
69
|
-
return !d && process.env.NODE_ENV === "development" && console.warn("Using a TagGroup without providing a TagList component is deprecated since v17.0.0, see: https://designsystem.migrationsverket.se/components/tag/"), /* @__PURE__ */ m(s, {
|
|
70
|
-
className: e(i),
|
|
71
|
-
ref: u,
|
|
72
|
-
...l,
|
|
73
|
-
children: d ? o : /* @__PURE__ */ m(y, { children: o })
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
b.displayName = "TagGroup";
|
|
77
|
-
//#endregion
|
|
78
|
-
export { y as n, _ as r, b as t };
|