@arcblock/ux 2.10.68 → 2.10.70
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/lib/LoadingMask/index.js +1 -1
- package/lib/NFTDisplay/displayApi.d.ts +2 -1
- package/lib/QRCode/index.js +1 -2
- package/lib/SessionBlocklet/index.js +2 -1
- package/lib/Success/index.js +6 -3
- package/lib/Util/index.d.ts +6 -2
- package/lib/Util/index.js +16 -3
- package/package.json +5 -5
- package/src/LoadingMask/index.tsx +1 -1
- package/src/QRCode/index.tsx +1 -2
- package/src/SessionBlocklet/index.tsx +1 -0
- package/src/Success/index.tsx +6 -3
- package/src/Util/index.ts +12 -1
package/lib/LoadingMask/index.js
CHANGED
@@ -12,7 +12,7 @@ export default function LoadingMask({
|
|
12
12
|
const finialSize = size;
|
13
13
|
const finialRadius = borderRadius ?? finialSize / 8;
|
14
14
|
const finialBorderWidth = borderWidth ?? finialSize / 32;
|
15
|
-
const finialPadding = padding ?? finialSize * 0.
|
15
|
+
const finialPadding = padding ?? finialSize * 0.25 - finialBorderWidth;
|
16
16
|
const finialDuration = duration ?? 2.5;
|
17
17
|
return /*#__PURE__*/_jsxs(Box, {
|
18
18
|
sx: {
|
package/lib/QRCode/index.js
CHANGED
@@ -49,8 +49,7 @@ function QRCode({
|
|
49
49
|
useEffect(() => {
|
50
50
|
if (!qrCode) return;
|
51
51
|
qrCode.update(options);
|
52
|
-
|
53
|
-
}, [data, size, image, config]);
|
52
|
+
}, [options, qrCode]);
|
54
53
|
return /*#__PURE__*/_jsx(Box, {
|
55
54
|
ref: ref,
|
56
55
|
...rest
|
@@ -117,7 +117,8 @@ export default function SessionBlocklet({
|
|
117
117
|
width: 50,
|
118
118
|
height: 50,
|
119
119
|
objectFit: 'contain'
|
120
|
-
}
|
120
|
+
},
|
121
|
+
alt: "SessionBlocklet component icon"
|
121
122
|
}) : /*#__PURE__*/_jsx(Icon, {
|
122
123
|
fontSize: 50,
|
123
124
|
icon: item.icon || WidgetsOutlineRoundedIcon,
|
package/lib/Success/index.js
CHANGED
@@ -17,7 +17,8 @@ export default function Success({
|
|
17
17
|
'&, *, *::before, *::after': {
|
18
18
|
boxSizing: 'content-box !important'
|
19
19
|
},
|
20
|
-
|
20
|
+
// 转圈边框的颜色
|
21
|
+
border: theme => `${borderWidth}px solid ${theme.palette.success.light}`,
|
21
22
|
'&::before, &::after': {
|
22
23
|
content: '""',
|
23
24
|
height: '125%',
|
@@ -42,7 +43,8 @@ export default function Success({
|
|
42
43
|
},
|
43
44
|
'.icon-line': {
|
44
45
|
height: `${borderWidth + 1}px`,
|
45
|
-
|
46
|
+
// 对勾的颜色
|
47
|
+
backgroundColor: theme => theme.palette.success.light,
|
46
48
|
display: 'block',
|
47
49
|
borderRadius: '100vw',
|
48
50
|
position: 'absolute',
|
@@ -143,7 +145,8 @@ export default function Success({
|
|
143
145
|
borderRadius: '100%',
|
144
146
|
position: 'absolute',
|
145
147
|
boxSizing: 'contentBox',
|
146
|
-
|
148
|
+
// 圆环的颜色
|
149
|
+
border: `${borderWidth}px solid rgba(76, 175, 80, 0.63)`
|
147
150
|
}
|
148
151
|
}), /*#__PURE__*/_jsx(Box, {
|
149
152
|
className: "icon-fix",
|
package/lib/Util/index.d.ts
CHANGED
@@ -47,13 +47,17 @@ export declare function formatToDatetime(date: string, { locale, tz }?: {
|
|
47
47
|
tz?: string;
|
48
48
|
}): any;
|
49
49
|
export declare function detectWalletExtension(): any;
|
50
|
-
export declare function openWebWallet({ webWalletUrl, action, locale, url, windowFeatures, }: {
|
50
|
+
export declare function openWebWallet({ webWalletUrl, action, locale, url, windowFeatures, appInfo, memberAppInfo, }: {
|
51
51
|
webWalletUrl: string;
|
52
52
|
action?: string;
|
53
53
|
locale?: Locale;
|
54
54
|
url: string;
|
55
55
|
windowFeatures: $TSFixMe;
|
56
|
-
|
56
|
+
appInfo: $TSFixMe;
|
57
|
+
memberAppInfo: $TSFixMe;
|
58
|
+
}): {
|
59
|
+
type: string;
|
60
|
+
};
|
57
61
|
export declare const getFontSize: (size: string) => string;
|
58
62
|
export declare const isEthereumDid: (did: string) => boolean;
|
59
63
|
export declare const appendParams: (url: string, params: {
|
package/lib/Util/index.js
CHANGED
@@ -195,7 +195,9 @@ export function openWebWallet({
|
|
195
195
|
action = 'login',
|
196
196
|
locale = 'en',
|
197
197
|
url,
|
198
|
-
windowFeatures
|
198
|
+
windowFeatures,
|
199
|
+
appInfo,
|
200
|
+
memberAppInfo
|
199
201
|
}) {
|
200
202
|
// web wallet extension
|
201
203
|
const extension = detectWalletExtension();
|
@@ -203,9 +205,17 @@ export function openWebWallet({
|
|
203
205
|
extension.open({
|
204
206
|
action,
|
205
207
|
locale,
|
206
|
-
url: encodeURIComponent(url)
|
208
|
+
url: encodeURIComponent(url),
|
209
|
+
appInfo: {
|
210
|
+
...appInfo
|
211
|
+
},
|
212
|
+
memberAppInfo: {
|
213
|
+
...memberAppInfo
|
214
|
+
}
|
207
215
|
});
|
208
|
-
return
|
216
|
+
return {
|
217
|
+
type: 'extension'
|
218
|
+
};
|
209
219
|
}
|
210
220
|
const defaultWindowFeatures = {
|
211
221
|
toolbar: 'no',
|
@@ -235,6 +245,9 @@ export function openWebWallet({
|
|
235
245
|
}
|
236
246
|
const strWindowFeatures = Object.keys(mergedWindowFeatures).map(key => `${key}=${mergedWindowFeatures[key]}`).join(',');
|
237
247
|
window.open(windowUrl, 'targetWindow', strWindowFeatures);
|
248
|
+
return {
|
249
|
+
type: 'web'
|
250
|
+
};
|
238
251
|
}
|
239
252
|
export const getFontSize = size => {
|
240
253
|
// 12px 及以上的 size 有效, 否则返回 inherit
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.10.
|
3
|
+
"version": "2.10.70",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -67,12 +67,12 @@
|
|
67
67
|
"react": ">=18.2.0",
|
68
68
|
"react-router-dom": ">=6.22.3"
|
69
69
|
},
|
70
|
-
"gitHead": "
|
70
|
+
"gitHead": "59a8b91d34af3a62d9f720c626f3279384a467c2",
|
71
71
|
"dependencies": {
|
72
72
|
"@arcblock/did-motif": "^1.1.13",
|
73
|
-
"@arcblock/icons": "^2.10.
|
74
|
-
"@arcblock/nft-display": "^2.10.
|
75
|
-
"@arcblock/react-hooks": "^2.10.
|
73
|
+
"@arcblock/icons": "^2.10.70",
|
74
|
+
"@arcblock/nft-display": "^2.10.70",
|
75
|
+
"@arcblock/react-hooks": "^2.10.70",
|
76
76
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
77
77
|
"@fontsource/inter": "^5.0.16",
|
78
78
|
"@fontsource/ubuntu-mono": "^5.0.18",
|
@@ -22,7 +22,7 @@ export default function LoadingMask({
|
|
22
22
|
const finialSize = size;
|
23
23
|
const finialRadius = borderRadius ?? finialSize / 8;
|
24
24
|
const finialBorderWidth = borderWidth ?? finialSize / 32;
|
25
|
-
const finialPadding = padding ?? finialSize * 0.
|
25
|
+
const finialPadding = padding ?? finialSize * 0.25 - finialBorderWidth;
|
26
26
|
const finialDuration = duration ?? 2.5;
|
27
27
|
return (
|
28
28
|
<Box
|
package/src/QRCode/index.tsx
CHANGED
@@ -58,8 +58,7 @@ function QRCode({ data, size, image, config = {}, ...rest }: QRCodeProps) {
|
|
58
58
|
useEffect(() => {
|
59
59
|
if (!qrCode) return;
|
60
60
|
qrCode.update(options);
|
61
|
-
|
62
|
-
}, [data, size, image, config]);
|
61
|
+
}, [options, qrCode]);
|
63
62
|
|
64
63
|
return <Box ref={ref} {...rest} />;
|
65
64
|
}
|
package/src/Success/index.tsx
CHANGED
@@ -21,7 +21,8 @@ export default function Success({ size = 64, backgroundColor = 'white', borderWi
|
|
21
21
|
'&, *, *::before, *::after': {
|
22
22
|
boxSizing: 'content-box !important',
|
23
23
|
},
|
24
|
-
|
24
|
+
// 转圈边框的颜色
|
25
|
+
border: (theme) => `${borderWidth}px solid ${theme.palette.success.light}`,
|
25
26
|
'&::before, &::after': {
|
26
27
|
content: '""',
|
27
28
|
height: '125%',
|
@@ -46,7 +47,8 @@ export default function Success({ size = 64, backgroundColor = 'white', borderWi
|
|
46
47
|
},
|
47
48
|
'.icon-line': {
|
48
49
|
height: `${borderWidth + 1}px`,
|
49
|
-
|
50
|
+
// 对勾的颜色
|
51
|
+
backgroundColor: (theme) => theme.palette.success.light,
|
50
52
|
display: 'block',
|
51
53
|
borderRadius: '100vw',
|
52
54
|
position: 'absolute',
|
@@ -149,7 +151,8 @@ export default function Success({ size = 64, backgroundColor = 'white', borderWi
|
|
149
151
|
borderRadius: '100%',
|
150
152
|
position: 'absolute',
|
151
153
|
boxSizing: 'contentBox',
|
152
|
-
|
154
|
+
// 圆环的颜色
|
155
|
+
border: `${borderWidth}px solid rgba(76, 175, 80, 0.63)`,
|
153
156
|
}}
|
154
157
|
/>
|
155
158
|
<Box
|
package/src/Util/index.ts
CHANGED
@@ -241,12 +241,16 @@ export function openWebWallet({
|
|
241
241
|
locale = 'en',
|
242
242
|
url,
|
243
243
|
windowFeatures,
|
244
|
+
appInfo,
|
245
|
+
memberAppInfo,
|
244
246
|
}: {
|
245
247
|
webWalletUrl: string;
|
246
248
|
action?: string;
|
247
249
|
locale?: Locale;
|
248
250
|
url: string;
|
249
251
|
windowFeatures: $TSFixMe;
|
252
|
+
appInfo: $TSFixMe;
|
253
|
+
memberAppInfo: $TSFixMe;
|
250
254
|
}) {
|
251
255
|
// web wallet extension
|
252
256
|
const extension = detectWalletExtension();
|
@@ -255,9 +259,15 @@ export function openWebWallet({
|
|
255
259
|
action,
|
256
260
|
locale,
|
257
261
|
url: encodeURIComponent(url),
|
262
|
+
appInfo: {
|
263
|
+
...appInfo,
|
264
|
+
},
|
265
|
+
memberAppInfo: {
|
266
|
+
...memberAppInfo,
|
267
|
+
},
|
258
268
|
});
|
259
269
|
|
260
|
-
return;
|
270
|
+
return { type: 'extension' };
|
261
271
|
}
|
262
272
|
|
263
273
|
const defaultWindowFeatures = {
|
@@ -290,6 +300,7 @@ export function openWebWallet({
|
|
290
300
|
.map((key) => `${key}=${mergedWindowFeatures[key]}`)
|
291
301
|
.join(',');
|
292
302
|
window.open(windowUrl, 'targetWindow', strWindowFeatures);
|
303
|
+
return { type: 'web' };
|
293
304
|
}
|
294
305
|
|
295
306
|
export const getFontSize = (size: string) => {
|