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