import { BaseTextFieldProps } from '@mui/material'; import { Component, Key, FocusEvent } from 'react'; import { GroupBase, Props as ReactSelectProps, SelectComponentsConfig, StylesConfig, } from 'react-select'; import { CreatableProps } from 'react-select/creatable'; export interface SelectOption { label: string; value: any; } export type SelectProps = | (ReactSelectProps & SelectCommonProps) | (CreatableProps & SelectCommonProps); interface SelectCommonProps { components?: SelectComponentsConfig>; isClearable?: boolean; isCreatable?: boolean; isDisabled?: boolean; msgNoOptionsAvailable?: string; msgNoOptionsMatchFilter?: string; msgNoValidValue?: string; styles?: StylesConfig; } export interface ReactSelectMaterialUiProps extends Omit { defaltValue?: T; defaultValues?: T[]; key?: Key; options: string[] | SelectOption[]; onBlur?: (event: FocusEvent) => void; onChange: (value: T | T[], option?: SelectOption | SelectOption[]) => void; onFocus?: (event: FocusEvent) => void; ref?: any; SelectProps?: SelectProps | any; value?: T; values?: T[]; } type Omit = Pick>; declare class ReactSelectMaterialUi extends Component {} declare class SingleSelect extends Component {} declare class MultipleSelect extends Component {} declare class TagSelect extends Component {} declare class TagsSelect extends Component {} declare class ColorSelect extends Component {} declare class ColorsSelect extends Component {} declare module 'react-select-material-ui' {} export default ReactSelectMaterialUi; export { SingleSelect, MultipleSelect, TagSelect, TagsSelect, ColorSelect, ColorsSelect, };