@lobehub/ui 1.38.3 → 1.38.5

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/README.md CHANGED
@@ -53,7 +53,7 @@ This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908
53
53
  To install Lobe UI, run the following command:
54
54
 
55
55
  ```bash
56
- pnpm add @lobehub/ui
56
+ pnpm i -S @lobehub/ui
57
57
  ```
58
58
 
59
59
  <div align="right">
@@ -33,10 +33,6 @@ export interface ActionIconProps extends DivProps {
33
33
  * @description Set the loading status of ActionIcon
34
34
  */
35
35
  loading?: boolean;
36
- /**
37
- * @description Handle click action
38
- */
39
- onClick?: () => void;
40
36
  /**
41
37
  * @description The position of the tooltip relative to the target
42
38
  * @enum ["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]
@@ -58,5 +54,5 @@ export interface ActionIconProps extends DivProps {
58
54
  */
59
55
  title?: string;
60
56
  }
61
- declare const ActionIcon: import("react").NamedExoticComponent<ActionIconProps>;
57
+ declare const ActionIcon: import("react").ForwardRefExoticComponent<ActionIconProps & import("react").RefAttributes<HTMLDivElement>>;
62
58
  export default ActionIcon;
@@ -4,7 +4,7 @@ var _excluded = ["className", "active", "icon", "size", "style", "glass", "title
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import { Loader2 } from 'lucide-react';
7
- import { memo, useMemo } from 'react';
7
+ import { forwardRef, useMemo } from 'react';
8
8
  import Icon from "../Icon";
9
9
  import Spotlight from "../Spotlight";
10
10
  import Tooltip from "../Tooltip";
@@ -52,7 +52,7 @@ var calcSize = function calcSize(size) {
52
52
  borderRadius: borderRadius
53
53
  };
54
54
  };
55
- var ActionIcon = /*#__PURE__*/memo(function (_ref) {
55
+ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
56
56
  var className = _ref.className,
57
57
  active = _ref.active,
58
58
  icon = _ref.icon,
@@ -94,6 +94,7 @@ var ActionIcon = /*#__PURE__*/memo(function (_ref) {
94
94
  var actionIconBlock = /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
95
95
  className: cx(styles.block, className),
96
96
  onClick: loading ? undefined : onClick,
97
+ ref: ref,
97
98
  style: _objectSpread({
98
99
  borderRadius: borderRadius,
99
100
  height: blockSize,
@@ -26,18 +26,10 @@ var ThemeProvider = /*#__PURE__*/memo(function (_ref) {
26
26
  });
27
27
  }, []);
28
28
  var stylish = useCallback(function (theme) {
29
- var stylish = {};
30
- if (customStylish) {
31
- stylish = customStylish(theme);
32
- }
33
- return _objectSpread(_objectSpread({}, lobeCustomStylish(theme)), stylish);
29
+ return _objectSpread(_objectSpread({}, lobeCustomStylish(theme)), customStylish === null || customStylish === void 0 ? void 0 : customStylish(theme));
34
30
  }, [customStylish]);
35
31
  var token = useCallback(function (theme) {
36
- var token = {};
37
- if (customToken) {
38
- token = customToken(theme);
39
- }
40
- return _objectSpread(_objectSpread({}, lobeCustomToken(theme)), token);
32
+ return _objectSpread(_objectSpread({}, lobeCustomToken(theme)), customToken === null || customToken === void 0 ? void 0 : customToken(theme));
41
33
  }, [customToken]);
42
34
  return /*#__PURE__*/_jsxs(_Fragment, {
43
35
  children: [enableWebfonts && (webfonts === null || webfonts === void 0 ? void 0 : webfonts.length) > 0 && webfonts.map(function (webfont, index) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.38.3",
3
+ "version": "1.38.5",
4
4
  "description": "Lobe UI is an open-source UI component library for building chatbot web apps",
5
5
  "keywords": [
6
6
  "lobehub",