@blocklet/ui-react 2.10.10 → 2.10.11

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.
@@ -214,95 +214,109 @@ export default function UserCenter({
214
214
  ) });
215
215
  }
216
216
  return /* @__PURE__ */ jsxs(Fragment, { children: [
217
- /* @__PURE__ */ jsxs(Box, { sx: { flex: 1, overflow: "hidden" }, children: [
218
- userState?.data?.fullName ? /* @__PURE__ */ jsx(
219
- Typography,
220
- {
221
- variant: "h4",
222
- sx: {
223
- py: 1.5,
224
- fontWeight: 700,
225
- display: {
226
- xs: "none",
227
- md: "block"
228
- }
229
- },
230
- children: userState.data.fullName
231
- }
232
- ) : null,
233
- /* @__PURE__ */ jsx(
234
- UserBasicInfo,
235
- {
236
- isMyself,
237
- switchPassport: session.switchPassport,
238
- switchProfile: session.switchProfile,
239
- openSettings,
240
- user: userState.data,
241
- showFullDid: false,
242
- sx: {
243
- display: {
244
- md: "none",
245
- xs: "block"
217
+ /* @__PURE__ */ jsxs(
218
+ Box,
219
+ {
220
+ sx: [
221
+ {
222
+ flex: {
223
+ xs: "revert",
224
+ md: 1
246
225
  },
247
- mb: 1.5
226
+ overflow: "hidden"
248
227
  }
249
- }
250
- ),
251
- userCenterTabs.length > 0 && currentTab ? /* @__PURE__ */ jsxs(
252
- Box,
253
- {
254
- sx: {
255
- overflow: "auto",
256
- padding: "1px"
257
- },
258
- children: [
259
- /* @__PURE__ */ jsx(
260
- Tabs,
261
- {
262
- variant: "line",
263
- tabs: userCenterTabs,
264
- current: currentTab,
265
- onChange: handleChangeTab,
266
- sx: { mb: 1.5 }
267
- }
268
- ),
269
- !privacyState.data || privacyState.loading ? /* @__PURE__ */ jsx(
270
- Box,
271
- {
272
- sx: {
273
- height: "100%",
274
- minWidth: "160px",
275
- minHeight: "160px",
276
- display: "flex",
277
- justifyContent: "center",
278
- alignItems: "center"
228
+ ],
229
+ children: [
230
+ userState?.data?.fullName ? /* @__PURE__ */ jsx(
231
+ Typography,
232
+ {
233
+ variant: "h4",
234
+ sx: {
235
+ py: 1.5,
236
+ fontWeight: 700,
237
+ display: {
238
+ xs: "none",
239
+ md: "block"
240
+ }
241
+ },
242
+ children: userState.data.fullName
243
+ }
244
+ ) : null,
245
+ /* @__PURE__ */ jsx(
246
+ UserBasicInfo,
247
+ {
248
+ isMyself,
249
+ switchPassport: session.switchPassport,
250
+ switchProfile: session.switchProfile,
251
+ openSettings,
252
+ user: userState.data,
253
+ showFullDid: false,
254
+ sx: {
255
+ display: {
256
+ md: "none",
257
+ xs: "block"
279
258
  },
280
- children: /* @__PURE__ */ jsx(CircularProgress, { sx: { color: colors.primary100 } })
259
+ mb: 1.5
281
260
  }
282
- ) : (
283
- // eslint-disable-next-line react/jsx-no-useless-fragment
284
- /* @__PURE__ */ jsx(Fragment, { children: currentActiveTab?.protected && !isMyself ? /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Empty, { children: t("underProtected") }) }) : (
285
- // eslint-disable-next-line react/jsx-no-useless-fragment
286
- /* @__PURE__ */ jsx(Fragment, { children: children && /* @__PURE__ */ jsx(Box, { ...contentProps, children }) })
287
- ) })
288
- )
289
- ]
290
- }
291
- ) : null,
292
- userCenterTabs.length === 0 ? /* @__PURE__ */ jsx(
293
- Box,
294
- {
295
- sx: {
296
- display: {
297
- xs: isMyself ? "none" : "block",
298
- md: "block"
299
- },
300
- py: 3
301
- },
302
- children: /* @__PURE__ */ jsx(Empty, { children: t("emptyContent") })
303
- }
304
- ) : null
305
- ] }),
261
+ }
262
+ ),
263
+ userCenterTabs.length > 0 && currentTab ? /* @__PURE__ */ jsxs(
264
+ Box,
265
+ {
266
+ sx: {
267
+ overflow: "auto",
268
+ padding: "1px"
269
+ },
270
+ children: [
271
+ /* @__PURE__ */ jsx(
272
+ Tabs,
273
+ {
274
+ variant: "line",
275
+ tabs: userCenterTabs,
276
+ current: currentTab,
277
+ onChange: handleChangeTab,
278
+ sx: { mb: 1.5 }
279
+ }
280
+ ),
281
+ !privacyState.data || privacyState.loading ? /* @__PURE__ */ jsx(
282
+ Box,
283
+ {
284
+ sx: {
285
+ height: "100%",
286
+ minWidth: "160px",
287
+ minHeight: "160px",
288
+ display: "flex",
289
+ justifyContent: "center",
290
+ alignItems: "center"
291
+ },
292
+ children: /* @__PURE__ */ jsx(CircularProgress, { sx: { color: colors.primary100 } })
293
+ }
294
+ ) : (
295
+ // eslint-disable-next-line react/jsx-no-useless-fragment
296
+ /* @__PURE__ */ jsx(Fragment, { children: currentActiveTab?.protected && !isMyself ? /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Empty, { children: t("underProtected") }) }) : (
297
+ // eslint-disable-next-line react/jsx-no-useless-fragment
298
+ /* @__PURE__ */ jsx(Fragment, { children: children && /* @__PURE__ */ jsx(Box, { ...contentProps, children }) })
299
+ ) })
300
+ )
301
+ ]
302
+ }
303
+ ) : null,
304
+ userCenterTabs.length === 0 ? /* @__PURE__ */ jsx(
305
+ Box,
306
+ {
307
+ sx: {
308
+ display: {
309
+ xs: isMyself ? "none" : "block",
310
+ md: "block"
311
+ },
312
+ py: 3
313
+ },
314
+ children: /* @__PURE__ */ jsx(Empty, { children: t("emptyContent") })
315
+ }
316
+ ) : null
317
+ ]
318
+ }
319
+ ),
306
320
  /* @__PURE__ */ jsx(
307
321
  Box,
308
322
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.10.10",
3
+ "version": "2.10.11",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -32,8 +32,8 @@
32
32
  "url": "https://github.com/ArcBlock/ux/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@arcblock/bridge": "^2.10.10",
36
- "@arcblock/react-hooks": "^2.10.10",
35
+ "@arcblock/bridge": "^2.10.11",
36
+ "@arcblock/react-hooks": "^2.10.11",
37
37
  "@iconify-icons/logos": "^1.2.36",
38
38
  "@iconify-icons/material-symbols": "^1.2.58",
39
39
  "@iconify/react": "^4.1.1",
@@ -79,5 +79,5 @@
79
79
  "jest": "^28.1.3",
80
80
  "unbuild": "^2.0.0"
81
81
  },
82
- "gitHead": "3b93639a24f046a147807a3c7574d6406a2e0516"
82
+ "gitHead": "5804454b8b91ce5e812fed2fa65961fd5cfb0cfd"
83
83
  }
@@ -261,7 +261,16 @@ export default function UserCenter({
261
261
 
262
262
  return (
263
263
  <>
264
- <Box sx={{ flex: 1, overflow: 'hidden' }}>
264
+ <Box
265
+ sx={[
266
+ {
267
+ flex: {
268
+ xs: 'revert',
269
+ md: 1,
270
+ },
271
+ overflow: 'hidden',
272
+ },
273
+ ]}>
265
274
  {userState?.data?.fullName ? (
266
275
  <Typography
267
276
  variant="h4"