@lobehub/ui 1.160.0 → 1.161.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.
@@ -1,4 +1,4 @@
1
- import { type CSSProperties } from 'react';
1
+ /// <reference types="react" />
2
2
  import { type FlexboxProps } from 'react-layout-kit';
3
3
  import { type IconProps, type IconSizeConfig, type IconSizeType, LucideIconProps } from "../Icon";
4
4
  import { type TooltipProps } from "../Tooltip";
@@ -19,6 +19,7 @@ export interface ActionIconProps extends LucideIconProps, FlexboxProps {
19
19
  * @default false
20
20
  */
21
21
  arrow?: boolean;
22
+ classNames?: TooltipProps['classNames'];
22
23
  disable?: boolean;
23
24
  /**
24
25
  * @description Glass blur style
@@ -30,7 +31,8 @@ export interface ActionIconProps extends LucideIconProps, FlexboxProps {
30
31
  * @description Set the loading status of ActionIcon
31
32
  */
32
33
  loading?: boolean;
33
- overlayStyle?: CSSProperties;
34
+ overlayClassName?: TooltipProps['overlayClassName'];
35
+ overlayStyle?: TooltipProps['overlayStyle'];
34
36
  /**
35
37
  * @description The position of the tooltip relative to the target
36
38
  * @enum ["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]
@@ -48,6 +50,7 @@ export interface ActionIconProps extends LucideIconProps, FlexboxProps {
48
50
  * @default false
49
51
  */
50
52
  spotlight?: boolean;
53
+ styles?: TooltipProps['styles'];
51
54
  /**
52
55
  * @description The text shown in the tooltip
53
56
  */
@@ -3,7 +3,7 @@
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
- var _excluded = ["color", "fill", "className", "active", "icon", "size", "style", "glass", "title", "placement", "arrow", "spotlight", "onClick", "children", "loading", "overlayStyle", "tooltipDelay", "fillOpacity", "fillRule", "focusable", "disable", "spin"];
6
+ var _excluded = ["color", "fill", "className", "active", "icon", "size", "style", "glass", "title", "placement", "arrow", "spotlight", "onClick", "children", "loading", "tooltipDelay", "fillOpacity", "fillRule", "focusable", "disable", "spin", "styles"];
7
7
  import { Loader2 } from 'lucide-react';
8
8
  import { forwardRef, useCallback, useMemo, useState } from 'react';
9
9
  import { Flexbox } from 'react-layout-kit';
@@ -32,7 +32,6 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
32
32
  onClick = _ref.onClick,
33
33
  children = _ref.children,
34
34
  loading = _ref.loading,
35
- overlayStyle = _ref.overlayStyle,
36
35
  _ref$tooltipDelay = _ref.tooltipDelay,
37
36
  tooltipDelay = _ref$tooltipDelay === void 0 ? 0.5 : _ref$tooltipDelay,
38
37
  fillOpacity = _ref.fillOpacity,
@@ -40,12 +39,13 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
40
39
  focusable = _ref.focusable,
41
40
  disable = _ref.disable,
42
41
  iconSpinning = _ref.spin,
42
+ styles = _ref.styles,
43
43
  rest = _objectWithoutProperties(_ref, _excluded);
44
44
  var _useStyles = useStyles({
45
45
  active: Boolean(active),
46
46
  glass: Boolean(glass)
47
47
  }),
48
- styles = _useStyles.styles,
48
+ s = _useStyles.styles,
49
49
  cx = _useStyles.cx;
50
50
  var _useMemo = useMemo(function () {
51
51
  return calcSize(size);
@@ -61,7 +61,7 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
61
61
  size: size === 'site' ? 'normal' : size
62
62
  };
63
63
  var content = icon && /*#__PURE__*/_jsx(Icon, _objectSpread(_objectSpread({
64
- className: styles.icon,
64
+ className: s.icon,
65
65
  icon: icon
66
66
  }, iconProps), {}, {
67
67
  spin: iconSpinning
@@ -82,7 +82,7 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
82
82
  }, [loading, disable, setTooltipOpen, onClick]);
83
83
  var actionIconBlock = /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
84
84
  align: 'center',
85
- className: cx(styles.block, disable ? styles.disabled : styles.normal, className),
85
+ className: cx(s.block, disable ? s.disabled : s.normal, className),
86
86
  horizontal: true,
87
87
  justify: 'center',
88
88
  onClick: handleClick,
@@ -101,10 +101,12 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
101
101
  mouseEnterDelay: tooltipDelay,
102
102
  onOpenChange: setTooltipOpen,
103
103
  open: tooltipOpen,
104
- overlayStyle: _objectSpread({
105
- pointerEvents: 'none'
106
- }, overlayStyle),
107
104
  placement: placement,
105
+ styles: _objectSpread(_objectSpread({}, styles), {}, {
106
+ root: _objectSpread({
107
+ pointerEvents: 'none'
108
+ }, styles === null || styles === void 0 ? void 0 : styles.root)
109
+ }),
108
110
  title: title,
109
111
  children: actionIconBlock
110
112
  });
@@ -17,7 +17,9 @@ var Tooltip = /*#__PURE__*/memo(function (_ref) {
17
17
  cx = _useStyles.cx;
18
18
  return /*#__PURE__*/_jsx(AntdTooltip, _objectSpread({
19
19
  arrow: arrow,
20
- overlayClassName: cx(styles.tooltip, className)
20
+ classNames: {
21
+ root: cx(styles.tooltip, className)
22
+ }
21
23
  }, rest));
22
24
  });
23
25
  export default Tooltip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.160.0",
3
+ "version": "1.161.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -41,6 +41,7 @@
41
41
  "storybook.js"
42
42
  ],
