@arcblock/ux 3.0.12 → 3.0.14

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 (79) hide show
  1. package/lib/ActivityIndicator/index.js +16 -16
  2. package/lib/Alert/index.js +17 -17
  3. package/lib/AnimationWaiter/index.js +13 -13
  4. package/lib/Blocklet/blocklet.js +15 -15
  5. package/lib/Blocklet/utils.d.ts +1 -1
  6. package/lib/Blocklet/utils.js +5 -6
  7. package/lib/BlockletNFT/index.js +23 -23
  8. package/lib/BlockletV2/utils.d.ts +1 -1
  9. package/lib/BlockletV2/utils.js +6 -7
  10. package/lib/Center/index.js +6 -7
  11. package/lib/CodeBlock/LightBox.d.ts +3 -2
  12. package/lib/CodeBlock/LightBox.js +2 -3
  13. package/lib/CookieConsent/index.js +1 -1
  14. package/lib/CountDown/index.js +23 -24
  15. package/lib/Datatable/CustomToolbar.js +71 -71
  16. package/lib/Datatable/TableSearch.js +18 -18
  17. package/lib/Datatable/index.js +77 -77
  18. package/lib/Earth/index.js +46 -47
  19. package/lib/Footer/index.js +8 -8
  20. package/lib/Icon/image.js +16 -17
  21. package/lib/InfoRow/index.js +11 -11
  22. package/lib/Layout/dashboard/index.js +18 -20
  23. package/lib/Layout/dashboard/sidebar.js +12 -12
  24. package/lib/Layout/dashboard-legacy/index.js +20 -20
  25. package/lib/Layout/dashboard-legacy/sidebar.js +16 -16
  26. package/lib/Layout/index.js +29 -29
  27. package/lib/Metric/index.js +9 -9
  28. package/lib/NFTDisplay/svg-embedder/inline-svg.js +6 -7
  29. package/lib/PageScroller/story/FullPage.js +1 -1
  30. package/lib/PageScroller/story/PageContain.js +1 -1
  31. package/lib/PageScroller/story/index.css +115 -0
  32. package/lib/PricingTable/index.js +9 -9
  33. package/lib/Result/result.js +14 -14
  34. package/lib/Screenshot/BaseScreenshot/index.js +9 -10
  35. package/lib/Screenshot/devices.css +1366 -0
  36. package/lib/Screenshot/index.js +27 -28
  37. package/lib/Video/index.js +11 -11
  38. package/lib/Wallet/Action.js +12 -12
  39. package/lib/Wallet/Download.js +11 -11
  40. package/lib/WechatPrompt/index.js +1 -1
  41. package/package.json +7 -7
  42. package/src/ActivityIndicator/index.jsx +2 -3
  43. package/src/Address/Address.stories.jsx +1 -2
  44. package/src/Alert/index.jsx +2 -2
  45. package/src/AnimationWaiter/index.jsx +2 -2
  46. package/src/Blocklet/blocklet.jsx +2 -2
  47. package/src/Blocklet/utils.jsx +1 -2
  48. package/src/BlockletNFT/index.jsx +2 -2
  49. package/src/BlockletV2/utils.js +1 -2
  50. package/src/Center/index.tsx +1 -2
  51. package/src/CodeBlock/LightBox.tsx +1 -2
  52. package/src/Colors/Colors.stories.jsx +1 -1
  53. package/src/CookieConsent/index.tsx +1 -1
  54. package/src/CountDown/index.tsx +2 -2
  55. package/src/DID/DID.stories.jsx +1 -2
  56. package/src/Datatable/CustomToolbar.jsx +2 -3
  57. package/src/Datatable/TableSearch.jsx +2 -2
  58. package/src/Datatable/index.jsx +4 -4
  59. package/src/Earth/index.tsx +2 -3
  60. package/src/Footer/index.tsx +1 -1
  61. package/src/Icon/image.tsx +1 -2
  62. package/src/InfoRow/index.tsx +2 -2
  63. package/src/Layout/dashboard/index.tsx +1 -3
  64. package/src/Layout/dashboard/sidebar.tsx +2 -2
  65. package/src/Layout/dashboard-legacy/index.tsx +1 -1
  66. package/src/Layout/dashboard-legacy/sidebar.tsx +2 -2
  67. package/src/Layout/index.tsx +1 -2
  68. package/src/Metric/index.tsx +2 -2
  69. package/src/NFTDisplay/svg-embedder/inline-svg.tsx +2 -2
  70. package/src/PricingTable/index.tsx +2 -2
  71. package/src/Result/result.tsx +1 -1
  72. package/src/Screenshot/BaseScreenshot/index.tsx +2 -2
  73. package/src/Screenshot/index.tsx +3 -3
  74. package/src/Video/index.tsx +2 -2
  75. package/src/Wallet/Action.tsx +2 -2
  76. package/src/Wallet/Download.tsx +2 -2
  77. package/src/WechatPrompt/index.tsx +1 -1
  78. package/vite.config.mjs +1 -1
  79. package/lib/ux.css +0 -1
