@altinn/altinn-components 0.36.7 → 0.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/dist/assets/DialogListItem.css +1 -1
- package/dist/assets/DrawerBody.css +1 -1
- package/dist/assets/DrawerOrDropdown.css +1 -1
- package/dist/assets/Header.css +1 -1
- package/dist/assets/Heading.css +1 -1
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/MenuItemsVirtual.css +1 -1
- package/dist/assets/ScopeListItem.css +1 -1
- package/dist/components/Button/IconButton.js +9 -7
- package/dist/components/ContextMenu/ContextMenu.js +58 -43
- package/dist/components/Dialog/DialogList.js +13 -13
- package/dist/components/Dialog/DialogListItem.js +126 -104
- package/dist/components/Dropdown/DrawerBody.js +3 -3
- package/dist/components/Dropdown/DrawerOrDropdown.js +4 -4
- package/dist/components/Header/Header.js +42 -57
- package/dist/components/Header/LocaleButton.js +3 -2
- package/dist/components/Header/LocaleSwitcher.js +38 -23
- package/dist/components/Layout/Layout.js +27 -16
- package/dist/components/Layout/LayoutContent.js +4 -4
- package/dist/components/List/ListItem.js +39 -38
- package/dist/components/List/ListItemLabel.js +0 -2
- package/dist/components/Menu/MenuBase.js +9 -9
- package/dist/components/Menu/MenuItemBase.js +31 -27
- package/dist/components/Menu/MenuItems.js +43 -37
- package/dist/components/Menu/MenuItemsVirtual.js +9 -9
- package/dist/components/Searchbar/Autocomplete.js +23 -30
- package/dist/components/Searchbar/AutocompleteItem.js +10 -12
- package/dist/components/Searchbar/ScopeListItem.js +3 -3
- package/dist/components/Searchbar/Searchbar.js +4 -4
- package/dist/components/SkipLink/SkipLink.js +18 -0
- package/dist/components/SkipLink/index.js +4 -0
- package/dist/components/Typography/Heading.js +36 -30
- package/dist/components/Typography/Typography.js +34 -29
- package/dist/components/Typography/useHighlightedText.js +53 -0
- package/dist/hooks/useEnterKey.js +8 -8
- package/dist/hooks/useMenu.js +43 -28
- package/dist/types/lib/components/Button/IconButton.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogList.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogList.stories.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +3 -1
- package/dist/types/lib/components/Dropdown/DrawerOrDropdown.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +1 -0
- package/dist/types/lib/components/Header/LocaleButton.d.ts +2 -1
- package/dist/types/lib/components/Header/LocaleSwitcher.d.ts +2 -5
- package/dist/types/lib/components/Layout/Layout.d.ts +3 -1
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +7 -1
- package/dist/types/lib/components/Layout/LayoutContent.d.ts +9 -2
- package/dist/types/lib/components/Menu/MenuBase.d.ts +4 -2
- package/dist/types/lib/components/Menu/MenuItem.d.ts +2 -1
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +3 -2
- package/dist/types/lib/components/Menu/MenuItems.d.ts +3 -1
- package/dist/types/lib/components/SkipLink/SkipLink.d.ts +9 -0
- package/dist/types/lib/components/SkipLink/SkipLink.stories.d.ts +15 -0
- package/dist/types/lib/components/SkipLink/index.d.ts +1 -0
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -1
- package/dist/types/lib/components/Typography/Heading.d.ts +2 -1
- package/dist/types/lib/components/Typography/Heading.stories.d.ts +2 -1
- package/dist/types/lib/components/Typography/Typography.d.ts +2 -1
- package/dist/types/lib/components/Typography/Typography.stories.d.ts +2 -1
- package/dist/types/lib/components/Typography/useHighlightedText.d.ts +2 -0
- package/dist/types/lib/hooks/useEnterKey.d.ts +1 -1
- package/dist/types/lib/hooks/useMenu.d.ts +6 -2
- package/dist/types/lib/stories/Beta.stories.d.ts +11 -0
- package/dist/types/lib/stories/Inbox.stories.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +0 -19
|
@@ -1,88 +1,73 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { DropdownBase as
|
|
2
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { DropdownBase as C } from "../Dropdown/DropdownBase.js";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
|
-
import { DrawerBase as
|
|
5
|
+
import { DrawerBase as b } from "../Dropdown/DrawerBase.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { useRootContext as
|
|
8
|
-
import { GlobalMenu as
|
|
9
|
-
import { GlobalMenuButton as
|
|
10
|
-
import { HeaderBase as
|
|
11
|
-
import { HeaderLogo as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { Searchbar as u } from "../Searchbar/Searchbar.js";
|
|
7
|
+
import { useRootContext as v } from "../RootProvider/RootProvider.js";
|
|
8
|
+
import { GlobalMenu as h } from "../GlobalMenu/GlobalMenu.js";
|
|
9
|
+
import { GlobalMenuButton as H } from "../GlobalMenu/GlobalMenuButton.js";
|
|
10
|
+
import { HeaderBase as S } from "./HeaderBase.js";
|
|
11
|
+
import { HeaderLogo as k } from "./HeaderLogo.js";
|
|
12
|
+
import { LocaleSwitcher as B } from "./LocaleSwitcher.js";
|
|
13
|
+
import { Searchbar as f } from "../Searchbar/Searchbar.js";
|
|
15
14
|
import "../Snackbar/useSnackbar.js";
|
|
16
|
-
import { HeaderGroup as
|
|
17
|
-
import { HeaderSearch as
|
|
18
|
-
import { useIsDesktop as
|
|
19
|
-
import '../../assets/Header.css';const
|
|
20
|
-
drawer:
|
|
21
|
-
dropdown:
|
|
22
|
-
relative:
|
|
23
|
-
},
|
|
24
|
-
const { currentId: o, toggleId:
|
|
15
|
+
import { HeaderGroup as D } from "./HeaderGroup.js";
|
|
16
|
+
import { HeaderSearch as w } from "./HeaderSearch.js";
|
|
17
|
+
import { useIsDesktop as I } from "../../hooks/useIsDesktop.js";
|
|
18
|
+
import '../../assets/Header.css';const N = "_drawer_1tael_1", F = "_dropdown_1tael_6", G = "_relative_1tael_20", s = {
|
|
19
|
+
drawer: N,
|
|
20
|
+
dropdown: F,
|
|
21
|
+
relative: G
|
|
22
|
+
}, W = ({ menu: r, locale: d, search: a, currentAccount: t, logo: u = {}, badge: x }) => {
|
|
23
|
+
const { currentId: o, toggleId: p, openId: _, closeAll: n } = v(), i = () => {
|
|
25
24
|
_("search");
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return /* @__PURE__ */ c(
|
|
34
|
-
B,
|
|
25
|
+
}, c = () => {
|
|
26
|
+
p("search");
|
|
27
|
+
}, g = () => {
|
|
28
|
+
p("menu");
|
|
29
|
+
}, m = I();
|
|
30
|
+
return /* @__PURE__ */ l(
|
|
31
|
+
S,
|
|
35
32
|
{
|
|
36
33
|
currentId: o,
|
|
37
34
|
open: o === "search" || o === "menu" || o === "locale",
|
|
38
|
-
onClose:
|
|
35
|
+
onClose: n,
|
|
39
36
|
children: [
|
|
40
|
-
/* @__PURE__ */ e(
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ e(k, { ...u, className: s.logo }),
|
|
38
|
+
a && m && /* @__PURE__ */ e(w, { expanded: o === "search", children: /* @__PURE__ */ e(f, { ...a, expanded: o === "search", onClose: c, onFocus: i }) }),
|
|
39
|
+
/* @__PURE__ */ l(D, { children: [
|
|
40
|
+
d && /* @__PURE__ */ e(B, { ...d }),
|
|
41
|
+
/* @__PURE__ */ l("div", { className: s.relative, children: [
|
|
45
42
|
/* @__PURE__ */ e(
|
|
46
|
-
|
|
43
|
+
H,
|
|
47
44
|
{
|
|
48
|
-
badge:
|
|
49
|
-
currentAccount:
|
|
50
|
-
onClick:
|
|
45
|
+
badge: x,
|
|
46
|
+
currentAccount: t,
|
|
47
|
+
onClick: g,
|
|
51
48
|
expanded: o === "menu",
|
|
52
49
|
label: r == null ? void 0 : r.menuLabel
|
|
53
50
|
}
|
|
54
51
|
),
|
|
55
|
-
n && /* @__PURE__ */ e(
|
|
56
|
-
h,
|
|
57
|
-
{
|
|
58
|
-
layout: "desktop",
|
|
59
|
-
padding: !0,
|
|
60
|
-
placement: "right",
|
|
61
|
-
open: o === "locale",
|
|
62
|
-
className: a.dropdown,
|
|
63
|
-
children: /* @__PURE__ */ e(g, { ...n })
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
52
|
r && /* @__PURE__ */ e(
|
|
67
|
-
|
|
53
|
+
C,
|
|
68
54
|
{
|
|
69
55
|
layout: "desktop",
|
|
70
56
|
padding: !0,
|
|
71
57
|
placement: "right",
|
|
72
58
|
open: o === "menu",
|
|
73
|
-
className:
|
|
74
|
-
children: /* @__PURE__ */ e(
|
|
59
|
+
className: s.dropdown,
|
|
60
|
+
children: /* @__PURE__ */ e(h, { ...r, currentAccount: t, onClose: n })
|
|
75
61
|
}
|
|
76
62
|
)
|
|
77
63
|
] })
|
|
78
64
|
] }),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
r && /* @__PURE__ */ e(f, { open: o === "menu", className: a.drawer, children: /* @__PURE__ */ e(w, { ...r, currentAccount: l, onClose: d }) })
|
|
65
|
+
a && !m && /* @__PURE__ */ e(w, { expanded: o === "search", children: /* @__PURE__ */ e(f, { ...a, expanded: o === "search", onClose: c, onFocus: i }) }),
|
|
66
|
+
r && /* @__PURE__ */ e(b, { open: o === "menu", className: s.drawer, children: /* @__PURE__ */ e(h, { ...r, currentAccount: t, onClose: n }) })
|
|
82
67
|
]
|
|
83
68
|
}
|
|
84
69
|
);
|
|
85
70
|
};
|
|
86
71
|
export {
|
|
87
|
-
|
|
72
|
+
W as Header
|
|
88
73
|
};
|
|
@@ -26,7 +26,7 @@ const d = c((e, n) => {
|
|
|
26
26
|
);
|
|
27
27
|
}), s = "_button_utwi0_1", p = {
|
|
28
28
|
button: s
|
|
29
|
-
}, x = ({ id: e = "language-switcher", expanded: n, onClick: o }) => /* @__PURE__ */ i(
|
|
29
|
+
}, x = ({ id: e = "language-switcher", expanded: n, onClick: o, onBlurCapture: t }) => /* @__PURE__ */ i(
|
|
30
30
|
m,
|
|
31
31
|
{
|
|
32
32
|
className: p.button,
|
|
@@ -37,7 +37,8 @@ const d = c((e, n) => {
|
|
|
37
37
|
selected: n,
|
|
38
38
|
color: "company",
|
|
39
39
|
onClick: o,
|
|
40
|
-
iconAltText: `Open ${e}
|
|
40
|
+
iconAltText: `Open ${e}`,
|
|
41
|
+
onBlurCapture: t
|
|
41
42
|
}
|
|
42
43
|
);
|
|
43
44
|
export {
|
|
@@ -1,30 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as r, jsxs as k } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as h, useMemo as v } from "react";
|
|
4
|
+
import { useEnterKey as b } from "../../hooks/useEnterKey.js";
|
|
5
|
+
import { useIsDesktop as x } from "../../hooks/useIsDesktop.js";
|
|
6
|
+
import { DropdownBase as I } from "../Dropdown/DropdownBase.js";
|
|
3
7
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import "
|
|
5
|
-
import { useRootContext as
|
|
8
|
+
import { DrawerBase as w } from "../Dropdown/DrawerBase.js";
|
|
9
|
+
import { useRootContext as C } from "../RootProvider/RootProvider.js";
|
|
10
|
+
import { MenuItems as m } from "../Menu/MenuItems.js";
|
|
11
|
+
import { LocaleButton as y } from "./LocaleButton.js";
|
|
6
12
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
import { S as B } from "../../Checkmark-D17Nyv_u.js";
|
|
14
|
+
const z = ({ title: d = "Select language", options: i, onSelect: o }) => {
|
|
15
|
+
const c = h(null), u = x(), { currentId: g, toggleId: f, closeAll: s } = C(), n = g === "locale", l = v(() => i.map((e) => ({
|
|
16
|
+
...e,
|
|
17
|
+
id: String(e.value),
|
|
18
|
+
tabIndex: -1,
|
|
19
|
+
groupId: "locales",
|
|
20
|
+
icon: e.checked ? B : /* @__PURE__ */ r("span", { "aria-hidden": "true" }),
|
|
21
|
+
onClick: () => {
|
|
22
|
+
o == null || o(String(e.value)), s();
|
|
23
|
+
}
|
|
24
|
+
})), [i, o]), p = {
|
|
25
|
+
locales: { title: d || "Språk/language" }
|
|
13
26
|
};
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
return b((e) => {
|
|
28
|
+
var a;
|
|
29
|
+
if (n) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
const t = (a = c.current) == null ? void 0 : a.querySelector('[data-active="true"]');
|
|
32
|
+
t && (t.tagName === "A" && t.hasAttribute("href") ? t.click() : t.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), s();
|
|
33
|
+
}
|
|
34
|
+
}), /* @__PURE__ */ k("div", { ref: c, "data-testid": "locale-switcher", children: [
|
|
35
|
+
/* @__PURE__ */ r(y, { onClick: () => f("locale"), expanded: n, onBlurCapture: (e) => {
|
|
36
|
+
var t;
|
|
37
|
+
((t = e == null ? void 0 : e.relatedTarget) == null ? void 0 : t.closest('[data-testid="locale-switcher"]')) || s();
|
|
38
|
+
} }),
|
|
39
|
+
n && u && /* @__PURE__ */ r(I, { layout: "desktop", padding: !0, placement: "right", open: !0, children: /* @__PURE__ */ r(m, { groups: p, items: l, keyboardEvents: !0 }) }),
|
|
40
|
+
n && !u && /* @__PURE__ */ r(w, { open: !0, placement: "bottom", children: /* @__PURE__ */ r(m, { groups: p, items: l, keyboardEvents: !0 }) })
|
|
41
|
+
] });
|
|
27
42
|
};
|
|
28
43
|
export {
|
|
29
|
-
|
|
44
|
+
z as LocaleSwitcher
|
|
30
45
|
};
|
|
@@ -1,30 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as p, jsx as m } from "react/jsx-runtime";
|
|
3
|
-
import { LayoutBase as
|
|
4
|
-
import { LayoutBody as
|
|
5
|
-
import { LayoutContent as
|
|
6
|
-
import { LayoutSidebar as
|
|
7
|
-
import { Footer as
|
|
8
|
-
import { Header as
|
|
3
|
+
import { LayoutBase as h } from "./LayoutBase.js";
|
|
4
|
+
import { LayoutBody as L } from "./LayoutBody.js";
|
|
5
|
+
import { LayoutContent as x } from "./LayoutContent.js";
|
|
6
|
+
import { LayoutSidebar as j } from "./LayoutSidebar.js";
|
|
7
|
+
import { Footer as B } from "../Footer/Footer.js";
|
|
8
|
+
import { Header as C } from "../Header/Header.js";
|
|
9
9
|
import "../../index-L8X2o7IH.js";
|
|
10
10
|
import "react";
|
|
11
|
-
import { useRootContext as
|
|
11
|
+
import { useRootContext as S } from "../RootProvider/RootProvider.js";
|
|
12
12
|
import { Menu as F } from "../Menu/Menu.js";
|
|
13
13
|
import "../Snackbar/useSnackbar.js";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
import { SkipLink as H } from "../SkipLink/SkipLink.js";
|
|
15
|
+
const J = ({
|
|
16
|
+
color: c,
|
|
17
|
+
theme: f = "subtle",
|
|
18
|
+
header: u,
|
|
19
|
+
footer: n,
|
|
20
|
+
sidebar: o,
|
|
21
|
+
content: t = {},
|
|
22
|
+
children: y,
|
|
23
|
+
skipLink: r
|
|
24
|
+
}) => {
|
|
25
|
+
const { currentId: l } = S();
|
|
26
|
+
return /* @__PURE__ */ p(h, { color: c, theme: f, currentId: l, children: [
|
|
27
|
+
r && /* @__PURE__ */ m(H, { ...r }),
|
|
28
|
+
u && /* @__PURE__ */ m(C, { ...u }),
|
|
29
|
+
/* @__PURE__ */ p(L, { currentId: l, children: [
|
|
30
|
+
o && /* @__PURE__ */ p(j, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, children: [
|
|
20
31
|
(o == null ? void 0 : o.menu) && /* @__PURE__ */ m(F, { ...o == null ? void 0 : o.menu }),
|
|
21
32
|
o == null ? void 0 : o.children
|
|
22
33
|
] }),
|
|
23
|
-
/* @__PURE__ */ m(
|
|
34
|
+
/* @__PURE__ */ m(x, { color: t == null ? void 0 : t.color, id: "main-content", children: y })
|
|
24
35
|
] }),
|
|
25
|
-
|
|
36
|
+
n && /* @__PURE__ */ m(B, { ...n })
|
|
26
37
|
] });
|
|
27
38
|
};
|
|
28
39
|
export {
|
|
29
|
-
|
|
40
|
+
J as Layout
|
|
30
41
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/LayoutContent.css';const
|
|
3
|
-
content:
|
|
4
|
-
}, r = ({ color: t, children: n }) => /* @__PURE__ */
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/LayoutContent.css';const e = "_content_1wkbr_1", s = {
|
|
3
|
+
content: e
|
|
4
|
+
}, r = ({ color: t, children: n, id: o = "main-content" }) => /* @__PURE__ */ c("main", { className: s.content, "data-color": t, id: o, children: n });
|
|
5
5
|
export {
|
|
6
6
|
r as LayoutContent
|
|
7
7
|
};
|
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs as H, jsx as N } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { ListItemBase as k } from "./ListItemBase.js";
|
|
4
|
+
import { ListItemHeader as q } from "./ListItemHeader.js";
|
|
5
|
+
import '../../assets/ListItem.css';const A = "_item_1nwey_3", C = {
|
|
6
|
+
item: A
|
|
7
|
+
}, J = ({
|
|
8
|
+
className: i,
|
|
9
|
+
color: m,
|
|
10
|
+
variant: c = "default",
|
|
10
11
|
shadow: n = "xs",
|
|
11
|
-
border:
|
|
12
|
-
loading:
|
|
13
|
-
collapsible:
|
|
12
|
+
border: f = "none",
|
|
13
|
+
loading: e,
|
|
14
|
+
collapsible: p,
|
|
14
15
|
expanded: t,
|
|
15
16
|
size: o,
|
|
16
17
|
icon: l,
|
|
17
18
|
label: s,
|
|
18
19
|
title: a,
|
|
19
|
-
description:
|
|
20
|
-
badge:
|
|
21
|
-
linkIcon:
|
|
20
|
+
description: u,
|
|
21
|
+
badge: L,
|
|
22
|
+
linkIcon: x = !1,
|
|
22
23
|
select: y,
|
|
23
24
|
selected: I,
|
|
24
25
|
controls: _,
|
|
25
26
|
children: h,
|
|
26
|
-
interactive:
|
|
27
|
+
interactive: r,
|
|
27
28
|
id: j,
|
|
28
|
-
...
|
|
29
|
+
...w
|
|
29
30
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
31
|
+
const B = typeof s == "function" ? s() : s;
|
|
32
|
+
return /* @__PURE__ */ H(
|
|
33
|
+
k,
|
|
33
34
|
{
|
|
34
|
-
className:
|
|
35
|
+
className: b(C.item, i),
|
|
35
36
|
size: o,
|
|
36
|
-
color:
|
|
37
|
-
variant:
|
|
37
|
+
color: m,
|
|
38
|
+
variant: c,
|
|
38
39
|
shadow: n,
|
|
39
|
-
border:
|
|
40
|
+
border: f,
|
|
40
41
|
selected: I,
|
|
41
42
|
expanded: t,
|
|
42
|
-
loading:
|
|
43
|
-
interactive:
|
|
43
|
+
loading: e,
|
|
44
|
+
interactive: r,
|
|
44
45
|
id: j,
|
|
45
46
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
47
|
+
/* @__PURE__ */ N(
|
|
48
|
+
q,
|
|
48
49
|
{
|
|
49
|
-
color:
|
|
50
|
-
loading:
|
|
51
|
-
linkIcon:
|
|
52
|
-
collapsible:
|
|
50
|
+
color: m,
|
|
51
|
+
loading: e,
|
|
52
|
+
linkIcon: x,
|
|
53
|
+
collapsible: p,
|
|
53
54
|
expanded: t,
|
|
54
55
|
select: y,
|
|
55
56
|
title: a,
|
|
56
57
|
size: o,
|
|
57
|
-
description:
|
|
58
|
+
description: u,
|
|
58
59
|
icon: l,
|
|
59
|
-
badge:
|
|
60
|
+
badge: L,
|
|
60
61
|
controls: _,
|
|
61
|
-
interactive:
|
|
62
|
-
...
|
|
63
|
-
children:
|
|
62
|
+
interactive: r,
|
|
63
|
+
...w,
|
|
64
|
+
children: B
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
t ? h : null
|
|
@@ -69,5 +70,5 @@ import '../../assets/ListItem.css';const k = "_item_1nwey_3", q = {
|
|
|
69
70
|
);
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
J as ListItem
|
|
73
74
|
};
|
|
@@ -14,7 +14,6 @@ const d = (r) => {
|
|
|
14
14
|
const s = {
|
|
15
15
|
as: "h3",
|
|
16
16
|
size: "sm"
|
|
17
|
-
// leading: "tight",
|
|
18
17
|
};
|
|
19
18
|
return j(r) ? { ...s, ...r } : z(r) ? {
|
|
20
19
|
...s,
|
|
@@ -26,7 +25,6 @@ const d = (r) => {
|
|
|
26
25
|
size: "xs",
|
|
27
26
|
weight: "normal",
|
|
28
27
|
variant: "subtle"
|
|
29
|
-
// leading: "tight",
|
|
30
28
|
};
|
|
31
29
|
return j(r) ? { ...s, ...r } : z(r) ? {
|
|
32
30
|
...s,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c
|
|
3
|
-
import '../../assets/MenuBase.css';const
|
|
4
|
-
menu:
|
|
5
|
-
list:
|
|
6
|
-
item:
|
|
7
|
-
}, C = ({ as: t = "nav", color: n, theme: e, className: o, children: s }) => /* @__PURE__ */
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/MenuBase.css';const r = "_menu_sxyub_1", l = "_list_sxyub_16", p = "_item_sxyub_22", i = {
|
|
4
|
+
menu: r,
|
|
5
|
+
list: l,
|
|
6
|
+
item: p
|
|
7
|
+
}, C = ({ as: t = "nav", color: n, theme: e, className: o, children: s }) => /* @__PURE__ */ a(t, { className: c(i.menu, o), "data-color": n, "data-theme": e, children: s }), d = ({ as: t = "ul", role: n = "group", className: e, children: o, ref: s, onMouseEnter: m }) => /* @__PURE__ */ a(t, { className: c(i.list, e), role: n, ref: s, onMouseEnter: m, children: o }), y = ({
|
|
8
8
|
as: t = "li",
|
|
9
9
|
role: n = "presentation",
|
|
10
10
|
className: e,
|
|
11
11
|
children: o,
|
|
12
12
|
style: s,
|
|
13
|
-
dataIndex:
|
|
14
|
-
}) => /* @__PURE__ */
|
|
13
|
+
dataIndex: m
|
|
14
|
+
}) => /* @__PURE__ */ a(t, { className: c(i.item, e), role: n, style: s, "data-index": m, children: o });
|
|
15
15
|
export {
|
|
16
16
|
C as MenuBase,
|
|
17
17
|
d as MenuList,
|
|
@@ -1,43 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/MenuItemBase.css';const
|
|
4
|
-
item:
|
|
5
|
-
content:
|
|
6
|
-
},
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { c as v } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/MenuItemBase.css';const I = "_item_1qmxq_1", N = "_content_1qmxq_45", c = {
|
|
4
|
+
item: I,
|
|
5
|
+
content: N
|
|
6
|
+
}, B = ({
|
|
7
7
|
interactive: o = !0,
|
|
8
8
|
as: s,
|
|
9
|
-
color:
|
|
10
|
-
theme:
|
|
9
|
+
color: d,
|
|
10
|
+
theme: r,
|
|
11
11
|
size: i,
|
|
12
12
|
className: p,
|
|
13
|
-
href:
|
|
13
|
+
href: x,
|
|
14
14
|
onClick: t,
|
|
15
|
-
onKeyPress:
|
|
16
|
-
tabIndex:
|
|
17
|
-
hidden:
|
|
18
|
-
selected:
|
|
19
|
-
disabled:
|
|
20
|
-
children:
|
|
21
|
-
|
|
15
|
+
onKeyPress: a,
|
|
16
|
+
tabIndex: _ = 0,
|
|
17
|
+
hidden: q,
|
|
18
|
+
selected: f,
|
|
19
|
+
disabled: e = !1,
|
|
20
|
+
children: h,
|
|
21
|
+
active: u,
|
|
22
|
+
onMouseEnter: l
|
|
23
|
+
}) => /* @__PURE__ */ m(
|
|
22
24
|
s || "a",
|
|
23
25
|
{
|
|
24
|
-
tabIndex:
|
|
25
|
-
className:
|
|
26
|
+
tabIndex: e ? "-1" : _ ?? 0,
|
|
27
|
+
className: v(c.item, p),
|
|
26
28
|
"data-interactive": o,
|
|
29
|
+
"data-active": u,
|
|
27
30
|
"data-size": i,
|
|
28
|
-
"data-color":
|
|
29
|
-
"data-theme":
|
|
30
|
-
"aria-hidden":
|
|
31
|
-
"aria-disabled":
|
|
32
|
-
"data-selected":
|
|
33
|
-
href:
|
|
31
|
+
"data-color": d,
|
|
32
|
+
"data-theme": r,
|
|
33
|
+
"aria-hidden": q,
|
|
34
|
+
"aria-disabled": e,
|
|
35
|
+
"data-selected": f,
|
|
36
|
+
href: x,
|
|
34
37
|
onKeyPress: (n) => {
|
|
35
|
-
n.key === "Enter" && (t == null || t()),
|
|
38
|
+
n.key === "Enter" && (t == null || t()), a == null || a(n);
|
|
36
39
|
},
|
|
37
40
|
onClick: t,
|
|
38
|
-
|
|
41
|
+
onMouseEnter: l,
|
|
42
|
+
children: /* @__PURE__ */ m("span", { className: c.content, children: h })
|
|
39
43
|
}
|
|
40
44
|
);
|
|
41
45
|
export {
|
|
42
|
-
|
|
46
|
+
B as MenuItemBase
|
|
43
47
|
};
|