import type { PickerRef, PickerProps as RcPickerProps, RangePickerProps as RcRangePickerProps } from '@rc-component/picker'; import type { Locale as RcPickerLocale } from '@rc-component/picker/interface'; import type { SemanticClassNamesType, SemanticStylesType } from '../../_util/hooks'; import type { InputStatus } from '../../_util/statusUtils'; import type { AnyObject } from '../../_util/type'; import type { Variant } from '../../config-provider'; import type { SizeType } from '../../config-provider/SizeContext'; import type { TimePickerLocale } from '../../time-picker'; declare const _DataPickerPlacements: readonly ["bottomLeft", "bottomRight", "topLeft", "topRight"]; type DataPickerPlacement = (typeof _DataPickerPlacements)[number]; export type DatePickerSemanticName = keyof DatePickerSemanticClassNames & keyof DatePickerSemanticStyles; export type DatePickerPanelSemanticName = keyof DatePickerPanelSemanticClassNames & keyof DatePickerPanelSemanticStyles; export type DatePickerSemanticClassNames = { root?: string; prefix?: string; input?: string; suffix?: string; }; export type DatePickerSemanticStyles = { root?: React.CSSProperties; prefix?: React.CSSProperties; input?: React.CSSProperties; suffix?: React.CSSProperties; }; export type DatePickerPanelSemanticClassNames = { root?: string; header?: string; body?: string; content?: string; item?: string; footer?: string; container?: string; }; export type DatePickerPanelSemanticStyles = { root?: React.CSSProperties; header?: React.CSSProperties; body?: React.CSSProperties; content?: React.CSSProperties; item?: React.CSSProperties; footer?: React.CSSProperties; container?: React.CSSProperties; }; export type DatePickerClassNamesType

= SemanticClassNamesType, DatePickerSemanticClassNames, { popup?: string | DatePickerPanelSemanticClassNames; }>; export type DatePickerStylesType

= SemanticStylesType, DatePickerSemanticStyles, { popup?: DatePickerPanelSemanticStyles; }>; export type PickerLocale = { lang: RcPickerLocale & AdditionalPickerLocaleLangProps; timePickerLocale: TimePickerLocale; } & AdditionalPickerLocaleProps; /** @deprecated **Useless**. */ export type AdditionalPickerLocaleProps = { /** * @deprecated **Invalid**, Please use `lang.fieldDateFormat` instead. * @see [Migration Guide](https://github.com/ant-design/ant-design/discussions/53011) */ dateFormat?: string; /** * @deprecated **Invalid**, Please use `lang.fieldDateTimeFormat` instead, * @see [Migration Guide](https://github.com/ant-design/ant-design/discussions/53011) */ dateTimeFormat?: string; /** * @deprecated **Invalid**, Please use `lang.fieldWeekFormat` instead, * @see [Migration Guide](https://github.com/ant-design/ant-design/discussions/53011) */ weekFormat?: string; /** * @deprecated **Invalid**, Please use `lang.fieldWeekFormat` instead, * @see [Migration Guide](https://github.com/ant-design/ant-design/discussions/53011) */ monthFormat?: string; }; export type AdditionalPickerLocaleLangProps = { placeholder: string; yearPlaceholder?: string; quarterPlaceholder?: string; monthPlaceholder?: string; weekPlaceholder?: string; rangeYearPlaceholder?: [string, string]; rangeQuarterPlaceholder?: [string, string]; rangeMonthPlaceholder?: [string, string]; rangeWeekPlaceholder?: [string, string]; rangePlaceholder?: [string, string]; }; export type PickerClassNames = Omit, 'popup'> & { popup?: string | NonNullable['popup']; }; export type DatePickerPickerClassNames = DatePickerClassNamesType; export type RequiredSemanticPicker = Readonly<[ classNames: DatePickerSemanticClassNames & { popup: DatePickerPanelSemanticClassNames; }, styles: DatePickerSemanticStyles & { popup: DatePickerPanelSemanticStyles; } ]>; export type InjectDefaultProps = Omit & { locale?: PickerLocale; size?: SizeType; placement?: DataPickerPlacement; /** @deprecated Use `variant` instead */ bordered?: boolean; status?: InputStatus; /** * @since 5.13.0 * @default "outlined" */ variant?: Variant; /** * @deprecated `dropdownClassName` is deprecated which will be removed in next major * version.Please use `classNames.popup.root` instead. */ dropdownClassName?: string; /** * @deprecated please use `classNames.popup.root` instead */ popupClassName?: string; rootClassName?: string; /** * @deprecated please use `styles.popup.root` instead */ popupStyle?: React.CSSProperties; classNames?: DatePickerPickerClassNames; styles?: DatePickerStylesType; }; /** Base Single Picker props */ export type PickerProps = InjectDefaultProps>; /** Base Range Picker props */ export type RangePickerProps = InjectDefaultProps>; export type GenericTimePickerProps = Omit, 'picker' | 'showTime'> & { /** @deprecated Please use `onCalendarChange` instead */ onSelect?: (value: DateType) => void; }; type MultiValueType = IsMultiple extends true ? ValueType[] : ValueType; /** * Single Picker has the `multiple` prop, * which will make the `value` be `DateType[]` type. * Here to be a generic which accept the `ValueType` for developer usage. */ export type PickerPropsWithMultiple = PickerProps, ValueType = DateType, IsMultiple extends boolean = false> = Omit & React.RefAttributes & { multiple?: IsMultiple; defaultValue?: MultiValueType | null; value?: MultiValueType | null; onChange?: (date: MultiValueType | null, dateString: MultiValueType | null) => void; onOk?: (date: MultiValueType) => void; }; export {};