import { BaseInputProps } from '../../common/types/input'; import { SelectItem } from '../select/Select'; import { SelectValueTypeConstraint } from '../select/selectCommonTypes'; import { SelectHTMLAttributes, type CSSProperties } from 'react'; type BaseProps = Omit, 'children' | 'defaultValue' | 'onChange' | 'value'> & Pick & { /** The selectable items. Can be nested one level to create groups. */ feItems: SelectItem[]; /** If provided, alters the z-index on the menu */ feLayer?: CSSProperties['zIndex']; /** If provided, sets value of css `max-height` property */ feListHeight?: CSSProperties['maxHeight']; /** If provided, sets the text of the input when nothing is selected */ fePlaceholder?: string; /** If provided, displays an alternative size */ feSize?: 'md' | 'sm'; }; type SingleProps = BaseProps & { /** Sets an initial value for the input */ defaultValue?: T; multiple: false; /** Callback that fires each time the selection changes */ onChange?: (value: T) => void; /** Sets the value of the input. Makes the component controlled. */ value?: T | null; }; type MultiProps = BaseProps & { /** Sets an initial value for the input. */ defaultValue?: T[]; /** If true, hides the selection tags shown below select when `multiple` is true */ feHideSelectionTags?: boolean; /** If provided, alters the text shown in select when selecting multiple items */ feMultiSelectionText?: string; /** If provided, sets the text shown next to selection tags when `multiple` is true */ feSelectionTagsText?: string; multiple: true; /** Callback that fires each time the selection changes. */ onChange?: (value: T[]) => void; /** Sets the value of the input. Makes the component controlled. */ value?: T[]; }; export type SelectFieldProps = MultiProps | SingleProps; declare const SelectField: { (props: SelectFieldProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export default SelectField;