@douyinfe/semi-ui 2.54.0-beta.0 → 2.54.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/umd/semi-ui.js +12 -10
- 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/avatar/index.js +8 -8
- package/lib/cjs/avatar/interface.d.ts +1 -1
- package/lib/cjs/typography/base.js +4 -2
- package/lib/cjs/upload/index.d.ts +2 -2
- package/lib/es/avatar/index.js +8 -8
- package/lib/es/avatar/interface.d.ts +1 -1
- package/lib/es/typography/base.js +4 -2
- package/lib/es/upload/index.d.ts +2 -2
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -22975,7 +22975,9 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
22975
22975
|
expandable,
|
|
22976
22976
|
expandText
|
|
22977
22977
|
} = this.getEllipsisOpt();
|
|
22978
|
-
const
|
|
22978
|
+
const canUseCSSEllipsis = this.canUseCSSEllipsis();
|
|
22979
|
+
// If the css is truncated, use isOverflowed to judge. If the css is truncated, use isTruncated to judge.
|
|
22980
|
+
const overflowed = !expanded && (canUseCSSEllipsis ? isOverflowed : isTruncated);
|
|
22979
22981
|
const noExpandText = !expandable && isUndefined_default()(expandText);
|
|
22980
22982
|
const show = noExpandText && overflowed && showTooltip;
|
|
22981
22983
|
if (!show) {
|
|
@@ -23285,7 +23287,7 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
23285
23287
|
newState.isOverflowed = false;
|
|
23286
23288
|
newState.ellipsisContent = props.children;
|
|
23287
23289
|
newState.expanded = false;
|
|
23288
|
-
newState.isTruncated =
|
|
23290
|
+
newState.isTruncated = true;
|
|
23289
23291
|
}
|
|
23290
23292
|
return newState;
|
|
23291
23293
|
}
|
|
@@ -26916,8 +26918,8 @@ class Avatar extends BaseComponent {
|
|
|
26916
26918
|
}
|
|
26917
26919
|
}
|
|
26918
26920
|
render() {
|
|
26919
|
-
var _a
|
|
26920
|
-
const
|
|
26921
|
+
var _a;
|
|
26922
|
+
const _b = this.props,
|
|
26921
26923
|
{
|
|
26922
26924
|
shape,
|
|
26923
26925
|
children,
|
|
@@ -26936,8 +26938,8 @@ class Avatar extends BaseComponent {
|
|
|
26936
26938
|
topSlot,
|
|
26937
26939
|
border,
|
|
26938
26940
|
contentMotion
|
|
26939
|
-
} =
|
|
26940
|
-
others = avatar_rest(
|
|
26941
|
+
} = _b,
|
|
26942
|
+
others = avatar_rest(_b, ["shape", "children", "size", "color", "className", "hoverMask", "onClick", "imgAttr", "src", "srcSet", "style", "alt", "gap", "bottomSlot", "topSlot", "border", "contentMotion"]);
|
|
26941
26943
|
const {
|
|
26942
26944
|
isImgExist,
|
|
26943
26945
|
hoverContent,
|
|
@@ -26967,8 +26969,8 @@ class Avatar extends BaseComponent {
|
|
|
26967
26969
|
}), this.getContent(), hoverRender);
|
|
26968
26970
|
if (border) {
|
|
26969
26971
|
const borderStyle = {};
|
|
26970
|
-
if (border === null || border === void 0 ? void 0 : border.color) {
|
|
26971
|
-
borderStyle['borderColor'] = border.color;
|
|
26972
|
+
if (typeof border === 'object' && (border === null || border === void 0 ? void 0 : border.color)) {
|
|
26973
|
+
borderStyle['borderColor'] = border === null || border === void 0 ? void 0 : border.color;
|
|
26972
26974
|
}
|
|
26973
26975
|
avatar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
26974
26976
|
style: Object.assign({
|
|
@@ -26979,11 +26981,11 @@ class Avatar extends BaseComponent {
|
|
|
26979
26981
|
className: classnames_default()([`${avatar_prefixCls}-additionalBorder`, `${avatar_prefixCls}-additionalBorder-${size}`, {
|
|
26980
26982
|
[`${avatar_prefixCls}-${shape}`]: shape
|
|
26981
26983
|
}])
|
|
26982
|
-
}),
|
|
26984
|
+
}), typeof this.props.border === 'object' && this.props.border.motion && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
26983
26985
|
style: borderStyle,
|
|
26984
26986
|
className: classnames_default()([`${avatar_prefixCls}-additionalBorder`, `${avatar_prefixCls}-additionalBorder-${size}`, {
|
|
26985
26987
|
[`${avatar_prefixCls}-${shape}`]: shape,
|
|
26986
|
-
[`${avatar_prefixCls}-additionalBorder-animated`]: (
|
|
26988
|
+
[`${avatar_prefixCls}-additionalBorder-animated`]: typeof this.props.border === 'object' && ((_a = this.props.border) === null || _a === void 0 ? void 0 : _a.motion)
|
|
26987
26989
|
}])
|
|
26988
26990
|
}));
|
|
26989
26991
|
}
|