import { BaseSurfaceMode } from '../../base-surface/src/types'; import { TxIconSource } from '../../icon'; export type CommandPaletteClassValue = string | string[] | Record; export interface CommandPaletteItem { id: string; title: string; description?: string; keywords?: string[]; icon?: TxIconSource | string; shortcut?: string; disabled?: boolean; } export interface CommandPaletteProps { modelValue: boolean; commands?: CommandPaletteItem[]; placeholder?: string; emptyText?: string; maxHeight?: number; autoFocus?: boolean; closeOnSelect?: boolean; overlayClass?: CommandPaletteClassValue; panelClass?: CommandPaletteClassValue; /** Search text. Completes the `v-model:query` pair; omit to leave the palette uncontrolled. */ query?: string; /** Accessible name for the palette's `role="dialog"` and command listbox. @default 'Command palette' */ ariaLabel?: string; /** Material of the panel. @default 'refraction' */ surface?: BaseSurfaceMode; /** Colour laid under the material; follows the theme by default. */ surfaceColor?: string; /** Opacity of that colour (0–1): 0.96 under `mask`, 0.5 under the other materials. */ surfaceOpacity?: number; } export interface CommandPaletteEmits { (e: 'update:modelValue', value: boolean): void; (e: 'select', item: CommandPaletteItem): void; (e: 'open'): void; (e: 'close'): void; (e: 'update:query', value: string): void; }