import * as React from 'react'; import type { JSX } from 'react'; import type { SemanticClassName } from "../_util/classNameUtils"; import type { InputStatus } from "../_util/statusUtils"; import type { Variant } from '../config-provider'; import type { SizeType } from '../config-provider/SizeContext'; import type { ScrollbarProps } from '../scrollbar'; import type { TransitionProps } from '../transition'; import type { AlignType, BuildInPlacements } from '../trigger'; import type { ScrollConfig, ScrollTo } from '../virtual-list'; import type { BaseOptionType } from './interface'; import type { InnerSelectorProps } from './Selector'; export type RenderNode = React.ReactNode | ((props: any) => React.ReactNode); export type RenderDOMFunc = (props: any) => HTMLElement; export type Mode = 'multiple' | 'tags' | 'combobox'; export type Placement = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight'; export type RawValueType = string | number; export type DisplayInfoType = 'add' | 'remove' | 'clear'; export interface RefOptionListProps { onKeyDown: React.KeyboardEventHandler; onKeyUp: React.KeyboardEventHandler; scrollTo?: (args: number | ScrollConfig) => void; } export type CustomTagProps = { label: React.ReactNode; value: any; disabled: boolean; onClose: (event?: React.MouseEvent) => void; closable: boolean; }; export interface DisplayValueType { key?: React.Key; value?: RawValueType; label?: React.ReactNode; title?: string | number; disabled?: boolean; } export interface BaseSelectRef { focus: () => void; blur: () => void; scrollTo: ScrollTo; } export interface BaseSelectPrivateProps { id: string; prefixCls: string; omitDomProps?: string[]; displayValues: DisplayValueType[]; onDisplayValuesChange: (values: DisplayValueType[], info: { type: DisplayInfoType; values: DisplayValueType[]; }) => void; /** Current dropdown list active item string value */ activeValue?: string; /** Link search input with target element */ activeDescendantId?: string; onActiveValueChange?: (value: string | null) => void; searchValue: string; autoClearSearchValue?: boolean; /** Trigger onSearch, return false to prevent trigger open event */ onSearch: (searchValue: string, info: { source: 'typing' | 'effect' | 'submit' | 'blur-sm'; }) => void; /** Trigger when search text match the `tokenSeparators`. Will provide split content */ onSearchSplit?: (words: string[]) => void; OptionList: React.ForwardRefExoticComponent & React.RefAttributes>; /** Tell if provided `options` is empty */ emptyOptions: boolean; zIndex?: number; } export type BaseSelectPropsWithoutPrivate = Omit; export interface BaseSelectProps extends BaseSelectPrivateProps, React.AriaAttributes { className?: SemanticClassName<{ popup?: string; arrow?: string; option?: BaseOptionType['className']; selector?: InnerSelectorProps['className']; clear?: string; }, { open?: boolean; disabled?: boolean; }>; style?: React.CSSProperties; title?: string; showSearch?: boolean; tagRender?: (props: CustomTagProps) => React.ReactElement; maxLength?: number; tabIndex?: number; autoFocus?: boolean; notFoundContent?: React.ReactNode; placeholder?: React.ReactNode; onClear?: () => void; size?: SizeType; variant?: Variant; status?: InputStatus; mode?: Mode; disabled?: boolean; loading?: boolean; open?: boolean; defaultOpen?: boolean; onPopupOpenChange?: (open: boolean) => void; /** @private Internal usage. Do not use in your production. */ getInputElement?: () => JSX.Element; maxTagTextLength?: number; maxTagCount?: number | 'responsive'; maxTagPlaceholder?: React.ReactNode | ((omittedValues: DisplayValueType[]) => React.ReactNode); tokenSeparators?: string[]; allowClear?: boolean | { clearIcon?: RenderNode; }; suffixIcon?: RenderNode; /** Selector remove icon */ removeIcon?: RenderNode; transition?: Partial; popupMatchSelectWidth?: boolean | number; popupRender?: (menu: React.ReactElement) => React.ReactElement; popupAlign?: AlignType; placement?: Placement; builtinPlacements?: BuildInPlacements; getPopupContainer?: RenderDOMFunc; showAction?: ('focus' | 'click')[]; onBlur?: React.FocusEventHandler; onFocus?: React.FocusEventHandler; onKeyUp?: React.KeyboardEventHandler; onKeyDown?: React.KeyboardEventHandler; onMouseDown?: React.MouseEventHandler; onPopupScroll?: ScrollbarProps['onScroll']; onInputKeyDown?: React.KeyboardEventHandler; onMouseEnter?: React.MouseEventHandler; onMouseLeave?: React.MouseEventHandler; onClick?: React.MouseEventHandler; } export declare function isMultiple(mode?: Mode): boolean; declare const BaseSelect: React.ForwardRefExoticComponent>; export default BaseSelect;