@robert-stackflow/oneui 0.6.8 → 0.6.17
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 +62 -0
- package/README.md +255 -188
- package/components/AccountItem.module.css +103 -103
- package/components/Alert.d.ts +2 -9
- package/components/Alert.js +2 -40
- package/components/AppShell.d.ts +7 -7
- package/components/AppShell.js +37 -33
- package/components/AppShell.module.css +223 -271
- package/components/AppearanceSettings.js +25 -32
- package/components/Badge.module.css +30 -30
- package/components/Banner.d.ts +17 -0
- package/components/Banner.js +99 -0
- package/components/Banner.module.css +143 -0
- package/components/BarChart.module.css +35 -34
- package/components/Breadcrumb.module.css +97 -97
- package/components/Button.module.css +120 -120
- package/components/Cascader.js +1 -0
- package/components/CharacterPicker.js +2 -0
- package/components/Checkbox.module.css +95 -95
- package/components/Combobox.js +1 -0
- package/components/Combobox.module.css +6 -1
- package/components/CommandPalette.js +2 -2
- package/components/ContributionCalendar.module.css +121 -121
- package/components/Control.module.css +86 -86
- package/components/DataTable.d.ts +3 -2
- package/components/DataTable.js +92 -66
- package/components/DataTable.module.css +3 -31
- package/components/DatePicker.js +1 -0
- package/components/DateRangePicker.js +1 -0
- package/components/Dialog.d.ts +3 -1
- package/components/Dialog.js +11 -4
- package/components/Dialog.module.css +139 -97
- package/components/DialogVariants.d.ts +2 -1
- package/components/DialogVariants.js +35 -7
- package/components/HierarchyPicker.module.css +185 -181
- package/components/IconPicker.js +2 -0
- package/components/Indicator.module.css +83 -83
- package/components/Layout.module.css +82 -82
- package/components/Markdown.d.ts +13 -0
- package/components/Markdown.js +164 -0
- package/components/Markdown.module.css +227 -0
- package/components/MenuItem.module.css +172 -172
- package/components/MultiSelect.js +1 -0
- package/components/MultiSelect.module.css +2 -0
- package/components/NavBar.d.ts +20 -0
- package/components/NavBar.js +197 -0
- package/components/NavBar.module.css +130 -0
- package/components/NavigationSurface.module.css +27 -0
- package/components/Picker.module.css +7 -0
- package/components/Popover.d.ts +6 -1
- package/components/Popover.js +39 -13
- package/components/Popover.module.css +8 -0
- package/components/Progress.module.css +33 -33
- package/components/RadioGroup.module.css +87 -87
- package/components/RangeSlider.module.css +141 -141
- package/components/ResizablePanel.module.css +101 -101
- package/components/ResourceCard.module.css +98 -98
- package/components/SelectSettingRow.d.ts +7 -0
- package/components/SelectSettingRow.js +58 -0
- package/components/SettingRow.d.ts +9 -3
- package/components/SettingRow.js +32 -8
- package/components/SettingRow.module.css +17 -0
- package/components/SettingsLayout.d.ts +15 -3
- package/components/SettingsLayout.js +46 -29
- package/components/SideBar.d.ts +9 -0
- package/components/SideBar.js +30 -0
- package/components/SidebarNavigation.d.ts +24 -3
- package/components/SidebarNavigation.js +274 -47
- package/components/SidebarNavigation.module.css +266 -42
- package/components/Slider.module.css +19 -19
- package/components/Steps.module.css +176 -176
- package/components/Switch.d.ts +3 -1
- package/components/Switch.js +5 -1
- package/components/Switch.module.css +59 -59
- package/components/SwitchSettingRow.d.ts +7 -0
- package/components/SwitchSettingRow.js +45 -0
- package/components/Table.d.ts +8 -1
- package/components/Table.js +34 -17
- package/components/Table.module.css +87 -48
- package/components/TableMarkup.d.ts +2 -1
- package/components/TableMarkup.js +18 -1
- package/components/TableOfContents.d.ts +22 -0
- package/components/TableOfContents.js +462 -0
- package/components/TableOfContents.module.css +252 -0
- package/components/TextAreaSettingRow.d.ts +9 -0
- package/components/TextAreaSettingRow.js +47 -0
- package/components/TextSettingRow.d.ts +9 -0
- package/components/TextSettingRow.js +45 -0
- package/components/ThemePicker.module.css +178 -178
- package/components/ThemeProvider.js +2 -0
- package/components/TimeColumns.module.css +47 -47
- package/components/Timeline.module.css +202 -202
- package/components/Toast.d.ts +8 -1
- package/components/Toast.js +49 -17
- package/components/Toast.module.css +25 -0
- package/components/ToastProvider.d.ts +4 -1
- package/components/ToastProvider.js +67 -12
- package/components/TreeSelect.js +1 -0
- package/components/TreeTable.d.ts +3 -3
- package/components/TreeTable.js +12 -2
- package/components/TreeTable.module.css +57 -53
- package/components/createToaster.d.ts +2 -1
- package/components/createToaster.js +28 -14
- package/components/index.d.ts +18 -1
- package/components/index.js +24 -0
- package/components/motion.d.ts +1 -0
- package/components/motion.js +18 -6
- package/components/settingRowControl.d.ts +7 -0
- package/components/settingRowControl.js +15 -0
- package/package.json +57 -3
- package/styles/base.css +206 -206
- package/styles/blue.css +270 -268
- package/styles/minimal.css +1 -0
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
.item {
|
|
2
|
-
display: grid;
|
|
3
|
-
grid-template-columns: 40px minmax(0, 1fr) auto;
|
|
4
|
-
gap: 16px;
|
|
5
|
-
align-items: start;
|
|
6
|
-
padding: 20px;
|
|
7
|
-
border: 1px solid var(--line);
|
|
8
|
-
border-radius: var(--card-radius);
|
|
9
|
-
background: var(--surface);
|
|
10
|
-
min-width: 0;
|
|
11
|
-
}
|
|
12
|
-
.item[data-highlighted] {
|
|
13
|
-
background: color-mix(in srgb, var(--selected) 35%, var(--surface));
|
|
14
|
-
}
|
|
15
|
-
.icon {
|
|
16
|
-
display: grid;
|
|
17
|
-
place-items: center;
|
|
18
|
-
width: 40px;
|
|
19
|
-
height: 40px;
|
|
20
|
-
border-radius: var(--radius);
|
|
21
|
-
background: var(--selected);
|
|
22
|
-
color: var(--
|
|
23
|
-
}
|
|
24
|
-
.icon svg {
|
|
25
|
-
width: 21px;
|
|
26
|
-
height: 21px;
|
|
27
|
-
}
|
|
28
|
-
.body {
|
|
29
|
-
min-width: 0;
|
|
30
|
-
}
|
|
31
|
-
.heading {
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
flex-wrap: wrap;
|
|
35
|
-
gap: 10px;
|
|
36
|
-
}
|
|
37
|
-
.heading strong {
|
|
38
|
-
font-size: 14px;
|
|
39
|
-
font-weight: 600;
|
|
40
|
-
color: var(--fg);
|
|
41
|
-
overflow-wrap: anywhere;
|
|
42
|
-
}
|
|
43
|
-
.description {
|
|
44
|
-
font-size: 12px;
|
|
45
|
-
color: var(--muted);
|
|
46
|
-
margin-top: 5px;
|
|
47
|
-
overflow-wrap: anywhere;
|
|
48
|
-
}
|
|
49
|
-
.metadata {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-wrap: wrap;
|
|
52
|
-
gap: 14px 28px;
|
|
53
|
-
margin: 16px 0 0;
|
|
54
|
-
}
|
|
55
|
-
.metadata > div {
|
|
56
|
-
min-width: 0;
|
|
57
|
-
}
|
|
58
|
-
.metadata dt {
|
|
59
|
-
font-size: 11px;
|
|
60
|
-
color: var(--muted);
|
|
61
|
-
}
|
|
62
|
-
.metadata dd {
|
|
63
|
-
margin: 4px 0 0;
|
|
64
|
-
font-size: 12px;
|
|
65
|
-
color: var(--fg);
|
|
66
|
-
font-variant-numeric: tabular-nums;
|
|
67
|
-
overflow-wrap: anywhere;
|
|
68
|
-
}
|
|
69
|
-
.actions {
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
gap: 6px;
|
|
73
|
-
justify-content: flex-end;
|
|
74
|
-
}
|
|
75
|
-
@media (max-width: 700px) {
|
|
76
|
-
.item {
|
|
77
|
-
grid-template-columns: 36px minmax(0, 1fr);
|
|
78
|
-
gap: 12px;
|
|
79
|
-
padding: 16px;
|
|
80
|
-
}
|
|
81
|
-
.icon {
|
|
82
|
-
width: 36px;
|
|
83
|
-
height: 36px;
|
|
84
|
-
}
|
|
85
|
-
.actions {
|
|
86
|
-
grid-column: 2;
|
|
87
|
-
}
|
|
88
|
-
.metadata {
|
|
89
|
-
display: flex;
|
|
90
|
-
flex-direction: column;
|
|
91
|
-
gap: 10px;
|
|
92
|
-
}
|
|
93
|
-
.metadata > div {
|
|
94
|
-
display: flex;
|
|
95
|
-
align-items: baseline;
|
|
96
|
-
justify-content: space-between;
|
|
97
|
-
gap: 12px;
|
|
98
|
-
}
|
|
99
|
-
.metadata dd {
|
|
100
|
-
margin: 0;
|
|
101
|
-
text-align: right;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
1
|
+
.item {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: 40px minmax(0, 1fr) auto;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
align-items: start;
|
|
6
|
+
padding: 20px;
|
|
7
|
+
border: 1px solid var(--line);
|
|
8
|
+
border-radius: var(--card-radius);
|
|
9
|
+
background: var(--surface);
|
|
10
|
+
min-width: 0;
|
|
11
|
+
}
|
|
12
|
+
.item[data-highlighted] {
|
|
13
|
+
background: color-mix(in srgb, var(--selected) 35%, var(--surface));
|
|
14
|
+
}
|
|
15
|
+
.icon {
|
|
16
|
+
display: grid;
|
|
17
|
+
place-items: center;
|
|
18
|
+
width: 40px;
|
|
19
|
+
height: 40px;
|
|
20
|
+
border-radius: var(--radius);
|
|
21
|
+
background: var(--selected);
|
|
22
|
+
color: var(--fg);
|
|
23
|
+
}
|
|
24
|
+
.icon svg {
|
|
25
|
+
width: 21px;
|
|
26
|
+
height: 21px;
|
|
27
|
+
}
|
|
28
|
+
.body {
|
|
29
|
+
min-width: 0;
|
|
30
|
+
}
|
|
31
|
+
.heading {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
flex-wrap: wrap;
|
|
35
|
+
gap: 10px;
|
|
36
|
+
}
|
|
37
|
+
.heading strong {
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
color: var(--fg);
|
|
41
|
+
overflow-wrap: anywhere;
|
|
42
|
+
}
|
|
43
|
+
.description {
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
color: var(--muted);
|
|
46
|
+
margin-top: 5px;
|
|
47
|
+
overflow-wrap: anywhere;
|
|
48
|
+
}
|
|
49
|
+
.metadata {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
gap: 14px 28px;
|
|
53
|
+
margin: 16px 0 0;
|
|
54
|
+
}
|
|
55
|
+
.metadata > div {
|
|
56
|
+
min-width: 0;
|
|
57
|
+
}
|
|
58
|
+
.metadata dt {
|
|
59
|
+
font-size: 11px;
|
|
60
|
+
color: var(--muted);
|
|
61
|
+
}
|
|
62
|
+
.metadata dd {
|
|
63
|
+
margin: 4px 0 0;
|
|
64
|
+
font-size: 12px;
|
|
65
|
+
color: var(--fg);
|
|
66
|
+
font-variant-numeric: tabular-nums;
|
|
67
|
+
overflow-wrap: anywhere;
|
|
68
|
+
}
|
|
69
|
+
.actions {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
gap: 6px;
|
|
73
|
+
justify-content: flex-end;
|
|
74
|
+
}
|
|
75
|
+
@media (max-width: 700px) {
|
|
76
|
+
.item {
|
|
77
|
+
grid-template-columns: 36px minmax(0, 1fr);
|
|
78
|
+
gap: 12px;
|
|
79
|
+
padding: 16px;
|
|
80
|
+
}
|
|
81
|
+
.icon {
|
|
82
|
+
width: 36px;
|
|
83
|
+
height: 36px;
|
|
84
|
+
}
|
|
85
|
+
.actions {
|
|
86
|
+
grid-column: 2;
|
|
87
|
+
}
|
|
88
|
+
.metadata {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
gap: 10px;
|
|
92
|
+
}
|
|
93
|
+
.metadata > div {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: baseline;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
gap: 12px;
|
|
98
|
+
}
|
|
99
|
+
.metadata dd {
|
|
100
|
+
margin: 0;
|
|
101
|
+
text-align: right;
|
|
102
|
+
}
|
|
103
|
+
}
|
package/components/Alert.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
tone?: "info" | "success" | "warning" | "danger" | "neutral";
|
|
4
|
-
title?: string;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
icon?: boolean | ReactNode;
|
|
7
|
-
action?: ReactNode;
|
|
8
|
-
onClose?(): void;
|
|
9
|
-
}): import("react").JSX.Element;
|
|
1
|
+
/** @deprecated Use Banner. Kept as an alias for existing published consumers. */
|
|
2
|
+
export { Banner as Alert } from "./Banner";
|
package/components/Alert.js
CHANGED
|
@@ -1,42 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Info, CircleCheck, TriangleAlert, CircleX, X } from "lucide-react";
|
|
3
|
-
import s from "./Alert.module.css";
|
|
4
|
-
function Alert({
|
|
5
|
-
tone = "info",
|
|
6
|
-
title,
|
|
7
|
-
children,
|
|
8
|
-
icon = true,
|
|
9
|
-
action,
|
|
10
|
-
onClose
|
|
11
|
-
}) {
|
|
12
|
-
const Icon = tone === "success" ? CircleCheck : tone === "warning" ? TriangleAlert : tone === "danger" ? CircleX : Info, color = tone === "success" ? "var(--success)" : tone === "warning" ? "var(--warning)" : tone === "danger" ? "var(--danger)" : tone === "neutral" ? "var(--muted)" : "var(--accent)";
|
|
13
|
-
return /* @__PURE__ */ jsxs(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
className: s.alert,
|
|
17
|
-
style: { "--alert-color": color },
|
|
18
|
-
role: tone === "danger" ? "alert" : "status",
|
|
19
|
-
children: [
|
|
20
|
-
icon && /* @__PURE__ */ jsx("span", { className: s.icon, children: icon === true ? /* @__PURE__ */ jsx(Icon, {}) : icon }),
|
|
21
|
-
/* @__PURE__ */ jsxs("div", { className: s.copy, children: [
|
|
22
|
-
title && /* @__PURE__ */ jsx("strong", { children: title }),
|
|
23
|
-
children && /* @__PURE__ */ jsx("div", { children })
|
|
24
|
-
] }),
|
|
25
|
-
action && /* @__PURE__ */ jsx("div", { className: s.action, children: action }),
|
|
26
|
-
onClose && /* @__PURE__ */ jsx(
|
|
27
|
-
"button",
|
|
28
|
-
{
|
|
29
|
-
type: "button",
|
|
30
|
-
className: s.close,
|
|
31
|
-
"aria-label": "\u5173\u95ED\u63D0\u793A",
|
|
32
|
-
onClick: onClose,
|
|
33
|
-
children: /* @__PURE__ */ jsx(X, {})
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
1
|
+
import { Banner } from "./Banner.js";
|
|
40
2
|
export {
|
|
41
|
-
Alert
|
|
3
|
+
Banner as Alert
|
|
42
4
|
};
|
package/components/AppShell.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { NavigationItem, NavigationGroup } from "./SidebarNavigation";
|
|
3
|
+
export type { NavigationGroup } from "./SidebarNavigation";
|
|
3
4
|
export type { NavigationItem } from "./SidebarNavigation";
|
|
4
5
|
export declare function ShellHeader({ title, collapsed, onToggle, onMenu, actions, windowControls, draggable, }: {
|
|
5
6
|
title: string;
|
|
@@ -10,14 +11,10 @@ export declare function ShellHeader({ title, collapsed, onToggle, onMenu, action
|
|
|
10
11
|
windowControls?: ReactNode;
|
|
11
12
|
draggable?: boolean;
|
|
12
13
|
}): import("react").JSX.Element;
|
|
13
|
-
export interface NavigationGroup {
|
|
14
|
-
id: string;
|
|
15
|
-
label?: string;
|
|
16
|
-
items: readonly NavigationItem[];
|
|
17
|
-
}
|
|
18
14
|
export interface AppShellProps {
|
|
19
15
|
navigation: readonly NavigationItem[];
|
|
20
16
|
navigationGroups?: readonly NavigationGroup[];
|
|
17
|
+
groupHeaderBold?: boolean;
|
|
21
18
|
settingsItem?: NavigationItem;
|
|
22
19
|
active: string;
|
|
23
20
|
title: string;
|
|
@@ -38,5 +35,8 @@ export interface AppShellProps {
|
|
|
38
35
|
expandedIds?: readonly string[];
|
|
39
36
|
defaultExpandedIds?: readonly string[];
|
|
40
37
|
onExpandedChange?(ids: string[]): void;
|
|
38
|
+
collapsedGroupIds?: readonly string[];
|
|
39
|
+
defaultCollapsedGroupIds?: readonly string[];
|
|
40
|
+
onCollapsedGroupsChange?(ids: string[]): void;
|
|
41
41
|
}
|
|
42
|
-
export declare function AppShell({ navigation, navigationGroups, settingsItem, active, title, collapsed, onCollapsedChange, onNavigate, children, headerActions, sidebarFooter, windowControls, draggable, brandName, brandIcon, brand, homePath, basePath, showHeader, expandedIds, defaultExpandedIds, onExpandedChange, }: AppShellProps): import("react").JSX.Element;
|
|
42
|
+
export declare function AppShell({ navigation, navigationGroups, groupHeaderBold, settingsItem, active, title, collapsed, onCollapsedChange, onNavigate, children, headerActions, sidebarFooter, windowControls, draggable, brandName, brandIcon, brand, homePath, basePath, showHeader, expandedIds, defaultExpandedIds, onExpandedChange, collapsedGroupIds, defaultCollapsedGroupIds, onCollapsedGroupsChange, }: AppShellProps): import("react").JSX.Element;
|
package/components/AppShell.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import { Layers2, Menu, PanelLeftClose, PanelLeftOpen } from "lucide-react";
|
|
8
8
|
import { Drawer } from "./Drawer.js";
|
|
9
9
|
import { IconButton } from "./IconButton.js";
|
|
10
|
-
import {
|
|
10
|
+
import { SideBar } from "./SideBar.js";
|
|
11
11
|
import s from "./AppShell.module.css";
|
|
12
12
|
function ShellHeader({
|
|
13
13
|
title,
|
|
@@ -59,6 +59,7 @@ function ShellHeader({
|
|
|
59
59
|
function AppShell({
|
|
60
60
|
navigation,
|
|
61
61
|
navigationGroups,
|
|
62
|
+
groupHeaderBold,
|
|
62
63
|
settingsItem,
|
|
63
64
|
active,
|
|
64
65
|
title,
|
|
@@ -78,7 +79,10 @@ function AppShell({
|
|
|
78
79
|
showHeader = true,
|
|
79
80
|
expandedIds,
|
|
80
81
|
defaultExpandedIds = [],
|
|
81
|
-
onExpandedChange
|
|
82
|
+
onExpandedChange,
|
|
83
|
+
collapsedGroupIds,
|
|
84
|
+
defaultCollapsedGroupIds = [],
|
|
85
|
+
onCollapsedGroupsChange
|
|
82
86
|
}) {
|
|
83
87
|
const [mobile, setMobile] = useState(false);
|
|
84
88
|
const [internalExpanded, setInternalExpanded] = useState(defaultExpandedIds);
|
|
@@ -87,6 +91,14 @@ function AppShell({
|
|
|
87
91
|
if (expandedIds === void 0) setInternalExpanded(ids);
|
|
88
92
|
onExpandedChange?.(ids);
|
|
89
93
|
};
|
|
94
|
+
const [internalGroups, setInternalGroups] = useState(
|
|
95
|
+
defaultCollapsedGroupIds
|
|
96
|
+
);
|
|
97
|
+
const collapsedGroups = collapsedGroupIds ?? internalGroups;
|
|
98
|
+
const collapseGroups = (ids) => {
|
|
99
|
+
if (collapsedGroupIds === void 0) setInternalGroups(ids);
|
|
100
|
+
onCollapsedGroupsChange?.(ids);
|
|
101
|
+
};
|
|
90
102
|
const scroll = useRef(null);
|
|
91
103
|
const base = basePath.replace(/^\/+|\/+$/g, ""), href = (path) => (base ? "/" + base : "") + (path.startsWith("/") ? path : "/" + path);
|
|
92
104
|
const navigate = (event, path) => {
|
|
@@ -100,29 +112,20 @@ function AppShell({
|
|
|
100
112
|
setMobile(false);
|
|
101
113
|
scroll.current?.scrollTo({ top: 0 });
|
|
102
114
|
}, [active]);
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
{
|
|
106
|
-
href: href(n.path),
|
|
107
|
-
"aria-current": active === n.id ? "page" : void 0,
|
|
108
|
-
title: collapsed ? n.label : void 0,
|
|
109
|
-
onClick: (event) => navigate(event, n.path),
|
|
110
|
-
children: [
|
|
111
|
-
n.icon,
|
|
112
|
-
/* @__PURE__ */ jsx("span", { children: n.label })
|
|
113
|
-
]
|
|
114
|
-
},
|
|
115
|
-
n.id
|
|
116
|
-
);
|
|
117
|
-
const tree = (items, compact) => /* @__PURE__ */ jsx(
|
|
118
|
-
SidebarNavigation,
|
|
115
|
+
const tree = (compact) => /* @__PURE__ */ jsx(
|
|
116
|
+
SideBar,
|
|
119
117
|
{
|
|
120
|
-
|
|
118
|
+
className: s.navigation,
|
|
119
|
+
items: navigation,
|
|
120
|
+
groups: navigationGroups,
|
|
121
|
+
groupHeaderBold,
|
|
121
122
|
active,
|
|
122
123
|
basePath,
|
|
123
124
|
compact,
|
|
124
125
|
expandedIds: expanded,
|
|
125
126
|
onExpandedChange: expand,
|
|
127
|
+
collapsedGroupIds: collapsedGroups,
|
|
128
|
+
onCollapsedGroupsChange: collapseGroups,
|
|
126
129
|
onNavigate: (path) => {
|
|
127
130
|
onNavigate(path);
|
|
128
131
|
setMobile(false);
|
|
@@ -143,21 +146,22 @@ function AppShell({
|
|
|
143
146
|
] })
|
|
144
147
|
}
|
|
145
148
|
),
|
|
146
|
-
|
|
147
|
-
"div",
|
|
148
|
-
{
|
|
149
|
-
className: s.navigationGroup,
|
|
150
|
-
role: "group",
|
|
151
|
-
"aria-label": group.label,
|
|
152
|
-
children: [
|
|
153
|
-
group.label && /* @__PURE__ */ jsx("div", { className: s.groupLabel, children: group.label }),
|
|
154
|
-
tree(group.items, compact)
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
group.id
|
|
158
|
-
)) : tree(navigation, compact) }),
|
|
149
|
+
tree(compact),
|
|
159
150
|
(settingsItem || sidebarFooter) && /* @__PURE__ */ jsxs("div", { className: s.bottom, children: [
|
|
160
|
-
settingsItem && /* @__PURE__ */ jsx(
|
|
151
|
+
settingsItem && /* @__PURE__ */ jsx(
|
|
152
|
+
SideBar,
|
|
153
|
+
{
|
|
154
|
+
label: "\u8BBE\u7F6E",
|
|
155
|
+
items: [settingsItem],
|
|
156
|
+
active,
|
|
157
|
+
compact,
|
|
158
|
+
basePath,
|
|
159
|
+
onNavigate: (path) => {
|
|
160
|
+
onNavigate(path);
|
|
161
|
+
setMobile(false);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
),
|
|
161
165
|
sidebarFooter
|
|
162
166
|
] })
|
|
163
167
|
] });
|