@arcblock/ux 3.0.9 → 3.0.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.
Files changed (66) hide show
  1. package/lib/Address/did-address.js +47 -49
  2. package/lib/Address/responsive-did-address.js +53 -57
  3. package/lib/Avatar/index.js +16 -16
  4. package/lib/BlockletV2/blocklet.js +64 -64
  5. package/lib/BlockletV2/components/tooltip-icon.js +26 -27
  6. package/lib/CardSelector/index.js +1 -2
  7. package/lib/ClickToCopy/hook.js +10 -11
  8. package/lib/ClickToCopy/index.js +16 -16
  9. package/lib/Config/theme-mode-toggle.js +7 -8
  10. package/lib/DID/index.js +131 -133
  11. package/lib/DIDConnect/app-info-item.js +18 -18
  12. package/lib/DIDConnect/auth-apps/index.js +83 -84
  13. package/lib/DIDConnect/did-connect-container.js +89 -90
  14. package/lib/DIDConnect/did-connect-footer.js +25 -25
  15. package/lib/DIDConnect/landing-page.js +17 -17
  16. package/lib/DIDConnect/powered-by.js +11 -11
  17. package/lib/DIDConnect/request-storage-access-api-dialog.js +36 -37
  18. package/lib/DIDConnect/with-container.js +66 -68
  19. package/lib/Dialog/use-confirm.js +40 -43
  20. package/lib/Earth/index.js +21 -22
  21. package/lib/Footer/index.js +15 -16
  22. package/lib/Header/responsive-header.js +23 -24
  23. package/lib/Layout/dashboard/index.js +63 -72
  24. package/lib/Layout/dashboard/sidebar.js +20 -21
  25. package/lib/Layout/dashboard-legacy/index.js +52 -52
  26. package/lib/Locale/context.js +36 -37
  27. package/lib/Locale/selector.js +40 -42
  28. package/lib/NFTDisplay/index.js +114 -118
  29. package/lib/NFTDisplay/render-svg.js +12 -12
  30. package/lib/NavMenu/nav-menu.js +159 -161
  31. package/lib/NavMenu/sub-container.js +25 -26
  32. package/lib/PageScroller/index.js +28 -32
  33. package/lib/Passport/passport.js +11 -11
  34. package/lib/PhoneInput/country-select.js +38 -38
  35. package/lib/PhoneInput/index.js +65 -66
  36. package/lib/Screenshot/index.js +26 -27
  37. package/lib/SessionBlocklet/index.js +87 -93
  38. package/lib/SessionPermission/index.js +5 -9
  39. package/lib/SessionUser/components/did-space.js +24 -25
  40. package/lib/SessionUser/components/logged-in.js +122 -127
  41. package/lib/SessionUser/components/quick-login-item.js +41 -42
  42. package/lib/SessionUser/components/session-user-item.js +35 -36
  43. package/lib/SessionUser/components/session-user-switch.js +81 -85
  44. package/lib/SessionUser/components/un-login.js +41 -41
  45. package/lib/SessionUser/components/user-info.js +43 -47
  46. package/lib/SessionUser/index.js +1 -1
  47. package/lib/SessionUser/libs/utils.js +24 -30
  48. package/lib/SharedBridge/index.js +35 -35
  49. package/lib/Theme/index.js +16 -16
  50. package/lib/Theme/theme.js +42 -43
  51. package/lib/Toast/index.js +24 -25
  52. package/lib/Typography/index.js +42 -42
  53. package/lib/UserCard/Content/basic.js +91 -93
  54. package/lib/UserCard/Content/shorten-label.js +9 -9
  55. package/lib/UserCard/components.js +15 -15
  56. package/lib/Util/deprecate.js +1 -1
  57. package/lib/Util/federated.js +28 -32
  58. package/lib/Util/iframe.js +9 -10
  59. package/lib/Util/index.js +134 -135
  60. package/lib/Util/security.js +9 -10
  61. package/lib/Util/wallet.js +6 -9
  62. package/lib/VerificationCode/index.js +26 -28
  63. package/lib/hooks/use-blocklet-logo.js +11 -14
  64. package/lib/ux.css +1 -1
  65. package/lib/withTracker/index.js +13 -14
  66. package/package.json +10 -11
