import type { PickerBaseProps as RCPickerBaseProps, PickerDateProps as RCPickerDateProps, PickerTimeProps as RCPickerTimeProps, } from '../../vc-picker/Picker'; import type { RangePickerBaseProps as RCRangePickerBaseProps, RangePickerDateProps as RCRangePickerDateProps, RangePickerTimeProps as RCRangePickerTimeProps, } from '../../vc-picker/RangePicker'; import type { Locale as RcPickerLocale } from '../../vc-picker/interface'; import type { TimePickerLocale } from '../../time-picker'; import type { SizeType } from '../../config-provider'; type InjectDefaultProps = Omit< Props, | 'locale' | 'generateConfig' | 'prevIcon' | 'nextIcon' | 'superPrevIcon' | 'superNextIcon' | 'hideHeader' | 'components' > & { locale?: PickerLocale; size?: SizeType; bordered?: boolean; }; export type PickerLocale = { lang: RcPickerLocale & AdditionalPickerLocaleLangProps; timePickerLocale: TimePickerLocale; } & AdditionalPickerLocaleProps; export type AdditionalPickerLocaleProps = { dateFormat?: string; dateTimeFormat?: string; weekFormat?: string; monthFormat?: string; }; export type AdditionalPickerLocaleLangProps = { placeholder: string; yearPlaceholder?: string; quarterPlaceholder?: string; monthPlaceholder?: string; weekPlaceholder?: string; rangeYearPlaceholder?: [string, string]; rangeMonthPlaceholder?: [string, string]; rangeWeekPlaceholder?: [string, string]; rangePlaceholder?: [string, string]; }; // Picker Props export type PickerBaseProps = InjectDefaultProps>; export type PickerDateProps = InjectDefaultProps>; export type PickerTimeProps = InjectDefaultProps>; export type PickerProps = | PickerBaseProps | PickerDateProps | PickerTimeProps; // Range Picker Props export type RangePickerBaseProps = InjectDefaultProps>; export type RangePickerDateProps = InjectDefaultProps>; export type RangePickerTimeProps = InjectDefaultProps>; export type RangePickerProps = | RangePickerBaseProps | RangePickerDateProps | RangePickerTimeProps;