@lobehub/ui 1.66.0 → 1.68.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/es/ChatHeader/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { DivProps } from "../types";
|
|
3
3
|
export interface ChatHeaderProps extends DivProps {
|
|
4
|
+
classNames?: {
|
|
5
|
+
left?: string;
|
|
6
|
+
right?: string;
|
|
7
|
+
};
|
|
8
|
+
contentStyles?: {
|
|
9
|
+
left?: CSSProperties;
|
|
10
|
+
right?: CSSProperties;
|
|
11
|
+
};
|
|
4
12
|
gap?: {
|
|
5
13
|
left?: number;
|
|
6
14
|
right?: number;
|
package/es/ChatHeader/index.js
CHANGED
|
@@ -10,6 +10,8 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
10
10
|
right = _ref.right,
|
|
11
11
|
className = _ref.className,
|
|
12
12
|
style = _ref.style,
|
|
13
|
+
contentStyles = _ref.contentStyles,
|
|
14
|
+
classNames = _ref.classNames,
|
|
13
15
|
showBackButton = _ref.showBackButton,
|
|
14
16
|
onBackClick = _ref.onBackClick,
|
|
15
17
|
gap = _ref.gap;
|
|
@@ -25,8 +27,10 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
25
27
|
style: style,
|
|
26
28
|
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
27
29
|
align: 'center',
|
|
30
|
+
className: cx(styles.left, classNames === null || classNames === void 0 ? void 0 : classNames.left),
|
|
28
31
|
gap: (gap === null || gap === void 0 ? void 0 : gap.left) || 12,
|
|
29
32
|
horizontal: true,
|
|
33
|
+
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.left,
|
|
30
34
|
children: [showBackButton && /*#__PURE__*/_jsx(ActionIcon, {
|
|
31
35
|
icon: ChevronLeft,
|
|
32
36
|
onClick: function onClick() {
|
|
@@ -41,8 +45,10 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
41
45
|
}), left]
|
|
42
46
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
43
47
|
align: 'center',
|
|
48
|
+
className: cx(styles.right, classNames === null || classNames === void 0 ? void 0 : classNames.right),
|
|
44
49
|
gap: (gap === null || gap === void 0 ? void 0 : gap.right) || 8,
|
|
45
50
|
horizontal: true,
|
|
51
|
+
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.right,
|
|
46
52
|
children: right
|
|
47
53
|
})]
|
|
48
54
|
});
|
package/es/ChatHeader/style.d.ts
CHANGED
package/es/ChatHeader/style.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
import { rgba } from 'polished';
|
|
5
5
|
export var useStyles = createStyles(function (_ref) {
|
|
@@ -8,6 +8,8 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
8
8
|
stylish = _ref.stylish,
|
|
9
9
|
cx = _ref.cx;
|
|
10
10
|
return {
|
|
11
|
-
container: cx(stylish.blurStrong, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n\n grid-area: header;\n align-self: stretch;\n\n width: 100%;\n height: 64px;\n\n background: linear-gradient(\n to bottom,\n ", ",\n ", "\n );\n border-bottom: 1px solid ", ";\n "])), rgba(token.colorBgLayout, 0.8), rgba(token.colorBgLayout, 0.4), token.colorBorder))
|
|
11
|
+
container: cx(stylish.blurStrong, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n\n overflow: hidden;\n grid-area: header;\n align-self: stretch;\n\n width: 100%;\n height: 64px;\n\n background: linear-gradient(\n to bottom,\n ", ",\n ", "\n );\n border-bottom: 1px solid ", ";\n "])), rgba(token.colorBgLayout, 0.8), rgba(token.colorBgLayout, 0.4), token.colorBorder)),
|
|
12
|
+
left: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n "]))),
|
|
13
|
+
right: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: none;\n "])))
|
|
12
14
|
};
|
|
13
15
|
});
|
package/es/ChatList/index.js
CHANGED
|
@@ -41,12 +41,8 @@ var ChatList = /*#__PURE__*/memo(function (_ref) {
|
|
|
41
41
|
text: text,
|
|
42
42
|
type: type
|
|
43
43
|
}, item);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
key: key
|
|
47
|
-
}, props));
|
|
48
|
-
}
|
|
49
|
-
return /*#__PURE__*/_jsx(Item, _objectSpread({}, props), key);
|
|
44
|
+
var Render = renderItem && renderItem[item.role] ? renderItem[item.role] : Item;
|
|
45
|
+
return /*#__PURE__*/_jsx(Render, _objectSpread({}, props), key);
|
|
50
46
|
})
|
|
51
47
|
}));
|
|
52
48
|
});
|