aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
160 lines • 3.31 kB
TypeScript
import React from "react";
export interface CommandItem {
/**
* Unique identifier
*/
id: string;
/**
* Display label
*/
label: string;
/**
* Search keywords
*/
keywords?: string[];
/**
* Item description
*/
description?: string;
/**
* Category/group
*/
category?: string;
/**
* Icon component
*/
icon?: React.ReactNode;
/**
* Keyboard shortcut
*/
shortcut?: string;
/**
* Action to execute
*/
action?: () => void;
/**
* Whether item is disabled
*/
disabled?: boolean;
/**
* Custom component to render
*/
component?: React.ComponentType<{
item: CommandItem;
isSelected: boolean;
}>;
}
export interface CommandGroup {
/**
* Group identifier
*/
id: string;
/**
* Group label
*/
label: string;
/**
* Items in group
*/
items: CommandItem[];
/**
* Group priority for sorting
*/
priority?: number;
}
export interface GlassCommandPaletteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
/**
* Command items (flat list or grouped)
*/
items?: CommandItem[];
/**
* Grouped command items
*/
groups?: CommandGroup[];
/**
* Whether the palette is open
*/
open?: boolean;
/**
* Callback when open state changes
*/
onOpenChange?: (open: boolean) => void;
/**
* Callback when command is selected
*/
onSelect?: (item: CommandItem) => void;
/**
* Search placeholder text
*/
placeholder?: string;
/**
* Empty state message
*/
emptyMessage?: string;
/**
* Maximum number of results to show
*/
maxResults?: number;
/**
* Enable recent commands tracking
*/
enableRecents?: boolean;
/**
* Recent commands storage key
*/
recentsKey?: string;
/**
* Maximum number of recent items
*/
maxRecents?: number;
/**
* Custom filter function
*/
filter?: (item: CommandItem, search: string) => boolean;
/**
* Custom sort function
*/
sort?: (a: CommandItem, b: CommandItem) => number;
/**
* Enable fuzzy search
*/
fuzzySearch?: boolean;
/**
* Show categories
*/
showCategories?: boolean;
/**
* Show shortcuts
*/
showShortcuts?: boolean;
/**
* Modal backdrop blur
*/
backdropBlur?: boolean;
/**
* Close on escape key
*/
closeOnEscape?: boolean;
/**
* Close on select
*/
closeOnSelect?: boolean;
/**
* Custom loading state
*/
loading?: boolean;
/**
* Loading message
*/
loadingMessage?: string;
className?: string;
"data-testid"?: string;
"aria-label"?: string;
}
/**
* GlassCommandPalette component
* Modal command palette with search, keyboard navigation, and glassmorphism styling
*/
export declare const GlassCommandPalette: React.ForwardRefExoticComponent<GlassCommandPaletteProps & React.RefAttributes<HTMLDivElement>>;
export type { CommandGroup as GlassCommandGroup, CommandItem as GlassCommandItem, };
//# sourceMappingURL=GlassCommandPalette.d.ts.map