@lobehub/ui 1.145.6 → 1.145.7
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
|
@@ -2,14 +2,12 @@ import { CSSProperties, ReactNode } from 'react';
|
|
|
2
2
|
import { DivProps } from "../types";
|
|
3
3
|
export interface ChatHeaderProps extends DivProps {
|
|
4
4
|
classNames?: {
|
|
5
|
+
center?: string;
|
|
5
6
|
left?: string;
|
|
6
7
|
right?: string;
|
|
7
8
|
};
|
|
8
|
-
contentStyles?: {
|
|
9
|
-
left?: CSSProperties;
|
|
10
|
-
right?: CSSProperties;
|
|
11
|
-
};
|
|
12
9
|
gap?: {
|
|
10
|
+
center?: number;
|
|
13
11
|
left?: number;
|
|
14
12
|
right?: number;
|
|
15
13
|
};
|
|
@@ -17,6 +15,11 @@ export interface ChatHeaderProps extends DivProps {
|
|
|
17
15
|
onBackClick?: () => void;
|
|
18
16
|
right?: ReactNode;
|
|
19
17
|
showBackButton?: boolean;
|
|
18
|
+
styles?: {
|
|
19
|
+
center?: CSSProperties;
|
|
20
|
+
left?: CSSProperties;
|
|
21
|
+
right?: CSSProperties;
|
|
22
|
+
};
|
|
20
23
|
}
|
|
21
24
|
declare const ChatHeader: import("react").NamedExoticComponent<ChatHeaderProps>;
|
|
22
25
|
export default ChatHeader;
|
package/es/ChatHeader/index.js
CHANGED
|
@@ -12,11 +12,12 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
12
12
|
right = _ref.right,
|
|
13
13
|
className = _ref.className,
|
|
14
14
|
style = _ref.style,
|
|
15
|
-
contentStyles = _ref.
|
|
15
|
+
contentStyles = _ref.styles,
|
|
16
16
|
classNames = _ref.classNames,
|
|
17
17
|
showBackButton = _ref.showBackButton,
|
|
18
18
|
onBackClick = _ref.onBackClick,
|
|
19
|
-
gap = _ref.gap
|
|
19
|
+
gap = _ref.gap,
|
|
20
|
+
children = _ref.children;
|
|
20
21
|
var _useStyles = useStyles(),
|
|
21
22
|
cx = _useStyles.cx,
|
|
22
23
|
styles = _useStyles.styles;
|
|
@@ -45,6 +46,13 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
45
46
|
marginRight: gap !== null && gap !== void 0 && gap.left ? -gap.left / 2 : -6
|
|
46
47
|
}
|
|
47
48
|
}), left]
|
|
49
|
+
}), children && /*#__PURE__*/_jsx(Flexbox, {
|
|
50
|
+
align: 'center',
|
|
51
|
+
className: cx(styles.center, classNames === null || classNames === void 0 ? void 0 : classNames.center),
|
|
52
|
+
gap: (gap === null || gap === void 0 ? void 0 : gap.center) || 12,
|
|
53
|
+
horizontal: true,
|
|
54
|
+
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.center,
|
|
55
|
+
children: children
|
|
48
56
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
49
57
|
align: 'center',
|
|
50
58
|
className: cx(styles.right, classNames === null || classNames === void 0 ? void 0 : classNames.right),
|
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, _templateObject2, _templateObject3;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
import { rgba } from 'polished';
|
|
5
5
|
export var useStyles = createStyles(function (_ref) {
|
|
@@ -8,8 +8,9 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
8
8
|
stylish = _ref.stylish,
|
|
9
9
|
cx = _ref.cx;
|
|
10
10
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
center: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n "]))),
|
|
12
|
+
container: cx(stylish.blurStrong, css(_templateObject2 || (_templateObject2 = _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-block-end: 1px solid ", ";\n "])), rgba(token.colorBgLayout, 0.8), rgba(token.colorBgLayout, 0.4), token.colorBorder)),
|
|
13
|
+
left: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n "]))),
|
|
14
|
+
right: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: none;\n "])))
|
|
14
15
|
};
|
|
15
16
|
});
|