@midas-ds/components 17.37.0 → 17.38.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 +11 -0
- package/assets/file-picker.css +1 -0
- package/calendar/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/chunks/FilePickerContext-srh1PxjD.js +4 -0
- package/chunks/{calendar-BJm5YpLm.js → calendar--jr5akwd.js} +2 -2
- package/chunks/{checkbox-_8t0WxFw.js → checkbox-BQBWZGq8.js} +1 -1
- package/chunks/{combobox-B6O0D9Ee.js → combobox-BeUfMvCM.js} +1 -1
- package/chunks/{date-field-DkypCMfi.js → date-field-PYhwZ3so.js} +1 -1
- package/chunks/{date-picker-C2bpCweL.js → date-picker-BKevnb0U.js} +3 -3
- package/chunks/drop-zone-CSN3p9Ci.js +25 -0
- package/chunks/{field-error-CUYIkJWj.js → field-error-DmG_1v1a.js} +1 -0
- package/chunks/{file-list-k2ZZ-OB2.js → file-list-1YHkEsg2.js} +8 -2
- package/chunks/file-picker-QW32GI5x.js +55 -0
- package/chunks/file-trigger-MkxFBZEa.js +19 -0
- package/chunks/{radio-Li_ZoHYq.js → radio-DmIqfqmv.js} +1 -1
- package/chunks/{search-field-BdS63CpD.js → search-field-BhyOQEH-.js} +1 -1
- package/chunks/{select-CFalvI-4.js → select-DZPOAjdi.js} +2 -2
- package/chunks/{table-Cvg_n39H.js → table-LI05sYfx.js} +1 -1
- package/chunks/{textfield-i0dO0qgs.js → textfield-CTLmlJP2.js} +1 -1
- package/chunks/{time-field-BG2BH5HH.js → time-field-DqqrquSK.js} +2 -2
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/drop-zone/DropZone.d.ts +2 -1
- package/drop-zone/index.js +1 -1
- package/field-error/index.js +1 -1
- package/file-list/index.js +1 -1
- package/file-picker/FilePicker.d.ts +54 -0
- package/file-picker/FilePickerContext.d.ts +6 -0
- package/file-picker/index.d.ts +1 -0
- package/file-picker/index.js +1 -0
- package/file-trigger/FileTrigger.d.ts +1 -1
- package/file-trigger/index.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +30 -29
- package/package.json +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/textfield/index.js +1 -1
- package/time-field/index.js +1 -1
- package/chunks/drop-zone-BL3Z-Sbj.js +0 -24
- package/chunks/file-trigger-gOeeZzDP.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 17.38.0 (2026-11-23)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components,file-picker:** add FilePicker for file uploads ([d315d83320b](https://github.com/migrationsverket/midas/commit/d315d83320b))
|
|
6
|
+
- **components,file-trigger:** change default button variant ([d60c71ce913](https://github.com/migrationsverket/midas/commit/d60c71ce913))
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- **components,file-list:** move focus to the next row, not the first, when a row is removed ([c710f1dab54](https://github.com/migrationsverket/midas/commit/c710f1dab54))
|
|
11
|
+
|
|
1
12
|
## 17.37.0 (2026-11-20)
|
|
2
13
|
|
|
3
14
|
### 🚀 Features
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._filePicker_3gqj9_1{width:100%;font-family:var(--midas-typography-font-family);flex-direction:column;display:flex}._content_3gqj9_8{gap:var(--midas-space-medium);flex-direction:column;display:flex}
|
package/calendar/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as Calendar, t as RangeCalendar } from "../chunks/calendar
|
|
1
|
+
export { n as Calendar, t as RangeCalendar } from "../chunks/calendar--jr5akwd.js";
|
package/checkbox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as Checkbox, r as CheckboxButton, i as CheckboxField, t as CheckboxGroup } from "../chunks/checkbox-
|
|
1
|
+
export { n as Checkbox, r as CheckboxButton, i as CheckboxField, t as CheckboxGroup } from "../chunks/checkbox-BQBWZGq8.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
2
|
import { n as t } from "./button-BZHl22O1.js";
|
|
3
3
|
import { t as n } from "./heading-0P5rm7xK.js";
|
|
4
|
-
import { n as r } from "./select-
|
|
4
|
+
import { n as r } from "./select-DZPOAjdi.js";
|
|
5
5
|
import { a as i, c as a, o } from "./list-box-YaPiKCld.js";
|
|
6
|
-
import { t as s } from "./field-error-
|
|
6
|
+
import { t as s } from "./field-error-DmG_1v1a.js";
|
|
7
7
|
import * as c from "react";
|
|
8
8
|
import { clsx as l } from "clsx";
|
|
9
9
|
import { Calendar as u, CalendarCell as d, CalendarGrid as f, CalendarMonthPicker as p, CalendarYearPicker as m, RangeCalendar as h, RangeCalendarContext as g, Select as _ } from "react-aria-components";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as e } from "./field-error-
|
|
2
|
+
import { t as e } from "./field-error-DmG_1v1a.js";
|
|
3
3
|
import { t } from "./text-CtvUKU-v.js";
|
|
4
4
|
import { t as n } from "./clsx-BtGY0yFD.js";
|
|
5
5
|
import { t as r } from "./splitDataAttributes-ChyO_Kvc.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
3
|
import { n as t, t as n } from "./label-Biu5Hi7b.js";
|
|
4
4
|
import { t as r } from "./text-CtvUKU-v.js";
|
|
5
|
-
import { t as i } from "./field-error-
|
|
5
|
+
import { t as i } from "./field-error-DmG_1v1a.js";
|
|
6
6
|
import { a, c as o, t as s } from "./list-box-YaPiKCld.js";
|
|
7
7
|
import { t as c } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
8
8
|
import { useRef as l } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
-
import { t } from "./field-error-
|
|
2
|
+
import { t } from "./field-error-DmG_1v1a.js";
|
|
3
3
|
import { n, t as r } from "./label-Biu5Hi7b.js";
|
|
4
4
|
import { t as i } from "./text-CtvUKU-v.js";
|
|
5
5
|
import { t as a } from "./clear-button-BBOWDvaE.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { t as e } from "./clear-button-BBOWDvaE.js";
|
|
3
3
|
import { t } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
4
|
-
import { a as n, n as r, r as i, t as a } from "./date-field-
|
|
4
|
+
import { a as n, n as r, r as i, t as a } from "./date-field-PYhwZ3so.js";
|
|
5
5
|
import { n as o } from "./button-BZHl22O1.js";
|
|
6
|
-
import { n as s, t as c } from "./calendar
|
|
7
|
-
import { t as l } from "./field-error-
|
|
6
|
+
import { n as s, t as c } from "./calendar--jr5akwd.js";
|
|
7
|
+
import { t as l } from "./field-error-DmG_1v1a.js";
|
|
8
8
|
import { n as u, t as d } from "./label-Biu5Hi7b.js";
|
|
9
9
|
import { t as f } from "./text-CtvUKU-v.js";
|
|
10
10
|
import * as p from "react";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
|
+
import { n as t } from "./FilePickerContext-srh1PxjD.js";
|
|
4
|
+
import { forwardRef as n } from "react";
|
|
5
|
+
import { DropZone as r, FieldErrorContext as i, composeRenderProps as a } from "react-aria-components";
|
|
6
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
7
|
+
import '../assets/drop-zone.css';var s = { dropZone: "_dropZone_1g3sx_1" }, c = n(({ className: n, isInvalid: c, children: l, ...u }, d) => {
|
|
8
|
+
let f = t(), p = c ?? f?.isInvalid ?? !1, m = p ? {
|
|
9
|
+
isInvalid: !0,
|
|
10
|
+
validationErrors: [],
|
|
11
|
+
validationDetails: {}
|
|
12
|
+
} : null;
|
|
13
|
+
return /* @__PURE__ */ o(r, {
|
|
14
|
+
...u,
|
|
15
|
+
ref: d,
|
|
16
|
+
"data-invalid": p || void 0,
|
|
17
|
+
className: e(s.dropZone, n),
|
|
18
|
+
children: a(l, (e) => /* @__PURE__ */ o(i.Provider, {
|
|
19
|
+
value: m,
|
|
20
|
+
children: e
|
|
21
|
+
}))
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
c.displayName = "DropZone";
|
|
25
|
+
export { c as t };
|
|
@@ -6,6 +6,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
6
6
|
import '../assets/field-error.css';var s = { fieldError: "_fieldError_u3cks_1" }, c = n((n, c) => {
|
|
7
7
|
let { children: l, isInvalid: u } = n, d = e(s.fieldError, n.className), f = r(a);
|
|
8
8
|
return !f && u && typeof l != "function" ? /* @__PURE__ */ o(t, {
|
|
9
|
+
id: n.id,
|
|
9
10
|
className: d,
|
|
10
11
|
children: l
|
|
11
12
|
}) : f?.isInvalid ? /* @__PURE__ */ o(i, {
|
|
@@ -3,7 +3,7 @@ import { t as e } from "./clsx-BtGY0yFD.js";
|
|
|
3
3
|
import { n as t } from "./button-BZHl22O1.js";
|
|
4
4
|
import { t as n } from "./progress-bar-BvueZ-dg.js";
|
|
5
5
|
import { t as r } from "./FeedbackStatusIcon-DX5ndhm3.js";
|
|
6
|
-
import { t as i } from "./field-error-
|
|
6
|
+
import { t as i } from "./field-error-DmG_1v1a.js";
|
|
7
7
|
import { t as a } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
8
8
|
import { useEffect as o, useId as s, useLayoutEffect as c, useRef as l } from "react";
|
|
9
9
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
@@ -43,7 +43,13 @@ import '../assets/file-list.css';var y = {
|
|
|
43
43
|
let t = e.current;
|
|
44
44
|
if (!t) return;
|
|
45
45
|
let r = new MutationObserver((e) => {
|
|
46
|
-
e.
|
|
46
|
+
let r = e.find((e) => e.removedNodes.length > 0);
|
|
47
|
+
if (!r || document.activeElement !== document.body) return;
|
|
48
|
+
let i = [r.nextSibling, r.previousSibling].find((e) => e instanceof Element && e.isConnected);
|
|
49
|
+
i && n.current?.focusNext({
|
|
50
|
+
from: i,
|
|
51
|
+
tabbable: !0
|
|
52
|
+
}) || t.focus();
|
|
47
53
|
});
|
|
48
54
|
return r.observe(t, { childList: !0 }), () => r.disconnect();
|
|
49
55
|
}, [e]), null;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
|
+
import { n as t, t as n } from "./label-Biu5Hi7b.js";
|
|
4
|
+
import { t as r } from "./text-CtvUKU-v.js";
|
|
5
|
+
import { t as i } from "./field-error-DmG_1v1a.js";
|
|
6
|
+
import { t as a } from "./FilePickerContext-srh1PxjD.js";
|
|
7
|
+
import { useId as o } from "react";
|
|
8
|
+
import { Group as s } from "react-aria-components";
|
|
9
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
|
+
import '../assets/file-picker.css';var u = {
|
|
11
|
+
filePicker: "_filePicker_3gqj9_1",
|
|
12
|
+
content: "_content_3gqj9_8"
|
|
13
|
+
}, d = ({ label: d, "aria-label": f, "aria-labelledby": p, description: m, errorMessage: h, errorPosition: g = "top", isInvalid: _ = !1, popover: v, className: y, children: b, ...x }) => {
|
|
14
|
+
let S = o(), C = d ? S : p, w = o(), T = o(), E = _ && !!h, D = [m && w, E && T].filter(Boolean).join(" "), O = E && /* @__PURE__ */ c(i, {
|
|
15
|
+
id: T,
|
|
16
|
+
isInvalid: !0,
|
|
17
|
+
children: h
|
|
18
|
+
});
|
|
19
|
+
return /* @__PURE__ */ l(s, {
|
|
20
|
+
...x,
|
|
21
|
+
"aria-label": f,
|
|
22
|
+
"aria-labelledby": C,
|
|
23
|
+
"aria-describedby": D || void 0,
|
|
24
|
+
isInvalid: _,
|
|
25
|
+
className: e(u.filePicker, y),
|
|
26
|
+
children: [
|
|
27
|
+
d && /* @__PURE__ */ c(t, {
|
|
28
|
+
popover: v,
|
|
29
|
+
children: /* @__PURE__ */ c(n, {
|
|
30
|
+
id: C,
|
|
31
|
+
elementType: "span",
|
|
32
|
+
children: d
|
|
33
|
+
})
|
|
34
|
+
}),
|
|
35
|
+
m && /* @__PURE__ */ c(r, {
|
|
36
|
+
slot: "description",
|
|
37
|
+
id: w,
|
|
38
|
+
children: m
|
|
39
|
+
}),
|
|
40
|
+
g === "top" && O,
|
|
41
|
+
/* @__PURE__ */ c(a.Provider, {
|
|
42
|
+
value: {
|
|
43
|
+
"aria-describedby": [C, D].filter(Boolean).join(" "),
|
|
44
|
+
isInvalid: _
|
|
45
|
+
},
|
|
46
|
+
children: /* @__PURE__ */ c("div", {
|
|
47
|
+
className: u.content,
|
|
48
|
+
children: b
|
|
49
|
+
})
|
|
50
|
+
}),
|
|
51
|
+
g === "bottom" && O
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
export { d as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { n as e } from "./FilePickerContext-srh1PxjD.js";
|
|
3
|
+
import { ButtonContext as t, FileTrigger as n } from "react-aria-components";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/file-trigger/FileTrigger.tsx
|
|
6
|
+
var i = ({ children: i, ...a }) => {
|
|
7
|
+
let o = {
|
|
8
|
+
variant: "secondary",
|
|
9
|
+
"aria-describedby": e()?.["aria-describedby"]
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ r(n, {
|
|
12
|
+
...a,
|
|
13
|
+
children: /* @__PURE__ */ r(t.Provider, {
|
|
14
|
+
value: o,
|
|
15
|
+
children: i
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export { i as t };
|
|
@@ -2,7 +2,7 @@ import { t as e } from "./clsx-BtGY0yFD.js";
|
|
|
2
2
|
import { t } from "./splitDataAttributes-ChyO_Kvc.js";
|
|
3
3
|
import { n, t as r } from "./label-Biu5Hi7b.js";
|
|
4
4
|
import { t as i } from "./text-CtvUKU-v.js";
|
|
5
|
-
import { t as a } from "./field-error-
|
|
5
|
+
import { t as a } from "./field-error-DmG_1v1a.js";
|
|
6
6
|
import { Group as o, RadioButton as s, RadioField as c, RadioGroup as l, composeRenderProps as u } from "react-aria-components";
|
|
7
7
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
8
|
import '../assets/radio.css';// src/radio/RadioField.tsx
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { t as e } from "./TextField.module-DQfRPRIT.js";
|
|
3
3
|
import { n as t } from "./button-BZHl22O1.js";
|
|
4
4
|
import { t as n } from "./clsx-BtGY0yFD.js";
|
|
5
|
-
import { t as r } from "./field-error-
|
|
5
|
+
import { t as r } from "./field-error-DmG_1v1a.js";
|
|
6
6
|
import { t as i } from "./text-CtvUKU-v.js";
|
|
7
7
|
import { n as a, t as o } from "./label-Biu5Hi7b.js";
|
|
8
8
|
import { t as s } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as e, t } from "./label-Biu5Hi7b.js";
|
|
2
2
|
import { t as n } from "./clsx-BtGY0yFD.js";
|
|
3
3
|
import { t as r } from "./text-CtvUKU-v.js";
|
|
4
|
-
import { t as i } from "./field-error-
|
|
5
|
-
import { n as a } from "./checkbox-
|
|
4
|
+
import { t as i } from "./field-error-DmG_1v1a.js";
|
|
5
|
+
import { n as a } from "./checkbox-BQBWZGq8.js";
|
|
6
6
|
import { t as o } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
7
7
|
import { c as s } from "./list-box-YaPiKCld.js";
|
|
8
8
|
import { t as c } from "./popover-C7Ain5Qz.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Collection as e } from "../aria/index.js";
|
|
3
|
-
import { n as t } from "./checkbox-
|
|
3
|
+
import { n as t } from "./checkbox-BQBWZGq8.js";
|
|
4
4
|
import { t as n } from "./clsx-BtGY0yFD.js";
|
|
5
5
|
import { Button as r, Cell as i, Column as a, Row as o, Table as s, TableBody as c, TableHeader as l, useTableOptions as u } from "react-aria-components";
|
|
6
6
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { t as e } from "./TextField.module-DQfRPRIT.js";
|
|
3
3
|
import { t } from "./text-CtvUKU-v.js";
|
|
4
|
-
import { t as n } from "./field-error-
|
|
4
|
+
import { t as n } from "./field-error-DmG_1v1a.js";
|
|
5
5
|
import { t as r } from "./character-counter-IbkPoEcq.js";
|
|
6
6
|
import { n as i, t as a } from "./label-Biu5Hi7b.js";
|
|
7
7
|
import { t as o } from "./clsx-BtGY0yFD.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
-
import { n as t, r as n } from "./date-field-
|
|
3
|
-
import { t as r } from "./field-error-
|
|
2
|
+
import { n as t, r as n } from "./date-field-PYhwZ3so.js";
|
|
3
|
+
import { t as r } from "./field-error-DmG_1v1a.js";
|
|
4
4
|
import { n as i, t as a } from "./label-Biu5Hi7b.js";
|
|
5
5
|
import { t as o } from "./text-CtvUKU-v.js";
|
|
6
6
|
import { t as s } from "./clear-button-BBOWDvaE.js";
|
package/combobox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as ComboBox } from "../chunks/combobox-
|
|
1
|
+
export { t as ComboBox } from "../chunks/combobox-BeUfMvCM.js";
|
package/date-field/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as DateField, n as DateInput, t as DateInputDivider, r as DateSegment } from "../chunks/date-field-
|
|
1
|
+
export { i as DateField, n as DateInput, t as DateInputDivider, r as DateSegment } from "../chunks/date-field-PYhwZ3so.js";
|
package/date-picker/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as DatePicker, t as DateRangePicker } from "../chunks/date-picker-
|
|
1
|
+
export { n as DatePicker, t as DateRangePicker } from "../chunks/date-picker-BKevnb0U.js";
|
package/drop-zone/DropZone.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ export interface DropZoneProps extends AriaDropZoneProps {
|
|
|
3
3
|
/**
|
|
4
4
|
* Marks the dropzone as invalid, e.g. after a failed validation. Pair with
|
|
5
5
|
* `FieldError` to render the error message, either inside or below the
|
|
6
|
-
* dropzone depending on where it's composed.
|
|
6
|
+
* dropzone depending on where it's composed. Inside a `FilePicker`, it
|
|
7
|
+
* follows the field's `isInvalid` unless set explicitly.
|
|
7
8
|
*
|
|
8
9
|
* @default false
|
|
9
10
|
*/
|
package/drop-zone/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DropZone } from "../chunks/drop-zone-
|
|
1
|
+
export { t as DropZone } from "../chunks/drop-zone-CSN3p9Ci.js";
|
package/field-error/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as FieldError } from "../chunks/field-error-
|
|
1
|
+
export { t as FieldError } from "../chunks/field-error-DmG_1v1a.js";
|
package/file-list/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as FileList, t as FileListItem } from "../chunks/file-list-
|
|
1
|
+
export { n as FileList, t as FileListItem } from "../chunks/file-list-1YHkEsg2.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { InfoPopoverProps } from '../label';
|
|
3
|
+
interface FilePickerBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'popover' | 'role' | 'aria-label' | 'aria-labelledby'> {
|
|
4
|
+
/** A description shown below the label */
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Error message shown when `isInvalid` is true */
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Shows the error message between the description and the upload
|
|
10
|
+
* controls, or below the controls.
|
|
11
|
+
*
|
|
12
|
+
* @default 'top'
|
|
13
|
+
*/
|
|
14
|
+
errorPosition?: 'top' | 'bottom';
|
|
15
|
+
/**
|
|
16
|
+
* Marks the field as invalid and shows `errorMessage`.
|
|
17
|
+
* A composed `DropZone` is marked as invalid too.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
isInvalid?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** The group needs a name: a visible label, or one for screen readers only */
|
|
24
|
+
type FilePickerName = {
|
|
25
|
+
/** The label shown above the upload controls, also the group's name */
|
|
26
|
+
label: string;
|
|
27
|
+
/** An info button next to the label */
|
|
28
|
+
popover?: InfoPopoverProps;
|
|
29
|
+
'aria-label'?: never;
|
|
30
|
+
'aria-labelledby'?: never;
|
|
31
|
+
} | {
|
|
32
|
+
label?: never;
|
|
33
|
+
popover?: never;
|
|
34
|
+
/** Names the group when there's no visible `label` */
|
|
35
|
+
'aria-label': string;
|
|
36
|
+
'aria-labelledby'?: never;
|
|
37
|
+
} | {
|
|
38
|
+
label?: never;
|
|
39
|
+
popover?: never;
|
|
40
|
+
'aria-label'?: never;
|
|
41
|
+
/**
|
|
42
|
+
* Names the group with another element, e.g. a heading, when there's
|
|
43
|
+
* no visible `label`. It also describes the upload controls.
|
|
44
|
+
*/
|
|
45
|
+
'aria-labelledby': string;
|
|
46
|
+
};
|
|
47
|
+
export type FilePickerProps = FilePickerBaseProps & FilePickerName;
|
|
48
|
+
/**
|
|
49
|
+
* Groups a file upload pattern, `FileTrigger`, `DropZone` and `FileList`,
|
|
50
|
+
* under a label, description and error message. It doesn't hold the files:
|
|
51
|
+
* keep them, and their upload status, in your own state.
|
|
52
|
+
*/
|
|
53
|
+
export declare const FilePicker: ({ label, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, description, errorMessage, errorPosition, isInvalid, popover, className, children, ...rest }: FilePickerProps) => import('react').JSX.Element;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface FilePickerContextValue {
|
|
2
|
+
'aria-describedby': string;
|
|
3
|
+
isInvalid: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const FilePickerContext: import('react').Context<FilePickerContextValue | null>;
|
|
6
|
+
export declare const useFilePickerContext: () => FilePickerContextValue | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilePicker, type FilePickerProps } from './FilePicker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as FilePicker } from "../chunks/file-picker-QW32GI5x.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FileTriggerProps } from 'react-aria-components';
|
|
2
|
-
export declare const FileTrigger: (props: FileTriggerProps) => import('react').JSX.Element;
|
|
2
|
+
export declare const FileTrigger: ({ children, ...props }: FileTriggerProps) => import('react').JSX.Element;
|
package/file-trigger/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as FileTrigger } from "../chunks/file-trigger-
|
|
1
|
+
export { t as FileTrigger } from "../chunks/file-trigger-MkxFBZEa.js";
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -9,14 +9,14 @@ import { n as h, t as g } from "./chunks/button-BZHl22O1.js";
|
|
|
9
9
|
import { t as _ } from "./chunks/heading-0P5rm7xK.js";
|
|
10
10
|
import { n as v, t as y } from "./chunks/badge-C5Sdu_uw.js";
|
|
11
11
|
import { n as b, t as x } from "./chunks/breadcrumbs-BwYDyKWo.js";
|
|
12
|
-
import { n as S, t as C } from "./chunks/calendar
|
|
12
|
+
import { n as S, t as C } from "./chunks/calendar--jr5akwd.js";
|
|
13
13
|
import { t as w } from "./chunks/label-Biu5Hi7b.js";
|
|
14
14
|
import { t as T } from "./chunks/popover-C7Ain5Qz.js";
|
|
15
15
|
import { n as E, r as D, t as O } from "./chunks/modal-DvTcNZNd.js";
|
|
16
16
|
import { t as k } from "./chunks/text-CtvUKU-v.js";
|
|
17
|
-
import { t as A } from "./chunks/field-error-
|
|
18
|
-
import { i as j, n as M, r as N, t as P } from "./chunks/checkbox-
|
|
19
|
-
import { n as F, t as I } from "./chunks/select-
|
|
17
|
+
import { t as A } from "./chunks/field-error-DmG_1v1a.js";
|
|
18
|
+
import { i as j, n as M, r as N, t as P } from "./chunks/checkbox-BQBWZGq8.js";
|
|
19
|
+
import { n as F, t as I } from "./chunks/select-DZPOAjdi.js";
|
|
20
20
|
import { a as L, c as R, i as z, n as B, o as V, r as H, s as U, t as W } from "./chunks/list-box-YaPiKCld.js";
|
|
21
21
|
import { n as G, r as K, t as q } from "./chunks/tag-vxSxMsqS.js";
|
|
22
22
|
import { a as J, c as Y, i as X, l as Z, n as Q, o as $, r as ee, s as te, t as ne } from "./chunks/card-CFy9gV47.js";
|
|
@@ -25,32 +25,33 @@ import { t as ie } from "./chunks/icons-a0WawN46.js";
|
|
|
25
25
|
import { n as ae, t as oe } from "./chunks/toggle-button-BVyG8F2K.js";
|
|
26
26
|
import { n as se, t as ce } from "./chunks/color-scheme-switch-DAitmhyX.js";
|
|
27
27
|
import { a as le, i as ue, n as de, o as fe, r as pe, s as me, t as he } from "./chunks/menu-DVrvuxQk.js";
|
|
28
|
-
import { t as ge } from "./chunks/combobox-
|
|
29
|
-
import { i as _e, n as ve, r as ye, t as be } from "./chunks/date-field-
|
|
30
|
-
import { n as xe, t as Se } from "./chunks/date-picker-
|
|
31
|
-
import { t as Ce } from "./chunks/drop-zone-
|
|
28
|
+
import { t as ge } from "./chunks/combobox-BeUfMvCM.js";
|
|
29
|
+
import { i as _e, n as ve, r as ye, t as be } from "./chunks/date-field-PYhwZ3so.js";
|
|
30
|
+
import { n as xe, t as Se } from "./chunks/date-picker-BKevnb0U.js";
|
|
31
|
+
import { t as Ce } from "./chunks/drop-zone-CSN3p9Ci.js";
|
|
32
32
|
import { a as we, i as Te, n as Ee, r as De, t as Oe } from "./chunks/empty-state-CnDZoO65.js";
|
|
33
|
-
import { n as ke, t as Ae } from "./chunks/file-list-
|
|
33
|
+
import { n as ke, t as Ae } from "./chunks/file-list-1YHkEsg2.js";
|
|
34
34
|
import { t as je } from "./chunks/progress-bar-BvueZ-dg.js";
|
|
35
|
-
import { t as Me } from "./chunks/file-
|
|
36
|
-
import {
|
|
37
|
-
import { t as Fe } from "./chunks/
|
|
38
|
-
import {
|
|
39
|
-
import { n as
|
|
40
|
-
import { n as
|
|
41
|
-
import { t as Ge } from "./chunks/
|
|
42
|
-
import { t as Ke } from "./chunks/
|
|
43
|
-
import {
|
|
44
|
-
import { t as Ze } from "./chunks/
|
|
45
|
-
import { t as Qe } from "./chunks/
|
|
46
|
-
import { t as $e } from "./chunks/
|
|
47
|
-
import {
|
|
48
|
-
import { i as
|
|
49
|
-
import { i as
|
|
50
|
-
import { t as mt } from "./chunks/
|
|
51
|
-
import {
|
|
35
|
+
import { t as Me } from "./chunks/file-picker-QW32GI5x.js";
|
|
36
|
+
import { t as Ne } from "./chunks/file-trigger-MkxFBZEa.js";
|
|
37
|
+
import { n as Pe, t as Fe } from "./chunks/grid-CFn_pqQX.js";
|
|
38
|
+
import { t as Ie } from "./chunks/info-banner-CFmkzyL-.js";
|
|
39
|
+
import { a as Le, i as Re, n as ze, r as Be, t as Ve } from "./chunks/layout-BwW7Scqj.js";
|
|
40
|
+
import { n as He, t as Ue } from "./chunks/tooltip-CR1uxtPd.js";
|
|
41
|
+
import { n as We, t as Ge } from "./chunks/logo-CBGOnROk.js";
|
|
42
|
+
import { t as Ke } from "./chunks/clsx-BtGY0yFD.js";
|
|
43
|
+
import { t as qe } from "./chunks/link-button-D6t-8zQQ.js";
|
|
44
|
+
import { i as Je, n as Ye, r as Xe, t as Ze } from "./chunks/radio-DmIqfqmv.js";
|
|
45
|
+
import { t as Qe } from "./chunks/search-field-BhyOQEH-.js";
|
|
46
|
+
import { t as $e } from "./chunks/skeleton-6y5HNJZp.js";
|
|
47
|
+
import { t as et } from "./chunks/stack-DKjRicm1.js";
|
|
48
|
+
import { a as tt, i as nt, n as rt, o as it, r as at, t as ot } from "./chunks/table-LI05sYfx.js";
|
|
49
|
+
import { i as st, n as ct, r as lt, t as ut } from "./chunks/tabs-ZCpVhr_r.js";
|
|
50
|
+
import { i as dt, n as ft, r as pt, t as mt } from "./chunks/textfield-CTLmlJP2.js";
|
|
51
|
+
import { t as ht } from "./chunks/time-field-DqqrquSK.js";
|
|
52
|
+
import { a as gt, i as _t, n as vt, o as yt, r as bt, t as xt } from "./chunks/toast-CZHBaKdY.js";
|
|
52
53
|
// src/version.ts
|
|
53
|
-
var
|
|
54
|
+
var St = {
|
|
54
55
|
name: "@midas-ds/components",
|
|
55
56
|
author: { name: "Migrationsverket" },
|
|
56
57
|
keywords: [
|
|
@@ -62,7 +63,7 @@ var xt = {
|
|
|
62
63
|
description: "Midas Components",
|
|
63
64
|
homepage: "https://designsystem.migrationsverket.se/",
|
|
64
65
|
license: "CC0-1.0",
|
|
65
|
-
version: "17.
|
|
66
|
+
version: "17.38.0",
|
|
66
67
|
module: "./index.js",
|
|
67
68
|
type: "module",
|
|
68
69
|
main: "./index.js",
|
|
@@ -95,4 +96,4 @@ var xt = {
|
|
|
95
96
|
"react-stately": "3.50.0"
|
|
96
97
|
}
|
|
97
98
|
}.version;
|
|
98
|
-
export { e as Accordion, t as AccordionItem, v as Badge, y as BadgeContainer, x as Breadcrumb, b as Breadcrumbs, h as Button, n as ButtonContext, g as ButtonGroup, S as Calendar, ee as Card, X as CardActionArea, J as CardActions, Q as CardBody, $ as CardContent, ne as CardHeader, te as CardImage, Y as CardLink, Z as CardTitle,
|
|
99
|
+
export { e as Accordion, t as AccordionItem, v as Badge, y as BadgeContainer, x as Breadcrumb, b as Breadcrumbs, h as Button, n as ButtonContext, g as ButtonGroup, S as Calendar, ee as Card, X as CardActionArea, J as CardActions, Q as CardBody, $ as CardContent, ne as CardHeader, te as CardImage, Y as CardLink, Z as CardTitle, ot as Cell, re as CharacterCounter, M as Checkbox, N as CheckboxButton, j as CheckboxField, P as CheckboxGroup, r as Collection, se as ColorSchemeSwitch, ce as ColorSchemeSwitchMenu, rt as Column, ge as ComboBox, ie as ContrastFilled, _e as DateField, ve as DateInput, be as DateInputDivider, xe as DatePicker, Se as DateRangePicker, ye as DateSegment, O as DialogTrigger, Ce as DropZone, Oe as EmptyState, we as EmptyStateActions, Te as EmptyStateHeading, De as EmptyStateText, Ee as EmptyStateVisual, A as FieldError, ke as FileList, Ae as FileListItem, Me as FilePicker, Ne as FileTrigger, i as Focusable, a as Form, xt as GlobalToastRegion, Pe as Grid, Fe as GridItem, Be as Header, _ as Heading, o as I18nProvider, Ie as InfoBanner, pt as Input, w as Label, Ve as Layout, f as Link, qe as LinkButton, R as ListBox, U as ListBoxButton, W as ListBoxEmptyState, B as ListBoxHeader, V as ListBoxItem, H as ListBoxLoadMoreItem, L as ListBoxPopover, z as ListBoxSection, Ge as Logo, We as LogoContext, fe as Menu, le as MenuHeader, ue as MenuItem, pe as MenuPopover, de as MenuSection, me as MenuTrigger, E as Modal, D as ModalOverlay, ze as Navbar, T as Popover, s as Pressable, je as ProgressBar, Ye as Radio, Xe as RadioButton, Je as RadioField, Ze as RadioGroup, C as RangeCalendar, d as RouterProvider, at as Row, Qe as SearchField, I as Select, F as SelectTrigger, he as Separator, Re as Sidebar, Le as SidebarLink, $e as Skeleton, p as Spinner, et as Stack, lt as Tab, ut as TabList, ct as TabPanel, nt as Table, tt as TableBody, it as TableHeader, c as TableLayout, st as Tabs, K as Tag, q as TagGroup, G as TagList, k as Text, mt as TextArea, ft as TextField, dt as TextFieldBase, ht as TimeField, vt as Toast, bt as ToastProvider, _t as ToastRegion, ae as ToggleButton, oe as ToggleButtonGroup, Ue as Tooltip, He as TooltipTrigger, St as VERSION, l as Virtualizer, Ke as clsx, gt as toastQueue, u as useLocale, m as useLocalizedStringFormatter, yt as useToastState };
|
package/package.json
CHANGED
package/radio/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as Radio, r as RadioButton, i as RadioField, t as RadioGroup } from "../chunks/radio-
|
|
1
|
+
export { n as Radio, r as RadioButton, i as RadioField, t as RadioGroup } from "../chunks/radio-DmIqfqmv.js";
|
package/search-field/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as SearchField } from "../chunks/search-field-
|
|
1
|
+
export { t as SearchField } from "../chunks/search-field-BhyOQEH-.js";
|
package/select/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Select, n as SelectTrigger } from "../chunks/select-
|
|
1
|
+
export { t as Select, n as SelectTrigger } from "../chunks/select-DZPOAjdi.js";
|
package/table/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Cell, n as Column, r as Row, i as Table, a as TableBody, o as TableHeader } from "../chunks/table-
|
|
1
|
+
export { t as Cell, n as Column, r as Row, i as Table, a as TableBody, o as TableHeader } from "../chunks/table-LI05sYfx.js";
|
package/textfield/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as Input, t as TextArea, n as TextField, i as TextFieldBase } from "../chunks/textfield-
|
|
1
|
+
export { r as Input, t as TextArea, n as TextField, i as TextFieldBase } from "../chunks/textfield-CTLmlJP2.js";
|
package/time-field/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as TimeField } from "../chunks/time-field-
|
|
1
|
+
export { t as TimeField } from "../chunks/time-field-DqqrquSK.js";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
|
-
import { forwardRef as t } from "react";
|
|
4
|
-
import { DropZone as n, FieldErrorContext as r, composeRenderProps as i } from "react-aria-components";
|
|
5
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
-
import '../assets/drop-zone.css';var o = { dropZone: "_dropZone_1g3sx_1" }, s = t(({ className: t, isInvalid: s, children: c, ...l }, u) => {
|
|
7
|
-
let d = s ? {
|
|
8
|
-
isInvalid: !0,
|
|
9
|
-
validationErrors: [],
|
|
10
|
-
validationDetails: {}
|
|
11
|
-
} : null;
|
|
12
|
-
return /* @__PURE__ */ a(n, {
|
|
13
|
-
...l,
|
|
14
|
-
ref: u,
|
|
15
|
-
"data-invalid": s || void 0,
|
|
16
|
-
className: e(o.dropZone, t),
|
|
17
|
-
children: i(c, (e) => /* @__PURE__ */ a(r.Provider, {
|
|
18
|
-
value: d,
|
|
19
|
-
children: e
|
|
20
|
-
}))
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
s.displayName = "DropZone";
|
|
24
|
-
export { s as t };
|