@arcblock/ux 2.1.29 → 2.1.32

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.
@@ -15,7 +15,7 @@ var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularPr
15
15
 
16
16
  var _Avatar = _interopRequireDefault(require("@arcblock/did-connect/lib/Avatar"));
17
17
 
18
- var _styles = require("@mui/styles");
18
+ var _styles = require("@mui/material/styles");
19
19
 
20
20
  var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
21
21
 
@@ -19,7 +19,7 @@ var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularPr
19
19
 
20
20
  var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
21
21
 
22
- var _useTheme = _interopRequireDefault(require("@mui/styles/useTheme"));
22
+ var _styles = require("@mui/material/styles");
23
23
 
24
24
  var _Avatar = _interopRequireDefault(require("@arcblock/did-connect/lib/Avatar"));
25
25
 
@@ -139,7 +139,7 @@ function BlockletNFT(_ref2) {
139
139
 
140
140
  const _onMainClick = wrapHandler(onMainClick);
141
141
 
142
- const theme = (0, _useTheme.default)();
142
+ const theme = (0, _styles.useTheme)();
143
143
  const isDownSm = (0, _useMediaQuery.default)(theme.breakpoints.down('md'));
144
144
  const isDownMd = (0, _useMediaQuery.default)(theme.breakpoints.down('lg'));
145
145
  const isUpLg = (0, _useMediaQuery.default)(theme.breakpoints.up('lg')); // If size is auto, need calculate actual size according to screen size
@@ -19,7 +19,7 @@ var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
19
19
 
20
20
  var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
21
21
 
22
- var _styles = require("@mui/styles");
22
+ var _styles = require("@mui/material/styles");
23
23
 
24
24
  var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
25
25
 
@@ -10,7 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
 
11
11
  var _styledComponents = _interopRequireDefault(require("styled-components"));
12
12
 
13
- var _useTheme = _interopRequireDefault(require("@mui/styles/useTheme"));
13
+ var _styles = require("@mui/material/styles");
14
14
 
15
15
  var _colors = require("@mui/material/colors");
16
16
 
@@ -26,7 +26,7 @@ function InternalErrorFallback(_ref) {
26
26
  desc,
27
27
  retryFunc
28
28
  } = _ref;
29
- const theme = (0, _useTheme.default)();
29
+ const theme = (0, _styles.useTheme)();
30
30
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, {
31
31
  role: "alert",
32
32
  $theme: theme,
@@ -11,6 +11,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
11
11
 
12
12
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
13
13
 
14
+ var _Container = _interopRequireDefault(require("@mui/material/Container"));
15
+
14
16
  var _Util = require("../Util");
15
17
 
16
18
  var _Logo = _interopRequireDefault(require("../Logo"));
@@ -35,32 +37,35 @@ function Footer(props) {
35
37
  className: className,
36
38
  style: style,
37
39
  dark: dark,
38
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
39
- component: "div",
40
- className: "footer",
41
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
42
- component: "p",
43
- className: "footer-item",
44
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
45
- className: "footer-copy",
46
- children: ["Copyright \xA9 ", copyYear, " "]
47
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
48
- className: "footer-brand",
49
- children: brand
50
- })]
51
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
52
- component: "p",
53
- className: "footer-item",
54
- style: {
55
- justifyContent: 'flex-end',
56
- flexShrink: 0
57
- },
58
- children: ["Powered by", /*#__PURE__*/(0, _jsxRuntime.jsx)(_Logo.default, {
59
- mode: dark ? 'light' : 'dark',
60
- layout: "horizontal",
61
- className: "logo-container"
40
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.default, {
41
+ maxWidth: false,
42
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
43
+ component: "div",
44
+ className: "footer",
45
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
46
+ component: "p",
47
+ className: "footer-item",
48
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
49
+ className: "footer-copy",
50
+ children: ["Copyright \xA9 ", copyYear, " "]
51
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
52
+ className: "footer-brand",
53
+ children: brand
54
+ })]
55
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
56
+ component: "p",
57
+ className: "footer-item",
58
+ style: {
59
+ justifyContent: 'flex-end',
60
+ flexShrink: 0
61
+ },
62
+ children: ["Powered by", /*#__PURE__*/(0, _jsxRuntime.jsx)(_Logo.default, {
63
+ mode: dark ? 'light' : 'dark',
64
+ layout: "horizontal",
65
+ className: "logo-container"
66
+ })]
62
67
  })]
