UNPKG

3.04 kBTypeScriptView Raw
1import type { Dayjs } from 'dayjs';
2import generatePicker from './generatePicker';
3import type { RangePickerProps as BaseRangePickerProps, PickerProps, PickerPropsWithMultiple } from './generatePicker/interface';
4export type DatePickerProps<ValueType = Dayjs | Dayjs> = PickerPropsWithMultiple<Dayjs, PickerProps<Dayjs>, ValueType>;
5export type MonthPickerProps<ValueType = Dayjs | Dayjs> = Omit<DatePickerProps<ValueType>, 'picker'>;
6export type WeekPickerProps<ValueType = Dayjs | Dayjs> = Omit<DatePickerProps<ValueType>, 'picker'>;
7export type RangePickerProps = BaseRangePickerProps<Dayjs>;
8declare const DatePicker: (<ValueType = Dayjs>(props: PickerPropsWithMultiple<Dayjs, PickerProps<Dayjs>, ValueType>) => import("react").ReactElement) & {
9 displayName?: string;
10} & {
11 displayName?: string;
12 WeekPicker: (<ValueType = Dayjs>(props: PickerPropsWithMultiple<Dayjs, Omit<PickerProps<Dayjs>, "picker">, ValueType>) => import("react").ReactElement) & {
13 displayName?: string;
14 };
15 MonthPicker: (<ValueType = Dayjs>(props: PickerPropsWithMultiple<Dayjs, Omit<PickerProps<Dayjs>, "picker">, ValueType>) => import("react").ReactElement) & {
16 displayName?: string;
17 };
18 YearPicker: (<ValueType = Dayjs>(props: PickerPropsWithMultiple<Dayjs, Omit<PickerProps<Dayjs>, "picker">, ValueType>) => import("react").ReactElement) & {
19 displayName?: string;
20 };
21 RangePicker: import("react").ForwardRefExoticComponent<Omit<import("rc-picker").RangePickerProps<Dayjs>, "locale" | "generateConfig" | "hideHeader"> & {
22 locale?: import("./generatePicker").PickerLocale;
23 size?: import("../button").ButtonSize;
24 placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
25 bordered?: boolean;
26 status?: import("../_util/statusUtils").InputStatus;
27 variant?: import("../config-provider").Variant;
28 dropdownClassName?: string;
29 popupClassName?: string;
30 rootClassName?: string;
31 popupStyle?: React.CSSProperties;
32 } & import("react").RefAttributes<import("rc-picker").PickerRef>>;
33 TimePicker: (<ValueType = Dayjs>(props: PickerPropsWithMultiple<Dayjs, Omit<import("./generatePicker/interface").GenericTimePickerProps<Dayjs>, "picker">, ValueType>) => import("react").ReactElement) & {
34 displayName?: string;
35 };
36 QuarterPicker: (<ValueType = Dayjs>(props: PickerPropsWithMultiple<Dayjs, Omit<PickerProps<Dayjs>, "picker">, ValueType>) => import("react").ReactElement) & {
37 displayName?: string;
38 };
39};
40export type DatePickerType = typeof DatePicker & {
41 _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
42 _InternalRangePanelDoNotUseOrYouWillBeFired: typeof PureRangePanel;
43 generatePicker: typeof generatePicker;
44};
45declare const PurePanel: (props: import("../_util/type").AnyObject) => import("react").JSX.Element;
46declare const PureRangePanel: (props: import("../_util/type").AnyObject) => import("react").JSX.Element;
47declare const _default: DatePickerType;
48export default _default;