@arcblock/ux 3.0.38 → 3.0.41

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.
@@ -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 M, useEffect as b } from "react";
3
- import { useLocation as p, matchPath as z } from "react-router-dom";
4
- import D from "react-helmet";
5
- import { Box as d, useTheme as R, Container as T } from "@mui/material";
6
- import V from "clsx";
7
- import { CloseFullscreen as B, OpenInFull as U } from "@mui/icons-material";
8
- import E from "../dashboard-legacy/index.js";
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 G from "../../Header/responsive-header.js";
11
- import O from "../../NavMenu/nav-menu.js";
10
+ import O from "../../Header/responsive-header.js";
11
+ import q from "../../NavMenu/nav-menu.js";
12
12
  import "../../NavMenu/products.js";
13
- import q from "../../Footer/index.js";
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 A, useFullPage as J } from "./full-page.js";
18
- function K({ closeMenu: e, ...a }) {
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(O, { ...a });
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 : !!z({ path: o.url, end: !1 }, a.pathname)
33
+ active: o.external ? o.active : !!D({ path: o.url, end: !1 }, a.pathname)
34
34
  });
35
35
  }
36
- function Q({
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 = 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
+ 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(X, { sx: N, ...c, className: S, sidebarWidth: v, children: [
56
- /* @__PURE__ */ r(D, { title: e }, e),
57
- $ && /* @__PURE__ */ r(Y, { ...j, className: "dashboard-header", children: o?.length ? ({ isMobile: t, closeMenu: I }) => t ? /* @__PURE__ */ r(
58
- K,
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: I,
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 && H && /* @__PURE__ */ r(
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
- L && /* @__PURE__ */ r(
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: W,
107
- children: F ? /* @__PURE__ */ r(B, { style: { fontSize: 18 } }) : /* @__PURE__ */ r(U, { style: { fontSize: 18 } })
107
+ onClick: _,
108
+ children: L ? /* @__PURE__ */ r(U, { style: { fontSize: 18 } }) : /* @__PURE__ */ r(E, { style: { fontSize: 18 } })
108
109
  }
109
110
  ),
110
- /* @__PURE__ */ r(T, { className: "dashboard-content", id: "arc__dashboard-content", ...w && { maxWidth: !1 }, children: P }),
111
- C && /* @__PURE__ */ r(q, { dark: h.palette.mode === "dark", ...y })
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 X = u(d)`
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
- `, Y = u(G)`
175
+ `, Z = u(O)`
175
176
  .header-container {
176
177
  max-width: 100%;
177
178
  }
178
179
  `;
179
- function ue({
180
+ function xe({
180
181
  legacy: e = !0,
181
182
  ...a
182
183
  }) {
183
- return e ? /* @__PURE__ */ r(E, { ...a }) : /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(Q, { ...a }) });
184
+ return e ? /* @__PURE__ */ r(G, { ...a }) : /* @__PURE__ */ r(J, { children: /* @__PURE__ */ r(X, { ...a }) });
184
185
  }
185
186
  export {
186
- ue as default
187
+ xe as default
187
188
  };
@@ -1,7 +1,5 @@
1
1
  import * as e from "react";
2
- const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 120, height: 120, viewBox: "0 0 120 120", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("mask", { id: "mask0_2456_413", style: {
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
- l as default
4
+ t as default
7
5
  };
Binary file
@@ -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
- isOpen?: boolean;
4
+ type: ProductsType;
4
5
  }
5
- export default function Products({ className, isOpen, ...rest }: ProductsProps): import("react/jsx-runtime").JSX.Element;
6
+ export default function Products({ className, type, ...rest }: ProductsProps): import("react/jsx-runtime").JSX.Element;