/** * * 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 { GenerateConfig } from '../../../../@ecom/rc-picker/es/generate'; import { PickerPanelBaseProps as RCPickerPanelBaseProps, PickerPanelDateProps as RCPickerPanelDateProps, PickerPanelTimeProps as RCPickerPanelTimeProps } from '../../../../@ecom/rc-picker/es/PickerPanel'; import zhCN from './locale/zh_CN'; declare type InjectDefaultProps = Omit & { locale?: typeof zhCN; size?: 'large' | 'default' | 'small'; }; export declare type PickerPanelBaseProps = InjectDefaultProps>; export declare type PickerPanelDateProps = InjectDefaultProps>; export declare type PickerPanelTimeProps = InjectDefaultProps>; export declare type PickerProps = PickerPanelBaseProps | PickerPanelDateProps | PickerPanelTimeProps; export declare type CalendarMode = 'year' | 'month'; export declare type HeaderRender = (config: { value: DateType; type: CalendarMode; onChange: (date: DateType) => void; onTypeChange: (type: CalendarMode) => void; }) => React.ReactNode; export interface CalendarProps { prefixCls?: string; className?: string; style?: React.CSSProperties; locale?: typeof zhCN; validRange?: [DateType, DateType]; disabledDate?: (date: DateType) => boolean; dateFullCellRender?: (date: DateType) => React.ReactNode; dateCellRender?: (date: DateType) => React.ReactNode; monthFullCellRender?: (date: DateType) => React.ReactNode; monthCellRender?: (date: DateType) => React.ReactNode; headerRender?: HeaderRender; value?: DateType; defaultValue?: DateType; mode?: CalendarMode; fullscreen?: boolean; onChange?: (date: DateType) => void; onPanelChange?: (date: DateType, mode: CalendarMode) => void; onSelect?: (date: DateType) => void; } declare function generateCalendar(generateConfig: GenerateConfig): (props: CalendarProps) => JSX.Element; export default generateCalendar;