@midas-ds/components 17.34.1 → 17.36.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 +34 -0
- package/accordion/index.js +1 -1
- package/assets/empty-state.css +1 -0
- package/assets/file-list.css +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/{accordion-DCylOvk-.js → accordion-gXivv8Ra.js} +2 -2
- package/chunks/{button-Vq0ARno3.js → button-BZHl22O1.js} +15 -12
- package/chunks/{calendar-CdKnEG5o.js → calendar-uy8xBuNV.js} +5 -5
- package/chunks/{card-mIB1NewO.js → card-CFy9gV47.js} +2 -2
- package/chunks/{checkbox-BAYWLn77.js → checkbox-_8t0WxFw.js} +3 -3
- package/chunks/{clear-button-q2aTPqmU.js → clear-button-BBOWDvaE.js} +1 -1
- package/chunks/{color-scheme-switch-D--ppbpi.js → color-scheme-switch-CZGgC68M.js} +1 -1
- package/chunks/{combobox-DC8escnY.js → combobox-Ck-7IepP.js} +4 -4
- package/chunks/{date-field-B6STeIzX.js → date-field-DkypCMfi.js} +4 -4
- package/chunks/{date-picker-DCFHCDjr.js → date-picker-Cn9qhe2G.js} +7 -7
- package/chunks/empty-state-CnDZoO65.js +40 -0
- package/chunks/{field-error-C5ynuTRu.js → field-error-CUYIkJWj.js} +1 -1
- package/chunks/file-list-k2ZZ-OB2.js +167 -0
- package/chunks/heading-0P5rm7xK.js +31 -0
- package/chunks/{info-banner-DxN9h_6W.js → info-banner-CFmkzyL-.js} +1 -1
- package/chunks/{label-aX8yboSc.js → label-Biu5Hi7b.js} +2 -2
- package/chunks/{layout-CHum4Cpf.js → layout-BwW7Scqj.js} +1 -1
- package/chunks/{list-box-Cs65YWMd.js → list-box-Cyiu3Rq7.js} +1 -1
- package/chunks/{modal-RqzWc_NN.js → modal-DvTcNZNd.js} +2 -2
- package/chunks/{progress-bar-BHdz8PFO.js → progress-bar-BvueZ-dg.js} +1 -1
- package/chunks/{radio-D0PA15IV.js → radio-Li_ZoHYq.js} +3 -3
- package/chunks/{search-field-CfgBVzAV.js → search-field-BdS63CpD.js} +4 -4
- package/chunks/{select-C0o_SEd0.js → select-b6vie6hj.js} +6 -6
- package/chunks/{table-EjKTmTGr.js → table-Cvg_n39H.js} +1 -1
- package/chunks/{tag-BNARNuvq.js → tag-vxSxMsqS.js} +1 -1
- package/chunks/text-CtvUKU-v.js +28 -0
- package/chunks/{textfield-BWv4mP4v.js → textfield-i0dO0qgs.js} +4 -4
- package/chunks/{time-field-KpetgpDY.js → time-field-BG2BH5HH.js} +5 -5
- package/chunks/{toast-BO158amn.js → toast-CZHBaKdY.js} +1 -1
- 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/empty-state/EmptyState.d.ts +12 -0
- package/empty-state/empty-state-actions/EmptyStateActions.d.ts +3 -0
- package/empty-state/empty-state-actions/index.d.ts +1 -0
- package/empty-state/empty-state-heading/EmptyStateHeading.d.ts +3 -0
- package/empty-state/empty-state-heading/index.d.ts +1 -0
- package/empty-state/empty-state-text/EmptyStateText.d.ts +3 -0
- package/empty-state/empty-state-text/index.d.ts +1 -0
- package/empty-state/empty-state-visual/EmptyStateVisual.d.ts +3 -0
- package/empty-state/empty-state-visual/index.d.ts +1 -0
- package/empty-state/index.d.ts +5 -0
- package/empty-state/index.js +1 -0
- package/field-error/index.js +1 -1
- package/file-list/FileList.d.ts +4 -0
- package/file-list/FileListItem.d.ts +24 -8
- package/file-list/index.js +1 -1
- package/file-list/intl/translations.json.d.ts +4 -2
- package/heading/Heading.d.ts +1 -2
- package/heading/index.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +40 -39
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/list-box/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +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/table/index.js +1 -1
- package/tag/index.js +1 -1
- package/text/Text.d.ts +1 -2
- package/text/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/file-list-BqPDm31w.js +0 -138
- package/chunks/heading-CIlMdywy.js +0 -30
- package/chunks/text-D7tnzTru.js +0 -27
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
|
-
import { n as t } from "./button-Vq0ARno3.js";
|
|
4
|
-
import { t as n } from "./progress-bar-BHdz8PFO.js";
|
|
5
|
-
import { t as r } from "./FeedbackStatusIcon-DX5ndhm3.js";
|
|
6
|
-
import { t as i } from "./field-error-C5ynuTRu.js";
|
|
7
|
-
import { t as a } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
8
|
-
import { useEffect as o, useId as s, useRef as c } from "react";
|
|
9
|
-
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
-
import { Trash2 as f, X as p } from "lucide-react";
|
|
11
|
-
import { FocusScope as m, VisuallyHidden as h, useFocusManager as g } from "react-aria";
|
|
12
|
-
import '../assets/file-list.css';var _ = {
|
|
13
|
-
fileList: "_fileList_mb5n3_1",
|
|
14
|
-
fileListItem: "_fileListItem_mb5n3_18",
|
|
15
|
-
row: "_row_mb5n3_25",
|
|
16
|
-
iconSlot: "_iconSlot_mb5n3_46",
|
|
17
|
-
progressIcon: "_progressIcon_mb5n3_70",
|
|
18
|
-
ring: "_ring_mb5n3_82",
|
|
19
|
-
successRing: "_successRing_mb5n3_1",
|
|
20
|
-
checkmark: "_checkmark_mb5n3_106",
|
|
21
|
-
successCheckmark: "_successCheckmark_mb5n3_1",
|
|
22
|
-
successIcon: "_successIcon_mb5n3_121",
|
|
23
|
-
errorReveal: "_errorReveal_mb5n3_163",
|
|
24
|
-
fileInfo: "_fileInfo_mb5n3_169",
|
|
25
|
-
fileName: "_fileName_mb5n3_177",
|
|
26
|
-
fileSize: "_fileSize_mb5n3_186",
|
|
27
|
-
deleteButton: "_deleteButton_mb5n3_192"
|
|
28
|
-
}, v = ({ className: t, children: n, ...r }) => {
|
|
29
|
-
let i = c(null);
|
|
30
|
-
return /* @__PURE__ */ u(m, { children: /* @__PURE__ */ d("ul", {
|
|
31
|
-
...r,
|
|
32
|
-
ref: i,
|
|
33
|
-
tabIndex: -1,
|
|
34
|
-
className: e(_.fileList, t),
|
|
35
|
-
children: [/* @__PURE__ */ u(y, { containerRef: i }), n]
|
|
36
|
-
}) });
|
|
37
|
-
}, y = ({ containerRef: e }) => {
|
|
38
|
-
let t = g(), n = c(t);
|
|
39
|
-
return o(() => {
|
|
40
|
-
n.current = t;
|
|
41
|
-
}), o(() => {
|
|
42
|
-
let t = e.current;
|
|
43
|
-
if (!t) return;
|
|
44
|
-
let r = new MutationObserver((e) => {
|
|
45
|
-
e.some((e) => e.removedNodes.length > 0) && document.activeElement === document.body && (n.current?.focusFirst({ tabbable: !0 }) || t.focus());
|
|
46
|
-
});
|
|
47
|
-
return r.observe(t, { childList: !0 }), () => r.disconnect();
|
|
48
|
-
}, [e]), null;
|
|
49
|
-
}, b = {
|
|
50
|
-
en: {
|
|
51
|
-
removeFile: "Remove",
|
|
52
|
-
cancelUpload: "Cancel",
|
|
53
|
-
uploading: "Uploading",
|
|
54
|
-
uploadComplete: "Upload complete",
|
|
55
|
-
uploadFailed: "Upload failed"
|
|
56
|
-
},
|
|
57
|
-
sv: {
|
|
58
|
-
removeFile: "Ta bort",
|
|
59
|
-
cancelUpload: "Avbryt",
|
|
60
|
-
uploading: "Laddar upp",
|
|
61
|
-
uploadComplete: "Uppladdning klar",
|
|
62
|
-
uploadFailed: "Uppladdning misslyckades"
|
|
63
|
-
}
|
|
64
|
-
}, x = ({ fileName: o, fileSize: c, status: m = "idle", progress: g, errorMessage: v, onCancel: y, onDelete: x, className: S }) => {
|
|
65
|
-
let C = a(b), w = m === "uploading", T = m === "success", E = m === "error", D = E && !!v, O = s(), k = s(), A = T ? C.format("uploadComplete") : E ? C.format("uploadFailed") : void 0, j = [A && k, D && O].filter(Boolean).join(" ") || void 0, M = w ? y ?? x : x;
|
|
66
|
-
return /* @__PURE__ */ d("li", {
|
|
67
|
-
className: e(_.fileListItem, S),
|
|
68
|
-
"data-status": m,
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ d("div", {
|
|
71
|
-
className: _.row,
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ d("span", {
|
|
74
|
-
className: _.iconSlot,
|
|
75
|
-
children: [
|
|
76
|
-
w && /* @__PURE__ */ u(n, {
|
|
77
|
-
shape: "circular",
|
|
78
|
-
small: !0,
|
|
79
|
-
value: g,
|
|
80
|
-
isIndeterminate: g === void 0,
|
|
81
|
-
"aria-label": `${C.format("uploading")} ${o}`,
|
|
82
|
-
className: _.progressIcon
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ u("span", {
|
|
85
|
-
className: _.ring,
|
|
86
|
-
"aria-hidden": !0
|
|
87
|
-
}),
|
|
88
|
-
T && /* @__PURE__ */ u(r, {
|
|
89
|
-
status: "success",
|
|
90
|
-
"aria-hidden": !0,
|
|
91
|
-
size: 16,
|
|
92
|
-
className: e(_.checkmark, _.successIcon)
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
}),
|
|
96
|
-
A && /* @__PURE__ */ u(h, {
|
|
97
|
-
id: k,
|
|
98
|
-
children: A
|
|
99
|
-
}),
|
|
100
|
-
/* @__PURE__ */ d("span", {
|
|
101
|
-
className: _.fileInfo,
|
|
102
|
-
children: [/* @__PURE__ */ u("span", {
|
|
103
|
-
className: _.fileName,
|
|
104
|
-
children: o
|
|
105
|
-
}), c && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(h, { children: ", " }), /* @__PURE__ */ u("span", {
|
|
106
|
-
className: _.fileSize,
|
|
107
|
-
children: c
|
|
108
|
-
})] })]
|
|
109
|
-
}),
|
|
110
|
-
M && /* @__PURE__ */ u(t, {
|
|
111
|
-
variant: "icon",
|
|
112
|
-
onPress: M,
|
|
113
|
-
"aria-label": `${C.format(w ? "cancelUpload" : "removeFile")} ${o}`,
|
|
114
|
-
"aria-describedby": j,
|
|
115
|
-
className: _.deleteButton,
|
|
116
|
-
children: u(w ? p : f, {
|
|
117
|
-
size: 20,
|
|
118
|
-
"aria-hidden": !0
|
|
119
|
-
})
|
|
120
|
-
})
|
|
121
|
-
]
|
|
122
|
-
}),
|
|
123
|
-
/* @__PURE__ */ u("div", {
|
|
124
|
-
id: O,
|
|
125
|
-
className: _.errorReveal,
|
|
126
|
-
children: v && /* @__PURE__ */ u(i, {
|
|
127
|
-
isInvalid: !0,
|
|
128
|
-
children: v
|
|
129
|
-
})
|
|
130
|
-
}),
|
|
131
|
-
/* @__PURE__ */ d(h, {
|
|
132
|
-
role: "status",
|
|
133
|
-
children: [T && `${C.format("uploadComplete")}: ${o}`, D && `${o}: ${v}`]
|
|
134
|
-
})
|
|
135
|
-
]
|
|
136
|
-
});
|
|
137
|
-
};
|
|
138
|
-
export { v as n, x as t };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { Heading as t } from "react-aria-components";
|
|
4
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
-
import '../assets/heading.css';var r = {
|
|
6
|
-
h1: "_h1_13alg_1",
|
|
7
|
-
h2: "_h2_13alg_2",
|
|
8
|
-
h3: "_h3_13alg_3",
|
|
9
|
-
h4: "_h4_13alg_4",
|
|
10
|
-
h5: "_h5_13alg_5",
|
|
11
|
-
h6: "_h6_13alg_6"
|
|
12
|
-
}, i = ({ children: i, className: a, enableMargins: o = !1, isExpressive: s = !1, level: c = 3, elementType: l, ...u }) => {
|
|
13
|
-
let d = l && parseInt(l.split("h")[1]);
|
|
14
|
-
return /* @__PURE__ */ n(t, {
|
|
15
|
-
level: d || c,
|
|
16
|
-
className: e([
|
|
17
|
-
r.h1,
|
|
18
|
-
r.h2,
|
|
19
|
-
r.h3,
|
|
20
|
-
r.h4,
|
|
21
|
-
r.h5,
|
|
22
|
-
r.h6
|
|
23
|
-
][c - 1], a),
|
|
24
|
-
...s && { "data-expressive": !0 },
|
|
25
|
-
...o && { "data-margin": !0 },
|
|
26
|
-
...u,
|
|
27
|
-
children: i
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
export { i as t };
|
package/chunks/text-D7tnzTru.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { Text as t } from "react-aria-components";
|
|
4
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
-
import '../assets/text.css';var r = {
|
|
6
|
-
body: "_body_g096r_1",
|
|
7
|
-
"body-small": "_body-small_g096r_2",
|
|
8
|
-
description: "_description_g096r_3",
|
|
9
|
-
"description-small": "_description-small_g096r_4",
|
|
10
|
-
bold: "_bold_g096r_24",
|
|
11
|
-
italic: "_italic_g096r_28"
|
|
12
|
-
}, i = "span", a = ({ children: a, className: o, size: s, isExpressive: c = !1, elementType: l = i, ...u }) => {
|
|
13
|
-
let d = {
|
|
14
|
-
className: e(u.slot === "description" ? s === "small" ? r["description-small"] : r.description : s === "small" ? r["body-small"] : r.body, {
|
|
15
|
-
[r.bold]: ["b", "strong"].includes(l),
|
|
16
|
-
[r.italic]: ["i", "em"].includes(l)
|
|
17
|
-
}, o),
|
|
18
|
-
elementType: l || i,
|
|
19
|
-
...c && { "data-expressive": !0 },
|
|
20
|
-
...u
|
|
21
|
-
};
|
|
22
|
-
return /* @__PURE__ */ n(t, {
|
|
23
|
-
...d,
|
|
24
|
-
children: a
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
export { a as t };
|