@blocklet/ui-react 2.9.13 → 2.9.15

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 (163) hide show
  1. package/build.config.ts +29 -0
  2. package/es/@types/index.d.ts +63 -0
  3. package/es/@types/index.js +0 -0
  4. package/es/@types/shims.d.ts +12 -0
  5. package/es/Dashboard/index.d.ts +41 -0
  6. package/es/Dashboard/index.js +63 -97
  7. package/es/Footer/brand.d.ts +22 -0
  8. package/es/Footer/brand.js +20 -37
  9. package/es/Footer/copyright.d.ts +18 -0
  10. package/es/Footer/copyright.js +14 -16
  11. package/es/Footer/index.d.ts +6 -0
  12. package/es/Footer/index.js +31 -57
  13. package/es/Footer/internal-footer.d.ts +29 -0
  14. package/es/Footer/internal-footer.js +67 -94
  15. package/es/Footer/layout/plain.d.ts +15 -0
  16. package/es/Footer/layout/plain.js +19 -37
  17. package/es/Footer/layout/row.d.ts +18 -0
  18. package/es/Footer/layout/row.js +9 -19
  19. package/es/Footer/layout/standard.d.ts +15 -0
  20. package/es/Footer/layout/standard.js +29 -57
  21. package/es/Footer/links.d.ts +22 -0
  22. package/es/Footer/links.js +72 -104
  23. package/es/Footer/social-media.d.ts +14 -0
  24. package/es/Footer/social-media.js +35 -35
  25. package/es/Header/index.d.ts +9 -0
  26. package/es/Header/index.js +56 -101
  27. package/es/Icon/index.d.ts +23 -0
  28. package/es/Icon/index.js +23 -58
  29. package/es/UserCenter/assets/banner.png +0 -0
  30. package/es/UserCenter/components/notification.d.ts +5 -0
  31. package/es/UserCenter/components/notification.js +276 -0
  32. package/es/UserCenter/components/passport.d.ts +6 -0
  33. package/es/UserCenter/components/passport.js +69 -0
  34. package/es/UserCenter/components/privacy.d.ts +11 -0
  35. package/es/UserCenter/components/privacy.js +99 -0
  36. package/es/UserCenter/components/settings.d.ts +10 -0
  37. package/es/UserCenter/components/settings.js +68 -0
  38. package/es/UserCenter/components/user-basic-info.d.ts +8 -0
  39. package/es/UserCenter/components/user-basic-info.js +66 -0
  40. package/es/UserCenter/components/user-center.d.ts +9 -0
  41. package/es/UserCenter/components/user-center.js +397 -0
  42. package/es/UserCenter/components/user-info-item.d.ts +10 -0
  43. package/es/UserCenter/components/user-info-item.js +54 -0
  44. package/es/UserCenter/components/user-info.d.ts +6 -0
  45. package/es/UserCenter/components/user-info.js +68 -0
  46. package/es/UserCenter/components/webhook-item.d.ts +3 -0
  47. package/es/UserCenter/components/webhook-item.js +243 -0
  48. package/es/UserCenter/index.d.ts +1 -0
  49. package/es/UserCenter/index.js +1 -0
  50. package/es/UserCenter/libs/client.d.ts +2 -0
  51. package/es/UserCenter/libs/client.js +2 -0
  52. package/es/UserCenter/libs/locales.d.ts +72 -0
  53. package/es/UserCenter/libs/locales.js +72 -0
  54. package/es/UserCenter/libs/utils.d.ts +4 -0
  55. package/es/UserCenter/libs/utils.js +14 -0
  56. package/es/blocklets.d.ts +16 -0
  57. package/es/blocklets.js +56 -45
  58. package/es/common/header-addons.d.ts +22 -0
  59. package/es/common/header-addons.js +41 -59
  60. package/es/common/link-blocker.d.ts +7 -0
  61. package/es/common/link-blocker.js +10 -17
  62. package/es/common/overridable-theme-provider.d.ts +18 -0
  63. package/es/common/overridable-theme-provider.js +6 -16
  64. package/es/common/wallet-hidden-topbar.d.ts +1 -0
  65. package/es/common/wallet-hidden-topbar.js +12 -10
  66. package/es/index.d.ts +5 -0
  67. package/es/index.js +5 -0
  68. package/es/types.d.ts +2 -0
  69. package/es/types.js +17 -11
  70. package/es/utils.d.ts +8 -0
  71. package/es/utils.js +21 -26
  72. package/lib/@types/index.d.ts +63 -0
  73. package/lib/@types/index.js +1 -0
  74. package/lib/@types/shims.d.ts +12 -0
  75. package/lib/Dashboard/index.d.ts +41 -0
  76. package/lib/Dashboard/index.js +44 -71
  77. package/lib/Footer/brand.d.ts +22 -0
  78. package/lib/Footer/brand.js +65 -30
  79. package/lib/Footer/copyright.d.ts +18 -0
  80. package/lib/Footer/copyright.js +18 -23
  81. package/lib/Footer/index.d.ts +6 -0
  82. package/lib/Footer/index.js +33 -42
  83. package/lib/Footer/internal-footer.d.ts +29 -0
  84. package/lib/Footer/internal-footer.js +43 -59
  85. package/lib/Footer/layout/plain.d.ts +15 -0
  86. package/lib/Footer/layout/plain.js +25 -30
  87. package/lib/Footer/layout/row.d.ts +18 -0
  88. package/lib/Footer/layout/row.js +34 -23
  89. package/lib/Footer/layout/standard.d.ts +15 -0
  90. package/lib/Footer/layout/standard.js +35 -41
  91. package/lib/Footer/links.d.ts +22 -0
  92. package/lib/Footer/links.js +163 -60
  93. package/lib/Footer/social-media.d.ts +14 -0
  94. package/lib/Footer/social-media.js +31 -25
  95. package/lib/Header/index.d.ts +9 -0
  96. package/lib/Header/index.js +83 -76
  97. package/lib/Icon/index.d.ts +23 -0
  98. package/lib/Icon/index.js +37 -51
  99. package/lib/UserCenter/assets/banner.png +0 -0
  100. package/lib/UserCenter/components/notification.d.ts +5 -0
  101. package/lib/UserCenter/components/notification.js +261 -0
  102. package/lib/UserCenter/components/passport.d.ts +6 -0
  103. package/lib/UserCenter/components/passport.js +86 -0
  104. package/lib/UserCenter/components/privacy.d.ts +11 -0
  105. package/lib/UserCenter/components/privacy.js +101 -0
  106. package/lib/UserCenter/components/settings.d.ts +10 -0
  107. package/lib/UserCenter/components/settings.js +81 -0
  108. package/lib/UserCenter/components/user-basic-info.d.ts +8 -0
  109. package/lib/UserCenter/components/user-basic-info.js +67 -0
  110. package/lib/UserCenter/components/user-center.d.ts +9 -0
  111. package/lib/UserCenter/components/user-center.js +376 -0
  112. package/lib/UserCenter/components/user-info-item.d.ts +10 -0
  113. package/lib/UserCenter/components/user-info-item.js +46 -0
  114. package/lib/UserCenter/components/user-info.d.ts +6 -0
  115. package/lib/UserCenter/components/user-info.js +94 -0
  116. package/lib/UserCenter/components/webhook-item.d.ts +3 -0
  117. package/lib/UserCenter/components/webhook-item.js +236 -0
  118. package/lib/UserCenter/index.d.ts +1 -0
  119. package/lib/UserCenter/index.js +13 -0
  120. package/lib/UserCenter/libs/client.d.ts +2 -0
  121. package/lib/UserCenter/libs/client.js +8 -0
  122. package/lib/UserCenter/libs/locales.d.ts +72 -0
  123. package/lib/UserCenter/libs/locales.js +78 -0
  124. package/lib/UserCenter/libs/utils.d.ts +4 -0
  125. package/lib/UserCenter/libs/utils.js +25 -0
  126. package/lib/blocklets.d.ts +16 -0
  127. package/lib/blocklets.js +28 -36
  128. package/lib/common/header-addons.d.ts +22 -0
  129. package/lib/common/header-addons.js +24 -36
  130. package/lib/common/link-blocker.d.ts +7 -0
  131. package/lib/common/link-blocker.js +10 -18
  132. package/lib/common/overridable-theme-provider.d.ts +18 -0
  133. package/lib/common/overridable-theme-provider.js +9 -14
  134. package/lib/common/wallet-hidden-topbar.d.ts +1 -0
  135. package/lib/common/wallet-hidden-topbar.js +1 -3
  136. package/lib/index.d.ts +5 -0
  137. package/lib/index.js +52 -0
  138. package/lib/types.d.ts +2 -0
  139. package/lib/types.js +3 -5
  140. package/lib/utils.d.ts +8 -0
  141. package/lib/utils.js +16 -23
  142. package/package.json +18 -11
  143. package/src/@types/index.ts +70 -0
  144. package/src/@types/shims.d.ts +12 -0
  145. package/src/Footer/index.jsx +1 -1
  146. package/src/Header/index.jsx +1 -1
  147. package/src/UserCenter/assets/banner.png +0 -0
  148. package/src/UserCenter/components/notification.tsx +275 -0
  149. package/src/UserCenter/components/passport.tsx +83 -0
  150. package/src/UserCenter/components/privacy.tsx +107 -0
  151. package/src/UserCenter/components/settings.tsx +78 -0
  152. package/src/UserCenter/components/user-basic-info.tsx +70 -0
  153. package/src/UserCenter/components/user-center.tsx +410 -0
  154. package/src/UserCenter/components/user-info-item.tsx +50 -0
  155. package/src/UserCenter/components/user-info.tsx +85 -0
  156. package/src/UserCenter/components/webhook-item.tsx +243 -0
  157. package/src/UserCenter/index.tsx +1 -0
  158. package/src/UserCenter/libs/client.ts +3 -0
  159. package/src/UserCenter/libs/locales.ts +72 -0
  160. package/src/UserCenter/libs/utils.ts +21 -0
  161. package/src/blocklets.js +2 -0
  162. package/src/index.ts +9 -0
  163. /package/src/common/{link-blocker.js → link-blocker.jsx} +0 -0
