@zjpcy/simple-design 1.4.8 → 1.5.1
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 +1795 -212
- package/dist/cjs/index.js +1 -1
- package/dist/es/Button/Button.js +1 -1
- package/dist/es/Calendar/index.js +1 -0
- package/dist/es/Icon/Icon.js +1 -1
- package/dist/es/Icon/path.js +1 -1
- package/dist/es/Modal/index.js +1 -1
- package/dist/es/Table/SortableRow.js +1 -1
- package/dist/es/Table/index.js +1 -1
- package/dist/es/Tooltip/Tooltip.js +1 -1
- package/dist/es/index.css +1795 -212
- package/dist/es/index.js +1 -1
- package/dist/types/components/Button/Button.d.ts +1 -0
- package/dist/types/components/Calendar/index.d.ts +9 -0
- package/dist/types/components/Calendar/styles.d.ts +31 -0
- package/dist/types/components/Calendar/types.d.ts +332 -0
- package/dist/types/components/Icon/path.d.ts +4 -0
- package/dist/types/components/Table/SortableRow.d.ts +6 -2
- package/dist/types/components/Table/index.d.ts +22 -2
- package/dist/types/components/index.d.ts +47 -6
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as Spin}from"./Spin/index.js";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 Upload}from"./Upload/index.js";export{default as Splitter}from"./Splitter/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";
|
|
1
|
+
export{default as Spin}from"./Spin/index.js";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 Upload}from"./Upload/index.js";export{default as Splitter}from"./Splitter/index.js";export{default as Calendar}from"./Calendar/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";
|
|
@@ -12,6 +12,7 @@ export interface ButtonProps {
|
|
|
12
12
|
icon?: string | React.ReactNode;
|
|
13
13
|
type?: 'button' | 'submit' | 'reset';
|
|
14
14
|
href?: string;
|
|
15
|
+
title?: string;
|
|
15
16
|
}
|
|
16
17
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
|
|
17
18
|
export default Button;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarProps } from './types';
|
|
3
|
+
import './Calendar.css';
|
|
4
|
+
/**
|
|
5
|
+
* Calendar 日历组件
|
|
6
|
+
* Calendar component for displaying data in calendar format
|
|
7
|
+
*/
|
|
8
|
+
declare const Calendar: React.FC<CalendarProps>;
|
|
9
|
+
export default Calendar;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 获取日历容器样式
|
|
4
|
+
* Get calendar container style
|
|
5
|
+
*/
|
|
6
|
+
export declare const getCalendarContainerStyle: (fullscreen?: boolean) => CSSProperties;
|
|
7
|
+
/**
|
|
8
|
+
* 获取日历头部样式
|
|
9
|
+
* Get calendar header style
|
|
10
|
+
*/
|
|
11
|
+
export declare const getCalendarHeaderStyle: () => CSSProperties;
|
|
12
|
+
/**
|
|
13
|
+
* 获取头部按钮样式
|
|
14
|
+
* Get header button style
|
|
15
|
+
*/
|
|
16
|
+
export declare const getHeaderButtonStyle: () => CSSProperties;
|
|
17
|
+
/**
|
|
18
|
+
* 获取周标题样式
|
|
19
|
+
* Get weekday header style
|
|
20
|
+
*/
|
|
21
|
+
export declare const getWeekdayHeaderStyle: () => CSSProperties;
|
|
22
|
+
/**
|
|
23
|
+
* 获取日期网格样式
|
|
24
|
+
* Get date grid style
|
|
25
|
+
*/
|
|
26
|
+
export declare const getDateGridStyle: () => CSSProperties;
|
|
27
|
+
/**
|
|
28
|
+
* 获取月份网格样式
|
|
29
|
+
* Get month grid style
|
|
30
|
+
*/
|
|
31
|
+
export declare const getMonthGridStyle: () => CSSProperties;
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 方位信息
|
|
4
|
+
* Direction Info
|
|
5
|
+
*/
|
|
6
|
+
export interface DirectionInfo {
|
|
7
|
+
/** 方位名称 */
|
|
8
|
+
name: string;
|
|
9
|
+
/** 方位描述 */
|
|
10
|
+
description: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 农历信息
|
|
14
|
+
* Lunar Date Info
|
|
15
|
+
*/
|
|
16
|
+
export interface LunarInfo {
|
|
17
|
+
/** 农历年 */
|
|
18
|
+
year: number;
|
|
19
|
+
/** 农历月(1-12) */
|
|
20
|
+
month: number;
|
|
21
|
+
/** 农历日(1-30) */
|
|
22
|
+
day: number;
|
|
23
|
+
/** 农历月名称(如:正月、腊月) */
|
|
24
|
+
monthName: string;
|
|
25
|
+
/** 农历日名称(如:初一、十五) */
|
|
26
|
+
dayName: string;
|
|
27
|
+
/** 农历年名称(如:二〇二四年) */
|
|
28
|
+
yearName: string;
|
|
29
|
+
/** 是否闰月 */
|
|
30
|
+
isLeap: boolean;
|
|
31
|
+
/** 儒略日 */
|
|
32
|
+
julianDay: number;
|
|
33
|
+
/** 星期 */
|
|
34
|
+
week: string;
|
|
35
|
+
/** 生肖 */
|
|
36
|
+
zodiac: string;
|
|
37
|
+
/** 干支年(如:甲子年) */
|
|
38
|
+
ganZhiYear: string;
|
|
39
|
+
/** 干支月(如:丙寅月) */
|
|
40
|
+
ganZhiMonth: string;
|
|
41
|
+
/** 干支日(如:戊辰日) */
|
|
42
|
+
ganZhiDay: string;
|
|
43
|
+
/** 节气 */
|
|
44
|
+
term?: string;
|
|
45
|
+
/** 节日列表 */
|
|
46
|
+
festivals: string[];
|
|
47
|
+
/** 是否节气日 */
|
|
48
|
+
isTermDay: boolean;
|
|
49
|
+
/** 彭祖百忌 - 日 */
|
|
50
|
+
pengZuDay: string;
|
|
51
|
+
/** 彭祖百忌 - 时 */
|
|
52
|
+
pengZuHour: string;
|
|
53
|
+
/** 宜 - 适合做的事情 */
|
|
54
|
+
yi: string[];
|
|
55
|
+
/** 忌 - 不适合做的事情 */
|
|
56
|
+
ji: string[];
|
|
57
|
+
/** 吉神宜趋 */
|
|
58
|
+
jiShen: string[];
|
|
59
|
+
/** 凶煞宜忌 */
|
|
60
|
+
xiongSha: string[];
|
|
61
|
+
/** 喜神方位 */
|
|
62
|
+
xiGod: DirectionInfo;
|
|
63
|
+
/** 福神方位 */
|
|
64
|
+
fuGod: DirectionInfo;
|
|
65
|
+
/** 财神方位 */
|
|
66
|
+
caiGod: DirectionInfo;
|
|
67
|
+
/** 阳贵神方位 */
|
|
68
|
+
yangGuiGod: DirectionInfo;
|
|
69
|
+
/** 阴贵神方位 */
|
|
70
|
+
yinGuiGod: DirectionInfo;
|
|
71
|
+
/** 胎神方位 */
|
|
72
|
+
taiShen: string;
|
|
73
|
+
/** 冲煞 */
|
|
74
|
+
chongSha: string;
|
|
75
|
+
/** 煞方 */
|
|
76
|
+
sha: string;
|
|
77
|
+
/** 纳音 */
|
|
78
|
+
naYin: string;
|
|
79
|
+
/** 年纳音 */
|
|
80
|
+
yearNaYin: string;
|
|
81
|
+
/** 月纳音 */
|
|
82
|
+
monthNaYin: string;
|
|
83
|
+
/** 日纳音 */
|
|
84
|
+
dayNaYin: string;
|
|
85
|
+
/** 二十八宿 */
|
|
86
|
+
xiu: string;
|
|
87
|
+
/** 星宿动物 */
|
|
88
|
+
xiuAnimal: string;
|
|
89
|
+
/** 星宿吉凶 */
|
|
90
|
+
xiuLuck: string;
|
|
91
|
+
/** 星宿歌诀 */
|
|
92
|
+
xiuSong: string;
|
|
93
|
+
/** 八字年柱 */
|
|
94
|
+
baZiYear: string;
|
|
95
|
+
/** 八字月柱 */
|
|
96
|
+
baZiMonth: string;
|
|
97
|
+
/** 八字日柱 */
|
|
98
|
+
baZiDay: string;
|
|
99
|
+
/** 八字时柱(默认子时) */
|
|
100
|
+
baZiHour: string;
|
|
101
|
+
/** 完整八字 */
|
|
102
|
+
baZi: string;
|
|
103
|
+
/** 年五行 */
|
|
104
|
+
yearWuXing: string;
|
|
105
|
+
/** 月五行 */
|
|
106
|
+
monthWuXing: string;
|
|
107
|
+
/** 日五行 */
|
|
108
|
+
dayWuXing: string;
|
|
109
|
+
/** 时辰五行(默认子时) */
|
|
110
|
+
hourWuXing: string;
|
|
111
|
+
/** 年柱十神 */
|
|
112
|
+
yearShiShen: string;
|
|
113
|
+
/** 月柱十神 */
|
|
114
|
+
monthShiShen: string;
|
|
115
|
+
/** 时柱十神 */
|
|
116
|
+
hourShiShen: string;
|
|
117
|
+
/** 十二值星(建、除、满、平、定、执、破、危、成、收、开、闭) */
|
|
118
|
+
zhiXing: string;
|
|
119
|
+
/** 值星说明 */
|
|
120
|
+
zhiXingDesc: string;
|
|
121
|
+
/** 青龙名堂等十二神(青龙、明堂、天刑、朱雀、金匮、天德、白虎、玉堂、天牢、玄武、司命、勾陈) */
|
|
122
|
+
shiErShen: string;
|
|
123
|
+
/** 十二神吉凶 */
|
|
124
|
+
shiErShenLuck: '吉' | '凶';
|
|
125
|
+
/** 是否黄道日 */
|
|
126
|
+
isHuangDao: boolean;
|
|
127
|
+
/** 黄道日名称 */
|
|
128
|
+
huangDaoName: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* 日期信息项
|
|
132
|
+
* Date Info Item
|
|
133
|
+
*/
|
|
134
|
+
export interface DateInfoItem {
|
|
135
|
+
/** 信息标题 */
|
|
136
|
+
title: string;
|
|
137
|
+
/** 信息内容 */
|
|
138
|
+
content?: string;
|
|
139
|
+
/** 信息颜色 */
|
|
140
|
+
color?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* 日期信息数据
|
|
144
|
+
* Date Info Data
|
|
145
|
+
*/
|
|
146
|
+
export type DateInfoData = Record<string, DateInfoItem[]>;
|
|
147
|
+
/**
|
|
148
|
+
* 日期面板表单配置
|
|
149
|
+
* Date Panel Form Config
|
|
150
|
+
*/
|
|
151
|
+
export interface DatePanelFormConfig {
|
|
152
|
+
/** 表单字段 */
|
|
153
|
+
fields: DatePanelField[];
|
|
154
|
+
/** 提交按钮文本 */
|
|
155
|
+
submitText?: string;
|
|
156
|
+
/** 取消按钮文本 */
|
|
157
|
+
cancelText?: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* 日期面板字段
|
|
161
|
+
* Date Panel Field
|
|
162
|
+
*/
|
|
163
|
+
export interface DatePanelField {
|
|
164
|
+
/** 字段名 */
|
|
165
|
+
name: string;
|
|
166
|
+
/** 字段标签 */
|
|
167
|
+
label: string;
|
|
168
|
+
/** 字段类型 */
|
|
169
|
+
type?: 'text' | 'textarea' | 'select' | 'date';
|
|
170
|
+
/** 占位符 */
|
|
171
|
+
placeholder?: string;
|
|
172
|
+
/** 是否必填 */
|
|
173
|
+
required?: boolean;
|
|
174
|
+
/** 选项(用于 select 类型) */
|
|
175
|
+
options?: {
|
|
176
|
+
label: string;
|
|
177
|
+
value: string;
|
|
178
|
+
}[];
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* 日历组件属性
|
|
182
|
+
* Calendar Component Props
|
|
183
|
+
*/
|
|
184
|
+
export interface CalendarProps {
|
|
185
|
+
/** 选择模式:单选 single 或多选 multiple */
|
|
186
|
+
selectionMode?: 'single' | 'multiple';
|
|
187
|
+
/** 当前日期(受控)- 单选模式为 Date,多选模式为 Date[] */
|
|
188
|
+
value?: Date | Date[];
|
|
189
|
+
/** 默认日期(非受控)- 单选模式为 Date,多选模式为 Date[] */
|
|
190
|
+
defaultValue?: Date | Date[];
|
|
191
|
+
/** 日期改变时的回调 - 单选模式返回 Date,多选模式返回 Date[] */
|
|
192
|
+
onChange?: (date: Date | Date[]) => void;
|
|
193
|
+
/** 自定义日期单元格渲染(第二个参数为农历信息,仅在 showLunar 为 true 时提供) */
|
|
194
|
+
dateCellRender?: (date: Date, lunarInfo?: LunarInfo) => React.ReactNode;
|
|
195
|
+
/** 自定义月份单元格渲染 */
|
|
196
|
+
monthCellRender?: (date: Date) => React.ReactNode;
|
|
197
|
+
/** 不可选择的日期 */
|
|
198
|
+
disabledDate?: (date: Date) => boolean;
|
|
199
|
+
/** 头部渲染 */
|
|
200
|
+
headerRender?: (props: {
|
|
201
|
+
value: Date;
|
|
202
|
+
onChange: (date: Date) => void;
|
|
203
|
+
type: 'month' | 'year';
|
|
204
|
+
onTypeChange: (type: 'month' | 'year') => void;
|
|
205
|
+
}) => React.ReactNode;
|
|
206
|
+
/** 日历模式 */
|
|
207
|
+
mode?: 'month' | 'year';
|
|
208
|
+
/** 模式改变时的回调 */
|
|
209
|
+
onPanelChange?: (date: Date, mode: 'month' | 'year') => void;
|
|
210
|
+
/** 是否全屏显示(默认 true) */
|
|
211
|
+
fullscreen?: boolean;
|
|
212
|
+
/** 日历尺寸(默认 default) */
|
|
213
|
+
size?: 'default' | 'small';
|
|
214
|
+
/** 日期单元格布局方式(默认 horizontal) */
|
|
215
|
+
layout?: 'horizontal' | 'vertical';
|
|
216
|
+
/** 自定义类名 */
|
|
217
|
+
className?: string;
|
|
218
|
+
/** 自定义样式 */
|
|
219
|
+
style?: React.CSSProperties;
|
|
220
|
+
/** 周起始日,0 为周日,1 为周一,默认 0 */
|
|
221
|
+
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
222
|
+
/** 是否显示周末日期(默认 true) */
|
|
223
|
+
showWeekend?: boolean;
|
|
224
|
+
/** 是否启用日期信息编辑 */
|
|
225
|
+
editable?: boolean;
|
|
226
|
+
/** 日期信息数据 */
|
|
227
|
+
dateInfo?: DateInfoData;
|
|
228
|
+
/** 日期信息改变时的回调 */
|
|
229
|
+
onDateInfoChange?: (date: Date, info: DateInfoItem[]) => void;
|
|
230
|
+
/** 日期面板表单配置 */
|
|
231
|
+
panelFormConfig?: DatePanelFormConfig;
|
|
232
|
+
/** 是否显示农历(默认 false) */
|
|
233
|
+
showLunar?: boolean;
|
|
234
|
+
/** 自定义农历渲染 */
|
|
235
|
+
lunarRender?: (lunarInfo: LunarInfo) => React.ReactNode;
|
|
236
|
+
/** 是否启用双击查看农历详情(默认 false) */
|
|
237
|
+
enableLunarDetail?: boolean;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* 日历头部属性
|
|
241
|
+
* Calendar Header Props
|
|
242
|
+
*/
|
|
243
|
+
export interface CalendarHeaderProps {
|
|
244
|
+
/** 当前显示的日期 */
|
|
245
|
+
value: Date;
|
|
246
|
+
/** 日期改变回调 */
|
|
247
|
+
onChange: (date: Date) => void;
|
|
248
|
+
/** 当前模式 */
|
|
249
|
+
type: 'month' | 'year';
|
|
250
|
+
/** 模式改变回调 */
|
|
251
|
+
onTypeChange: (type: 'month' | 'year') => void;
|
|
252
|
+
/** 周起始日 */
|
|
253
|
+
firstDayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* 日历日期单元格属性
|
|
257
|
+
* Calendar Date Cell Props
|
|
258
|
+
*/
|
|
259
|
+
export interface CalendarDateCellProps {
|
|
260
|
+
/** 日期 */
|
|
261
|
+
date: Date;
|
|
262
|
+
/** 是否在当前月份 */
|
|
263
|
+
inCurrentMonth: boolean;
|
|
264
|
+
/** 是否是今天 */
|
|
265
|
+
isToday: boolean;
|
|
266
|
+
/** 是否被选中 */
|
|
267
|
+
isSelected: boolean;
|
|
268
|
+
/** 是否禁用 */
|
|
269
|
+
disabled: boolean;
|
|
270
|
+
/** 自定义渲染内容 */
|
|
271
|
+
content?: React.ReactNode;
|
|
272
|
+
/** 点击回调 */
|
|
273
|
+
onClick?: (date: Date) => void;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* 日历月份单元格属性
|
|
277
|
+
* Calendar Month Cell Props
|
|
278
|
+
*/
|
|
279
|
+
export interface CalendarMonthCellProps {
|
|
280
|
+
/** 月份日期(该月的第一天) */
|
|
281
|
+
date: Date;
|
|
282
|
+
/** 是否被选中 */
|
|
283
|
+
isSelected: boolean;
|
|
284
|
+
/** 点击回调 */
|
|
285
|
+
onClick?: (date: Date) => void;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* 日历主体属性
|
|
289
|
+
* Calendar Body Props
|
|
290
|
+
*/
|
|
291
|
+
export interface CalendarBodyProps {
|
|
292
|
+
/** 当前显示的日期 */
|
|
293
|
+
value: Date;
|
|
294
|
+
/** 选中的日期 */
|
|
295
|
+
selectedDate: Date;
|
|
296
|
+
/** 日期点击回调 */
|
|
297
|
+
onDateClick: (date: Date) => void;
|
|
298
|
+
/** 自定义日期单元格渲染 */
|
|
299
|
+
dateCellRender?: (date: Date) => React.ReactNode;
|
|
300
|
+
/** 不可选择的日期 */
|
|
301
|
+
disabledDate?: (date: Date) => boolean;
|
|
302
|
+
/** 周起始日 */
|
|
303
|
+
firstDayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
304
|
+
/** 是否显示周末 */
|
|
305
|
+
showWeekend: boolean;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* 日历年份面板属性
|
|
309
|
+
* Calendar Year Panel Props
|
|
310
|
+
*/
|
|
311
|
+
export interface CalendarYearPanelProps {
|
|
312
|
+
/** 当前显示的日期 */
|
|
313
|
+
value: Date;
|
|
314
|
+
/** 选中的日期 */
|
|
315
|
+
selectedDate: Date;
|
|
316
|
+
/** 月份点击回调 */
|
|
317
|
+
onMonthClick: (date: Date) => void;
|
|
318
|
+
/** 自定义月份单元格渲染 */
|
|
319
|
+
monthCellRender?: (date: Date) => React.ReactNode;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* 周标题配置
|
|
323
|
+
* Weekday Title Config
|
|
324
|
+
*/
|
|
325
|
+
export interface WeekdayConfig {
|
|
326
|
+
/** 周几索引(0-6) */
|
|
327
|
+
index: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
328
|
+
/** 显示文本 */
|
|
329
|
+
label: string;
|
|
330
|
+
/** 短文本 */
|
|
331
|
+
shortLabel: string;
|
|
332
|
+
}
|
|
@@ -13,4 +13,8 @@ export declare const arrowLeftIcon: PresetIcon;
|
|
|
13
13
|
export declare const arrowRightIcon: PresetIcon;
|
|
14
14
|
export declare const arrowUpIcon: PresetIcon;
|
|
15
15
|
export declare const arrowDownIcon: PresetIcon;
|
|
16
|
+
export declare const leftIcon: PresetIcon;
|
|
17
|
+
export declare const rightIcon: PresetIcon;
|
|
18
|
+
export declare const doubleLeftIcon: PresetIcon;
|
|
19
|
+
export declare const doubleRightIcon: PresetIcon;
|
|
16
20
|
export declare const presetIcons: Record<string, PresetIcon>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Column } from './index';
|
|
2
|
+
import { Column, RowSelection } from './index';
|
|
3
3
|
interface SortableRowProps {
|
|
4
4
|
id: string;
|
|
5
5
|
record: any;
|
|
@@ -19,8 +19,12 @@ interface SortableRowProps {
|
|
|
19
19
|
handleSave: (record: any, column: Column) => void;
|
|
20
20
|
handleCancel: () => void;
|
|
21
21
|
setEditingValue: (value: string) => void;
|
|
22
|
-
renderTableCell: (column: Column, record: any, rowIndex: number, colIndex: number, colGroup: Column[]) => React.ReactNode;
|
|
22
|
+
renderTableCell: (column: Column, record: any, rowIndex: number, colIndex: number, colGroup: Column[], isSelectionColumn?: boolean) => React.ReactNode;
|
|
23
23
|
children?: React.ReactNode;
|
|
24
|
+
isRowSelectionEnabled?: boolean;
|
|
25
|
+
rowSelection?: RowSelection;
|
|
26
|
+
selectedRowKeys?: (string | number)[];
|
|
27
|
+
handleRowSelect?: (record: any, index: number, checked: boolean) => void;
|
|
24
28
|
}
|
|
25
29
|
declare const SortableRow: React.FC<SortableRowProps>;
|
|
26
30
|
export default SortableRow;
|
|
@@ -25,7 +25,25 @@ export interface PaginationProps {
|
|
|
25
25
|
onChange?: (page: number, pageSize: number) => void;
|
|
26
26
|
[key: string]: any;
|
|
27
27
|
}
|
|
28
|
-
interface
|
|
28
|
+
export interface RowSelection {
|
|
29
|
+
/** 行选择类型,默认不显示选择列 */
|
|
30
|
+
type?: false | 'checkbox' | 'radio';
|
|
31
|
+
/** 已选中的行键值(受控) */
|
|
32
|
+
selectedRowKeys?: (string | number)[];
|
|
33
|
+
/** 默认选中的行键值(非受控) */
|
|
34
|
+
defaultSelectedRowKeys?: (string | number)[];
|
|
35
|
+
/** 选中变化时的回调 */
|
|
36
|
+
onChange?: (selectedRowKeys: (string | number)[], selectedRows: any[]) => void;
|
|
37
|
+
/** 获取行禁用状态的函数 */
|
|
38
|
+
getCheckboxProps?: (record: any, index: number) => {
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
};
|
|
41
|
+
/** 行选择列宽度 */
|
|
42
|
+
columnWidth?: number | string;
|
|
43
|
+
/** 行选择列标题 */
|
|
44
|
+
columnTitle?: ReactNode;
|
|
45
|
+
}
|
|
46
|
+
export interface TableProps {
|
|
29
47
|
dataSource?: any[];
|
|
30
48
|
columns?: Column[];
|
|
31
49
|
bordered?: boolean;
|
|
@@ -48,6 +66,8 @@ interface TableProps {
|
|
|
48
66
|
draggable?: boolean;
|
|
49
67
|
/** 拖拽结束时的回调函数,返回新的数据顺序 */
|
|
50
68
|
onDragEnd?: (newData: any[]) => void;
|
|
69
|
+
/** 行选择配置 */
|
|
70
|
+
rowSelection?: RowSelection;
|
|
51
71
|
}
|
|
52
|
-
declare const Table: ({ dataSource, columns, bordered, scroll, rowKey, className, pagination, empty, loading, loadingText, loadingDelay, draggable, onDragEnd, }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
declare const Table: ({ dataSource, columns, bordered, scroll, rowKey, className, pagination, empty, loading, loadingText, loadingDelay, draggable, onDragEnd, rowSelection, }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
73
|
export default Table;
|
|
@@ -2,62 +2,103 @@ export { default as Button } from './Button';
|
|
|
2
2
|
export { default as Spin } from './Spin';
|
|
3
3
|
export type { SpinProps, SpinSize } from './Spin';
|
|
4
4
|
export { default as Carousel } from './Carousel';
|
|
5
|
+
export type { CarouselProps, CarouselItem, CarouselEffect, CarouselDirection, CarouselIndicatorPosition, CarouselArrowPosition, CarouselInfoPosition } from './Carousel/types';
|
|
5
6
|
export { default as Cascader } from './Cascader';
|
|
7
|
+
export type { CascaderProps, CascaderOption } from './Cascader/types';
|
|
6
8
|
export { default as TreeSelect } from './TreeSelect';
|
|
9
|
+
export type { TreeSelectProps, TreeSelectNode, TreeSelectStyles } from './TreeSelect/types';
|
|
7
10
|
export { default as ColorPicker } from './ColorPicker';
|
|
11
|
+
export type { ColorPickerProps } from './ColorPicker/types';
|
|
8
12
|
export { default as CopyToClipboard, useOnCopy as useCopy } from './CopyToClipboard';
|
|
13
|
+
export type { CopyToClipboardProps } from './CopyToClipboard/types';
|
|
9
14
|
export { default as Divider } from './Divider';
|
|
15
|
+
export type { DividerProps } from './Divider';
|
|
10
16
|
export { default as Empty } from './Empty';
|
|
17
|
+
export type { EmptyProps } from './Empty/types';
|
|
11
18
|
export { default as Flex } from './Flex';
|
|
19
|
+
export type { FlexProps } from './Flex/types';
|
|
12
20
|
export { default as Icon } from './Icon';
|
|
21
|
+
export type { IconProps } from './Icon';
|
|
13
22
|
export { default as Input, Textarea } from './Input';
|
|
23
|
+
export type { InputProps, NumberInputProps, PasswordProps, TextareaProps } from './Input';
|
|
14
24
|
export { default as Marquee } from './Marquee';
|
|
15
25
|
export { default as Message, MessageProvider, useMessage, message } from './Message';
|
|
26
|
+
export type { MessageProps, MessageInstance, MessageType } from './Message/types';
|
|
16
27
|
export { default as Modal } from './Modal';
|
|
28
|
+
export type { ModalProps } from './Modal/types';
|
|
17
29
|
export { default as Notice } from './Notice/Notice';
|
|
18
30
|
export type { NoticeProps, NoticeType } from './Notice/Notice';
|
|
19
31
|
export { default as Notification } from './Notification/Notification';
|
|
32
|
+
export type { NotificationProps, NotificationPosition } from './Notification/types';
|
|
20
33
|
export { default as Radio } from './Radio';
|
|
34
|
+
export type { RadioProps, RadioGroupProps } from './Radio/types';
|
|
21
35
|
export { default as Select } from './Select';
|
|
36
|
+
export type { SelectProps, SelectOption, TagRenderProps } from './Select/types';
|
|
22
37
|
export { default as Table } from './Table';
|
|
38
|
+
export type { TableProps, RowSelection, Column, PaginationProps as TablePaginationProps } from './Table';
|
|
23
39
|
export { default as Top } from './Top';
|
|
24
40
|
export { default as Typography } from './Typography';
|
|
41
|
+
export type { TypographyProps } from './Typography/types';
|
|
25
42
|
export { default as Masonry } from './Masonry';
|
|
43
|
+
export type { MasonryProps, MasonryItem, ResponsiveConfig } from './Masonry/types';
|
|
26
44
|
export { default as Space } from './Space';
|
|
45
|
+
export type { SpaceProps } from './Space/types';
|
|
27
46
|
export { default as Anchor } from './Anchor';
|
|
47
|
+
export type { AnchorProps, AnchorLinkProps, AnchorItem } from './Anchor/types';
|
|
28
48
|
export { default as Breadcrumb } from './Breadcrumb';
|
|
49
|
+
export type { BreadcrumbProps, BreadcrumbItem } from './Breadcrumb/types';
|
|
29
50
|
export { default as I18nProvider, useI18n, load18n } from '../i18n/I18nProvider';
|
|
30
51
|
export { default as i18n } from '../i18n';
|
|
31
52
|
export { default as Dropdown } from './Dropdown';
|
|
53
|
+
export type { DropdownProps, DropdownItem, DropdownType } from './Dropdown/types';
|
|
32
54
|
export { default as Menu } from './Menu';
|
|
55
|
+
export type { MenuProps, MenuItem, MenuMode, MenuTheme } from './Menu/types';
|
|
33
56
|
export { default as Pagination } from './Pagination';
|
|
57
|
+
export type { PaginationProps } from './Pagination/types';
|
|
34
58
|
export { default as Rate } from './Rate';
|
|
59
|
+
export type { RateProps } from './Rate/types';
|
|
35
60
|
export { default as Slider } from './Slider';
|
|
61
|
+
export type { SliderProps, MarksTypes, MarkConfig, GradientConfig } from './Slider/types';
|
|
36
62
|
export { default as Steps } from './Steps';
|
|
63
|
+
export type { StepsProps, StepItem, StepStatus, StepContextType } from './Steps/types';
|
|
37
64
|
export { default as Switch } from './Switch';
|
|
65
|
+
export type { SwitchProps, SwitchStyles, SwitchSizeConfig, SwitchThemeConfig } from './Switch/types';
|
|
38
66
|
export { default as Tabs } from './Tabs';
|
|
67
|
+
export type { TabsProps, TabItem, TabPlacement, TabType } from './Tabs/types';
|
|
39
68
|
export { default as Transfer } from './Transfer';
|
|
69
|
+
export type { TransferProps, TransferItem, FieldNames, TransferListProps, TransferOperationProps, TransferSearchProps } from './Transfer/types';
|
|
40
70
|
export { default as Label } from './Label';
|
|
71
|
+
export type { LabelProps } from './Label/types';
|
|
41
72
|
export { default as Layout } from './Layout';
|
|
73
|
+
export type { LayoutProps, LayoutHeaderProps, LayoutContentProps, LayoutFooterProps, LayoutSiderProps, LayoutConfig } from './Layout/types';
|
|
42
74
|
export { default as Tooltip } from './Tooltip';
|
|
75
|
+
export type { TooltipProps } from './Tooltip';
|
|
43
76
|
export { default as Form } from './Form';
|
|
77
|
+
export type { FormProps, FormItemProps, FormInstance, Rule } from './Form/types';
|
|
44
78
|
export { default as Grid, Row, Col } from './Grid';
|
|
79
|
+
export type { GridProps, RowProps, ColProps } from './Grid/types';
|
|
45
80
|
export { default as Drawer } from './Drawer';
|
|
46
81
|
export type { DrawerProps, DrawerPlacement } from './Drawer';
|
|
47
82
|
export { default as Checkbox } from './Checkbox';
|
|
83
|
+
export type { CheckboxProps, CheckboxGroupProps } from './Checkbox/types';
|
|
48
84
|
export { default as Tag } from './Tag';
|
|
49
85
|
export type { TagProps, TagSize } from './Tag';
|
|
86
|
+
export type { PresetTagColor } from './Tag/styles';
|
|
50
87
|
export { default as Popconfirm } from './Popconfirm';
|
|
51
88
|
export type { PopconfirmProps, PopconfirmPlacement } from './Popconfirm';
|
|
89
|
+
export type { PopconfirmType } from './Popconfirm/types';
|
|
52
90
|
export { default as Progress } from './Progress';
|
|
53
|
-
export type { ProgressProps, ProgressType, ProgressStatus } from './Progress';
|
|
91
|
+
export type { ProgressProps, ProgressType, ProgressStatus, ProgressSegment } from './Progress/types';
|
|
54
92
|
export { default as TimePicker } from './TimePicker';
|
|
55
|
-
export type { TimePickerProps } from './TimePicker';
|
|
93
|
+
export type { TimePickerProps, TimePickerPanelProps, TimeColumnProps, TimeRangePickerProps } from './TimePicker/types';
|
|
56
94
|
export { default as DatePicker } from './DatePicker';
|
|
57
|
-
export type { DatePickerProps, DateRangePickerProps } from './DatePicker';
|
|
95
|
+
export type { DatePickerProps, DateRangePickerProps, DateFormat, PickerType } from './DatePicker/types';
|
|
58
96
|
export { default as Tree } from './Tree';
|
|
59
|
-
export type { TreeProps, TreeNode,
|
|
97
|
+
export type { TreeProps, TreeNode, TreeNodeTooltip, TreeNodeProps, TreeState } from './Tree/types';
|
|
98
|
+
export type { TreeRef } from './Tree';
|
|
60
99
|
export { default as Upload } from './Upload';
|
|
61
|
-
export type { UploadProps, UploadFile, UploadRequestOptions } from './Upload';
|
|
100
|
+
export type { UploadProps, UploadFile, UploadRequestOptions, ShowUploadListType, UploadListProps, UploadDragProps } from './Upload/types';
|
|
62
101
|
export { default as Splitter } from './Splitter';
|
|
63
|
-
export type { SplitterProps } from './Splitter/types';
|
|
102
|
+
export type { SplitterProps, SplitterPanel, DragState, PanelSizeInfo } from './Splitter/types';
|
|
103
|
+
export { default as Calendar } from './Calendar';
|
|
104
|
+
export type { CalendarProps, CalendarHeaderProps, CalendarDateCellProps, CalendarMonthCellProps, CalendarBodyProps, CalendarYearPanelProps, DateInfoData, DateInfoItem, DatePanelFormConfig, DatePanelField } from './Calendar/types';
|