@douyinfe/semi-ui 2.45.3-alpha.1 → 2.45.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 +9 -4
- 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/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +3 -3
- package/lib/cjs/form/field.d.ts +3 -3
- package/lib/cjs/modal/confirm.d.ts +11 -11
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +1 -1
- package/lib/cjs/select/index.js +1 -1
- package/lib/cjs/select/utils.js +5 -1
- package/lib/cjs/table/Table.d.ts +1 -1
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/treeSelect/index.d.ts +1 -1
- package/lib/cjs/treeSelect/index.js +2 -2
- 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/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +3 -3
- package/lib/es/form/field.d.ts +3 -3
- package/lib/es/modal/confirm.d.ts +11 -11
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/select/index.d.ts +1 -1
- package/lib/es/select/index.js +1 -1
- package/lib/es/select/utils.js +5 -1
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/treeSelect/index.d.ts +1 -1
- package/lib/es/treeSelect/index.js +2 -2
- package/lib/es/typography/title.d.ts +2 -2
- package/package.json +8 -8
|
@@ -49,7 +49,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
|
|
|
49
49
|
offsetTop: PropTypes.Requireable<number>;
|
|
50
50
|
targetOffset: PropTypes.Requireable<number>;
|
|
51
51
|
showTooltip: PropTypes.Requireable<boolean>;
|
|
52
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
52
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
53
53
|
maxWidth: PropTypes.Requireable<NonNullable<string | number>>;
|
|
54
54
|
maxHeight: PropTypes.Requireable<NonNullable<string | number>>;
|
|
55
55
|
getContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -116,7 +116,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
116
116
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
117
117
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
118
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
119
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
119
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
120
120
|
placeholder: PropTypes.Requireable<string>;
|
|
121
121
|
prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
122
122
|
onChangeWithObject: PropTypes.Requireable<boolean>;
|
|
@@ -55,7 +55,7 @@ export default class Button extends PureComponent<ButtonProps> {
|
|
|
55
55
|
circle: PropTypes.Requireable<boolean>;
|
|
56
56
|
loading: PropTypes.Requireable<boolean>;
|
|
57
57
|
htmlType: PropTypes.Requireable<"button" | "submit" | "reset">;
|
|
58
|
-
theme: PropTypes.Requireable<"
|
|
58
|
+
theme: PropTypes.Requireable<"solid" | "light" | "borderless">;
|
|
59
59
|
className: PropTypes.Requireable<string>;
|
|
60
60
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
61
|
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -19,7 +19,7 @@ export default class ButtonGroup extends BaseComponent<ButtonGroupProps> {
|
|
|
19
19
|
disabled: PropTypes.Requireable<boolean>;
|
|
20
20
|
type: PropTypes.Requireable<string>;
|
|
21
21
|
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
22
|
-
theme: PropTypes.Requireable<"
|
|
22
|
+
theme: PropTypes.Requireable<"solid" | "light" | "borderless">;
|
|
23
23
|
'aria-label': PropTypes.Requireable<string>;
|
|
24
24
|
};
|
|
25
25
|
static defaultProps: {
|
|
@@ -8,7 +8,7 @@ declare class CarouselIndicator extends React.PureComponent<CarouselIndicatorPro
|
|
|
8
8
|
position: PropTypes.Requireable<"center" | "left" | "right">;
|
|
9
9
|
size: PropTypes.Requireable<"small" | "medium">;
|
|
10
10
|
style: PropTypes.Requireable<object>;
|
|
11
|
-
theme: PropTypes.Requireable<"
|
|
11
|
+
theme: PropTypes.Requireable<"dark" | "light" | "primary">;
|
|
12
12
|
total: PropTypes.Requireable<number>;
|
|
13
13
|
onIndicatorChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
14
|
type: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
@@ -22,9 +22,9 @@ declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
|
|
|
22
22
|
indicatorPosition: PropTypes.Requireable<"center" | "left" | "right">;
|
|
23
23
|
indicatorSize: PropTypes.Requireable<"small" | "medium">;
|
|
24
24
|
indicatorType: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
25
|
-
theme: PropTypes.Requireable<"
|
|
25
|
+
theme: PropTypes.Requireable<"dark" | "light" | "primary">;
|
|
26
26
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
arrowType: PropTypes.Requireable<"
|
|
27
|
+
arrowType: PropTypes.Requireable<"always" | "hover">;
|
|
28
28
|
showArrow: PropTypes.Requireable<boolean>;
|
|
29
29
|
showIndicator: PropTypes.Requireable<boolean>;
|
|
30
30
|
slideDirection: PropTypes.Requireable<"left" | "right">;
|
|
@@ -91,7 +91,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
91
91
|
insetLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
92
92
|
insetLabelId: PropTypes.Requireable<string>;
|
|
93
93
|
zIndex: PropTypes.Requireable<number>;
|
|
94
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
94
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
95
95
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
96
96
|
onCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
97
97
|
onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -66,7 +66,7 @@ declare class Dropdown extends BaseComponent<DropdownProps, DropdownState> {
|
|
|
66
66
|
motion: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
67
67
|
onVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
68
|
prefixCls: PropTypes.Requireable<string>;
|
|
69
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
69
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
70
70
|
rePosKey: PropTypes.Requireable<NonNullable<string | number>>;
|
|
71
71
|
render: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
72
72
|
spacing: PropTypes.Requireable<NonNullable<number | object>>;
|
|
@@ -85,8 +85,8 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
85
85
|
expandRestTagsOnClick?: boolean;
|
|
86
86
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
87
87
|
zIndex?: number;
|
|
88
|
-
position?: "left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
89
|
-
onSearch?: (value: string, event: React.
|
|
88
|
+
position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
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 | {
|
|
@@ -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
|
@@ -31,8 +31,8 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
31
31
|
expandRestTagsOnClick?: boolean;
|
|
32
32
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
33
33
|
zIndex?: number;
|
|
34
|
-
position?: "left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
35
|
-
onSearch?: (value: string, event: import("react").
|
|
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").KeyboardEvent<Element> | import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
36
36
|
dropdownClassName?: string;
|
|
37
37
|
dropdownStyle?: import("react").CSSProperties;
|
|
38
38
|
dropdownMargin?: number | {
|
|
@@ -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>>;
|
|
@@ -140,26 +140,26 @@ 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;
|
|
145
|
+
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
144
146
|
style?: React.CSSProperties;
|
|
145
147
|
className?: string;
|
|
148
|
+
motion?: boolean;
|
|
146
149
|
getPopupContainer?: () => HTMLElement;
|
|
147
150
|
footer?: React.ReactNode;
|
|
148
151
|
header?: React.ReactNode;
|
|
149
|
-
title?: React.ReactNode;
|
|
150
152
|
direction?: any;
|
|
151
|
-
motion?: boolean;
|
|
152
153
|
mask?: boolean;
|
|
153
154
|
visible?: boolean;
|
|
154
155
|
zIndex?: number;
|
|
155
|
-
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
156
|
-
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
157
156
|
width?: string | number;
|
|
158
157
|
height?: string | number;
|
|
159
158
|
content?: React.ReactNode;
|
|
159
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
160
|
+
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
160
161
|
closeOnEsc?: boolean;
|
|
161
162
|
preventScroll?: boolean;
|
|
162
|
-
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
163
163
|
afterClose?: () => void;
|
|
164
164
|
keepDOM?: boolean;
|
|
165
165
|
cancelText?: string;
|
|
@@ -201,12 +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
|
-
value?: string | number | readonly string[];
|
|
205
|
-
form?: string;
|
|
206
|
-
slot?: string;
|
|
207
204
|
title?: string;
|
|
205
|
+
name?: string;
|
|
206
|
+
value?: string | number | readonly string[];
|
|
208
207
|
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
208
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
form?: string;
|
|
210
|
+
slot?: string;
|
|
210
211
|
prefix?: string;
|
|
211
212
|
dangerouslySetInnerHTML?: {
|
|
212
213
|
__html: string | TrustedHTML;
|
|
@@ -375,7 +376,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
375
376
|
suppressHydrationWarning?: boolean;
|
|
376
377
|
accessKey?: string;
|
|
377
378
|
autoFocus?: boolean;
|
|
378
|
-
|
|
379
|
+
content?: string;
|
|
379
380
|
formAction?: string;
|
|
380
381
|
formEncType?: string;
|
|
381
382
|
formMethod?: string;
|
|
@@ -391,7 +392,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
391
392
|
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
392
393
|
nonce?: string;
|
|
393
394
|
tabIndex?: number;
|
|
394
|
-
content?: string;
|
|
395
395
|
'aria-expanded'?: boolean | "true" | "false";
|
|
396
396
|
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false";
|
|
397
397
|
'aria-controls'?: string;
|
|
@@ -428,7 +428,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
428
428
|
'aria-colcount'?: number;
|
|
429
429
|
'aria-colindex'?: number;
|
|
430
430
|
'aria-colspan'?: number;
|
|
431
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "
|
|
431
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "page" | "location" | "step";
|
|
432
432
|
'aria-details'?: string;
|
|
433
433
|
'aria-disabled'?: boolean | "true" | "false";
|
|
434
434
|
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
@@ -58,7 +58,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
58
58
|
visible: PropTypes.Requireable<boolean>;
|
|
59
59
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
60
60
|
motion: PropTypes.Requireable<boolean>;
|
|
61
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
61
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
62
62
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
63
63
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
64
64
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
@@ -200,7 +200,7 @@ declare class Select extends BaseComponent<SelectProps, SelectState> {
|
|
|
200
200
|
expandRestTagsOnClick: PropTypes.Requireable<boolean>;
|
|
201
201
|
onDropdownVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
202
202
|
zIndex: PropTypes.Requireable<number>;
|
|
203
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
203
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
204
204
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
205
205
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
206
206
|
dropdownClassName: PropTypes.Requireable<string>;
|
package/lib/cjs/select/index.js
CHANGED
|
@@ -530,7 +530,7 @@ class Select extends _baseComponent.default {
|
|
|
530
530
|
focused: isFocused,
|
|
531
531
|
onMouseEnter: () => this.onOptionHover(optionIndex),
|
|
532
532
|
style: optionStyle,
|
|
533
|
-
key: option.
|
|
533
|
+
key: option._keyInOptionList || option._keyInJsx || option.label + option.value + optionIndex,
|
|
534
534
|
renderOptionItem: renderOptionItem,
|
|
535
535
|
inputValue: inputValue,
|
|
536
536
|
semiOptionId: `${this.selectID}-option-${optionIndex}`
|
package/lib/cjs/select/utils.js
CHANGED
|
@@ -22,7 +22,7 @@ const generateOption = (child, parent, index) => {
|
|
|
22
22
|
}
|
|
23
23
|
const option = Object.assign(Object.assign({
|
|
24
24
|
value: childProps.value,
|
|
25
|
-
//
|
|
25
|
+
// Dropdown menu rendering priority label value, children, value in turn downgrade
|
|
26
26
|
label: childProps.label || childProps.children || childProps.value,
|
|
27
27
|
_show: true,
|
|
28
28
|
_selected: false,
|
|
@@ -30,6 +30,10 @@ const generateOption = (child, parent, index) => {
|
|
|
30
30
|
}, childProps), {
|
|
31
31
|
_parentGroup: parent
|
|
32
32
|
});
|
|
33
|
+
// Props are collected from ReactNode, after React.Children.toArray
|
|
34
|
+
// no need to determine whether the key exists in child
|
|
35
|
+
// Even if the user does not explicitly declare it, React will always generate a key.
|
|
36
|
+
option._keyInJsx = child.key;
|
|
33
37
|
return option;
|
|
34
38
|
};
|
|
35
39
|
exports.generateOption = generateOption;
|
package/lib/cjs/table/Table.d.ts
CHANGED
|
@@ -308,7 +308,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
308
308
|
showSizeChanger?: boolean;
|
|
309
309
|
showQuickJumper?: boolean;
|
|
310
310
|
popoverZIndex?: number;
|
|
311
|
-
popoverPosition?: "left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
311
|
+
popoverPosition?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
312
312
|
hideOnSinglePage?: boolean;
|
|
313
313
|
hoverShowPageSelect?: boolean;
|
|
314
314
|
disabled?: boolean;
|
|
@@ -91,7 +91,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
|
|
|
91
91
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
92
92
|
motion: PropTypes.Requireable<boolean>;
|
|
93
93
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
94
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
94
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
95
95
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
96
96
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
97
97
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
@@ -228,7 +228,7 @@ declare class TreeSelect extends BaseComponent<TreeSelectProps, TreeSelectState>
|
|
|
228
228
|
renderArrow: () => JSX.Element;
|
|
229
229
|
renderClearBtn: () => JSX.Element;
|
|
230
230
|
renderSelection: () => JSX.Element;
|
|
231
|
-
renderTagItem: (key: string, idx: number) =>
|
|
231
|
+
renderTagItem: (key: string, idx: number) => any;
|
|
232
232
|
renderTagInput: () => JSX.Element;
|
|
233
233
|
renderInput: () => JSX.Element;
|
|
234
234
|
renderEmpty: () => JSX.Element;
|
|
@@ -200,7 +200,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
200
200
|
} = item && treeNodeLabelProp in item ? renderSelectedItem(item, {
|
|
201
201
|
index,
|
|
202
202
|
onClose
|
|
203
|
-
}) :
|
|
203
|
+
}) : {};
|
|
204
204
|
if ((0, _isNull2.default)(content) || (0, _isUndefined2.default)(content)) {
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
@@ -496,7 +496,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
496
496
|
} = item && treeNodeLabelProp in item ? renderSelectedItem(item, {
|
|
497
497
|
index: idx,
|
|
498
498
|
onClose
|
|
499
|
-
}) :
|
|
499
|
+
}) : {};
|
|
500
500
|
if (isRenderInTag) {
|
|
501
501
|
return /*#__PURE__*/_react.default.createElement(_index.default, Object.assign({}, tagProps), content);
|
|
502
502
|
} else {
|
|
@@ -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 | "default" | "bold" | "
|
|
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
|
@@ -49,7 +49,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
|
|
|
49
49
|
offsetTop: PropTypes.Requireable<number>;
|
|
50
50
|
targetOffset: PropTypes.Requireable<number>;
|
|
51
51
|
showTooltip: PropTypes.Requireable<boolean>;
|
|
52
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
52
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
53
53
|
maxWidth: PropTypes.Requireable<NonNullable<string | number>>;
|
|
54
54
|
maxHeight: PropTypes.Requireable<NonNullable<string | number>>;
|
|
55
55
|
getContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -116,7 +116,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
116
116
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
117
117
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
118
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
119
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
119
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
120
120
|
placeholder: PropTypes.Requireable<string>;
|
|
121
121
|
prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
122
122
|
onChangeWithObject: PropTypes.Requireable<boolean>;
|
|
@@ -55,7 +55,7 @@ export default class Button extends PureComponent<ButtonProps> {
|
|
|
55
55
|
circle: PropTypes.Requireable<boolean>;
|
|
56
56
|
loading: PropTypes.Requireable<boolean>;
|
|
57
57
|
htmlType: PropTypes.Requireable<"button" | "submit" | "reset">;
|
|
58
|
-
theme: PropTypes.Requireable<"
|
|
58
|
+
theme: PropTypes.Requireable<"solid" | "light" | "borderless">;
|
|
59
59
|
className: PropTypes.Requireable<string>;
|
|
60
60
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
61
|
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -19,7 +19,7 @@ export default class ButtonGroup extends BaseComponent<ButtonGroupProps> {
|
|
|
19
19
|
disabled: PropTypes.Requireable<boolean>;
|
|
20
20
|
type: PropTypes.Requireable<string>;
|
|
21
21
|
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
22
|
-
theme: PropTypes.Requireable<"
|
|
22
|
+
theme: PropTypes.Requireable<"solid" | "light" | "borderless">;
|
|
23
23
|
'aria-label': PropTypes.Requireable<string>;
|
|
24
24
|
};
|
|
25
25
|
static defaultProps: {
|
|
@@ -8,7 +8,7 @@ declare class CarouselIndicator extends React.PureComponent<CarouselIndicatorPro
|
|
|
8
8
|
position: PropTypes.Requireable<"center" | "left" | "right">;
|
|
9
9
|
size: PropTypes.Requireable<"small" | "medium">;
|
|
10
10
|
style: PropTypes.Requireable<object>;
|
|
11
|
-
theme: PropTypes.Requireable<"
|
|
11
|
+
theme: PropTypes.Requireable<"dark" | "light" | "primary">;
|
|
12
12
|
total: PropTypes.Requireable<number>;
|
|
13
13
|
onIndicatorChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
14
|
type: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
@@ -22,9 +22,9 @@ declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
|
|
|
22
22
|
indicatorPosition: PropTypes.Requireable<"center" | "left" | "right">;
|
|
23
23
|
indicatorSize: PropTypes.Requireable<"small" | "medium">;
|
|
24
24
|
indicatorType: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
25
|
-
theme: PropTypes.Requireable<"
|
|
25
|
+
theme: PropTypes.Requireable<"dark" | "light" | "primary">;
|
|
26
26
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
arrowType: PropTypes.Requireable<"
|
|
27
|
+
arrowType: PropTypes.Requireable<"always" | "hover">;
|
|
28
28
|
showArrow: PropTypes.Requireable<boolean>;
|
|
29
29
|
showIndicator: PropTypes.Requireable<boolean>;
|
|
30
30
|
slideDirection: PropTypes.Requireable<"left" | "right">;
|
|
@@ -91,7 +91,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
91
91
|
insetLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
92
92
|
insetLabelId: PropTypes.Requireable<string>;
|
|
93
93
|
zIndex: PropTypes.Requireable<number>;
|
|
94
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
94
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
95
95
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
96
96
|
onCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
97
97
|
onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -66,7 +66,7 @@ declare class Dropdown extends BaseComponent<DropdownProps, DropdownState> {
|
|
|
66
66
|
motion: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
67
67
|
onVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
68
|
prefixCls: PropTypes.Requireable<string>;
|
|
69
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
69
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
70
70
|
rePosKey: PropTypes.Requireable<NonNullable<string | number>>;
|
|
71
71
|
render: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
72
72
|
spacing: PropTypes.Requireable<NonNullable<number | object>>;
|
|
@@ -85,8 +85,8 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
85
85
|
expandRestTagsOnClick?: boolean;
|
|
86
86
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
87
87
|
zIndex?: number;
|
|
88
|
-
position?: "left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
89
|
-
onSearch?: (value: string, event: React.
|
|
88
|
+
position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
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 | {
|
|
@@ -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
|
@@ -31,8 +31,8 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
31
31
|
expandRestTagsOnClick?: boolean;
|
|
32
32
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
33
33
|
zIndex?: number;
|
|
34
|
-
position?: "left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
35
|
-
onSearch?: (value: string, event: import("react").
|
|
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").KeyboardEvent<Element> | import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
36
36
|
dropdownClassName?: string;
|
|
37
37
|
dropdownStyle?: import("react").CSSProperties;
|
|
38
38
|
dropdownMargin?: number | {
|
|
@@ -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>>;
|
|
@@ -140,26 +140,26 @@ 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;
|
|
145
|
+
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
144
146
|
style?: React.CSSProperties;
|
|
145
147
|
className?: string;
|
|
148
|
+
motion?: boolean;
|
|
146
149
|
getPopupContainer?: () => HTMLElement;
|
|
147
150
|
footer?: React.ReactNode;
|
|
148
151
|
header?: React.ReactNode;
|
|
149
|
-
title?: React.ReactNode;
|
|
150
152
|
direction?: any;
|
|
151
|
-
motion?: boolean;
|
|
152
153
|
mask?: boolean;
|
|
153
154
|
visible?: boolean;
|
|
154
155
|
zIndex?: number;
|
|
155
|
-
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
156
|
-
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
157
156
|
width?: string | number;
|
|
158
157
|
height?: string | number;
|
|
159
158
|
content?: React.ReactNode;
|
|
159
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
160
|
+
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
160
161
|
closeOnEsc?: boolean;
|
|
161
162
|
preventScroll?: boolean;
|
|
162
|
-
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
163
163
|
afterClose?: () => void;
|
|
164
164
|
keepDOM?: boolean;
|
|
165
165
|
cancelText?: string;
|
|
@@ -201,12 +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
|
-
value?: string | number | readonly string[];
|
|
205
|
-
form?: string;
|
|
206
|
-
slot?: string;
|
|
207
204
|
title?: string;
|
|
205
|
+
name?: string;
|
|
206
|
+
value?: string | number | readonly string[];
|
|
208
207
|
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
208
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
form?: string;
|
|
210
|
+
slot?: string;
|
|
210
211
|
prefix?: string;
|
|
211
212
|
dangerouslySetInnerHTML?: {
|
|
212
213
|
__html: string | TrustedHTML;
|
|
@@ -375,7 +376,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
375
376
|
suppressHydrationWarning?: boolean;
|
|
376
377
|
accessKey?: string;
|
|
377
378
|
autoFocus?: boolean;
|
|
378
|
-
|
|
379
|
+
content?: string;
|
|
379
380
|
formAction?: string;
|
|
380
381
|
formEncType?: string;
|
|
381
382
|
formMethod?: string;
|
|
@@ -391,7 +392,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
391
392
|
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
392
393
|
nonce?: string;
|
|
393
394
|
tabIndex?: number;
|
|
394
|
-
content?: string;
|
|
395
395
|
'aria-expanded'?: boolean | "true" | "false";
|
|
396
396
|
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false";
|
|
397
397
|
'aria-controls'?: string;
|
|
@@ -428,7 +428,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
428
428
|
'aria-colcount'?: number;
|
|
429
429
|
'aria-colindex'?: number;
|
|
430
430
|
'aria-colspan'?: number;
|
|
431
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "
|
|
431
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "page" | "location" | "step";
|
|
432
432
|
'aria-details'?: string;
|
|
433
433
|
'aria-disabled'?: boolean | "true" | "false";
|
|
434
434
|
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
@@ -58,7 +58,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
58
58
|
visible: PropTypes.Requireable<boolean>;
|
|
59
59
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
60
60
|
motion: PropTypes.Requireable<boolean>;
|
|
61
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
61
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
62
62
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
63
63
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
64
64
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
package/lib/es/select/index.d.ts
CHANGED
|
@@ -200,7 +200,7 @@ declare class Select extends BaseComponent<SelectProps, SelectState> {
|
|
|
200
200
|
expandRestTagsOnClick: PropTypes.Requireable<boolean>;
|
|
201
201
|
onDropdownVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
202
202
|
zIndex: PropTypes.Requireable<number>;
|
|
203
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
203
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
204
204
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
205
205
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
206
206
|
dropdownClassName: PropTypes.Requireable<string>;
|
package/lib/es/select/index.js
CHANGED
|
@@ -521,7 +521,7 @@ class Select extends BaseComponent {
|
|
|
521
521
|
focused: isFocused,
|
|
522
522
|
onMouseEnter: () => this.onOptionHover(optionIndex),
|
|
523
523
|
style: optionStyle,
|
|
524
|
-
key: option.
|
|
524
|
+
key: option._keyInOptionList || option._keyInJsx || option.label + option.value + optionIndex,
|
|
525
525
|
renderOptionItem: renderOptionItem,
|
|
526
526
|
inputValue: inputValue,
|
|
527
527
|
semiOptionId: `${this.selectID}-option-${optionIndex}`
|
package/lib/es/select/utils.js
CHANGED
|
@@ -15,7 +15,7 @@ const generateOption = (child, parent, index) => {
|
|
|
15
15
|
}
|
|
16
16
|
const option = Object.assign(Object.assign({
|
|
17
17
|
value: childProps.value,
|
|
18
|
-
//
|
|
18
|
+
// Dropdown menu rendering priority label value, children, value in turn downgrade
|
|
19
19
|
label: childProps.label || childProps.children || childProps.value,
|
|
20
20
|
_show: true,
|
|
21
21
|
_selected: false,
|
|
@@ -23,6 +23,10 @@ const generateOption = (child, parent, index) => {
|
|
|
23
23
|
}, childProps), {
|
|
24
24
|
_parentGroup: parent
|
|
25
25
|
});
|
|
26
|
+
// Props are collected from ReactNode, after React.Children.toArray
|
|
27
|
+
// no need to determine whether the key exists in child
|
|
28
|
+
// Even if the user does not explicitly declare it, React will always generate a key.
|
|
29
|
+
option._keyInJsx = child.key;
|
|
26
30
|
return option;
|
|
27
31
|
};
|
|
28
32
|
const getOptionsFromGroup = selectChildren => {
|