@arcblock/ux 2.4.2 → 2.4.3
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 +4 -6
- package/lib/Alert/index.js +3 -4
- package/lib/AnimationWaiter/index.js +3 -4
- package/lib/Badge/index.js +3 -3
- package/lib/Blocklet/blocklet.js +4 -6
- package/lib/Blocklet/utils.js +2 -5
- package/lib/BlockletNFT/index.js +4 -6
- package/lib/Center/index.js +3 -4
- package/lib/ClickToCopy/index.js +3 -3
- package/lib/CodeBlock/index.js +3 -4
- package/lib/ContactForm/index.js +3 -3
- package/lib/CookieConsent/index.js +3 -4
- package/lib/CountDown/index.js +3 -4
- package/lib/Datatable/CustomToolbar.js +5 -9
- package/lib/Datatable/TableSearch.js +3 -4
- package/lib/Datatable/index.js +5 -7
- package/lib/Dialog/dialog.js +5 -9
- package/lib/Earth/index.js +4 -6
- package/lib/Empty/index.js +3 -3
- package/lib/ErrorBoundary/fallback.js +4 -7
- package/lib/Footer/index.js +3 -4
- package/lib/Header/auto-hidden.js +3 -3
- package/lib/Header/header.js +4 -8
- package/lib/Header/responsive-header.js +5 -7
- package/lib/Icon/image.js +3 -4
- package/lib/Icon/index.js +3 -4
- package/lib/Img/index.js +3 -3
- package/lib/InfoRow/index.js +3 -5
- package/lib/Layout/dashboard/index.js +5 -9
- package/lib/Layout/dashboard/sidebar.js +3 -5
- package/lib/Layout/dashboard-legacy/header.js +3 -3
- package/lib/Layout/dashboard-legacy/index.js +3 -3
- package/lib/Layout/dashboard-legacy/sidebar.js +5 -7
- package/lib/Layout/index.js +4 -6
- package/lib/Locale/selector.js +4 -7
- package/lib/Logo/index.js +2 -3
- package/lib/Metric/index.js +3 -4
- package/lib/NFTDisplay/aspect-ratio-container.js +2 -4
- package/lib/NFTDisplay/broken.js +3 -3
- package/lib/NFTDisplay/index.js +3 -4
- package/lib/NFTDisplay/loading.js +2 -4
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +4 -6
- package/lib/NavMenu/style.js +4 -7
- package/lib/PricingTable/PricingPlan.js +3 -3
- package/lib/PricingTable/index.js +3 -4
- package/lib/Result/common.js +4 -4
- package/lib/Result/result.js +3 -5
- package/lib/Screenshot/index.js +3 -4
- package/lib/SplitButton/index.js +4 -4
- package/lib/Switch/index.js +3 -3
- package/lib/Tabs/index.js +3 -3
- package/lib/Tag/index.js +4 -6
- package/lib/TextCollapse/index.js +2 -2
- package/lib/Theme/index.js +16 -0
- package/lib/Theme/theme-provider.js +3 -8
- package/lib/Theme/theme.js +4 -2
- package/lib/Video/index.js +3 -4
- package/lib/Wallet/Action.js +3 -4
- package/lib/Wallet/Download.js +3 -4
- package/lib/Wallet/Open.js +3 -3
- package/lib/WechatPrompt/index.js +3 -3
- package/lib/withTheme/index.js +18 -40
- package/package.json +4 -4
- package/src/ActivityIndicator/index.js +3 -3
- package/src/Alert/index.js +2 -2
- package/src/AnimationWaiter/index.js +3 -2
- package/src/Badge/index.js +1 -2
- package/src/Blocklet/blocklet.js +2 -3
- package/src/Blocklet/utils.js +2 -2
- package/src/BlockletNFT/index.js +2 -3
- package/src/Center/index.js +3 -2
- package/src/ClickToCopy/index.js +2 -1
- package/src/CodeBlock/index.js +2 -2
- package/src/ContactForm/index.js +2 -3
- package/src/CookieConsent/index.js +3 -2
- package/src/CountDown/index.js +2 -2
- package/src/Datatable/CustomToolbar.js +3 -4
- package/src/Datatable/TableSearch.js +2 -2
- package/src/Datatable/index.js +4 -4
- package/src/Dialog/dialog.js +3 -3
- package/src/Earth/index.js +3 -3
- package/src/Empty/index.js +3 -2
- package/src/ErrorBoundary/fallback.js +2 -3
- package/src/Footer/index.js +2 -2
- package/src/Header/auto-hidden.js +2 -1
- package/src/Header/header.js +2 -3
- package/src/Header/responsive-header.js +1 -2
- package/src/Icon/image.js +2 -2
- package/src/Icon/index.js +2 -2
- package/src/Img/index.js +1 -1
- package/src/InfoRow/index.js +3 -2
- package/src/Layout/dashboard/index.js +2 -3
- package/src/Layout/dashboard/sidebar.js +3 -3
- package/src/Layout/dashboard-legacy/header.js +1 -1
- package/src/Layout/dashboard-legacy/index.js +2 -2
- package/src/Layout/dashboard-legacy/sidebar.js +2 -4
- package/src/Layout/index.js +3 -3
- package/src/Locale/selector.js +2 -4
- package/src/Logo/index.js +3 -2
- package/src/Metric/index.js +2 -2
- package/src/NFTDisplay/aspect-ratio-container.js +3 -2
- package/src/NFTDisplay/broken.js +2 -1
- package/src/NFTDisplay/index.js +3 -2
- package/src/NFTDisplay/loading.js +2 -2
- package/src/NFTDisplay/svg-embedder/inline-svg.js +3 -2
- package/src/NavMenu/style.js +2 -2
- package/src/PricingTable/PricingPlan.js +2 -2
- package/src/PricingTable/index.js +2 -2
- package/src/Result/common.js +1 -1
- package/src/Result/result.js +3 -2
- package/src/Screenshot/index.js +2 -2
- package/src/SplitButton/index.js +2 -1
- package/src/Switch/index.js +1 -1
- package/src/Tabs/index.js +1 -1
- package/src/Tag/index.js +1 -3
- package/src/TextCollapse/index.js +2 -2
- package/src/Theme/index.js +1 -0
- package/src/Theme/theme-provider.js +4 -7
- package/src/Theme/theme.js +5 -3
- package/src/Video/index.js +2 -3
- package/src/Wallet/Action.js +2 -3
- package/src/Wallet/Download.js +2 -3
- package/src/Wallet/Open.js +2 -1
- package/src/WechatPrompt/index.js +2 -3
- package/src/withTheme/index.js +41 -54
package/src/Wallet/Action.js
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
|
-
import styled from '@emotion/styled';
|
3
|
-
|
4
2
|
import Typography from '@mui/material/Typography';
|
5
3
|
|
6
4
|
import logo from './images/abtwallet.png';
|
7
5
|
import { mergeProps } from '../Util';
|
8
6
|
import colors from '../Colors';
|
9
7
|
import Button from '../Button';
|
8
|
+
import { styled } from '../Theme';
|
10
9
|
|
11
10
|
export default function WalletAction(props) {
|
12
11
|
const newProps = mergeProps(props, WalletAction, ['style']);
|
@@ -62,7 +61,7 @@ const sizes = {
|
|
62
61
|
},
|
63
62
|
};
|
64
63
|
|
65
|
-
const Content = styled
|
64
|
+
const Content = styled('div')`
|
66
65
|
display: flex;
|
67
66
|
justify-content: center;
|
68
67
|
align-items: center;
|
package/src/Wallet/Download.js
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
|
-
import styled from '@emotion/styled';
|
3
|
-
|
4
2
|
import Typography from '@mui/material/Typography';
|
5
3
|
import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
|
6
4
|
|
@@ -10,6 +8,7 @@ import { ReactComponent as AndroidDownloadIcon } from './images/android_download
|
|
10
8
|
|
11
9
|
import Button from '../Button';
|
12
10
|
import { mergeProps } from '../Util';
|
11
|
+
import { styled } from '../Theme';
|
13
12
|
|
14
13
|
export default function WalletDownload(props) {
|
15
14
|
const browser = useBrowser();
|
@@ -97,7 +96,7 @@ WalletDownload.defaultProps = {
|
|
97
96
|
locale: 'zh',
|
98
97
|
};
|
99
98
|
|
100
|
-
const Container = styled
|
99
|
+
const Container = styled('div')`
|
101
100
|
display: flex;
|
102
101
|
flex-direction: ${(props) => (props.layout === 'vertical' ? 'column' : 'row')};
|
103
102
|
align-items: center;
|
package/src/Wallet/Open.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
|
-
import styled from '@emotion/styled';
|
3
2
|
import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
|
4
3
|
import Fab from '@mui/material/Fab';
|
5
4
|
|
5
|
+
import { styled } from '../Theme';
|
6
|
+
|
6
7
|
export default function OpenInWallet({ locale, link }) {
|
7
8
|
const buttonText = locale === 'zh' ? '在 DID 钱包打开' : 'Open in DID Wallet';
|
8
9
|
const browser = useBrowser();
|
@@ -1,11 +1,10 @@
|
|
1
|
-
import styled from '@emotion/styled';
|
2
|
-
|
3
1
|
import Typography from '@mui/material/Typography';
|
4
2
|
import Dialog from '@mui/material/Dialog';
|
5
3
|
import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
|
6
4
|
|
7
5
|
import IosImage from './images/ios.png';
|
8
6
|
import AndroidImage from './images/android.png';
|
7
|
+
import { styled } from '../Theme';
|
9
8
|
|
10
9
|
export default function WechatPrompt() {
|
11
10
|
const browser = useBrowser();
|
@@ -45,7 +44,7 @@ export default function WechatPrompt() {
|
|
45
44
|
);
|
46
45
|
}
|
47
46
|
|
48
|
-
const Container = styled
|
47
|
+
const Container = styled('div')`
|
49
48
|
.wechat-title {
|
50
49
|
height: 80px;
|
51
50
|
line-height: 80px;
|
package/src/withTheme/index.js
CHANGED
@@ -1,74 +1,61 @@
|
|
1
|
-
import
|
2
|
-
import { Global,
|
3
|
-
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
1
|
+
import { useEffect } from 'react';
|
2
|
+
import { Global, css } from '@emotion/react';
|
4
3
|
import CssBaseline from '@mui/material/CssBaseline';
|
5
4
|
|
6
|
-
import {
|
5
|
+
import { createTheme, ThemeProvider } from '../Theme';
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
color: ${(props) => props.theme.typography.color.main};
|
7
|
+
function withTheme(Component, { mode = 'light', pageWidth = 'md', palette, typography } = {}) {
|
8
|
+
const theme = createTheme({ mode, pageWidth, palette, typography });
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
text-decoration: none;
|
16
|
-
color: ${(props) => props.theme.palette.primary.dark};
|
17
|
-
}
|
10
|
+
const globalStyles = css`
|
11
|
+
font-family: ${theme.typography.fontFamily};
|
12
|
+
color: ${theme.typography.color.main};
|
18
13
|
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
a,
|
15
|
+
a:hover,
|
16
|
+
a:active {
|
17
|
+
text-decoration: none;
|
18
|
+
color: ${theme.palette.primary.dark};
|
19
|
+
}
|
22
20
|
|
23
|
-
|
24
|
-
|
25
|
-
margin: 0;
|
21
|
+
a:hover {
|
22
|
+
color: ${theme.palette.primary.main};
|
26
23
|
}
|
27
|
-
}
|
28
24
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
transition-property: background-color;
|
33
|
-
transition-duration: 600ms;
|
34
|
-
transition-timing-function: ease;
|
35
|
-
.footnote__title {
|
36
|
-
color: #fff;
|
25
|
+
.section--latest-post {
|
26
|
+
p:last-of-type {
|
27
|
+
margin: 0;
|
37
28
|
}
|
38
29
|
}
|
39
|
-
}
|
40
|
-
`;
|
41
30
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
31
|
+
.has-scrolled {
|
32
|
+
.section--footnotes {
|
33
|
+
position: static !important;
|
34
|
+
transition-property: background-color;
|
35
|
+
transition-duration: 600ms;
|
36
|
+
transition-timing-function: ease;
|
37
|
+
.footnote__title {
|
38
|
+
color: #fff;
|
39
|
+
}
|
40
|
+
}
|
48
41
|
}
|
42
|
+
`;
|
49
43
|
|
50
|
-
|
51
|
-
|
44
|
+
return function WithTheme(props) {
|
45
|
+
useEffect(() => {
|
52
46
|
const jssStyles = document.querySelector('#jss-server-side');
|
53
47
|
if (jssStyles && jssStyles.parentNode) {
|
54
48
|
jssStyles.parentNode.removeChild(jssStyles);
|
55
49
|
}
|
56
|
-
}
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
<
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
</ThemeProvider>
|
66
|
-
</MuiThemeProvider>
|
67
|
-
);
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
|
-
return WithTheme;
|
50
|
+
}, []);
|
51
|
+
return (
|
52
|
+
<ThemeProvider theme={theme}>
|
53
|
+
<CssBaseline />
|
54
|
+
<Global styles={globalStyles} />
|
55
|
+
<Component {...props} />
|
56
|
+
</ThemeProvider>
|
57
|
+
);
|
58
|
+
};
|
72
59
|
}
|
73
60
|
|
74
61
|
export default withTheme;
|