@arcblock/ux 3.0.10 → 3.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActivityIndicator/index.js +16 -16
- package/lib/Alert/index.js +17 -17
- package/lib/AnimationWaiter/index.js +13 -13
- package/lib/Blocklet/blocklet.js +15 -15
- package/lib/Blocklet/utils.d.ts +1 -1
- package/lib/Blocklet/utils.js +6 -5
- package/lib/BlockletNFT/index.js +23 -23
- package/lib/BlockletV2/utils.d.ts +1 -1
- package/lib/BlockletV2/utils.js +7 -6
- package/lib/Center/index.js +7 -6
- package/lib/CodeBlock/LightBox.d.ts +2 -3
- package/lib/CodeBlock/LightBox.js +3 -2
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +24 -23
- package/lib/Datatable/CustomToolbar.js +71 -71
- package/lib/Datatable/TableSearch.js +18 -18
- package/lib/Datatable/index.js +77 -77
- package/lib/Earth/index.js +47 -46
- package/lib/Footer/index.js +8 -8
- package/lib/Icon/image.js +17 -16
- package/lib/InfoRow/index.js +11 -11
- package/lib/Layout/dashboard/index.js +2 -2
- package/lib/Layout/dashboard/sidebar.js +12 -12
- package/lib/Layout/dashboard-legacy/index.js +20 -20
- package/lib/Layout/dashboard-legacy/sidebar.js +16 -16
- package/lib/Layout/index.js +29 -29
- package/lib/Metric/index.js +9 -9
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +7 -6
- package/lib/PricingTable/index.js +9 -9
- package/lib/Result/result.js +14 -14
- package/lib/Screenshot/BaseScreenshot/index.js +10 -9
- package/lib/Screenshot/index.js +27 -26
- package/lib/Video/index.js +11 -11
- package/lib/Wallet/Action.js +12 -12
- package/lib/Wallet/Download.js +11 -11
- package/lib/WechatPrompt/index.js +1 -1
- package/package.json +8 -8
- package/src/ActivityIndicator/index.jsx +3 -2
- package/src/Address/Address.stories.jsx +2 -1
- package/src/Alert/index.jsx +2 -2
- package/src/AnimationWaiter/index.jsx +2 -2
- package/src/Blocklet/blocklet.jsx +2 -2
- package/src/Blocklet/utils.jsx +2 -1
- package/src/BlockletNFT/index.jsx +2 -2
- package/src/BlockletV2/utils.js +2 -1
- package/src/Center/index.tsx +2 -1
- package/src/CodeBlock/LightBox.tsx +2 -1
- package/src/Colors/Colors.stories.jsx +1 -1
- package/src/CookieConsent/index.tsx +1 -1
- package/src/CountDown/index.tsx +2 -2
- package/src/DID/DID.stories.jsx +2 -1
- package/src/Datatable/CustomToolbar.jsx +3 -2
- package/src/Datatable/TableSearch.jsx +2 -2
- package/src/Datatable/index.jsx +4 -4
- package/src/Earth/index.tsx +3 -2
- package/src/Footer/index.tsx +1 -1
- package/src/Icon/image.tsx +2 -1
- package/src/InfoRow/index.tsx +2 -2
- package/src/Layout/dashboard/index.tsx +1 -1
- package/src/Layout/dashboard/sidebar.tsx +2 -2
- package/src/Layout/dashboard-legacy/index.tsx +1 -1
- package/src/Layout/dashboard-legacy/sidebar.tsx +2 -2
- package/src/Layout/index.tsx +2 -1
- package/src/Metric/index.tsx +2 -2
- package/src/NFTDisplay/svg-embedder/inline-svg.tsx +2 -2
- package/src/PricingTable/index.tsx +2 -2
- package/src/Result/result.tsx +1 -1
- package/src/Screenshot/BaseScreenshot/index.tsx +2 -2
- package/src/Screenshot/index.tsx +3 -3
- package/src/Video/index.tsx +2 -2
- package/src/Wallet/Action.tsx +2 -2
- package/src/Wallet/Download.tsx +2 -2
- package/src/WechatPrompt/index.tsx +1 -1
package/lib/Layout/index.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
import { jsx as e, jsxs as o, Fragment as
|
2
|
-
import { useState as
|
3
|
-
import
|
4
|
-
import { Container as t, Toolbar as u, Divider as
|
5
|
-
import { Menu as
|
6
|
-
import
|
7
|
-
import
|
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";
|
8
8
|
import b from "../Icon/index.js";
|
9
|
-
import
|
9
|
+
import U from "../Logo/index.js";
|
10
10
|
import { styled as x } from "../Theme/index.js";
|
11
|
-
function
|
11
|
+
function ne({
|
12
12
|
title: i,
|
13
13
|
brand: l,
|
14
14
|
description: s = void 0,
|
15
15
|
links: a = [],
|
16
|
-
logo: c = /* @__PURE__ */ e(
|
16
|
+
logo: c = /* @__PURE__ */ e(U, { 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(
|
19
|
+
footer: k = /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(A, {}) }),
|
20
20
|
baseUrl: h = "",
|
21
21
|
homeUrl: N = "/",
|
22
22
|
variant: z = "shadow",
|
@@ -24,10 +24,10 @@ function ie({
|
|
24
24
|
children: p,
|
25
25
|
...D
|
26
26
|
}) {
|
27
|
-
const [m, I] =
|
27
|
+
const [m, I] = P(!1), f = () => {
|
28
28
|
I(!m);
|
29
29
|
};
|
30
|
-
if (
|
30
|
+
if (R(() => {
|
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 ie({
|
|
37
37
|
a.forEach((r) => {
|
38
38
|
T.startsWith(r.url) && r.url.length > n.length && (n = r.url);
|
39
39
|
});
|
40
|
-
const
|
40
|
+
const B = /* @__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(
|
46
|
-
/* @__PURE__ */ e(
|
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: [
|
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(
|
52
|
-
/* @__PURE__ */ o(
|
53
|
-
/* @__PURE__ */ e(
|
54
|
-
/* @__PURE__ */ e(
|
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: [
|
55
55
|
/* @__PURE__ */ e(
|
56
|
-
|
56
|
+
F,
|
57
57
|
{
|
58
58
|
color: "inherit",
|
59
59
|
"aria-label": "open drawer",
|
@@ -61,7 +61,7 @@ function ie({
|
|
61
61
|
onClick: f,
|
62
62
|
className: "menu-button",
|
63
63
|
size: "large",
|
64
|
-
children: /* @__PURE__ */ e(
|
64
|
+
children: /* @__PURE__ */ e(Z, {})
|
65
65
|
}
|
66
66
|
),
|
67
67
|
!!d && /* @__PURE__ */ e("div", { className: "menu-logo", children: c }),
|
@@ -109,10 +109,10 @@ function ie({
|
|
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(
|
112
|
+
!!h && /* @__PURE__ */ e(H, { locale: "zh", link: h })
|
113
113
|
] }),
|
114
|
-
/* @__PURE__ */ e(
|
115
|
-
|
114
|
+
/* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
|
115
|
+
S,
|
116
116
|
{
|
117
117
|
variant: "temporary",
|
118
118
|
open: m,
|
@@ -125,12 +125,12 @@ function ie({
|
|
125
125
|
// Better open performance on mobile.
|
126
126
|
disablePortal: !0
|
127
127
|
},
|
128
|
-
children:
|
128
|
+
children: B
|
129
129
|
}
|
130
130
|
) })
|
131
131
|
] });
|
132
132
|
}
|
133
|
-
const
|
133
|
+
const q = x($)`
|
134
134
|
width: 100%;
|
135
135
|
min-height: 100vh;
|
136
136
|
display: flex;
|
@@ -213,7 +213,7 @@ const U = x("div")`
|
|
213
213
|
}
|
214
214
|
}
|
215
215
|
}
|
216
|
-
`,
|
216
|
+
`, J = x("nav")`
|
217
217
|
width: 240px;
|
218
218
|
.drawer-paper {
|
219
219
|
width: 240px;
|
@@ -241,5 +241,5 @@ const U = x("div")`
|
|
241
241
|
}
|
242
242
|
`;
|
243
243
|
export {
|
244
|
-
|
244
|
+
ne as default
|
245
245
|
};
|
package/lib/Metric/index.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
import { jsx as i, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import { styled as
|
5
|
-
function
|
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 $({
|
6
6
|
icon: e,
|
7
7
|
value: r,
|
8
8
|
name: t,
|
9
9
|
url: a = "",
|
10
10
|
animated: o = !1,
|
11
|
-
LinkComponent: s =
|
11
|
+
LinkComponent: s = h,
|
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
|
-
|
18
|
+
f,
|
19
19
|
{
|
20
20
|
name: e,
|
21
21
|
alt: typeof t == "string" ? t : "",
|
@@ -36,9 +36,9 @@ function z({
|
|
36
36
|
/* @__PURE__ */ i("div", { className: "metric__name", children: t })
|
37
37
|
] })
|
38
38
|
] });
|
39
|
-
return /* @__PURE__ */ i(
|
39
|
+
return /* @__PURE__ */ i(_, { children: a ? /* @__PURE__ */ i(s, { to: a, children: n }) : n });
|
40
40
|
}
|
41
|
-
const
|
41
|
+
const _ = g(x)`
|
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 = f("div")`
|
|
111
111
|
}
|
112
112
|
`;
|
113
113
|
export {
|
114
|
-
|
114
|
+
$ as default
|
115
115
|
};
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
|
-
import
|
2
|
+
import n from "react-shadow/emotion";
|
3
|
+
import { Box as e } from "@mui/material";
|
3
4
|
import { styled as o } from "../../Theme/index.js";
|
4
|
-
function
|
5
|
-
return /* @__PURE__ */ t(
|
5
|
+
function a({ svg: r, ...i }) {
|
6
|
+
return /* @__PURE__ */ t(m, { ...i, children: /* @__PURE__ */ t(h, { dangerouslySetInnerHTML: { __html: r } }) });
|
6
7
|
}
|
7
|
-
const
|
8
|
+
const m = o(n.span)`
|
8
9
|
display: block;
|
9
10
|
width: 100%;
|
10
11
|
height: 100%;
|
11
|
-
`,
|
12
|
+
`, h = o(e)`
|
12
13
|
&,
|
13
14
|
& > svg {
|
14
15
|
height: 100%;
|
@@ -18,5 +19,5 @@ const e = o(r.span)`
|
|
18
19
|
}
|
19
20
|
`;
|
20
21
|
export {
|
21
|
-
|
22
|
+
a as default
|
22
23
|
};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import { Grid as n } from "@mui/material";
|
3
|
-
import
|
4
|
-
import { styled as
|
5
|
-
import { withDeprecated as
|
6
|
-
function
|
7
|
-
return i && i.length > 0 ? /* @__PURE__ */ e(
|
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(
|
8
8
|
n,
|
9
9
|
{
|
10
10
|
container: !0,
|
@@ -21,14 +21,14 @@ function d({ plans: i = [] }) {
|
|
21
21
|
sm: 6,
|
22
22
|
md: 3
|
23
23
|
},
|
24
|
-
children: /* @__PURE__ */ e(
|
24
|
+
children: /* @__PURE__ */ e(m, { plan: t })
|
25
25
|
},
|
26
26
|
r
|
27
27
|
))
|
28
28
|
}
|
29
29
|
) }) : null;
|
30
30
|
}
|
31
|
-
const
|
31
|
+
const u = d(f, { name: "PricingTable" }), c = o(a)`
|
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 g = o(d, { name: "PricingTable" }), f = m("div")`
|
|
42
42
|
}
|
43
43
|
`;
|
44
44
|
export {
|
45
|
-
|
45
|
+
u as default
|
46
46
|
};
|
package/lib/Result/result.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
import { jsxs as f, jsx as
|
2
|
-
import { Box as
|
1
|
+
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
2
|
+
import { Box as t } from "@mui/material";
|
3
3
|
import { styled as c } from "../Theme/index.js";
|
4
|
-
function g({ icon: r = null, title:
|
4
|
+
function g({ icon: r = null, title: o = "", description: e = "", extra: i = null, ...l }) {
|
5
5
|
return /* @__PURE__ */ f(s, { ...l, children: [
|
6
6
|
r,
|
7
|
-
typeof
|
8
|
-
|
7
|
+
typeof o == "string" ? /* @__PURE__ */ n(
|
8
|
+
t,
|
9
9
|
{
|
10
10
|
sx: {
|
11
11
|
mt: 3,
|
@@ -14,11 +14,11 @@ function g({ icon: r = null, title: t = "", description: o = "", extra: i = null
|
|
14
14
|
color: "#47494E",
|
15
15
|
textAlign: "center"
|
16
16
|
},
|
17
|
-
children:
|
17
|
+
children: o
|
18
18
|
}
|
19
|
-
) :
|
20
|
-
typeof
|
21
|
-
|
19
|
+
) : o,
|
20
|
+
typeof e == "string" ? /* @__PURE__ */ n(
|
21
|
+
t,
|
22
22
|
{
|
23
23
|
sx: {
|
24
24
|
mt: 1,
|
@@ -26,11 +26,11 @@ function g({ icon: r = null, title: t = "", description: o = "", extra: i = null
|
|
26
26
|
color: "#7F828B",
|
27
27
|
textAlign: "center"
|
28
28
|
},
|
29
|
-
children:
|
29
|
+
children: e
|
30
30
|
}
|
31
|
-
) :
|
32
|
-
/* @__PURE__ */
|
33
|
-
|
31
|
+
) : e,
|
32
|
+
/* @__PURE__ */ n(
|
33
|
+
t,
|
34
34
|
{
|
35
35
|
sx: {
|
36
36
|
mt: 3
|
@@ -40,7 +40,7 @@ function g({ icon: r = null, title: t = "", description: o = "", extra: i = null
|
|
40
40
|
)
|
41
41
|
] });
|
42
42
|
}
|
43
|
-
const s = c(
|
43
|
+
const s = c(t)`
|
44
44
|
box-sizing: border-box;
|
45
45
|
display: flex;
|
46
46
|
flex-direction: column;
|
@@ -1,20 +1,21 @@
|
|
1
1
|
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
2
|
-
import p from "
|
2
|
+
import { Box as p } from "@mui/material";
|
3
|
+
import m from "./shells/Phone.js";
|
3
4
|
import f from "./shells/Macbook.js";
|
4
|
-
import { styled as
|
5
|
-
const
|
6
|
-
phone:
|
5
|
+
import { styled as u } from "../../Theme/index.js";
|
6
|
+
const b = {
|
7
|
+
phone: m,
|
7
8
|
macbook: f
|
8
9
|
};
|
9
|
-
function
|
10
|
-
const r = s.toLowerCase(), { Shell: a, ratio:
|
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)`
|
11
12
|
position: relative;
|
12
13
|
display: inline-block;
|
13
|
-
width: ${e || `${
|
14
|
+
width: ${e || `${d}px`};
|
14
15
|
&:after {
|
15
16
|
display: block;
|
16
17
|
content: '';
|
17
|
-
padding-bottom: ${
|
18
|
+
padding-bottom: ${l * 100}%;
|
18
19
|
}
|
19
20
|
> svg {
|
20
21
|
display: block;
|
@@ -52,5 +53,5 @@ function $({ width: e = 0, children: i, type: s = "phone", ...n }) {
|
|
52
53
|
] }) });
|
53
54
|
}
|
54
55
|
export {
|
55
|
-
|
56
|
+
k as default
|
56
57
|
};
|
package/lib/Screenshot/index.js
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
import { jsx as s, jsxs as
|
2
|
-
import { useRef as
|
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";
|
3
4
|
import a from "lodash/isUndefined";
|
4
|
-
import { mergeProps as
|
5
|
-
import { styled as
|
6
|
-
import
|
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";
|
7
8
|
/* empty css */
|
8
9
|
const u = {
|
9
10
|
"iphone-x": {
|
@@ -71,33 +72,33 @@ const u = {
|
|
71
72
|
width: 200,
|
72
73
|
scale: 1
|
73
74
|
}
|
74
|
-
},
|
75
|
+
}, E = {
|
75
76
|
img: ["alt", "title", "src", "srcSet", "sizes", "loading", "key", "children"],
|
76
77
|
video: ["alt", "title", "muted", "autoplay", "loop", "key", "children"]
|
77
|
-
},
|
78
|
-
|
78
|
+
}, O = (t) => [
|
79
|
+
z(
|
79
80
|
t.type,
|
80
|
-
|
81
|
+
E[t.type].reduce((e, i) => (e[i] = t.props[i], e), {})
|
81
82
|
)
|
82
|
-
],
|
83
|
+
], w = (t, e = !0) => {
|
83
84
|
for (let i = 0; i < t.length; i++) {
|
84
85
|
const r = t[i];
|
85
86
|
if (["img", "video"].includes(r.type))
|
86
|
-
return
|
87
|
+
return O(r);
|
87
88
|
if (r.props && r.props.children) {
|
88
|
-
const n =
|
89
|
+
const n = g.toArray(r.props.children), o = w(n, !1);
|
89
90
|
if (o)
|
90
91
|
return o;
|
91
92
|
}
|
92
93
|
}
|
93
94
|
return e ? t : null;
|
94
95
|
};
|
95
|
-
function
|
96
|
+
function y(t) {
|
96
97
|
const e = Object.assign({}, t);
|
97
98
|
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);
|
98
|
-
const i =
|
99
|
-
return /* @__PURE__ */
|
100
|
-
|
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,
|
101
102
|
{
|
102
103
|
...l,
|
103
104
|
type: r,
|
@@ -106,7 +107,7 @@ function w(t) {
|
|
106
107
|
contentRadius: d,
|
107
108
|
contentZIndex: h,
|
108
109
|
children: [
|
109
|
-
/* @__PURE__ */ s("div", { className: "device-frame", children: /* @__PURE__ */ s("div", { className: "device-content", 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 })) }) }),
|
110
111
|
/* @__PURE__ */ s("div", { className: "device-stripe" }),
|
111
112
|
/* @__PURE__ */ s("div", { className: "device-header" }),
|
112
113
|
/* @__PURE__ */ s("div", { className: "device-sensors" }),
|
@@ -116,7 +117,7 @@ function w(t) {
|
|
116
117
|
}
|
117
118
|
);
|
118
119
|
}
|
119
|
-
const
|
120
|
+
const H = b(v)`
|
120
121
|
@media (max-width: ${(t) => u[t.type].width}px) {
|
121
122
|
transform-origin: 0 0;
|
122
123
|
transform: scale(${(t) => u[t.type].scale});
|
@@ -135,9 +136,9 @@ const O = g("div")`
|
|
135
136
|
height: 100.1%;
|
136
137
|
}
|
137
138
|
`;
|
138
|
-
function
|
139
|
-
const e =
|
140
|
-
return
|
139
|
+
function P({ ...t }) {
|
140
|
+
const e = k(null), [i, r] = f(), [n, o] = f(null);
|
141
|
+
return S(() => {
|
141
142
|
let c = null;
|
142
143
|
const p = () => {
|
143
144
|
const { clientWidth: m } = e.current, { clientWidth: l, clientHeight: h } = e.current.children[0], d = m / l;
|
@@ -146,18 +147,18 @@ function H({ ...t }) {
|
|
146
147
|
return e.current && (c = new ResizeObserver(p), c.observe(e.current)), () => {
|
147
148
|
c && c.disconnect();
|
148
149
|
};
|
149
|
-
}, [e.current]), /* @__PURE__ */ s(
|
150
|
+
}, [e.current]), /* @__PURE__ */ s(W, { ref: e, style: { height: i }, children: /* @__PURE__ */ s(y, { ...t, style: { transform: n ? `scale(${n})` : void 0 } }) });
|
150
151
|
}
|
151
|
-
const
|
152
|
+
const W = b(v)`
|
152
153
|
div[type] {
|
153
154
|
transform: scale(1);
|
154
155
|
transform-origin: 0 0;
|
155
156
|
}
|
156
157
|
`;
|
157
|
-
function
|
158
|
+
function _({ type: t, src: e = "", children: i, sx: r = {}, ...n }) {
|
158
159
|
const o = t.toLowerCase();
|
159
|
-
return ["phone", "macbook"].includes(o) ? /* @__PURE__ */ s(
|
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) });
|
160
161
|
}
|
161
162
|
export {
|
162
|
-
|
163
|
+
_ as default
|
163
164
|
};
|
package/lib/Video/index.js
CHANGED
@@ -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 { CircularProgress as m } from "@mui/material";
|
4
|
+
import { Box as g, CircularProgress as m } from "@mui/material";
|
5
5
|
import l from "lodash/isUndefined";
|
6
|
-
import { mergeProps as
|
7
|
-
import { styled as
|
8
|
-
function
|
6
|
+
import { mergeProps as b } from "../Util/index.js";
|
7
|
+
import { styled as x } from "../Theme/index.js";
|
8
|
+
function j(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 =
|
12
|
-
width:
|
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,
|
13
13
|
height: r,
|
14
14
|
visibility: s ? "visible" : "hidden"
|
15
15
|
});
|
16
|
-
return
|
17
|
-
/* @__PURE__ */ t("iframe", { title:
|
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 }),
|
18
18
|
!s && /* @__PURE__ */ t(m, { className: "loading-indicator", color: "primary" })
|
19
|
-
] }) : /* @__PURE__ */ c(f, { style: { width:
|
19
|
+
] }) : /* @__PURE__ */ c(f, { style: { width: i, 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 =
|
24
|
+
const f = x(g)`
|
25
25
|
background-color: #222222;
|
26
26
|
display: flex;
|
27
27
|
justify-content: center;
|
@@ -36,5 +36,5 @@ const f = b("div")`
|
|
36
36
|
}
|
37
37
|
`;
|
38
38
|
export {
|
39
|
-
|
39
|
+
j as default
|
40
40
|
};
|
package/lib/Wallet/Action.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
import { jsx as l, jsxs as o } from "react/jsx-runtime";
|
2
|
-
import {
|
2
|
+
import { Box as g, Typography as x } from "@mui/material";
|
3
3
|
import i from "lodash/isUndefined";
|
4
|
-
import
|
5
|
-
import { mergeProps as
|
4
|
+
import y from "./images/abtwallet.png";
|
5
|
+
import { mergeProps as _ } from "../Util/index.js";
|
6
6
|
import c from "../Colors/themes/default.js";
|
7
|
-
import
|
8
|
-
import { styled as
|
9
|
-
function
|
7
|
+
import h from "../Button/index.js";
|
8
|
+
import { styled as u } from "../Theme/index.js";
|
9
|
+
function w(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 =
|
13
|
-
return /* @__PURE__ */ l(
|
14
|
-
/* @__PURE__ */ l("img", { src:
|
15
|
-
s === "vertical" && /* @__PURE__ */ o(
|
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: [
|
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
|
-
},
|
41
|
+
}, z = u(g)`
|
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
|
-
|
82
|
+
w as default
|
83
83
|
};
|
package/lib/Wallet/Download.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
2
2
|
import g from "@arcblock/react-hooks/lib/useBrowser";
|
3
|
-
import { Typography as f } from "@mui/material";
|
3
|
+
import { Box as v, Typography as f } from "@mui/material";
|
4
4
|
import a from "lodash/isUndefined";
|
5
|
-
import
|
6
|
-
import
|
5
|
+
import b from "./images/app-store.svg.js";
|
6
|
+
import x from "./images/google-play.svg.js";
|
7
7
|
import L from "./images/android_download.svg.js";
|
8
8
|
import i from "../Button/index.js";
|
9
9
|
import { mergeProps as k } from "../Util/index.js";
|
10
|
-
import { styled as
|
11
|
-
function
|
10
|
+
import { styled as D } from "../Theme/index.js";
|
11
|
+
function N(t) {
|
12
12
|
const l = g(), o = Object.assign({}, t);
|
13
13
|
a(o.title) && (o.title = "Download DID Wallet"), a(o.layout) && (o.layout = "vertical"), a(o.storeLayout) && (o.storeLayout = "horizontal"), a(o.locale) && (o.locale = "zh"), a(o.iosLink) && (o.iosLink = "https://itunes.apple.com/app/id1460083542"), a(o.androidLink) && (o.androidLink = "https://play.google.com/store/apps/details?id=com.arcblock.wallet.app.product"), a(o.androidDownLoadUrl) && (o.androidDownLoadUrl = "https://releases.arcblockio.cn/arcwallet_android/latest/abtwallet.apk"), a(o.style) && (o.style = {});
|
14
|
-
const h = k(o,
|
15
|
-
return /* @__PURE__ */ r(
|
14
|
+
const h = k(o, N, ["style"]), { title: d, children: s, iosLink: c, androidLink: m, androidDownLoadUrl: p, locale: n, ...w } = h, y = l.mobile.android.phone || l.mobile.android.tablet, u = l.mobile.apple.phone || l.mobile.apple.tablet;
|
15
|
+
return /* @__PURE__ */ r($, { ...w, children: [
|
16
16
|
/* @__PURE__ */ r("div", { className: "download-text", children: [
|
17
17
|
!!d && /* @__PURE__ */ e(f, { className: "download-title", component: "div", children: d }),
|
18
18
|
s && /* @__PURE__ */ e(f, { className: "download-extra", component: "div", children: s })
|
19
19
|
] }),
|
20
20
|
!l.mobile.any && /* @__PURE__ */ r("div", { className: "download-store-list", children: [
|
21
|
-
/* @__PURE__ */ e(i, { className: "download-link", component: "a", href: c, children: /* @__PURE__ */ e(
|
21
|
+
/* @__PURE__ */ e(i, { className: "download-link", component: "a", href: c, children: /* @__PURE__ */ e(b, {}) }),
|
22
22
|
n === "zh" && /* @__PURE__ */ e(i, { component: "a", className: "download-link", href: p, children: /* @__PURE__ */ e(L, {}) }),
|
23
|
-
n === "en" && /* @__PURE__ */ e(i, { component: "a", className: "download-link", href: m, children: /* @__PURE__ */ e(
|
23
|
+
n === "en" && /* @__PURE__ */ e(i, { component: "a", className: "download-link", href: m, children: /* @__PURE__ */ e(x, {}) })
|
24
24
|
] }),
|
25
25
|
y && /* @__PURE__ */ r("div", { className: "download-store-list", children: [
|
26
26
|
n === "zh" && /* @__PURE__ */ e(i, { component: "a", href: p, variant: "outlined", color: "primary", children: "本地下载" }),
|
@@ -29,7 +29,7 @@ function D(t) {
|
|
29
29
|
u && /* @__PURE__ */ e("div", { className: "download-store-list", children: /* @__PURE__ */ e(i, { component: "a", href: c, variant: "outlined", color: "primary", children: "Download" }) })
|
30
30
|
] });
|
31
31
|
}
|
32
|
-
const
|
32
|
+
const $ = D(v)`
|
33
33
|
display: flex;
|
34
34
|
flex-direction: ${(t) => t.layout === "vertical" ? "column" : "row"};
|
35
35
|
align-items: center;
|
@@ -60,5 +60,5 @@ const N = x("div")`
|
|
60
60
|
}
|
61
61
|
`;
|
62
62
|
export {
|
63
|
-
|
63
|
+
N as default
|
64
64
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.12",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -60,16 +60,16 @@
|
|
60
60
|
"react": "^19.0.0",
|
61
61
|
"react-router-dom": "^6.22.3"
|
62
62
|
},
|
63
|
-
"gitHead": "
|
63
|
+
"gitHead": "ebe824e4b0ddfc1cbdd9ffecc22283e57a58c042",
|
64
64
|
"dependencies": {
|
65
|
-
"@arcblock/bridge": "3.0.
|
65
|
+
"@arcblock/bridge": "3.0.12",
|
66
66
|
"@arcblock/did": "^1.20.15",
|
67
67
|
"@arcblock/did-motif": "^1.1.13",
|
68
|
-
"@arcblock/icons": "3.0.
|
69
|
-
"@arcblock/nft-display": "3.0.
|
70
|
-
"@arcblock/react-hooks": "3.0.
|
71
|
-
"@blocklet/js-sdk": "^1.16.
|
72
|
-
"@blocklet/theme": "3.0.
|
68
|
+
"@arcblock/icons": "3.0.12",
|
69
|
+
"@arcblock/nft-display": "3.0.12",
|
70
|
+
"@arcblock/react-hooks": "3.0.12",
|
71
|
+
"@blocklet/js-sdk": "^1.16.45",
|
72
|
+
"@blocklet/theme": "3.0.12",
|
73
73
|
"@fontsource/roboto": "~5.1.1",
|
74
74
|
"@fontsource/ubuntu-mono": "^5.2.6",
|
75
75
|
"@iconify-icons/logos": "^1.2.36",
|