@midas-ds/components 17.29.0 → 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 +10 -0
- package/accordion/index.js +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-CknF4qAm.js → progress-bar-BfFxpqUv.js} +1 -1
- 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/index.js +1 -1
- 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/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-B4vG_egr.js +0 -161
- 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/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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
+
import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
4
|
+
import { n } from "./button-C-WkFek9.js";
|
|
5
|
+
import { n as r, t as i } from "./label-Dw5p84T2.js";
|
|
6
|
+
import { t as a } from "./text-DwmZ-ew8.js";
|
|
7
|
+
import { t as o } from "./field-error-LtNtEKDp.js";
|
|
8
|
+
import { t as s } from "./TextField.module-BLGiCC4q.js";
|
|
9
|
+
import { FormContext as c, Input as l, SearchField as u, useSlottedContext as d } from "react-aria-components";
|
|
10
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
|
+
import { Search as h, X as g } from "lucide-react";
|
|
12
|
+
import '../assets/search-field.css';var _ = {
|
|
13
|
+
container: "_container_onquj_1",
|
|
14
|
+
inner: "_inner_onquj_12",
|
|
15
|
+
inputContainer: "_inputContainer_onquj_17",
|
|
16
|
+
medium: "_medium_onquj_23",
|
|
17
|
+
icon: "_icon_onquj_28",
|
|
18
|
+
clear: "_clear_onquj_40",
|
|
19
|
+
input: "_input_onquj_17"
|
|
20
|
+
}, v = {
|
|
21
|
+
en: { search: "Search" },
|
|
22
|
+
sv: { search: "Sök" }
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/search-field/SearchField.tsx
|
|
26
|
+
function y(e) {
|
|
27
|
+
return !!e?.length;
|
|
28
|
+
}
|
|
29
|
+
var b = ({ errorPosition: b = "top", size: x = "large", showButton: S, className: C, errorMessage: w, placeholder: T, label: E, description: D, popover: O, validationBehavior: k, inputMode: A = "search", ...j }) => {
|
|
30
|
+
let M = t(v), N = d(c), P = k ?? N?.validationBehavior ?? "aria", F = S !== !1, I = (e) => {
|
|
31
|
+
e && !j.isInvalid && (j.validate && y(j.validate(e)) || j.onSubmit?.(e));
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ p(u, {
|
|
34
|
+
...j,
|
|
35
|
+
inputMode: A,
|
|
36
|
+
onSubmit: I,
|
|
37
|
+
"aria-label": E ? j["aria-label"] : j["aria-label"] ?? T,
|
|
38
|
+
className: e(_.container, C),
|
|
39
|
+
validationBehavior: P,
|
|
40
|
+
children: ({ state: t }) => /* @__PURE__ */ m(f, { children: [
|
|
41
|
+
/* @__PURE__ */ p(r, {
|
|
42
|
+
popover: O,
|
|
43
|
+
children: E && /* @__PURE__ */ p(i, { children: E })
|
|
44
|
+
}),
|
|
45
|
+
D && /* @__PURE__ */ p(a, {
|
|
46
|
+
slot: "description",
|
|
47
|
+
children: D
|
|
48
|
+
}),
|
|
49
|
+
b === "top" && /* @__PURE__ */ p(o, { children: ({ validationErrors: e }) => w ?? e.join(" ") }),
|
|
50
|
+
/* @__PURE__ */ m("div", {
|
|
51
|
+
className: _.inner,
|
|
52
|
+
children: [/* @__PURE__ */ m("div", {
|
|
53
|
+
className: e(_.inputContainer, { [_.medium]: x === "medium" }),
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ p(h, {
|
|
56
|
+
size: 20,
|
|
57
|
+
className: _.icon
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ p(l, {
|
|
60
|
+
placeholder: T,
|
|
61
|
+
className: e(s.input, _.input, { [_.medium]: x === "medium" }),
|
|
62
|
+
onKeyDown: j.onSubmit ? void 0 : (e) => {
|
|
63
|
+
e.key === "Enter" && t.value && !j.isInvalid && e.currentTarget.form?.requestSubmit();
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
66
|
+
t.value.length > 0 && /* @__PURE__ */ p(n, {
|
|
67
|
+
variant: "icon",
|
|
68
|
+
size: x,
|
|
69
|
+
className: e(_.clear, { [_.medium]: x === "medium" }),
|
|
70
|
+
children: /* @__PURE__ */ p(g, {
|
|
71
|
+
size: 20,
|
|
72
|
+
"aria-hidden": !0
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}), F && /* @__PURE__ */ p(n, {
|
|
77
|
+
slot: null,
|
|
78
|
+
excludeFromTabOrder: !0,
|
|
79
|
+
size: x,
|
|
80
|
+
isDisabled: j.isDisabled,
|
|
81
|
+
type: "button",
|
|
82
|
+
onPress: () => I(t.value),
|
|
83
|
+
children: j.buttonText ?? M.format("search")
|
|
84
|
+
})]
|
|
85
|
+
}),
|
|
86
|
+
b === "bottom" && /* @__PURE__ */ p(o, { children: ({ validationErrors: e }) => w ?? e.join(" ") })
|
|
87
|
+
] })
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
export { b as t };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { n as e, t } from "./clsx-Di52oYUU.js";
|
|
2
|
+
import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
3
|
+
import { n as r, t as i } from "./label-Dw5p84T2.js";
|
|
4
|
+
import { t as a } from "./popover-DGcogqbS.js";
|
|
5
|
+
import { t as o } from "./text-DwmZ-ew8.js";
|
|
6
|
+
import { t as s } from "./field-error-LtNtEKDp.js";
|
|
7
|
+
import { n as c } from "./checkbox-DiFQy3MS.js";
|
|
8
|
+
import { c as l } from "./list-box-DmEoMvX1.js";
|
|
9
|
+
import { n as u, r as d, t as f } from "./tag-RjuYlFZI.js";
|
|
10
|
+
import p, { useContext as m } from "react";
|
|
11
|
+
import { Button as h, Select as g, SelectStateContext as _, SelectValue as v } from "react-aria-components";
|
|
12
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
13
|
+
import { ChevronDown as S, X as C } from "lucide-react";
|
|
14
|
+
import { FocusScope as w, useFocusManager as T } from "react-aria";
|
|
15
|
+
import '../assets/select.css';var E = {
|
|
16
|
+
en: {
|
|
17
|
+
clearAll: "Clear all",
|
|
18
|
+
selectAll: "Select all",
|
|
19
|
+
selectedItems: "Selected items",
|
|
20
|
+
selected: "selected"
|
|
21
|
+
},
|
|
22
|
+
sv: {
|
|
23
|
+
clearAll: "Rensa alla",
|
|
24
|
+
selectAll: "Välj alla",
|
|
25
|
+
selectedItems: "Valda objekt",
|
|
26
|
+
selected: "valda"
|
|
27
|
+
}
|
|
28
|
+
}, D = {
|
|
29
|
+
select: "_select_140qh_1",
|
|
30
|
+
triggerContainer: "_triggerContainer_140qh_7",
|
|
31
|
+
trigger: "_trigger_140qh_7",
|
|
32
|
+
medium: "_medium_140qh_30",
|
|
33
|
+
small: "_small_140qh_37",
|
|
34
|
+
selectValue: "_selectValue_140qh_60",
|
|
35
|
+
icon: "_icon_140qh_110",
|
|
36
|
+
placeholder: "_placeholder_140qh_122",
|
|
37
|
+
multiSelectValue: "_multiSelectValue_140qh_132",
|
|
38
|
+
selectValueTag: "_selectValueTag_140qh_156",
|
|
39
|
+
clearButton: "_clearButton_140qh_170",
|
|
40
|
+
truncate: "_truncate_140qh_185",
|
|
41
|
+
popover: "_popover_140qh_222",
|
|
42
|
+
selectAll: "_selectAll_140qh_250",
|
|
43
|
+
tagGroup: "_tagGroup_140qh_316"
|
|
44
|
+
}, O = () => {
|
|
45
|
+
let e = p.useContext(_), t = n(E);
|
|
46
|
+
return /* @__PURE__ */ b(c, {
|
|
47
|
+
className: D.selectAll,
|
|
48
|
+
isIndeterminate: !e?.selectionManager.isSelectAll && !e?.selectionManager.isEmpty,
|
|
49
|
+
isSelected: e?.selectionManager.isSelectAll,
|
|
50
|
+
onChange: () => {
|
|
51
|
+
if (!e) return;
|
|
52
|
+
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));
|
|
53
|
+
e.setValue(e.selectionManager.isSelectAll ? n : [...t, ...n]), e.commitValidation();
|
|
54
|
+
},
|
|
55
|
+
children: t.format("selectAll")
|
|
56
|
+
});
|
|
57
|
+
}, k = ({ isDisabled: e }) => {
|
|
58
|
+
let t = n(E), r = (e, n) => e.length === 1 ? n : `${e.length} ${t.format("selected")}`;
|
|
59
|
+
return /* @__PURE__ */ b(v, {
|
|
60
|
+
className: D.multiSelectValue,
|
|
61
|
+
"data-disabled": e || void 0,
|
|
62
|
+
children: ({ isPlaceholder: t, selectedItems: n, selectedText: i }) => t ? /* @__PURE__ */ b(y, {}) : /* @__PURE__ */ x("div", {
|
|
63
|
+
className: D.selectValueTag,
|
|
64
|
+
"data-disabled": e || void 0,
|
|
65
|
+
children: [/* @__PURE__ */ b("span", {
|
|
66
|
+
className: D.truncate,
|
|
67
|
+
children: r(n, i)
|
|
68
|
+
}), /* @__PURE__ */ b(A, { isDisabled: e })]
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}, A = ({ isDisabled: e }) => {
|
|
72
|
+
let t = p.useContext(_), r = n(E), i = T();
|
|
73
|
+
return /* @__PURE__ */ b(h, {
|
|
74
|
+
"aria-label": r.format("clearAll"),
|
|
75
|
+
className: D.clearButton,
|
|
76
|
+
onPress: () => {
|
|
77
|
+
i?.focusFirst(), t?.selectionManager.clearSelection();
|
|
78
|
+
},
|
|
79
|
+
slot: null,
|
|
80
|
+
isDisabled: e,
|
|
81
|
+
children: /* @__PURE__ */ b(C, {
|
|
82
|
+
width: 20,
|
|
83
|
+
height: 20
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
}, j = ({ showTags: e, isDisabled: t }) => {
|
|
87
|
+
let r = n(E), i = m(_);
|
|
88
|
+
return !i?.selectedItems.length || !e ? null : /* @__PURE__ */ b(f, {
|
|
89
|
+
"aria-label": r.format("selectedItems"),
|
|
90
|
+
className: D.tagGroup,
|
|
91
|
+
onRemove: (e) => {
|
|
92
|
+
i?.selectionManager.toggleSelection(Array.from(e)[0]);
|
|
93
|
+
},
|
|
94
|
+
selectionBehavior: "toggle",
|
|
95
|
+
children: /* @__PURE__ */ b(u, {
|
|
96
|
+
items: i.selectedItems,
|
|
97
|
+
children: (e) => /* @__PURE__ */ b(d, {
|
|
98
|
+
isDismissable: !0,
|
|
99
|
+
id: e.key,
|
|
100
|
+
isDisabled: t,
|
|
101
|
+
textValue: e.textValue,
|
|
102
|
+
children: e.textValue
|
|
103
|
+
}, e.key)
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
}, M = ({ isDisabled: t, selectionMode: n, size: r }) => {
|
|
107
|
+
let i = m(_);
|
|
108
|
+
return /* @__PURE__ */ x(h, {
|
|
109
|
+
className: e({
|
|
110
|
+
[D.medium]: r === "medium",
|
|
111
|
+
[D.small]: r === "small"
|
|
112
|
+
}, D.trigger),
|
|
113
|
+
"data-invalid": !!i?.displayValidation.isInvalid || void 0,
|
|
114
|
+
children: [/* @__PURE__ */ b(v, {
|
|
115
|
+
className: D.selectValue,
|
|
116
|
+
"data-disabled": t || void 0,
|
|
117
|
+
children: ({ selectedText: e, defaultChildren: t }) => /* @__PURE__ */ b("div", {
|
|
118
|
+
className: D.placeholder,
|
|
119
|
+
children: /* @__PURE__ */ b("span", {
|
|
120
|
+
className: D.truncate,
|
|
121
|
+
children: n === "multiple" && e ? null : e || t
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
}), /* @__PURE__ */ b("span", {
|
|
125
|
+
"aria-hidden": "true",
|
|
126
|
+
className: D.icon,
|
|
127
|
+
children: /* @__PURE__ */ b(S, { size: 20 })
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/select/Select.tsx
|
|
133
|
+
function N({ children: e, description: n, errorMessage: c, errorPosition: u = "top", items: d, label: f, popover: p, popoverProps: m, listBoxProps: h, size: _ = "large", ...v }) {
|
|
134
|
+
return /* @__PURE__ */ b(w, { children: /* @__PURE__ */ x(g, {
|
|
135
|
+
...v,
|
|
136
|
+
className: t(v.className, D.select),
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ b(r, {
|
|
139
|
+
popover: p,
|
|
140
|
+
children: f && /* @__PURE__ */ b(i, {
|
|
141
|
+
"data-disabled": v.isDisabled || void 0,
|
|
142
|
+
children: f
|
|
143
|
+
})
|
|
144
|
+
}),
|
|
145
|
+
n && /* @__PURE__ */ b(o, {
|
|
146
|
+
slot: "description",
|
|
147
|
+
children: n
|
|
148
|
+
}),
|
|
149
|
+
u === "top" && /* @__PURE__ */ b(s, { children: c }),
|
|
150
|
+
/* @__PURE__ */ x("div", {
|
|
151
|
+
className: D.triggerContainer,
|
|
152
|
+
"data-disabled": v.isDisabled || void 0,
|
|
153
|
+
children: [/* @__PURE__ */ b(M, {
|
|
154
|
+
size: _,
|
|
155
|
+
...v
|
|
156
|
+
}), v.selectionMode === "multiple" ? /* @__PURE__ */ b(k, { ...v }) : null]
|
|
157
|
+
}),
|
|
158
|
+
u === "bottom" && /* @__PURE__ */ b(s, { children: c }),
|
|
159
|
+
/* @__PURE__ */ x(a, {
|
|
160
|
+
offset: 1,
|
|
161
|
+
hideArrow: !0,
|
|
162
|
+
...m,
|
|
163
|
+
className: t(m?.className, D.popover),
|
|
164
|
+
children: [v.isSelectableAll && /* @__PURE__ */ b(O, {}), /* @__PURE__ */ b(l, {
|
|
165
|
+
escapeKeyBehavior: "none",
|
|
166
|
+
items: d,
|
|
167
|
+
...h,
|
|
168
|
+
children: e
|
|
169
|
+
})]
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ b(j, { ...v })
|
|
172
|
+
]
|
|
173
|
+
}) });
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
export { M as n, N as t };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
+
import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { LoaderCircle as i } from "lucide-react";
|
|
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 = {
|
|
12
|
+
en: { loadingPleaseWait: "Loading, please wait..." },
|
|
13
|
+
sv: { loadingPleaseWait: "Laddar, vänligen vänta..." }
|
|
14
|
+
}, c = ({ small: c, color: l, className: u }) => {
|
|
15
|
+
let d = t(s);
|
|
16
|
+
return /* @__PURE__ */ r("div", {
|
|
17
|
+
className: e(o.container, u),
|
|
18
|
+
role: "status",
|
|
19
|
+
children: [/* @__PURE__ */ n(i, {
|
|
20
|
+
className: e(o.spinner, !c && o.large),
|
|
21
|
+
size: c ? 20 : 96,
|
|
22
|
+
strokeWidth: c ? 2 : 8,
|
|
23
|
+
absoluteStrokeWidth: !0,
|
|
24
|
+
color: l
|
|
25
|
+
}), /* @__PURE__ */ n(a, { children: d.format("loadingPleaseWait") })]
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { c as t };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
+
import { n as t } from "./checkbox-DiFQy3MS.js";
|
|
4
|
+
import { Button as n, Cell as r, Collection as i, Column as a, Row as o, Table as s, TableBody as c, TableHeader as l, useTableOptions as u } from "react-aria-components";
|
|
5
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { ArrowDown as m, ArrowUp as h, ArrowUpDown as g, GripVertical as _ } from "lucide-react";
|
|
7
|
+
import '../assets/table.css';var v = {
|
|
8
|
+
table: "_table_1lyes_1",
|
|
9
|
+
tableHeader: "_tableHeader_1lyes_11",
|
|
10
|
+
column: "_column_1lyes_12",
|
|
11
|
+
sortIndicator: "_sortIndicator_1lyes_29",
|
|
12
|
+
sortIconNeutral: "_sortIconNeutral_1lyes_37",
|
|
13
|
+
selection: "_selection_1lyes_56",
|
|
14
|
+
row: "_row_1lyes_62",
|
|
15
|
+
cell: "_cell_1lyes_81",
|
|
16
|
+
narrow: "_narrow_1lyes_98",
|
|
17
|
+
medium: "_medium_1lyes_121",
|
|
18
|
+
striped: "_striped_1lyes_132"
|
|
19
|
+
}, y = ({ size: t = "large", striped: n = !1, className: r, ...i }) => /* @__PURE__ */ f(s, {
|
|
20
|
+
className: e(v.table, r, {
|
|
21
|
+
[v.medium]: t === "medium",
|
|
22
|
+
[v.striped]: n
|
|
23
|
+
}),
|
|
24
|
+
...i
|
|
25
|
+
}), b = ({ columns: n, children: r, className: a }) => {
|
|
26
|
+
let { selectionBehavior: o, selectionMode: s, allowsDragging: c } = u();
|
|
27
|
+
return /* @__PURE__ */ p(l, {
|
|
28
|
+
className: e(a, v.tableHeader),
|
|
29
|
+
children: [
|
|
30
|
+
c && /* @__PURE__ */ f(S, {}),
|
|
31
|
+
o === "toggle" && /* @__PURE__ */ f(S, {
|
|
32
|
+
width: 50,
|
|
33
|
+
children: s === "multiple" && /* @__PURE__ */ f(t, {
|
|
34
|
+
className: v.selection,
|
|
35
|
+
slot: "selection"
|
|
36
|
+
})
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ f(i, {
|
|
39
|
+
items: n,
|
|
40
|
+
children: r
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}, x = ({ id: r, columns: a, children: s, className: c, ...l }) => {
|
|
45
|
+
let { selectionBehavior: d, allowsDragging: m } = u();
|
|
46
|
+
return /* @__PURE__ */ p(o, {
|
|
47
|
+
id: r,
|
|
48
|
+
className: e(c, v.row),
|
|
49
|
+
...l,
|
|
50
|
+
children: [
|
|
51
|
+
m && /* @__PURE__ */ f(C, { children: /* @__PURE__ */ f(n, {
|
|
52
|
+
slot: "drag",
|
|
53
|
+
children: /* @__PURE__ */ f(_, { size: 20 })
|
|
54
|
+
}) }),
|
|
55
|
+
d === "toggle" && /* @__PURE__ */ f(C, { children: /* @__PURE__ */ f(t, {
|
|
56
|
+
className: v.selection,
|
|
57
|
+
slot: "selection"
|
|
58
|
+
}) }),
|
|
59
|
+
/* @__PURE__ */ f(i, {
|
|
60
|
+
items: a,
|
|
61
|
+
children: s
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}, S = ({ children: t, className: n, ...r }) => /* @__PURE__ */ f(a, {
|
|
66
|
+
className: e(n, v.column),
|
|
67
|
+
...r,
|
|
68
|
+
children: ({ allowsSorting: e, sortDirection: n }) => /* @__PURE__ */ p(d, { children: [t, e && /* @__PURE__ */ f("span", {
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
className: v.sortIndicator,
|
|
71
|
+
children: n === "ascending" ? /* @__PURE__ */ f(h, { size: 16 }) : n === "descending" ? /* @__PURE__ */ f(m, { size: 16 }) : /* @__PURE__ */ f(g, {
|
|
72
|
+
size: 16,
|
|
73
|
+
className: v.sortIconNeutral
|
|
74
|
+
})
|
|
75
|
+
})] })
|
|
76
|
+
}), C = ({ className: t, ...n }) => /* @__PURE__ */ f(r, {
|
|
77
|
+
className: e(t, v.cell),
|
|
78
|
+
...n
|
|
79
|
+
}), w = ({ className: t, ...n }) => /* @__PURE__ */ f(c, {
|
|
80
|
+
className: e(t, v.tableBody),
|
|
81
|
+
...n
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
export { w as a, y as i, S as n, b as o, x as r, C as t };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
+
import { n as t } from "./button-C-WkFek9.js";
|
|
3
|
+
import { Children as n, forwardRef as r, isValidElement as i } from "react";
|
|
4
|
+
import { Tag as a, TagGroup as o, TagGroupContext as s, TagList as c, TagListContext as l, composeRenderProps as u, useContextProps as d } from "react-aria-components";
|
|
5
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
6
|
+
import { X as h } from "lucide-react";
|
|
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: n, color: r, dismissable: i = !1, isDismissable: o, type: s, ...c }) => {
|
|
28
|
+
let l = o || o === void 0 && i;
|
|
29
|
+
return /* @__PURE__ */ p(a, {
|
|
30
|
+
className: e(g.tag, l && g.dismissable, {
|
|
31
|
+
[g.sky]: r === "sky",
|
|
32
|
+
[g.blue]: r === "blue" || !r && s === "info",
|
|
33
|
+
[g.mint]: r === "mint",
|
|
34
|
+
[g.green]: r === "green" || !r && s === "success",
|
|
35
|
+
[g.cream]: r === "cream",
|
|
36
|
+
[g.yellow]: r === "yellow" || !r && s === "important",
|
|
37
|
+
[g.teal]: r === "teal",
|
|
38
|
+
[g.lagoon]: r === "lagoon",
|
|
39
|
+
[g.lagoonblue]: r === "lagoonblue",
|
|
40
|
+
[g.lavender]: r === "lavender",
|
|
41
|
+
[g.purple]: r === "purple",
|
|
42
|
+
[g.peach]: r === "peach",
|
|
43
|
+
[g.orange]: r === "orange",
|
|
44
|
+
[g.pippin]: r === "pippin",
|
|
45
|
+
[g.red]: r === "red" || !r && s === "warning"
|
|
46
|
+
}, n),
|
|
47
|
+
...c,
|
|
48
|
+
textValue: c.textValue || (typeof c.children == "string" ? c.children : void 0),
|
|
49
|
+
children: u(c.children, (e) => /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
50
|
+
className: g.tagText,
|
|
51
|
+
children: e
|
|
52
|
+
}), l && /* @__PURE__ */ p(t, {
|
|
53
|
+
variant: "icon",
|
|
54
|
+
size: "medium",
|
|
55
|
+
className: g.button,
|
|
56
|
+
slot: "remove",
|
|
57
|
+
children: /* @__PURE__ */ p(h, { size: 20 })
|
|
58
|
+
})] }))
|
|
59
|
+
});
|
|
60
|
+
}, v = { tagList: "_tagList_17pz2_1" }, y = r((t, n) => {
|
|
61
|
+
let [{ className: r, ...i }, a] = d(t, n, l);
|
|
62
|
+
return /* @__PURE__ */ p(c, {
|
|
63
|
+
className: e(r, v.tagList),
|
|
64
|
+
ref: a,
|
|
65
|
+
...i
|
|
66
|
+
});
|
|
67
|
+
}), b = r((t, r) => {
|
|
68
|
+
let [{ className: a, children: c, ...l }, u] = d(t, r, s), f = n.toArray(c).filter(i).find((e) => e.type === y);
|
|
69
|
+
return !f && 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__ */ p(o, {
|
|
70
|
+
className: e(a),
|
|
71
|
+
ref: u,
|
|
72
|
+
...l,
|
|
73
|
+
children: f ? c : /* @__PURE__ */ p(y, { children: c })
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
b.displayName = "TagGroup";
|
|
77
|
+
//#endregion
|
|
78
|
+
export { y as n, _ as r, b as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { n as e, t } from "./clsx-Di52oYUU.js";
|
|
3
3
|
import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
4
|
-
import { n as r } from "./button-
|
|
5
|
-
import { n as i, t as a } from "./label-
|
|
4
|
+
import { n as r } from "./button-C-WkFek9.js";
|
|
5
|
+
import { n as i, t as a } from "./label-Dw5p84T2.js";
|
|
6
6
|
import { t as o } from "./text-DwmZ-ew8.js";
|
|
7
7
|
import { t as s } from "./field-error-LtNtEKDp.js";
|
|
8
8
|
import { t as c } from "./character-counter-CSoVSrxZ.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
2
|
import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
3
|
-
import { n, t as r } from "./label-
|
|
3
|
+
import { n, t as r } from "./label-Dw5p84T2.js";
|
|
4
4
|
import { t as i } from "./text-DwmZ-ew8.js";
|
|
5
5
|
import { t as a } from "./field-error-LtNtEKDp.js";
|
|
6
|
-
import { t as o } from "./clear-button-
|
|
7
|
-
import { n as s, r as c } from "./date-field-
|
|
6
|
+
import { t as o } from "./clear-button-Bv0YGBNG.js";
|
|
7
|
+
import { n as s, r as c } from "./date-field-CPpWZqws.js";
|
|
8
8
|
import * as l from "react";
|
|
9
9
|
import { TimeField as u, TimeFieldStateContext as d } from "react-aria-components";
|
|
10
10
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
-
import { t } from "./
|
|
4
|
-
import { t as n } from "./
|
|
5
|
-
import
|
|
6
|
-
import i from "react";
|
|
7
|
-
import {
|
|
3
|
+
import { n as t } from "./button-C-WkFek9.js";
|
|
4
|
+
import { t as n } from "./FeedbackStatusIcon-DvMDGBGL.js";
|
|
5
|
+
import r from "react";
|
|
6
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { X as s } from "lucide-react";
|
|
8
8
|
import { useToast as c, useToastRegion as l } from "react-aria";
|
|
9
9
|
import { ToastQueue as u, useToastQueue as d, useToastState as f } from "react-stately";
|
|
10
10
|
import { createPortal as p, flushSync as m } from "react-dom";
|
|
@@ -32,32 +32,32 @@ import '../assets/toast.css';var h = {
|
|
|
32
32
|
maxVisibleToasts: 5
|
|
33
33
|
}, _ = new u(g), v = (e) => {
|
|
34
34
|
let t = d(_);
|
|
35
|
-
return t.visibleToasts.length > 0 ? p(/* @__PURE__ */
|
|
35
|
+
return t.visibleToasts.length > 0 ? p(/* @__PURE__ */ a(b, {
|
|
36
36
|
...e,
|
|
37
37
|
state: t
|
|
38
38
|
}), document.body) : null;
|
|
39
39
|
}, y = ({ children: e, ...t }) => {
|
|
40
40
|
let n = f(g);
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ o(i, { children: [typeof e == "function" ? e(n) : e, n.visibleToasts.length > 0 && /* @__PURE__ */ a(b, {
|
|
42
42
|
...t,
|
|
43
43
|
state: n
|
|
44
44
|
})] });
|
|
45
45
|
};
|
|
46
|
-
function b({ state: t, className: n, ...
|
|
47
|
-
let
|
|
48
|
-
return /* @__PURE__ */
|
|
46
|
+
function b({ state: t, className: n, ...i }) {
|
|
47
|
+
let o = r.useRef(null), { regionProps: s } = l(i, t, o);
|
|
48
|
+
return /* @__PURE__ */ a("div", {
|
|
49
49
|
...s,
|
|
50
|
-
ref:
|
|
50
|
+
ref: o,
|
|
51
51
|
className: e(h.toastRegion, n),
|
|
52
|
-
children: t.visibleToasts.map((e) => /* @__PURE__ */
|
|
52
|
+
children: t.visibleToasts.map((e) => /* @__PURE__ */ a(x, {
|
|
53
53
|
toast: e,
|
|
54
54
|
state: t
|
|
55
55
|
}, e.key))
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
function x({ state:
|
|
59
|
-
let d =
|
|
60
|
-
return /* @__PURE__ */
|
|
58
|
+
function x({ state: i, className: l, ...u }) {
|
|
59
|
+
let d = r.useRef(null), { toastProps: f, contentProps: p, titleProps: m, closeButtonProps: g } = c(u, i, d);
|
|
60
|
+
return /* @__PURE__ */ o("div", {
|
|
61
61
|
...f,
|
|
62
62
|
ref: d,
|
|
63
63
|
className: e(h.toast, h[u.toast.content.type], l),
|
|
@@ -65,22 +65,22 @@ function x({ state: a, className: l, ...u }) {
|
|
|
65
65
|
viewTransitionName: u.toast.key,
|
|
66
66
|
viewTransitionClass: h.viewTransition
|
|
67
67
|
},
|
|
68
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ o("div", {
|
|
69
69
|
...p,
|
|
70
70
|
className: e(h.toastContent, p.className),
|
|
71
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ a(n, {
|
|
72
72
|
"aria-hidden": !0,
|
|
73
73
|
className: h.icon,
|
|
74
74
|
status: u.toast.content.type
|
|
75
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("p", {
|
|
76
76
|
className: h.toastMessage,
|
|
77
77
|
...m,
|
|
78
78
|
children: u.toast.content.message
|
|
79
79
|
}), u.toast.content.children] })]
|
|
80
|
-
}), /* @__PURE__ */
|
|
80
|
+
}), /* @__PURE__ */ a(t, {
|
|
81
81
|
variant: "icon",
|
|
82
82
|
...g,
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ a(s, {
|
|
84
84
|
size: 20,
|
|
85
85
|
"aria-hidden": !0
|
|
86
86
|
})
|
package/clear-button/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/clear-button-
|
|
1
|
+
import { t as e } from "../chunks/clear-button-Bv0YGBNG.js";
|
|
2
2
|
export { e as ClearButton };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/color-scheme-switch-
|
|
1
|
+
import { n as e, t } from "../chunks/color-scheme-switch-0axiBsna.js";
|
|
2
2
|
export { e as ColorSchemeSwitch, t as ColorSchemeSwitchMenu };
|
package/combobox/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/combobox-
|
|
1
|
+
import { t as e } from "../chunks/combobox-DkZbA3o4.js";
|
|
2
2
|
export { e as ComboBox };
|
package/date-field/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../chunks/date-field-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../chunks/date-field-CPpWZqws.js";
|
|
2
2
|
export { e as DateField, t as DateInput, r as DateInputDivider, n as DateSegment };
|
package/date-picker/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/date-picker-
|
|
1
|
+
import { n as e, t } from "../chunks/date-picker-DQ7vCG5-.js";
|
|
2
2
|
export { e as DatePicker, t as DateRangePicker };
|
package/file-list/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/file-list-
|
|
1
|
+
import { n as e, t } from "../chunks/file-list-D8Zc1aYS.js";
|
|
2
2
|
export { e as FileList, t as FileListItem };
|