@arcblock/ux 3.0.11 → 3.0.13
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,8 +1,8 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
2
|
-
import { useMemo as M, useEffect as
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
2
|
+
import { useMemo as M, useEffect as b } from "react";
|
3
3
|
import { useLocation as p, matchPath as z } from "react-router-dom";
|
4
4
|
import D from "react-helmet";
|
5
|
-
import {
|
5
|
+
import { Box as d, useTheme as R, Container as T } from "@mui/material";
|
6
6
|
import V from "clsx";
|
7
7
|
import { CloseFullscreen as B, OpenInFull as U } from "@mui/icons-material";
|
8
8
|
import E from "../dashboard-legacy/index.js";
|
@@ -11,13 +11,13 @@ import G from "../../Header/responsive-header.js";
|
|
11
11
|
import O from "../../NavMenu/nav-menu.js";
|
12
12
|
import "../../NavMenu/products.js";
|
13
13
|
import q from "../../Footer/index.js";
|
14
|
-
import
|
14
|
+
import f from "./sidebar.js";
|
15
15
|
import { styled as u } from "../../Theme/index.js";
|
16
16
|
import { Link as x } from "./external-link.js";
|
17
17
|
import { FullPageProvider as A, useFullPage as J } from "./full-page.js";
|
18
18
|
function K({ closeMenu: e, ...a }) {
|
19
19
|
const o = p();
|
20
|
-
return
|
20
|
+
return b(() => {
|
21
21
|
e();
|
22
22
|
}, [o]), /* @__PURE__ */ r(O, { ...a });
|
23
23
|
}
|
@@ -43,28 +43,28 @@ function Q({
|
|
43
43
|
footerProps: y = {},
|
44
44
|
sx: N = {},
|
45
45
|
children: P,
|
46
|
-
...
|
46
|
+
...c
|
47
47
|
}) {
|
48
|
-
const
|
48
|
+
const h = R(), { inFullPage: F, showToggleButton: L, headerVisible: $, footerVisible: C, sidebarVisible: H, toggleFullPage: W } = J(), m = p(), n = M(() => g(o, m), [m, o]), _ = n.some((t) => !!t.children?.length), i = l === "auto" ? n.length >= 8 || _ : l, S = V("dashboard", { "dashboard-dense": i }, c.className), j = {
|
49
49
|
homeLink: (t) => /* @__PURE__ */ r(x, { to: window.blocklet?.prefix || "/", children: t }),
|
50
50
|
...a
|
51
51
|
};
|
52
|
-
return
|
52
|
+
return b(() => {
|
53
53
|
const { searchParams: t } = new URL(window.location.href);
|
54
54
|
t.get("inviter") && window.localStorage.setItem("inviter", t.get("inviter"));
|
55
|
-
}, []), /* @__PURE__ */
|
55
|
+
}, []), /* @__PURE__ */ s(X, { sx: N, ...c, className: S, sidebarWidth: v, children: [
|
56
56
|
/* @__PURE__ */ r(D, { title: e }, e),
|
57
|
-
|
57
|
+
$ && /* @__PURE__ */ r(Y, { ...j, className: "dashboard-header", children: o?.length ? ({ isMobile: t, closeMenu: I }) => t ? /* @__PURE__ */ r(
|
58
58
|
K,
|
59
59
|
{
|
60
60
|
mode: "inline",
|
61
|
-
items:
|
61
|
+
items: n,
|
62
62
|
closeMenu: I,
|
63
63
|
bgColor: "transparent",
|
64
|
-
activeTextColor:
|
64
|
+
activeTextColor: h.palette.primary.main
|
65
65
|
}
|
66
66
|
) : null : null }),
|
67
|
-
/* @__PURE__ */
|
67
|
+
/* @__PURE__ */ s(
|
68
68
|
d,
|
69
69
|
{
|
70
70
|
className: "dashboard-body",
|
@@ -72,7 +72,7 @@ function Q({
|
|
72
72
|
display: "flex"
|
73
73
|
},
|
74
74
|
children: [
|
75
|
-
!!o?.length &&
|
75
|
+
!!o?.length && H && /* @__PURE__ */ r(
|
76
76
|
d,
|
77
77
|
{
|
78
78
|
className: "dashboard-sidebar",
|
@@ -82,10 +82,10 @@ function Q({
|
|
82
82
|
md: "block"
|
83
83
|
}
|
84
84
|
},
|
85
|
-
children: i ? /* @__PURE__ */ r(
|
85
|
+
children: i ? /* @__PURE__ */ r(f, { links: o, dense: i }) : /* @__PURE__ */ r(d, { className: "dashboard-sidebar-container", children: /* @__PURE__ */ r(f, { links: o, dense: i }) })
|
86
86
|
}
|
87
87
|
),
|
88
|
-
/* @__PURE__ */
|
88
|
+
/* @__PURE__ */ s(d, { className: "dashboard-main", id: "arc__dashboard-main", children: [
|
89
89
|
L && /* @__PURE__ */ r(
|
90
90
|
d,
|
91
91
|
{
|
@@ -103,21 +103,19 @@ function Q({
|
|
103
103
|
borderRadius: 1,
|
104
104
|
cursor: "pointer"
|
105
105
|
},
|
106
|
-
onClick:
|
106
|
+
onClick: W,
|
107
107
|
children: F ? /* @__PURE__ */ r(B, { style: { fontSize: 18 } }) : /* @__PURE__ */ r(U, { style: { fontSize: 18 } })
|
108
108
|
}
|
109
109
|
),
|
110
110
|
/* @__PURE__ */ r(T, { className: "dashboard-content", id: "arc__dashboard-content", ...w && { maxWidth: !1 }, children: P }),
|
111
|
-
|
111
|
+
C && /* @__PURE__ */ r(q, { dark: h.palette.mode === "dark", ...y })
|
112
112
|
] })
|
113
113
|
]
|
114
114
|
}
|
115
115
|
)
|
116
116
|
] });
|
117
117
|
}
|
118
|
-
const X = u(
|
119
|
-
shouldForwardProp: (e) => e !== "sidebarWidth"
|
120
|
-
})`
|
118
|
+
const X = u(d)`
|
121
119
|
&.dashboard {
|
122
120
|
display: flex;
|
123
121
|
flex-direction: column;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.13",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -60,16 +60,16 @@
|
|
60
60
|
"react": "^19.0.0",
|
61
61
|
"react-router-dom": "^6.22.3"
|
62
62
|
},
|
63
|
-
"gitHead": "
|
63
|
+
"gitHead": "2c404ff0a38e52d197334a035160b5eddf56df07",
|
64
64
|
"dependencies": {
|
65
|
-
"@arcblock/bridge": "3.0.
|
65
|
+
"@arcblock/bridge": "3.0.13",
|
66
66
|
"@arcblock/did": "^1.20.15",
|
67
67
|
"@arcblock/did-motif": "^1.1.13",
|
68
|
-
"@arcblock/icons": "3.0.
|
69
|
-
"@arcblock/nft-display": "3.0.
|
70
|
-
"@arcblock/react-hooks": "3.0.
|
68
|
+
"@arcblock/icons": "3.0.13",
|
69
|
+
"@arcblock/nft-display": "3.0.13",
|
70
|
+
"@arcblock/react-hooks": "3.0.13",
|
71
71
|
"@blocklet/js-sdk": "^1.16.45",
|
72
|
-
"@blocklet/theme": "3.0.
|
72
|
+
"@blocklet/theme": "3.0.13",
|
73
73
|
"@fontsource/roboto": "~5.1.1",
|
74
74
|
"@fontsource/ubuntu-mono": "^5.2.6",
|
75
75
|
"@iconify-icons/logos": "^1.2.36",
|
@@ -177,9 +177,7 @@ function Dashboard({
|
|
177
177
|
|
178
178
|
type WrapperProps = React.HTMLAttributes<HTMLDivElement> & { sidebarWidth: number };
|
179
179
|
|
180
|
-
const Wrapper = styled(
|
181
|
-
shouldForwardProp: (prop) => prop !== 'sidebarWidth',
|
182
|
-
})<WrapperProps>`
|
180
|
+
const Wrapper = styled(Box)<WrapperProps>`
|
183
181
|
&.dashboard {
|
184
182
|
display: flex;
|
185
183
|
flex-direction: column;
|