@3mo/command-palette
Version:
Command-palettes are a common way to provide users with a list of actions they can perform in a given context.
35 lines • 1.43 kB
TypeScript
import { Component, type PropertyValues } from '@a11d/lit';
import { type CommandPaletteDataSource } from './CommandPaletteDataSource.js';
export declare class CommandPalette extends Component {
static readonly dataSources: Set<CommandPaletteDataSource<any>>;
static dataSource: () => <T>(Constructor: Constructor<CommandPaletteDataSource<T>>) => void;
private static _instance?;
private static get instance();
static open(): void;
popover: string;
keyword: string;
filteredDataSourceId?: string;
readonly dataSources: CommandPaletteDataSource<any>[];
private readonly searchField;
private readonly list?;
protected handleKeyDown(event: KeyboardEvent): void;
protected handleToggle(event: ToggleEvent): void;
protected handleClick(event: MouseEvent): void;
private readonly fetcherController;
private getInitialDataTemplate;
private getKeywordDataTemplate;
protected updated(props: PropertyValues<this>): void;
static get styles(): import("@a11d/lit").CSSResult;
protected get template(): import("lit-html").HTMLTemplateResult;
private get listTemplate();
private getSearchedTemplate;
private get newItemsTemplate();
private executeCommand;
private get guidanceTemplate();
}
declare global {
interface HTMLElementTagNameMap {
'eb-command-palette': CommandPalette;
}
}
//# sourceMappingURL=CommandPalette.d.ts.map