@lifi/widget 1.32.8 → 2.0.0-alpha.1

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 (343) hide show
  1. package/App.js +3 -3
  2. package/AppDrawer.js +4 -3
  3. package/AppDrawer.style.d.ts +5 -5
  4. package/AppProvider.js +4 -3
  5. package/cjs/App.js +3 -3
  6. package/cjs/AppDrawer.js +4 -3
  7. package/cjs/AppDrawer.style.d.ts +5 -5
  8. package/cjs/AppProvider.js +2 -1
  9. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +5 -5
  10. package/cjs/components/Card/CardIconButton.d.ts +29 -0
  11. package/cjs/components/Card/CardIconButton.js +17 -0
  12. package/cjs/components/Card/CardLabel.d.ts +26 -0
  13. package/cjs/components/Card/CardLabel.js +45 -0
  14. package/cjs/components/Card/CardTitle.d.ts +2 -2
  15. package/cjs/components/Card/index.d.ts +2 -0
  16. package/cjs/components/Card/index.js +2 -0
  17. package/cjs/components/GasMessage/FundsSufficiencyMessage.d.ts +1 -0
  18. package/cjs/components/GasMessage/FundsSufficiencyMessage.js +16 -0
  19. package/cjs/components/{GasSufficiencyMessage/GasSufficiencyMessage.d.ts → GasMessage/GasMessage.d.ts} +4 -2
  20. package/cjs/components/GasMessage/GasMessage.js +19 -0
  21. package/cjs/components/GasMessage/GasMessage.style.d.ts +34 -0
  22. package/cjs/components/GasMessage/GasMessage.style.js +48 -0
  23. package/cjs/components/GasMessage/GasRefuelMessage.d.ts +3 -0
  24. package/cjs/components/GasMessage/GasRefuelMessage.js +26 -0
  25. package/cjs/components/GasMessage/GasSufficiencyMessage.d.ts +7 -0
  26. package/cjs/components/GasMessage/GasSufficiencyMessage.js +21 -0
  27. package/cjs/components/GasMessage/index.d.ts +2 -0
  28. package/cjs/components/GasMessage/index.js +18 -0
  29. package/cjs/components/Header/Header.style.d.ts +6 -6
  30. package/cjs/components/Header/NavigationHeader.js +4 -4
  31. package/cjs/components/Header/WalletHeader.js +5 -5
  32. package/cjs/components/Insurance/Insurance.d.ts +3 -0
  33. package/cjs/components/Insurance/Insurance.js +11 -0
  34. package/cjs/components/Insurance/InsuranceCard.d.ts +3 -0
  35. package/cjs/components/Insurance/InsuranceCard.js +20 -0
  36. package/cjs/components/Insurance/InsuranceCollapsed.d.ts +3 -0
  37. package/cjs/components/Insurance/InsuranceCollapsed.js +32 -0
  38. package/cjs/components/Insurance/index.d.ts +1 -0
  39. package/cjs/components/{GasSufficiencyMessage → Insurance}/index.js +1 -1
  40. package/cjs/components/Insurance/types.d.ts +14 -0
  41. package/cjs/components/Insurance/types.js +2 -0
  42. package/cjs/components/ListItemButton.d.ts +1 -1
  43. package/cjs/components/NFT/NFT.style.d.ts +1 -1
  44. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +3 -12
  45. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  46. package/cjs/components/SendToWallet/SendToWallet.js +31 -25
  47. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +2 -2
  48. package/cjs/components/SendToWallet/SendToWalletButton.js +3 -3
  49. package/cjs/components/SmallAvatar.d.ts +2 -2
  50. package/cjs/components/Step/CircularProgress.style.d.ts +1 -1
  51. package/cjs/components/Step/DestinationWalletAddress.d.ts +2 -2
  52. package/cjs/components/Step/DestinationWalletAddress.js +4 -8
  53. package/cjs/components/Step/GasStepProcess.d.ts +2 -2
  54. package/cjs/components/Step/GasStepProcess.js +3 -3
  55. package/cjs/components/Step/Step.d.ts +2 -2
  56. package/cjs/components/Step/Step.js +6 -8
  57. package/cjs/components/Step/StepList.d.ts +1 -1
  58. package/cjs/components/Step/StepProcess.d.ts +2 -2
  59. package/cjs/components/Step/StepProcess.js +1 -5
  60. package/cjs/components/Step/StepProcess.style.d.ts +3 -39
  61. package/cjs/components/Step/StepTimer.d.ts +2 -2
  62. package/cjs/components/Step/StepTimer.js +1 -1
  63. package/cjs/components/StepActions/StepActions.d.ts +6 -1
  64. package/cjs/components/StepActions/StepActions.js +54 -17
  65. package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
  66. package/cjs/components/StepActions/types.d.ts +2 -2
  67. package/cjs/components/SwapButton/SwapButton.js +2 -2
  68. package/cjs/components/SwapButton/types.d.ts +1 -2
  69. package/cjs/components/SwapInput/SwapInput.style.d.ts +2 -2
  70. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +3 -3
  71. package/cjs/components/SwapInput/SwapInputEndAdornment.js +18 -1
  72. package/cjs/components/SwapRouteCard/SwapRouteCard.d.ts +1 -2
  73. package/cjs/components/SwapRouteCard/SwapRouteCard.js +10 -26
  74. package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +4 -36
  75. package/cjs/components/SwapRouteCard/SwapRouteCard.style.js +7 -38
  76. package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +3 -0
  77. package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.js +27 -0
  78. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +5 -5
  79. package/cjs/components/SwapRouteCard/types.d.ts +2 -2
  80. package/cjs/components/SwapRouteCard/utils.d.ts +5 -0
  81. package/cjs/components/SwapRouteCard/utils.js +32 -2
  82. package/cjs/components/SwapRoutes/SwapRoutes.js +3 -12
  83. package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +4 -11
  84. package/cjs/components/SwapRoutes/{SwapRoutes.style.d.ts → SwapRoutesExpanded.style.d.ts} +0 -9
  85. package/cjs/components/SwapRoutes/{SwapRoutes.style.js → SwapRoutesExpanded.style.js} +1 -12
  86. package/cjs/components/Switch.js +4 -4
  87. package/cjs/components/Token/Token.d.ts +2 -2
  88. package/cjs/components/Token/Token.style.d.ts +2 -2
  89. package/cjs/components/TokenList/TokenList.style.d.ts +2 -2
  90. package/cjs/config/theme.js +1 -1
  91. package/cjs/config/version.d.ts +1 -1
  92. package/cjs/config/version.js +1 -1
  93. package/cjs/hooks/index.d.ts +4 -0
  94. package/cjs/hooks/index.js +4 -0
  95. package/cjs/hooks/useChains.js +2 -2
  96. package/cjs/hooks/useFeaturedTokens.d.ts +1 -1
  97. package/cjs/hooks/useFeaturedTokens.js +2 -2
  98. package/cjs/hooks/useFundsSufficiency.d.ts +5 -0
  99. package/cjs/hooks/useFundsSufficiency.js +73 -0
  100. package/cjs/hooks/useGasRecommendation.d.ts +2 -0
  101. package/cjs/hooks/useGasRecommendation.js +23 -0
  102. package/cjs/hooks/useGasRefuel.d.ts +7 -0
  103. package/cjs/hooks/useGasRefuel.js +61 -0
  104. package/cjs/hooks/useGasSufficiency.d.ts +2 -3
  105. package/cjs/hooks/useGasSufficiency.js +6 -37
  106. package/cjs/hooks/useGetTokenBalancesWithRetry.d.ts +3 -0
  107. package/cjs/hooks/useGetTokenBalancesWithRetry.js +33 -0
  108. package/cjs/hooks/useProcessMessage.d.ts +3 -3
  109. package/cjs/hooks/useSwapRoutes.d.ts +7 -2
  110. package/cjs/hooks/useSwapRoutes.js +31 -11
  111. package/cjs/hooks/useTokenAddressBalance.js +4 -2
  112. package/cjs/hooks/useTokenBalance.js +4 -22
  113. package/cjs/hooks/useTokenBalances.d.ts +1 -1
  114. package/cjs/hooks/useTokenSearch.js +2 -2
  115. package/cjs/hooks/useTokens.js +2 -3
  116. package/cjs/i18n/en.json +14 -7
  117. package/cjs/i18n/it.json +6 -2
  118. package/cjs/i18n/pt.json +234 -0
  119. package/cjs/i18n/uk.json +5 -1
  120. package/cjs/icons/InsuraceLogo.d.ts +2 -0
  121. package/cjs/icons/InsuraceLogo.js +11 -0
  122. package/cjs/icons/index.d.ts +1 -0
  123. package/cjs/icons/index.js +1 -0
  124. package/cjs/index.d.ts +0 -6
  125. package/cjs/index.js +1 -6
  126. package/cjs/pages/MainPage/MainGasMessage.d.ts +3 -0
  127. package/cjs/pages/MainPage/MainGasMessage.js +12 -0
  128. package/cjs/pages/MainPage/MainPage.js +3 -2
  129. package/cjs/pages/MainPage/MainSwapButton.js +1 -1
  130. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
  131. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
  132. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  133. package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
  134. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  135. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -3
  136. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.d.ts +1 -2
  137. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +1 -14
  138. package/cjs/pages/SwapPage/StartSwapButton.d.ts +3 -2
  139. package/cjs/pages/SwapPage/StartSwapButton.js +14 -4
  140. package/cjs/pages/SwapPage/SwapPage.js +18 -7
  141. package/cjs/pages/SwapPage/types.d.ts +9 -0
  142. package/cjs/pages/SwapPage/types.js +2 -0
  143. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
  144. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +2 -1
  145. package/cjs/providers/SDKProvider/SDKProvider.d.ts +2 -2
  146. package/cjs/providers/SDKProvider/SDKProvider.js +2 -1
  147. package/cjs/providers/SwapFormProvider/FormUpdater.js +2 -3
  148. package/cjs/providers/SwapFormProvider/SwapFormProvider.js +2 -3
  149. package/cjs/providers/SwapFormProvider/index.d.ts +1 -0
  150. package/cjs/providers/SwapFormProvider/index.js +1 -0
  151. package/cjs/providers/WidgetProvider/WidgetProvider.js +17 -4
  152. package/cjs/providers/WidgetProvider/utils.d.ts +1 -1
  153. package/cjs/providers/WidgetProvider/utils.js +2 -4
  154. package/cjs/stores/StoreProvider.js +1 -1
  155. package/cjs/stores/routes/createRouteExecutionStore.js +3 -2
  156. package/cjs/stores/routes/index.d.ts +0 -1
  157. package/cjs/stores/routes/index.js +0 -1
  158. package/cjs/stores/routes/types.d.ts +1 -5
  159. package/cjs/stores/routes/useSetExecutableRoute.d.ts +1 -1
  160. package/cjs/stores/settings/types.d.ts +1 -0
  161. package/cjs/stores/settings/useSettingsStore.js +1 -0
  162. package/cjs/types/widget.d.ts +5 -10
  163. package/cjs/utils/format.js +4 -1
  164. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +5 -5
  165. package/components/Card/CardIconButton.d.ts +29 -0
  166. package/components/Card/CardIconButton.js +14 -0
  167. package/components/Card/CardLabel.d.ts +26 -0
  168. package/components/Card/CardLabel.js +42 -0
  169. package/components/Card/CardTitle.d.ts +2 -2
  170. package/components/Card/index.d.ts +2 -0
  171. package/components/Card/index.js +2 -0
  172. package/components/GasMessage/FundsSufficiencyMessage.d.ts +1 -0
  173. package/components/GasMessage/FundsSufficiencyMessage.js +12 -0
  174. package/components/{GasSufficiencyMessage/GasSufficiencyMessage.d.ts → GasMessage/GasMessage.d.ts} +4 -2
  175. package/components/GasMessage/GasMessage.js +15 -0
  176. package/components/GasMessage/GasMessage.style.d.ts +34 -0
  177. package/components/GasMessage/GasMessage.style.js +45 -0
  178. package/components/GasMessage/GasRefuelMessage.d.ts +3 -0
  179. package/components/GasMessage/GasRefuelMessage.js +22 -0
  180. package/components/GasMessage/GasSufficiencyMessage.d.ts +7 -0
  181. package/components/GasMessage/GasSufficiencyMessage.js +17 -0
  182. package/components/GasMessage/index.d.ts +2 -0
  183. package/components/GasMessage/index.js +2 -0
  184. package/components/Header/Header.style.d.ts +6 -6
  185. package/components/Header/NavigationHeader.js +4 -4
  186. package/components/Header/WalletHeader.js +6 -6
  187. package/components/Insurance/Insurance.d.ts +3 -0
  188. package/components/Insurance/Insurance.js +7 -0
  189. package/components/Insurance/InsuranceCard.d.ts +3 -0
  190. package/components/Insurance/InsuranceCard.js +16 -0
  191. package/components/Insurance/InsuranceCollapsed.d.ts +3 -0
  192. package/components/Insurance/InsuranceCollapsed.js +28 -0
  193. package/components/Insurance/index.d.ts +1 -0
  194. package/components/Insurance/index.js +1 -0
  195. package/components/Insurance/types.d.ts +14 -0
  196. package/components/Insurance/types.js +1 -0
  197. package/components/ListItemButton.d.ts +1 -1
  198. package/components/NFT/NFT.style.d.ts +1 -1
  199. package/components/PoweredBy/PoweredBy.style.d.ts +3 -12
  200. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  201. package/components/SendToWallet/SendToWallet.js +34 -28
  202. package/components/SendToWallet/SendToWallet.style.d.ts +2 -2
  203. package/components/SendToWallet/SendToWalletButton.js +4 -4
  204. package/components/SmallAvatar.d.ts +2 -2
  205. package/components/Step/CircularProgress.style.d.ts +1 -1
  206. package/components/Step/DestinationWalletAddress.d.ts +2 -2
  207. package/components/Step/DestinationWalletAddress.js +4 -8
  208. package/components/Step/GasStepProcess.d.ts +2 -2
  209. package/components/Step/GasStepProcess.js +3 -3
  210. package/components/Step/Step.d.ts +2 -2
  211. package/components/Step/Step.js +6 -8
  212. package/components/Step/StepList.d.ts +1 -1
  213. package/components/Step/StepProcess.d.ts +2 -2
  214. package/components/Step/StepProcess.js +1 -5
  215. package/components/Step/StepProcess.style.d.ts +3 -39
  216. package/components/Step/StepTimer.d.ts +2 -2
  217. package/components/Step/StepTimer.js +1 -1
  218. package/components/StepActions/StepActions.d.ts +6 -1
  219. package/components/StepActions/StepActions.js +51 -16
  220. package/components/StepActions/StepActions.style.d.ts +1 -1
  221. package/components/StepActions/types.d.ts +2 -2
  222. package/components/SwapButton/SwapButton.js +2 -2
  223. package/components/SwapButton/types.d.ts +1 -2
  224. package/components/SwapInput/SwapInput.style.d.ts +2 -2
  225. package/components/SwapInput/SwapInputAdornment.style.d.ts +3 -3
  226. package/components/SwapInput/SwapInputEndAdornment.js +19 -2
  227. package/components/SwapRouteCard/SwapRouteCard.d.ts +1 -2
  228. package/components/SwapRouteCard/SwapRouteCard.js +11 -26
  229. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +4 -36
  230. package/components/SwapRouteCard/SwapRouteCard.style.js +7 -38
  231. package/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +3 -0
  232. package/components/SwapRouteCard/SwapRouteCardEssentials.js +23 -0
  233. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +5 -5
  234. package/components/SwapRouteCard/types.d.ts +2 -2
  235. package/components/SwapRouteCard/utils.d.ts +5 -0
  236. package/components/SwapRouteCard/utils.js +30 -1
  237. package/components/SwapRoutes/SwapRoutes.js +5 -14
  238. package/components/SwapRoutes/SwapRoutesExpanded.js +4 -11
  239. package/components/SwapRoutes/{SwapRoutes.style.d.ts → SwapRoutesExpanded.style.d.ts} +0 -9
  240. package/components/SwapRoutes/{SwapRoutes.style.js → SwapRoutesExpanded.style.js} +1 -12
  241. package/components/Switch.js +5 -5
  242. package/components/Token/Token.d.ts +2 -2
  243. package/components/Token/Token.style.d.ts +2 -2
  244. package/components/TokenList/TokenList.style.d.ts +2 -2
  245. package/config/theme.js +1 -1
  246. package/config/version.d.ts +1 -1
  247. package/config/version.js +1 -1
  248. package/hooks/index.d.ts +4 -0
  249. package/hooks/index.js +4 -0
  250. package/hooks/useChains.js +2 -2
  251. package/hooks/useFeaturedTokens.d.ts +1 -1
  252. package/hooks/useFeaturedTokens.js +2 -2
  253. package/hooks/useFundsSufficiency.d.ts +5 -0
  254. package/hooks/useFundsSufficiency.js +69 -0
  255. package/hooks/useGasRecommendation.d.ts +2 -0
  256. package/hooks/useGasRecommendation.js +19 -0
  257. package/hooks/useGasRefuel.d.ts +7 -0
  258. package/hooks/useGasRefuel.js +57 -0
  259. package/hooks/useGasSufficiency.d.ts +2 -3
  260. package/hooks/useGasSufficiency.js +7 -38
  261. package/hooks/useGetTokenBalancesWithRetry.d.ts +3 -0
  262. package/hooks/useGetTokenBalancesWithRetry.js +29 -0
  263. package/hooks/useProcessMessage.d.ts +3 -3
  264. package/hooks/useSwapRoutes.d.ts +7 -2
  265. package/hooks/useSwapRoutes.js +32 -12
  266. package/hooks/useTokenAddressBalance.js +4 -2
  267. package/hooks/useTokenBalance.js +5 -23
  268. package/hooks/useTokenBalances.d.ts +1 -1
  269. package/hooks/useTokenSearch.js +2 -2
  270. package/hooks/useTokens.js +2 -3
  271. package/i18n/en.json +14 -7
  272. package/i18n/it.json +6 -2
  273. package/i18n/pt.json +234 -0
  274. package/i18n/uk.json +5 -1
  275. package/icons/InsuraceLogo.d.ts +2 -0
  276. package/icons/InsuraceLogo.js +7 -0
  277. package/icons/index.d.ts +1 -0
  278. package/icons/index.js +1 -0
  279. package/index.d.ts +0 -6
  280. package/index.js +0 -5
  281. package/package.json +12 -12
  282. package/pages/ActiveSwapsPage/ActiveSwapsPage.js +2 -2
  283. package/pages/MainPage/MainGasMessage.d.ts +3 -0
  284. package/pages/MainPage/MainGasMessage.js +8 -0
  285. package/pages/MainPage/MainPage.js +3 -2
  286. package/pages/MainPage/MainSwapButton.js +1 -1
  287. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
  288. package/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
  289. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  290. package/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
  291. package/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  292. package/pages/SwapDetailsPage/SwapDetailsPage.js +5 -4
  293. package/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
  294. package/pages/SwapPage/ExchangeRateBottomSheet.d.ts +1 -2
  295. package/pages/SwapPage/ExchangeRateBottomSheet.js +0 -12
  296. package/pages/SwapPage/StartSwapButton.d.ts +3 -2
  297. package/pages/SwapPage/StartSwapButton.js +13 -4
  298. package/pages/SwapPage/SwapPage.js +21 -10
  299. package/pages/SwapPage/types.d.ts +9 -0
  300. package/pages/SwapPage/types.js +1 -0
  301. package/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
  302. package/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +2 -1
  303. package/providers/SDKProvider/SDKProvider.d.ts +2 -2
  304. package/providers/SDKProvider/SDKProvider.js +3 -2
  305. package/providers/SwapFormProvider/FormUpdater.js +2 -3
  306. package/providers/SwapFormProvider/SwapFormProvider.js +2 -3
  307. package/providers/SwapFormProvider/index.d.ts +1 -0
  308. package/providers/SwapFormProvider/index.js +1 -0
  309. package/providers/WidgetProvider/WidgetProvider.js +17 -4
  310. package/providers/WidgetProvider/utils.d.ts +1 -1
  311. package/providers/WidgetProvider/utils.js +2 -4
  312. package/stores/StoreProvider.js +2 -2
  313. package/stores/routes/createRouteExecutionStore.js +3 -2
  314. package/stores/routes/index.d.ts +0 -1
  315. package/stores/routes/index.js +0 -1
  316. package/stores/routes/types.d.ts +1 -5
  317. package/stores/routes/useSetExecutableRoute.d.ts +1 -1
  318. package/stores/settings/types.d.ts +1 -0
  319. package/stores/settings/useSettingsStore.js +1 -0
  320. package/tsconfig.cjs.tsbuildinfo +1 -1
  321. package/types/widget.d.ts +5 -10
  322. package/utils/format.js +4 -1
  323. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +0 -31
  324. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +0 -9
  325. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +0 -14
  326. package/cjs/components/GasSufficiencyMessage/index.d.ts +0 -1
  327. package/cjs/components/SwapRoutes/useSetRecommendedRoute.d.ts +0 -2
  328. package/cjs/components/SwapRoutes/useSetRecommendedRoute.js +0 -13
  329. package/cjs/config/env.d.ts +0 -3
  330. package/cjs/config/env.js +0 -6
  331. package/cjs/stores/routes/useRecommendedRouteStore.d.ts +0 -10
  332. package/cjs/stores/routes/useRecommendedRouteStore.js +0 -39
  333. package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +0 -27
  334. package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +0 -9
  335. package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +0 -11
  336. package/components/GasSufficiencyMessage/index.d.ts +0 -1
  337. package/components/GasSufficiencyMessage/index.js +0 -1
  338. package/components/SwapRoutes/useSetRecommendedRoute.d.ts +0 -2
  339. package/components/SwapRoutes/useSetRecommendedRoute.js +0 -9
  340. package/config/env.d.ts +0 -3
  341. package/config/env.js +0 -3
  342. package/stores/routes/useRecommendedRouteStore.d.ts +0 -10
  343. package/stores/routes/useRecommendedRouteStore.js +0 -32