@@ -0,0 +1,29 @@
1
+ export default InternalFooter;
2
+ /**
3
+ * 通用的内部 footer 组件, 定义并渲染常见的几种 footer 元素: brand/navigation/social medial 等
4
+ */
5
+ declare function InternalFooter(props: any): import("react").JSX.Element;
6
+ declare namespace InternalFooter {
7
+ namespace propTypes {
8
+ let brand: any;
9
+ let navigation: any;
10
+ let socialMedia: any;
11
+ let copyright: any;
12
+ let links: any;
13
+ let layout: any;
14
+ }
15
+ namespace defaultProps {
16
+ let brand_1: null;
17
+ export { brand_1 as brand };
18
+ let navigation_1: null;
19
+ export { navigation_1 as navigation };
20
+ let copyright_1: null;
21
+ export { copyright_1 as copyright };
22
+ let socialMedia_1: null;
23
+ export { socialMedia_1 as socialMedia };
24
+ let links_1: null;
25
+ export { links_1 as links };
26
+ let layout_1: string;
27
+ export { layout_1 as layout };
28
+ }
29
+ }
@@ -1,73 +1,47 @@
1
- import PropTypes from 'prop-types';
2
- import Box from '@mui/material/Box';
3
- import Brand from './brand';
4
- import Links from './links';
5
- import SocialMedia from './social-media';
6
- import Copyright from './copyright';
7
- import StandardLayout from './layout/standard';
8
- import PlainLayout from './layout/plain';
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
- const layouts = [{
12
- name: 'plain',
13
- // navigation 数据为空时, 使用简单布局
14
- support: (_, data) => !data.navigation?.length && !data.socialMedia?.length,
15
- component: PlainLayout
16
- }, {
17
- name: 'standard',
18
- // 默认标准布局
19
- support: () => true,
20
- component: StandardLayout
21
- }];
22
- const layoutsKeyByName = layouts.reduce((acc, cur) => ({
23
- ...acc,
24
- [cur.name]: cur
25
- }), {});
26
-
27
- /**
28
- * 通用的内部 footer 组件, 定义并渲染常见的几种 footer 元素: brand/navigation/social medial 等
29
- */
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import PropTypes from "prop-types";
3
+ import Box from "@mui/material/Box";
4
+ import Brand from "./brand.js";
5
+ import Links from "./links.js";
6
+ import SocialMedia from "./social-media.js";
7
+ import Copyright from "./copyright.js";
8
+ import StandardLayout from "./layout/standard.js";
9
+ import PlainLayout from "./layout/plain.js";
10
+ const layouts = [
11
+ {
12
+ name: "plain",
13
+ // navigation 数据为空时, 使用简单布局
14
+ support: (_, data) => !data.navigation?.length && !data.socialMedia?.length,
15
+ component: PlainLayout
16
+ },
17
+ {
18
+ name: "standard",
19
+ // 默认标准布局
20
+ support: () => true,
21
+ component: StandardLayout
22
+ }
23
+ ];
24
+ const layoutsKeyByName = layouts.reduce((acc, cur) => ({ ...acc, [cur.name]: cur }), {});
30
25
  function InternalFooter(props) {
31
- const {
32
- brand,
33
- navigation,
34
- socialMedia,
35
- copyright,
36
- links,
37
- layout,
38
- ...rest
39
- } = props;
26
+ const { brand, navigation, socialMedia, copyright, links, layout, ...rest } = props;
40
27
  const renderBrand = () => {
41
- return brand ? /*#__PURE__*/_jsx(Brand, {
42
- ...brand
43
- }) : null;
28
+ return brand ? /* @__PURE__ */ jsx(Brand, { ...brand }) : null;
44
29
  };
45
30
  const renderNavigation = () => {
46
- return navigation?.length ? /*#__PURE__*/_jsx(Links, {
47
- links: navigation
48
- }) : null;
31
+ return navigation?.length ? /* @__PURE__ */ jsx(Links, { links: navigation }) : null;
49
32
  };
50
33
  const renderSocialMedia = () => {
51
- return socialMedia?.length ? /*#__PURE__*/_jsx(SocialMedia, {
52
- items: socialMedia
53
- }) : null;
34
+ return socialMedia?.length ? /* @__PURE__ */ jsx(SocialMedia, { items: socialMedia }) : null;
54
35
  };
55
36
  const renderCopyright = () => {
56
- // 如果 copyright.owner 不存在, 则使用 brand.name, 如果 brand.name 也不存在, copyright 元素为空
57
37
  const copyrightOwner = copyright?.owner || brand?.name;
58
38
  if (!copyrightOwner) {
59
39
  return null;
60
40
  }
61
- return /*#__PURE__*/_jsx(Copyright, {
62
- owner: copyrightOwner,
63
- year: copyright?.year || undefined
64
- });
41
+ return /* @__PURE__ */ jsx(Copyright, { owner: copyrightOwner, year: copyright?.year || void 0 });
65
42
  };
66
43
  const renderLinks = () => {
67
- return links?.length ? /*#__PURE__*/_jsx(Links, {
68
- flowLayout: true,
69
- links: links
70
- }) : null;
44
+ return links?.length ? /* @__PURE__ */ jsx(Links, { flowLayout: true, links }) : null;
71
45
  };
72
46
  const elements = {
73
47
  brand: renderBrand(),
@@ -77,35 +51,28 @@ function InternalFooter(props) {
77
51
  links: renderLinks()
78
52
  };
79
53
  let LayoutComponent = null;
80
- if (layout === 'auto') {
81
- LayoutComponent = layouts.find(item => item.support(elements, props)).component;
54
+ if (layout === "auto") {
55
+ LayoutComponent = layouts.find((item) => item.support(elements, props)).component;
82
56
  } else {
83
57
  LayoutComponent = layoutsKeyByName[layout]?.component;
84
58
  }
85
59
  if (!LayoutComponent) {
86
60
  throw new Error(`layout ${layout} is not supported.`);
87
61
  }
88
- return /*#__PURE__*/_jsxs(Box, {
89
- position: "relative",
90
- ...rest,
91
- children: [/*#__PURE__*/_jsx(LayoutComponent, {
92
- elements: elements,
93
- data: props
94
- }), /*#__PURE__*/_jsx(Box, {
95
- position: "absolute",
96
- right: 16,
97
- bottom: 0,
98
- fontSize: 12,
99
- sx: {
100
- color: 'transparent',
101
- '::selection': {
102
- background: '#000',
103
- color: '#fff'
104
- }
105
- },
106
- children: window?.blocklet?.version
107
- })]
108
- });
62
+ return /* @__PURE__ */ jsxs(Box, { position: "relative", ...rest, children: [
63
+ /* @__PURE__ */ jsx(LayoutComponent, { elements, data: props }),
64
+ /* @__PURE__ */ jsx(
65
+ Box,
66
+ {
67
+ position: "absolute",
68
+ right: 16,
69
+ bottom: 0,
70
+ fontSize: 12,
71
+ sx: { color: "transparent", "::selection": { background: "#000", color: "#fff" } },
72
+ children: window?.blocklet?.version
73
+ }
74
+ )
75
+ ] });
109
76
  }
110
77
  InternalFooter.propTypes = {
111
78
  brand: PropTypes.shape({
@@ -113,25 +80,31 @@ InternalFooter.propTypes = {
113
80
  description: PropTypes.string,
114
81
  logo: PropTypes.node
115
82
  }),
116
- navigation: PropTypes.arrayOf(PropTypes.shape({
117
- label: PropTypes.node,
118
- link: PropTypes.string
119
- })),
120
- socialMedia: PropTypes.arrayOf(PropTypes.shape({
121
- icon: PropTypes.node,
122
- link: PropTypes.string
123
- })),
83
+ navigation: PropTypes.arrayOf(
84
+ PropTypes.shape({
85
+ label: PropTypes.node,
86
+ link: PropTypes.string
87
+ })
88
+ ),
89
+ socialMedia: PropTypes.arrayOf(
90
+ PropTypes.shape({
91
+ icon: PropTypes.node,
92
+ link: PropTypes.string
93
+ })
94
+ ),
124
95
  copyright: PropTypes.shape({
125
96
  owner: PropTypes.string,
126
97
  year: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
127
98
  }),
128
99
  // privacy/legal 等链接, 常放于 footer 右下侧或最底部
129
- links: PropTypes.arrayOf(PropTypes.shape({
130
- label: PropTypes.node,
131
- link: PropTypes.string
132
- })),
100
+ links: PropTypes.arrayOf(
101
+ PropTypes.shape({
102
+ label: PropTypes.node,
103
+ link: PropTypes.string
104
+ })
105
+ ),
133
106
  // 可显式指定 footer layout, 默认根据内容自动决定 layout
134
- layout: PropTypes.oneOf(['auto', 'standard', 'plain'])
107
+ layout: PropTypes.oneOf(["auto", "standard", "plain"])
135
108
  };
136
109
  InternalFooter.defaultProps = {
137
110
  brand: null,
@@ -139,6 +112,6 @@ InternalFooter.defaultProps = {
139
112
  copyright: null,
140
113
  socialMedia: null,
141
114
  links: null,
142
- layout: 'auto'
115
+ layout: "auto"
143
116
  };
144
- export default InternalFooter;
117
+ export default InternalFooter;
@@ -0,0 +1,15 @@
1
+ export default PlainLayout;
2
+ /**
3
+ * footer plain layout
4
+ */
5
+ declare function PlainLayout({ elements, data, ...rest }: {
6
+ [x: string]: any;
7
+ elements: any;
8
+ data: any;
9
+ }): import("react").JSX.Element;
10
+ declare namespace PlainLayout {
11
+ namespace propTypes {
12
+ let elements: any;
13
+ let data: any;
14
+ }
15
+ }
@@ -1,38 +1,20 @@
1
- import { cloneElement } from 'react';
2
- import PropTypes from 'prop-types';
3
- import Container from '@mui/material/Container';
4
- import { styled } from '@arcblock/ux/lib/Theme';
5
- import Row from './row';
6
-
7
- /**
8
- * footer plain layout
9
- */
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
- import { Fragment as _Fragment } from "react/jsx-runtime";
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- function PlainLayout({
14
- elements,
15
- data,
16
- ...rest
17
- }) {
18
- return /*#__PURE__*/_jsx(Root, {
19
- ...rest,
20
- children: /*#__PURE__*/_jsxs(Container, {
21
- className: "plain-layout-container",
22
- children: [!!data.links && /*#__PURE__*/_jsxs(Row, {
23
- sx: {
24
- width: 1
25
- },
26
- autoCenter: true,
27
- children: [elements.copyright, elements.links]
28
- }), !data.links && /*#__PURE__*/_jsxs(_Fragment, {
29
- children: [/*#__PURE__*/cloneElement(elements.brand, {
30
- name: null,
31
- description: null
32
- }), elements.copyright]
33
- })]
34
- })
35
- });
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { cloneElement } from "react";
3
+ import PropTypes from "prop-types";
4
+ import Container from "@mui/material/Container";
5
+ import { styled } from "@arcblock/ux/lib/Theme";
6
+ import Row from "./row.js";
7
+ function PlainLayout({ elements, data, ...rest }) {
8
+ return /* @__PURE__ */ jsx(Root, { ...rest, children: /* @__PURE__ */ jsxs(Container, { className: "plain-layout-container", children: [
9
+ !!data.links && /* @__PURE__ */ jsxs(Row, { sx: { width: 1 }, autoCenter: true, children: [
10
+ elements.copyright,
11
+ elements.links
12
+ ] }),
13
+ !data.links && /* @__PURE__ */ jsxs(Fragment, { children: [
14
+ cloneElement(elements.brand, { name: null, description: null }),
15
+ elements.copyright
16
+ ] })
17
+ ] }) });
36
18
  }
37
19
  PlainLayout.propTypes = {
38
20
  elements: PropTypes.shape({
@@ -44,7 +26,7 @@ PlainLayout.propTypes = {
44
26
  }).isRequired,
45
27
  data: PropTypes.object.isRequired
46
28
  };
47
- const Root = styled('div')`
29
+ const Root = styled("div")`
48
30
  padding: 24px 0;
49
31
  .plain-layout-container {
50
32
  display: flex;
@@ -54,4 +36,4 @@ const Root = styled('div')`
54
36
  gap: 8px;
55
37
  }
56
38
  `;
57
- export default PlainLayout;
39
+ export default PlainLayout;
@@ -0,0 +1,18 @@
1
+ declare function Row({ children, autoCenter, ...rest }: {
2
+ [x: string]: any;
3
+ children: any;
4
+ autoCenter: any;
5
+ }): import("react").JSX.Element | null;
6
+ declare namespace Row {
7
+ namespace propTypes {
8
+ let children: any;
9
+ let autoCenter: any;
10
+ }
11
+ namespace defaultProps {
12
+ let children_1: null;
13
+ export { children_1 as children };
14
+ let autoCenter_1: boolean;
15
+ export { autoCenter_1 as autoCenter };
16
+ }
17
+ }
18
+ export default Row;
@@ -1,23 +1,13 @@
1
- import PropTypes from 'prop-types';
2
- import Box from '@mui/material/Box';
3
- import { styled } from '@arcblock/ux/lib/Theme';
4
- import clsx from 'clsx';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- export default function Row({
7
- children,
8
- autoCenter,
9
- ...rest
10
- }) {
1
+ import { jsx } from "react/jsx-runtime";
2
+ import PropTypes from "prop-types";
3
+ import Box from "@mui/material/Box";
4
+ import { styled } from "@arcblock/ux/lib/Theme";
5
+ import clsx from "clsx";
6
+ export default function Row({ children, autoCenter, ...rest }) {
11
7
  if (!children) {
12
8
  return null;
13
9
  }
14
- return /*#__PURE__*/_jsx(RowRoot, {
15
- ...rest,
16
- className: clsx(rest.className, {
17
- 'footer-row-auto-center': autoCenter
18
- }),
19
- children: children
20
- });
10
+ return /* @__PURE__ */ jsx(RowRoot, { ...rest, className: clsx(rest.className, { "footer-row-auto-center": autoCenter }), children });
21
11
  }
22
12
  Row.propTypes = {
23
13
  children: PropTypes.any,
@@ -37,7 +27,7 @@ const RowRoot = styled(Box)`
37
27
  margin: 0 auto;
38
28
  }
39
29
 
40
- ${props => props.theme.breakpoints.down('md')} {
30
+ ${(props) => props.theme.breakpoints.down("md")} {
41
31
  align-items: stretch;
42
32
  flex-direction: column;
43
33
  gap: 16px;
@@ -48,4 +38,4 @@ const RowRoot = styled(Box)`
48
38
  margin: 0 auto;
49
39
  }
50
40
  }
51
- `;
41
+ `;
@@ -0,0 +1,15 @@
1
+ export default StandardLayout;
2
+ /**
3
+ * footer standard layout
4
+ */
5
+ declare function StandardLayout({ elements, data, ...rest }: {
6
+ [x: string]: any;
7
+ elements: any;
8
+ data: any;
9
+ }): import("react").JSX.Element;
10
+ declare namespace StandardLayout {
11
+ namespace propTypes {
12
+ let elements: any;
13
+ let data: any;
14
+ }
15
+ }
@@ -1,62 +1,34 @@
1
- import PropTypes from 'prop-types';
2
- import Box from '@mui/material/Box';
3
- import Container from '@mui/material/Container';
4
- import { styled } from '@arcblock/ux/lib/Theme';
5
- import Row from './row';
6
-
7
- /**
8
- * footer standard layout
9
- */
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- import { jsxs as _jsxs } from "react/jsx-runtime";
12
- function StandardLayout({
13
- elements,
14
- data,
15
- ...rest
16
- }) {
17
- return /*#__PURE__*/_jsx(Root, {
18
- ...rest,
19
- children: /*#__PURE__*/_jsxs(Container, {
20
- children: [/*#__PURE__*/_jsxs(Box, {
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import PropTypes from "prop-types";
3
+ import Box from "@mui/material/Box";
4
+ import Container from "@mui/material/Container";
5
+ import { styled } from "@arcblock/ux/lib/Theme";
6
+ import Row from "./row.js";
7
+ function StandardLayout({ elements, data, ...rest }) {
8
+ return /* @__PURE__ */ jsx(Root, { ...rest, children: /* @__PURE__ */ jsxs(Container, { children: [
9
+ /* @__PURE__ */ jsxs(
10
+ Box,
11
+ {
21
12
  sx: {
22
- display: 'flex',
23
- flexDirection: {
24
- xs: 'column',
25
- md: 'row'
26
- },
27
- justifyContent: 'space-between',
28
- alignItems: {
29
- xs: 'center',
30
- md: 'space-between'
31
- },
13
+ display: "flex",
14
+ flexDirection: { xs: "column", md: "row" },
15
+ justifyContent: "space-between",
16
+ alignItems: { xs: "center", md: "space-between" },
32
17
  gap: 2,
33
18
  pb: 3
34
19
  },
35
- children: [/*#__PURE__*/_jsx(Box, {
36
- children: elements.brand
37
- }), /*#__PURE__*/_jsx(Box, {
38
- lineHeight: 1,
39
- children: elements.socialMedia
40
- })]
41
- }), !!data.navigation?.length && /*#__PURE__*/_jsx(Box, {
42
- sx: {
43
- mb: 6,
44
- pt: 3,
45
- borderTop: 1,
46
- borderColor: 'grey.200'
47
- },
48
- children: elements.navigation
49
- }), /*#__PURE__*/_jsxs(Row, {
50
- sx: {
51
- pt: 3,
52
- borderTop: 1,
53
- borderColor: 'grey.200'
54
- },
55
- autoCenter: true,
56
- children: [elements.copyright, elements.links]
57
- })]
58
- })
59
- });
20
+ children: [
21
+ /* @__PURE__ */ jsx(Box, { children: elements.brand }),
22
+ /* @__PURE__ */ jsx(Box, { lineHeight: 1, children: elements.socialMedia })
23
+ ]
24
+ }
25
+ ),
26
+ !!data.navigation?.length && /* @__PURE__ */ jsx(Box, { sx: { mb: 6, pt: 3, borderTop: 1, borderColor: "grey.200" }, children: elements.navigation }),
27
+ /* @__PURE__ */ jsxs(Row, { sx: { pt: 3, borderTop: 1, borderColor: "grey.200" }, autoCenter: true, children: [
28
+ elements.copyright,
29
+ elements.links
30
+ ] })
31
+ ] }) });
60
32
  }
61
33
  StandardLayout.propTypes = {
62
34
  elements: PropTypes.shape({
@@ -68,7 +40,7 @@ StandardLayout.propTypes = {
68
40
  }).isRequired,
69
41
  data: PropTypes.object.isRequired
70
42
  };
71
- const Root = styled('div')`
43
+ const Root = styled("div")`
72
44
  padding: 32px 0 24px 0;
73
45
  .footer-brand-name,
74
46
  .footer-brand-desc {
@@ -78,4 +50,4 @@ const Root = styled('div')`
78
50
  margin-right: 0;
79
51
  }
80
52
  `;
81
- export default StandardLayout;
53
+ export default StandardLayout;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * footer 中的 links (支持分组, 最多支持 2 级)
3
+ * TODO: dark/light theme
4
+ */
5
+ declare function Links({ links, flowLayout, ...rest }: {
6
+ [x: string]: any;
7
+ links: any;
8
+ flowLayout: any;
9
+ }): import("react").JSX.Element | null;
10
+ declare namespace Links {
11
+ namespace propTypes {
12
+ let links: any;
13
+ let flowLayout: any;
14
+ }
15
+ namespace defaultProps {
16
+ let links_1: never[];
17
+ export { links_1 as links };
18
+ let flowLayout_1: boolean;
19
+ export { flowLayout_1 as flowLayout };
20
+ }
21
+ }
22
+ export default Links;