@@ -1,44 +1,43 @@
1
- import { jsx as o, jsxs as f } from "react/jsx-runtime";
2
- import { useState as y } from "react";
3
- import { useReactive as v, useCreation as h } from "ahooks";
4
- import { Close as g, Menu as b } from "@mui/icons-material";
5
- import { Container as x, useTheme as w, useMediaQuery as P, Drawer as k, Button as C } from "@mui/material";
6
- import i from "./header.js";
7
- import { styled as c } from "../Theme/index.js";
8
- function D({ prepend: n, children: r = null, ...s }) {
9
- const a = w(), l = P(a.breakpoints.down("md")), [t, m] = y(!1), u = typeof r == "function" ? r({ isMobile: l, closeMenu: () => m(!1) }) : r, e = v({
1
+ import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
+ import { useState as f } from "react";
3
+ import { useReactive as y, useCreation as v } from "ahooks";
4
+ import { Close as h, Menu as g } from "@mui/icons-material";
5
+ import { Container as b, useTheme as x, useMediaQuery as w, Drawer as P, Button as k } from "@mui/material";
6
+ import p from "./header.js";
7
+ import { styled as i } from "../Theme/index.js";
8
+ function z({ prepend: n, children: r = null, ...s }) {
9
+ const a = x(), l = w(a.breakpoints.down("md")), [t, m] = f(!1), u = typeof r == "function" ? r({ isMobile: l, closeMenu: () => m(!1) }) : r, e = y({
10
10
  changed: !1,
11
11
  value: "",
12
12
  priority: ""
13
13
  });
14
- return h(() => {
15
- var d;
16
- if ((d = document.documentElement) != null && d.style) {
17
- const p = () => {
14
+ return v(() => {
15
+ if (document.documentElement?.style) {
16
+ const d = () => {
18
17
  e.changed && (e.value ? document.documentElement.style.setProperty("overflow", e.value, e.priority) : document.documentElement.style.removeProperty("overflow"), e.value = "", e.priority = "", e.changed = !1);
19
18
  };
20
- return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) : p(), p;
19
+ return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) : d(), d;
21
20
  }
22
21
  return () => {
23
22
  };
24
- }, [t]), r ? /* @__PURE__ */ f(
25
- M,
23
+ }, [t]), r ? /* @__PURE__ */ c(
24
+ C,
26
25
  {
27
26
  prepend: n || /* @__PURE__ */ o(
28
- C,
27
+ k,
29
28
  {
30
29
  sx: { color: a.palette.grey[500] },
31
30
  className: "header-menu",
32
31
  "aria-label": "header menu button",
33
32
  onClick: () => m(!t),
34
- children: t ? /* @__PURE__ */ o(g, {}) : /* @__PURE__ */ o(b, {})
33
+ children: t ? /* @__PURE__ */ o(h, {}) : /* @__PURE__ */ o(g, {})
35
34
  }
36
35
  ),
37
36
  ...s,
38
37
  children: [
39
38
  !l && u,
40
39
  l && /* @__PURE__ */ o(
41
- k,
40
+ P,
42
41
  {
43
42
  open: t,
44
43
  onClose: () => m(!1),
@@ -63,14 +62,14 @@ function D({ prepend: n, children: r = null, ...s }) {
63
62
  }
64
63
  }
65
64
  },
66
- children: /* @__PURE__ */ o(E, { children: u })
65
+ children: /* @__PURE__ */ o(M, { children: u })
67
66
  }
68
67
  )
69
68
  ]
70
69
  }
71
- ) : /* @__PURE__ */ o(i, { prepend: n, ...s });
70
+ ) : /* @__PURE__ */ o(p, { prepend: n, ...s });
72
71
  }
73
- const M = c(i)`
72
+ const C = i(p)`
74
73
  .header-menu {
75
74
  display: none;
76
75
  }
@@ -80,7 +79,7 @@ const M = c(i)`
80
79
  margin-right: 12px;
81
80
  }
82
81
  }
83
- `, E = c(x)`
82
+ `, M = i(b)`
84
83
  padding-top: 8px;
85
84
  padding-bottom: 16px;
86
85
  .navmenu {
@@ -92,5 +91,5 @@ const M = c(i)`
92
91
  }
