@arcblock/ux 2.9.43 → 2.9.45

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.
@@ -123,7 +123,7 @@ function Dashboard({
123
123
  children: [/*#__PURE__*/_jsx(Hidden, {
124
124
  mdDown: true,
125
125
  children: !!links?.length && sidebarVisible && /*#__PURE__*/_jsx(Box, {
126
- className: "dashboard-sidebar",
126
+ className: ['dashboard-sidebar', _dense ? '' : 'dashboard-sidebar-padding'].join(' '),
127
127
  children: /*#__PURE__*/_jsx(Sidebar, {
128
128
  links: links,
129
129
  dense: _dense
@@ -208,6 +208,12 @@ const Wrapper = styled('div', {
208
208
  overflow-y: auto;
209
209
  }
210
210
  }
211
+ .dashboard-sidebar-padding {
212
+ &:hover {
213
+ padding-left: 15px;
214
+ overflow-y: auto;
215
+ }
216
+ }
211
217
  .dashboard-main {
212
218
  display: flex;
213
219
  flex-direction: column;
@@ -63,12 +63,11 @@ export default function LocaleSelector(props) {
63
63
  return /*#__PURE__*/_jsx(IconifyIcon, {
64
64
  icon: LanguageIcon,
65
65
  fontSize: size,
66
- color: theme.palette.text.secondary,
67
66
  style: {
68
67
  transform: 'scale(1.10)'
69
68
  }
70
69
  });
71
- }, [Icon, theme?.palette?.text?.secondary, size]);
70
+ }, [Icon, size]);
72
71
  return /*#__PURE__*/_jsxs(Div, {
73
72
  component: "div",
74
73
  dark: dark,
@@ -142,7 +142,7 @@ function Dashboard(_ref2) {
142
142
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Hidden.default, {
143
143
  mdDown: true,
144
144
  children: !!(links !== null && links !== void 0 && links.length) && sidebarVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
145
- className: "dashboard-sidebar",
145
+ className: ['dashboard-sidebar', _dense ? '' : 'dashboard-sidebar-padding'].join(' '),
146
146
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebar.default, {
147
147
  links: links,
148
148
  dense: _dense
@@ -206,7 +206,7 @@ Dashboard.defaultProps = {
206
206
  };
207
207
  const Wrapper = (0, _Theme.styled)('div', {
208
208
  shouldForwardProp: prop => prop !== 'sidebarWidth'
209
- })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.dashboard {\n display: flex;\n flex-direction: column;\n height: 100vh;\n }\n .dashboard-body {\n overflow: hidden;\n flex: 1;\n }\n .dashboard-sidebar {\n box-sizing: border-box;\n flex: 0 0 auto;\n width: ", "px;\n overflow: hidden;\n &:hover {\n overflow-y: auto;\n }\n }\n .dashboard-main {\n display: flex;\n flex-direction: column;\n overflow: auto;\n flex: 1;\n position: relative;\n }\n .dashboard-content {\n flex: 1;\n }\n &.dashboard-dense {\n .dashboard-header {\n border-bottom: 1px solid #eee;\n }\n .dashboard-sidebar {\n width: 256px;\n border-right: 1px solid #eee;\n }\n }\n ", " {\n .header-logo {\n display: flex;\n justify-content: center;\n /* logo \u4E0E sidebar \u4E2D\u7684 icon \u5782\u76F4\u5BF9\u9F50, sidebarWidth - 24 * 2 */\n min-width: ", "px;\n }\n &.dashboard-dense {\n .header-logo {\n /* dense = true \u65F6 logo \u4E0E sidenav icons \u4E0D\u9700\u8981\u5BF9\u9F50 */\n width: auto;\n }\n }\n }\n"])), props => props.sidebarWidth, props => props.theme.breakpoints.up('md'), props => props.sidebarWidth - 24 * 2);
209
+ })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.dashboard {\n display: flex;\n flex-direction: column;\n height: 100vh;\n }\n .dashboard-body {\n overflow: hidden;\n flex: 1;\n }\n .dashboard-sidebar {\n box-sizing: border-box;\n flex: 0 0 auto;\n width: ", "px;\n overflow: hidden;\n &:hover {\n overflow-y: auto;\n }\n }\n .dashboard-sidebar-padding {\n &:hover {\n padding-left: 15px;\n overflow-y: auto;\n }\n }\n .dashboard-main {\n display: flex;\n flex-direction: column;\n overflow: auto;\n flex: 1;\n position: relative;\n }\n .dashboard-content {\n flex: 1;\n }\n &.dashboard-dense {\n .dashboard-header {\n border-bottom: 1px solid #eee;\n }\n .dashboard-sidebar {\n width: 256px;\n border-right: 1px solid #eee;\n }\n }\n ", " {\n .header-logo {\n display: flex;\n justify-content: center;\n /* logo \u4E0E sidebar \u4E2D\u7684 icon \u5782\u76F4\u5BF9\u9F50, sidebarWidth - 24 * 2 */\n min-width: ", "px;\n }\n &.dashboard-dense {\n .header-logo {\n /* dense = true \u65F6 logo \u4E0E sidenav icons \u4E0D\u9700\u8981\u5BF9\u9F50 */\n width: auto;\n }\n }\n }\n"])), props => props.sidebarWidth, props => props.theme.breakpoints.up('md'), props => props.sidebarWidth - 24 * 2);
210
210
  const StyledUxHeader = (0, _Theme.styled)(_Header.ResponsiveHeader)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .header-container {\n max-width: 100%;\n }\n"])));
211
211
 
212
212
  // 兼容旧版 dashboard
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
29
29
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
30
30
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
31
31
  function LocaleSelector(props) {
32
- var _theme$palette, _theme$palette2, _theme$palette2$text;
32
+ var _theme$palette;
33
33
  const {
34
34
  showText,
35
35
  popperProps,
@@ -81,12 +81,11 @@ function LocaleSelector(props) {
81
81
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, {
82
82
  icon: _language.default,
83
83
  fontSize: size,
84
- color: theme.palette.text.secondary,
85
84
  style: {
86
85
  transform: 'scale(1.10)'
87
86
  }
88
87
  });
89
- }, [Icon, theme === null || theme === void 0 ? void 0 : (_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 ? void 0 : (_theme$palette2$text = _theme$palette2.text) === null || _theme$palette2$text === void 0 ? void 0 : _theme$palette2$text.secondary, size]);
88
+ }, [Icon, size]);
90
89
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Div, _objectSpread(_objectSpread(_objectSpread({
91
90
  component: "div",
92
91
  dark: dark,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.9.43",
3
+ "version": "2.9.45",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -354,12 +354,12 @@
354
354
  "@mui/material": "^5.15.0",
355
355
  "react": ">=18.2.0"
356
356
  },
357
- "gitHead": "2299d749c24452b4cebe4c094d682f9af1f3d9bf",
357
+ "gitHead": "8b32fcb561bce3aafb464458b0e0123668ef6f6f",
358
358
  "dependencies": {
359
359
  "@arcblock/did-motif": "^1.1.13",
360
- "@arcblock/icons": "^2.9.43",
361
- "@arcblock/nft-display": "^2.9.43",
362
- "@arcblock/react-hooks": "^2.9.43",
360
+ "@arcblock/icons": "^2.9.45",
361
+ "@arcblock/nft-display": "^2.9.45",
362
+ "@arcblock/react-hooks": "^2.9.45",
363
363
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
364
364
  "@emotion/react": "^11.10.4",
365
365
  "@emotion/styled": "^11.10.4",
@@ -94,7 +94,7 @@ function Dashboard({ children, title, headerProps, links = [], fullWidth, dense,
94
94
  <Box display="flex" className="dashboard-body">
95
95
  <Hidden mdDown>
96
96
  {!!links?.length && sidebarVisible && (
97
- <Box className="dashboard-sidebar">
97
+ <Box className={['dashboard-sidebar', _dense ? '' : 'dashboard-sidebar-padding'].join(' ')}>
98
98
  <Sidebar links={links} dense={_dense} />
99
99
  </Box>
100
100
  )}
@@ -175,6 +175,12 @@ const Wrapper = styled('div', {
175
175
  overflow-y: auto;
176
176
  }
177
177
  }
178
+ .dashboard-sidebar-padding {
179
+ &:hover {
180
+ padding-left: 15px;
181
+ overflow-y: auto;
182
+ }
183
+ }
178
184
  .dashboard-main {
179
185
  display: flex;
180
186
  flex-direction: column;
@@ -58,15 +58,8 @@ export default function LocaleSelector(props) {
58
58
  return <Icon />;
59
59
  }
60
60
 
61
- return (
62
- <IconifyIcon
63
- icon={LanguageIcon}
64
- fontSize={size}
65
- color={theme.palette.text.secondary}
66
- style={{ transform: 'scale(1.10)' }}
67
- />
68
- );
69
- }, [Icon, theme?.palette?.text?.secondary, size]);
61
+ return <IconifyIcon icon={LanguageIcon} fontSize={size} style={{ transform: 'scale(1.10)' }} />;
62
+ }, [Icon, size]);
70
63
 
71
64
  return (
72
65
  <Div component="div" dark={dark} theme={theme} {...rest} {...handleEventProps}>