@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
package/lib/Screenshot/index.js
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
import { jsx as s, jsxs as
|
2
|
-
import { useRef as
|
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
|
6
|
-
import { styled as
|
7
|
-
import
|
8
|
-
|
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";
|
7
|
+
import "./devices.css";
|
9
8
|
const u = {
|
10
9
|
"iphone-x": {
|
11
10
|
borderRadius: 32,
|
@@ -72,33 +71,33 @@ const u = {
|
|
72
71
|
width: 200,
|
73
72
|
scale: 1
|
74
73
|
}
|
75
|
-
},
|
74
|
+
}, j = {
|
76
75
|
img: ["alt", "title", "src", "srcSet", "sizes", "loading", "key", "children"],
|
77
76
|
video: ["alt", "title", "muted", "autoplay", "loop", "key", "children"]
|
78
|
-
},
|
79
|
-
|
77
|
+
}, E = (t) => [
|
78
|
+
$(
|
80
79
|
t.type,
|
81
|
-
|
80
|
+
j[t.type].reduce((e, i) => (e[i] = t.props[i], e), {})
|
82
81
|
)
|
83
|
-
],
|
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
|
86
|
+
return E(r);
|
88
87
|
if (r.props && r.props.children) {
|
89
|
-
const n =
|
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
|
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 =
|
100
|
-
return /* @__PURE__ */
|
101
|
-
|
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:
|
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
|
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
|
140
|
-
const e =
|
141
|
-
return
|
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(
|
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
|
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
|
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(
|
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
|
-
|
162
|
+
Z as default
|
164
163
|
};
|
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 {
|
4
|
+
import { 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 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 =
|
12
|
-
width:
|
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
|
17
|
-
/* @__PURE__ */ t("iframe", { title:
|
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:
|
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 =
|
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
|
-
|
39
|
+
x 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 { Typography as g } from "@mui/material";
|
3
3
|
import i from "lodash/isUndefined";
|
4
|
-
import
|
5
|
-
import { mergeProps as
|
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
|
8
|
-
import { styled as
|
9
|
-
function
|
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 =
|
13
|
-
return /* @__PURE__ */ l(
|
14
|
-
/* @__PURE__ */ l("img", { src:
|
15
|
-
s === "vertical" && /* @__PURE__ */ o(
|
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
|
-
},
|
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
|
-
|
82
|
+
u 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 {
|
3
|
+
import { Typography as f } from "@mui/material";
|
4
4
|
import a from "lodash/isUndefined";
|
5
|
-
import
|
6
|
-
import
|
5
|
+
import v from "./images/app-store.svg.js";
|
6
|
+
import b 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 x } from "../Theme/index.js";
|
11
|
+
function D(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, D, ["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(N, { ...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(v, {}) }),
|
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(b, {}) })
|
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 N(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 N = x("div")`
|
33
33
|
display: flex;
|
34
34
|
flex-direction: ${(t) => t.layout === "vertical" ? "column" : "row"};
|
35
35
|
align-items: center;
|
@@ -60,5 +60,5 @@ const $ = D(v)`
|
|
60
60
|
}
|
61
61
|
`;
|
62
62
|
export {
|
63
|
-
|
63
|
+
D 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.14",
|
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": "3957f4585b68497a5f297c25649f8759e98c6c7a",
|
64
64
|
"dependencies": {
|
65
|
-
"@arcblock/bridge": "3.0.
|
65
|
+
"@arcblock/bridge": "3.0.14",
|
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.
|
68
|
+
"@arcblock/icons": "3.0.14",
|
69
|
+
"@arcblock/nft-display": "3.0.14",
|
70
|
+
"@arcblock/react-hooks": "3.0.14",
|
71
71
|
"@blocklet/js-sdk": "^1.16.45",
|
72
|
-
"@blocklet/theme": "3.0.
|
72
|
+
"@blocklet/theme": "3.0.14",
|
73
73
|
"@fontsource/roboto": "~5.1.1",
|
74
74
|
"@fontsource/ubuntu-mono": "^5.2.6",
|
75
75
|
"@iconify-icons/logos": "^1.2.36",
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { useEffect, useState } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { green, blue } from '@mui/material/colors';
|
4
|
-
import { Box } from '@mui/material';
|
5
4
|
|
6
5
|
import Logo from '../Logo';
|
7
6
|
import { styled, useTheme } from '../Theme';
|
@@ -55,7 +54,7 @@ ActivityIndicator.propTypes = {
|
|
55
54
|
messages: PropTypes.arrayOf(PropTypes.string.isRequired),
|
56
55
|
};
|
57
56
|
|
58
|
-
const Div = styled(
|
57
|
+
const Div = styled('div')`
|
59
58
|
&& {
|
60
59
|
box-sizing: border-box;
|
61
60
|
padding: 20px;
|
@@ -114,7 +113,7 @@ Orbit.propTypes = {
|
|
114
113
|
duration: PropTypes.number,
|
115
114
|
};
|
116
115
|
|
117
|
-
const OrbitRoot = styled(
|
116
|
+
const OrbitRoot = styled('div')`
|
118
117
|
@keyframes orbit {
|
119
118
|
0% {
|
120
119
|
transform: rotate(0deg);
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Box } from '@mui/material';
|
2
1
|
import { styled } from '../Theme';
|
3
2
|
|
4
3
|
export { default as WithDifferentSizes } from './demo/with-different-sizes';
|
@@ -24,7 +23,7 @@ export default {
|
|
24
23
|
],
|
25
24
|
};
|
26
25
|
|
27
|
-
const ResizableContainer = styled(
|
26
|
+
const ResizableContainer = styled('div')`
|
28
27
|
width: 600px;
|
29
28
|
max-width: 100%;
|
30
29
|
padding: 16px;
|
package/src/Alert/index.jsx
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
|
-
import {
|
2
|
+
import { Typography } from '@mui/material';
|
3
3
|
import { blueGrey } from '@mui/material/colors';
|
4
4
|
import isUndefined from 'lodash/isUndefined';
|
5
5
|
|
@@ -106,7 +106,7 @@ Alert.propTypes = {
|
|
106
106
|
|
107
107
|
export default withDeprecated(Alert, { name: 'Alert', alternative: '@mui/material/Alert' });
|
108
108
|
|
109
|
-
const Container = styled(
|
109
|
+
const Container = styled('div')`
|
110
110
|
display: flex;
|
111
111
|
align-items: center;
|
112
112
|
font-size: 16px;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useState, useEffect, useRef } from 'react';
|
2
|
-
import {
|
2
|
+
import { Skeleton } from '@mui/material';
|
3
3
|
|
4
4
|
import PropTypes from 'prop-types';
|
5
5
|
import Lottie from 'react-lottie-player';
|
@@ -214,7 +214,7 @@ AnimationWaiter.propTypes = {
|
|
214
214
|
increaseSpeed: PropTypes.number,
|
215
215
|
};
|
216
216
|
|
217
|
-
const Container = styled(
|
217
|
+
const Container = styled('div')`
|
218
218
|
display: flex;
|
219
219
|
justify-content: center;
|
220
220
|
align-items: center;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/* eslint-disable react/no-danger */
|
2
2
|
import { isValidElement } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
|
-
import {
|
4
|
+
import { CircularProgress, Typography, useMediaQuery } from '@mui/material';
|
5
5
|
|
6
6
|
import Avatar from '../Avatar';
|
7
7
|
import Button from '../Button';
|
@@ -9,7 +9,7 @@ import Img from '../Img';
|
|
9
9
|
import { useTheme, styled } from '../Theme';
|
10
10
|
import { strippedString } from './utils';
|
11
11
|
|
12
|
-
const Div = styled(
|
12
|
+
const Div = styled('div')`
|
13
13
|
&.arcblock-blocklet {
|
14
14
|
padding: ${(props) => props.theme.spacing(2)} ${(props) => props.theme.spacing(2)} 0
|
15
15
|
${(props) => props.theme.spacing(2)};
|
package/src/Blocklet/utils.jsx
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useRef } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import { Portal, Typography, CircularProgress, useMediaQuery
|
3
|
+
import { Portal, Typography, CircularProgress, useMediaQuery } from '@mui/material';
|
4
4
|
|
5
5
|
import Avatar from '../Avatar';
|
6
6
|
import Icon from '../Icon';
|
@@ -25,7 +25,7 @@ function prettySize(_size, digits = 1) {
|
|
25
25
|
return _size && `${size}${list[index]}`;
|
26
26
|
}
|
27
27
|
|
28
|
-
const Div = styled(
|
28
|
+
const Div = styled('div')`
|
29
29
|
&.arcblock-blocklet {
|
30
30
|
padding: 0 16px;
|
31
31
|
background: ${(props) => props.theme.palette.common.white};
|
package/src/BlockletV2/utils.js
CHANGED
package/src/Center/index.tsx
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Box } from '@mui/material';
|
2
1
|
import { styled } from '../Theme';
|
3
2
|
|
4
3
|
export default function Center({
|
@@ -23,7 +22,7 @@ export default function Center({
|
|
23
22
|
return <Div style={style}>{children}</Div>;
|
24
23
|
}
|
25
24
|
|
26
|
-
const Div = styled(
|
25
|
+
const Div = styled('div')`
|
27
26
|
flex: 1;
|
28
27
|
width: 100vw;
|
29
28
|
height: 100vh;
|
@@ -205,7 +205,7 @@ export function MuiThemeBoxButton() {
|
|
205
205
|
|
206
206
|
MuiThemeBoxButton.storyName = 'mui theme & Box/Button';
|
207
207
|
|
208
|
-
const StyledComponentTestBox = styled(
|
208
|
+
const StyledComponentTestBox = styled('div')`
|
209
209
|
padding: 16px;
|
210
210
|
background-color: ${colors.success.main};
|
211
211
|
`;
|
package/src/CountDown/index.tsx
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Component } from 'react';
|
2
|
-
import {
|
2
|
+
import { type SxProps } from '@mui/material';
|
3
3
|
import isUndefined from 'lodash/isUndefined';
|
4
4
|
|
5
5
|
import { getColor, mergeProps } from '../Util';
|
@@ -118,7 +118,7 @@ export default class CountDown extends Component<CountDownProps, CountDownState>
|
|
118
118
|
const textBackground = `linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
|
119
119
|
linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5) 77%, rgba(0, 0, 0, 0.5))`;
|
120
120
|
|
121
|
-
const Container = styled(
|
121
|
+
const Container = styled('div', { shouldForwardProp: (prop) => prop !== 'dark' })<{ dark: boolean }>`
|
122
122
|
color: ${(props) => getColor(props)};
|
123
123
|
font-size: 50px;
|
124
124
|
display: flex;
|
package/src/DID/DID.stories.jsx
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Box } from '@mui/material';
|
2
1
|
import { styled } from '../Theme';
|
3
2
|
|
4
3
|
export { default as ActionTest } from './demo/action-test';
|
@@ -23,7 +22,7 @@ export default {
|
|
23
22
|
],
|
24
23
|
};
|
25
24
|
|
26
|
-
const ResizableContainer = styled(
|
25
|
+
const ResizableContainer = styled('div')`
|
27
26
|
width: 100%;
|
28
27
|
max-width: 100%;
|
29
28
|
padding: 16px;
|
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
MenuItem,
|
20
20
|
Tooltip,
|
21
21
|
IconButton,
|
22
|
-
Box,
|
23
22
|
} from '@mui/material';
|
24
23
|
import { useDeepCompareEffect } from 'ahooks';
|
25
24
|
|
@@ -351,7 +350,7 @@ CustomToolbar.propTypes = {
|
|
351
350
|
tableRef: PropTypes.func.isRequired,
|
352
351
|
};
|
353
352
|
|
354
|
-
const Container = styled(
|
353
|
+
const Container = styled('div')`
|
355
354
|
display: flex;
|
356
355
|
align-items: center;
|
357
356
|
height: 56px;
|
@@ -413,7 +412,7 @@ const Container = styled(Box)`
|
|
413
412
|
}
|
414
413
|
`;
|
415
414
|
|
416
|
-
const ProgressContainer = styled(
|
415
|
+
const ProgressContainer = styled('div')`
|
417
416
|
width: 100%;
|
418
417
|
height: 2px;
|
419
418
|
.toolbar-progress {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useState, useRef } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import { IconButton, Tooltip, TextField
|
3
|
+
import { IconButton, Tooltip, TextField } from '@mui/material';
|
4
4
|
import { Search as SearchIcon, Clear as ClearIcon } from '@mui/icons-material';
|
5
5
|
import clsx from 'clsx';
|
6
6
|
import noop from 'lodash/noop';
|
@@ -113,7 +113,7 @@ TableSearch.propTypes = {
|
|
113
113
|
searchClose: PropTypes.func.isRequired,
|
114
114
|
};
|
115
115
|
|
116
|
-
const Container = styled(
|
116
|
+
const Container = styled('div')`
|
117
117
|
display: flex;
|
118
118
|
align-items: center;
|
119
119
|
.toolbar-search-area {
|
package/src/Datatable/index.jsx
CHANGED
@@ -8,7 +8,7 @@ import cloneDeep from 'lodash/cloneDeep';
|
|
8
8
|
import get from 'lodash/get';
|
9
9
|
import clsx from 'clsx';
|
10
10
|
import { useCreation, useDeepCompareEffect } from 'ahooks';
|
11
|
-
import {
|
11
|
+
import { CircularProgress } from '@mui/material';
|
12
12
|
|
13
13
|
import Empty from '../Empty';
|
14
14
|
import CustomToolbar from './CustomToolbar';
|
@@ -66,7 +66,7 @@ import { styled } from '../Theme';
|
|
66
66
|
* } & ModifiedMUIDataTableProps} DataTableProps
|
67
67
|
*/
|
68
68
|
|
69
|
-
const FilterLine = styled(
|
69
|
+
const FilterLine = styled('div')`
|
70
70
|
display: flex;
|
71
71
|
align-items: center;
|
72
72
|
.toolbar-filter-content {
|
@@ -481,7 +481,7 @@ const alignCss = css`
|
|
481
481
|
}
|
482
482
|
`;
|
483
483
|
|
484
|
-
const TableContainer = styled(
|
484
|
+
const TableContainer = styled('div', {
|
485
485
|
shouldForwardProp: (prop) => !['verticalKeyWidth', 'bgColor', 'hoverColor', 'stripColor'].includes(prop),
|
486
486
|
})(({ theme, verticalKeyWidth, bgColor, hoverColor, stripColor }) => {
|
487
487
|
const primaryTextColor = theme.palette.text.primary;
|
@@ -607,7 +607,7 @@ const TableContainer = styled(Box, {
|
|
607
607
|
`;
|
608
608
|
});
|
609
609
|
|
610
|
-
const FooterContainer = styled(
|
610
|
+
const FooterContainer = styled('div')`
|
611
611
|
display: flex;
|
612
612
|
align-items: center;
|
613
613
|
.datatable-footer {
|
package/src/Earth/index.tsx
CHANGED
@@ -4,7 +4,6 @@ import useSpring from 'react-use/lib/useSpring';
|
|
4
4
|
import * as d3 from 'd3-geo';
|
5
5
|
import * as topojson from 'topojson-client';
|
6
6
|
import versor from 'versor';
|
7
|
-
import { Box } from '@mui/material';
|
8
7
|
|
9
8
|
import json from './countries.json';
|
10
9
|
import util from './util';
|
@@ -394,7 +393,7 @@ type ContainerProps = {
|
|
394
393
|
colors: Colors;
|
395
394
|
};
|
396
395
|
|
397
|
-
const Container = styled(
|
396
|
+
const Container = styled('div')<ContainerProps>`
|
398
397
|
background-color: ${(props) => (props.$theme === 'light' ? '#f7f7f7' : '#222')};
|
399
398
|
width: ${(props) => props.width}px;
|
400
399
|
height: ${(props) => props.height}px;
|
@@ -477,7 +476,7 @@ const Container = styled(Box)<ContainerProps>`
|
|
477
476
|
}
|
478
477
|
`;
|
479
478
|
|
480
|
-
const Tooltip = styled(
|
479
|
+
const Tooltip = styled('div')`
|
481
480
|
position: absolute;
|
482
481
|
width: auto;
|
483
482
|
min-width: 90px;
|
package/src/Footer/index.tsx
CHANGED
package/src/Icon/image.tsx
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Box } from '@mui/material';
|
2
1
|
import Img, { type ImgProps } from '../Img';
|
3
2
|
import { styled } from '../Theme';
|
4
3
|
|
@@ -37,7 +36,7 @@ export default function ImageIcon({
|
|
37
36
|
);
|
38
37
|
}
|
39
38
|
|
40
|
-
const Div = styled(
|
39
|
+
const Div = styled('div')`
|
41
40
|
position: relative;
|
42
41
|
.badge-point {
|
43
42
|
position: absolute;
|