@@ -1,24 +1,46 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { isAddress } from '@ethersproject/address';
3
3
  import { Collapse, FormHelperText } from '@mui/material';
4
- import { forwardRef, useEffect } from 'react';
5
- import { useFormContext, useFormState } from 'react-hook-form';
4
+ import { forwardRef, useEffect, useRef } from 'react';
5
+ import { useController, useFormContext, useFormState } from 'react-hook-form';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { SwapFormKey, useWallet, useWidgetConfig } from '../../providers';
8
8
  import { useSendToWalletStore, useSettings } from '../../stores';
9
- import { DisabledUI, HiddenUI } from '../../types';
9
+ import { DisabledUI, HiddenUI, RequiredUI } from '../../types';
10
10
  import { Card, CardTitle } from '../Card';
11
11
  import { FormControl, Input } from './SendToWallet.style';
12
12
  export const SendToWallet = forwardRef((props, ref) => {
13
13
  const { t } = useTranslation();
14
- const { register, unregister, trigger, getValues, clearErrors } = useFormContext();
14
+ const { trigger, getValues, clearErrors } = useFormContext();
15
15
  const { account, provider } = useWallet();
16
16
  const { disabledUI, hiddenUI, requiredUI, toAddress } = useWidgetConfig();
17
17
  const { showSendToWallet, showSendToWalletDirty, setSendToWallet } = useSendToWalletStore();
18
18
  const { showDestinationWallet } = useSettings(['showDestinationWallet']);
19
19
  const hiddenToAddress = hiddenUI?.includes(HiddenUI.ToAddress);
20
20
  const disabledToAddress = disabledUI?.includes(DisabledUI.ToAddress);
21
- const requiredToAddress = requiredUI?.includes(DisabledUI.ToAddress);
21
+ const requiredToAddress = requiredUI?.includes(RequiredUI.ToAddress);
22
+ const requiredToAddressRef = useRef(requiredToAddress);
23
+ const { field: { onChange, onBlur, name, value }, } = useController({
24
+ name: SwapFormKey.ToAddress,
25
+ rules: {
26
+ required: requiredToAddress &&
27
+ t('swap.error.title.walletAddressRequired'),
28
+ validate: async (value) => {
29
+ try {
30
+ if (!value) {
31
+ return true;
32
+ }
33
+ const address = await provider?.resolveName(value);
34
+ return (isAddress(address || value) ||
35
+ t('swap.error.title.walletAddressInvalid'));
36
+ }
37
+ catch {
38
+ return t('swap.error.title.walletEnsAddressInvalid');
39
+ }
40
+ },
41
+ onBlur: () => trigger(SwapFormKey.ToAddress),
42
+ },
43
+ });
22
44
  // We want to show toAddress field if it is set via widget configuration and not hidden
23
45
  const showInstantly = Boolean(!showSendToWalletDirty &&
24
46
  showDestinationWallet &&
@@ -33,33 +55,17 @@ export const SendToWallet = forwardRef((props, ref) => {
33
55
  const value = getValues(SwapFormKey.ToAddress);
34
56
  if (value) {
35
57
  trigger(SwapFormKey.ToAddress);
58
+ // Trigger validation if we change requiredToAddress in the runtime
36
59
  }
37
- }, [account.chainId, getValues, trigger]);
38
- useEffect(() => {
39
- unregister(SwapFormKey.ToAddress);
40
- }, [requiredToAddress, unregister]);
60
+ else if (requiredToAddressRef.current !== requiredToAddress) {
61
+ requiredToAddressRef.current = requiredToAddress;
62
+ trigger(SwapFormKey.ToAddress).then(() => clearErrors(SwapFormKey.ToAddress));
63
+ }
64
+ }, [account.chainId, clearErrors, getValues, requiredToAddress, trigger]);
41
65
  if (hiddenToAddress) {
42
66
  return null;
43
67
  }
44
- const { onChange, onBlur, name, ref: inputRef, } = register(SwapFormKey.ToAddress, {
45
- required: requiredToAddress &&
46
- t('swap.error.title.walletAddressRequired'),
47
- validate: async (value) => {
48
- try {
49
- if (!value) {
50
- return true;
51
- }
52
- const address = await provider?.resolveName(value);
53
- return (isAddress(address || value) ||
54
- t('swap.error.title.walletAddressInvalid'));
55
- }
56
- catch {
57
- return t('swap.error.title.walletEnsAddressInvalid');
58
- }
59
- },
60
- onBlur: () => trigger(SwapFormKey.ToAddress),
61
- });
62
- return (_jsx(Collapse, { timeout: showInstantly ? 0 : 225, in: showSendToWallet || showInstantly, mountOnEnter: true, unmountOnExit: true, children: _jsxs(Card, { ...props, ref: ref, children: [_jsx(CardTitle, { required: requiredToAddress, children: t('swap.sendToWallet') }), _jsxs(FormControl, { fullWidth: true, sx: { paddingTop: '6px', paddingBottom: '5px' }, children: [_jsx(Input, { ref: inputRef, size: "small", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: "false", onChange: onChange, onBlur: onBlur, name: name, placeholder: t('swap.walletAddressOrEns'), disabled: Boolean(toAddress && disabledToAddress) }), _jsx(SendToWalletFormHelperText, {})] })] }) }));
68
+ return (_jsx(Collapse, { timeout: showInstantly ? 0 : 225, in: showSendToWallet || showInstantly, mountOnEnter: true, unmountOnExit: true, children: _jsxs(Card, { ...props, ref: ref, children: [_jsx(CardTitle, { required: requiredToAddress, children: t('swap.sendToWallet') }), _jsxs(FormControl, { fullWidth: true, sx: { paddingTop: '6px', paddingBottom: '5px' }, children: [_jsx(Input, { size: "small", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: "false", onChange: onChange, onBlur: onBlur, name: name, value: value, placeholder: t('swap.walletAddressOrEns'), disabled: Boolean(toAddress && disabledToAddress) }), _jsx(SendToWalletFormHelperText, {})] })] }) }));
63
69
  });
