@zjpcy/simple-design 1.2.3 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/Anchor/index.js +1 -1
- package/dist/es/Button/Button.js +1 -1
- package/dist/es/Carousel/index.js +1 -0
- package/dist/es/Cascader/index.js +1 -1
- package/dist/es/Checkbox/index.js +1 -0
- package/dist/es/DatePicker/RangePicker.js +1 -0
- package/dist/es/DatePicker/index.js +1 -0
- package/dist/es/DatePicker/styles.js +1 -0
- package/dist/es/Drawer/index.js +1 -0
- package/dist/es/Dropdown/index.js +1 -1
- package/dist/es/Form/index.js +1 -1
- package/dist/es/Grid/index.js +1 -0
- package/dist/es/Grid/styles.js +1 -0
- package/dist/es/Hooks/useClickOutside.js +1 -0
- package/dist/es/Input/InputBase.js +1 -1
- package/dist/es/Input/Number.js +1 -1
- package/dist/es/Input/Password.js +1 -0
- package/dist/es/Input/Textarea.js +1 -0
- package/dist/es/Input/index.js +1 -1
- package/dist/es/Label/styles.js +1 -1
- package/dist/es/Layout/LayoutContext.js +1 -0
- package/dist/es/Layout/index.js +1 -0
- package/dist/es/Layout/styles.js +1 -0
- package/dist/es/Menu/index.js +1 -1
- package/dist/es/Message/Message.js +1 -1
- package/dist/es/Message/index.js +1 -1
- package/dist/es/Modal/index.js +1 -1
- package/dist/es/Notice/Notice.js +1 -1
- package/dist/es/Pagination/index.js +1 -1
- package/dist/es/Popconfirm/index.js +1 -0
- package/dist/es/Progress/index.js +1 -0
- package/dist/es/Radio/index.js +1 -1
- package/dist/es/Select/index.js +1 -1
- package/dist/es/Select/styles.js +1 -0
- package/dist/es/Slider/index.js +1 -1
- package/dist/es/Switch/styles.js +1 -1
- package/dist/es/Table/SortableRow.js +1 -0
- package/dist/es/Table/index.js +1 -1
- package/dist/es/Tag/index.js +1 -0
- package/dist/es/TimePicker/RangePicker.js +1 -0
- package/dist/es/TimePicker/TimePickerPanel.js +1 -0
- package/dist/es/TimePicker/index.js +1 -0
- package/dist/es/Tooltip/Tooltip.js +1 -1
- package/dist/es/Tree/index.js +1 -0
- package/dist/es/index.css +1 -1
- package/dist/es/index.js +1 -1
- package/dist/types/components/Button/Button.d.ts +3 -2
- package/dist/types/components/Carousel/index.d.ts +5 -0
- package/dist/types/components/Carousel/styles.d.ts +12 -0
- package/dist/types/components/Carousel/types.d.ts +72 -0
- package/dist/types/components/DatePicker/RangePicker.d.ts +4 -0
- package/dist/types/components/DatePicker/index.d.ts +9 -0
- package/dist/types/components/DatePicker/styles.d.ts +186 -0
- package/dist/types/components/DatePicker/types.d.ts +228 -0
- package/dist/types/components/Drawer/index.d.ts +6 -0
- package/dist/types/components/Drawer/styles.d.ts +0 -0
- package/dist/types/components/Drawer/types.d.ts +71 -0
- package/dist/types/components/Grid/index.d.ts +14 -0
- package/dist/types/components/Grid/styles.d.ts +22 -0
- package/dist/types/components/Grid/types.d.ts +49 -0
- package/dist/types/components/Input/AutoComplete.d.ts +0 -0
- package/dist/types/components/Input/InputBase.d.ts +4 -0
- package/dist/types/components/Input/Password.d.ts +13 -0
- package/dist/types/components/Input/Textarea.d.ts +51 -0
- package/dist/types/components/Input/index.d.ts +6 -2
- package/dist/types/components/Layout/LayoutContext.d.ts +15 -0
- package/dist/types/components/Layout/index.d.ts +86 -0
- package/dist/types/components/Layout/styles.d.ts +40 -0
- package/dist/types/components/Layout/types.d.ts +112 -0
- package/dist/types/components/Menu/index.d.ts +8 -1
- package/dist/types/components/Menu/styles.d.ts +7 -0
- package/dist/types/components/Menu/types.d.ts +56 -7
- package/dist/types/components/Message/types.d.ts +2 -1
- package/dist/types/components/Modal/types.d.ts +4 -0
- package/dist/types/components/Notice/Notice.d.ts +4 -1
- package/dist/types/components/Pagination/types.d.ts +15 -3
- package/dist/types/components/Popconfirm/index.d.ts +6 -0
- package/dist/types/components/Popconfirm/types.d.ts +30 -0
- package/dist/types/components/Progress/index.d.ts +6 -0
- package/dist/types/components/Progress/styles.d.ts +0 -0
- package/dist/types/components/Progress/types.d.ts +59 -0
- package/dist/types/components/Select/index.d.ts +25 -6
- package/dist/types/components/Select/styles.d.ts +45 -0
- package/dist/types/components/Select/types.d.ts +120 -27
- package/dist/types/components/Table/SortableRow.d.ts +26 -0
- package/dist/types/components/Table/index.d.ts +5 -1
- package/dist/types/components/Tag/index.d.ts +6 -0
- package/dist/types/components/Tag/styles.d.ts +52 -0
- package/dist/types/components/Tag/types.d.ts +46 -0
- package/dist/types/components/TimePicker/RangePicker.d.ts +4 -0
- package/dist/types/components/TimePicker/TimePickerPanel.d.ts +4 -0
- package/dist/types/components/TimePicker/index.d.ts +10 -0
- package/dist/types/components/TimePicker/styles.d.ts +33 -0
- package/dist/types/components/TimePicker/types.d.ts +151 -0
- package/dist/types/components/Tree/index.d.ts +12 -0
- package/dist/types/components/Tree/styles.d.ts +54 -0
- package/dist/types/components/Tree/types.d.ts +202 -0
- package/dist/types/components/index.d.ts +20 -2
- package/dist/variables.css +39 -0
- package/package.json +2 -1
- package/dist/es/Navigation/index.js +0 -1
- package/dist/types/components/Navigation/index.d.ts +0 -5
- package/dist/types/components/Navigation/types.d.ts +0 -43
package/dist/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as Cascader}from"./Cascader/index.js";export{default as TreeSelect}from"./TreeSelect/index.js";export{default as ColorPicker}from"./ColorPicker/index.js";export{default as CopyToClipboard,useOnCopy as useCopy}from"./CopyToClipboard/index.js";export{default as Divider}from"./Divider/index.js";export{default as Empty}from"./Empty/index.js";export{default as Flex}from"./Flex/index.js";export{default as Icon}from"./Icon/Icon.js";export{default as Input}from"./Input/index.js";export{default as Marquee}from"./Marquee/index.js";export{MessageProvider,message,useMessage}from"./Message/index.js";export{default as Modal}from"./Modal/index.js";export{default as Notice}from"./Notice/Notice.js";export{default as Notification}from"./Notification/Notification.js";export{default as Radio}from"./Radio/index.js";export{default as Select}from"./Select/index.js";export{default as Table}from"./Table/index.js";export{default as Top}from"./Top/index.js";export{default as Typography}from"./Typography/index.js";export{default as Masonry}from"./Masonry/index.js";export{default as Space}from"./Space/index.js";export{default as Anchor}from"./Anchor/index.js";export{default as Breadcrumb}from"./Breadcrumb/index.js";export{default as I18nProvider,load18n,useI18n}from"./src/i18n/I18nProvider.js";import"./src/i18n/index.js";export{default as Dropdown}from"./Dropdown/index.js";export{default as Menu}from"./Menu/index.js";export{default as Pagination}from"./Pagination/index.js";export{default as
|
|
1
|
+
export{default as Carousel}from"./Carousel/index.js";export{default as Cascader}from"./Cascader/index.js";export{default as TreeSelect}from"./TreeSelect/index.js";export{default as ColorPicker}from"./ColorPicker/index.js";export{default as CopyToClipboard,useOnCopy as useCopy}from"./CopyToClipboard/index.js";export{default as Divider}from"./Divider/index.js";export{default as Empty}from"./Empty/index.js";export{default as Flex}from"./Flex/index.js";export{default as Icon}from"./Icon/Icon.js";export{default as Input}from"./Input/index.js";export{default as Marquee}from"./Marquee/index.js";export{MessageProvider,message,useMessage}from"./Message/index.js";export{default as Modal}from"./Modal/index.js";export{default as Notice}from"./Notice/Notice.js";export{default as Notification}from"./Notification/Notification.js";export{default as Radio}from"./Radio/index.js";export{default as Select}from"./Select/index.js";export{default as Table}from"./Table/index.js";export{default as Top}from"./Top/index.js";export{default as Typography}from"./Typography/index.js";export{default as Masonry}from"./Masonry/index.js";export{default as Space}from"./Space/index.js";export{default as Anchor}from"./Anchor/index.js";export{default as Breadcrumb}from"./Breadcrumb/index.js";export{default as I18nProvider,load18n,useI18n}from"./src/i18n/I18nProvider.js";import"./src/i18n/index.js";export{default as Dropdown}from"./Dropdown/index.js";export{default as Menu}from"./Menu/index.js";export{default as Pagination}from"./Pagination/index.js";export{default as Rate}from"./Rate/index.js";export{default as Slider}from"./Slider/index.js";export{default as Steps}from"./Steps/index.js";export{default as Switch}from"./Switch/index.js";export{default as Tabs}from"./Tabs/index.js";export{default as Transfer}from"./Transfer/index.js";export{default as Label}from"./Label/index.js";export{default as Layout}from"./Layout/index.js";export{default as Form}from"./Form/index.js";export{Col,default as Grid,Row}from"./Grid/index.js";export{default as Drawer}from"./Drawer/index.js";export{default as Checkbox}from"./Checkbox/index.js";export{default as Tag}from"./Tag/index.js";export{default as Popconfirm}from"./Popconfirm/index.js";export{default as Progress}from"./Progress/index.js";export{default as TimePicker}from"./TimePicker/index.js";export{default as DatePicker}from"./DatePicker/index.js";export{default as Tree}from"./Tree/index.js";export{default as Message}from"./Message/Message.js";export{default as i18n}from"./node_modules/i18next/dist/esm/i18next.js";export{default as Button}from"./Button/Button.js";export{default as Textarea}from"./Input/Textarea.js";export{default as Tooltip}from"./Tooltip/Tooltip.js";
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import './Button.css';
|
|
3
3
|
export interface ButtonProps {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
|
|
5
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'link';
|
|
6
6
|
size?: 'small' | 'medium' | 'large';
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
loading?: boolean;
|
|
@@ -11,6 +11,7 @@ export interface ButtonProps {
|
|
|
11
11
|
style?: React.CSSProperties;
|
|
12
12
|
icon?: string | React.ReactNode;
|
|
13
13
|
type?: 'button' | 'submit' | 'reset';
|
|
14
|
+
href?: string;
|
|
14
15
|
}
|
|
15
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<
|
|
16
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
|
|
16
17
|
export default Button;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { CarouselArrowPosition, CarouselIndicatorPosition } from './types';
|
|
3
|
+
export declare const carouselStyle: CSSProperties;
|
|
4
|
+
export declare const carouselTrackStyle: (direction: "horizontal" | "vertical") => CSSProperties;
|
|
5
|
+
export declare const carouselItemStyle: CSSProperties;
|
|
6
|
+
export declare const getIndicatorContainerStyle: (position: CarouselIndicatorPosition, direction: "horizontal" | "vertical") => CSSProperties;
|
|
7
|
+
export declare const indicatorStyle: (active: boolean, position: CarouselIndicatorPosition) => CSSProperties;
|
|
8
|
+
export declare const getArrowContainerStyle: (position: CarouselArrowPosition, _direction: "horizontal" | "vertical") => CSSProperties;
|
|
9
|
+
export declare const arrowRightStyle: CSSProperties;
|
|
10
|
+
export declare const carouselCardStyle: (index: number, activeIndex: number, cardNumber: number, cardSpacing: number) => CSSProperties;
|
|
11
|
+
export declare const fadeItemStyle: CSSProperties;
|
|
12
|
+
export declare const fadeActiveItemStyle: CSSProperties;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CarouselInfoPosition = 'bottom' | 'top' | 'left' | 'right' | 'center';
|
|
3
|
+
export interface CarouselItem {
|
|
4
|
+
/** 唯一标识 */
|
|
5
|
+
key: string;
|
|
6
|
+
/** 图片地址 */
|
|
7
|
+
image: string;
|
|
8
|
+
/** 标题 */
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
/** 描述 */
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
/** 点击跳转链接 */
|
|
13
|
+
link?: string;
|
|
14
|
+
/** 自定义渲染内容 */
|
|
15
|
+
render?: () => React.ReactNode;
|
|
16
|
+
/** 文案位置 */
|
|
17
|
+
infoPosition?: CarouselInfoPosition;
|
|
18
|
+
}
|
|
19
|
+
export type CarouselEffect = 'slide' | 'fade' | 'flip' | 'cards' | 'creative' | 'coverflow' | 'parallax' | 'zoom' | 'book' | 'curtain' | 'mosaic' | 'rain';
|
|
20
|
+
export type CarouselDirection = 'horizontal' | 'vertical';
|
|
21
|
+
export type CarouselIndicatorPosition = 'bottom' | 'top' | 'left' | 'right' | 'center';
|
|
22
|
+
export type CarouselArrowPosition = 'inside' | 'outside' | 'none';
|
|
23
|
+
export interface CarouselProps {
|
|
24
|
+
/** 轮播数据 */
|
|
25
|
+
items: CarouselItem[];
|
|
26
|
+
/** 当前激活的索引 */
|
|
27
|
+
currentIndex?: number;
|
|
28
|
+
/** 默认激活的索引 */
|
|
29
|
+
defaultCurrentIndex?: number;
|
|
30
|
+
/** 切换时的回调 */
|
|
31
|
+
onChange?: (index: number) => void;
|
|
32
|
+
/** 是否自动播放 */
|
|
33
|
+
autoplay?: boolean;
|
|
34
|
+
/** 自动播放间隔(ms) */
|
|
35
|
+
interval?: number;
|
|
36
|
+
/** 切换动画效果 */
|
|
37
|
+
effect?: CarouselEffect;
|
|
38
|
+
/** 切换方向 */
|
|
39
|
+
direction?: CarouselDirection;
|
|
40
|
+
/** 是否显示指示器 */
|
|
41
|
+
showIndicators?: boolean;
|
|
42
|
+
/** 指示器位置 */
|
|
43
|
+
indicatorPosition?: CarouselIndicatorPosition;
|
|
44
|
+
/** 是否显示箭头 */
|
|
45
|
+
showArrows?: boolean;
|
|
46
|
+
/** 是否循环播放 */
|
|
47
|
+
loop?: boolean;
|
|
48
|
+
/** 是否暂停在hover时 */
|
|
49
|
+
pauseOnHover?: boolean;
|
|
50
|
+
/** 自定义类名 */
|
|
51
|
+
className?: string;
|
|
52
|
+
/** 自定义样式 */
|
|
53
|
+
style?: React.CSSProperties;
|
|
54
|
+
/** 内容区域类名 */
|
|
55
|
+
contentClassName?: string;
|
|
56
|
+
/** 内容区域样式 */
|
|
57
|
+
contentStyle?: React.CSSProperties;
|
|
58
|
+
/** 图片点击事件 */
|
|
59
|
+
onItemClick?: (item: CarouselItem, index: number) => void;
|
|
60
|
+
/** 切换动画时长(ms) */
|
|
61
|
+
duration?: number;
|
|
62
|
+
/** 自定义左箭头图标 */
|
|
63
|
+
prevIcon?: React.ReactNode;
|
|
64
|
+
/** 自定义右箭头图标 */
|
|
65
|
+
nextIcon?: React.ReactNode;
|
|
66
|
+
/** 自定义上箭头图标(垂直方向) */
|
|
67
|
+
upIcon?: React.ReactNode;
|
|
68
|
+
/** 自定义下箭头图标(垂直方向) */
|
|
69
|
+
downIcon?: React.ReactNode;
|
|
70
|
+
/** 是否启用指示器进度动画(自动播放时显示进度) */
|
|
71
|
+
indicatorProgress?: boolean;
|
|
72
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import RangePicker from './RangePicker';
|
|
3
|
+
import './DatePicker.css';
|
|
4
|
+
import { DatePickerProps } from './types';
|
|
5
|
+
declare const DatePicker: React.FC<DatePickerProps> & {
|
|
6
|
+
RangePicker: typeof RangePicker;
|
|
7
|
+
};
|
|
8
|
+
export default DatePicker;
|
|
9
|
+
export type { DatePickerProps, DateRangePickerProps, DateFormat, CalendarPanelProps, CalendarHeaderProps, DateCellProps } from './types';
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/** 日期选择器容器 */
|
|
2
|
+
export declare const DatePickerContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
width?: string | number;
|
|
4
|
+
minWidth?: string | number;
|
|
5
|
+
}>> & string;
|
|
6
|
+
/** 触发器容器 */
|
|
7
|
+
export declare const DatePickerTrigger: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
8
|
+
focused?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
size?: string;
|
|
11
|
+
}>> & string;
|
|
12
|
+
/** 日期显示值 */
|
|
13
|
+
export declare const DatePickerValue: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
14
|
+
isPlaceholder?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}>> & string;
|
|
17
|
+
/** 后缀图标区域 */
|
|
18
|
+
export declare const DatePickerSuffix: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
19
|
+
/** 清除按钮 */
|
|
20
|
+
export declare const DatePickerClear: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
21
|
+
/** 日历图标 */
|
|
22
|
+
export declare const DatePickerIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
23
|
+
/** 下拉面板 */
|
|
24
|
+
export declare const DatePickerDropdown: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
25
|
+
top: number;
|
|
26
|
+
left: number;
|
|
27
|
+
minWidth?: number;
|
|
28
|
+
}>> & string;
|
|
29
|
+
/** 日历面板 */
|
|
30
|
+
export declare const CalendarPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
31
|
+
/** 日历头部 */
|
|
32
|
+
export declare const CalendarHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
33
|
+
/** 头部左侧区域 */
|
|
34
|
+
export declare const HeaderLeft: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
35
|
+
/** 头部中间区域 */
|
|
36
|
+
export declare const HeaderCenter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
37
|
+
/** 头部右侧区域 */
|
|
38
|
+
export declare const HeaderRight: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
39
|
+
/** 头部按钮 */
|
|
40
|
+
export declare const HeaderButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
41
|
+
/** 年份/月份选择器 */
|
|
42
|
+
export declare const HeaderSelect: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>> & string;
|
|
43
|
+
/** 日历内容区域 */
|
|
44
|
+
export declare const CalendarBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
45
|
+
/** 星期标题行 */
|
|
46
|
+
export declare const WeekHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
47
|
+
/** 星期标题 */
|
|
48
|
+
export declare const WeekDay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
49
|
+
/** 日期网格 */
|
|
50
|
+
export declare const DateGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
51
|
+
/** 日期单元格 */
|
|
52
|
+
export declare const DateCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
53
|
+
isSelected?: boolean;
|
|
54
|
+
isInSelectedSet?: boolean;
|
|
55
|
+
isToday?: boolean;
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
isCurrentMonth?: boolean;
|
|
58
|
+
}>> & string;
|
|
59
|
+
/** 日历底部 */
|
|
60
|
+
export declare const CalendarFooter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
61
|
+
/** 日历底部占位元素(用于保持确定按钮位置统一) */
|
|
62
|
+
export declare const CalendarFooterSpacer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
63
|
+
/** 日历底部按钮组 */
|
|
64
|
+
export declare const CalendarFooterActions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
65
|
+
/** 底部按钮 */
|
|
66
|
+
export declare const FooterButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
67
|
+
variant?: "primary" | "default";
|
|
68
|
+
}>> & string;
|
|
69
|
+
/** 标签容器 */
|
|
70
|
+
export declare const LabelContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
71
|
+
gap?: string | number;
|
|
72
|
+
}>> & string;
|
|
73
|
+
/** 标签文本 */
|
|
74
|
+
export declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
75
|
+
/** 年份选择器面板 */
|
|
76
|
+
export declare const YearPickerPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
77
|
+
/** 年份网格 */
|
|
78
|
+
export declare const YearGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
79
|
+
/** 月份选择器面板 */
|
|
80
|
+
export declare const MonthPickerPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
81
|
+
/** 月份网格 */
|
|
82
|
+
export declare const MonthGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
83
|
+
/** 月份单元格 */
|
|
84
|
+
export declare const MonthCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
85
|
+
isSelected?: boolean;
|
|
86
|
+
isInSelectedSet?: boolean;
|
|
87
|
+
isCurrentMonth?: boolean;
|
|
88
|
+
}>> & string;
|
|
89
|
+
/** 年份单元格 */
|
|
90
|
+
export declare const YearCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
91
|
+
isSelected?: boolean;
|
|
92
|
+
isInSelectedSet?: boolean;
|
|
93
|
+
isCurrentYear?: boolean;
|
|
94
|
+
}>> & string;
|
|
95
|
+
/** 季度选择器面板 */
|
|
96
|
+
export declare const QuarterPickerPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
97
|
+
/** 季度网格 */
|
|
98
|
+
export declare const QuarterGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
99
|
+
/** 季度单元格 */
|
|
100
|
+
export declare const QuarterCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
101
|
+
isSelected?: boolean;
|
|
102
|
+
isInSelectedSet?: boolean;
|
|
103
|
+
isCurrentQuarter?: boolean;
|
|
104
|
+
}>> & string;
|
|
105
|
+
/** ==================== 日期范围选择器样式 ==================== */
|
|
106
|
+
/** 范围选择器容器 */
|
|
107
|
+
export declare const DateRangePickerContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
108
|
+
width?: string | number;
|
|
109
|
+
}>> & string;
|
|
110
|
+
/** 范围选择器触发器 */
|
|
111
|
+
export declare const DateRangePickerTrigger: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
112
|
+
focused?: boolean;
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
size?: string;
|
|
115
|
+
}>> & string;
|
|
116
|
+
/** 范围选择器输入框 */
|
|
117
|
+
export declare const DateRangePickerInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
118
|
+
active?: boolean;
|
|
119
|
+
}>> & string;
|
|
120
|
+
/** 范围选择器值显示 */
|
|
121
|
+
export declare const DateRangePickerValue: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
122
|
+
isPlaceholder?: boolean;
|
|
123
|
+
}>> & string;
|
|
124
|
+
/** 范围选择器分隔符 */
|
|
125
|
+
export declare const DateRangePickerSeparator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
126
|
+
/** 范围选择器后缀区域 */
|
|
127
|
+
export declare const DateRangePickerSuffix: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
128
|
+
/** 范围选择器清除按钮 */
|
|
129
|
+
export declare const DateRangePickerClear: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
130
|
+
/** 范围选择器图标 */
|
|
131
|
+
export declare const DateRangePickerIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
132
|
+
/** 范围选择器下拉面板 */
|
|
133
|
+
export declare const DateRangePickerDropdown: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
134
|
+
top: number;
|
|
135
|
+
left: number;
|
|
136
|
+
}>> & string;
|
|
137
|
+
/** 范围选择器双面板容器 */
|
|
138
|
+
export declare const DateRangePickerPanels: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
139
|
+
/** 范围选择器日历面板 */
|
|
140
|
+
export declare const DateRangePickerCalendar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
141
|
+
/** 范围选择器日历头部 */
|
|
142
|
+
export declare const DateRangePickerCalendarHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
143
|
+
/** 范围选择器日历头部左侧 */
|
|
144
|
+
export declare const DateRangePickerHeaderLeft: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
145
|
+
/** 范围选择器日历头部中间 */
|
|
146
|
+
export declare const DateRangePickerHeaderCenter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
147
|
+
/** 范围选择器日历头部右侧 */
|
|
148
|
+
export declare const DateRangePickerHeaderRight: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
149
|
+
/** 范围选择器日历头部按钮 */
|
|
150
|
+
export declare const DateRangePickerHeaderButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
151
|
+
/** 范围选择器日历头部标签 */
|
|
152
|
+
export declare const DateRangePickerHeaderLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
153
|
+
/** 范围选择器日历内容区域 */
|
|
154
|
+
export declare const DateRangePickerCalendarBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
155
|
+
/** 范围选择器星期标题行 */
|
|
156
|
+
export declare const DateRangePickerWeekHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
157
|
+
/** 范围选择器星期标题 */
|
|
158
|
+
export declare const DateRangePickerWeekDay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
159
|
+
/** 范围选择器日期网格 */
|
|
160
|
+
export declare const DateRangePickerDateGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
161
|
+
/** 范围选择器日期单元格 */
|
|
162
|
+
export declare const DateRangePickerDateCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
163
|
+
isSelected?: boolean;
|
|
164
|
+
isToday?: boolean;
|
|
165
|
+
isCurrentMonth?: boolean;
|
|
166
|
+
isInRange?: boolean;
|
|
167
|
+
isRangeStart?: boolean;
|
|
168
|
+
isRangeEnd?: boolean;
|
|
169
|
+
disabled?: boolean;
|
|
170
|
+
}>> & string;
|
|
171
|
+
/** 范围选择器底部 */
|
|
172
|
+
export declare const DateRangePickerFooter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
173
|
+
/** 范围选择器底部占位 */
|
|
174
|
+
export declare const DateRangePickerFooterSpacer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
175
|
+
/** 范围选择器底部按钮组 */
|
|
176
|
+
export declare const DateRangePickerFooterActions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
177
|
+
/** 范围选择器底部按钮 */
|
|
178
|
+
export declare const DateRangePickerFooterButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
179
|
+
variant?: "primary" | "default";
|
|
180
|
+
}>> & string;
|
|
181
|
+
/** 范围选择器标签容器 */
|
|
182
|
+
export declare const DateRangePickerLabelContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
183
|
+
gap?: string | number;
|
|
184
|
+
}>> & string;
|
|
185
|
+
/** 范围选择器标签 */
|
|
186
|
+
export declare const DateRangePickerLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** 日期格式类型 */
|
|
3
|
+
export type DateFormat = 'YYYY-MM-DD' | 'YYYY/MM/DD' | 'DD-MM-YYYY' | 'MM/DD/YYYY';
|
|
4
|
+
/** 选择器类型 */
|
|
5
|
+
export type PickerType = 'date' | 'month' | 'quarter' | 'year';
|
|
6
|
+
/** 日期选择器属性 */
|
|
7
|
+
export interface DatePickerProps {
|
|
8
|
+
/** 尺寸,可选 'small' | 'middle' | 'large',默认 'middle' */
|
|
9
|
+
size?: 'small' | 'middle' | 'large';
|
|
10
|
+
/** 当前值(单选时为字符串,多选时为逗号分隔的字符串) */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** 默认值(单选时为字符串,多选时为逗号分隔的字符串) */
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
/** 值改变时的回调(单选时返回字符串,多选时返回逗号分隔的字符串) */
|
|
15
|
+
onChange?: (date: string) => void;
|
|
16
|
+
/** 占位符 */
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
/** 是否禁用 */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** 只读 */
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
/** 自定义类名 */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** 自定义样式 */
|
|
25
|
+
style?: React.CSSProperties;
|
|
26
|
+
/** 宽度 */
|
|
27
|
+
width?: string | number;
|
|
28
|
+
/** 日期格式,默认 'YYYY-MM-DD' */
|
|
29
|
+
format?: DateFormat;
|
|
30
|
+
/** 是否显示清除按钮 */
|
|
31
|
+
allowClear?: boolean;
|
|
32
|
+
/** 禁用日期的函数 */
|
|
33
|
+
disabledDate?: (date: Date) => boolean;
|
|
34
|
+
/** 不可选择的日期 */
|
|
35
|
+
disabledDates?: string[];
|
|
36
|
+
/** 标签 */
|
|
37
|
+
label?: string | React.ReactNode;
|
|
38
|
+
/** 标签到输入框的距离 */
|
|
39
|
+
labelGap?: string | number;
|
|
40
|
+
/** 标签的CSS类名 */
|
|
41
|
+
labelClassName?: string;
|
|
42
|
+
/** 标签的样式 */
|
|
43
|
+
labelStyle?: React.CSSProperties;
|
|
44
|
+
/** 面板打开状态改变时的回调 */
|
|
45
|
+
onOpenChange?: (open: boolean) => void;
|
|
46
|
+
/** 是否打开面板(受控) */
|
|
47
|
+
open?: boolean;
|
|
48
|
+
/** 显示今天的按钮 */
|
|
49
|
+
showToday?: boolean;
|
|
50
|
+
/** 显示确定的按钮 */
|
|
51
|
+
showOk?: boolean;
|
|
52
|
+
/** 选择器类型,可选 'date' | 'month' | 'quarter' | 'year',默认 'date' */
|
|
53
|
+
picker?: PickerType;
|
|
54
|
+
/** 是否显示时间选择,仅在 picker='date' 时有效 */
|
|
55
|
+
showTime?: boolean;
|
|
56
|
+
/** 是否支持多选,默认 false */
|
|
57
|
+
multiple?: boolean;
|
|
58
|
+
/** 多选时最多可选数量,默认无限制 */
|
|
59
|
+
maxTagCount?: number;
|
|
60
|
+
/** 多选时最多显示几个tag,超过显示...+n模式,默认无限制 */
|
|
61
|
+
maxTagDisplayCount?: number;
|
|
62
|
+
/** 多选时值的连接符,默认 ',' */
|
|
63
|
+
separator?: string;
|
|
64
|
+
}
|
|
65
|
+
/** 日历面板属性 */
|
|
66
|
+
export interface CalendarPanelProps {
|
|
67
|
+
/** 当前选中的值 */
|
|
68
|
+
value?: string;
|
|
69
|
+
/** 多选时当前选中的值列表 */
|
|
70
|
+
selectedValues?: string[];
|
|
71
|
+
/** 值改变时的回调 */
|
|
72
|
+
onChange?: (date: string) => void;
|
|
73
|
+
/** 日期格式 */
|
|
74
|
+
format: DateFormat;
|
|
75
|
+
/** 禁用日期的函数 */
|
|
76
|
+
disabledDate?: (date: Date) => boolean;
|
|
77
|
+
/** 不可选择的日期 */
|
|
78
|
+
disabledDates?: string[];
|
|
79
|
+
/** 显示今天的按钮 */
|
|
80
|
+
showToday?: boolean;
|
|
81
|
+
/** 显示确定的按钮 */
|
|
82
|
+
showOk?: boolean;
|
|
83
|
+
/** 点击今天的回调 */
|
|
84
|
+
onToday?: () => void;
|
|
85
|
+
/** 点击确定的回调 */
|
|
86
|
+
onOk?: () => void;
|
|
87
|
+
/** 是否显示时间选择 */
|
|
88
|
+
showTime?: boolean;
|
|
89
|
+
/** 是否已选择日期改变的回调 */
|
|
90
|
+
onHasSelectedDateChange?: (hasSelected: boolean) => void;
|
|
91
|
+
}
|
|
92
|
+
/** 日历头部属性 */
|
|
93
|
+
export interface CalendarHeaderProps {
|
|
94
|
+
/** 当前显示的年月 */
|
|
95
|
+
currentMonth: Date;
|
|
96
|
+
/** 切换到上一个月 */
|
|
97
|
+
onPrevMonth: () => void;
|
|
98
|
+
/** 切换到下一个月 */
|
|
99
|
+
onNextMonth: () => void;
|
|
100
|
+
/** 点击年份的回调 */
|
|
101
|
+
onYearClick: () => void;
|
|
102
|
+
/** 点击月份的回调 */
|
|
103
|
+
onMonthClick: () => void;
|
|
104
|
+
}
|
|
105
|
+
/** 月份选择器属性 */
|
|
106
|
+
export interface MonthPickerProps {
|
|
107
|
+
/** 当前选中的月份 */
|
|
108
|
+
currentMonth: number;
|
|
109
|
+
/** 选择月份的回调 */
|
|
110
|
+
onMonthSelect: (month: number) => void;
|
|
111
|
+
/** 返回日历视图的回调 */
|
|
112
|
+
onBack: () => void;
|
|
113
|
+
}
|
|
114
|
+
/** 月份单元格属性 */
|
|
115
|
+
export interface MonthCellProps {
|
|
116
|
+
/** 是否被选中 */
|
|
117
|
+
isSelected?: boolean;
|
|
118
|
+
/** 是否是当前月份 */
|
|
119
|
+
isCurrentMonth?: boolean;
|
|
120
|
+
}
|
|
121
|
+
/** 年份选择器属性 */
|
|
122
|
+
export interface YearPickerProps {
|
|
123
|
+
/** 当前选中的年份 */
|
|
124
|
+
currentYear: number;
|
|
125
|
+
/** 当前显示页的起始年份 */
|
|
126
|
+
startYear: number;
|
|
127
|
+
/** 选择年份的回调 */
|
|
128
|
+
onYearSelect: (year: number) => void;
|
|
129
|
+
/** 返回日历视图的回调 */
|
|
130
|
+
onBack: () => void;
|
|
131
|
+
/** 切换到上一页的回调 */
|
|
132
|
+
onPrevPage: () => void;
|
|
133
|
+
/** 切换到下一页的回调 */
|
|
134
|
+
onNextPage: () => void;
|
|
135
|
+
}
|
|
136
|
+
/** 年份单元格属性 */
|
|
137
|
+
export interface YearCellProps {
|
|
138
|
+
/** 是否被选中 */
|
|
139
|
+
isSelected?: boolean;
|
|
140
|
+
/** 是否是当前年份 */
|
|
141
|
+
isCurrentYear?: boolean;
|
|
142
|
+
}
|
|
143
|
+
/** 季度选择器属性 */
|
|
144
|
+
export interface QuarterPickerProps {
|
|
145
|
+
/** 当前选中的年份 */
|
|
146
|
+
currentYear: number;
|
|
147
|
+
/** 当前选中的季度 */
|
|
148
|
+
currentQuarter: number;
|
|
149
|
+
/** 选择季度的回调 */
|
|
150
|
+
onQuarterSelect: (year: number, quarter: number) => void;
|
|
151
|
+
/** 返回的回调 */
|
|
152
|
+
onBack: () => void;
|
|
153
|
+
/** 切换到上一年的回调 */
|
|
154
|
+
onPrevYear: () => void;
|
|
155
|
+
/** 切换到下一年的回调 */
|
|
156
|
+
onNextYear: () => void;
|
|
157
|
+
}
|
|
158
|
+
/** 季度单元格属性 */
|
|
159
|
+
export interface QuarterCellProps {
|
|
160
|
+
/** 是否被选中 */
|
|
161
|
+
isSelected?: boolean;
|
|
162
|
+
/** 是否是当前季度 */
|
|
163
|
+
isCurrentQuarter?: boolean;
|
|
164
|
+
}
|
|
165
|
+
/** 日历日期单元格属性 */
|
|
166
|
+
export interface DateCellProps {
|
|
167
|
+
/** 日期 */
|
|
168
|
+
date: Date;
|
|
169
|
+
/** 是否被选中 */
|
|
170
|
+
isSelected: boolean;
|
|
171
|
+
/** 是否被选中(多选模式) */
|
|
172
|
+
isInSelectedSet?: boolean;
|
|
173
|
+
/** 是否是今天 */
|
|
174
|
+
isToday: boolean;
|
|
175
|
+
/** 是否禁用 */
|
|
176
|
+
disabled: boolean;
|
|
177
|
+
/** 是否是当前月的日期 */
|
|
178
|
+
isCurrentMonth: boolean;
|
|
179
|
+
/** 点击回调 */
|
|
180
|
+
onClick: () => void;
|
|
181
|
+
}
|
|
182
|
+
/** 日期范围选择器属性 */
|
|
183
|
+
export interface DateRangePickerProps {
|
|
184
|
+
/** 尺寸,可选 'small' | 'middle' | 'large',默认 'middle' */
|
|
185
|
+
size?: 'small' | 'middle' | 'large';
|
|
186
|
+
/** 当前值 [开始日期, 结束日期] */
|
|
187
|
+
value?: [string, string];
|
|
188
|
+
/** 默认值 */
|
|
189
|
+
defaultValue?: [string, string];
|
|
190
|
+
/** 值改变时的回调 */
|
|
191
|
+
onChange?: (dates: [string, string]) => void;
|
|
192
|
+
/** 占位符 [开始占位符, 结束占位符] */
|
|
193
|
+
placeholder?: [string, string];
|
|
194
|
+
/** 是否禁用 */
|
|
195
|
+
disabled?: boolean;
|
|
196
|
+
/** 只读 */
|
|
197
|
+
readOnly?: boolean;
|
|
198
|
+
/** 自定义类名 */
|
|
199
|
+
className?: string;
|
|
200
|
+
/** 自定义样式 */
|
|
201
|
+
style?: React.CSSProperties;
|
|
202
|
+
/** 宽度 */
|
|
203
|
+
width?: string | number;
|
|
204
|
+
/** 日期格式,默认 'YYYY-MM-DD' */
|
|
205
|
+
format?: DateFormat;
|
|
206
|
+
/** 是否显示清除按钮 */
|
|
207
|
+
allowClear?: boolean;
|
|
208
|
+
/** 禁用日期的函数 */
|
|
209
|
+
disabledDate?: (date: Date) => boolean;
|
|
210
|
+
/** 不可选择的日期 */
|
|
211
|
+
disabledDates?: string[];
|
|
212
|
+
/** 标签 */
|
|
213
|
+
label?: string | React.ReactNode;
|
|
214
|
+
/** 标签到输入框的距离 */
|
|
215
|
+
labelGap?: string | number;
|
|
216
|
+
/** 标签的CSS类名 */
|
|
217
|
+
labelClassName?: string;
|
|
218
|
+
/** 标签的样式 */
|
|
219
|
+
labelStyle?: React.CSSProperties;
|
|
220
|
+
/** 面板打开状态改变时的回调 */
|
|
221
|
+
onOpenChange?: (open: boolean) => void;
|
|
222
|
+
/** 是否打开面板(受控) */
|
|
223
|
+
open?: boolean;
|
|
224
|
+
/** 显示确定的按钮 */
|
|
225
|
+
showOk?: boolean;
|
|
226
|
+
/** 分隔符,默认使用 Icon type="arrow-right" */
|
|
227
|
+
separator?: React.ReactNode;
|
|
228
|
+
}
|
|
File without changes
|