@arcblock/ux 2.12.8 → 2.12.9
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,10 +1,11 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import '@fontsource/ubuntu-mono/400.css';
|
3
|
-
import { Check as CheckIcon
|
3
|
+
import { Check as CheckIcon } from '@mui/icons-material';
|
4
4
|
import { Box, Tooltip } from '@mui/material';
|
5
5
|
import { green } from '@mui/material/colors';
|
6
6
|
import copy from 'copy-to-clipboard';
|
7
7
|
import noop from 'lodash/noop';
|
8
|
+
import CopyIcon from '@arcblock/icons/lib/Copy';
|
8
9
|
import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
9
10
|
import { styled } from '../Theme';
|
10
11
|
import { getFontSize } from '../Util';
|
@@ -97,6 +98,8 @@ const DidAddress = /*#__PURE__*/forwardRef((props, ref) => {
|
|
97
98
|
/* title prop 直接加在 icon 上不生效 */
|
98
99
|
_jsx(CopyIcon, {
|
99
100
|
className: "did-address-copy",
|
101
|
+
width: 16,
|
102
|
+
height: 16,
|
100
103
|
onClick: onCopy
|
101
104
|
})
|
102
105
|
});
|
@@ -9,5 +9,6 @@ export interface RelativeTimeProps {
|
|
9
9
|
type?: 'relative' | 'absolute';
|
10
10
|
tz?: string;
|
11
11
|
relativeRange?: number;
|
12
|
+
enableTooltip?: boolean;
|
12
13
|
}
|
13
|
-
export default function RelativeTime({ value, locale, withoutSuffix, from, to, type, tz, relativeRange, ...rest }: RelativeTimeProps): "-" | import("react/jsx-runtime").JSX.Element;
|
14
|
+
export default function RelativeTime({ value, locale, withoutSuffix, from, to, type, tz, relativeRange, enableTooltip, ...rest }: RelativeTimeProps): "-" | import("react/jsx-runtime").JSX.Element;
|
@@ -42,6 +42,7 @@ export default function RelativeTime({
|
|
42
42
|
type = 'relative',
|
43
43
|
tz,
|
44
44
|
relativeRange,
|
45
|
+
enableTooltip = true,
|
45
46
|
...rest
|
46
47
|
}) {
|
47
48
|
if (!value) {
|
@@ -77,7 +78,7 @@ export default function RelativeTime({
|
|
77
78
|
popContent = relativeString;
|
78
79
|
}
|
79
80
|
return /*#__PURE__*/_jsx(Tooltip, {
|
80
|
-
title: popContent,
|
81
|
+
title: enableTooltip ? popContent : undefined,
|
81
82
|
placement: "top-end",
|
82
83
|
enterTouchDelay: 0,
|
83
84
|
children: /*#__PURE__*/_jsx("span", {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.12.
|
3
|
+
"version": "2.12.9",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -68,12 +68,12 @@
|
|
68
68
|
"react": ">=18.2.0",
|
69
69
|
"react-router-dom": ">=6.22.3"
|
70
70
|
},
|
71
|
-
"gitHead": "
|
71
|
+
"gitHead": "70e427c9ce212734adf54b38890880ec28856d37",
|
72
72
|
"dependencies": {
|
73
73
|
"@arcblock/did-motif": "^1.1.13",
|
74
|
-
"@arcblock/icons": "^2.12.
|
75
|
-
"@arcblock/nft-display": "^2.12.
|
76
|
-
"@arcblock/react-hooks": "^2.12.
|
74
|
+
"@arcblock/icons": "^2.12.9",
|
75
|
+
"@arcblock/nft-display": "^2.12.9",
|
76
|
+
"@arcblock/react-hooks": "^2.12.9",
|
77
77
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
78
78
|
"@fontsource/inter": "^5.0.16",
|
79
79
|
"@fontsource/ubuntu-mono": "^5.0.18",
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import '@fontsource/ubuntu-mono/400.css';
|
2
|
-
import { Check as CheckIcon
|
2
|
+
import { Check as CheckIcon } from '@mui/icons-material';
|
3
3
|
import { Box, BoxProps, Tooltip } from '@mui/material';
|
4
4
|
import { green } from '@mui/material/colors';
|
5
5
|
import copy from 'copy-to-clipboard';
|
6
6
|
import noop from 'lodash/noop';
|
7
|
+
import CopyIcon from '@arcblock/icons/lib/Copy';
|
7
8
|
import React, { forwardRef, ReactNode, useImperativeHandle, useRef, useState } from 'react';
|
8
9
|
import { styled } from '../Theme';
|
9
10
|
import { getFontSize } from '../Util';
|
@@ -119,7 +120,7 @@ const DidAddress = forwardRef<HTMLDidAddressElement, IDidAddressProps>((props, r
|
|
119
120
|
</Tooltip>
|
120
121
|
) : (
|
121
122
|
/* title prop 直接加在 icon 上不生效 */
|
122
|
-
<CopyIcon className="did-address-copy" onClick={onCopy} />
|
123
|
+
<CopyIcon className="did-address-copy" width={16} height={16} onClick={onCopy} />
|
123
124
|
)}
|
124
125
|
</span>
|
125
126
|
);
|
@@ -44,6 +44,7 @@ export interface RelativeTimeProps {
|
|
44
44
|
type?: 'relative' | 'absolute';
|
45
45
|
tz?: string;
|
46
46
|
relativeRange?: number;
|
47
|
+
enableTooltip?: boolean;
|
47
48
|
}
|
48
49
|
|
49
50
|
export default function RelativeTime({
|
@@ -55,6 +56,7 @@ export default function RelativeTime({
|
|
55
56
|
type = 'relative',
|
56
57
|
tz,
|
57
58
|
relativeRange,
|
59
|
+
enableTooltip = true,
|
58
60
|
...rest
|
59
61
|
}: RelativeTimeProps) {
|
60
62
|
if (!value) {
|
@@ -96,7 +98,7 @@ export default function RelativeTime({
|
|
96
98
|
}
|
97
99
|
|
98
100
|
return (
|
99
|
-
<Tooltip title={popContent} placement="top-end" enterTouchDelay={0}>
|
101
|
+
<Tooltip title={enableTooltip ? popContent : undefined} placement="top-end" enterTouchDelay={0}>
|
100
102
|
<span {...rest}>{innerContent}</span>
|
101
103
|
</Tooltip>
|
102
104
|
);
|