@arcblock/ux 2.10.68 → 2.10.69

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.
@@ -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.2 - finialBorderWidth;
15
+ const finialPadding = padding ?? finialSize * 0.25 - finialBorderWidth;
16
16
  const finialDuration = duration ?? 2.5;
17
17
  return /*#__PURE__*/_jsxs(Box, {
18
18
  sx: {
@@ -49,8 +49,7 @@ function QRCode({
49
49
  useEffect(() => {
50
50
  if (!qrCode) return;
51
51
  qrCode.update(options);
52
- // eslint-disable-next-line react-hooks/exhaustive-deps
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,
@@ -17,7 +17,8 @@ export default function Success({
17
17
  '&, *, *::before, *::after': {
18
18
  boxSizing: 'content-box !important'
19
19
  },
20
- border: theme => `${borderWidth}px solid ${theme.palette.success.main}`,
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
- backgroundColor: theme => theme.palette.success.main,
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
- border: `${borderWidth}px solid rgba(76, 175, 80, 0.5)`
148
+ // 圆环的颜色
149
+ border: `${borderWidth}px solid rgba(76, 175, 80, 0.63)`
147
150
  }
148
151
  }), /*#__PURE__*/_jsx(Box, {
149
152
  className: "icon-fix",
@@ -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
- }): void;
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.68",
3
+ "version": "2.10.69",
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": "abe3ae3ba176e5429ca94d3309ef99ed9544f39e",
70
+ "gitHead": "4b3b22a5487469fdbd2abd68c0bb74cb06a68bd9",
71
71
  "dependencies": {
72
72
  "@arcblock/did-motif": "^1.1.13",
73
- "@arcblock/icons": "^2.10.68",
74
- "@arcblock/nft-display": "^2.10.68",
75
- "@arcblock/react-hooks": "^2.10.68",
73
+ "@arcblock/icons": "^2.10.69",
74
+ "@arcblock/nft-display": "^2.10.69",
75
+ "@arcblock/react-hooks": "^2.10.69",
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.2 - finialBorderWidth;
25
+ const finialPadding = padding ?? finialSize * 0.25 - finialBorderWidth;
26
26
  const finialDuration = duration ?? 2.5;
27
27
  return (
28
28
  <Box
@@ -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
- // eslint-disable-next-line react-hooks/exhaustive-deps
62
- }, [data, size, image, config]);
61
+ }, [options, qrCode]);
63
62
 
64
63
  return <Box ref={ref} {...rest} />;
65
64
  }
@@ -126,6 +126,7 @@ export default function SessionBlocklet({ session, locale = 'zh', size = 24 }: S
126
126
  height: 50,
127
127
  objectFit: 'contain',
128
128
  }}
129
+ alt="SessionBlocklet component icon"
129
130
  />
130
131
  ) : (
131
132
  <Icon
@@ -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
- border: (theme) => `${borderWidth}px solid ${theme.palette.success.main}`,
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
- backgroundColor: (theme) => theme.palette.success.main,
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
- border: `${borderWidth}px solid rgba(76, 175, 80, 0.5)`,
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) => {