@unicom-cloud/ui 0.8.98 → 0.8.100
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/Anchor.js +3 -1
- package/Badge.js +54 -7
- package/Copy.js +49 -2
- package/Flex.js +12 -0
- package/Grid.js +1 -1
- package/LiquidFill.js +60 -2
- package/Marquee.js +62 -0
- package/QrCode.js +14 -9
- package/Segmented.js +11 -0
- package/Space.js +14 -6
- package/Splitter.js +6 -0
- package/Tag.js +3 -2
- package/Tour.js +14 -9
- package/alert/index.js +38 -39
- package/anchor/index.js +5 -3
- package/badge/index.js +174 -80
- package/collapse/Collapse.js +54 -48
- package/components/common/space/index.js +90 -106
- package/copy/index.js +83 -35
- package/flex/index.js +59 -0
- package/flex/interface.js +34 -0
- package/flex/utils.js +13 -0
- package/grid/{GridItem.js → Item.js} +15 -15
- package/grid/index.js +1 -1
- package/index.js +490 -477
- package/input/Button.js +39 -34
- package/input/Textarea.js +108 -104
- package/liquid-fill/index.js +256 -2
- package/marquee/index.js +283 -0
- package/menu/Item.js +17 -16
- package/package.json +1 -1
- package/qr-code/index.js +54 -36
- package/rate/index.js +8 -8
- package/segmented/index.js +225 -0
- package/space/index.js +28 -29
- package/spin/index.js +75 -62
- package/splitter/Panel.js +39 -0
- package/splitter/SplitBar.js +157 -0
- package/splitter/Splitter.js +139 -0
- package/splitter/hooks/useEvent.js +12 -0
- package/splitter/hooks/useItems.js +26 -0
- package/splitter/hooks/useResizable.js +26 -0
- package/splitter/hooks/useResize.js +68 -0
- package/splitter/hooks/useSizes.js +60 -0
- package/splitter/index.js +7 -0
- package/splitter/interface.js +1 -0
- package/style.css +1 -1
- package/table/Table.js +1 -1
- package/table/hook/useThResizable.js +72 -26
- package/table/tbody/Td.js +80 -77
- package/table/th-resizable/index.js +92 -35
- package/tag/index.js +42 -41
- package/tooltip/index.js +89 -82
- package/tour/index.js +110 -89
- package/types/common/hooks/useMergeProps.d.ts +1 -1
- package/types/common/space/index.d.ts +7 -5
- package/types/common/space/interface.d.ts +29 -16
- package/types/pc/affix/interface.d.ts +0 -2
- package/types/pc/alert/index.d.ts +2 -2
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/anchor/interface.d.ts +0 -2
- package/types/pc/auto-complete/interface.d.ts +0 -6
- package/types/pc/avatar/interface.d.ts +0 -4
- package/types/pc/badge/index.d.ts +4 -4
- package/types/pc/badge/interface.d.ts +26 -0
- package/types/pc/breadcrumb/interface.d.ts +0 -3
- package/types/pc/carousel/interface.d.ts +2 -6
- package/types/pc/cascader/interface.d.ts +6 -18
- package/types/pc/checkbox/interface.d.ts +0 -1
- package/types/pc/collapse/interface.d.ts +4 -2
- package/types/pc/color-picker/interface.d.ts +0 -2
- package/types/pc/config-provider/interface.d.ts +16 -14
- package/types/pc/copy/interface.d.ts +2 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/date-picker/interface.d.ts +0 -17
- package/types/pc/descriptions/interface.d.ts +0 -1
- package/types/pc/drawer/interface.d.ts +0 -7
- package/types/pc/dropdown/interface.d.ts +0 -1
- package/types/pc/flex/index.d.ts +9 -0
- package/types/pc/flex/interface.d.ts +61 -0
- package/types/pc/flex/utils.d.ts +9 -0
- package/types/pc/form/interface.d.ts +9 -22
- package/types/pc/form/util.d.ts +1 -1
- package/types/pc/grid/index.d.ts +3 -3
- package/types/pc/grid/interface.d.ts +1 -6
- package/types/pc/image/interface.d.ts +0 -13
- package/types/pc/index.d.ts +16 -6
- package/types/pc/input/Textarea.d.ts +2 -6
- package/types/pc/input/interface.d.ts +5 -13
- package/types/pc/input-number/interface.d.ts +0 -4
- package/types/pc/input-tag/interface.d.ts +0 -13
- package/types/pc/layout/interface.d.ts +0 -1
- package/types/pc/link/interface.d.ts +0 -1
- package/types/pc/liquid-fill/index.d.ts +114 -1
- package/types/pc/list/interface.d.ts +0 -4
- package/types/pc/marquee/index.d.ts +61 -0
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/menu/interface.d.ts +0 -8
- package/types/pc/message/interface.d.ts +0 -2
- package/types/pc/modal/interface.d.ts +0 -5
- package/types/pc/notification/interface.d.ts +0 -1
- package/types/pc/pagination/interface.d.ts +0 -2
- package/types/pc/popconfirm/interface.d.ts +8 -10
- package/types/pc/popover/interface.d.ts +0 -1
- package/types/pc/progress/interface.d.ts +0 -3
- package/types/pc/qr-code/index.d.ts +1 -1
- package/types/pc/rate/index.d.ts +2 -2
- package/types/pc/resize-box/interface.d.ts +1 -7
- package/types/pc/segmented/index.d.ts +8 -0
- package/types/pc/segmented/interface.d.ts +88 -0
- package/types/pc/select/interface.d.ts +0 -12
- package/types/pc/select-view/interface.d.ts +0 -7
- package/types/pc/slider/interface.d.ts +0 -4
- package/types/pc/space/index.d.ts +4 -1
- package/types/pc/space/interface.d.ts +6 -10
- package/types/pc/spin/interface.d.ts +4 -1
- package/types/pc/splitter/Panel.d.ts +8 -0
- package/types/pc/splitter/SplitBar.d.ts +21 -0
- package/types/pc/splitter/Splitter.d.ts +4 -0
- package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
- package/types/pc/splitter/hooks/useItems.d.ts +10 -0
- package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
- package/types/pc/splitter/hooks/useResize.d.ts +4 -0
- package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
- package/types/pc/splitter/index.d.ts +8 -0
- package/types/pc/splitter/interface.d.ts +213 -0
- package/types/pc/statistic/interface.d.ts +0 -4
- package/types/pc/steps/interface.d.ts +0 -3
- package/types/pc/table/hook/useThResizable.d.ts +2 -2
- package/types/pc/table/interface.d.ts +4 -15
- package/types/pc/tabs/interface.d.ts +0 -7
- package/types/pc/tag/index.d.ts +2 -0
- package/types/pc/tag/interface.d.ts +0 -1
- package/types/pc/time-picker/interface.d.ts +0 -7
- package/types/pc/tooltip/interface.d.ts +4 -1
- package/types/pc/tour/index.d.ts +6 -1
- package/types/pc/transfer/interface.d.ts +2 -9
- package/types/pc/tree/interface.d.ts +2 -8
- package/types/pc/tree-select/interface.d.ts +0 -8
- package/types/pc/trigger/interface.d.ts +0 -5
- package/types/pc/typography/EditContent.d.ts +2 -1
- package/types/pc/typography/interface.d.ts +45 -30
- package/types/pc/upload/interface.d.ts +6 -11
- package/types/pc/utils/index.d.ts +1 -0
- package/types/pc/utils/names.d.ts +24 -0
- package/types/pc/utils/toArray.d.ts +7 -0
- package/types/pc/verification-code/interface.d.ts +0 -2
- package/types/pc/watermark/interface.d.ts +0 -2
- package/typography/Base.js +73 -73
- package/typography/EditContent.js +43 -33
- package/typography/Ellipsis.js +117 -184
- package/typography/Operations.js +97 -49
- package/typography/useCssEllipsis.js +7 -6
- package/utils/index.js +117 -115
- package/utils/names.js +16 -0
- package/utils/toArray.js +12 -0
- package/version/index.js +1 -1
- package/_virtual/_commonjsHelpers.js +0 -6
- package/_virtual/index.js +0 -7
- package/_virtual/index2.js +0 -4
- package/liquid-fill/LiquidFill.js +0 -226
- package/liquid-fill/LiquidFill2.js +0 -3
- package/space-/index.js +0 -93
- package/types/common/utils/color.d.ts +0 -1
- package/types/common/utils/computeScrollIntoView.d.ts +0 -1
- package/types/common/utils/index.d.ts +0 -45
- package/types/common/utils/math.d.ts +0 -1
- package/types/common/utils/reactTransitionGroup.d.ts +0 -1
- package/types/common/utils/tree.d.ts +0 -1
- package/types/common/utils/tween.d.ts +0 -1
- package/types/common/utils/uuid.d.ts +0 -1
- package/types/common/utils/validate.d.ts +0 -1
- package/types/pc/liquid-fill/LiquidFill.d.ts +0 -115
- package/types/pc/liquid-fill/LiquidFill2.d.ts +0 -1
- package/types/pc/space-/index.d.ts +0 -6
- package/types/pc/space-/interface.d.ts +0 -38
- /package/{space- → components/common/space}/toArray.js +0 -0
- /package/{space- → segmented}/interface.js +0 -0
- /package/types/{pc/space- → common/space}/toArray.d.ts +0 -0
- /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
|
@@ -1,2 +1,115 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { type CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 颜色配置类型,支持纯色和渐变色
|
|
4
|
+
*/
|
|
5
|
+
type ColorType = string | {
|
|
6
|
+
/** 渐变起始颜色 */
|
|
7
|
+
from: string;
|
|
8
|
+
/** 渐变结束颜色 */
|
|
9
|
+
to: string;
|
|
10
|
+
/**
|
|
11
|
+
* 渐变方向
|
|
12
|
+
* @default 'vertical' 垂直渐变
|
|
13
|
+
*/
|
|
14
|
+
direction?: 'horizontal' | 'vertical';
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 水球填充组件的属性接口
|
|
18
|
+
*/
|
|
19
|
+
export interface LiquidFillProps {
|
|
20
|
+
/** 自定义容器样式 */
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
/** 自定义类名 */
|
|
23
|
+
className?: string | string[];
|
|
24
|
+
/**
|
|
25
|
+
* 当前填充比例 (0-1)
|
|
26
|
+
* @default 0.5
|
|
27
|
+
*/
|
|
28
|
+
value: number;
|
|
29
|
+
/**
|
|
30
|
+
* 组件尺寸 (像素)
|
|
31
|
+
* @default 200
|
|
32
|
+
*/
|
|
33
|
+
size?: number;
|
|
34
|
+
/**
|
|
35
|
+
* 字体大小
|
|
36
|
+
* @default size * 0.15
|
|
37
|
+
*/
|
|
38
|
+
fontSize?: number | string;
|
|
39
|
+
/**
|
|
40
|
+
* 波浪颜色,支持纯色或渐变色
|
|
41
|
+
* @default 'rgb(var(--pqb-blue-6))'
|
|
42
|
+
*/
|
|
43
|
+
waveColor?: ColorType;
|
|
44
|
+
/**
|
|
45
|
+
* 背景颜色,支持纯色或渐变色
|
|
46
|
+
* @default 'var(--pqb-color-neutral-1)'
|
|
47
|
+
*/
|
|
48
|
+
backgroundColor?: ColorType;
|
|
49
|
+
/**
|
|
50
|
+
* 文字颜色
|
|
51
|
+
* @default 'var(--pqb-color-neutral-8)'
|
|
52
|
+
*/
|
|
53
|
+
textColor?: string;
|
|
54
|
+
/**
|
|
55
|
+
* 是否显示百分比
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
showPercent?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 动画持续时间(毫秒)
|
|
61
|
+
* @default 2000
|
|
62
|
+
*/
|
|
63
|
+
duration?: number;
|
|
64
|
+
/**
|
|
65
|
+
* 波浪数量
|
|
66
|
+
* @default 3
|
|
67
|
+
*/
|
|
68
|
+
waveCount?: number;
|
|
69
|
+
/**
|
|
70
|
+
* 波浪振幅
|
|
71
|
+
* @default 10
|
|
72
|
+
*/
|
|
73
|
+
waveAmplitude?: number;
|
|
74
|
+
/**
|
|
75
|
+
* 内层边框颜色
|
|
76
|
+
* @default 'var(--pqb-color-neutral-4)'
|
|
77
|
+
*/
|
|
78
|
+
borderColor?: string;
|
|
79
|
+
/**
|
|
80
|
+
* 内层边框宽度
|
|
81
|
+
* @default 2
|
|
82
|
+
*/
|
|
83
|
+
borderWidth?: number;
|
|
84
|
+
/**
|
|
85
|
+
* 外层边框颜色(默认使用内层边框颜色但透明度30%)
|
|
86
|
+
*/
|
|
87
|
+
outerBorderColor?: string;
|
|
88
|
+
/**
|
|
89
|
+
* 外层边框宽度
|
|
90
|
+
* @default 0(不显示)
|
|
91
|
+
*/
|
|
92
|
+
outerBorderWidth?: number;
|
|
93
|
+
/**
|
|
94
|
+
* 内外层边框间距
|
|
95
|
+
* @default 2
|
|
96
|
+
*/
|
|
97
|
+
borderGap?: number;
|
|
98
|
+
/**
|
|
99
|
+
* 百分比显示的小数位数
|
|
100
|
+
* @default 0(整数)
|
|
101
|
+
*/
|
|
102
|
+
decimalPlaces?: number;
|
|
103
|
+
/**
|
|
104
|
+
* 百分号相对于数字的缩放比例
|
|
105
|
+
* @default 0.5
|
|
106
|
+
*/
|
|
107
|
+
percentFontScale?: number;
|
|
108
|
+
/**
|
|
109
|
+
* 波浪速度变化系数(值越大速度差异越大)
|
|
110
|
+
* @default 0.5
|
|
111
|
+
*/
|
|
112
|
+
waveSpeedVariation?: number;
|
|
113
|
+
}
|
|
114
|
+
declare const LiquidFill: React.FC<LiquidFillProps>;
|
|
2
115
|
export default LiquidFill;
|
|
@@ -77,7 +77,6 @@ export interface ListProps<T = any> {
|
|
|
77
77
|
/**
|
|
78
78
|
* @zh 列表栅格配置
|
|
79
79
|
* @en The grid type of list
|
|
80
|
-
* @version `column` in 2.20.0
|
|
81
80
|
*/
|
|
82
81
|
grid?: ListGridProps;
|
|
83
82
|
/**
|
|
@@ -88,7 +87,6 @@ export interface ListProps<T = any> {
|
|
|
88
87
|
/**
|
|
89
88
|
* @zh 列表项是否可悬浮
|
|
90
89
|
* @en Whether list items have hover style
|
|
91
|
-
* @version 2.9.0
|
|
92
90
|
*/
|
|
93
91
|
hoverable?: boolean;
|
|
94
92
|
/**
|
|
@@ -117,7 +115,6 @@ export interface ListProps<T = any> {
|
|
|
117
115
|
/**
|
|
118
116
|
* @zh 当前列表的引用
|
|
119
117
|
* @en Reference to the current list
|
|
120
|
-
* @version 2.20.0
|
|
121
118
|
*/
|
|
122
119
|
listRef?: MutableRefObject<ListHandle>;
|
|
123
120
|
/**
|
|
@@ -138,7 +135,6 @@ export interface ListProps<T = any> {
|
|
|
138
135
|
/**
|
|
139
136
|
* @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动
|
|
140
137
|
* @en Pass the virtual-list properties, pass in this parameter to turn on virtual scrolling
|
|
141
|
-
* @version 2.11.0
|
|
142
138
|
*/
|
|
143
139
|
virtualListProps?: AvailableVirtualListProps;
|
|
144
140
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
export interface MarqueeProps {
|
|
3
|
+
/**
|
|
4
|
+
* 运动内容(支持文本或React节点)
|
|
5
|
+
* @example
|
|
6
|
+
* <Marquee>这是运动内容</Marquee>
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* 运动速度(像素/秒)
|
|
11
|
+
* @default 50
|
|
12
|
+
* @range 1-200
|
|
13
|
+
*/
|
|
14
|
+
speed?: number;
|
|
15
|
+
/**
|
|
16
|
+
* 运动方向
|
|
17
|
+
* @default 'left'
|
|
18
|
+
* @enum ['left', 'right', 'up', 'down']
|
|
19
|
+
*/
|
|
20
|
+
direction?: 'left' | 'right' | 'up' | 'down';
|
|
21
|
+
/**
|
|
22
|
+
* 鼠标悬停时是否暂停
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
pauseOnHover?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 是否显示边缘渐变遮罩
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
gradient?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 循环次数(0表示无限循环)
|
|
33
|
+
* @default 0
|
|
34
|
+
* @example
|
|
35
|
+
* <Marquee loop={3}>循环3次</Marquee>
|
|
36
|
+
*/
|
|
37
|
+
loop?: number;
|
|
38
|
+
/**
|
|
39
|
+
* 循环完成回调(仅在loop>0时触发)
|
|
40
|
+
*/
|
|
41
|
+
onComplete?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* 自定义类名
|
|
44
|
+
*/
|
|
45
|
+
className?: string;
|
|
46
|
+
/**
|
|
47
|
+
* 自定义样式
|
|
48
|
+
*/
|
|
49
|
+
style?: CSSProperties;
|
|
50
|
+
/**
|
|
51
|
+
* 渐变遮罩尺寸(像素)
|
|
52
|
+
* @default 50
|
|
53
|
+
*/
|
|
54
|
+
gradientSize?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 跑马灯组件
|
|
58
|
+
* 实现所有方向完美无缝循环运动
|
|
59
|
+
*/
|
|
60
|
+
declare const Marquee: React.FC<MarqueeProps>;
|
|
61
|
+
export default Marquee;
|
|
@@ -5,7 +5,7 @@ export type HotkeyInfo = {
|
|
|
5
5
|
type: 'sibling' | 'generation' | 'enter';
|
|
6
6
|
};
|
|
7
7
|
export type ResetHotkeyInfo = (activeKey?: string) => void;
|
|
8
|
-
declare const MenuContext: import("react").Context<Pick<MenuProps, "theme" | "
|
|
8
|
+
declare const MenuContext: import("react").Context<Pick<MenuProps, "theme" | "collapse" | "mode" | "icons" | "triggerProps" | "inDropdown" | "tooltipProps" | "levelIndent" | "selectedKeys" | "openKeys" | "autoScrollIntoView" | "scrollConfig"> & {
|
|
9
9
|
id?: string;
|
|
10
10
|
prefixCls?: string;
|
|
11
11
|
onClickMenuItem?: (key: string, e: any) => void;
|
|
@@ -63,7 +63,6 @@ export interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
|
|
|
63
63
|
* @zh 水平菜单是否自动溢出省略
|
|
64
64
|
* @en Whether the horizontal menu automatically collapses when it overflows
|
|
65
65
|
* @defaultValue true
|
|
66
|
-
* @version 2.24.0
|
|
67
66
|
*/
|
|
68
67
|
ellipsis?: boolean | {
|
|
69
68
|
text?: ReactNode;
|
|
@@ -101,13 +100,11 @@ export interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
|
|
|
101
100
|
/**
|
|
102
101
|
* @zh 点击菜单项的回调
|
|
103
102
|
* @en Click menu item callback
|
|
104
|
-
* @version `event` in 2.15.0, `keyPath` in 2.19.0
|
|
105
103
|
*/
|
|
106
104
|
onClickMenuItem?: (key: string, event: any, keyPath: string[]) => any;
|
|
107
105
|
/**
|
|
108
106
|
* @zh 点击子菜单标题的回调
|
|
109
107
|
* @en Callback when click sub menu
|
|
110
|
-
* @version `keyPath` in 2.19.0
|
|
111
108
|
*/
|
|
112
109
|
onClickSubMenu?: (key: string, openKeys: string[], keyPath: string[]) => void;
|
|
113
110
|
/**
|
|
@@ -118,7 +115,6 @@ export interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
|
|
|
118
115
|
/**
|
|
119
116
|
* @zh 水平菜单自动超出省略发生变化时的回调
|
|
120
117
|
* @en Callback when horizontal-menu ellipsis status changed
|
|
121
|
-
* @version 2.57.0
|
|
122
118
|
*/
|
|
123
119
|
onEllipsisChange?: (status: {
|
|
124
120
|
lastVisibleIndex: number;
|
|
@@ -172,13 +168,11 @@ export interface MenuSubMenuProps extends Omit<HTMLAttributes<HTMLElement>, 'tit
|
|
|
172
168
|
/**
|
|
173
169
|
* @zh 是否强制使用弹出模式,`level` 表示当前子菜单的层级
|
|
174
170
|
* @en Whether to force the use of popup mode, parameter `level` indicates the level of current subMenu.
|
|
175
|
-
* @version 2.8.0
|
|
176
171
|
*/
|
|
177
172
|
popup?: boolean | ((level: number) => boolean);
|
|
178
173
|
/**
|
|
179
174
|
* @zh 弹出模式下可接受所有 `Trigger` 的 `Props`
|
|
180
175
|
* @en Pass all `Trigger` component properties
|
|
181
|
-
* @version 2.19.0
|
|
182
176
|
*/
|
|
183
177
|
triggerProps?: Partial<TriggerProps>;
|
|
184
178
|
}
|
|
@@ -221,13 +215,11 @@ export interface MenuItemProps extends Omit<HTMLAttributes<HTMLElement>, 'classN
|
|
|
221
215
|
* @zh 配置最外层标签,可以是 html 标签或是组件
|
|
222
216
|
* @en Configure the outermost label, which can be a html label or a component
|
|
223
217
|
* @defaultValue div
|
|
224
|
-
* @version 2.16.0
|
|
225
218
|
*/
|
|
226
219
|
wrapper?: string | React.FC<any> | React.ComponentClass<any>;
|
|
227
220
|
/**
|
|
228
221
|
* @zh 菜单折叠时,指定在 Tooltip 中展示的菜单项节点
|
|
229
222
|
* @en Set the menu item displayed in Tooltip when menu is collapsed
|
|
230
|
-
* @version 2.51.0
|
|
231
223
|
*/
|
|
232
224
|
renderItemInTooltip?: () => ReactNode;
|
|
233
225
|
}
|
|
@@ -15,7 +15,6 @@ export interface MessageProps {
|
|
|
15
15
|
* @zh 动画持续时间,见 react-transition-group 的 `timeout`
|
|
16
16
|
* @en timeout of `react-transition-group` of the message pop-up animation, see `timeout`
|
|
17
17
|
* @defaultValue {enter: 100, exit: 300}
|
|
18
|
-
* @version 2.43.0
|
|
19
18
|
*/
|
|
20
19
|
transitionTimeout?: {
|
|
21
20
|
enter?: number;
|
|
@@ -67,7 +66,6 @@ export interface MessageProps {
|
|
|
67
66
|
/**
|
|
68
67
|
* @zh 自定义右上角关闭按钮
|
|
69
68
|
* @en Custom the close button on top-right of the drawer dialog
|
|
70
|
-
* @version 2.50.0
|
|
71
69
|
*/
|
|
72
70
|
closeIcon?: ReactNode;
|
|
73
71
|
type?: string;
|
|
@@ -77,7 +77,6 @@ export interface ModalProps {
|
|
|
77
77
|
/**
|
|
78
78
|
* @zh 自定义页脚,传入 null 则不显示
|
|
79
79
|
* @en Custom `footer`. if it is null, the footer will not be displayed.
|
|
80
|
-
* @version 2.12.0
|
|
81
80
|
*/
|
|
82
81
|
footer?: ReactNode | ((cancelButtonNode: ReactNode, okButtonNode: ReactNode) => ReactNode);
|
|
83
82
|
/**
|
|
@@ -88,7 +87,6 @@ export interface ModalProps {
|
|
|
88
87
|
/**
|
|
89
88
|
* @zh 自定义右上角的关闭按钮节点
|
|
90
89
|
* @en Customize the close icon
|
|
91
|
-
* @version 2.21.0
|
|
92
90
|
*/
|
|
93
91
|
closeIcon?: ReactNode;
|
|
94
92
|
/**
|
|
@@ -100,7 +98,6 @@ export interface ModalProps {
|
|
|
100
98
|
/**
|
|
101
99
|
* @zh 蒙层的样式
|
|
102
100
|
* @en The style of mask
|
|
103
|
-
* @version 2.6.0
|
|
104
101
|
*/
|
|
105
102
|
maskStyle?: CSSProperties;
|
|
106
103
|
/**
|
|
@@ -149,14 +146,12 @@ export interface ModalProps {
|
|
|
149
146
|
/**
|
|
150
147
|
* @zh 弹出框外层样式
|
|
151
148
|
* @en The style of the wrapped dom
|
|
152
|
-
* @version 2.16.0
|
|
153
149
|
*/
|
|
154
150
|
wrapStyle?: CSSProperties;
|
|
155
151
|
hideCancel?: boolean;
|
|
156
152
|
/**
|
|
157
153
|
* @zh 自定义渲染对话框
|
|
158
154
|
* @en Custom the render of Modal
|
|
159
|
-
* @version 2.2.0
|
|
160
155
|
*/
|
|
161
156
|
modalRender?: (modalNode: ReactNode) => ReactNode;
|
|
162
157
|
prefixCls?: string;
|
|
@@ -49,7 +49,6 @@ export interface PaginationProps {
|
|
|
49
49
|
/**
|
|
50
50
|
* @zh 是否在只有一页的情况下隐藏
|
|
51
51
|
* @en Whether to hide when there is only one page
|
|
52
|
-
* @version 2.6.0
|
|
53
52
|
*/
|
|
54
53
|
hideOnSinglePage?: boolean;
|
|
55
54
|
/**
|
|
@@ -81,7 +80,6 @@ export interface PaginationProps {
|
|
|
81
80
|
* @zh `current` 页与 `...` 之间的页码个数
|
|
82
81
|
* @en the number of pages between the `current` page and `...`
|
|
83
82
|
* @defaultValue 2
|
|
84
|
-
* @version 2.32.0
|
|
85
83
|
*/
|
|
86
84
|
bufferSize?: number;
|
|
87
85
|
/**
|
|
@@ -19,20 +19,18 @@ export interface PopconfirmProps {
|
|
|
19
19
|
*/
|
|
20
20
|
position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb';
|
|
21
21
|
/**
|
|
22
|
-
* @zh
|
|
23
|
-
* @en Title of Popconfirm.
|
|
22
|
+
* @zh 标题
|
|
23
|
+
* @en Title of Popconfirm.
|
|
24
24
|
*/
|
|
25
25
|
title?: ReactNode | (() => ReactNode);
|
|
26
26
|
/**
|
|
27
|
-
* @zh
|
|
28
|
-
* @en Content of Popconfirm
|
|
29
|
-
* @version 2.44.0
|
|
27
|
+
* @zh 内容
|
|
28
|
+
* @en Content of Popconfirm
|
|
30
29
|
*/
|
|
31
30
|
content?: ReactNode | (() => ReactNode);
|
|
32
31
|
/**
|
|
33
32
|
* @zh 是否禁用
|
|
34
33
|
* @en whether to disabled
|
|
35
|
-
* @version 2.11.0
|
|
36
34
|
*/
|
|
37
35
|
disabled?: boolean;
|
|
38
36
|
/**
|
|
@@ -62,13 +60,13 @@ export interface PopconfirmProps {
|
|
|
62
60
|
*/
|
|
63
61
|
cancelButtonProps?: ButtonProps;
|
|
64
62
|
/**
|
|
65
|
-
* @zh
|
|
66
|
-
* @en Callback when click the ok button.
|
|
63
|
+
* @zh 点击确认按钮的回调函数。
|
|
64
|
+
* @en Callback when click the ok button.
|
|
67
65
|
*/
|
|
68
66
|
onOk?: (e: React.MouseEvent) => Promise<any> | void;
|
|
69
67
|
/**
|
|
70
|
-
* @zh 点击取消按钮的回调函数。
|
|
71
|
-
* @en Callback when click the cancel button.
|
|
68
|
+
* @zh 点击取消按钮的回调函数。
|
|
69
|
+
* @en Callback when click the cancel button.
|
|
72
70
|
*/
|
|
73
71
|
onCancel?: (e: React.MouseEvent) => void;
|
|
74
72
|
/**
|
|
@@ -14,7 +14,6 @@ export interface ProgressProps {
|
|
|
14
14
|
/**
|
|
15
15
|
* @zh 显示步骤进度条
|
|
16
16
|
* @en Show step progress
|
|
17
|
-
* @version 2.10.0
|
|
18
17
|
*/
|
|
19
18
|
steps?: number;
|
|
20
19
|
/**
|
|
@@ -25,13 +24,11 @@ export interface ProgressProps {
|
|
|
25
24
|
/**
|
|
26
25
|
* @zh 进度条状态
|
|
27
26
|
* @en Progress status.
|
|
28
|
-
* @version 2.16.0
|
|
29
27
|
*/
|
|
30
28
|
status?: 'success' | 'error' | 'normal' | 'warning';
|
|
31
29
|
/**
|
|
32
30
|
* @zh 进度条颜色,优先级高于 `status`。传入对象时,会显示渐变色进度条。
|
|
33
31
|
* @en Progress color, priority is higher than `status`
|
|
34
|
-
* @version 2.10.0
|
|
35
32
|
*/
|
|
36
33
|
color?: string | {
|
|
37
34
|
[key: string]: string;
|
package/types/pc/rate/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RateProps } from './interface';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const Rate: React.ForwardRefExoticComponent<RateProps & React.RefAttributes<unknown>>;
|
|
4
|
+
export default Rate;
|
|
5
5
|
export type { RateProps };
|
|
@@ -8,13 +8,11 @@ export interface ResizeBoxProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* @zh 宽度,受控属性
|
|
10
10
|
* @en The width of ResizeBox
|
|
11
|
-
* @version 2.7.0
|
|
12
11
|
*/
|
|
13
12
|
width?: number;
|
|
14
13
|
/**
|
|
15
14
|
* @zh 高度,受控属性
|
|
16
15
|
* @en The height of ResizeBox
|
|
17
|
-
* @version 2.7.0
|
|
18
16
|
*/
|
|
19
17
|
height?: number;
|
|
20
18
|
/**
|
|
@@ -59,7 +57,6 @@ export interface ResizeBoxProps {
|
|
|
59
57
|
/**
|
|
60
58
|
* @zh 拖拽中的回调
|
|
61
59
|
* @en Callback when resizing
|
|
62
|
-
* @version `size` in `2.7.0`
|
|
63
60
|
*/
|
|
64
61
|
onMoving?: (e: MouseEvent, size: {
|
|
65
62
|
width: number;
|
|
@@ -87,7 +84,6 @@ export interface SplitProps {
|
|
|
87
84
|
* @zh 分割方向分为水平 `horizontal` 和垂直 `vertical`,默认是水平分割
|
|
88
85
|
* @en The direction of Split. It can be `horizontal` and `vertical`
|
|
89
86
|
* @defaultValue horizontal
|
|
90
|
-
* @version `reverse` in `2.35.0`
|
|
91
87
|
*/
|
|
92
88
|
direction?: 'horizontal' | 'vertical' | 'horizontal-reverse' | 'vertical-reverse';
|
|
93
89
|
/**
|
|
@@ -134,7 +130,6 @@ export interface SplitProps {
|
|
|
134
130
|
/**
|
|
135
131
|
* @zh 拖拽中的回调
|
|
136
132
|
* @en Callback when moving
|
|
137
|
-
* @version `size` in `2.14.0`
|
|
138
133
|
*/
|
|
139
134
|
onMoving?: (e: MouseEvent, size: number | string) => void;
|
|
140
135
|
/**
|
|
@@ -145,12 +140,11 @@ export interface SplitProps {
|
|
|
145
140
|
/**
|
|
146
141
|
* @zh 面板大小变化的回调
|
|
147
142
|
* @en Callback when pane resized
|
|
148
|
-
* @version 2.25.0
|
|
149
143
|
*/
|
|
150
144
|
onPaneResize?: (paneContainers: HTMLElement[]) => void;
|
|
151
145
|
}
|
|
152
146
|
/**
|
|
153
|
-
* @title ResizeBox.SplitGroup
|
|
147
|
+
* @title ResizeBox.SplitGroup
|
|
154
148
|
*/
|
|
155
149
|
export interface SplitGroupProps {
|
|
156
150
|
style?: CSSProperties;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SegmentedProps } from './interface';
|
|
2
|
+
/**
|
|
3
|
+
* Segmented 分段控制器组件
|
|
4
|
+
*
|
|
5
|
+
* 支持多种样式变体、方向、尺寸和交互模式
|
|
6
|
+
*/
|
|
7
|
+
declare const Segmented: import("react").ForwardRefExoticComponent<SegmentedProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default Segmented;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 分段控制器选项类型
|
|
4
|
+
*/
|
|
5
|
+
export interface SegmentedOption {
|
|
6
|
+
/** 选项值 */
|
|
7
|
+
value: string;
|
|
8
|
+
/** 显示文本,不设置则只显示图标 */
|
|
9
|
+
label?: ReactNode;
|
|
10
|
+
/** 是否禁用 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 图标元素 */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** 自定义渲染函数 */
|
|
15
|
+
render?: (option: SegmentedOption, isActive: boolean) => ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @title Segmented 分段控制器
|
|
19
|
+
*/
|
|
20
|
+
export interface SegmentedProps {
|
|
21
|
+
/** 自定义样式 */
|
|
22
|
+
style?: CSSProperties;
|
|
23
|
+
/** 自定义类名 */
|
|
24
|
+
className?: string | string[];
|
|
25
|
+
/**
|
|
26
|
+
* 分段控制器选项
|
|
27
|
+
* @description 可以是字符串数组或 SegmentedOption 对象数组
|
|
28
|
+
*/
|
|
29
|
+
options: (SegmentedOption | string)[];
|
|
30
|
+
/**
|
|
31
|
+
* 默认选中的值
|
|
32
|
+
* @description 非受控模式下使用
|
|
33
|
+
*/
|
|
34
|
+
defaultValue?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 当前选中的值
|
|
37
|
+
* @description 受控模式下使用
|
|
38
|
+
*/
|
|
39
|
+
value?: string;
|
|
40
|
+
/**
|
|
41
|
+
* 变化时的回调函数
|
|
42
|
+
* @param value - 当前选中的值
|
|
43
|
+
*/
|
|
44
|
+
onChange?: (value: string) => void;
|
|
45
|
+
/**
|
|
46
|
+
* 尺寸
|
|
47
|
+
* @defaultValue 'medium'
|
|
48
|
+
*/
|
|
49
|
+
size?: 'small' | 'medium' | 'large';
|
|
50
|
+
/**
|
|
51
|
+
* 样式类型
|
|
52
|
+
* @defaultValue 'default'
|
|
53
|
+
* @enumDescription
|
|
54
|
+
* - default: 默认样式
|
|
55
|
+
* - pill: 胶囊样式 (圆形)
|
|
56
|
+
*/
|
|
57
|
+
mode?: 'default' | 'pill';
|
|
58
|
+
/**
|
|
59
|
+
* 是否禁用整个组件
|
|
60
|
+
* @defaultValue false
|
|
61
|
+
*/
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* 是否撑满容器宽度
|
|
65
|
+
* @defaultValue false
|
|
66
|
+
*/
|
|
67
|
+
block?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 布局方向
|
|
70
|
+
* @defaultValue 'horizontal'
|
|
71
|
+
*/
|
|
72
|
+
direction?: 'horizontal' | 'vertical';
|
|
73
|
+
/**
|
|
74
|
+
* 是否显示选中指示器
|
|
75
|
+
* @defaultValue true
|
|
76
|
+
*/
|
|
77
|
+
showIndicator?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* 动画持续时间(毫秒)
|
|
80
|
+
* @defaultValue 300
|
|
81
|
+
*/
|
|
82
|
+
animationDuration?: number;
|
|
83
|
+
/**
|
|
84
|
+
* 为内部的 input 元素设置相同的 name 属性
|
|
85
|
+
* @description 用于表单提交和键盘导航
|
|
86
|
+
*/
|
|
87
|
+
name?: string;
|
|
88
|
+
}
|
|
@@ -42,13 +42,11 @@ export interface SelectProps extends SelectViewCommonProps {
|
|
|
42
42
|
mode?: 'multiple' | 'tags';
|
|
43
43
|
/**
|
|
44
44
|
* @zh 是否开启全选选项,仅在多选模式时才生效
|
|
45
|
-
* 潘启宝添加
|
|
46
45
|
*/
|
|
47
46
|
allowCheckAll?: boolean;
|
|
48
47
|
/**
|
|
49
48
|
* @zh 指定可选项
|
|
50
49
|
* @en Select options
|
|
51
|
-
* @version `extra` in 2.2.0
|
|
52
50
|
*/
|
|
53
51
|
options?: (string | number | {
|
|
54
52
|
label: ReactNode | string;
|
|
@@ -84,7 +82,6 @@ export interface SelectProps extends SelectViewCommonProps {
|
|
|
84
82
|
/**
|
|
85
83
|
* @zh 是否允许通过输入创建新的选项。
|
|
86
84
|
* @en Whether to allow new options to be created by input.
|
|
87
|
-
* @version 2.13.0, `{ formatter }` in 2.54.0
|
|
88
85
|
*/
|
|
89
86
|
allowCreate?: boolean | {
|
|
90
87
|
formatter: (inputValue: string, creating: boolean) => SelectProps['options'][number];
|
|
@@ -98,13 +95,11 @@ export interface SelectProps extends SelectViewCommonProps {
|
|
|
98
95
|
/**
|
|
99
96
|
* @zh 下拉框是否默认打开。
|
|
100
97
|
* @en Whether to show dropdown by default.
|
|
101
|
-
* @version 2.14.0
|
|
102
98
|
*/
|
|
103
99
|
defaultPopupVisible?: boolean;
|
|
104
100
|
/**
|
|
105
101
|
* @zh 控制下拉框是否打开。
|
|
106
102
|
* @en Whether to show dropdown.
|
|
107
|
-
* @version 2.6.0
|
|
108
103
|
*/
|
|
109
104
|
popupVisible?: boolean;
|
|
110
105
|
/**
|
|
@@ -131,7 +126,6 @@ export interface SelectProps extends SelectViewCommonProps {
|
|
|
131
126
|
/**
|
|
132
127
|
* @zh 自定义触发元素。
|
|
133
128
|
* @en The trigger element which executes the dropdown action.
|
|
134
|
-
* @version `() => ReactNode` in 2.31.0
|
|
135
129
|
*/
|
|
136
130
|
triggerElement?: ReactNode | ((params: {
|
|
137
131
|
value: unknown;
|
|
@@ -160,7 +154,6 @@ export interface SelectProps extends SelectViewCommonProps {
|
|
|
160
154
|
/**
|
|
161
155
|
* @zh 传递虚拟滚动属性。
|
|
162
156
|
* @en Pass properties used by VirtualList.
|
|
163
|
-
* @version 2.1.0
|
|
164
157
|
*/
|
|
165
158
|
virtualListProps?: AvailableVirtualListProps;
|
|
166
159
|
/**
|
|
@@ -171,7 +164,6 @@ export interface SelectProps extends SelectViewCommonProps {
|
|
|
171
164
|
/**
|
|
172
165
|
* @zh 选中选项时触发的回调,(只在 `multiple` 模式下触发)。
|
|
173
166
|
* @en Called when an option is selected. Only called for `multiple` mode.
|
|
174
|
-
* @version 2.52.0
|
|
175
167
|
*/
|
|
176
168
|
onSelect?: (value: string | number | LabeledValue, option: OptionInfo) => void;
|
|
177
169
|
/**
|
|
@@ -212,13 +204,11 @@ export interface SelectProps extends SelectViewCommonProps {
|
|
|
212
204
|
/**
|
|
213
205
|
* @zh 输入框文本改变的回调。
|
|
214
206
|
* @en Callback when the value of input is changed.
|
|
215
|
-
* @version 2.3.0
|
|
216
207
|
*/
|
|
217
208
|
onInputValueChange?: (value: string, reason: InputValueChangeReason) => void;
|
|
218
209
|
/**
|
|
219
210
|
* @zh 输入框文本粘贴的回调。
|
|
220
211
|
* @en Callback when the you paste text in input box.
|
|
221
|
-
* @version 2.9.0
|
|
222
212
|
*/
|
|
223
213
|
onPaste?: (e: any) => void;
|
|
224
214
|
}
|
|
@@ -246,7 +236,6 @@ export interface OptionProps extends Omit<HTMLAttributes<HTMLLIElement>, 'classN
|
|
|
246
236
|
/**
|
|
247
237
|
* @zh 携带任意自定义数据。
|
|
248
238
|
* @en Any data you want to pass to Option.
|
|
249
|
-
* @version 2.2.0
|
|
250
239
|
*/
|
|
251
240
|
extra?: unknown;
|
|
252
241
|
isSelectOption?: boolean;
|
|
@@ -315,7 +304,6 @@ export type SelectHandle = {
|
|
|
315
304
|
/**
|
|
316
305
|
* @zh 将下拉列表滚动至指定选项
|
|
317
306
|
* @en Scroll the drop-down list to the specified option
|
|
318
|
-
* @version 2.46.0
|
|
319
307
|
*/
|
|
320
308
|
scrollIntoView: (value: OptionProps['value'], options?: ScrollIntoViewOptions) => void;
|
|
321
309
|
};
|