@arcblock/ux 3.0.10 → 3.0.12

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.
Files changed (73) hide show
  1. package/lib/ActivityIndicator/index.js +16 -16
  2. package/lib/Alert/index.js +17 -17
  3. package/lib/AnimationWaiter/index.js +13 -13
  4. package/lib/Blocklet/blocklet.js +15 -15
  5. package/lib/Blocklet/utils.d.ts +1 -1
  6. package/lib/Blocklet/utils.js +6 -5
  7. package/lib/BlockletNFT/index.js +23 -23
  8. package/lib/BlockletV2/utils.d.ts +1 -1
  9. package/lib/BlockletV2/utils.js +7 -6
  10. package/lib/Center/index.js +7 -6
  11. package/lib/CodeBlock/LightBox.d.ts +2 -3
  12. package/lib/CodeBlock/LightBox.js +3 -2
  13. package/lib/CookieConsent/index.js +1 -1
  14. package/lib/CountDown/index.js +24 -23
  15. package/lib/Datatable/CustomToolbar.js +71 -71
  16. package/lib/Datatable/TableSearch.js +18 -18
  17. package/lib/Datatable/index.js +77 -77
  18. package/lib/Earth/index.js +47 -46
  19. package/lib/Footer/index.js +8 -8
  20. package/lib/Icon/image.js +17 -16
  21. package/lib/InfoRow/index.js +11 -11
  22. package/lib/Layout/dashboard/index.js +2 -2
  23. package/lib/Layout/dashboard/sidebar.js +12 -12
  24. package/lib/Layout/dashboard-legacy/index.js +20 -20
  25. package/lib/Layout/dashboard-legacy/sidebar.js +16 -16
  26. package/lib/Layout/index.js +29 -29
  27. package/lib/Metric/index.js +9 -9
  28. package/lib/NFTDisplay/svg-embedder/inline-svg.js +7 -6
  29. package/lib/PricingTable/index.js +9 -9
  30. package/lib/Result/result.js +14 -14
  31. package/lib/Screenshot/BaseScreenshot/index.js +10 -9
  32. package/lib/Screenshot/index.js +27 -26
  33. package/lib/Video/index.js +11 -11
  34. package/lib/Wallet/Action.js +12 -12
  35. package/lib/Wallet/Download.js +11 -11
  36. package/lib/WechatPrompt/index.js +1 -1
  37. package/package.json +8 -8
  38. package/src/ActivityIndicator/index.jsx +3 -2
  39. package/src/Address/Address.stories.jsx +2 -1
  40. package/src/Alert/index.jsx +2 -2
  41. package/src/AnimationWaiter/index.jsx +2 -2
  42. package/src/Blocklet/blocklet.jsx +2 -2
  43. package/src/Blocklet/utils.jsx +2 -1
  44. package/src/BlockletNFT/index.jsx +2 -2
  45. package/src/BlockletV2/utils.js +2 -1
  46. package/src/Center/index.tsx +2 -1
  47. package/src/CodeBlock/LightBox.tsx +2 -1
  48. package/src/Colors/Colors.stories.jsx +1 -1
  49. package/src/CookieConsent/index.tsx +1 -1
  50. package/src/CountDown/index.tsx +2 -2
  51. package/src/DID/DID.stories.jsx +2 -1
  52. package/src/Datatable/CustomToolbar.jsx +3 -2
  53. package/src/Datatable/TableSearch.jsx +2 -2
  54. package/src/Datatable/index.jsx +4 -4
  55. package/src/Earth/index.tsx +3 -2
  56. package/src/Footer/index.tsx +1 -1
  57. package/src/Icon/image.tsx +2 -1
  58. package/src/InfoRow/index.tsx +2 -2
  59. package/src/Layout/dashboard/index.tsx +1 -1
  60. package/src/Layout/dashboard/sidebar.tsx +2 -2
  61. package/src/Layout/dashboard-legacy/index.tsx +1 -1
  62. package/src/Layout/dashboard-legacy/sidebar.tsx +2 -2
  63. package/src/Layout/index.tsx +2 -1
  64. package/src/Metric/index.tsx +2 -2
  65. package/src/NFTDisplay/svg-embedder/inline-svg.tsx +2 -2
  66. package/src/PricingTable/index.tsx +2 -2
  67. package/src/Result/result.tsx +1 -1
  68. package/src/Screenshot/BaseScreenshot/index.tsx +2 -2
  69. package/src/Screenshot/index.tsx +3 -3
  70. package/src/Video/index.tsx +2 -2
  71. package/src/Wallet/Action.tsx +2 -2
  72. package/src/Wallet/Download.tsx +2 -2
  73. package/src/WechatPrompt/index.tsx +1 -1
