@lobehub/ui 1.153.5 → 1.153.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/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: 24,
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
- className: styles.content,
60
+ align: 'flex-start',
61
+ flex: 1,
63
62
  gap: 8,
64
- children: [/*#__PURE__*/_jsx(Flexbox, {
65
- distribution: 'space-between',
66
- horizontal: true,
67
- children: /*#__PURE__*/_jsx("div", {
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
- }), description && /*#__PURE__*/_jsx("div", {
72
- className: styles.desc,
73
- children: description
74
- }), addon]
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
- display: 'none'
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 overflow: hidden;\n\n width: 100%;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.colorTextDescription),
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 overflow: hidden;\n\n width: 100%;\n\n font-size: 16px;\n line-height: 1;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.colorText),
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
  });
@@ -1,7 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { type ModalProps as AntModalProps } from 'antd';
3
+ import { type ActionIconProps } from "../ActionIcon";
3
4
  export type ModalProps = AntModalProps & {
4
5
  allowFullscreen?: boolean;
6
+ closeIconProps?: ActionIconProps;
5
7
  enableResponsive?: boolean;
6
8
  maxHeight?: string | number | false;
7
9
  paddings?: {
package/es/Modal/index.js CHANGED
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
6
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
7
- var _excluded = ["allowFullscreen", "children", "title", "className", "wrapClassName", "width", "onCancel", "open", "destroyOnClose", "paddings", "maxHeight", "enableResponsive", "footer", "styles"],
7
+ var _excluded = ["allowFullscreen", "children", "title", "className", "wrapClassName", "width", "onCancel", "open", "destroyOnClose", "paddings", "maxHeight", "enableResponsive", "closeIconProps", "footer", "styles"],
8
8
  _excluded2 = ["body"];
9
9
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
10
10
  import { Modal as AntModal, ConfigProvider, Drawer } from 'antd';
@@ -48,6 +48,7 @@ var Modal = /*#__PURE__*/memo(function (_ref3) {
48
48
  maxHeight = _ref3$maxHeight === void 0 ? '75dvh' : _ref3$maxHeight,
49
49
  _ref3$enableResponsiv = _ref3.enableResponsive,
50
50
  enableResponsive = _ref3$enableResponsiv === void 0 ? true : _ref3$enableResponsiv,
51
+ closeIconProps = _ref3.closeIconProps,
51
52
  footer = _ref3.footer,
52
53
  _ref3$styles = _ref3.styles,
53
54
  stylesProps = _ref3$styles === void 0 ? {} : _ref3$styles,
@@ -68,9 +69,9 @@ var Modal = /*#__PURE__*/memo(function (_ref3) {
68
69
  restStyles = _objectWithoutProperties(stylesProps, _excluded2);
69
70
  if (enableResponsive && mobile) return /*#__PURE__*/_jsx(Drawer, _objectSpread(_objectSpread({
70
71
  className: cx(styles.drawerContent, className),
71
- closeIcon: /*#__PURE__*/_jsx(ActionIcon, {
72
+ closeIcon: /*#__PURE__*/_jsx(ActionIcon, _objectSpread({
72
73
  icon: X
73
- }),
74
+ }, closeIconProps)),
74
75
  destroyOnClose: destroyOnClose,
75
76
  extra: allowFullscreen && /*#__PURE__*/_jsx(ActionIcon, {
76
77
  icon: fullscreen ? Minimize2 : Maximize2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.153.5",
3
+ "version": "1.153.7",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",