@arcblock/ux 2.1.18 → 2.1.21
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/ActionButton/index.js +16 -8
- package/lib/ActivityIndicator/index.js +49 -36
- package/lib/Alert/index.js +25 -17
- package/lib/AnimationWaiter/index.js +44 -35
- package/lib/Async/index.js +15 -3
- package/lib/Badge/index.js +14 -4
- package/lib/Blocklet/blocklet.js +81 -62
- package/lib/BlockletNFT/index.js +95 -76
- package/lib/Button/wrap.js +13 -9
- package/lib/Center/index.js +6 -5
- package/lib/ClickToCopy/index.js +31 -21
- package/lib/CodeBlock/index.js +35 -27
- package/lib/ContactForm/index.js +46 -41
- package/lib/CookieConsent/index.js +33 -21
- package/lib/CountDown/index.js +50 -34
- package/lib/Datatable/CustomToolbar.js +138 -97
- package/lib/Datatable/DatatableContext.js +9 -12
- package/lib/Datatable/TableSearch.js +44 -27
- package/lib/Datatable/index.js +44 -28
- package/lib/Dialog/confirm.js +26 -13
- package/lib/Dialog/dialog.js +42 -26
- package/lib/DriftBot/index.js +2 -2
- package/lib/Earth/index.js +121 -107
- package/lib/Empty/index.js +19 -10
- package/lib/ErrorBoundary/fallback.js +18 -12
- package/lib/Footer/index.js +32 -26
- package/lib/Header/header.js +37 -21
- package/lib/Header/responsive-header.js +40 -30
- package/lib/Icon/image.js +22 -15
- package/lib/Icon/index.js +17 -7
- package/lib/Img/index.js +34 -32
- package/lib/InfoRow/index.js +23 -13
- package/lib/Layout/dashboard/index.js +66 -54
- package/lib/Layout/dashboard/sidebar.js +39 -26
- package/lib/Layout/dashboard-legacy/header.js +56 -38
- package/lib/Layout/dashboard-legacy/index.js +54 -44
- package/lib/Layout/dashboard-legacy/sidebar.js +48 -38
- package/lib/Layout/index.js +147 -111
- package/lib/Locale/context.js +8 -10
- package/lib/Locale/selector.js +55 -41
- package/lib/Logo/index.js +50 -30
- package/lib/Metric/index.js +30 -23
- package/lib/NFTDisplay/aspect-ratio-container.js +15 -6
- package/lib/NFTDisplay/broken.js +3 -3
- package/lib/NFTDisplay/index.js +29 -28
- package/lib/NFTDisplay/loading.js +6 -5
- package/lib/NFTDisplay/svg-embedder/img.js +10 -4
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +14 -6
- package/lib/NavMenu/nav-menu.js +60 -49
- package/lib/PageScroller/index.js +29 -27
- package/lib/PageScroller/usePrevValue.js +1 -5
- package/lib/PricingTable/PricingPlan.js +46 -36
- package/lib/PricingTable/index.js +22 -20
- package/lib/QRCode/index.js +6 -9
- package/lib/RelativeTime/index.js +14 -5
- package/lib/Result/common.js +49 -44
- package/lib/Result/index.js +6 -6
- package/lib/Result/result.js +29 -18
- package/lib/Screenshot/index.js +32 -21
- package/lib/Spinner/index.js +3 -3
- package/lib/SplitButton/index.js +40 -24
- package/lib/Switch/index.js +12 -6
- package/lib/Tabs/index.js +18 -12
- package/lib/Tag/index.js +14 -4
- package/lib/Terminal/Player.js +108 -92
- package/lib/Terminal/index.js +3 -1
- package/lib/TextCollapse/index.js +18 -8
- package/lib/Toast/index.js +17 -14
- package/lib/Video/index.js +31 -25
- package/lib/Wallet/Action.js +37 -25
- package/lib/Wallet/Download.js +236 -181
- package/lib/Wallet/Open.js +6 -5
- package/lib/WechatPrompt/index.js +40 -28
- package/lib/withTheme/index.js +23 -9
- package/lib/withTracker/error_boundary.js +10 -7
- package/lib/withTracker/index.js +8 -4
- package/package.json +4 -4
- package/src/ActionButton/index.js +3 -4
- package/src/ActivityIndicator/index.js +4 -7
- package/src/Alert/index.js +4 -10
- package/src/AnimationWaiter/index.js +4 -2
- package/src/Async/index.js +4 -8
- package/src/Badge/index.js +2 -2
- package/src/Blocklet/blocklet.js +16 -27
- package/src/Blocklet/utils.js +3 -3
- package/src/BlockletNFT/index.js +7 -15
- package/src/Button/wrap.js +2 -2
- package/src/Center/index.js +0 -1
- package/src/ClickToCopy/index.js +5 -12
- package/src/CodeBlock/index.js +2 -7
- package/src/Colors/index.js +1 -0
- package/src/ContactForm/index.js +16 -16
- package/src/CookieConsent/index.js +3 -2
- package/src/CountDown/index.js +8 -8
- package/src/Datatable/CustomToolbar.js +8 -9
- package/src/Datatable/DatatableContext.js +3 -3
- package/src/Datatable/TableSearch.js +18 -13
- package/src/Datatable/index.js +13 -12
- package/src/Datatable/utils.js +19 -23
- package/src/Dialog/confirm.js +0 -1
- package/src/Dialog/dialog.js +7 -27
- package/src/Dialog/index.js +1 -0
- package/src/DriftBot/index.js +2 -2
- package/src/Earth/index.js +26 -44
- package/src/Empty/index.js +0 -1
- package/src/ErrorBoundary/fallback.js +2 -3
- package/src/Footer/index.js +3 -7
- package/src/Header/header.js +4 -5
- package/src/Header/responsive-header.js +4 -10
- package/src/Icon/image.js +0 -1
- package/src/Icon/index.js +8 -8
- package/src/Img/index.js +6 -6
- package/src/InfoRow/index.js +22 -21
- package/src/Layout/dashboard/index.js +9 -4
- package/src/Layout/dashboard/sidebar.js +4 -10
- package/src/Layout/dashboard-legacy/header.js +9 -15
- package/src/Layout/dashboard-legacy/index.js +4 -11
- package/src/Layout/dashboard-legacy/sidebar.js +7 -7
- package/src/Layout/index.js +12 -26
- package/src/Locale/browser-lang.js +2 -2
- package/src/Locale/context.js +7 -11
- package/src/Locale/selector.js +8 -8
- package/src/Logo/index.js +4 -6
- package/src/Metric/index.js +9 -10
- package/src/NFTDisplay/aspect-ratio-container.js +0 -1
- package/src/NFTDisplay/broken.js +0 -1
- package/src/NFTDisplay/index.js +10 -8
- package/src/NFTDisplay/loading.js +0 -1
- package/src/NFTDisplay/svg-embedder/img.js +1 -2
- package/src/NFTDisplay/svg-embedder/inline-svg.js +0 -1
- package/src/NavMenu/index.js +1 -0
- package/src/NavMenu/nav-menu.js +14 -27
- package/src/NavMenu/style.js +3 -3
- package/src/PageScroller/index.js +19 -35
- package/src/PageScroller/usePrevValue.js +1 -1
- package/src/PricingTable/PricingPlan.js +31 -30
- package/src/PricingTable/index.js +4 -5
- package/src/QRCode/index.js +3 -2
- package/src/RelativeTime/index.js +1 -5
- package/src/Result/common.js +19 -20
- package/src/Result/index.js +5 -6
- package/src/Result/result.js +2 -3
- package/src/Result/translations.js +1 -2
- package/src/Screenshot/index.js +10 -10
- package/src/Spinner/index.js +0 -1
- package/src/SplitButton/index.js +6 -19
- package/src/Switch/index.js +40 -41
- package/src/Tabs/index.js +2 -9
- package/src/Tag/index.js +2 -2
- package/src/Terminal/Player.js +7 -8
- package/src/Terminal/index.js +4 -3
- package/src/Terminal/util.js +3 -3
- package/src/TextCollapse/index.js +4 -10
- package/src/Theme/index.js +1 -8
- package/src/Toast/index.js +6 -10
- package/src/Util/index.js +15 -27
- package/src/Video/index.js +2 -8
- package/src/Wallet/Action.js +5 -6
- package/src/Wallet/Download.js +6 -7
- package/src/Wallet/Open.js +1 -2
- package/src/WechatPrompt/index.js +2 -7
- package/src/withTheme/index.js +5 -5
- package/src/withTracker/error_boundary.js +3 -3
- package/src/withTracker/index.js +2 -2
package/src/Video/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Player from 'react-player';
|
|
4
4
|
import styled from 'styled-components';
|
|
@@ -23,13 +23,7 @@ export default function Video(props) {
|
|
|
23
23
|
if (url.indexOf('v.qq.com') > 0) {
|
|
24
24
|
return (
|
|
25
25
|
<Placeholder style={{ width, height }}>
|
|
26
|
-
<iframe
|
|
27
|
-
title={url}
|
|
28
|
-
style={styles}
|
|
29
|
-
src={url}
|
|
30
|
-
onLoad={() => setLoaded(true)}
|
|
31
|
-
allowFullScreen="true"
|
|
32
|
-
/>
|
|
26
|
+
<iframe title={url} style={styles} src={url} onLoad={() => setLoaded(true)} allowFullScreen="true" />
|
|
33
27
|
{!loaded && <CircularProgress className="loading-indicator" color="primary" />}
|
|
34
28
|
</Placeholder>
|
|
35
29
|
);
|
package/src/Wallet/Action.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
3
2
|
import styled from 'styled-components';
|
|
4
3
|
|
|
@@ -75,7 +74,7 @@ const Content = styled.div`
|
|
|
75
74
|
.wallet-action__logo {
|
|
76
75
|
width: auto;
|
|
77
76
|
height: auto;
|
|
78
|
-
max-width: ${props => sizes.logo[props.size]}px;
|
|
77
|
+
max-width: ${(props) => sizes.logo[props.size]}px;
|
|
79
78
|
margin-left: 5px;
|
|
80
79
|
}
|
|
81
80
|
|
|
@@ -89,17 +88,17 @@ const Content = styled.div`
|
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
.wallet-action__action {
|
|
92
|
-
font-size: ${props => sizes.font[props.size]}px;
|
|
91
|
+
font-size: ${(props) => sizes.font[props.size]}px;
|
|
93
92
|
text-transform: capitalize;
|
|
94
93
|
margin-bottom: 1px;
|
|
95
|
-
color: ${props => props.color || colors.primary.main};
|
|
94
|
+
color: ${(props) => props.color || colors.primary.main};
|
|
96
95
|
letter-spacing: 1px;
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
.wallet-action__title {
|
|
100
|
-
font-size: ${props => sizes.font[props.size] * 1.5}px;
|
|
99
|
+
font-size: ${(props) => sizes.font[props.size] * 1.5}px;
|
|
101
100
|
text-transform: capitalize;
|
|
102
|
-
color: ${props => props.color || colors.primary.main};
|
|
101
|
+
color: ${(props) => props.color || colors.primary.main};
|
|
103
102
|
letter-spacing: 1px;
|
|
104
103
|
}
|
|
105
104
|
`;
|
package/src/Wallet/Download.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
3
2
|
import styled from 'styled-components';
|
|
4
3
|
|
|
@@ -100,17 +99,17 @@ WalletDownload.defaultProps = {
|
|
|
100
99
|
|
|
101
100
|
const Container = styled.div`
|
|
102
101
|
display: flex;
|
|
103
|
-
flex-direction: ${props => (props.layout === 'vertical' ? 'column' : 'row')};
|
|
102
|
+
flex-direction: ${(props) => (props.layout === 'vertical' ? 'column' : 'row')};
|
|
104
103
|
align-items: center;
|
|
105
104
|
|
|
106
105
|
.download-title {
|
|
107
|
-
margin-right: ${props => (props.layout === 'vertical' ? '0' : '16px')};
|
|
108
|
-
margin-bottom: ${props => (props.layout === 'vertical' ? '16px' : '0')};
|
|
106
|
+
margin-right: ${(props) => (props.layout === 'vertical' ? '0' : '16px')};
|
|
107
|
+
margin-bottom: ${(props) => (props.layout === 'vertical' ? '16px' : '0')};
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
.download-store-list {
|
|
112
111
|
display: flex;
|
|
113
|
-
flex-direction: ${props => (props.storeLayout === 'vertical' ? 'column' : 'row')};
|
|
112
|
+
flex-direction: ${(props) => (props.storeLayout === 'vertical' ? 'column' : 'row')};
|
|
114
113
|
justify-content: space-between;
|
|
115
114
|
align-items: center;
|
|
116
115
|
|
|
@@ -118,8 +117,8 @@ const Container = styled.div`
|
|
|
118
117
|
padding: 0;
|
|
119
118
|
margin: 0;
|
|
120
119
|
|
|
121
|
-
margin-right: ${props => (props.storeLayout === 'vertical' ? '0' : '16px')};
|
|
122
|
-
margin-bottom: ${props => (props.storeLayout === 'vertical' ? '16px' : '0')};
|
|
120
|
+
margin-right: ${(props) => (props.storeLayout === 'vertical' ? '0' : '16px')};
|
|
121
|
+
margin-bottom: ${(props) => (props.storeLayout === 'vertical' ? '16px' : '0')};
|
|
123
122
|
|
|
124
123
|
&:last-of-type {
|
|
125
124
|
margin-right: 0;
|
package/src/Wallet/Open.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
3
2
|
import styled from 'styled-components';
|
|
4
3
|
import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
|
|
@@ -45,6 +44,6 @@ const Button = styled(Fab)`
|
|
|
45
44
|
transform-origin: 50% 50%;
|
|
46
45
|
transform: translateX(-50%);
|
|
47
46
|
min-width: 120px;
|
|
48
|
-
z-index: ${props => props.theme.zIndex.tooltip};
|
|
47
|
+
z-index: ${(props) => props.theme.zIndex.tooltip};
|
|
49
48
|
}
|
|
50
49
|
`;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import styled from 'styled-components';
|
|
3
2
|
|
|
4
3
|
import Typography from '@mui/material/Typography';
|
|
@@ -25,9 +24,7 @@ export default function WechatPrompt() {
|
|
|
25
24
|
<Container>
|
|
26
25
|
<Typography className="wechat-title">1. 轻触右上方菜单</Typography>
|
|
27
26
|
<div className="wechat-tip">
|
|
28
|
-
<Typography className="wechat-tip-text">
|
|
29
|
-
2. 点击“在浏览器打开”,才能调起 DID 钱包
|
|
30
|
-
</Typography>
|
|
27
|
+
<Typography className="wechat-tip-text">2. 点击“在浏览器打开”,才能调起 DID 钱包</Typography>
|
|
31
28
|
<img className="wechat-tip-img" src={AndroidImage} alt="Open in Android Browser" />
|
|
32
29
|
</div>
|
|
33
30
|
</Container>
|
|
@@ -40,9 +37,7 @@ export default function WechatPrompt() {
|
|
|
40
37
|
<Container>
|
|
41
38
|
<Typography className="wechat-title">1. 轻触右上方菜单</Typography>
|
|
42
39
|
<div className="wechat-tip">
|
|
43
|
-
<Typography className="wechat-tip-text">
|
|
44
|
-
2. 点击“在Safari中打开”,才能调起 DID 钱包
|
|
45
|
-
</Typography>
|
|
40
|
+
<Typography className="wechat-tip-text">2. 点击“在Safari中打开”,才能调起 DID 钱包</Typography>
|
|
46
41
|
<img className="wechat-tip-img" src={IosImage} alt="Open in Safari" />
|
|
47
42
|
</div>
|
|
48
43
|
</Container>
|
package/src/withTheme/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ThemeProvider, createGlobalStyle } from 'styled-components';
|
|
3
3
|
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
|
4
4
|
import CssBaseline from '@mui/material/CssBaseline';
|
|
@@ -6,16 +6,16 @@ import CssBaseline from '@mui/material/CssBaseline';
|
|
|
6
6
|
import { create } from '../Theme';
|
|
7
7
|
|
|
8
8
|
const GlobalStyle = createGlobalStyle`
|
|
9
|
-
font-family: ${props => props.theme.typography.fontFamily};
|
|
10
|
-
color: ${props => props.theme.typography.color.main};
|
|
9
|
+
font-family: ${(props) => props.theme.typography.fontFamily};
|
|
10
|
+
color: ${(props) => props.theme.typography.color.main};
|
|
11
11
|
|
|
12
12
|
a, a:hover, a:active {
|
|
13
13
|
text-decoration: none;
|
|
14
|
-
color: ${props => props.theme.palette.primary.dark};
|
|
14
|
+
color: ${(props) => props.theme.palette.primary.dark};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
a:hover {
|
|
18
|
-
color: ${props => props.theme.palette.primary.main};
|
|
18
|
+
color: ${(props) => props.theme.palette.primary.main};
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.section--latest-post {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable import/no-unresolved */
|
|
2
|
-
import
|
|
2
|
+
import { Component } from 'react';
|
|
3
3
|
import * as Sentry from '@sentry/browser';
|
|
4
4
|
|
|
5
5
|
import Alert from '../Alert';
|
|
6
6
|
|
|
7
|
-
export default class ErrorBoundary extends
|
|
7
|
+
export default class ErrorBoundary extends Component {
|
|
8
8
|
constructor(props) {
|
|
9
9
|
super(props);
|
|
10
10
|
this.state = { error: null };
|
|
@@ -13,7 +13,7 @@ export default class ErrorBoundary extends React.Component {
|
|
|
13
13
|
componentDidCatch(error, info) {
|
|
14
14
|
this.setState({ error });
|
|
15
15
|
|
|
16
|
-
Sentry.withScope(scope => {
|
|
16
|
+
Sentry.withScope((scope) => {
|
|
17
17
|
scope.setExtras(info);
|
|
18
18
|
Sentry.captureException(error);
|
|
19
19
|
});
|
package/src/withTracker/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/no-deprecated */
|
|
2
2
|
/* eslint-disable react/static-property-placement */
|
|
3
3
|
/* eslint-disable import/no-unresolved */
|
|
4
|
-
import
|
|
4
|
+
import { Component } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import ReactGA from 'react-ga';
|
|
7
7
|
import * as Sentry from '@sentry/browser';
|
|
@@ -23,7 +23,7 @@ export default (WrappedComponent, options = {}) => {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const trackPage = page => {
|
|
26
|
+
const trackPage = (page) => {
|
|
27
27
|
if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {
|
|
28
28
|
return;
|
|
29
29
|
}
|