@douyinfe/semi-ui 2.43.1-alpha.1 → 2.43.2
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 +8 -1
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +11 -8
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_portal/index.js +1 -4
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/modal/confirm.d.ts +3 -3
- package/lib/cjs/popconfirm/index.js +8 -3
- package/lib/cjs/table/ColumnFilter.js +2 -1
- package/lib/es/_portal/index.js +1 -4
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/modal/confirm.d.ts +3 -3
- package/lib/es/popconfirm/index.js +8 -3
- package/lib/es/table/ColumnFilter.js +2 -1
- package/package.json +8 -8
package/lib/cjs/_portal/index.js
CHANGED
|
@@ -23,10 +23,7 @@ class Portal extends _react.PureComponent {
|
|
|
23
23
|
var _a, _b;
|
|
24
24
|
try {
|
|
25
25
|
let container = undefined;
|
|
26
|
-
if (!_this.el) {
|
|
27
|
-
_this.el = document.createElement('div');
|
|
28
|
-
}
|
|
29
|
-
if (!((_a = _this.state) === null || _a === void 0 ? void 0 : _a.container)) {
|
|
26
|
+
if (!_this.el || !((_a = _this.state) === null || _a === void 0 ? void 0 : _a.container) || !Array.from(_this.state.container.childNodes).includes(_this.el)) {
|
|
30
27
|
_this.el = document.createElement('div');
|
|
31
28
|
const getContainer = _this.props.getPopupContainer || context.getPopupContainer || defaultGetContainer;
|
|
32
29
|
const portalContainer = getContainer();
|
|
@@ -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, "stopPropagation" | "
|
|
143
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
144
144
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
145
145
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
146
146
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/cjs/form/field.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
86
86
|
preventScroll?: boolean;
|
|
87
87
|
showRestTagsPopover?: boolean;
|
|
88
88
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
89
|
-
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "
|
|
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>>;
|
|
@@ -145,11 +145,11 @@ export declare function withError(props: ModalReactProps): {
|
|
|
145
145
|
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
146
146
|
style?: React.CSSProperties;
|
|
147
147
|
className?: string;
|
|
148
|
+
motion?: boolean;
|
|
148
149
|
getPopupContainer?: () => HTMLElement;
|
|
149
150
|
footer?: React.ReactNode;
|
|
150
151
|
header?: React.ReactNode;
|
|
151
152
|
direction?: any;
|
|
152
|
-
motion?: boolean;
|
|
153
153
|
mask?: boolean;
|
|
154
154
|
visible?: boolean;
|
|
155
155
|
zIndex?: number;
|
|
@@ -204,10 +204,10 @@ export declare function withError(props: ModalReactProps): {
|
|
|
204
204
|
title?: string;
|
|
205
205
|
name?: string;
|
|
206
206
|
value?: string | number | readonly string[];
|
|
207
|
-
form?: string;
|
|
208
|
-
slot?: string;
|
|
209
207
|
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
210
208
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
form?: string;
|
|
210
|
+
slot?: string;
|
|
211
211
|
prefix?: string;
|
|
212
212
|
dangerouslySetInnerHTML?: {
|
|
213
213
|
__html: string | TrustedHTML;
|
|
@@ -58,6 +58,11 @@ class Popconfirm extends _baseComponent.default {
|
|
|
58
58
|
});
|
|
59
59
|
const showTitle = title !== null && typeof title !== 'undefined';
|
|
60
60
|
const showContent = !(content === null || typeof content === 'undefined');
|
|
61
|
+
const hasIcon = /*#__PURE__*/_react.default.isValidElement(icon);
|
|
62
|
+
const bodyCls = (0, _classnames.default)({
|
|
63
|
+
[`${prefixCls}-body`]: true,
|
|
64
|
+
[`${prefixCls}-body-withIcon`]: hasIcon
|
|
65
|
+
});
|
|
61
66
|
return (
|
|
62
67
|
/*#__PURE__*/
|
|
63
68
|
/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */
|
|
@@ -69,10 +74,10 @@ class Popconfirm extends _baseComponent.default {
|
|
|
69
74
|
className: `${prefixCls}-inner`
|
|
70
75
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
71
76
|
className: `${prefixCls}-header`
|
|
72
|
-
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
77
|
+
}, hasIcon ? /*#__PURE__*/_react.default.createElement("i", {
|
|
73
78
|
className: `${prefixCls}-header-icon`,
|
|
74
79
|
"x-semi-prop": "icon"
|
|
75
|
-
},
|
|
80
|
+
}, icon) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
76
81
|
className: `${prefixCls}-header-body`
|
|
77
82
|
}, showTitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
78
83
|
className: `${prefixCls}-header-title`,
|
|
@@ -85,7 +90,7 @@ class Popconfirm extends _baseComponent.default {
|
|
|
85
90
|
type: cancelType,
|
|
86
91
|
onClick: this.handleCancel
|
|
87
92
|
})), showContent ? /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
-
className:
|
|
93
|
+
className: bodyCls,
|
|
89
94
|
"x-semi-prop": "content"
|
|
90
95
|
}, (0, _isFunction2.default)(content) ? content({
|
|
91
96
|
initialFocusRef
|
|
@@ -104,7 +104,8 @@ function renderDropdown() {
|
|
|
104
104
|
dropdownProps.visible = filterDropdownVisible;
|
|
105
105
|
}
|
|
106
106
|
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({}, dropdownProps, {
|
|
107
|
-
key: `Dropdown_level_${level}
|
|
107
|
+
key: `Dropdown_level_${level}`,
|
|
108
|
+
className: `${_constants.cssClasses.PREFIX}-column-filter-dropdown`
|
|
108
109
|
}), nestedElem);
|
|
109
110
|
}
|
|
110
111
|
function ColumnFilter() {
|
package/lib/es/_portal/index.js
CHANGED
|
@@ -16,10 +16,7 @@ class Portal extends PureComponent {
|
|
|
16
16
|
var _a, _b;
|
|
17
17
|
try {
|
|
18
18
|
let container = undefined;
|
|
19
|
-
if (!_this.el) {
|
|
20
|
-
_this.el = document.createElement('div');
|
|
21
|
-
}
|
|
22
|
-
if (!((_a = _this.state) === null || _a === void 0 ? void 0 : _a.container)) {
|
|
19
|
+
if (!_this.el || !((_a = _this.state) === null || _a === void 0 ? void 0 : _a.container) || !Array.from(_this.state.container.childNodes).includes(_this.el)) {
|
|
23
20
|
_this.el = document.createElement('div');
|
|
24
21
|
const getContainer = _this.props.getPopupContainer || context.getPopupContainer || defaultGetContainer;
|
|
25
22
|
const portalContainer = getContainer();
|
|
@@ -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, "stopPropagation" | "
|
|
143
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
144
144
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
145
145
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
146
146
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
86
86
|
preventScroll?: boolean;
|
|
87
87
|
showRestTagsPopover?: boolean;
|
|
88
88
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
89
|
-
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "
|
|
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>>;
|
|
@@ -145,11 +145,11 @@ export declare function withError(props: ModalReactProps): {
|
|
|
145
145
|
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
146
146
|
style?: React.CSSProperties;
|
|
147
147
|
className?: string;
|
|
148
|
+
motion?: boolean;
|
|
148
149
|
getPopupContainer?: () => HTMLElement;
|
|
149
150
|
footer?: React.ReactNode;
|
|
150
151
|
header?: React.ReactNode;
|
|
151
152
|
direction?: any;
|
|
152
|
-
motion?: boolean;
|
|
153
153
|
mask?: boolean;
|
|
154
154
|
visible?: boolean;
|
|
155
155
|
zIndex?: number;
|
|
@@ -204,10 +204,10 @@ export declare function withError(props: ModalReactProps): {
|
|
|
204
204
|
title?: string;
|
|
205
205
|
name?: string;
|
|
206
206
|
value?: string | number | readonly string[];
|
|
207
|
-
form?: string;
|
|
208
|
-
slot?: string;
|
|
209
207
|
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
210
208
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
form?: string;
|
|
210
|
+
slot?: string;
|
|
211
211
|
prefix?: string;
|
|
212
212
|
dangerouslySetInnerHTML?: {
|
|
213
213
|
__html: string | TrustedHTML;
|
|
@@ -51,6 +51,11 @@ export default class Popconfirm extends BaseComponent {
|
|
|
51
51
|
});
|
|
52
52
|
const showTitle = title !== null && typeof title !== 'undefined';
|
|
53
53
|
const showContent = !(content === null || typeof content === 'undefined');
|
|
54
|
+
const hasIcon = /*#__PURE__*/React.isValidElement(icon);
|
|
55
|
+
const bodyCls = cls({
|
|
56
|
+
[`${prefixCls}-body`]: true,
|
|
57
|
+
[`${prefixCls}-body-withIcon`]: hasIcon
|
|
58
|
+
});
|
|
54
59
|
return (
|
|
55
60
|
/*#__PURE__*/
|
|
56
61
|
/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */
|
|
@@ -62,10 +67,10 @@ export default class Popconfirm extends BaseComponent {
|
|
|
62
67
|
className: `${prefixCls}-inner`
|
|
63
68
|
}, /*#__PURE__*/React.createElement("div", {
|
|
64
69
|
className: `${prefixCls}-header`
|
|
65
|
-
}, /*#__PURE__*/React.createElement("i", {
|
|
70
|
+
}, hasIcon ? /*#__PURE__*/React.createElement("i", {
|
|
66
71
|
className: `${prefixCls}-header-icon`,
|
|
67
72
|
"x-semi-prop": "icon"
|
|
68
|
-
},
|
|
73
|
+
}, icon) : null, /*#__PURE__*/React.createElement("div", {
|
|
69
74
|
className: `${prefixCls}-header-body`
|
|
70
75
|
}, showTitle ? /*#__PURE__*/React.createElement("div", {
|
|
71
76
|
className: `${prefixCls}-header-title`,
|
|
@@ -78,7 +83,7 @@ export default class Popconfirm extends BaseComponent {
|
|
|
78
83
|
type: cancelType,
|
|
79
84
|
onClick: this.handleCancel
|
|
80
85
|
})), showContent ? /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
className:
|
|
86
|
+
className: bodyCls,
|
|
82
87
|
"x-semi-prop": "content"
|
|
83
88
|
}, _isFunction(content) ? content({
|
|
84
89
|
initialFocusRef
|
|
@@ -95,7 +95,8 @@ function renderDropdown() {
|
|
|
95
95
|
dropdownProps.visible = filterDropdownVisible;
|
|
96
96
|
}
|
|
97
97
|
return /*#__PURE__*/React.createElement(Dropdown, Object.assign({}, dropdownProps, {
|
|
98
|
-
key: `Dropdown_level_${level}
|
|
98
|
+
key: `Dropdown_level_${level}`,
|
|
99
|
+
className: `${cssClasses.PREFIX}-column-filter-dropdown`
|
|
99
100
|
}), nestedElem);
|
|
100
101
|
}
|
|
101
102
|
export default function ColumnFilter() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.2",
|
|
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.43.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.43.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.43.
|
|
26
|
-
"@douyinfe/semi-icons": "2.43.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.43.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.43.
|
|
23
|
+
"@douyinfe/semi-animation": "2.43.2",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.43.2",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.43.2",
|
|
26
|
+
"@douyinfe/semi-icons": "2.43.2",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.43.2",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.43.2",
|
|
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": "6c7218869ff6a0c83525f49845b7dc7a858f3705",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|