@blocklet/ui-react 3.1.41 → 3.1.42

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,12 +1,12 @@
1
1
  import { jsxs as l, jsx as r, Fragment as T } from "react/jsx-runtime";
2
- import { Box as c, Typography as y, Divider as F, IconButton as K, Collapse as W } from "@mui/material";
2
+ import { Box as s, Typography as y, Divider as F, IconButton as K, Collapse as W } from "@mui/material";
3
3
  import O from "@arcblock/ux/lib/Avatar";
4
4
  import Q from "@arcblock/ux/lib/DID";
5
5
  import { useMemoizedFn as V } from "ahooks";
6
6
  import { translate as Y } from "@arcblock/ux/lib/Locale/util";
7
7
  import { useLocaleContext as $ } from "@arcblock/ux/lib/Locale/context";
8
8
  import q from "lodash/noop";
9
- import { useState as C, useEffect as z } from "react";
9
+ import { useState as z, useEffect as C } from "react";
10
10
  import j from "@arcblock/ux/lib/Toast";
11
11
  import { parseURL as G, joinURL as H } from "ufo";
12
12
  import { KeyboardArrowUp as J, KeyboardArrowDown as X } from "@mui/icons-material";
@@ -26,17 +26,17 @@ function Rt({
26
26
  switchPassport: A,
27
27
  switchProfile: L,
28
28
  isMobile: a = !1,
29
- onlyProfile: s = !1,
29
+ onlyProfile: c = !1,
30
30
  refreshProfile: u,
31
31
  isShowSocialActions: k = !1,
32
32
  ...m
33
33
  }) {
34
- const { locale: h } = $(), [x, g] = C(void 0), v = V((i, e = {}) => Y(Z, i, h, "en", e)), [d, w] = C(!a || s);
35
- z(() => {
34
+ const { locale: h } = $(), [x, g] = z(void 0), v = V((i, e = {}) => Y(Z, i, h, "en", e)), [d, w] = z(!a || c);
35
+ C(() => {
36
36
  g(t?.metadata?.status);
37
- }, [t]), z(() => {
38
- w(!a || s);
39
- }, [a, s]);
37
+ }, [t]), C(() => {
38
+ w(!a || c);
39
+ }, [a, c]);
40
40
  const D = async (i) => {
41
41
  if (o)
42
42
  try {
@@ -79,7 +79,7 @@ function Rt({
79
79
  }
80
80
  };
81
81
  return /* @__PURE__ */ l(
82
- c,
82
+ s,
83
83
  {
84
84
  ...m,
85
85
  sx: {
@@ -88,7 +88,7 @@ function Rt({
88
88
  },
89
89
  children: [
90
90
  /* @__PURE__ */ l(
91
- c,
91
+ s,
92
92
  {
93
93
  className: "user-info",
94
94
  sx: {
@@ -98,7 +98,7 @@ function Rt({
98
98
  },
99
99
  children: [
100
100
  /* @__PURE__ */ l(
101
- c,
101
+ s,
102
102
  {
103
103
  className: "user-avatar",
104
104
  sx: {
@@ -158,7 +158,7 @@ function Rt({
158
158
  }
159
159
  ),
160
160
  /* @__PURE__ */ l(
161
- c,
161
+ s,
162
162
  {
163
163
  sx: {
164
164
  flex: 1,
@@ -195,19 +195,30 @@ function Rt({
195
195
  ]
196
196
  }
197
197
  ),
198
- /* @__PURE__ */ r(Q, { did: t.did, showQrcode: !0, copyable: !0, compact: !f, responsive: !f, locale: h })
198
+ /* @__PURE__ */ r(
199
+ Q,
200
+ {
201
+ did: t.did,
202
+ size: 16,
203
+ showQrcode: !0,
204
+ copyable: !0,
205
+ compact: !f,
206
+ responsive: !f,
207
+ locale: h
208
+ }
209
+ )
199
210
  ]
200
211
  }
201
212
  )
202
213
  ]
203
214
  }
204
215
  ),
205
- !o && k ? /* @__PURE__ */ r(c, { sx: { mt: 2 }, children: /* @__PURE__ */ r(nt, { user: t }) }) : null,
216
+ !o && k ? /* @__PURE__ */ r(s, { sx: { mt: 2 }, children: /* @__PURE__ */ r(nt, { user: t }) }) : null,
206
217
  /* @__PURE__ */ r(et, { isMobile: a, isMyself: o, user: t, onSave: E }),
207
218
  o ? /* @__PURE__ */ l(T, { children: [
208
219
  /* @__PURE__ */ r(F, { sx: { my: a ? 1 : 3 } }),
209
- a && !s ? /* @__PURE__ */ r(
210
- c,
220
+ a && !c ? /* @__PURE__ */ r(
221
+ s,
211
222
  {
212
223
  sx: {
213
224
  display: "flex",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "3.1.41",
3
+ "version": "3.1.42",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -35,9 +35,9 @@
35
35
  "dependencies": {
36
36
  "@abtnode/constant": "^1.16.49-beta-20250823-082650-626c1473",
37
37
  "@abtnode/util": "^1.16.49-beta-20250823-082650-626c1473",
38
- "@arcblock/bridge": "3.1.41",
39
- "@arcblock/icons": "3.1.41",
40
- "@arcblock/react-hooks": "3.1.41",
38
+ "@arcblock/bridge": "3.1.42",
39
+ "@arcblock/icons": "3.1.42",
40
+ "@arcblock/react-hooks": "3.1.42",
41
41
  "@arcblock/ws": "^1.21.3",
42
42
  "@blocklet/constant": "^1.16.49-beta-20250823-082650-626c1473",
43
43
  "@blocklet/did-space-react": "^1.1.16",
@@ -83,7 +83,7 @@
83
83
  "access": "public"
84
84
  },
85
85
  "devDependencies": {
86
- "@arcblock/did-connect-react": "3.1.41",
86
+ "@arcblock/did-connect-react": "3.1.42",
87
87
  "@types/dompurify": "^3.2.0",
88
88
  "@types/ua-parser-js": "^0.7.39",
89
89
  "@types/validator": "^13.15.2",
@@ -91,5 +91,5 @@
91
91
  "jest": "^29.7.0",
92
92
  "unbuild": "^2.0.0"
93
93
  },
94
- "gitHead": "21979ee3abb716f0201960abe9c85d8f0a8f291c"
94
+ "gitHead": "747490bf0ea403cb53f961ae64f0544a75c13703"
95
95
  }
@@ -233,7 +233,15 @@ export default function UserBasicInfo({
233
233
  </span>
234
234
  {isMyself ? <SwitchRole user={user} switchPassport={switchPassport} /> : null}
235
235
  </Typography>
236
- <DID did={user.did} showQrcode copyable compact={!showFullDid} responsive={!showFullDid} locale={locale} />
236
+ <DID
237
+ did={user.did}
238
+ size={16}
239
+ showQrcode
240
+ copyable
241
+ compact={!showFullDid}
242
+ responsive={!showFullDid}
243
+ locale={locale}
244
+ />
237
245
  </Box>
238
246
  </Box>
239
247
  {!isMyself && isShowSocialActions ? (