import { type FC } from 'react'; import { ListboxOption } from '../listbox'; import { type ToggletipProps } from '../toggletip'; import { type TooltipProps } from '../tooltip'; import { type RequiredLabelProps } from '../label/label'; type Value = string | string[]; export type ComboboxOption = ListboxOption; export interface ComboboxProps { /** * If true, the input can have a value not included in the list of options */ allowCustomValue?: boolean; /** * Aria label for the input (used when no visual label is present) */ ariaLabel?: string; /** * If true, when the input value matches an option, that option is automatically selected */ autoSelectMatchingOption?: boolean; className?: string; /** * @default false */ defaultOpen?: boolean; /** * The default value and selected option */ defaultValue?: Value; /** * Disables the input */ disabled?: boolean; /** * If true, the options won't be filtered. * Use when the list of options is filtered externally. * @default false */ disableListFiltering?: boolean; /** * Text to display in the listbox when no options match the input value. * Used only when a custom value is not allowed. */ emptyListMessage?: string; /** * Disables the default margin */ noMargin?: boolean; id?: string; /** * @default false */ inlineAutoComplete?: boolean; isLoading?: boolean; label?: string; /** * If true, multiple options can be selected and displayed as tags */ multiselect?: boolean; name?: string; options: ComboboxOption[]; placeholder?: string; readOnly?: boolean; required?: boolean; /** * @default 'text' */ requiredLabelType?: RequiredLabelProps['type']; tooltip?: TooltipProps; toggletip?: ToggletipProps; /** * Sets input validity */ valid?: boolean; /** * Sets error message * @default You must select an option */ validationErrorMessage?: string; /** * Sets the selected value (makes the component controlled) */ value?: Value; hint?: string; portalContainer?: HTMLElement | null; /** * OnChange callback function, invoked when value/options change */ onChange?(value: string | ComboboxOption | ComboboxOption[]): void; onInputChange?(value: string): void; } export declare const Combobox: FC; export {};