@arcblock/ux 0.78.25 → 1.6.59
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/LICENSE +1 -1
- package/README.md +0 -56
- package/lib/ActionButton/index.js +6 -4
- package/lib/ActivityIndicator/index.js +75 -23
- package/lib/Alert/index.js +15 -11
- package/lib/Async/index.js +1 -1
- package/lib/Badge/index.js +17 -15
- package/lib/Blocklet/index.js +261 -0
- package/lib/Button/wrap.js +96 -43
- package/lib/ButtonGroup/index.js +3 -16
- package/lib/Center/index.js +30 -4
- package/lib/ClickToCopy/index.js +10 -8
- package/lib/CodeBlock/index.js +40 -13
- package/lib/Colors/index.js +15 -0
- package/lib/Colors/themes/default.js +85 -0
- package/lib/ContactForm/index.js +9 -10
- package/lib/CookieConsent/index.js +98 -0
- package/lib/CountDown/index.js +18 -14
- package/lib/Dialog/confirm.js +84 -0
- package/lib/Dialog/dialog.js +137 -0
- package/lib/Dialog/index.js +23 -0
- package/lib/Earth/index.js +33 -33
- package/lib/Empty/index.js +61 -0
- package/lib/Footer/index.js +16 -18
- package/lib/Icon/image.js +10 -13
- package/lib/Icon/index.js +10 -8
- package/lib/Img/index.js +212 -0
- package/lib/InfoRow/index.js +7 -6
- package/lib/Layout/dashboard/header.js +60 -42
- package/lib/Layout/dashboard/index.js +72 -60
- package/lib/Layout/dashboard/sidebar.js +41 -25
- package/lib/Layout/index.js +113 -51
- package/lib/Locale/browser-lang.js +0 -2
- package/lib/Locale/context.js +85 -61
- package/lib/Locale/selector.js +33 -20
- package/lib/Logo/index.js +15 -13
- package/lib/Metric/index.js +5 -6
- package/lib/NFTDisplay/README.md +59 -0
- package/lib/NFTDisplay/aspect-ratio-container.js +52 -0
- package/lib/NFTDisplay/broken.js +25 -0
- package/lib/NFTDisplay/index.js +317 -0
- package/lib/NFTDisplay/loading.js +23 -0
- package/lib/NFTDisplay/svg-embedder/img.js +68 -0
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +54 -0
- package/lib/PageScroller/index.js +10 -11
- package/lib/PageScroller/usePrevValue.js +2 -2
- package/lib/PricingTable/PricingPlan.js +12 -15
- package/lib/PricingTable/index.js +5 -5
- package/lib/Result/common.js +176 -0
- package/lib/Result/index.js +61 -0
- package/lib/Result/result.js +69 -0
- package/lib/Result/translations.js +61 -0
- package/lib/Screenshot/index.js +14 -13
- package/lib/Spinner/index.js +37 -0
- package/lib/SplitButton/index.js +126 -0
- package/lib/Switch/index.js +107 -0
- package/lib/Tabs/index.js +24 -47
- package/lib/Tag/index.js +15 -13
- package/lib/Terminal/Player.js +43 -45
- package/lib/Terminal/index.js +3 -1
- package/lib/Terminal/util.js +2 -3
- package/lib/TextCollapse/index.js +21 -14
- package/lib/Theme/index.js +79 -63
- package/lib/Theme/responsiveFontSizes.js +8 -8
- package/lib/Toast/index.js +12 -11
- package/lib/Util/index.js +197 -26
- package/lib/Video/index.js +8 -11
- package/lib/Wallet/Action.js +15 -13
- package/lib/Wallet/Download.js +60 -58
- package/lib/Wallet/Open.js +2 -2
- package/lib/WechatPrompt/index.js +10 -10
- package/lib/index.js +6 -6
- package/lib/withTheme/index.js +5 -17
- package/lib/withTracker/error_boundary.js +3 -3
- package/lib/withTracker/index.js +6 -7
- package/package.json +22 -17
- package/src/ActionButton/index.js +65 -0
- package/src/ActivityIndicator/index.js +141 -0
- package/src/Alert/index.js +104 -0
- package/src/Async/index.js +39 -0
- package/src/Badge/index.js +71 -0
- package/src/Blocklet/index.js +424 -0
- package/src/Button/index.js +4 -0
- package/src/Button/wrap.js +101 -0
- package/src/ButtonGroup/index.js +6 -0
- package/src/Center/index.js +40 -0
- package/src/ClickToCopy/index.js +90 -0
- package/src/CodeBlock/index.js +160 -0
- package/src/Colors/index.js +1 -0
- package/src/Colors/themes/default.js +54 -0
- package/src/ContactForm/index.js +240 -0
- package/src/CookieConsent/index.js +90 -0
- package/src/CountDown/index.js +151 -0
- package/src/Dialog/confirm.js +76 -0
- package/src/Dialog/dialog.js +162 -0
- package/src/Dialog/index.js +2 -0
- package/src/DriftBot/index.js +81 -0
- package/src/Earth/countries.json +8057 -0
- package/src/Earth/index.js +511 -0
- package/src/Earth/util.js +69 -0
- package/src/Empty/index.js +41 -0
- package/src/Footer/index.js +110 -0
- package/src/Icon/image.js +55 -0
- package/src/Icon/index.js +69 -0
- package/src/Img/index.js +172 -0
- package/src/InfoRow/index.js +83 -0
- package/src/Layout/dashboard/header.js +157 -0
- package/src/Layout/dashboard/index.js +150 -0
- package/src/Layout/dashboard/sidebar.js +122 -0
- package/src/Layout/index.js +318 -0
- package/src/Locale/browser-lang.js +63 -0
- package/src/Locale/context.js +94 -0
- package/src/Locale/images/globe-dark.png +0 -0
- package/src/Locale/images/globe-light.png +0 -0
- package/src/Locale/selector.js +135 -0
- package/src/Logo/images/logo-dark-text.svg +3 -0
- package/src/Logo/images/logo-dark-top.svg +6 -0
- package/src/Logo/images/logo-light-text.svg +3 -0
- package/src/Logo/images/logo-light-top.svg +6 -0
- package/src/Logo/index.js +47 -0
- package/src/Metric/index.js +115 -0
- package/src/NFTDisplay/README.md +59 -0
- package/src/NFTDisplay/aspect-ratio-container.js +34 -0
- package/src/NFTDisplay/broken.js +18 -0
- package/src/NFTDisplay/index.js +257 -0
- package/src/NFTDisplay/loading.js +17 -0
- package/src/NFTDisplay/svg-embedder/img.js +36 -0
- package/src/NFTDisplay/svg-embedder/inline-svg.js +37 -0
- package/src/PageScroller/index.js +342 -0
- package/src/PageScroller/usePrevValue.js +12 -0
- package/src/PricingTable/PricingPlan.js +112 -0
- package/src/PricingTable/index.js +43 -0
- package/src/Result/common.js +116 -0
- package/src/Result/index.js +31 -0
- package/src/Result/result.js +57 -0
- package/src/Result/translations.js +56 -0
- package/src/Screenshot/devices.css +1366 -0
- package/src/Screenshot/index.js +181 -0
- package/src/Spinner/index.js +19 -0
- package/src/SplitButton/index.js +112 -0
- package/src/Switch/index.js +78 -0
- package/src/Tabs/index.js +46 -0
- package/src/Tag/index.js +73 -0
- package/src/Terminal/Player.js +364 -0
- package/src/Terminal/index.js +150 -0
- package/src/Terminal/player.css +378 -0
- package/src/Terminal/util.js +167 -0
- package/src/Terminal/xterm.css +171 -0
- package/src/TextCollapse/index.js +92 -0
- package/src/Theme/index.js +184 -0
- package/src/Theme/responsiveFontSizes.js +94 -0
- package/src/Toast/index.js +118 -0
- package/src/Util/index.js +281 -0
- package/src/Video/index.js +72 -0
- package/src/Wallet/Action.js +105 -0
- package/src/Wallet/Download.js +130 -0
- package/src/Wallet/Open.js +50 -0
- package/src/Wallet/images/abtwallet.png +0 -0
- package/src/Wallet/images/android_download.svg +23 -0
- package/src/Wallet/images/app-store.svg +20 -0
- package/src/Wallet/images/google-play.svg +70 -0
- package/src/WechatPrompt/images/android.png +0 -0
- package/src/WechatPrompt/images/ios.png +0 -0
- package/src/WechatPrompt/index.js +81 -0
- package/src/index.js +63 -0
- package/src/withTheme/index.js +72 -0
- package/src/withTracker/README.md +34 -0
- package/src/withTracker/error_boundary.js +34 -0
- package/src/withTracker/index.js +70 -0
- package/lib/GraphQLPlayground/graphiql.css +0 -1850
- package/lib/GraphQLPlayground/index.js +0 -302
- package/lib/GraphQLPlayground/util.js +0 -55
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -16,59 +16,3 @@ import ClickToCopy from '@arcblock/ux/lib/ClickToCopy';
|
|
|
16
16
|
import Icon from '@arcblock/ux/lib/Icon';
|
|
17
17
|
import ActivityIndicator from '@arcblock/ux/lib/ActivityIndicator';
|
|
18
18
|
```
|
|
19
|
-
|
|
20
|
-
## FAQ
|
|
21
|
-
|
|
22
|
-
### How to use `GraphQLPlayground` comonent in SSR env such as gatsby?
|
|
23
|
-
|
|
24
|
-
Because `graphiql` and `graphiql-code-exporter` uses browser globals such as `window`, we need to mock them both during building time for gatsby.
|
|
25
|
-
|
|
26
|
-
First we need to create an mock for `graphqil`, `src/mocks/graphiql`:
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
function graphiql() {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
graphiql.Logo = () => null;
|
|
34
|
-
graphiql.Toolbar = () => null;
|
|
35
|
-
graphiql.QueryEditor = () => null;
|
|
36
|
-
graphiql.VariableEditor = () => null;
|
|
37
|
-
graphiql.ResultViewer = () => null;
|
|
38
|
-
graphiql.Button = () => null;
|
|
39
|
-
graphiql.ToolbarButton = () => null;
|
|
40
|
-
graphiql.Group = () => null;
|
|
41
|
-
graphiql.Menu = () => null;
|
|
42
|
-
graphiql.MenuItem = () => null;
|
|
43
|
-
graphiql.Select = () => null;
|
|
44
|
-
graphiql.SelectOption = () => null;
|
|
45
|
-
graphiql.Footer = () => null;
|
|
46
|
-
|
|
47
|
-
module.exports = graphiql;
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Then, in `gatsby-node.js`, use the mocks:
|
|
51
|
-
|
|
52
|
-
```javascript
|
|
53
|
-
const path = require('path');
|
|
54
|
-
|
|
55
|
-
exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
|
|
56
|
-
if (stage === 'build-html') {
|
|
57
|
-
actions.setWebpackConfig({
|
|
58
|
-
resolve: {
|
|
59
|
-
alias: {
|
|
60
|
-
graphiql: path.resolve(__dirname, './src/mocks/graphiql.js'),
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
module: {
|
|
64
|
-
rules: [
|
|
65
|
-
{
|
|
66
|
-
test: /node_modules\/codemirror\//,
|
|
67
|
-
use: loaders.null(),
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
```
|
|
@@ -13,6 +13,8 @@ var _Button = _interopRequireDefault(require("../Button"));
|
|
|
13
13
|
|
|
14
14
|
var _Util = require("../Util");
|
|
15
15
|
|
|
16
|
+
const _excluded = ["href", "icon", "size", "color", "theme", "variant", "gradient", "children", "text"];
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
20
|
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; }
|
|
@@ -20,7 +22,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
20
22
|
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; }
|
|
21
23
|
|
|
22
24
|
const ActionButton = props => {
|
|
23
|
-
const newProps = (0, _Util.mergeProps)(props, ActionButton);
|
|
25
|
+
const newProps = (0, _Util.mergeProps)(props, ActionButton);
|
|
24
26
|
|
|
25
27
|
const {
|
|
26
28
|
href,
|
|
@@ -33,7 +35,7 @@ const ActionButton = props => {
|
|
|
33
35
|
children,
|
|
34
36
|
text
|
|
35
37
|
} = newProps,
|
|
36
|
-
rest = _objectWithoutProperties(newProps,
|
|
38
|
+
rest = _objectWithoutProperties(newProps, _excluded);
|
|
37
39
|
|
|
38
40
|
const styles = {};
|
|
39
41
|
|
|
@@ -48,7 +50,7 @@ const ActionButton = props => {
|
|
|
48
50
|
styles[x] = newProps[x];
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
|
-
return _react.default.createElement(_Button.default, Object.assign({
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_Button.default, Object.assign({
|
|
52
54
|
color: theme,
|
|
53
55
|
href: href,
|
|
54
56
|
target: "_blank",
|
|
@@ -56,7 +58,7 @@ const ActionButton = props => {
|
|
|
56
58
|
style: styles,
|
|
57
59
|
size: size,
|
|
58
60
|
className: "action-button"
|
|
59
|
-
}, rest), !!icon && _react.default.createElement("i", {
|
|
61
|
+
}, rest), !!icon && /*#__PURE__*/_react.default.createElement("i", {
|
|
60
62
|
className: icon
|
|
61
63
|
}), text || children);
|
|
62
64
|
};
|
|
@@ -11,15 +11,22 @@ 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"));
|
|
21
|
+
|
|
22
|
+
const _excluded = ["messages", "interval"],
|
|
23
|
+
_excluded2 = ["size", "orbitColor", "atomColor", "duration"];
|
|
17
24
|
|
|
18
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
26
|
|
|
20
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
27
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
28
|
|
|
22
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
30
|
|
|
24
31
|
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; }
|
|
25
32
|
|
|
@@ -31,7 +38,7 @@ function ActivityIndicator(_ref) {
|
|
|
31
38
|
messages,
|
|
32
39
|
interval
|
|
33
40
|
} = _ref,
|
|
34
|
-
rest = _objectWithoutProperties(_ref,
|
|
41
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
42
|
|
|
36
43
|
const [index, setIndex] = (0, _react.useState)(0);
|
|
37
44
|
(0, _react.useEffect)(() => {
|
|
@@ -42,30 +49,32 @@ function ActivityIndicator(_ref) {
|
|
|
42
49
|
clearTimeout(timer);
|
|
43
50
|
};
|
|
44
51
|
});
|
|
45
|
-
return _react.default.createElement(Div, rest, _react.default.createElement("div", {
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(Div, rest, /*#__PURE__*/_react.default.createElement("div", {
|
|
46
53
|
className: "pm-loader-container"
|
|
47
|
-
}, _react.default.createElement("div", {
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
55
|
className: "pm-loader-text"
|
|
49
|
-
}, _react.default.createElement("p", null, messages[index])), _react.default.createElement("div", {
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, messages[index])), /*#__PURE__*/_react.default.createElement("div", {
|
|
50
57
|
className: "pm-loader-atoms"
|
|
51
|
-
}, _react.default.createElement(_Logo.default, {
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_Logo.default, {
|
|
52
59
|
style: {
|
|
53
60
|
transform: 'scale(0.6)'
|
|
54
61
|
},
|
|
55
62
|
showText: false
|
|
56
|
-
}), _react.default.createElement(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, _react.default.createElement(
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
}), /*#__PURE__*/_react.default.createElement(Orbit, {
|
|
64
|
+
size: 56,
|
|
65
|
+
orbitColor: _green.default[500],
|
|
66
|
+
atomColor: _green.default[500],
|
|
67
|
+
duration: 1
|
|
68
|
+
}), /*#__PURE__*/_react.default.createElement(Orbit, {
|
|
69
|
+
size: 80,
|
|
70
|
+
orbitColor: _blue.default[800],
|
|
71
|
+
atomColor: _blue.default[800],
|
|
72
|
+
duration: 1.5
|
|
73
|
+
}), /*#__PURE__*/_react.default.createElement(Orbit, {
|
|
74
|
+
size: 100,
|
|
75
|
+
orbitColor: _Colors.default.grey[900],
|
|
76
|
+
atomColor: _Colors.default.grey[900]
|
|
77
|
+
}))));
|
|
69
78
|
}
|
|
70
79
|
|
|
71
80
|
ActivityIndicator.propTypes = {
|
|
@@ -79,5 +88,48 @@ ActivityIndicator.defaultProps = {
|
|
|
79
88
|
|
|
80
89
|
const Div = _styledComponents.default.div.withConfig({
|
|
81
90
|
displayName: "ActivityIndicator__Div",
|
|
82
|
-
componentId: "rsk6jb-0"
|
|
83
|
-
})(["&&{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;}
|
|
91
|
+
componentId: "sc-rsk6jb-0"
|
|
92
|
+
})(["&&{box-sizing:border-box;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;}.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;}"], _Colors.default.grey[900]);
|
|
93
|
+
|
|
94
|
+
const Orbit = _ref2 => {
|
|
95
|
+
let {
|
|
96
|
+
size,
|
|
97
|
+
orbitColor,
|
|
98
|
+
atomColor,
|
|
99
|
+
duration
|
|
100
|
+
} = _ref2,
|
|
101
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
102
|
+
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(OrbitRoot, Object.assign({
|
|
104
|
+
$duration: duration,
|
|
105
|
+
style: {
|
|
106
|
+
width: size,
|
|
107
|
+
height: size,
|
|
108
|
+
border: "1px solid ".concat(orbitColor)
|
|
109
|
+
}
|
|
110
|
+
}, rest), /*#__PURE__*/_react.default.createElement("div", {
|
|
111
|
+
style: {
|
|
112
|
+
background: atomColor
|
|
113
|
+
}
|
|
114
|
+
}));
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
Orbit.propTypes = {
|
|
118
|
+
size: _propTypes.default.number.isRequired,
|
|
119
|
+
orbitColor: _propTypes.default.string.isRequired,
|
|
120
|
+
atomColor: _propTypes.default.string.isRequired,
|
|
121
|
+
duration: _propTypes.default.number
|
|
122
|
+
};
|
|
123
|
+
Orbit.defaultProps = {
|
|
124
|
+
duration: 2
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const OrbitRoot = _styledComponents.default.div.withConfig({
|
|
128
|
+
displayName: "ActivityIndicator__OrbitRoot",
|
|
129
|
+
componentId: "sc-rsk6jb-1"
|
|
130
|
+
})(["@keyframes orbit{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}position:absolute;border-radius:50%;animation:orbit ", "s infinite;animation-timing-function:linear;transform-origin:center;> div{position:absolute;top:50%;width:6px;height:6px;transform:translateX(-50%);border-radius:50%;}"], _ref3 => {
|
|
131
|
+
let {
|
|
132
|
+
$duration
|
|
133
|
+
} = _ref3;
|
|
134
|
+
return $duration;
|
|
135
|
+
});
|
package/lib/Alert/index.js
CHANGED
|
@@ -13,12 +13,16 @@ 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
|
+
|
|
24
|
+
const _excluded = ["type", "children", "style", "className", "variant"];
|
|
25
|
+
|
|
22
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
27
|
|
|
24
28
|
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; }
|
|
@@ -28,25 +32,25 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
28
32
|
const types = {
|
|
29
33
|
error: {
|
|
30
34
|
icon: 'exclamation-circle',
|
|
31
|
-
color:
|
|
35
|
+
color: _Colors.default.error.main,
|
|
32
36
|
borderColor: '#e35b54',
|
|
33
37
|
backgroundColor: 'rgba(227, 91, 84, 0.2)'
|
|
34
38
|
},
|
|
35
39
|
warning: {
|
|
36
40
|
icon: 'exclamation-triangle',
|
|
37
|
-
color:
|
|
41
|
+
color: _Colors.default.warning.main,
|
|
38
42
|
borderColor: '#f7d040',
|
|
39
43
|
backgroundColor: 'rgba(247, 208, 64, 0.2)'
|
|
40
44
|
},
|
|
41
45
|
success: {
|
|
42
46
|
icon: 'check-circle',
|
|
43
|
-
color:
|
|
47
|
+
color: _Colors.default.success.main,
|
|
44
48
|
borderColor: '#89ddd9',
|
|
45
49
|
backgroundColor: 'rgba(137, 221, 217, 0.2)'
|
|
46
50
|
},
|
|
47
51
|
tip: {
|
|
48
52
|
icon: 'info-circle',
|
|
49
|
-
color:
|
|
53
|
+
color: _Colors.default.grey[500],
|
|
50
54
|
borderColor: '#222222',
|
|
51
55
|
backgroundColor: '#EEEEEE'
|
|
52
56
|
}
|
|
@@ -62,7 +66,7 @@ const Alert = props => {
|
|
|
62
66
|
className,
|
|
63
67
|
variant
|
|
64
68
|
} = newProps,
|
|
65
|
-
rest = _objectWithoutProperties(newProps,
|
|
69
|
+
rest = _objectWithoutProperties(newProps, _excluded);
|
|
66
70
|
|
|
67
71
|
const {
|
|
68
72
|
icon,
|
|
@@ -71,21 +75,21 @@ const Alert = props => {
|
|
|
71
75
|
borderColor
|
|
72
76
|
} = types[type] || types.success;
|
|
73
77
|
const styles = Object.assign({
|
|
74
|
-
color:
|
|
78
|
+
color: _blueGrey.default[500],
|
|
75
79
|
backgroundColor: variant === 'border' ? backgroundColor : 'transparent',
|
|
76
80
|
borderLeft: variant === 'border' ? "5px solid ".concat(borderColor) : 'none'
|
|
77
81
|
}, style);
|
|
78
|
-
return _react.default.createElement(Container, Object.assign({}, rest, {
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(Container, Object.assign({}, rest, {
|
|
79
83
|
className: "alert alert--".concat(type, " alert--").concat(variant, " ").concat(className).trim(),
|
|
80
84
|
style: styles
|
|
81
|
-
}), variant === 'icon' && _react.default.createElement(_Icon.default, {
|
|
85
|
+
}), variant === 'icon' && /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
82
86
|
className: "alert-icon",
|
|
83
87
|
name: icon,
|
|
84
88
|
size: 24,
|
|
85
89
|
style: {
|
|
86
90
|
color
|
|
87
91
|
}
|
|
88
|
-
}), _react.default.createElement(_Typography.default, {
|
|
92
|
+
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
89
93
|
component: "div",
|
|
90
94
|
className: "alert-content"
|
|
91
95
|
}, children));
|
package/lib/Async/index.js
CHANGED
|
@@ -43,7 +43,7 @@ function LoadAsyncComponent(importComponent) {
|
|
|
43
43
|
} // eslint-disable-next-line no-nested-ternary
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
return Component ? _react.default.createElement(Component, this.props) : showProgress ? _react.default.createElement(_CircularProgress.default, {
|
|
46
|
+
return Component ? /*#__PURE__*/_react.default.createElement(Component, this.props) : showProgress ? /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
47
47
|
color: "primary"
|
|
48
48
|
}) : null;
|
|
49
49
|
}
|
package/lib/Badge/index.js
CHANGED
|
@@ -13,10 +13,12 @@ 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
|
|
|
20
|
+
const _excluded = ["type", "content", "children", "style", "className", "forwardedRef"];
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
24
|
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; }
|
|
@@ -25,29 +27,29 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
25
27
|
|
|
26
28
|
const types = {
|
|
27
29
|
error: {
|
|
28
|
-
color:
|
|
29
|
-
backgroundColor:
|
|
30
|
+
color: _Colors.default.common.white,
|
|
31
|
+
backgroundColor: _Colors.default.error.main
|
|
30
32
|
},
|
|
31
33
|
warning: {
|
|
32
|
-
color:
|
|
33
|
-
backgroundColor:
|
|
34
|
+
color: _Colors.default.common.white,
|
|
35
|
+
backgroundColor: _Colors.default.warning.main
|
|
34
36
|
},
|
|
35
37
|
success: {
|
|
36
|
-
color:
|
|
37
|
-
backgroundColor:
|
|
38
|
+
color: _Colors.default.common.white,
|
|
39
|
+
backgroundColor: _Colors.default.success.main
|
|
38
40
|
},
|
|
39
41
|
primary: {
|
|
40
|
-
color:
|
|
41
|
-
backgroundColor:
|
|
42
|
+
color: _Colors.default.common.white,
|
|
43
|
+
backgroundColor: _Colors.default.primary.main
|
|
42
44
|
},
|
|
43
45
|
reverse: {
|
|
44
|
-
color:
|
|
45
|
-
backgroundColor:
|
|
46
|
+
color: _Colors.default.common.white,
|
|
47
|
+
backgroundColor: _Colors.default.grey[900]
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
function Badge(props) {
|
|
50
|
-
const newProps = (0, _Util.mergeProps)(props, Badge, ['style']);
|
|
52
|
+
const newProps = (0, _Util.mergeProps)(props, Badge, ['style']);
|
|
51
53
|
|
|
52
54
|
const {
|
|
53
55
|
type,
|
|
@@ -57,10 +59,10 @@ function Badge(props) {
|
|
|
57
59
|
className,
|
|
58
60
|
forwardedRef
|
|
59
61
|
} = newProps,
|
|
60
|
-
rest = _objectWithoutProperties(newProps,
|
|
62
|
+
rest = _objectWithoutProperties(newProps, _excluded);
|
|
61
63
|
|
|
62
64
|
const styles = Object.assign(types[type] || types.primary, style);
|
|
63
|
-
return _react.default.createElement(Span, Object.assign({
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement(Span, Object.assign({
|
|
64
66
|
ref: forwardedRef,
|
|
65
67
|
component: "span",
|
|
66
68
|
className: className,
|
|
@@ -82,7 +84,7 @@ Badge.defaultProps = {
|
|
|
82
84
|
style: '{}'
|
|
83
85
|
};
|
|
84
86
|
|
|
85
|
-
var _default = _react.default.forwardRef((props, ref) => _react.default.createElement(Badge, Object.assign({}, props, {
|
|
87
|
+
var _default = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement(Badge, Object.assign({}, props, {
|
|
86
88
|
forwardedRef: ref
|
|
87
89
|
})));
|
|
88
90
|
|