@arcblock/ux 2.9.47 → 2.9.49
Sign up to get free protection for your applications and to get access to all the features.
@@ -123,10 +123,16 @@ function Dashboard({
|
|
123
123
|
children: [/*#__PURE__*/_jsx(Hidden, {
|
124
124
|
mdDown: true,
|
125
125
|
children: !!links?.length && sidebarVisible && /*#__PURE__*/_jsx(Box, {
|
126
|
-
className:
|
127
|
-
children: /*#__PURE__*/_jsx(Sidebar, {
|
126
|
+
className: "dashboard-sidebar",
|
127
|
+
children: _dense ? /*#__PURE__*/_jsx(Sidebar, {
|
128
128
|
links: links,
|
129
129
|
dense: _dense
|
130
|
+
}) : /*#__PURE__*/_jsx(Box, {
|
131
|
+
className: "dashboard-sidebar-container",
|
132
|
+
children: /*#__PURE__*/_jsx(Sidebar, {
|
133
|
+
links: links,
|
134
|
+
dense: _dense
|
135
|
+
})
|
130
136
|
})
|
131
137
|
})
|
132
138
|
}), /*#__PURE__*/_jsxs(Box, {
|
@@ -208,11 +214,8 @@ const Wrapper = styled('div', {
|
|
208
214
|
overflow-y: auto;
|
209
215
|
}
|
210
216
|
}
|
211
|
-
.dashboard-sidebar-
|
212
|
-
|
213
|
-
padding-left: 15px;
|
214
|
-
overflow-y: auto;
|
215
|
-
}
|
217
|
+
.dashboard-sidebar-container {
|
218
|
+
width: ${props => props.sidebarWidth}px;
|
216
219
|
}
|
217
220
|
.dashboard-main {
|
218
221
|
display: flex;
|
@@ -142,10 +142,16 @@ 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:
|
146
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebar.default, {
|
145
|
+
className: "dashboard-sidebar",
|
146
|
+
children: _dense ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebar.default, {
|
147
147
|
links: links,
|
148
148
|
dense: _dense
|
149
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
150
|
+
className: "dashboard-sidebar-container",
|
151
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebar.default, {
|
152
|
+
links: links,
|
153
|
+
dense: _dense
|
154
|
+
})
|
149
155
|
})
|
150
156
|
})
|
151
157
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
@@ -206,7 +212,7 @@ Dashboard.defaultProps = {
|
|
206
212
|
};
|
207
213
|
const Wrapper = (0, _Theme.styled)('div', {
|
208
214
|
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-sidebar-
|
215
|
+
})(_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-container {\n width: ", "px;\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.sidebarWidth, props => props.theme.breakpoints.up('md'), props => props.sidebarWidth - 24 * 2);
|
210
216
|
const StyledUxHeader = (0, _Theme.styled)(_Header.ResponsiveHeader)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .header-container {\n max-width: 100%;\n }\n"])));
|
211
217
|
|
212
218
|
// 兼容旧版 dashboard
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.9.
|
3
|
+
"version": "2.9.49",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -358,12 +358,12 @@
|
|
358
358
|
"@mui/material": "^5.15.0",
|
359
359
|
"react": ">=18.2.0"
|
360
360
|
},
|
361
|
-
"gitHead": "
|
361
|
+
"gitHead": "d4579f3d5648e2f935e5efe75380e574e119cc73",
|
362
362
|
"dependencies": {
|
363
363
|
"@arcblock/did-motif": "^1.1.13",
|
364
|
-
"@arcblock/icons": "^2.9.
|
365
|
-
"@arcblock/nft-display": "^2.9.
|
366
|
-
"@arcblock/react-hooks": "^2.9.
|
364
|
+
"@arcblock/icons": "^2.9.49",
|
365
|
+
"@arcblock/nft-display": "^2.9.49",
|
366
|
+
"@arcblock/react-hooks": "^2.9.49",
|
367
367
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
368
368
|
"@emotion/react": "^11.10.4",
|
369
369
|
"@emotion/styled": "^11.10.4",
|
@@ -94,8 +94,14 @@ 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=
|
98
|
-
|
97
|
+
<Box className="dashboard-sidebar">
|
98
|
+
{_dense ? (
|
99
|
+
<Sidebar links={links} dense={_dense} />
|
100
|
+
) : (
|
101
|
+
<Box className="dashboard-sidebar-container">
|
102
|
+
<Sidebar links={links} dense={_dense} />
|
103
|
+
</Box>
|
104
|
+
)}
|
99
105
|
</Box>
|
100
106
|
)}
|
101
107
|
</Hidden>
|
@@ -175,11 +181,8 @@ const Wrapper = styled('div', {
|
|
175
181
|
overflow-y: auto;
|
176
182
|
}
|
177
183
|
}
|
178
|
-
.dashboard-sidebar-
|
179
|
-
|
180
|
-
padding-left: 15px;
|
181
|
-
overflow-y: auto;
|
182
|
-
}
|
184
|
+
.dashboard-sidebar-container {
|
185
|
+
width: ${(props) => props.sidebarWidth}px;
|
183
186
|
}
|
184
187
|
.dashboard-main {
|
185
188
|
display: flex;
|