@lifi/widget 3.12.6-alpha.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.
Files changed (278) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/esm/AppProvider.js +9 -2
  3. package/dist/esm/AppProvider.js.map +1 -1
  4. package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js +15 -3
  5. package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js.map +1 -1
  6. package/dist/esm/components/ActiveTransactions/ActiveTransactions.js +4 -1
  7. package/dist/esm/components/ActiveTransactions/ActiveTransactions.js.map +1 -1
  8. package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +4 -6
  9. package/dist/esm/components/AlertMessage/AlertMessage.style.js +29 -12
  10. package/dist/esm/components/AlertMessage/AlertMessage.style.js.map +1 -1
  11. package/dist/esm/components/AmountInput/AmountInput.js +7 -1
  12. package/dist/esm/components/AmountInput/AmountInput.js.map +1 -1
  13. package/dist/esm/components/AmountInput/AmountInput.style.d.ts +1 -1
  14. package/dist/esm/components/AmountInput/AmountInputAdornment.style.d.ts +1 -1
  15. package/dist/esm/components/AmountInput/PriceFormHelperText.js +13 -2
  16. package/dist/esm/components/AmountInput/PriceFormHelperText.js.map +1 -1
  17. package/dist/esm/components/AppContainer.d.ts +1 -1
  18. package/dist/esm/components/AppContainer.js +34 -21
  19. package/dist/esm/components/AppContainer.js.map +1 -1
  20. package/dist/esm/components/Avatar/Avatar.style.d.ts +4 -2
  21. package/dist/esm/components/Avatar/Avatar.style.js +8 -6
  22. package/dist/esm/components/Avatar/Avatar.style.js.map +1 -1
  23. package/dist/esm/components/Avatar/SmallAvatar.d.ts +1 -1
  24. package/dist/esm/components/ButtonTertiary.d.ts +1 -1
  25. package/dist/esm/components/Card/Card.js +60 -33
  26. package/dist/esm/components/Card/Card.js.map +1 -1
  27. package/dist/esm/components/Card/CardHeader.d.ts +1 -1
  28. package/dist/esm/components/Card/CardLabel.js +46 -29
  29. package/dist/esm/components/Card/CardLabel.js.map +1 -1
  30. package/dist/esm/components/Card/CardTitle.js +12 -2
  31. package/dist/esm/components/Card/CardTitle.js.map +1 -1
  32. package/dist/esm/components/Card/InputCard.d.ts +1 -1
  33. package/dist/esm/components/ChainSelect/ChainSelect.js +3 -1
  34. package/dist/esm/components/ChainSelect/ChainSelect.js.map +1 -1
  35. package/dist/esm/components/ContractComponent/ItemPrice.js +2 -1
  36. package/dist/esm/components/ContractComponent/ItemPrice.js.map +1 -1
  37. package/dist/esm/components/ContractComponent/NFT/NFT.js +2 -1
  38. package/dist/esm/components/ContractComponent/NFT/NFT.js.map +1 -1
  39. package/dist/esm/components/ContractComponent/NFT/NFT.style.d.ts +1 -1
  40. package/dist/esm/components/ContractComponent/NFT/NFTBase.js +16 -1
  41. package/dist/esm/components/ContractComponent/NFT/NFTBase.js.map +1 -1
  42. package/dist/esm/components/FeeBreakdownTooltip.js +7 -2
  43. package/dist/esm/components/FeeBreakdownTooltip.js.map +1 -1
  44. package/dist/esm/components/GasMessage/FundsSufficiencyMessage.js +4 -1
  45. package/dist/esm/components/GasMessage/FundsSufficiencyMessage.js.map +1 -1
  46. package/dist/esm/components/GasMessage/GasMessage.style.js +8 -6
  47. package/dist/esm/components/GasMessage/GasMessage.style.js.map +1 -1
  48. package/dist/esm/components/GasMessage/GasRefuelMessage.js +11 -1
  49. package/dist/esm/components/GasMessage/GasRefuelMessage.js.map +1 -1
  50. package/dist/esm/components/GasMessage/GasSufficiencyMessage.js +9 -1
  51. package/dist/esm/components/GasMessage/GasSufficiencyMessage.js.map +1 -1
  52. package/dist/esm/components/Header/Header.style.d.ts +2 -2
  53. package/dist/esm/components/Header/NavigationHeader.js +11 -2
  54. package/dist/esm/components/Header/NavigationHeader.js.map +1 -1
  55. package/dist/esm/components/Header/SettingsButton.style.d.ts +1 -1
  56. package/dist/esm/components/Header/WalletMenu.js +12 -3
  57. package/dist/esm/components/Header/WalletMenu.js.map +1 -1
  58. package/dist/esm/components/IconTypography.js +4 -3
  59. package/dist/esm/components/IconTypography.js.map +1 -1
  60. package/dist/esm/components/ListItem/ListItem.d.ts +2 -4
  61. package/dist/esm/components/ListItem/ListItemButton.d.ts +1 -1
  62. package/dist/esm/components/ListItemButton.d.ts +1 -1
  63. package/dist/esm/components/ListItemButton.js +14 -3
  64. package/dist/esm/components/ListItemButton.js.map +1 -1
  65. package/dist/esm/components/NotFound.js +11 -1
  66. package/dist/esm/components/NotFound.js.map +1 -1
  67. package/dist/esm/components/PageContainer.d.ts +1 -1
  68. package/dist/esm/components/PageContainer.js +10 -4
  69. package/dist/esm/components/PageContainer.js.map +1 -1
  70. package/dist/esm/components/PoweredBy/PoweredBy.js +14 -2
  71. package/dist/esm/components/PoweredBy/PoweredBy.js.map +1 -1
  72. package/dist/esm/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  73. package/dist/esm/components/ProgressToNextUpdate.js +8 -6
  74. package/dist/esm/components/ProgressToNextUpdate.js.map +1 -1
  75. package/dist/esm/components/RouteCard/RouteCard.js +9 -3
  76. package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
  77. package/dist/esm/components/RouteCard/RouteCardEssentials.js +28 -2
  78. package/dist/esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
  79. package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js +20 -1
  80. package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js.map +1 -1
  81. package/dist/esm/components/RouteCard/RouteCardSkeleton.js +12 -2
  82. package/dist/esm/components/RouteCard/RouteCardSkeleton.js.map +1 -1
  83. package/dist/esm/components/RouteCard/RouteNotFoundCard.js +12 -1
  84. package/dist/esm/components/RouteCard/RouteNotFoundCard.js.map +1 -1
  85. package/dist/esm/components/Routes/Routes.js +12 -3
  86. package/dist/esm/components/Routes/Routes.js.map +1 -1
  87. package/dist/esm/components/Routes/RoutesExpanded.js +14 -4
  88. package/dist/esm/components/Routes/RoutesExpanded.js.map +1 -1
  89. package/dist/esm/components/Select.js +16 -5
  90. package/dist/esm/components/Select.js.map +1 -1
  91. package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.d.ts +1 -1
  92. package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js +34 -8
  93. package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
  94. package/dist/esm/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  95. package/dist/esm/components/SendToWallet/SendToWallet.style.js +28 -7
  96. package/dist/esm/components/SendToWallet/SendToWallet.style.js.map +1 -1
  97. package/dist/esm/components/SendToWallet/SendToWalletButton.js +9 -2
  98. package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
  99. package/dist/esm/components/SettingsListItemButton.d.ts +1 -1
  100. package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +3 -3
  101. package/dist/esm/components/Step/DestinationWalletAddress.js +10 -2
  102. package/dist/esm/components/Step/DestinationWalletAddress.js.map +1 -1
  103. package/dist/esm/components/Step/Step.js +5 -3
  104. package/dist/esm/components/Step/Step.js.map +1 -1
  105. package/dist/esm/components/Step/StepProcess.js +16 -3
  106. package/dist/esm/components/Step/StepProcess.js.map +1 -1
  107. package/dist/esm/components/Step/StepTimer.js +5 -1
  108. package/dist/esm/components/Step/StepTimer.js.map +1 -1
  109. package/dist/esm/components/StepActions/StepActions.js +22 -3
  110. package/dist/esm/components/StepActions/StepActions.js.map +1 -1
  111. package/dist/esm/components/StepActions/StepActions.style.d.ts +1 -1
  112. package/dist/esm/components/StepActions/StepActions.style.js +19 -10
  113. package/dist/esm/components/StepActions/StepActions.style.js.map +1 -1
  114. package/dist/esm/components/StepActions/StepFees.js +9 -1
  115. package/dist/esm/components/StepActions/StepFees.js.map +1 -1
  116. package/dist/esm/components/StepDivider/StepDivider.style.d.ts +1 -1
  117. package/dist/esm/components/Switch.js +12 -7
  118. package/dist/esm/components/Switch.js.map +1 -1
  119. package/dist/esm/components/Tabs/Tabs.style.js +16 -12
  120. package/dist/esm/components/Tabs/Tabs.style.js.map +1 -1
  121. package/dist/esm/components/ToAddressRequiredMessage.js +4 -1
  122. package/dist/esm/components/ToAddressRequiredMessage.js.map +1 -1
  123. package/dist/esm/components/Token/Token.js +47 -6
  124. package/dist/esm/components/Token/Token.js.map +1 -1
  125. package/dist/esm/components/Token/Token.style.js +14 -7
  126. package/dist/esm/components/Token/Token.style.js.map +1 -1
  127. package/dist/esm/components/TokenList/TokenList.style.d.ts +3 -5
  128. package/dist/esm/components/TokenList/TokenListItem.js +21 -4
  129. package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
  130. package/dist/esm/components/TokenList/VirtualizedTokenList.js +8 -1
  131. package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
  132. package/dist/esm/components/TransactionDetails.js +52 -6
  133. package/dist/esm/components/TransactionDetails.js.map +1 -1
  134. package/dist/esm/config/version.d.ts +1 -1
  135. package/dist/esm/config/version.js +1 -1
  136. package/dist/esm/config/version.js.map +1 -1
  137. package/dist/esm/hooks/useGasRefuel.js +6 -9
  138. package/dist/esm/hooks/useGasRefuel.js.map +1 -1
  139. package/dist/esm/hooks/useIsContractAddress.js.map +1 -1
  140. package/dist/esm/hooks/useRoutes.js +6 -4
  141. package/dist/esm/hooks/useRoutes.js.map +1 -1
  142. package/dist/esm/i18n/en.json +5 -1
  143. package/dist/esm/index.d.ts +1 -1
  144. package/dist/esm/index.js +1 -1
  145. package/dist/esm/index.js.map +1 -1
  146. package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js +11 -1
  147. package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js.map +1 -1
  148. package/dist/esm/pages/MainPage/MainPage.js +6 -1
  149. package/dist/esm/pages/MainPage/MainPage.js.map +1 -1
  150. package/dist/esm/pages/MainPage/MainPage.style.d.ts +1 -1
  151. package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js +8 -1
  152. package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
  153. package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js +4 -1
  154. package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -1
  155. package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js +4 -1
  156. package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -1
  157. package/dist/esm/pages/SendToWallet/EmptyListIndicator.js +5 -1
  158. package/dist/esm/pages/SendToWallet/EmptyListIndicator.js.map +1 -1
  159. package/dist/esm/pages/SendToWallet/SendToWalletPage.js +7 -1
  160. package/dist/esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
  161. package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +4 -4
  162. package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js +6 -6
  163. package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
  164. package/dist/esm/pages/SettingsPage/ResetSettingsButton.js +9 -2
  165. package/dist/esm/pages/SettingsPage/ResetSettingsButton.js.map +1 -1
  166. package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js.map +1 -1
  167. package/dist/esm/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +1 -1
  168. package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js +7 -2
  169. package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
  170. package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +4 -3
  171. package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
  172. package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +10 -3
  173. package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
  174. package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +16 -3
  175. package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js.map +1 -1
  176. package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js +6 -1
  177. package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js.map +1 -1
  178. package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js +11 -1
  179. package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js.map +1 -1
  180. package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js +14 -2
  181. package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
  182. package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +10 -2
  183. package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js.map +1 -1
  184. package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js +35 -3
  185. package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js.map +1 -1
  186. package/dist/esm/pages/TransactionPage/StatusBottomSheet.js +12 -2
  187. package/dist/esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
  188. package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +45 -1
  189. package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
  190. package/dist/esm/pages/TransactionPage/TransactionPage.js +4 -1
  191. package/dist/esm/pages/TransactionPage/TransactionPage.js.map +1 -1
  192. package/dist/esm/types/widget.d.ts +2 -1
  193. package/package.json +10 -11
  194. package/src/AppProvider.tsx +16 -2
  195. package/src/components/ActiveTransactions/ActiveTransactionItem.tsx +16 -9
  196. package/src/components/ActiveTransactions/ActiveTransactions.tsx +7 -1
  197. package/src/components/AlertMessage/AlertMessage.style.tsx +30 -14
  198. package/src/components/AmountInput/AmountInput.tsx +9 -1
  199. package/src/components/AmountInput/PriceFormHelperText.tsx +12 -10
  200. package/src/components/AppContainer.tsx +34 -23
  201. package/src/components/Avatar/Avatar.style.tsx +8 -8
  202. package/src/components/Card/Card.tsx +60 -37
  203. package/src/components/Card/CardLabel.tsx +69 -43
  204. package/src/components/Card/CardTitle.tsx +12 -2
  205. package/src/components/ChainSelect/ChainSelect.tsx +7 -1
  206. package/src/components/ContractComponent/ItemPrice.tsx +8 -3
  207. package/src/components/ContractComponent/NFT/NFT.tsx +8 -3
  208. package/src/components/ContractComponent/NFT/NFTBase.tsx +33 -6
  209. package/src/components/FeeBreakdownTooltip.tsx +9 -3
  210. package/src/components/GasMessage/FundsSufficiencyMessage.tsx +7 -1
  211. package/src/components/GasMessage/GasMessage.style.ts +8 -8
  212. package/src/components/GasMessage/GasRefuelMessage.tsx +19 -6
  213. package/src/components/GasMessage/GasSufficiencyMessage.tsx +21 -3
  214. package/src/components/Header/NavigationHeader.tsx +23 -5
  215. package/src/components/Header/WalletMenu.tsx +18 -3
  216. package/src/components/IconTypography.ts +4 -4
  217. package/src/components/ListItemButton.tsx +21 -12
  218. package/src/components/NotFound.tsx +17 -6
  219. package/src/components/PageContainer.ts +19 -15
  220. package/src/components/PoweredBy/PoweredBy.tsx +16 -8
  221. package/src/components/ProgressToNextUpdate.tsx +8 -8
  222. package/src/components/RouteCard/RouteCard.tsx +14 -4
  223. package/src/components/RouteCard/RouteCardEssentials.tsx +38 -16
  224. package/src/components/RouteCard/RouteCardEssentialsExpanded.tsx +30 -11
  225. package/src/components/RouteCard/RouteCardSkeleton.tsx +19 -3
  226. package/src/components/RouteCard/RouteNotFoundCard.tsx +18 -7
  227. package/src/components/Routes/Routes.tsx +20 -6
  228. package/src/components/Routes/RoutesExpanded.tsx +25 -6
  229. package/src/components/Select.tsx +16 -6
  230. package/src/components/SelectTokenButton/SelectTokenButton.style.tsx +34 -8
  231. package/src/components/SendToWallet/SendToWallet.style.tsx +28 -7
  232. package/src/components/SendToWallet/SendToWalletButton.tsx +21 -5
  233. package/src/components/Step/DestinationWalletAddress.tsx +14 -2
  234. package/src/components/Step/Step.tsx +7 -3
  235. package/src/components/Step/StepProcess.tsx +18 -9
  236. package/src/components/Step/StepTimer.tsx +9 -5
  237. package/src/components/StepActions/StepActions.style.tsx +19 -13
  238. package/src/components/StepActions/StepActions.tsx +32 -10
  239. package/src/components/StepActions/StepFees.tsx +9 -4
  240. package/src/components/Switch.tsx +12 -9
  241. package/src/components/Tabs/Tabs.style.tsx +16 -16
  242. package/src/components/ToAddressRequiredMessage.tsx +7 -1
  243. package/src/components/Token/Token.style.tsx +14 -8
  244. package/src/components/Token/Token.tsx +75 -12
  245. package/src/components/TokenList/TokenListItem.tsx +37 -8
  246. package/src/components/TokenList/VirtualizedTokenList.tsx +8 -6
  247. package/src/components/TransactionDetails.tsx +75 -17
  248. package/src/config/version.ts +1 -1
  249. package/src/hooks/useGasRefuel.ts +6 -18
  250. package/src/hooks/useIsContractAddress.ts +1 -0
  251. package/src/hooks/useRoutes.ts +6 -4
  252. package/src/i18n/en.json +5 -1
  253. package/src/i18n/i18next.d.ts +4 -8
  254. package/src/index.ts +1 -1
  255. package/src/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.tsx +17 -6
  256. package/src/pages/MainPage/MainPage.tsx +16 -9
  257. package/src/pages/SelectTokenPage/SelectTokenPage.tsx +17 -3
  258. package/src/pages/SendToWallet/BookmarkAddressSheet.tsx +6 -1
  259. package/src/pages/SendToWallet/ConfirmAddressSheet.tsx +6 -1
  260. package/src/pages/SendToWallet/EmptyListIndicator.tsx +7 -1
  261. package/src/pages/SendToWallet/SendToWalletPage.style.tsx +6 -9
  262. package/src/pages/SendToWallet/SendToWalletPage.tsx +17 -3
  263. package/src/pages/SettingsPage/ResetSettingsButton.style.tsx +0 -1
  264. package/src/pages/SettingsPage/ResetSettingsButton.tsx +18 -3
  265. package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +4 -5
  266. package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.tsx +11 -2
  267. package/src/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +16 -4
  268. package/src/pages/TransactionDetailsPage/TransactionDetailsSkeleton.tsx +29 -9
  269. package/src/pages/TransactionDetailsPage/TransferIdCard.tsx +6 -4
  270. package/src/pages/TransactionHistoryPage/TransactionHistoryEmpty.tsx +17 -6
  271. package/src/pages/TransactionHistoryPage/TransactionHistoryItem.tsx +24 -6
  272. package/src/pages/TransactionHistoryPage/TransactionHistorySkeleton.tsx +14 -4
  273. package/src/pages/TransactionPage/ExchangeRateBottomSheet.tsx +70 -11
  274. package/src/pages/TransactionPage/StatusBottomSheet.tsx +27 -4
  275. package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +92 -15
  276. package/src/pages/TransactionPage/TransactionPage.tsx +6 -1
  277. package/src/types/widget.ts +2 -1
  278. package/tsconfig.json +4 -2
