@altinn/altinn-components 0.15.3 → 0.15.5
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/README.md +38 -1
- package/dist/altinn-ds-overrides.css +1 -0
- package/dist/assets/ButtonBase.css +1 -1
- package/dist/assets/DialogSelect.css +1 -1
- package/dist/assets/DrawerBase.css +1 -1
- package/dist/assets/DrawerOrDropdown.css +1 -1
- package/dist/assets/DropdownBase.css +1 -1
- package/dist/assets/GlobalMenuBase.css +1 -1
- package/dist/assets/Header.css +1 -1
- package/dist/assets/HeaderSearch.css +1 -1
- package/dist/assets/ListItemBase.css +1 -1
- package/dist/assets/ListItemLabel.css +1 -1
- package/dist/assets/ListItemSelect.css +1 -1
- package/dist/assets/MenuSearch.css +1 -1
- package/dist/assets/SearchbarBase.css +1 -1
- package/dist/assets/ToolbarFilterBase.css +1 -1
- package/dist/components/Button/ButtonBase.js +13 -14
- package/dist/components/Byline/Byline.js +1 -1
- package/dist/components/Dialog/DialogHeading.js +1 -1
- package/dist/components/Dialog/DialogListItem.js +25 -23
- package/dist/components/Dialog/DialogSelect.js +10 -10
- package/dist/components/Dropdown/DrawerBase.js +3 -3
- package/dist/components/Dropdown/DrawerOrDropdown.js +1 -1
- package/dist/components/Dropdown/DropdownBase.js +14 -14
- package/dist/components/GlobalMenu/GlobalMenuBase.js +6 -6
- package/dist/components/Header/Header.js +18 -18
- package/dist/components/Header/HeaderMenu.js +5 -5
- package/dist/components/Header/HeaderSearch.js +10 -6
- package/dist/components/Icon/Icon.js +8 -8
- package/dist/components/List/ListItem.js +83 -68
- package/dist/components/List/ListItemBase.js +61 -56
- package/dist/components/List/ListItemLabel.js +6 -6
- package/dist/components/List/ListItemLink.js +5 -7
- package/dist/components/List/ListItemSelect.js +7 -7
- package/dist/components/Menu/MenuBase.js +6 -12
- package/dist/components/Menu/MenuItemBase.js +41 -48
- package/dist/components/Menu/MenuItems.js +26 -26
- package/dist/components/Menu/MenuSearch.js +11 -11
- package/dist/components/Meta/MetaItem.js +1 -1
- package/dist/components/Meta/MetaTimestamp.js +1 -1
- package/dist/components/Search/SearchField.js +15 -16
- package/dist/components/Search/SearchbarBase.js +10 -15
- package/dist/components/Skeleton/Skeleton.js +15 -5
- package/dist/components/Toolbar/ToolbarFilterBase.js +10 -5
- package/dist/components/Typography/Heading.js +1 -1
- package/dist/types/lib/components/Dialog/DialogListItem.stories.d.ts +7 -1
- package/dist/types/lib/components/Header/HeaderMenu.d.ts +1 -1
- package/dist/types/lib/components/List/ListItemBase.d.ts +2 -1
- package/dist/types/lib/components/List/ListItemLink.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuBase.d.ts +2 -2
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +1 -1
- package/package.json +3 -2
|
@@ -1,89 +1,104 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ListItemBase as
|
|
1
|
+
import { jsxs as C, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ListItemBase as p } from "./ListItemBase.js";
|
|
3
3
|
import { ListItemHeader as b } from "./ListItemHeader.js";
|
|
4
|
-
const
|
|
5
|
-
className:
|
|
6
|
-
variant:
|
|
7
|
-
color:
|
|
8
|
-
theme:
|
|
9
|
-
shadow:
|
|
10
|
-
loading:
|
|
11
|
-
collapsible:
|
|
12
|
-
expanded:
|
|
13
|
-
size:
|
|
14
|
-
icon:
|
|
15
|
-
avatar:
|
|
16
|
-
avatarGroup:
|
|
17
|
-
title:
|
|
4
|
+
const J = ({
|
|
5
|
+
className: I,
|
|
6
|
+
variant: L = "solid",
|
|
7
|
+
color: f,
|
|
8
|
+
theme: u = "default",
|
|
9
|
+
shadow: k = "xs",
|
|
10
|
+
loading: n,
|
|
11
|
+
collapsible: q,
|
|
12
|
+
expanded: i,
|
|
13
|
+
size: h = "sm",
|
|
14
|
+
icon: v,
|
|
15
|
+
avatar: j,
|
|
16
|
+
avatarGroup: o,
|
|
17
|
+
title: r,
|
|
18
18
|
description: s,
|
|
19
19
|
badge: x,
|
|
20
|
-
linkIcon:
|
|
21
|
-
label:
|
|
20
|
+
linkIcon: w = "chevron-right",
|
|
21
|
+
label: t,
|
|
22
22
|
select: y,
|
|
23
|
-
controls:
|
|
24
|
-
children:
|
|
25
|
-
...
|
|
23
|
+
controls: c,
|
|
24
|
+
children: A,
|
|
25
|
+
...m
|
|
26
26
|
}) => {
|
|
27
|
-
const B =
|
|
28
|
-
return
|
|
29
|
-
|
|
27
|
+
const B = q ? i ? "chevron-up" : "chevron-down" : w, H = typeof t == "function" ? t() : t;
|
|
28
|
+
return i ? /* @__PURE__ */ C(
|
|
29
|
+
p,
|
|
30
30
|
{
|
|
31
31
|
interactive: !1,
|
|
32
|
-
variant:
|
|
33
|
-
color:
|
|
34
|
-
theme:
|
|
35
|
-
shadow:
|
|
36
|
-
expanded:
|
|
32
|
+
variant: L,
|
|
33
|
+
color: f,
|
|
34
|
+
theme: u,
|
|
35
|
+
shadow: k,
|
|
36
|
+
expanded: i,
|
|
37
|
+
title: r,
|
|
38
|
+
loading: n,
|
|
37
39
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
p,
|
|
40
42
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
43
|
+
theme: "transparent",
|
|
44
|
+
interactive: !c,
|
|
45
|
+
size: h,
|
|
46
|
+
color: f,
|
|
47
|
+
loading: n,
|
|
48
|
+
title: r,
|
|
49
|
+
...m,
|
|
50
|
+
children: /* @__PURE__ */ e(
|
|
51
|
+
b,
|
|
52
|
+
{
|
|
53
|
+
className: I,
|
|
54
|
+
loading: n,
|
|
55
|
+
select: y,
|
|
56
|
+
size: h,
|
|
57
|
+
title: r,
|
|
58
|
+
description: s,
|
|
59
|
+
icon: v,
|
|
60
|
+
avatar: j,
|
|
61
|
+
avatarGroup: o,
|
|
62
|
+
badge: x,
|
|
63
|
+
linkIcon: B,
|
|
64
|
+
controls: c,
|
|
65
|
+
...m,
|
|
66
|
+
children: H
|
|
67
|
+
}
|
|
68
|
+
)
|
|
55
69
|
}
|
|
56
|
-
)
|
|
57
|
-
|
|
70
|
+
),
|
|
71
|
+
A
|
|
58
72
|
]
|
|
59
73
|
}
|
|
60
|
-
) : /* @__PURE__ */
|
|
61
|
-
|
|
74
|
+
) : /* @__PURE__ */ e(
|
|
75
|
+
p,
|
|
62
76
|
{
|
|
63
|
-
interactive: !
|
|
64
|
-
variant:
|
|
65
|
-
color:
|
|
66
|
-
theme:
|
|
67
|
-
shadow:
|
|
68
|
-
expanded:
|
|
69
|
-
loading:
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
interactive: !c,
|
|
78
|
+
variant: L,
|
|
79
|
+
color: f,
|
|
80
|
+
theme: u,
|
|
81
|
+
shadow: k,
|
|
82
|
+
expanded: i,
|
|
83
|
+
loading: n,
|
|
84
|
+
title: r,
|
|
85
|
+
...m,
|
|
86
|
+
children: /* @__PURE__ */ e(
|
|
72
87
|
b,
|
|
73
88
|
{
|
|
74
|
-
className:
|
|
75
|
-
loading:
|
|
89
|
+
className: I,
|
|
90
|
+
loading: n,
|
|
76
91
|
select: y,
|
|
77
|
-
size:
|
|
78
|
-
title:
|
|
92
|
+
size: h,
|
|
93
|
+
title: r,
|
|
79
94
|
description: s,
|
|
80
|
-
icon:
|
|
81
|
-
avatar:
|
|
82
|
-
avatarGroup:
|
|
95
|
+
icon: v,
|
|
96
|
+
avatar: j,
|
|
97
|
+
avatarGroup: o,
|
|
83
98
|
badge: x,
|
|
84
99
|
linkIcon: B,
|
|
85
|
-
controls:
|
|
86
|
-
...
|
|
100
|
+
controls: c,
|
|
101
|
+
...m,
|
|
87
102
|
children: H
|
|
88
103
|
}
|
|
89
104
|
)
|
|
@@ -91,5 +106,5 @@ const F = ({
|
|
|
91
106
|
);
|
|
92
107
|
};
|
|
93
108
|
export {
|
|
94
|
-
|
|
109
|
+
J as ListItem
|
|
95
110
|
};
|
|
@@ -1,75 +1,80 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/ListItemBase.css';const
|
|
4
|
-
item:
|
|
5
|
-
interactive:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { c as x } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/ListItemBase.css';const B = "_item_bqpwx_1", E = "_interactive_bqpwx_53", I = "_interactiveSelected_bqpwx_95", L = "_interactiveHidden_bqpwx_99", t = {
|
|
4
|
+
item: B,
|
|
5
|
+
interactive: E,
|
|
6
|
+
interactiveSelected: I,
|
|
7
|
+
interactiveHidden: L
|
|
8
|
+
}, F = ({
|
|
9
|
+
title: S,
|
|
10
|
+
interactive: f = !0,
|
|
11
|
+
as: q,
|
|
12
|
+
href: u,
|
|
10
13
|
onClick: a,
|
|
11
|
-
onKeyPress:
|
|
12
|
-
tabIndex:
|
|
13
|
-
size:
|
|
14
|
-
variant:
|
|
15
|
-
color:
|
|
16
|
-
theme:
|
|
17
|
-
shadow:
|
|
14
|
+
onKeyPress: e,
|
|
15
|
+
tabIndex: H,
|
|
16
|
+
size: c,
|
|
17
|
+
variant: d,
|
|
18
|
+
color: s,
|
|
19
|
+
theme: i,
|
|
20
|
+
shadow: h,
|
|
18
21
|
loading: n,
|
|
19
|
-
disabled:
|
|
20
|
-
hidden:
|
|
21
|
-
active:
|
|
22
|
-
selected:
|
|
23
|
-
|
|
24
|
-
className: v,
|
|
22
|
+
disabled: r,
|
|
23
|
+
hidden: o = !1,
|
|
24
|
+
active: v = !1,
|
|
25
|
+
selected: m,
|
|
26
|
+
className: p,
|
|
25
27
|
children: _
|
|
26
28
|
}) => {
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const l = i === "transparent" ? "none" : h;
|
|
30
|
+
if (f) {
|
|
31
|
+
const z = x(
|
|
32
|
+
t.item,
|
|
33
|
+
t.interactive,
|
|
34
|
+
p,
|
|
35
|
+
m && t.interactiveSelected,
|
|
36
|
+
o && t.interactiveHidden
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ w(
|
|
39
|
+
q || "button",
|
|
32
40
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"data-
|
|
36
|
-
"data-
|
|
37
|
-
"data-
|
|
38
|
-
"data-
|
|
39
|
-
"data-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
"aria-label": S,
|
|
42
|
+
className: z,
|
|
43
|
+
"data-variant": d,
|
|
44
|
+
"data-color": s,
|
|
45
|
+
"data-theme": i,
|
|
46
|
+
"data-size": c,
|
|
47
|
+
"data-shadow": l,
|
|
48
|
+
"data-active": v,
|
|
49
|
+
href: u,
|
|
50
|
+
onKeyPress: (b) => {
|
|
51
|
+
b.key === "Enter" && (a == null || a()), e == null || e(b);
|
|
43
52
|
},
|
|
44
53
|
onClick: a,
|
|
45
|
-
tabIndex:
|
|
46
|
-
"aria-
|
|
47
|
-
|
|
48
|
-
"aria-selected": p,
|
|
49
|
-
"aria-expanded": l,
|
|
54
|
+
tabIndex: H,
|
|
55
|
+
"aria-disabled": r || n,
|
|
56
|
+
disabled: r || n,
|
|
50
57
|
children: _
|
|
51
58
|
}
|
|
52
59
|
);
|
|
53
60
|
}
|
|
54
|
-
const
|
|
55
|
-
return /* @__PURE__ */
|
|
61
|
+
const j = x(t.item, p, m && t.interactiveSelected);
|
|
62
|
+
return /* @__PURE__ */ w(
|
|
56
63
|
"article",
|
|
57
64
|
{
|
|
58
|
-
className:
|
|
59
|
-
"data-variant":
|
|
60
|
-
"data-color":
|
|
61
|
-
"data-theme":
|
|
62
|
-
"data-size":
|
|
63
|
-
"data-shadow":
|
|
64
|
-
"data-active":
|
|
65
|
-
"aria-hidden":
|
|
66
|
-
"aria-disabled":
|
|
67
|
-
"aria-selected": p,
|
|
68
|
-
"aria-expanded": l,
|
|
65
|
+
className: j,
|
|
66
|
+
"data-variant": d,
|
|
67
|
+
"data-color": s,
|
|
68
|
+
"data-theme": i,
|
|
69
|
+
"data-size": c,
|
|
70
|
+
"data-shadow": l,
|
|
71
|
+
"data-active": v,
|
|
72
|
+
"aria-hidden": o,
|
|
73
|
+
"aria-disabled": r || n,
|
|
69
74
|
children: _
|
|
70
75
|
}
|
|
71
76
|
);
|
|
72
77
|
};
|
|
73
78
|
export {
|
|
74
|
-
|
|
79
|
+
F as ListItemBase
|
|
75
80
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as r } from "react/jsx-runtime";
|
|
2
2
|
import { Skeleton as c } from "../Skeleton/Skeleton.js";
|
|
3
|
-
import '../../assets/ListItemLabel.css';const
|
|
4
|
-
label:
|
|
5
|
-
title:
|
|
6
|
-
description:
|
|
7
|
-
}, b = ({ loading: s = !1, size: t = "sm", title: n, description: a, children: i }) => /* @__PURE__ */ e("span", { className: l.label, "data-size": t, children: i || /* @__PURE__ */ r
|
|
3
|
+
import '../../assets/ListItemLabel.css';const m = "_label_lkhmo_3", d = "_title_lkhmo_44", h = "_description_lkhmo_52", l = {
|
|
4
|
+
label: m,
|
|
5
|
+
title: d,
|
|
6
|
+
description: h
|
|
7
|
+
}, b = ({ loading: s = !1, size: t = "sm", title: n, description: a, children: i }) => /* @__PURE__ */ e("span", { className: l.label, "data-size": t, children: i || /* @__PURE__ */ o(r, { children: [
|
|
8
8
|
/* @__PURE__ */ e("h2", { className: l.title, "data-size": t, children: /* @__PURE__ */ e(c, { loading: s, children: n }) }),
|
|
9
9
|
" ",
|
|
10
10
|
a && /* @__PURE__ */ e("p", { className: l.description, "data-size": t, children: /* @__PURE__ */ e(c, { loading: s, children: a }) })
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/ListItemLink.css';const
|
|
4
|
-
link:
|
|
5
|
-
interactive:
|
|
6
|
-
},
|
|
3
|
+
import '../../assets/ListItemLink.css';const l = "_link_g93r9_1", u = "_interactive_g93r9_22", i = {
|
|
4
|
+
link: l,
|
|
5
|
+
interactive: u
|
|
6
|
+
}, k = ({
|
|
7
7
|
interactive: o = !1,
|
|
8
8
|
size: e,
|
|
9
9
|
as: _,
|
|
@@ -13,7 +13,6 @@ import '../../assets/ListItemLink.css';const u = "_link_g93r9_1", x = "_interact
|
|
|
13
13
|
href: f,
|
|
14
14
|
onClick: t,
|
|
15
15
|
onKeyPress: a,
|
|
16
|
-
tabIndex: l,
|
|
17
16
|
className: n,
|
|
18
17
|
children: r
|
|
19
18
|
}) => o ? /* @__PURE__ */ m(
|
|
@@ -25,7 +24,6 @@ import '../../assets/ListItemLink.css';const u = "_link_g93r9_1", x = "_interact
|
|
|
25
24
|
s.key === "Enter" && (t == null || t()), a == null || a(s);
|
|
26
25
|
},
|
|
27
26
|
onClick: t,
|
|
28
|
-
tabIndex: l,
|
|
29
27
|
"aria-disabled": d || p,
|
|
30
28
|
"aria-selected": v,
|
|
31
29
|
"data-size": e,
|
|
@@ -33,5 +31,5 @@ import '../../assets/ListItemLink.css';const u = "_link_g93r9_1", x = "_interact
|
|
|
33
31
|
}
|
|
34
32
|
) : /* @__PURE__ */ m("div", { className: c(i.link, n), "data-size": e, children: r });
|
|
35
33
|
export {
|
|
36
|
-
|
|
34
|
+
k as ListItemLink
|
|
37
35
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { c as l } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import "../Search/AutocompleteBase.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
7
|
import "../Icon/SvgIcon.js";
|
|
8
|
-
import { CheckboxIcon as
|
|
9
|
-
import '../../assets/ListItemSelect.css';const a = "
|
|
8
|
+
import { CheckboxIcon as n } from "../Icon/CheckboxIcon.js";
|
|
9
|
+
import '../../assets/ListItemSelect.css';const a = "_label_1rc60_1", m = "_input_1rc60_15", p = "_icon_1rc60_19", t = {
|
|
10
10
|
label: a,
|
|
11
11
|
input: m,
|
|
12
12
|
icon: p
|
|
13
|
-
},
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
13
|
+
}, y = ({ size: e, checked: o = !1, onChange: i, className: r }) => /* @__PURE__ */ s("label", { className: l(t.label, r), "data-size": e, children: [
|
|
14
|
+
/* @__PURE__ */ c("input", { type: "checkbox", checked: o, onChange: i, className: t.input }),
|
|
15
|
+
/* @__PURE__ */ c(n, { hover: !0, checked: o, className: t.icon })
|
|
16
16
|
] });
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
y as ListItemSelect
|
|
19
19
|
};
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { c as a } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/MenuBase.css';const i = "_menu_njba2_1",
|
|
3
|
+
import '../../assets/MenuBase.css';const i = "_menu_njba2_1", r = "_list_njba2_13", u = "_item_njba2_19", c = {
|
|
4
4
|
menu: i,
|
|
5
|
-
list:
|
|
5
|
+
list: r,
|
|
6
6
|
item: u
|
|
7
|
-
},
|
|
8
|
-
as: n = "li",
|
|
9
|
-
role: t = "presentation",
|
|
10
|
-
expanded: e,
|
|
11
|
-
className: o,
|
|
12
|
-
children: s
|
|
13
|
-
}) => /* @__PURE__ */ m(n, { className: a(r.item, o), role: t, "aria-expanded": e, children: s });
|
|
7
|
+
}, C = ({ as: t = "nav", color: n, theme: e, className: o, children: s }) => /* @__PURE__ */ m(t, { className: a(c.menu, o), "data-color": n, "data-theme": e, children: s }), j = ({ as: t = "ul", role: n = "group", className: e, children: o }) => /* @__PURE__ */ m(t, { className: a(c.list, e), role: n, children: o }), b = ({ as: t = "li", role: n = "presentation", className: e, children: o }) => /* @__PURE__ */ m(t, { className: a(c.item, e), role: n, children: o });
|
|
14
8
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
C as MenuBase,
|
|
10
|
+
j as MenuList,
|
|
11
|
+
b as MenuListItem
|
|
18
12
|
};
|
|
@@ -1,68 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Icon as
|
|
1
|
+
import { jsxs as e, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Icon as T } from "../Icon/Icon.js";
|
|
4
4
|
import "../Icon/SvgIcon.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { Badge as
|
|
6
|
+
import { Badge as j } from "../Badge/Badge.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import "../Search/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import '../../assets/MenuItemBase.css';const
|
|
11
|
-
item:
|
|
12
|
-
content:
|
|
13
|
-
action:
|
|
14
|
-
linkText:
|
|
15
|
-
linkIcon:
|
|
16
|
-
},
|
|
17
|
-
as:
|
|
18
|
-
color:
|
|
19
|
-
theme:
|
|
20
|
-
size:
|
|
21
|
-
className:
|
|
22
|
-
href:
|
|
23
|
-
onClick:
|
|
24
|
-
onKeyPress:
|
|
25
|
-
tabIndex:
|
|
10
|
+
import '../../assets/MenuItemBase.css';const v = "_item_18cbi_1", B = "_content_18cbi_45", k = "_action_18cbi_53", z = "_linkText_18cbi_60", E = "_linkIcon_18cbi_65", n = {
|
|
11
|
+
item: v,
|
|
12
|
+
content: B,
|
|
13
|
+
action: k,
|
|
14
|
+
linkText: z,
|
|
15
|
+
linkIcon: E
|
|
16
|
+
}, L = ({
|
|
17
|
+
as: _,
|
|
18
|
+
color: p,
|
|
19
|
+
theme: l,
|
|
20
|
+
size: h,
|
|
21
|
+
className: x,
|
|
22
|
+
href: d,
|
|
23
|
+
onClick: c,
|
|
24
|
+
onKeyPress: i,
|
|
25
|
+
tabIndex: f = 0,
|
|
26
26
|
hidden: I,
|
|
27
|
-
disabled:
|
|
28
|
-
|
|
29
|
-
selected: u = !1,
|
|
30
|
-
expanded: v = !1,
|
|
31
|
-
linkIcon: i,
|
|
27
|
+
disabled: a = !1,
|
|
28
|
+
linkIcon: o,
|
|
32
29
|
linkText: s,
|
|
33
30
|
badge: t,
|
|
34
|
-
children:
|
|
35
|
-
}) => /* @__PURE__ */
|
|
36
|
-
|
|
31
|
+
children: N
|
|
32
|
+
}) => /* @__PURE__ */ e(
|
|
33
|
+
_ || "a",
|
|
37
34
|
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"data-
|
|
42
|
-
"data-
|
|
43
|
-
"data-theme": p,
|
|
44
|
-
"data-active": N,
|
|
35
|
+
tabIndex: a ? "-1" : f ?? 0,
|
|
36
|
+
className: u(n.item, x),
|
|
37
|
+
"data-size": h,
|
|
38
|
+
"data-color": p,
|
|
39
|
+
"data-theme": l,
|
|
45
40
|
"aria-hidden": I,
|
|
46
|
-
"aria-
|
|
47
|
-
|
|
48
|
-
"aria-selected": u,
|
|
49
|
-
href: x,
|
|
41
|
+
"aria-disabled": a,
|
|
42
|
+
href: d,
|
|
50
43
|
onKeyPress: (r) => {
|
|
51
|
-
r.key === "Enter" && (
|
|
44
|
+
r.key === "Enter" && (c == null || c()), i == null || i(r);
|
|
52
45
|
},
|
|
53
|
-
onClick:
|
|
46
|
+
onClick: c,
|
|
54
47
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
57
|
-
t && /* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ e("div", { className: n.content, children: [
|
|
49
|
+
N,
|
|
50
|
+
t && /* @__PURE__ */ m(j, { ...t, theme: (t == null ? void 0 : t.theme) || "surface" })
|
|
58
51
|
] }),
|
|
59
|
-
|
|
60
|
-
s && /* @__PURE__ */
|
|
61
|
-
|
|
52
|
+
o && /* @__PURE__ */ e("div", { className: n.action, children: [
|
|
53
|
+
s && /* @__PURE__ */ m("span", { className: n.linkText, children: s }),
|
|
54
|
+
o && /* @__PURE__ */ m(T, { name: o, className: n.linkIcon })
|
|
62
55
|
] })
|
|
63
56
|
]
|
|
64
57
|
}
|
|
65
58
|
);
|
|
66
59
|
export {
|
|
67
|
-
|
|
60
|
+
L as MenuItemBase
|
|
68
61
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as a, jsx as m, Fragment as k } from "react/jsx-runtime";
|
|
3
3
|
import { Fragment as B } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
@@ -12,64 +12,64 @@ import { MenuList as S, MenuListItem as c } from "./MenuBase.js";
|
|
|
12
12
|
import "../Search/AutocompleteBase.js";
|
|
13
13
|
import "../Snackbar/useSnackbar.js";
|
|
14
14
|
const _ = ({
|
|
15
|
-
level:
|
|
15
|
+
level: h = 0,
|
|
16
16
|
expanded: y,
|
|
17
|
-
search:
|
|
17
|
+
search: r,
|
|
18
18
|
items: F,
|
|
19
19
|
groups: f = {},
|
|
20
20
|
defaultItemSize: x,
|
|
21
21
|
defaultItemColor: M,
|
|
22
|
-
defaultItemTheme:
|
|
23
|
-
defaultIconTheme:
|
|
22
|
+
defaultItemTheme: I,
|
|
23
|
+
defaultIconTheme: v
|
|
24
24
|
}) => {
|
|
25
|
-
const { menu:
|
|
25
|
+
const { menu: b } = E({
|
|
26
26
|
items: F,
|
|
27
27
|
groups: f,
|
|
28
28
|
groupByKey: "groupId",
|
|
29
29
|
keyboardEvents: !1
|
|
30
30
|
});
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const t = (n == null ? void 0 : n.props) || {}, { title:
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
n == null ? void 0 : n.items.filter((
|
|
39
|
-
var
|
|
40
|
-
return !((
|
|
41
|
-
}).map((
|
|
42
|
-
const { active: L } =
|
|
43
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ a(S, { expanded: y, children: [
|
|
32
|
+
r && /* @__PURE__ */ m(H, { ...r }),
|
|
33
|
+
b.map((n, l) => {
|
|
34
|
+
const t = (n == null ? void 0 : n.props) || {}, { title: o, divider: j = !0 } = t, z = b[l + 1];
|
|
35
|
+
return /* @__PURE__ */ a(B, { children: [
|
|
36
|
+
(h > 0 || l) && j ? /* @__PURE__ */ m(c, { role: "separator" }) : "",
|
|
37
|
+
o && /* @__PURE__ */ m(c, { children: /* @__PURE__ */ m(K, { title: o }) }),
|
|
38
|
+
n == null ? void 0 : n.items.filter((i) => {
|
|
39
|
+
var d;
|
|
40
|
+
return !((d = i.props) != null && d.hidden);
|
|
41
|
+
}).map((i, d) => {
|
|
42
|
+
const { active: L } = i, { groupId: $, ...e } = i.props || {}, { expanded: s } = e, T = n == null ? void 0 : n.items[d + 1];
|
|
43
|
+
return /* @__PURE__ */ a(c, { expanded: s, children: [
|
|
44
44
|
/* @__PURE__ */ m(
|
|
45
45
|
G,
|
|
46
46
|
{
|
|
47
47
|
...e,
|
|
48
48
|
size: (e == null ? void 0 : e.size) || (t == null ? void 0 : t.defaultItemSize) || x,
|
|
49
49
|
color: (e == null ? void 0 : e.color) || (t == null ? void 0 : t.defaultItemColor) || M,
|
|
50
|
-
theme: (e == null ? void 0 : e.theme) || (t == null ? void 0 : t.defaultItemTheme) ||
|
|
51
|
-
iconTheme: (e == null ? void 0 : e.iconTheme) || (t == null ? void 0 : t.defaultIconTheme) ||
|
|
50
|
+
theme: (e == null ? void 0 : e.theme) || (t == null ? void 0 : t.defaultItemTheme) || I,
|
|
51
|
+
iconTheme: (e == null ? void 0 : e.iconTheme) || (t == null ? void 0 : t.defaultIconTheme) || v,
|
|
52
52
|
active: L,
|
|
53
53
|
tabIndex: e != null && e.disabled ? -1 : 0
|
|
54
54
|
}
|
|
55
55
|
),
|
|
56
|
-
s && (e == null ? void 0 : e.items) && /* @__PURE__ */
|
|
56
|
+
s && (e == null ? void 0 : e.items) && /* @__PURE__ */ a(k, { children: [
|
|
57
57
|
/* @__PURE__ */ m(
|
|
58
58
|
_,
|
|
59
59
|
{
|
|
60
60
|
expanded: s,
|
|
61
|
-
level:
|
|
61
|
+
level: h + 1,
|
|
62
62
|
items: e == null ? void 0 : e.items,
|
|
63
63
|
groups: f,
|
|
64
64
|
defaultItemSize: x,
|
|
65
65
|
defaultItemColor: M,
|
|
66
|
-
defaultItemTheme:
|
|
67
|
-
defaultIconTheme:
|
|
66
|
+
defaultItemTheme: I,
|
|
67
|
+
defaultIconTheme: v
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
(z || T) && /* @__PURE__ */ m(c, { role: "separator", as: "div" })
|
|
71
71
|
] })
|
|
72
|
-
] },
|
|
72
|
+
] }, d);
|
|
73
73
|
})
|
|
74
74
|
] }, l);
|
|
75
75
|
})
|