@arcblock/ux 1.15.25 → 1.15.26
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.
- package/lib/ActivityIndicator/index.js +6 -2
- package/lib/Alert/index.js +9 -7
- package/lib/Badge/index.js +11 -11
- package/lib/Button/wrap.js +12 -12
- package/lib/Colors/index.js +15 -0
- package/lib/Colors/themes/default.js +78 -0
- package/lib/Footer/index.js +1 -1
- package/lib/Icon/index.js +2 -2
- package/lib/Layout/dashboard/sidebar.js +3 -1
- package/lib/Tag/index.js +8 -8
- package/lib/Theme/index.js +42 -53
- package/lib/Wallet/Action.js +2 -2
- package/package.json +4 -4
|
@@ -11,9 +11,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
13
|
|
|
14
|
+
var _green = _interopRequireDefault(require("@material-ui/core/colors/green"));
|
|
15
|
+
|
|
16
|
+
var _blue = _interopRequireDefault(require("@material-ui/core/colors/blue"));
|
|
17
|
+
|
|
14
18
|
var _Logo = _interopRequireDefault(require("../Logo"));
|
|
15
19
|
|
|
16
|
-
var
|
|
20
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
17
21
|
|
|
18
22
|
const _excluded = ["messages", "interval"];
|
|
19
23
|
|
|
@@ -82,4 +86,4 @@ ActivityIndicator.defaultProps = {
|
|
|
82
86
|
const Div = _styledComponents.default.div.withConfig({
|
|
83
87
|
displayName: "ActivityIndicator__Div",
|
|
84
88
|
componentId: "sc-rsk6jb-0"
|
|
85
|
-
})(["&&{padding:20px;width:100%;height:100%;min-height:360px;z-index:100;transition:opacity 0.5s linear;display:flex;align-items:center;flex-direction:column;justify-content:center;}@keyframes orbit{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.pm-loader-text{color:", ";font-size:14px;text-align:center;position:relative;height:70px;-webkit-user-select:none;}.pm-loader-container{width:100%;height:100%;display:flex;align-items:center;flex-direction:column;justify-content:center;flex:1;}.pm-loader-atoms{width:100px;height:100px;display:flex;position:relative;align-items:center;justify-content:center;}.pm-loader-center-atom{top:32px;left:32px;width:32px;height:32px;position:absolute;border-radius:50%;}.pm-loader-orbit-1{top:20px;left:20px;width:56px;height:56px;position:absolute;border-radius:50%;border:1px solid ", ";}.pm-loader-orbit-2{top:8px;left:8px;width:80px;height:80px;border-radius:50%;position:absolute;border:1px solid ", ";}.pm-loader-orbit-3{top:-4px;left:-4px;width:104px;height:104px;position:absolute;border-radius:50%;border:1px solid ", ";}.pm-loader-atom-1{width:7px;height:7px;margin-top:4px;margin-left:4px;border-radius:50%;background-color:", ";transform-origin:24px 24px;animation:orbit 1s infinite;animation-timing-function:linear;-webkit-transform-origin:24px 24px;}.pm-loader-atom-2{width:7px;height:7px;margin-top:8px;margin-left:8px;border-radius:50%;background-color:", ";transform-origin:32px 32px;animation:orbit 2s infinite;animation-timing-function:linear;-webkit-transform-origin:32px 32px;}.pm-loader-atom-3{width:7px;height:7px;margin-top:11px;margin-left:11px;border-radius:50%;background-color:", ";transform-origin:41px 41px;animation:orbit 3s infinite;animation-timing-function:linear;-webkit-transform-origin:41px 41px;}"],
|
|
89
|
+
})(["&&{padding:20px;width:100%;height:100%;min-height:360px;z-index:100;transition:opacity 0.5s linear;display:flex;align-items:center;flex-direction:column;justify-content:center;}@keyframes orbit{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.pm-loader-text{color:", ";font-size:14px;text-align:center;position:relative;height:70px;-webkit-user-select:none;}.pm-loader-container{width:100%;height:100%;display:flex;align-items:center;flex-direction:column;justify-content:center;flex:1;}.pm-loader-atoms{width:100px;height:100px;display:flex;position:relative;align-items:center;justify-content:center;}.pm-loader-center-atom{top:32px;left:32px;width:32px;height:32px;position:absolute;border-radius:50%;}.pm-loader-orbit-1{top:20px;left:20px;width:56px;height:56px;position:absolute;border-radius:50%;border:1px solid ", ";}.pm-loader-orbit-2{top:8px;left:8px;width:80px;height:80px;border-radius:50%;position:absolute;border:1px solid ", ";}.pm-loader-orbit-3{top:-4px;left:-4px;width:104px;height:104px;position:absolute;border-radius:50%;border:1px solid ", ";}.pm-loader-atom-1{width:7px;height:7px;margin-top:4px;margin-left:4px;border-radius:50%;background-color:", ";transform-origin:24px 24px;animation:orbit 1s infinite;animation-timing-function:linear;-webkit-transform-origin:24px 24px;}.pm-loader-atom-2{width:7px;height:7px;margin-top:8px;margin-left:8px;border-radius:50%;background-color:", ";transform-origin:32px 32px;animation:orbit 2s infinite;animation-timing-function:linear;-webkit-transform-origin:32px 32px;}.pm-loader-atom-3{width:7px;height:7px;margin-top:11px;margin-left:11px;border-radius:50%;background-color:", ";transform-origin:41px 41px;animation:orbit 3s infinite;animation-timing-function:linear;-webkit-transform-origin:41px 41px;}"], _Colors.default.grey[900], _green.default[500], _blue.default[800], _Colors.default.grey[900], _green.default[500], _blue.default[800], _Colors.default.grey[900]);
|
package/lib/Alert/index.js
CHANGED
|
@@ -13,12 +13,14 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _blueGrey = _interopRequireDefault(require("@material-ui/core/colors/blueGrey"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
19
19
|
|
|
20
20
|
var _Util = require("../Util");
|
|
21
21
|
|
|
22
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
23
|
+
|
|
22
24
|
const _excluded = ["type", "children", "style", "className", "variant"];
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -30,25 +32,25 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
30
32
|
const types = {
|
|
31
33
|
error: {
|
|
32
34
|
icon: 'exclamation-circle',
|
|
33
|
-
color:
|
|
35
|
+
color: _Colors.default.error.main,
|
|
34
36
|
borderColor: '#e35b54',
|
|
35
37
|
backgroundColor: 'rgba(227, 91, 84, 0.2)'
|
|
36
38
|
},
|
|
37
39
|
warning: {
|
|
38
40
|
icon: 'exclamation-triangle',
|
|
39
|
-
color:
|
|
41
|
+
color: _Colors.default.warning.main,
|
|
40
42
|
borderColor: '#f7d040',
|
|
41
43
|
backgroundColor: 'rgba(247, 208, 64, 0.2)'
|
|
42
44
|
},
|
|
43
45
|
success: {
|
|
44
46
|
icon: 'check-circle',
|
|
45
|
-
color:
|
|
47
|
+
color: _Colors.default.success.main,
|
|
46
48
|
borderColor: '#89ddd9',
|
|
47
49
|
backgroundColor: 'rgba(137, 221, 217, 0.2)'
|
|
48
50
|
},
|
|
49
51
|
tip: {
|
|
50
52
|
icon: 'info-circle',
|
|
51
|
-
color:
|
|
53
|
+
color: _Colors.default.grey[500],
|
|
52
54
|
borderColor: '#222222',
|
|
53
55
|
backgroundColor: '#EEEEEE'
|
|
54
56
|
}
|
|
@@ -73,7 +75,7 @@ const Alert = props => {
|
|
|
73
75
|
borderColor
|
|
74
76
|
} = types[type] || types.success;
|
|
75
77
|
const styles = Object.assign({
|
|
76
|
-
color:
|
|
78
|
+
color: _blueGrey.default[500],
|
|
77
79
|
backgroundColor: variant === 'border' ? backgroundColor : 'transparent',
|
|
78
80
|
borderLeft: variant === 'border' ? "5px solid ".concat(borderColor) : 'none'
|
|
79
81
|
}, style);
|
package/lib/Badge/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
17
17
|
|
|
18
18
|
var _Util = require("../Util");
|
|
19
19
|
|
|
@@ -27,24 +27,24 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
27
27
|
|
|
28
28
|
const types = {
|
|
29
29
|
error: {
|
|
30
|
-
color:
|
|
31
|
-
backgroundColor:
|
|
30
|
+
color: _Colors.default.common.white,
|
|
31
|
+
backgroundColor: _Colors.default.error.main
|
|
32
32
|
},
|
|
33
33
|
warning: {
|
|
34
|
-
color:
|
|
35
|
-
backgroundColor:
|
|
34
|
+
color: _Colors.default.common.white,
|
|
35
|
+
backgroundColor: _Colors.default.warning.main
|
|
36
36
|
},
|
|
37
37
|
success: {
|
|
38
|
-
color:
|
|
39
|
-
backgroundColor:
|
|
38
|
+
color: _Colors.default.common.white,
|
|
39
|
+
backgroundColor: _Colors.default.success.main
|
|
40
40
|
},
|
|
41
41
|
primary: {
|
|
42
|
-
color:
|
|
43
|
-
backgroundColor:
|
|
42
|
+
color: _Colors.default.common.white,
|
|
43
|
+
backgroundColor: _Colors.default.primary.main
|
|
44
44
|
},
|
|
45
45
|
reverse: {
|
|
46
|
-
color:
|
|
47
|
-
backgroundColor:
|
|
46
|
+
color: _Colors.default.common.white,
|
|
47
|
+
backgroundColor: _Colors.default.grey[900]
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
package/lib/Button/wrap.js
CHANGED
|
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _Spinner = _interopRequireDefault(require("../Spinner"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
15
15
|
|
|
16
16
|
var _Util = require("../Util");
|
|
17
17
|
|
|
@@ -59,31 +59,31 @@ function _default(BaseComponent) {
|
|
|
59
59
|
|
|
60
60
|
if (rest.color === 'danger') {
|
|
61
61
|
if (rest.variant === 'contained') {
|
|
62
|
-
styles.backgroundColor =
|
|
63
|
-
styles.color =
|
|
62
|
+
styles.backgroundColor = _Colors.default.error.main;
|
|
63
|
+
styles.color = _Colors.default.common.white;
|
|
64
64
|
} else {
|
|
65
|
-
styles.borderColor =
|
|
66
|
-
styles.color =
|
|
65
|
+
styles.borderColor = _Colors.default.error.main;
|
|
66
|
+
styles.color = _Colors.default.error.main;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
if (!rest.color || rest.color === 'default') {
|
|
71
71
|
if (rest.variant === 'contained') {
|
|
72
|
-
styles.backgroundColor = isDisabled ?
|
|
73
|
-
styles.color =
|
|
72
|
+
styles.backgroundColor = isDisabled ? _Colors.default.grey[400] : _Colors.default.grey[900];
|
|
73
|
+
styles.color = _Colors.default.common.white;
|
|
74
74
|
} else {
|
|
75
|
-
styles.borderColor = isDisabled ?
|
|
76
|
-
styles.color = isDisabled ?
|
|
75
|
+
styles.borderColor = isDisabled ? _Colors.default.grey[400] : _Colors.default.grey[900];
|
|
76
|
+
styles.color = isDisabled ? _Colors.default.grey[400] : _Colors.default.grey[900];
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
if (rest.color === 'reverse') {
|
|
81
81
|
if (rest.variant === 'contained') {
|
|
82
82
|
styles.backgroundColor = 'rgba(255, 255, 255, 0.9)';
|
|
83
|
-
styles.color =
|
|
83
|
+
styles.color = _Colors.default.grey[900];
|
|
84
84
|
} else {
|
|
85
|
-
styles.borderColor =
|
|
86
|
-
styles.color =
|
|
85
|
+
styles.borderColor = _Colors.default.grey[900];
|
|
86
|
+
styles.color = _Colors.default.grey[900];
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _default.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _default = _interopRequireDefault(require("./themes/default"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 默认 colors, ABT 系列
|
|
10
|
+
*
|
|
11
|
+
* - colors object 结构是在 mui theme#palette object 基础上调整后的结构
|
|
12
|
+
* - 色值在 mui default theme 基础上将 figma 中常用的 colors 进行覆盖
|
|
13
|
+
* - 扩展一些常用色值 (如 DID 系列)
|
|
14
|
+
* - figma: https://www.figma.com/file/1qHyMF137EXOQpSFVByszG/UX-Library?node-id=295%3A1518
|
|
15
|
+
*/
|
|
16
|
+
const colors = {
|
|
17
|
+
common: {
|
|
18
|
+
black: '#000',
|
|
19
|
+
white: '#fff'
|
|
20
|
+
},
|
|
21
|
+
primary: {
|
|
22
|
+
main: '#4F6AF6'
|
|
23
|
+
},
|
|
24
|
+
// override
|
|
25
|
+
secondary: {
|
|
26
|
+
main: '#31AB86'
|
|
27
|
+
},
|
|
28
|
+
// override
|
|
29
|
+
error: {
|
|
30
|
+
main: '#F16E6E'
|
|
31
|
+
},
|
|
32
|
+
// override
|
|
33
|
+
warning: {
|
|
34
|
+
main: '#DE9E37'
|
|
35
|
+
},
|
|
36
|
+
// override
|
|
37
|
+
info: {
|
|
38
|
+
main: '#0775F8'
|
|
39
|
+
},
|
|
40
|
+
// override
|
|
41
|
+
success: {
|
|
42
|
+
main: '#34BE74'
|
|
43
|
+
},
|
|
44
|
+
// override
|
|
45
|
+
grey: {
|
|
46
|
+
50: '#fafafa',
|
|
47
|
+
100: '#f5f5f5',
|
|
48
|
+
200: '#eeeeee',
|
|
49
|
+
300: '#e0e0e0',
|
|
50
|
+
400: '#bdbdbd',
|
|
51
|
+
500: '#9e9e9e',
|
|
52
|
+
600: '#757575',
|
|
53
|
+
700: '#616161',
|
|
54
|
+
800: '#424242',
|
|
55
|
+
900: '#212121',
|
|
56
|
+
A100: '#d5d5d5',
|
|
57
|
+
A200: '#aaaaaa',
|
|
58
|
+
A400: '#303030',
|
|
59
|
+
A700: '#616161'
|
|
60
|
+
},
|
|
61
|
+
text: {
|
|
62
|
+
primary: 'rgba(0, 0, 0, 0.87)',
|
|
63
|
+
secondary: 'rgba(0, 0, 0, 0.54)',
|
|
64
|
+
disabled: 'rgba(0, 0, 0, 0.38)',
|
|
65
|
+
hint: 'rgba(0, 0, 0, 0.38)'
|
|
66
|
+
},
|
|
67
|
+
divider: 'rgba(0, 0, 0, 0.12)',
|
|
68
|
+
background: {
|
|
69
|
+
default: '#fff'
|
|
70
|
+
},
|
|
71
|
+
// 扩展色值, 适用于 did 相关的组件, 如果某些产品整体风格是 did 系列, 可以扩展出一个 did 系列的 theme
|
|
72
|
+
did: {
|
|
73
|
+
primary: '#4598FA',
|
|
74
|
+
secondary: '#49C3AD'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var _default = colors;
|
|
78
|
+
exports.default = _default;
|
package/lib/Footer/index.js
CHANGED
|
@@ -76,4 +76,4 @@ Footer.defaultProps = {
|
|
|
76
76
|
const Container = _styledComponents.default.div.withConfig({
|
|
77
77
|
displayName: "Footer__Container",
|
|
78
78
|
componentId: "sc-1qpifuv-0"
|
|
79
|
-
})(["margin-top:64px;padding:24px 0 32px;border-top:1px solid ", ";box-sizing:border-box;width:100%;.footer{display:flex;align-items:center;justify-content:space-between;@media (max-width:540px){flex-direction:column;align-items:flex-start;justify-content:flex-start;}.footer-item{color:", ";display:flex;align-items:center;flex-wrap:wrap;font-size:0.9rem;}.footer-brand{margin-left:8px;margin-right:8px;}}"], props => props.dark ? props.theme.
|
|
79
|
+
})(["margin-top:64px;padding:24px 0 32px;border-top:1px solid ", ";box-sizing:border-box;width:100%;.footer{display:flex;align-items:center;justify-content:space-between;@media (max-width:540px){flex-direction:column;align-items:flex-start;justify-content:flex-start;}.footer-item{color:", ";display:flex;align-items:center;flex-wrap:wrap;font-size:0.9rem;}.footer-brand{margin-left:8px;margin-right:8px;}}"], props => props.dark ? props.theme.palette.grey[900] : '#dee2e7', props => props.theme.palette.grey[900]);
|
package/lib/Icon/index.js
CHANGED
|
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
15
15
|
|
|
16
16
|
const _excluded = ["name", "color", "size", "variant", "rounded", "style", "className", "forwardedRef"];
|
|
17
17
|
|
|
@@ -73,7 +73,7 @@ Icon.propTypes = {
|
|
|
73
73
|
Icon.defaultProps = {
|
|
74
74
|
rounded: false,
|
|
75
75
|
variant: 'light',
|
|
76
|
-
color:
|
|
76
|
+
color: _Colors.default.grey[900],
|
|
77
77
|
className: '',
|
|
78
78
|
size: 24,
|
|
79
79
|
style: {}
|
|
@@ -19,6 +19,8 @@ var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
|
19
19
|
|
|
20
20
|
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
21
21
|
|
|
22
|
+
var _teal = _interopRequireDefault(require("@material-ui/core/colors/teal"));
|
|
23
|
+
|
|
22
24
|
var _image = _interopRequireDefault(require("../../Icon/image"));
|
|
23
25
|
|
|
24
26
|
var _Logo = _interopRequireDefault(require("../../Logo"));
|
|
@@ -105,7 +107,7 @@ const gradient = 'linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255
|
|
|
105
107
|
const MenuItem = (0, _styledComponents.default)(_Button.default).withConfig({
|
|
106
108
|
displayName: "sidebar__MenuItem",
|
|
107
109
|
componentId: "sc-gaosgy-1"
|
|
108
|
-
})(["&&{display:block;width:100%;transition:all 200ms ease-in-out;background:", ";padding:24px 0;border-left:2px solid ", ";&: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%;}.MuiButton-label{display:flex;flex-direction:column;justify-content:center;align-items:center;}}"], props => props.selected ? gradient : '', props => props.selected ?
|
|
110
|
+
})(["&&{display:block;width:100%;transition:all 200ms ease-in-out;background:", ";padding:24px 0;border-left:2px solid ", ";&: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%;}.MuiButton-label{display:flex;flex-direction:column;justify-content:center;align-items:center;}}"], props => props.selected ? gradient : '', props => props.selected ? _teal.default.A700 : 'transparent', gradient, _teal.default.A700);
|
|
109
111
|
|
|
110
112
|
var _default = (0, _reactRouterDom.withRouter)((0, _withTheme.default)(Sidebar));
|
|
111
113
|
|
package/lib/Tag/index.js
CHANGED
|
@@ -13,10 +13,10 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
15
15
|
|
|
16
|
-
var _Theme = require("../Theme");
|
|
17
|
-
|
|
18
16
|
var _Util = require("../Util");
|
|
19
17
|
|
|
18
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
19
|
+
|
|
20
20
|
const _excluded = ["type", "content", "children", "style", "className", "forwardedRef"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -27,24 +27,24 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
27
27
|
|
|
28
28
|
const types = {
|
|
29
29
|
error: {
|
|
30
|
-
color:
|
|
30
|
+
color: _Colors.default.error.main,
|
|
31
31
|
backgroundColor: 'rgba(227, 91, 84, 0.2)'
|
|
32
32
|
},
|
|
33
33
|
warning: {
|
|
34
|
-
color:
|
|
34
|
+
color: _Colors.default.warning.main,
|
|
35
35
|
backgroundColor: 'rgba(247, 208, 64, 0.2)'
|
|
36
36
|
},
|
|
37
37
|
success: {
|
|
38
|
-
color:
|
|
38
|
+
color: _Colors.default.success.main,
|
|
39
39
|
backgroundColor: '#eafbd9'
|
|
40
40
|
},
|
|
41
41
|
primary: {
|
|
42
|
-
color:
|
|
42
|
+
color: _Colors.default.primary.main,
|
|
43
43
|
backgroundColor: '#ECEFFF'
|
|
44
44
|
},
|
|
45
45
|
reverse: {
|
|
46
|
-
color:
|
|
47
|
-
backgroundColor:
|
|
46
|
+
color: '#fff',
|
|
47
|
+
backgroundColor: '#222'
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
package/lib/Theme/index.js
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.create =
|
|
6
|
+
exports.create = void 0;
|
|
7
7
|
|
|
8
8
|
var _styles = require("@material-ui/core/styles");
|
|
9
9
|
|
|
10
10
|
var _responsiveFontSizes = _interopRequireDefault(require("./responsiveFontSizes"));
|
|
11
11
|
|
|
12
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
13
|
+
|
|
12
14
|
const _excluded = ["mode", "pageWidth", "palette", "typography", "overrides"];
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -23,29 +25,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
23
25
|
|
|
24
26
|
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; }
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
dark: '#4A707C',
|
|
29
|
-
gray: '#222222',
|
|
30
|
-
minor: '#9B9B9B',
|
|
31
|
-
darkText: '#DCDCDC',
|
|
32
|
-
background: '#F7F8F8',
|
|
33
|
-
yellow: '#FFCF71',
|
|
34
|
-
green: '#44cdc6',
|
|
35
|
-
red: '#D0021B',
|
|
36
|
-
blue: '#4E6AF6',
|
|
37
|
-
primary: '#222222',
|
|
38
|
-
black: '#222222',
|
|
39
|
-
secondary: '#44cdc6',
|
|
40
|
-
mint: '#44cdc6',
|
|
41
|
-
textSecondary: '#4A4A4A',
|
|
42
|
-
active: '#5b9025',
|
|
43
|
-
danger: '#D0021B',
|
|
44
|
-
lightGrey: '#BCBCBC'
|
|
45
|
-
}; // https://material-ui.com/customization/default-theme/
|
|
46
|
-
|
|
47
|
-
exports.colors = colors;
|
|
48
|
-
|
|
28
|
+
// https://material-ui.com/customization/default-theme/
|
|
29
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
49
30
|
const create = function create() {
|
|
50
31
|
let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
51
32
|
{
|
|
@@ -59,35 +40,22 @@ const create = function create() {
|
|
|
59
40
|
|
|
60
41
|
const theme = (0, _styles.createTheme)(_objectSpread({
|
|
61
42
|
themeName: 'ArcBlock',
|
|
62
|
-
palette: Object.assign({
|
|
63
|
-
primary: {
|
|
64
|
-
main: colors.blue,
|
|
65
|
-
contrastText: colors.white
|
|
66
|
-
},
|
|
67
|
-
secondary: {
|
|
68
|
-
main: colors.mint,
|
|
69
|
-
contrastText: colors.white
|
|
70
|
-
},
|
|
71
|
-
danger: {
|
|
72
|
-
main: colors.danger,
|
|
73
|
-
contrastText: colors.white
|
|
74
|
-
},
|
|
75
|
-
text: {
|
|
76
|
-
primary: '#404040',
|
|
77
|
-
contrast: colors.white
|
|
78
|
-
},
|
|
43
|
+
palette: Object.assign(_objectSpread(_objectSpread({}, _Colors.default), {}, {
|
|
79
44
|
background: {
|
|
80
|
-
paper: mode === 'light' ?
|
|
81
|
-
default: mode === 'light' ?
|
|
45
|
+
paper: mode === 'light' ? _Colors.default.common.white : _Colors.default.grey[900],
|
|
46
|
+
default: mode === 'light' ? _Colors.default.background.default : _Colors.default.grey[900]
|
|
82
47
|
},
|
|
83
48
|
type: mode
|
|
84
|
-
}, palette || {}),
|
|
49
|
+
}), palette || {}),
|
|
85
50
|
typography: Object.assign({
|
|
86
51
|
useNextVariants: true,
|
|
87
52
|
color: {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
53
|
+
// 此处 #222222 必须硬编码, layout/sidebar.js -> Icon/image 加载图片时 color 会影响加载路径
|
|
54
|
+
// TODO: 此处硬编码的色值后面需要改为 colors.grey[900],
|
|
55
|
+
// 或者如果可以的话直接删掉 typography#color, 文本颜色建议使用 theme.palette.text 中的色值?
|
|
56
|
+
// layout 组件建议重构, sidebar 中建议使用 icon 替换 img (#366)
|
|
57
|
+
main: mode === 'light' ? '#222222' : _Colors.default.common.white,
|
|
58
|
+
gray: mode === 'light' ? _Colors.default.grey[500] : _Colors.default.grey[300]
|
|
91
59
|
},
|
|
92
60
|
fontSize: 16,
|
|
93
61
|
fontFamily: ['Avenir', '-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(',')
|
|
@@ -106,7 +74,7 @@ const create = function create() {
|
|
|
106
74
|
},
|
|
107
75
|
MuiToolbar: {
|
|
108
76
|
root: {
|
|
109
|
-
background: mode === 'light' ?
|
|
77
|
+
background: mode === 'light' ? _Colors.default.background.default : _Colors.default.grey[900]
|
|
110
78
|
}
|
|
111
79
|
},
|
|
112
80
|
MuiTableCell: {
|
|
@@ -119,10 +87,10 @@ const create = function create() {
|
|
|
119
87
|
},
|
|
120
88
|
head: {
|
|
121
89
|
textTransform: 'uppercase',
|
|
122
|
-
color: mode === 'light' ?
|
|
90
|
+
color: mode === 'light' ? _Colors.default.grey[900] : _Colors.default.grey[300]
|
|
123
91
|
},
|
|
124
92
|
body: {
|
|
125
|
-
color: mode === 'light' ?
|
|
93
|
+
color: mode === 'light' ? _Colors.default.grey[900] : _Colors.default.grey[300]
|
|
126
94
|
}
|
|
127
95
|
},
|
|
128
96
|
MuiChip: {
|
|
@@ -145,15 +113,36 @@ const create = function create() {
|
|
|
145
113
|
},
|
|
146
114
|
MuiTypography: {
|
|
147
115
|
body1: {
|
|
148
|
-
color: mode === 'light' ?
|
|
116
|
+
color: mode === 'light' ? _Colors.default.grey[900] : _Colors.default.grey[300]
|
|
149
117
|
},
|
|
150
118
|
body2: {
|
|
151
|
-
color: mode === 'light' ?
|
|
119
|
+
color: mode === 'light' ? _Colors.default.grey[900] : _Colors.default.grey[300]
|
|
152
120
|
}
|
|
153
121
|
}
|
|
154
122
|
}, overrides || {}),
|
|
155
123
|
pageWidth,
|
|
156
|
-
colors,
|
|
124
|
+
// TODO: 过时的 colors, 需要各项目负责人检查项目中是否使用 "theme.colors", 如果有需要清除,
|
|
125
|
+
// 可以从 Colors 模块/theme.palette/mui colors 中取值
|
|
126
|
+
colors: {
|
|
127
|
+
white: '#FFFFFF',
|
|
128
|
+
dark: '#4A707C',
|
|
129
|
+
gray: '#222222',
|
|
130
|
+
minor: '#9B9B9B',
|
|
131
|
+
darkText: '#DCDCDC',
|
|
132
|
+
background: '#F7F8F8',
|
|
133
|
+
yellow: '#FFCF71',
|
|
134
|
+
green: '#44cdc6',
|
|
135
|
+
red: '#D0021B',
|
|
136
|
+
blue: '#4E6AF6',
|
|
137
|
+
primary: '#222222',
|
|
138
|
+
black: '#222222',
|
|
139
|
+
secondary: '#44cdc6',
|
|
140
|
+
mint: '#44cdc6',
|
|
141
|
+
textSecondary: '#4A4A4A',
|
|
142
|
+
active: '#5b9025',
|
|
143
|
+
danger: '#D0021B',
|
|
144
|
+
lightGrey: '#BCBCBC'
|
|
145
|
+
},
|
|
157
146
|
mode
|
|
158
147
|
}, rest));
|
|
159
148
|
const enhanced = (0, _responsiveFontSizes.default)(theme, {
|
package/lib/Wallet/Action.js
CHANGED
|
@@ -17,7 +17,7 @@ var _abtwallet = _interopRequireDefault(require("./images/abtwallet.png"));
|
|
|
17
17
|
|
|
18
18
|
var _Util = require("../Util");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
21
21
|
|
|
22
22
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
23
23
|
|
|
@@ -100,4 +100,4 @@ const sizes = {
|
|
|
100
100
|
const Content = _styledComponents.default.div.withConfig({
|
|
101
101
|
displayName: "Action__Content",
|
|
102
102
|
componentId: "sc-zuf4zr-0"
|
|
103
|
-
})(["display:flex;justify-content:center;align-items:center;&:hover{opacity:0.9;}.wallet-action__logo{width:auto;height:auto;max-width:", "px;margin-left:5px;}.wallet-action__text{padding:8px;display:flex;height:100%;flex-direction:column;justify-content:space-between;align-items:flex-start;}.wallet-action__action{font-size:", "px;text-transform:capitalize;margin-bottom:1px;color:", ";letter-spacing:1px;}.wallet-action__title{font-size:", "px;text-transform:capitalize;color:", ";letter-spacing:1px;}"], props => sizes.logo[props.size], props => sizes.font[props.size], props => props.color ||
|
|
103
|
+
})(["display:flex;justify-content:center;align-items:center;&:hover{opacity:0.9;}.wallet-action__logo{width:auto;height:auto;max-width:", "px;margin-left:5px;}.wallet-action__text{padding:8px;display:flex;height:100%;flex-direction:column;justify-content:space-between;align-items:flex-start;}.wallet-action__action{font-size:", "px;text-transform:capitalize;margin-bottom:1px;color:", ";letter-spacing:1px;}.wallet-action__title{font-size:", "px;text-transform:capitalize;color:", ";letter-spacing:1px;}"], props => sizes.logo[props.size], props => sizes.font[props.size], props => props.color || _Colors.default.primary.main, props => sizes.font[props.size] * 1.5, props => props.color || _Colors.default.primary.main);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/ux",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.26",
|
|
4
4
|
"description": "Common used react components for arcblock products",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"react": ">=16.12.0",
|
|
53
53
|
"react-ga": "^2.7.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "8a7c124f0e96d768d52239970309264eac5770ef",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@arcblock/icons": "^1.15.
|
|
58
|
-
"@arcblock/react-hooks": "^1.15.
|
|
57
|
+
"@arcblock/icons": "^1.15.26",
|
|
58
|
+
"@arcblock/react-hooks": "^1.15.26",
|
|
59
59
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
60
60
|
"@material-ui/core": "^4.12.3",
|
|
61
61
|
"@material-ui/icons": "4.11.2",
|