@arcblock/ux 2.9.44 → 2.9.45

Sign up to get free protection for your applications and to get access to all the features.
@@ -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;
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.9.44",
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": "07ad8adac9d7bfb9faec224a56f1524bfd5cc5fc",
357
+ "gitHead": "8b32fcb561bce3aafb464458b0e0123668ef6f6f",
358
358
  "dependencies": {
359
359
  "@arcblock/did-motif": "^1.1.13",
360
- "@arcblock/icons": "^2.9.44",
361
- "@arcblock/nft-display": "^2.9.44",
362
- "@arcblock/react-hooks": "^2.9.44",
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;