@arcblock/ux 3.0.39 → 3.0.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.
- package/lib/Layout/dashboard/index.d.ts +2 -0
- package/lib/Layout/dashboard/index.js +33 -32
- package/lib/NavMenu/images/aigne.svg.js +2 -4
- package/lib/NavMenu/images/aistro.png +0 -0
- package/lib/NavMenu/images/did.svg.js +2 -2
- package/lib/NavMenu/index.d.ts +1 -1
- package/lib/NavMenu/products.d.ts +3 -2
- package/lib/NavMenu/products.js +284 -147
- package/lib/NavMenu/style.js +5 -4
- package/lib/NavMenu/sub-item-group.js +7 -1
- package/lib/UserCard/index.js +9 -5
- package/package.json +7 -7
- package/src/Layout/dashboard/index.tsx +4 -1
- package/src/NavMenu/images/aigne.svg +6 -8
- package/src/NavMenu/images/aistro.png +0 -0
- package/src/NavMenu/images/did.svg +5 -3
- package/src/NavMenu/index.ts +1 -1
- package/src/NavMenu/products.tsx +429 -253
- package/src/NavMenu/style.ts +2 -1
- package/src/NavMenu/sub-item-group.tsx +7 -1
- package/src/UserCard/index.tsx +3 -3
- package/lib/NavMenu/images/ai-kit.svg.js +0 -7
- package/lib/NavMenu/images/aistro.svg.js +0 -5
- package/lib/NavMenu/images/did-connect.svg.js +0 -5
- package/lib/NavMenu/images/did-name-service.svg.js +0 -5
- package/src/NavMenu/images/aistro.svg +0 -14
- package/src/NavMenu/images/did-connect.svg +0 -26
- package/src/NavMenu/images/did-name-service.svg +0 -3
@@ -13,6 +13,8 @@ export interface DashboardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
13
|
dense?: 'auto' | boolean;
|
14
14
|
footerProps?: FooterProps;
|
15
15
|
sx?: SxProps;
|
16
|
+
/** 是否隐藏 html title, 默认不隐藏, 避免重复导致 html title 失效 */
|
17
|
+
hideHtmlTitle?: boolean;
|
16
18
|
}
|
17
19
|
export default function DashboardWrapper<T extends boolean = true>({ legacy, ...rest }: T extends true ? {
|
18
20
|
legacy?: T;
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
2
|
-
import { useMemo as
|
3
|
-
import { useLocation as p, matchPath as
|
4
|
-
import
|
5
|
-
import { Box as d, useTheme as
|
6
|
-
import
|
7
|
-
import { CloseFullscreen as
|
8
|
-
import
|
2
|
+
import { useMemo as z, useEffect as b } from "react";
|
3
|
+
import { useLocation as p, matchPath as D } from "react-router-dom";
|
4
|
+
import R from "react-helmet";
|
5
|
+
import { Box as d, useTheme as T, Container as V } from "@mui/material";
|
6
|
+
import B from "clsx";
|
7
|
+
import { CloseFullscreen as U, OpenInFull as E } from "@mui/icons-material";
|
8
|
+
import G from "../dashboard-legacy/index.js";
|
9
9
|
import "../../Header/header.js";
|
10
|
-
import
|
11
|
-
import
|
10
|
+
import O from "../../Header/responsive-header.js";
|
11
|
+
import q from "../../NavMenu/nav-menu.js";
|
12
12
|
import "../../NavMenu/products.js";
|
13
|
-
import
|
13
|
+
import A from "../../Footer/index.js";
|
14
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
|
-
import { FullPageProvider as
|
18
|
-
function
|
17
|
+
import { FullPageProvider as J, useFullPage as K } from "./full-page.js";
|
18
|
+
function Q({ closeMenu: e, ...a }) {
|
19
19
|
const o = p();
|
20
20
|
return b(() => {
|
21
21
|
e();
|
22
|
-
}, [o]), /* @__PURE__ */ r(
|
22
|
+
}, [o]), /* @__PURE__ */ r(q, { ...a });
|
23
23
|
}
|
24
24
|
function g(e, a) {
|
25
25
|
return e.map((o) => o.children?.length ? {
|
@@ -30,10 +30,10 @@ function g(e, a) {
|
|
30
30
|
...o,
|
31
31
|
label: /* @__PURE__ */ r(x, { to: o.url, external: o.external, children: o.title }),
|
32
32
|
// external = true 时 active 状态由传入 links 的调用方决定 (适用于 blocklet ui dashboard 的情况)
|
33
|
-
active: o.external ? o.active : !!
|
33
|
+
active: o.external ? o.active : !!D({ path: o.url, end: !1 }, a.pathname)
|
34
34
|
});
|
35
35
|
}
|
36
|
-
function
|
36
|
+
function X({
|
37
37
|
title: e = "Home",
|
38
38
|
headerProps: a = {},
|
39
39
|
links: o = [],
|
@@ -43,23 +43,24 @@ function Q({
|
|
43
43
|
footerProps: y = {},
|
44
44
|
sx: N = {},
|
45
45
|
children: P,
|
46
|
+
hideHtmlTitle: F = !1,
|
46
47
|
...c
|
47
48
|
}) {
|
48
|
-
const h =
|
49
|
+
const h = T(), { inFullPage: L, showToggleButton: $, headerVisible: C, footerVisible: H, sidebarVisible: W, toggleFullPage: _ } = K(), m = p(), n = z(() => g(o, m), [m, o]), S = n.some((t) => !!t.children?.length), i = l === "auto" ? n.length >= 8 || S : l, j = B("dashboard", { "dashboard-dense": i }, c.className), I = {
|
49
50
|
homeLink: (t) => /* @__PURE__ */ r(x, { to: window.blocklet?.prefix || "/", children: t }),
|
50
51
|
...a
|
51
52
|
};
|
52
53
|
return b(() => {
|
53
54
|
const { searchParams: t } = new URL(window.location.href);
|
54
55
|
t.get("inviter") && window.localStorage.setItem("inviter", t.get("inviter"));
|
55
|
-
}, []), /* @__PURE__ */ s(
|
56
|
-
/* @__PURE__ */ r(
|
57
|
-
|
58
|
-
|
56
|
+
}, []), /* @__PURE__ */ s(Y, { sx: N, ...c, className: j, sidebarWidth: v, children: [
|
57
|
+
!F && /* @__PURE__ */ r(R, { title: e }, e),
|
58
|
+
C && /* @__PURE__ */ r(Z, { ...I, className: "dashboard-header", children: o?.length ? ({ isMobile: t, closeMenu: M }) => t ? /* @__PURE__ */ r(
|
59
|
+
Q,
|
59
60
|
{
|
60
61
|
mode: "inline",
|
61
62
|
items: n,
|
62
|
-
closeMenu:
|
63
|
+
closeMenu: M,
|
63
64
|
bgColor: "transparent",
|
64
65
|
activeTextColor: h.palette.primary.main
|
65
66
|
}
|
@@ -72,7 +73,7 @@ function Q({
|
|
72
73
|
display: "flex"
|
73
74
|
},
|
74
75
|
children: [
|
75
|
-
!!o?.length &&
|
76
|
+
!!o?.length && W && /* @__PURE__ */ r(
|
76
77
|
d,
|
77
78
|
{
|
78
79
|
className: "dashboard-sidebar",
|
@@ -86,7 +87,7 @@ function Q({
|
|
86
87
|
}
|
87
88
|
),
|
88
89
|
/* @__PURE__ */ s(d, { className: "dashboard-main", id: "arc__dashboard-main", children: [
|
89
|
-
|
90
|
+
$ && /* @__PURE__ */ r(
|
90
91
|
d,
|
91
92
|
{
|
92
93
|
sx: {
|
@@ -103,19 +104,19 @@ function Q({
|
|
103
104
|
borderRadius: 1,
|
104
105
|
cursor: "pointer"
|
105
106
|
},
|
106
|
-
onClick:
|
107
|
-
children:
|
107
|
+
onClick: _,
|
108
|
+
children: L ? /* @__PURE__ */ r(U, { style: { fontSize: 18 } }) : /* @__PURE__ */ r(E, { style: { fontSize: 18 } })
|
108
109
|
}
|
109
110
|
),
|
110
|
-
/* @__PURE__ */ r(
|
111
|
-
|
111
|
+
/* @__PURE__ */ r(V, { className: "dashboard-content", id: "arc__dashboard-content", ...w && { maxWidth: !1 }, children: P }),
|
112
|
+
H && /* @__PURE__ */ r(A, { dark: h.palette.mode === "dark", ...y })
|
112
113
|
] })
|
113
114
|
]
|
114
115
|
}
|
115
116
|
)
|
116
117
|
] });
|
117
118
|
}
|
118
|
-
const
|
119
|
+
const Y = u(d)`
|
119
120
|
&.dashboard {
|
120
121
|
display: flex;
|
121
122
|
flex-direction: column;
|
@@ -171,17 +172,17 @@ const X = u(d)`
|
|
171
172
|
}
|
172
173
|
}
|
173
174
|
}
|
174
|
-
`,
|
175
|
+
`, Z = u(O)`
|
175
176
|
.header-container {
|
176
177
|
max-width: 100%;
|
177
178
|
}
|
178
179
|
`;
|
179
|
-
function
|
180
|
+
function xe({
|
180
181
|
legacy: e = !0,
|
181
182
|
...a
|
182
183
|
}) {
|
183
|
-
return e ? /* @__PURE__ */ r(
|
184
|
+
return e ? /* @__PURE__ */ r(G, { ...a }) : /* @__PURE__ */ r(J, { children: /* @__PURE__ */ r(X, { ...a }) });
|
184
185
|
}
|
185
186
|
export {
|
186
|
-
|
187
|
+
xe as default
|
187
188
|
};
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import * as e from "react";
|
2
|
-
const
|
3
|
-
maskType: "luminance"
|
4
|
-
}, maskUnits: "userSpaceOnUse", x: 0, y: 0, width: 120, height: 120 }, /* @__PURE__ */ e.createElement("rect", { width: 119.883, height: 119.883, fill: "white" })), /* @__PURE__ */ e.createElement("g", { mask: "url(#mask0_2456_413)" }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.2632 28.4408H98.4079C102.728 28.4408 106.23 31.943 106.23 36.2632V83.7368C106.23 88.057 102.728 91.5592 98.4079 91.5592H21.2632C16.943 91.5592 13.4408 88.057 13.4408 83.7368V36.2632C13.4408 31.943 16.943 28.4408 21.2632 28.4408ZM4 36.2632C4 26.729 11.729 19 21.2632 19H98.4079C107.942 19 115.671 26.729 115.671 36.2632V83.7368C115.671 93.271 107.942 101 98.4079 101H21.2632C11.729 101 4 93.271 4 83.7368V36.2632ZM50.2836 59.8795C50.2836 67.5608 46.7456 73.7878 42.3812 73.7878C38.0168 73.7878 34.4787 67.5608 34.4787 59.8795C34.4787 52.1981 38.0168 45.9712 42.3812 45.9712C46.7456 45.9712 50.2836 52.1981 50.2836 59.8795ZM85.0609 59.8795C85.0609 67.5608 81.5228 73.7878 77.1584 73.7878C72.794 73.7878 69.256 67.5608 69.256 59.8795C69.256 52.1981 72.794 45.9712 77.1584 45.9712C81.5228 45.9712 85.0609 52.1981 85.0609 59.8795Z", fill: "black" })));
|
2
|
+
const t = (r) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 400 400", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ e.createElement("rect", { x: 73.1603, y: 109.16, width: 253.435, height: 181.679, rx: 36.6412, fill: "none", stroke: "currentColor", strokeWidth: 18.3206 }), /* @__PURE__ */ e.createElement("ellipse", { cx: 164, cy: 199.618, rx: 16.0305, ry: 28.626, fill: "currentColor" }), /* @__PURE__ */ e.createElement("ellipse", { cx: 234.991, cy: 199.618, rx: 16.0305, ry: 28.626, fill: "currentColor" }));
|
5
3
|
export {
|
6
|
-
|
4
|
+
t as default
|
7
5
|
};
|
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as C from "react";
|
2
|
-
const
|
2
|
+
const e = (H) => /* @__PURE__ */ C.createElement("svg", { viewBox: "0 0 90 65", xmlns: "http://www.w3.org/2000/svg", ...H }, /* @__PURE__ */ C.createElement("path", { d: "M79.4248 0.700195C85.1132 0.700234 89.7244 5.31169 89.7246 11V54.2344C89.7244 59.9227 85.1132 64.5341 79.4248 64.5342H11.1562C5.46786 64.5342 0.856682 59.9227 0.856445 54.2344V54.0186H5.45605V54.2344C5.45629 57.3822 8.00837 59.9336 11.1562 59.9336H79.4248C82.5726 59.9336 85.1248 57.3822 85.125 54.2344V11C85.1248 7.8522 82.5727 5.29984 79.4248 5.2998H11.1562C8.00837 5.2998 5.45629 7.85217 5.45605 11V11.4893H0.856445V11C0.856676 5.31166 5.46786 0.700195 11.1562 0.700195H79.4248ZM11.293 17.6914C14.2375 17.6914 16.7876 18.3114 18.9434 19.5508C21.1254 20.762 22.8219 22.4798 24.0312 24.7051C25.2406 26.9304 25.8447 29.5504 25.8447 32.5645C25.8447 35.5502 25.2405 38.1418 24.0312 40.3389C22.8219 42.536 21.1255 44.2399 18.9434 45.4512C16.7875 46.6624 14.2375 47.2686 11.293 47.2686H1V17.6914H11.293ZM35.2061 47.2686H29.8818V17.6914H35.2061V47.2686ZM50.8828 17.6914C53.8272 17.6914 56.3774 18.3114 58.5332 19.5508C60.7151 20.7619 62.4108 22.48 63.6201 24.7051C64.8295 26.9304 65.4346 29.5505 65.4346 32.5645C65.4346 35.5503 64.8295 38.1417 63.6201 40.3389C62.4108 42.5359 60.7152 44.2399 58.5332 45.4512C56.3774 46.6624 53.8272 47.2685 50.8828 47.2686H40.5898V17.6914H50.8828ZM73.4785 36.7568C75.1235 36.7568 76.457 38.0913 76.457 39.7363C76.4568 41.3811 75.1234 42.7148 73.4785 42.7148C71.8338 42.7147 70.5003 41.381 70.5 39.7363C70.5 38.0914 71.8336 36.757 73.4785 36.7568ZM6.32422 42.4941H11.1357C14.1064 42.4941 16.3934 41.6204 17.9971 39.874C19.6008 38.0994 20.4023 35.663 20.4023 32.5645C20.4023 29.4378 19.6008 26.9727 17.9971 25.1699C16.3934 23.3674 14.1063 22.4659 11.1357 22.4658H6.32422V42.4941ZM45.9141 42.4941H50.7246C53.6954 42.4941 55.9832 41.6205 57.5869 39.874C59.1905 38.0994 59.9922 35.6628 59.9922 32.5645C59.9922 29.4378 59.1906 26.9727 57.5869 25.1699C55.9832 23.3672 53.6954 22.4658 50.7246 22.4658H45.9141V42.4941ZM73.4785 22.8574C75.1235 22.8574 76.457 24.1909 76.457 25.8359C76.457 27.4809 75.1235 28.8145 73.4785 28.8145C71.8336 28.8143 70.5 27.4808 70.5 25.8359C70.5 24.191 71.8337 22.8576 73.4785 22.8574Z", fill: "currentColor" }));
|
3
3
|
export {
|
4
|
-
|
4
|
+
e as default
|
5
5
|
};
|
package/lib/NavMenu/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
export { default } from './nav-menu';
|
2
|
-
export { default as Products } from './products';
|
2
|
+
export { default as Products, type ProductsType, type ProductsProps } from './products';
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { BoxProps } from '@mui/material';
|
2
|
+
export type ProductsType = 'AIGNE' | 'ARCBLOCK';
|
2
3
|
export interface ProductsProps extends BoxProps {
|
3
|
-
|
4
|
+
type: ProductsType;
|
4
5
|
}
|
5
|
-
export default function Products({ className,
|
6
|
+
export default function Products({ className, type, ...rest }: ProductsProps): import("react/jsx-runtime").JSX.Element;
|