@arcblock/ux 2.13.31 → 2.13.33

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.
@@ -135,11 +135,11 @@ export default function BlockletStore(props) {
135
135
  }) : item.icon
136
136
  }, item.key))]
137
137
  }), onButtonClick && /*#__PURE__*/_jsxs(Button, {
138
- color: "reverse",
139
138
  variant: "outlined",
140
139
  size: "small",
141
140
  disabled: buttonDisabled || buttonLoading,
142
141
  style: {
142
+ color: theme.palette.text.primary,
143
143
  borderColor: theme.palette.grey[300],
144
144
  borderRadius: 8,
145
145
  fontSize: 13,
@@ -7,7 +7,7 @@ export default function TooltipIcon({
7
7
  slotProps,
8
8
  fontSize = 12,
9
9
  fontWeight = 500,
10
- color = 'text.secondary',
10
+ color = 'text.contrast',
11
11
  ...props
12
12
  }) {
13
13
  return title ? /*#__PURE__*/_jsx(Tooltip, {
@@ -19,10 +19,9 @@ export default function TooltipIcon({
19
19
  ...slotProps?.popper,
20
20
  sx: [{
21
21
  [`& .${tooltipClasses.tooltip}`]: {
22
- backgroundColor: 'common.white',
23
22
  fontSize,
24
23
  fontWeight,
25
- boxShadow: '0px 4px 8px 0px #03071214, 0px 0px 0px 1px #03071214',
24
+ boxShadow: 2,
26
25
  marginBottom: '6px !important',
27
26
  borderRadius: '8px',
28
27
  cursor: 'default',
@@ -1 +1,2 @@
1
1
  export * from './config-provider';
2
+ export { default as ThemeModeToggle } from './theme-mode-toggle';
@@ -1 +1,2 @@
1
- export * from './config-provider';
1
+ export * from './config-provider';
2
+ export { default as ThemeModeToggle } from './theme-mode-toggle';
@@ -75,10 +75,21 @@ const Wrapper = styled('div')`
75
75
  max-width: 440px;
76
76
  padding: 16px 24px;
77
77
  font-size: 16px;
78
- color: #666;
79
- background: #fff;
80
- border-radius: 6px;
81
- box-shadow: 0 0 18px rgba(0, 0, 0, 0.2);
78
+ color: ${({
79
+ theme
80
+ }) => theme.palette.grey[500]};
81
+ background: ${({
82
+ theme
83
+ }) => theme.palette.background.paper};
84
+ border: 1px solid ${({
85
+ theme
86
+ }) => theme.palette.divider};
87
+ border-radius: ${({
88
+ theme
89
+ }) => theme.shape.borderRadius}px;
90
+ box-shadow: ${({
91
+ theme
92
+ }) => theme.shadows[4]};
82
93
  &:empty {
83
94
  display: none;
84
95
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /* eslint-disable react/no-danger */
3
- import { Link } from '@mui/material';
3
+ import { Link, useTheme } from '@mui/material';
4
4
  import ImageIcon from '../Icon/image';
5
5
  import { styled } from '../Theme';
6
6
  export default function Metric({
@@ -12,6 +12,9 @@ export default function Metric({
12
12
  LinkComponent = Link,
13
13
  prefix = '/images'
14
14
  }) {
15
+ const {
16
+ palette
17
+ } = useTheme();
15
18
  const metric = /*#__PURE__*/_jsxs(_Fragment, {
16
19
  children: [/*#__PURE__*/_jsx("div", {
17
20
  className: "metric__image",
@@ -20,7 +23,7 @@ export default function Metric({
20
23
  alt: typeof name === 'string' ? name : '',
21
24
  size: 30,
22
25
  prefix: prefix,
23
- color: "#222222"
26
+ color: palette.text.primary
24
27
  })
25
28
  }), /*#__PURE__*/_jsxs("div", {
26
29
  children: [/*#__PURE__*/_jsx("div", {
@@ -42,7 +45,7 @@ export default function Metric({
42
45
  });
43
46
  }
44
47
  const Container = styled('div')`
45
- border-left: 1px solid ${props => props.theme.typography.color.main};
48
+ border-left: 1px solid ${props => props.theme.palette.divider};
46
49
  padding: 10px 0 10px 16px;
47
50
  @media (max-width: ${props => props.theme.breakpoints.values.sm}px) {
48
51
  padding: 0 0 0 8px;
@@ -67,7 +70,7 @@ const Container = styled('div')`
67
70
  font-size: ${props => props.size === 'small' ? 32 : 36}px;
68
71
  font-weight: 600;
69
72
  line-height: 36px;
70
- color: ${props => props.theme.typography.color.main};
73
+ color: ${props => props.theme.palette.text.primary};
71
74
 
72
75
  small {
73
76
  font-size: 12px;
@@ -94,7 +97,7 @@ const Container = styled('div')`
94
97
  text-transform: capitalize;
95
98
  line-height: 1.2;
96
99
  font-weight: 500;
97
- color: ${props => props.theme.typography.color.main};
100
+ color: ${props => props.theme.palette.text.primary};
98
101
  @media (max-width: ${props => props.theme.breakpoints.values.sm}px) {
99
102
  font-size: 10px;
100
103
  line-height: 1;
@@ -42,7 +42,7 @@ function NavMenu({
42
42
  ...rest
43
43
  }) {
44
44
  const theme = useTheme();
45
- const $textColor = useCreation(() => theme.palette.grey[400], [theme]);
45
+ const $textColor = useCreation(() => theme.palette.text.secondary, [theme]);
46
46
  const $activeTextColor = useCreation(() => theme.palette.text.primary, [theme]);
47
47
  const $bgColor = useCreation(() => theme.palette.background.default, [theme]);
48
48
  // eslint-disable-next-line no-param-reassign
@@ -1608,7 +1608,7 @@ export default function Products({
1608
1608
  icon: /*#__PURE__*/_jsx(AIKitSvg, {})
1609
1609
  }, {
1610
1610
  label: /*#__PURE__*/_jsx(Link, {
1611
- to: `https://www.blocklet.io/${locale}`,
1611
+ to: `https://www.blocklet.io/${locale}/payment-kit`,
1612
1612
  target: "_blank",
1613
1613
  rel: "noreferrer noopener",
1614
1614
  children: "Payment Kit"
@@ -43,9 +43,9 @@ const translations = {
43
43
  },
44
44
  zh: {
45
45
  utc: 'UTC 时区',
46
- local: '本地时区',
46
+ local: '当前时区',
47
47
  shortUTC: 'UTC',
48
- shortLocal: '本地'
48
+ shortLocal: '当前时区'
49
49
  }
50
50
  };
51
51
  function useRelativeTime({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.13.31",
3
+ "version": "2.13.33",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -71,14 +71,14 @@
71
71
  "react": ">=18.2.0",
72
72
  "react-router-dom": ">=6.22.3"
73
73
  },
74
- "gitHead": "66ef51b4b217d15985838eb2c058ec833c07e1cd",
74
+ "gitHead": "b835dedcd8f2e473082e4c1aee0a8cb3ed0e78ec",
75
75
  "dependencies": {
76
76
  "@arcblock/did-motif": "^1.1.13",
77
- "@arcblock/icons": "^2.13.31",
78
- "@arcblock/nft-display": "^2.13.31",
79
- "@arcblock/react-hooks": "^2.13.31",
77
+ "@arcblock/icons": "^2.13.33",
78
+ "@arcblock/nft-display": "^2.13.33",
79
+ "@arcblock/react-hooks": "^2.13.33",
80
80
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
81
- "@blocklet/theme": "^2.13.31",
81
+ "@blocklet/theme": "^2.13.33",
82
82
  "@fontsource/roboto": "~5.1.1",
83
83
  "@fontsource/ubuntu-mono": "^5.0.18",
84
84
  "@iconify-icons/logos": "^1.2.36",
@@ -136,11 +136,11 @@ export default function BlockletStore(props: IBlockletStore) {
136
136
  </Box>
137
137
  {onButtonClick && (
138
138
  <Button
139
- color="reverse"
140
139
  variant="outlined"
141
140
  size="small"
142
141
  disabled={buttonDisabled || buttonLoading}
143
142
  style={{
143
+ color: theme.palette.text.primary,
144
144
  borderColor: theme.palette.grey[300],
145
145
  borderRadius: 8,
146
146
  fontSize: 13,
@@ -13,7 +13,7 @@ export default function TooltipIcon({
13
13
  slotProps,
14
14
  fontSize = 12,
15
15
  fontWeight = 500,
16
- color = 'text.secondary',
16
+ color = 'text.contrast',
17
17
  ...props
18
18
  }: TooltipIconProps) {
19
19
  return title ? (
@@ -27,10 +27,9 @@ export default function TooltipIcon({
27
27
  sx: [
28
28
  {
29
29
  [`& .${tooltipClasses.tooltip}`]: {
30
- backgroundColor: 'common.white',
31
30
  fontSize,
32
31
  fontWeight,
33
- boxShadow: '0px 4px 8px 0px #03071214, 0px 0px 0px 1px #03071214',
32
+ boxShadow: 2,
34
33
  marginBottom: '6px !important',
35
34
  borderRadius: '8px',
36
35
  cursor: 'default',
@@ -1 +1,2 @@
1
1
  export * from './config-provider';
2
+ export { default as ThemeModeToggle } from './theme-mode-toggle';
@@ -79,10 +79,11 @@ const Wrapper = styled('div')`
79
79
  max-width: 440px;
80
80
  padding: 16px 24px;
81
81
  font-size: 16px;
82
- color: #666;
83
- background: #fff;
84
- border-radius: 6px;
85
- box-shadow: 0 0 18px rgba(0, 0, 0, 0.2);
82
+ color: ${({ theme }) => theme.palette.grey[500]};
83
+ background: ${({ theme }) => theme.palette.background.paper};
84
+ border: 1px solid ${({ theme }) => theme.palette.divider};
85
+ border-radius: ${({ theme }) => theme.shape.borderRadius}px;
86
+ box-shadow: ${({ theme }) => theme.shadows[4]};
86
87
  &:empty {
87
88
  display: none;
88
89
  }
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/no-danger */
2
- import { Link } from '@mui/material';
2
+ import { Link, useTheme } from '@mui/material';
3
3
 
4
4
  import ImageIcon from '../Icon/image';
5
5
  import { styled } from '../Theme';
@@ -23,10 +23,17 @@ export default function Metric({
23
23
  LinkComponent = Link,
24
24
  prefix = '/images',
25
25
  }: MetricProps) {
26
+ const { palette } = useTheme();
26
27
  const metric = (
27
28
  <>
28
29
  <div className="metric__image">
29
- <ImageIcon name={icon} alt={typeof name === 'string' ? name : ''} size={30} prefix={prefix} color="#222222" />
30
+ <ImageIcon
31
+ name={icon}
32
+ alt={typeof name === 'string' ? name : ''}
33
+ size={30}
34
+ prefix={prefix}
35
+ color={palette.text.primary}
36
+ />
30
37
  </div>
31
38
  <div>
32
39
  <div
@@ -46,7 +53,7 @@ type ContainerProps = {
46
53
  };
47
54
 
48
55
  const Container = styled('div')<ContainerProps>`
49
- border-left: 1px solid ${(props) => props.theme.typography.color.main};
56
+ border-left: 1px solid ${(props) => props.theme.palette.divider};
50
57
  padding: 10px 0 10px 16px;
51
58
  @media (max-width: ${(props) => props.theme.breakpoints.values.sm}px) {
52
59
  padding: 0 0 0 8px;
@@ -71,7 +78,7 @@ const Container = styled('div')<ContainerProps>`
71
78
  font-size: ${(props) => (props.size === 'small' ? 32 : 36)}px;
72
79
  font-weight: 600;
73
80
  line-height: 36px;
74
- color: ${(props) => props.theme.typography.color.main};
81
+ color: ${(props) => props.theme.palette.text.primary};
75
82
 
76
83
  small {
77
84
  font-size: 12px;
@@ -98,7 +105,7 @@ const Container = styled('div')<ContainerProps>`
98
105
  text-transform: capitalize;
99
106
  line-height: 1.2;
100
107
  font-weight: 500;
101
- color: ${(props) => props.theme.typography.color.main};
108
+ color: ${(props) => props.theme.palette.text.primary};
102
109
  @media (max-width: ${(props) => props.theme.breakpoints.values.sm}px) {
103
110
  font-size: 10px;
104
111
  line-height: 1;
@@ -65,7 +65,7 @@ function NavMenu({
65
65
  ...rest
66
66
  }: NavMenuProps) {
67
67
  const theme = useTheme();
68
- const $textColor = useCreation(() => theme.palette.grey[400], [theme]);
68
+ const $textColor = useCreation(() => theme.palette.text.secondary, [theme]);
69
69
  const $activeTextColor = useCreation(() => theme.palette.text.primary, [theme]);
70
70
  const $bgColor = useCreation(() => theme.palette.background.default, [theme]);
71
71
  // eslint-disable-next-line no-param-reassign
@@ -295,7 +295,7 @@ export default function Products({ className, isOpen, ...rest }: ProductsProps)
295
295
  },
296
296
  {
297
297
  label: (
298
- <Link to={`https://www.blocklet.io/${locale}`} target="_blank" rel="noreferrer noopener">
298
+ <Link to={`https://www.blocklet.io/${locale}/payment-kit`} target="_blank" rel="noreferrer noopener">
299
299
  Payment Kit
300
300
  </Link>
301
301
  ),
@@ -45,9 +45,9 @@ const translations: Record<Locale, { utc: string; local: string; shortUTC: strin
45
45
  },
46
46
  zh: {
47
47
  utc: 'UTC 时区',
48
- local: '本地时区',
48
+ local: '当前时区',
49
49
  shortUTC: 'UTC',
50
- shortLocal: '本地',
50
+ shortLocal: '当前时区',
51
51
  },
52
52
  };
53
53