@@ -40,16 +40,22 @@ export const NavigationHeader: React.FC = () => {
40
40
  <BackButton onClick={navigateBack} />
41
41
  ) : null}
42
42
  {splitSubvariant ? (
43
- <Box flex={1}>
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 path="*" element={element || <Box width={28} height={40} />} />
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}
@@ -30,7 +30,12 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
30
30
 
31
31
  return (
32
32
  <>
33
- <Box display="flex" flexDirection="column">
33
+ <Box
34
+ sx={{
35
+ display: 'flex',
36
+ flexDirection: 'column',
37
+ }}
38
+ >
34
39
  {accounts.map((account) => {
35
40
  const chain = getChainById(account.chainId)
36
41
  const walletAddress = shortenAddress(account.address)
@@ -41,7 +46,13 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
41
46
 
42
47
  return (
43
48
  <MenuItem key={account.address} disableTouchRipple>
44
- <Box flex={1} display="flex" alignItems="center">
49
+ <Box
50
+ sx={{
51
+ flex: 1,
52
+ display: 'flex',
53
+ alignItems: 'center',
54
+ }}
55
+ >
45
56
  {chain?.logoURI ? (
46
57
  <Badge
47
58
  overlap="circular"
@@ -73,7 +84,11 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
73
84
  )}
74
85
  {walletAddress}
75
86
  </Box>
76
- <Box ml={2}>
87
+ <Box
88
+ sx={{
89
+ ml: 2,
90
+ }}
91
+ >
77
92
  <IconButton size="medium" onClick={handleCopyAddress}>
78
93
  <ContentCopyRounded />
79
94
  </IconButton>
@@ -1,9 +1,9 @@
1
1
  import { Box, alpha, styled } from '@mui/material'
2
2
 
3
3
  export const IconTypography = styled(Box)(({ theme }) => ({
4
- color:
5
- theme.palette.mode === 'light'
6
- ? alpha(theme.palette.common.black, 0.32)
7
- : alpha(theme.palette.common.white, 0.4),
4
+ color: alpha(theme.palette.common.white, 0.4),
8
5
  lineHeight: 0,
6
+ ...theme.applyStyles('light', {
7
+ color: alpha(theme.palette.common.black, 0.32),
8
+ }),
9
9
  }))
@@ -1,17 +1,26 @@
1
1
  import { ListItemButton as MuiListItemButton, styled } from '@mui/material'
2
2
  import { getContrastAlphaColor } from '../utils/colors.js'
3
3
 
4
- export const ListItemButton = styled(MuiListItemButton)(
5
- ({ theme, disabled }) => {
6
- const backgroundHoverColor = getContrastAlphaColor(theme, 0.04)
7
- return {
8
- borderRadius: theme.shape.borderRadius,
9
- paddingLeft: theme.spacing(1.5),
10
- height: 56,
11
- '&:hover': {
12
- backgroundColor: !disabled && backgroundHoverColor,
4
+ export const ListItemButton = styled(MuiListItemButton)(({ theme }) => {
5
+ const backgroundHoverColor = getContrastAlphaColor(theme, 0.04)
6
+ return {
7
+ borderRadius: theme.shape.borderRadius,
8
+ paddingLeft: theme.spacing(1.5),
9
+ height: 56,
10
+ '&:hover': {
11
+ backgroundColor: backgroundHoverColor,
12
+ },
13
+ variants: [
14
+ {
15
+ props: ({ disabled }) => disabled,
16
+ style: {
17
+ opacity: 0.5,
18
+ cursor: 'auto',
19
+ '&:hover': {
20
+ backgroundColor: 'none',
21
+ },
22
+ },
13
23
  },
14
- ...(disabled ? { opacity: 0.5, cursor: 'auto' } : {}),
15
- }
24
+ ],
16
25
  }
17
- )
26
+ })
@@ -15,17 +15,28 @@ export const NotFound: React.FC = () => {
15
15
  padding: 3,
16
16
  }}
17
17
  >
18
- <Typography fontSize={48}>
18
+ <Typography
19
+ sx={{
20
+ fontSize: 48,
21
+ }}
22
+ >
19
23
  <Block fontSize="inherit" />
20
24
  </Typography>
21
- <Typography fontSize={18} fontWeight={700}>
25
+ <Typography
26
+ sx={{
27
+ fontSize: 18,
28
+ fontWeight: 700,
29
+ }}
30
+ >
22
31
  {t('tooltip.notFound.title')}
23
32
  </Typography>
24
33
  <Typography
25
- fontSize={14}
26
- color="text.secondary"
27
- textAlign="center"
28
- mt={2}
34
+ sx={{
35
+ fontSize: 14,
36
+ color: 'text.secondary',
37
+ textAlign: 'center',
38
+ mt: 2,
39
+ }}
29
40
  >
30
41
  {t('tooltip.notFound.text')}
31
42
  </Typography>
@@ -10,18 +10,22 @@ export interface PageContainerProps extends ContainerProps {
10
10
  export const PageContainer = styled(Container, {
11
11
  shouldForwardProp: (prop) =>
12
12
  !['halfGutters', 'topGutters', 'bottomGutters'].includes(prop as string),
13
- })<PageContainerProps>(
14
- ({ theme, disableGutters, halfGutters, topGutters, bottomGutters }) => ({
15
- display: 'flex',
16
- flexDirection: 'column',
17
- flex: 1,
18
- padding: disableGutters
19
- ? 0
20
- : theme.spacing(
21
- topGutters ? 1 : 0,
22
- halfGutters ? 1.5 : 3,
23
- bottomGutters ? 3 : 0,
24
- halfGutters ? 1.5 : 3
25
- ),
26
- })
27
- )
13
+ })<PageContainerProps>(({ theme, halfGutters, topGutters, bottomGutters }) => ({
14
+ display: 'flex',
15
+ flexDirection: 'column',
16
+ flex: 1,
17
+ padding: theme.spacing(
18
+ topGutters ? 1 : 0,
19
+ halfGutters ? 1.5 : 3,
20
+ bottomGutters ? 3 : 0,
21
+ halfGutters ? 1.5 : 3
22
+ ),
23
+ variants: [
24
+ {
25
+ props: ({ disableGutters }) => disableGutters,
26
+ style: {
27
+ padding: 0,
28
+ },
29
+ },
30
+ ],
31
+ }))
@@ -19,10 +19,10 @@ export const PoweredBy: React.FC = () => {
19
19
 
20
20
  return (
21
21
  <Box
22
- pt={1}
23
- pb={2}
24
- flex={1}
25
22
  sx={{
23
+ pt: 1,
24
+ pb: 2,
25
+ flex: 1,
26
26
  display: 'flex',
27
27
  alignItems: 'flex-end',
28
28
  justifyContent: 'flex-end',
@@ -36,14 +36,22 @@ export const PoweredBy: React.FC = () => {
36
36
  color="text.primary"
37
37
  >
38
38
  <Typography
39
- color="text.secondary"
40
- fontSize={12}
41
- fontWeight={500}
42
- px={0.5}
39
+ sx={{
40
+ color: 'text.secondary',
41
+ fontSize: 12,
42
+ fontWeight: 500,
43
+ px: 0.5,
44
+ }}
43
45
  >
44
46
  Powered by
45
47
  </Typography>
46
- <Typography color="text.primary" fontSize={12} fontWeight={600}>
48
+ <Typography
49
+ sx={{
50
+ color: 'text.primary',
51
+ fontSize: 12,
52
+ fontWeight: 600,
53
+ }}
54
+ >
47
55
  {poweredByConfig[poweredBy].text}
48
56
  </Typography>
49
57
  </Link>
@@ -67,10 +67,10 @@ export const ProgressToNextUpdate: React.FC<
67
67
  value={100}
68
68
  sx={(theme) => ({
69
69
  position: 'absolute',
70
- color:
71
- theme.palette.mode === 'light'
72
- ? theme.palette.grey[300]
73
- : theme.palette.grey[800],
70
+ color: theme.palette.grey[800],
71
+ ...theme.applyStyles('light', {
72
+ color: theme.palette.grey[300],
73
+ }),
74
74
  })}
75
75
  />
76
76
  <CircularProgress
@@ -79,10 +79,10 @@ export const ProgressToNextUpdate: React.FC<
79
79
  value={value}
80
80
  sx={(theme) => ({
81
81
  opacity: value === 100 && !isLoading ? 0.5 : 1,
82
- color:
83
- theme.palette.mode === 'light'
84
- ? theme.palette.primary.main
85
- : theme.palette.primary.light,
82
+ color: theme.palette.primary.light,
83
+ ...theme.applyStyles('light', {
84
+ color: theme.palette.primary.main,
85
+ }),
86
86
  })}
87
87
  />
88
88
  </Box>
@@ -26,7 +26,7 @@ export const RouteCard: React.FC<
26
26
  ...other
27
27
  }) => {
28
28
  const { t } = useTranslation()
29
- const { subvariant } = useWidgetConfig()
29
+ const { subvariant, subvariantOptions } = useWidgetConfig()
30
30
  const [cardExpanded, setCardExpanded] = useState(defaulExpanded)
31
31
 
32
32
  const handleExpand: MouseEventHandler<HTMLButtonElement> = (e) => {
@@ -35,7 +35,7 @@ export const RouteCard: React.FC<
35
35
  }
36
36
 
37
37
  const token: TokenAmount =
38
- subvariant === 'custom'
38
+ subvariant === 'custom' && subvariantOptions?.custom !== 'deposit'
39
39
  ? { ...route.fromToken, amount: BigInt(route.fromAmount) }
40
40
  : { ...route.toToken, amount: BigInt(route.toAmount) }
41
41
  const impactToken: TokenAmount | undefined =
@@ -48,9 +48,19 @@ export const RouteCard: React.FC<
48
48
  )
49
49
 
50
50
  const cardContent = (
51
- <Box flex={1}>
51
+ <Box
52
+ sx={{
53
+ flex: 1,
54
+ }}
55
+ >
52
56
  {subvariant !== 'refuel' && route.tags?.length ? (
53
- <Box display="flex" alignItems="center" mb={2}>
57
+ <Box
58
+ sx={{
59
+ display: 'flex',
60
+ alignItems: 'center',
61
+ mb: 2,
62
+ }}
63
+ >
54
64
  {tags?.length ? (
55
65
  <CardLabel type={active ? 'active' : undefined}>
56
66
  <CardLabelTypography>
@@ -22,25 +22,40 @@ export const RouteCardEssentials: React.FC<RouteCardEssentialsProps> = ({
22
22
  getAccumulatedFeeCostsBreakdown(route)
23
23
  return (
24
24
  <Box
25
- display="flex"
26
- alignItems="center"
27
- justifyContent={'space-between'}
28
- flex={1}
29
- mt={2}
25
+ sx={{
26
+ display: 'flex',
27
+ alignItems: 'center',
28
+ justifyContent: 'space-between',
29
+ flex: 1,
30
+ mt: 2,
31
+ }}
30
32
  >
31
33
  <TokenRate route={route} />
32
- <Box display="flex" alignItems="center">
34
+ <Box
35
+ sx={{
36
+ display: 'flex',
37
+ alignItems: 'center',
38
+ }}
39
+ >
33
40
  <FeeBreakdownTooltip gasCosts={gasCosts} feeCosts={feeCosts}>
34
- <Box display="flex" mr={1.5} alignItems="center">
41
+ <Box
42
+ sx={{
43
+ display: 'flex',
44
+ mr: 1.5,
45
+ alignItems: 'center',
46
+ }}
47
+ >
35
48
  <IconTypography mr={0.5} fontSize={16}>
36
49
  <LocalGasStationRounded fontSize="inherit" />
37
50
  </IconTypography>
38
51
  <Typography
39
- fontSize={14}
40
- color="text.primary"
41
- fontWeight={600}
42
- lineHeight={1}
43
52
  data-value={combinedFeesUSD}
53
+ sx={{
54
+ fontSize: 14,
55
+ color: 'text.primary',
56
+ fontWeight: 600,
57
+ lineHeight: 1,
58
+ }}
44
59
  >
45
60
  {t('format.currency', {
46
61
  value: combinedFeesUSD,
@@ -49,15 +64,22 @@ export const RouteCardEssentials: React.FC<RouteCardEssentialsProps> = ({
49
64
  </Box>
50
65
  </FeeBreakdownTooltip>
51
66
  <Tooltip title={t('tooltip.estimatedTime')} sx={{ cursor: 'help' }}>
52
- <Box display="flex" alignItems="center">
67
+ <Box
68
+ sx={{
69
+ display: 'flex',
70
+ alignItems: 'center',
71
+ }}
72
+ >
53
73
  <IconTypography mr={0.5} fontSize={16}>
54
74
  <AccessTimeFilled fontSize="inherit" />
55
75
  </IconTypography>
56
76
  <Typography
57
- fontSize={14}
58
- color="text.primary"
59
- fontWeight={600}
60
- lineHeight={1}
77
+ sx={{
78
+ fontSize: 14,
79
+ color: 'text.primary',
80
+ fontWeight: 600,
81
+ lineHeight: 1,
82
+ }}
61
83
  >
62
84
  {(executionTimeSeconds < 60
63
85
  ? executionTimeSeconds
@@ -9,26 +9,45 @@ export const RouteCardEssentialsExpanded: React.FC<
9
9
  > = ({ route }) => {
10
10
  const { t } = useTranslation()
11
11
  return (
12
- <Box flex={1} mt={2}>
13
- <Box display="flex" alignItems="center">
12
+ <Box
13
+ sx={{
14
+ flex: 1,
15
+ mt: 2,
16
+ }}
17
+ >
18
+ <Box
19
+ sx={{
20
+ display: 'flex',
21
+ alignItems: 'center',
22
+ }}
23
+ >
14
24
  <IconTypography ml={1} mr={3}>
15
25
  <Layers />
16
26
  </IconTypography>
17
27
  <Typography
18
- fontSize={16}
19
- color="text.primary"
20
- fontWeight="600"
21
- lineHeight={1.125}
28
+ sx={{
29
+ fontSize: 16,
30
+ color: 'text.primary',
31
+ fontWeight: '600',
32
+ lineHeight: 1.125,
33
+ }}
22
34
  >
23
35
  {route.steps.length}
24
36
  </Typography>
25
37
  </Box>
26
- <Box mt={0.5} ml={7}>
38
+ <Box
39
+ sx={{
40
+ mt: 0.5,
41
+ ml: 7,
42
+ }}
43
+ >
27
44
  <Typography
28
- fontSize={12}
29
- color="text.secondary"
30
- fontWeight="500"
31
- lineHeight={1.125}
45
+ sx={{
46
+ fontSize: 12,
47
+ color: 'text.secondary',
48
+ fontWeight: '500',
49
+ lineHeight: 1.125,
50
+ }}
32
51
  >
33
52
  {t('tooltip.numberOfSteps')}
34
53
  </Typography>
@@ -11,9 +11,19 @@ export const RouteCardSkeleton: React.FC<
11
11
  const { subvariant } = useWidgetConfig()
12
12
 
13
13
  const cardContent = (
14
- <Box flex={1}>
14
+ <Box
15
+ sx={{
16
+ flex: 1,
17
+ }}
18
+ >
15
19
  {subvariant !== 'refuel' && subvariant !== 'custom' ? (
16
- <Box display="flex" alignItems="center" mb={2}>
20
+ <Box
21
+ sx={{
22
+ display: 'flex',
23
+ alignItems: 'center',
24
+ mb: 2,
25
+ }}
26
+ >
17
27
  <Skeleton
18
28
  variant="rectangular"
19
29
  width={112}
@@ -25,7 +35,13 @@ export const RouteCardSkeleton: React.FC<
25
35
  </Box>
26
36
  ) : null}
27
37
  <TokenSkeleton />
28
- <Box mt={2} display="flex" justifyContent="space-between">
38
+ <Box
39
+ sx={{
40
+ mt: 2,
41
+ display: 'flex',
42
+ justifyContent: 'space-between',
43
+ }}
44
+ >
29
45
  <Skeleton variant="text" width={64} height={20} />
30
46
  <Skeleton variant="text" width={56} height={20} />
31
47
  </Box>
@@ -7,25 +7,36 @@ export const RouteNotFoundCard: React.FC = () => {
7
7
  return (
8
8
  <Box
9
9
  sx={{
10
+ py: 1.625,
10
11
  display: 'flex',
11
12
  alignItems: 'center',
12
13
  justifyContent: 'center',
13
14
  flexDirection: 'column',
14
15
  flex: 1,
15
16
  }}
16
- py={1.625}
17
17
  >
18
- <Typography fontSize={48}>
18
+ <Typography
19
+ sx={{
20
+ fontSize: 48,
21
+ }}
22
+ >
19
23
  <Route fontSize="inherit" />
20
24
  </Typography>
21
- <Typography fontSize={18} fontWeight={700}>
25
+ <Typography
26
+ sx={{
27
+ fontSize: 18,
28
+ fontWeight: 700,
29
+ }}
30
+ >
22
31
  {t('info.title.routeNotFound')}
23
32
  </Typography>
24
33
  <Typography
25
- fontSize={14}
26
- color="text.secondary"
27
- textAlign="center"
28
- mt={2}
34
+ sx={{
35
+ fontSize: 14,
36
+ color: 'text.secondary',
37
+ textAlign: 'center',
38
+ mt: 2,
39
+ }}
29
40
  >
30
41
  {t('info.message.routeNotFound')}
31
42
  </Typography>
@@ -16,7 +16,8 @@ import { RouteNotFoundCard } from '../RouteCard/RouteNotFoundCard.js'
16
16
  export const Routes: React.FC<CardProps> = (props) => {
17
17
  const { t } = useTranslation()
18
18
  const navigate = useNavigate()
19
- const { subvariant, useRecommendedRoute } = useWidgetConfig()
19
+ const { subvariant, subvariantOptions, useRecommendedRoute } =
20
+ useWidgetConfig()
20
21
  const {
21
22
  routes,
22
23
  isLoading,
@@ -42,11 +43,16 @@ export const Routes: React.FC<CardProps> = (props) => {
42
43
  const showAll =
43
44
  !onlyRecommendedRoute && !routeNotFound && (routes?.length ?? 0) > 1
44
45
 
46
+ const title =
47
+ subvariant === 'custom'
48
+ ? subvariantOptions?.custom === 'deposit'
49
+ ? t('header.receive')
50
+ : t('header.youPay')
51
+ : t('header.receive')
52
+
45
53
  return (
46
54
  <Card {...props}>
47
- <CardTitle>
48
- {subvariant === 'custom' ? t('header.youPay') : t('header.receive')}
49
- </CardTitle>
55
+ <CardTitle>{title}</CardTitle>
50
56
  <ProgressToNextUpdate
51
57
  updatedAt={dataUpdatedAt || new Date().getTime()}
52
58
  timeToUpdate={refetchTime}
@@ -58,7 +64,11 @@ export const Routes: React.FC<CardProps> = (props) => {
58
64
  right: 8,
59
65
  }}
60
66
  />
61
- <Box p={2}>
67
+ <Box
68
+ sx={{
69
+ p: 2,
70
+ }}
71
+ >
62
72
  {isLoading ? (
63
73
  <RouteCardSkeleton variant="cardless" />
64
74
  ) : !currentRoute ? (
@@ -68,7 +78,11 @@ export const Routes: React.FC<CardProps> = (props) => {
68
78
  )}
69
79
 
70
80
  <Collapse timeout={225} in={showAll} unmountOnExit mountOnEnter appear>
71
- <Box mt={2}>
81
+ <Box
82
+ sx={{
83
+ mt: 2,
84
+ }}
85
+ >
72
86
  <ButtonTertiary onClick={handleCardClick} fullWidth>
73
87
  {t('button.showAll')}
74
88
  </ButtonTertiary>
@@ -64,7 +64,7 @@ export const RoutesExpanded = () => {
64
64
  export const RoutesExpandedElement = () => {
65
65
  const { t } = useTranslation()
66
66
  const navigate = useNavigate()
67
- const { subvariant } = useWidgetConfig()
67
+ const { subvariant, subvariantOptions } = useWidgetConfig()
68
68
  const routesRef = useRef<Route[]>()
69
69
  const emitter = useWidgetEvents()
70
70
  const routesActiveRef = useRef(false)
@@ -118,6 +118,13 @@ export const RoutesExpandedElement = () => {
118
118
  emitter.emit(WidgetEvent.WidgetExpanded, expanded)
119
119
  }, [emitter, expanded])
120
120
 
121
+ const title =
122
+ subvariant === 'custom'
123
+ ? subvariantOptions?.custom === 'deposit'
124
+ ? t('header.deposit')
125
+ : t('header.youPay')
126
+ : t('header.receive')
127
+
121
128
  return (
122
129
  <RoutesExpandedCollapse
123
130
  timeout={timeout.enter}
@@ -129,10 +136,15 @@ export const RoutesExpandedElement = () => {
129
136
  <Container enableColorScheme minimumHeight={isLoading}>
130
137
  <ScrollableContainer>
131
138
  <Header>
132
- <Typography fontSize={18} fontWeight="700" flex={1} noWrap>
133
- {subvariant === 'custom'
134
- ? t('header.youPay')
135
- : t('header.receive')}
139
+ <Typography
140
+ noWrap
141
+ sx={{
142
+ fontSize: 18,
143
+ fontWeight: '700',
144
+ flex: 1,
145
+ }}
146
+ >
147
+ {title}
136
148
  </Typography>
137
149
  <ProgressToNextUpdate
138
150
  updatedAt={dataUpdatedAt || new Date().getTime()}
@@ -143,7 +155,14 @@ export const RoutesExpandedElement = () => {
143
155
  />
144
156
  </Header>
145
157
  <PageContainer>
146
- <Stack direction="column" spacing={2} flex={1} paddingBottom={3}>
158
+ <Stack
159
+ direction="column"
160
+ spacing={2}
161
+ sx={{
162
+ flex: 1,
163
+ paddingBottom: 3,
164
+ }}
165
+ >
147
166
  {routeNotFound ? (
148
167
  <RouteNotFoundCard />
149
168
  ) : isLoading || (isFetching && !routesRef.current?.length) ? (