@arcblock/ux 2.9.46 → 2.9.48
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,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;
|
package/es/Theme/theme.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// https://app.zeplin.io/styleguide/5d1436f1e97c2156f49c0725/colors
|
|
2
2
|
import { createTheme as _createTheme, responsiveFontSizes } from '@mui/material/styles';
|
|
3
3
|
// 为了避免加载全量的字体导致打包后体积太大,目前只选择了 latin 语系的字体
|
|
4
|
+
import '@fontsource/inter/latin-300.css';
|
|
4
5
|
import '@fontsource/inter/latin-400.css';
|
|
5
6
|
import '@fontsource/inter/latin-500.css';
|
|
6
|
-
import '@fontsource/inter/latin-600.css';
|
|
7
7
|
import '@fontsource/inter/latin-700.css';
|
|
8
|
-
import '@fontsource/inter/latin-
|
|
8
|
+
import '@fontsource/inter/latin-ext-300.css';
|
|
9
9
|
import '@fontsource/inter/latin-ext-400.css';
|
|
10
10
|
import '@fontsource/inter/latin-ext-500.css';
|
|
11
|
-
import '@fontsource/inter/latin-ext-600.css';
|
|
12
11
|
import '@fontsource/inter/latin-ext-700.css';
|
|
13
|
-
import '@fontsource/inter/latin-ext-900.css';
|
|
14
12
|
import colors from '../Colors';
|
|
15
13
|
const muiDarkTheme = _createTheme({
|
|
16
14
|
palette: {
|
|
@@ -60,11 +58,6 @@ export const create = ({
|
|
|
60
58
|
gray: mode === 'light' ? colors.grey[500] : colors.grey[300]
|
|
61
59
|
},
|
|
62
60
|
fontFamily: ['Inter', 'Avenir', '-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(','),
|
|
63
|
-
// 按最新设计规范, 只使用 400/700
|
|
64
|
-
fontWeightLight: 400,
|
|
65
|
-
fontWeightRegular: 400,
|
|
66
|
-
fontWeightMedium: 700,
|
|
67
|
-
fontWeightBold: 700,
|
|
68
61
|
// button 默认使用粗体
|
|
69
62
|
button: {
|
|
70
63
|
fontWeight: 700
|
|
@@ -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/lib/Theme/theme.js
CHANGED
|
@@ -5,16 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createTheme = exports.create = void 0;
|
|
7
7
|
var _styles = require("@mui/material/styles");
|
|
8
|
+
require("@fontsource/inter/latin-300.css");
|
|
8
9
|
require("@fontsource/inter/latin-400.css");
|
|
9
10
|
require("@fontsource/inter/latin-500.css");
|
|
10
|
-
require("@fontsource/inter/latin-600.css");
|
|
11
11
|
require("@fontsource/inter/latin-700.css");
|
|
12
|
-
require("@fontsource/inter/latin-
|
|
12
|
+
require("@fontsource/inter/latin-ext-300.css");
|
|
13
13
|
require("@fontsource/inter/latin-ext-400.css");
|
|
14
14
|
require("@fontsource/inter/latin-ext-500.css");
|
|
15
|
-
require("@fontsource/inter/latin-ext-600.css");
|
|
16
15
|
require("@fontsource/inter/latin-ext-700.css");
|
|
17
|
-
require("@fontsource/inter/latin-ext-900.css");
|
|
18
16
|
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
19
17
|
const _excluded = ["mode", "pageWidth", "palette", "typography", "overrides"]; // https://app.zeplin.io/styleguide/5d1436f1e97c2156f49c0725/colors
|
|
20
18
|
// 为了避免加载全量的字体导致打包后体积太大,目前只选择了 latin 语系的字体
|
|
@@ -74,11 +72,6 @@ const create = exports.create = function create() {
|
|
|
74
72
|
gray: mode === 'light' ? _Colors.default.grey[500] : _Colors.default.grey[300]
|
|
75
73
|
},
|
|
76
74
|
fontFamily: ['Inter', 'Avenir', '-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(','),
|
|
77
|
-
// 按最新设计规范, 只使用 400/700
|
|
78
|
-
fontWeightLight: 400,
|
|
79
|
-
fontWeightRegular: 400,
|
|
80
|
-
fontWeightMedium: 700,
|
|
81
|
-
fontWeightBold: 700,
|
|
82
75
|
// button 默认使用粗体
|
|
83
76
|
button: {
|
|
84
77
|
fontWeight: 700
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/ux",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.48",
|
|
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": "0d53eb8454f7efc849119980227105d8bb3ee7ea",
|
|
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.48",
|
|
365
|
+
"@arcblock/nft-display": "^2.9.48",
|
|
366
|
+
"@arcblock/react-hooks": "^2.9.48",
|
|
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;
|
package/src/Theme/theme.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// https://app.zeplin.io/styleguide/5d1436f1e97c2156f49c0725/colors
|
|
2
2
|
import { createTheme as _createTheme, responsiveFontSizes } from '@mui/material/styles';
|
|
3
3
|
// 为了避免加载全量的字体导致打包后体积太大,目前只选择了 latin 语系的字体
|
|
4
|
+
import '@fontsource/inter/latin-300.css';
|
|
4
5
|
import '@fontsource/inter/latin-400.css';
|
|
5
6
|
import '@fontsource/inter/latin-500.css';
|
|
6
|
-
import '@fontsource/inter/latin-600.css';
|
|
7
7
|
import '@fontsource/inter/latin-700.css';
|
|
8
|
-
import '@fontsource/inter/latin-
|
|
8
|
+
import '@fontsource/inter/latin-ext-300.css';
|
|
9
9
|
import '@fontsource/inter/latin-ext-400.css';
|
|
10
10
|
import '@fontsource/inter/latin-ext-500.css';
|
|
11
|
-
import '@fontsource/inter/latin-ext-600.css';
|
|
12
11
|
import '@fontsource/inter/latin-ext-700.css';
|
|
13
|
-
import '@fontsource/inter/latin-ext-900.css';
|
|
14
12
|
|
|
15
13
|
import colors from '../Colors';
|
|
16
14
|
|
|
@@ -75,11 +73,6 @@ export const create = ({ mode = 'light', pageWidth = 'md', palette, typography,
|
|
|
75
73
|
'"Segoe UI Emoji"',
|
|
76
74
|
'"Segoe UI Symbol"',
|
|
77
75
|
].join(','),
|
|
78
|
-
// 按最新设计规范, 只使用 400/700
|
|
79
|
-
fontWeightLight: 400,
|
|
80
|
-
fontWeightRegular: 400,
|
|
81
|
-
fontWeightMedium: 700,
|
|
82
|
-
fontWeightBold: 700,
|
|
83
76
|
// button 默认使用粗体
|
|
84
77
|
button: {
|
|
85
78
|
fontWeight: 700,
|