@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
package/dist/umd/semi-ui.js
CHANGED
|
@@ -22792,13 +22792,17 @@ class ReactResizeObserver extends BaseComponent {
|
|
|
22792
22792
|
ref.current = node;
|
|
22793
22793
|
}
|
|
22794
22794
|
};
|
|
22795
|
-
|
|
22795
|
+
if (globalThis['ResizeObserver']) {
|
|
22796
|
+
this.observer = new ResizeObserver(this.handleResizeEventTriggered);
|
|
22797
|
+
}
|
|
22796
22798
|
}
|
|
22797
22799
|
componentDidMount() {
|
|
22798
|
-
|
|
22800
|
+
var _a;
|
|
22801
|
+
(_a = this.observeElement) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
22799
22802
|
}
|
|
22800
22803
|
componentDidUpdate(prevProps) {
|
|
22801
|
-
|
|
22804
|
+
var _a;
|
|
22805
|
+
(_a = this.observeElement) === null || _a === void 0 ? void 0 : _a.call(this, this.props.observeParent !== prevProps.observeParent);
|
|
22802
22806
|
}
|
|
22803
22807
|
componentWillUnmount() {
|
|
22804
22808
|
if (this.observer) {
|
|
@@ -28188,7 +28192,7 @@ const badge_constants_cssClasses = {
|
|
|
28188
28192
|
PREFIX: `${BASE_CLASS_PREFIX}-badge`
|
|
28189
28193
|
};
|
|
28190
28194
|
const badge_constants_strings = {
|
|
28191
|
-
TYPE_SET: ['primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
28195
|
+
TYPE_SET: ['success', 'primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
28192
28196
|
THEME_SET: ['solid', 'light', 'inverted'],
|
|
28193
28197
|
POS_SET: ['leftTop', 'leftBottom', 'rightTop', 'rightBottom']
|
|
28194
28198
|
};
|
|
@@ -36439,7 +36443,7 @@ function util_traverseDataNodes(treeNodes, callback) {
|
|
|
36439
36443
|
let item = null;
|
|
36440
36444
|
// Process node if is not root
|
|
36441
36445
|
if (node) {
|
|
36442
|
-
const key = parent ? `${parent.key}${constants_VALUE_SPLIT}${node.value}` : node.value
|
|
36446
|
+
const key = parent ? `${parent.key}${constants_VALUE_SPLIT}${node.value}` : `${node.value}`;
|
|
36443
36447
|
const pos = parent ? util_getPosition(parent.pos, ind) : `${ind}`;
|
|
36444
36448
|
item = {
|
|
36445
36449
|
data: Object.assign({}, node),
|
|
@@ -75240,6 +75244,15 @@ class SideSheet extends BaseComponent {
|
|
|
75240
75244
|
keepDOM
|
|
75241
75245
|
} = _a,
|
|
75242
75246
|
props = sideSheet_rest(_a, ["placement", "className", "children", "width", "height", "motion", "visible", "style", "maskStyle", "size", "zIndex", "getPopupContainer", "keepDOM"]);
|
|
75247
|
+
let wrapperStyle = {
|
|
75248
|
+
zIndex
|
|
75249
|
+
};
|
|
75250
|
+
if (getPopupContainer) {
|
|
75251
|
+
wrapperStyle = {
|
|
75252
|
+
zIndex,
|
|
75253
|
+
position: 'static'
|
|
75254
|
+
};
|
|
75255
|
+
}
|
|
75243
75256
|
const {
|
|
75244
75257
|
direction
|
|
75245
75258
|
} = this.context;
|
|
@@ -75288,35 +75301,27 @@ class SideSheet extends BaseComponent {
|
|
|
75288
75301
|
animationStyle,
|
|
75289
75302
|
animationEventsNeedBind
|
|
75290
75303
|
} = _ref2;
|
|
75291
|
-
return shouldRender ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(
|
|
75304
|
+
return shouldRender ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_portal, {
|
|
75305
|
+
getPopupContainer: getPopupContainer,
|
|
75306
|
+
style: wrapperStyle
|
|
75307
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(SideSheetContent, Object.assign({}, contentProps, {
|
|
75292
75308
|
maskExtraProps: maskAnimationEventsNeedBind,
|
|
75293
75309
|
wrapperExtraProps: animationEventsNeedBind,
|
|
75294
75310
|
dialogClassName: animationClassName,
|
|
75295
75311
|
maskClassName: maskAnimationClassName,
|
|
75296
75312
|
maskStyle: Object.assign({}, maskStyle),
|
|
75297
75313
|
style: Object.assign(Object.assign({}, animationStyle), style)
|
|
75298
|
-
}), children) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null);
|
|
75314
|
+
}), children)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null);
|
|
75299
75315
|
});
|
|
75300
75316
|
});
|
|
75301
75317
|
}
|
|
75302
75318
|
render() {
|
|
75303
75319
|
const {
|
|
75304
75320
|
zIndex,
|
|
75305
|
-
getPopupContainer
|
|
75321
|
+
getPopupContainer,
|
|
75322
|
+
visible
|
|
75306
75323
|
} = this.props;
|
|
75307
|
-
|
|
75308
|
-
zIndex
|
|
75309
|
-
};
|
|
75310
|
-
if (getPopupContainer) {
|
|
75311
|
-
wrapperStyle = {
|
|
75312
|
-
zIndex,
|
|
75313
|
-
position: 'static'
|
|
75314
|
-
};
|
|
75315
|
-
}
|
|
75316
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_portal, {
|
|
75317
|
-
getPopupContainer: getPopupContainer,
|
|
75318
|
-
style: wrapperStyle
|
|
75319
|
-
}, this.renderContent());
|
|
75324
|
+
return this.renderContent();
|
|
75320
75325
|
}
|
|
75321
75326
|
}
|
|
75322
75327
|
SideSheet.contextType = context;
|
|
@@ -85878,11 +85883,16 @@ class TimePickerFoundation extends foundation {
|
|
|
85878
85883
|
__prevTimeZone
|
|
85879
85884
|
} = props;
|
|
85880
85885
|
let dates = this.parseValue(value);
|
|
85881
|
-
|
|
85886
|
+
let invalid = dates.some(d => isNaN(Number(d)));
|
|
85882
85887
|
if (!invalid) {
|
|
85883
85888
|
if (this.isValidTimeZone(timeZone)) {
|
|
85884
85889
|
dates = dates.map(date => utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
|
|
85885
85890
|
}
|
|
85891
|
+
invalid = dates.some(d => this.isDisabledHMS({
|
|
85892
|
+
hours: d.getHours(),
|
|
85893
|
+
minutes: d.getMinutes(),
|
|
85894
|
+
seconds: d.getSeconds()
|
|
85895
|
+
}));
|
|
85886
85896
|
}
|
|
85887
85897
|
const inputValue = this.formatValue(dates);
|
|
85888
85898
|
this.setState({
|