@lobehub/ui 1.153.17 → 1.153.18

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.
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
5
5
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
6
6
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
- var _excluded = ["content", "placement", "size", "icon", "glass", "onClick"];
7
+ var _excluded = ["active", "content", "placement", "size", "icon", "glass", "onClick"];
8
8
  import { Check, Copy } from 'lucide-react';
9
9
  import { memo } from 'react';
10
10
  import ActionIcon from "../ActionIcon";
@@ -12,7 +12,8 @@ import { useCopied } from "../hooks/useCopied";
12
12
  import { copyToClipboard } from "../utils/copyToClipboard";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  var CopyButton = /*#__PURE__*/memo(function (_ref) {
15
- var content = _ref.content,
15
+ var active = _ref.active,
16
+ content = _ref.content,
16
17
  _ref$placement = _ref.placement,
17
18
  placement = _ref$placement === void 0 ? 'right' : _ref$placement,
18
19
  _ref$size = _ref.size,
@@ -27,9 +28,12 @@ var CopyButton = /*#__PURE__*/memo(function (_ref) {
27
28
  setCopied = _useCopied.setCopied;
28
29
  var Icon = icon || Copy;
29
30
  return /*#__PURE__*/_jsx(ActionIcon, _objectSpread(_objectSpread({
30
- glass: glass
31
+ glass: glass,
32
+ placement: placement,
33
+ size: size,
34
+ title: 'Copy'
31
35
  }, rest), {}, {
32
- active: copied,
36
+ active: active || copied,
33
37
  icon: copied ? Check : Icon,
34
38
  onClick: ( /*#__PURE__*/function () {
35
39
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
@@ -50,10 +54,7 @@ var CopyButton = /*#__PURE__*/memo(function (_ref) {
50
54
  return function (_x) {
51
55
  return _ref2.apply(this, arguments);
52
56
  };
53
- }()),
54
- placement: placement,
55
- size: size,
56
- title: 'Copy'
57
+ }())
57
58
  }));
58
59
  });
59
60
  export default CopyButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.153.17",
3
+ "version": "1.153.18",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",