import { FC } from 'react'; import { type IconName } from '../icon'; import { type ListboxOption } from '../listbox'; import { type ToggletipProps } from '../toggletip'; import { type TooltipProps } from '../tooltip'; import { RequiredLabelProps } from '../label/label'; type Value = string | string[]; export type DropdownListOption = ListboxOption & { label: string; }; export interface DropdownListProps { /** * Aria label for the input (used when no visual label is present) */ ariaLabel?: string; className?: string; /** * @default false */ defaultOpen?: boolean; /** * The default selected option */ defaultValue?: Value; /** * Disables input */ disabled?: boolean; /** Disables default margin */ noMargin?: boolean; id?: string; label?: string; name?: string; options: DropdownListOption[]; required?: boolean; /** * @default 'text' */ requiredLabelType?: RequiredLabelProps['type']; readOnly?: boolean; tooltip?: TooltipProps; toggletip?: ToggletipProps; /** * Sets input validity */ valid?: boolean; /** * Sets error message * @default You must select an option */ validationErrorMessage?: string; /** * Set the selected value */ value?: Value; hint?: string; multiselect?: M; maxSelectableOptions?: number; /** * Display an icon inside the Dropdown control */ iconName?: IconName; /** * OnClose callback function, called when the dropdown is closed */ onClose?(): void; /** * OnChange callback function, invoked when options are selected */ onChange?(option: M extends true ? DropdownListOption[] : DropdownListOption): void; } export declare const DropdownList: FC>; export {};