@douyinfe/semi-ui 2.31.2-alpha.0 → 2.32.0-beta.0
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/css/semi.css +40 -11
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +693 -379
- 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/cascader/index.d.ts +1 -0
- package/lib/cjs/cascader/index.js +10 -1
- package/lib/cjs/datePicker/dateInput.d.ts +5 -1
- package/lib/cjs/datePicker/dateInput.js +16 -9
- package/lib/cjs/datePicker/datePicker.d.ts +33 -5
- package/lib/cjs/datePicker/datePicker.js +104 -23
- package/lib/cjs/datePicker/index.d.ts +1 -0
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.js +11 -3
- package/lib/cjs/datePicker/yearAndMonth.d.ts +10 -6
- package/lib/cjs/datePicker/yearAndMonth.js +84 -30
- package/lib/cjs/form/baseForm.d.ts +3 -3
- package/lib/cjs/form/field.d.ts +2 -2
- package/lib/cjs/input/index.d.ts +1 -1
- package/lib/cjs/input/inputGroup.d.ts +1 -1
- package/lib/cjs/locale/interface.d.ts +1 -0
- package/lib/cjs/locale/source/ar.js +2 -1
- package/lib/cjs/locale/source/de.js +2 -1
- package/lib/cjs/locale/source/en_GB.js +2 -1
- package/lib/cjs/locale/source/en_US.js +2 -1
- package/lib/cjs/locale/source/es.js +2 -1
- package/lib/cjs/locale/source/fr.js +2 -1
- package/lib/cjs/locale/source/id_ID.js +2 -1
- package/lib/cjs/locale/source/it.js +2 -1
- package/lib/cjs/locale/source/ja_JP.js +2 -1
- package/lib/cjs/locale/source/ko_KR.js +2 -1
- package/lib/cjs/locale/source/ms_MY.js +2 -1
- package/lib/cjs/locale/source/nl_NL.js +2 -1
- package/lib/cjs/locale/source/pl_PL.js +2 -1
- package/lib/cjs/locale/source/pt_BR.js +2 -1
- package/lib/cjs/locale/source/ro.d.ts +1 -0
- package/lib/cjs/locale/source/ro.js +2 -1
- package/lib/cjs/locale/source/ru_RU.js +2 -1
- package/lib/cjs/locale/source/sv_SE.js +2 -1
- package/lib/cjs/locale/source/th_TH.js +2 -1
- package/lib/cjs/locale/source/tr_TR.js +2 -1
- package/lib/cjs/locale/source/vi_VN.js +2 -1
- package/lib/cjs/locale/source/zh_CN.js +2 -1
- package/lib/cjs/locale/source/zh_TW.js +2 -1
- package/lib/cjs/modal/confirm.d.ts +8 -8
- package/lib/cjs/navigation/Item.js +4 -2
- package/lib/cjs/navigation/nav-context.d.ts +2 -0
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +18 -1
- package/lib/cjs/select/index.js +4 -1
- package/lib/cjs/sideSheet/SideSheetContent.d.ts +3 -1
- package/lib/cjs/sideSheet/SideSheetContent.js +3 -2
- package/lib/cjs/sideSheet/index.js +6 -3
- package/lib/cjs/space/index.js +5 -2
- package/lib/cjs/switch/index.d.ts +1 -1
- package/lib/cjs/switch/index.js +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 +1 -0
- package/lib/cjs/treeSelect/index.js +7 -3
- 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/cascader/index.d.ts +1 -0
- package/lib/es/cascader/index.js +10 -1
- package/lib/es/datePicker/dateInput.d.ts +5 -1
- package/lib/es/datePicker/dateInput.js +16 -9
- package/lib/es/datePicker/datePicker.d.ts +33 -5
- package/lib/es/datePicker/datePicker.js +109 -23
- package/lib/es/datePicker/index.d.ts +1 -0
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.js +11 -3
- package/lib/es/datePicker/yearAndMonth.d.ts +10 -6
- package/lib/es/datePicker/yearAndMonth.js +83 -29
- package/lib/es/form/baseForm.d.ts +3 -3
- package/lib/es/form/field.d.ts +2 -2
- package/lib/es/input/index.d.ts +1 -1
- package/lib/es/input/inputGroup.d.ts +1 -1
- package/lib/es/locale/interface.d.ts +1 -0
- package/lib/es/locale/source/ar.js +2 -1
- package/lib/es/locale/source/de.js +2 -1
- package/lib/es/locale/source/en_GB.js +2 -1
- package/lib/es/locale/source/en_US.js +2 -1
- package/lib/es/locale/source/es.js +2 -1
- package/lib/es/locale/source/fr.js +2 -1
- package/lib/es/locale/source/id_ID.js +2 -1
- package/lib/es/locale/source/it.js +2 -1
- package/lib/es/locale/source/ja_JP.js +2 -1
- package/lib/es/locale/source/ko_KR.js +2 -1
- package/lib/es/locale/source/ms_MY.js +2 -1
- package/lib/es/locale/source/nl_NL.js +2 -1
- package/lib/es/locale/source/pl_PL.js +2 -1
- package/lib/es/locale/source/pt_BR.js +2 -1
- package/lib/es/locale/source/ro.d.ts +1 -0
- package/lib/es/locale/source/ro.js +2 -1
- package/lib/es/locale/source/ru_RU.js +2 -1
- package/lib/es/locale/source/sv_SE.js +2 -1
- package/lib/es/locale/source/th_TH.js +2 -1
- package/lib/es/locale/source/tr_TR.js +2 -1
- package/lib/es/locale/source/vi_VN.js +2 -1
- package/lib/es/locale/source/zh_CN.js +2 -1
- package/lib/es/locale/source/zh_TW.js +2 -1
- package/lib/es/modal/confirm.d.ts +8 -8
- package/lib/es/navigation/Item.js +4 -2
- package/lib/es/navigation/nav-context.d.ts +2 -0
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/select/index.d.ts +18 -1
- package/lib/es/select/index.js +4 -1
- package/lib/es/sideSheet/SideSheetContent.d.ts +3 -1
- package/lib/es/sideSheet/SideSheetContent.js +3 -2
- package/lib/es/sideSheet/index.js +6 -3
- package/lib/es/space/index.js +4 -2
- package/lib/es/switch/index.d.ts +1 -1
- package/lib/es/switch/index.js +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 +1 -0
- package/lib/es/treeSelect/index.js +7 -3
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
|
@@ -140,16 +140,16 @@ 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
|
+
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
145
146
|
style?: React.CSSProperties;
|
|
146
147
|
className?: string;
|
|
148
|
+
motion?: boolean;
|
|
147
149
|
getPopupContainer?: () => HTMLElement;
|
|
148
150
|
footer?: React.ReactNode;
|
|
149
151
|
header?: React.ReactNode;
|
|
150
|
-
title?: React.ReactNode;
|
|
151
152
|
direction?: any;
|
|
152
|
-
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
153
153
|
width?: string | number;
|
|
154
154
|
height?: string | number;
|
|
155
155
|
mask?: boolean;
|
|
@@ -201,13 +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[];
|
|
204
207
|
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
205
208
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
206
|
-
value?: string | number | readonly string[];
|
|
207
209
|
form?: string;
|
|
208
210
|
slot?: string;
|
|
209
|
-
title?: string;
|
|
210
|
-
name?: string;
|
|
211
211
|
hidden?: boolean;
|
|
212
212
|
color?: string;
|
|
213
213
|
onChange?: React.FormEventHandler<HTMLButtonElement>;
|
|
@@ -228,7 +228,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
228
228
|
translate?: "no" | "yes";
|
|
229
229
|
prefix?: string;
|
|
230
230
|
contentEditable?: "inherit" | (boolean | "false" | "true");
|
|
231
|
-
inputMode?: "
|
|
231
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
232
232
|
tabIndex?: number;
|
|
233
233
|
role?: React.AriaRole;
|
|
234
234
|
onMouseOut?: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -274,7 +274,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
274
274
|
'aria-current'?: boolean | "time" | "page" | "false" | "true" | "location" | "step" | "date";
|
|
275
275
|
'aria-details'?: string;
|
|
276
276
|
'aria-disabled'?: boolean | "false" | "true";
|
|
277
|
-
'aria-dropeffect'?: "
|
|
277
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
278
278
|
'aria-errormessage'?: string;
|
|
279
279
|
'aria-flowto'?: string;
|
|
280
280
|
'aria-grabbed'?: boolean | "false" | "true";
|
|
@@ -31,12 +31,14 @@ export default class NavItem extends BaseComponent {
|
|
|
31
31
|
tooltipHideDelay,
|
|
32
32
|
tooltipShowDelay
|
|
33
33
|
} = this.props;
|
|
34
|
+
const hideDelay = tooltipHideDelay !== null && tooltipHideDelay !== void 0 ? tooltipHideDelay : this.context.tooltipHideDelay;
|
|
35
|
+
const showDelay = tooltipShowDelay !== null && tooltipShowDelay !== void 0 ? tooltipShowDelay : this.context.tooltipShowDelay;
|
|
34
36
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
35
37
|
content: text,
|
|
36
38
|
position: "right",
|
|
37
39
|
trigger: 'hover',
|
|
38
|
-
mouseEnterDelay:
|
|
39
|
-
mouseLeaveDelay:
|
|
40
|
+
mouseEnterDelay: showDelay,
|
|
41
|
+
mouseLeaveDelay: hideDelay
|
|
40
42
|
}, node);
|
|
41
43
|
};
|
|
42
44
|
|
|
@@ -21,6 +21,8 @@ export interface NavContextType {
|
|
|
21
21
|
canUpdateOpenKeys?: boolean;
|
|
22
22
|
renderWrapper?: NavProps['renderWrapper'];
|
|
23
23
|
getPopupContainer?: DropdownProps['getPopupContainer'];
|
|
24
|
+
tooltipShowDelay?: number;
|
|
25
|
+
tooltipHideDelay?: number;
|
|
24
26
|
}
|
|
25
27
|
declare const NavContext: React.Context<NavContextType>;
|
|
26
28
|
export default NavContext;
|
package/lib/es/rating/index.d.ts
CHANGED
|
@@ -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/es/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/es/select/index.d.ts
CHANGED
|
@@ -33,6 +33,23 @@ export interface optionRenderProps {
|
|
|
33
33
|
onClick?: (e: React.MouseEvent) => any;
|
|
34
34
|
[x: string]: any;
|
|
35
35
|
}
|
|
36
|
+
export interface SelectedItemProps {
|
|
37
|
+
value: OptionProps['value'];
|
|
38
|
+
label: OptionProps['label'];
|
|
39
|
+
_show?: boolean;
|
|
40
|
+
_selected: boolean;
|
|
41
|
+
_scrollIndex?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface TriggerRenderProps {
|
|
44
|
+
value: SelectedItemProps[];
|
|
45
|
+
inputValue: string;
|
|
46
|
+
onSearch: (inputValue: string) => void;
|
|
47
|
+
onClear: () => void;
|
|
48
|
+
onRemove: (option: OptionProps) => void;
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
placeholder: string;
|
|
51
|
+
componentProps: Record<string, any>;
|
|
52
|
+
}
|
|
36
53
|
export interface selectMethod {
|
|
37
54
|
clearInput?: () => void;
|
|
38
55
|
selectAll?: () => void;
|
|
@@ -121,7 +138,7 @@ export declare type SelectProps = {
|
|
|
121
138
|
onDeselect?: (value: SelectProps['value'], option: Record<string, any>) => void;
|
|
122
139
|
onSelect?: (value: SelectProps['value'], option: Record<string, any>) => void;
|
|
123
140
|
allowCreate?: boolean;
|
|
124
|
-
triggerRender?: (props?:
|
|
141
|
+
triggerRender?: (props?: TriggerRenderProps) => React.ReactNode;
|
|
125
142
|
onClear?: () => void;
|
|
126
143
|
virtualize?: virtualListProps;
|
|
127
144
|
onFocus?: (e: React.FocusEvent) => void;
|
package/lib/es/select/index.js
CHANGED
|
@@ -1162,11 +1162,14 @@ class Select extends BaseComponent {
|
|
|
1162
1162
|
}, arrowIcon) : /*#__PURE__*/React.createElement("div", {
|
|
1163
1163
|
className: `${prefixcls}-arrow-empty`
|
|
1164
1164
|
});
|
|
1165
|
-
const clear = clearIcon ? clearIcon : /*#__PURE__*/React.createElement(IconClear, null);
|
|
1165
|
+
const clear = clearIcon ? clearIcon : /*#__PURE__*/React.createElement(IconClear, null); // semantics of onSearch are more in line with behavior, onChange is alias of onSearch, will be deprecate next major version
|
|
1166
|
+
|
|
1166
1167
|
const inner = useCustomTrigger ? /*#__PURE__*/React.createElement(Trigger, {
|
|
1167
1168
|
value: Array.from(selections.values()),
|
|
1168
1169
|
inputValue: inputValue,
|
|
1169
1170
|
onChange: this.handleInputChange,
|
|
1171
|
+
onSearch: this.handleInputChange,
|
|
1172
|
+
onRemove: item => this.foundation.removeTag(item),
|
|
1170
1173
|
onClear: this.onClear,
|
|
1171
1174
|
disabled: disabled,
|
|
1172
1175
|
triggerRender: triggerRender,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { SideSheetProps } from '@douyinfe/semi-foundation/lib/es/sideSheet/sideSheetFoundation';
|
|
3
4
|
export interface SideSheetContentProps {
|
|
4
5
|
onClose?: (e: React.MouseEvent) => void;
|
|
5
6
|
mask?: boolean;
|
|
@@ -9,9 +10,10 @@ export interface SideSheetContentProps {
|
|
|
9
10
|
title?: React.ReactNode;
|
|
10
11
|
closable?: boolean;
|
|
11
12
|
headerStyle?: CSSProperties;
|
|
12
|
-
width
|
|
13
|
+
width?: CSSProperties['width'];
|
|
13
14
|
height: CSSProperties['height'];
|
|
14
15
|
style: CSSProperties;
|
|
16
|
+
size: SideSheetProps['size'];
|
|
15
17
|
bodyStyle?: CSSProperties;
|
|
16
18
|
className: string;
|
|
17
19
|
dialogClassName?: string;
|
|
@@ -126,7 +126,7 @@ export default class SideSheetContent extends React.PureComponent {
|
|
|
126
126
|
key: "dialog-element",
|
|
127
127
|
role: "dialog",
|
|
128
128
|
tabIndex: -1,
|
|
129
|
-
className: cls(`${prefixCls}-inner`, `${prefixCls}-inner-wrap`, (_a = this.props.dialogClassName) !== null && _a !== void 0 ? _a : ""),
|
|
129
|
+
className: cls(`${prefixCls}-inner`, `${prefixCls}-inner-wrap`, (_a = this.props.dialogClassName) !== null && _a !== void 0 ? _a : "", `${prefixCls}-size-${props.size}`),
|
|
130
130
|
// onMouseDown={this.onDialogMouseDown}
|
|
131
131
|
style: Object.assign(Object.assign({}, props.style), style)
|
|
132
132
|
}, this.props.wrapperExtraProps), /*#__PURE__*/React.createElement("div", {
|
|
@@ -149,7 +149,8 @@ export default class SideSheetContent extends React.PureComponent {
|
|
|
149
149
|
width
|
|
150
150
|
} = this.props;
|
|
151
151
|
const wrapperCls = cls(className, {
|
|
152
|
-
[`${prefixCls}-fixed`]: !mask
|
|
152
|
+
[`${prefixCls}-fixed`]: !mask,
|
|
153
|
+
[`${prefixCls}-size-${this.props.size}`]: !mask
|
|
153
154
|
});
|
|
154
155
|
const wrapperStyle = {};
|
|
155
156
|
|
|
@@ -161,7 +161,6 @@ export default class SideSheet extends BaseComponent {
|
|
|
161
161
|
} = this.context;
|
|
162
162
|
const isVertical = placement === 'left' || placement === 'right';
|
|
163
163
|
const isHorizontal = placement === 'top' || placement === 'bottom';
|
|
164
|
-
const sheetWidth = isVertical ? width ? width : defaultWidthList[size] : '100%';
|
|
165
164
|
const sheetHeight = isHorizontal ? height ? height : defaultHeight : '100%';
|
|
166
165
|
const classList = cls(prefixCls, className, {
|
|
167
166
|
[`${prefixCls}-${placement}`]: placement,
|
|
@@ -170,11 +169,15 @@ export default class SideSheet extends BaseComponent {
|
|
|
170
169
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
171
170
|
[`${prefixCls}-hidden`]: keepDOM && this.state.displayNone
|
|
172
171
|
});
|
|
173
|
-
const contentProps = Object.assign(Object.assign({},
|
|
172
|
+
const contentProps = Object.assign(Object.assign(Object.assign({}, isVertical ? width ? {
|
|
173
|
+
width
|
|
174
|
+
} : {} : {
|
|
175
|
+
width: "100%"
|
|
176
|
+
}), props), {
|
|
174
177
|
visible,
|
|
175
178
|
motion: false,
|
|
179
|
+
size,
|
|
176
180
|
className: classList,
|
|
177
|
-
width: sheetWidth,
|
|
178
181
|
height: sheetHeight,
|
|
179
182
|
onClose: this.handleCancel
|
|
180
183
|
});
|
package/lib/es/space/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { strings, cssClasses } from '@douyinfe/semi-foundation/lib/es/space/constants';
|
|
8
8
|
import '@douyinfe/semi-foundation/lib/es/space/space.css';
|
|
9
9
|
import { flatten } from './utils';
|
|
10
|
+
import getDataAttr from '@douyinfe/semi-foundation/lib/es/utils/getDataAttr';
|
|
10
11
|
const prefixCls = cssClasses.PREFIX;
|
|
11
12
|
|
|
12
13
|
class Space extends PureComponent {
|
|
@@ -58,11 +59,12 @@ class Space extends PureComponent {
|
|
|
58
59
|
[`${prefixCls}-loose-vertical`]: spacingVerticalType === strings.SPACING_LOOSE
|
|
59
60
|
});
|
|
60
61
|
const childrenNodes = flatten(children);
|
|
61
|
-
|
|
62
|
+
const dataAttributes = getDataAttr(this.props);
|
|
63
|
+
return /*#__PURE__*/React.createElement("div", Object.assign({}, dataAttributes, {
|
|
62
64
|
className: classNames,
|
|
63
65
|
style: realStyle,
|
|
64
66
|
"x-semi-prop": "children"
|
|
65
|
-
}, childrenNodes);
|
|
67
|
+
}), childrenNodes);
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
}
|
package/lib/es/switch/index.d.ts
CHANGED
|
@@ -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/es/switch/index.js
CHANGED
package/lib/es/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<"left" | "right" | "center">;
|
|
@@ -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/es/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<"left" | "right" | "center">;
|
|
@@ -96,7 +96,7 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
|
96
96
|
onAdd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
97
97
|
onRemove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
98
98
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
|
-
size: PropTypes.Requireable<"
|
|
99
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
100
100
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
101
101
|
prefix: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
102
102
|
suffix: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
@@ -130,7 +130,7 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
|
|
|
130
130
|
secondStep: PropTypes.Requireable<number>;
|
|
131
131
|
focusOnOpen: PropTypes.Requireable<boolean>;
|
|
132
132
|
autoFocus: PropTypes.Requireable<boolean>;
|
|
133
|
-
size: PropTypes.Requireable<"
|
|
133
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
134
134
|
panels: PropTypes.Requireable<PropTypes.InferProps<{
|
|
135
135
|
panelHeader: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
136
136
|
panelFooter: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
@@ -48,7 +48,7 @@ export default class LocaleTimePicker extends React.PureComponent<LocalePickerPr
|
|
|
48
48
|
secondStep: import("prop-types").Requireable<number>;
|
|
49
49
|
focusOnOpen: import("prop-types").Requireable<boolean>;
|
|
50
50
|
autoFocus: import("prop-types").Requireable<boolean>;
|
|
51
|
-
size: import("prop-types").Requireable<"
|
|
51
|
+
size: import("prop-types").Requireable<"default" | "small" | "large">;
|
|
52
52
|
panels: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
53
53
|
panelHeader: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike>>;
|
|
54
54
|
panelFooter: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike>>;
|
|
@@ -180,6 +180,7 @@ declare class TreeSelect extends BaseComponent<TreeSelectProps, TreeSelectState>
|
|
|
180
180
|
showRestTagsPopover: PropTypes.Requireable<boolean>;
|
|
181
181
|
restTagsPopoverProps: PropTypes.Requireable<object>;
|
|
182
182
|
preventScroll: PropTypes.Requireable<boolean>;
|
|
183
|
+
clickTriggerToHide: PropTypes.Requireable<boolean>;
|
|
183
184
|
};
|
|
184
185
|
static defaultProps: Partial<TreeSelectProps>;
|
|
185
186
|
inputRef: React.RefObject<typeof Input>;
|
|
@@ -437,7 +437,9 @@ class TreeSelect extends BaseComponent {
|
|
|
437
437
|
onClear: this.handleClear,
|
|
438
438
|
componentName: 'TreeSelect',
|
|
439
439
|
triggerRender: triggerRender,
|
|
440
|
-
componentProps: Object.assign({}, this.props)
|
|
440
|
+
componentProps: Object.assign({}, this.props),
|
|
441
|
+
onSearch: this.search,
|
|
442
|
+
onRemove: this.removeTag
|
|
441
443
|
}) : [/*#__PURE__*/React.createElement(Fragment, {
|
|
442
444
|
key: 'prefix'
|
|
443
445
|
}, prefix || insetLabel ? this.renderPrefix() : null), /*#__PURE__*/React.createElement(Fragment, {
|
|
@@ -1371,7 +1373,8 @@ TreeSelect.propTypes = {
|
|
|
1371
1373
|
'aria-label': PropTypes.string,
|
|
1372
1374
|
showRestTagsPopover: PropTypes.bool,
|
|
1373
1375
|
restTagsPopoverProps: PropTypes.object,
|
|
1374
|
-
preventScroll: PropTypes.bool
|
|
1376
|
+
preventScroll: PropTypes.bool,
|
|
1377
|
+
clickTriggerToHide: PropTypes.bool
|
|
1375
1378
|
};
|
|
1376
1379
|
TreeSelect.defaultProps = {
|
|
1377
1380
|
searchPosition: strings.SEARCH_POSITION_DROPDOWN,
|
|
@@ -1401,6 +1404,7 @@ TreeSelect.defaultProps = {
|
|
|
1401
1404
|
checkRelation: 'related',
|
|
1402
1405
|
'aria-label': 'TreeSelect',
|
|
1403
1406
|
showRestTagsPopover: false,
|
|
1404
|
-
restTagsPopoverProps: {}
|
|
1407
|
+
restTagsPopoverProps: {},
|
|
1408
|
+
clickTriggerToHide: true
|
|
1405
1409
|
};
|
|
1406
1410
|
export default TreeSelect;
|
|
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
39
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
40
|
-
heading: PropTypes.Requireable<
|
|
40
|
+
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 6 | 5>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"lib/*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@douyinfe/semi-animation": "2.
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.
|
|
22
|
-
"@douyinfe/semi-foundation": "2.
|
|
23
|
-
"@douyinfe/semi-icons": "2.
|
|
24
|
-
"@douyinfe/semi-illustrations": "2.
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.
|
|
20
|
+
"@douyinfe/semi-animation": "2.32.0-beta.0",
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.32.0-beta.0",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.32.0-beta.0",
|
|
23
|
+
"@douyinfe/semi-icons": "2.32.0-beta.0",
|
|
24
|
+
"@douyinfe/semi-illustrations": "2.32.0-beta.0",
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.32.0-beta.0",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "335f8c47c40373ee1464c841581130e62b62b1d5",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|