@douyinfe/semi-ui 2.56.3-alpha.0 → 2.56.3
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/umd/semi-ui.js +74 -50
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/buttonGroup.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/input/index.d.ts +1 -1
- package/lib/cjs/input/inputGroup.d.ts +1 -1
- package/lib/cjs/locale/source/vi_VN.js +41 -41
- package/lib/cjs/modal/Modal.js +4 -0
- package/lib/cjs/modal/confirm.d.ts +6 -6
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/switch/index.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/index.d.ts +1 -1
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +1 -1
- package/lib/cjs/treeSelect/index.d.ts +2 -1
- package/lib/cjs/treeSelect/index.js +12 -26
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/buttonGroup.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/input/index.d.ts +1 -1
- package/lib/es/input/inputGroup.d.ts +1 -1
- package/lib/es/locale/source/vi_VN.js +41 -41
- package/lib/es/modal/Modal.js +4 -0
- package/lib/es/modal/confirm.d.ts +6 -6
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/switch/index.d.ts +1 -1
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/tagInput/index.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +1 -1
- package/lib/es/treeSelect/index.d.ts +2 -1
- package/lib/es/treeSelect/index.js +12 -26
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
|
@@ -40,7 +40,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
|
|
|
40
40
|
static contextType: React.Context<ContextValue>;
|
|
41
41
|
static Link: typeof Link;
|
|
42
42
|
static PropTypes: {
|
|
43
|
-
size: PropTypes.Requireable<"
|
|
43
|
+
size: PropTypes.Requireable<"default" | "small">;
|
|
44
44
|
railTheme: PropTypes.Requireable<"primary" | "tertiary" | "muted">;
|
|
45
45
|
className: PropTypes.Requireable<string>;
|
|
46
46
|
style: PropTypes.Requireable<object>;
|
|
@@ -125,7 +125,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
125
125
|
renderSelectedItem: PropTypes.Requireable<(...args: any[]) => any>;
|
|
126
126
|
suffix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
127
127
|
showClear: PropTypes.Requireable<boolean>;
|
|
128
|
-
size: PropTypes.Requireable<"
|
|
128
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
129
129
|
style: PropTypes.Requireable<object>;
|
|
130
130
|
stopPropagation: PropTypes.Requireable<NonNullable<string | boolean>>;
|
|
131
131
|
maxHeight: PropTypes.Requireable<NonNullable<string | number>>;
|
|
@@ -47,7 +47,7 @@ export default class Button extends PureComponent<ButtonProps> {
|
|
|
47
47
|
disabled: PropTypes.Requireable<boolean>;
|
|
48
48
|
prefixCls: PropTypes.Requireable<string>;
|
|
49
49
|
style: PropTypes.Requireable<object>;
|
|
50
|
-
size: PropTypes.Requireable<"
|
|
50
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
51
51
|
type: PropTypes.Requireable<"warning" | "primary" | "secondary" | "danger" | "tertiary">;
|
|
52
52
|
block: PropTypes.Requireable<boolean>;
|
|
53
53
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -18,7 +18,7 @@ export default class ButtonGroup extends BaseComponent<ButtonGroupProps> {
|
|
|
18
18
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
19
19
|
disabled: PropTypes.Requireable<boolean>;
|
|
20
20
|
type: PropTypes.Requireable<string>;
|
|
21
|
-
size: PropTypes.Requireable<"
|
|
21
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
22
22
|
theme: PropTypes.Requireable<"solid" | "light" | "borderless">;
|
|
23
23
|
'aria-label': PropTypes.Requireable<string>;
|
|
24
24
|
};
|
|
@@ -23,7 +23,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
|
|
|
23
23
|
onMouseEnter: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
24
24
|
onMouseLeave: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
25
25
|
disabled: import("prop-types").Requireable<boolean>;
|
|
26
|
-
size: import("prop-types").Requireable<"
|
|
26
|
+
size: import("prop-types").Requireable<"default" | "small" | "large">;
|
|
27
27
|
type: import("prop-types").Requireable<"warning" | "primary" | "secondary" | "danger" | "tertiary">;
|
|
28
28
|
block: import("prop-types").Requireable<boolean>;
|
|
29
29
|
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
@@ -59,7 +59,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
59
59
|
'aria-required': PropTypes.Requireable<boolean>;
|
|
60
60
|
borderless: PropTypes.Requireable<boolean>;
|
|
61
61
|
type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
|
|
62
|
-
size: PropTypes.Requireable<"
|
|
62
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
63
63
|
clearIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
64
64
|
density: PropTypes.Requireable<"default" | "compact">;
|
|
65
65
|
defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
|
|
@@ -140,7 +140,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
140
140
|
preventScroll?: boolean;
|
|
141
141
|
showRestTagsPopover?: boolean;
|
|
142
142
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
143
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
143
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
144
144
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
145
145
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
146
146
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/cjs/form/field.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
86
86
|
preventScroll?: boolean;
|
|
87
87
|
showRestTagsPopover?: boolean;
|
|
88
88
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
89
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
89
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
90
90
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
91
91
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
92
92
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
package/lib/cjs/input/index.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
|
|
|
86
86
|
showClear: PropTypes.Requireable<boolean>;
|
|
87
87
|
hideSuffix: PropTypes.Requireable<boolean>;
|
|
88
88
|
placeholder: PropTypes.Requireable<any>;
|
|
89
|
-
size: PropTypes.Requireable<"
|
|
89
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
90
90
|
className: PropTypes.Requireable<string>;
|
|
91
91
|
style: PropTypes.Requireable<object>;
|
|
92
92
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
@@ -21,7 +21,7 @@ export default class inputGroup extends BaseComponent<InputGroupProps, InputGrou
|
|
|
21
21
|
static propTypes: {
|
|
22
22
|
className: PropTypes.Requireable<string>;
|
|
23
23
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
24
|
-
size: PropTypes.Requireable<"
|
|
24
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
25
25
|
style: PropTypes.Requireable<object>;
|
|
26
26
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
27
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -21,16 +21,16 @@ const local = {
|
|
|
21
21
|
TimePicker: {
|
|
22
22
|
placeholder: {
|
|
23
23
|
time: 'Chọn thời gian',
|
|
24
|
-
timeRange: 'Chọn
|
|
24
|
+
timeRange: 'Chọn phạm vi thời gian'
|
|
25
25
|
},
|
|
26
26
|
begin: 'Thời gian bắt đầu',
|
|
27
27
|
end: 'Thời gian kết thúc',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
hour: '',
|
|
32
|
-
minute: '',
|
|
33
|
-
second: '',
|
|
28
|
+
hour: 'giờ',
|
|
29
|
+
minute: 'phút',
|
|
30
|
+
second: 'giây',
|
|
31
|
+
// hour: '',
|
|
32
|
+
// minute: '',
|
|
33
|
+
// second: '',
|
|
34
34
|
AM: 'buổi sáng',
|
|
35
35
|
PM: 'vào buổi chiều'
|
|
36
36
|
},
|
|
@@ -47,48 +47,48 @@ const local = {
|
|
|
47
47
|
confirm: 'Xác nhận',
|
|
48
48
|
cancel: 'Huỷ bỏ'
|
|
49
49
|
},
|
|
50
|
-
selectDate: '
|
|
51
|
-
selectTime: 'thời gian
|
|
50
|
+
selectDate: 'Chọn ngày',
|
|
51
|
+
selectTime: 'Chọn thời gian',
|
|
52
52
|
year: 'năm',
|
|
53
53
|
month: 'tháng',
|
|
54
54
|
day: 'ngày',
|
|
55
55
|
monthText: '${month} ${year}',
|
|
56
56
|
months: {
|
|
57
|
-
1: '
|
|
58
|
-
2: '
|
|
57
|
+
1: 'Một',
|
|
58
|
+
2: 'Hai',
|
|
59
59
|
3: 'Ba',
|
|
60
|
-
4: '
|
|
61
|
-
5: '
|
|
62
|
-
6: '
|
|
63
|
-
7: '
|
|
60
|
+
4: 'Tư',
|
|
61
|
+
5: 'Năm',
|
|
62
|
+
6: 'Sáu',
|
|
63
|
+
7: 'Bảy',
|
|
64
64
|
8: 'Tám',
|
|
65
65
|
9: 'Chín',
|
|
66
66
|
10: 'Mười',
|
|
67
|
-
11: '
|
|
68
|
-
12: '
|
|
67
|
+
11: 'Mười một',
|
|
68
|
+
12: 'Mười hai'
|
|
69
69
|
},
|
|
70
70
|
fullMonths: {
|
|
71
|
-
1: '
|
|
72
|
-
2: 'Tháng
|
|
73
|
-
3: '
|
|
74
|
-
4: 'Tháng
|
|
75
|
-
5: '
|
|
76
|
-
6: 'Tháng
|
|
77
|
-
7: 'Tháng
|
|
71
|
+
1: 'Tháng Một',
|
|
72
|
+
2: 'Tháng Hai',
|
|
73
|
+
3: 'Tháng Ba',
|
|
74
|
+
4: 'Tháng Tư',
|
|
75
|
+
5: 'Tháng Năm',
|
|
76
|
+
6: 'Tháng Sáu',
|
|
77
|
+
7: 'Tháng Bảy',
|
|
78
78
|
8: 'Tháng Tám',
|
|
79
79
|
9: 'Tháng Chín',
|
|
80
80
|
10: 'Tháng Mười',
|
|
81
|
-
11: 'Tháng
|
|
82
|
-
12: 'Tháng
|
|
81
|
+
11: 'Tháng Mười một',
|
|
82
|
+
12: 'Tháng Mười hai'
|
|
83
83
|
},
|
|
84
84
|
weeks: {
|
|
85
|
-
Mon: 'Thứ
|
|
86
|
-
Tue: 'Thứ
|
|
87
|
-
Wed: 'Thứ
|
|
88
|
-
Thu: 'Thứ
|
|
89
|
-
Fri: 'Thứ
|
|
90
|
-
Sat: '
|
|
91
|
-
Sun: '
|
|
85
|
+
Mon: 'Thứ Hai',
|
|
86
|
+
Tue: 'Thứ Ba',
|
|
87
|
+
Wed: 'Thứ Tư',
|
|
88
|
+
Thu: 'Thứ Năm',
|
|
89
|
+
Fri: 'Thứ Sáu',
|
|
90
|
+
Sat: 'Thứ bảy',
|
|
91
|
+
Sun: 'Chủ nhật'
|
|
92
92
|
},
|
|
93
93
|
localeFormatToken: {
|
|
94
94
|
FORMAT_SWITCH_DATE: 'dd/MM/yyyy'
|
|
@@ -104,7 +104,7 @@ const local = {
|
|
|
104
104
|
},
|
|
105
105
|
Table: {
|
|
106
106
|
emptyText: 'Không kết quả',
|
|
107
|
-
pageText: 'Hiển thị ${currentStart} đến ${currentEnd} trong tổng số ${total}
|
|
107
|
+
pageText: 'Hiển thị ${currentStart} đến ${currentEnd} trong tổng số ${total}'
|
|
108
108
|
},
|
|
109
109
|
Select: {
|
|
110
110
|
emptyText: 'Không kết quả',
|
|
@@ -123,7 +123,7 @@ const local = {
|
|
|
123
123
|
Calendar: {
|
|
124
124
|
allDay: 'Cả ngày',
|
|
125
125
|
AM: 'buổi sáng ${time}',
|
|
126
|
-
PM: '
|
|
126
|
+
PM: 'buổi chiều ${time}',
|
|
127
127
|
datestring: '',
|
|
128
128
|
remaining: '${remained} mặt hàng'
|
|
129
129
|
},
|
|
@@ -133,7 +133,7 @@ const local = {
|
|
|
133
133
|
legalTips: 'Phát hành và bắt đầu tải lên',
|
|
134
134
|
retry: 'Thử lại',
|
|
135
135
|
replace: 'Thay thế tệp',
|
|
136
|
-
clear: '
|
|
136
|
+
clear: 'Xoá',
|
|
137
137
|
selectedFiles: 'Tệp đã chọn',
|
|
138
138
|
illegalSize: 'Kích thước tệp không hợp lệ',
|
|
139
139
|
fail: 'Tải lên không thành công'
|
|
@@ -153,7 +153,7 @@ const local = {
|
|
|
153
153
|
emptyRight: 'Không có nội dung, kiểm tra từ bên trái',
|
|
154
154
|
placeholder: 'Tìm kiếm',
|
|
155
155
|
clear: 'Clear',
|
|
156
|
-
selectAll: '
|
|
156
|
+
selectAll: 'Chọn tất cả',
|
|
157
157
|
clearSelectAll: 'Bỏ chọn tất cả',
|
|
158
158
|
total: 'Tổng số mục: ${total}',
|
|
159
159
|
selected: 'Số mục đã chọn: ${total}'
|
|
@@ -162,15 +162,15 @@ const local = {
|
|
|
162
162
|
optional: '(không bắt buộc)'
|
|
163
163
|
},
|
|
164
164
|
Image: {
|
|
165
|
-
preview: '
|
|
165
|
+
preview: 'Xem trước',
|
|
166
166
|
loading: 'Đang tải',
|
|
167
167
|
loadError: 'Không tải được',
|
|
168
168
|
prevTip: 'Trước đó',
|
|
169
|
-
nextTip: '
|
|
169
|
+
nextTip: 'Tiếp theo',
|
|
170
170
|
zoomInTip: 'Phóng to',
|
|
171
|
-
zoomOutTip: '
|
|
171
|
+
zoomOutTip: 'Thu nhỏ',
|
|
172
172
|
rotateTip: 'Xoay',
|
|
173
|
-
downloadTip: '
|
|
173
|
+
downloadTip: 'Download',
|
|
174
174
|
adaptiveTip: 'Thích ứng với trang',
|
|
175
175
|
originTip: 'Kích thước ban đầu'
|
|
176
176
|
}
|
package/lib/cjs/modal/Modal.js
CHANGED
|
@@ -60,6 +60,7 @@ class Modal extends _baseComponent.default {
|
|
|
60
60
|
footerFill
|
|
61
61
|
} = this.props;
|
|
62
62
|
const getCancelButton = locale => {
|
|
63
|
+
var _a;
|
|
63
64
|
if (!hasCancel) {
|
|
64
65
|
return null;
|
|
65
66
|
} else {
|
|
@@ -71,6 +72,9 @@ class Modal extends _baseComponent.default {
|
|
|
71
72
|
block: footerFill,
|
|
72
73
|
autoFocus: true
|
|
73
74
|
}, this.props.cancelButtonProps, {
|
|
75
|
+
style: Object.assign(Object.assign({}, footerFill ? {
|
|
76
|
+
marginLeft: "unset"
|
|
77
|
+
} : {}), (_a = this.props.cancelButtonProps) === null || _a === void 0 ? void 0 : _a.style),
|
|
74
78
|
"x-semi-children-alias": "cancelText"
|
|
75
79
|
}), cancelText || locale.cancel);
|
|
76
80
|
}
|
|
@@ -143,12 +143,12 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
143
143
|
type: "warning";
|
|
144
144
|
};
|
|
145
145
|
export declare function withError(props: ModalReactProps): {
|
|
146
|
-
children?: React.ReactNode;
|
|
147
|
-
motion?: boolean;
|
|
148
146
|
title?: React.ReactNode;
|
|
147
|
+
children?: React.ReactNode;
|
|
149
148
|
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
150
149
|
style?: React.CSSProperties;
|
|
151
150
|
className?: string;
|
|
151
|
+
motion?: boolean;
|
|
152
152
|
getPopupContainer?: () => HTMLElement;
|
|
153
153
|
footer?: React.ReactNode;
|
|
154
154
|
header?: React.ReactNode;
|
|
@@ -205,11 +205,11 @@ export declare function withError(props: ModalReactProps): {
|
|
|
205
205
|
onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
|
|
206
206
|
onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
|
|
207
207
|
'aria-label'?: string;
|
|
208
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
210
208
|
title?: string;
|
|
211
209
|
name?: string;
|
|
212
210
|
value?: string | number | readonly string[];
|
|
211
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
212
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
213
213
|
form?: string;
|
|
214
214
|
slot?: string;
|
|
215
215
|
prefix?: string;
|
|
@@ -387,7 +387,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
387
387
|
translate?: "no" | "yes";
|
|
388
388
|
role?: React.AriaRole;
|
|
389
389
|
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
390
|
-
inputMode?: "
|
|
390
|
+
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
391
391
|
nonce?: string;
|
|
392
392
|
tabIndex?: number;
|
|
393
393
|
content?: string;
|
|
@@ -430,7 +430,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
430
430
|
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "location" | "page" | "step";
|
|
431
431
|
'aria-details'?: string;
|
|
432
432
|
'aria-disabled'?: boolean | "true" | "false";
|
|
433
|
-
'aria-dropeffect'?: "
|
|
433
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
434
434
|
'aria-errormessage'?: string;
|
|
435
435
|
'aria-flowto'?: string;
|
|
436
436
|
'aria-grabbed'?: boolean | "true" | "false";
|
|
@@ -69,7 +69,7 @@ export default class Rating extends BaseComponent<RatingProps, RatingState> {
|
|
|
69
69
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
70
70
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
71
71
|
autoFocus: PropTypes.Requireable<boolean>;
|
|
72
|
-
size: PropTypes.Requireable<NonNullable<number | "
|
|
72
|
+
size: PropTypes.Requireable<NonNullable<number | "default" | "small">>;
|
|
73
73
|
tooltips: PropTypes.Requireable<string[]>;
|
|
74
74
|
id: PropTypes.Requireable<string>;
|
|
75
75
|
preventScroll: PropTypes.Requireable<boolean>;
|
package/lib/cjs/rating/item.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export default class Item extends BaseComponent<RatingItemProps, RatingItemState
|
|
|
40
40
|
disabled: PropTypes.Requireable<boolean>;
|
|
41
41
|
count: PropTypes.Requireable<number>;
|
|
42
42
|
ariaLabelPrefix: PropTypes.Requireable<string>;
|
|
43
|
-
size: PropTypes.Requireable<NonNullable<number | "
|
|
43
|
+
size: PropTypes.Requireable<NonNullable<number | "default" | "small">>;
|
|
44
44
|
'aria-describedby': PropTypes.Requireable<string>;
|
|
45
45
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
46
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -45,7 +45,7 @@ declare class Switch extends BaseComponent<SwitchProps, SwitchState> {
|
|
|
45
45
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
46
|
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
47
|
style: PropTypes.Requireable<object>;
|
|
48
|
-
size: PropTypes.Requireable<"
|
|
48
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
49
49
|
uncheckedText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
50
50
|
id: PropTypes.Requireable<string>;
|
|
51
51
|
};
|
package/lib/cjs/table/Table.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
60
60
|
components: PropTypes.Requireable<any>;
|
|
61
61
|
bordered: PropTypes.Requireable<boolean>;
|
|
62
62
|
loading: PropTypes.Requireable<boolean>;
|
|
63
|
-
size: PropTypes.Requireable<"
|
|
63
|
+
size: PropTypes.Requireable<"default" | "small" | "middle">;
|
|
64
64
|
tableLayout: PropTypes.Requireable<"" | "fixed" | "auto">;
|
|
65
65
|
columns: PropTypes.Requireable<PropTypes.InferProps<{
|
|
66
66
|
align: PropTypes.Requireable<"center" | "left" | "right">;
|
|
@@ -297,7 +297,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
297
297
|
showTotal?: boolean;
|
|
298
298
|
pageSize?: number;
|
|
299
299
|
pageSizeOpts?: number[];
|
|
300
|
-
size?: "
|
|
300
|
+
size?: "default" | "small";
|
|
301
301
|
currentPage?: number;
|
|
302
302
|
defaultCurrentPage?: number;
|
|
303
303
|
onPageChange?: (currentPage: number) => void;
|
package/lib/cjs/table/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare class Table<RecordType extends Record<string, any> = Data> extends React
|
|
|
16
16
|
components: PropTypes.Requireable<any>;
|
|
17
17
|
bordered: PropTypes.Requireable<boolean>;
|
|
18
18
|
loading: PropTypes.Requireable<boolean>;
|
|
19
|
-
size: PropTypes.Requireable<"
|
|
19
|
+
size: PropTypes.Requireable<"default" | "small" | "middle">;
|
|
20
20
|
tableLayout: PropTypes.Requireable<"" | "fixed" | "auto">;
|
|
21
21
|
columns: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
22
|
align: PropTypes.Requireable<"center" | "left" | "right">;
|
|
@@ -97,7 +97,7 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
|
97
97
|
onAdd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
98
98
|
onRemove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
99
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
100
|
-
size: PropTypes.Requireable<"
|
|
100
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
101
101
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
102
102
|
prefix: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
103
103
|
suffix: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
@@ -133,7 +133,7 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
|
|
|
133
133
|
secondStep: PropTypes.Requireable<number>;
|
|
134
134
|
focusOnOpen: PropTypes.Requireable<boolean>;
|
|
135
135
|
autoFocus: PropTypes.Requireable<boolean>;
|
|
136
|
-
size: PropTypes.Requireable<"
|
|
136
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
137
137
|
stopPropagation: PropTypes.Requireable<boolean>;
|
|
138
138
|
panels: PropTypes.Requireable<PropTypes.InferProps<{
|
|
139
139
|
panelHeader: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
@@ -49,7 +49,7 @@ export default class LocaleTimePicker extends React.PureComponent<LocalePickerPr
|
|
|
49
49
|
secondStep: import("prop-types").Requireable<number>;
|
|
50
50
|
focusOnOpen: import("prop-types").Requireable<boolean>;
|
|
51
51
|
autoFocus: import("prop-types").Requireable<boolean>;
|
|
52
|
-
size: import("prop-types").Requireable<"
|
|
52
|
+
size: import("prop-types").Requireable<"default" | "small" | "large">;
|
|
53
53
|
stopPropagation: import("prop-types").Requireable<boolean>;
|
|
54
54
|
panels: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
55
55
|
panelHeader: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike>>;
|
|
@@ -198,6 +198,7 @@ declare class TreeSelect extends BaseComponent<TreeSelectProps, TreeSelectState>
|
|
|
198
198
|
onMotionEnd: any;
|
|
199
199
|
treeSelectID: string;
|
|
200
200
|
context: ContextValue;
|
|
201
|
+
clearInputFlag: boolean;
|
|
201
202
|
constructor(props: TreeSelectProps);
|
|
202
203
|
static getDerivedStateFromProps(props: TreeSelectProps, prevState: TreeSelectState): Partial<TreeSelectState>;
|
|
203
204
|
get adapter(): TreeSelectAdapter<TreeSelectProps, TreeSelectState>;
|
|
@@ -248,7 +249,7 @@ declare class TreeSelect extends BaseComponent<TreeSelectProps, TreeSelectState>
|
|
|
248
249
|
keyEntities: import("../tree/interface").KeyEntities;
|
|
249
250
|
};
|
|
250
251
|
getTreeNodeKey: (treeNode: TreeNodeData) => string;
|
|
251
|
-
|
|
252
|
+
handlePopoverVisibleChange: (isVisible: any) => void;
|
|
252
253
|
afterClose: () => void;
|
|
253
254
|
renderTreeNode: (treeNode: FlattenNode, ind: number, style: React.CSSProperties) => JSX.Element;
|
|
254
255
|
itemKey: (index: number, data: Record<string, any>) => any;
|
|
@@ -682,33 +682,12 @@ class TreeSelect extends _baseComponent.default {
|
|
|
682
682
|
} = data;
|
|
683
683
|
return key;
|
|
684
684
|
};
|
|
685
|
-
/* Event handler function after popover
|
|
686
|
-
this.
|
|
687
|
-
|
|
688
|
-
filterTreeNode,
|
|
689
|
-
searchAutoFocus,
|
|
690
|
-
searchPosition
|
|
691
|
-
} = this.props;
|
|
692
|
-
// 将 inputValue 清空,如果有选中值的话,选中项能够快速回显
|
|
693
|
-
// Clear the inputValue. If there is a selected value, the selected item can be quickly echoed.
|
|
694
|
-
if (isVisible === false && filterTreeNode) {
|
|
695
|
-
this.foundation.clearInputValue();
|
|
696
|
-
}
|
|
697
|
-
if (filterTreeNode && searchPosition === _constants.strings.SEARCH_POSITION_DROPDOWN && isVisible && searchAutoFocus) {
|
|
698
|
-
this.foundation.focusInput(true);
|
|
699
|
-
}
|
|
685
|
+
/* Event handler function after popover visible change */
|
|
686
|
+
this.handlePopoverVisibleChange = isVisible => {
|
|
687
|
+
this.foundation.handlePopoverVisibleChange(isVisible);
|
|
700
688
|
};
|
|
701
689
|
this.afterClose = () => {
|
|
702
|
-
|
|
703
|
-
// 在弹层完全收起之后,再通过 clearInput 重新计算 state 中的 expandedKey, flattenNode
|
|
704
|
-
// 防止在弹出层未收起时弹层面板中选项数目变化导致视觉上出现弹层闪动问题
|
|
705
|
-
// Changes to flattenNode will cause the number of options in the popup panel to change
|
|
706
|
-
// After the pop-up layer is completely closed, recalculate the expandedKey and flattenNode in the state through clearInput.
|
|
707
|
-
// Prevent the pop-up layer from flickering visually due to changes in the number of options in the pop-up panel when the pop-up layer is not collapsed.
|
|
708
|
-
const {
|
|
709
|
-
filterTreeNode
|
|
710
|
-
} = this.props;
|
|
711
|
-
filterTreeNode && this.foundation.clearInput();
|
|
690
|
+
this.foundation.handleAfterClose();
|
|
712
691
|
};
|
|
713
692
|
this.renderTreeNode = (treeNode, ind, style) => {
|
|
714
693
|
const {
|
|
@@ -904,6 +883,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
904
883
|
this.triggerRef = /*#__PURE__*/_react.default.createRef();
|
|
905
884
|
this.optionsRef = /*#__PURE__*/_react.default.createRef();
|
|
906
885
|
this.clickOutsideHandler = null;
|
|
886
|
+
this.clearInputFlag = false;
|
|
907
887
|
this.foundation = new _foundation.default(this.adapter);
|
|
908
888
|
this.treeSelectID = Math.random().toString(36).slice(2);
|
|
909
889
|
this.onMotionEnd = () => {
|
|
@@ -1254,6 +1234,12 @@ class TreeSelect extends _baseComponent.default {
|
|
|
1254
1234
|
this.setState({
|
|
1255
1235
|
isFocus: bool
|
|
1256
1236
|
});
|
|
1237
|
+
},
|
|
1238
|
+
setClearInputFlag: flag => {
|
|
1239
|
+
this.clearInputFlag = flag;
|
|
1240
|
+
},
|
|
1241
|
+
getClearInputFlag: () => {
|
|
1242
|
+
return this.clearInputFlag;
|
|
1257
1243
|
}
|
|
1258
1244
|
});
|
|
1259
1245
|
}
|
|
@@ -1297,7 +1283,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
1297
1283
|
autoAdjustOverflow: autoAdjustOverflow,
|
|
1298
1284
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
1299
1285
|
mouseEnterDelay: mouseEnterDelay,
|
|
1300
|
-
onVisibleChange: this.
|
|
1286
|
+
onVisibleChange: this.handlePopoverVisibleChange,
|
|
1301
1287
|
afterClose: this.afterClose
|
|
1302
1288
|
}, selection);
|
|
1303
1289
|
}
|
|
@@ -64,7 +64,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
64
64
|
style: PropTypes.Requireable<object>;
|
|
65
65
|
className: PropTypes.Requireable<string>;
|
|
66
66
|
component: PropTypes.Requireable<string>;
|
|
67
|
-
weight: PropTypes.Requireable<NonNullable<number | "
|
|
67
|
+
weight: PropTypes.Requireable<NonNullable<number | "default" | "bold" | "medium" | "light" | "regular" | "semibold">>;
|
|
68
68
|
};
|
|
69
69
|
static defaultProps: {
|
|
70
70
|
copyable: boolean;
|
package/lib/es/anchor/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
|
|
|
40
40
|
static contextType: React.Context<ContextValue>;
|
|
41
41
|
static Link: typeof Link;
|
|
42
42
|
static PropTypes: {
|
|
43
|
-
size: PropTypes.Requireable<"
|
|
43
|
+
size: PropTypes.Requireable<"default" | "small">;
|
|
44
44
|
railTheme: PropTypes.Requireable<"primary" | "tertiary" | "muted">;
|
|
45
45
|
className: PropTypes.Requireable<string>;
|
|
46
46
|
style: PropTypes.Requireable<object>;
|
|
@@ -125,7 +125,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
125
125
|
renderSelectedItem: PropTypes.Requireable<(...args: any[]) => any>;
|
|
126
126
|
suffix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
127
127
|
showClear: PropTypes.Requireable<boolean>;
|
|
128
|
-
size: PropTypes.Requireable<"
|
|
128
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
129
129
|
style: PropTypes.Requireable<object>;
|
|
130
130
|
stopPropagation: PropTypes.Requireable<NonNullable<string | boolean>>;
|
|
131
131
|
maxHeight: PropTypes.Requireable<NonNullable<string | number>>;
|
|
@@ -47,7 +47,7 @@ export default class Button extends PureComponent<ButtonProps> {
|
|
|
47
47
|
disabled: PropTypes.Requireable<boolean>;
|
|
48
48
|
prefixCls: PropTypes.Requireable<string>;
|
|
49
49
|
style: PropTypes.Requireable<object>;
|
|
50
|
-
size: PropTypes.Requireable<"
|
|
50
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
51
51
|
type: PropTypes.Requireable<"warning" | "primary" | "secondary" | "danger" | "tertiary">;
|
|
52
52
|
block: PropTypes.Requireable<boolean>;
|
|
53
53
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -18,7 +18,7 @@ export default class ButtonGroup extends BaseComponent<ButtonGroupProps> {
|
|
|
18
18
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
19
19
|
disabled: PropTypes.Requireable<boolean>;
|
|
20
20
|
type: PropTypes.Requireable<string>;
|
|
21
|
-
size: PropTypes.Requireable<"
|
|
21
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
22
22
|
theme: PropTypes.Requireable<"solid" | "light" | "borderless">;
|
|
23
23
|
'aria-label': PropTypes.Requireable<string>;
|
|
24
24
|
};
|
package/lib/es/button/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
|
|
|
23
23
|
onMouseEnter: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
24
24
|
onMouseLeave: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
25
25
|
disabled: import("prop-types").Requireable<boolean>;
|
|
26
|
-
size: import("prop-types").Requireable<"
|
|
26
|
+
size: import("prop-types").Requireable<"default" | "small" | "large">;
|
|
27
27
|
type: import("prop-types").Requireable<"warning" | "primary" | "secondary" | "danger" | "tertiary">;
|
|
28
28
|
block: import("prop-types").Requireable<boolean>;
|
|
29
29
|
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
@@ -59,7 +59,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
59
59
|
'aria-required': PropTypes.Requireable<boolean>;
|
|
60
60
|
borderless: PropTypes.Requireable<boolean>;
|
|
61
61
|
type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
|
|
62
|
-
size: PropTypes.Requireable<"
|
|
62
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
63
63
|
clearIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
64
64
|
density: PropTypes.Requireable<"default" | "compact">;
|
|
65
65
|
defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
|
|
@@ -140,7 +140,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
140
140
|
preventScroll?: boolean;
|
|
141
141
|
showRestTagsPopover?: boolean;
|
|
142
142
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
143
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
143
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
144
144
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
145
145
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
146
146
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
86
86
|
preventScroll?: boolean;
|
|
87
87
|
showRestTagsPopover?: boolean;
|
|
88
88
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
89
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
89
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
90
90
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
91
91
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
92
92
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
package/lib/es/input/index.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
|
|
|
86
86
|
showClear: PropTypes.Requireable<boolean>;
|
|
87
87
|
hideSuffix: PropTypes.Requireable<boolean>;
|
|
88
88
|
placeholder: PropTypes.Requireable<any>;
|
|
89
|
-
size: PropTypes.Requireable<"
|
|
89
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
90
90
|
className: PropTypes.Requireable<string>;
|
|
91
91
|
style: PropTypes.Requireable<object>;
|
|
92
92
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|