@arcblock/ux 2.13.62 → 2.13.63

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.
@@ -98,7 +98,7 @@ export default function DIDConnectContainer({
98
98
  return `hsla(${h}, ${s}%, ${finalL}%, ${finalAlpha})`;
99
99
  });
100
100
  const backgroundGlow = `linear-gradient(45deg, ${colorListGlow.join(', ')})`;
101
- const glowStyle = {
101
+ const glowStyle = open ? {
102
102
  overflow: 'visible',
103
103
  '&::before, &::after': {
104
104
  content: '""',
@@ -129,7 +129,7 @@ export default function DIDConnectContainer({
129
129
  backgroundPosition: '0 0'
130
130
  }
131
131
  }
132
- };
132
+ } : {};
133
133
  if (openVariant === 'page') {
134
134
  return /*#__PURE__*/_jsx(Box, {
135
135
  className: "did-connect__container-page",
@@ -179,11 +179,11 @@ export default function DIDConnectContainer({
179
179
  borderBottomLeftRadius: 0,
180
180
  borderBottomRightRadius: 0,
181
181
  p: '2px',
182
- animation: 'glowBreathe 7s linear infinite',
183
182
  '.did-connect__root': {
184
183
  backgroundColor: 'transparent'
185
184
  },
186
185
  overflow: 'hidden',
186
+ animation: open ? 'glowBreathe 7s linear infinite' : 'none',
187
187
  '@keyframes glowBreathe': {
188
188
  '0%, 100%': {
189
189
  boxShadow: `
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box } from '@mui/material';
3
3
  import { useCreation, useSize } from 'ahooks';
4
4
  import { useRef } from 'react';
5
+ import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
5
6
  import PoweredBy from './powered-by';
6
7
  import AppInfoItem from './app-info-item';
7
8
  import AppIcon from './app-icon';
@@ -13,6 +14,7 @@ export default function DIDConnectFooter({
13
14
  currentAppColor = globalThis.blocklet?.appPid ? getDIDColor(globalThis.blocklet?.appPid) : '#fff',
14
15
  sx
15
16
  }) {
17
+ const browser = useBrowser();
16
18
  const rootRef = useRef(null);
17
19
  const size = useSize(rootRef);
18
20
  const isSmallView = useCreation(() => {
@@ -32,7 +34,8 @@ export default function DIDConnectFooter({
32
34
  backgroundColor: hexToRgba(currentAppColor, 0.08),
33
35
  // 需要保持跟 .did-connect__root 的规则一样
34
36
  mx: isSmallView ? -2 : -3,
35
- px: isSmallView ? 2 : 3,
37
+ // eslint-disable-next-line no-nested-ternary
38
+ px: isSmallView ? browser.arcSphere ? 1 : 2 : 3,
36
39
  py: 1.5,
37
40
  // HACK: 极限条件下,footer 会溢出,使用隐藏的滚动条来处理这种情况(屏幕宽度小于 360 时会出现)
38
41
  overflow: 'auto',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.13.62",
3
+ "version": "2.13.63",
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": "36a4594299167a1bff28fc11cb590e552576f687",
74
+ "gitHead": "3ba664fa67f707517df7ba1958bc13870c253ac0",
75
75
  "dependencies": {
76
76
  "@arcblock/did-motif": "^1.1.13",
77
- "@arcblock/icons": "^2.13.62",
78
- "@arcblock/nft-display": "^2.13.62",
79
- "@arcblock/react-hooks": "^2.13.62",
77
+ "@arcblock/icons": "^2.13.63",
78
+ "@arcblock/nft-display": "^2.13.63",
79
+ "@arcblock/react-hooks": "^2.13.63",
80
80
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
81
- "@blocklet/theme": "^2.13.62",
81
+ "@blocklet/theme": "^2.13.63",
82
82
  "@fontsource/roboto": "~5.1.1",
83
83
  "@fontsource/ubuntu-mono": "^5.0.18",
84
84
  "@iconify-icons/logos": "^1.2.36",
@@ -137,39 +137,41 @@ export default function DIDConnectContainer({
137
137
 
138
138
  const backgroundGlow = `linear-gradient(45deg, ${colorListGlow.join(', ')})`;
139
139
 
140
- const glowStyle = {
141
- overflow: 'visible',
142
- '&::before, &::after': {
143
- content: '""',
144
- position: 'absolute',
145
- top: '-3px',
146
- right: '-3px',
147
- bottom: '-3px',
148
- left: '-3px',
149
- background,
150
- backgroundSize: '300% 300%',
151
- backgroundRepeat: 'no-repeat',
152
- animation: 'glowRotate 10s linear infinite',
153
- borderRadius: '14px !important',
154
- zIndex: 0,
155
- },
156
- '&::after': {
157
- background: backgroundGlow,
158
- filter: 'blur(15px)',
159
- },
140
+ const glowStyle = open
141
+ ? {
142
+ overflow: 'visible',
143
+ '&::before, &::after': {
144
+ content: '""',
145
+ position: 'absolute',
146
+ top: '-3px',
147
+ right: '-3px',
148
+ bottom: '-3px',
149
+ left: '-3px',
150
+ background,
151
+ backgroundSize: '300% 300%',
152
+ backgroundRepeat: 'no-repeat',
153
+ animation: 'glowRotate 10s linear infinite',
154
+ borderRadius: '14px !important',
155
+ zIndex: 0,
156
+ },
157
+ '&::after': {
158
+ background: backgroundGlow,
159
+ filter: 'blur(15px)',
160
+ },
160
161
 
161
- '@keyframes glowRotate': {
162
- '0%': {
163
- backgroundPosition: '0 0',
164
- },
165
- '50%': {
166
- backgroundPosition: '100% 0',
167
- },
168
- '100%': {
169
- backgroundPosition: '0 0',
170
- },
171
- },
172
- };
162
+ '@keyframes glowRotate': {
163
+ '0%': {
164
+ backgroundPosition: '0 0',
165
+ },
166
+ '50%': {
167
+ backgroundPosition: '100% 0',
168
+ },
169
+ '100%': {
170
+ backgroundPosition: '0 0',
171
+ },
172
+ },
173
+ }
174
+ : {};
173
175
 
174
176
  if (openVariant === 'page') {
175
177
  return (
@@ -223,11 +225,11 @@ export default function DIDConnectContainer({
223
225
  borderBottomLeftRadius: 0,
224
226
  borderBottomRightRadius: 0,
225
227
  p: '2px',
226
- animation: 'glowBreathe 7s linear infinite',
227
228
  '.did-connect__root': {
228
229
  backgroundColor: 'transparent',
229
230
  },
230
231
  overflow: 'hidden',
232
+ animation: open ? 'glowBreathe 7s linear infinite' : 'none',
231
233
  '@keyframes glowBreathe': {
232
234
  '0%, 100%': {
233
235
  boxShadow: `
@@ -1,6 +1,7 @@
1
1
  import { Box, SxProps } from '@mui/material';
2
2
  import { useCreation, useSize } from 'ahooks';
3
3
  import { useRef } from 'react';
4
+ import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
4
5
 
5
6
  import PoweredBy from './powered-by';
6
7
  import AppInfoItem from './app-info-item';
@@ -18,6 +19,7 @@ export default function DIDConnectFooter({
18
19
  currentAppColor?: string;
19
20
  sx?: SxProps;
20
21
  }) {
22
+ const browser = useBrowser();
21
23
  const rootRef = useRef<HTMLDivElement>(null);
22
24
  const size = useSize(rootRef);
23
25
  const isSmallView = useCreation(() => {
@@ -40,7 +42,8 @@ export default function DIDConnectFooter({
40
42
  backgroundColor: hexToRgba(currentAppColor, 0.08),
41
43
  // 需要保持跟 .did-connect__root 的规则一样
42
44
  mx: isSmallView ? -2 : -3,
43
- px: isSmallView ? 2 : 3,
45
+ // eslint-disable-next-line no-nested-ternary
46
+ px: isSmallView ? (browser.arcSphere ? 1 : 2) : 3,
44
47
  py: 1.5,
45
48
  // HACK: 极限条件下,footer 会溢出,使用隐藏的滚动条来处理这种情况(屏幕宽度小于 360 时会出现)
46
49
  overflow: 'auto',