import { FC, FocusEvent, ReactNode } from 'react'; import { OnChangeValue, Options } from 'react-select'; import { ResponsiveProp } from '../../types'; export declare type SimulatedEventPayloadType = { target: { name: string; value: OnChangeValue; }; }; export declare type SelectInputOptions = ReadonlyArray | Options; export interface SelectInputProps { /** * The id attribute of the input. */ id: string; /** * Custom content to be displayed above the input. If the label is hidden, will be used to set aria-label attribute. */ label: string; /** * Callback function to call on change event. */ onChange: (event: SimulatedEventPayloadType) => void; /** * Options for dropdown list. */ options: SelectInputOptions; /** * The value(s) of select. */ value: any | any[]; /** * Autofocus select input on render. */ autoFocus?: boolean; /** * Additional classes to add. */ className?: string; /** * Mark the input field as invalid and display a validation message. * Pass a string or node to render a validation message below the input. */ error?: ReactNode; /** * Additional clarifying text to help describe the input */ helpText?: ReactNode; /** * Visually hide the label. */ hideLabel?: boolean; /** * If the input value is clearable programmatically. */ isClearable?: boolean; /** * If the input should be disabled and not focusable. */ isDisabled?: boolean; /** * Is multi select enabled. */ isMulti?: boolean; /** * The required and aria-required attributes on the input */ isRequired?: boolean; /** * Select 'name' attribute. */ name?: string; /** * A ref to portal the dropdown menu to. This is useful when the dropdown is located in a smaller container * and we want to avoid cutting off the menu. */ menuPortalTarget?: HTMLElement; /** * Callback function to call on blur event. */ onBlur?: (event: FocusEvent) => void; /** * Callback function to call on focus event. */ onFocus?: (event: FocusEvent) => void; /** * Placeholder for input. */ placeholder?: string; /** * Visual indicator that the field is required, that gets appended to the label */ requiredIndicator?: ReactNode; /** * The size of the text input. */ size?: 'sm' | 'md' | 'lg' | ResponsiveProp<'sm' | 'md' | 'lg'>; /** * Additional props to be spread. These will be applied specifically to * the `react-select` component that powers the select. For full docs on * react-select props, [Click Here](https://react-select.com/props) */ [x: string]: any; } export declare const SelectInput: FC;