@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.
- 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 +5 -6
- package/lib/BlockletNFT/index.js +23 -23
- package/lib/BlockletV2/utils.d.ts +1 -1
- package/lib/BlockletV2/utils.js +6 -7
- package/lib/Center/index.js +6 -7
- package/lib/CodeBlock/LightBox.d.ts +3 -2
- package/lib/CodeBlock/LightBox.js +2 -3
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +23 -24
- 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 +46 -47
- package/lib/Footer/index.js +8 -8
- package/lib/Icon/image.js +16 -17
- package/lib/InfoRow/index.js +11 -11
- package/lib/Layout/dashboard/index.js +18 -20
- 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 +6 -7
- package/lib/PageScroller/story/FullPage.js +1 -1
- package/lib/PageScroller/story/PageContain.js +1 -1
- package/lib/PageScroller/story/index.css +115 -0
- package/lib/PricingTable/index.js +9 -9
- package/lib/Result/result.js +14 -14
- package/lib/Screenshot/BaseScreenshot/index.js +9 -10
- package/lib/Screenshot/devices.css +1366 -0
- package/lib/Screenshot/index.js +27 -28
- 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 +7 -7
- package/src/ActivityIndicator/index.jsx +2 -3
- package/src/Address/Address.stories.jsx +1 -2
- 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 +1 -2
- package/src/BlockletNFT/index.jsx +2 -2
- package/src/BlockletV2/utils.js +1 -2
- package/src/Center/index.tsx +1 -2
- package/src/CodeBlock/LightBox.tsx +1 -2
- 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 +1 -2
- package/src/Datatable/CustomToolbar.jsx +2 -3
- package/src/Datatable/TableSearch.jsx +2 -2
- package/src/Datatable/index.jsx +4 -4
- package/src/Earth/index.tsx +2 -3
- package/src/Footer/index.tsx +1 -1
- package/src/Icon/image.tsx +1 -2
- package/src/InfoRow/index.tsx +2 -2
- package/src/Layout/dashboard/index.tsx +1 -3
- 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 +1 -2
- 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/vite.config.mjs +1 -1
- package/lib/ux.css +0 -1
@@ -1,34 +1,34 @@
|
|
1
1
|
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
2
|
-
import { useState as
|
2
|
+
import { useState as f, useEffect as g } from "react";
|
3
3
|
import i from "prop-types";
|
4
4
|
import { green as m, blue as p } from "@mui/material/colors";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import {
|
8
|
-
function
|
9
|
-
const [r, a] =
|
10
|
-
return
|
11
|
-
const
|
5
|
+
import h from "../Logo/index.js";
|
6
|
+
import { styled as c } from "../Theme/index.js";
|
7
|
+
import { useTheme as x } from "@mui/material";
|
8
|
+
function b({ messages: e = ["Loading data..."], interval: n = 3e3, ...s }) {
|
9
|
+
const [r, a] = f(0), { palette: l } = x();
|
10
|
+
return g(() => {
|
11
|
+
const u = setInterval(() => {
|
12
12
|
a((r + 1) % e.length);
|
13
13
|
}, n);
|
14
14
|
return () => {
|
15
|
-
clearTimeout(
|
15
|
+
clearTimeout(u);
|
16
16
|
};
|
17
|
-
}), /* @__PURE__ */ t(
|
17
|
+
}), /* @__PURE__ */ t(y, { ...s, children: /* @__PURE__ */ d("div", { className: "pm-loader-container", children: [
|
18
18
|
/* @__PURE__ */ t("div", { className: "pm-loader-text", children: /* @__PURE__ */ t("p", { children: e[r] }) }),
|
19
19
|
/* @__PURE__ */ d("div", { className: "pm-loader-atoms", children: [
|
20
|
-
/* @__PURE__ */ t(
|
20
|
+
/* @__PURE__ */ t(h, { style: { transform: "scale(0.6)" }, showText: !1 }),
|
21
21
|
/* @__PURE__ */ t(o, { size: 56, orbitColor: m[500], atomColor: m[500], duration: 1 }),
|
22
22
|
/* @__PURE__ */ t(o, { size: 80, orbitColor: p[800], atomColor: p[800], duration: 1.5 }),
|
23
23
|
/* @__PURE__ */ t(o, { size: 100, orbitColor: l.grey[900], atomColor: l.grey[900] })
|
24
24
|
] })
|
25
25
|
] }) });
|
26
26
|
}
|
27
|
-
|
27
|
+
b.propTypes = {
|
28
28
|
interval: i.number,
|
29
29
|
messages: i.arrayOf(i.string.isRequired)
|
30
30
|
};
|
31
|
-
const
|
31
|
+
const y = c("div")`
|
32
32
|
&& {
|
33
33
|
box-sizing: border-box;
|
34
34
|
padding: 20px;
|
@@ -72,7 +72,7 @@ const v = u(c)`
|
|
72
72
|
}
|
73
73
|
`;
|
74
74
|
function o({ size: e, orbitColor: n, atomColor: s, duration: r = 2, ...a }) {
|
75
|
-
return /* @__PURE__ */ t(
|
75
|
+
return /* @__PURE__ */ t(v, { $duration: r, style: { width: e, height: e, border: `1px solid ${n}` }, ...a, children: /* @__PURE__ */ t("div", { style: { background: s } }) });
|
76
76
|
}
|
77
77
|
o.propTypes = {
|
78
78
|
size: i.number.isRequired,
|
@@ -80,7 +80,7 @@ o.propTypes = {
|
|
80
80
|
atomColor: i.string.isRequired,
|
81
81
|
duration: i.number
|
82
82
|
};
|
83
|
-
const
|
83
|
+
const v = c("div")`
|
84
84
|
@keyframes orbit {
|
85
85
|
0% {
|
86
86
|
transform: rotate(0deg);
|
@@ -106,5 +106,5 @@ const C = u(c)`
|
|
106
106
|
}
|
107
107
|
`;
|
108
108
|
export {
|
109
|
-
|
109
|
+
b as default
|
110
110
|
};
|
package/lib/Alert/index.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
import { jsxs as k, jsx as c } from "react/jsx-runtime";
|
2
2
|
import o from "prop-types";
|
3
|
-
import {
|
4
|
-
import { blueGrey as
|
3
|
+
import { Typography as N } from "@mui/material";
|
4
|
+
import { blueGrey as j } from "@mui/material/colors";
|
5
5
|
import n from "lodash/isUndefined";
|
6
|
-
import
|
7
|
-
import { mergeProps as
|
6
|
+
import E from "../Icon/index.js";
|
7
|
+
import { mergeProps as O } from "../Util/index.js";
|
8
8
|
import t from "../Colors/themes/default.js";
|
9
|
-
import { styled as
|
10
|
-
import { withDeprecated as
|
11
|
-
const
|
9
|
+
import { styled as w } from "../Theme/index.js";
|
10
|
+
import { withDeprecated as $ } from "../Util/deprecate.js";
|
11
|
+
const i = {
|
12
12
|
error: {
|
13
13
|
icon: "exclamation-circle",
|
14
14
|
color: t.error.main,
|
@@ -37,30 +37,30 @@ const a = {
|
|
37
37
|
variant: "solid"
|
38
38
|
}
|
39
39
|
};
|
40
|
-
function
|
40
|
+
function a({ ...l }) {
|
41
41
|
const r = Object.assign({}, l);
|
42
42
|
n(r.type) && (r.type = "tip"), n(r.className) && (r.className = ""), n(r.style) && (r.style = {}), n(r.variant) && (r.variant = "border");
|
43
|
-
const m =
|
43
|
+
const m = O(r, a, ["style"]), { type: s, children: p, style: d, className: f, variant: e, showIcon: g = !1, ...b } = m, { icon: y, color: u, backgroundColor: x, borderColor: v, variant: C } = i[s] || i.success, h = Object.assign(
|
44
44
|
{
|
45
|
-
color:
|
45
|
+
color: j[500],
|
46
46
|
backgroundColor: e === "border" ? x : "transparent",
|
47
|
-
borderLeft: e === "border" ? `5px solid ${
|
47
|
+
borderLeft: e === "border" ? `5px solid ${v}` : "none"
|
48
48
|
},
|
49
49
|
d
|
50
50
|
);
|
51
|
-
return /* @__PURE__ */ k(
|
52
|
-
(e === "icon" || g) && /* @__PURE__ */ c(
|
53
|
-
/* @__PURE__ */ c(
|
51
|
+
return /* @__PURE__ */ k(A, { ...b, className: `alert alert--${s} alert--${e} ${f}`.trim(), style: h, children: [
|
52
|
+
(e === "icon" || g) && /* @__PURE__ */ c(E, { className: "alert-icon", name: y, size: 24, color: u, variant: C }),
|
53
|
+
/* @__PURE__ */ c(N, { component: "div", className: "alert-content", children: p })
|
54
54
|
] });
|
55
55
|
}
|
56
|
-
|
57
|
-
type: o.oneOf(Object.keys(
|
56
|
+
a.propTypes = {
|
57
|
+
type: o.oneOf(Object.keys(i)),
|
58
58
|
children: o.any.isRequired,
|
59
59
|
className: o.string,
|
60
60
|
style: o.oneOfType([o.object, o.string]),
|
61
61
|
variant: o.oneOf(["border", "icon"])
|
62
62
|
};
|
63
|
-
const V =
|
63
|
+
const V = $(a, { name: "Alert", alternative: "@mui/material/Alert" }), A = w("div")`
|
64
64
|
display: flex;
|
65
65
|
align-items: center;
|
66
66
|
font-size: 16px;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { useState as l, useRef as $, useEffect as c } from "react";
|
3
|
-
import {
|
3
|
+
import { useTheme as M, Skeleton as E } from "@mui/material";
|
4
4
|
import n from "prop-types";
|
5
5
|
import F from "react-lottie-player";
|
6
6
|
import P from "lodash/noop";
|
@@ -13,19 +13,19 @@ function W({
|
|
13
13
|
messageLoop: T = !0,
|
14
14
|
tips: a = [],
|
15
15
|
tipsDuration: u = 5e3,
|
16
|
-
maybeDuration:
|
16
|
+
maybeDuration: v = 12e4,
|
17
17
|
speed: h = 1,
|
18
|
-
increaseSpeed:
|
18
|
+
increaseSpeed: x = 0,
|
19
19
|
...I
|
20
20
|
}) {
|
21
|
-
const g =
|
21
|
+
const g = M(), [d, N] = l(0), [y, k] = l(h), [w, A] = l(0), [O, S] = l(null), [j, p] = l(!m), C = $((/* @__PURE__ */ new Date()).getTime());
|
22
22
|
Array.isArray(r) || (r = [r]), c(() => {
|
23
|
-
m || (
|
23
|
+
m || (p(!0), (async () => {
|
24
24
|
try {
|
25
25
|
const e = await (g.palette.mode === "dark" ? import("./dark-animation.json.js") : import("./default-animation.json.js"));
|
26
|
-
S(e.default || e),
|
26
|
+
S(e.default || e), p(!1);
|
27
27
|
} catch (e) {
|
28
|
-
console.error("Failed to load animation:", e),
|
28
|
+
console.error("Failed to load animation:", e), p(!1);
|
29
29
|
}
|
30
30
|
})());
|
31
31
|
}, [m, g.palette.mode]), c(() => {
|
@@ -42,15 +42,15 @@ function W({
|
|
42
42
|
if (!a.length)
|
43
43
|
return P;
|
44
44
|
const t = setTimeout(() => {
|
45
|
-
let e =
|
45
|
+
let e = d + 1;
|
46
46
|
e >= a.length && (e = 0), N(e);
|
47
47
|
}, u);
|
48
48
|
return () => clearTimeout(t);
|
49
|
-
}, [a, u,
|
49
|
+
}, [a, u, d]), c(() => {
|
50
50
|
const t = setTimeout(() => {
|
51
|
-
let i = ((/* @__PURE__ */ new Date()).getTime() - C.current) /
|
51
|
+
let i = ((/* @__PURE__ */ new Date()).getTime() - C.current) / v;
|
52
52
|
i > 1 && (i = 1);
|
53
|
-
const D = h +
|
53
|
+
const D = h + x * i;
|
54
54
|
k(D);
|
55
55
|
}, 1e3);
|
56
56
|
return () => clearTimeout(t);
|
@@ -89,7 +89,7 @@ function W({
|
|
89
89
|
a.length ? /* @__PURE__ */ o("div", { className: "waiter-tips-container", children: a.map((t, e) => /* @__PURE__ */ o(
|
90
90
|
"div",
|
91
91
|
{
|
92
|
-
className: `waiter-tips-block ${
|
92
|
+
className: `waiter-tips-block ${d === e ? "show-tips" : ""}`,
|
93
93
|
children: t
|
94
94
|
},
|
95
95
|
e
|
@@ -108,7 +108,7 @@ W.propTypes = {
|
|
108
108
|
maybeDuration: n.number,
|
109
109
|
increaseSpeed: n.number
|
110
110
|
};
|
111
|
-
const q = R(
|
111
|
+
const q = R("div")`
|
112
112
|
display: flex;
|
113
113
|
justify-content: center;
|
114
114
|
align-items: center;
|
package/lib/Blocklet/blocklet.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
2
2
|
import { isValidElement as f } from "react";
|
3
3
|
import t from "prop-types";
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { styled as
|
4
|
+
import { useTheme as C, useMediaQuery as S, Typography as n, CircularProgress as I } from "@mui/material";
|
5
|
+
import B from "../Avatar/index.js";
|
6
|
+
import P from "../Button/index.js";
|
7
|
+
import A from "../Img/index.js";
|
8
|
+
import { styled as D } from "../Theme/index.js";
|
9
9
|
import { strippedString as g } from "./utils.js";
|
10
|
-
const
|
10
|
+
const F = D("div")`
|
11
11
|
&.arcblock-blocklet {
|
12
12
|
padding: ${(e) => e.theme.spacing(2)} ${(e) => e.theme.spacing(2)} 0
|
13
13
|
${(e) => e.theme.spacing(2)};
|
@@ -118,7 +118,7 @@ const H = F(C)`
|
|
118
118
|
font-size: 12px;
|
119
119
|
}
|
120
120
|
`;
|
121
|
-
function
|
121
|
+
function H({
|
122
122
|
title: e = "",
|
123
123
|
did: c = null,
|
124
124
|
description: l = "",
|
@@ -129,15 +129,15 @@ function j({
|
|
129
129
|
buttonDisabled: d = !1,
|
130
130
|
buttonLoading: a = !1,
|
131
131
|
onButtonClick: b = null,
|
132
|
-
onMainClick:
|
133
|
-
className:
|
132
|
+
onMainClick: v = null,
|
133
|
+
className: _ = null,
|
134
134
|
...x
|
135
135
|
}) {
|
136
136
|
const h = (k, M = () => !1) => (i, ...T) => {
|
137
137
|
M() ? (i.preventDefault(), i.stopPropagation()) : k instanceof Function && (i.preventDefault(), i.stopPropagation(), k(...T));
|
138
|
-
}, w = h(b, () => !!(m || d || a)), y =
|
139
|
-
return /* @__PURE__ */ o(
|
140
|
-
s ? /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(
|
138
|
+
}, w = h(b, () => !!(m || d || a)), y = C(), $ = S(y.breakpoints.up("sm")), N = h(v), z = $ ? 80 : 64;
|
139
|
+
return /* @__PURE__ */ o(F, { className: `${_} arcblock-blocklet`, ...x, children: /* @__PURE__ */ r("div", { className: "arcblock-blocklet__content", onClick: N, children: [
|
140
|
+
s ? /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(A, { src: s }) }) : c && /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(B, { did: c, size: z }) }),
|
141
141
|
/* @__PURE__ */ r("div", { className: "arcblock-blocklet__info", children: [
|
142
142
|
/* @__PURE__ */ r("div", { className: "arcblock-blocklet__text", children: [
|
143
143
|
f(e) ? /* @__PURE__ */ o(n, { component: "h3", variant: "h3", className: "arcblock-blocklet__title", children: e }) : /* @__PURE__ */ o(
|
@@ -172,7 +172,7 @@ function j({
|
|
172
172
|
},
|
173
173
|
children: [
|
174
174
|
/* @__PURE__ */ o("div", { onClick: w, style: { marginRight: "12px" }, children: m || b && /* @__PURE__ */ r(
|
175
|
-
|
175
|
+
P,
|
176
176
|
{
|
177
177
|
className: "arcblock-blocklet__button--hover",
|
178
178
|
variant: "outlined",
|
@@ -198,7 +198,7 @@ function j({
|
|
198
198
|
] })
|
199
199
|
] }) });
|
200
200
|
}
|
201
|
-
|
201
|
+
H.propTypes = {
|
202
202
|
title: t.string || t.node,
|
203
203
|
did: t.string,
|
204
204
|
description: t.string || t.node,
|
@@ -213,5 +213,5 @@ j.propTypes = {
|
|
213
213
|
className: t.string
|
214
214
|
};
|
215
215
|
export {
|
216
|
-
|
216
|
+
H as default
|
217
217
|
};
|
package/lib/Blocklet/utils.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
export default ActionButton;
|
2
2
|
export function strippedString(originalString?: string): string;
|
3
|
-
declare const ActionButton: import('@emotion/styled').StyledComponent<import('@mui/system').
|
3
|
+
declare const ActionButton: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/lib/Blocklet/utils.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
const a = r(o)`
|
1
|
+
import { styled as o } from "../Theme/index.js";
|
2
|
+
const e = o("div")`
|
4
3
|
background-color: transparent !important;
|
5
4
|
& > :not(.Mui-disabled) {
|
6
5
|
position: relative;
|
@@ -49,8 +48,8 @@ const a = r(o)`
|
|
49
48
|
color: ${(t) => t.theme.palette.common.white}!important;
|
50
49
|
}
|
51
50
|
}
|
52
|
-
`,
|
51
|
+
`, i = (t = "") => t.replace(/(<([^>]+)>)/gi, "").trim();
|
53
52
|
export {
|
54
|
-
|
55
|
-
|
53
|
+
e as default,
|
54
|
+
i as strippedString
|
56
55
|
};
|
package/lib/BlockletNFT/index.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { jsxs as a, jsx as t, Fragment as F } from "react/jsx-runtime";
|
2
2
|
import { useRef as I } from "react";
|
3
3
|
import o from "prop-types";
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import { styled as
|
10
|
-
function
|
4
|
+
import { useTheme as q, useMediaQuery as m, Typography as f, Portal as A, CircularProgress as O } from "@mui/material";
|
5
|
+
import W from "../Avatar/index.js";
|
6
|
+
import Z from "../Icon/index.js";
|
7
|
+
import E from "../Button/index.js";
|
8
|
+
import H from "../Img/index.js";
|
9
|
+
import { styled as Q } from "../Theme/index.js";
|
10
|
+
function U(e, s = 1) {
|
11
11
|
let c = e;
|
12
12
|
const r = ["", "k", "m", "b"];
|
13
13
|
let i = 0;
|
@@ -15,7 +15,7 @@ function G(e, s = 1) {
|
|
15
15
|
c = (c / 1e3).toFixed(s), i += 1;
|
16
16
|
return e && `${c}${r[i]}`;
|
17
17
|
}
|
18
|
-
const
|
18
|
+
const G = Q("div")`
|
19
19
|
&.arcblock-blocklet {
|
20
20
|
padding: 0 16px;
|
21
21
|
background: ${(e) => e.theme.palette.common.white};
|
@@ -182,12 +182,12 @@ const J = U(q)`
|
|
182
182
|
}
|
183
183
|
`;
|
184
184
|
function v({ name: e }) {
|
185
|
-
return /* @__PURE__ */ t(
|
185
|
+
return /* @__PURE__ */ t(Z, { name: e, color: "inherit", size: 15, style: { marginRight: 8 } });
|
186
186
|
}
|
187
187
|
v.propTypes = {
|
188
188
|
name: o.string.isRequired
|
189
189
|
};
|
190
|
-
function
|
190
|
+
function J({
|
191
191
|
title: e,
|
192
192
|
did: s = void 0,
|
193
193
|
description: c = null,
|
@@ -203,31 +203,31 @@ function K({
|
|
203
203
|
onMainClick: N = null,
|
204
204
|
className: C = null,
|
205
205
|
scaleClickZone: $ = 1.5,
|
206
|
-
...
|
206
|
+
...M
|
207
207
|
}) {
|
208
208
|
const x = (l, k = () => !1) => (d, ...j) => {
|
209
209
|
k() ? (d.preventDefault(), d.stopPropagation()) : l instanceof Function && (d.preventDefault(), d.stopPropagation(), l(...j));
|
210
|
-
},
|
210
|
+
}, S = x(_, () => !!(h || u || b)), T = x(N), p = q(), B = m(p.breakpoints.down("md")), P = m(p.breakpoints.down("lg")), D = m(p.breakpoints.up("lg")), n = i === "auto" ? B ? "xs" : P ? "sm" : "md" : i, R = i === "auto" ? D ? 80 : 40 : i === "md" ? 80 : 40, g = I(null);
|
211
211
|
return /* @__PURE__ */ a(
|
212
|
-
|
212
|
+
G,
|
213
213
|
{
|
214
|
-
...
|
214
|
+
...M,
|
215
215
|
scaleClickZone: $,
|
216
216
|
className: `${C} arcblock-blocklet arcblock-blocklet--size-${n}`,
|
217
217
|
children: [
|
218
|
-
/* @__PURE__ */ t("div", { className: "arcblock-blocklet__content", children: /* @__PURE__ */ t("div", { className: "arcblock-blocklet__content--main", onClick:
|
219
|
-
r ? /* @__PURE__ */ t("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ t(
|
218
|
+
/* @__PURE__ */ t("div", { className: "arcblock-blocklet__content", children: /* @__PURE__ */ t("div", { className: "arcblock-blocklet__content--main", onClick: T, ref: g, children: /* @__PURE__ */ a("div", { className: "arcblock-blocklet__content--body", children: [
|
219
|
+
r ? /* @__PURE__ */ t("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ t(H, { src: r }) }) : s && /* @__PURE__ */ t("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ t(W, { did: s, size: R }) }),
|
220
220
|
/* @__PURE__ */ a("div", { className: "arcblock-blocklet__info", children: [
|
221
221
|
/* @__PURE__ */ t(f, { component: "h3", variant: "h3", className: "arcblock-blocklet__title", title: e, children: e }),
|
222
222
|
c && /* @__PURE__ */ t(f, { component: "div", variant: "body2", className: "arcblock-blocklet__describe", title: c, children: c }),
|
223
|
-
["md", "sm", "xs"].includes(n) && /* @__PURE__ */ t(
|
223
|
+
["md", "sm", "xs"].includes(n) && /* @__PURE__ */ t(A, { container: g.current, disablePortal: n === "md", children: /* @__PURE__ */ t(
|
224
224
|
"div",
|
225
225
|
{
|
226
226
|
className: "arcblock-blocklet__button",
|
227
|
-
onClick:
|
227
|
+
onClick: S,
|
228
228
|
style: { display: z ? "block" : "" },
|
229
229
|
children: h || _ && /* @__PURE__ */ a(
|
230
|
-
|
230
|
+
E,
|
231
231
|
{
|
232
232
|
className: "arcblock-blocklet__button--hover",
|
233
233
|
variant: "outlined",
|
@@ -237,7 +237,7 @@ function K({
|
|
237
237
|
style: n === "md" ? { padding: "3px 20px", fontSize: "14px" } : { padding: "3px 15px", minWidth: "54px", fontSize: "13px" },
|
238
238
|
children: [
|
239
239
|
b && /* @__PURE__ */ t(
|
240
|
-
|
240
|
+
O,
|
241
241
|
{
|
242
242
|
size: n === "md" ? 15 : 13,
|
243
243
|
style: { marginRight: 3, color: "inherit" }
|
@@ -260,7 +260,7 @@ function K({
|
|
260
260
|
title: l.title,
|
261
261
|
children: l.empty ? null : /* @__PURE__ */ a(F, { children: [
|
262
262
|
/* @__PURE__ */ t(v, { name: l.icon }),
|
263
|
-
l.pretty ?
|
263
|
+
l.pretty ? U(l.value) : l.value
|
264
264
|
] })
|
265
265
|
},
|
266
266
|
k
|
@@ -269,7 +269,7 @@ function K({
|
|
269
269
|
}
|
270
270
|
);
|
271
271
|
}
|
272
|
-
|
272
|
+
J.propTypes = {
|
273
273
|
title: o.string.isRequired,
|
274
274
|
did: o.string,
|
275
275
|
isStickyButton: o.bool,
|
@@ -287,5 +287,5 @@ K.propTypes = {
|
|
287
287
|
scaleClickZone: o.number
|
288
288
|
};
|
289
289
|
export {
|
290
|
-
|
290
|
+
J as default
|
291
291
|
};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
export default ActionButton;
|
2
2
|
export function strippedString(originalString?: string): string;
|
3
3
|
export function formatDownloadCount(num?: string): string | number;
|
4
|
-
declare const ActionButton: import('@emotion/styled').StyledComponent<import('@mui/system').
|
4
|
+
declare const ActionButton: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/lib/BlockletV2/utils.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
const a = e(r)`
|
1
|
+
import { styled as r } from "../Theme/index.js";
|
2
|
+
const i = r("div")`
|
4
3
|
background-color: transparent !important;
|
5
4
|
& > :not(.Mui-disabled) {
|
6
5
|
position: relative;
|
@@ -49,12 +48,12 @@ const a = e(r)`
|
|
49
48
|
color: ${(t) => t.theme.palette.common.white}!important;
|
50
49
|
}
|
51
50
|
}
|
52
|
-
`,
|
51
|
+
`, n = (t = "") => t.replace(/(<([^>]+)>)/gi, "").trim(), a = (t = "") => {
|
53
52
|
const o = parseInt(t, 10);
|
54
53
|
return Number.isNaN(o) ? t : o < 1e3 ? o : o < 1e6 ? `${(o / 1e3).toFixed(1)}k` : o < 1e9 ? `${(o / 1e6).toFixed(1)}m` : `${(o / 1e9).toFixed(1)}b`;
|
55
54
|
};
|
56
55
|
export {
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
i as default,
|
57
|
+
a as formatDownloadCount,
|
58
|
+
n as strippedString
|
60
59
|
};
|
package/lib/Center/index.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
|
4
|
-
function m({
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
2
|
+
import { styled as r } from "../Theme/index.js";
|
3
|
+
function o({
|
5
4
|
children: e = null,
|
6
5
|
relative: i = "screen"
|
7
6
|
}) {
|
@@ -9,9 +8,9 @@ function m({
|
|
9
8
|
return i === "parent" && (t = {
|
10
9
|
width: "100%",
|
11
10
|
height: "100%"
|
12
|
-
}), /* @__PURE__ */
|
11
|
+
}), /* @__PURE__ */ n(l, { style: t, children: e });
|
13
12
|
}
|
14
|
-
const l =
|
13
|
+
const l = r("div")`
|
15
14
|
flex: 1;
|
16
15
|
width: 100vw;
|
17
16
|
height: 100vh;
|
@@ -21,5 +20,5 @@ const l = o(n)`
|
|
21
20
|
align-items: center;
|
22
21
|
`;
|
23
22
|
export {
|
24
|
-
|
23
|
+
o as default
|
25
24
|
};
|
@@ -1,4 +1,5 @@
|
|
1
|
-
declare const LightBox: import('@emotion/styled').StyledComponent<
|
1
|
+
declare const LightBox: import('@emotion/styled').StyledComponent<{
|
2
2
|
theme?: import('@emotion/react').Theme;
|
3
|
-
|
3
|
+
as?: React.ElementType;
|
4
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
4
5
|
export default LightBox;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import l from "@emotion/styled";
|
2
|
-
|
3
|
-
const e = l(s)`
|
2
|
+
const t = l("div")`
|
4
3
|
display: block;
|
5
4
|
pre code.hljs {
|
6
5
|
display: block;
|
@@ -83,5 +82,5 @@ const e = l(s)`
|
|
83
82
|
}
|
84
83
|
`;
|
85
84
|
export {
|
86
|
-
|
85
|
+
t as default
|
87
86
|
};
|
package/lib/CountDown/index.js
CHANGED
@@ -1,32 +1,31 @@
|
|
1
|
-
import { jsxs as g, jsx as
|
1
|
+
import { jsxs as g, jsx as s } from "react/jsx-runtime";
|
2
2
|
import { Component as b } from "react";
|
3
|
-
import { Box as y } from "@mui/material";
|
4
3
|
import p from "lodash/isUndefined";
|
5
|
-
import { getColor as u, mergeProps as
|
6
|
-
import { styled as
|
7
|
-
const
|
4
|
+
import { getColor as u, mergeProps as y } from "../Util/index.js";
|
5
|
+
import { styled as k } from "../Theme/index.js";
|
6
|
+
const c = 60, d = 60 * c, m = 24 * d;
|
8
7
|
function h(e) {
|
9
|
-
const n = (/* @__PURE__ */ new Date()).getTime(), t = Math.round((e - n) / 1e3), i = Math.floor(t / m),
|
10
|
-
return { days: i, hours:
|
8
|
+
const n = (/* @__PURE__ */ new Date()).getTime(), t = Math.round((e - n) / 1e3), i = Math.floor(t / m), r = Math.floor(t % m / d), o = Math.floor(t % m % d / c), a = Math.round(t % m % d % c);
|
9
|
+
return { days: i, hours: r, minutes: o, seconds: a, done: t <= 0 };
|
11
10
|
}
|
12
11
|
function l({ number: e, label: n, length: t = 2 }) {
|
13
12
|
let i = e.toString();
|
14
13
|
for (; i.length < t; )
|
15
14
|
i = `0${i}`;
|
16
|
-
const
|
15
|
+
const r = i.split("");
|
17
16
|
return /* @__PURE__ */ g("span", { className: "num-group", children: [
|
18
|
-
/* @__PURE__ */
|
17
|
+
/* @__PURE__ */ s("span", { className: "num-items", children: r.map((o, a) => (
|
19
18
|
// eslint-disable-next-line react/no-array-index-key
|
20
|
-
/* @__PURE__ */
|
19
|
+
/* @__PURE__ */ s("strong", { className: "num-item", children: o }, `num-${a}`)
|
21
20
|
)) }),
|
22
|
-
/* @__PURE__ */
|
21
|
+
/* @__PURE__ */ s("span", { className: "num-label", children: n })
|
23
22
|
] });
|
24
23
|
}
|
25
24
|
class f extends b {
|
26
25
|
constructor(n) {
|
27
26
|
const t = Object.assign({}, n);
|
28
27
|
p(t.dark) && (t.dark = !0), p(t.style) && (t.style = {}), super(t);
|
29
|
-
const i =
|
28
|
+
const i = y(t, f, ["dark", "endTime", "style"]);
|
30
29
|
this.state = h(i.endTime), this.timer = void 0;
|
31
30
|
}
|
32
31
|
componentDidMount() {
|
@@ -39,20 +38,20 @@ class f extends b {
|
|
39
38
|
this.timer && (clearInterval(this.timer), this.timer = void 0);
|
40
39
|
}
|
41
40
|
render() {
|
42
|
-
const { dark: n, endTime: t, ...i } = this.props, { days:
|
43
|
-
return /* @__PURE__ */ g(
|
44
|
-
/* @__PURE__ */
|
45
|
-
/* @__PURE__ */
|
46
|
-
/* @__PURE__ */
|
47
|
-
/* @__PURE__ */
|
48
|
-
/* @__PURE__ */
|
49
|
-
/* @__PURE__ */
|
50
|
-
/* @__PURE__ */
|
41
|
+
const { dark: n, endTime: t, ...i } = this.props, { days: r, hours: o, minutes: a, seconds: x } = this.state;
|
42
|
+
return /* @__PURE__ */ g(w, { dark: n, ...i, children: [
|
43
|
+
/* @__PURE__ */ s(l, { number: r, label: "D" }),
|
44
|
+
/* @__PURE__ */ s("span", { className: "num-sep", children: ":" }),
|
45
|
+
/* @__PURE__ */ s(l, { number: o, label: "H" }),
|
46
|
+
/* @__PURE__ */ s("span", { className: "num-sep", children: ":" }),
|
47
|
+
/* @__PURE__ */ s(l, { number: a, label: "M" }),
|
48
|
+
/* @__PURE__ */ s("span", { className: "num-sep", children: ":" }),
|
49
|
+
/* @__PURE__ */ s(l, { number: x, label: "S" })
|
51
50
|
] });
|
52
51
|
}
|
53
52
|
}
|
54
|
-
const
|
55
|
-
linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5) 77%, rgba(0, 0, 0, 0.5))`,
|
53
|
+
const N = `linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
|
54
|
+
linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5) 77%, rgba(0, 0, 0, 0.5))`, w = k("div", { shouldForwardProp: (e) => e !== "dark" })`
|
56
55
|
color: ${(e) => u(e)};
|
57
56
|
font-size: 50px;
|
58
57
|
display: flex;
|
@@ -84,7 +83,7 @@ linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5) 77%, rgba(0, 0,
|
|
84
83
|
width: 40px;
|
85
84
|
height: 60px;
|
86
85
|
line-height: 60px;
|
87
|
-
background-image: ${(e) => e.dark ?
|
86
|
+
background-image: ${(e) => e.dark ? N : "none"};
|
88
87
|
text-align: center;
|
89
88
|
|
90
89
|
&:first-of-type {
|