63
- })]
68
+ })
64
69
  })
65
70
  });
66
71
  }
@@ -83,4 +88,10 @@ Footer.defaultProps = {
83
88
  const Container = _styledComponents.default.div.withConfig({
84
89
  displayName: "Footer__Container",
85
90
  componentId: "sc-1qpifuv-0"
86
- })(["margin-top:64px;padding:24px 0 32px;border-top:1px solid ", ";box-sizing:border-box;width:100%;@media (max-width:540px){padding:8px 0;}.footer{display:flex;align-items:center;justify-content:space-between;.footer-item{color:", ";display:flex;align-items:center;flex-wrap:wrap;font-size:0.9rem;}.footer-brand{margin-left:8px;margin-right:8px;}.logo-container{margin:0 24px;width:90px;opacity:0.5;}@media (max-width:540px){.footer-item{font-size:0.7rem;}.logo-container{margin:0 0 0 16px;width:70px;height:40px;}}@media (max-width:380px){.footer-item{font-size:0.65rem;}.logo-container{margin:0 0 0 8px;height:24px;}}}"], props => props.dark ? props.theme.palette.grey[900] : '#dee2e7', props => props.theme.palette.grey[900]);
91
+ })(["margin-top:64px;padding:24px 0 32px;border-top:1px solid ", ";box-sizing:border-box;width:100%;@media (max-width:540px){padding:8px 0;}.footer{display:flex;align-items:center;justify-content:space-between;.footer-item{color:", ";display:flex;align-items:center;flex-wrap:wrap;font-size:0.9rem;}.footer-brand{margin-left:8px;margin-right:8px;}.logo-container{margin-left:24px;width:90px;opacity:0.5;}@media (max-width:540px){.footer-item{font-size:0.7rem;}.logo-container{margin:0 0 0 16px;width:70px;height:40px;}}@media (max-width:380px){.footer-item{font-size:0.65rem;}.logo-container{margin:0 0 0 8px;height:24px;}}}"], props => props.dark ? props.theme.palette.grey[900] : '#dee2e7', _ref => {
92
+ let {
93
+ theme,
94
+ dark
95
+ } = _ref;
96
+ return dark ? theme.palette.grey[500] : theme.palette.grey[900];
97
+ });
@@ -13,7 +13,7 @@ var _Box = _interopRequireDefault(require("@mui/material/Box"));
13
13
 
14
14
  var _Container = _interopRequireDefault(require("@mui/material/Container"));
15
15
 
16
- var _useTheme = _interopRequireDefault(require("@mui/styles/useTheme"));
16
+ var _styles = require("@mui/material/styles");
17
17
 
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
19
 
@@ -47,7 +47,7 @@ function Header(_ref) {
47
47
  } = _ref,
48
48
  rest = _objectWithoutProperties(_ref, _excluded);
49
49
 
