@lifi/widget 3.12.6-beta.0 → 3.13.0
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/CHANGELOG.md +15 -0
- package/dist/esm/AppProvider.js +9 -2
- package/dist/esm/AppProvider.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js +15 -3
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.js +4 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +3 -5
- package/dist/esm/components/AlertMessage/AlertMessage.style.js +29 -12
- package/dist/esm/components/AlertMessage/AlertMessage.style.js.map +1 -1
- package/dist/esm/components/AmountInput/PriceFormHelperText.js +13 -2
- package/dist/esm/components/AmountInput/PriceFormHelperText.js.map +1 -1
- package/dist/esm/components/AppContainer.js +34 -21
- package/dist/esm/components/AppContainer.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.style.d.ts +3 -1
- package/dist/esm/components/Avatar/Avatar.style.js +8 -6
- package/dist/esm/components/Avatar/Avatar.style.js.map +1 -1
- package/dist/esm/components/Card/Card.js +60 -33
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/CardLabel.js +46 -29
- package/dist/esm/components/Card/CardLabel.js.map +1 -1
- package/dist/esm/components/Card/CardTitle.js +12 -2
- package/dist/esm/components/Card/CardTitle.js.map +1 -1
- package/dist/esm/components/Card/InputCard.d.ts +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.js +3 -1
- package/dist/esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFTBase.js +16 -1
- package/dist/esm/components/ContractComponent/NFT/NFTBase.js.map +1 -1
- package/dist/esm/components/FeeBreakdownTooltip.js +7 -2
- package/dist/esm/components/FeeBreakdownTooltip.js.map +1 -1
- package/dist/esm/components/GasMessage/FundsSufficiencyMessage.js +4 -1
- package/dist/esm/components/GasMessage/FundsSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/GasMessage/GasMessage.style.js +8 -6
- package/dist/esm/components/GasMessage/GasMessage.style.js.map +1 -1
- package/dist/esm/components/GasMessage/GasRefuelMessage.js +11 -1
- package/dist/esm/components/GasMessage/GasRefuelMessage.js.map +1 -1
- package/dist/esm/components/GasMessage/GasSufficiencyMessage.js +9 -1
- package/dist/esm/components/GasMessage/GasSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/Header/NavigationHeader.js +11 -2
- package/dist/esm/components/Header/NavigationHeader.js.map +1 -1
- package/dist/esm/components/Header/WalletMenu.js +12 -3
- package/dist/esm/components/Header/WalletMenu.js.map +1 -1
- package/dist/esm/components/IconTypography.js +4 -3
- package/dist/esm/components/IconTypography.js.map +1 -1
- package/dist/esm/components/ListItem/ListItem.d.ts +2 -4
- package/dist/esm/components/ListItem/ListItemButton.d.ts +1 -1
- package/dist/esm/components/ListItemButton.d.ts +1 -1
- package/dist/esm/components/ListItemButton.js +14 -3
- package/dist/esm/components/ListItemButton.js.map +1 -1
- package/dist/esm/components/NotFound.js +11 -1
- package/dist/esm/components/NotFound.js.map +1 -1
- package/dist/esm/components/PageContainer.js +10 -4
- package/dist/esm/components/PageContainer.js.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.js +14 -2
- package/dist/esm/components/PoweredBy/PoweredBy.js.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/dist/esm/components/ProgressToNextUpdate.js +8 -6
- package/dist/esm/components/ProgressToNextUpdate.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +7 -1
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentials.js +28 -2
- package/dist/esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js +20 -1
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardSkeleton.js +12 -2
- package/dist/esm/components/RouteCard/RouteCardSkeleton.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js +12 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js.map +1 -1
- package/dist/esm/components/Routes/Routes.js +5 -1
- package/dist/esm/components/Routes/Routes.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.js +8 -1
- package/dist/esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/dist/esm/components/Select.js +16 -5
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js +34 -8
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWallet.style.js +28 -7
- package/dist/esm/components/SendToWallet/SendToWallet.style.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js +5 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/dist/esm/components/SettingsListItemButton.d.ts +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +1 -1
- package/dist/esm/components/Step/DestinationWalletAddress.js +10 -2
- package/dist/esm/components/Step/DestinationWalletAddress.js.map +1 -1
- package/dist/esm/components/Step/Step.js +3 -1
- package/dist/esm/components/Step/Step.js.map +1 -1
- package/dist/esm/components/Step/StepProcess.js +16 -3
- package/dist/esm/components/Step/StepProcess.js.map +1 -1
- package/dist/esm/components/Step/StepTimer.js +5 -1
- package/dist/esm/components/Step/StepTimer.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.js +22 -3
- package/dist/esm/components/StepActions/StepActions.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.style.js +19 -10
- package/dist/esm/components/StepActions/StepActions.style.js.map +1 -1
- package/dist/esm/components/StepActions/StepFees.js +9 -1
- package/dist/esm/components/StepActions/StepFees.js.map +1 -1
- package/dist/esm/components/Switch.js +12 -7
- package/dist/esm/components/Switch.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.style.d.ts +1 -1
- package/dist/esm/components/Tabs/Tabs.style.js +16 -12
- package/dist/esm/components/Tabs/Tabs.style.js.map +1 -1
- package/dist/esm/components/ToAddressRequiredMessage.js +4 -1
- package/dist/esm/components/ToAddressRequiredMessage.js.map +1 -1
- package/dist/esm/components/Token/Token.js +47 -6
- package/dist/esm/components/Token/Token.js.map +1 -1
- package/dist/esm/components/Token/Token.style.js +14 -7
- package/dist/esm/components/Token/Token.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.style.d.ts +3 -5
- package/dist/esm/components/TokenList/TokenListItem.js +21 -4
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js +8 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/dist/esm/components/TransactionDetails.js +52 -6
- package/dist/esm/components/TransactionDetails.js.map +1 -1
- package/dist/esm/config/version.d.ts +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/config/version.js.map +1 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js +11 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js.map +1 -1
- package/dist/esm/pages/MainPage/MainPage.js +5 -1
- package/dist/esm/pages/MainPage/MainPage.js.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js +8 -1
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js +4 -1
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js +4 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/EmptyListIndicator.js +5 -1
- package/dist/esm/pages/SendToWallet/EmptyListIndicator.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js +7 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js +6 -6
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.js +9 -2
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js +7 -2
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +4 -3
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +10 -3
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +16 -3
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js +6 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js +11 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js +14 -2
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +10 -2
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js +35 -3
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js +12 -2
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +45 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionPage.js +4 -1
- package/dist/esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/package.json +18 -18
- package/src/AppProvider.tsx +16 -2
- package/src/components/ActiveTransactions/ActiveTransactionItem.tsx +16 -9
- package/src/components/ActiveTransactions/ActiveTransactions.tsx +7 -1
- package/src/components/AlertMessage/AlertMessage.style.tsx +30 -14
- package/src/components/AmountInput/PriceFormHelperText.tsx +12 -10
- package/src/components/AppContainer.tsx +34 -23
- package/src/components/Avatar/Avatar.style.tsx +8 -8
- package/src/components/Card/Card.tsx +60 -37
- package/src/components/Card/CardLabel.tsx +69 -43
- package/src/components/Card/CardTitle.tsx +12 -2
- package/src/components/ChainSelect/ChainSelect.tsx +7 -1
- package/src/components/ContractComponent/NFT/NFTBase.tsx +33 -6
- package/src/components/FeeBreakdownTooltip.tsx +9 -3
- package/src/components/GasMessage/FundsSufficiencyMessage.tsx +7 -1
- package/src/components/GasMessage/GasMessage.style.ts +8 -8
- package/src/components/GasMessage/GasRefuelMessage.tsx +19 -6
- package/src/components/GasMessage/GasSufficiencyMessage.tsx +21 -3
- package/src/components/Header/NavigationHeader.tsx +23 -5
- package/src/components/Header/WalletMenu.tsx +18 -3
- package/src/components/IconTypography.ts +4 -4
- package/src/components/ListItemButton.tsx +21 -12
- package/src/components/NotFound.tsx +17 -6
- package/src/components/PageContainer.ts +19 -15
- package/src/components/PoweredBy/PoweredBy.tsx +16 -8
- package/src/components/ProgressToNextUpdate.tsx +8 -8
- package/src/components/RouteCard/RouteCard.tsx +12 -2
- package/src/components/RouteCard/RouteCardEssentials.tsx +38 -16
- package/src/components/RouteCard/RouteCardEssentialsExpanded.tsx +30 -11
- package/src/components/RouteCard/RouteCardSkeleton.tsx +19 -3
- package/src/components/RouteCard/RouteNotFoundCard.tsx +18 -7
- package/src/components/Routes/Routes.tsx +10 -2
- package/src/components/Routes/RoutesExpanded.tsx +16 -2
- package/src/components/Select.tsx +16 -6
- package/src/components/SelectTokenButton/SelectTokenButton.style.tsx +34 -8
- package/src/components/SendToWallet/SendToWallet.style.tsx +28 -7
- package/src/components/SendToWallet/SendToWalletButton.tsx +7 -1
- package/src/components/Step/DestinationWalletAddress.tsx +14 -2
- package/src/components/Step/Step.tsx +5 -1
- package/src/components/Step/StepProcess.tsx +18 -9
- package/src/components/Step/StepTimer.tsx +9 -5
- package/src/components/StepActions/StepActions.style.tsx +19 -13
- package/src/components/StepActions/StepActions.tsx +32 -10
- package/src/components/StepActions/StepFees.tsx +9 -4
- package/src/components/Switch.tsx +12 -9
- package/src/components/Tabs/Tabs.style.tsx +16 -16
- package/src/components/ToAddressRequiredMessage.tsx +7 -1
- package/src/components/Token/Token.style.tsx +14 -8
- package/src/components/Token/Token.tsx +75 -12
- package/src/components/TokenList/TokenListItem.tsx +37 -8
- package/src/components/TokenList/VirtualizedTokenList.tsx +8 -6
- package/src/components/TransactionDetails.tsx +75 -17
- package/src/config/version.ts +1 -1
- package/src/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.tsx +17 -6
- package/src/pages/MainPage/MainPage.tsx +7 -1
- package/src/pages/SelectTokenPage/SelectTokenPage.tsx +17 -3
- package/src/pages/SendToWallet/BookmarkAddressSheet.tsx +6 -1
- package/src/pages/SendToWallet/ConfirmAddressSheet.tsx +6 -1
- package/src/pages/SendToWallet/EmptyListIndicator.tsx +7 -1
- package/src/pages/SendToWallet/SendToWalletPage.style.tsx +6 -9
- package/src/pages/SendToWallet/SendToWalletPage.tsx +17 -3
- package/src/pages/SettingsPage/ResetSettingsButton.style.tsx +0 -1
- package/src/pages/SettingsPage/ResetSettingsButton.tsx +18 -3
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +4 -5
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.tsx +11 -2
- package/src/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +16 -4
- package/src/pages/TransactionDetailsPage/TransactionDetailsSkeleton.tsx +29 -9
- package/src/pages/TransactionDetailsPage/TransferIdCard.tsx +6 -4
- package/src/pages/TransactionHistoryPage/TransactionHistoryEmpty.tsx +17 -6
- package/src/pages/TransactionHistoryPage/TransactionHistoryItem.tsx +24 -6
- package/src/pages/TransactionHistoryPage/TransactionHistorySkeleton.tsx +14 -4
- package/src/pages/TransactionPage/ExchangeRateBottomSheet.tsx +70 -11
- package/src/pages/TransactionPage/StatusBottomSheet.tsx +27 -4
- package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +92 -15
- package/src/pages/TransactionPage/TransactionPage.tsx +6 -1
|
@@ -16,30 +16,32 @@ import { ElementId, createElementId } from '../utils/elements.js'
|
|
|
16
16
|
|
|
17
17
|
export const AppExpandedContainer = styled(Box, {
|
|
18
18
|
shouldForwardProp: (prop) => prop !== 'variant',
|
|
19
|
-
})<{ variant?: WidgetVariant }>(({ theme
|
|
19
|
+
})<{ variant?: WidgetVariant }>(({ theme }) => ({
|
|
20
20
|
display: 'flex',
|
|
21
21
|
justifyContent: 'center',
|
|
22
22
|
alignItems: 'start',
|
|
23
23
|
flex: 1,
|
|
24
24
|
height:
|
|
25
|
-
|
|
26
|
-
? '
|
|
27
|
-
: theme.container?.
|
|
28
|
-
? '
|
|
29
|
-
: theme.container?.
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
theme.container?.display === 'flex'
|
|
26
|
+
? '100%'
|
|
27
|
+
: theme.container?.maxHeight
|
|
28
|
+
? 'auto'
|
|
29
|
+
: theme.container?.height || 'auto',
|
|
30
|
+
variants: [
|
|
31
|
+
{
|
|
32
|
+
props: {
|
|
33
|
+
variant: 'drawer',
|
|
34
|
+
},
|
|
35
|
+
style: {
|
|
36
|
+
height: 'none',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
32
40
|
}))
|
|
33
41
|
|
|
34
42
|
export const RelativeContainer = styled(Box, {
|
|
35
43
|
shouldForwardProp: (prop) => prop !== 'variant',
|
|
36
|
-
})<{ variant?: WidgetVariant }>(({ theme
|
|
37
|
-
const container = { ...theme.container }
|
|
38
|
-
|
|
39
|
-
if (variant === 'drawer') {
|
|
40
|
-
container.height = '100%'
|
|
41
|
-
}
|
|
42
|
-
|
|
44
|
+
})<{ variant?: WidgetVariant }>(({ theme }) => {
|
|
43
45
|
return {
|
|
44
46
|
position: 'relative',
|
|
45
47
|
boxSizing: 'content-box',
|
|
@@ -50,15 +52,24 @@ export const RelativeContainer = styled(Box, {
|
|
|
50
52
|
overflow: 'auto',
|
|
51
53
|
flex: 1,
|
|
52
54
|
zIndex: 0,
|
|
53
|
-
...container,
|
|
55
|
+
...theme.container,
|
|
54
56
|
maxHeight:
|
|
55
|
-
|
|
56
|
-
? '
|
|
57
|
-
: theme.container?.
|
|
58
|
-
?
|
|
59
|
-
: theme.container?.
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
theme.container?.display === 'flex' && !theme.container?.height
|
|
58
|
+
? '100%'
|
|
59
|
+
: theme.container?.maxHeight
|
|
60
|
+
? theme.container?.maxHeight
|
|
61
|
+
: theme.container?.height || defaultMaxHeight,
|
|
62
|
+
variants: [
|
|
63
|
+
{
|
|
64
|
+
props: {
|
|
65
|
+
variant: 'drawer',
|
|
66
|
+
},
|
|
67
|
+
style: {
|
|
68
|
+
maxHeight: 'none',
|
|
69
|
+
height: '100%',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
],
|
|
62
73
|
}
|
|
63
74
|
})
|
|
64
75
|
|
|
@@ -36,27 +36,27 @@ export const AvatarDefault = styled(Box)(({ theme }) => {
|
|
|
36
36
|
display: 'flex',
|
|
37
37
|
alignItems: 'center',
|
|
38
38
|
justifyContent: 'center',
|
|
39
|
-
background:
|
|
40
|
-
theme.palette.mode === 'light'
|
|
41
|
-
? theme.palette.grey[300]
|
|
42
|
-
: theme.palette.grey[800],
|
|
39
|
+
background: theme.palette.grey[800],
|
|
43
40
|
borderRadius: '50%',
|
|
44
41
|
height: root?.height,
|
|
45
42
|
width: root?.width,
|
|
46
43
|
color: theme.palette.text.secondary,
|
|
47
44
|
mask: avatarMask16,
|
|
45
|
+
...theme.applyStyles('light', {
|
|
46
|
+
background: theme.palette.grey[300],
|
|
47
|
+
}),
|
|
48
48
|
}
|
|
49
49
|
})
|
|
50
50
|
|
|
51
51
|
export const AvatarDefaultBadge = styled(Box)(({ theme }) => {
|
|
52
52
|
return {
|
|
53
|
-
background:
|
|
54
|
-
theme.palette.mode === 'light'
|
|
55
|
-
? theme.palette.grey[300]
|
|
56
|
-
: theme.palette.grey[800],
|
|
53
|
+
background: theme.palette.grey[800],
|
|
57
54
|
borderRadius: '50%',
|
|
58
55
|
height: 16,
|
|
59
56
|
width: 16,
|
|
57
|
+
...theme.applyStyles('light', {
|
|
58
|
+
background: theme.palette.grey[300],
|
|
59
|
+
}),
|
|
60
60
|
}
|
|
61
61
|
})
|
|
62
62
|
|
|
@@ -10,45 +10,68 @@ export interface CardProps extends MuiCardProps {
|
|
|
10
10
|
export const Card = styled(MuiCard, {
|
|
11
11
|
shouldForwardProp: (prop) =>
|
|
12
12
|
!['type', 'indented', 'selectionColor'].includes(prop as string),
|
|
13
|
-
})<CardProps>(({ theme
|
|
13
|
+
})<CardProps>(({ theme }) => {
|
|
14
14
|
return {
|
|
15
|
-
padding:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
: darken(theme.palette.primary.main, 0.65),
|
|
22
|
-
borderWidth: 1,
|
|
23
|
-
borderStyle: 'solid',
|
|
24
|
-
borderColor: theme.palette.primary.main,
|
|
25
|
-
'&:hover': {
|
|
26
|
-
backgroundColor:
|
|
27
|
-
theme.palette.mode === 'light'
|
|
28
|
-
? lighten(theme.palette.primary.main, 0.9)
|
|
29
|
-
: darken(theme.palette.primary.main, 0.6),
|
|
15
|
+
padding: 0,
|
|
16
|
+
variants: [
|
|
17
|
+
{
|
|
18
|
+
props: ({ indented }) => indented,
|
|
19
|
+
style: {
|
|
20
|
+
padding: theme.spacing(2),
|
|
30
21
|
},
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
? lighten(theme.palette.secondary.main, 0.85)
|
|
37
|
-
: darken(theme.palette.secondary.main, 0.76),
|
|
38
|
-
borderWidth: 1,
|
|
39
|
-
borderStyle: 'solid',
|
|
40
|
-
borderColor: alpha(theme.palette.secondary.main, 0.2),
|
|
41
|
-
'&:hover': {
|
|
42
|
-
backgroundColor:
|
|
43
|
-
theme.palette.mode === 'light'
|
|
44
|
-
? lighten(theme.palette.secondary.main, 0.8)
|
|
45
|
-
: darken(theme.palette.secondary.main, 0.72),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
props: {
|
|
25
|
+
selectionColor: 'primary',
|
|
26
|
+
type: 'selected',
|
|
46
27
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
28
|
+
style: {
|
|
29
|
+
backgroundColor: darken(theme.palette.primary.main, 0.65),
|
|
30
|
+
borderWidth: 1,
|
|
31
|
+
borderStyle: 'solid',
|
|
32
|
+
borderColor: theme.palette.primary.main,
|
|
33
|
+
'&:hover': {
|
|
34
|
+
backgroundColor: darken(theme.palette.primary.main, 0.6),
|
|
35
|
+
...theme.applyStyles('light', {
|
|
36
|
+
backgroundColor: lighten(theme.palette.primary.main, 0.9),
|
|
37
|
+
}),
|
|
38
|
+
},
|
|
39
|
+
...theme.applyStyles('light', {
|
|
40
|
+
backgroundColor: lighten(theme.palette.primary.main, 0.95),
|
|
41
|
+
}),
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
props: {
|
|
46
|
+
selectionColor: 'secondary',
|
|
47
|
+
type: 'selected',
|
|
48
|
+
},
|
|
49
|
+
style: {
|
|
50
|
+
backgroundColor: darken(theme.palette.secondary.main, 0.76),
|
|
51
|
+
borderWidth: 1,
|
|
52
|
+
borderStyle: 'solid',
|
|
53
|
+
borderColor: alpha(theme.palette.secondary.main, 0.2),
|
|
54
|
+
'&:hover': {
|
|
55
|
+
backgroundColor: darken(theme.palette.secondary.main, 0.72),
|
|
56
|
+
...theme.applyStyles('light', {
|
|
57
|
+
backgroundColor: lighten(theme.palette.secondary.main, 0.8),
|
|
58
|
+
}),
|
|
59
|
+
},
|
|
60
|
+
...theme.applyStyles('light', {
|
|
61
|
+
backgroundColor: lighten(theme.palette.secondary.main, 0.85),
|
|
62
|
+
}),
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
props: {
|
|
67
|
+
type: 'error',
|
|
68
|
+
},
|
|
69
|
+
style: {
|
|
70
|
+
borderWidth: 1,
|
|
71
|
+
borderStyle: 'solid',
|
|
72
|
+
borderColor: theme.palette.error.main,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
],
|
|
53
76
|
}
|
|
54
77
|
})
|
|
@@ -3,54 +3,80 @@ import { blend } from '../../utils/colors.js'
|
|
|
3
3
|
|
|
4
4
|
export const CardLabel = styled(Box, {
|
|
5
5
|
shouldForwardProp: (prop) => prop !== 'type',
|
|
6
|
-
})<{ type?: 'active' }>(({ theme
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
})<{ type?: 'active' }>(({ theme }) => ({
|
|
7
|
+
borderRadius: theme.shape.borderRadius,
|
|
8
|
+
padding: 0,
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
height: 24,
|
|
13
|
+
minWidth: 24,
|
|
14
|
+
userSelect: 'none',
|
|
15
|
+
fontSize: '1rem',
|
|
16
|
+
marginRight: theme.spacing(1),
|
|
17
|
+
backgroundColor: blend(
|
|
18
|
+
theme.palette.background.paper,
|
|
19
|
+
theme.palette.common.white,
|
|
20
|
+
0.16
|
|
21
|
+
),
|
|
22
|
+
color: theme.palette.text.primary,
|
|
23
|
+
...theme.applyStyles('light', {
|
|
24
|
+
backgroundColor: blend(
|
|
25
|
+
theme.palette.background.paper,
|
|
26
|
+
theme.palette.common.black,
|
|
27
|
+
0.12
|
|
28
|
+
),
|
|
29
|
+
}),
|
|
30
|
+
variants: [
|
|
31
|
+
{
|
|
32
|
+
props: { type: 'active' },
|
|
33
|
+
style: {
|
|
34
|
+
backgroundColor: blend(
|
|
35
|
+
theme.palette.background.paper,
|
|
36
|
+
theme.palette.secondary.main,
|
|
37
|
+
0.8
|
|
38
|
+
),
|
|
39
|
+
color:
|
|
40
|
+
getContrastRatio(
|
|
24
41
|
theme.palette.common.white,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
42
|
+
blend(
|
|
43
|
+
theme.palette.background.paper,
|
|
44
|
+
theme.palette.secondary.main,
|
|
45
|
+
0.8
|
|
46
|
+
)
|
|
47
|
+
) >= 3
|
|
48
|
+
? theme.palette.common.white
|
|
49
|
+
: theme.palette.common.black,
|
|
50
|
+
...theme.applyStyles('light', {
|
|
51
|
+
backgroundColor: theme.palette.secondary.main,
|
|
52
|
+
color:
|
|
53
|
+
getContrastRatio(
|
|
54
|
+
theme.palette.common.white,
|
|
55
|
+
theme.palette.secondary.main
|
|
56
|
+
) >= 3
|
|
57
|
+
? theme.palette.common.white
|
|
58
|
+
: theme.palette.common.black,
|
|
59
|
+
}),
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
}))
|
|
45
64
|
|
|
46
65
|
export const CardLabelTypography = styled(Typography, {
|
|
47
66
|
shouldForwardProp: (prop) => prop !== 'type',
|
|
48
|
-
})<{ type?: 'icon' }>(({ theme
|
|
49
|
-
padding:
|
|
50
|
-
type === 'icon'
|
|
51
|
-
? theme.spacing(0.75, 0, 0.75, 0.75)
|
|
52
|
-
: theme.spacing(0.75, 1.5),
|
|
67
|
+
})<{ type?: 'icon' }>(({ theme }) => ({
|
|
68
|
+
padding: theme.spacing(0.75, 1.5),
|
|
53
69
|
fontSize: 12,
|
|
54
70
|
lineHeight: 1,
|
|
55
71
|
fontWeight: '600',
|
|
72
|
+
variants: [
|
|
73
|
+
{
|
|
74
|
+
props: {
|
|
75
|
+
type: 'icon',
|
|
76
|
+
},
|
|
77
|
+
style: {
|
|
78
|
+
padding: theme.spacing(0.75, 0, 0.75, 0.75),
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
],
|
|
56
82
|
}))
|
|
@@ -2,7 +2,7 @@ import { Typography, styled } from '@mui/material'
|
|
|
2
2
|
|
|
3
3
|
export const CardTitle = styled(Typography, {
|
|
4
4
|
shouldForwardProp: (prop) => !['required'].includes(prop as string),
|
|
5
|
-
})<{ required?: boolean }>(({ theme
|
|
5
|
+
})<{ required?: boolean }>(({ theme }) => ({
|
|
6
6
|
fontSize: 14,
|
|
7
7
|
lineHeight: 1,
|
|
8
8
|
fontWeight: 700,
|
|
@@ -10,7 +10,17 @@ export const CardTitle = styled(Typography, {
|
|
|
10
10
|
textAlign: 'left',
|
|
11
11
|
color: theme.palette.text.primary,
|
|
12
12
|
'&:after': {
|
|
13
|
-
content:
|
|
13
|
+
content: 'none',
|
|
14
14
|
color: theme.palette.error.main,
|
|
15
15
|
},
|
|
16
|
+
variants: [
|
|
17
|
+
{
|
|
18
|
+
props: ({ required }) => required,
|
|
19
|
+
style: {
|
|
20
|
+
'&:after': {
|
|
21
|
+
content: '" *"',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
16
26
|
}))
|
|
@@ -90,7 +90,13 @@ export const ChainSelect = ({ formType }: FormTypeProps) => {
|
|
|
90
90
|
placeItems: 'center',
|
|
91
91
|
}}
|
|
92
92
|
>
|
|
93
|
-
<Typography
|
|
93
|
+
<Typography
|
|
94
|
+
sx={{
|
|
95
|
+
fontWeight: 500,
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
+{chainsToHide}
|
|
99
|
+
</Typography>
|
|
94
100
|
</Box>
|
|
95
101
|
</ChainCard>
|
|
96
102
|
) : null}
|
|
@@ -14,8 +14,16 @@ export const NFTBase: React.FC<NFTProps> = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
const { t } = useTranslation()
|
|
16
16
|
return (
|
|
17
|
-
<Box
|
|
18
|
-
|
|
17
|
+
<Box
|
|
18
|
+
sx={{
|
|
19
|
+
p: 2,
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<Box
|
|
23
|
+
sx={{
|
|
24
|
+
display: 'flex',
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
19
27
|
{isLoading ? (
|
|
20
28
|
<Skeleton
|
|
21
29
|
width={96}
|
|
@@ -26,25 +34,44 @@ export const NFTBase: React.FC<NFTProps> = ({
|
|
|
26
34
|
) : (
|
|
27
35
|
<PreviewAvatar src={imageUrl} />
|
|
28
36
|
)}
|
|
29
|
-
<Box
|
|
37
|
+
<Box
|
|
38
|
+
sx={{
|
|
39
|
+
ml: 2,
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
30
42
|
{isLoading ? (
|
|
31
43
|
<Skeleton width={144} height={21} variant="text" />
|
|
32
44
|
) : (
|
|
33
|
-
<Typography
|
|
45
|
+
<Typography
|
|
46
|
+
sx={{
|
|
47
|
+
fontSize: 14,
|
|
48
|
+
color: 'text.secondary',
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
34
51
|
{collectionName}
|
|
35
52
|
</Typography>
|
|
36
53
|
)}
|
|
37
54
|
{isLoading ? (
|
|
38
55
|
<Skeleton width={112} height={27} variant="text" />
|
|
39
56
|
) : (
|
|
40
|
-
<Typography
|
|
57
|
+
<Typography
|
|
58
|
+
sx={{
|
|
59
|
+
fontSize: 18,
|
|
60
|
+
fontWeight: 600,
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
41
63
|
{assetName}
|
|
42
64
|
</Typography>
|
|
43
65
|
)}
|
|
44
66
|
{isLoading ? (
|
|
45
67
|
<Skeleton width={128} height={21} variant="text" />
|
|
46
68
|
) : owner ? (
|
|
47
|
-
<Typography
|
|
69
|
+
<Typography
|
|
70
|
+
sx={{
|
|
71
|
+
fontSize: 14,
|
|
72
|
+
color: 'text.secondary',
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
48
75
|
{t('main.ownedBy')}{' '}
|
|
49
76
|
<Link
|
|
50
77
|
href={owner.url}
|
|
@@ -28,7 +28,11 @@ export const FeeBreakdownTooltip: React.FC<FeeBreakdownTooltipProps> = ({
|
|
|
28
28
|
</Box>
|
|
29
29
|
) : null}
|
|
30
30
|
{feeCosts?.length ? (
|
|
31
|
-
<Box
|
|
31
|
+
<Box
|
|
32
|
+
sx={{
|
|
33
|
+
mt: 0.5,
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
32
36
|
{t('main.fees.provider')}
|
|
33
37
|
{getFeeBreakdownTypography(feeCosts, t)}
|
|
34
38
|
</Box>
|
|
@@ -48,10 +52,12 @@ export const getFeeBreakdownTypography = (
|
|
|
48
52
|
) =>
|
|
49
53
|
fees.map((fee, index) => (
|
|
50
54
|
<Typography
|
|
51
|
-
fontSize={12}
|
|
52
|
-
fontWeight="500"
|
|
53
55
|
color="inherit"
|
|
54
56
|
key={`${fee.token.address}${index}`}
|
|
57
|
+
sx={{
|
|
58
|
+
fontSize: 12,
|
|
59
|
+
fontWeight: '500',
|
|
60
|
+
}}
|
|
55
61
|
>
|
|
56
62
|
{t('format.currency', { value: fee.amountUSD })} (
|
|
57
63
|
{t('format.number', {
|
|
@@ -10,7 +10,13 @@ export const FundsSufficiencyMessage = () => {
|
|
|
10
10
|
severity="warning"
|
|
11
11
|
icon={<WarningRounded />}
|
|
12
12
|
title={
|
|
13
|
-
<Typography
|
|
13
|
+
<Typography
|
|
14
|
+
variant="body2"
|
|
15
|
+
sx={{
|
|
16
|
+
px: 1,
|
|
17
|
+
color: 'text.primary',
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
14
20
|
{t('warning.message.insufficientFunds')}
|
|
15
21
|
</Typography>
|
|
16
22
|
}
|
|
@@ -5,17 +5,17 @@ export const InfoMessageSwitch = styled(Switch)(({ theme }) => ({
|
|
|
5
5
|
[`.${switchClasses.switchBase}`]: {
|
|
6
6
|
[`&.${switchClasses.checked}`]: {
|
|
7
7
|
[`& + .${switchClasses.track}`]: {
|
|
8
|
-
backgroundColor:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
backgroundColor: alpha(theme.palette.info.main, 0.84),
|
|
9
|
+
...theme.applyStyles('light', {
|
|
10
|
+
backgroundColor: theme.palette.info.main,
|
|
11
|
+
}),
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
[`&.Mui-focusVisible .${switchClasses.thumb}`]: {
|
|
15
|
-
color:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
color: alpha(theme.palette.info.main, 0.84),
|
|
16
|
+
...theme.applyStyles('light', {
|
|
17
|
+
color: theme.palette.info.main,
|
|
18
|
+
}),
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
}))
|
|
@@ -34,12 +34,19 @@ export const GasRefuelMessage: React.FC<BoxProps> = (props) => {
|
|
|
34
34
|
icon={<EvStation />}
|
|
35
35
|
title={
|
|
36
36
|
<Box
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
sx={{
|
|
38
|
+
display: 'flex',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
justifyContent: 'space-between',
|
|
41
|
+
flexGrow: 1,
|
|
42
|
+
}}
|
|
41
43
|
>
|
|
42
|
-
<Typography
|
|
44
|
+
<Typography
|
|
45
|
+
variant="body2"
|
|
46
|
+
sx={{
|
|
47
|
+
fontWeight: 700,
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
43
50
|
{t('info.title.autoRefuel', { chainName: chain?.name ?? '' })}
|
|
44
51
|
</Typography>
|
|
45
52
|
<InfoMessageSwitch
|
|
@@ -56,7 +63,13 @@ export const GasRefuelMessage: React.FC<BoxProps> = (props) => {
|
|
|
56
63
|
unmountOnExit
|
|
57
64
|
mountOnEnter
|
|
58
65
|
>
|
|
59
|
-
<Typography
|
|
66
|
+
<Typography
|
|
67
|
+
variant="body2"
|
|
68
|
+
sx={{
|
|
69
|
+
px: 2,
|
|
70
|
+
pt: 1,
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
60
73
|
{t('info.message.autoRefuel', {
|
|
61
74
|
chainName: chain?.name,
|
|
62
75
|
})}
|
|
@@ -18,16 +18,34 @@ export const GasSufficiencyMessage: React.FC<GasSufficiencyMessageProps> = ({
|
|
|
18
18
|
severity="warning"
|
|
19
19
|
icon={<EvStation />}
|
|
20
20
|
title={
|
|
21
|
-
<Typography
|
|
21
|
+
<Typography
|
|
22
|
+
variant="body2"
|
|
23
|
+
sx={{
|
|
24
|
+
fontWeight: 700,
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
22
27
|
{t('warning.title.insufficientGas')}
|
|
23
28
|
</Typography>
|
|
24
29
|
}
|
|
25
30
|
>
|
|
26
|
-
<Typography
|
|
31
|
+
<Typography
|
|
32
|
+
variant="body2"
|
|
33
|
+
sx={{
|
|
34
|
+
px: 2,
|
|
35
|
+
pt: 1,
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
27
38
|
{t('warning.message.insufficientGas')}
|
|
28
39
|
</Typography>
|
|
29
40
|
{insufficientGas?.map((item, index) => (
|
|
30
|
-
<Typography
|
|
41
|
+
<Typography
|
|
42
|
+
key={index}
|
|
43
|
+
variant="body2"
|
|
44
|
+
sx={{
|
|
45
|
+
px: 2,
|
|
46
|
+
pt: 0.5,
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
31
49
|
{t('main.tokenOnChainAmount', {
|
|
32
50
|
amount: formatUnits(
|
|
33
51
|
item.insufficientAmount ?? 0n,
|
|
@@ -40,16 +40,22 @@ export const NavigationHeader: React.FC = () => {
|
|
|
40
40
|
<BackButton onClick={navigateBack} />
|
|
41
41
|
) : null}
|
|
42
42
|
{splitSubvariant ? (
|
|
43
|
-
<Box
|
|
43
|
+
<Box
|
|
44
|
+
sx={{
|
|
45
|
+
flex: 1,
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
44
48
|
<SplitWalletMenuButton />
|
|
45
49
|
</Box>
|
|
46
50
|
) : (
|
|
47
51
|
<Typography
|
|
48
|
-
fontSize={hasPath ? 18 : 24}
|
|
49
52
|
align={hasPath ? 'center' : 'left'}
|
|
50
|
-
fontWeight="700"
|
|
51
|
-
flex={1}
|
|
52
53
|
noWrap
|
|
54
|
+
sx={{
|
|
55
|
+
fontSize: hasPath ? 18 : 24,
|
|
56
|
+
fontWeight: '700',
|
|
57
|
+
flex: 1,
|
|
58
|
+
}}
|
|
53
59
|
>
|
|
54
60
|
{title}
|
|
55
61
|
</Typography>
|
|
@@ -71,7 +77,19 @@ export const NavigationHeader: React.FC = () => {
|
|
|
71
77
|
</HeaderControlsContainer>
|
|
72
78
|
}
|
|
73
79
|
/>
|
|
74
|
-
<Route
|
|
80
|
+
<Route
|
|
81
|
+
path="*"
|
|
82
|
+
element={
|
|
83
|
+
element || (
|
|
84
|
+
<Box
|
|
85
|
+
sx={{
|
|
86
|
+
width: 28,
|
|
87
|
+
height: 40,
|
|
88
|
+
}}
|
|
89
|
+
/>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
/>
|
|
75
93
|
</Routes>
|
|
76
94
|
</HeaderAppBar>
|
|
77
95
|
{splitSubvariant ? <NavigationTabs /> : null}
|