@lobehub/ui 2.5.2 → 2.5.4

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/Text/Text.js CHANGED
@@ -112,13 +112,14 @@ var Text = /*#__PURE__*/memo(function (_ref) {
112
112
 
113
113
  // 处理带有 tooltip 的省略
114
114
  if (ellipsis) {
115
+ var title = typeof ellipsis === 'string' ? ellipsis : children;
115
116
  if (_typeof(ellipsis) === 'object') return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
116
- title: content
117
+ title: title
117
118
  }, ellipsis), {}, {
118
119
  children: content
119
120
  }));
120
121
  return /*#__PURE__*/_jsx(Tooltip, {
121
- title: content,
122
+ title: title,
122
123
  children: content
123
124
  });
124
125
  }
package/es/Text/styles.js CHANGED
@@ -21,10 +21,10 @@ export var useStyles = createStyles(function (_ref) {
21
21
  italic: css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-style: italic;\n "]))),
22
22
  mark: css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n color: #000;\n background-color: ", ";\n "])), token.yellow),
23
23
  p: css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-block: 0;\n "]))),
24
- secondary: css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextSecondary),
24
+ secondary: css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextDescription),
25
25
  strong: css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n font-weight: bold;\n "]))),
26
26
  success: css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorSuccess),
27
- text: css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n "])), token.fontSize, token.lineHeight),
27
+ text: css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorText),
28
28
  underline: css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n text-decoration: underline;\n "]))),
29
29
  warning: css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorWarning)
30
30
  };
package/es/Text/type.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ElementType, ReactNode, Ref } from 'react';
1
+ import type { ElementType, Ref } from 'react';
2
2
  import type { TooltipProps } from "../Tooltip";
3
3
  import { DivProps } from "../types";
4
4
  export interface TextProps extends DivProps {
@@ -9,7 +9,7 @@ export interface TextProps extends DivProps {
9
9
  disabled?: boolean;
10
10
  ellipsis?: boolean | {
11
11
  rows?: number;
12
- tooltip?: ReactNode | TooltipProps;
12
+ tooltip?: boolean | string | TooltipProps;
13
13
  };
14
14
  fontSize?: number | string;
15
15
  italic?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.5.2",
3
+ "version": "2.5.4",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",