Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
42f60f7a
Unverified
Commit
42f60f7a
authored
Jan 23, 2023
by
tom goriunov
Committed by
GitHub
Jan 23, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #537 from blockscout/semantic-tokens
semantic tokens: dividers and links
parents
02977865
cafee731
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
86 additions
and
113 deletions
+86
-113
Button.ts
theme/components/Button/Button.ts
+8
-8
Link.ts
theme/components/Link.ts
+2
-2
Modal.ts
theme/components/Modal.ts
+1
-1
Table.ts
theme/components/Table.ts
+1
-1
Tabs.ts
theme/components/Tabs.ts
+1
-1
Text.ts
theme/components/Text.ts
+0
-5
semanticTokens.ts
theme/foundations/semanticTokens.ts
+17
-0
index.ts
theme/index.ts
+2
-0
ContractRead.pw.tsx_dark-color-mode_base-view-mobile-dark-mode-1.png
...d.pw.tsx_dark-color-mode_base-view-mobile-dark-mode-1.png
+0
-0
AddressIntTxsSkeletonMobile.tsx
ui/address/internals/AddressIntTxsSkeletonMobile.tsx
+2
-4
TokenSelectItem.tsx
ui/address/tokenSelect/TokenSelectItem.tsx
+1
-1
BlockDetails.tsx
ui/block/BlockDetails.tsx
+2
-4
BlockDetailsSkeleton.tsx
ui/block/details/BlockDetailsSkeleton.tsx
+2
-4
LatestBlocksItem.tsx
ui/home/LatestBlocksItem.tsx
+2
-3
LatestBlocksItemSkeleton.tsx
ui/home/LatestBlocksItemSkeleton.tsx
+1
-2
LatestTxsItem.tsx
ui/home/LatestTxsItem.tsx
+4
-8
LatestTxsItemSkeleton.tsx
ui/home/LatestTxsItemSkeleton.tsx
+2
-5
AdditionalInfoButton.tsx
ui/shared/AdditionalInfoButton.tsx
+2
-3
ListItemMobile.tsx
ui/shared/ListItemMobile.tsx
+2
-2
TokenTransferFilter.tsx
ui/shared/TokenTransfer/TokenTransferFilter.tsx
+1
-3
TokenTransferListItem.tsx
ui/shared/TokenTransfer/TokenTransferListItem.tsx
+2
-4
ChartGridLine.tsx
ui/shared/chart/ChartGridLine.tsx
+2
-3
SkeletonList.tsx
ui/shared/skeletons/SkeletonList.tsx
+2
-4
SkeletonListAccount.tsx
ui/shared/skeletons/SkeletonListAccount.tsx
+2
-4
NavFooter.tsx
ui/snippets/navigation/NavFooter.tsx
+2
-2
NavigationDesktop.tsx
ui/snippets/navigation/NavigationDesktop.tsx
+3
-4
useColors.ts
ui/snippets/navigation/useColors.ts
+2
-2
NetworkMenuButton.tsx
ui/snippets/networkMenu/NetworkMenuButton.tsx
+1
-1
useColors.ts
ui/snippets/networkMenu/useColors.ts
+2
-2
ProfileMenuContent.tsx
ui/snippets/profileMenu/ProfileMenuContent.tsx
+2
-3
SearchBarSuggest.tsx
ui/snippets/searchBar/SearchBarSuggest.tsx
+2
-3
SearchBarSuggestItem.tsx
ui/snippets/searchBar/SearchBarSuggestItem.tsx
+1
-1
TxDetails.tsx
ui/tx/TxDetails.tsx
+2
-5
TxDetailsSkeleton.tsx
ui/tx/details/TxDetailsSkeleton.tsx
+2
-4
TxAdditionalInfo.tsx
ui/txs/TxAdditionalInfo.tsx
+2
-3
TxsFilters.tsx
ui/txs/TxsFilters.tsx
+2
-5
TxsListItem.tsx
ui/txs/TxsListItem.tsx
+1
-3
TxsTableItem.tsx
ui/txs/TxsTableItem.tsx
+1
-3
No files found.
theme/components/Button/Button.ts
View file @
42f60f7a
...
@@ -70,15 +70,15 @@ const variantOutline = defineStyle((props) => {
...
@@ -70,15 +70,15 @@ const variantOutline = defineStyle((props) => {
borderColor
,
borderColor
,
bg
:
'
transparent
'
,
bg
:
'
transparent
'
,
_hover
:
{
_hover
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
borderColor
:
'
blue.400
'
,
borderColor
:
'
link_hovered
'
,
bg
:
'
transparent
'
,
bg
:
'
transparent
'
,
_active
:
{
_active
:
{
bg
:
props
.
isActive
?
activeBg
:
'
transparent
'
,
bg
:
props
.
isActive
?
activeBg
:
'
transparent
'
,
borderColor
:
props
.
isActive
?
activeBg
:
'
blue.400
'
,
borderColor
:
props
.
isActive
?
activeBg
:
'
link_hovered
'
,
color
:
props
.
isActive
?
activeColor
:
'
blue.400
'
,
color
:
props
.
isActive
?
activeColor
:
'
link_hovered
'
,
p
:
{
p
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
},
},
},
},
_disabled
:
{
_disabled
:
{
...
@@ -86,7 +86,7 @@ const variantOutline = defineStyle((props) => {
...
@@ -86,7 +86,7 @@ const variantOutline = defineStyle((props) => {
borderColor
,
borderColor
,
},
},
p
:
{
p
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
},
},
},
},
_disabled
:
{
_disabled
:
{
...
@@ -147,7 +147,7 @@ const variantSubtle = defineStyle((props) => {
...
@@ -147,7 +147,7 @@ const variantSubtle = defineStyle((props) => {
bg
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
bg
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
_hover
:
{
_hover
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
_disabled
:
{
_disabled
:
{
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
bg
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
bg
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
...
@@ -160,7 +160,7 @@ const variantSubtle = defineStyle((props) => {
...
@@ -160,7 +160,7 @@ const variantSubtle = defineStyle((props) => {
bg
:
`
${
c
}
.100`
,
bg
:
`
${
c
}
.100`
,
color
:
`
${
c
}
.600`
,
color
:
`
${
c
}
.600`
,
_hover
:
{
_hover
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
},
},
};
};
});
});
...
...
theme/components/Link.ts
View file @
42f60f7a
...
@@ -8,9 +8,9 @@ const baseStyle = defineStyle(getDefaultTransitionProps());
...
@@ -8,9 +8,9 @@ const baseStyle = defineStyle(getDefaultTransitionProps());
const
variantPrimary
=
defineStyle
((
props
)
=>
{
const
variantPrimary
=
defineStyle
((
props
)
=>
{
return
{
return
{
color
:
mode
(
'
blue.600
'
,
'
blue.300
'
)(
props
)
,
color
:
'
link
'
,
_hover
:
{
_hover
:
{
color
:
mode
(
'
blue.400
'
,
'
blue.200
'
)(
props
)
,
color
:
'
link_hovered
'
,
textDecorationStyle
:
props
.
textDecorationStyle
||
'
solid
'
,
textDecorationStyle
:
props
.
textDecorationStyle
||
'
solid
'
,
},
},
};
};
...
...
theme/components/Modal.ts
View file @
42f60f7a
...
@@ -51,7 +51,7 @@ const baseStyleCloseButton = defineStyle((props) => {
...
@@ -51,7 +51,7 @@ const baseStyleCloseButton = defineStyle((props) => {
height
:
10
,
height
:
10
,
width
:
10
,
width
:
10
,
color
:
mode
(
'
gray.700
'
,
'
gray.500
'
)(
props
),
color
:
mode
(
'
gray.700
'
,
'
gray.500
'
)(
props
),
_hover
:
{
color
:
'
blue.400
'
},
_hover
:
{
color
:
'
link_hovered
'
},
_active
:
{
bg
:
'
none
'
},
_active
:
{
bg
:
'
none
'
},
};
};
});
});
...
...
theme/components/Table.ts
View file @
42f60f7a
...
@@ -23,7 +23,7 @@ const variantSimple = definePartsStyle((props) => {
...
@@ -23,7 +23,7 @@ const variantSimple = definePartsStyle((props) => {
...
transitionProps
,
...
transitionProps
,
},
},
td
:
{
td
:
{
borderColor
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
)
,
borderColor
:
'
divider
'
,
...
transitionProps
,
...
transitionProps
,
},
},
};
};
...
...
theme/components/Tabs.ts
View file @
42f60f7a
...
@@ -22,7 +22,7 @@ const variantSoftRounded = definePartsStyle((props) => {
...
@@ -22,7 +22,7 @@ const variantSoftRounded = definePartsStyle((props) => {
},
},
},
},
_hover
:
{
_hover
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
},
},
},
},
};
};
...
...
theme/components/Text.ts
View file @
42f60f7a
...
@@ -10,10 +10,6 @@ const variantSecondary = defineStyle((props) => ({
...
@@ -10,10 +10,6 @@ const variantSecondary = defineStyle((props) => ({
color
:
mode
(
'
gray.500
'
,
'
gray.400
'
)(
props
),
color
:
mode
(
'
gray.500
'
,
'
gray.400
'
)(
props
),
}));
}));
const
variantAlternate
=
defineStyle
((
props
)
=>
({
color
:
mode
(
'
blue.600
'
,
'
blue.300
'
)(
props
),
}));
const
variantInherit
=
{
const
variantInherit
=
{
color
:
'
inherit
'
,
color
:
'
inherit
'
,
};
};
...
@@ -21,7 +17,6 @@ const variantInherit = {
...
@@ -21,7 +17,6 @@ const variantInherit = {
const
variants
:
Record
<
string
,
SystemStyleInterpolation
>
=
{
const
variants
:
Record
<
string
,
SystemStyleInterpolation
>
=
{
primary
:
variantPrimary
,
primary
:
variantPrimary
,
secondary
:
variantSecondary
,
secondary
:
variantSecondary
,
alternate
:
variantAlternate
,
inherit
:
variantInherit
,
inherit
:
variantInherit
,
};
};
...
...
theme/foundations/semanticTokens.ts
0 → 100644
View file @
42f60f7a
const
semanticTokens
=
{
colors
:
{
divider
:
{
'
default
'
:
'
blackAlpha.200
'
,
_dark
:
'
whiteAlpha.200
'
,
},
link
:
{
'
default
'
:
'
blue.600
'
,
_dark
:
'
blue.300
'
,
},
link_hovered
:
{
'
default
'
:
'
blue.400
'
,
},
},
};
export
default
semanticTokens
;
theme/index.ts
View file @
42f60f7a
...
@@ -5,6 +5,7 @@ import config from './config';
...
@@ -5,6 +5,7 @@ import config from './config';
import
borders
from
'
./foundations/borders
'
;
import
borders
from
'
./foundations/borders
'
;
import
breakpoints
from
'
./foundations/breakpoints
'
;
import
breakpoints
from
'
./foundations/breakpoints
'
;
import
colors
from
'
./foundations/colors
'
;
import
colors
from
'
./foundations/colors
'
;
import
semanticTokens
from
'
./foundations/semanticTokens
'
;
import
transition
from
'
./foundations/transition
'
;
import
transition
from
'
./foundations/transition
'
;
import
typography
from
'
./foundations/typography
'
;
import
typography
from
'
./foundations/typography
'
;
import
zIndices
from
'
./foundations/zIndices
'
;
import
zIndices
from
'
./foundations/zIndices
'
;
...
@@ -22,6 +23,7 @@ const overrides = {
...
@@ -22,6 +23,7 @@ const overrides = {
breakpoints
,
breakpoints
,
transition
,
transition
,
zIndices
,
zIndices
,
semanticTokens
,
};
};
export
default
extendTheme
(
overrides
);
export
default
extendTheme
(
overrides
);
ui/address/contract/__screenshots__/ContractRead.pw.tsx_dark-color-mode_base-view-mobile-dark-mode-1.png
View replaced file @
02977865
View file @
42f60f7a
45.3 KB
|
W:
|
H:
45.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/address/internals/AddressIntTxsSkeletonMobile.tsx
View file @
42f60f7a
import
{
Skeleton
,
SkeletonCircle
,
Flex
,
Box
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Skeleton
,
SkeletonCircle
,
Flex
,
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
const
TxInternalsSkeletonMobile
=
()
=>
{
const
TxInternalsSkeletonMobile
=
()
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
return
(
<
Box
>
<
Box
>
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
...
@@ -13,7 +11,7 @@ const TxInternalsSkeletonMobile = () => {
...
@@ -13,7 +11,7 @@ const TxInternalsSkeletonMobile = () => {
flexDirection=
"column"
flexDirection=
"column"
paddingY=
{
6
}
paddingY=
{
6
}
borderTopWidth=
"1px"
borderTopWidth=
"1px"
borderColor=
{
borderColor
}
borderColor=
"divider"
_last=
{
{
_last=
{
{
borderBottomWidth
:
'
1px
'
,
borderBottomWidth
:
'
1px
'
,
}
}
}
}
...
...
ui/address/tokenSelect/TokenSelectItem.tsx
View file @
42f60f7a
...
@@ -49,7 +49,7 @@ const TokenSelectItem = ({ data }: Props) => {
...
@@ -49,7 +49,7 @@ const TokenSelectItem = ({ data }: Props) => {
display=
"flex"
display=
"flex"
flexDir=
"column"
flexDir=
"column"
rowGap=
{
2
}
rowGap=
{
2
}
borderColor=
{
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
"divider"
borderBottomWidth=
"1px"
borderBottomWidth=
"1px"
_hover=
{
{
_hover=
{
{
bgColor
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
bgColor
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
...
...
ui/block/BlockDetails.tsx
View file @
42f60f7a
import
{
Grid
,
GridItem
,
Text
,
Icon
,
Link
,
Box
,
Tooltip
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
Text
,
Icon
,
Link
,
Box
,
Tooltip
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
capitalize
from
'
lodash/capitalize
'
;
import
capitalize
from
'
lodash/capitalize
'
;
import
NextLink
from
'
next/link
'
;
import
NextLink
from
'
next/link
'
;
...
@@ -52,8 +52,6 @@ const BlockDetails = () => {
...
@@ -52,8 +52,6 @@ const BlockDetails = () => {
router
.
push
(
url
,
undefined
);
router
.
push
(
url
,
undefined
);
},
[
router
]);
},
[
router
]);
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
if
(
isLoading
)
{
if
(
isLoading
)
{
return
<
BlockDetailsSkeleton
/>;
return
<
BlockDetailsSkeleton
/>;
}
}
...
@@ -76,7 +74,7 @@ const BlockDetails = () => {
...
@@ -76,7 +74,7 @@ const BlockDetails = () => {
mt=
{
{
base
:
2
,
lg
:
3
}
}
mt=
{
{
base
:
2
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
borderBottom=
"1px solid"
borderBottom=
"1px solid"
borderColor=
{
borderColor
}
borderColor=
"divider"
/>
/>
);
);
const
{
totalReward
,
staticReward
,
burntFees
,
txFees
}
=
getBlockReward
(
data
);
const
{
totalReward
,
staticReward
,
burntFees
,
txFees
}
=
getBlockReward
(
data
);
...
...
ui/block/details/BlockDetailsSkeleton.tsx
View file @
42f60f7a
import
{
Grid
,
GridItem
,
Skeleton
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
const
BlockDetailsSkeleton
=
()
=>
{
const
BlockDetailsSkeleton
=
()
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
sectionGap
=
(
const
sectionGap
=
(
<
GridItem
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
2
,
lg
:
3
}
}
mt=
{
{
base
:
2
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
borderBottom=
"1px solid"
borderBottom=
"1px solid"
borderColor=
{
borderColor
}
borderColor=
"divider"
/>
/>
);
);
...
...
ui/home/LatestBlocksItem.tsx
View file @
42f60f7a
...
@@ -7,7 +7,6 @@ import {
...
@@ -7,7 +7,6 @@ import {
Icon
,
Icon
,
Link
,
Link
,
Text
,
Text
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -36,14 +35,14 @@ const LatestBlocksItem = ({ block, h }: Props) => {
...
@@ -36,14 +35,14 @@ const LatestBlocksItem = ({ block, h }: Props) => {
transitionTimingFunction=
"linear"
transitionTimingFunction=
"linear"
borderRadius=
"12px"
borderRadius=
"12px"
border=
"1px solid"
border=
"1px solid"
borderColor=
{
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
"divider"
p=
{
6
}
p=
{
6
}
h=
{
`${ h }px`
}
h=
{
`${ h }px`
}
minWidth=
{
{
base
:
'
100%
'
,
lg
:
'
280px
'
}
}
minWidth=
{
{
base
:
'
100%
'
,
lg
:
'
280px
'
}
}
>
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
<
HStack
spacing=
{
2
}
>
<
HStack
spacing=
{
2
}
>
<
Icon
as=
{
blockIcon
}
boxSize=
"30px"
color=
{
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
)
}
/>
<
Icon
as=
{
blockIcon
}
boxSize=
"30px"
color=
"link"
/>
<
Link
<
Link
href=
{
link
(
'
block
'
,
{
id
:
String
(
block
.
height
)
})
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
block
.
height
)
})
}
fontSize=
"xl"
fontSize=
"xl"
...
...
ui/home/LatestBlocksItemSkeleton.tsx
View file @
42f60f7a
...
@@ -5,7 +5,6 @@ import {
...
@@ -5,7 +5,6 @@ import {
GridItem
,
GridItem
,
HStack
,
HStack
,
Skeleton
,
Skeleton
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -15,7 +14,7 @@ const LatestBlocksItemSkeleton = () => {
...
@@ -15,7 +14,7 @@ const LatestBlocksItemSkeleton = () => {
minWidth=
{
{
base
:
'
100%
'
,
lg
:
'
280px
'
}
}
minWidth=
{
{
base
:
'
100%
'
,
lg
:
'
280px
'
}
}
borderRadius=
"12px"
borderRadius=
"12px"
border=
"1px solid"
border=
"1px solid"
borderColor=
{
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
"divider"
p=
{
6
}
p=
{
6
}
>
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
...
...
ui/home/LatestTxsItem.tsx
View file @
42f60f7a
...
@@ -11,7 +11,6 @@ import {
...
@@ -11,7 +11,6 @@ import {
PopoverTrigger
,
PopoverTrigger
,
PopoverContent
,
PopoverContent
,
PopoverBody
,
PopoverBody
,
useColorModeValue
,
useDisclosure
,
useDisclosure
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -37,9 +36,6 @@ type Props = {
...
@@ -37,9 +36,6 @@ type Props = {
}
}
const
LatestBlocksItem
=
({
tx
}:
Props
)
=>
{
const
LatestBlocksItem
=
({
tx
}:
Props
)
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
timeAgo
=
useTimeAgoIncrement
(
tx
.
timestamp
||
'
0
'
,
true
);
const
timeAgo
=
useTimeAgoIncrement
(
tx
.
timestamp
||
'
0
'
,
true
);
...
@@ -50,10 +46,10 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -50,10 +46,10 @@ const LatestBlocksItem = ({ tx }: Props) => {
<
Box
<
Box
width=
"100%"
width=
"100%"
borderTop=
"1px solid"
borderTop=
"1px solid"
borderColor=
{
borderColor
}
borderColor=
"divider"
py=
{
4
}
py=
{
4
}
px=
{
{
base
:
0
,
lg
:
4
}
}
px=
{
{
base
:
0
,
lg
:
4
}
}
_last=
{
{
borderBottom
:
'
1px solid
'
,
borderColor
}
}
_last=
{
{
borderBottom
:
'
1px solid
'
,
borderColor
:
'
divider
'
}
}
>
>
<
Flex
justifyContent=
"space-between"
width=
"100%"
alignItems=
"start"
flexDirection=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
>
<
Flex
justifyContent=
"space-between"
width=
"100%"
alignItems=
"start"
flexDirection=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
>
{
!
isMobile
&&
(
{
!
isMobile
&&
(
...
@@ -63,7 +59,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -63,7 +59,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
<
PopoverTrigger
>
<
PopoverTrigger
>
<
AdditionalInfoButton
isOpen=
{
isOpen
}
mr=
{
3
}
/>
<
AdditionalInfoButton
isOpen=
{
isOpen
}
mr=
{
3
}
/>
</
PopoverTrigger
>
</
PopoverTrigger
>
<
PopoverContent
border=
"1px solid"
borderColor=
{
borderColor
}
>
<
PopoverContent
border=
"1px solid"
borderColor=
"divider"
>
<
PopoverBody
>
<
PopoverBody
>
<
TxAdditionalInfo
tx=
{
tx
}
/>
<
TxAdditionalInfo
tx=
{
tx
}
/>
</
PopoverBody
>
</
PopoverBody
>
...
@@ -92,7 +88,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -92,7 +88,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
as=
{
transactionIcon
}
as=
{
transactionIcon
}
boxSize=
"30px"
boxSize=
"30px"
mr=
{
2
}
mr=
{
2
}
color=
{
iconColor
}
color=
"link"
/>
/>
<
Address
width=
"100%"
>
<
Address
width=
"100%"
>
<
AddressLink
<
AddressLink
...
...
ui/home/LatestTxsItemSkeleton.tsx
View file @
42f60f7a
...
@@ -4,21 +4,18 @@ import {
...
@@ -4,21 +4,18 @@ import {
HStack
,
HStack
,
Skeleton
,
Skeleton
,
SkeletonCircle
,
SkeletonCircle
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
const
LatestTxsItemSkeleton
=
()
=>
{
const
LatestTxsItemSkeleton
=
()
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
return
(
<
Box
<
Box
width=
"100%"
width=
"100%"
borderTop=
"1px solid"
borderTop=
"1px solid"
borderColor=
{
borderColor
}
borderColor=
"divider"
py=
{
4
}
py=
{
4
}
px=
{
{
base
:
0
,
lg
:
4
}
}
px=
{
{
base
:
0
,
lg
:
4
}
}
_last=
{
{
borderBottom
:
'
1px solid
'
,
borderColor
}
}
_last=
{
{
borderBottom
:
'
1px solid
'
,
borderColor
:
'
divider
'
}
}
>
>
<
Flex
justifyContent=
"space-between"
width=
"100%"
alignItems=
"start"
flexDirection=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
>
<
Flex
justifyContent=
"space-between"
width=
"100%"
alignItems=
"start"
flexDirection=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
>
<
Box
width=
"100%"
>
<
Box
width=
"100%"
>
...
...
ui/shared/AdditionalInfoButton.tsx
View file @
42f60f7a
...
@@ -17,7 +17,6 @@ interface Props {
...
@@ -17,7 +17,6 @@ interface Props {
const
AdditionalInfoButton
=
({
isOpen
,
onClick
,
className
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
AdditionalInfoButton
=
({
isOpen
,
onClick
,
className
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
infoBgColor
=
useColorModeValue
(
'
blue.50
'
,
'
gray.600
'
);
const
infoBgColor
=
useColorModeValue
(
'
blue.50
'
,
'
gray.600
'
);
const
infoColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
return
(
return
(
<
Button
<
Button
...
@@ -36,8 +35,8 @@ const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.
...
@@ -36,8 +35,8 @@ const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.
<
Icon
<
Icon
as=
{
infoIcon
}
as=
{
infoIcon
}
boxSize=
{
5
}
boxSize=
{
5
}
color=
{
infoColor
}
color=
"link"
_hover=
{
{
color
:
'
blue.400
'
}
}
_hover=
{
{
color
:
'
link_hovered
'
}
}
/>
/>
</
Button
>
</
Button
>
);
);
...
...
ui/shared/ListItemMobile.tsx
View file @
42f60f7a
import
{
Flex
,
useColorModeValue
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -20,7 +20,7 @@ const ListItemMobile = ({ children, className, isAnimated }: Props) => {
...
@@ -20,7 +20,7 @@ const ListItemMobile = ({ children, className, isAnimated }: Props) => {
alignItems=
"flex-start"
alignItems=
"flex-start"
flexDirection=
"column"
flexDirection=
"column"
paddingY=
{
6
}
paddingY=
{
6
}
borderColor=
{
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
"divider"
borderTopWidth=
"1px"
borderTopWidth=
"1px"
_last=
{
{
_last=
{
{
borderBottomWidth
:
'
1px
'
,
borderBottomWidth
:
'
1px
'
,
...
...
ui/shared/TokenTransfer/TokenTransferFilter.tsx
View file @
42f60f7a
...
@@ -3,7 +3,6 @@ import {
...
@@ -3,7 +3,6 @@ import {
Radio
,
Radio
,
RadioGroup
,
RadioGroup
,
Stack
,
Stack
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -30,7 +29,6 @@ const TokenTransferFilter = ({
...
@@ -30,7 +29,6 @@ const TokenTransferFilter = ({
onAddressFilterChange
,
onAddressFilterChange
,
defaultAddressFilter
,
defaultAddressFilter
,
}:
Props
)
=>
{
}:
Props
)
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
return
(
<
PopoverFilter
appliedFiltersNum=
{
appliedFiltersNum
}
contentProps=
{
{
w
:
'
200px
'
}
}
>
<
PopoverFilter
appliedFiltersNum=
{
appliedFiltersNum
}
contentProps=
{
{
w
:
'
200px
'
}
}
>
...
@@ -43,7 +41,7 @@ const TokenTransferFilter = ({
...
@@ -43,7 +41,7 @@ const TokenTransferFilter = ({
defaultValue=
{
defaultAddressFilter
||
'
all
'
}
defaultValue=
{
defaultAddressFilter
||
'
all
'
}
paddingBottom=
{
4
}
paddingBottom=
{
4
}
borderBottom=
"1px solid"
borderBottom=
"1px solid"
borderColor=
{
borderColor
}
borderColor=
"divider"
>
>
<
Stack
spacing=
{
4
}
>
<
Stack
spacing=
{
4
}
>
<
Radio
value=
"all"
><
Text
fontSize=
"md"
>
All
</
Text
></
Radio
>
<
Radio
value=
"all"
><
Text
fontSize=
"md"
>
All
</
Text
></
Radio
>
...
...
ui/shared/TokenTransfer/TokenTransferListItem.tsx
View file @
42f60f7a
import
{
Text
,
Flex
,
Tag
,
Icon
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Flex
,
Tag
,
Icon
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -43,8 +43,6 @@ const TokenTransferListItem = ({
...
@@ -43,8 +43,6 @@ const TokenTransferListItem = ({
return
BigNumber
(
total
.
value
).
div
(
BigNumber
(
10
**
Number
(
total
.
decimals
))).
dp
(
8
).
toFormat
();
return
BigNumber
(
total
.
value
).
div
(
BigNumber
(
10
**
Number
(
total
.
decimals
))).
dp
(
8
).
toFormat
();
})();
})();
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
timeAgo
=
useTimeAgoIncrement
(
timestamp
,
enableTimeIncrement
);
const
timeAgo
=
useTimeAgoIncrement
(
timestamp
,
enableTimeIncrement
);
const
addressWidth
=
`calc((100% -
${
baseAddress
?
'
50px
'
:
'
0px
'
}
) / 2)`
;
const
addressWidth
=
`calc((100% -
${
baseAddress
?
'
50px
'
:
'
0px
'
}
) / 2)`
;
...
@@ -64,7 +62,7 @@ const TokenTransferListItem = ({
...
@@ -64,7 +62,7 @@ const TokenTransferListItem = ({
as=
{
transactionIcon
}
as=
{
transactionIcon
}
boxSize=
"30px"
boxSize=
"30px"
mr=
{
2
}
mr=
{
2
}
color=
{
iconColor
}
color=
"link"
/>
/>
<
Address
width=
"100%"
>
<
Address
width=
"100%"
>
<
AddressLink
<
AddressLink
...
...
ui/shared/chart/ChartGridLine.tsx
View file @
42f60f7a
import
{
use
ColorModeValue
,
use
Token
}
from
'
@chakra-ui/react
'
;
import
{
useToken
}
from
'
@chakra-ui/react
'
;
import
*
as
d3
from
'
d3
'
;
import
*
as
d3
from
'
d3
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -13,8 +13,7 @@ interface Props extends Omit<React.SVGProps<SVGGElement>, 'scale'> {
...
@@ -13,8 +13,7 @@ interface Props extends Omit<React.SVGProps<SVGGElement>, 'scale'> {
const
ChartGridLine
=
({
type
,
scale
,
ticks
,
size
,
disableAnimation
,
...
props
}:
Props
)
=>
{
const
ChartGridLine
=
({
type
,
scale
,
ticks
,
size
,
disableAnimation
,
...
props
}:
Props
)
=>
{
const
ref
=
React
.
useRef
<
SVGGElement
>
(
null
);
const
ref
=
React
.
useRef
<
SVGGElement
>
(
null
);
const
strokeColorToken
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
strokeColor
=
useToken
(
'
colors
'
,
'
divider
'
);
const
strokeColor
=
useToken
(
'
colors
'
,
strokeColorToken
);
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
if
(
!
ref
.
current
)
{
if
(
!
ref
.
current
)
{
...
...
ui/shared/skeletons/SkeletonList.tsx
View file @
42f60f7a
import
{
Box
,
Flex
,
Skeleton
,
SkeletonCircle
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Skeleton
,
SkeletonCircle
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
const
SkeletonList
=
()
=>
{
const
SkeletonList
=
()
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
return
(
<
Box
>
<
Box
>
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
...
@@ -13,7 +11,7 @@ const SkeletonList = () => {
...
@@ -13,7 +11,7 @@ const SkeletonList = () => {
flexDirection=
"column"
flexDirection=
"column"
paddingY=
{
6
}
paddingY=
{
6
}
borderTopWidth=
"1px"
borderTopWidth=
"1px"
borderColor=
{
borderColor
}
borderColor=
"divider"
_last=
{
{
_last=
{
{
borderBottomWidth
:
'
0px
'
,
borderBottomWidth
:
'
0px
'
,
}
}
}
}
...
...
ui/shared/skeletons/SkeletonListAccount.tsx
View file @
42f60f7a
import
{
Box
,
Flex
,
Skeleton
,
SkeletonCircle
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Skeleton
,
SkeletonCircle
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
interface
Props
{
interface
Props
{
...
@@ -6,8 +6,6 @@ interface Props {
...
@@ -6,8 +6,6 @@ interface Props {
}
}
const
SkeletonListAccount
=
({
showFooterSlot
}:
Props
)
=>
{
const
SkeletonListAccount
=
({
showFooterSlot
}:
Props
)
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
return
(
<
Box
>
<
Box
>
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
...
@@ -17,7 +15,7 @@ const SkeletonListAccount = ({ showFooterSlot }: Props) => {
...
@@ -17,7 +15,7 @@ const SkeletonListAccount = ({ showFooterSlot }: Props) => {
flexDirection=
"column"
flexDirection=
"column"
paddingY=
{
6
}
paddingY=
{
6
}
borderTopWidth=
"1px"
borderTopWidth=
"1px"
borderColor=
{
borderColor
}
borderColor=
"divider"
_last=
{
{
_last=
{
{
borderBottomWidth
:
'
0px
'
,
borderBottomWidth
:
'
0px
'
,
}
}
}
}
...
...
ui/snippets/navigation/NavFooter.tsx
View file @
42f60f7a
import
{
Box
,
VStack
,
Text
,
Stack
,
Icon
,
Link
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
VStack
,
Text
,
Stack
,
Icon
,
Link
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
appConfig
from
'
configs/app/config
'
;
import
appConfig
from
'
configs/app/config
'
;
...
@@ -37,7 +37,7 @@ const NavFooter = ({ isCollapsed, hasAccount }: Props) => {
...
@@ -37,7 +37,7 @@ const NavFooter = ({ isCollapsed, hasAccount }: Props) => {
as=
"footer"
as=
"footer"
spacing=
{
8
}
spacing=
{
8
}
borderTop=
"1px solid"
borderTop=
"1px solid"
borderColor=
{
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
"divider"
width=
{
{
base
:
'
100%
'
,
lg
:
isExpanded
?
'
180px
'
:
'
20px
'
,
xl
:
isCollapsed
?
'
20px
'
:
'
180px
'
}
}
width=
{
{
base
:
'
100%
'
,
lg
:
isExpanded
?
'
180px
'
:
'
20px
'
,
xl
:
isCollapsed
?
'
20px
'
:
'
180px
'
}
}
paddingTop=
{
{
base
:
6
,
lg
:
8
}
}
paddingTop=
{
{
base
:
6
,
lg
:
8
}
}
marginTop=
{
marginTop
}
marginTop=
{
marginTop
}
...
...
ui/snippets/navigation/NavigationDesktop.tsx
View file @
42f60f7a
...
@@ -38,11 +38,10 @@ const NavigationDesktop = () => {
...
@@ -38,11 +38,10 @@ const NavigationDesktop = () => {
cookies
.
set
(
cookies
.
NAMES
.
NAV_BAR_COLLAPSED
,
isCollapsed
?
'
false
'
:
'
true
'
);
cookies
.
set
(
cookies
.
NAMES
.
NAV_BAR_COLLAPSED
,
isCollapsed
?
'
false
'
:
'
true
'
);
},
[
isCollapsed
]);
},
[
isCollapsed
]);
const
containerBorderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
chevronIconStyles
=
{
const
chevronIconStyles
=
{
bgColor
:
useColorModeValue
(
'
white
'
,
'
black
'
),
bgColor
:
useColorModeValue
(
'
white
'
,
'
black
'
),
color
:
useColorModeValue
(
'
blackAlpha.400
'
,
'
whiteAlpha.400
'
),
color
:
useColorModeValue
(
'
blackAlpha.400
'
,
'
whiteAlpha.400
'
),
borderColor
:
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
,
borderColor
:
'
divider
'
,
};
};
const
isExpanded
=
isCollapsed
===
false
;
const
isExpanded
=
isCollapsed
===
false
;
...
@@ -54,7 +53,7 @@ const NavigationDesktop = () => {
...
@@ -54,7 +53,7 @@ const NavigationDesktop = () => {
flexDirection=
"column"
flexDirection=
"column"
alignItems=
"flex-start"
alignItems=
"flex-start"
borderRight=
"1px solid"
borderRight=
"1px solid"
borderColor=
{
containerBorderColor
}
borderColor=
"divider"
px=
{
{
lg
:
isExpanded
?
6
:
4
,
xl
:
isCollapsed
?
4
:
6
}
}
px=
{
{
lg
:
isExpanded
?
6
:
4
,
xl
:
isCollapsed
?
4
:
6
}
}
py=
{
12
}
py=
{
12
}
width=
{
{
lg
:
isExpanded
?
'
229px
'
:
'
92px
'
,
xl
:
isCollapsed
?
'
92px
'
:
'
229px
'
}
}
width=
{
{
lg
:
isExpanded
?
'
229px
'
:
'
92px
'
,
xl
:
isCollapsed
?
'
92px
'
:
'
229px
'
}
}
...
@@ -94,7 +93,7 @@ const NavigationDesktop = () => {
...
@@ -94,7 +93,7 @@ const NavigationDesktop = () => {
width=
{
6
}
width=
{
6
}
height=
{
6
}
height=
{
6
}
border=
"1px"
border=
"1px"
_hover=
{
{
color
:
'
blue.400
'
}
}
_hover=
{
{
color
:
'
link_hovered
'
}
}
borderRadius=
"base"
borderRadius=
"base"
{
...
chevronIconStyles
}
{
...
chevronIconStyles
}
transform=
{
{
lg
:
isExpanded
?
'
rotate(0)
'
:
'
rotate(180deg)
'
,
xl
:
isCollapsed
?
'
rotate(180deg)
'
:
'
rotate(0)
'
}
}
transform=
{
{
lg
:
isExpanded
?
'
rotate(0)
'
:
'
rotate(180deg)
'
,
xl
:
isCollapsed
?
'
rotate(180deg)
'
:
'
rotate(0)
'
}
}
...
...
ui/snippets/navigation/useColors.ts
View file @
42f60f7a
...
@@ -5,14 +5,14 @@ export default function useColors() {
...
@@ -5,14 +5,14 @@ export default function useColors() {
text
:
{
text
:
{
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.400
'
),
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.400
'
),
active
:
useColorModeValue
(
'
blue.700
'
,
'
gray.50
'
),
active
:
useColorModeValue
(
'
blue.700
'
,
'
gray.50
'
),
hover
:
'
blue.400
'
,
hover
:
'
link_hovered
'
,
},
},
bg
:
{
bg
:
{
'
default
'
:
'
transparent
'
,
'
default
'
:
'
transparent
'
,
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
},
},
border
:
{
border
:
{
'
default
'
:
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
,
'
default
'
:
'
divider
'
,
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
},
},
};
};
...
...
ui/snippets/networkMenu/NetworkMenuButton.tsx
View file @
42f60f7a
...
@@ -37,7 +37,7 @@ const NetworkMenuButton = ({ isMobile, isActive, onClick, className }: Props, re
...
@@ -37,7 +37,7 @@ const NetworkMenuButton = ({ isMobile, isActive, onClick, className }: Props, re
height=
"36px"
height=
"36px"
padding=
"10px"
padding=
"10px"
color=
{
isActive
?
iconColorMobile
:
defaultIconColor
}
color=
{
isActive
?
iconColorMobile
:
defaultIconColor
}
_hover=
{
{
color
:
isMobile
?
undefined
:
'
blue.400
'
}
}
_hover=
{
{
color
:
isMobile
?
undefined
:
'
link_hovered
'
}
}
cursor=
"pointer"
cursor=
"pointer"
{
...
getDefaultTransitionProps
({
transitionProperty
:
'
margin
'
})
}
{
...
getDefaultTransitionProps
({
transitionProperty
:
'
margin
'
})
}
/>
/>
...
...
ui/snippets/networkMenu/useColors.ts
View file @
42f60f7a
...
@@ -8,7 +8,7 @@ export default function useColors({ hasIcon }: {hasIcon: boolean}) {
...
@@ -8,7 +8,7 @@ export default function useColors({ hasIcon }: {hasIcon: boolean}) {
text
:
{
text
:
{
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.400
'
),
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.400
'
),
active
:
useColorModeValue
(
'
blackAlpha.900
'
,
'
whiteAlpha.900
'
),
active
:
useColorModeValue
(
'
blackAlpha.900
'
,
'
whiteAlpha.900
'
),
hover
:
useColorModeValue
(
'
blue.600
'
,
'
blue.400
'
),
hover
:
useColorModeValue
(
'
blue.600
'
,
'
link_hovered
'
),
},
},
icon
:
{
icon
:
{
'
default
'
:
hasIcon
?
iconDefaultColor
:
iconPlaceholderDefaultColor
,
'
default
'
:
hasIcon
?
iconDefaultColor
:
iconPlaceholderDefaultColor
,
...
@@ -19,7 +19,7 @@ export default function useColors({ hasIcon }: {hasIcon: boolean}) {
...
@@ -19,7 +19,7 @@ export default function useColors({ hasIcon }: {hasIcon: boolean}) {
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
},
},
border
:
{
border
:
{
'
default
'
:
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
,
'
default
'
:
'
divider
'
,
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
},
},
};
};
...
...
ui/snippets/profileMenu/ProfileMenuContent.tsx
View file @
42f60f7a
...
@@ -12,7 +12,6 @@ type Props = UserInfo;
...
@@ -12,7 +12,6 @@ type Props = UserInfo;
const
ProfileMenuContent
=
({
name
,
nickname
,
email
}:
Props
)
=>
{
const
ProfileMenuContent
=
({
name
,
nickname
,
email
}:
Props
)
=>
{
const
{
accountNavItems
,
profileItem
}
=
useNavItems
();
const
{
accountNavItems
,
profileItem
}
=
useNavItems
();
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
primaryTextColor
=
useColorModeValue
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
);
const
primaryTextColor
=
useColorModeValue
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
);
return
(
return
(
...
@@ -35,12 +34,12 @@ const ProfileMenuContent = ({ name, nickname, email }: Props) => {
...
@@ -35,12 +34,12 @@ const ProfileMenuContent = ({ name, nickname, email }: Props) => {
{
email
}
{
email
}
</
Text
>
</
Text
>
<
NavLink
{
...
profileItem
}
isActive=
{
undefined
}
px=
"0px"
isCollapsed=
{
false
}
/>
<
NavLink
{
...
profileItem
}
isActive=
{
undefined
}
px=
"0px"
isCollapsed=
{
false
}
/>
<
Box
as=
"nav"
mt=
{
2
}
pt=
{
2
}
borderTopColor=
{
borderColor
}
borderTopWidth=
"1px"
{
...
getDefaultTransitionProps
()
}
>
<
Box
as=
"nav"
mt=
{
2
}
pt=
{
2
}
borderTopColor=
"divider"
borderTopWidth=
"1px"
{
...
getDefaultTransitionProps
()
}
>
<
VStack
as=
"ul"
spacing=
"0"
alignItems=
"flex-start"
overflow=
"hidden"
>
<
VStack
as=
"ul"
spacing=
"0"
alignItems=
"flex-start"
overflow=
"hidden"
>
{
accountNavItems
.
map
((
item
)
=>
<
NavLink
key=
{
item
.
text
}
{
...
item
}
isActive=
{
undefined
}
isCollapsed=
{
false
}
px=
"0px"
/>)
}
{
accountNavItems
.
map
((
item
)
=>
<
NavLink
key=
{
item
.
text
}
{
...
item
}
isActive=
{
undefined
}
isCollapsed=
{
false
}
px=
"0px"
/>)
}
</
VStack
>
</
VStack
>
</
Box
>
</
Box
>
<
Box
mt=
{
2
}
pt=
{
3
}
borderTopColor=
{
borderColor
}
borderTopWidth=
"1px"
{
...
getDefaultTransitionProps
()
}
>
<
Box
mt=
{
2
}
pt=
{
3
}
borderTopColor=
"divider"
borderTopWidth=
"1px"
{
...
getDefaultTransitionProps
()
}
>
<
Button
size=
"sm"
width=
"full"
variant=
"outline"
as=
"a"
href=
{
appConfig
.
logoutUrl
}
>
Sign Out
</
Button
>
<
Button
size=
"sm"
width=
"full"
variant=
"outline"
as=
"a"
href=
{
appConfig
.
logoutUrl
}
>
Sign Out
</
Button
>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
...
...
ui/snippets/searchBar/SearchBarSuggest.tsx
View file @
42f60f7a
import
{
Text
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Text
}
from
'
@chakra-ui/react
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -40,11 +40,10 @@ const SearchBarSuggest = ({ query, searchTerm }: Props) => {
...
@@ -40,11 +40,10 @@ const SearchBarSuggest = ({ query, searchTerm }: Props) => {
</>
</>
);
);
})();
})();
const
dividerColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
return
(
<>
<>
{
!
isMobile
&&
<
TextAd
pb=
{
4
}
mb=
{
5
}
borderColor=
{
dividerColor
}
borderBottomWidth=
"1px"
/>
}
{
!
isMobile
&&
<
TextAd
pb=
{
4
}
mb=
{
5
}
borderColor=
"divider"
borderBottomWidth=
"1px"
/>
}
{
content
}
{
content
}
</>
</>
);
);
...
...
ui/snippets/searchBar/SearchBarSuggestItem.tsx
View file @
42f60f7a
...
@@ -148,7 +148,7 @@ const SearchBarSuggestItem = ({ data, isMobile, searchTerm }: Props) => {
...
@@ -148,7 +148,7 @@ const SearchBarSuggestItem = ({ data, isMobile, searchTerm }: Props) => {
display=
"flex"
display=
"flex"
flexDir=
"column"
flexDir=
"column"
rowGap=
{
2
}
rowGap=
{
2
}
borderColor=
{
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
"divider"
borderBottomWidth=
"1px"
borderBottomWidth=
"1px"
_last=
{
{
_last=
{
{
borderBottomWidth
:
'
0
'
,
borderBottomWidth
:
'
0
'
,
...
...
ui/tx/TxDetails.tsx
View file @
42f60f7a
...
@@ -10,7 +10,6 @@ import {
...
@@ -10,7 +10,6 @@ import {
Flex
,
Flex
,
Tooltip
,
Tooltip
,
chakra
,
chakra
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -51,8 +50,6 @@ const TxDetails = () => {
...
@@ -51,8 +50,6 @@ const TxDetails = () => {
const
isMobile
=
useIsMobile
();
const
isMobile
=
useIsMobile
();
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
[
isExpanded
,
setIsExpanded
]
=
React
.
useState
(
false
);
const
[
isExpanded
,
setIsExpanded
]
=
React
.
useState
(
false
);
const
handleCutClick
=
React
.
useCallback
(()
=>
{
const
handleCutClick
=
React
.
useCallback
(()
=>
{
...
@@ -188,7 +185,7 @@ const TxDetails = () => {
...
@@ -188,7 +185,7 @@ const TxDetails = () => {
mt=
{
{
base
:
2
,
lg
:
3
}
}
mt=
{
{
base
:
2
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
borderBottom=
"1px solid"
borderBottom=
"1px solid"
borderColor=
{
borderColor
}
borderColor=
"divider"
/>
/>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"From"
title=
"From"
...
@@ -245,7 +242,7 @@ const TxDetails = () => {
...
@@ -245,7 +242,7 @@ const TxDetails = () => {
mt=
{
{
base
:
2
,
lg
:
3
}
}
mt=
{
{
base
:
2
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
borderBottom=
"1px solid"
borderBottom=
"1px solid"
borderColor=
{
borderColor
}
borderColor=
"divider"
/>
/>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Value"
title=
"Value"
...
...
ui/tx/details/TxDetailsSkeleton.tsx
View file @
42f60f7a
import
{
Grid
,
GridItem
,
Skeleton
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
const
TxDetailsSkeleton
=
()
=>
{
const
TxDetailsSkeleton
=
()
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
sectionGap
=
(
const
sectionGap
=
(
<
GridItem
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
2
,
lg
:
3
}
}
mt=
{
{
base
:
2
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
borderBottom=
"1px solid"
borderBottom=
"1px solid"
borderColor=
{
borderColor
}
borderColor=
"divider"
/>
/>
);
);
...
...
ui/txs/TxAdditionalInfo.tsx
View file @
42f60f7a
import
{
Box
,
Heading
,
Text
,
Flex
,
Link
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Heading
,
Text
,
Flex
,
Link
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -12,10 +12,9 @@ import TextSeparator from 'ui/shared/TextSeparator';
...
@@ -12,10 +12,9 @@ import TextSeparator from 'ui/shared/TextSeparator';
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
const
TxAdditionalInfo
=
({
tx
}:
{
tx
:
Transaction
})
=>
{
const
TxAdditionalInfo
=
({
tx
}:
{
tx
:
Transaction
})
=>
{
const
sectionBorderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
sectionProps
=
{
const
sectionProps
=
{
borderBottom
:
'
1px solid
'
,
borderBottom
:
'
1px solid
'
,
borderColor
:
sectionBorderColor
,
borderColor
:
'
divider
'
,
paddingBottom
:
4
,
paddingBottom
:
4
,
};
};
...
...
ui/txs/TxsFilters.tsx
View file @
42f60f7a
...
@@ -3,7 +3,6 @@ import {
...
@@ -3,7 +3,6 @@ import {
CheckboxGroup
,
CheckboxGroup
,
Grid
,
Grid
,
Text
,
Text
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
...
@@ -46,18 +45,16 @@ const TxsFilters = ({ filters, appliedFiltersNum }: Props) => {
...
@@ -46,18 +45,16 @@ const TxsFilters = ({ filters, appliedFiltersNum }: Props) => {
setMethodFilter
(
val
);
setMethodFilter
(
val
);
},
[]);
},
[]);
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
return
(
<
PopoverFilter
contentProps=
{
{
w
:
{
md
:
'
100%
'
,
lg
:
'
438px
'
}
}
}
appliedFiltersNum=
{
appliedFiltersNum
}
>
<
PopoverFilter
contentProps=
{
{
w
:
{
md
:
'
100%
'
,
lg
:
'
438px
'
}
}
}
appliedFiltersNum=
{
appliedFiltersNum
}
>
<
Text
variant=
"secondary"
fontWeight=
"600"
fontSize=
"sm"
>
Type
</
Text
>
<
Text
variant=
"secondary"
fontWeight=
"600"
fontSize=
"sm"
>
Type
</
Text
>
<
Grid
gridTemplateColumns=
"1fr 1fr"
rowGap=
{
5
}
mt=
{
4
}
mb=
{
4
}
pb=
{
6
}
borderBottom=
"1px solid"
borderColor=
{
borderColor
}
>
<
Grid
gridTemplateColumns=
"1fr 1fr"
rowGap=
{
5
}
mt=
{
4
}
mb=
{
4
}
pb=
{
6
}
borderBottom=
"1px solid"
borderColor=
"divider"
>
<
CheckboxGroup
size=
"lg"
onChange=
{
onTypeFilterChange
}
defaultValue=
{
typeFilter
}
>
<
CheckboxGroup
size=
"lg"
onChange=
{
onTypeFilterChange
}
defaultValue=
{
typeFilter
}
>
{
TYPE_OPTIONS
.
map
(({
title
,
id
})
=>
<
Checkbox
key=
{
id
}
value=
{
id
}
><
Text
fontSize=
"md"
>
{
title
}
</
Text
></
Checkbox
>)
}
{
TYPE_OPTIONS
.
map
(({
title
,
id
})
=>
<
Checkbox
key=
{
id
}
value=
{
id
}
><
Text
fontSize=
"md"
>
{
title
}
</
Text
></
Checkbox
>)
}
</
CheckboxGroup
>
</
CheckboxGroup
>
</
Grid
>
</
Grid
>
<
Text
variant=
"secondary"
fontWeight=
"600"
fontSize=
"sm"
>
Method
</
Text
>
<
Text
variant=
"secondary"
fontWeight=
"600"
fontSize=
"sm"
>
Method
</
Text
>
<
Grid
gridTemplateColumns=
"1fr 1fr"
rowGap=
{
5
}
mt=
{
4
}
mb=
{
4
}
pb=
{
6
}
borderBottom=
"1px solid"
borderColor=
{
borderColor
}
>
<
Grid
gridTemplateColumns=
"1fr 1fr"
rowGap=
{
5
}
mt=
{
4
}
mb=
{
4
}
pb=
{
6
}
borderBottom=
"1px solid"
borderColor=
"divider"
>
<
CheckboxGroup
size=
"lg"
onChange=
{
onMethodFilterChange
}
defaultValue=
{
methodFilter
}
>
<
CheckboxGroup
size=
"lg"
onChange=
{
onMethodFilterChange
}
defaultValue=
{
methodFilter
}
>
{
METHOD_OPTIONS
.
map
(({
title
,
id
})
=>
<
Checkbox
key=
{
id
}
value=
{
id
}
><
Text
fontSize=
"md"
>
{
title
}
</
Text
></
Checkbox
>)
}
{
METHOD_OPTIONS
.
map
(({
title
,
id
})
=>
<
Checkbox
key=
{
id
}
value=
{
id
}
><
Text
fontSize=
"md"
>
{
title
}
</
Text
></
Checkbox
>)
}
</
CheckboxGroup
>
</
CheckboxGroup
>
...
...
ui/txs/TxsListItem.tsx
View file @
42f60f7a
...
@@ -8,7 +8,6 @@ import {
...
@@ -8,7 +8,6 @@ import {
ModalContent
,
ModalContent
,
ModalCloseButton
,
ModalCloseButton
,
Text
,
Text
,
useColorModeValue
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -43,7 +42,6 @@ const ARROW_WIDTH = 24;
...
@@ -43,7 +42,6 @@ const ARROW_WIDTH = 24;
const
TxsListItem
=
({
tx
,
showBlockInfo
,
currentAddress
,
enableTimeIncrement
}:
Props
)
=>
{
const
TxsListItem
=
({
tx
,
showBlockInfo
,
currentAddress
,
enableTimeIncrement
}:
Props
)
=>
{
const
{
isOpen
,
onOpen
,
onClose
}
=
useDisclosure
();
const
{
isOpen
,
onOpen
,
onClose
}
=
useDisclosure
();
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
isOut
=
Boolean
(
currentAddress
&&
currentAddress
===
tx
.
from
.
hash
);
const
isOut
=
Boolean
(
currentAddress
&&
currentAddress
===
tx
.
from
.
hash
);
...
@@ -67,7 +65,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
...
@@ -67,7 +65,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
as=
{
transactionIcon
}
as=
{
transactionIcon
}
boxSize=
"30px"
boxSize=
"30px"
mr=
{
2
}
mr=
{
2
}
color=
{
iconColor
}
color=
"link"
/>
/>
<
Address
width=
"100%"
>
<
Address
width=
"100%"
>
<
AddressLink
<
AddressLink
...
...
ui/txs/TxsTableItem.tsx
View file @
42f60f7a
...
@@ -11,7 +11,6 @@ import {
...
@@ -11,7 +11,6 @@ import {
PopoverTrigger
,
PopoverTrigger
,
PopoverContent
,
PopoverContent
,
PopoverBody
,
PopoverBody
,
useColorModeValue
,
Show
,
Show
,
Hide
,
Hide
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
...
@@ -64,7 +63,6 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
...
@@ -64,7 +63,6 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
</
Address
>
</
Address
>
);
);
const
infoBorderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
return
(
<
Tr
<
Tr
as=
{
motion
.
tr
}
as=
{
motion
.
tr
}
...
@@ -81,7 +79,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
...
@@ -81,7 +79,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
<
PopoverTrigger
>
<
PopoverTrigger
>
<
AdditionalInfoButton
isOpen=
{
isOpen
}
/>
<
AdditionalInfoButton
isOpen=
{
isOpen
}
/>
</
PopoverTrigger
>
</
PopoverTrigger
>
<
PopoverContent
border=
"1px solid"
borderColor=
{
infoBorderColor
}
>
<
PopoverContent
border=
"1px solid"
borderColor=
"divider"
>
<
PopoverBody
>
<
PopoverBody
>
<
TxAdditionalInfo
tx=
{
tx
}
/>
<
TxAdditionalInfo
tx=
{
tx
}
/>
</
PopoverBody
>
</
PopoverBody
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment