@blocklet/ui-react 2.4.21 → 2.4.22

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.
@@ -11,8 +11,6 @@ var _context = require("@arcblock/ux/lib/Locale/context");
11
11
 
12
12
  var _dashboard = _interopRequireDefault(require("@arcblock/ux/lib/Layout/dashboard"));
13
13
 
14
- var _ClickToCopy = _interopRequireDefault(require("@arcblock/ux/lib/ClickToCopy"));
15
-
16
14
  var _Address = _interopRequireDefault(require("@arcblock/did-connect/lib/Address"));
17
15
 
18
16
  var _Avatar = _interopRequireDefault(require("@arcblock/did-connect/lib/Avatar"));
@@ -100,22 +98,19 @@ function Dashboard(_ref) {
100
98
  }, rest), {}, {
101
99
  headerProps: _objectSpread({
102
100
  brand: appName,
103
- description: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickToCopy.default, {
104
- unstyled: true,
105
- content: did,
106
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Address.default, {
107
- compact: true,
108
- responsive: false,
109
- copyable: false,
110
- prepend: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
111
- did: did,
112
- size: 16,
113
- style: {
114
- marginRight: 4
115
- }
116
- }),
117
- children: did
118
- })
101
+ description: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Address.default, {
102
+ compact: true,
103
+ responsive: false,
104
+ copyable: false,
105
+ showCopyButtonInTooltip: true,
106
+ prepend: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
107
+ did: did,
108
+ size: 16,
109
+ style: {
110
+ marginRight: 4
111
+ }
112
+ }),
113
+ children: did
119
114
  }),
120
115
  logo: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
121
116
  href: _blocklets.publicPath,
@@ -216,6 +216,7 @@ function Header(_ref) {
216
216
  compact: true,
217
217
  responsive: false,
218
218
  copyable: false,
219
+ showCopyButtonInTooltip: true,
219
220
  prepend: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
220
221
  did: did,
221
222
  size: 16,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.4.21",
3
+ "version": "2.4.22",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -30,8 +30,8 @@
30
30
  "url": "https://github.com/ArcBlock/ux/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@arcblock/did-connect": "^2.4.21",
34
- "@arcblock/ux": "^2.4.21",
33
+ "@arcblock/did-connect": "^2.4.22",
34
+ "@arcblock/ux": "^2.4.22",
35
35
  "@emotion/react": "^11.10.0",
36
36
  "@emotion/styled": "^11.10.0",
37
37
  "@iconify/iconify": "^2.2.1",
@@ -53,5 +53,5 @@
53
53
  "eslint-plugin-react-hooks": "^4.6.0",
54
54
  "jest": "^28.1.3"
55
55
  },
56
- "gitHead": "5989f403515c81eaaa1c1b459b1d79daf8cca317"
56
+ "gitHead": "a8e5f9c2a89b99064c6a085b6cc1a3042095ecf4"
57
57
  }
@@ -1,7 +1,6 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
3
3
  import UxDashboard from '@arcblock/ux/lib/Layout/dashboard';
4
- import ClickToCopy from '@arcblock/ux/lib/ClickToCopy';
5
4
  import DidAddress from '@arcblock/did-connect/lib/Address';
6
5
  import DidAvatar from '@arcblock/did-connect/lib/Avatar';
7
6
  import { blockletMetaProps } from '../types';
@@ -58,15 +57,14 @@ function Dashboard({ meta, ...rest }) {
58
57
  headerProps={{
59
58
  brand: appName,
60
59
  description: (
61
- <ClickToCopy unstyled content={did}>
62
- <DidAddress
63
- compact
64
- responsive={false}
65
- copyable={false}
66
- prepend={<DidAvatar did={did} size={16} style={{ marginRight: 4 }} />}>
67
- {did}
68
- </DidAddress>
69
- </ClickToCopy>
60
+ <DidAddress
61
+ compact
62
+ responsive={false}
63
+ copyable={false}
64
+ showCopyButtonInTooltip
65
+ prepend={<DidAvatar did={did} size={16} style={{ marginRight: 4 }} />}>
66
+ {did}
67
+ </DidAddress>
70
68
  ),
71
69
  logo: (
72
70
  <a href={publicPath}>
@@ -132,6 +132,7 @@ function Header({ meta, addons, sessionManagerProps, homeLink, theme: themeOverr
132
132
  compact
133
133
  responsive={false}
134
134
  copyable={false}
135
+ showCopyButtonInTooltip
135
136
  prepend={<DidAvatar did={did} size={16} style={{ marginRight: 4 }} />}>
136
137
  {did}
137
138
  </DidAddress>