/** * * This file may have been modified by Bytedance Inc. (“Bytedance Inc.'s Modifications”). * All Bytedance Inc.'s Modifications are Copyright (year) Bytedance Inc.. * * This source code is licensed under the Apache license. * See LICENSE file in the project root for license information. * */ import * as React from 'react'; import { Option, OptGroup, SelectProps as RcSelectProps } from 'rc-select'; import { OptionProps } from 'rc-select/es/Option'; import { SizeType } from '../../config-provider/component/SizeContext'; import { loadMoreType } from './hooks'; declare type RawValue = string | number; export { OptionProps, loadMoreType }; export declare type OptionType = typeof Option; export interface LabeledValue { key?: string; value: RawValue; label: React.ReactNode; } export declare type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined; export interface InternalSelectProps extends Omit, 'mode'> { suffixIcon?: React.ReactNode; size?: SizeType; mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE'; bordered?: boolean; } export interface SelectProps extends Omit, 'inputIcon' | 'mode' | 'getInputElement' | 'backfill'> { mode?: 'multiple' | 'tags'; loadMore?: loadMoreType; loadMoreInitPage?: number; triggerRender?: () => JSX.Element; } export interface RefSelectProps { focus?: () => void; blur?: () => void; loadMoreReset: (page?: number) => void; } declare const SelectRef: (props: SelectProps & { ref?: ((instance: RefSelectProps | null) => void) | React.RefObject | null | undefined; }) => React.ReactElement React.ReactElement | null) | (new (props: any) => React.Component)>; declare type InternalSelectType = typeof SelectRef; interface SelectInterface extends InternalSelectType { SECRET_COMBOBOX_MODE_DO_NOT_USE: string; Option: typeof Option; OptGroup: typeof OptGroup; } declare const Select: SelectInterface; export default Select;