@blocklet/ui-react 2.12.4 → 2.12.5
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.
|
@@ -5,7 +5,7 @@ import { Container } from "@mui/material";
|
|
|
5
5
|
import { styled } from "@arcblock/ux/lib/Theme";
|
|
6
6
|
import Row from "./row.js";
|
|
7
7
|
function PlainLayout({ elements, data, ...rest }) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Root, { ...rest, children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(Container, { className: "plain-layout-container",
|
|
8
|
+
return /* @__PURE__ */ jsx(Root, { ...rest, children: /* @__PURE__ */ jsx(Container, { style: { padding: 0 }, children: /* @__PURE__ */ jsxs(Container, { className: "plain-layout-container", children: [
|
|
9
9
|
elements.links && /* @__PURE__ */ jsxs(Row, { sx: { width: 1 }, autoCenter: true, children: [
|
|
10
10
|
elements.copyright,
|
|
11
11
|
elements.links
|
|
@@ -9,34 +9,27 @@ function StandardLayout({ elements, data, className, ...rest }) {
|
|
|
9
9
|
const withNavigation = !!data.navigation?.length;
|
|
10
10
|
let topSection = null;
|
|
11
11
|
if (withNavigation) {
|
|
12
|
-
topSection = /* @__PURE__ */ jsxs(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
/* @__PURE__ */ jsx(Box, { sx: { mb: 3, borderTop: { xs: `1px solid ${grey[200]}`, md: 0 } }, children: elements.navigation })
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
);
|
|
12
|
+
topSection = /* @__PURE__ */ jsxs(Container, { sx: { display: "flex", flexDirection: { xs: "column", md: "row" }, justifyContent: "space-between" }, children: [
|
|
13
|
+
/* @__PURE__ */ jsxs(
|
|
14
|
+
Box,
|
|
15
|
+
{
|
|
16
|
+
sx: {
|
|
17
|
+
flex: "1 1 auto",
|
|
18
|
+
paddingRight: { xs: 0, md: 3 },
|
|
19
|
+
display: "flex",
|
|
20
|
+
flexDirection: "column",
|
|
21
|
+
alignItems: { xs: "center", md: "flex-start" },
|
|
22
|
+
gap: 2,
|
|
23
|
+
pb: 3
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Box, { children: elements.brand }),
|
|
27
|
+
/* @__PURE__ */ jsx(Box, { lineHeight: 1, children: elements.socialMedia })
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx(Box, { sx: { mb: 3, borderTop: { xs: `1px solid ${grey[200]}`, md: 0 } }, children: elements.navigation })
|
|
32
|
+
] });
|
|
40
33
|
} else {
|
|
41
34
|
topSection = /* @__PURE__ */ jsxs(
|
|
42
35
|
Container,
|
|
@@ -49,7 +42,6 @@ function StandardLayout({ elements, data, className, ...rest }) {
|
|
|
49
42
|
gap: 2,
|
|
50
43
|
pb: 3
|
|
51
44
|
},
|
|
52
|
-
style: { padding: 0 },
|
|
53
45
|
children: [
|
|
54
46
|
/* @__PURE__ */ jsx(Box, { children: elements.brand }),
|
|
55
47
|
/* @__PURE__ */ jsx(Box, { lineHeight: 1, children: elements.socialMedia })
|
|
@@ -57,10 +49,10 @@ function StandardLayout({ elements, data, className, ...rest }) {
|
|
|
57
49
|
}
|
|
58
50
|
);
|
|
59
51
|
}
|
|
60
|
-
return /* @__PURE__ */ jsx(Root, { ...rest, className: clsx({ "footer--with-navs": withNavigation }, className), children: /* @__PURE__ */ jsxs(Container, { children: [
|
|
52
|
+
return /* @__PURE__ */ jsx(Root, { ...rest, className: clsx({ "footer--with-navs": withNavigation }, className), children: /* @__PURE__ */ jsxs(Container, { style: { padding: 0 }, children: [
|
|
61
53
|
topSection,
|
|
62
54
|
/* @__PURE__ */ jsx(Box, { sx: { pt: 3, borderTop: 1, borderColor: "grey.200" } }),
|
|
63
|
-
/* @__PURE__ */ jsx(Container, {
|
|
55
|
+
/* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(Row, { autoCenter: true, children: [
|
|
64
56
|
elements.copyright,
|
|
65
57
|
elements.links
|
|
66
58
|
] }) })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.5",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@abtnode/constant": "^1.16.39",
|
|
36
|
-
"@arcblock/bridge": "^2.12.
|
|
37
|
-
"@arcblock/react-hooks": "^2.12.
|
|
36
|
+
"@arcblock/bridge": "^2.12.5",
|
|
37
|
+
"@arcblock/react-hooks": "^2.12.5",
|
|
38
38
|
"@arcblock/ws": "^1.19.13",
|
|
39
39
|
"@blocklet/did-space-react": "^1.0.22",
|
|
40
40
|
"@iconify-icons/logos": "^1.2.36",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"jest": "^29.7.0",
|
|
85
85
|
"unbuild": "^2.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "3999edcf6f4b5fd30f3c5d27b27f85e0051315b4"
|
|
88
88
|
}
|
|
@@ -10,8 +10,8 @@ import Row from './row';
|
|
|
10
10
|
function PlainLayout({ elements, data, ...rest }) {
|
|
11
11
|
return (
|
|
12
12
|
<Root {...rest}>
|
|
13
|
-
<Container>
|
|
14
|
-
<Container className="plain-layout-container"
|
|
13
|
+
<Container style={{ padding: 0 }}>
|
|
14
|
+
<Container className="plain-layout-container">
|
|
15
15
|
{elements.links && (
|
|
16
16
|
<Row sx={{ width: 1 }} autoCenter>
|
|
17
17
|
{elements.copyright}
|
|
@@ -17,9 +17,7 @@ function StandardLayout({ elements, data, className, ...rest }) {
|
|
|
17
17
|
if (withNavigation) {
|
|
18
18
|
// 左 brand & social,右导航栏
|
|
19
19
|
topSection = (
|
|
20
|
-
<Container
|
|
21
|
-
sx={{ display: 'flex', flexDirection: { xs: 'column', md: 'row' }, justifyContent: 'space-between' }}
|
|
22
|
-
style={{ padding: 0 }}>
|
|
20
|
+
<Container sx={{ display: 'flex', flexDirection: { xs: 'column', md: 'row' }, justifyContent: 'space-between' }}>
|
|
23
21
|
<Box
|
|
24
22
|
sx={{
|
|
25
23
|
flex: '1 1 auto',
|
|
@@ -47,8 +45,7 @@ function StandardLayout({ elements, data, className, ...rest }) {
|
|
|
47
45
|
alignItems: { xs: 'center', md: 'space-between' },
|
|
48
46
|
gap: 2,
|
|
49
47
|
pb: 3,
|
|
50
|
-
}}
|
|
51
|
-
style={{ padding: 0 }}>
|
|
48
|
+
}}>
|
|
52
49
|
<Box>{elements.brand}</Box>
|
|
53
50
|
<Box lineHeight={1}>{elements.socialMedia}</Box>
|
|
54
51
|
</Container>
|
|
@@ -57,11 +54,11 @@ function StandardLayout({ elements, data, className, ...rest }) {
|
|
|
57
54
|
|
|
58
55
|
return (
|
|
59
56
|
<Root {...rest} className={clsx({ 'footer--with-navs': withNavigation }, className)}>
|
|
60
|
-
<Container>
|
|
57
|
+
<Container style={{ padding: 0 }}>
|
|
61
58
|
{topSection}
|
|
62
59
|
{/* 分割线可以延伸 */}
|
|
63
60
|
<Box sx={{ pt: 3, borderTop: 1, borderColor: 'grey.200' }} />
|
|
64
|
-
<Container
|
|
61
|
+
<Container>
|
|
65
62
|
<Row autoCenter>
|
|
66
63
|
{elements.copyright}
|
|
67
64
|
{elements.links}
|