claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
58 lines • 1.68 kB
TypeScript
export interface SelectOption {
value: string;
label: string;
disabled?: boolean;
group?: string;
icon?: string;
description?: string;
html?: string;
data?: any;
}
type $$ComponentProps = {
id?: string;
name?: string;
value?: string | string[];
options?: (string | SelectOption)[];
placeholder?: string;
label?: string;
helperText?: string;
error?: string;
disabled?: boolean;
required?: boolean;
readonly?: boolean;
multiple?: boolean;
searchable?: boolean;
clearable?: boolean;
selectAll?: boolean;
virtualScroll?: boolean;
virtualItemHeight?: number;
maxHeight?: number;
loadOptions?: ((searchTerm: string) => Promise<SelectOption[]>) | null;
customRenderer?: ((option: SelectOption) => string) | null;
searchPlaceholder?: string;
noOptionsText?: string;
loadingText?: string;
size?: 'sm' | 'md' | 'lg';
class?: string;
'data-testid'?: string;
onchange?: ((event: {
value: string | string[];
option?: SelectOption;
selectAll?: boolean;
cleared?: boolean;
}) => void) | null;
onfocus?: ((event: FocusEvent) => void) | null;
onblur?: ((event: FocusEvent) => void) | null;
onopen?: (() => void) | null;
onclose?: (() => void) | null;
onkeydown?: ((event: KeyboardEvent) => void) | null;
};
declare const Select: import("svelte").Component<$$ComponentProps, {
focus: () => void;
blur: () => void;
open: () => void;
close: () => void;
}, "error" | "value">;
type Select = ReturnType<typeof Select>;
export default Select;
//# sourceMappingURL=Select.svelte.d.ts.map