@zjpcy/simple-design 1.3.1 → 1.3.2
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/Layout/styles.js +1 -1
- package/dist/es/Menu/index.js +1 -1
- package/dist/es/index.css +1 -1
- package/dist/es/index.js +1 -1
- package/dist/types/components/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/Anchor/index.d.ts +0 -7
- package/dist/types/Anchor/types.d.ts +0 -23
- package/dist/types/Breadcrumb/index.d.ts +0 -5
- package/dist/types/Breadcrumb/types.d.ts +0 -9
- package/dist/types/Button/Button.d.ts +0 -17
- package/dist/types/Button/index.d.ts +0 -2
- package/dist/types/Carousel/index.d.ts +0 -5
- package/dist/types/Carousel/styles.d.ts +0 -12
- package/dist/types/Carousel/types.d.ts +0 -72
- package/dist/types/Cascader/index.d.ts +0 -5
- package/dist/types/Cascader/types.d.ts +0 -36
- package/dist/types/Checkbox/index.d.ts +0 -8
- package/dist/types/Checkbox/types.d.ts +0 -37
- package/dist/types/ColorPicker/index.d.ts +0 -5
- package/dist/types/ColorPicker/types.d.ts +0 -15
- package/dist/types/CopyToClipboard/index.d.ts +0 -7
- package/dist/types/CopyToClipboard/types.d.ts +0 -5
- package/dist/types/DatePicker/RangePicker.d.ts +0 -4
- package/dist/types/DatePicker/index.d.ts +0 -9
- package/dist/types/DatePicker/styles.d.ts +0 -186
- package/dist/types/DatePicker/types.d.ts +0 -228
- package/dist/types/Divider/index.d.ts +0 -11
- package/dist/types/Drawer/index.d.ts +0 -6
- package/dist/types/Drawer/styles.d.ts +0 -0
- package/dist/types/Drawer/types.d.ts +0 -71
- package/dist/types/Dropdown/index.d.ts +0 -5
- package/dist/types/Dropdown/types.d.ts +0 -25
- package/dist/types/Empty/index.d.ts +0 -5
- package/dist/types/Empty/types.d.ts +0 -17
- package/dist/types/Flex/index.d.ts +0 -5
- package/dist/types/Flex/types.d.ts +0 -11
- package/dist/types/Form/index.d.ts +0 -12
- package/dist/types/Form/styles.d.ts +0 -22
- package/dist/types/Form/types.d.ts +0 -87
- package/dist/types/Grid/index.d.ts +0 -14
- package/dist/types/Grid/styles.d.ts +0 -22
- package/dist/types/Grid/types.d.ts +0 -49
- package/dist/types/Hooks/useClickOutside.d.ts +0 -4
- package/dist/types/Hooks/useCopy.d.ts +0 -2
- package/dist/types/Icon/Icon.d.ts +0 -18
- package/dist/types/Icon/index.d.ts +0 -3
- package/dist/types/Icon/path.d.ts +0 -16
- package/dist/types/Input/AutoComplete.d.ts +0 -0
- package/dist/types/Input/InputBase.d.ts +0 -36
- package/dist/types/Input/Number.d.ts +0 -12
- package/dist/types/Input/Password.d.ts +0 -13
- package/dist/types/Input/Search.d.ts +0 -8
- package/dist/types/Input/Textarea.d.ts +0 -51
- package/dist/types/Input/index.d.ts +0 -16
- package/dist/types/Label/index.d.ts +0 -5
- package/dist/types/Label/styles.d.ts +0 -1
- package/dist/types/Label/types.d.ts +0 -9
- package/dist/types/Layout/LayoutContext.d.ts +0 -15
- package/dist/types/Layout/index.d.ts +0 -86
- package/dist/types/Layout/styles.d.ts +0 -40
- package/dist/types/Layout/types.d.ts +0 -112
- package/dist/types/Marquee/index.d.ts +0 -15
- package/dist/types/Masonry/index.d.ts +0 -5
- package/dist/types/Masonry/types.d.ts +0 -26
- package/dist/types/Menu/index.d.ts +0 -11
- package/dist/types/Menu/styles.d.ts +0 -7
- package/dist/types/Menu/types.d.ts +0 -73
- package/dist/types/Message/Message.d.ts +0 -5
- package/dist/types/Message/index.d.ts +0 -25
- package/dist/types/Message/types.d.ts +0 -16
- package/dist/types/Modal/index.d.ts +0 -5
- package/dist/types/Modal/types.d.ts +0 -34
- package/dist/types/Notice/Notice.d.ts +0 -18
- package/dist/types/Notification/Notification.d.ts +0 -5
- package/dist/types/Notification/types.d.ts +0 -12
- package/dist/types/Pagination/index.d.ts +0 -5
- package/dist/types/Pagination/types.d.ts +0 -38
- package/dist/types/Popconfirm/index.d.ts +0 -6
- package/dist/types/Popconfirm/types.d.ts +0 -30
- package/dist/types/Progress/index.d.ts +0 -6
- package/dist/types/Progress/styles.d.ts +0 -0
- package/dist/types/Progress/types.d.ts +0 -59
- package/dist/types/Radio/index.d.ts +0 -8
- package/dist/types/Radio/types.d.ts +0 -30
- package/dist/types/Rate/index.d.ts +0 -5
- package/dist/types/Rate/types.d.ts +0 -27
- package/dist/types/Select/index.d.ts +0 -28
- package/dist/types/Select/styles.d.ts +0 -45
- package/dist/types/Select/types.d.ts +0 -134
- package/dist/types/Slider/index.d.ts +0 -5
- package/dist/types/Slider/types.d.ts +0 -28
- package/dist/types/Space/index.d.ts +0 -5
- package/dist/types/Space/types.d.ts +0 -31
- package/dist/types/Spin/index.d.ts +0 -6
- package/dist/types/Spin/types.d.ts +0 -44
- package/dist/types/Splitter/index.d.ts +0 -9
- package/dist/types/Splitter/styles.d.ts +0 -61
- package/dist/types/Splitter/types.d.ts +0 -115
- package/dist/types/Steps/index.d.ts +0 -5
- package/dist/types/Steps/types.d.ts +0 -31
- package/dist/types/Switch/index.d.ts +0 -16
- package/dist/types/Switch/styles.d.ts +0 -36
- package/dist/types/Switch/types.d.ts +0 -81
- package/dist/types/Table/SortableRow.d.ts +0 -26
- package/dist/types/Table/index.d.ts +0 -53
- package/dist/types/Tabs/index.d.ts +0 -5
- package/dist/types/Tabs/types.d.ts +0 -32
- package/dist/types/Tag/index.d.ts +0 -6
- package/dist/types/Tag/styles.d.ts +0 -52
- package/dist/types/Tag/types.d.ts +0 -46
- package/dist/types/TimePicker/RangePicker.d.ts +0 -4
- package/dist/types/TimePicker/TimePickerPanel.d.ts +0 -4
- package/dist/types/TimePicker/index.d.ts +0 -10
- package/dist/types/TimePicker/styles.d.ts +0 -33
- package/dist/types/TimePicker/types.d.ts +0 -151
- package/dist/types/Tooltip/Tooltip.d.ts +0 -15
- package/dist/types/Tooltip/index.d.ts +0 -2
- package/dist/types/Top/index.d.ts +0 -16
- package/dist/types/Transfer/index.d.ts +0 -21
- package/dist/types/Transfer/styles.d.ts +0 -104
- package/dist/types/Transfer/types.d.ts +0 -232
- package/dist/types/Tree/index.d.ts +0 -12
- package/dist/types/Tree/styles.d.ts +0 -54
- package/dist/types/Tree/types.d.ts +0 -202
- package/dist/types/TreeSelect/index.d.ts +0 -24
- package/dist/types/TreeSelect/styles.d.ts +0 -56
- package/dist/types/TreeSelect/types.d.ts +0 -107
- package/dist/types/Typography/index.d.ts +0 -5
- package/dist/types/Typography/types.d.ts +0 -13
- package/dist/types/Upload/index.d.ts +0 -6
- package/dist/types/Upload/styles.d.ts +0 -28
- package/dist/types/Upload/types.d.ts +0 -90
- package/dist/types/index.d.ts +0 -63
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Splitter 组件样式工具函数
|
|
3
|
-
* 使用 CSS 变量与现代化设计系统保持一致
|
|
4
|
-
*/
|
|
5
|
-
import { CSSProperties } from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* 获取容器样式
|
|
8
|
-
*/
|
|
9
|
-
export declare const getContainerStyle: (layout: "horizontal" | "vertical", customStyle?: CSSProperties) => CSSProperties;
|
|
10
|
-
/**
|
|
11
|
-
* 获取面板样式
|
|
12
|
-
* @param size - 面板尺寸(像素)
|
|
13
|
-
* @param layout - 布局方向
|
|
14
|
-
* @param index - 面板索引
|
|
15
|
-
* @param totalPanels - 面板总数
|
|
16
|
-
*/
|
|
17
|
-
export declare const getPanelStyle: (size: number, layout: "horizontal" | "vertical", index?: number, totalPanels?: number) => CSSProperties;
|
|
18
|
-
/**
|
|
19
|
-
* 获取分割条样式
|
|
20
|
-
* 使用 CSS 变量实现现代化渐变和阴影效果
|
|
21
|
-
* @param layout - 布局方向
|
|
22
|
-
* @param splitterSize - 分割条大小
|
|
23
|
-
* @param disabled - 是否禁用
|
|
24
|
-
* @param index - 分割条索引
|
|
25
|
-
*/
|
|
26
|
-
export declare const getSplitterBarStyle: (layout: "horizontal" | "vertical", splitterSize: number | undefined, disabled: boolean, index?: number) => CSSProperties;
|
|
27
|
-
/**
|
|
28
|
-
* 获取分割线样式
|
|
29
|
-
* 支持自定义颜色和拖拽状态
|
|
30
|
-
* @param layout - 布局方向
|
|
31
|
-
* @param lineColor - 线条颜色
|
|
32
|
-
* @param lineHoverColor - 悬停颜色
|
|
33
|
-
* @param isDragging - 是否正在拖拽
|
|
34
|
-
* @param isActive - 是否激活状态(当前拖拽的分割条)
|
|
35
|
-
*/
|
|
36
|
-
export declare const getSplitterLineStyle: (layout: "horizontal" | "vertical", lineColor: string | undefined, lineHoverColor: string | undefined, isDragging: boolean, isActive?: boolean) => CSSProperties;
|
|
37
|
-
/**
|
|
38
|
-
* 获取拖拽遮罩层样式
|
|
39
|
-
* 用于拖拽时覆盖整个页面防止事件穿透
|
|
40
|
-
*/
|
|
41
|
-
export declare const getDragOverlayStyle: () => CSSProperties;
|
|
42
|
-
/**
|
|
43
|
-
* 解析尺寸配置为数组
|
|
44
|
-
* @param size - 尺寸配置(单值或数组)
|
|
45
|
-
* @param count - 面板数量
|
|
46
|
-
* @param defaultValue - 默认值
|
|
47
|
-
*/
|
|
48
|
-
export declare const parseSizeConfig: (size: number | string | (number | string)[] | undefined, count: number, defaultValue?: number | string) => (number | string)[];
|
|
49
|
-
/**
|
|
50
|
-
* 解析数字配置为数组
|
|
51
|
-
* @param value - 数值配置(单值或数组)
|
|
52
|
-
* @param count - 面板数量
|
|
53
|
-
* @param defaultValue - 默认值
|
|
54
|
-
*/
|
|
55
|
-
export declare const parseNumberConfig: (value: number | number[] | undefined, count: number, defaultValue: number) => number[];
|
|
56
|
-
/**
|
|
57
|
-
* 将尺寸值转换为像素
|
|
58
|
-
* @param size - 尺寸值(数字或百分比字符串)
|
|
59
|
-
* @param availableSpace - 可用空间
|
|
60
|
-
*/
|
|
61
|
-
export declare const parseSizeToPixels: (size: number | string, availableSpace: number) => number;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Splitter 组件类型定义
|
|
3
|
-
* 用于自由切分指定区域,支持水平和垂直分隔,支持多面板
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* 单个面板配置
|
|
8
|
-
*/
|
|
9
|
-
export interface SplitterPanel {
|
|
10
|
-
/** 面板内容 */
|
|
11
|
-
content: React.ReactNode;
|
|
12
|
-
/** 面板默认大小(像素或百分比) */
|
|
13
|
-
defaultSize?: number | string;
|
|
14
|
-
/** 面板最小尺寸 */
|
|
15
|
-
minSize?: number;
|
|
16
|
-
/** 面板最大尺寸 */
|
|
17
|
-
maxSize?: number;
|
|
18
|
-
/** 是否禁用该面板相邻的分割条拖拽 */
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Splitter 组件 Props
|
|
23
|
-
*/
|
|
24
|
-
export interface SplitterProps {
|
|
25
|
-
/** 布局方向 */
|
|
26
|
-
layout?: 'horizontal' | 'vertical';
|
|
27
|
-
/**
|
|
28
|
-
* 面板数组,支持多面板配置
|
|
29
|
-
* 当提供 panels 时,优先使用 panels,忽略 left/right/top/bottom/children
|
|
30
|
-
*/
|
|
31
|
-
panels?: SplitterPanel[];
|
|
32
|
-
/**
|
|
33
|
-
* 默认大小配置(像素或百分比)
|
|
34
|
-
* 可以是单个值(用于2面板模式)或数组(用于多面板模式)
|
|
35
|
-
* 默认为 '50%' 或 ['33%', '33%', '33%']
|
|
36
|
-
*/
|
|
37
|
-
defaultSize?: number | string | (number | string)[];
|
|
38
|
-
/**
|
|
39
|
-
* 最小尺寸配置
|
|
40
|
-
* 可以是单个值或数组
|
|
41
|
-
*/
|
|
42
|
-
minSize?: number | number[];
|
|
43
|
-
/**
|
|
44
|
-
* 最大尺寸配置
|
|
45
|
-
* 可以是单个值或数组
|
|
46
|
-
*/
|
|
47
|
-
maxSize?: number | number[];
|
|
48
|
-
/** 分割条大小(像素),默认为 10 */
|
|
49
|
-
splitterSize?: number;
|
|
50
|
-
/** 拖拽线颜色 */
|
|
51
|
-
lineColor?: string;
|
|
52
|
-
/** 拖拽线悬停/拖拽时的颜色 */
|
|
53
|
-
lineHoverColor?: string;
|
|
54
|
-
/** 是否禁用所有拖拽 */
|
|
55
|
-
disabled?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* 拖拽时的回调
|
|
58
|
-
* @param sizes - 所有面板的当前尺寸数组
|
|
59
|
-
* @param index - 正在拖拽的分割条索引
|
|
60
|
-
*/
|
|
61
|
-
onResize?: (sizes: number[], index: number) => void;
|
|
62
|
-
/**
|
|
63
|
-
* 拖拽结束后的回调
|
|
64
|
-
* @param sizes - 所有面板的最终尺寸数组
|
|
65
|
-
*/
|
|
66
|
-
onResizeEnd?: (sizes: number[]) => void;
|
|
67
|
-
/** 自定义类名 */
|
|
68
|
-
className?: string;
|
|
69
|
-
/** 自定义样式 */
|
|
70
|
-
style?: React.CSSProperties;
|
|
71
|
-
/** @deprecated 请使用 panels 或 children */
|
|
72
|
-
left?: React.ReactNode;
|
|
73
|
-
/** @deprecated 请使用 panels 或 children */
|
|
74
|
-
right?: React.ReactNode;
|
|
75
|
-
/** @deprecated 请使用 panels 或 children */
|
|
76
|
-
top?: React.ReactNode;
|
|
77
|
-
/** @deprecated 请使用 panels 或 children */
|
|
78
|
-
bottom?: React.ReactNode;
|
|
79
|
-
/**
|
|
80
|
-
* 子元素数组
|
|
81
|
-
* 用于2面板模式时传入 [面板1, 面板2]
|
|
82
|
-
* 用于多面板模式时传入任意数量的面板
|
|
83
|
-
*/
|
|
84
|
-
children?: React.ReactNode[];
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* 单个拖拽状态
|
|
88
|
-
*/
|
|
89
|
-
export interface DragState {
|
|
90
|
-
/** 是否正在拖拽 */
|
|
91
|
-
isDragging: boolean;
|
|
92
|
-
/** 拖拽开始时的鼠标/触摸位置 */
|
|
93
|
-
startPosition: number;
|
|
94
|
-
/** 拖拽开始时的各面板尺寸 */
|
|
95
|
-
startSizes: number[];
|
|
96
|
-
/** 容器尺寸 */
|
|
97
|
-
containerSize: number;
|
|
98
|
-
/** 正在拖拽的分割条索引 */
|
|
99
|
-
splitterIndex: number;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* 面板尺寸信息
|
|
103
|
-
*/
|
|
104
|
-
export interface PanelSizeInfo {
|
|
105
|
-
/** 面板索引 */
|
|
106
|
-
index: number;
|
|
107
|
-
/** 面板当前尺寸 */
|
|
108
|
-
size: number;
|
|
109
|
-
/** 面板最小尺寸 */
|
|
110
|
-
minSize: number;
|
|
111
|
-
/** 面板最大尺寸 */
|
|
112
|
-
maxSize: number;
|
|
113
|
-
/** 默认尺寸 */
|
|
114
|
-
defaultSize: number | string;
|
|
115
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type StepStatus = 'wait' | 'process' | 'finish' | 'error';
|
|
3
|
-
export interface StepItem {
|
|
4
|
-
title?: React.ReactNode;
|
|
5
|
-
description?: React.ReactNode;
|
|
6
|
-
node?: React.ReactNode;
|
|
7
|
-
status?: StepStatus;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
tailColor?: string;
|
|
10
|
-
tailTitle?: React.ReactNode;
|
|
11
|
-
tailType?: 'solid' | 'dashed';
|
|
12
|
-
}
|
|
13
|
-
export interface StepsProps {
|
|
14
|
-
current?: number;
|
|
15
|
-
status?: StepStatus;
|
|
16
|
-
direction?: 'horizontal' | 'vertical';
|
|
17
|
-
size?: 'default' | 'small';
|
|
18
|
-
type?: 'default' | 'panel';
|
|
19
|
-
items: StepItem[];
|
|
20
|
-
onChange?: (current: number) => void;
|
|
21
|
-
className?: string;
|
|
22
|
-
style?: React.CSSProperties;
|
|
23
|
-
}
|
|
24
|
-
export interface StepContextType {
|
|
25
|
-
current: number;
|
|
26
|
-
status: StepStatus;
|
|
27
|
-
direction: 'horizontal' | 'vertical';
|
|
28
|
-
size: 'default' | 'small';
|
|
29
|
-
type: 'default' | 'panel';
|
|
30
|
-
onChange?: (current: number) => void;
|
|
31
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SwitchProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Switch 开关组件
|
|
5
|
-
* 用于在两种状态之间进行切换
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <Switch defaultChecked={false} onChange={(checked) => console.log(checked)} />
|
|
10
|
-
* <Switch checked={checked} onChange={setChecked} />
|
|
11
|
-
* <Switch checkedChildren="开启" unCheckedChildren="关闭" />
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
declare const Switch: React.FC<SwitchProps>;
|
|
15
|
-
export default Switch;
|
|
16
|
-
export type { SwitchProps };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { SwitchStyles } from './types';
|
|
2
|
-
export declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
-
$styles?: SwitchStyles["wrapper"];
|
|
4
|
-
}>> & string;
|
|
5
|
-
export declare const Track: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
|
-
$checked: boolean;
|
|
7
|
-
$disabled: boolean;
|
|
8
|
-
$size: "default" | "small";
|
|
9
|
-
$loading: boolean;
|
|
10
|
-
$hasChildren?: boolean;
|
|
11
|
-
$width?: number;
|
|
12
|
-
$styles?: SwitchStyles["track"];
|
|
13
|
-
}>> & string;
|
|
14
|
-
export declare const Thumb: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
15
|
-
$checked: boolean;
|
|
16
|
-
$size: "default" | "small";
|
|
17
|
-
$loading: boolean;
|
|
18
|
-
$hasChildren?: boolean;
|
|
19
|
-
$width?: number;
|
|
20
|
-
$styles?: SwitchStyles["thumb"];
|
|
21
|
-
}>> & string;
|
|
22
|
-
export declare const LoadingIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
23
|
-
$checked?: boolean;
|
|
24
|
-
$size?: "default" | "small";
|
|
25
|
-
$width?: number;
|
|
26
|
-
$styles?: SwitchStyles["loading"];
|
|
27
|
-
}>> & string;
|
|
28
|
-
export declare const CheckedInner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
29
|
-
$size: "default" | "small";
|
|
30
|
-
$styles?: SwitchStyles["inner"];
|
|
31
|
-
}>> & string;
|
|
32
|
-
export declare const UnCheckedInner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
33
|
-
$size: "default" | "small";
|
|
34
|
-
$styles?: SwitchStyles["inner"];
|
|
35
|
-
}>> & string;
|
|
36
|
-
export declare const injectGlobalStyles: () => void;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Switch 组件属性接口
|
|
4
|
-
*/
|
|
5
|
-
export interface SwitchProps {
|
|
6
|
-
/** 指定当前是否选中(受控模式) */
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
/** 初始是否选中(非受控模式) */
|
|
9
|
-
defaultChecked?: boolean;
|
|
10
|
-
/** 是否禁用 */
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
/** 加载中 */
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
/** 开关大小 */
|
|
15
|
-
size?: 'default' | 'small';
|
|
16
|
-
/** 自定义宽度(单位:px),不传则使用默认宽度 */
|
|
17
|
-
width?: number;
|
|
18
|
-
/** 选中时的内容 */
|
|
19
|
-
checkedChildren?: ReactNode;
|
|
20
|
-
/** 非选中时的内容 */
|
|
21
|
-
unCheckedChildren?: ReactNode;
|
|
22
|
-
/** 自定义样式 */
|
|
23
|
-
styles?: {
|
|
24
|
-
wrapper?: CSSProperties;
|
|
25
|
-
track?: CSSProperties;
|
|
26
|
-
thumb?: CSSProperties;
|
|
27
|
-
loading?: CSSProperties;
|
|
28
|
-
inner?: CSSProperties;
|
|
29
|
-
};
|
|
30
|
-
/** 变化时的回调函数 */
|
|
31
|
-
onChange?: (checked: boolean) => void;
|
|
32
|
-
/** 标签文案,显示在开关前面 */
|
|
33
|
-
label?: string | ReactNode;
|
|
34
|
-
/** 标签到开关的距离 */
|
|
35
|
-
labelGap?: string | number;
|
|
36
|
-
/** 标签的CSS类名 */
|
|
37
|
-
labelClassName?: string;
|
|
38
|
-
/** 标签的样式 */
|
|
39
|
-
labelStyle?: CSSProperties;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 样式配置接口
|
|
43
|
-
*/
|
|
44
|
-
export interface SwitchStyles {
|
|
45
|
-
wrapper?: CSSProperties;
|
|
46
|
-
track?: CSSProperties;
|
|
47
|
-
thumb?: CSSProperties;
|
|
48
|
-
loading?: CSSProperties;
|
|
49
|
-
inner?: CSSProperties;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* 尺寸配置接口
|
|
53
|
-
*/
|
|
54
|
-
export interface SwitchSizeConfig {
|
|
55
|
-
width: number;
|
|
56
|
-
height: number;
|
|
57
|
-
thumbSize: number;
|
|
58
|
-
thumbOffset: number;
|
|
59
|
-
thumbCheckedOffset: number;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Switch 主题配置接口
|
|
63
|
-
*/
|
|
64
|
-
export interface SwitchThemeConfig {
|
|
65
|
-
colors: {
|
|
66
|
-
primary: string;
|
|
67
|
-
success: string;
|
|
68
|
-
warning: string;
|
|
69
|
-
danger: string;
|
|
70
|
-
info: string;
|
|
71
|
-
default: string;
|
|
72
|
-
};
|
|
73
|
-
sizes: {
|
|
74
|
-
default: SwitchSizeConfig;
|
|
75
|
-
small: SwitchSizeConfig;
|
|
76
|
-
};
|
|
77
|
-
shadows: {
|
|
78
|
-
thumb: string;
|
|
79
|
-
thumbHover: string;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Column } from './index';
|
|
3
|
-
interface SortableRowProps {
|
|
4
|
-
id: string;
|
|
5
|
-
record: any;
|
|
6
|
-
rowIndex: number;
|
|
7
|
-
columns: Column[];
|
|
8
|
-
columnWidths: number[];
|
|
9
|
-
fixedLeftColumns: Column[];
|
|
10
|
-
fixedRightColumns: Column[];
|
|
11
|
-
normalColumns: Column[];
|
|
12
|
-
allColumns: Column[];
|
|
13
|
-
editingCell: {
|
|
14
|
-
rowIndex: number;
|
|
15
|
-
colKey: string;
|
|
16
|
-
} | null;
|
|
17
|
-
editingValue: string;
|
|
18
|
-
handleEdit: (rowIndex: number, colKey: string, value: any) => void;
|
|
19
|
-
handleSave: (record: any, column: Column) => void;
|
|
20
|
-
handleCancel: () => void;
|
|
21
|
-
setEditingValue: (value: string) => void;
|
|
22
|
-
renderTableCell: (column: Column, record: any, rowIndex: number, colIndex: number, colGroup: Column[]) => React.ReactNode;
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
}
|
|
25
|
-
declare const SortableRow: React.FC<SortableRowProps>;
|
|
26
|
-
export default SortableRow;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import './Table.css';
|
|
3
|
-
export interface Column {
|
|
4
|
-
key?: string;
|
|
5
|
-
dataIndex?: string;
|
|
6
|
-
title?: ReactNode;
|
|
7
|
-
width?: number | string;
|
|
8
|
-
align?: 'left' | 'center' | 'right';
|
|
9
|
-
fixed?: boolean | 'start' | 'end';
|
|
10
|
-
/** 限制单元格内容显示的最大行数,超出时显示省略号 */
|
|
11
|
-
maxLines?: number;
|
|
12
|
-
/** 是否显示提示气泡框 */
|
|
13
|
-
tooltip?: boolean;
|
|
14
|
-
/** 是否可编辑 */
|
|
15
|
-
editable?: boolean;
|
|
16
|
-
/** 编辑完成时的回调 */
|
|
17
|
-
onSave?: (record: any, value: any) => void;
|
|
18
|
-
render?: (value: any, record: any, index: number) => ReactNode;
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
}
|
|
21
|
-
export interface PaginationProps {
|
|
22
|
-
pageSize?: number;
|
|
23
|
-
total?: number;
|
|
24
|
-
current?: number;
|
|
25
|
-
onChange?: (page: number, pageSize: number) => void;
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
}
|
|
28
|
-
interface TableProps {
|
|
29
|
-
dataSource?: any[];
|
|
30
|
-
columns?: Column[];
|
|
31
|
-
bordered?: boolean;
|
|
32
|
-
scroll?: {
|
|
33
|
-
x?: number | string;
|
|
34
|
-
y?: number | string;
|
|
35
|
-
};
|
|
36
|
-
rowKey?: string | ((record: any, index: number) => string | number);
|
|
37
|
-
className?: string;
|
|
38
|
-
pagination?: PaginationProps | false;
|
|
39
|
-
/** 自定义空状态组件 */
|
|
40
|
-
empty?: ReactNode;
|
|
41
|
-
/** 加载状态 */
|
|
42
|
-
loading?: boolean;
|
|
43
|
-
/** 自定义加载提示文案 */
|
|
44
|
-
loadingText?: ReactNode;
|
|
45
|
-
/** 加载延迟时间(毫秒),设置后loading状态会在指定时间后自动取消 */
|
|
46
|
-
loadingDelay?: number;
|
|
47
|
-
/** 是否开启行拖拽功能 */
|
|
48
|
-
draggable?: boolean;
|
|
49
|
-
/** 拖拽结束时的回调函数,返回新的数据顺序 */
|
|
50
|
-
onDragEnd?: (newData: any[]) => void;
|
|
51
|
-
}
|
|
52
|
-
declare const Table: ({ dataSource, columns, bordered, scroll, rowKey, className, pagination, empty, loading, loadingText, loadingDelay, draggable, onDragEnd, }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
-
export default Table;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface TabItem {
|
|
3
|
-
key: string;
|
|
4
|
-
label: React.ReactNode;
|
|
5
|
-
content?: React.ReactNode;
|
|
6
|
-
/** 渲染内容的函数,在渲染时调用,避免闭包问题 */
|
|
7
|
-
renderContent?: () => React.ReactNode;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
closable?: boolean;
|
|
10
|
-
icon?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export type TabPlacement = 'top' | 'start' | 'end' | 'bottom';
|
|
13
|
-
export type TabType = 'line' | 'card';
|
|
14
|
-
export interface TabsProps {
|
|
15
|
-
items?: TabItem[];
|
|
16
|
-
activeKey?: string;
|
|
17
|
-
defaultActiveKey?: string;
|
|
18
|
-
onChange?: (key: string) => void;
|
|
19
|
-
onClose?: (key: string) => void;
|
|
20
|
-
tabsClosable?: boolean;
|
|
21
|
-
tabPlacement?: TabPlacement;
|
|
22
|
-
type?: TabType;
|
|
23
|
-
onAdd?: () => void;
|
|
24
|
-
className?: string;
|
|
25
|
-
style?: React.CSSProperties;
|
|
26
|
-
/** 内容区域自定义类名,优先级高于内部 className */
|
|
27
|
-
contentClassName?: string;
|
|
28
|
-
/** 内容区域自定义样式,优先级低于外部 className 和 style */
|
|
29
|
-
contentStyle?: React.CSSProperties;
|
|
30
|
-
draggable?: boolean;
|
|
31
|
-
onDragEnd?: (items: TabItem[]) => void;
|
|
32
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { TagSize } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* 获取标签尺寸对应的样式
|
|
5
|
-
*/
|
|
6
|
-
export declare const getTagSizeStyle: (size: TagSize) => CSSProperties;
|
|
7
|
-
/**
|
|
8
|
-
* 获取标签颜色样式
|
|
9
|
-
*/
|
|
10
|
-
export declare const getTagColorStyle: (backgroundColor?: string, color?: string) => CSSProperties;
|
|
11
|
-
/**
|
|
12
|
-
* 预设标签颜色
|
|
13
|
-
*/
|
|
14
|
-
export declare const presetTagColors: {
|
|
15
|
-
readonly red: {
|
|
16
|
-
readonly backgroundColor: "#fff2f0";
|
|
17
|
-
readonly color: "#ff4d4f";
|
|
18
|
-
};
|
|
19
|
-
readonly orange: {
|
|
20
|
-
readonly backgroundColor: "#fff7e6";
|
|
21
|
-
readonly color: "#fa8c16";
|
|
22
|
-
};
|
|
23
|
-
readonly gold: {
|
|
24
|
-
readonly backgroundColor: "#fffbe6";
|
|
25
|
-
readonly color: "#faad14";
|
|
26
|
-
};
|
|
27
|
-
readonly green: {
|
|
28
|
-
readonly backgroundColor: "#f6ffed";
|
|
29
|
-
readonly color: "#52c41a";
|
|
30
|
-
};
|
|
31
|
-
readonly cyan: {
|
|
32
|
-
readonly backgroundColor: "#e6fffb";
|
|
33
|
-
readonly color: "#13c2c2";
|
|
34
|
-
};
|
|
35
|
-
readonly blue: {
|
|
36
|
-
readonly backgroundColor: "#e6f7ff";
|
|
37
|
-
readonly color: "#1890ff";
|
|
38
|
-
};
|
|
39
|
-
readonly purple: {
|
|
40
|
-
readonly backgroundColor: "#f9f0ff";
|
|
41
|
-
readonly color: "#722ed1";
|
|
42
|
-
};
|
|
43
|
-
readonly pink: {
|
|
44
|
-
readonly backgroundColor: "#fff0f6";
|
|
45
|
-
readonly color: "#eb2f96";
|
|
46
|
-
};
|
|
47
|
-
readonly gray: {
|
|
48
|
-
readonly backgroundColor: "#f5f5f5";
|
|
49
|
-
readonly color: "#666";
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export type PresetTagColor = keyof typeof presetTagColors;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type TagSize = 'small' | 'medium' | 'large';
|
|
3
|
-
export interface TagProps {
|
|
4
|
-
/**
|
|
5
|
-
* 标签内容
|
|
6
|
-
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* 自定义类名
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* 自定义样式
|
|
14
|
-
*/
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
/**
|
|
17
|
-
* 标签尺寸
|
|
18
|
-
* @default 'medium'
|
|
19
|
-
*/
|
|
20
|
-
size?: TagSize;
|
|
21
|
-
/**
|
|
22
|
-
* 自定义背景色
|
|
23
|
-
*/
|
|
24
|
-
backgroundColor?: string;
|
|
25
|
-
/**
|
|
26
|
-
* 自定义字体颜色
|
|
27
|
-
*/
|
|
28
|
-
color?: string;
|
|
29
|
-
/**
|
|
30
|
-
* 前缀图标,可以是 Icon 组件的 type 字符串或自定义 React 节点
|
|
31
|
-
*/
|
|
32
|
-
icon?: string | React.ReactNode;
|
|
33
|
-
/**
|
|
34
|
-
* 是否可关闭
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
closable?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* 关闭时的回调
|
|
40
|
-
*/
|
|
41
|
-
onClose?: (e: React.MouseEvent) => void;
|
|
42
|
-
/**
|
|
43
|
-
* 点击标签时的回调
|
|
44
|
-
*/
|
|
45
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
46
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './TimePicker.css';
|
|
3
|
-
import { TimePickerProps } from './types';
|
|
4
|
-
import RangePicker from './RangePicker';
|
|
5
|
-
declare const TimePicker: React.FC<TimePickerProps> & {
|
|
6
|
-
RangePicker: typeof RangePicker;
|
|
7
|
-
};
|
|
8
|
-
export default TimePicker;
|
|
9
|
-
export type { TimePickerProps };
|
|
10
|
-
export { RangePicker };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const TimePickerContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
-
width?: string | number;
|
|
3
|
-
}>> & string;
|
|
4
|
-
export declare const TimePickerTrigger: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
5
|
-
focused?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}>> & string;
|
|
8
|
-
export declare const TimePickerValue: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
9
|
-
isPlaceholder?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}>> & string;
|
|
12
|
-
export declare const TimePickerSuffix: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
13
|
-
export declare const TimePickerClear: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
14
|
-
visible?: boolean;
|
|
15
|
-
}>> & string;
|
|
16
|
-
export declare const TimePickerIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
17
|
-
open?: boolean;
|
|
18
|
-
}>> & string;
|
|
19
|
-
export declare const TimePickerDropdown: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
20
|
-
top: number;
|
|
21
|
-
left: number;
|
|
22
|
-
minWidth: number;
|
|
23
|
-
}>> & string;
|
|
24
|
-
export declare const TimePickerPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
25
|
-
export declare const TimeColumn: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
26
|
-
export declare const TimeColumnHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
27
|
-
export declare const TimeColumnList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
28
|
-
export declare const TimeOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
29
|
-
selected?: boolean;
|
|
30
|
-
disabled?: boolean;
|
|
31
|
-
}>> & string;
|
|
32
|
-
export declare const TimePickerLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
33
|
-
export declare const TimePickerWithLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|