vxui-react 1.2.0 → 1.2.3
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 +1 -1
- package/dist/index.cjs +49 -29
- package/dist/index.js +2969 -2760
- package/dist/src/components/AppShell.d.ts +3 -1
- package/dist/src/components/Shell.d.ts +3 -1
- package/dist/src/components/mobile/BottomNav.d.ts +8 -0
- package/dist/src/components/mobile/MobileDrawer.d.ts +5 -1
- package/dist/vxui-react.css +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@ export interface AppShellProps {
|
|
|
15
15
|
navItems?: AppShellNavItem[];
|
|
16
16
|
navSections?: AppShellNavSection[];
|
|
17
17
|
sidebarCollapsed?: boolean;
|
|
18
|
+
/** Configuration for the minimum and exact width of the sidebar (number as px, or CSS string). */
|
|
19
|
+
sidebarWidth?: number | string;
|
|
18
20
|
mobileNavOpen?: boolean;
|
|
19
21
|
density?: 'comfortable' | 'compact';
|
|
20
22
|
onSidebarToggle?: () => void;
|
|
@@ -28,4 +30,4 @@ export interface AppShellProps {
|
|
|
28
30
|
sidebarFooter?: ReactNode;
|
|
29
31
|
children: ReactNode;
|
|
30
32
|
}
|
|
31
|
-
export declare function AppShell({ brand, brandCaption, brandIcon, topbarRef, breadcrumb, title, description, navItems, navSections, sidebarCollapsed, mobileNavOpen, onSidebarToggle, onMobileNavToggle, onSidebarClick, menuButtonLabel, sidebarCollapseLabel, sidebarExpandLabel, sidebarCloseLabel, density, headerActions, sidebarFooter, children, }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function AppShell({ brand, brandCaption, brandIcon, topbarRef, breadcrumb, title, description, navItems, navSections, sidebarCollapsed, sidebarWidth, mobileNavOpen, onSidebarToggle, onMobileNavToggle, onSidebarClick, menuButtonLabel, sidebarCollapseLabel, sidebarExpandLabel, sidebarCloseLabel, density, headerActions, sidebarFooter, children, }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,10 +21,12 @@ export interface ShellProps {
|
|
|
21
21
|
collapsed?: boolean;
|
|
22
22
|
mobileNavOpen?: boolean;
|
|
23
23
|
density?: 'comfortable' | 'compact';
|
|
24
|
+
/** Optional: Configure sidebar width via string (e.g., "18rem") or number (e.g., 280 for px) */
|
|
25
|
+
sidebarWidth?: number | string;
|
|
24
26
|
className?: string;
|
|
25
27
|
children: ReactNode;
|
|
26
28
|
}
|
|
27
|
-
export declare function Shell({ collapsed, mobileNavOpen, density, className, children }: ShellProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function Shell({ collapsed, mobileNavOpen, density, sidebarWidth, className, children }: ShellProps): import("react/jsx-runtime").JSX.Element;
|
|
28
30
|
export interface ShellSidebarProps {
|
|
29
31
|
brand?: string;
|
|
30
32
|
brandCaption?: string;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
export interface BottomNavSubMenuItem {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
onSelect?: () => void;
|
|
7
|
+
}
|
|
2
8
|
export interface BottomNavItem {
|
|
3
9
|
key: string;
|
|
4
10
|
label: string;
|
|
@@ -7,6 +13,8 @@ export interface BottomNavItem {
|
|
|
7
13
|
badge?: string | number;
|
|
8
14
|
active?: boolean;
|
|
9
15
|
onSelect?: () => void;
|
|
16
|
+
/** 子菜单项,有值时点击 item 将弹出子菜单而非直接触发 onSelect */
|
|
17
|
+
submenu?: BottomNavSubMenuItem[];
|
|
10
18
|
}
|
|
11
19
|
export interface BottomNavProps {
|
|
12
20
|
items: BottomNavItem[];
|
|
@@ -22,6 +22,10 @@ export interface DrawerNavItemProps {
|
|
|
22
22
|
export declare function DrawerNavItem({ icon, label, badge, active, onClick }: DrawerNavItemProps): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export interface DrawerNavSectionProps {
|
|
24
24
|
title?: string;
|
|
25
|
+
/** 是否可折叠,默认 false */
|
|
26
|
+
collapsible?: boolean;
|
|
27
|
+
/** 初始展开状态,collapsible=true 时有效,默认 true */
|
|
28
|
+
defaultOpen?: boolean;
|
|
25
29
|
children: ReactNode;
|
|
26
30
|
}
|
|
27
|
-
export declare function DrawerNavSection({ title, children }: DrawerNavSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function DrawerNavSection({ title, collapsible, defaultOpen, children }: DrawerNavSectionProps): import("react/jsx-runtime").JSX.Element;
|