@lobehub/ui 1.136.1 → 1.136.3
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.
|
@@ -9,6 +9,8 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
9
9
|
var loading = _ref.loading,
|
|
10
10
|
avatar = _ref.avatar,
|
|
11
11
|
placement = _ref.placement,
|
|
12
|
+
_ref$unoptimized = _ref.unoptimized,
|
|
13
|
+
unoptimized = _ref$unoptimized === void 0 ? false : _ref$unoptimized,
|
|
12
14
|
addon = _ref.addon,
|
|
13
15
|
onClick = _ref.onClick,
|
|
14
16
|
_ref$size = _ref.size,
|
|
@@ -25,7 +27,8 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
25
27
|
background: avatar.backgroundColor,
|
|
26
28
|
onClick: onClick,
|
|
27
29
|
size: size,
|
|
28
|
-
title: avatar.title
|
|
30
|
+
title: avatar.title,
|
|
31
|
+
unoptimized: unoptimized
|
|
29
32
|
}), /*#__PURE__*/_jsx(Loading, {
|
|
30
33
|
loading: loading,
|
|
31
34
|
placement: placement
|
package/es/ChatItem/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["avatarAddon", "onAvatarClick", "actions", "className", "primary", "loading", "message", "placement", "type", "avatar", "error", "showTitle", "time", "editing", "onChange", "onEditingChange", "messageExtra", "renderMessage", "text", "errorMessage", "onDoubleClick", "fontSize"];
|
|
5
|
+
var _excluded = ["avatarAddon", "onAvatarClick", "avatarProps", "actions", "className", "primary", "loading", "message", "placement", "type", "avatar", "error", "showTitle", "time", "editing", "onChange", "onEditingChange", "messageExtra", "renderMessage", "text", "errorMessage", "onDoubleClick", "fontSize"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { useResponsive } from 'antd-style';
|
|
@@ -21,6 +21,7 @@ var MOBILE_AVATAR_SIZE = 32;
|
|
|
21
21
|
var ChatItem = /*#__PURE__*/memo(function (_ref) {
|
|
22
22
|
var avatarAddon = _ref.avatarAddon,
|
|
23
23
|
onAvatarClick = _ref.onAvatarClick,
|
|
24
|
+
avatarProps = _ref.avatarProps,
|
|
24
25
|
actions = _ref.actions,
|
|
25
26
|
className = _ref.className,
|
|
26
27
|
primary = _ref.primary,
|
|
@@ -62,14 +63,14 @@ var ChatItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
62
63
|
direction: placement === 'left' ? 'horizontal' : 'horizontal-reverse',
|
|
63
64
|
gap: mobile ? 6 : 12
|
|
64
65
|
}, rest), {}, {
|
|
65
|
-
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
66
|
+
children: [/*#__PURE__*/_jsx(Avatar, _objectSpread(_objectSpread({}, avatarProps), {}, {
|
|
66
67
|
addon: avatarAddon,
|
|
67
68
|
avatar: avatar,
|
|
68
69
|
loading: loading,
|
|
69
70
|
onClick: onAvatarClick,
|
|
70
71
|
placement: placement,
|
|
71
72
|
size: mobile ? MOBILE_AVATAR_SIZE : undefined
|
|
72
|
-
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
73
|
+
})), /*#__PURE__*/_jsxs(Flexbox, {
|
|
73
74
|
align: placement === 'left' ? 'flex-start' : 'flex-end',
|
|
74
75
|
className: styles.messageContainer,
|
|
75
76
|
children: [/*#__PURE__*/_jsx(Title, {
|
package/es/ChatItem/type.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AlertProps } from "../Alert";
|
|
3
|
+
import { AvatarProps } from "../Avatar";
|
|
3
4
|
import { EditableMessageProps } from "../EditableMessage";
|
|
4
5
|
import { DivProps, MetaData } from "../types";
|
|
5
6
|
export interface ChatItemProps {
|
|
@@ -12,6 +13,7 @@ export interface ChatItemProps {
|
|
|
12
13
|
*/
|
|
13
14
|
avatar: MetaData;
|
|
14
15
|
avatarAddon?: ReactNode;
|
|
16
|
+
avatarProps?: AvatarProps;
|
|
15
17
|
/**
|
|
16
18
|
* @description Custom CSS class name for the chat item
|
|
17
19
|
*/
|