@@ -1,6 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { green, blue } from '@mui/material/colors';
4
+ import { Box } from '@mui/material';
4
5
 
5
6
  import Logo from '../Logo';
6
7
  import { styled, useTheme } from '../Theme';
@@ -54,7 +55,7 @@ ActivityIndicator.propTypes = {
54
55
  messages: PropTypes.arrayOf(PropTypes.string.isRequired),
55
56
  };
56
57
 
57
- const Div = styled('div')`
58
+ const Div = styled(Box)`
58
59
  && {
59
60
  box-sizing: border-box;
60
61
  padding: 20px;
@@ -113,7 +114,7 @@ Orbit.propTypes = {
113
114
  duration: PropTypes.number,
114
115
  };
115
116
 
116
- const OrbitRoot = styled('div')`
117
+ const OrbitRoot = styled(Box)`
117
118
  @keyframes orbit {
118
119
  0% {
119
120
  transform: rotate(0deg);
@@ -1,3 +1,4 @@
1
+ import { Box } from '@mui/material';
1
2
  import { styled } from '../Theme';
2
3
 
3
4
  export { default as WithDifferentSizes } from './demo/with-different-sizes';
@@ -23,7 +24,7 @@ export default {
23
24
  ],
24
25
  };
25
26
 
26
- const ResizableContainer = styled('div')`
27
+ const ResizableContainer = styled(Box)`
27
28
  width: 600px;
28
29
  max-width: 100%;
29
30
  padding: 16px;
@@ -1,5 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
- import { Typography } from '@mui/material';
2
+ import { Box, Typography } from '@mui/material';
3
3
  import { blueGrey } from '@mui/material/colors';
4
4
  import isUndefined from 'lodash/isUndefined';
5
5
 
@@ -106,7 +106,7 @@ Alert.propTypes = {
106
106
 
107
107
  export default withDeprecated(Alert, { name: 'Alert', alternative: '@mui/material/Alert' });
108
108
 
109
- const Container = styled('div')`
109
+ const Container = styled(Box)`
110
110
  display: flex;
111
111
  align-items: center;
112
112
  font-size: 16px;
@@ -1,5 +1,5 @@
1
1
  import { useState, useEffect, useRef } from 'react';
2
- import { Skeleton } from '@mui/material';
2
+ import { Box, Skeleton } from '@mui/material';
3
3
 
4
4
  import PropTypes from 'prop-types';
5
5
  import Lottie from 'react-lottie-player';
@@ -214,7 +214,7 @@ AnimationWaiter.propTypes = {
214
214
  increaseSpeed: PropTypes.number,
215
215
  };
216
216
 
217
- const Container = styled('div')`
217
+ const Container = styled(Box)`
218
218
  display: flex;
219
219
  justify-content: center;
220
220
  align-items: center;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable react/no-danger */
2
2
  import { isValidElement } from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { CircularProgress, Typography, useMediaQuery } from '@mui/material';
4
+ import { Box, CircularProgress, Typography, useMediaQuery } from '@mui/material';
5
5
 
6
6
  import Avatar from '../Avatar';
7
7
  import Button from '../Button';
@@ -9,7 +9,7 @@ import Img from '../Img';
9
9
  import { useTheme, styled } from '../Theme';
10
10
  import { strippedString } from './utils';
11
11
 
12
- const Div = styled('div')`
12
+ const Div = styled(Box)`
13
13
  &.arcblock-blocklet {
14
14
  padding: ${(props) => props.theme.spacing(2)} ${(props) => props.theme.spacing(2)} 0
15
15
  ${(props) => props.theme.spacing(2)};
@@ -1,6 +1,7 @@
1
+ import { Box } from '@mui/material';
1
2
  import { styled } from '../Theme';
2
3
 
3
- const ActionButton = styled('div')`
4
+ const ActionButton = styled(Box)`
4
5
  background-color: transparent !important;
5
6
  & > :not(.Mui-disabled) {
6
7
  position: relative;
@@ -1,6 +1,6 @@
1
1
  import { useRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Portal, Typography, CircularProgress, useMediaQuery } from '@mui/material';
3
+ import { Portal, Typography, CircularProgress, useMediaQuery, Box } from '@mui/material';
4
4
 
5
5
  import Avatar from '../Avatar';
6
6
  import Icon from '../Icon';
@@ -25,7 +25,7 @@ function prettySize(_size, digits = 1) {
25
25
  return _size && `${size}${list[index]}`;
26
26
  }
27
27
 
28
- const Div = styled('div')`
28
+ const Div = styled(Box)`
29
29
  &.arcblock-blocklet {
30
30
  padding: 0 16px;
31
31
  background: ${(props) => props.theme.palette.common.white};
@@ -1,6 +1,7 @@
1
+ import { Box } from '@mui/material';
1
2
  import { styled } from '../Theme';
2
3
 
3
- const ActionButton = styled('div')`
4
+ const ActionButton = styled(Box)`
4
5
  background-color: transparent !important;
5
6
  & > :not(.Mui-disabled) {
6
7
  position: relative;
@@ -1,3 +1,4 @@
1
+ import { Box } from '@mui/material';
1
2
  import { styled } from '../Theme';
2
3
 
3
4
  export default function Center({
@@ -22,7 +23,7 @@ export default function Center({
22
23
  return <Div style={style}>{children}</Div>;
23
24
  }
24
25
 
25
- const Div = styled('div')`
26
+ const Div = styled(Box)`
26
27
  flex: 1;
27
28
  width: 100vw;
28
29
  height: 100vh;
@@ -1,7 +1,8 @@
1
1
  // highlight.js/styles/atom-one-light.css
2
2
  import styled from '@emotion/styled';
3
+ import { Box } from '@mui/material';
3
4
 
4
- const LightBox = styled('div')`
5
+ const LightBox = styled(Box)`
5
6
  display: block;
6
7
  pre code.hljs {
7
8
  display: block;
@@ -205,7 +205,7 @@ export function MuiThemeBoxButton() {
205
205
 
206
206
  MuiThemeBoxButton.storyName = 'mui theme & Box/Button';
207
207
 
208
- const StyledComponentTestBox = styled('div')`
208
+ const StyledComponentTestBox = styled(Box)`
209
209
  padding: 16px;
210
210
  background-color: ${colors.success.main};
211
211
  `;
@@ -70,7 +70,7 @@ export default function DefaultCookieConsent({
70
70
  );
71
71
  }
72
72
 
73
- const Wrapper = styled('div')`
73
+ const Wrapper = styled(Box)`
74
74
  box-sizing: border-box;
75
75
  position: fixed;
76
76
  right: 20px;
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'react';
2
- import { type SxProps } from '@mui/material';
2
+ import { Box, type SxProps } from '@mui/material';
3
3
  import isUndefined from 'lodash/isUndefined';
4
4
 
5
5
  import { getColor, mergeProps } from '../Util';
@@ -118,7 +118,7 @@ export default class CountDown extends Component<CountDownProps, CountDownState>
118
118
  const textBackground = `linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
119
119
  linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5) 77%, rgba(0, 0, 0, 0.5))`;
120
120
 
121
- const Container = styled('div', { shouldForwardProp: (prop) => prop !== 'dark' })<{ dark: boolean }>`
121
+ const Container = styled(Box, { shouldForwardProp: (prop) => prop !== 'dark' })<{ dark: boolean }>`
122
122
  color: ${(props) => getColor(props)};
123
123
  font-size: 50px;
124
124
  display: flex;
@@ -1,3 +1,4 @@
1
+ import { Box } from '@mui/material';
1
2
  import { styled } from '../Theme';
2
3
 
3
4
  export { default as ActionTest } from './demo/action-test';
@@ -22,7 +23,7 @@ export default {
22
23
  ],
23
24
  };
24
25
 
25
- const ResizableContainer = styled('div')`
26
+ const ResizableContainer = styled(Box)`
26
27
  width: 100%;
27
28
  max-width: 100%;
28
29
  padding: 16px;
@@ -19,6 +19,7 @@ import {
19
19
  MenuItem,
20
20
  Tooltip,
21
21
  IconButton,
22
+ Box,
22
23
  } from '@mui/material';
23
24
  import { useDeepCompareEffect } from 'ahooks';
24
25
 
@@ -350,7 +351,7 @@ CustomToolbar.propTypes = {
350
351
  tableRef: PropTypes.func.isRequired,
351
352
  };
352
353
 
353
- const Container = styled('div')`
354
+ const Container = styled(Box)`
354
355
  display: flex;
355
356
  align-items: center;
356
357
  height: 56px;
@@ -412,7 +413,7 @@ const Container = styled('div')`
412
413
  }
413
414
  `;
414
415
 
415
- const ProgressContainer = styled('div')`
416
+ const ProgressContainer = styled(Box)`
416
417
  width: 100%;
417
418
  height: 2px;
418
419
  .toolbar-progress {
@@ -1,6 +1,6 @@
1
1
  import { useState, useRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { IconButton, Tooltip, TextField } from '@mui/material';
3
+ import { IconButton, Tooltip, TextField, Box } from '@mui/material';
4
4
  import { Search as SearchIcon, Clear as ClearIcon } from '@mui/icons-material';
5
5
  import clsx from 'clsx';
6
6
  import noop from 'lodash/noop';
@@ -113,7 +113,7 @@ TableSearch.propTypes = {
113
113
  searchClose: PropTypes.func.isRequired,
114
114
  };
115
115
 
116
- const Container = styled('div')`
116
+ const Container = styled(Box)`
117
117
  display: flex;
118
118
  align-items: center;
119
119
  .toolbar-search-area {
@@ -8,7 +8,7 @@ import cloneDeep from 'lodash/cloneDeep';
8
8
  import get from 'lodash/get';
9
9
  import clsx from 'clsx';
10
10
  import { useCreation, useDeepCompareEffect } from 'ahooks';
11
- import { CircularProgress } from '@mui/material';
11
+ import { Box, CircularProgress } from '@mui/material';
12
12
 
13
13
  import Empty from '../Empty';
14
14
  import CustomToolbar from './CustomToolbar';
@@ -66,7 +66,7 @@ import { styled } from '../Theme';
66
66
  * } & ModifiedMUIDataTableProps} DataTableProps
67
67
  */
68
68
 
69
- const FilterLine = styled('div')`
69
+ const FilterLine = styled(Box)`
70
70
  display: flex;
71
71
  align-items: center;
72
72
  .toolbar-filter-content {
@@ -481,7 +481,7 @@ const alignCss = css`
481
481
  }
482
482
  `;
483
483
 
484
- const TableContainer = styled('div', {
484
+ const TableContainer = styled(Box, {
485
485
  shouldForwardProp: (prop) => !['verticalKeyWidth', 'bgColor', 'hoverColor', 'stripColor'].includes(prop),
486
486
  })(({ theme, verticalKeyWidth, bgColor, hoverColor, stripColor }) => {
487
487
  const primaryTextColor = theme.palette.text.primary;
@@ -607,7 +607,7 @@ const TableContainer = styled('div', {
607
607
  `;
608
608
  });
609
609
 
610
- const FooterContainer = styled('div')`
610
+ const FooterContainer = styled(Box)`
611
611
  display: flex;
612
612
  align-items: center;
613
613
  .datatable-footer {
@@ -4,6 +4,7 @@ import useSpring from 'react-use/lib/useSpring';
4
4
  import * as d3 from 'd3-geo';
5
5
  import * as topojson from 'topojson-client';
6
6
  import versor from 'versor';
7
+ import { Box } from '@mui/material';
7
8
 
8
9
  import json from './countries.json';
9
10
  import util from './util';
@@ -393,7 +394,7 @@ type ContainerProps = {
393
394
  colors: Colors;
394
395
  };
395
396
 
396
- const Container = styled('div')<ContainerProps>`
397
+ const Container = styled(Box)<ContainerProps>`
397
398
  background-color: ${(props) => (props.$theme === 'light' ? '#f7f7f7' : '#222')};
398
399
  width: ${(props) => props.width}px;
399
400
  height: ${(props) => props.height}px;
@@ -476,7 +477,7 @@ const Container = styled('div')<ContainerProps>`
476
477
  }
477
478
  `;
478
479
 
479
- const Tooltip = styled('div')`
480
+ const Tooltip = styled(Box)`
480
481
  position: absolute;
481
482
  width: auto;
482
483
  min-width: 90px;
@@ -63,7 +63,7 @@ type ContainerProps = {
63
63
  dark: boolean;
64
64
  };
65
65
 
66
- const Container = styled('div', {
66
+ const Container = styled(Box, {
67
67
  shouldForwardProp: (prop) => prop !== 'dark',
68
68
  })<ContainerProps>`
69
69
  position: relative;
@@ -1,3 +1,4 @@
1
+ import { Box } from '@mui/material';
1
2
  import Img, { type ImgProps } from '../Img';
2
3
  import { styled } from '../Theme';
3
4
 
@@ -36,7 +37,7 @@ export default function ImageIcon({
36
37
  );
37
38
  }
38
39
 
39
- const Div = styled('div')`
40
+ const Div = styled(Box)`
40
41
  position: relative;
41
42
  .badge-point {
42
43
  position: absolute;
@@ -1,6 +1,6 @@
1
1
  import camelCase from 'lodash/camelCase';
2
2
  import upperFirst from 'lodash/upperFirst';
3
- import { Typography } from '@mui/material';
3
+ import { Box, Typography } from '@mui/material';
4
4
 
5
5
  import { styled } from '../Theme';
6
6
 
@@ -51,7 +51,7 @@ type ContainerProps = {
51
51
  width: number;
52
52
  };
53
53
 
54
- const Container = styled('div')<ContainerProps>`
54
+ const Container = styled(Box)<ContainerProps>`
55
55
  display: flex;
56
56
  flex-direction: ${(props) => (props.layout === 'vertical' ? 'column' : 'row')};
57
57
  justify-content: flex-start;
@@ -177,7 +177,7 @@ function Dashboard({
177
177
 
178
178
  type WrapperProps = React.HTMLAttributes<HTMLDivElement> & { sidebarWidth: number };
179
179
 
180
- const Wrapper = styled('div', {
180
+ const Wrapper = styled(Box, {
181
181
  shouldForwardProp: (prop) => prop !== 'sidebarWidth',
182
182
  })<WrapperProps>`
183
183
  &.dashboard {
@@ -1,4 +1,4 @@
1
- import { Typography } from '@mui/material';
1
+ import { Box, Typography } from '@mui/material';
2
2
  import clsx from 'clsx';
3
3
  import { styled } from '../../Theme';
4
4
  import { NavLink } from './external-link';
@@ -66,7 +66,7 @@ function Sidebar({ links, addons = undefined, dense = false, ...rest }: SidebarP
66
66
 
67
67
  const gradient = 'linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))';
68
68
 
69
- const Root = styled('div')`
69
+ const Root = styled(Box)`
70
70
  display: flex;
71
71
  flex-direction: column;
72
72
  ul {
@@ -8,7 +8,7 @@ import Header from './header';
8
8
  import Footer from '../../Footer';
9
9
  import { styled } from '../../Theme';
10
10
 
11
- const Wrapper = styled('div')`
11
+ const Wrapper = styled(Box)`
12
12
  &.dashboard {
13
13
  display: flex;
14
14
  flex-direction: column;
@@ -1,6 +1,6 @@
1
1
  import { memo } from 'react';
2
2
  import { Link, useLocation } from 'react-router-dom';
3
- import { Button, Typography, type SxProps, type ButtonProps } from '@mui/material';
3
+ import { Button, Typography, type SxProps, type ButtonProps, Box } from '@mui/material';
4
4
  import { teal } from '@mui/material/colors';
5
5
 
6
6
  import ImageIcon from '../../Icon/image';
@@ -69,7 +69,7 @@ export default function Sidebar({
69
69
  );
70
70
  }
71
71
 
72
- const MenuItems = memo(styled('div')`
72
+ const MenuItems = memo(styled(Box)`
73
73
  flex: 1;
74
74
  display: flex;
75
75
  flex-direction: column;
@@ -13,6 +13,7 @@ import {
13
13
  Typography,
14
14
  type SxProps,
15
15
  ListItemButton,
16
+ Box,
16
17
  } from '@mui/material';
17
18
  import { Menu as MenuIcon } from '@mui/icons-material';
18
19
 
@@ -196,7 +197,7 @@ export default function Layout({
196
197
  );
197
198
  }
198
199
 
199
- const Div = styled('div')`
200
+ const Div = styled(Box)`
200
201
  width: 100%;
201
202
  min-height: 100vh;
202
203
  display: flex;
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/no-danger */
2
- import { Link } from '@mui/material';
2
+ import { Box, Link } from '@mui/material';
3
3
 
4
4
  import ImageIcon from '../Icon/image';
5
5
  import { styled } from '../Theme';
@@ -56,7 +56,7 @@ type ContainerProps = {
56
56
  size?: 'small' | 'large';
57
57
  };
58
58
 
59
- const Container = styled('div')<ContainerProps>`
59
+ const Container = styled(Box)<ContainerProps>`
60
60
  border-left: 1px solid ${(props) => props.theme.palette.divider};
61
61
  padding: 10px 0 10px 16px;
62
62
  @media (max-width: ${(props) => props.theme.breakpoints.values.sm}px) {
@@ -1,5 +1,5 @@
1
1
  import root from 'react-shadow/emotion';
2
- import { type SxProps } from '@mui/material';
2
+ import { Box, type SxProps } from '@mui/material';
3
3
 
4
4
  import { styled } from '../../Theme';
5
5
 
@@ -23,7 +23,7 @@ const Root = styled(root.span)`
23
23
  height: 100%;
24
24
  `;
25
25
 
26
- const Inner = styled('div')`
26
+ const Inner = styled(Box)`
27
27
  &,
28
28
  & > svg {
29
29
  height: 100%;
@@ -1,4 +1,4 @@
1
- import { Grid } from '@mui/material';
1
+ import { Box, Grid } from '@mui/material';
2
2
 
3
3
  import PricingPlan, { type PricingPlanProps } from './PricingPlan';
4
4
  import { styled } from '../Theme';
@@ -44,7 +44,7 @@ type DivProps = {
44
44
  variant: 'even' | 'odd';
45
45
  };
46
46
 
47
- const Div = styled('div')<DivProps>`
47
+ const Div = styled(Box)<DivProps>`
48
48
  padding: 100px 0;
49
49
  text-align: center;
50
50
  background-color: ${(props) => (props.variant === 'even' ? '#fbfbfb' : '#ffffff')};
@@ -50,7 +50,7 @@ function Result({ icon = null, title = '', description = '', extra = null, ...re
50
50
  );
51
51
  }
52
52
 
53
- const Root = styled('div')`
53
+ const Root = styled(Box)`
54
54
  box-sizing: border-box;
55
55
  display: flex;
56
56
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import { type SxProps } from '@mui/material';
1
+ import { Box, type SxProps } from '@mui/material';
2
2
 
3
3
  import phone from './shells/Phone';
4
4
  import macbook from './shells/Macbook';
@@ -20,7 +20,7 @@ function Screenshot({ width = 0, children, type = 'phone', ...rest }: Screenshot
20
20
 
21
21
  const { Shell, ratio, screenData, width: defaultWidth } = map[(_type as keyof typeof map) || 'phone'];
22
22
 
23
- const Root = styled('div')`
23
+ const Root = styled(Box)`
24
24
  position: relative;
25
25
  display: inline-block;
26
26
  width: ${width || `${defaultWidth}px`};
@@ -1,5 +1,5 @@
1
1
  import { createElement, Children, cloneElement, useEffect, useRef, useState } from 'react';
2
- import { type SxProps } from '@mui/material';
2
+ import { Box, type SxProps } from '@mui/material';
3
3
  import isUndefined from 'lodash/isUndefined';
4
4
 
5
5
  import { mergeProps } from '../Util';
@@ -195,7 +195,7 @@ type DivProps = {
195
195
  contentZIndex: number;
196
196
  };
197
197
 
198
- const Div = styled('div')<DivProps>`
198
+ const Div = styled(Box)<DivProps>`
199
199
  @media (max-width: ${(props) => types[props.type].width}px) {
200
200
  transform-origin: 0 0;
201
201
  transform: scale(${(props) => types[props.type].scale});
@@ -266,7 +266,7 @@ function ScreenFixer({ ...props }: ScreenFixerProps) {
266
266
  );
267
267
  }
268
268
 
269
- const ReScreen = styled('div')`
269
+ const ReScreen = styled(Box)`
270
270
  div[type] {
271
271
  transform: scale(1);
272
272
  transform-origin: 0 0;
@@ -1,6 +1,6 @@
1
1
  import { useState } from 'react';
2
2
  import Player from 'react-player';
3
- import { CircularProgress } from '@mui/material';
3
+ import { Box, CircularProgress } from '@mui/material';
4
4
  import isUndefined from 'lodash/isUndefined';
5
5
 
6
6
  import { mergeProps } from '../Util';
@@ -54,7 +54,7 @@ export default function Video(rawProps: VideoProps) {
54
54
  );
55
55
  }
56
56
 
57
- const Placeholder = styled('div')`
57
+ const Placeholder = styled(Box)`
58
58
  background-color: #222222;
59
59
  display: flex;
60
60
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import { Typography } from '@mui/material';
1
+ import { Box, Typography } from '@mui/material';
2
2
  import isUndefined from 'lodash/isUndefined';
3
3
 
4
4
  import logo from './images/abtwallet.png';
@@ -76,7 +76,7 @@ type ContentProps = {
76
76
  color: string;
77
77
  };
78
78
 
79
- const Content = styled('div')<ContentProps>`
79
+ const Content = styled(Box)<ContentProps>`
80
80
  display: flex;
81
81
  justify-content: center;
82
82
  align-items: center;
@@ -1,5 +1,5 @@
1
1
  import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
2
- import { Typography, type SxProps } from '@mui/material';
2
+ import { Box, Typography, type SxProps } from '@mui/material';
3
3
  import isUndefined from 'lodash/isUndefined';
4
4
 
5
5
  import AppStoreIcon from './images/app-store.svg?react';
@@ -125,7 +125,7 @@ type ContainerProps = {
125
125
  storeLayout?: WalletDownloadProps['storeLayout'];
126
126
  };
127
127
 
128
- const Container = styled('div')<ContainerProps>`
128
+ const Container = styled(Box)<ContainerProps>`
129
129
  display: flex;
130
130
  flex-direction: ${(props) => (props.layout === 'vertical' ? 'column' : 'row')};
131
131
  align-items: center;
@@ -44,7 +44,7 @@ export default function WechatPrompt() {
44
44
  );
45
45
  }
46
46
 
47
- const Container = styled('div')`
47
+ const Container = styled(Box)`
48
48
  .wechat-title {
49
49
  height: 80px;
50
50
  line-height: 80px;