import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; import { ComponentPropsWithoutRef, ReactNode, CSSProperties } from 'react'; import { c as BaseAppearance } from '../../types-961bd33013f0.mjs'; import '@radix-ui/react-context-menu'; interface AppShellSidebarClassNames { root?: string; header?: string; navigation?: string; footer?: string; } interface AppShellSidebarProps extends Omit, "children"> { /** * Primary navigation content. Routing, permissions and navigation state stay * with the consuming application. */ navigation: ReactNode; /** Optional content placed above the primary navigation. */ header?: ReactNode; /** Optional utility area kept separate from the primary navigation. */ footer?: ReactNode; /** Width override. Defaults to the component token, then 16rem. */ width?: CSSProperties["width"]; classNames?: AppShellSidebarClassNames; } /** * Persistent, outermost application navigation surface. * * This is intentionally a single shell component rather than a composition of * generic sidebar primitives. It owns the surface hierarchy while applications * retain routing and navigation behavior inside the semantic slots. */ declare const AppShellSidebar: React.ForwardRefExoticComponent>; type UserAccountMenuRadius = 'default' | 'full' | 'lg' | 'md' | 'none' | 'sm' | 'xl'; type UserAccountMenuSide = 'bottom' | 'left' | 'right' | 'top'; type UserAccountMenuTriggerVariant = 'avatar' | 'profile'; interface UserAccountMenuUser { avatarAlt?: string; avatarUrl?: string; initials?: string; name?: string; secondaryText?: ReactNode; } interface UserAccountMenuSelectorOption { disabled?: boolean; icon?: ReactNode; label: ReactNode; value: string; } interface UserAccountMenuSelectorConfig { contentWidthClassName?: string; disabled?: boolean; id?: string; icon?: ReactNode; label: ReactNode; onChange?: (value: string) => void; options: UserAccountMenuSelectorOption[]; value: string; visible?: boolean; } interface UserAccountMenuItem { disabled?: boolean; icon?: ReactNode; id: string; label: ReactNode; onSelect?: () => void; separatorBefore?: boolean; shortcut?: ReactNode; tone?: 'danger' | 'default'; visible?: boolean; } interface UserAccountMenuClassNames { avatar?: string; content?: string; dangerItem?: string; item?: string; itemIcon?: string; label?: string; root?: string; secondaryText?: string; separator?: string; subContent?: string; subTrigger?: string; trigger?: string; userName?: string; } interface UserAccountMenuProps { align?: 'center' | 'end' | 'start'; appearance?: BaseAppearance; ariaLabel?: string; className?: string; classNames?: UserAccountMenuClassNames; contentWidthClassName?: string; fallbackName?: string; items?: UserAccountMenuItem[]; menuRadius?: UserAccountMenuRadius; selectors?: UserAccountMenuSelectorConfig[]; side?: UserAccountMenuSide; sideOffset?: number; triggerEndIcon?: ReactNode; triggerTitle?: string; triggerVariant?: UserAccountMenuTriggerVariant; user: UserAccountMenuUser; } declare function UserAccountMenu({ align, appearance, ariaLabel, className, classNames, contentWidthClassName, fallbackName, items, menuRadius, selectors, side, sideOffset, triggerEndIcon, triggerTitle, triggerVariant, user, }: UserAccountMenuProps): react_jsx_runtime.JSX.Element; declare function cn(...inputs: (false | null | string | undefined)[]): string; interface NavButtonProps { /** 是否处于激活状态 */ active?: boolean; /** 是否显示但禁止交互 */ disabled?: boolean; /** 左侧图标 */ icon?: ReactNode; /** 右侧附加内容(如 chevron) */ postfix?: ReactNode; /** 点击回调 */ onClick?: () => void; className?: string; children: ReactNode; } declare function NavButton({ active, disabled, icon, postfix, onClick, className, children, }: NavButtonProps): react_jsx_runtime.JSX.Element; interface HeaderTab { id: string; label: string; } interface AppHeaderLogo { /** Logo 图片 URL,若为空则显示 fallback */ url?: string; /** 品牌名称 */ title: string; /** 点击 Logo 回调 */ onClick?: () => void; } interface AppHeaderUser { name?: string; email?: string; photo?: string; } interface AppHeaderProps { /** 品牌 Logo */ logo: AppHeaderLogo; /** 导航 tabs */ tabs?: HeaderTab[]; /** 当前激活的 tab id */ activeTab?: string; /** tab 切换回调 */ onTabChange?: (tabId: string) => void; /** 用户信息 */ user?: AppHeaderUser; /** 退出登录回调 */ onLogout?: () => void; /** 退出登录文案 */ logoutLabel?: string; /** 用户菜单中的额外菜单项(在退出登录按钮之前渲染) */ userMenuItems?: ReactNode; /** header 右侧额外内容 */ extra?: ReactNode; className?: string; } declare function AppHeader({ logo, tabs, activeTab, onTabChange, user, onLogout, logoutLabel, userMenuItems, extra, className, }: AppHeaderProps): react_jsx_runtime.JSX.Element; interface SidebarNavItem { id: string; label: string; icon?: ReactNode; disabled?: boolean; /** 如果有 children 则为分组,点击展开/折叠 */ children?: SidebarNavItem[]; } interface SidebarAccount { name?: string; photo?: string; } interface AppSidebarProps { /** Logo */ logo?: AppHeaderLogo; /** 导航菜单 */ navItems: SidebarNavItem[]; /** 当前路径/激活的 item id */ activeItemId?: string; /** 点击导航项回调 */ onNavigate?: (itemId: string) => void; /** 账户信息 */ account?: SidebarAccount; /** 退出登录回调 */ onLogout?: () => void; /** 退出登录文案 */ logoutLabel?: string; /** 底部额外内容(如版本号) */ footer?: ReactNode; /** 默认展开的分组 id 列表 */ defaultExpandedGroups?: string[]; className?: string; } declare function AppSidebar({ logo, navItems, activeItemId, onNavigate, account, onLogout, logoutLabel, footer, defaultExpandedGroups, className, }: AppSidebarProps): react_jsx_runtime.JSX.Element; interface AppLayoutProps { /** header 组件 */ header?: ReactNode; /** sidebar 组件 */ sidebar?: ReactNode; /** 主内容 */ children: ReactNode; /** 是否 flush 布局(无内边距) */ flush?: boolean; className?: string; } declare function AppLayout({ header, sidebar, children, flush, className, }: AppLayoutProps): react_jsx_runtime.JSX.Element; type NavigationMode = "headbar" | "sidebar"; type HeadbarLayoutMode = "boxed" | "full-bleed"; type HeadbarMenuRadius = "default" | "full" | "lg" | "md" | "none" | "sm" | "xl"; type HeadbarNavPosition = "center" | "left" | "right"; type HeadbarSurface = "card" | "ghost" | "glassy"; interface LayoutNavItem { id: string; label: ReactNode; headbarLabel?: ReactNode; icon?: ReactNode; children?: LayoutNavItem[]; disabled?: boolean; trailing?: ReactNode; headbarSecondaryAction?: ReactNode; } interface HeadbarLayout { brandTitle?: ReactNode; heightPx?: number; layoutMode?: HeadbarLayoutMode; menuRadius?: HeadbarMenuRadius; navPosition?: HeadbarNavPosition; surface?: HeadbarSurface; } interface NavigationLayoutProps { activeItemId?: string; activeRootId?: string; allowModeSwitch?: boolean; accountMenu?: ReactNode; children: ReactNode; className?: string; collapsedSidebarAccountMenu?: ReactNode; collapsedSidebarWidth?: string; contextualSidebar?: boolean; contextualSidebarHeader?: ReactNode; contextualSidebarWidth?: string; defaultMode?: NavigationMode; defaultSidebarCollapsed?: boolean; expandedSidebarWidth?: string; expandSidebarLabel?: string; flush?: boolean; headbarActions?: ReactNode; headbarLayout?: HeadbarLayout; logo?: AppHeaderLogo; mode?: NavigationMode; navItems: LayoutNavItem[]; onModeChange?: (mode: NavigationMode) => void; onNavigate?: (itemId: string) => void; onSidebarCollapsedChange?: (collapsed: boolean) => void; renderHeadbarExtra?: ReactNode; collapseSidebarLabel?: string; sidebarCollapsed?: boolean; sidebarAccountMenu?: ReactNode; sidebarFooter?: ReactNode; sidebarHeader?: ReactNode; switchToHeadbarLabel?: string; switchToSidebarLabel?: string; } interface NavigationHeadbarMenuProps { activeItemId?: string; activeRootId?: string; items: LayoutNavItem[]; menuRadius?: HeadbarMenuRadius; onNavigate?: (itemId: string) => void; } declare function NavigationHeadbarMenu({ activeItemId, activeRootId, items, menuRadius, onNavigate, }: NavigationHeadbarMenuProps): react_jsx_runtime.JSX.Element; interface NavigationHeadbarProps { activeItemId?: string; activeRootId?: string; actions?: ReactNode; accountMenu?: ReactNode; className?: string; extra?: ReactNode; layout?: HeadbarLayout; brand?: ReactNode; logo?: AppHeaderLogo; navigation?: ReactNode; navItems?: LayoutNavItem[]; onNavigate?: (itemId: string) => void; } declare function NavigationHeadbar({ activeItemId, activeRootId, actions, accountMenu, className, extra, layout, brand, logo, navigation, navItems, onNavigate, }: NavigationHeadbarProps): react_jsx_runtime.JSX.Element; declare function NavigationLayout({ activeItemId, activeRootId, allowModeSwitch, accountMenu, children, className, collapsedSidebarAccountMenu, collapsedSidebarWidth, contextualSidebar, contextualSidebarHeader, contextualSidebarWidth, defaultMode, defaultSidebarCollapsed, expandedSidebarWidth, expandSidebarLabel, flush, headbarActions, headbarLayout, logo, mode, navItems, onModeChange, onNavigate, onSidebarCollapsedChange, renderHeadbarExtra, collapseSidebarLabel, sidebarCollapsed: controlledSidebarCollapsed, sidebarAccountMenu, sidebarFooter, sidebarHeader, switchToHeadbarLabel, switchToSidebarLabel, }: NavigationLayoutProps): react_jsx_runtime.JSX.Element; export { AppHeader, type AppHeaderLogo, type AppHeaderProps, type AppHeaderUser, AppLayout, type AppLayoutProps, AppShellSidebar, type AppShellSidebarClassNames, type AppShellSidebarProps, AppSidebar, type AppSidebarProps, type HeadbarLayout, type HeadbarLayoutMode, type HeadbarMenuRadius, type HeadbarNavPosition, type HeadbarSurface, type HeaderTab, type LayoutNavItem, NavButton, type NavButtonProps, NavigationHeadbar, NavigationHeadbarMenu, type NavigationHeadbarMenuProps, type NavigationHeadbarProps, NavigationLayout, type NavigationLayoutProps, type NavigationMode, type SidebarAccount, type SidebarNavItem, UserAccountMenu, type UserAccountMenuClassNames, type UserAccountMenuItem, type UserAccountMenuProps, type UserAccountMenuRadius, type UserAccountMenuSelectorConfig, type UserAccountMenuSelectorOption, type UserAccountMenuSide, type UserAccountMenuTriggerVariant, type UserAccountMenuUser, cn };