93
92
  `;
94
93
  export {
95
- D as default
94
+ z as default
96
95
  };
@@ -1,8 +1,8 @@
1
- import { jsx as r, jsxs as h } from "react/jsx-runtime";
2
- import { useMemo as M, useEffect as u } from "react";
3
- import { useLocation as x, matchPath as z } from "react-router-dom";
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import { useMemo as M, useEffect as f } from "react";
3
+ import { useLocation as p, matchPath as z } from "react-router-dom";
4
4
  import D from "react-helmet";
5
- import { useTheme as R, Box as i, Container as T } from "@mui/material";
5
+ import { useTheme as R, Box as d, 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,78 +11,69 @@ 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 p from "./sidebar.js";
15
- import { styled as g } from "../../Theme/index.js";
16
- import { Link as v } from "./external-link.js";
14
+ import b from "./sidebar.js";
15
+ import { styled as u } from "../../Theme/index.js";
16
+ import { Link as x } from "./external-link.js";
17
17
  import { FullPageProvider as A, useFullPage as J } from "./full-page.js";
18
- function K({ closeMenu: o, ...a }) {
19
- const e = x();
20
- return u(() => {
21
- o();
22
- }, [e]), /* @__PURE__ */ r(O, { ...a });
18
+ function K({ closeMenu: e, ...a }) {
19
+ const o = p();
20
+ return f(() => {
21
+ e();
22
+ }, [o]), /* @__PURE__ */ r(O, { ...a });
23
23
  }
24
- function w(o, a) {
25
- return o.map((e) => {
26
- var s;
27
- return (s = e.children) != null && s.length ? {
28
- ...e,
29
- label: e.title,
30
- children: w(e.children, a)
31
- } : {
32
- ...e,
33
- label: /* @__PURE__ */ r(v, { to: e.url, external: e.external, children: e.title }),
34
- // external = true 时 active 状态由传入 links 的调用方决定 (适用于 blocklet ui dashboard 的情况)
35
- active: e.external ? e.active : !!z({ path: e.url, end: !1 }, a.pathname)
36
- };
24
+ function g(e, a) {
25
+ return e.map((o) => o.children?.length ? {
26
+ ...o,
27
+ label: o.title,
28
+ children: g(o.children, a)
29
+ } : {
30
+ ...o,
31
+ label: /* @__PURE__ */ r(x, { to: o.url, external: o.external, children: o.title }),
32
+ // external = true 时 active 状态由传入 links 的调用方决定 (适用于 blocklet ui dashboard 的情况)
33
+ active: o.external ? o.active : !!z({ path: o.url, end: !1 }, a.pathname)
37
34
  });
38
35
  }
39
36
  function Q({
40
- title: o = "Home",
37
+ title: e = "Home",
41
38
  headerProps: a = {},
42
- links: e = [],
43
- sidebarWidth: s = 120,
44
- fullWidth: y = !1,
45
- dense: c = "auto",
46
- footerProps: N = {},
47
- sx: P = {},
48
- children: F,
49
- ...m
39
+ links: o = [],
40
+ sidebarWidth: v = 120,
41
+ fullWidth: w = !1,
42
+ dense: l = "auto",
43
+ footerProps: y = {},
44
+ sx: N = {},
45
+ children: P,
46
+ ...h
50
47
  }) {
51
- const b = R(), { inFullPage: L, showToggleButton: W, headerVisible: $, footerVisible: C, sidebarVisible: H, toggleFullPage: _ } = J(), f = x(), l = M(() => w(e, f), [f, e]), S = l.some((t) => {
52
- var d;
53
- return !!((d = t.children) != null && d.length);
54
- }), n = c === "auto" ? l.length >= 8 || S : c, j = V("dashboard", { "dashboard-dense": n }, m.className), I = {
55
- homeLink: (t) => {
56
- var d;
57
- return /* @__PURE__ */ r(v, { to: ((d = window.blocklet) == null ? void 0 : d.prefix) || "/", children: t });
58
- },
48
+ const c = R(), { inFullPage: F, showToggleButton: L, headerVisible: W, footerVisible: $, sidebarVisible: C, toggleFullPage: H } = J(), m = p(), s = M(() => g(o, m), [m, o]), _ = s.some((t) => !!t.children?.length), i = l === "auto" ? s.length >= 8 || _ : l, S = V("dashboard", { "dashboard-dense": i }, h.className), j = {
49
+ homeLink: (t) => /* @__PURE__ */ r(x, { to: window.blocklet?.prefix || "/", children: t }),
59
50
  ...a
60
51
  };
61
- return u(() => {
52
+ return f(() => {
62
53
  const { searchParams: t } = new URL(window.location.href);
63
54
  t.get("inviter") && window.localStorage.setItem("inviter", t.get("inviter"));
64
- }, []), /* @__PURE__ */ h(X, { sx: P, ...m, className: j, sidebarWidth: s, children: [
65
- /* @__PURE__ */ r(D, { title: o }, o),
66
- $ && /* @__PURE__ */ r(Y, { ...I, className: "dashboard-header", children: e != null && e.length ? ({ isMobile: t, closeMenu: d }) => t ? /* @__PURE__ */ r(
55
+ }, []), /* @__PURE__ */ n(X, { sx: N, ...h, className: S, sidebarWidth: v, children: [
56
+ /* @__PURE__ */ r(D, { title: e }, e),
57
+ W && /* @__PURE__ */ r(Y, { ...j, className: "dashboard-header", children: o?.length ? ({ isMobile: t, closeMenu: I }) => t ? /* @__PURE__ */ r(
67
58
  K,
68
59
  {
69
60
  mode: "inline",
70
- items: l,
71
- closeMenu: d,
61
+ items: s,
62
+ closeMenu: I,
72
63
  bgColor: "transparent",
73
- activeTextColor: b.palette.primary.main
64
+ activeTextColor: c.palette.primary.main
74
65
  }
75
66
  ) : null : null }),
76
- /* @__PURE__ */ h(
77
- i,
67
+ /* @__PURE__ */ n(
68
+ d,
78
69
  {
79
70
  className: "dashboard-body",
80
71
  sx: {
81
72
  display: "flex"
82
73
  },
83
74
  children: [
84
- !!(e != null && e.length) && H && /* @__PURE__ */ r(
85
- i,
75
+ !!o?.length && C && /* @__PURE__ */ r(
76
+ d,
86
77
  {
87
78
  className: "dashboard-sidebar",
88
79
  sx: {
@@ -91,12 +82,12 @@ function Q({
91
82
  md: "block"
92
83
  }
93
84
  },
94
- children: n ? /* @__PURE__ */ r(p, { links: e, dense: n }) : /* @__PURE__ */ r(i, { className: "dashboard-sidebar-container", children: /* @__PURE__ */ r(p, { links: e, dense: n }) })
85
+ children: i ? /* @__PURE__ */ r(b, { links: o, dense: i }) : /* @__PURE__ */ r(d, { className: "dashboard-sidebar-container", children: /* @__PURE__ */ r(b, { links: o, dense: i }) })
95
86
  }
96
87
  ),
97
- /* @__PURE__ */ h(i, { className: "dashboard-main", id: "arc__dashboard-main", children: [
98
- W && /* @__PURE__ */ r(
99
- i,
88
+ /* @__PURE__ */ n(d, { className: "dashboard-main", id: "arc__dashboard-main", children: [
89
+ L && /* @__PURE__ */ r(
90
+ d,
100
91
  {
101
92
  sx: {
102
93
  position: "absolute",
@@ -112,26 +103,26 @@ function Q({
112
103
  borderRadius: 1,
113
104
  cursor: "pointer"
114
105
  },
115
- onClick: _,
116
- children: L ? /* @__PURE__ */ r(B, { style: { fontSize: 18 } }) : /* @__PURE__ */ r(U, { style: { fontSize: 18 } })
106
+ onClick: H,
107
+ children: F ? /* @__PURE__ */ r(B, { style: { fontSize: 18 } }) : /* @__PURE__ */ r(U, { style: { fontSize: 18 } })
117
108
  }
118
109
  ),
119
- /* @__PURE__ */ r(T, { className: "dashboard-content", id: "arc__dashboard-content", ...y && { maxWidth: !1 }, children: F }),
120
- C && /* @__PURE__ */ r(q, { dark: b.palette.mode === "dark", ...N })
110
+ /* @__PURE__ */ r(T, { className: "dashboard-content", id: "arc__dashboard-content", ...w && { maxWidth: !1 }, children: P }),
111
+ $ && /* @__PURE__ */ r(q, { dark: c.palette.mode === "dark", ...y })
121
112
  ] })
122
113
  ]
123
114
  }
124
115
  )
125
116
  ] });
126
117
  }
127
- const X = g("div", {
128
- shouldForwardProp: (o) => o !== "sidebarWidth"
118
+ const X = u("div", {
119
+ shouldForwardProp: (e) => e !== "sidebarWidth"
129
120
  })`