50
- const theme = (0, _useTheme.default)();
50
+ const theme = (0, _styles.useTheme)();
51
51
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, _objectSpread(_objectSpread({}, rest), {}, {
52
52
  $theme: theme,
53
53
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Container.default, {
@@ -15,7 +15,7 @@ var _Menu = _interopRequireDefault(require("@mui/icons-material/Menu"));
15
15
 
16
16
  var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
17
17
 
18
- var _useTheme = _interopRequireDefault(require("@mui/styles/useTheme"));
18
+ var _styles = require("@mui/material/styles");
19
19
 
20
20
  var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
21
21
 
@@ -54,7 +54,7 @@ function ResponsiveHeader(_ref) {
54
54
  } = _ref,
55
55
  rest = _objectWithoutProperties(_ref, _excluded);
56
56
 
57
- const theme = (0, _useTheme.default)();
57
+ const theme = (0, _styles.useTheme)();
58
58
  const isMobile = (0, _useMediaQuery.default)(theme.breakpoints.down('md'));
59
59
  const [drawerOpen, setDrawerOpen] = (0, _react.useState)(false);
60
60
 
@@ -15,7 +15,7 @@ var _reactHelmet = _interopRequireDefault(require("react-helmet"));
15
15
 
16
16
  var _styledComponents = _interopRequireDefault(require("styled-components"));
17
17
 
18
- var _useTheme = _interopRequireDefault(require("@mui/styles/useTheme"));
18
+ var _styles = require("@mui/material/styles");
19
19
 
20
20
  var _Container = _interopRequireDefault(require("@mui/material/Container"));
21
21
 
@@ -77,7 +77,7 @@ function Dashboard(_ref2) {
77
77
  } = _ref2,
78
78
  rest = _objectWithoutProperties(_ref2, _excluded2);
79
79
 
80
- const theme = (0, _useTheme.default)();
80
+ const theme = (0, _styles.useTheme)();
81
81
  const location = (0, _reactRouterDom.useLocation)();
82
82
  const navItems = (0, _react.useMemo)(() => links.map(link => _objectSpread(_objectSpread({}, link), {}, {
83
83
  label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Link, {
@@ -131,9 +131,7 @@ function Dashboard(_ref2) {
131
131
  maxWidth: false
132
132
  }), {}, {
133
133
  children: children
134
- })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {
135
- className: "dashboard-footer"
136
- })]
134
+ })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {})]
137
135
  })]
138
136
  })]
139
137
  }));
@@ -155,7 +153,7 @@ Dashboard.defaultProps = {
155
153
  const Wrapper = _styledComponents.default.div.withConfig({
156
154
  displayName: "dashboard__Wrapper",
157
155
  componentId: "sc-arvc7q-0"
158
- })(["&.dashboard{display:flex;flex-direction:column;height:100vh;}.dashboard-body{overflow:hidden;flex:1;}.dashboard-sidebar{box-sizing:border-box;flex:0 0 auto;width:104px;&:hover{overflow-y:auto;}}.dashboard-main{display:flex;flex-direction:column;overflow:auto;flex:1;}.dashboard-content{flex:1;}.dashboard-footer{padding-left:30px;}"]);
156
+ })(["&.dashboard{display:flex;flex-direction:column;height:100vh;}.dashboard-body{overflow:hidden;flex:1;}.dashboard-sidebar{box-sizing:border-box;flex:0 0 auto;width:104px;&:hover{overflow-y:auto;}}.dashboard-main{display:flex;flex-direction:column;overflow:auto;flex:1;}.dashboard-content{flex:1;}"]);
159
157
 
160
158
  const StyledUxHeader = (0, _styledComponents.default)(_Header.ResponsiveHeader).withConfig({
161
159
  displayName: "dashboard__StyledUxHeader",
@@ -46,7 +46,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
46
46
  const Wrapper = _styledComponents.default.div.withConfig({
47
47
  displayName: "dashboard-legacy__Wrapper",
48
48
  componentId: "sc-z8z10v-0"
49
- })(["&.dashboard{display:flex;flex-direction:column;height:100vh;}.dashboard__body{overflow:hidden;flex:1;}.dashboard__main{display:flex;flex-direction:column;overflow:auto;flex:1;}.dashboard__content{flex:1;}.dashboard__footer{padding-left:30px;}.drawerPaper{position:relative;white-space:nowrap;width:120px;background:", ";box-shadow:2px 16px 10px 0 rgba(0,0,0,", ");border:0;}"], props => props.theme.palette.background.default, props => props.theme.mode === 'light' ? 0.05 : 0.5);
49
+ })(["&.dashboard{display:flex;flex-direction:column;height:100vh;}.dashboard__body{overflow:hidden;flex:1;}.dashboard__main{display:flex;flex-direction:column;overflow:auto;flex:1;}.dashboard__content{flex:1;}.drawerPaper{position:relative;white-space:nowrap;width:120px;background:", ";box-shadow:2px 16px 10px 0 rgba(0,0,0,", ");border:0;}"], props => props.theme.palette.background.default, props => props.theme.mode === 'light' ? 0.05 : 0.5);
50
50
 
