@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.
- package/lib/BlockletV2/blocklet.js +1 -1
- package/lib/BlockletV2/components/tooltip-icon.js +2 -3
- package/lib/Config/index.d.ts +1 -0
- package/lib/Config/index.js +2 -1
- package/lib/CookieConsent/index.js +15 -4
- package/lib/Metric/index.js +8 -5
- package/lib/NavMenu/nav-menu.js +1 -1
- package/lib/NavMenu/products.js +1 -1
- package/lib/RelativeTime/index.js +2 -2
- package/package.json +6 -6
- package/src/BlockletV2/blocklet.tsx +1 -1
- package/src/BlockletV2/components/tooltip-icon.tsx +2 -3
- package/src/Config/index.ts +1 -0
- package/src/CookieConsent/index.tsx +5 -4
- package/src/Metric/index.tsx +12 -5
- package/src/NavMenu/nav-menu.tsx +1 -1
- package/src/NavMenu/products.tsx +1 -1
- package/src/RelativeTime/index.tsx +2 -2
@@ -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.
|
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:
|
24
|
+
boxShadow: 2,
|
26
25
|
marginBottom: '6px !important',
|
27
26
|
borderRadius: '8px',
|
28
27
|
cursor: 'default',
|
package/lib/Config/index.d.ts
CHANGED
package/lib/Config/index.js
CHANGED
@@ -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:
|
79
|
-
|
80
|
-
|
81
|
-
|
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
|
}
|
package/lib/Metric/index.js
CHANGED
@@ -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:
|
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.
|
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.
|
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.
|
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;
|
package/lib/NavMenu/nav-menu.js
CHANGED
@@ -42,7 +42,7 @@ function NavMenu({
|
|
42
42
|
...rest
|
43
43
|
}) {
|
44
44
|
const theme = useTheme();
|
45
|
-
const $textColor = useCreation(() => theme.palette.
|
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
|
package/lib/NavMenu/products.js
CHANGED
@@ -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"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.13.
|
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": "
|
74
|
+
"gitHead": "b835dedcd8f2e473082e4c1aee0a8cb3ed0e78ec",
|
75
75
|
"dependencies": {
|
76
76
|
"@arcblock/did-motif": "^1.1.13",
|
77
|
-
"@arcblock/icons": "^2.13.
|
78
|
-
"@arcblock/nft-display": "^2.13.
|
79
|
-
"@arcblock/react-hooks": "^2.13.
|
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.
|
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.
|
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:
|
32
|
+
boxShadow: 2,
|
34
33
|
marginBottom: '6px !important',
|
35
34
|
borderRadius: '8px',
|
36
35
|
cursor: 'default',
|
package/src/Config/index.ts
CHANGED
@@ -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:
|
83
|
-
background:
|
84
|
-
border
|
85
|
-
|
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
|
}
|
package/src/Metric/index.tsx
CHANGED
@@ -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
|
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.
|
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.
|
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.
|
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;
|
package/src/NavMenu/nav-menu.tsx
CHANGED
@@ -65,7 +65,7 @@ function NavMenu({
|
|
65
65
|
...rest
|
66
66
|
}: NavMenuProps) {
|
67
67
|
const theme = useTheme();
|
68
|
-
const $textColor = useCreation(() => theme.palette.
|
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
|
package/src/NavMenu/products.tsx
CHANGED
@@ -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
|
),
|