Package: @lilith/admin-shell Split from: lilith/ui.git or lilith/build.git Publish workflow: calls lilith/workflows/.forgejo/workflows/publish-npm.yml@main
61 lines
No EOL
1.7 KiB
TypeScript
61 lines
No EOL
1.7 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
/**
|
|
* A single navigation item in the sidebar.
|
|
*/
|
|
export interface NavItem {
|
|
/** Route path */
|
|
to: string;
|
|
/** Display label */
|
|
label: string;
|
|
/** Optional description for tooltips/accessibility */
|
|
description?: string;
|
|
/** Optional icon identifier (for future icon support) */
|
|
icon?: string;
|
|
}
|
|
/**
|
|
* A section of navigation items in the sidebar.
|
|
*/
|
|
export interface NavSection {
|
|
/** Section title displayed in sidebar */
|
|
title: string;
|
|
/** Navigation items in this section */
|
|
items: NavItem[];
|
|
/** Optional section-level metadata */
|
|
meta?: {
|
|
/** Section description */
|
|
description?: string;
|
|
/** Whether section should be collapsible (future feature) */
|
|
collapsible?: boolean;
|
|
/** Default collapsed state (future feature) */
|
|
defaultCollapsed?: boolean;
|
|
};
|
|
}
|
|
/**
|
|
* Logo configuration for the admin shell.
|
|
*/
|
|
export interface LogoConfig {
|
|
/** Main title displayed in logo area */
|
|
title: string;
|
|
/** Subtitle displayed below title */
|
|
subtitle: string;
|
|
/** Optional badge text (e.g., "Dev Only") */
|
|
badge?: string;
|
|
/** Badge variant for styling */
|
|
badgeVariant?: 'warning' | 'info' | 'success' | 'error';
|
|
}
|
|
/**
|
|
* Props for the AdminShell component.
|
|
*/
|
|
export interface AdminShellProps {
|
|
/** Logo configuration */
|
|
logo: LogoConfig;
|
|
/** Navigation sections to render in sidebar */
|
|
navigation: NavSection[];
|
|
/** Optional footer text */
|
|
footerText?: string;
|
|
/** Optional accent color for active states (defaults to theme primary) */
|
|
accentColor?: 'primary' | 'accent';
|
|
/** Main content to render */
|
|
children: ReactNode;
|
|
}
|
|
//# sourceMappingURL=types.d.ts.map
|