64
70
  export const SendToWalletFormHelperText = () => {
65
71
  const { errors } = useFormState();
@@ -2,7 +2,7 @@
2
2
  export declare const FormControl: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").FormControlClasses> | undefined;
5
- color?: "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
5
+ color?: import("@mui/types").OverridableStringUnion<"success" | "warning" | "error" | "primary" | "secondary" | "info", import("@mui/material").FormControlPropsColorOverrides> | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  error?: boolean | undefined;
8
8
  fullWidth?: boolean | undefined;
@@ -10,7 +10,7 @@ export declare const FormControl: import("@emotion/styled").StyledComponent<{
10
10
  hiddenLabel?: boolean | undefined;
11
11
  margin?: "normal" | "none" | "dense" | undefined;
12
12
  required?: boolean | undefined;
13
- size?: "small" | "medium" | undefined;
13
+ size?: import("@mui/types").OverridableStringUnion<"small" | "medium", import("@mui/material").FormControlPropsSizeOverrides> | undefined;
14
14
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
15
15
  variant?: "outlined" | "filled" | "standard" | undefined;
16
16
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import WalletOutlinedIcon from '@mui/icons-material/WalletOutlined';
2
+ import WalletIcon from '@mui/icons-material/Wallet';
3
3
  import { Button, Tooltip } from '@mui/material';
4
4
  import { useFormContext } from 'react-hook-form';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { SwapFormKey, useWallet, useWidgetConfig } from '../../providers';
7
7
  import { useSendToWalletStore, useSettings } from '../../stores';
8
- import { DisabledUI, HiddenUI } from '../../types';
8
+ import { DisabledUI, HiddenUI, RequiredUI } from '../../types';
9
9
  export const SendToWalletButton = () => {
10
10
  const { t } = useTranslation();
11
11
  const { setValue } = useFormContext();
@@ -16,7 +16,7 @@ export const SendToWalletButton = () => {
16
16
  if (!showDestinationWallet ||
17
17
  !account.isActive ||
18
18
  hiddenUI?.includes(HiddenUI.ToAddress) ||
19
- requiredUI?.includes(HiddenUI.ToAddress)) {
19
+ requiredUI?.includes(RequiredUI.ToAddress)) {
20
20
  return null;
21
21
  }
22
22
  const handleClick = () => {
@@ -28,5 +28,5 @@ export const SendToWalletButton = () => {
28
28
  return (_jsx(Tooltip, { title: t('swap.sendToWallet'), placement: "bottom-end", enterDelay: 400, arrow: true, children: _jsx(Button, { variant: showSendToWallet ? 'contained' : 'text', onClick: handleClick, sx: {
29
29
  minWidth: 48,
30
30
  marginLeft: 1,
31
- }, children: _jsx(WalletOutlinedIcon, {}) }) }));
31
+ }, children: _jsx(WalletIcon, {}) }) }));
32
32
  };
