@blocklet/ui-react 3.0.9 → 3.0.11
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/BlockletStudio/index.js +70 -71
- package/lib/ComponentInstaller/index.js +85 -88
- package/lib/ComponentInstaller/installer-item.js +47 -53
- package/lib/ComponentInstaller/use-component-installed.js +32 -38
- package/lib/ComponentManager/components/add-component.js +47 -50
- package/lib/ComponentManager/components/publish-component.js +30 -31
- package/lib/ComponentManager/components/resource-dialog.js +28 -30
- package/lib/Dashboard/index.d.ts +1 -1
- package/lib/Dashboard/index.js +59 -61
- package/lib/Footer/index.js +51 -52
- package/lib/Footer/internal-footer.js +43 -47
- package/lib/Footer/layout/standard.js +11 -12
- package/lib/Footer/links.js +25 -28
- package/lib/Footer/social-media.js +17 -17
- package/lib/Header/index.js +81 -83
- package/lib/Notifications/Snackbar.js +76 -77
- package/lib/Notifications/hooks/use-title.js +34 -34
- package/lib/Notifications/utils.js +56 -60
- package/lib/UserCenter/components/config-inviter.js +17 -18
- package/lib/UserCenter/components/danger-zone.js +49 -52
- package/lib/UserCenter/components/nft.js +44 -45
- package/lib/UserCenter/components/notification.js +92 -99
- package/lib/UserCenter/components/passport.js +22 -22
- package/lib/UserCenter/components/privacy.js +6 -6
- package/lib/UserCenter/components/settings.js +40 -43
- package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
- package/lib/UserCenter/components/status-dialog/index.js +112 -114
- package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
- package/lib/UserCenter/components/status-selector/index.js +13 -13
- package/lib/UserCenter/components/storage/action.js +21 -22
- package/lib/UserCenter/components/storage/delete.js +24 -24
- package/lib/UserCenter/components/third-party-login/index.js +53 -53
- package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
- package/lib/UserCenter/components/user-center.js +198 -207
- package/lib/UserCenter/components/user-info/metadata.js +343 -353
- package/lib/UserCenter/components/user-info/switch-role.js +17 -20
- package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
- package/lib/UserCenter/components/user-info/user-info.js +40 -40
- package/lib/UserCenter/components/user-info/user-status.js +97 -99
- package/lib/UserCenter/components/user-info/utils.js +34 -35
- package/lib/UserSessions/components/user-session-info.js +25 -28
- package/lib/UserSessions/components/user-sessions.js +169 -181
- package/lib/blocklets.js +62 -72
- package/lib/common/domain-warning.js +31 -31
- package/lib/common/header-addons.d.ts +1 -1
- package/lib/common/header-addons.js +49 -53
- package/lib/common/notification-addon.js +29 -32
- package/lib/common/ws.js +17 -18
- package/lib/contexts/config-user-space.js +16 -19
- package/lib/utils.js +44 -48
- package/package.json +11 -11
package/lib/Footer/index.js
CHANGED
|
@@ -1,71 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import
|
|
4
|
-
import { styled as
|
|
5
|
-
import { withErrorBoundary as
|
|
6
|
-
import { useLocaleContext as
|
|
7
|
-
import { ErrorFallback as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { mapRecursive as
|
|
12
|
-
import { formatBlockletInfo as
|
|
13
|
-
import { BlockletMetaProps as
|
|
14
|
-
import
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const r = Object.assign({}, window.blocklet, e);
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as s } from "react";
|
|
3
|
+
import $ from "prop-types";
|
|
4
|
+
import { styled as F, useTheme as x, deepmerge as T, ThemeProvider as B } from "@arcblock/ux/lib/Theme";
|
|
5
|
+
import { withErrorBoundary as M } from "react-error-boundary";
|
|
6
|
+
import { useLocaleContext as N } from "@arcblock/ux/lib/Locale/context";
|
|
7
|
+
import { ErrorFallback as w } from "@arcblock/ux/lib/ErrorBoundary";
|
|
8
|
+
import L from "@arcblock/ux/lib/hooks/use-blocklet-logo";
|
|
9
|
+
import j from "lodash/omit";
|
|
10
|
+
import C from "./internal-footer.js";
|
|
11
|
+
import { mapRecursive as E } from "../utils.js";
|
|
12
|
+
import { formatBlockletInfo as I, getLocalizedNavigation as a } from "../blocklets.js";
|
|
13
|
+
import { BlockletMetaProps as P } from "../types.js";
|
|
14
|
+
import z from "../libs/with-hide-when-embed.js";
|
|
15
|
+
function d({ meta: o = {}, theme: t = null, ...n }) {
|
|
16
|
+
const { locale: l } = N() || {}, c = x(), r = s(() => {
|
|
17
|
+
const e = Object.assign({}, window.blocklet, o);
|
|
19
18
|
try {
|
|
20
|
-
return
|
|
21
|
-
} catch (
|
|
22
|
-
return console.error("Failed to format blocklet info",
|
|
19
|
+
return I(e);
|
|
20
|
+
} catch (v) {
|
|
21
|
+
return console.error("Failed to format blocklet info", v, e), e;
|
|
23
22
|
}
|
|
24
|
-
}, [
|
|
23
|
+
}, [o]), m = s(() => T(c, t), [c, t]), f = L({
|
|
25
24
|
key: "xs",
|
|
26
25
|
// 始终优先长 logo
|
|
27
|
-
meta:
|
|
26
|
+
meta: o,
|
|
28
27
|
theme: t
|
|
29
28
|
});
|
|
30
|
-
if (!
|
|
29
|
+
if (!r.appName)
|
|
31
30
|
return null;
|
|
32
|
-
const { appName:
|
|
33
|
-
footerNav:
|
|
34
|
-
socialMedia:
|
|
35
|
-
links:
|
|
36
|
-
},
|
|
31
|
+
const { appName: b, appDescription: k, description: u, copyright: g } = r, h = m.palette.background.default, i = {
|
|
32
|
+
footerNav: a(r?.navigation?.footer, l) || [],
|
|
33
|
+
socialMedia: a(r?.navigation?.social, l) || [],
|
|
34
|
+
links: a(r?.navigation?.bottom, l) || []
|
|
35
|
+
}, y = {
|
|
37
36
|
brand: {
|
|
38
|
-
name:
|
|
39
|
-
description: k ||
|
|
40
|
-
logo:
|
|
37
|
+
name: b,
|
|
38
|
+
description: k || u,
|
|
39
|
+
logo: f
|
|
41
40
|
},
|
|
42
|
-
navigation:
|
|
43
|
-
|
|
44
|
-
(
|
|
45
|
-
...
|
|
46
|
-
label:
|
|
47
|
-
link:
|
|
41
|
+
navigation: E(
|
|
42
|
+
i.footerNav,
|
|
43
|
+
(e) => ({
|
|
44
|
+
...e,
|
|
45
|
+
label: e.title,
|
|
46
|
+
link: e.link
|
|
48
47
|
}),
|
|
49
48
|
"items"
|
|
50
49
|
),
|
|
51
|
-
copyright:
|
|
52
|
-
socialMedia:
|
|
53
|
-
links:
|
|
50
|
+
copyright: g,
|
|
51
|
+
socialMedia: i.socialMedia,
|
|
52
|
+
links: i.links.map((e) => ({ ...e, label: e.title }))
|
|
54
53
|
};
|
|
55
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ p(B, { theme: m, children: /* @__PURE__ */ p(D, { ...y, ...j(n, ["bordered"]), $bordered: n?.bordered, $bgcolor: h }) });
|
|
56
55
|
}
|
|
57
|
-
|
|
58
|
-
meta:
|
|
56
|
+
d.propTypes = {
|
|
57
|
+
meta: P,
|
|
59
58
|
// 允许覆盖 footer 内置的 theme
|
|
60
|
-
theme:
|
|
59
|
+
theme: $.object
|
|
61
60
|
};
|
|
62
|
-
const
|
|
63
|
-
${({ $bordered:
|
|
64
|
-
color: ${({ theme:
|
|
65
|
-
${({ $bgcolor:
|
|
66
|
-
`,
|
|
67
|
-
FallbackComponent:
|
|
61
|
+
const D = F(C)`
|
|
62
|
+
${({ $bordered: o, theme: t }) => `border-top: 1px solid ${o && t.palette.divider};`}
|
|
63
|
+
color: ${({ theme: o }) => o.palette.text.secondary};
|
|
64
|
+
${({ $bgcolor: o }) => o && `background-color: ${o};`}
|
|
65
|
+
`, Z = M(z(d), {
|
|
66
|
+
FallbackComponent: w
|
|
68
67
|
});
|
|
69
68
|
export {
|
|
70
|
-
|
|
69
|
+
Z as default
|
|
71
70
|
};
|
|
@@ -1,68 +1,64 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as w, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import n from "prop-types";
|
|
3
|
-
import { Box as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { Box as d } from "@mui/material";
|
|
4
|
+
import v from "clsx";
|
|
5
|
+
import L from "./brand.js";
|
|
6
|
+
import y from "./links.js";
|
|
7
7
|
import M from "./social-media.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
8
|
+
import O from "./copyright.js";
|
|
9
|
+
import B from "./layout/standard.js";
|
|
10
|
+
import N from "./layout/plain.js";
|
|
11
|
+
const f = [
|
|
12
12
|
{
|
|
13
13
|
name: "plain",
|
|
14
14
|
// 没有 navigation 和 socialMedia, 使用一个简单的两端对齐布局
|
|
15
|
-
support: (
|
|
16
|
-
|
|
17
|
-
return !((r = o.navigation) != null && r.length) && !((e = o.socialMedia) != null && e.length);
|
|
18
|
-
},
|
|
19
|
-
component: C
|
|
15
|
+
support: (t, o) => !o.navigation?.length && !o.socialMedia?.length,
|
|
16
|
+
component: N
|
|
20
17
|
},
|
|
21
18
|
{
|
|
22
19
|
name: "standard",
|
|
23
20
|
// 默认标准布局
|
|
24
21
|
support: () => !0,
|
|
25
|
-
component:
|
|
22
|
+
component: B
|
|
26
23
|
}
|
|
27
|
-
],
|
|
28
|
-
function
|
|
29
|
-
var d, f;
|
|
24
|
+
], S = f.reduce((t, o) => ({ ...t, [o.name]: o }), {});
|
|
25
|
+
function C({ ...t }) {
|
|
30
26
|
const {
|
|
31
27
|
brand: o = null,
|
|
32
|
-
navigation:
|
|
33
|
-
socialMedia:
|
|
34
|
-
copyright:
|
|
35
|
-
links:
|
|
36
|
-
layout:
|
|
37
|
-
...
|
|
38
|
-
} =
|
|
39
|
-
const
|
|
40
|
-
return
|
|
41
|
-
},
|
|
42
|
-
brand:
|
|
43
|
-
navigation:
|
|
44
|
-
socialMedia:
|
|
45
|
-
copyright:
|
|
46
|
-
links:
|
|
28
|
+
navigation: s = null,
|
|
29
|
+
socialMedia: p = null,
|
|
30
|
+
copyright: u = null,
|
|
31
|
+
links: c = null,
|
|
32
|
+
layout: l = "auto",
|
|
33
|
+
...e
|
|
34
|
+
} = t, g = () => o ? /* @__PURE__ */ r(L, { ...o }) : null, h = () => s?.length ? /* @__PURE__ */ r(y, { links: s, columns: 3 }) : null, k = () => p?.length ? /* @__PURE__ */ r(M, { items: p }) : null, b = () => {
|
|
35
|
+
const i = u?.owner || o?.name;
|
|
36
|
+
return i ? /* @__PURE__ */ r(O, { owner: i, year: u?.year || void 0 }) : null;
|
|
37
|
+
}, x = () => c?.length ? /* @__PURE__ */ r(y, { flowLayout: !0, links: c }) : null, m = {
|
|
38
|
+
brand: g(),
|
|
39
|
+
navigation: h(),
|
|
40
|
+
socialMedia: k(),
|
|
41
|
+
copyright: b(),
|
|
42
|
+
links: x()
|
|
47
43
|
};
|
|
48
|
-
let
|
|
49
|
-
if (
|
|
50
|
-
throw new Error(`layout ${
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
|
|
44
|
+
let a = null;
|
|
45
|
+
if (l === "auto" ? a = f.find((i) => i.support(m, t)).component : a = S[l]?.component, !a)
|
|
46
|
+
throw new Error(`layout ${l} is not supported.`);
|
|
47
|
+
return /* @__PURE__ */ w(
|
|
48
|
+
d,
|
|
53
49
|
{
|
|
54
|
-
...
|
|
55
|
-
className:
|
|
50
|
+
...e,
|
|
51
|
+
className: v("blocklet__footer", e.className),
|
|
56
52
|
sx: [
|
|
57
53
|
{
|
|
58
54
|
position: "relative"
|
|
59
55
|
},
|
|
60
|
-
...Array.isArray(
|
|
56
|
+
...Array.isArray(e.sx) ? e.sx : [e.sx]
|
|
61
57
|
],
|
|
62
58
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
59
|
+
/* @__PURE__ */ r(a, { elements: m, data: t }),
|
|
60
|
+
/* @__PURE__ */ r(
|
|
61
|
+
d,
|
|
66
62
|
{
|
|
67
63
|
sx: {
|
|
68
64
|
position: "absolute",
|
|
@@ -72,14 +68,14 @@ function _({ ...a }) {
|
|
|
72
68
|
color: "transparent",
|
|
73
69
|
"::selection": { background: "#000", color: "#fff" }
|
|
74
70
|
},
|
|
75
|
-
children:
|
|
71
|
+
children: window?.blocklet?.version
|
|
76
72
|
}
|
|
77
73
|
)
|
|
78
74
|
]
|
|
79
75
|
}
|
|
80
76
|
);
|
|
81
77
|
}
|
|
82
|
-
|
|
78
|
+
C.propTypes = {
|
|
83
79
|
brand: n.shape({
|
|
84
80
|
name: n.node,
|
|
85
81
|
description: n.string,
|
|
@@ -112,5 +108,5 @@ _.propTypes = {
|
|
|
112
108
|
layout: n.oneOf(["auto", "standard", "plain"])
|
|
113
109
|
};
|
|
114
110
|
export {
|
|
115
|
-
|
|
111
|
+
C as default
|
|
116
112
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import o from "prop-types";
|
|
3
|
-
import
|
|
3
|
+
import m from "clsx";
|
|
4
4
|
import { Container as t, Box as r } from "@mui/material";
|
|
5
|
-
import { styled as
|
|
6
|
-
import
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
const d = !!((l = s.navigation) != null && l.length);
|
|
5
|
+
import { styled as x } from "@arcblock/ux/lib/Theme";
|
|
6
|
+
import f from "./row.js";
|
|
7
|
+
function h({ elements: e, data: l, className: s = "", ...p }) {
|
|
8
|
+
const d = !!l.navigation?.length;
|
|
10
9
|
let a = null;
|
|
11
10
|
return d ? a = /* @__PURE__ */ n(t, { sx: { display: "flex", flexDirection: { xs: "column", md: "row" }, justifyContent: "space-between" }, children: [
|
|
12
11
|
/* @__PURE__ */ n(
|
|
@@ -35,7 +34,7 @@ function g({ elements: e, data: s, className: p = "", ...c }) {
|
|
|
35
34
|
]
|
|
36
35
|
}
|
|
37
36
|
),
|
|
38
|
-
/* @__PURE__ */ i(r, { sx: ({ palette:
|
|
37
|
+
/* @__PURE__ */ i(r, { sx: ({ palette: c }) => ({ mb: 3, borderTop: { xs: `1px solid ${c.grey[200]}`, md: 0 } }), children: e.navigation })
|
|
39
38
|
] }) : a = /* @__PURE__ */ n(
|
|
40
39
|
t,
|
|
41
40
|
{
|
|
@@ -60,16 +59,16 @@ function g({ elements: e, data: s, className: p = "", ...c }) {
|
|
|
60
59
|
)
|
|
61
60
|
]
|
|
62
61
|
}
|
|
63
|
-
), /* @__PURE__ */ i(
|
|
62
|
+
), /* @__PURE__ */ i(g, { ...p, className: m({ "footer--with-navs": d }, s), children: /* @__PURE__ */ n(t, { style: { padding: 0 }, children: [
|
|
64
63
|
a,
|
|
65
64
|
/* @__PURE__ */ i(r, { sx: { pt: 3, borderTop: 1, borderColor: "divider" } }),
|
|
66
|
-
/* @__PURE__ */ i(t, { children: /* @__PURE__ */ n(
|
|
65
|
+
/* @__PURE__ */ i(t, { children: /* @__PURE__ */ n(f, { autoCenter: !0, children: [
|
|
67
66
|
e.copyright,
|
|
68
67
|
e.links
|
|
69
68
|
] }) })
|
|
70
69
|
] }) });
|
|
71
70
|
}
|
|
72
|
-
|
|
71
|
+
h.propTypes = {
|
|
73
72
|
elements: o.shape({
|
|
74
73
|
brand: o.element,
|
|
75
74
|
navigation: o.element,
|
|
@@ -80,7 +79,7 @@ g.propTypes = {
|
|
|
80
79
|
data: o.object.isRequired,
|
|
81
80
|
className: o.string
|
|
82
81
|
};
|
|
83
|
-
const
|
|
82
|
+
const g = x("div")`
|
|
84
83
|
padding: 32px 0 24px 0;
|
|
85
84
|
.footer-brand-name,
|
|
86
85
|
.footer-brand-desc {
|
|
@@ -99,5 +98,5 @@ const b = f("div")`
|
|
|
99
98
|
}
|
|
100
99
|
`;
|
|
101
100
|
export {
|
|
102
|
-
|
|
101
|
+
h as default
|
|
103
102
|
};
|
package/lib/Footer/links.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as m, Fragment as v } from "react/jsx-runtime";
|
|
2
2
|
import { useState as N } from "react";
|
|
3
3
|
import l from "prop-types";
|
|
4
4
|
import { useCreation as $ } from "ahooks";
|
|
@@ -10,37 +10,34 @@ import { ExpandMore as M } from "@mui/icons-material";
|
|
|
10
10
|
import C from "../Icon/index.js";
|
|
11
11
|
import A from "../hooks/use-mobile.js";
|
|
12
12
|
import { splitNavColumns as E } from "../utils.js";
|
|
13
|
-
function F({ links: e = [], flowLayout: d = !1, columns: u, ...
|
|
14
|
-
const [g, b] = N(-1), y = A({ key: "md" }), h = e.some((
|
|
15
|
-
|
|
16
|
-
return (o = r.items) == null ? void 0 : o.length;
|
|
17
|
-
}), x = !y && h && j(u) && u > 1, p = ({ label: r, link: o, icon: t, render: a, props: i }) => {
|
|
18
|
-
let s = r;
|
|
13
|
+
function F({ links: e = [], flowLayout: d = !1, columns: u, ...x }) {
|
|
14
|
+
const [g, b] = N(-1), y = A({ key: "md" }), h = e.some((t) => t.items?.length), k = !y && h && j(u) && u > 1, p = ({ label: t, link: o, icon: i, render: a, props: n }) => {
|
|
15
|
+
let s = t;
|
|
19
16
|
if (a)
|
|
20
|
-
s = a({ label:
|
|
17
|
+
s = a({ label: t, link: o, props: n });
|
|
21
18
|
else if (o && I(o)) {
|
|
22
19
|
const f = o.startsWith("http") || o.startsWith("//");
|
|
23
|
-
s = /* @__PURE__ */
|
|
20
|
+
s = /* @__PURE__ */ r(
|
|
24
21
|
"a",
|
|
25
22
|
{
|
|
26
23
|
href: o,
|
|
27
|
-
"aria-label": `Footer link for ${
|
|
24
|
+
"aria-label": `Footer link for ${t}`,
|
|
28
25
|
target: f ? "_blank" : "_self",
|
|
29
26
|
rel: f ? "noreferrer noopener" : void 0,
|
|
30
|
-
...
|
|
31
|
-
children:
|
|
27
|
+
...n,
|
|
28
|
+
children: t
|
|
32
29
|
}
|
|
33
30
|
);
|
|
34
31
|
}
|
|
35
32
|
return /* @__PURE__ */ m(v, { children: [
|
|
36
|
-
|
|
33
|
+
i && /* @__PURE__ */ r(C, { icon: i, size: 20, sx: { mr: 0.5 } }),
|
|
37
34
|
s
|
|
38
35
|
] });
|
|
39
|
-
}, w = $(() => e
|
|
40
|
-
const { items:
|
|
36
|
+
}, w = $(() => e?.length ? d ? e.map((t, o) => /* @__PURE__ */ r("span", { className: "footer-links-item", children: p(t) }, o)) : k ? E(e, { columns: u }).map((t, o) => /* @__PURE__ */ r("div", { className: "footer-links-column", children: t.filter((i) => i.group).map((i, a) => {
|
|
37
|
+
const { items: n } = i;
|
|
41
38
|
return /* @__PURE__ */ m("div", { className: "footer-links-group", children: [
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
!!
|
|
39
|
+
/* @__PURE__ */ r("span", { className: "footer-links-item", children: p(i) }),
|
|
40
|
+
!!n?.length && /* @__PURE__ */ r("div", { className: "footer-links-sub", children: n.map((s, f) => /* @__PURE__ */ r(
|
|
44
41
|
"span",
|
|
45
42
|
{
|
|
46
43
|
className: c("footer-links-item", { "footer-links-item--new": s.isNew }),
|
|
@@ -49,8 +46,8 @@ function F({ links: e = [], flowLayout: d = !1, columns: u, ...k }) {
|
|
|
49
46
|
f
|
|
50
47
|
)) })
|
|
51
48
|
] }, a);
|
|
52
|
-
}) }, o)) : e.map((
|
|
53
|
-
const { items:
|
|
49
|
+
}) }, o)) : e.map((t, o) => {
|
|
50
|
+
const { items: i } = t, a = o === g;
|
|
54
51
|
return /* @__PURE__ */ m(
|
|
55
52
|
"div",
|
|
56
53
|
{
|
|
@@ -60,8 +57,8 @@ function F({ links: e = [], flowLayout: d = !1, columns: u, ...k }) {
|
|
|
60
57
|
onClick: () => b(g === o ? -1 : o),
|
|
61
58
|
children: [
|
|
62
59
|
/* @__PURE__ */ m("span", { className: "footer-links-item", children: [
|
|
63
|
-
p(
|
|
64
|
-
!!
|
|
60
|
+
p(t),
|
|
61
|
+
!!i?.length && /* @__PURE__ */ r("span", { className: "footer-links-group-expand-icon", children: /* @__PURE__ */ r(
|
|
65
62
|
M,
|
|
66
63
|
{
|
|
67
64
|
style: {
|
|
@@ -70,22 +67,22 @@ function F({ links: e = [], flowLayout: d = !1, columns: u, ...k }) {
|
|
|
70
67
|
}
|
|
71
68
|
) })
|
|
72
69
|
] }),
|
|
73
|
-
!!
|
|
70
|
+
!!i?.length && /* @__PURE__ */ r("div", { className: "footer-links-sub", children: i.map((n, s) => /* @__PURE__ */ r("span", { className: c("footer-links-item", { "footer-links-item--new": n.isNew }), children: p(n) }, s)) })
|
|
74
71
|
]
|
|
75
72
|
},
|
|
76
73
|
o
|
|
77
74
|
);
|
|
78
|
-
}) : null, [e, d,
|
|
79
|
-
return e
|
|
75
|
+
}) : null, [e, d, k, g]);
|
|
76
|
+
return e?.length ? /* @__PURE__ */ r(
|
|
80
77
|
R,
|
|
81
78
|
{
|
|
82
|
-
...
|
|
83
|
-
className: c(
|
|
79
|
+
...x,
|
|
80
|
+
className: c(x.className, {
|
|
84
81
|
"footer-links--grouped": h,
|
|
85
82
|
"footer-links--flow": d,
|
|
86
|
-
"footer-links--columns":
|
|
83
|
+
"footer-links--columns": k
|
|
87
84
|
}),
|
|
88
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ r("div", { className: "footer-links-inner", children: w })
|
|
89
86
|
}
|
|
90
87
|
) : null;
|
|
91
88
|
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { styled as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { styled as a } from "@arcblock/ux/lib/Theme";
|
|
4
4
|
import l from "../Icon/index.js";
|
|
5
|
-
function p({ items:
|
|
6
|
-
return
|
|
5
|
+
function p({ items: e = null, ...n }) {
|
|
6
|
+
return e?.length ? /* @__PURE__ */ o(c, { ...n, children: e.map((r, i) => /* @__PURE__ */ o(
|
|
7
7
|
"a",
|
|
8
8
|
{
|
|
9
|
-
href:
|
|
9
|
+
href: r.link,
|
|
10
10
|
target: "_blank",
|
|
11
|
-
"aria-label": `Social media icon${
|
|
11
|
+
"aria-label": `Social media icon${r.title ? ` for ${r.title}` : ""}`,
|
|
12
12
|
rel: "noreferrer",
|
|
13
|
-
children: /* @__PURE__ */
|
|
13
|
+
children: /* @__PURE__ */ o(l, { icon: r.icon || r.title, size: 24, component: "span" })
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
i
|
|
16
16
|
)) }) : null;
|
|
17
17
|
}
|
|
18
18
|
p.propTypes = {
|
|
19
|
-
items:
|
|
20
|
-
|
|
19
|
+
items: t.arrayOf(
|
|
20
|
+
t.shape({
|
|
21
21
|
// icon 对应 Icon#icon prop, 支持 iconify name 和 url 2 种形式:
|
|
22
|
-
icon:
|
|
23
|
-
link:
|
|
22
|
+
icon: t.string,
|
|
23
|
+
link: t.string
|
|
24
24
|
})
|
|
25
25
|
)
|
|
26
26
|
};
|
|
27
|
-
const c =
|
|
27
|
+
const c = a("div")`
|
|
28
28
|
display: inline-flex;
|
|
29
29
|
flex-wrap: wrap;
|
|
30
30
|
align-items: center;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
gap: 20px;
|
|
33
33
|
a {
|
|
34
|
-
color: ${(
|
|
34
|
+
color: ${(e) => e.theme.palette.text.secondary};
|
|
35
35
|
text-decoration: none;
|
|
36
36
|
transition: color 0.2s ease-in-out;
|
|
37
37
|
&:hover {
|
|
38
|
-
color: ${({ theme:
|
|
38
|
+
color: ${({ theme: e }) => e.palette.text.primary};
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
${(
|
|
41
|
+
${(e) => e.theme.breakpoints.down("md")} {
|
|
42
42
|
gap: 12px;
|
|
43
43
|
}
|
|
44
44
|
`;
|