@douyinfe/semi-ui 2.53.3-alpha.0 → 2.54.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 +9 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +193 -64
- 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 +3 -0
- package/lib/cjs/cascader/index.js +11 -4
- package/lib/cjs/collapsible/index.d.ts +1 -0
- package/lib/cjs/collapsible/index.js +4 -3
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/descriptions/descriptions-context.d.ts +2 -0
- package/lib/cjs/descriptions/index.d.ts +17 -4
- package/lib/cjs/descriptions/index.js +52 -16
- package/lib/cjs/descriptions/item.d.ts +1 -0
- package/lib/cjs/descriptions/item.js +20 -13
- package/lib/cjs/form/baseForm.d.ts +2 -2
- package/lib/cjs/form/field.d.ts +2 -2
- package/lib/cjs/image/interface.d.ts +1 -0
- package/lib/cjs/image/previewInner.js +6 -0
- package/lib/cjs/input/index.d.ts +1 -1
- package/lib/cjs/input/inputGroup.d.ts +1 -1
- package/lib/cjs/modal/Modal.d.ts +4 -4
- package/lib/cjs/modal/Modal.js +12 -11
- package/lib/cjs/modal/confirm.d.ts +9 -9
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/switch/index.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/index.d.ts +1 -1
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +1 -1
- package/lib/cjs/toast/index.js +3 -0
- package/lib/cjs/typography/base.js +4 -4
- 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/cascader/index.d.ts +3 -0
- package/lib/es/cascader/index.js +11 -4
- package/lib/es/collapsible/index.d.ts +1 -0
- package/lib/es/collapsible/index.js +4 -3
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/descriptions/descriptions-context.d.ts +2 -0
- package/lib/es/descriptions/index.d.ts +17 -4
- package/lib/es/descriptions/index.js +52 -14
- package/lib/es/descriptions/item.d.ts +1 -0
- package/lib/es/descriptions/item.js +20 -13
- package/lib/es/form/baseForm.d.ts +2 -2
- package/lib/es/form/field.d.ts +2 -2
- package/lib/es/image/interface.d.ts +1 -0
- package/lib/es/image/previewInner.js +6 -0
- package/lib/es/input/index.d.ts +1 -1
- package/lib/es/input/inputGroup.d.ts +1 -1
- package/lib/es/modal/Modal.d.ts +4 -4
- package/lib/es/modal/Modal.js +12 -11
- package/lib/es/modal/confirm.d.ts +9 -9
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/switch/index.d.ts +1 -1
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/tagInput/index.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +1 -1
- package/lib/es/toast/index.js +3 -0
- package/lib/es/typography/base.js +4 -4
- package/lib/es/typography/title.d.ts +2 -2
- package/package.json +8 -8
|
@@ -22,38 +22,45 @@ export default class Item extends PureComponent {
|
|
|
22
22
|
itemKey,
|
|
23
23
|
hidden,
|
|
24
24
|
className,
|
|
25
|
+
span,
|
|
25
26
|
style,
|
|
26
27
|
children
|
|
27
28
|
} = _a,
|
|
28
|
-
rest = __rest(_a, ["itemKey", "hidden", "className", "style", "children"]);
|
|
29
|
+
rest = __rest(_a, ["itemKey", "hidden", "className", "span", "style", "children"]);
|
|
29
30
|
const {
|
|
30
|
-
align
|
|
31
|
+
align,
|
|
32
|
+
layout
|
|
31
33
|
} = this.context;
|
|
32
34
|
if (hidden) {
|
|
33
35
|
return null;
|
|
34
36
|
}
|
|
35
|
-
const
|
|
36
|
-
className:
|
|
37
|
-
|
|
38
|
-
}, getDataAttr(rest)), /*#__PURE__*/React.createElement("td", {
|
|
39
|
-
className: `${prefixCls}-item`
|
|
37
|
+
const plainItem = /*#__PURE__*/React.createElement("td", {
|
|
38
|
+
className: `${prefixCls}-item`,
|
|
39
|
+
colSpan: span || 1
|
|
40
40
|
}, /*#__PURE__*/React.createElement("span", {
|
|
41
41
|
className: keyCls
|
|
42
42
|
}, itemKey, ":"), /*#__PURE__*/React.createElement("span", {
|
|
43
43
|
className: valCls
|
|
44
|
-
}, typeof children === 'function' ? children() : children))
|
|
45
|
-
|
|
46
|
-
style: style
|
|
47
|
-
}, getDataAttr(rest)), /*#__PURE__*/React.createElement("th", {
|
|
44
|
+
}, typeof children === 'function' ? children() : children));
|
|
45
|
+
const alignItem = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("th", {
|
|
48
46
|
className: `${prefixCls}-item ${prefixCls}-item-th`
|
|
49
47
|
}, /*#__PURE__*/React.createElement("span", {
|
|
50
48
|
className: keyCls
|
|
51
49
|
}, itemKey)), /*#__PURE__*/React.createElement("td", {
|
|
52
|
-
className: `${prefixCls}-item ${prefixCls}-item-td
|
|
50
|
+
className: `${prefixCls}-item ${prefixCls}-item-td`,
|
|
51
|
+
colSpan: span || 1
|
|
53
52
|
}, /*#__PURE__*/React.createElement("span", {
|
|
54
53
|
className: valCls
|
|
55
54
|
}, typeof children === 'function' ? children() : children)));
|
|
56
|
-
|
|
55
|
+
const item = align === 'plain' ? /*#__PURE__*/React.createElement("tr", Object.assign({
|
|
56
|
+
className: className,
|
|
57
|
+
style: style
|
|
58
|
+
}, getDataAttr(rest)), plainItem) : /*#__PURE__*/React.createElement("tr", Object.assign({
|
|
59
|
+
className: className,
|
|
60
|
+
style: style
|
|
61
|
+
}, getDataAttr(rest)), alignItem);
|
|
62
|
+
const horizontalItem = align === 'plain' ? plainItem : alignItem;
|
|
63
|
+
return layout === 'horizontal' ? horizontalItem : item;
|
|
57
64
|
}
|
|
58
65
|
}
|
|
59
66
|
Item.propTypes = {
|
|
@@ -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 | {
|
|
@@ -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
|
@@ -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 | {
|
|
@@ -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>>;
|
|
@@ -71,6 +71,7 @@ export interface PreviewProps extends BaseProps {
|
|
|
71
71
|
onRatioChange?: (type: RatioType) => void;
|
|
72
72
|
onRotateLeft?: (angle: number) => void;
|
|
73
73
|
onDownload?: (src: string, index: number) => void;
|
|
74
|
+
onDownloadError?: (src: string) => void;
|
|
74
75
|
setDownloadName?: (src: string) => string;
|
|
75
76
|
}
|
|
76
77
|
export interface PreviewInnerProps extends Omit<PreviewProps, "previewCls" | "previewStyle"> {
|
|
@@ -91,6 +91,12 @@ export default class PreviewInner extends BaseComponent {
|
|
|
91
91
|
} = this.props;
|
|
92
92
|
_isFunction(onDownload) && onDownload(src, index);
|
|
93
93
|
},
|
|
94
|
+
notifyDownloadError: src => {
|
|
95
|
+
const {
|
|
96
|
+
onDownloadError
|
|
97
|
+
} = this.props;
|
|
98
|
+
_isFunction(onDownloadError) && onDownloadError(src);
|
|
99
|
+
},
|
|
94
100
|
registerKeyDownListener: () => {
|
|
95
101
|
window && window.addEventListener("keydown", this.handleKeyDown);
|
|
96
102
|
},
|
package/lib/es/input/index.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
|
|
|
86
86
|
showClear: PropTypes.Requireable<boolean>;
|
|
87
87
|
hideSuffix: PropTypes.Requireable<boolean>;
|
|
88
88
|
placeholder: PropTypes.Requireable<any>;
|
|
89
|
-
size: PropTypes.Requireable<"
|
|
89
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
90
90
|
className: PropTypes.Requireable<string>;
|
|
91
91
|
style: PropTypes.Requireable<object>;
|
|
92
92
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
@@ -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>;
|
package/lib/es/modal/Modal.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import '@douyinfe/semi-foundation/lib/es/modal/modal.css';
|
|
2
2
|
import ModalFoundation, { ModalAdapter, ModalProps, ModalState } from '@douyinfe/semi-foundation/lib/es/modal/modalFoundation';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import '
|
|
4
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
5
5
|
import BaseComponent from '../_base/baseComponent';
|
|
6
|
-
import useModal from './useModal';
|
|
7
6
|
import { ButtonProps } from '../button/Button';
|
|
8
|
-
|
|
7
|
+
import useModal from './useModal';
|
|
8
|
+
export declare let destroyFns: any[];
|
|
9
9
|
export type ConfirmType = 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
10
10
|
export type Directions = 'ltr' | 'rtl';
|
|
11
11
|
export type { ModalState };
|
package/lib/es/modal/Modal.js
CHANGED
|
@@ -7,22 +7,22 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
7
7
|
}
|
|
8
8
|
return t;
|
|
9
9
|
};
|
|
10
|
-
import React from 'react';
|
|
11
10
|
import { cssClasses, strings } from '@douyinfe/semi-foundation/lib/es/modal/constants';
|
|
12
|
-
import
|
|
11
|
+
import '@douyinfe/semi-foundation/lib/es/modal/modal.css';
|
|
13
12
|
import ModalFoundation from '@douyinfe/semi-foundation/lib/es/modal/modalFoundation';
|
|
14
|
-
import ModalContent from './ModalContent';
|
|
15
|
-
import Portal from '../_portal';
|
|
16
|
-
import LocaleConsumer from '../locale/localeConsumer';
|
|
17
13
|
import cls from 'classnames';
|
|
18
14
|
import PropTypes from 'prop-types';
|
|
19
|
-
import '
|
|
15
|
+
import React from 'react';
|
|
20
16
|
import BaseComponent from '../_base/baseComponent';
|
|
21
|
-
import confirm, { withConfirm, withError, withInfo, withSuccess, withWarning } from './confirm';
|
|
22
|
-
import useModal from './useModal';
|
|
23
17
|
import CSSAnimation from "../_cssAnimation";
|
|
18
|
+
import Portal from '../_portal';
|
|
24
19
|
import { getDefaultPropsFromGlobalConfig, getScrollbarWidth } from '../_utils';
|
|
25
|
-
|
|
20
|
+
import Button from '../button';
|
|
21
|
+
import LocaleConsumer from '../locale/localeConsumer';
|
|
22
|
+
import ModalContent from './ModalContent';
|
|
23
|
+
import confirm, { withConfirm, withError, withInfo, withSuccess, withWarning } from './confirm';
|
|
24
|
+
import useModal from './useModal';
|
|
25
|
+
export let destroyFns = [];
|
|
26
26
|
class Modal extends BaseComponent {
|
|
27
27
|
constructor(props) {
|
|
28
28
|
super(props);
|
|
@@ -349,11 +349,12 @@ Modal.confirm = function (props) {
|
|
|
349
349
|
return confirm(withConfirm(props));
|
|
350
350
|
};
|
|
351
351
|
Modal.destroyAll = function destroyAllFn() {
|
|
352
|
-
|
|
353
|
-
const close = destroyFns
|
|
352
|
+
for (let i = 0, len = destroyFns.length; i < len; i++) {
|
|
353
|
+
const close = destroyFns[i];
|
|
354
354
|
if (close) {
|
|
355
355
|
close();
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
+
destroyFns = [];
|
|
358
359
|
};
|
|
359
360
|
export default Modal;
|
|
@@ -143,19 +143,19 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
143
143
|
type: "warning";
|
|
144
144
|
};
|
|
145
145
|
export declare function withError(props: ModalReactProps): {
|
|
146
|
+
title?: React.ReactNode;
|
|
146
147
|
children?: React.ReactNode;
|
|
147
|
-
|
|
148
|
+
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
148
149
|
style?: React.CSSProperties;
|
|
149
150
|
className?: string;
|
|
151
|
+
motion?: boolean;
|
|
150
152
|
getPopupContainer?: () => HTMLElement;
|
|
151
153
|
footer?: React.ReactNode;
|
|
152
154
|
header?: React.ReactNode;
|
|
153
|
-
title?: React.ReactNode;
|
|
154
155
|
direction?: any;
|
|
155
156
|
mask?: boolean;
|
|
156
157
|
visible?: boolean;
|
|
157
158
|
zIndex?: number;
|
|
158
|
-
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
159
159
|
width?: string | number;
|
|
160
160
|
height?: string | number;
|
|
161
161
|
content?: React.ReactNode;
|
|
@@ -166,6 +166,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
166
166
|
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
167
167
|
closable?: boolean;
|
|
168
168
|
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
169
|
+
lazyRender?: boolean;
|
|
169
170
|
bodyStyle?: React.CSSProperties;
|
|
170
171
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
171
172
|
cancelText?: string;
|
|
@@ -180,7 +181,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
180
181
|
okType?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").OKType;
|
|
181
182
|
onOk?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
182
183
|
closeIcon?: React.ReactNode;
|
|
183
|
-
lazyRender?: boolean;
|
|
184
184
|
fullScreen?: boolean;
|
|
185
185
|
footerFill?: boolean;
|
|
186
186
|
type: "error";
|
|
@@ -205,12 +205,13 @@ export declare function withError(props: ModalReactProps): {
|
|
|
205
205
|
onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
|
|
206
206
|
onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
|
|
207
207
|
'aria-label'?: string;
|
|
208
|
+
title?: string;
|
|
209
|
+
name?: string;
|
|
210
|
+
value?: string | number | readonly string[];
|
|
208
211
|
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
212
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
210
|
-
value?: string | number | readonly string[];
|
|
211
213
|
form?: string;
|
|
212
214
|
slot?: string;
|
|
213
|
-
title?: string;
|
|
214
215
|
prefix?: string;
|
|
215
216
|
dangerouslySetInnerHTML?: {
|
|
216
217
|
__html: string | TrustedHTML;
|
|
@@ -379,7 +380,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
379
380
|
suppressHydrationWarning?: boolean;
|
|
380
381
|
accessKey?: string;
|
|
381
382
|
autoFocus?: boolean;
|
|
382
|
-
name?: string;
|
|
383
383
|
contextMenu?: string;
|
|
384
384
|
dir?: string;
|
|
385
385
|
draggable?: boolean | "true" | "false";
|
|
@@ -387,7 +387,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
387
387
|
translate?: "no" | "yes";
|
|
388
388
|
role?: React.AriaRole;
|
|
389
389
|
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
390
|
-
inputMode?: "
|
|
390
|
+
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
391
391
|
nonce?: string;
|
|
392
392
|
tabIndex?: number;
|
|
393
393
|
content?: string;
|
|
@@ -430,7 +430,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
430
430
|
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "location" | "page" | "step";
|
|
431
431
|
'aria-details'?: string;
|
|
432
432
|
'aria-disabled'?: boolean | "true" | "false";
|
|
433
|
-
'aria-dropeffect'?: "
|
|
433
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
434
434
|
'aria-errormessage'?: string;
|
|
435
435
|
'aria-flowto'?: string;
|
|
436
436
|
'aria-grabbed'?: boolean | "true" | "false";
|
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/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/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/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<"center" | "left" | "right">;
|
|
@@ -97,7 +97,7 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
|
97
97
|
onAdd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
98
98
|
onRemove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
99
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
100
|
-
size: PropTypes.Requireable<"
|
|
100
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
101
101
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
102
102
|
prefix: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
103
103
|
suffix: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
@@ -133,7 +133,7 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
|
|
|
133
133
|
secondStep: PropTypes.Requireable<number>;
|
|
134
134
|
focusOnOpen: PropTypes.Requireable<boolean>;
|
|
135
135
|
autoFocus: PropTypes.Requireable<boolean>;
|
|
136
|
-
size: PropTypes.Requireable<"
|
|
136
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
137
137
|
stopPropagation: PropTypes.Requireable<boolean>;
|
|
138
138
|
panels: PropTypes.Requireable<PropTypes.InferProps<{
|
|
139
139
|
panelHeader: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
@@ -49,7 +49,7 @@ export default class LocaleTimePicker extends React.PureComponent<LocalePickerPr
|
|
|
49
49
|
secondStep: import("prop-types").Requireable<number>;
|
|
50
50
|
focusOnOpen: import("prop-types").Requireable<boolean>;
|
|
51
51
|
autoFocus: import("prop-types").Requireable<boolean>;
|
|
52
|
-
size: import("prop-types").Requireable<"
|
|
52
|
+
size: import("prop-types").Requireable<"default" | "small" | "large">;
|
|
53
53
|
stopPropagation: import("prop-types").Requireable<boolean>;
|
|
54
54
|
panels: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
55
55
|
panelHeader: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike>>;
|
package/lib/es/toast/index.js
CHANGED
|
@@ -178,6 +178,9 @@ const createBaseToast = () => {
|
|
|
178
178
|
ToastList.defaultOpts[pos] = opts[pos];
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
|
+
if (typeof opts.theme === 'string' && strings.themes.includes(opts.theme)) {
|
|
182
|
+
ToastList.defaultOpts.theme = opts.theme;
|
|
183
|
+
}
|
|
181
184
|
if (typeof opts.zIndex === 'number') {
|
|
182
185
|
ToastList.defaultOpts.zIndex = opts.zIndex;
|
|
183
186
|
}
|
|
@@ -420,11 +420,11 @@ export default class Base extends Component {
|
|
|
420
420
|
copied: false,
|
|
421
421
|
// ellipsis
|
|
422
422
|
// if text is overflow in container
|
|
423
|
-
isOverflowed:
|
|
423
|
+
isOverflowed: false,
|
|
424
424
|
ellipsisContent: props.children,
|
|
425
425
|
expanded: false,
|
|
426
426
|
// if text is truncated with js
|
|
427
|
-
isTruncated:
|
|
427
|
+
isTruncated: false,
|
|
428
428
|
prevChildren: null
|
|
429
429
|
};
|
|
430
430
|
this.wrapperRef = /*#__PURE__*/React.createRef();
|
|
@@ -445,10 +445,10 @@ export default class Base extends Component {
|
|
|
445
445
|
newState.prevChildren = props.children;
|
|
446
446
|
if (props.ellipsis && prevChildren !== props.children) {
|
|
447
447
|
// reset ellipsis state if children update
|
|
448
|
-
newState.isOverflowed =
|
|
448
|
+
newState.isOverflowed = false;
|
|
449
449
|
newState.ellipsisContent = props.children;
|
|
450
450
|
newState.expanded = false;
|
|
451
|
-
newState.isTruncated =
|
|
451
|
+
newState.isTruncated = false;
|
|
452
452
|
}
|
|
453
453
|
return newState;
|
|
454
454
|
}
|
|
@@ -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" | "secondary" | "danger" | "tertiary" | "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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.54.0-beta.0",
|
|
4
4
|
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@dnd-kit/core": "^6.0.8",
|
|
21
21
|
"@dnd-kit/sortable": "^7.0.2",
|
|
22
22
|
"@dnd-kit/utilities": "^3.2.1",
|
|
23
|
-
"@douyinfe/semi-animation": "2.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.
|
|
26
|
-
"@douyinfe/semi-icons": "2.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.
|
|
23
|
+
"@douyinfe/semi-animation": "2.54.0-beta.0",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.54.0-beta.0",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.54.0-beta.0",
|
|
26
|
+
"@douyinfe/semi-icons": "2.54.0-beta.0",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.54.0-beta.0",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.54.0-beta.0",
|
|
29
29
|
"async-validator": "^3.5.0",
|
|
30
30
|
"classnames": "^2.2.6",
|
|
31
31
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"author": "",
|
|
77
77
|
"license": "MIT",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "b661fb2006bd11849e02af7f8e1b412c59b94781",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|