@lobehub/ui 1.153.5 → 1.153.6
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/Hero/index.js +1 -1
- package/es/List/ListItem/index.js +31 -16
- package/es/List/ListItem/style.js +2 -2
- package/package.json +1 -1
package/es/Hero/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var Hero = /*#__PURE__*/memo(function (_ref) {
|
|
|
26
26
|
var ButtonGroups = useCallback(function () {
|
|
27
27
|
return Boolean(actions === null || actions === void 0 ? void 0 : actions.length) && /*#__PURE__*/_jsx(Flexbox, {
|
|
28
28
|
className: styles.actions,
|
|
29
|
-
gap:
|
|
29
|
+
gap: 16,
|
|
30
30
|
horizontal: true,
|
|
31
31
|
justify: 'center',
|
|
32
32
|
children: actions.map(function (_ref2, index) {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["active", "avatar", "loading", "description", "date", "title", "onHoverChange", "actions", "className", "style", "showAction", "children", "classNames", "addon", "pin"];
|
|
6
|
+
import { Typography } from 'antd';
|
|
6
7
|
import { Loader2, MessageSquare } from 'lucide-react';
|
|
7
8
|
import { forwardRef } from 'react';
|
|
8
9
|
import { Flexbox } from 'react-layout-kit';
|
|
@@ -12,6 +13,8 @@ import { getChatItemTime } from "./time";
|
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
|
+
var Title = Typography.Title,
|
|
17
|
+
Paragraph = Typography.Paragraph;
|
|
15
18
|
var ListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
19
|
var active = _ref.active,
|
|
17
20
|
avatar = _ref.avatar,
|
|
@@ -53,25 +56,37 @@ var ListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
53
56
|
children: /*#__PURE__*/_jsx("div", {
|
|
54
57
|
className: styles.triangle
|
|
55
58
|
})
|
|
56
|
-
}), avatar !== null && avatar !== void 0 ? avatar : /*#__PURE__*/_jsx(Icon, {
|
|
57
|
-
icon: MessageSquare,
|
|
58
|
-
style: {
|
|
59
|
-
marginTop: 4
|
|
60
|
-
}
|
|
61
59
|
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
62
|
-
|
|
60
|
+
align: 'flex-start',
|
|
61
|
+
flex: 1,
|
|
63
62
|
gap: 8,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
horizontal: true,
|
|
64
|
+
style: {
|
|
65
|
+
overflow: 'hidden'
|
|
66
|
+
},
|
|
67
|
+
children: [avatar !== null && avatar !== void 0 ? avatar : /*#__PURE__*/_jsx(Icon, {
|
|
68
|
+
icon: MessageSquare,
|
|
69
|
+
style: {
|
|
70
|
+
marginTop: 4
|
|
71
|
+
}
|
|
72
|
+
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
73
|
+
className: styles.content,
|
|
74
|
+
gap: 4,
|
|
75
|
+
children: [/*#__PURE__*/_jsx(Title, {
|
|
68
76
|
className: styles.title,
|
|
77
|
+
ellipsis: {
|
|
78
|
+
rows: 1
|
|
79
|
+
},
|
|
80
|
+
level: 3,
|
|
69
81
|
children: title
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
}), description && /*#__PURE__*/_jsx(Paragraph, {
|
|
83
|
+
className: styles.desc,
|
|
84
|
+
ellipsis: {
|
|
85
|
+
rows: 1
|
|
86
|
+
},
|
|
87
|
+
children: description
|
|
88
|
+
}), addon]
|
|
89
|
+
})]
|
|
75
90
|
}), loading ? /*#__PURE__*/_jsx(Icon, {
|
|
76
91
|
icon: Loader2,
|
|
77
92
|
spin: true
|
|
@@ -91,7 +106,7 @@ var ListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
91
106
|
}), date && /*#__PURE__*/_jsx("div", {
|
|
92
107
|
className: cx(styles.time, classNames === null || classNames === void 0 ? void 0 : classNames.time),
|
|
93
108
|
style: showAction ? {
|
|
94
|
-
|
|
109
|
+
opacity: 0
|
|
95
110
|
} : {},
|
|
96
111
|
children: getChatItemTime(date)
|
|
97
112
|
})]
|
|
@@ -9,10 +9,10 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
9
9
|
active: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n "])), token.colorText, token.colorFillSecondary, token.colorFill),
|
|
10
10
|
container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n position: relative;\n\n color: ", ";\n\n background: transparent;\n\n transition: background-color 200ms ", ";\n\n &:active {\n background-color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n "])), token.colorTextTertiary, token.motionEaseOut, token.colorFillSecondary, token.colorFillTertiary),
|
|
11
11
|
content: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n align-self: center;\n "]))),
|
|
12
|
-
desc: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
|
|
12
|
+
desc: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0 !important;\n\n font-size: 12px;\n line-height: 1.2 !important;\n color: ", ";\n "])), token.colorTextDescription),
|
|
13
13
|
pin: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n inset-block-start: 6px;\n inset-inline-end: 6px;\n "]))),
|
|
14
14
|
time: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextPlaceholder),
|
|
15
|
-
title: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n
|
|
15
|
+
title: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0 !important;\n\n font-size: 14px !important;\n font-weight: 500 !important;\n line-height: 1.2 !important;\n color: ", ";\n "])), token.colorText),
|
|
16
16
|
triangle: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 10px;\n height: 10px;\n\n opacity: 0.5;\n background: ", ";\n clip-path: polygon(0% 0%, 100% 0%, 100% 100%);\n border-radius: 2px;\n "])), token.colorPrimaryBorder)
|
|
17
17
|
};
|
|
18
18
|
});
|