@arcblock/ux 2.3.0 → 2.4.2
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 +7 -9
- package/lib/Alert/index.js +6 -5
- package/lib/AnimationWaiter/index.js +6 -5
- package/lib/Badge/index.js +6 -5
- package/lib/Blocklet/blocklet.js +6 -5
- package/lib/Blocklet/utils.js +6 -5
- package/lib/BlockletNFT/index.js +6 -5
- package/lib/Center/index.js +6 -5
- package/lib/ClickToCopy/index.js +6 -5
- package/lib/CodeBlock/index.js +6 -5
- package/lib/ContactForm/index.js +6 -5
- package/lib/CookieConsent/index.js +6 -5
- package/lib/CountDown/index.js +6 -5
- package/lib/Datatable/CustomToolbar.js +7 -9
- package/lib/Datatable/DatatableContext.js +2 -2
- package/lib/Datatable/TableSearch.js +6 -5
- package/lib/Datatable/index.js +12 -15
- package/lib/Dialog/dialog.js +8 -10
- package/lib/Earth/index.js +7 -9
- package/lib/Empty/index.js +6 -5
- package/lib/ErrorBoundary/fallback.js +6 -5
- package/lib/Footer/index.js +6 -6
- package/lib/Header/auto-hidden.js +6 -5
- package/lib/Header/header.js +6 -5
- package/lib/Header/responsive-header.js +7 -9
- package/lib/Icon/image.js +6 -5
- package/lib/Icon/index.js +6 -5
- package/lib/InfoRow/index.js +6 -5
- package/lib/Layout/dashboard/index.js +7 -9
- package/lib/Layout/dashboard/sidebar.js +6 -5
- package/lib/Layout/dashboard-legacy/header.js +6 -5
- package/lib/Layout/dashboard-legacy/index.js +6 -5
- package/lib/Layout/dashboard-legacy/sidebar.js +7 -9
- package/lib/Layout/index.js +7 -9
- package/lib/Locale/selector.js +6 -5
- package/lib/Logo/index.js +6 -5
- package/lib/Metric/index.js +6 -6
- package/lib/NFTDisplay/aspect-ratio-container.js +6 -5
- package/lib/NFTDisplay/broken.js +6 -5
- package/lib/NFTDisplay/index.js +6 -5
- package/lib/NFTDisplay/loading.js +6 -5
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +9 -11
- package/lib/NavMenu/style.js +8 -13
- package/lib/PricingTable/PricingPlan.js +6 -5
- package/lib/PricingTable/index.js +6 -5
- package/lib/Result/result.js +6 -5
- package/lib/Screenshot/index.js +6 -5
- package/lib/SplitButton/index.js +7 -9
- package/lib/Tag/index.js +6 -5
- package/lib/TextCollapse/index.js +6 -5
- package/lib/Theme/theme-provider.js +9 -7
- package/lib/Video/index.js +6 -5
- package/lib/Wallet/Action.js +6 -5
- package/lib/Wallet/Download.js +6 -5
- package/lib/Wallet/Open.js +6 -5
- package/lib/WechatPrompt/index.js +6 -5
- package/lib/withTheme/index.js +9 -5
- package/package.json +5 -7
- package/src/ActivityIndicator/index.js +1 -1
- package/src/Alert/index.js +1 -1
- package/src/AnimationWaiter/index.js +1 -1
- package/src/Badge/index.js +1 -1
- package/src/Blocklet/blocklet.js +1 -1
- package/src/Blocklet/utils.js +1 -1
- package/src/BlockletNFT/index.js +1 -1
- package/src/Center/index.js +1 -1
- package/src/ClickToCopy/index.js +1 -1
- package/src/CodeBlock/index.js +1 -1
- package/src/ContactForm/index.js +1 -1
- package/src/CookieConsent/index.js +1 -1
- package/src/CountDown/index.js +1 -1
- package/src/Datatable/CustomToolbar.js +1 -1
- package/src/Datatable/DatatableContext.js +2 -2
- package/src/Datatable/TableSearch.js +1 -1
- package/src/Datatable/index.js +5 -4
- package/src/Dialog/dialog.js +1 -1
- package/src/Earth/index.js +1 -1
- package/src/Empty/index.js +1 -1
- package/src/ErrorBoundary/fallback.js +1 -1
- package/src/Footer/index.js +1 -1
- package/src/Header/auto-hidden.js +1 -1
- package/src/Header/header.js +1 -1
- package/src/Header/responsive-header.js +1 -1
- package/src/Icon/image.js +1 -1
- package/src/Icon/index.js +1 -1
- package/src/InfoRow/index.js +1 -1
- package/src/Layout/dashboard/index.js +1 -1
- package/src/Layout/dashboard/sidebar.js +1 -1
- package/src/Layout/dashboard-legacy/header.js +1 -1
- package/src/Layout/dashboard-legacy/index.js +1 -1
- package/src/Layout/dashboard-legacy/sidebar.js +1 -1
- package/src/Layout/index.js +1 -1
- package/src/Locale/selector.js +1 -1
- package/src/Logo/index.js +1 -1
- package/src/Metric/index.js +1 -1
- package/src/NFTDisplay/aspect-ratio-container.js +1 -1
- package/src/NFTDisplay/broken.js +1 -1
- package/src/NFTDisplay/index.js +1 -1
- package/src/NFTDisplay/loading.js +1 -1
- package/src/NFTDisplay/svg-embedder/inline-svg.js +2 -2
- package/src/NavMenu/style.js +1 -1
- package/src/PricingTable/PricingPlan.js +1 -1
- package/src/PricingTable/index.js +1 -1
- package/src/Result/result.js +1 -1
- package/src/Screenshot/index.js +1 -1
- package/src/SplitButton/index.js +1 -1
- package/src/Tag/index.js +1 -1
- package/src/TextCollapse/index.js +1 -1
- package/src/Theme/theme-provider.js +7 -6
- package/src/Video/index.js +1 -1
- package/src/Wallet/Action.js +1 -1
- package/src/Wallet/Download.js +1 -1
- package/src/Wallet/Open.js +1 -1
- package/src/WechatPrompt/index.js +1 -1
- package/src/withTheme/index.js +6 -4
package/src/Dialog/dialog.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
|
-
import styled from 'styled
|
2
|
+
import styled from '@emotion/styled';
|
3
3
|
import MuiDialog from '@mui/material/Dialog';
|
4
4
|
import MuiDialogContent from '@mui/material/DialogContent';
|
5
5
|
import DialogActions from '@mui/material/DialogActions';
|
package/src/Earth/index.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import { useReducer, useRef, useEffect } from 'react';
|
3
3
|
import useSpring from 'react-use/lib/useSpring';
|
4
4
|
import PropTypes from 'prop-types';
|
5
|
-
import styled from 'styled
|
5
|
+
import styled from '@emotion/styled';
|
6
6
|
import * as d3 from 'd3-geo';
|
7
7
|
import * as topojson from 'topojson-client';
|
8
8
|
import versor from 'versor';
|
package/src/Empty/index.js
CHANGED
package/src/Footer/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* eslint-disable react/no-unused-prop-types */
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import styled from 'styled
|
3
|
+
import styled from '@emotion/styled';
|
4
4
|
import Typography from '@mui/material/Typography';
|
5
5
|
import MuiContainer from '@mui/material/Container';
|
6
6
|
|
package/src/Header/header.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useState } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import styled from 'styled
|
3
|
+
import styled from '@emotion/styled';
|
4
4
|
import MenuIcon from '@mui/icons-material/Menu';
|
5
5
|
import CloseIcon from '@mui/icons-material/Close';
|
6
6
|
import Button from '@mui/material/IconButton';
|
package/src/Icon/image.js
CHANGED
package/src/Icon/index.js
CHANGED
package/src/InfoRow/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
2
|
import camelCase from 'lodash/camelCase';
|
3
3
|
import upperFirst from 'lodash/upperFirst';
|
4
|
-
import styled from 'styled
|
4
|
+
import styled from '@emotion/styled';
|
5
5
|
import Typography from '@mui/material/Typography';
|
6
6
|
|
7
7
|
function InfoRow({ name, nameFormatter, layout, children, valueComponent, nameWidth, ...rest }) {
|
@@ -2,7 +2,7 @@ import { useEffect, useMemo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { useLocation, matchPath } from 'react-router-dom';
|
4
4
|
import Helmet from 'react-helmet';
|
5
|
-
import styled from 'styled
|
5
|
+
import styled from '@emotion/styled';
|
6
6
|
import { useTheme } from '@mui/material/styles';
|
7
7
|
import Container from '@mui/material/Container';
|
8
8
|
import Hidden from '@mui/material/Hidden';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { useEffect, useState } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import Helmet from 'react-helmet';
|
4
|
-
import styled from 'styled
|
4
|
+
import styled from '@emotion/styled';
|
5
5
|
import Container from '@mui/material/Container';
|
6
6
|
import Box from '@mui/material/Box';
|
7
7
|
import Drawer from '@mui/material/Drawer';
|
package/src/Layout/index.js
CHANGED
package/src/Locale/selector.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* eslint-disable react/jsx-no-bind */
|
2
2
|
import { useState, useContext, useRef, useMemo } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
|
-
import styled from 'styled
|
4
|
+
import styled from '@emotion/styled';
|
5
5
|
|
6
6
|
import { useTheme } from '@mui/material/styles';
|
7
7
|
import Button from '@mui/material/Button';
|
package/src/Logo/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
|
-
import styled from 'styled
|
2
|
+
import styled from '@emotion/styled';
|
3
3
|
|
4
4
|
import { ReactComponent as LightLogo } from './images/logo-light-top.svg';
|
5
5
|
import { ReactComponent as LightText } from './images/logo-light-text.svg';
|
package/src/Metric/index.js
CHANGED
package/src/NFTDisplay/broken.js
CHANGED
package/src/NFTDisplay/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
2
2
|
import { useRef, useEffect, useState } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
|
-
import styled from 'styled
|
4
|
+
import styled from '@emotion/styled';
|
5
5
|
import clsx from 'clsx';
|
6
6
|
import { Buffer } from 'buffer';
|
7
7
|
import get from 'lodash/get';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
|
-
import styled from 'styled
|
3
|
-
import root from 'react-shadow/
|
2
|
+
import styled from '@emotion/styled';
|
3
|
+
import root from 'react-shadow/emotion';
|
4
4
|
|
5
5
|
/**
|
6
6
|
* inline svg 的方式嵌入 svg, 使用 shadow DOM 避免样式污染
|
package/src/NavMenu/style.js
CHANGED
package/src/Result/result.js
CHANGED
package/src/Screenshot/index.js
CHANGED
package/src/SplitButton/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useState, useRef, isValidElement } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import styled from 'styled
|
3
|
+
import styled from '@emotion/styled';
|
4
4
|
import ExpandMore from '@mui/icons-material/ExpandMore';
|
5
5
|
import Popper from '@mui/material/Popper';
|
6
6
|
import Paper from '@mui/material/Paper';
|
package/src/Tag/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
|
-
import { ThemeProvider as
|
2
|
+
import { ThemeProvider as EmotionThemeProvider } from '@emotion/react';
|
3
3
|
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
4
4
|
import StyledEngineProvider from '@mui/material/StyledEngineProvider';
|
5
5
|
import CssBaseline from '@mui/material/CssBaseline';
|
@@ -9,17 +9,16 @@ const defaultTheme = create();
|
|
9
9
|
|
10
10
|
/**
|
11
11
|
* 默认的 theme provider, 可以为 webapp/blocklet 快捷的配置好 mui theme provider
|
12
|
-
* 注: 目前 UX 依赖 styled-components, 所以该组件也内置了一个 StyledThemeProvider
|
13
12
|
*/
|
14
|
-
export default function ThemeProvider({ children, theme }) {
|
13
|
+
export default function ThemeProvider({ children, theme, injectFirst }) {
|
15
14
|
return (
|
16
15
|
// injectFirst 会影响 makeStyles 自定义样式和 mui styles 覆盖问题
|
17
|
-
<StyledEngineProvider injectFirst>
|
16
|
+
<StyledEngineProvider injectFirst={injectFirst}>
|
18
17
|
<MuiThemeProvider theme={theme}>
|
19
|
-
<
|
18
|
+
<EmotionThemeProvider theme={theme}>
|
20
19
|
<CssBaseline />
|
21
20
|
{children}
|
22
|
-
</
|
21
|
+
</EmotionThemeProvider>
|
23
22
|
</MuiThemeProvider>
|
24
23
|
</StyledEngineProvider>
|
25
24
|
);
|
@@ -28,9 +27,11 @@ export default function ThemeProvider({ children, theme }) {
|
|
28
27
|
ThemeProvider.propTypes = {
|
29
28
|
children: PropTypes.any,
|
30
29
|
theme: PropTypes.any,
|
30
|
+
injectFirst: PropTypes.bool,
|
31
31
|
};
|
32
32
|
|
33
33
|
ThemeProvider.defaultProps = {
|
34
34
|
children: null,
|
35
35
|
theme: defaultTheme,
|
36
|
+
injectFirst: true,
|
36
37
|
};
|
package/src/Video/index.js
CHANGED
package/src/Wallet/Action.js
CHANGED
package/src/Wallet/Download.js
CHANGED
package/src/Wallet/Open.js
CHANGED
package/src/withTheme/index.js
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { ThemeProvider,
|
2
|
+
import { Global, ThemeProvider, css } from '@emotion/react';
|
3
3
|
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
4
4
|
import CssBaseline from '@mui/material/CssBaseline';
|
5
5
|
|
6
6
|
import { create } from '../Theme';
|
7
7
|
|
8
|
-
const
|
8
|
+
const globalStyles = css`
|
9
9
|
font-family: ${(props) => props.theme.typography.fontFamily};
|
10
10
|
color: ${(props) => props.theme.typography.color.main};
|
11
11
|
|
12
|
-
a,
|
12
|
+
a,
|
13
|
+
a:hover,
|
14
|
+
a:active {
|
13
15
|
text-decoration: none;
|
14
16
|
color: ${(props) => props.theme.palette.primary.dark};
|
15
17
|
}
|
@@ -57,7 +59,7 @@ function withTheme(Component, { mode = 'light', pageWidth = 'md', palette, typog
|
|
57
59
|
return (
|
58
60
|
<MuiThemeProvider theme={this.theme}>
|
59
61
|
<CssBaseline />
|
60
|
-
<
|
62
|
+
<Global styles={globalStyles} />
|
61
63
|
<ThemeProvider theme={this.theme}>
|
62
64
|
<Component {...this.props} />
|
63
65
|
</ThemeProvider>
|