analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
62 lines • 2.13 kB
TypeScript
export interface SearchSelectOption {
value: string;
label: string;
disabled?: boolean;
}
export interface SearchSelectPagination {
page: number;
limit?: number;
totalPages: number;
hasNext: boolean;
hasPrev?: boolean;
total: number;
}
export interface SearchSelectProps {
/** Current selected value */
value?: string;
/** Callback when value changes */
onValueChange?: (value: string) => void;
/** Options to display */
options: SearchSelectOption[];
/** Placeholder text when no value selected */
placeholder?: string;
/** Search input placeholder */
searchPlaceholder?: string;
/** Label for the select */
label?: string;
/** Helper text below the select */
helperText?: string;
/** Error message to display */
errorMessage?: string;
/** Whether the select is disabled */
disabled?: boolean;
/** Whether the select is in loading state */
loading?: boolean;
/** Size variant */
size?: 'small' | 'medium' | 'large';
/** Visual variant */
variant?: 'outlined' | 'underlined' | 'rounded';
/** Additional class name */
className?: string;
/** Text to show when no results found */
emptyText?: string;
/** Text to show when loading */
loadingText?: string;
/** Callback when search query changes (for async search) */
onSearch?: (query: string) => void;
/** Debounce delay for search in ms */
searchDebounce?: number;
/** Pagination info for infinite scroll */
pagination?: SearchSelectPagination;
/** Callback to load more items (can return Promise for auto-reset of loading state) */
onLoadMore?: () => void | Promise<void>;
/** Whether loading more items */
loadingMore?: boolean;
/** Custom ID */
id?: string;
/** Whether to filter options locally (default: true) */
filterLocally?: boolean;
}
export declare const SearchSelect: import("react").ForwardRefExoticComponent<SearchSelectProps & import("react").RefAttributes<HTMLButtonElement>>;
export default SearchSelect;
//# sourceMappingURL=SearchSelect.d.ts.map