43
43
  "dependencies": {
44
+ "@ant-design/cssinjs": "^1.22.0",
44
45
  "@babel/runtime": "^7.26.0",
45
46
  "@dnd-kit/core": "^6.3.1",
46
47
  "@dnd-kit/modifiers": "^8.0.0",
@@ -50,19 +51,32 @@
50
51
  "@emoji-mart/react": "^1.1.1",
51
52
  "@floating-ui/react": "^0.26.28",
52
53
  "@giscus/react": "^3.1.0",
54
+ "@lobehub/fluent-emoji": "^1.0.0",
53
55
  "@mdx-js/mdx": "^2.3.0",
54
56
  "@mdx-js/react": "^2.3.0",
55
57
  "@radix-ui/react-slot": "^1.1.1",
56
58
  "@shikijs/transformers": "^1.26.1",
59
+ "@splinetool/runtime": "^0.9.0",
60
+ "ahooks": "^3.8.0",
61
+ "antd-style": "^3.7.0",
62
+ "chroma-js": "^3.0.0",
63
+ "class-variance-authority": "^0.7.0",
64
+ "dayjs": "^1.11.0",
57
65
  "emoji-mart": "^5.6.0",
66
+ "fast-deep-equal": "^3.0.0",
58
67
  "immer": "^10.1.1",
59
68
  "leva": "^0.9.35",
69
+ "lodash-es": "^4.0.0",
70
+ "lucide-react": "^0.469.0",
60
71
  "mermaid": "^11.4.1",
61
72
  "numeral": "^2.0.6",
73
+ "polished": "^4.0.0",
74
+ "query-string": "^9.0.0",
62
75
  "rc-footer": "^0.6.8",
63
76
  "re-resizable": "^6.10.3",
64
77
  "react-avatar-editor": "^13.0.2",
65
78
  "react-error-boundary": "^4.1.2",
79
+ "react-layout-kit": "^1.0.0",
66
80
  "react-markdown": "^8.0.7",
67
81
  "react-merge-refs": "^2.1.1",
68
82
  "react-rnd": "^10.4.14",
@@ -72,31 +86,16 @@
72
86
  "remark-gfm": "^3.0.1",
73
87
  "remark-math": "^5.1.1",
74
88
  "shiki": "^1.26.1",
75
- "unified": "^10.1.2"
76
- },
77
- "peerDependencies": {
78
- "@ant-design/cssinjs": "^1.22.0",
79
- "@babel/runtime": "^7.0.0",
80
- "@lobehub/fluent-emoji": "^1.0.0",
81
- "@splinetool/runtime": "^0.9.0",
82
- "ahooks": "^3.8.0",
83
- "antd": "^5.22.0",
84
- "antd-style": "^3.7.0",
85
- "chroma-js": "^3.0.0",
86
- "class-variance-authority": "^0.7.0",
87
- "dayjs": "^1.11.0",
88
- "fast-deep-equal": "^3.0.0",
89
- "lodash-es": "^4.0.0",
90
- "lucide-react": "^0.400.0",
91
- "polished": "^4.0.0",
92
- "query-string": "^9.0.0",
93
- "react": "^18.0.0 || ^19.0.0",
94
- "react-dom": "^18.0.0 || ^19.0.0",
95
- "react-layout-kit": "^1.0.0",
96
89
  "swr": "^2.3.0",
97
90
  "ts-md5": "^1.0.0",
91
+ "unified": "^10.1.2",
98
92
  "url-join": "^5.0.0",
99
93
  "use-merge-value": "^1.2.0",
100
94
  "uuid": "^11.0.0"
95
+ },
96
+ "peerDependencies": {
97
+ "antd": "^5.23.0",
98
+ "react": "^18.0.0 || ^19.0.0",
99
+ "react-dom": "^18.0.0 || ^19.0.0"
101
100
  }
102
101
  }