@arcblock/ux 3.0.12 → 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.
Files changed (73) 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/PricingTable/index.js +9 -9
  30. package/lib/Result/result.js +14 -14
  31. package/lib/Screenshot/BaseScreenshot/index.js +9 -10
  32. package/lib/Screenshot/index.js +26 -27
  33. package/lib/Video/index.js +11 -11
  34. package/lib/Wallet/Action.js +12 -12
  35. package/lib/Wallet/Download.js +11 -11
  36. package/lib/WechatPrompt/index.js +1 -1
  37. package/package.json +7 -7
  38. package/src/ActivityIndicator/index.jsx +2 -3
  39. package/src/Address/Address.stories.jsx +1 -2
  40. package/src/Alert/index.jsx +2 -2
  41. package/src/AnimationWaiter/index.jsx +2 -2
  42. package/src/Blocklet/blocklet.jsx +2 -2
  43. package/src/Blocklet/utils.jsx +1 -2
  44. package/src/BlockletNFT/index.jsx +2 -2
  45. package/src/BlockletV2/utils.js +1 -2
  46. package/src/Center/index.tsx +1 -2
  47. package/src/CodeBlock/LightBox.tsx +1 -2
  48. package/src/Colors/Colors.stories.jsx +1 -1
  49. package/src/CookieConsent/index.tsx +1 -1
  50. package/src/CountDown/index.tsx +2 -2
  51. package/src/DID/DID.stories.jsx +1 -2
  52. package/src/Datatable/CustomToolbar.jsx +2 -3
  53. package/src/Datatable/TableSearch.jsx +2 -2
  54. package/src/Datatable/index.jsx +4 -4
  55. package/src/Earth/index.tsx +2 -3
  56. package/src/Footer/index.tsx +1 -1
  57. package/src/Icon/image.tsx +1 -2
  58. package/src/InfoRow/index.tsx +2 -2
  59. package/src/Layout/dashboard/index.tsx +1 -3
  60. package/src/Layout/dashboard/sidebar.tsx +2 -2
  61. package/src/Layout/dashboard-legacy/index.tsx +1 -1
  62. package/src/Layout/dashboard-legacy/sidebar.tsx +2 -2
  63. package/src/Layout/index.tsx +1 -2
  64. package/src/Metric/index.tsx +2 -2
  65. package/src/NFTDisplay/svg-embedder/inline-svg.tsx +2 -2
  66. package/src/PricingTable/index.tsx +2 -2
  67. package/src/Result/result.tsx +1 -1
  68. package/src/Screenshot/BaseScreenshot/index.tsx +2 -2
  69. package/src/Screenshot/index.tsx +3 -3
  70. package/src/Video/index.tsx +2 -2
  71. package/src/Wallet/Action.tsx +2 -2
  72. package/src/Wallet/Download.tsx +2 -2
  73. package/src/WechatPrompt/index.tsx +1 -1
@@ -1,12 +1,12 @@
1
1
  import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
2
  import { memo as k } from "react";
3
3
  import { useLocation as $, Link as s } from "react-router-dom";
4
- import { Box as w, Button as z, useTheme as v, Typography as I } from "@mui/material";
4
+ import { Button as w, useTheme as z, Typography as v } from "@mui/material";
5
5
  import { teal as l } from "@mui/material/colors";