51
51
  function Dashboard(_ref) {
52
52
  let {
@@ -126,9 +126,7 @@ function Dashboard(_ref) {
126
126
  maxWidth: isFullWidth ? false : 'lg',
127
127
  className: "dashboard__content",
128
128
  children: children
129
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {
130
- className: "dashboard__footer"
131
- })]
129
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {})]
132
130
  })]
133
131
  })]
134
132
  }));
@@ -11,10 +11,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
- var _withTheme = _interopRequireDefault(require("@mui/styles/withTheme"));
15
-
16
14
  var _reactRouterDom = require("react-router-dom");
17
15
 
16
+ var _styles = require("@mui/material/styles");
17
+
18
18
  var _Button = _interopRequireDefault(require("@mui/material/Button"));
19
19
 
20
20
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
@@ -27,7 +27,7 @@ var _Logo = _interopRequireDefault(require("../../Logo"));
27
27
 
28
28
  var _jsxRuntime = require("react/jsx-runtime");
29
29
 
30
- const _excluded = ["location", "theme", "images", "links", "prefix", "addons", "logo"];
30
+ const _excluded = ["location", "images", "links", "prefix", "addons", "logo"];
31
31
 
32
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
33
 
@@ -44,7 +44,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
44
44
  function Sidebar(_ref) {
45
45
  let {
46
46
  location,
47
- theme,
48
47
  images,
49
48
  links,
50
49
  prefix,
@@ -53,6 +52,8 @@ function Sidebar(_ref) {
53
52
  } = _ref,
54
53
  rest = _objectWithoutProperties(_ref, _excluded);
55
54
 
55
+ const theme = (0, _styles.useTheme)();
56
+
56
57
  const isSelected = (url, name) => {
57
58
  const pattern = new RegExp("/".concat(name));
58
59
  return pattern.test(location.pathname);
@@ -100,7 +101,6 @@ function Sidebar(_ref) {
100
101
 
101
102
  Sidebar.propTypes = {
102
103
  location: _propTypes.default.object.isRequired,
103
- theme: _propTypes.default.object.isRequired,
104
104
  images: _propTypes.default.object.isRequired,
105
105
  links: _propTypes.default.array.isRequired,
106
106
  prefix: _propTypes.default.string,
@@ -122,6 +122,6 @@ const MenuItem = (0, _styledComponents.default)(_Button.default).withConfig({
122
122
  componentId: "sc-gtwxx4-1"
123
123
  })(["&&{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;transition:all 200ms ease-in-out;background:", ";padding:24px 0;border-left:2px solid ", ";border-radius:0;&:hover{background:", ";border-left-color:", ";}.menu-title{margin-top:8px;font-size:12px;font-weight:500;text-align:center;text-transform:capitalize;letter-spacing:normal;width:80%;color:", ";}}"], props => props.selected ? gradient : '', props => props.selected ? _colors.teal.A700 : 'transparent', gradient, _colors.teal.A700, props => props.theme.palette.text.primary);
124
124
 
125
- var _default = (0, _reactRouterDom.withRouter)((0, _withTheme.default)(Sidebar));
125
+ var _default = (0, _reactRouterDom.withRouter)(Sidebar);
126
126
 
127
127
  exports.default = _default;
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
- var _styles = require("@mui/styles");
14
+ var _styles = require("@mui/material/styles");
15
15
 
16
16
  var _Button = _interopRequireDefault(require("@mui/material/Button"));
17
17
 
@@ -12,7 +12,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
12
12
  const NavMenuBase = _styledComponents.default.nav.withConfig({
13
13
  displayName: "style__NavMenuBase",
14
14
  componentId: "sc-2g7isz-0"
15
- })(["background-color:", ";font-size:14px;ul{list-style:none;margin:0;padding:0;}.navmenu-item,.navmenu-sub{display:flex;align-items:center;}a{color:inherit;}.navmenu-item,.navmenu-sub{color:", ";}.navmenu-item--active,.navmenu-item:hover,.navmenu-sub--opened{color:", ";}.navmenu-item{position:relative;cursor:pointer;transition:color 0.2s ease-in-out;a{text-decoration:none;white-space:nowrap;}a::before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:'';}}.navmenu-sub{position:relative;cursor:pointer;}.navmenu-item-icon,.navmenu-sub-icon,.navmenu-sub-expand-icon{display:flex;line-height:1;}.navmenu-item-icon,.navmenu-sub-icon{margin-right:4px;}.navmenu-item-icon > *,.navmenu-sub-icon > *{font-size:1.5em;}.navmenu-sub-expand-icon{margin-left:8px;> *{width:0.8em;height:0.8em;transition:transform 0.2s ease-in-out;}}"], props => props.$bgColor, props => props.$textColor, props => props.$activeTextColor);
15
+ })(["background-color:", ";font-size:14px;ul{list-style:none;margin:0;padding:0;}.navmenu-item,.navmenu-sub{display:flex;align-items:center;}a{color:inherit;}.navmenu-item,.navmenu-sub{color:", ";}.navmenu-item--active,.navmenu-item:hover,.navmenu-sub--opened{color:", ";}.navmenu-item{position:relative;cursor:pointer;transition:color 0.2s ease-in-out;a{text-decoration:none;white-space:nowrap;}a::before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:'';}}.navmenu-sub{position:relative;cursor:pointer;}.navmenu-item-icon,.navmenu-sub-icon,.navmenu-sub-expand-icon{display:flex;line-height:1;}.navmenu-item-icon,.navmenu-sub-icon{margin-right:4px;}.navmenu-item-icon > *,.navmenu-sub-icon > *{width:auto;max-height:20px;font-size:1.5em;}.navmenu-sub-expand-icon{margin-left:8px;> *{width:0.8em;height:0.8em;transition:transform 0.2s ease-in-out;}}"], props => props.$bgColor, props => props.$textColor, props => props.$activeTextColor);
16
16
 
17
17
  const HorizontalStyle = (0, _styledComponents.default)(NavMenuBase).withConfig({
18
18
  displayName: "style__HorizontalStyle",
@@ -11,7 +11,7 @@ exports.InternalServerError = InternalServerError;
11
11
  exports.Maintenance = Maintenance;
12
12
  exports.PageNotFound = PageNotFound;
13
13
 
14
- var _useTheme = _interopRequireDefault(require("@mui/styles/useTheme"));
14
+ var _styles = require("@mui/material/styles");
15
15
 
16
16
  var _Info = _interopRequireDefault(require("@mui/icons-material/Info"));
17
17
 
@@ -161,7 +161,7 @@ function Info(props) {
161
161
  Info.status = 'info';
162
162
 
163
163
  function StyledErrorIcon(props) {
164
- const theme = (0, _useTheme.default)();
164
+ const theme = (0, _styles.useTheme)();
165
165
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CancelRounded.default, _objectSpread({
166
166
  style: {
167
167
  color: theme.palette.error.main,
@@ -171,7 +171,7 @@ function StyledErrorIcon(props) {
171
171
  }
172
172
 
173
173
  function StyledInfoIcon(props) {
174
- const theme = (0, _useTheme.default)();
174
+ const theme = (0, _styles.useTheme)();
175
175
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Info.default, _objectSpread({
176
176
  style: {
177
177
  color: theme.palette.info.main,
package/lib/Tag/index.js CHANGED
@@ -13,7 +13,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
15
15
 
16
- var _useTheme = _interopRequireDefault(require("@mui/styles/useTheme"));
16
+ var _styles = require("@mui/material/styles");
17
17
 
18
18
  var _Util = require("../Util");
19
19
 
@@ -73,7 +73,7 @@ function Tag(props) {
73
73
 
74
74
  const {
75
75
  palette
76
- } = (0, _useTheme.default)();
76
+ } = (0, _styles.useTheme)();
77
77
  const styles = Object.assign({}, types[type] || types.primary, style);
78
78
 
79
79
  if (palette[type]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.1.29",
3
+ "version": "2.1.32",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -52,10 +52,10 @@
52
52
  "react": ">=18.1.0",
53
53
  "react-ga": "^2.7.0"
54
54
  },
55
- "gitHead": "710f8e28829c64030a36e3d9301358834b8937e4",
55
+ "gitHead": "4df5f98bc5e564e6d828c96315899e8c91d59000",
56
56
  "dependencies": {
57
- "@arcblock/icons": "^2.1.29",
58
- "@arcblock/react-hooks": "^2.1.29",
57
+ "@arcblock/icons": "^2.1.32",
58
+ "@arcblock/react-hooks": "^2.1.32",
59
59
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
60
60
  "@emotion/react": "^11.9.0",
61
61
  "@emotion/styled": "^11.8.1",
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import Typography from '@mui/material/Typography';
4
4
  import CircularProgress from '@mui/material/CircularProgress';
5
5
  import Avatar from '@arcblock/did-connect/lib/Avatar';
6
- import { useTheme } from '@mui/styles';
6
+ import { useTheme } from '@mui/material/styles';
7
7
  import useMediaQuery from '@mui/material/useMediaQuery';
8
8
 
9
9
  import Button from '../Button';
@@ -5,7 +5,7 @@ import Portal from '@mui/material/Portal';
5
5
  import Typography from '@mui/material/Typography';
6
6
  import CircularProgress from '@mui/material/CircularProgress';
7
7
  import useMediaQuery from '@mui/material/useMediaQuery';
8
- import useTheme from '@mui/styles/useTheme';
8
+ import { useTheme } from '@mui/material/styles';
9
9
  import Avatar from '@arcblock/did-connect/lib/Avatar';
10
10
 
11
11
  import Icon from '../Icon';
@@ -5,7 +5,7 @@ import MuiDialogContent from '@mui/material/DialogContent';
5
5
  import DialogActions from '@mui/material/DialogActions';
6
6
  import IconButton from '@mui/material/IconButton';
7
7
  import useMediaQuery from '@mui/material/useMediaQuery';
8
- import { useTheme } from '@mui/styles';
8
+ import { useTheme } from '@mui/material/styles';
9
9
  import CloseIcon from '@mui/icons-material/Close';
10
10
 
11
11
  /**
@@ -1,6 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import styled from 'styled-components';
3
- import useTheme from '@mui/styles/useTheme';
3
+ import { useTheme } from '@mui/material/styles';
4
4
  import { red } from '@mui/material/colors';
5
5
  import Button from '../Button';
6
6
 
@@ -2,6 +2,7 @@
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import Typography from '@mui/material/Typography';
5
+ import MuiContainer from '@mui/material/Container';
5
6
 
6
7
  import { mergeProps } from '../Util';
7
8
  import Logo from '../Logo';
@@ -15,16 +16,18 @@ export default function Footer(props) {
15
16
 
16
17
  return (
17
18
  <Container className={className} style={style} dark={dark}>
18
- <Typography component="div" className="footer">
19
- <Typography component="p" className="footer-item">
20
- <span className="footer-copy">Copyright &copy; {copyYear} </span>
21
- <span className="footer-brand">{brand}</span>
19
+ <MuiContainer maxWidth={false}>
20
+ <Typography component="div" className="footer">
21
+ <Typography component="p" className="footer-item">
22
+ <span className="footer-copy">Copyright &copy; {copyYear} </span>
23
+ <span className="footer-brand">{brand}</span>
24
+ </Typography>
25
+ <Typography component="p" className="footer-item" style={{ justifyContent: 'flex-end', flexShrink: 0 }}>
26
+ Powered by
27
+ <Logo mode={dark ? 'light' : 'dark'} layout="horizontal" className="logo-container" />
28
+ </Typography>
22
29
  </Typography>
23
- <Typography component="p" className="footer-item" style={{ justifyContent: 'flex-end', flexShrink: 0 }}>
24
- Powered by
25
- <Logo mode={dark ? 'light' : 'dark'} layout="horizontal" className="logo-container" />
26
- </Typography>
27
- </Typography>
30
+ </MuiContainer>
28
31
  </Container>
29
32
  );
30
33
  }
@@ -62,7 +65,7 @@ const Container = styled.div`
62
65
  justify-content: space-between;
63
66
 
64
67
  .footer-item {
65
- color: ${(props) => props.theme.palette.grey[900]};
68
+ color: ${({ theme, dark }) => (dark ? theme.palette.grey[500] : theme.palette.grey[900])};
66
69
  display: flex;
67
70
  align-items: center;
68
71
  flex-wrap: wrap;
@@ -75,7 +78,7 @@ const Container = styled.div`
75
78
  }
76
79
 
77
80
  .logo-container {
78
- margin: 0 24px;
81
+ margin-left: 24px;
79
82
  width: 90px;
80
83
  opacity: 0.5;
81
84
  }
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import styled from 'styled-components';
3
3
  import Box from '@mui/material/Box';
4
4
  import Container from '@mui/material/Container';
5
- import useTheme from '@mui/styles/useTheme';
5
+ import { useTheme } from '@mui/material/styles';
6
6
 
7
7
  /**
8
8
  * Header 组件
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import MenuIcon from '@mui/icons-material/Menu';
5
5
  import Button from '@mui/material/IconButton';
6
- import useTheme from '@mui/styles/useTheme';
6
+ import { useTheme } from '@mui/material/styles';
7
7
  import useMediaQuery from '@mui/material/useMediaQuery';
8
8
  import Drawer from '@mui/material/Drawer';
9
9
  import Header from './header';
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { withRouter, Link, useLocation, matchPath } from 'react-router-dom';
4
4
  import Helmet from 'react-helmet';
5
5
  import styled from 'styled-components';
6
- import useTheme from '@mui/styles/useTheme';
6
+ import { useTheme } from '@mui/material/styles';
7
7
  import Container from '@mui/material/Container';
8
8
  import Hidden from '@mui/material/Hidden';
9
9
  import Box from '@mui/material/Box';
@@ -69,7 +69,7 @@ function Dashboard({ children, title, headerProps, links, fullWidth, ...rest })
69
69
  <Container className="dashboard-content" {...(fullWidth && { maxWidth: false })}>
70
70
  {children}
71
71
  </Container>
72
- <Footer className="dashboard-footer" />
72
+ <Footer />
73
73
  </Box>
74
74
  </Box>
75
75
  </Wrapper>
@@ -117,9 +117,6 @@ const Wrapper = styled.div`
117
117
  .dashboard-content {
118
118
  flex: 1;
119
119
  }
120
- .dashboard-footer {
121
- padding-left: 30px;
122
- }
123
120
  `;
124
121
 
125
122
  const StyledUxHeader = styled(ResponsiveHeader)`
@@ -30,9 +30,6 @@ const Wrapper = styled.div`
30
30
  .dashboard__content {
31
31
  flex: 1;
32
32
  }
33
- .dashboard__footer {
34
- padding-left: 30px;
35
- }
36
33
 
37
34
  .drawerPaper {
38
35
  position: relative;
@@ -105,7 +102,7 @@ export default function Dashboard({
105
102
  <Container maxWidth={isFullWidth ? false : 'lg'} className="dashboard__content">
106
103
  {children}
107
104
  </Container>
108
- <Footer className="dashboard__footer" />
105
+ <Footer />
109
106
  </Box>
110
107
  </Box>
111
108
  </Wrapper>
@@ -1,9 +1,9 @@
1
1
  import { memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
- import withTheme from '@mui/styles/withTheme';
5
4
 
6
5
  import { withRouter, Link } from 'react-router-dom';
6
+ import { useTheme } from '@mui/material/styles';
7
7
  import Button from '@mui/material/Button';
8
8
  import Typography from '@mui/material/Typography';
9
9
  import { teal } from '@mui/material/colors';
@@ -11,7 +11,8 @@ import { teal } from '@mui/material/colors';
11
11
  import ImageIcon from '../../Icon/image';
12
12
  import Logo from '../../Logo';
13
13
 
14
- function Sidebar({ location, theme, images, links, prefix, addons, logo, ...rest }) {
14
+ function Sidebar({ location, images, links, prefix, addons, logo, ...rest }) {
15
+ const theme = useTheme();
15
16
  const isSelected = (url, name) => {
16
17
  const pattern = new RegExp(`/${name}`);
17
18
  return pattern.test(location.pathname);
@@ -47,7 +48,6 @@ function Sidebar({ location, theme, images, links, prefix, addons, logo, ...rest
47
48
 
48
49
  Sidebar.propTypes = {
49
50
  location: PropTypes.object.isRequired,
50
- theme: PropTypes.object.isRequired,
51
51
  images: PropTypes.object.isRequired,
52
52
  links: PropTypes.array.isRequired,
53
53
  prefix: PropTypes.string,
@@ -117,4 +117,4 @@ const MenuItem = styled(Button)`
117
117
  }
118
118
  `;
119
119
 
120
- export default withRouter(withTheme(Sidebar));
120
+ export default withRouter(Sidebar);
@@ -3,7 +3,7 @@ import { useState, useContext, useRef } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import styled from 'styled-components';
5
5
 
6
- import { useTheme } from '@mui/styles';
6
+ import { useTheme } from '@mui/material/styles';
7
7
  import Button from '@mui/material/Button';
8
8
  import Typography from '@mui/material/Typography';
9
9
  import IconButton from '@mui/material/IconButton';
@@ -63,6 +63,8 @@ const NavMenuBase = styled.nav`
63
63
  }
64
64
  .navmenu-item-icon > *,
65
65
  .navmenu-sub-icon > * {
66
+ width: auto;
67
+ max-height: 20px;
66
68
  font-size: 1.5em;
67
69
  }
68
70
  .navmenu-sub-expand-icon {
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  /* eslint-disable no-param-reassign */
3
- import useTheme from '@mui/styles/useTheme';
3
+ import { useTheme } from '@mui/material/styles';
4
4
  import InfoIcon from '@mui/icons-material/Info';
5
5
  import CancelRoundedIcon from '@mui/icons-material/CancelRounded';
6
6
  import Result from './result';
package/src/Tag/index.js CHANGED
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
 
5
5
  import Typography from '@mui/material/Typography';
6
- import useTheme from '@mui/styles/useTheme';
6
+ import { useTheme } from '@mui/material/styles';
7
7
 
8
8
  import { mergeProps } from '../Util';
9
9
  import colors from '../Colors';