@blocklet/ui-react 2.4.2 → 2.4.3
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/Footer/brand.js +3 -6
- package/lib/Footer/copyright.js +3 -4
- package/lib/Footer/index.js +3 -5
- package/lib/Footer/layout/plain.js +3 -5
- package/lib/Footer/layout/row.js +3 -6
- package/lib/Footer/layout/standard.js +3 -5
- package/lib/Footer/links.js +3 -6
- package/lib/Footer/social-media.js +3 -6
- package/lib/Header/index.js +3 -7
- package/package.json +4 -4
- package/src/Footer/brand.js +2 -3
- package/src/Footer/copyright.js +2 -2
- package/src/Footer/index.js +2 -2
- package/src/Footer/layout/plain.js +2 -2
- package/src/Footer/layout/row.js +2 -3
- package/src/Footer/layout/standard.js +3 -2
- package/src/Footer/links.js +2 -3
- package/src/Footer/social-media.js +2 -3
- package/src/Header/index.js +2 -4
package/lib/Footer/brand.js
CHANGED
|
@@ -9,9 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _styles = require("@mui/material/styles");
|
|
12
|
+
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
15
13
|
|
|
16
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
15
|
|
|
@@ -41,7 +39,7 @@ function Brand(_ref) {
|
|
|
41
39
|
} = _ref,
|
|
42
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
41
|
|
|
44
|
-
const theme = (0,
|
|
42
|
+
const theme = (0, _Theme.useTheme)();
|
|
45
43
|
|
|
46
44
|
if (!name && !logo && !description) {
|
|
47
45
|
return null;
|
|
@@ -78,5 +76,4 @@ Brand.defaultProps = {
|
|
|
78
76
|
logo: '',
|
|
79
77
|
description: ''
|
|
80
78
|
};
|
|
81
|
-
|
|
82
|
-
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n font-size: 14px;\n a {\n text-decoration: none;\n color: inherit;\n }\n > div:first-child {\n display: flex;\n align-items: center;\n }\n .footer-brand-logo {\n display: flex;\n align-items: center;\n margin-right: 16px;\n line-height: 1;\n img,\n svg {\n width: auto;\n height: 44px;\n max-height: 44px;\n }\n }\n .footer-brand-name {\n font-size: 16px;\n font-weight: bold;\n }\n .footer-brand-desc {\n margin-top: 16px;\n }\n\n ", " {\n width: auto;\n }\n\n ", " {\n .footer-brand-logo {\n img,\n svg {\n height: 32px;\n max-height: 32px;\n }\n }\n }\n"])), props => props.$theme.breakpoints.down('sm'), props => props.$theme.breakpoints.down('md'));
|
|
79
|
+
const Root = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n font-size: 14px;\n a {\n text-decoration: none;\n color: inherit;\n }\n > div:first-child {\n display: flex;\n align-items: center;\n }\n .footer-brand-logo {\n display: flex;\n align-items: center;\n margin-right: 16px;\n line-height: 1;\n img,\n svg {\n width: auto;\n height: 44px;\n max-height: 44px;\n }\n }\n .footer-brand-name {\n font-size: 16px;\n font-weight: bold;\n }\n .footer-brand-desc {\n margin-top: 16px;\n }\n\n ", " {\n width: auto;\n }\n\n ", " {\n .footer-brand-logo {\n img,\n svg {\n height: 32px;\n max-height: 32px;\n }\n }\n }\n"])), props => props.$theme.breakpoints.down('sm'), props => props.$theme.breakpoints.down('md'));
|
package/lib/Footer/copyright.js
CHANGED
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = Copyright;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
|
|
@@ -49,5 +49,4 @@ Copyright.defaultProps = {
|
|
|
49
49
|
owner: 'ArcBlock, Inc.',
|
|
50
50
|
year: "".concat(new Date().getFullYear())
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
const Root = _styled.default.p(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0;\n font-size: 13px;\n"])));
|
|
52
|
+
const Root = (0, _Theme.styled)('p')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0;\n font-size: 13px;\n"])));
|
package/lib/Footer/index.js
CHANGED
|
@@ -7,9 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var _styles = require("@mui/material/styles");
|
|
10
|
+
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
13
11
|
|
|
14
12
|
var _reactErrorBoundary = require("react-error-boundary");
|
|
15
13
|
|
|
@@ -56,7 +54,7 @@ function Footer(_ref) {
|
|
|
56
54
|
} = _ref,
|
|
57
55
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
58
56
|
|
|
59
|
-
const muiTheme = (0,
|
|
57
|
+
const muiTheme = (0, _Theme.useTheme)();
|
|
60
58
|
const {
|
|
61
59
|
locale
|
|
62
60
|
} = (0, _context.useLocaleContext)() || {};
|
|
@@ -115,7 +113,7 @@ Footer.propTypes = {
|
|
|
115
113
|
Footer.defaultProps = {
|
|
116
114
|
meta: {}
|
|
117
115
|
};
|
|
118
|
-
const StyledInternalFooter = (0,
|
|
116
|
+
const StyledInternalFooter = (0, _Theme.styled)(_internalFooter.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-top: 1px solid #eee;\n color: ", ";\n ", "\n font-family: Lato, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n"])), props => props.$theme.palette.grey[600], _ref2 => {
|
|
119
117
|
let {
|
|
120
118
|
$bgcolor
|
|
121
119
|
} = _ref2;
|
|
@@ -9,10 +9,10 @@ var _react = require("react");
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
|
-
|
|
14
12
|
var _Container = _interopRequireDefault(require("@mui/material/Container"));
|
|
15
13
|
|
|
14
|
+
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
15
|
+
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
|
|
18
18
|
var _templateObject;
|
|
@@ -62,8 +62,6 @@ PlainLayout.propTypes = {
|
|
|
62
62
|
links: _propTypes.default.element
|
|
63
63
|
}).isRequired
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 0;\n border-top: 1px solid #eee;\n .plain-layout-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n }\n"])));
|
|
67
|
-
|
|
65
|
+
const Root = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 0;\n border-top: 1px solid #eee;\n .plain-layout-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n }\n"])));
|
|
68
66
|
var _default = PlainLayout;
|
|
69
67
|
exports.default = _default;
|
package/lib/Footer/layout/row.js
CHANGED
|
@@ -7,9 +7,7 @@ exports.default = Row;
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var _styles = require("@mui/material/styles");
|
|
10
|
+
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
13
11
|
|
|
14
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
13
|
|
|
@@ -40,7 +38,7 @@ function Row(_ref) {
|
|
|
40
38
|
} = _ref,
|
|
41
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
42
40
|
|
|
43
|
-
const theme = (0,
|
|
41
|
+
const theme = (0, _Theme.useTheme)();
|
|
44
42
|
|
|
45
43
|
if (!children) {
|
|
46
44
|
return null;
|
|
@@ -63,5 +61,4 @@ Row.defaultProps = {
|
|
|
63
61
|
children: null,
|
|
64
62
|
autoCenter: false
|
|
65
63
|
};
|
|
66
|
-
|
|
67
|
-
const RowRoot = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n & + & {\n margin-top: 24px;\n }\n &.footer-row-auto-center > *:only-child {\n margin: 0 auto;\n }\n\n ", " {\n align-items: stretch;\n flex-direction: column;\n gap: 16px;\n > * {\n flex: 1 0 100%;\n }\n &.footer-row-auto-center > * {\n margin: 0 auto;\n }\n }\n"])), props => props.$theme.breakpoints.down('md'));
|
|
64
|
+
const RowRoot = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n & + & {\n margin-top: 24px;\n }\n &.footer-row-auto-center > *:only-child {\n margin: 0 auto;\n }\n\n ", " {\n align-items: stretch;\n flex-direction: column;\n gap: 16px;\n > * {\n flex: 1 0 100%;\n }\n &.footer-row-auto-center > * {\n margin: 0 auto;\n }\n }\n"])), props => props.$theme.breakpoints.down('md'));
|
|
@@ -7,12 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
|
-
|
|
12
10
|
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
13
11
|
|
|
14
12
|
var _Container = _interopRequireDefault(require("@mui/material/Container"));
|
|
15
13
|
|
|
14
|
+
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
15
|
+
|
|
16
16
|
var _row = _interopRequireDefault(require("./row"));
|
|
17
17
|
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -78,8 +78,6 @@ Footer.propTypes = {
|
|
|
78
78
|
links: _propTypes.default.element
|
|
79
79
|
}).isRequired
|
|
80
80
|
};
|
|
81
|
-
|
|
82
|
-
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 48px 0;\n"])));
|
|
83
|
-
|
|
81
|
+
const Root = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 48px 0;\n"])));
|
|
84
82
|
var _default = Footer;
|
|
85
83
|
exports.default = _default;
|
package/lib/Footer/links.js
CHANGED
|
@@ -9,9 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _styles = require("@mui/material/styles");
|
|
12
|
+
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
15
13
|
|
|
16
14
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
15
|
|
|
@@ -46,7 +44,7 @@ function Links(_ref) {
|
|
|
46
44
|
} = _ref,
|
|
47
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
46
|
|
|
49
|
-
const theme = (0,
|
|
47
|
+
const theme = (0, _Theme.useTheme)();
|
|
50
48
|
const [activeIndex, setActiveIndex] = (0, _react.useState)(-1);
|
|
51
49
|
|
|
52
50
|
if (!(links !== null && links !== void 0 && links.length)) {
|
|
@@ -136,5 +134,4 @@ Links.defaultProps = {
|
|
|
136
134
|
links: [],
|
|
137
135
|
flowLayout: false
|
|
138
136
|
};
|
|
139
|
-
|
|
140
|
-
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n color: ", ";\n .footer-links-inner {\n display: flex;\n justify-content: space-between;\n margin: 0 -8px;\n }\n .footer-links-group,\n .footer-links-sub {\n display: flex;\n flex-direction: column;\n }\n .footer-links-item {\n display: inline-block;\n padding: 0 8px;\n font-size: 14px;\n line-height: 1.6;\n }\n .footer-links-group + .footer-links-group {\n margin-left: 128px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-weight: bold;\n }\n .footer-links-sub {\n margin-top: 8px;\n }\n }\n }\n a {\n color: inherit;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n\n &.footer-links--flow {\n display: inline-flex;\n .footer-links-inner {\n justify-content: center;\n flex-wrap: wrap;\n margin: 0 -8px;\n .footer-links-item {\n padding: 0 8px;\n }\n }\n }\n\n ", " {\n .footer-links-group + .footer-links-group {\n margin-left: 56px;\n }\n }\n\n ", " {\n .footer-links-group + .footer-links-group {\n margin-left: 40px;\n }\n }\n\n ", " {\n .footer-links-inner {\n flex-direction: column;\n margin: 0;\n }\n .footer-links-sub {\n display: none;\n }\n .footer-links-group {\n padding: 12px 0;\n border-top: 1px solid ", ";\n }\n .footer-links-group + .footer-links-group {\n margin-left: 0;\n }\n .footer-links-group--active {\n .footer-links-sub {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n .footer-links-item {\n flex: 0 0 50%;\n }\n }\n }\n .footer-links-item {\n padding: 0;\n font-size: 13px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-size: 14px;\n }\n }\n }\n\n &.footer-links--flow {\n .footer-links-inner {\n flex-direction: row;\n }\n }\n }\n"])), props => props.$theme.palette.grey[600], props => props.$theme.breakpoints.down('lg'), props => props.$theme.breakpoints.down('lg'), props => props.$theme.breakpoints.down('sm'), props => props.$theme.palette.grey[200]);
|
|
137
|
+
const Root = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n color: ", ";\n .footer-links-inner {\n display: flex;\n justify-content: space-between;\n margin: 0 -8px;\n }\n .footer-links-group,\n .footer-links-sub {\n display: flex;\n flex-direction: column;\n }\n .footer-links-item {\n display: inline-block;\n padding: 0 8px;\n font-size: 14px;\n line-height: 1.6;\n }\n .footer-links-group + .footer-links-group {\n margin-left: 128px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-weight: bold;\n }\n .footer-links-sub {\n margin-top: 8px;\n }\n }\n }\n a {\n color: inherit;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n\n &.footer-links--flow {\n display: inline-flex;\n .footer-links-inner {\n justify-content: center;\n flex-wrap: wrap;\n margin: 0 -8px;\n .footer-links-item {\n padding: 0 8px;\n }\n }\n }\n\n ", " {\n .footer-links-group + .footer-links-group {\n margin-left: 56px;\n }\n }\n\n ", " {\n .footer-links-group + .footer-links-group {\n margin-left: 40px;\n }\n }\n\n ", " {\n .footer-links-inner {\n flex-direction: column;\n margin: 0;\n }\n .footer-links-sub {\n display: none;\n }\n .footer-links-group {\n padding: 12px 0;\n border-top: 1px solid ", ";\n }\n .footer-links-group + .footer-links-group {\n margin-left: 0;\n }\n .footer-links-group--active {\n .footer-links-sub {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n .footer-links-item {\n flex: 0 0 50%;\n }\n }\n }\n .footer-links-item {\n padding: 0;\n font-size: 13px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-size: 14px;\n }\n }\n }\n\n &.footer-links--flow {\n .footer-links-inner {\n flex-direction: row;\n }\n }\n }\n"])), props => props.$theme.palette.grey[600], props => props.$theme.breakpoints.down('lg'), props => props.$theme.breakpoints.down('lg'), props => props.$theme.breakpoints.down('sm'), props => props.$theme.palette.grey[200]);
|
|
@@ -7,9 +7,7 @@ exports.default = SocialMedia;
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var _styles = require("@mui/material/styles");
|
|
10
|
+
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
13
11
|
|
|
14
12
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
15
13
|
|
|
@@ -39,7 +37,7 @@ function SocialMedia(_ref) {
|
|
|
39
37
|
} = _ref,
|
|
40
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
39
|
|
|
42
|
-
const theme = (0,
|
|
40
|
+
const theme = (0, _Theme.useTheme)();
|
|
43
41
|
|
|
44
42
|
if (!(items !== null && items !== void 0 && items.length)) {
|
|
45
43
|
return null;
|
|
@@ -80,5 +78,4 @@ SocialMedia.propTypes = {
|
|
|
80
78
|
SocialMedia.defaultProps = {
|
|
81
79
|
items: null
|
|
82
80
|
};
|
|
83
|
-
|
|
84
|
-
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n a + a {\n margin-left: 12px;\n }\n"])));
|
|
81
|
+
const Root = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n a + a {\n margin-left: 12px;\n }\n"])));
|
package/lib/Header/index.js
CHANGED
|
@@ -11,10 +11,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
14
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
15
|
-
|
|
16
|
-
var _styles = require("@mui/material/styles");
|
|
17
|
-
|
|
18
14
|
var _reactErrorBoundary = require("react-error-boundary");
|
|
19
15
|
|
|
20
16
|
var _ErrorBoundary = require("@arcblock/ux/lib/ErrorBoundary");
|
|
@@ -63,7 +59,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
63
59
|
|
|
64
60
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
65
61
|
|
|
66
|
-
const muiTheme = (0, _Theme.
|
|
62
|
+
const muiTheme = (0, _Theme.createTheme)(); // blocklet meta 中的 navigation 数据 => NavMenu 组件的 items
|
|
67
63
|
|
|
68
64
|
const parseNavigation = navigation => {
|
|
69
65
|
if (!(navigation !== null && navigation !== void 0 && navigation.length)) {
|
|
@@ -203,7 +199,7 @@ function Header(_ref) {
|
|
|
203
199
|
|
|
204
200
|
const renderedAddons = renderAddons();
|
|
205
201
|
const addonList = /*#__PURE__*/(0, _react.createElement)(_jsxRuntime.Fragment, null, ...(Array.isArray(renderedAddons) ? renderedAddons : [renderedAddons]));
|
|
206
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
202
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Theme.ThemeProvider, {
|
|
207
203
|
theme: muiTheme,
|
|
208
204
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledUxHeader, _objectSpread(_objectSpread({
|
|
209
205
|
logo: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
@@ -265,7 +261,7 @@ Header.defaultProps = {
|
|
|
265
261
|
},
|
|
266
262
|
homeLink: _blocklets.publicPath
|
|
267
263
|
};
|
|
268
|
-
const StyledUxHeader = (0,
|
|
264
|
+
const StyledUxHeader = (0, _Theme.styled)(_Header.ResponsiveHeader)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n font-family: Lato, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n .header-logo {\n min-width: 44px;\n }\n ", " {\n .header-logo {\n min-width: 32px;\n }\n }\n .header-nav {\n .navmenu-sub .navmenu-item {\n min-width: 80px;\n }\n }\n .header-nav.navmenu--horizontal {\n .navmenu-root > .navmenu-sub,\n .navmenu-root > .navmenu-item {\n padding: 16px 4px;\n\n .navmenu-sub-container {\n padding-top: 0;\n }\n }\n }\n"])), _ref3 => {
|
|
269
265
|
let {
|
|
270
266
|
$bgcolor
|
|
271
267
|
} = _ref3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"url": "https://github.com/ArcBlock/ux/issues"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@arcblock/did-connect": "^2.4.
|
|
34
|
-
"@arcblock/ux": "^2.4.
|
|
33
|
+
"@arcblock/did-connect": "^2.4.3",
|
|
34
|
+
"@arcblock/ux": "^2.4.3",
|
|
35
35
|
"@emotion/react": "^11.10.0",
|
|
36
36
|
"@emotion/styled": "^11.10.0",
|
|
37
37
|
"@iconify/iconify": "^2.2.1",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
54
54
|
"jest": "^24.9.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "a3c4e62917f630b62edccc064cfbb88e72b8407d"
|
|
57
57
|
}
|
package/src/Footer/brand.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { isValidElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from '@
|
|
4
|
-
import { useTheme } from '@mui/material/styles';
|
|
3
|
+
import { useTheme, styled } from '@arcblock/ux/lib/Theme';
|
|
5
4
|
|
|
6
5
|
export default function Brand({ name, logo, description, ...rest }) {
|
|
7
6
|
const theme = useTheme();
|
|
@@ -34,7 +33,7 @@ Brand.defaultProps = {
|
|
|
34
33
|
description: '',
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
const Root = styled
|
|
36
|
+
const Root = styled('div')`
|
|
38
37
|
display: flex;
|
|
39
38
|
flex-direction: column;
|
|
40
39
|
font-size: 14px;
|
package/src/Footer/copyright.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { styled } from '@arcblock/ux/lib/Theme';
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
3
|
|
|
4
4
|
export default function Copyright({ owner, year, ...rest }) {
|
|
5
5
|
return (
|
|
@@ -19,7 +19,7 @@ Copyright.defaultProps = {
|
|
|
19
19
|
year: `${new Date().getFullYear()}`,
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const Root = styled
|
|
22
|
+
const Root = styled('p')`
|
|
23
23
|
margin: 0;
|
|
24
24
|
font-size: 13px;
|
|
25
25
|
`;
|
package/src/Footer/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import styled from '@
|
|
3
|
-
import { useTheme } from '@mui/material/styles';
|
|
2
|
+
import { styled, useTheme } from '@arcblock/ux/lib/Theme';
|
|
4
3
|
import { withErrorBoundary } from 'react-error-boundary';
|
|
5
4
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
6
5
|
import { ErrorFallback } from '@arcblock/ux/lib/ErrorBoundary';
|
|
6
|
+
|
|
7
7
|
import InternalFooter from './internal-footer';
|
|
8
8
|
import { mapRecursive } from '../utils';
|
|
9
9
|
import { formatBlockletInfo, getLocalizedNavigation } from '../blocklets';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cloneElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from '@emotion/styled';
|
|
4
3
|
import Container from '@mui/material/Container';
|
|
4
|
+
import { styled } from '@arcblock/ux/lib/Theme';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* footer plain layout
|
|
@@ -27,7 +27,7 @@ PlainLayout.propTypes = {
|
|
|
27
27
|
}).isRequired,
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
const Root = styled
|
|
30
|
+
const Root = styled('div')`
|
|
31
31
|
padding: 24px 0;
|
|
32
32
|
border-top: 1px solid #eee;
|
|
33
33
|
.plain-layout-container {
|
package/src/Footer/layout/row.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import styled from '@
|
|
3
|
-
import { useTheme } from '@mui/material/styles';
|
|
2
|
+
import { useTheme, styled } from '@arcblock/ux/lib/Theme';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
|
|
6
5
|
export default function Row({ children, autoCenter, ...rest }) {
|
|
@@ -25,7 +24,7 @@ Row.defaultProps = {
|
|
|
25
24
|
autoCenter: false,
|
|
26
25
|
};
|
|
27
26
|
|
|
28
|
-
const RowRoot = styled
|
|
27
|
+
const RowRoot = styled('div')`
|
|
29
28
|
display: flex;
|
|
30
29
|
justify-content: space-between;
|
|
31
30
|
& + & {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
2
|
import Box from '@mui/material/Box';
|
|
4
3
|
import Container from '@mui/material/Container';
|
|
4
|
+
import { styled } from '@arcblock/ux/lib/Theme';
|
|
5
|
+
|
|
5
6
|
import Row from './row';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -37,7 +38,7 @@ Footer.propTypes = {
|
|
|
37
38
|
}).isRequired,
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
const Root = styled
|
|
41
|
+
const Root = styled('div')`
|
|
41
42
|
padding: 48px 0;
|
|
42
43
|
`;
|
|
43
44
|
|
package/src/Footer/links.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/no-array-index-key */
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import styled from '@
|
|
5
|
-
import { useTheme } from '@mui/material/styles';
|
|
4
|
+
import { useTheme, styled } from '@arcblock/ux/lib/Theme';
|
|
6
5
|
import clsx from 'clsx';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -92,7 +91,7 @@ Links.defaultProps = {
|
|
|
92
91
|
flowLayout: false,
|
|
93
92
|
};
|
|
94
93
|
|
|
95
|
-
const Root = styled
|
|
94
|
+
const Root = styled('div')`
|
|
96
95
|
overflow: hidden;
|
|
97
96
|
color: ${(props) => props.$theme.palette.grey[600]};
|
|
98
97
|
.footer-links-inner {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import styled from '@
|
|
3
|
-
import { useTheme } from '@mui/material/styles';
|
|
2
|
+
import { useTheme, styled } from '@arcblock/ux/lib/Theme';
|
|
4
3
|
import Icon from '../Icon';
|
|
5
4
|
|
|
6
5
|
export default function SocialMedia({ items, ...rest }) {
|
|
@@ -42,7 +41,7 @@ SocialMedia.defaultProps = {
|
|
|
42
41
|
items: null,
|
|
43
42
|
};
|
|
44
43
|
|
|
45
|
-
const Root = styled
|
|
44
|
+
const Root = styled('div')`
|
|
46
45
|
display: inline-flex;
|
|
47
46
|
align-items: center;
|
|
48
47
|
a + a {
|
package/src/Header/index.js
CHANGED
|
@@ -2,11 +2,9 @@ import { useContext, useMemo, createElement } from 'react';
|
|
|
2
2
|
// FIXME: 直接从 react 中 import Fragment 可能会在 vite 下出错,先暂时从 react/jsx-runtime 导入 Fragment 来跳过这个问题
|
|
3
3
|
import { Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import styled from '@emotion/styled';
|
|
6
|
-
import { ThemeProvider } from '@mui/material/styles';
|
|
7
5
|
import { withErrorBoundary } from 'react-error-boundary';
|
|
8
6
|
import { ErrorFallback } from '@arcblock/ux/lib/ErrorBoundary';
|
|
9
|
-
import {
|
|
7
|
+
import { createTheme, ThemeProvider, styled } from '@arcblock/ux/lib/Theme';
|
|
10
8
|
import { ResponsiveHeader } from '@arcblock/ux/lib/Header';
|
|
11
9
|
import NavMenu from '@arcblock/ux/lib/NavMenu';
|
|
12
10
|
import { SessionContext } from '@arcblock/did-connect/lib/Session';
|
|
@@ -21,7 +19,7 @@ import { blockletMetaProps, sessionManagerProps } from '../types';
|
|
|
21
19
|
import { mapRecursive, flatRecursive, matchPaths } from '../utils';
|
|
22
20
|
import { publicPath, formatBlockletInfo, getLocalizedNavigation } from '../blocklets';
|
|
23
21
|
|
|
24
|
-
const muiTheme =
|
|
22
|
+
const muiTheme = createTheme();
|
|
25
23
|
|
|
26
24
|
// blocklet meta 中的 navigation 数据 => NavMenu 组件的 items
|
|
27
25
|
const parseNavigation = (navigation) => {
|