6
- import j from "../../Icon/image.js";
7
- import L from "../../Logo/index.js";
8
- import { styled as d } from "../../Theme/index.js";
9
- function C({
6
+ import I from "../../Icon/image.js";
7
+ import j from "../../Logo/index.js";
8
+ import { styled as c } from "../../Theme/index.js";
9
+ function q({
10
10
  images: e,
11
11
  links: m,
12
12
  prefix: p = "/images",
@@ -14,14 +14,14 @@ function C({
14
14
  logo: f = void 0,
15
15
  ...x
16
16
  }) {
17
- const u = v(), b = $(), h = (o, n) => new RegExp(`/${n}`).test(b.pathname);
18
- return /* @__PURE__ */ a(T, { ...x, children: [
19
- /* @__PURE__ */ t(s, { to: "/", className: "sidebar-logo", children: f || /* @__PURE__ */ t(L, { showText: !1, size: 20 }) }),
17
+ const u = z(), b = $(), h = (o, n) => new RegExp(`/${n}`).test(b.pathname);
18
+ return /* @__PURE__ */ a(L, { ...x, children: [
19
+ /* @__PURE__ */ t(s, { to: "/", className: "sidebar-logo", children: f || /* @__PURE__ */ t(j, { showText: !1, size: 20 }) }),
20
20
  m.map(({ url: o, name: n, title: r, showBadge: y }) => {
21
21
  const i = h(o, n);
22
- return /* @__PURE__ */ a(A, { component: s, selected: i, to: o, children: [
22
+ return /* @__PURE__ */ a(T, { component: s, selected: i, to: o, children: [
23
23
  /* @__PURE__ */ t(
24
- j,
24
+ I,
25
25
  {
26
26
  name: e[n],
27
27
  size: 36,
@@ -30,14 +30,14 @@ function C({
30
30
  showBadge: y
31
31
  }
32
32
  ),
33
- /* @__PURE__ */ t(I, { component: "span", className: "menu-title", children: r })
33
+ /* @__PURE__ */ t(v, { component: "span", className: "menu-title", children: r })
34
34
  ] }, o);
35
35
  }),
36
36
  /* @__PURE__ */ t("div", { style: { flex: 1 } }),
37
37
  g
38
38
  ] });
39
39
  }
40
- const T = k(d(w)`
40
+ const L = k(c("div")`
41
41
  flex: 1;
42
42
  display: flex;
43
43
  flex-direction: column;
@@ -58,7 +58,7 @@ const T = k(d(w)`
58
58
  display: block;
59
59
  }
60
60
  }
61
- `), c = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", A = d(z)`
61
+ `), d = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", T = c(w)`
62
62
  && {
63
63
  display: flex;
64
64
  flex-direction: column;
@@ -66,13 +66,13 @@ const T = k(d(w)`
66
66
  align-items: center;
67
67
  width: 100%;
68
68
  transition: all 200ms ease-in-out;
69
- background: ${(e) => e.selected ? c : ""};
69
+ background: ${(e) => e.selected ? d : ""};
70
70
  padding: 24px 0;
71
71
  border-left: 2px solid ${(e) => e.selected ? l.A700 : "transparent"};
72
72
  border-radius: 0;
73
73
 
74
74
  &:hover {
75
- background: ${c};
75
+ background: ${d};
76
76
  border-left-color: ${l.A700};
77
77
  }
78
78
 
@@ -89,5 +89,5 @@ const T = k(d(w)`
89
89
  }
90
90
  `;
91
91
  export {
92
- C as default
92
+ q as default
93
93
  };
@@ -1,22 +1,22 @@
1
- import { jsx as e, jsxs as o, Fragment as O } from "react/jsx-runtime";
2
- import { useState as P, useEffect as R } from "react";
3
- import W from "react-helmet";
4
- import { Box as $, Container as t, Toolbar as u, Divider as C, List as G, Link as v, ListItemButton as M, ListItemText as j, AppBar as E, IconButton as F, Typography as w, Drawer as S } from "@mui/material";
5
- import { Menu as Z } from "@mui/icons-material";
6
- import A from "../Footer/index.js";
7
- import H from "../Wallet/Open.js";
1
+ import { jsx as e, jsxs as o, Fragment as P } from "react/jsx-runtime";
2
+ import { useState as R, useEffect as W } from "react";
3
+ import $ from "react-helmet";
4
+ import { Container as t, Toolbar as u, Divider as B, List as C, Link as v, ListItemButton as G, ListItemText as M, AppBar as j, IconButton as E, Typography as w, Drawer as F } from "@mui/material";
5
+ import { Menu as S } from "@mui/icons-material";
6
+ import Z from "../Footer/index.js";
7
+ import A from "../Wallet/Open.js";
8
8
  import b from "../Icon/index.js";
9
- import U from "../Logo/index.js";
9
+ import H from "../Logo/index.js";
10
10
  import { styled as x } from "../Theme/index.js";
11
- function ne({
11
+ function ie({
12
12
  title: i,
13
13
  brand: l,
14
14
  description: s = void 0,
15
15
  links: a = [],
16
- logo: c = /* @__PURE__ */ e(U, { showText: !1, style: { width: "40px", height: "40px" } }),
16
+ logo: c = /* @__PURE__ */ e(H, { showText: !1, style: { width: "40px", height: "40px" } }),
17
17
  showLogo: d = !1,
18
18
  addons: y = void 0,
19
- footer: k = /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(A, {}) }),
19
+ footer: k = /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(Z, {}) }),
20
20
  baseUrl: h = "",
21
21
  homeUrl: N = "/",
22
22
  variant: z = "shadow",
@@ -24,10 +24,10 @@ function ne({
24
24
  children: p,
25
25
  ...D
26
26
  }) {
27
- const [m, I] = P(!1), f = () => {
27
+ const [m, I] = R(!1), f = () => {
28
28
  I(!m);
29
29
  };
30
- if (R(() => {
30
+ if (W(() => {
31
31
  const { searchParams: r } = new URL(window.location.href), g = r.get("inviter");
32
32
  g && window.localStorage.setItem("inviter", g);
33
33
  }, []), L)
@@ -37,23 +37,23 @@ function ne({
37
37
  a.forEach((r) => {
38
38
  T.startsWith(r.url) && r.url.length > n.length && (n = r.url);
39
39
  });
40
- const B = /* @__PURE__ */ o("div", { children: [
40
+ const O = /* @__PURE__ */ o("div", { children: [
41
41
  /* @__PURE__ */ o(u, { className: "toolbar toolbar--drawer", children: [
42
42
  !!d && /* @__PURE__ */ e("div", { className: "menu-logo", children: c }),
43
43
  /* @__PURE__ */ e("div", { style: { flexGrow: 1, overflow: "hidden", textOverflow: "ellipsis" }, children: l })
44
44
  ] }),
45
- /* @__PURE__ */ e(C, {}),
46
- /* @__PURE__ */ e(G, { children: a.map((r) => /* @__PURE__ */ e(v, { className: "nav-link", href: r.url, underline: "hover", children: /* @__PURE__ */ e(M, { className: n === r.url ? "drawer-highlight-nav" : "", children: /* @__PURE__ */ o(j, { children: [
45
+ /* @__PURE__ */ e(B, {}),
46
+ /* @__PURE__ */ e(C, { children: a.map((r) => /* @__PURE__ */ e(v, { className: "nav-link", href: r.url, underline: "hover", children: /* @__PURE__ */ e(G, { className: n === r.url ? "drawer-highlight-nav" : "", children: /* @__PURE__ */ o(M, { children: [
47
47
  typeof r.icon == "string" ? /* @__PURE__ */ e(b, { name: r.icon, size: 18 * (r.iconZoom || 1), color: "inherit", style: { marginRight: "5px" } }) : r.icon,
48
48
  r.title
49
49
  ] }) }) }, r.url)) })
50
50
  ] });
51
- return /* @__PURE__ */ o(O, { children: [
52
- /* @__PURE__ */ o(q, { ...D, children: [
53
- /* @__PURE__ */ e(W, { title: i }),
54
- /* @__PURE__ */ e(E, { position: "fixed", className: `appbar appbar--${z}`, color: "default", style: { height: 56 }, children: /* @__PURE__ */ e(t, { disableGutters: !0, children: /* @__PURE__ */ o(u, { className: "toolbar", children: [
51
+ return /* @__PURE__ */ o(P, { children: [
52
+ /* @__PURE__ */ o(U, { ...D, children: [
53
+ /* @__PURE__ */ e($, { title: i }),
54
+ /* @__PURE__ */ e(j, { position: "fixed", className: `appbar appbar--${z}`, color: "default", style: { height: 56 }, children: /* @__PURE__ */ e(t, { disableGutters: !0, children: /* @__PURE__ */ o(u, { className: "toolbar", children: [
55
55
  /* @__PURE__ */ e(
56
- F,
56
+ E,
57
57
  {
58
58
  color: "inherit",
59
59
  "aria-label": "open drawer",
@@ -61,7 +61,7 @@ function ne({
61
61
  onClick: f,
62
62
  className: "menu-button",
63
63
  size: "large",
64
- children: /* @__PURE__ */ e(Z, {})
64
+ children: /* @__PURE__ */ e(S, {})
65
65
  }
66
66
  ),
67
67
  !!d && /* @__PURE__ */ e("div", { className: "menu-logo", children: c }),
@@ -109,10 +109,10 @@ function ne({
109
109
  /* @__PURE__ */ e("div", { className: "toolbar" }),
110
110
  /* @__PURE__ */ e(t, { style: { marginTop: 16, flex: 1 }, children: p }),
111
111
  k,
112
- !!h && /* @__PURE__ */ e(H, { locale: "zh", link: h })
112
+ !!h && /* @__PURE__ */ e(A, { locale: "zh", link: h })
113
113
  ] }),
114
- /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
115
- S,
114
+ /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
115
+ F,
116
116
  {
117
117
  variant: "temporary",
118
118
  open: m,
@@ -125,12 +125,12 @@ function ne({
125
125
  // Better open performance on mobile.
126
126
  disablePortal: !0
127
127
  },
128
- children: B
128
+ children: O
129
129
  }
130
130
  ) })
131
131
  ] });
132
132
  }
133
- const q = x($)`
133
+ const U = x("div")`
134
134
  width: 100%;
135
135
  min-height: 100vh;
136
136
  display: flex;
@@ -213,7 +213,7 @@ const q = x($)`
213
213
  }
214
214
  }
215
215
  }
216
- `, J = x("nav")`
216
+ `, q = x("nav")`
217
217
  width: 240px;
218
218
  .drawer-paper {
219
219
  width: 240px;
@@ -241,5 +241,5 @@ const q = x($)`
241
241
  }
242
242
  `;
243
243
  export {
244
- ne as default
244
+ ie as default
245
245
  };
@@ -1,21 +1,21 @@
1
1
  import { jsx as i, jsxs as m, Fragment as d } from "react/jsx-runtime";
2
- import { Box as x, Link as h } from "@mui/material";
3
- import f from "../Icon/image.js";
4
- import { styled as g } from "../Theme/index.js";
5
- function $({
2
+ import { Link as x } from "@mui/material";
3
+ import h from "../Icon/image.js";
4
+ import { styled as f } from "../Theme/index.js";
5
+ function z({
6
6
  icon: e,
7
7
  value: r,
8
8
  name: t,
9
9
  url: a = "",
10
10
  animated: o = !1,
11
- LinkComponent: s = h,
11
+ LinkComponent: s = x,
12
12
  prefix: l = "/images",
13
13
  iconColor: p = "#222222",
14
14
  iconStyle: c = {}
15
15
  }) {
16
16
  const n = /* @__PURE__ */ m(d, { children: [
17
17
  /* @__PURE__ */ i("div", { className: "metric__image", children: /* @__PURE__ */ i(
18
- f,
18
+ h,
19
19
  {
20
20
  name: e,
21
21
  alt: typeof t == "string" ? t : "",
@@ -36,9 +36,9 @@ function $({
36
36
  /* @__PURE__ */ i("div", { className: "metric__name", children: t })
37
37
  ] })
38
38
  ] });
39
- return /* @__PURE__ */ i(_, { children: a ? /* @__PURE__ */ i(s, { to: a, children: n }) : n });
39
+ return /* @__PURE__ */ i(g, { children: a ? /* @__PURE__ */ i(s, { to: a, children: n }) : n });
40
40
  }
41
- const _ = g(x)`
41
+ const g = f("div")`
42
42
  border-left: 1px solid ${(e) => e.theme.palette.divider};
43
43
  padding: 10px 0 10px 16px;
44
44
  @media (max-width: ${(e) => e.theme.breakpoints.values.sm}px) {
@@ -111,5 +111,5 @@ const _ = g(x)`
111
111
  }
112
112
  `;
113
113
  export {
114
- $ as default
114
+ z as default
115
115
  };
@@ -1,15 +1,14 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import n from "react-shadow/emotion";
3
- import { Box as e } from "@mui/material";
2
+ import r from "react-shadow/emotion";
4
3
  import { styled as o } from "../../Theme/index.js";
5
- function a({ svg: r, ...i }) {
6
- return /* @__PURE__ */ t(m, { ...i, children: /* @__PURE__ */ t(h, { dangerouslySetInnerHTML: { __html: r } }) });
4
+ function l({ svg: i, ...n }) {
5
+ return /* @__PURE__ */ t(e, { ...n, children: /* @__PURE__ */ t(d, { dangerouslySetInnerHTML: { __html: i } }) });
7
6
  }
8
- const m = o(n.span)`
7
+ const e = o(r.span)`
9
8
  display: block;
10
9
  width: 100%;
11
10
  height: 100%;
12
- `, h = o(e)`
11
+ `, d = o("div")`
13
12
  &,
14
13
  & > svg {
15
14
  height: 100%;
@@ -19,5 +18,5 @@ const m = o(n.span)`
19
18
  }
20
19
  `;
21
20
  export {
22
- a as default
21
+ l as default
23
22
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { Box as a, Grid as n } from "@mui/material";
3
- import m from "./PricingPlan.js";
4
- import { styled as o } from "../Theme/index.js";
5
- import { withDeprecated as d } from "../Util/deprecate.js";
6
- function f({ plans: i = [] }) {
7
- return i && i.length > 0 ? /* @__PURE__ */ e(c, { variant: "even", children: /* @__PURE__ */ e(
2
+ import { Grid as n } from "@mui/material";
3
+ import a from "./PricingPlan.js";
4
+ import { styled as m } from "../Theme/index.js";
5
+ import { withDeprecated as o } from "../Util/deprecate.js";
6
+ function d({ plans: i = [] }) {
7
+ return i && i.length > 0 ? /* @__PURE__ */ e(f, { variant: "even", children: /* @__PURE__ */ e(
8
8
  n,
9
9
  {
10
10
  container: !0,
@@ -21,14 +21,14 @@ function f({ plans: i = [] }) {
21
21
  sm: 6,
22
22
  md: 3
23
23
  },
24
- children: /* @__PURE__ */ e(m, { plan: t })
24
+ children: /* @__PURE__ */ e(a, { plan: t })
25
25
  },
26
26
  r
27
27
  ))
28
28
  }
29
29
  ) }) : null;
30
30
  }
31
- const u = d(f, { name: "PricingTable" }), c = o(a)`
31
+ const g = o(d, { name: "PricingTable" }), f = m("div")`
32
32
  padding: 100px 0;
33
33
  text-align: center;
34
34
  background-color: ${(i) => i.variant === "even" ? "#fbfbfb" : "#ffffff"};
@@ -42,5 +42,5 @@ const u = d(f, { name: "PricingTable" }), c = o(a)`
42
42
  }
43
43
  `;
44
44
  export {
45
- u as default
45
+ g as default
46
46
  };
@@ -1,11 +1,11 @@
1
- import { jsxs as f, jsx as n } from "react/jsx-runtime";
2
- import { Box as t } from "@mui/material";
1
+ import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
+ import { Box as n } from "@mui/material";
3
3
  import { styled as c } from "../Theme/index.js";
4
- function g({ icon: r = null, title: o = "", description: e = "", extra: i = null, ...l }) {
4
+ function g({ icon: r = null, title: t = "", description: o = "", extra: i = null, ...l }) {
5
5
  return /* @__PURE__ */ f(s, { ...l, children: [
6
6
  r,
7
- typeof o == "string" ? /* @__PURE__ */ n(
8
- t,
7
+ typeof t == "string" ? /* @__PURE__ */ e(
8
+ n,
9
9
  {
10
10
  sx: {
11
11
  mt: 3,
@@ -14,11 +14,11 @@ function g({ icon: r = null, title: o = "", description: e = "", extra: i = null
14
14
  color: "#47494E",
15
15
  textAlign: "center"
16
16
  },
17
- children: o
17
+ children: t
18
18
  }
19
- ) : o,
20
- typeof e == "string" ? /* @__PURE__ */ n(
21
- t,
19
+ ) : t,
20
+ typeof o == "string" ? /* @__PURE__ */ e(
21
+ n,
22
22
  {
23
23
  sx: {
24
24
  mt: 1,
@@ -26,11 +26,11 @@ function g({ icon: r = null, title: o = "", description: e = "", extra: i = null
26
26
  color: "#7F828B",
27
27
  textAlign: "center"
28
28
  },
29
- children: e
29
+ children: o
30
30
  }
31
- ) : e,
32
- /* @__PURE__ */ n(
33
- t,
31
+ ) : o,
32
+ /* @__PURE__ */ e(
33
+ n,
34
34
  {
35
35
  sx: {
36
36
  mt: 3
@@ -40,7 +40,7 @@ function g({ icon: r = null, title: o = "", description: e = "", extra: i = null
40
40
  )
41
41
  ] });
42
42
  }
43
- const s = c(t)`
43
+ const s = c("div")`
44
44
  box-sizing: border-box;
45
45
  display: flex;
46
46
  flex-direction: column;
@@ -1,21 +1,20 @@
1
1
  import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
- import { Box as p } from "@mui/material";
3
- import m from "./shells/Phone.js";
2
+ import p from "./shells/Phone.js";
4
3
  import f from "./shells/Macbook.js";
5
- import { styled as u } from "../../Theme/index.js";
6
- const b = {
7
- phone: m,
4
+ import { styled as m } from "../../Theme/index.js";
5
+ const u = {
6
+ phone: p,
8
7
  macbook: f
9
8
  };
10
- function k({ width: e = 0, children: i, type: s = "phone", ...n }) {
11
- const r = s.toLowerCase(), { Shell: a, ratio: l, screenData: t, width: d } = b[r || "phone"], h = u(p)`
9
+ function $({ width: e = 0, children: i, type: s = "phone", ...n }) {
10
+ const r = s.toLowerCase(), { Shell: a, ratio: d, screenData: t, width: l } = u[r || "phone"], h = m("div")`
12
11
  position: relative;
13
12
  display: inline-block;
14
- width: ${e || `${d}px`};
13
+ width: ${e || `${l}px`};
15
14
  &:after {
16
15
  display: block;
17
16
  content: '';
18
- padding-bottom: ${l * 100}%;
17
+ padding-bottom: ${d * 100}%;
19
18
  }
20
19
  > svg {
21
20
  display: block;
@@ -53,5 +52,5 @@ function k({ width: e = 0, children: i, type: s = "phone", ...n }) {
53
52
  ] }) });
54
53
  }
55
54
  export {
56
- k as default
55
+ $ as default
57
56
  };
@@ -1,10 +1,9 @@
1
- import { jsx as s, jsxs as N } from "react/jsx-runtime";
2
- import { useRef as k, useState as f, useEffect as S, Children as g, cloneElement as $, createElement as z } from "react";
3
- import { Box as v } from "@mui/material";
1
+ import { jsx as s, jsxs as x } from "react/jsx-runtime";
2
+ import { useRef as N, useState as f, useEffect as k, Children as v, cloneElement as S, createElement as $ } from "react";
4
3
  import a from "lodash/isUndefined";
5
- import { mergeProps as C } from "../Util/index.js";
6
- import { styled as b } from "../Theme/index.js";
7
- import j from "./BaseScreenshot/index.js";
4
+ import { mergeProps as z } from "../Util/index.js";
5
+ import { styled as g } from "../Theme/index.js";
6
+ import C from "./BaseScreenshot/index.js";
8
7
  /* empty css */
9
8
  const u = {
10
9
  "iphone-x": {
@@ -72,33 +71,33 @@ const u = {
72
71
  width: 200,
73
72
  scale: 1
74
73
  }
75
- }, E = {
74
+ }, j = {
76
75
  img: ["alt", "title", "src", "srcSet", "sizes", "loading", "key", "children"],
77
76
  video: ["alt", "title", "muted", "autoplay", "loop", "key", "children"]
78
- }, O = (t) => [
79
- z(
77
+ }, E = (t) => [
78
+ $(
80
79
  t.type,
81
- E[t.type].reduce((e, i) => (e[i] = t.props[i], e), {})
80
+ j[t.type].reduce((e, i) => (e[i] = t.props[i], e), {})
82
81
  )
83
- ], w = (t, e = !0) => {
82
+ ], b = (t, e = !0) => {
84
83
  for (let i = 0; i < t.length; i++) {
85
84
  const r = t[i];
86
85
  if (["img", "video"].includes(r.type))
87
- return O(r);
86
+ return E(r);
88
87
  if (r.props && r.props.children) {
89
- const n = g.toArray(r.props.children), o = w(n, !1);
88
+ const n = v.toArray(r.props.children), o = b(n, !1);
90
89
  if (o)
91
90
  return o;
92
91
  }
93
92
  }
94
93
  return e ? t : null;
95
94
  };
96
- function y(t) {
95
+ function w(t) {
97
96
  const e = Object.assign({}, t);
98
97
  a(e.type) && (e.type = "iphone-x"), a(e.className) && (e.className = ""), a(e.style) && (e.style = {}), a(e.width) && (e.width = 0), a(e.height) && (e.height = 0);
99
- const i = C(e, y, ["style", "width", "height"]), { type: r, children: n, style: o, className: c, width: p, height: m, ...l } = i, { zIndex: h = 0, borderRadius: d = 0 } = u[r] || {};
100
- return /* @__PURE__ */ N(
101
- H,
98
+ const i = z(e, w, ["style", "width", "height"]), { type: r, children: n, style: o, className: c, width: p, height: m, ...l } = i, { zIndex: h = 0, borderRadius: d = 0 } = u[r] || {};
99
+ return /* @__PURE__ */ x(
100
+ O,
102
101
  {
103
102
  ...l,
104
103
  type: r,
@@ -107,7 +106,7 @@ function y(t) {
107
106
  contentRadius: d,
108
107
  contentZIndex: h,
109
108
  children: [
110
- /* @__PURE__ */ s("div", { className: "device-frame", children: /* @__PURE__ */ s("div", { className: "device-content", children: w(g.toArray(n))?.map((R, x) => $(R, { key: x })) }) }),
109
+ /* @__PURE__ */ s("div", { className: "device-frame", children: /* @__PURE__ */ s("div", { className: "device-content", children: b(v.toArray(n))?.map((y, R) => S(y, { key: R })) }) }),
111
110
  /* @__PURE__ */ s("div", { className: "device-stripe" }),
112
111
  /* @__PURE__ */ s("div", { className: "device-header" }),
113
112
  /* @__PURE__ */ s("div", { className: "device-sensors" }),
@@ -117,7 +116,7 @@ function y(t) {
117
116
  }
118
117
  );
119
118
  }
120
- const H = b(v)`
119
+ const O = g("div")`
121
120
  @media (max-width: ${(t) => u[t.type].width}px) {
122
121
  transform-origin: 0 0;
123
122
  transform: scale(${(t) => u[t.type].scale});
@@ -136,9 +135,9 @@ const H = b(v)`
136
135
  height: 100.1%;
137
136
  }
138
137
  `;
139
- function P({ ...t }) {
140
- const e = k(null), [i, r] = f(), [n, o] = f(null);
141
- return S(() => {
138
+ function H({ ...t }) {
139
+ const e = N(null), [i, r] = f(), [n, o] = f(null);
140
+ return k(() => {
142
141
  let c = null;
143
142
  const p = () => {
144
143
  const { clientWidth: m } = e.current, { clientWidth: l, clientHeight: h } = e.current.children[0], d = m / l;
@@ -147,18 +146,18 @@ function P({ ...t }) {
147
146
  return e.current && (c = new ResizeObserver(p), c.observe(e.current)), () => {
148
147
  c && c.disconnect();
149
148
  };
150
- }, [e.current]), /* @__PURE__ */ s(W, { ref: e, style: { height: i }, children: /* @__PURE__ */ s(y, { ...t, style: { transform: n ? `scale(${n})` : void 0 } }) });
149
+ }, [e.current]), /* @__PURE__ */ s(P, { ref: e, style: { height: i }, children: /* @__PURE__ */ s(w, { ...t, style: { transform: n ? `scale(${n})` : void 0 } }) });
151
150
  }
152
- const W = b(v)`
151
+ const P = g("div")`
153
152
  div[type] {
154
153
  transform: scale(1);
155
154
  transform-origin: 0 0;
156
155
  }
157
156
  `;
158
- function _({ type: t, src: e = "", children: i, sx: r = {}, ...n }) {
157
+ function Z({ type: t, src: e = "", children: i, sx: r = {}, ...n }) {
159
158
  const o = t.toLowerCase();
160
- return ["phone", "macbook"].includes(o) ? /* @__PURE__ */ s(j, { type: o, sx: r, ...n, children: i || (e ? /* @__PURE__ */ s("img", { src: e, alt: "screenshot" }) : null) }) : /* @__PURE__ */ s(P, { type: t, sx: { ...r, margin: "auto" }, ...n, children: i || (e ? /* @__PURE__ */ s("img", { src: e, alt: "screenshot" }) : null) });
159
+ return ["phone", "macbook"].includes(o) ? /* @__PURE__ */ s(C, { type: o, sx: r, ...n, children: i || (e ? /* @__PURE__ */ s("img", { src: e, alt: "screenshot" }) : null) }) : /* @__PURE__ */ s(H, { type: t, sx: { ...r, margin: "auto" }, ...n, children: i || (e ? /* @__PURE__ */ s("img", { src: e, alt: "screenshot" }) : null) });
161
160
  }
162
161
  export {
163
- _ as default
162
+ Z as default
164
163
  };
@@ -1,27 +1,27 @@
1
1
  import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as u } from "react";
3
3
  import h from "react-player";
4
- import { Box as g, CircularProgress as m } from "@mui/material";
4
+ import { CircularProgress as m } from "@mui/material";
5
5
  import l from "lodash/isUndefined";
6
- import { mergeProps as b } from "../Util/index.js";
7
- import { styled as x } from "../Theme/index.js";
8
- function j(p) {
6
+ import { mergeProps as g } from "../Util/index.js";
7
+ import { styled as b } from "../Theme/index.js";
8
+ function x(p) {
9
9
  const e = Object.assign({}, p);
10
10
  l(e.width) && (e.width = 640), l(e.height) && (e.height = 400), l(e.style) && (e.style = {});
11
- const n = b(e, j, ["style"]), { url: o, width: i, height: r, style: y } = n, [s, a] = u(!1), d = Object.assign({ border: "none" }, y, {
12
- width: i,
11
+ const n = g(e, x, ["style"]), { url: i, width: o, height: r, style: y } = n, [s, a] = u(!1), d = Object.assign({ border: "none" }, y, {
12
+ width: o,
13
13
  height: r,
14
14
  visibility: s ? "visible" : "hidden"
15
15
  });
16
- return o.indexOf("v.qq.com") > 0 ? /* @__PURE__ */ c(f, { style: { width: i, height: r }, children: [
17
- /* @__PURE__ */ t("iframe", { title: o, style: d, src: o, onLoad: () => a(!0), allowFullScreen: !0 }),
16
+ return i.indexOf("v.qq.com") > 0 ? /* @__PURE__ */ c(f, { style: { width: o, height: r }, children: [
17
+ /* @__PURE__ */ t("iframe", { title: i, style: d, src: i, onLoad: () => a(!0), allowFullScreen: !0 }),
18
18
  !s && /* @__PURE__ */ t(m, { className: "loading-indicator", color: "primary" })
19
- ] }) : /* @__PURE__ */ c(f, { style: { width: i, height: r }, children: [
19
+ ] }) : /* @__PURE__ */ c(f, { style: { width: o, height: r }, children: [
20
20
  /* @__PURE__ */ t(h, { style: d, ...n, onReady: () => a(!0) }),
21
21
  !s && /* @__PURE__ */ t(m, { className: "loading-indicator", color: "primary" })
22
22
  ] });
23
23
  }
24
- const f = x(g)`
24
+ const f = b("div")`
25
25
  background-color: #222222;
26
26
  display: flex;
27
27
  justify-content: center;
@@ -36,5 +36,5 @@ const f = x(g)`
36
36
  }
37
37
  `;
38
38
  export {
39
- j as default
39
+ x as default
40
40
  };
@@ -1,18 +1,18 @@
1
1
  import { jsx as l, jsxs as o } from "react/jsx-runtime";
2
- import { Box as g, Typography as x } from "@mui/material";
2
+ import { Typography as g } from "@mui/material";
3
3
  import i from "lodash/isUndefined";
4
- import y from "./images/abtwallet.png";
5
- import { mergeProps as _ } from "../Util/index.js";
4
+ import x from "./images/abtwallet.png";
5
+ import { mergeProps as y } from "../Util/index.js";
6
6
  import c from "../Colors/themes/default.js";
7
- import h from "../Button/index.js";
8
- import { styled as u } from "../Theme/index.js";
9
- function w(t) {
7
+ import _ from "../Button/index.js";
8
+ import { styled as h } from "../Theme/index.js";
9
+ function u(t) {
10
10
  const e = Object.assign({}, t);
11
11
  i(e.action) && (e.action = "Login"), i(e.textLayout) && (e.textLayout = "vertical"), i(e.size) && (e.size = "medium"), i(e.style) && (e.style = {});
12
- const m = _(e, w, ["style"]), { action: n, size: p, textLayout: s, style: f = {}, ...d } = m, r = Object.assign({}, f, { border: "none", padding: 0 });
13
- return /* @__PURE__ */ l(h, { style: r, ...d, variant: "outlined", children: /* @__PURE__ */ o(z, { size: p, color: r.color, children: [
14
- /* @__PURE__ */ l("img", { src: y, className: "wallet-action__logo", alt: "DID Wallet" }),
15
- s === "vertical" && /* @__PURE__ */ o(x, { className: "wallet-action__text", component: "div", children: [
12
+ const m = y(e, u, ["style"]), { action: n, size: p, textLayout: s, style: f = {}, ...d } = m, r = Object.assign({}, f, { border: "none", padding: 0 });
13
+ return /* @__PURE__ */ l(_, { style: r, ...d, variant: "outlined", children: /* @__PURE__ */ o(w, { size: p, color: r.color, children: [
14
+ /* @__PURE__ */ l("img", { src: x, className: "wallet-action__logo", alt: "DID Wallet" }),
15
+ s === "vertical" && /* @__PURE__ */ o(g, { className: "wallet-action__text", component: "div", children: [
16
16
  /* @__PURE__ */ o("span", { className: "wallet-action__action", children: [
17
17
  n,
18
18
  " with"
@@ -38,7 +38,7 @@ const a = {
38
38
  large: 13,
39
39
  xlarge: 18
40
40
  }
41
- }, z = u(g)`
41
+ }, w = h("div")`
42
42
  display: flex;
43
43
  justify-content: center;
44
44
  align-items: center;
@@ -79,5 +79,5 @@ const a = {
79
79
  }
80
80
  `;
81
81
  export {
82
- w as default
82
+ u as default
83
83
  };