@@ -1,15 +1,14 @@
1
- import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
- import { useReducer as H, useRef as w, useEffect as J } from "react";
3
- import V from "react-use/lib/useSpring";
1
+ import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
+ import { useReducer as U, useRef as w, useEffect as H } from "react";
3
+ import J from "react-use/lib/useSpring";
4
4
  import * as N from "d3-geo";
5
- import * as X from "topojson-client";
5
+ import * as V from "topojson-client";
6
6
  import D from "versor";
7
- import { Box as R } from "@mui/material";
8
- import B from "./countries.json.js";
9
- import Y from "./util.js";
10
- import { withDeprecated as K } from "../Util/deprecate.js";
11
- import { styled as I } from "../Theme/index.js";
12
- const F = X.feature(B, B.objects.ne_110m_admin_0_countries), Q = {
7
+ import R from "./countries.json.js";
8
+ import X from "./util.js";
9
+ import { withDeprecated as Y } from "../Util/deprecate.js";
10
+ import { styled as B } from "../Theme/index.js";
11
+ const F = V.feature(R, R.objects.ne_110m_admin_0_countries), K = {
13
12
  light: {
14
13
  ocean: "#EDF4F4",
15
14
  graticule: "#EDF4F4",
@@ -29,7 +28,7 @@ const F = X.feature(B, B.objects.ne_110m_admin_0_countries), Q = {
29
28
  activeMarker: "#FFD159"
30
29
  }
31
30
  };
32
- function W(e, s) {
31
+ function Q(e, s) {
33
32
  switch (s.type) {
34
33
  case "dragEnd":
35
34
  return { ...e, isDragging: !1 };
@@ -47,17 +46,17 @@ function W(e, s) {
47
46
  return e;
48
47
  }
49
48
  }
50
- function Z({
49
+ function W({
51
50
  theme: e = "dark",
52
51
  width: s = 1200,
53
52
  height: g = 600,
54
- enableRotation: M = !1,
55
- rotationSpeed: L = 5,
53
+ enableRotation: I = !1,
54
+ rotationSpeed: M = 5,
56
55
  activeMarkerId: i = void 0,
57
56
  markers: y = [],
58
- colors: S = {}
57
+ colors: L = {}
59
58
  }) {
60
- const $ = Object.assign(S, Q[e]), [r, d] = H(W, {
59
+ const $ = Object.assign(L, K[e]), [r, d] = U(Q, {
61
60
  rotation: [0, 0, 0],
62
61
  isDragging: !1,
63
62
  animateDuration: 1,
@@ -71,7 +70,7 @@ function Z({
71
70
  step: 0,
72
71
  markerId: null,
73
72
  iv: null
74
- }), C = V(r.animateDuration, 170, 26), T = i && k.current.markerId !== i && y.some((t) => t.id === i), p = N.geoOrthographic().fitExtent(
73
+ }), C = J(r.animateDuration, 170, 26), S = i && k.current.markerId !== i && y.some((t) => t.id === i), p = N.geoOrthographic().fitExtent(
75
74
  [
76
75
  [30, 30],
77
76
  [s - 30, g - 30]
@@ -80,18 +79,18 @@ function Z({
80
79
  ).rotate(
81
80
  C <= 1 || r.isDragging || !i ? r.rotation : k.current.iv(C / r.animateDuration)
82
81
  ), P = N.geoPath().projection(p).pointRadius(2);
83
- J(() => {
84
- if (T) {
85
- let { p1: t, p2: o, r1: a, r2: m, markerId: c } = k.current;
82
+ H(() => {
83
+ if (S) {
84
+ let { p1: t, p2: o, r1: a, r2: u, markerId: c } = k.current;
86
85
  if (c !== i && !r.isDragging) {
87
86
  const l = y.find((v) => v.id === i);
88
- t = o, o = [l.longitude, l.latitude], a = m, m = [-o[0], 20 - o[1], p.rotate()[2]];
89
- const h = Y.interpolateAngles(a, m);
87
+ t = o, o = [l.longitude, l.latitude], a = u, u = [-o[0], 20 - o[1], p.rotate()[2]];
88
+ const h = X.interpolateAngles(a, u);
90
89
  Object.assign(k.current, {
91
90
  p1: t,
92
91
  p2: o,
93
92
  r1: a,
94
- r2: m,
93
+ r2: u,
95
94
  iv: h,
96
95
  markerId: i
97
96
  });
@@ -103,9 +102,9 @@ function Z({
103
102
  }
104
103
  });
105
104
  }
106
- } else if (M) {
105
+ } else if (I) {
107
106
  const t = window.requestAnimationFrame(() => {
108
- const o = [r.rotation[0] + 2 / L, r.rotation[1], r.rotation[2]];
107
+ const o = [r.rotation[0] + 2 / M, r.rotation[1], r.rotation[2]];
109
108
  d({ type: "rotate", payload: { rotation: o } });
110
109
  });
111
110
  return function() {
@@ -116,13 +115,13 @@ function Z({
116
115
  const b = (t) => {
117
116
  const o = E.current, a = o?.getBoundingClientRect();
118
117
  return [t.clientX - a.left - o.clientLeft, t.clientY - a.top - o.clientTop];
119
- }, z = (t) => {
118
+ }, T = (t) => {
120
119
  const o = b(t);
121
120
  o[0] && (x.current.v0 = D.cartesian(p.invert(o)), x.current.r0 = p.rotate(), x.current.q0 = D(x.current.r0), d({ type: "dragStart", payload: { mousePosition: o } }));
122
- }, G = (t) => {
121
+ }, z = (t) => {
123
122
  if (r.isDragging === !1)
124
123
  return;
125
- const o = b(t), { r0: a, v0: m, q0: c } = x.current, l = D.cartesian(p.rotate(a).invert(o)), h = D.multiply(c, D.delta(m, l)), f = D.rotation(h);
124
+ const o = b(t), { r0: a, v0: u, q0: c } = x.current, l = D.cartesian(p.rotate(a).invert(o)), h = D.multiply(c, D.delta(u, l)), f = D.rotation(h);
126
125
  d({ type: "rotate", payload: { rotation: f, mousePosition: o } });
127
126
  }, j = () => {
128
127
  setTimeout(() => {
@@ -131,9 +130,9 @@ function Z({
131
130
  }, A = (t, o) => d({
132
131
  type: "tooltip",
133
132
  payload: { tooltipIndex: o, mousePosition: b(t) }
134
- }), O = () => d({ type: "tooltip", payload: { tooltipIndex: -1, mousePosition: null } }), q = () => y.map((t, o) => {
135
- const a = [t.longitude, t.latitude], m = N.geoDistance(a, p.invert([s / 2, g / 2])), c = p(a), l = i === t.id, h = m > 1.57 ? "none" : l ? $.activeMarker : $.marker, f = l ? 9 : 6;
136
- return /* @__PURE__ */ u(
133
+ }), O = () => d({ type: "tooltip", payload: { tooltipIndex: -1, mousePosition: null } }), G = () => y.map((t, o) => {
134
+ const a = [t.longitude, t.latitude], u = N.geoDistance(a, p.invert([s / 2, g / 2])), c = p(a), l = i === t.id, h = u > 1.57 ? "none" : l ? $.activeMarker : $.marker, f = l ? 9 : 6;
135
+ return /* @__PURE__ */ m(
137
136
  "g",
138
137
  {
139
138
  className: `marker ${l ? "marker--active" : ""}`,
@@ -174,13 +173,13 @@ function Z({
174
173
  },
175
174
  t.id
176
175
  );
177
- }), U = () => {
176
+ }), q = () => {
178
177
  if (r.tooltipIndex >= 0) {
179
178
  const t = y[r.tooltipIndex];
180
- return /* @__PURE__ */ u(to, { style: { left: r.mousePosition?.[0] ?? 0, top: r.mousePosition?.[1] ?? 0 }, children: [
179
+ return /* @__PURE__ */ m(oo, { style: { left: r.mousePosition?.[0] ?? 0, top: r.mousePosition?.[1] ?? 0 }, children: [
181
180
  /* @__PURE__ */ n("p", { className: "title", children: t.title }),
182
181
  /* @__PURE__ */ n("p", { className: "description", children: t.description }),
183
- /* @__PURE__ */ u("p", { className: "description", children: [
182
+ /* @__PURE__ */ m("p", { className: "description", children: [
184
183
  "ID: ",
185
184
  t.id
186
185
  ] })
@@ -194,16 +193,16 @@ function Z({
194
193
  (o) => o.properties && o.properties.name && o.properties.name === t.country
195
194
  );
196
195
  }
197
- return /* @__PURE__ */ u(oo, { width: s, height: g, $theme: e, colors: $, onMouseLeave: j, children: [
198
- U(),
199
- /* @__PURE__ */ u(
196
+ return /* @__PURE__ */ m(Z, { width: s, height: g, $theme: e, colors: $, onMouseLeave: j, children: [
197
+ q(),
198
+ /* @__PURE__ */ m(
200
199
  "svg",
201
200
  {
202
201
  className: "earth",
203
202
  width: s,
204
203
  height: g,
205
- onMouseDown: z,
206
- onMouseMove: G,
204
+ onMouseDown: T,
205
+ onMouseMove: z,
207
206
  onMouseUp: j,
208
207
  ref: E,
209
208
  children: [
@@ -218,7 +217,7 @@ function Z({
218
217
  },
219
218
  t.properties.name
220
219
  )) }),
221
- /* @__PURE__ */ n("g", { className: "markers", children: q() }),
220
+ /* @__PURE__ */ n("g", { className: "markers", children: G() }),
222
221
  r.isDragging && r.mousePosition && /* @__PURE__ */ n(
223
222
  "path",
224
223
  {
@@ -232,12 +231,12 @@ function Z({
232
231
  ]
233
232
  }
234
233
  ),
235
- /* @__PURE__ */ n("svg", { className: "defs", children: /* @__PURE__ */ u("defs", { children: [
236
- /* @__PURE__ */ u("linearGradient", { id: "gradBlue", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
234
+ /* @__PURE__ */ n("svg", { className: "defs", children: /* @__PURE__ */ m("defs", { children: [
235
+ /* @__PURE__ */ m("linearGradient", { id: "gradBlue", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
237
236
  /* @__PURE__ */ n("stop", { offset: "0%", style: { stopColor: "#005C99", stopOpacity: 1 } }),
238
237
  /* @__PURE__ */ n("stop", { offset: "100%", style: { stopColor: "#0099FF", stopOpacity: 1 } })
239
238
  ] }),
240
- /* @__PURE__ */ u("filter", { id: "glow", children: [
239
+ /* @__PURE__ */ m("filter", { id: "glow", children: [
241
240
  /* @__PURE__ */ n(
242
241
  "feColorMatrix",
243
242
  {
@@ -249,7 +248,7 @@ function Z({
249
248
  }
250
249
  ),
251
250
  /* @__PURE__ */ n("feGaussianBlur", { stdDeviation: "5.5", result: "coloredBlur" }),
252
- /* @__PURE__ */ u("feMerge", { children: [
251
+ /* @__PURE__ */ m("feMerge", { children: [
253
252
  /* @__PURE__ */ n("feMergeNode", { in: "coloredBlur" }),
254
253
  /* @__PURE__ */ n("feMergeNode", { in: "SourceGraphic" })
255
254
  ] })
@@ -257,7 +256,7 @@ function Z({
257
256
  ] }) })
258
257
  ] });
259
258
  }
260
- const mo = K(Z, { name: "Earth" }), oo = I(R)`
259
+ const lo = Y(W, { name: "Earth" }), Z = B("div")`
261
260
  background-color: ${(e) => e.$theme === "light" ? "#f7f7f7" : "#222"};
262
261
  width: ${(e) => e.width}px;
263
262
  height: ${(e) => e.height}px;
@@ -338,7 +337,7 @@ const mo = K(Z, { name: "Earth" }), oo = I(R)`
338
337
  transform: scale3d(1.5, 1.5, 1.5);
339
338
  }
340
339
  }
341
- `, to = I(R)`
340
+ `, oo = B("div")`
342
341
  position: absolute;
343
342
  width: auto;
344
343
  min-width: 90px;
@@ -376,5 +375,5 @@ const mo = K(Z, { name: "Earth" }), oo = I(R)`
376
375
  }
377
376
  `;
378
377
  export {
379
- mo as default
378
+ lo as default
380
379
  };
@@ -1,19 +1,19 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { Box as s, Container as h, Typography as r } from "@mui/material";
2
+ import { Container as f, Typography as r, Box as h } from "@mui/material";
3
3
  import { mergeProps as g } from "../Util/index.js";
4
4
  import w from "../Logo/index.js";
5
5
  import { styled as y } from "../Theme/index.js";
6
6
  function u({ ...e }) {
7
- const p = g(e, u, ["dark", "style"]), { className: d = "", copyStart: m = "2017", style: c = {}, brand: x = "ArcBlock", dark: n = !1, addon: a = null } = p, i = `${(/* @__PURE__ */ new Date()).getFullYear()}`, l = `${m}`, f = i === l ? i : `${l}-${i}`;
8
- return /* @__PURE__ */ o(b, { className: d, style: c, dark: n, children: [
9
- /* @__PURE__ */ t(h, { maxWidth: !1, children: /* @__PURE__ */ o(r, { component: "div", className: "footer", children: [
7
+ const s = g(e, u, ["dark", "style"]), { className: p = "", copyStart: d = "2017", style: m = {}, brand: c = "ArcBlock", dark: n = !1, addon: a = null } = s, i = `${(/* @__PURE__ */ new Date()).getFullYear()}`, l = `${d}`, x = i === l ? i : `${l}-${i}`;
8
+ return /* @__PURE__ */ o(b, { className: p, style: m, dark: n, children: [
9
+ /* @__PURE__ */ t(f, { maxWidth: !1, children: /* @__PURE__ */ o(r, { component: "div", className: "footer", children: [
10
10
  /* @__PURE__ */ o(r, { component: "p", className: "footer-item", children: [
11
11
  /* @__PURE__ */ o("span", { className: "footer-copy", children: [
12
12
  "Copyright © ",
13
- f,
13
+ x,
14
14
  " "
15
15
  ] }),
16
- /* @__PURE__ */ t("span", { className: "footer-brand", children: x })
16
+ /* @__PURE__ */ t("span", { className: "footer-brand", children: c })
17
17
  ] }),
18
18
  a && /* @__PURE__ */ t(
19
19
  r,
@@ -30,7 +30,7 @@ function u({ ...e }) {
30
30
  ] })
31
31
  ] }) }),
32
32
  /* @__PURE__ */ t(
33
- s,
33
+ h,
34
34
  {
35
35
  sx: {
36
36
  position: "absolute",
@@ -45,7 +45,7 @@ function u({ ...e }) {
45
45
  )
46
46
  ] });
47
47
  }
48
- const b = y(s, {
48
+ const b = y("div", {
49
49
  shouldForwardProp: (e) => e !== "dark"
50
50
  })`
51
51
  position: relative;
package/lib/Icon/image.js CHANGED
@@ -1,34 +1,33 @@
1
- import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
- import { Box as h } from "@mui/material";
3
- import n from "../Img/index.js";
4
- import { styled as l } from "../Theme/index.js";
5
- function w({
1
+ import { jsxs as x, jsx as i } from "react/jsx-runtime";
2
+ import h from "../Img/index.js";
3
+ import { styled as n } from "../Theme/index.js";
4
+ function f({
6
5
  name: o,
7
6
  size: t = 36,
8
- alt: i = "",
9
- color: p = "#000000",
7
+ alt: p = "",
8
+ color: r = "#000000",
10
9
  prefix: e = "/images",
11
10
  showBadge: a = !1,
12
11
  style: s = {},
13
- ...x
12
+ ...d
14
13
  }) {
15
- const g = `${e}/${o}-${p.replace(/^#/, "")}.png`;
16
- return /* @__PURE__ */ d(c, { style: { width: t, height: t }, children: [
17
- /* @__PURE__ */ r(
18
- n,
14
+ const g = `${e}/${o}-${r.replace(/^#/, "")}.png`;
15
+ return /* @__PURE__ */ x(l, { style: { width: t, height: t }, children: [
16
+ /* @__PURE__ */ i(
17
+ h,
19
18
  {
20
19
  width: t,
21
20
  height: t,
22
- alt: i || o,
21
+ alt: p || o,
23
22
  src: g,
24
23
  style: Object.assign({ width: t }, s),
25
- ...x
24
+ ...d
26
25
  }
27
26
  ),
28
- a && /* @__PURE__ */ r("i", { className: "badge-point" })
27
+ a && /* @__PURE__ */ i("i", { className: "badge-point" })
29
28
  ] });
30
29
  }
31
- const c = l(h)`
30
+ const l = n("div")`
32
31
  position: relative;
33
32
  .badge-point {
34
33
  position: absolute;
@@ -44,5 +43,5 @@ const c = l(h)`
44
43
  }
45
44
  `;
46
45
  export {
47
- w as default
46
+ f as default
48
47
  };
@@ -1,23 +1,23 @@
1
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import x from "lodash/camelCase";
3
- import c from "lodash/upperFirst";
4
- import { Box as u, Typography as i } from "@mui/material";
1
+ import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
+ import c from "lodash/camelCase";
3
+ import x from "lodash/upperFirst";
4
+ import { Typography as e } from "@mui/material";
5
5
  import { styled as d } from "../Theme/index.js";
6
- function $({
6
+ function v({
7
7
  name: t,
8
- nameFormatter: a = (o) => typeof o == "string" ? o.split(" ").map((s) => c(x(s))).join(" ") : o,
8
+ nameFormatter: a = (o) => typeof o == "string" ? o.split(" ").map((s) => x(c(s))).join(" ") : o,
9
9
  layout: n = "horizontal",
10
10
  children: r,
11
11
  valueComponent: l = "div",
12
12
  nameWidth: m = 90,
13
13
  ...f
14
14
  }) {
15
- return /* @__PURE__ */ p(w, { layout: n, width: m, ...f, children: [
16
- /* @__PURE__ */ e(i, { color: "textSecondary", className: "info-row__name", children: a(t) }),
17
- r && /* @__PURE__ */ e(i, { color: "textPrimary", component: l, className: "info-row__value", children: r })
15
+ return /* @__PURE__ */ p(u, { layout: n, width: m, ...f, children: [
16
+ /* @__PURE__ */ i(e, { color: "textSecondary", className: "info-row__name", children: a(t) }),
17
+ r && /* @__PURE__ */ i(e, { color: "textPrimary", component: l, className: "info-row__value", children: r })
18
18
  ] });
19
19
  }
20
- const w = d(u)`
20
+ const u = d("div")`
21
21
  display: flex;
22
22
  flex-direction: ${(t) => t.layout === "vertical" ? "column" : "row"};
23
23
  justify-content: flex-start;
@@ -54,5 +54,5 @@ const w = d(u)`
54
54
  }
55
55
  `;
56
56
  export {
57
- $ as default
57
+ v as default
58
58
  };
@@ -1,5 +1,5 @@
1
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
- import { useMemo as M, useEffect as f } from "react";
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
5
  import { Box as d, useTheme as R, Container as T } from "@mui/material";
@@ -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 b from "./sidebar.js";
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 f(() => {
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
- ...h
46
+ ...c
47
47
  }) {
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 = {
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 f(() => {
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__ */ n(X, { sx: N, ...h, className: S, sidebarWidth: v, children: [
55
+ }, []), /* @__PURE__ */ s(X, { sx: N, ...c, className: S, sidebarWidth: v, children: [
56
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(
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: s,
61
+ items: n,
62
62
  closeMenu: I,
63
63
  bgColor: "transparent",
64
- activeTextColor: c.palette.primary.main
64
+ activeTextColor: h.palette.primary.main
65
65
  }
66
66
  ) : null : null }),
67
- /* @__PURE__ */ n(
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 && C && /* @__PURE__ */ r(
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(b, { links: o, dense: i }) : /* @__PURE__ */ r(d, { className: "dashboard-sidebar-container", children: /* @__PURE__ */ r(b, { links: o, dense: i }) })
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__ */ n(d, { className: "dashboard-main", id: "arc__dashboard-main", children: [
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: H,
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
- $ && /* @__PURE__ */ r(q, { dark: c.palette.mode === "dark", ...y })
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(d, {
119
- shouldForwardProp: (e) => e !== "sidebarWidth"
120
- })`
118
+ const X = u(d)`
121
119
  &.dashboard {
122
120
  display: flex;
123
121
  flex-direction: column;
@@ -1,39 +1,39 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { Box as x, Typography as b } from "@mui/material";
2
+ import { Typography as x } from "@mui/material";
3
3
  import n from "clsx";
4
- import { styled as c } from "../../Theme/index.js";
5
- import { NavLink as h } from "./external-link.js";
4
+ import { styled as b } from "../../Theme/index.js";
5
+ import { NavLink as c } from "./external-link.js";
6
6
  function d(e, i) {
7
7
  if (e.children?.length)
8
- return m(e, i);
8
+ return h(e, i);
9
9
  const { url: a, icon: r, title: p, showBadge: s, external: l, active: u } = e;
10
10
  return /* @__PURE__ */ t("li", { className: "layout-sidebar-item", children: /* @__PURE__ */ o(
11
- h,
11
+ c,
12
12
  {
13
13
  external: l,
14
14
  to: a,
15
15
  className: ({ isActive: g }) => n("layout-sidebar-link", { "layout-sidebar-link--active": l ? u : g }),
16
16
  children: [
17
17
  r && /* @__PURE__ */ t("span", { className: `layout-sidebar-icon ${s ? "layout-sidebar-badge" : ""}`, children: r }),
18
- /* @__PURE__ */ t(b, { component: "span", className: "layout-sidebar-link-text", children: p })
18
+ /* @__PURE__ */ t(x, { component: "span", className: "layout-sidebar-link-text", children: p })
19
19
  ]
20
20
  }
21
21
  ) }, `${a}-${i}`);
22
22
  }
23
- function m(e, i) {
23
+ function h(e, i) {
24
24
  return /* @__PURE__ */ o("li", { className: "layout-sidebar-group", children: [
25
25
  /* @__PURE__ */ t("span", { className: "layout-sidebar-group-title", children: e.title }),
26
26
  /* @__PURE__ */ t("ul", { children: e.children.map(d) })
27
27
  ] }, `group-${e.title}-${i}`);
28
28
  }
29
- function z({ links: e, addons: i = void 0, dense: a = !1, ...r }) {
30
- return /* @__PURE__ */ o(f, { ...r, className: n({ "layout-sidebar-dense": a }), children: [
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
31
  /* @__PURE__ */ t("ul", { children: e.map(d) }),
32
32
  /* @__PURE__ */ t("div", { style: { flex: 1 } }),
33
33
  i
34
34
  ] });
35
35
  }
36
- const y = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", f = c(x)`
36
+ const m = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", y = b("div")`
37
37
  display: flex;
38
38
  flex-direction: column;
39
39
  ul {
@@ -52,7 +52,7 @@ const y = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230,
52
52
  &:hover,
53
53
  &.layout-sidebar-link--active {
54
54
  color: ${(e) => e.theme.palette.primary.main};
55
- background: ${y};
55
+ background: ${m};
56
56
  border-left-color: ${(e) => e.theme.palette.primary.main};
57
57
  }
58
58
  }
@@ -160,5 +160,5 @@ const y = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230,
160
160
  }
161
161
  `;
162
162
  export {
163
- z as default
163
+ N as default
164
164
  };
@@ -1,13 +1,13 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { useState as c, useEffect as $ } from "react";
2
+ import { useState as p, useEffect as $ } from "react";
3
3
  import P from "react-helmet";
4
- import { Box as t, Drawer as z, Container as H } from "@mui/material";
4
+ import { Box as c, Drawer as z, Container as H } from "@mui/material";
5
5
  import { useSize as S } from "ahooks";
6
6
  import W from "./sidebar.js";
7
7
  import j from "./header.js";
8
8
  import C from "../../Footer/index.js";
9
9
  import { styled as F } from "../../Theme/index.js";
10
- const O = F(t)`
10
+ const O = F("div")`
11
11
  &.dashboard {
12
12
  display: flex;
13
13
  flex-direction: column;
@@ -38,7 +38,7 @@ const O = F(t)`
38
38
  `;
39
39
  function R({
40
40
  links: o = [],
41
- brand: d = "",
41
+ brand: t = "",
42
42
  description: h = "",
43
43
  images: f,
44
44
  title: b = "Home",
@@ -49,35 +49,35 @@ function R({
49
49
  contentLayout: g = "column",
50
50
  className: y = "",
51
51
  homeUrl: v = "/",
52
- logo: s = void 0,
52
+ logo: d = void 0,
53
53
  children: N,
54
54
  ...k
55
55
  }) {
56
- const r = S(document.body)?.width || 0, [n, M] = c(r >= 960 ? "permanent" : "temporary"), [i, l] = c(n === "permanent");
56
+ const r = S(document.body)?.width || 0, [s, M] = p(r >= 960 ? "permanent" : "temporary"), [n, i] = p(s === "permanent");
57
57
  $(() => {
58
- const p = r >= 960 ? "permanent" : "temporary";
59
- M(p), l(p !== "temporary");
58
+ const m = r >= 960 ? "permanent" : "temporary";
59
+ M(m), i(m !== "temporary");
60
60
  }, [r]);
61
- const m = () => {
62
- l(!i);
61
+ const l = () => {
62
+ i(!n);
63
63
  }, D = _ || g === "row";
64
64
  return /* @__PURE__ */ a(O, { className: `dashboard ${y}`, ...k, children: [
65
- /* @__PURE__ */ e(P, { title: `${b}-${d}` }),
65
+ /* @__PURE__ */ e(P, { title: `${b}-${t}` }),
66
66
  /* @__PURE__ */ e(
67
67
  j,
68
68
  {
69
69
  className: "dashboard__header",
70
- onToggleMenu: m,
71
- brand: d,
70
+ onToggleMenu: l,
71
+ brand: t,
72
72
  brandAddon: u,
73
73
  description: h,
74
74
  addons: w,
75
75
  homeUrl: v,
76
- logo: s
76
+ logo: d
77
77
  }
78
78
  ),
79
79
  /* @__PURE__ */ a(
80
- t,
80
+ c,
81
81
  {
82
82
  className: "dashboard__body",
83
83
  sx: {
@@ -87,16 +87,16 @@ function R({
87
87
  /* @__PURE__ */ e(
88
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(W, { className: "dashboard__sidebar", images: f, links: o, prefix: x, logo: s })
96
+ children: /* @__PURE__ */ e(W, { className: "dashboard__sidebar", images: f, links: o, prefix: x, logo: d })
97
97
  }
98
98
  ),
99
- /* @__PURE__ */ a(t, { className: "dashboard__main", children: [
99
+ /* @__PURE__ */ a(c, { className: "dashboard__main", children: [
100
100
  /* @__PURE__ */ e(H, { maxWidth: D ? !1 : "lg", className: "dashboard__content", children: N }),
101
101
  /* @__PURE__ */ e(C, {})
102
102
  ] })