@douyinfe/semi-ui 2.44.1-alpha.0 → 2.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/semi-ui.js +9 -8
- 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/datePicker/monthsGrid.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/inputNumber/index.js +3 -2
- package/lib/cjs/modal/confirm.d.ts +16 -16
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/select/index.js +3 -3
- 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/tree/index.js +1 -1
- package/lib/cjs/treeSelect/index.js +1 -1
- package/lib/cjs/typography/title.d.ts +2 -2
- 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/datePicker/monthsGrid.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/inputNumber/index.js +3 -2
- package/lib/es/modal/confirm.d.ts +16 -16
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/select/index.js +3 -3
- 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/tree/index.js +1 -1
- package/lib/es/treeSelect/index.js +1 -1
- package/lib/es/typography/title.d.ts +2 -2
- 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" | "tertiary" | "secondary" | "danger">;
|
|
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
|
};
|
|
@@ -22,7 +22,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
|
|
|
22
22
|
onMouseEnter: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
23
23
|
onMouseLeave: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
24
24
|
disabled: import("prop-types").Requireable<boolean>;
|
|
25
|
-
size: import("prop-types").Requireable<"
|
|
25
|
+
size: import("prop-types").Requireable<"default" | "small" | "large">;
|
|
26
26
|
type: import("prop-types").Requireable<"warning" | "primary" | "tertiary" | "secondary" | "danger">;
|
|
27
27
|
block: import("prop-types").Requireable<boolean>;
|
|
28
28
|
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>>;
|
|
@@ -86,7 +86,7 @@ export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGri
|
|
|
86
86
|
renderMonth(month: Date, panelType: PanelType): JSX.Element;
|
|
87
87
|
handleWeeksRowNumChange: (weeksRowNum: number, panelType: PanelType) => void;
|
|
88
88
|
reselect: () => void;
|
|
89
|
-
getYAMOpenType: () => "
|
|
89
|
+
getYAMOpenType: () => "both" | "none" | "left" | "right";
|
|
90
90
|
renderTimePicker(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
|
|
91
91
|
renderYearAndMonth(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
|
|
92
92
|
renderSwitch(panelType: PanelType): JSX.Element;
|
|
@@ -86,7 +86,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
86
86
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
87
87
|
zIndex?: number;
|
|
88
88
|
position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
89
|
-
onSearch?: (value: string, event: React.
|
|
89
|
+
onSearch?: (value: string, event: React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent>) => void;
|
|
90
90
|
dropdownClassName?: string;
|
|
91
91
|
dropdownStyle?: React.CSSProperties;
|
|
92
92
|
dropdownMargin?: number | {
|
package/lib/cjs/form/field.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
32
32
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
33
33
|
zIndex?: number;
|
|
34
34
|
position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
35
|
-
onSearch?: (value: string, event: import("react").
|
|
35
|
+
onSearch?: (value: string, event: import("react").KeyboardEvent<Element> | import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
36
36
|
dropdownClassName?: string;
|
|
37
37
|
dropdownStyle?: import("react").CSSProperties;
|
|
38
38
|
dropdownMargin?: number | {
|
package/lib/cjs/input/index.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
|
|
|
85
85
|
showClear: PropTypes.Requireable<boolean>;
|
|
86
86
|
hideSuffix: PropTypes.Requireable<boolean>;
|
|
87
87
|
placeholder: PropTypes.Requireable<any>;
|
|
88
|
-
size: PropTypes.Requireable<"
|
|
88
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
89
89
|
className: PropTypes.Requireable<string>;
|
|
90
90
|
style: PropTypes.Requireable<object>;
|
|
91
91
|
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>;
|
|
@@ -304,7 +304,7 @@ class InputNumber extends _baseComponent.default {
|
|
|
304
304
|
* We need to set the status to false after trigger focus event
|
|
305
305
|
*/
|
|
306
306
|
if (this.clickUpOrDown) {
|
|
307
|
-
obj.value = this.foundation.doFormat(
|
|
307
|
+
obj.value = this.foundation.doFormat(valueStr, true);
|
|
308
308
|
newValue = obj.value;
|
|
309
309
|
}
|
|
310
310
|
this.foundation.updateStates(obj, () => this.adapter.restoreCursor());
|
|
@@ -316,8 +316,9 @@ class InputNumber extends _baseComponent.default {
|
|
|
316
316
|
});
|
|
317
317
|
} else {
|
|
318
318
|
// Update input content when controlled input NaN
|
|
319
|
+
newValue = this.foundation.doFormat(valueStr, false);
|
|
319
320
|
this.foundation.updateStates({
|
|
320
|
-
value:
|
|
321
|
+
value: newValue
|
|
321
322
|
});
|
|
322
323
|
}
|
|
323
324
|
} else if (this.foundation.isValidNumber(parsedNum)) {
|
|
@@ -140,19 +140,19 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
140
140
|
type: "warning";
|
|
141
141
|
};
|
|
142
142
|
export declare function withError(props: ModalReactProps): {
|
|
143
|
+
title?: React.ReactNode;
|
|
143
144
|
children?: React.ReactNode;
|
|
144
|
-
|
|
145
|
-
header?: React.ReactNode;
|
|
145
|
+
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
146
146
|
style?: React.CSSProperties;
|
|
147
|
-
title?: React.ReactNode;
|
|
148
|
-
mask?: boolean;
|
|
149
|
-
visible?: boolean;
|
|
150
147
|
className?: string;
|
|
151
|
-
zIndex?: number;
|
|
152
|
-
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
153
148
|
motion?: boolean;
|
|
154
149
|
getPopupContainer?: () => HTMLElement;
|
|
150
|
+
footer?: React.ReactNode;
|
|
151
|
+
header?: React.ReactNode;
|
|
155
152
|
direction?: any;
|
|
153
|
+
mask?: boolean;
|
|
154
|
+
visible?: boolean;
|
|
155
|
+
zIndex?: number;
|
|
156
156
|
width?: string | number;
|
|
157
157
|
height?: string | number;
|
|
158
158
|
content?: React.ReactNode;
|
|
@@ -201,6 +201,13 @@ export declare function withError(props: ModalReactProps): {
|
|
|
201
201
|
onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
|
|
202
202
|
onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
|
|
203
203
|
'aria-label'?: string;
|
|
204
|
+
title?: string;
|
|
205
|
+
name?: string;
|
|
206
|
+
value?: string | number | readonly string[];
|
|
207
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
208
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
form?: string;
|
|
210
|
+
slot?: string;
|
|
204
211
|
prefix?: string;
|
|
205
212
|
dangerouslySetInnerHTML?: {
|
|
206
213
|
__html: string | TrustedHTML;
|
|
@@ -355,17 +362,12 @@ export declare function withError(props: ModalReactProps): {
|
|
|
355
362
|
onScrollCapture?: React.UIEventHandler<HTMLButtonElement>;
|
|
356
363
|
onWheel?: React.WheelEventHandler<HTMLButtonElement>;
|
|
357
364
|
onWheelCapture?: React.WheelEventHandler<HTMLButtonElement>;
|
|
358
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
359
365
|
onAnimationStartCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
360
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
361
366
|
onAnimationEndCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
362
367
|
onAnimationIteration?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
363
368
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
364
369
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
365
370
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
366
|
-
form?: string;
|
|
367
|
-
slot?: string;
|
|
368
|
-
title?: string;
|
|
369
371
|
hidden?: boolean;
|
|
370
372
|
color?: string;
|
|
371
373
|
defaultChecked?: boolean;
|
|
@@ -374,8 +376,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
374
376
|
suppressHydrationWarning?: boolean;
|
|
375
377
|
accessKey?: string;
|
|
376
378
|
autoFocus?: boolean;
|
|
377
|
-
name?: string;
|
|
378
|
-
value?: string | number | readonly string[];
|
|
379
379
|
content?: string;
|
|
380
380
|
formAction?: string;
|
|
381
381
|
formEncType?: string;
|
|
@@ -389,7 +389,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
389
389
|
translate?: "no" | "yes";
|
|
390
390
|
role?: React.AriaRole;
|
|
391
391
|
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
392
|
-
inputMode?: "search" | "
|
|
392
|
+
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
393
393
|
nonce?: string;
|
|
394
394
|
tabIndex?: number;
|
|
395
395
|
'aria-expanded'?: boolean | "true" | "false";
|
|
@@ -422,7 +422,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
422
422
|
is?: string;
|
|
423
423
|
'aria-activedescendant'?: string;
|
|
424
424
|
'aria-atomic'?: boolean | "true" | "false";
|
|
425
|
-
'aria-autocomplete'?: "
|
|
425
|
+
'aria-autocomplete'?: "both" | "none" | "list" | "inline";
|
|
426
426
|
'aria-busy'?: boolean | "true" | "false";
|
|
427
427
|
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
428
428
|
'aria-colcount'?: number;
|
package/lib/cjs/radio/radio.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
61
61
|
extra: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
62
62
|
addonStyle: PropTypes.Requireable<object>;
|
|
63
63
|
addonClassName: PropTypes.Requireable<string>;
|
|
64
|
-
type: PropTypes.Requireable<"
|
|
64
|
+
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
65
65
|
'aria-label': PropTypes.Requireable<string>;
|
|
66
66
|
preventScroll: PropTypes.Requireable<boolean>;
|
|
67
67
|
};
|
|
@@ -49,7 +49,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
|
|
|
49
49
|
name: PropTypes.Requireable<string>;
|
|
50
50
|
options: PropTypes.Requireable<any[]>;
|
|
51
51
|
buttonSize: PropTypes.Requireable<"small" | "middle" | "large">;
|
|
52
|
-
type: PropTypes.Requireable<"
|
|
52
|
+
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
53
53
|
value: PropTypes.Requireable<any>;
|
|
54
54
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
55
55
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -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>;
|
package/lib/cjs/select/index.js
CHANGED
|
@@ -843,9 +843,8 @@ class Select extends _baseComponent.default {
|
|
|
843
843
|
const {
|
|
844
844
|
maxTagCount
|
|
845
845
|
} = this.props;
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
if (items.length > 1 && overflowItemCount !== newOverFlowItemCount) {
|
|
846
|
+
const newOverFlowItemCount = selections.size - maxTagCount > 0 ? selections.size - maxTagCount + items.length - 1 : items.length - 1;
|
|
847
|
+
if (overflowItemCount !== newOverFlowItemCount) {
|
|
849
848
|
this.foundation.updateOverflowItemCount(selections.size, newOverFlowItemCount);
|
|
850
849
|
}
|
|
851
850
|
}
|
|
@@ -858,6 +857,7 @@ class Select extends _baseComponent.default {
|
|
|
858
857
|
className: `${prefixcls}-content-wrapper-collapse`
|
|
859
858
|
}, /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
860
859
|
items: normalTags,
|
|
860
|
+
key: String(selections.length),
|
|
861
861
|
overflowRenderer: overflowItems => this.renderOverflow(overflowItems, length - 1),
|
|
862
862
|
onOverflow: overflowItems => this.handleOverflow(overflowItems),
|
|
863
863
|
visibleItemRenderer: (item, index) => this.renderTag(item, index)
|
|
@@ -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>>;
|
|
@@ -132,7 +132,7 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
|
|
|
132
132
|
secondStep: PropTypes.Requireable<number>;
|
|
133
133
|
focusOnOpen: PropTypes.Requireable<boolean>;
|
|
134
134
|
autoFocus: PropTypes.Requireable<boolean>;
|
|
135
|
-
size: PropTypes.Requireable<"
|
|
135
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
136
136
|
panels: PropTypes.Requireable<PropTypes.InferProps<{
|
|
137
137
|
panelHeader: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
138
138
|
panelFooter: 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
|
panels: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
54
54
|
panelHeader: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike>>;
|
|
55
55
|
panelFooter: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike>>;
|
package/lib/cjs/tree/index.js
CHANGED
|
@@ -403,7 +403,7 @@ class Tree extends _baseComponent.default {
|
|
|
403
403
|
if (props.value) {
|
|
404
404
|
checkedKeyValues = (0, _treeUtil.findKeysForValues)((0, _treeUtil.normalizeValue)(props.value, withObject) || [], valueEntities, isMultiple);
|
|
405
405
|
} else {
|
|
406
|
-
checkedKeyValues = (0, _treeUtil.updateKeys)(prevState.checkedKeys, keyEntities);
|
|
406
|
+
checkedKeyValues = (0, _treeUtil.updateKeys)(props.checkRelation === 'related' ? prevState.checkedKeys : prevState.realCheckedKeys, keyEntities);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
if (checkedKeyValues) {
|
|
@@ -968,7 +968,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
968
968
|
if (props.value) {
|
|
969
969
|
checkedKeyValues = (0, _treeUtil.findKeysForValues)((0, _treeUtil.normalizeValue)(props.value, withObject) || [], valueEntities, isMultiple);
|
|
970
970
|
} else {
|
|
971
|
-
checkedKeyValues = (0, _treeUtil.updateKeys)(prevState.checkedKeys, keyEntities);
|
|
971
|
+
checkedKeyValues = (0, _treeUtil.updateKeys)(props.checkRelation === 'related' ? prevState.checkedKeys : prevState.realCheckedKeys, keyEntities);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
if (checkedKeyValues) {
|
|
@@ -60,11 +60,11 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
60
60
|
underline: PropTypes.Requireable<boolean>;
|
|
61
61
|
strong: PropTypes.Requireable<boolean>;
|
|
62
62
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
63
|
-
heading: PropTypes.Requireable<
|
|
63
|
+
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 5 | 6>;
|
|
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" | "tertiary" | "secondary" | "danger">;
|
|
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
|
@@ -22,7 +22,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
|
|
|
22
22
|
onMouseEnter: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
23
23
|
onMouseLeave: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
24
24
|
disabled: import("prop-types").Requireable<boolean>;
|
|
25
|
-
size: import("prop-types").Requireable<"
|
|
25
|
+
size: import("prop-types").Requireable<"default" | "small" | "large">;
|
|
26
26
|
type: import("prop-types").Requireable<"warning" | "primary" | "tertiary" | "secondary" | "danger">;
|
|
27
27
|
block: import("prop-types").Requireable<boolean>;
|
|
28
28
|
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>>;
|
|
@@ -86,7 +86,7 @@ export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGri
|
|
|
86
86
|
renderMonth(month: Date, panelType: PanelType): JSX.Element;
|
|
87
87
|
handleWeeksRowNumChange: (weeksRowNum: number, panelType: PanelType) => void;
|
|
88
88
|
reselect: () => void;
|
|
89
|
-
getYAMOpenType: () => "
|
|
89
|
+
getYAMOpenType: () => "both" | "none" | "left" | "right";
|
|
90
90
|
renderTimePicker(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
|
|
91
91
|
renderYearAndMonth(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
|
|
92
92
|
renderSwitch(panelType: PanelType): JSX.Element;
|
|
@@ -86,7 +86,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
86
86
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
87
87
|
zIndex?: number;
|
|
88
88
|
position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
89
|
-
onSearch?: (value: string, event: React.
|
|
89
|
+
onSearch?: (value: string, event: React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent>) => void;
|
|
90
90
|
dropdownClassName?: string;
|
|
91
91
|
dropdownStyle?: React.CSSProperties;
|
|
92
92
|
dropdownMargin?: number | {
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
32
32
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
33
33
|
zIndex?: number;
|
|
34
34
|
position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
35
|
-
onSearch?: (value: string, event: import("react").
|
|
35
|
+
onSearch?: (value: string, event: import("react").KeyboardEvent<Element> | import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
36
36
|
dropdownClassName?: string;
|
|
37
37
|
dropdownStyle?: import("react").CSSProperties;
|
|
38
38
|
dropdownMargin?: number | {
|
package/lib/es/input/index.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
|
|
|
85
85
|
showClear: PropTypes.Requireable<boolean>;
|
|
86
86
|
hideSuffix: PropTypes.Requireable<boolean>;
|
|
87
87
|
placeholder: PropTypes.Requireable<any>;
|
|
88
|
-
size: PropTypes.Requireable<"
|
|
88
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
89
89
|
className: PropTypes.Requireable<string>;
|
|
90
90
|
style: PropTypes.Requireable<object>;
|
|
91
91
|
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>;
|
|
@@ -296,7 +296,7 @@ class InputNumber extends BaseComponent {
|
|
|
296
296
|
* We need to set the status to false after trigger focus event
|
|
297
297
|
*/
|
|
298
298
|
if (this.clickUpOrDown) {
|
|
299
|
-
obj.value = this.foundation.doFormat(
|
|
299
|
+
obj.value = this.foundation.doFormat(valueStr, true);
|
|
300
300
|
newValue = obj.value;
|
|
301
301
|
}
|
|
302
302
|
this.foundation.updateStates(obj, () => this.adapter.restoreCursor());
|
|
@@ -308,8 +308,9 @@ class InputNumber extends BaseComponent {
|
|
|
308
308
|
});
|
|
309
309
|
} else {
|
|
310
310
|
// Update input content when controlled input NaN
|
|
311
|
+
newValue = this.foundation.doFormat(valueStr, false);
|
|
311
312
|
this.foundation.updateStates({
|
|
312
|
-
value:
|
|
313
|
+
value: newValue
|
|
313
314
|
});
|
|
314
315
|
}
|
|
315
316
|
} else if (this.foundation.isValidNumber(parsedNum)) {
|
|
@@ -140,19 +140,19 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
140
140
|
type: "warning";
|
|
141
141
|
};
|
|
142
142
|
export declare function withError(props: ModalReactProps): {
|
|
143
|
+
title?: React.ReactNode;
|
|
143
144
|
children?: React.ReactNode;
|
|
144
|
-
|
|
145
|
-
header?: React.ReactNode;
|
|
145
|
+
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
146
146
|
style?: React.CSSProperties;
|
|
147
|
-
title?: React.ReactNode;
|
|
148
|
-
mask?: boolean;
|
|
149
|
-
visible?: boolean;
|
|
150
147
|
className?: string;
|
|
151
|
-
zIndex?: number;
|
|
152
|
-
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
153
148
|
motion?: boolean;
|
|
154
149
|
getPopupContainer?: () => HTMLElement;
|
|
150
|
+
footer?: React.ReactNode;
|
|
151
|
+
header?: React.ReactNode;
|
|
155
152
|
direction?: any;
|
|
153
|
+
mask?: boolean;
|
|
154
|
+
visible?: boolean;
|
|
155
|
+
zIndex?: number;
|
|
156
156
|
width?: string | number;
|
|
157
157
|
height?: string | number;
|
|
158
158
|
content?: React.ReactNode;
|
|
@@ -201,6 +201,13 @@ export declare function withError(props: ModalReactProps): {
|
|
|
201
201
|
onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
|
|
202
202
|
onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
|
|
203
203
|
'aria-label'?: string;
|
|
204
|
+
title?: string;
|
|
205
|
+
name?: string;
|
|
206
|
+
value?: string | number | readonly string[];
|
|
207
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
208
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
form?: string;
|
|
210
|
+
slot?: string;
|
|
204
211
|
prefix?: string;
|
|
205
212
|
dangerouslySetInnerHTML?: {
|
|
206
213
|
__html: string | TrustedHTML;
|
|
@@ -355,17 +362,12 @@ export declare function withError(props: ModalReactProps): {
|
|
|
355
362
|
onScrollCapture?: React.UIEventHandler<HTMLButtonElement>;
|
|
356
363
|
onWheel?: React.WheelEventHandler<HTMLButtonElement>;
|
|
357
364
|
onWheelCapture?: React.WheelEventHandler<HTMLButtonElement>;
|
|
358
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
359
365
|
onAnimationStartCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
360
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
361
366
|
onAnimationEndCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
362
367
|
onAnimationIteration?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
363
368
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
364
369
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
365
370
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
366
|
-
form?: string;
|
|
367
|
-
slot?: string;
|
|
368
|
-
title?: string;
|
|
369
371
|
hidden?: boolean;
|
|
370
372
|
color?: string;
|
|
371
373
|
defaultChecked?: boolean;
|
|
@@ -374,8 +376,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
374
376
|
suppressHydrationWarning?: boolean;
|
|
375
377
|
accessKey?: string;
|
|
376
378
|
autoFocus?: boolean;
|
|
377
|
-
name?: string;
|
|
378
|
-
value?: string | number | readonly string[];
|
|
379
379
|
content?: string;
|
|
380
380
|
formAction?: string;
|
|
381
381
|
formEncType?: string;
|
|
@@ -389,7 +389,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
389
389
|
translate?: "no" | "yes";
|
|
390
390
|
role?: React.AriaRole;
|
|
391
391
|
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
392
|
-
inputMode?: "search" | "
|
|
392
|
+
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
393
393
|
nonce?: string;
|
|
394
394
|
tabIndex?: number;
|
|
395
395
|
'aria-expanded'?: boolean | "true" | "false";
|
|
@@ -422,7 +422,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
422
422
|
is?: string;
|
|
423
423
|
'aria-activedescendant'?: string;
|
|
424
424
|
'aria-atomic'?: boolean | "true" | "false";
|
|
425
|
-
'aria-autocomplete'?: "
|
|
425
|
+
'aria-autocomplete'?: "both" | "none" | "list" | "inline";
|
|
426
426
|
'aria-busy'?: boolean | "true" | "false";
|
|
427
427
|
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
428
428
|
'aria-colcount'?: number;
|