@midas-ds/components 16.8.6 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/accordion/Accordion.d.ts +0 -4
- package/accordion/AccordionContext.d.ts +2 -2
- package/accordion/index.d.ts +0 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Text.css +1 -1
- package/breadcrumbs/Breadcrumbs.d.ts +0 -6
- package/breadcrumbs/index.js +1 -1
- package/calendar/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/chunks/Breadcrumb-CHldDcyz.js +37 -0
- package/chunks/{CheckboxGroup-DSXCj_ho.js → CheckboxGroup-DooCBqUG.js} +2 -2
- package/chunks/ComboBox-XaJDIr5h.js +101 -0
- package/chunks/{DateField-zdUv4ooW.js → DateField-6CclHfL2.js} +2 -2
- package/chunks/{DateRangePicker-D6lnN0ox.js → DateRangePicker-BoL-sn9u.js} +54 -54
- package/chunks/{FieldError-C_3uLAGY.js → FieldError-BMTrvSof.js} +1 -1
- package/chunks/ListBoxHeader-CL9bFH22.js +63 -0
- package/chunks/ListBoxPopover-DOmhA5xx.js +20 -0
- package/chunks/{Radio-Bp-JwJid.js → Radio-CAIyBgBp.js} +2 -2
- package/chunks/{RangeCalendar-h9wkh43W.js → RangeCalendar-DIMxoHhy.js} +1 -1
- package/chunks/{SearchField-Dcs9LjKo.js → SearchField-aUMEFhOO.js} +1 -1
- package/chunks/{Select-w2o-VyrP.js → Select-CzmgPK8V.js} +2 -2
- package/chunks/Text-BuXvuoqM.js +36 -0
- package/chunks/{TextArea-Bb7H-w23.js → TextArea-B3Z4fA1e.js} +2 -2
- package/combobox/ComboBox.d.ts +1 -11
- package/combobox/index.d.ts +1 -1
- package/combobox/index.js +2 -4
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/field-error/index.js +1 -1
- package/index.d.ts +0 -1
- package/index.js +125 -129
- package/list-box/ListBoxSection.d.ts +3 -11
- package/list-box/index.d.ts +0 -1
- package/list-box/index.js +8 -8
- package/menu/Menu.d.ts +0 -7
- 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/text/Text.d.ts +0 -8
- package/text/Text.stories.d.ts +0 -2
- package/text/index.js +1 -1
- package/textfield/TextArea.stories.d.ts +4 -4
- package/textfield/index.js +1 -1
- package/tooltip/Tooltip.d.ts +1 -5
- package/tooltip/Tooltip.stories.d.ts +2 -2
- package/tooltip/index.d.ts +0 -1
- package/assets/Select2.css +0 -1
- package/chunks/Breadcrumb-W7qQSxd-.js +0 -70
- package/chunks/ComboBox-B7T13rzp.js +0 -109
- package/chunks/ListBoxLoadMoreItem-ufPaJaNS.js +0 -41
- package/chunks/ListBoxSection-C4y3K7T5.js +0 -49
- package/chunks/Select-BYz3DdXs.js +0 -576
- package/chunks/Text-Bxww8mmL.js +0 -39
- package/legacy-select/HiddenMultiSelect.d.ts +0 -48
- package/legacy-select/LegacySelect.stories.d.ts +0 -27
- package/legacy-select/MultiSelectValueTag.d.ts +0 -11
- package/legacy-select/Select.d.ts +0 -8
- package/legacy-select/SelectFieldError.d.ts +0 -8
- package/legacy-select/SelectListBox.d.ts +0 -8
- package/legacy-select/SelectTrigger.d.ts +0 -10
- package/legacy-select/index.d.ts +0 -2
- package/legacy-select/index.js +0 -4
- package/legacy-select/intl/translations.json.d.ts +0 -17
- package/legacy-select/types.d.ts +0 -179
- package/legacy-select/useMultiSelect.d.ts +0 -5
- package/legacy-select/useMultiSelectListState.d.ts +0 -3
- package/legacy-select/useMultiSelectState.d.ts +0 -3
- package/list-box/types.d.ts +0 -29
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as f, Fragment as h } from "react/jsx-runtime";
|
|
2
|
-
import { Breadcrumbs as o, Breadcrumb as m } from "react-aria-components";
|
|
3
|
-
import { c } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import { L as p } from "./Link-rqGQvFQq.js";
|
|
5
|
-
import '../assets/Breadcrumb.css';const b = "_container_zw1qy_1", B = "_separator_zw1qy_20", i = {
|
|
6
|
-
container: b,
|
|
7
|
-
separator: B
|
|
8
|
-
};
|
|
9
|
-
function y(e) {
|
|
10
|
-
if (!("items" in e) || !Array.isArray(e.items) || e.children != null && typeof e.children == "function")
|
|
11
|
-
return !1;
|
|
12
|
-
const r = e.items[0];
|
|
13
|
-
return r != null && "href" in r && "title" in r;
|
|
14
|
-
}
|
|
15
|
-
const L = ({
|
|
16
|
-
className: e,
|
|
17
|
-
...r
|
|
18
|
-
}) => {
|
|
19
|
-
if (y(r)) {
|
|
20
|
-
process.env.NODE_ENV !== "production" && console.warn(
|
|
21
|
-
"[Midas] Breadcrumbs: The `items` prop with {href, title} objects is deprecated. Use the compound <Breadcrumbs> + <Breadcrumb> API instead."
|
|
22
|
-
);
|
|
23
|
-
const { items: t, ...n } = r;
|
|
24
|
-
return /* @__PURE__ */ a(
|
|
25
|
-
o,
|
|
26
|
-
{
|
|
27
|
-
className: c(i.container, e),
|
|
28
|
-
...n,
|
|
29
|
-
children: t.map(
|
|
30
|
-
({ title: s, href: u, isDisabled: d }, l) => /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(
|
|
31
|
-
p,
|
|
32
|
-
{
|
|
33
|
-
href: u,
|
|
34
|
-
isDisabled: d,
|
|
35
|
-
children: s
|
|
36
|
-
}
|
|
37
|
-
) }, s.toLocaleLowerCase() + l)
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
return /* @__PURE__ */ a(
|
|
43
|
-
o,
|
|
44
|
-
{
|
|
45
|
-
className: c(i.container, e),
|
|
46
|
-
...r
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}, j = ({
|
|
50
|
-
className: e,
|
|
51
|
-
children: r,
|
|
52
|
-
...t
|
|
53
|
-
}) => /* @__PURE__ */ a(
|
|
54
|
-
m,
|
|
55
|
-
{
|
|
56
|
-
className: c(e),
|
|
57
|
-
...t,
|
|
58
|
-
children: (n) => {
|
|
59
|
-
const s = !n.isCurrent;
|
|
60
|
-
return /* @__PURE__ */ f(h, { children: [
|
|
61
|
-
typeof r == "function" ? r(n) : r,
|
|
62
|
-
s ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: i.separator, children: "/" }) : null
|
|
63
|
-
] });
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
export {
|
|
68
|
-
j as B,
|
|
69
|
-
L as a
|
|
70
|
-
};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import y from "react";
|
|
4
|
-
import { ComboBox as B, Input as F, Button as w, Collection as C } from "react-aria-components";
|
|
5
|
-
import { c as s } from "./clsx-AexbMWKp.js";
|
|
6
|
-
import { a as S, L as v } from "./Label-6GZmmff9.js";
|
|
7
|
-
import { T as u } from "./Text-Bxww8mmL.js";
|
|
8
|
-
import { F as f } from "./FieldError-C_3uLAGY.js";
|
|
9
|
-
import { L as R } from "./ListBox-D5BBeZWL.js";
|
|
10
|
-
import { b as N, a as g, c as E } from "./ListBoxSection-C4y3K7T5.js";
|
|
11
|
-
import { C as I } from "./chevron-down-BBFYYzZq.js";
|
|
12
|
-
import { u as T } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
13
|
-
import '../assets/ComboBox.css';const j = "_combobox_1m9te_1", O = "_inputField_1m9te_6", U = "_medium_1m9te_27", z = "_wrap_1m9te_79", D = "_button_1m9te_85", M = "_icon_1m9te_121", V = "_emptyState_1m9te_127", o = {
|
|
14
|
-
combobox: j,
|
|
15
|
-
inputField: O,
|
|
16
|
-
medium: U,
|
|
17
|
-
wrap: z,
|
|
18
|
-
button: D,
|
|
19
|
-
icon: M,
|
|
20
|
-
emptyState: V
|
|
21
|
-
}, W = { showList: "Show list", noResultsFound: "No results found" }, $ = { showList: "Visa lista", noResultsFound: "Inga träffar" }, k = {
|
|
22
|
-
en: W,
|
|
23
|
-
sv: $
|
|
24
|
-
};
|
|
25
|
-
function ot({
|
|
26
|
-
label: e,
|
|
27
|
-
description: i,
|
|
28
|
-
errorMessage: r,
|
|
29
|
-
children: p,
|
|
30
|
-
items: h,
|
|
31
|
-
className: _,
|
|
32
|
-
errorPosition: a = "top",
|
|
33
|
-
size: m = "large",
|
|
34
|
-
popover: b,
|
|
35
|
-
...n
|
|
36
|
-
}) {
|
|
37
|
-
const c = y.useRef(null), d = T(k), x = (L) => {
|
|
38
|
-
L.currentTarget.value && c.current?.select();
|
|
39
|
-
};
|
|
40
|
-
return /* @__PURE__ */ l(
|
|
41
|
-
B,
|
|
42
|
-
{
|
|
43
|
-
className: s(o.combobox, _),
|
|
44
|
-
...n,
|
|
45
|
-
"data-readonly": n.isReadOnly || void 0,
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ t(S, { popover: b, children: e && /* @__PURE__ */ t(v, { children: e }) }),
|
|
48
|
-
i && /* @__PURE__ */ t(u, { slot: "description", children: i }),
|
|
49
|
-
a === "top" && /* @__PURE__ */ t(f, { "data-testid": "fieldError", children: r }),
|
|
50
|
-
/* @__PURE__ */ l("div", { className: o.wrap, children: [
|
|
51
|
-
/* @__PURE__ */ t(
|
|
52
|
-
F,
|
|
53
|
-
{
|
|
54
|
-
className: s(o.inputField, {
|
|
55
|
-
[o.medium]: m === "medium"
|
|
56
|
-
}),
|
|
57
|
-
"data-readonly": n.isReadOnly || void 0,
|
|
58
|
-
onMouseUp: x,
|
|
59
|
-
ref: c
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
/* @__PURE__ */ t(
|
|
63
|
-
w,
|
|
64
|
-
{
|
|
65
|
-
className: s(o.button, {
|
|
66
|
-
[o.medium]: m === "medium"
|
|
67
|
-
}),
|
|
68
|
-
"aria-label": d.format("showList"),
|
|
69
|
-
children: /* @__PURE__ */ t(
|
|
70
|
-
"div",
|
|
71
|
-
{
|
|
72
|
-
className: o.icon,
|
|
73
|
-
"aria-hidden": "true",
|
|
74
|
-
children: /* @__PURE__ */ t(
|
|
75
|
-
I,
|
|
76
|
-
{
|
|
77
|
-
size: 20,
|
|
78
|
-
"aria-hidden": !0
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
] }),
|
|
86
|
-
a === "bottom" && /* @__PURE__ */ t(f, { "data-testid": "fieldError", children: r }),
|
|
87
|
-
/* @__PURE__ */ t(N, { offset: 4, children: /* @__PURE__ */ t(
|
|
88
|
-
R,
|
|
89
|
-
{
|
|
90
|
-
items: h,
|
|
91
|
-
renderEmptyState: () => /* @__PURE__ */ t(u, { className: o.emptyState, children: d.format("noResultsFound") }),
|
|
92
|
-
children: p
|
|
93
|
-
}
|
|
94
|
-
) })
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
function q(e) {
|
|
100
|
-
return /* @__PURE__ */ t(g, { ...e });
|
|
101
|
-
}
|
|
102
|
-
function et(e) {
|
|
103
|
-
return /* @__PURE__ */ t(E, { ...e, children: /* @__PURE__ */ t(C, { items: e.children, children: (i) => /* @__PURE__ */ t(q, { children: i.name }, i.id) }) });
|
|
104
|
-
}
|
|
105
|
-
export {
|
|
106
|
-
ot as C,
|
|
107
|
-
q as a,
|
|
108
|
-
et as b
|
|
109
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
|
2
|
-
import { c as e } from "./clsx-AexbMWKp.js";
|
|
3
|
-
import { s as a } from "./ListBox-D5BBeZWL.js";
|
|
4
|
-
import { ListBoxLoadMoreItem as l } from "react-aria-components";
|
|
5
|
-
import { S as c } from "./Spinner-CfKMn18u.js";
|
|
6
|
-
import { u as L } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
7
|
-
const S = ({ className: t, children: s, ...r }) => /* @__PURE__ */ o(
|
|
8
|
-
"button",
|
|
9
|
-
{
|
|
10
|
-
type: "button",
|
|
11
|
-
className: e(a.listBoxItem, a.listBoxButton, t),
|
|
12
|
-
...r,
|
|
13
|
-
children: s
|
|
14
|
-
}
|
|
15
|
-
), x = { "loading...": "Loading..." }, p = { "loading...": "Laddar..." }, u = {
|
|
16
|
-
en: x,
|
|
17
|
-
sv: p
|
|
18
|
-
}, b = ({
|
|
19
|
-
className: t,
|
|
20
|
-
children: s,
|
|
21
|
-
isLoading: r,
|
|
22
|
-
...i
|
|
23
|
-
}) => {
|
|
24
|
-
const n = L(u);
|
|
25
|
-
return /* @__PURE__ */ o(
|
|
26
|
-
l,
|
|
27
|
-
{
|
|
28
|
-
className: e(a.listBoxLoadMoreItem, t),
|
|
29
|
-
isLoading: r,
|
|
30
|
-
...i,
|
|
31
|
-
children: s || /* @__PURE__ */ m(d, { children: [
|
|
32
|
-
/* @__PURE__ */ o(c, { small: !0 }),
|
|
33
|
-
/* @__PURE__ */ o("span", { "aria-hidden": !0, children: n.format("loading...") })
|
|
34
|
-
] })
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
S as L,
|
|
40
|
-
b as a
|
|
41
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { ListBoxItem as m, Popover as n, Header as B, ListBoxSection as l } from "react-aria-components";
|
|
3
|
-
import { c as a } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import { s as i } from "./ListBox-D5BBeZWL.js";
|
|
5
|
-
const I = ({
|
|
6
|
-
children: t,
|
|
7
|
-
className: o,
|
|
8
|
-
textValue: s,
|
|
9
|
-
...r
|
|
10
|
-
}) => /* @__PURE__ */ e(
|
|
11
|
-
m,
|
|
12
|
-
{
|
|
13
|
-
className: a(i.listBoxItem, o),
|
|
14
|
-
textValue: s || (typeof t == "string" ? t : void 0),
|
|
15
|
-
...r,
|
|
16
|
-
children: (x) => /* @__PURE__ */ e("div", { className: i.textContent, children: typeof t == "function" ? t(x) : t })
|
|
17
|
-
}
|
|
18
|
-
), N = ({
|
|
19
|
-
className: t,
|
|
20
|
-
children: o,
|
|
21
|
-
...s
|
|
22
|
-
}) => /* @__PURE__ */ e(
|
|
23
|
-
n,
|
|
24
|
-
{
|
|
25
|
-
className: a(t, i.listBoxPopover),
|
|
26
|
-
offset: 0,
|
|
27
|
-
...s,
|
|
28
|
-
children: o
|
|
29
|
-
}
|
|
30
|
-
), p = ({ className: t, ...o }) => /* @__PURE__ */ e(
|
|
31
|
-
B,
|
|
32
|
-
{
|
|
33
|
-
className: a(i.listBoxSectionHeading, t),
|
|
34
|
-
...o
|
|
35
|
-
}
|
|
36
|
-
), S = ({
|
|
37
|
-
children: t,
|
|
38
|
-
name: o,
|
|
39
|
-
...s
|
|
40
|
-
}) => /* @__PURE__ */ c(l, { ...s, children: [
|
|
41
|
-
o && /* @__PURE__ */ e(p, { children: o }),
|
|
42
|
-
t
|
|
43
|
-
] });
|
|
44
|
-
export {
|
|
45
|
-
p as L,
|
|
46
|
-
I as a,
|
|
47
|
-
N as b,
|
|
48
|
-
S as c
|
|
49
|
-
};
|