@@ -10,7 +10,7 @@ export declare const SmallAvatar: import("@emotion/styled").StyledComponent<{
10
10
  src?: string | undefined;
11
11
  srcSet?: string | undefined;
12
12
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
13
- variant?: "square" | "circular" | "rounded" | undefined;
13
+ variant?: import("@mui/types").OverridableStringUnion<"square" | "circular" | "rounded", import("@mui/material").AvatarPropsVariantOverrides> | undefined;
14
14
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
15
15
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
16
16
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -20,7 +20,7 @@ export declare const SmallAvatarSkeletonBase: import("@emotion/styled").StyledCo
20
20
  classes?: Partial<import("@mui/material").SkeletonClasses> | undefined;
21
21
  height?: string | number | undefined;
22
22
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
23
- variant?: "text" | "circular" | "rounded" | "rectangular" | undefined;
23
+ variant?: import("@mui/types").OverridableStringUnion<"text" | "circular" | "rounded" | "rectangular", import("@mui/material").SkeletonPropsVariantOverrides> | undefined;
24
24
  width?: string | number | undefined;
25
25
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
26
26
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { Status, Substatus } from '@lifi/sdk';
3
- import { Theme } from '@mui/material';
3
+ import type { Theme } from '@mui/material';
4
4
  export declare const CircularIcon: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<Theme> & {
5
5
  children?: import("react").ReactNode;
6
6
  component?: import("react").ElementType<any> | undefined;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import type { Step } from '@lifi/sdk';
2
+ import type { LifiStep } from '@lifi/sdk';
3
3
  export declare const DestinationWalletAddress: React.FC<{
4
- step: Step;
4
+ step: LifiStep;
5
5
  toAddress: string;
6
6
  toAddressLink: string;
7
7
  }>;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import LinkRoundedIcon from '@mui/icons-material/LinkRounded';
3
- import WalletOutlinedIcon from '@mui/icons-material/WalletOutlined';
3
+ import WalletIcon from '@mui/icons-material/Wallet';
4
4
  import { Box, Link, Typography } from '@mui/material';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { CircularIcon } from './CircularProgress.style';
@@ -11,18 +11,14 @@ export const DestinationWalletAddress = ({ step, toAddress, toAddressLink }) =>
11
11
  return (_jsx(Box, { px: 2, py: 1, children: _jsxs(Box, { sx: {
12
12
  display: 'flex',
13
13
  alignItems: 'center',
14
- }, children: [_jsx(CircularIcon, { status: isDone ? 'DONE' : 'NOT_STARTED', children: _jsx(WalletOutlinedIcon, { color: isDone ? 'success' : 'inherit', sx: {
14
+ }, children: [_jsx(CircularIcon, { status: isDone ? 'DONE' : 'NOT_STARTED', children: _jsx(WalletIcon, { color: isDone ? 'success' : 'inherit', sx: {
15
15
  position: 'absolute',
16
16
  fontSize: '1rem',
17
- } }) }), _jsx(Typography, { ml: 2, fontSize: 14, fontWeight: 400, children: isDone
17
+ } }) }), _jsx(Typography, { mx: 2, flex: 1, fontSize: 14, fontWeight: 400, children: isDone
18
18
  ? t('swap.sentToAddress', {
19
19
  address: toAddress,
20
20
  })
21
21
  : t('swap.sendToAddress', {
22
22
  address: toAddress,
23
- }) }), _jsx(Box, { ml: 2, sx: {
24
- display: 'flex',
25
- flex: 1,
26
- justifyContent: 'flex-end',
27
- }, children: _jsx(LinkButton, { size: "small", edge: "end", LinkComponent: Link, href: toAddressLink, target: "_blank", rel: "nofollow noreferrer", children: _jsx(LinkRoundedIcon, {}) }) })] }) }));
23
+ }) }), _jsx(LinkButton, { size: "small", edge: "end", LinkComponent: Link, href: toAddressLink, target: "_blank", rel: "nofollow noreferrer", children: _jsx(LinkRoundedIcon, {}) })] }) }));
28
24
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { Step } from '@lifi/sdk';
2
+ import type { LifiStep } from '@lifi/sdk';
3
3
  export declare const GasStepProcess: React.FC<{
4
- step: Step;
4
+ step: LifiStep;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import EvStationOutlinedIcon from '@mui/icons-material/EvStationOutlined';
2
+ import EvStationIcon from '@mui/icons-material/EvStation';
3
3
  import { Box, Typography } from '@mui/material';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { CircularIcon } from './CircularProgress.style';
@@ -9,10 +9,10 @@ export const GasStepProcess = ({ step }) => {
9
9
  return (_jsx(Box, { px: 2, py: 1, children: _jsxs(Box, { sx: {
10
10
  display: 'flex',
11
11
  alignItems: 'center',
12
- }, children: [_jsx(CircularIcon, { status: isDone ? 'DONE' : 'NOT_STARTED', children: _jsx(EvStationOutlinedIcon, { color: isDone ? 'success' : 'inherit', sx: {
12
+ }, children: [_jsx(CircularIcon, { status: isDone ? 'DONE' : 'NOT_STARTED', children: _jsx(EvStationIcon, { color: isDone ? 'success' : 'inherit', sx: {
13
13
  position: 'absolute',
14
14
  fontSize: '1rem',
15
- } }) }), _jsxs(Typography, { ml: 2, fontSize: 14, fontWeight: 400, children: [t('format.currency', {
15
+ } }) }), _jsxs(Typography, { ml: 2, flex: 1, fontSize: 14, fontWeight: 400, children: [t('format.currency', {
16
16
  value: (step.execution?.gasAmountUSD ||
17
17
  step.estimate.gasCosts?.reduce((amount, gasCost) => amount + parseFloat(gasCost.amountUSD || '0'), 0)) ??
18
18
  0,
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import type { Step as StepType, TokenAmount } from '@lifi/sdk';
2
+ import type { LifiStep, TokenAmount } from '@lifi/sdk';
3
3
  export declare const Step: React.FC<{
4
- step: StepType;
4
+ step: LifiStep;
5
5
  fromToken?: TokenAmount;
6
6
  toToken?: TokenAmount;
7
7
  toAddress?: string;
@@ -17,17 +17,15 @@ export const Step = ({ step, fromToken, toToken, toAddress }) => {
17
17
  const getCardTitle = () => {
18
18
  switch (step.type) {
19
19
  case 'lifi':
20
- if (step.includedSteps.every((step) => step.type === 'cross')) {
21
- return t('swap.stepBridge');
20
+ const hasCrossStep = step.includedSteps.some((step) => step.type === 'cross');
21
+ const hasSwapStep = step.includedSteps.some((step) => step.type === 'swap');
22
+ if (hasCrossStep && hasSwapStep) {
23
+ return t('swap.stepSwapAndBridge');
22
24
  }
23
- if (step.includedSteps.every((step) => step.type === 'swap')) {
24
- return t('swap.stepSwap');
25
+ if (hasCrossStep) {
26
+ return t('swap.stepBridge');
25
27
  }
26
- return t('swap.stepSwapAndBridge');
27
- case 'swap':
28
28
  return t('swap.stepSwap');
29
- case 'cross':
30
- return t('swap.stepBridge');
31
29
  default:
32
30
  return t('swap.stepSwap');
33
31
  }
@@ -1,2 +1,2 @@
1
- import { Route } from '@lifi/sdk';
1
+ import type { Route } from '@lifi/sdk';
2
2
  export declare const getStepList: (route?: Route) => JSX.Element[] | undefined;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { Process, Step } from '@lifi/sdk';
2
+ import type { LifiStep, Process } from '@lifi/sdk';
3
3
  export declare const StepProcess: React.FC<{
4
- step: Step;
4
+ step: LifiStep;
5
5
  process: Process;
6
6
  }>;
@@ -9,9 +9,5 @@ export const StepProcess = ({ step, process }) => {
9
9
  return (_jsxs(Box, { px: 2, py: 1, children: [_jsxs(Box, { sx: {
10
10
  display: 'flex',
11
11
  alignItems: 'center',
12
- }, children: [_jsx(CircularProgress, { process: process }), _jsx(Typography, { ml: 2, fontSize: 14, fontWeight: process.error ? 600 : 400, children: title }), process.txLink ? (_jsx(Box, { ml: 2, sx: {
13
- display: 'flex',
14
- flex: 1,
15
- justifyContent: 'flex-end',
16
- }, children: _jsx(LinkButton, { size: "small", edge: "end", LinkComponent: Link, href: process.txLink, target: "_blank", rel: "nofollow noreferrer", children: _jsx(LinkRoundedIcon, {}) }) })) : null] }), message ? (_jsx(Typography, { ml: 6, fontSize: 14, fontWeight: 500, color: "text.secondary", children: message })) : null] }));
12
+ }, children: [_jsx(CircularProgress, { process: process }), _jsx(Typography, { mx: 2, flex: 1, fontSize: 14, fontWeight: process.error ? 600 : 400, children: title }), process.txLink ? (_jsx(LinkButton, { size: "small", edge: "end", LinkComponent: Link, href: process.txLink, target: "_blank", rel: "nofollow noreferrer", children: _jsx(LinkRoundedIcon, {}) })) : null] }), message ? (_jsx(Typography, { ml: 6, fontSize: 14, fontWeight: 500, color: "text.secondary", children: message })) : null] }));
17
13
  };
@@ -1,39 +1,3 @@
1
- /// <reference types="react" />
2
- export declare const LinkButton: import("@emotion/styled").StyledComponent<{
3
- children?: import("react").ReactNode;
4
- classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
5
- color?: "inherit" | "default" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
6
- disabled?: boolean | undefined;
7
- disableFocusRipple?: boolean | undefined;
8
- edge?: false | "end" | "start" | undefined;
9
- size?: "small" | "medium" | "large" | undefined;
10
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
11
- } & Omit<{
12
- action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
13
- centerRipple?: boolean | undefined;
14
- children?: import("react").ReactNode;
15
- classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
16
- disabled?: boolean | undefined;
17
- disableRipple?: boolean | undefined;
18
- disableTouchRipple?: boolean | undefined;
19
- focusRipple?: boolean | undefined;
20
- focusVisibleClassName?: string | undefined;
21
- LinkComponent?: import("react").ElementType<any> | undefined;
22
- onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
23
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
24
- tabIndex?: number | undefined;
25
- TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
26
- touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
27
- }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
28
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
29
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & Omit<import("@mui/material").LinkBaseProps, "classes"> & {
30
- children?: import("react").ReactNode;
31
- classes?: Partial<import("@mui/material").LinkClasses> | undefined;
32
- color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined> | ((theme: import("@mui/material").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined>);
33
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
34
- TypographyClasses?: (Partial<import("@mui/material").TypographyClasses> & Partial<import("@mui/material").ClassNameMap<never>>) | undefined;
35
- underline?: "none" | "always" | "hover" | undefined;
36
- variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)" | undefined;
37
- } & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
38
- ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
39
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "p" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "underline" | "TypographyClasses">, {}, {}>;
1
+ import type { StyledComponent } from '@emotion/styled';
2
+ import type { IconButtonProps, LinkProps } from '@mui/material';
3
+ export declare const LinkButton: StyledComponent<IconButtonProps & LinkProps>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { Step } from '@lifi/sdk';
2
+ import type { LifiStep } from '@lifi/sdk';
3
3
  export declare const StepTimer: React.FC<{
4
- step: Step;
4
+ step: LifiStep;
5
5
  hideInProgress?: boolean;
6
6
  }>;
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
4
4
  import { useTimer } from 'react-timer-hook';
5
5
  const getExpiryTimestamp = (step) => new Date((step.execution?.process[0]?.startedAt ?? Date.now()) +
6
6
  step.estimate.executionDuration * 1000);
7
- export const StepTimer = ({ step, hideInProgress, }) => {
7
+ export const StepTimer = ({ step, hideInProgress }) => {
8
8
  const { t } = useTranslation();
9
9
  const [isExpired, setExpired] = useState(false);
10
10
  const [isExecutionStarted, setExecutionStarted] = useState(!!step.execution);
@@ -1,8 +1,12 @@
1
1
  /// <reference types="react" />
2
- import type { Step } from '@lifi/sdk';
2
+ import type { LifiStep, Step } from '@lifi/sdk';
3
3
  import type { WidgetVariant } from '../../types';
4
4
  import type { StepActionsProps, StepDetailsLabelProps } from './types';
5
5
  export declare const StepActions: React.FC<StepActionsProps>;
6
+ export declare const IncludedSteps: React.FC<{
7
+ step: LifiStep;
8
+ variant?: WidgetVariant;
9
+ }>;
6
10
  export declare const StepDetailsContent: React.FC<{
7
11
  step: Step;
8
12
  variant?: WidgetVariant;
@@ -10,3 +14,4 @@ export declare const StepDetailsContent: React.FC<{
10
14
  export declare const CustomStepDetailsLabel: React.FC<StepDetailsLabelProps>;
11
15
  export declare const CrossStepDetailsLabel: React.FC<Omit<StepDetailsLabelProps, 'variant'>>;
12
16
  export declare const SwapStepDetailsLabel: React.FC<Omit<StepDetailsLabelProps, 'variant'>>;
17
+ export declare const ProtocolStepDetailsLabel: React.FC<Omit<StepDetailsLabelProps, 'variant'>>;
@@ -1,26 +1,30 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
3
- import { Box, Step as MuiStep, Stepper, Typography } from '@mui/material';
3
+ import ExpandLessIcon from '@mui/icons-material/ExpandLess';
4
+ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
5
+ import { Badge, Box, Collapse, Step as MuiStep, Stepper, Typography, } from '@mui/material';
6
+ import Big from 'big.js';
7
+ import { useState } from 'react';
4
8
  import { useTranslation } from 'react-i18next';
5
9
  import { useChains } from '../../hooks';
6
10
  import { LiFiToolLogo } from '../../icons';
7
11
  import { useWidgetConfig } from '../../providers';
8
12
  import { formatTokenAmount } from '../../utils';
13
+ import { CardIconButton } from '../Card';
9
14
  import { SmallAvatar } from '../SmallAvatar';
10
15
  import { StepAvatar, StepConnector, StepContent, StepLabel, } from './StepActions.style';
11
16
  export const StepActions = ({ step, dense, ...other }) => {
17
+ const { t } = useTranslation();
12
18
  const { variant, contractTool } = useWidgetConfig();
13
- const StepDetailsLabel = step.tool === 'custom' && variant === 'nft'
14
- ? CustomStepDetailsLabel
15
- : step.type === 'cross' ||
16
- (step.type === 'lifi' &&
17
- step.includedSteps.some((step) => step.type === 'cross'))
18
- ? CrossStepDetailsLabel
19
- : SwapStepDetailsLabel;
20
- const isFullView = !dense && step.includedSteps?.length > 1;
19
+ const [cardExpanded, setCardExpanded] = useState(false);
20
+ const handleExpand = (e) => {
21
+ e.stopPropagation();
22
+ setCardExpanded((expanded) => !expanded);
23
+ };
21
24
  const customStep = variant === 'nft'
22
25
  ? step.includedSteps?.find((step) => step.type === 'custom')
23
26
  : undefined;
27
+ const hasCollapsedSteps = dense && step.includedSteps?.length > 1;
24
28
  if (customStep && contractTool) {
25
29
  const toolDetails = {
26
30
  key: contractTool.name,
@@ -28,10 +32,15 @@ export const StepActions = ({ step, dense, ...other }) => {
28
32
  logoURI: contractTool.logoURI,
29
33
  };
30
34
  customStep.toolDetails = toolDetails;
31
- if (!isFullView) {
35
+ if (dense) {
32
36
  step.toolDetails = toolDetails;
33
37
  }
34
38
  }
39
+ return (_jsxs(Box, { ...other, children: [_jsxs(Box, { display: "flex", alignItems: "center", children: [_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: _jsx(SmallAvatar, { children: _jsx(LiFiToolLogo, {}) }), children: _jsx(StepAvatar, { variant: "circular", src: step.toolDetails.logoURI, alt: step.toolDetails.name, children: step.toolDetails.name[0] }) }), _jsx(Typography, { ml: 2, fontSize: 18, fontWeight: "500", flex: 1, children: t(`swap.stepDetails`, {
40
+ tool: step.toolDetails.name,
41
+ }) }), hasCollapsedSteps ? (_jsx(CardIconButton, { onClick: handleExpand, size: "small", children: cardExpanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) })) : null] }), hasCollapsedSteps ? (_jsx(Collapse, { timeout: 225, in: cardExpanded, mountOnEnter: true, unmountOnExit: true, children: _jsx(IncludedSteps, { step: step, variant: variant }) })) : (_jsx(IncludedSteps, { step: step, variant: variant }))] }));
42
+ };
43
+ export const IncludedSteps = ({ step, variant }) => {
35
44
  // eslint-disable-next-line react/no-unstable-nested-components
36
45
  const StepIconComponent = ({ icon }) => {
37
46
  const tool = step.includedSteps?.[Number(icon) - 1];
@@ -39,16 +48,34 @@ export const StepActions = ({ step, dense, ...other }) => {
39
48
  boxSizing: 'content-box',
40
49
  }, children: tool.toolDetails.name[0] })) : null;
41
50
  };
42
- return (_jsxs(Box, { ...other, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center' }, mb: isFullView ? 1.5 : 0, children: [_jsx(StepAvatar, { variant: "circular", src: step.type !== 'lifi' ? step.toolDetails.logoURI : undefined, alt: step.toolDetails.name, children: step.type === 'lifi' ? _jsx(LiFiToolLogo, {}) : step.toolDetails.name[0] }), _jsx(Typography, { ml: 2, fontSize: 18, fontWeight: "500", textTransform: "capitalize", children: step.type === 'lifi'
43
- ? 'LI.FI Smart Contract'
44
- : step.toolDetails.name })] }), isFullView ? (_jsx(Stepper, { orientation: "vertical", connector: _jsx(StepConnector, {}), activeStep: -1, children: step.includedSteps.map((step, i) => (_jsxs(MuiStep, { expanded: true, children: [_jsx(StepLabel, { StepIconComponent: StepIconComponent, children: step.type === 'custom' && variant === 'nft' ? (_jsx(CustomStepDetailsLabel, { step: step, variant: variant })) : step.type === 'cross' || step.type === 'lifi' ? (_jsx(CrossStepDetailsLabel, { step: step })) : (_jsx(SwapStepDetailsLabel, { step: step })) }), _jsx(StepContent, { children: _jsx(StepDetailsContent, { step: step, variant: variant }) })] }, step.id))) })) : (_jsxs(Box, { ml: 6, children: [_jsx(StepDetailsLabel, { step: step, variant: variant === 'nft' ? variant : undefined }), _jsx(StepDetailsContent, { step: step, variant: variant })] }))] }));
51
+ const StepDetailsLabel = step.tool === 'custom' && variant === 'nft'
52
+ ? CustomStepDetailsLabel
53
+ : step.type === 'lifi' &&
54
+ step.includedSteps.some((step) => step.type === 'cross')
55
+ ? CrossStepDetailsLabel
56
+ : SwapStepDetailsLabel;
57
+ return step.includedSteps.length > 1 ? (_jsx(Box, { mt: 1.5, children: _jsx(Stepper, { orientation: "vertical", connector: _jsx(StepConnector, {}), activeStep: -1, children: step.includedSteps.map((step, i) => (_jsxs(MuiStep, { expanded: true, children: [_jsx(StepLabel, { StepIconComponent: StepIconComponent, children: step.type === 'custom' && variant === 'nft' ? (_jsx(CustomStepDetailsLabel, { step: step, variant: variant })) : step.type === 'cross' ? (_jsx(CrossStepDetailsLabel, { step: step })) : step.type === 'protocol' ? (_jsx(ProtocolStepDetailsLabel, { step: step })) : (_jsx(SwapStepDetailsLabel, { step: step })) }), _jsx(StepContent, { children: _jsx(StepDetailsContent, { step: step, variant: variant }) })] }, step.id))) }) })) : (_jsxs(Box, { ml: 6, children: [_jsx(StepDetailsLabel, { step: step, variant: variant === 'nft' ? variant : undefined }), _jsx(StepDetailsContent, { step: step, variant: variant })] }));
45
58
  };
46
59
  export const StepDetailsContent = ({ step, variant }) => {
47
60
  const { t } = useTranslation();
61
+ const sameTokenProtocolStep = step.action.fromToken.chainId === step.action.toToken.chainId &&
62
+ step.action.fromToken.address === step.action.toToken.address;
63
+ let fromAmount;
64
+ if (sameTokenProtocolStep) {
65
+ fromAmount = Big(step.estimate.fromAmount)
66
+ .div(10 ** step.action.fromToken.decimals)
67
+ .minus(Big(step.estimate.toAmount).div(10 ** step.action.toToken.decimals));
68
+ }
69
+ else {
70
+ fromAmount = formatTokenAmount(step.estimate.fromAmount, step.action.fromToken.decimals);
71
+ }
72
+ const showToAmount = step.type !== 'custom' &&
73
+ step.tool !== 'custom' &&
74
+ variant !== 'nft' &&
75
+ !sameTokenProtocolStep;
48
76
  return (_jsxs(Typography, { fontSize: 12, fontWeight: "500", color: "text.secondary", alignItems: "center", display: "flex", children: [t('format.number', {
49
- value: formatTokenAmount(step.estimate.fromAmount, step.action.fromToken.decimals),
50
- }), ' ', step.action.fromToken.symbol, !((step.type === 'custom' || step.tool === 'custom') &&
51
- variant === 'nft') ? (_jsxs(_Fragment, { children: [_jsx(ArrowForwardIcon, { sx: { fontSize: 18, paddingX: 0.5 } }), t('format.number', {
77
+ value: fromAmount,
78
+ }), ' ', step.action.fromToken.symbol, showToAmount ? (_jsxs(_Fragment, { children: [_jsx(ArrowForwardIcon, { sx: { fontSize: 18, paddingX: 0.5 } }), t('format.number', {
52
79
  value: formatTokenAmount(step.execution?.toAmount ?? step.estimate.toAmount, step.execution?.toToken?.decimals ?? step.action.toToken.decimals),
53
80
  }), ' ', step.execution?.toToken?.symbol ?? step.action.toToken.symbol] })) : null] }));
54
81
  };
@@ -78,3 +105,11 @@ export const SwapStepDetailsLabel = ({ step }) => {
78
105
  tool: step.toolDetails.name,
79
106
  }) }));
80
107
  };
108
+ export const ProtocolStepDetailsLabel = ({ step }) => {
109
+ const { t } = useTranslation();
110
+ return (_jsx(Typography, { fontSize: 12, fontWeight: "500", color: "text.secondary", children: step.toolDetails.key === 'lifuelProtocol'
111
+ ? t('swap.refuelStepDetails', {
112
+ tool: step.toolDetails.name,
113
+ })
114
+ : step.toolDetails.name }));
115
+ };
@@ -14,7 +14,7 @@ export declare const StepAvatar: import("@emotion/styled").StyledComponent<{
14
14
  src?: string | undefined;
15
15
  srcSet?: string | undefined;
16
16
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
17
- variant?: "square" | "circular" | "rounded" | undefined;
17
+ variant?: import("@mui/types").OverridableStringUnion<"square" | "circular" | "rounded", import("@mui/material").AvatarPropsVariantOverrides> | undefined;
18
18
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
19
19
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
20
20
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,8 +1,8 @@
1
- import type { Step } from '@lifi/sdk';
1
+ import type { LifiStep, Step } from '@lifi/sdk';
2
2
  import type { BoxProps } from '@mui/material';
3
3
  import type { WidgetVariant } from '../../types';
4
4
  export interface StepActionsProps extends BoxProps {
5
- step: Step;
5
+ step: LifiStep;
6
6
  dense?: boolean;
7
7
  }
8
8
  export interface StepDetailsLabelProps {
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
4
4
  import { useNavigate } from 'react-router-dom';
5
5
  import { useWallet, useWidgetConfig } from '../../providers';
6
6
  import { navigationRoutes } from '../../utils';
7
- export const SwapButton = ({ onClick, currentRoute, text, disabled, loading, }) => {
7
+ export const SwapButton = ({ onClick, hasRoute, text, disabled, loading, }) => {
8
8
  const { t } = useTranslation();
9
9
  const navigate = useNavigate();
10
10
  const { variant, walletManagement } = useWidgetConfig();
@@ -24,7 +24,7 @@ export const SwapButton = ({ onClick, currentRoute, text, disabled, loading, })
24
24
  };
25
25
  const getButtonText = () => {
26
26
  if (account.isActive) {
27
- if (!currentRoute) {
27
+ if (!hasRoute) {
28
28
  return variant !== 'refuel' ? t(`button.swap`) : t(`button.getGas`);
29
29
  }
30
30
  if (text) {
@@ -1,7 +1,6 @@
1
- import type { Route } from '@lifi/sdk';
2
1
  export interface SwapButtonProps {
3
2
  onClick?(): void;
4
- currentRoute?: Route;
3
+ hasRoute?: boolean;
5
4
  text?: string;
6
5
  disabled?: boolean;
7
6
  loading?: boolean;
@@ -4,7 +4,7 @@ export declare const minInputFontSize = 14;
4
4
  export declare const FormControl: import("@emotion/styled").StyledComponent<{
5
5
  children?: import("react").ReactNode;
6
6
  classes?: Partial<import("@mui/material").FormControlClasses> | undefined;
7
- color?: "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
7
+ color?: import("@mui/types").OverridableStringUnion<"success" | "warning" | "error" | "primary" | "secondary" | "info", import("@mui/material").FormControlPropsColorOverrides> | undefined;
8
8
  disabled?: boolean | undefined;
9
9
  error?: boolean | undefined;
10
10
  fullWidth?: boolean | undefined;
@@ -12,7 +12,7 @@ export declare const FormControl: import("@emotion/styled").StyledComponent<{
12
12
  hiddenLabel?: boolean | undefined;
13
13
  margin?: "normal" | "none" | "dense" | undefined;
14
14
  required?: boolean | undefined;
15
- size?: "small" | "medium" | undefined;
15
+ size?: import("@mui/types").OverridableStringUnion<"small" | "medium", import("@mui/material").FormControlPropsSizeOverrides> | undefined;
16
16
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
17
17
  variant?: "outlined" | "filled" | "standard" | undefined;
18
18
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {