fluent-svelte-updated
Version:
Forked from https://github.com/vegardlarsen/fluent-svelte. A faithful implementation of Microsoft's Fluent Design System in Svelte.
69 lines (68 loc) • 2.31 kB
TypeScript
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
$$bindings?: Bindings;
} & Exports;
(internal: unknown, props: Props & {
$$events?: Events;
$$slots?: Slots;
}): Exports & {
$set?: any;
$on?: any;
};
z_$$bindings?: Bindings;
}
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
default: any;
} ? Props extends Record<string, never> ? any : {
children?: any;
} : {});
/**
* Use a combo box (also known as a drop-down list) to present a list of items that a user can select from. A combo box starts in a compact state and expands to show a list of selectable items.
*
* When the combo box is closed, it either displays the current selection or is empty if there is no selected item. When the user expands the combo box, it displays the list of selectable items.
* [Docs](https://fluent-svelte.vercel.app/docs/components/combobox)
*
* - Usage:
* ```tsx
* <ComboBox items={[
* { name: "Item 0", value: 0 },
* { name: "Item 1", value: 1 },
* { name: "Item 2", value: 2 },
* ]} />
* ```
*/
declare const ComboBox: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
[x: string]: any;
value?: any;
searchValue?: any;
placeholder?: string;
items?: {
name: string;
value: any;
disabled?: boolean;
}[];
editable?: boolean;
disabled?: boolean;
open?: boolean;
class?: string;
inputElement?: HTMLInputElement;
searchInputElement?: HTMLInputElement;
containerElement?: HTMLDivElement;
menuElement?: HTMLUListElement;
buttonElement?: HTMLButtonElement;
}, {
default: {};
}>, {
change: CustomEvent<any>;
input: CustomEvent<any>;
beforeinput: CustomEvent<any>;
open: CustomEvent<any>;
close: CustomEvent<any>;
select: CustomEvent<any>;
} & {
[evt: string]: CustomEvent<any>;
}, {
default: {};
}, {}, string>;
type ComboBox = InstanceType<typeof ComboBox>;
export default ComboBox;