import { FormValidator } from '@viasat/beam-shared/components/form'; import { InputSize } from '@viasat/beam-shared/components/input'; import { ThemeTypes } from '@viasat/beam-shared/utils'; import { ComponentPropsWithRef, FC, PropsWithoutRef, ReactNode } from 'react'; import { Option, OptionGroup, OptionGroupProps, OptionProps } from '../_Options'; export interface AutocompleteProps extends Omit, 'size'> { /** * Specify HelperText for Autocomplete */ helperText?: ReactNode; /** * Specify Label for Autocomplete */ label?: ReactNode; /** * Specify if Autocomplete is a required input * * @default false */ required?: boolean; /** * Specify if Autocomplete displays in a read-only state * * @default false */ readOnly?: boolean; /** * Specify if Autocomplete displays in a disabled state * * @default false */ disabled?: boolean; /** * Specify error text and display error state of a Autocomplete */ error?: boolean | string; /** * Specify if Autocomplete is fluid * * @default false */ fluid?: boolean; /** * Specify the size of Autocomplete * @default 'md' */ size?: InputSize; /** * Specify the width of Autocomplete */ width?: string; /** * Specify if the Autocomplete displays with an asterisk * * @default false */ hideRequiredMarker?: boolean; /** * Specify form validation rules for Autocomplete */ validationRules?: FormValidator[]; /** * Specify the theme of the Autocomplete. By default it inherits the theme from the parent */ theme?: ThemeTypes; /** * Sets the selection type to multiselect. Set this to true for multiselect, even if fully controlling selection state. This enables styles and accessibility properties to be set * * @default false */ multiple?: boolean; /** * Specify if the Autocomplete is clearable. Defaults to `true` if `multiple` is set, `false` otherwise * * @default true */ clearable?: boolean; /** * Specify content to display before selection */ contentBefore?: ReactNode; /** * Specify content to display after selection */ contentAfter?: ReactNode; /** * Add any combination of `Autocomplete.Option` and `Autocomplete.OptionGroup` components as children */ children: ReactNode; /** * Specify an accessible label for the Autocomplete */ ariaLabel?: string; /** * Specify a placeholder for the Autocomplete */ placeholder?: string; /** * Specify text to display when no options are available * * @default "No results found" */ noResultsText?: string; /** * When `true`, the chevron (dropdown arrow) indicator in the field is not rendered. Useful when the dropdown affordance is implied by surrounding UI or when the chevron is visually unwanted. * * @default false */ hideChevron?: boolean; /** * Provide a custom option filtering function. Receives the option props, the current search text, and (when the option is inside an `Autocomplete.OptionGroup`) the owning group's props. Return `true` to filter the option out, `false` to keep it visible. Defaults to internal case-insensitive label/value matching that ignores the group. */ optionFilter?: (option: OptionProps, searchText: string | null, group?: OptionGroupProps) => boolean; } declare const AutocompleteComponent: FC>; export declare const Autocomplete: typeof AutocompleteComponent & { Option: typeof Option; OptionGroup: typeof OptionGroup; }; export default Autocomplete;