@douyinfe/semi-ui 2.53.0-beta.0 → 2.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/semi-ui.js +32 -22
- 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/resizeObserver/index.js +7 -3
- package/lib/cjs/sideSheet/index.js +17 -16
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/es/resizeObserver/index.js +7 -3
- package/lib/es/sideSheet/index.js +17 -16
- package/lib/es/tagInput/index.d.ts +1 -1
- package/package.json +8 -8
|
@@ -89,13 +89,17 @@ class ReactResizeObserver extends _baseComponent.default {
|
|
|
89
89
|
ref.current = node;
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
|
|
92
|
+
if (globalThis['ResizeObserver']) {
|
|
93
|
+
this.observer = new ResizeObserver(this.handleResizeEventTriggered);
|
|
94
|
+
}
|
|
93
95
|
}
|
|
94
96
|
componentDidMount() {
|
|
95
|
-
|
|
97
|
+
var _a;
|
|
98
|
+
(_a = this.observeElement) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
96
99
|
}
|
|
97
100
|
componentDidUpdate(prevProps) {
|
|
98
|
-
|
|
101
|
+
var _a;
|
|
102
|
+
(_a = this.observeElement) === null || _a === void 0 ? void 0 : _a.call(this, this.props.observeParent !== prevProps.observeParent);
|
|
99
103
|
}
|
|
100
104
|
componentWillUnmount() {
|
|
101
105
|
if (this.observer) {
|
|
@@ -148,6 +148,15 @@ class SideSheet extends _baseComponent.default {
|
|
|
148
148
|
keepDOM
|
|
149
149
|
} = _a,
|
|
150
150
|
props = __rest(_a, ["placement", "className", "children", "width", "height", "motion", "visible", "style", "maskStyle", "size", "zIndex", "getPopupContainer", "keepDOM"]);
|
|
151
|
+
let wrapperStyle = {
|
|
152
|
+
zIndex
|
|
153
|
+
};
|
|
154
|
+
if (getPopupContainer) {
|
|
155
|
+
wrapperStyle = {
|
|
156
|
+
zIndex,
|
|
157
|
+
position: 'static'
|
|
158
|
+
};
|
|
159
|
+
}
|
|
151
160
|
const {
|
|
152
161
|
direction
|
|
153
162
|
} = this.context;
|
|
@@ -196,35 +205,27 @@ class SideSheet extends _baseComponent.default {
|
|
|
196
205
|
animationStyle,
|
|
197
206
|
animationEventsNeedBind
|
|
198
207
|
} = _ref2;
|
|
199
|
-
return shouldRender ? /*#__PURE__*/_react.default.createElement(
|
|
208
|
+
return shouldRender ? /*#__PURE__*/_react.default.createElement(_portal.default, {
|
|
209
|
+
getPopupContainer: getPopupContainer,
|
|
210
|
+
style: wrapperStyle
|
|
211
|
+
}, /*#__PURE__*/_react.default.createElement(_SideSheetContent.default, Object.assign({}, contentProps, {
|
|
200
212
|
maskExtraProps: maskAnimationEventsNeedBind,
|
|
201
213
|
wrapperExtraProps: animationEventsNeedBind,
|
|
202
214
|
dialogClassName: animationClassName,
|
|
203
215
|
maskClassName: maskAnimationClassName,
|
|
204
216
|
maskStyle: Object.assign({}, maskStyle),
|
|
205
217
|
style: Object.assign(Object.assign({}, animationStyle), style)
|
|
206
|
-
}), children) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
218
|
+
}), children)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
207
219
|
});
|
|
208
220
|
});
|
|
209
221
|
}
|
|
210
222
|
render() {
|
|
211
223
|
const {
|
|
212
224
|
zIndex,
|
|
213
|
-
getPopupContainer
|
|
225
|
+
getPopupContainer,
|
|
226
|
+
visible
|
|
214
227
|
} = this.props;
|
|
215
|
-
|
|
216
|
-
zIndex
|
|
217
|
-
};
|
|
218
|
-
if (getPopupContainer) {
|
|
219
|
-
wrapperStyle = {
|
|
220
|
-
zIndex,
|
|
221
|
-
position: 'static'
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
return /*#__PURE__*/_react.default.createElement(_portal.default, {
|
|
225
|
-
getPopupContainer: getPopupContainer,
|
|
226
|
-
style: wrapperStyle
|
|
227
|
-
}, this.renderContent());
|
|
228
|
+
return this.renderContent();
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
231
|
exports.default = SideSheet;
|
|
@@ -34,7 +34,7 @@ export interface TagInputProps {
|
|
|
34
34
|
onFocus?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
35
35
|
onInputChange?: (value: string, e: React.MouseEvent<HTMLInputElement>) => void;
|
|
36
36
|
onInputExceed?: ((value: string) => void);
|
|
37
|
-
onKeyDown?: (e: React.
|
|
37
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
38
38
|
onRemove?: (removedValue: string, idx: number) => void;
|
|
39
39
|
placeholder?: string;
|
|
40
40
|
insetLabel?: React.ReactNode;
|
|
@@ -81,13 +81,17 @@ export default class ReactResizeObserver extends BaseComponent {
|
|
|
81
81
|
ref.current = node;
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
|
|
84
|
+
if (globalThis['ResizeObserver']) {
|
|
85
|
+
this.observer = new ResizeObserver(this.handleResizeEventTriggered);
|
|
86
|
+
}
|
|
85
87
|
}
|
|
86
88
|
componentDidMount() {
|
|
87
|
-
|
|
89
|
+
var _a;
|
|
90
|
+
(_a = this.observeElement) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
88
91
|
}
|
|
89
92
|
componentDidUpdate(prevProps) {
|
|
90
|
-
|
|
93
|
+
var _a;
|
|
94
|
+
(_a = this.observeElement) === null || _a === void 0 ? void 0 : _a.call(this, this.props.observeParent !== prevProps.observeParent);
|
|
91
95
|
}
|
|
92
96
|
componentWillUnmount() {
|
|
93
97
|
if (this.observer) {
|
|
@@ -141,6 +141,15 @@ export default class SideSheet extends BaseComponent {
|
|
|
141
141
|
keepDOM
|
|
142
142
|
} = _a,
|
|
143
143
|
props = __rest(_a, ["placement", "className", "children", "width", "height", "motion", "visible", "style", "maskStyle", "size", "zIndex", "getPopupContainer", "keepDOM"]);
|
|
144
|
+
let wrapperStyle = {
|
|
145
|
+
zIndex
|
|
146
|
+
};
|
|
147
|
+
if (getPopupContainer) {
|
|
148
|
+
wrapperStyle = {
|
|
149
|
+
zIndex,
|
|
150
|
+
position: 'static'
|
|
151
|
+
};
|
|
152
|
+
}
|
|
144
153
|
const {
|
|
145
154
|
direction
|
|
146
155
|
} = this.context;
|
|
@@ -189,35 +198,27 @@ export default class SideSheet extends BaseComponent {
|
|
|
189
198
|
animationStyle,
|
|
190
199
|
animationEventsNeedBind
|
|
191
200
|
} = _ref2;
|
|
192
|
-
return shouldRender ? /*#__PURE__*/React.createElement(
|
|
201
|
+
return shouldRender ? /*#__PURE__*/React.createElement(Portal, {
|
|
202
|
+
getPopupContainer: getPopupContainer,
|
|
203
|
+
style: wrapperStyle
|
|
204
|
+
}, /*#__PURE__*/React.createElement(SideSheetContent, Object.assign({}, contentProps, {
|
|
193
205
|
maskExtraProps: maskAnimationEventsNeedBind,
|
|
194
206
|
wrapperExtraProps: animationEventsNeedBind,
|
|
195
207
|
dialogClassName: animationClassName,
|
|
196
208
|
maskClassName: maskAnimationClassName,
|
|
197
209
|
maskStyle: Object.assign({}, maskStyle),
|
|
198
210
|
style: Object.assign(Object.assign({}, animationStyle), style)
|
|
199
|
-
}), children) : /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
211
|
+
}), children)) : /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
200
212
|
});
|
|
201
213
|
});
|
|
202
214
|
}
|
|
203
215
|
render() {
|
|
204
216
|
const {
|
|
205
217
|
zIndex,
|
|
206
|
-
getPopupContainer
|
|
218
|
+
getPopupContainer,
|
|
219
|
+
visible
|
|
207
220
|
} = this.props;
|
|
208
|
-
|
|
209
|
-
zIndex
|
|
210
|
-
};
|
|
211
|
-
if (getPopupContainer) {
|
|
212
|
-
wrapperStyle = {
|
|
213
|
-
zIndex,
|
|
214
|
-
position: 'static'
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
return /*#__PURE__*/React.createElement(Portal, {
|
|
218
|
-
getPopupContainer: getPopupContainer,
|
|
219
|
-
style: wrapperStyle
|
|
220
|
-
}, this.renderContent());
|
|
221
|
+
return this.renderContent();
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
SideSheet.contextType = ConfigContext;
|
|
@@ -34,7 +34,7 @@ export interface TagInputProps {
|
|
|
34
34
|
onFocus?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
35
35
|
onInputChange?: (value: string, e: React.MouseEvent<HTMLInputElement>) => void;
|
|
36
36
|
onInputExceed?: ((value: string) => void);
|
|
37
|
-
onKeyDown?: (e: React.
|
|
37
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
38
38
|
onRemove?: (removedValue: string, idx: number) => void;
|
|
39
39
|
placeholder?: string;
|
|
40
40
|
insetLabel?: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.53.
|
|
3
|
+
"version": "2.53.1",
|
|
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.53.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.53.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.53.
|
|
26
|
-
"@douyinfe/semi-icons": "2.53.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.53.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.53.
|
|
23
|
+
"@douyinfe/semi-animation": "2.53.1",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.53.1",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.53.1",
|
|
26
|
+
"@douyinfe/semi-icons": "2.53.1",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.53.1",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.53.1",
|
|
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": "b8b3c530eb1ab45650035ac880a024e8e994248a",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|