@arcblock/ux 3.0.8 → 3.0.10
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/Address/did-address.js +47 -49
- package/lib/Address/responsive-did-address.js +53 -57
- package/lib/Avatar/index.js +16 -16
- package/lib/BlockletV2/blocklet.js +64 -64
- package/lib/BlockletV2/components/tooltip-icon.js +26 -27
- package/lib/CardSelector/index.js +1 -2
- package/lib/ClickToCopy/hook.js +10 -11
- package/lib/ClickToCopy/index.js +16 -16
- package/lib/Config/theme-mode-toggle.js +7 -8
- package/lib/DID/index.js +131 -133
- package/lib/DIDConnect/app-info-item.js +18 -18
- package/lib/DIDConnect/auth-apps/index.js +83 -84
- package/lib/DIDConnect/did-connect-container.js +89 -90
- package/lib/DIDConnect/did-connect-footer.js +25 -25
- package/lib/DIDConnect/landing-page.js +17 -17
- package/lib/DIDConnect/powered-by.js +11 -11
- package/lib/DIDConnect/request-storage-access-api-dialog.js +36 -37
- package/lib/DIDConnect/with-container.js +66 -68
- package/lib/Dialog/use-confirm.js +40 -43
- package/lib/Earth/index.js +21 -22
- package/lib/Footer/index.js +15 -16
- package/lib/Header/responsive-header.js +23 -24
- package/lib/Layout/dashboard/index.js +63 -72
- package/lib/Layout/dashboard/sidebar.js +20 -21
- package/lib/Layout/dashboard-legacy/index.js +52 -52
- package/lib/Locale/context.js +36 -37
- package/lib/Locale/selector.js +40 -42
- package/lib/NFTDisplay/index.js +114 -118
- package/lib/NFTDisplay/render-svg.js +12 -12
- package/lib/NavMenu/nav-menu.js +159 -161
- package/lib/NavMenu/sub-container.js +25 -26
- package/lib/PageScroller/index.js +28 -32
- package/lib/Passport/passport.js +11 -11
- package/lib/PhoneInput/country-select.js +38 -38
- package/lib/PhoneInput/index.js +65 -66
- package/lib/Screenshot/index.js +26 -27
- package/lib/SessionBlocklet/index.js +87 -93
- package/lib/SessionPermission/index.js +5 -9
- package/lib/SessionUser/components/did-space.js +24 -25
- package/lib/SessionUser/components/logged-in.js +122 -127
- package/lib/SessionUser/components/quick-login-item.js +41 -42
- package/lib/SessionUser/components/session-user-item.js +35 -36
- package/lib/SessionUser/components/session-user-switch.js +81 -85
- package/lib/SessionUser/components/un-login.js +41 -41
- package/lib/SessionUser/components/user-info.js +43 -47
- package/lib/SessionUser/index.js +1 -1
- package/lib/SessionUser/libs/utils.js +24 -30
- package/lib/SharedBridge/index.js +35 -35
- package/lib/Theme/index.js +16 -16
- package/lib/Theme/theme.js +42 -43
- package/lib/Toast/index.js +24 -25
- package/lib/Typography/index.js +42 -42
- package/lib/UserCard/Content/basic.js +91 -93
- package/lib/UserCard/Content/shorten-label.js +9 -9
- package/lib/UserCard/components.js +15 -15
- package/lib/Util/deprecate.js +1 -1
- package/lib/Util/federated.js +28 -32
- package/lib/Util/iframe.js +9 -10
- package/lib/Util/index.js +134 -135
- package/lib/Util/security.js +9 -10
- package/lib/Util/wallet.js +6 -9
- package/lib/VerificationCode/index.js +26 -28
- package/lib/hooks/use-blocklet-logo.js +11 -14
- package/lib/ux.css +1 -1
- package/lib/withTracker/index.js +13 -14
- package/package.json +9 -10
@@ -1,14 +1,14 @@
|
|
1
|
-
import { jsx as o, jsxs as
|
1
|
+
import { jsx as o, jsxs as I } from "react/jsx-runtime";
|
2
2
|
import "@fontsource/ubuntu-mono/400.css";
|
3
|
-
import { Check as
|
4
|
-
import { Box as l, Tooltip as
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { useState as
|
9
|
-
import { styled as
|
10
|
-
import { getFontSize as
|
11
|
-
import
|
3
|
+
import { Check as P } from "@mui/icons-material";
|
4
|
+
import { Box as l, Tooltip as h } from "@mui/material";
|
5
|
+
import B from "copy-to-clipboard";
|
6
|
+
import C from "lodash/noop";
|
7
|
+
import E from "@arcblock/icons/lib/Copy";
|
8
|
+
import { useState as F, useRef as w, useImperativeHandle as S } from "react";
|
9
|
+
import { styled as A } from "../Theme/index.js";
|
10
|
+
import { getFontSize as H } from "../Util/index.js";
|
11
|
+
import L from "./compact-text.js";
|
12
12
|
const i = {
|
13
13
|
en: {
|
14
14
|
copy: "Click To Copy",
|
@@ -19,36 +19,35 @@ const i = {
|
|
19
19
|
copied: "已复制!"
|
20
20
|
}
|
21
21
|
};
|
22
|
-
function
|
22
|
+
function Z({
|
23
23
|
ref: e = void 0,
|
24
|
-
...
|
24
|
+
...g
|
25
25
|
}) {
|
26
26
|
const {
|
27
|
-
component:
|
28
|
-
size:
|
29
|
-
copyable:
|
30
|
-
showCopyButtonInTooltip:
|
27
|
+
component: v = "span",
|
28
|
+
size: b = 0,
|
29
|
+
copyable: t = !0,
|
30
|
+
showCopyButtonInTooltip: z = !1,
|
31
31
|
children: a = null,
|
32
|
-
content:
|
33
|
-
prepend:
|
34
|
-
append:
|
32
|
+
content: $ = "",
|
33
|
+
prepend: k = null,
|
34
|
+
append: N = null,
|
35
35
|
compact: d = !1,
|
36
|
-
startChars:
|
37
|
-
endChars:
|
38
|
-
locale:
|
39
|
-
...
|
40
|
-
} =
|
41
|
-
let
|
42
|
-
i[
|
43
|
-
const [
|
44
|
-
|
45
|
-
E(k || ((t = u.current) == null ? void 0 : t.textContent) || ""), m(!0), setTimeout(() => {
|
36
|
+
startChars: T = 6,
|
37
|
+
endChars: D = 6,
|
38
|
+
locale: R = "en",
|
39
|
+
...j
|
40
|
+
} = g;
|
41
|
+
let r = R;
|
42
|
+
i[r] || (r = "en");
|
43
|
+
const [n, m] = F(!1), u = w(null), c = w(null), f = () => {
|
44
|
+
B($ || u.current?.textContent || ""), m(!0), setTimeout(() => {
|
46
45
|
m(!1);
|
47
46
|
}, 1500);
|
48
|
-
}, p = (
|
49
|
-
|
47
|
+
}, p = (s) => {
|
48
|
+
s.stopPropagation(), s.preventDefault(), f();
|
50
49
|
};
|
51
|
-
|
50
|
+
S(
|
52
51
|
e,
|
53
52
|
() => new Proxy(
|
54
53
|
{
|
@@ -56,30 +55,29 @@ function _({
|
|
56
55
|
getEl: () => c.current
|
57
56
|
},
|
58
57
|
{
|
59
|
-
get(
|
60
|
-
|
61
|
-
return t[x] || ((h = c.current) == null ? void 0 : h[x]);
|
58
|
+
get(s, x) {
|
59
|
+
return s[x] || c.current?.[x];
|
62
60
|
}
|
63
61
|
}
|
64
62
|
)
|
65
63
|
);
|
66
64
|
let y = null;
|
67
|
-
return
|
65
|
+
return t && (y = /* @__PURE__ */ o("span", { className: "did-address-copy-wrapper", title: n ? "" : i[r].copy, children: n ? /* @__PURE__ */ o(h, { title: i[r].copied, placement: "bottom", arrow: !0, open: n, children: /* @__PURE__ */ o(P, { className: "did-address-copy", sx: { color: "success.main" } }) }) : (
|
68
66
|
/* title prop 直接加在 icon 上不生效 */
|
69
|
-
/* @__PURE__ */ o(
|
70
|
-
) })), /* @__PURE__ */
|
71
|
-
|
67
|
+
/* @__PURE__ */ o(E, { className: "did-address-copy", width: "1em", height: "1em", onClick: p })
|
68
|
+
) })), /* @__PURE__ */ I(M, { as: v, size: b, ...j, ref: c, children: [
|
69
|
+
k,
|
72
70
|
/* @__PURE__ */ o(l, { sx: { display: "none" }, ref: u, children: a }),
|
73
|
-
/* @__PURE__ */ o(
|
71
|
+
/* @__PURE__ */ o(h, { title: t ? "" : i[r].copied, placement: "bottom", arrow: !0, open: n, children: d ? /* @__PURE__ */ o(
|
74
72
|
l,
|
75
73
|
{
|
76
74
|
component: "span",
|
77
75
|
className: "did-address-text",
|
78
76
|
sx: {
|
79
|
-
cursor:
|
77
|
+
cursor: t ? "unset" : "pointer"
|
80
78
|
},
|
81
|
-
onDoubleClick:
|
82
|
-
children: /* @__PURE__ */ o(
|
79
|
+
onDoubleClick: t ? C : p,
|
80
|
+
children: /* @__PURE__ */ o(L, { startChars: T, endChars: D, showCopyButtonInTooltip: z, children: a })
|
83
81
|
}
|
84
82
|
) : /* @__PURE__ */ o(
|
85
83
|
l,
|
@@ -88,17 +86,17 @@ function _({
|
|
88
86
|
className: "did-address-text did-address-truncate",
|
89
87
|
sx: {
|
90
88
|
display: d ? "none" : "inline",
|
91
|
-
cursor:
|
89
|
+
cursor: t ? "unset" : "pointer"
|
92
90
|
},
|
93
|
-
onDoubleClick:
|
91
|
+
onDoubleClick: t ? C : p,
|
94
92
|
children: a
|
95
93
|
}
|
96
94
|
) }),
|
97
95
|
y,
|
98
|
-
|
96
|
+
N
|
99
97
|
] });
|
100
98
|
}
|
101
|
-
const
|
99
|
+
const M = A(l, { shouldForwardProp: (e) => e !== "inline" })`
|
102
100
|
font-family: 'Ubuntu Mono', monospace;
|
103
101
|
&& {
|
104
102
|
display: ${({ inline: e }) => e ? "inline-flex" : "flex"};
|
@@ -106,7 +104,7 @@ const U = H(l, { shouldForwardProp: (e) => e !== "inline" })`
|
|
106
104
|
max-width: 100%;
|
107
105
|
overflow: hidden;
|
108
106
|
color: #ccc;
|
109
|
-
font-size: ${(e) =>
|
107
|
+
font-size: ${(e) => H(e.size)};
|
110
108
|
font-weight: 400;
|
111
109
|
|
112
110
|
svg {
|
@@ -149,5 +147,5 @@ const U = H(l, { shouldForwardProp: (e) => e !== "inline" })`
|
|
149
147
|
}
|
150
148
|
`;
|
151
149
|
export {
|
152
|
-
|
150
|
+
Z as default
|
153
151
|
};
|
@@ -1,89 +1,85 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { useLatest as
|
3
|
-
import { useState as
|
4
|
-
import { Box as
|
5
|
-
import { styled as
|
6
|
-
import
|
7
|
-
import { getFontSize as
|
8
|
-
function
|
9
|
-
ref:
|
10
|
-
style:
|
11
|
-
className:
|
12
|
-
component:
|
13
|
-
size:
|
14
|
-
...
|
1
|
+
import { jsxs as D, jsx as w } from "react/jsx-runtime";
|
2
|
+
import { useLatest as O, useDebounceFn as S } from "ahooks";
|
3
|
+
import { useState as s, useRef as x, useImperativeHandle as z, useEffect as b } from "react";
|
4
|
+
import { Box as C } from "@mui/material";
|
5
|
+
import { styled as W } from "../Theme/index.js";
|
6
|
+
import E from "./did-address.js";
|
7
|
+
import { getFontSize as L } from "../Util/index.js";
|
8
|
+
function J({
|
9
|
+
ref: e = void 0,
|
10
|
+
style: g = {},
|
11
|
+
className: y = void 0,
|
12
|
+
component: i = "span",
|
13
|
+
size: o = 0,
|
14
|
+
...u
|
15
15
|
}) {
|
16
|
-
const [
|
16
|
+
const [p, R] = s(!1), F = O(p), [l, h] = s(null), [d, m] = s(null), [a, A] = s(!0), { run: v } = S(() => A(!1), {
|
17
17
|
wait: 50
|
18
|
-
}),
|
19
|
-
return
|
20
|
-
|
18
|
+
}), n = x(null), t = x(null);
|
19
|
+
return z(
|
20
|
+
e,
|
21
21
|
() => new Proxy(
|
22
22
|
{},
|
23
23
|
{
|
24
|
-
get(c,
|
25
|
-
|
26
|
-
return (e = i.current) == null ? void 0 : e[s];
|
24
|
+
get(c, r) {
|
25
|
+
return t.current?.[r];
|
27
26
|
}
|
28
27
|
}
|
29
28
|
)
|
30
|
-
),
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
}),
|
38
|
-
|
39
|
-
w((n = o.current) == null ? void 0 : n.offsetWidth);
|
40
|
-
}), s.observe(i.current.getEl()), e.observe(o.current), x(), () => {
|
41
|
-
s == null || s.disconnect(), e == null || e.disconnect();
|
29
|
+
), b(() => {
|
30
|
+
const c = t.current?.offsetWidth || 0;
|
31
|
+
let r = null, f = null;
|
32
|
+
return h(c), m(n.current?.offsetWidth), r = new ResizeObserver(() => {
|
33
|
+
!F.current && t.current?.offsetWidth !== c && (h(t.current?.offsetWidth), v());
|
34
|
+
}), f = new ResizeObserver(() => {
|
35
|
+
m(n.current?.offsetWidth);
|
36
|
+
}), r.observe(t.current.getEl()), f.observe(n.current), v(), () => {
|
37
|
+
r?.disconnect(), f?.disconnect();
|
42
38
|
};
|
43
|
-
}, []),
|
44
|
-
|
45
|
-
}, [
|
46
|
-
|
39
|
+
}, []), b(() => {
|
40
|
+
d && l && R(d < l);
|
41
|
+
}, [d, l]), /* @__PURE__ */ D(
|
42
|
+
$,
|
47
43
|
{
|
48
|
-
as:
|
49
|
-
ref:
|
50
|
-
style:
|
51
|
-
className:
|
52
|
-
size:
|
53
|
-
...
|
54
|
-
inline:
|
44
|
+
as: i,
|
45
|
+
ref: n,
|
46
|
+
style: g,
|
47
|
+
className: y,
|
48
|
+
size: o,
|
49
|
+
...i === "span" ? {} : {
|
50
|
+
inline: u.inline
|
55
51
|
},
|
56
52
|
children: [
|
57
|
-
/* @__PURE__ */
|
58
|
-
|
53
|
+
/* @__PURE__ */ w(
|
54
|
+
j,
|
59
55
|
{
|
60
56
|
style: {
|
61
57
|
position: a ? "absolute" : "static",
|
62
58
|
left: a ? "-99999px" : "auto"
|
63
59
|
},
|
64
|
-
...
|
65
|
-
size:
|
66
|
-
component:
|
60
|
+
...u,
|
61
|
+
size: o,
|
62
|
+
component: i,
|
67
63
|
inline: !0,
|
68
|
-
compact:
|
69
|
-
ref:
|
64
|
+
compact: p,
|
65
|
+
ref: t
|
70
66
|
}
|
71
67
|
),
|
72
|
-
a && /* @__PURE__ */
|
68
|
+
a && /* @__PURE__ */ w("div", { style: { width: "100%", height: `${(o || 16) * 1.5}px` } })
|
73
69
|
]
|
74
70
|
}
|
75
71
|
);
|
76
72
|
}
|
77
|
-
const
|
73
|
+
const $ = W(C, { shouldForwardProp: (e) => e !== "size" })`
|
78
74
|
display: block;
|
79
75
|
width: 100%; /* flex & column & align-items: flex-start 时, 块级元素不会自动铺满容器 */
|
80
|
-
font-size: ${({ size:
|
76
|
+
font-size: ${({ size: e }) => L(e)};
|
81
77
|
overflow: hidden;
|
82
|
-
${({ inline:
|
78
|
+
${({ inline: e }) => e && `
|
83
79
|
display: inline-block;
|
84
80
|
width: 100%;
|
85
81
|
`}
|
86
|
-
`,
|
82
|
+
`, j = W(E)`
|
87
83
|
&& {
|
88
84
|
max-width: none;
|
89
85
|
}
|
@@ -95,5 +91,5 @@ const H = F(k, { shouldForwardProp: (t) => t !== "size" })`
|
|
95
91
|
}
|
96
92
|
`;
|
97
93
|
export {
|
98
|
-
|
94
|
+
J as default
|
99
95
|
};
|
package/lib/Avatar/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
2
2
|
import { useState as k, useMemo as P } from "react";
|
3
3
|
import t from "prop-types";
|
4
4
|
import { ErrorBoundary as z } from "react-error-boundary";
|
@@ -13,21 +13,21 @@ import { DID_PREFIX as f } from "../Util/constant.js";
|
|
13
13
|
function d({ ...s }) {
|
14
14
|
const r = Object.assign({}, s);
|
15
15
|
n(r.did) && (r.did = ""), n(r.size) && (r.size = 36), n(r.variant) && (r.variant = "default"), n(r.animation) && (r.animation = !1), n(r.shape) && (r.shape = ""), n(r.blockiesPadding) && (r.blockiesPadding = !0), n(r.responsive) && (r.responsive = !1);
|
16
|
-
const [c, h] = k(!1), g = E(r, d, []), { did: i = "", size: e, src: p, variant: b, animation: v, shape: x, blockiesPadding: y, responsive: w, ...
|
16
|
+
const [c, h] = k(!1), g = E(r, d, []), { did: i = "", size: e, src: p, variant: b, animation: v, shape: x, blockiesPadding: y, responsive: w, ...a } = g, l = P(() => R(i) ? T.createIcon({
|
17
17
|
seed: i.replace(f, "").toLowerCase(),
|
18
18
|
size: 8,
|
19
19
|
scale: 16
|
20
20
|
}).toDataURL() : null, [i]);
|
21
21
|
if (p && !c)
|
22
|
-
return /* @__PURE__ */
|
22
|
+
return /* @__PURE__ */ o(
|
23
23
|
m,
|
24
24
|
{
|
25
25
|
width: e,
|
26
26
|
src: p,
|
27
27
|
alt: i,
|
28
28
|
onError: () => h(!0),
|
29
|
-
...
|
30
|
-
className: `avatar-img--${b} ${
|
29
|
+
...a,
|
30
|
+
className: `avatar-img--${b} ${a?.className || ""}`,
|
31
31
|
sx: {
|
32
32
|
"& .avatar-img--rounded": {
|
33
33
|
borderRadius: "4px",
|
@@ -37,17 +37,17 @@ function d({ ...s }) {
|
|
37
37
|
borderRadius: "100%",
|
38
38
|
overflow: "hidden"
|
39
39
|
},
|
40
|
-
...
|
40
|
+
...a.sx
|
41
41
|
}
|
42
42
|
}
|
43
43
|
);
|
44
44
|
if (l) {
|
45
45
|
if (y) {
|
46
46
|
const I = e > 24 ? 4 : 2;
|
47
|
-
return /* @__PURE__ */
|
47
|
+
return /* @__PURE__ */ o(
|
48
48
|
u,
|
49
49
|
{
|
50
|
-
...
|
50
|
+
...a,
|
51
51
|
sx: {
|
52
52
|
display: "flex",
|
53
53
|
alignItems: "center",
|
@@ -63,16 +63,16 @@ function d({ ...s }) {
|
|
63
63
|
borderRadius: `${Math.min(10, Math.floor(0.1 * e + 2))}px`,
|
64
64
|
background: "#ddd"
|
65
65
|
},
|
66
|
-
...
|
66
|
+
...a.sx
|
67
67
|
},
|
68
|
-
children: /* @__PURE__ */
|
68
|
+
children: /* @__PURE__ */ o("div", { className: "blocky-icon-inner", children: /* @__PURE__ */ o(m, { width: e * 0.7 - I * 2, src: l, alt: i }) })
|
69
69
|
}
|
70
70
|
);
|
71
71
|
}
|
72
|
-
return /* @__PURE__ */
|
72
|
+
return /* @__PURE__ */ o(m, { ...a, width: e, src: l, alt: i, style: { marginRight: 4 } });
|
73
73
|
}
|
74
74
|
if (i)
|
75
|
-
return /* @__PURE__ */
|
75
|
+
return /* @__PURE__ */ o(
|
76
76
|
M,
|
77
77
|
{
|
78
78
|
did: i.replace(f, ""),
|
@@ -80,7 +80,7 @@ function d({ ...s }) {
|
|
80
80
|
animation: v,
|
81
81
|
shape: D[(x || "").toUpperCase()],
|
82
82
|
responsive: w,
|
83
|
-
...
|
83
|
+
...a
|
84
84
|
}
|
85
85
|
);
|
86
86
|
throw new Error(`Invalid DID: ${i}`);
|
@@ -98,10 +98,10 @@ d.propTypes = {
|
|
98
98
|
};
|
99
99
|
function $(s) {
|
100
100
|
const r = s.size || 36, c = { rounded: "4px", circle: "100%" }[s.variant] || 0;
|
101
|
-
return /* @__PURE__ */
|
101
|
+
return /* @__PURE__ */ o(
|
102
102
|
z,
|
103
103
|
{
|
104
|
-
fallbackRender: () => /* @__PURE__ */
|
104
|
+
fallbackRender: () => /* @__PURE__ */ o(
|
105
105
|
u,
|
106
106
|
{
|
107
107
|
sx: {
|
@@ -112,7 +112,7 @@ function $(s) {
|
|
112
112
|
}
|
113
113
|
}
|
114
114
|
),
|
115
|
-
children: /* @__PURE__ */
|
115
|
+
children: /* @__PURE__ */ o(d, { ...s })
|
116
116
|
}
|
117
117
|
);
|
118
118
|
}
|
@@ -1,52 +1,52 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { isValidElement as
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { isValidElement as W } from "react";
|
3
3
|
import E from "@iconify-icons/tabler/cloud-download";
|
4
4
|
import { Icon as s } from "@iconify/react";
|
5
5
|
import { Verified as F } from "@mui/icons-material";
|
6
|
-
import { useTheme as O, Card as V, Stack as
|
7
|
-
import
|
6
|
+
import { useTheme as O, Card as V, Stack as f, Typography as S, Box as I, CircularProgress as q } from "@mui/material";
|
7
|
+
import z from "../Avatar/index.js";
|
8
8
|
import G from "../Button/index.js";
|
9
9
|
import "../Theme/theme.js";
|
10
10
|
import "../Theme/theme-provider.js";
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import { strippedString as
|
14
|
-
function
|
11
|
+
import c from "./components/icon-text.js";
|
12
|
+
import B from "./components/tooltip-icon.js";
|
13
|
+
import { strippedString as T, formatDownloadCount as J } from "./utils.js";
|
14
|
+
function so({ ...M }) {
|
15
15
|
const {
|
16
|
-
title:
|
17
|
-
description:
|
18
|
-
cover:
|
19
|
-
avatar:
|
20
|
-
author:
|
21
|
-
download:
|
22
|
-
did:
|
23
|
-
official:
|
24
|
-
buttonText:
|
25
|
-
buttonDisabled:
|
26
|
-
buttonLoading:
|
27
|
-
button:
|
28
|
-
onButtonClick:
|
16
|
+
title: r,
|
17
|
+
description: e = "",
|
18
|
+
cover: A = "",
|
19
|
+
avatar: D,
|
20
|
+
author: L,
|
21
|
+
download: h,
|
22
|
+
did: x,
|
23
|
+
official: n,
|
24
|
+
buttonText: P = "Install",
|
25
|
+
buttonDisabled: m,
|
26
|
+
buttonLoading: d,
|
27
|
+
button: u,
|
28
|
+
onButtonClick: y = () => {
|
29
29
|
},
|
30
|
-
onMainClick:
|
30
|
+
onMainClick: g,
|
31
31
|
className: K,
|
32
32
|
ref: Q,
|
33
|
-
icons:
|
34
|
-
status:
|
35
|
-
...
|
36
|
-
} =
|
37
|
-
const
|
38
|
-
(H() ||
|
39
|
-
}, _ =
|
40
|
-
return /* @__PURE__ */
|
33
|
+
icons: R,
|
34
|
+
status: k,
|
35
|
+
...b
|
36
|
+
} = M, p = O(), v = (o, H = () => !1) => (w, ...N) => {
|
37
|
+
const C = o instanceof Function;
|
38
|
+
(H() || C) && (w.preventDefault(), w.stopPropagation(), C && o(...N));
|
39
|
+
}, _ = g && v(g), j = v(y, () => !!(u || m || d)), l = W(r) ? { children: r } : { title: T(r), dangerouslySetInnerHTML: { __html: r } }, a = W(e) ? { children: e } : { title: T(e), dangerouslySetInnerHTML: { __html: e } };
|
40
|
+
return /* @__PURE__ */ i(
|
41
41
|
V,
|
42
42
|
{
|
43
43
|
variant: "outlined",
|
44
44
|
onClick: _,
|
45
|
-
...
|
46
|
-
sx: { p: { xs: 2, md: 3 }, borderRadius: 1, ...
|
45
|
+
...b,
|
46
|
+
sx: { p: { xs: 2, md: 3 }, borderRadius: 1, ...b.sx },
|
47
47
|
children: [
|
48
|
-
/* @__PURE__ */
|
49
|
-
|
48
|
+
/* @__PURE__ */ i(
|
49
|
+
f,
|
50
50
|
{
|
51
51
|
direction: "row",
|
52
52
|
sx: {
|
@@ -57,12 +57,12 @@ function co({ ...A }) {
|
|
57
57
|
"& > *": { flexShrink: 0 }
|
58
58
|
},
|
59
59
|
children: [
|
60
|
-
/* @__PURE__ */ t(
|
60
|
+
/* @__PURE__ */ t(z, { src: A, did: x, size: 48, variant: "rounded", style: { borderRadius: "8px", overflow: "hidden" } }),
|
61
61
|
/* @__PURE__ */ t(
|
62
|
-
|
62
|
+
S,
|
63
63
|
{
|
64
64
|
className: "blocklet-title",
|
65
|
-
...
|
65
|
+
...l,
|
66
66
|
sx: [
|
67
67
|
{
|
68
68
|
fontWeight: "fontWeightMedium",
|
@@ -74,12 +74,12 @@ function co({ ...A }) {
|
|
74
74
|
pl: 0.5,
|
75
75
|
"&&": { flexShrink: 1 }
|
76
76
|
},
|
77
|
-
...Array.isArray(
|
77
|
+
...Array.isArray(l.sx) ? l.sx : [l.sx]
|
78
78
|
]
|
79
79
|
}
|
80
80
|
),
|
81
|
-
/* @__PURE__ */
|
82
|
-
|
81
|
+
/* @__PURE__ */ i(
|
82
|
+
I,
|
83
83
|
{
|
84
84
|
sx: {
|
85
85
|
flex: 1,
|
@@ -89,47 +89,47 @@ function co({ ...A }) {
|
|
89
89
|
gap: 1
|
90
90
|
},
|
91
91
|
children: [
|
92
|
-
|
93
|
-
|
92
|
+
n && /* @__PURE__ */ t(B, { title: n.tooltip, children: /* @__PURE__ */ t(F, { sx: { color: n.color || "#D97706", fontSize: n.size || 18 } }) }),
|
93
|
+
R?.map((o) => /* @__PURE__ */ t(B, { title: o.title, children: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon, style: { color: o.color } }) : o.icon }, o.key))
|
94
94
|
]
|
95
95
|
}
|
96
96
|
),
|
97
|
-
|
97
|
+
y && /* @__PURE__ */ i(
|
98
98
|
G,
|
99
99
|
{
|
100
100
|
variant: "outlined",
|
101
101
|
size: "small",
|
102
|
-
disabled:
|
102
|
+
disabled: m || d,
|
103
103
|
style: {
|
104
|
-
color:
|
105
|
-
borderColor:
|
104
|
+
color: p.palette.text.primary,
|
105
|
+
borderColor: p.palette.grey[300],
|
106
106
|
borderRadius: 8,
|
107
107
|
fontSize: 13,
|
108
|
-
fontWeight:
|
108
|
+
fontWeight: p.typography.fontWeightMedium
|
109
109
|
},
|
110
110
|
onClick: j,
|
111
111
|
children: [
|
112
|
-
|
113
|
-
|
112
|
+
d && /* @__PURE__ */ t(q, { size: 15, style: { marginRight: 3, color: "inherit" } }),
|
113
|
+
P
|
114
114
|
]
|
115
115
|
}
|
116
116
|
),
|
117
|
-
|
117
|
+
u
|
118
118
|
]
|
119
119
|
}
|
120
120
|
),
|
121
121
|
/* @__PURE__ */ t(
|
122
|
-
|
122
|
+
f,
|
123
123
|
{
|
124
124
|
sx: {
|
125
125
|
py: 2
|
126
126
|
},
|
127
127
|
children: /* @__PURE__ */ t(
|
128
|
-
|
128
|
+
S,
|
129
129
|
{
|
130
130
|
className: "blocklet-description",
|
131
131
|
variant: "body2",
|
132
|
-
...
|
132
|
+
...a,
|
133
133
|
sx: [
|
134
134
|
{
|
135
135
|
color: "text.secondary",
|
@@ -141,14 +141,14 @@ function co({ ...A }) {
|
|
141
141
|
cursor: "default",
|
142
142
|
height: 40
|
143
143
|
},
|
144
|
-
...Array.isArray(
|
144
|
+
...Array.isArray(a.sx) ? a.sx : [a.sx]
|
145
145
|
]
|
146
146
|
}
|
147
147
|
)
|
148
148
|
}
|
149
149
|
),
|
150
|
-
/* @__PURE__ */
|
151
|
-
|
150
|
+
/* @__PURE__ */ i(
|
151
|
+
f,
|
152
152
|
{
|
153
153
|
direction: "row",
|
154
154
|
sx: {
|
@@ -157,10 +157,10 @@ function co({ ...A }) {
|
|
157
157
|
color: "text.secondary"
|
158
158
|
},
|
159
159
|
children: [
|
160
|
-
/* @__PURE__ */ t(
|
161
|
-
/* @__PURE__ */ t(
|
162
|
-
|
163
|
-
|
160
|
+
/* @__PURE__ */ t(c, { icon: /* @__PURE__ */ t(z, { src: D, did: x, size: 20, variant: "circle" }), maxWidth: 200, children: L }),
|
161
|
+
/* @__PURE__ */ t(c, { icon: /* @__PURE__ */ t(s, { icon: E }), title: h, children: J(h) }),
|
162
|
+
k?.filter((o) => o.align !== "right").map((o) => /* @__PURE__ */ t(
|
163
|
+
c,
|
164
164
|
{
|
165
165
|
icon: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon }) : o.icon,
|
166
166
|
title: o.title,
|
@@ -169,9 +169,9 @@ function co({ ...A }) {
|
|
169
169
|
},
|
170
170
|
o.key
|
171
171
|
)),
|
172
|
-
/* @__PURE__ */ t(
|
173
|
-
|
174
|
-
|
172
|
+
/* @__PURE__ */ t(I, { sx: { flex: 1 } }),
|
173
|
+
k?.filter((o) => o.align === "right").map((o) => /* @__PURE__ */ t(
|
174
|
+
c,
|
175
175
|
{
|
176
176
|
icon: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon }) : o.icon,
|
177
177
|
title: o.title,
|
@@ -189,5 +189,5 @@ function co({ ...A }) {
|
|
189
189
|
);
|
190
190
|
}
|
191
191
|
export {
|
192
|
-
|
192
|
+
so as default
|
193
193
|
};
|