130
121
  &.dashboard {
131
122
  display: flex;
132
123
  flex-direction: column;
133
124
  height: 100vh;
134
- background-color: ${({ theme: o }) => o.palette.background.default};
125
+ background-color: ${({ theme: e }) => e.palette.background.default};
135
126
  }
136
127
  .dashboard-body {
137
128
  overflow: hidden;
@@ -140,14 +131,14 @@ const X = g("div", {
140
131
  .dashboard-sidebar {
141
132
  box-sizing: border-box;
142
133
  flex: 0 0 auto;
143
- width: ${(o) => o.sidebarWidth}px;
134
+ width: ${(e) => e.sidebarWidth}px;
144
135
  overflow: hidden;
145
136
  &:hover {
146
137
  overflow-y: auto;
147
138
  }
148
139
  }
149
140
  .dashboard-sidebar-container {
150
- width: ${(o) => o.sidebarWidth}px;
141
+ width: ${(e) => e.sidebarWidth}px;
151
142
  }
152
143
  .dashboard-main {
153
144
  display: flex;
@@ -162,15 +153,15 @@ const X = g("div", {
162
153
  &.dashboard-dense {
163
154
  .dashboard-header {
164
155
  border-bottom: 1px solid;
165
- border-color: ${({ theme: o }) => o.palette.divider};
156
+ border-color: ${({ theme: e }) => e.palette.divider};
166
157
  }
167
158
  .dashboard-sidebar {
168
159
  width: 256px;
169
160
  border-right: 1px solid;
170
- border-color: ${({ theme: o }) => o.palette.divider};
161
+ border-color: ${({ theme: e }) => e.palette.divider};
171
162
  }
172
163
  }
173
- ${(o) => o.theme.breakpoints.up("md")} {
164
+ ${(e) => e.theme.breakpoints.up("md")} {
174
165
  .header-logo {
175
166
  display: flex;
176
167
  justify-content: center;
@@ -182,16 +173,16 @@ const X = g("div", {
182
173
  }
183
174
  }
184
175
  }
185
- `, Y = g(G)`
176
+ `, Y = u(G)`
186
177
  .header-container {
187
178
  max-width: 100%;
188
179
  }
189
180
  `;
190
181
  function ue({
191
- legacy: o = !0,
182
+ legacy: e = !0,
192
183
  ...a
193
184
  }) {
194
- return o ? /* @__PURE__ */ r(E, { ...a }) : /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(Q, { ...a }) });
185
+ return e ? /* @__PURE__ */ r(E, { ...a }) : /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(Q, { ...a }) });
195
186
  }
196
187
  export {
197
188
  ue as default
@@ -1,40 +1,39 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { Typography as b } from "@mui/material";
3
- import d from "clsx";
4
- import { styled as c } from "../../Theme/index.js";
5
- import { NavLink as h } from "./external-link.js";
6
- function p(e, i) {
7
- var n;
8
- if ((n = e.children) != null && n.length)
9
- return m(e, i);
10
- const { url: a, icon: r, title: s, showBadge: u, external: l, active: g } = e;
2
+ import { Typography as x } from "@mui/material";
3
+ import n from "clsx";
4
+ import { styled as b } from "../../Theme/index.js";
5
+ import { NavLink as c } from "./external-link.js";
6
+ function d(e, i) {
7
+ if (e.children?.length)
8
+ return h(e, i);
9
+ const { url: a, icon: r, title: p, showBadge: s, external: l, active: u } = e;
11
10
  return /* @__PURE__ */ t("li", { className: "layout-sidebar-item", children: /* @__PURE__ */ o(
12
- h,
11
+ c,
13
12
  {
14
13
  external: l,
15
14
  to: a,
16
- className: ({ isActive: x }) => d("layout-sidebar-link", { "layout-sidebar-link--active": l ? g : x }),
15
+ className: ({ isActive: g }) => n("layout-sidebar-link", { "layout-sidebar-link--active": l ? u : g }),
17
16
  children: [
18
- r && /* @__PURE__ */ t("span", { className: `layout-sidebar-icon ${u ? "layout-sidebar-badge" : ""}`, children: r }),
19
- /* @__PURE__ */ t(b, { component: "span", className: "layout-sidebar-link-text", children: s })
17
+ r && /* @__PURE__ */ t("span", { className: `layout-sidebar-icon ${s ? "layout-sidebar-badge" : ""}`, children: r }),
18
+ /* @__PURE__ */ t(x, { component: "span", className: "layout-sidebar-link-text", children: p })
20
19
  ]
21
20
  }
22
21
  ) }, `${a}-${i}`);
23
22
  }
24
- function m(e, i) {
23
+ function h(e, i) {
25
24
  return /* @__PURE__ */ o("li", { className: "layout-sidebar-group", children: [
26
25
  /* @__PURE__ */ t("span", { className: "layout-sidebar-group-title", children: e.title }),
27
- /* @__PURE__ */ t("ul", { children: e.children.map(p) })
26
+ /* @__PURE__ */ t("ul", { children: e.children.map(d) })
28
27
  ] }, `group-${e.title}-${i}`);
29
28
  }
30
- function z({ links: e, addons: i = void 0, dense: a = !1, ...r }) {
31
- return /* @__PURE__ */ o(f, { ...r, className: d({ "layout-sidebar-dense": a }), children: [
32
- /* @__PURE__ */ t("ul", { children: e.map(p) }),
29
+ function N({ links: e, addons: i = void 0, dense: a = !1, ...r }) {
30
+ return /* @__PURE__ */ o(y, { ...r, className: n({ "layout-sidebar-dense": a }), children: [
31
+ /* @__PURE__ */ t("ul", { children: e.map(d) }),
33
32
  /* @__PURE__ */ t("div", { style: { flex: 1 } }),
34
33
  i
35
34
  ] });
36
35
  }
37
- const y = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", f = c("div")`
36
+ const m = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", y = b("div")`
38
37
  display: flex;
39
38
  flex-direction: column;
40
39
  ul {
@@ -53,7 +52,7 @@ const y = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230,
53
52
  &:hover,
54
53
  &.layout-sidebar-link--active {
55
54
  color: ${(e) => e.theme.palette.primary.main};
56
- background: ${y};
55
+ background: ${m};
57
56
  border-left-color: ${(e) => e.theme.palette.primary.main};
58
57
  }
59
58
  }
@@ -161,5 +160,5 @@ const y = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230,
161
160
  }
162
161
  `;
163
162
  export {
164
- z as default
163
+ N as default
165
164
  };
@@ -1,13 +1,13 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { useState as c, useEffect as P } from "react";
3
- import H from "react-helmet";
4
- import { Box as h, Drawer as S, Container as W } from "@mui/material";
5
- import { useSize as j } from "ahooks";
6
- import C from "./sidebar.js";
7
- import F from "./header.js";
8
- import O from "../../Footer/index.js";
9
- import { styled as T } from "../../Theme/index.js";
10
- const B = T("div")`
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { useState as p, useEffect as $ } from "react";
3
+ import P from "react-helmet";
4
+ import { Box as c, Drawer as z, Container as H } from "@mui/material";
5
+ import { useSize as S } from "ahooks";
6
+ import W from "./sidebar.js";
7
+ import j from "./header.js";
8
+ import C from "../../Footer/index.js";
9
+ import { styled as F } from "../../Theme/index.js";
10
+ const O = F("div")`
11
11
  &.dashboard {
12
12
  display: flex;
13
13
  flex-direction: column;
@@ -38,46 +38,46 @@ const B = T("div")`
38
38
  `;
39
39
  function R({
40
40
  links: o = [],
41
- brand: d = "",
42
- description: f = "",
43
- images: b,
44
- title: u = "Home",
45
- brandAddon: w = void 0,
46
- headerAddon: x = void 0,
47
- prefix: _ = "/images",
48
- fullWidth: g = !1,
49
- contentLayout: y = "column",
50
- className: v = "",
51
- homeUrl: N = "/",
52
- logo: s = void 0,
53
- children: k,
54
- ...M
41
+ brand: t = "",
42
+ description: h = "",
43
+ images: f,
44
+ title: b = "Home",
45
+ brandAddon: u = void 0,
46
+ headerAddon: w = void 0,
47
+ prefix: x = "/images",
48
+ fullWidth: _ = !1,
49
+ contentLayout: g = "column",
50
+ className: y = "",
51
+ homeUrl: v = "/",
52
+ logo: d = void 0,
53
+ children: N,
54
+ ...k
55
55
  }) {
56
- const r = j(document.body), a = (r == null ? void 0 : r.width) || 0, [n, D] = c(a >= 960 ? "permanent" : "temporary"), [i, l] = c(n === "permanent");
57
- P(() => {
58
- const p = a >= 960 ? "permanent" : "temporary";
59
- D(p), l(p !== "temporary");
60
- }, [a]);
61
- const m = () => {
62
- l(!i);
63
- }, $ = g || y === "row";
64
- return /* @__PURE__ */ t(B, { className: `dashboard ${v}`, ...M, children: [
65
- /* @__PURE__ */ e(H, { title: `${u}-${d}` }),
56
+ const r = S(document.body)?.width || 0, [s, M] = p(r >= 960 ? "permanent" : "temporary"), [n, i] = p(s === "permanent");
57
+ $(() => {
58
+ const m = r >= 960 ? "permanent" : "temporary";
59
+ M(m), i(m !== "temporary");
60
+ }, [r]);
61
+ const l = () => {
62
+ i(!n);
63
+ }, D = _ || g === "row";
64
+ return /* @__PURE__ */ a(O, { className: `dashboard ${y}`, ...k, children: [
65
+ /* @__PURE__ */ e(P, { title: `${b}-${t}` }),
66
66
  /* @__PURE__ */ e(
67
- F,
67
+ j,
68
68
  {
69
69
  className: "dashboard__header",
70
- onToggleMenu: m,
71
- brand: d,
72
- brandAddon: w,
73
- description: f,
74
- addons: x,
75
- homeUrl: N,
76
- logo: s
70
+ onToggleMenu: l,
71
+ brand: t,
72
+ brandAddon: u,
73
+ description: h,
74
+ addons: w,
75
+ homeUrl: v,
76
+ logo: d
77
77
  }
78
78
  ),
79
- /* @__PURE__ */ t(
80
- h,
79
+ /* @__PURE__ */ a(
80
+ c,
81
81
  {
82
82
  className: "dashboard__body",
83
83
  sx: {
@@ -85,20 +85,20 @@ function R({
85
85
  },
86
86
  children: [
87
87
  /* @__PURE__ */ e(
88
- S,
88
+ z,
89
89
  {
90
- variant: n,
90
+ variant: s,
91
91
  className: "drawer",
92
92
  classes: { paper: "drawerPaper" },
93
- open: i,
94
- onClose: m,
93
+ open: n,
94
+ onClose: l,
95
95
  ModalProps: { disablePortal: !0, keepMounted: !0 },
96
- children: /* @__PURE__ */ e(C, { className: "dashboard__sidebar", images: b, links: o, prefix: _, logo: s })
96
+ children: /* @__PURE__ */ e(W, { className: "dashboard__sidebar", images: f, links: o, prefix: x, logo: d })
97
97
  }
98
98
  ),
99
- /* @__PURE__ */ t(h, { className: "dashboard__main", children: [
100
- /* @__PURE__ */ e(W, { maxWidth: $ ? !1 : "lg", className: "dashboard__content", children: k }),
101
- /* @__PURE__ */ e(O, {})
99
+ /* @__PURE__ */ a(c, { className: "dashboard__main", children: [
100
+ /* @__PURE__ */ e(H, { maxWidth: D ? !1 : "lg", className: "dashboard__content", children: N }),
101
+ /* @__PURE__ */ e(C, {})
102
102
  ] })
103
103
  ]
104
104
  }