@rango-dev/ui 0.1.10-next.102

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 (367) hide show
  1. package/README.md +181 -0
  2. package/dist/components/Alert/Alert.d.ts +7 -0
  3. package/dist/components/Alert/Alert.stories.d.ts +5 -0
  4. package/dist/components/Alert/LoadingFailedAlert.d.ts +2 -0
  5. package/dist/components/Alert/NotFoundAlert.d.ts +7 -0
  6. package/dist/components/Alert/index.d.ts +2 -0
  7. package/dist/components/BestRoute/BestRoute.d.ts +12 -0
  8. package/dist/components/BestRoute/BestRoute.stories.d.ts +8 -0
  9. package/dist/components/BestRoute/index.d.ts +1 -0
  10. package/dist/components/BestRoute/mock.d.ts +4 -0
  11. package/dist/components/BlockchainSelector/BlockchainSelector.d.ts +17 -0
  12. package/dist/components/BlockchainSelector/BlockchainSelector.stories.d.ts +5 -0
  13. package/dist/components/BlockchainSelector/index.d.ts +1 -0
  14. package/dist/components/BlockchainsList/BlockchainsList.d.ts +10 -0
  15. package/dist/components/BlockchainsList/BlockchainsList.stories.d.ts +5 -0
  16. package/dist/components/BlockchainsList/index.d.ts +1 -0
  17. package/dist/components/BlockchainsList/mockData.d.ts +2 -0
  18. package/dist/components/Button/Button.d.ts +17 -0
  19. package/dist/components/Button/Button.stories.d.ts +8 -0
  20. package/dist/components/Button/index.d.ts +1 -0
  21. package/dist/components/Checkbox/Checkbox.d.ts +11 -0
  22. package/dist/components/Checkbox/Checkbox.stories.d.ts +5 -0
  23. package/dist/components/Checkbox/index.d.ts +1 -0
  24. package/dist/components/Chip/Chip.d.ts +12 -0
  25. package/dist/components/Chip/Chip.stories.d.ts +7 -0
  26. package/dist/components/Chip/index.d.ts +1 -0
  27. package/dist/components/ColorPicker/ColorPicker.d.ts +9 -0
  28. package/dist/components/ColorPicker/ColorPicker.stories.d.ts +5 -0
  29. package/dist/components/ColorPicker/index.d.ts +1 -0
  30. package/dist/components/ConnectWalletsModal/ConnectWallets.stories.d.ts +5 -0
  31. package/dist/components/ConnectWalletsModal/ConnectWalletsModal.d.ts +11 -0
  32. package/dist/components/ConnectWalletsModal/index.d.ts +1 -0
  33. package/dist/components/ConnectWalletsModal/mockData.d.ts +2 -0
  34. package/dist/components/Divider/Divider.d.ts +6 -0
  35. package/dist/components/Divider/index.d.ts +1 -0
  36. package/dist/components/Drawer/Drawer.d.ts +13 -0
  37. package/dist/components/Drawer/Drawer.stories.d.ts +8 -0
  38. package/dist/components/Drawer/index.d.ts +1 -0
  39. package/dist/components/Header/Header.d.ts +9 -0
  40. package/dist/components/Header/index.d.ts +1 -0
  41. package/dist/components/Icon/AddCircleIcon.d.ts +3 -0
  42. package/dist/components/Icon/AddIcon.d.ts +3 -0
  43. package/dist/components/Icon/AddWalletIcon.d.ts +3 -0
  44. package/dist/components/Icon/AngleDownIcon.d.ts +3 -0
  45. package/dist/components/Icon/AngleLeftIcon.d.ts +3 -0
  46. package/dist/components/Icon/AngleRightIcon.d.ts +3 -0
  47. package/dist/components/Icon/AngleUpIcon.d.ts +3 -0
  48. package/dist/components/Icon/ArrowRightIcon.d.ts +3 -0
  49. package/dist/components/Icon/BagIcon.d.ts +3 -0
  50. package/dist/components/Icon/BanIcon.d.ts +3 -0
  51. package/dist/components/Icon/CheckCircleIcon.d.ts +3 -0
  52. package/dist/components/Icon/CheckIcon.d.ts +3 -0
  53. package/dist/components/Icon/CheckSquareIcon.d.ts +3 -0
  54. package/dist/components/Icon/CheckWalletIcon.d.ts +3 -0
  55. package/dist/components/Icon/ChevronRightIcon.d.ts +3 -0
  56. package/dist/components/Icon/CloseIcon.d.ts +1 -0
  57. package/dist/components/Icon/CopyIcon.d.ts +3 -0
  58. package/dist/components/Icon/DeleteCircleIcon.d.ts +3 -0
  59. package/dist/components/Icon/DeleteWalletIcon.d.ts +3 -0
  60. package/dist/components/Icon/DisconnectIcon.d.ts +3 -0
  61. package/dist/components/Icon/DownloadIcon.d.ts +3 -0
  62. package/dist/components/Icon/GasIcon.d.ts +3 -0
  63. package/dist/components/Icon/HistoryIcon.d.ts +3 -0
  64. package/dist/components/Icon/HorizontalSwapIcon.d.ts +3 -0
  65. package/dist/components/Icon/Icons.stories.d.ts +5 -0
  66. package/dist/components/Icon/InfoCircleIcon.d.ts +3 -0
  67. package/dist/components/Icon/MinusCircleIcon.d.ts +3 -0
  68. package/dist/components/Icon/RetryIcon.d.ts +3 -0
  69. package/dist/components/Icon/RetryLeftIcon.d.ts +3 -0
  70. package/dist/components/Icon/RetryRightIcon.d.ts +3 -0
  71. package/dist/components/Icon/SearchIcon.d.ts +3 -0
  72. package/dist/components/Icon/SearchMinusIcon.d.ts +3 -0
  73. package/dist/components/Icon/SettingIcon.d.ts +3 -0
  74. package/dist/components/Icon/SignatureIcon.d.ts +3 -0
  75. package/dist/components/Icon/SwapWalletIcon.d.ts +3 -0
  76. package/dist/components/Icon/TimeIcon.d.ts +3 -0
  77. package/dist/components/Icon/TrashIcon.d.ts +3 -0
  78. package/dist/components/Icon/TryAgainIcon.d.ts +3 -0
  79. package/dist/components/Icon/VerticalSwapIcon.d.ts +3 -0
  80. package/dist/components/Icon/WalletIconIcon.d.ts +3 -0
  81. package/dist/components/Icon/WarningIcon.d.ts +3 -0
  82. package/dist/components/Icon/common.d.ts +2 -0
  83. package/dist/components/Icon/index.d.ts +40 -0
  84. package/dist/components/Icon/types.d.ts +6 -0
  85. package/dist/components/LiquiditySourceList/LiquiditySource.stories.d.ts +5 -0
  86. package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +11 -0
  87. package/dist/components/LiquiditySourceList/index.d.ts +1 -0
  88. package/dist/components/LiquiditySourceList/mockData.d.ts +2 -0
  89. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +13 -0
  90. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +5 -0
  91. package/dist/components/LiquiditySourcesSelector/index.d.ts +1 -0
  92. package/dist/components/Modal/Modal.d.ts +12 -0
  93. package/dist/components/Modal/Modal.stories.d.ts +5 -0
  94. package/dist/components/Modal/index.d.ts +1 -0
  95. package/dist/components/Radio/Radio.d.ts +13 -0
  96. package/dist/components/Radio/Radio.stories.d.ts +5 -0
  97. package/dist/components/Radio/index.d.ts +1 -0
  98. package/dist/components/SecondaryPage/SecondaryPage.d.ts +16 -0
  99. package/dist/components/SecondaryPage/SecondaryPage.stories.d.ts +2 -0
  100. package/dist/components/SecondaryPage/index.d.ts +1 -0
  101. package/dist/components/SelectableWalletList/SelectableWalletList.d.ts +7 -0
  102. package/dist/components/SelectableWalletList/SelectableWalletList.stories.d.ts +5 -0
  103. package/dist/components/SelectableWalletList/index.d.ts +1 -0
  104. package/dist/components/SelectableWalletList/mock.d.ts +2 -0
  105. package/dist/components/Settings/Settings.d.ts +23 -0
  106. package/dist/components/Settings/Settings.stories.d.ts +5 -0
  107. package/dist/components/Settings/index.d.ts +1 -0
  108. package/dist/components/Skeleton/Skeleton.d.ts +6 -0
  109. package/dist/components/Skeleton/Skeleton.stories.d.ts +5 -0
  110. package/dist/components/Skeleton/index.d.ts +1 -0
  111. package/dist/components/Spacer/Spacer.d.ts +6 -0
  112. package/dist/components/Spacer/Spacer.stories.d.ts +5 -0
  113. package/dist/components/Spacer/index.d.ts +1 -0
  114. package/dist/components/Spinner/Spinner.d.ts +6 -0
  115. package/dist/components/Spinner/Spinner.stories.d.ts +5 -0
  116. package/dist/components/Spinner/index.d.ts +1 -0
  117. package/dist/components/StatusDrawer/StatusDrawer.d.ts +11 -0
  118. package/dist/components/StatusDrawer/StatusDrawer.stories.d.ts +5 -0
  119. package/dist/components/StatusDrawer/index.d.ts +1 -0
  120. package/dist/components/StepDetail/StepDetail.d.ts +10 -0
  121. package/dist/components/StepDetail/StepDetail.stories.d.ts +5 -0
  122. package/dist/components/StepDetail/index.d.ts +1 -0
  123. package/dist/components/SwapContainer/SwapContainer.d.ts +7 -0
  124. package/dist/components/SwapContainer/SwapContainer.stories.d.ts +5 -0
  125. package/dist/components/SwapContainer/index.d.ts +1 -0
  126. package/dist/components/SwapDetail/SwapDetail.d.ts +8 -0
  127. package/dist/components/SwapDetail/SwapDetail.stories.d.ts +5 -0
  128. package/dist/components/SwapDetail/Token.d.ts +16 -0
  129. package/dist/components/SwapDetail/index.d.ts +1 -0
  130. package/dist/components/SwapDetail/mock.d.ts +2 -0
  131. package/dist/components/Switch/Switch.d.ts +6 -0
  132. package/dist/components/Switch/Switch.stories.d.ts +5 -0
  133. package/dist/components/Switch/index.d.ts +1 -0
  134. package/dist/components/TextField/TextField.d.ts +10 -0
  135. package/dist/components/TextField/TextField.stories.d.ts +7 -0
  136. package/dist/components/TextField/index.d.ts +1 -0
  137. package/dist/components/TokenList/TokenItem.d.ts +11 -0
  138. package/dist/components/TokenList/TokenList.d.ts +17 -0
  139. package/dist/components/TokenList/TokenList.stories.d.ts +5 -0
  140. package/dist/components/TokenList/index.d.ts +1 -0
  141. package/dist/components/TokenList/mockData.d.ts +2 -0
  142. package/dist/components/TokenSelector/TokenSelector.d.ts +16 -0
  143. package/dist/components/TokenSelector/TokenSelector.stories.d.ts +5 -0
  144. package/dist/components/TokenSelector/index.d.ts +1 -0
  145. package/dist/components/Tooltip/Tooltip.d.ts +7 -0
  146. package/dist/components/Tooltip/Tooltip.stories.d.ts +5 -0
  147. package/dist/components/Tooltip/index.d.ts +1 -0
  148. package/dist/components/Typography/Typography.d.ts +18 -0
  149. package/dist/components/Typography/Typography.stories.d.ts +5 -0
  150. package/dist/components/Typography/index.d.ts +1 -0
  151. package/dist/components/VirtualizedList/VirtualizedList.d.ts +17 -0
  152. package/dist/components/Wallet/State.d.ts +7 -0
  153. package/dist/components/Wallet/Wallet.d.ts +7 -0
  154. package/dist/components/Wallet/Wallet.stories.d.ts +5 -0
  155. package/dist/components/Wallet/index.d.ts +1 -0
  156. package/dist/components/common/FilledCircle.d.ts +1 -0
  157. package/dist/components/common/index.d.ts +1 -0
  158. package/dist/components/index.d.ts +31 -0
  159. package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +20 -0
  160. package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +6 -0
  161. package/dist/containers/ConfirmSwap/index.d.ts +1 -0
  162. package/dist/containers/ConfirmSwap/mock.d.ts +5 -0
  163. package/dist/containers/History/History.d.ts +13 -0
  164. package/dist/containers/History/History.stories.d.ts +5 -0
  165. package/dist/containers/History/index.d.ts +1 -0
  166. package/dist/containers/History/mock.d.ts +2 -0
  167. package/dist/containers/History/types.d.ts +39 -0
  168. package/dist/containers/SwapHistory/SwapHistory.d.ts +24 -0
  169. package/dist/containers/SwapHistory/SwapHistory.stories.d.ts +5 -0
  170. package/dist/containers/SwapHistory/SwapMessages.d.ts +17 -0
  171. package/dist/containers/SwapHistory/index.d.ts +1 -0
  172. package/dist/containers/SwapHistory/mock.d.ts +2 -0
  173. package/dist/containers/index.d.ts +3 -0
  174. package/dist/helper/index.d.ts +2 -0
  175. package/dist/index.d.ts +4 -0
  176. package/dist/index.js +8 -0
  177. package/dist/theme.d.ts +8 -0
  178. package/dist/types/index.d.ts +2 -0
  179. package/dist/types/meta.d.ts +23 -0
  180. package/dist/types/swaps.d.ts +29 -0
  181. package/dist/types/wallet.d.ts +23 -0
  182. package/dist/ui.cjs.development.js +4956 -0
  183. package/dist/ui.cjs.development.js.map +1 -0
  184. package/dist/ui.cjs.production.min.js +2 -0
  185. package/dist/ui.cjs.production.min.js.map +1 -0
  186. package/dist/ui.esm.js +4870 -0
  187. package/dist/ui.esm.js.map +1 -0
  188. package/package.json +88 -0
  189. package/src/components/Alert/Alert.stories.tsx +22 -0
  190. package/src/components/Alert/Alert.tsx +102 -0
  191. package/src/components/Alert/LoadingFailedAlert.tsx +11 -0
  192. package/src/components/Alert/NotFoundAlert.tsx +19 -0
  193. package/src/components/Alert/index.ts +2 -0
  194. package/src/components/BestRoute/BestRoute.stories.tsx +31 -0
  195. package/src/components/BestRoute/BestRoute.tsx +232 -0
  196. package/src/components/BestRoute/index.ts +1 -0
  197. package/src/components/BestRoute/mock.ts +554 -0
  198. package/src/components/BlockchainSelector/BlockchainSelector.stories.tsx +25 -0
  199. package/src/components/BlockchainSelector/BlockchainSelector.tsx +93 -0
  200. package/src/components/BlockchainSelector/index.ts +1 -0
  201. package/src/components/BlockchainsList/BlockchainsList.stories.tsx +25 -0
  202. package/src/components/BlockchainsList/BlockchainsList.tsx +70 -0
  203. package/src/components/BlockchainsList/index.ts +1 -0
  204. package/src/components/BlockchainsList/mockData.ts +2972 -0
  205. package/src/components/Button/Button.stories.tsx +59 -0
  206. package/src/components/Button/Button.tsx +421 -0
  207. package/src/components/Button/index.ts +1 -0
  208. package/src/components/Checkbox/Checkbox.stories.tsx +22 -0
  209. package/src/components/Checkbox/Checkbox.tsx +56 -0
  210. package/src/components/Checkbox/index.ts +1 -0
  211. package/src/components/Chip/Chip.stories.tsx +37 -0
  212. package/src/components/Chip/Chip.tsx +48 -0
  213. package/src/components/Chip/index.ts +1 -0
  214. package/src/components/ColorPicker/ColorPicker.stories.tsx +36 -0
  215. package/src/components/ColorPicker/ColorPicker.tsx +85 -0
  216. package/src/components/ColorPicker/index.ts +1 -0
  217. package/src/components/ConnectWalletsModal/ConnectWallets.stories.tsx +13 -0
  218. package/src/components/ConnectWalletsModal/ConnectWalletsModal.tsx +42 -0
  219. package/src/components/ConnectWalletsModal/index.ts +1 -0
  220. package/src/components/ConnectWalletsModal/mockData.ts +134 -0
  221. package/src/components/Divider/Divider.tsx +41 -0
  222. package/src/components/Divider/index.ts +1 -0
  223. package/src/components/Drawer/Drawer.stories.tsx +86 -0
  224. package/src/components/Drawer/Drawer.tsx +124 -0
  225. package/src/components/Drawer/index.ts +1 -0
  226. package/src/components/Header/Header.tsx +39 -0
  227. package/src/components/Header/index.ts +1 -0
  228. package/src/components/Icon/AddCircleIcon.tsx +31 -0
  229. package/src/components/Icon/AddIcon.tsx +31 -0
  230. package/src/components/Icon/AddWalletIcon.tsx +50 -0
  231. package/src/components/Icon/AngleDownIcon.tsx +30 -0
  232. package/src/components/Icon/AngleLeftIcon.tsx +33 -0
  233. package/src/components/Icon/AngleRightIcon.tsx +32 -0
  234. package/src/components/Icon/AngleUpIcon.tsx +32 -0
  235. package/src/components/Icon/ArrowRightIcon.tsx +31 -0
  236. package/src/components/Icon/BagIcon.tsx +39 -0
  237. package/src/components/Icon/BanIcon.tsx +32 -0
  238. package/src/components/Icon/CheckCircleIcon.tsx +39 -0
  239. package/src/components/Icon/CheckIcon.tsx +30 -0
  240. package/src/components/Icon/CheckSquareIcon.tsx +37 -0
  241. package/src/components/Icon/CheckWalletIcon.tsx +45 -0
  242. package/src/components/Icon/ChevronRightIcon.tsx +29 -0
  243. package/src/components/Icon/CloseIcon.tsx +9 -0
  244. package/src/components/Icon/CopyIcon.tsx +59 -0
  245. package/src/components/Icon/DeleteCircleIcon.tsx +31 -0
  246. package/src/components/Icon/DeleteWalletIcon.tsx +50 -0
  247. package/src/components/Icon/DisconnectIcon.tsx +31 -0
  248. package/src/components/Icon/DownloadIcon.tsx +37 -0
  249. package/src/components/Icon/GasIcon.tsx +37 -0
  250. package/src/components/Icon/HistoryIcon.tsx +34 -0
  251. package/src/components/Icon/HorizontalSwapIcon.tsx +38 -0
  252. package/src/components/Icon/Icons.stories.tsx +44 -0
  253. package/src/components/Icon/InfoCircleIcon.tsx +39 -0
  254. package/src/components/Icon/MinusCircleIcon.tsx +31 -0
  255. package/src/components/Icon/RetryIcon.tsx +30 -0
  256. package/src/components/Icon/RetryLeftIcon.tsx +31 -0
  257. package/src/components/Icon/RetryRightIcon.tsx +31 -0
  258. package/src/components/Icon/SearchIcon.tsx +31 -0
  259. package/src/components/Icon/SearchMinusIcon.tsx +31 -0
  260. package/src/components/Icon/SettingIcon.tsx +31 -0
  261. package/src/components/Icon/SignatureIcon.tsx +32 -0
  262. package/src/components/Icon/SwapWalletIcon.tsx +50 -0
  263. package/src/components/Icon/TimeIcon.tsx +29 -0
  264. package/src/components/Icon/TrashIcon.tsx +31 -0
  265. package/src/components/Icon/TryAgainIcon.tsx +31 -0
  266. package/src/components/Icon/VerticalSwapIcon.tsx +38 -0
  267. package/src/components/Icon/WalletIconIcon.tsx +40 -0
  268. package/src/components/Icon/WarningIcon.tsx +37 -0
  269. package/src/components/Icon/common.ts +69 -0
  270. package/src/components/Icon/index.ts +48 -0
  271. package/src/components/Icon/types.tsx +45 -0
  272. package/src/components/LiquiditySourceList/LiquiditySource.stories.tsx +13 -0
  273. package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +195 -0
  274. package/src/components/LiquiditySourceList/index.ts +1 -0
  275. package/src/components/LiquiditySourceList/mockData.ts +316 -0
  276. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.tsx +16 -0
  277. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +61 -0
  278. package/src/components/LiquiditySourcesSelector/index.ts +1 -0
  279. package/src/components/Modal/Modal.stories.tsx +22 -0
  280. package/src/components/Modal/Modal.tsx +93 -0
  281. package/src/components/Modal/index.ts +1 -0
  282. package/src/components/Radio/Radio.stories.tsx +23 -0
  283. package/src/components/Radio/Radio.tsx +100 -0
  284. package/src/components/Radio/index.ts +1 -0
  285. package/src/components/SecondaryPage/SecondaryPage.stories.tsx +7 -0
  286. package/src/components/SecondaryPage/SecondaryPage.tsx +68 -0
  287. package/src/components/SecondaryPage/index.ts +1 -0
  288. package/src/components/SelectableWalletList/SelectableWalletList.stories.tsx +14 -0
  289. package/src/components/SelectableWalletList/SelectableWalletList.tsx +118 -0
  290. package/src/components/SelectableWalletList/index.ts +1 -0
  291. package/src/components/SelectableWalletList/mock.ts +13 -0
  292. package/src/components/Settings/Settings.stories.tsx +34 -0
  293. package/src/components/Settings/Settings.tsx +208 -0
  294. package/src/components/Settings/index.ts +1 -0
  295. package/src/components/Skeleton/Skeleton.stories.tsx +24 -0
  296. package/src/components/Skeleton/Skeleton.tsx +66 -0
  297. package/src/components/Skeleton/index.ts +1 -0
  298. package/src/components/Spacer/Spacer.stories.tsx +31 -0
  299. package/src/components/Spacer/Spacer.tsx +128 -0
  300. package/src/components/Spacer/index.ts +1 -0
  301. package/src/components/Spinner/Spinner.stories.tsx +25 -0
  302. package/src/components/Spinner/Spinner.tsx +61 -0
  303. package/src/components/Spinner/index.ts +1 -0
  304. package/src/components/StatusDrawer/StatusDrawer.stories.tsx +38 -0
  305. package/src/components/StatusDrawer/StatusDrawer.tsx +82 -0
  306. package/src/components/StatusDrawer/index.ts +1 -0
  307. package/src/components/StepDetail/StepDetail.stories.tsx +37 -0
  308. package/src/components/StepDetail/StepDetail.tsx +109 -0
  309. package/src/components/StepDetail/index.ts +1 -0
  310. package/src/components/SwapContainer/SwapContainer.stories.tsx +13 -0
  311. package/src/components/SwapContainer/SwapContainer.tsx +43 -0
  312. package/src/components/SwapContainer/index.ts +1 -0
  313. package/src/components/SwapDetail/SwapDetail.stories.tsx +19 -0
  314. package/src/components/SwapDetail/SwapDetail.tsx +112 -0
  315. package/src/components/SwapDetail/Token.tsx +68 -0
  316. package/src/components/SwapDetail/index.ts +1 -0
  317. package/src/components/SwapDetail/mock.ts +276 -0
  318. package/src/components/Switch/Switch.stories.tsx +9 -0
  319. package/src/components/Switch/Switch.tsx +55 -0
  320. package/src/components/Switch/index.ts +1 -0
  321. package/src/components/TextField/TextField.stories.tsx +31 -0
  322. package/src/components/TextField/TextField.tsx +141 -0
  323. package/src/components/TextField/index.ts +1 -0
  324. package/src/components/TokenList/TokenItem.tsx +73 -0
  325. package/src/components/TokenList/TokenList.stories.tsx +18 -0
  326. package/src/components/TokenList/TokenList.tsx +95 -0
  327. package/src/components/TokenList/index.ts +1 -0
  328. package/src/components/TokenList/mockData.ts +1721 -0
  329. package/src/components/TokenSelector/TokenSelector.stories.tsx +18 -0
  330. package/src/components/TokenSelector/TokenSelector.tsx +95 -0
  331. package/src/components/TokenSelector/index.ts +1 -0
  332. package/src/components/Tooltip/Tooltip.stories.tsx +52 -0
  333. package/src/components/Tooltip/Tooltip.tsx +116 -0
  334. package/src/components/Tooltip/index.ts +1 -0
  335. package/src/components/Typography/Typography.stories.tsx +72 -0
  336. package/src/components/Typography/Typography.tsx +216 -0
  337. package/src/components/Typography/index.ts +1 -0
  338. package/src/components/VirtualizedList/VirtualizedList.tsx +62 -0
  339. package/src/components/Wallet/State.tsx +34 -0
  340. package/src/components/Wallet/Wallet.stories.tsx +36 -0
  341. package/src/components/Wallet/Wallet.tsx +69 -0
  342. package/src/components/Wallet/index.ts +1 -0
  343. package/src/components/common/FilledCircle.tsx +8 -0
  344. package/src/components/common/index.ts +1 -0
  345. package/src/components/index.ts +31 -0
  346. package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +22 -0
  347. package/src/containers/ConfirmSwap/ConfirmSwap.tsx +180 -0
  348. package/src/containers/ConfirmSwap/index.ts +1 -0
  349. package/src/containers/ConfirmSwap/mock.ts +223 -0
  350. package/src/containers/History/History.stories.tsx +14 -0
  351. package/src/containers/History/History.tsx +115 -0
  352. package/src/containers/History/index.ts +1 -0
  353. package/src/containers/History/mock.ts +826 -0
  354. package/src/containers/History/types.tsx +47 -0
  355. package/src/containers/SwapHistory/SwapHistory.stories.tsx +13 -0
  356. package/src/containers/SwapHistory/SwapHistory.tsx +442 -0
  357. package/src/containers/SwapHistory/SwapMessages.tsx +116 -0
  358. package/src/containers/SwapHistory/index.ts +1 -0
  359. package/src/containers/SwapHistory/mock.ts +276 -0
  360. package/src/containers/index.ts +3 -0
  361. package/src/helper/index.ts +16 -0
  362. package/src/index.ts +4 -0
  363. package/src/theme.ts +163 -0
  364. package/src/types/index.ts +3 -0
  365. package/src/types/meta.ts +22 -0
  366. package/src/types/swaps.ts +44 -0
  367. package/src/types/wallet.ts +30 -0
package/dist/ui.esm.js ADDED
@@ -0,0 +1,4870 @@
1
+ import React__default, { createElement, forwardRef, Fragment, useState, useEffect } from 'react';
2
+ import { Provider, Root, Portal, Trigger, Content as Content$1, Arrow } from '@radix-ui/react-tooltip';
3
+ import { VariableSizeList } from 'react-window';
4
+ import InfiniteLoader from 'react-window-infinite-loader';
5
+ import AutoSizer from 'react-virtualized-auto-sizer';
6
+ import { Indicator, Root as Root$1 } from '@radix-ui/react-checkbox';
7
+ import { createPortal } from 'react-dom';
8
+ import { detectInstallLink } from '@rango-dev/wallets-shared';
9
+ import { Root as Root$2, Thumb } from '@radix-ui/react-switch';
10
+ import { Root as Root$3, Item, Indicator as Indicator$1 } from '@radix-ui/react-radio-group';
11
+ import { ChromePicker } from 'react-color';
12
+
13
+ function _extends() {
14
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
15
+ for (var i = 1; i < arguments.length; i++) {
16
+ var source = arguments[i];
17
+ for (var key in source) {
18
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
19
+ target[key] = source[key];
20
+ }
21
+ }
22
+ }
23
+ return target;
24
+ };
25
+ return _extends.apply(this, arguments);
26
+ }
27
+ function _objectWithoutPropertiesLoose(source, excluded) {
28
+ if (source == null) return {};
29
+ var target = {};
30
+ var sourceKeys = Object.keys(source);
31
+ var key, i;
32
+ for (i = 0; i < sourceKeys.length; i++) {
33
+ key = sourceKeys[i];
34
+ if (excluded.indexOf(key) >= 0) continue;
35
+ target[key] = source[key];
36
+ }
37
+ return target;
38
+ }
39
+
40
+ // TSDX + stiches doesn't work with import statement and has a bug.
41
+ // Solution: (https://github.com/stitchesjs/stitches/issues/833#issuecomment-950707025)
42
+ var _require = /*#__PURE__*/require('@stitches/react'),
43
+ createStitches = _require.createStitches;
44
+ /* ----------------------- Values ----------------------- */
45
+ var theme = {
46
+ colors: {
47
+ primary: '#5FA425',
48
+ primary100: '#9FC87C',
49
+ primary200: '#8FBF66',
50
+ primary300: '#7FB651',
51
+ primary400: '#6FAD3B',
52
+ primary500: '#5FA425',
53
+ primary600: '#4C831E',
54
+ primary700: '#396216',
55
+ primary800: '#26420F',
56
+ primary900: '#132107',
57
+ neutrals200: '#FAFAFA',
58
+ neutrals300: '#EAEAEA',
59
+ neutrals400: '#999999',
60
+ neutrals500: '#888888',
61
+ neutrals600: '#666666',
62
+ neutrals700: '#444444',
63
+ neutrals800: '#333333',
64
+ neutrals900: '#111111',
65
+ background: '#fff',
66
+ foreground: '#000',
67
+ success: '#0070F3',
68
+ success100: '#D3E5FF',
69
+ success300: '#3291FF',
70
+ success500: '#0070F3',
71
+ success700: '#0761D1',
72
+ warning: '#F5A623',
73
+ warning100: '#FFEFCF',
74
+ warning300: '#F7B955',
75
+ warning500: '#F5A623',
76
+ warning700: '#AB570A',
77
+ error: '#FF0000',
78
+ error100: '#F7D4D6',
79
+ error300: '#FF3333',
80
+ error500: '#FF0000',
81
+ error700: '#E60000',
82
+ // Only use this color when you are going to use white for both dark and light theme.
83
+ white: '#fff'
84
+ },
85
+ space: {
86
+ 2: '2px',
87
+ 4: '4px',
88
+ 6: '6px',
89
+ 8: '8px',
90
+ 10: '10px',
91
+ 12: '12px',
92
+ 16: '16px',
93
+ 20: '20px',
94
+ 24: '24px',
95
+ 28: '28px',
96
+ 30: '30px',
97
+ 32: '32px'
98
+ },
99
+ fontSizes: {
100
+ 10: '10px',
101
+ 12: '12px',
102
+ 14: '14px',
103
+ 16: '16px',
104
+ 18: '18px',
105
+ 20: '20px',
106
+ 24: '24px',
107
+ 32: '32px',
108
+ 36: '36px',
109
+ 40: '40px',
110
+ 48: '48px'
111
+ },
112
+ fonts: {},
113
+ fontWeights: {
114
+ 400: '400',
115
+ 500: '500',
116
+ 600: '600',
117
+ 700: '700'
118
+ },
119
+ lineHeights: {},
120
+ letterSpacings: {},
121
+ sizes: {
122
+ 4: '4px',
123
+ 6: '6px',
124
+ 8: '8px',
125
+ 12: '12px',
126
+ 16: '16px',
127
+ 20: '20px',
128
+ 24: '24px',
129
+ 28: '28px',
130
+ 32: '32px',
131
+ 36: '36px',
132
+ 40: '40px',
133
+ 48: '48px'
134
+ },
135
+ borderWidths: {},
136
+ borderStyles: {},
137
+ radii: {
138
+ 5: '8px',
139
+ 10: '12px'
140
+ },
141
+ shadows: {
142
+ s: '0px 3px 5px 3px #f0f2f5, 0px 6px 10px 3px #f0f2f5, 0px 1px 18px 3px #f0f2f5'
143
+ },
144
+ zIndices: {},
145
+ transitions: {}
146
+ };
147
+ var media = {
148
+ sm: '(min-width: 640px)',
149
+ md: '(min-width: 768px)',
150
+ lg: '(min-width: 1024px)'
151
+ };
152
+ var utils = {
153
+ bc: function bc(value) {
154
+ return {
155
+ backgroundColor: value
156
+ };
157
+ }
158
+ };
159
+ /* ----------------------- End of Values ----------------------- */
160
+ var typedCreateStiches = createStitches;
161
+ // Note: it seems there is a bug on tsdx and when it compiles the code, it goes through an error
162
+ // We can directly check it with `tsc` to see if the error is correct or not.
163
+ // We `ignore` it for now, to get safety check on VSCode.
164
+ // @ts-ignore
165
+ var _typedCreateStiches = /*#__PURE__*/typedCreateStiches({
166
+ media: media,
167
+ theme: theme,
168
+ utils: utils
169
+ }),
170
+ styled = _typedCreateStiches.styled,
171
+ css = _typedCreateStiches.css,
172
+ createTheme = _typedCreateStiches.createTheme,
173
+ keyframes = _typedCreateStiches.keyframes,
174
+ globalCss = _typedCreateStiches.globalCss;
175
+ var lightTheme = /*#__PURE__*/createTheme({});
176
+ var darkTheme = /*#__PURE__*/createTheme({
177
+ colors: {
178
+ neutrals200: '#111111',
179
+ neutrals300: '#333333',
180
+ neutrals400: '#444444',
181
+ neutrals500: '#666666',
182
+ neutrals600: '#888888',
183
+ neutrals700: '#999999',
184
+ neutrals800: '#EAEAEA',
185
+ neutrals900: '#FAFAFA',
186
+ foreground: '#fff',
187
+ background: '#000'
188
+ },
189
+ shadows: {
190
+ s: '0px 3px 5px 3px #222, 0px 6px 10px 3px #222, 0px 1px 18px 3px #222'
191
+ }
192
+ });
193
+
194
+ var _black, _white, _black2, _white2;
195
+ var SvgWithStrokeColor = /*#__PURE__*/styled('svg', {
196
+ stroke: '$foreground',
197
+ variants: {
198
+ color: {
199
+ primary: {
200
+ stroke: '$primary'
201
+ },
202
+ error: {
203
+ stroke: '$error'
204
+ },
205
+ warning: {
206
+ stroke: '$warning'
207
+ },
208
+ success: {
209
+ stroke: '$success'
210
+ },
211
+ black: (_black = {
212
+ $$color: '$colors$foreground'
213
+ }, _black["." + darkTheme + " &"] = {
214
+ $$color: '$colors$background'
215
+ }, _black.stroke = '$$color', _black),
216
+ white: (_white = {
217
+ $$color: '$colors$background'
218
+ }, _white["." + darkTheme + " &"] = {
219
+ $$color: '$colors$foreground'
220
+ }, _white.stroke = '$$color', _white)
221
+ }
222
+ }
223
+ });
224
+ var SvgWithFillColor = /*#__PURE__*/styled('svg', {
225
+ fill: '$foreground',
226
+ variants: {
227
+ color: {
228
+ primary: {
229
+ fill: '$primary'
230
+ },
231
+ error: {
232
+ fill: '$error'
233
+ },
234
+ warning: {
235
+ fill: '$warning'
236
+ },
237
+ success: {
238
+ fill: '$success'
239
+ },
240
+ black: (_black2 = {
241
+ $$color: '$colors$foreground'
242
+ }, _black2["." + darkTheme + " &"] = {
243
+ $$color: '$colors$background'
244
+ }, _black2.fill = '$$color', _black2),
245
+ white: (_white2 = {
246
+ $$color: '$colors$background'
247
+ }, _white2["." + darkTheme + " &"] = {
248
+ $$color: '$colors$foreground'
249
+ }, _white2.fill = '$$color', _white2)
250
+ }
251
+ }
252
+ });
253
+
254
+ var _excluded = ["size", "color"];
255
+ var DeleteCircleIcon = function DeleteCircleIcon(_ref) {
256
+ var _ref$size = _ref.size,
257
+ size = _ref$size === void 0 ? 16 : _ref$size,
258
+ color = _ref.color,
259
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
260
+ return createElement(SvgWithStrokeColor, Object.assign({
261
+ width: size,
262
+ height: size,
263
+ viewBox: "0 0 24 24",
264
+ color: color,
265
+ fill: "none",
266
+ xmlns: "http://www.w3.org/2000/svg",
267
+ className: "_icon"
268
+ }, props), createElement("path", {
269
+ d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM9.17 14.83l5.66-5.66M14.83 14.83 9.17 9.17",
270
+ strokeWidth: 1.5,
271
+ strokeLinecap: "round",
272
+ strokeLinejoin: "round"
273
+ }));
274
+ };
275
+ DeleteCircleIcon.toString = function () {
276
+ return '._icon';
277
+ };
278
+
279
+ var _excluded$1 = ["size", "color"];
280
+ var CheckSquareIcon = function CheckSquareIcon(_ref) {
281
+ var _ref$size = _ref.size,
282
+ size = _ref$size === void 0 ? 16 : _ref$size,
283
+ color = _ref.color,
284
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
285
+ return createElement(SvgWithStrokeColor, Object.assign({
286
+ width: size,
287
+ height: size,
288
+ viewBox: "0 0 24 24",
289
+ color: color,
290
+ fill: "none",
291
+ xmlns: "http://www.w3.org/2000/svg",
292
+ className: "_icon"
293
+ }, props), createElement("path", {
294
+ d: "M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z",
295
+ strokeWidth: 1.5,
296
+ strokeLinecap: "round",
297
+ strokeLinejoin: "round"
298
+ }), createElement("path", {
299
+ d: "m7.75 12 2.83 2.83 5.67-5.66",
300
+ strokeWidth: 1.5,
301
+ strokeLinecap: "round",
302
+ strokeLinejoin: "round"
303
+ }));
304
+ };
305
+ CheckSquareIcon.toString = function () {
306
+ return '._icon';
307
+ };
308
+
309
+ var _excluded$2 = ["size", "color"];
310
+ var AddIcon = function AddIcon(_ref) {
311
+ var _ref$size = _ref.size,
312
+ size = _ref$size === void 0 ? 16 : _ref$size,
313
+ color = _ref.color,
314
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
315
+ return createElement(SvgWithStrokeColor, Object.assign({
316
+ width: size,
317
+ height: size,
318
+ viewBox: "0 0 24 24",
319
+ color: color,
320
+ fill: "none",
321
+ xmlns: "http://www.w3.org/2000/svg",
322
+ className: "_icon"
323
+ }, props), createElement("path", {
324
+ d: "M6 12h12M12 18V6",
325
+ strokeWidth: 1.5,
326
+ strokeLinecap: "round",
327
+ strokeLinejoin: "round"
328
+ }));
329
+ };
330
+ AddIcon.toString = function () {
331
+ return '._icon';
332
+ };
333
+
334
+ var _excluded$3 = ["size", "color"];
335
+ var InfoCircleIcon = function InfoCircleIcon(_ref) {
336
+ var _ref$size = _ref.size,
337
+ size = _ref$size === void 0 ? 16 : _ref$size,
338
+ color = _ref.color,
339
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
340
+ return createElement(SvgWithFillColor, Object.assign({
341
+ width: size,
342
+ height: size,
343
+ viewBox: "0 0 24 24",
344
+ color: color,
345
+ fill: "none",
346
+ xmlns: "http://www.w3.org/2000/svg",
347
+ className: "_icon"
348
+ }, props), createElement("path", {
349
+ d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5",
350
+ strokeWidth: 2,
351
+ strokeLinecap: "round",
352
+ strokeLinejoin: "round",
353
+ stroke: "#fff"
354
+ }), createElement("path", {
355
+ d: "M11.994 16h.01",
356
+ strokeWidth: 2,
357
+ strokeLinecap: "round",
358
+ strokeLinejoin: "round",
359
+ stroke: "#fff"
360
+ }));
361
+ };
362
+ InfoCircleIcon.toString = function () {
363
+ return '._icon';
364
+ };
365
+
366
+ var _excluded$4 = ["size", "color"];
367
+ var AddCircleIcon = function AddCircleIcon(_ref) {
368
+ var _ref$size = _ref.size,
369
+ size = _ref$size === void 0 ? 16 : _ref$size,
370
+ color = _ref.color,
371
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
372
+ return createElement(SvgWithStrokeColor, Object.assign({
373
+ width: size,
374
+ height: size,
375
+ viewBox: "0 0 24 24",
376
+ color: color,
377
+ fill: "none",
378
+ xmlns: "http://www.w3.org/2000/svg",
379
+ className: "_icon"
380
+ }, props), createElement("path", {
381
+ d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM8 12h8M12 16V8",
382
+ strokeWidth: 1.5,
383
+ strokeLinecap: "round",
384
+ strokeLinejoin: "round"
385
+ }));
386
+ };
387
+ AddCircleIcon.toString = function () {
388
+ return '._icon';
389
+ };
390
+
391
+ var _excluded$5 = ["size", "color"];
392
+ var MinusCircleIcon = function MinusCircleIcon(_ref) {
393
+ var _ref$size = _ref.size,
394
+ size = _ref$size === void 0 ? 16 : _ref$size,
395
+ color = _ref.color,
396
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
397
+ return createElement(SvgWithStrokeColor, Object.assign({
398
+ width: size,
399
+ height: size,
400
+ viewBox: "0 0 24 24",
401
+ color: color,
402
+ fill: "none",
403
+ xmlns: "http://www.w3.org/2000/svg",
404
+ className: "_icon"
405
+ }, props), createElement("path", {
406
+ d: "M11.92 22c5.5 0 10-4.5 10-10s-4.5-10-10-10-10 4.5-10 10 4.5 10 10 10ZM7.92 12h8",
407
+ strokeWidth: 1.5,
408
+ strokeLinecap: "round",
409
+ strokeLinejoin: "round"
410
+ }));
411
+ };
412
+ MinusCircleIcon.toString = function () {
413
+ return '._icon';
414
+ };
415
+
416
+ var _excluded$6 = ["size", "color"];
417
+ var CheckCircleIcon = function CheckCircleIcon(_ref) {
418
+ var _ref$size = _ref.size,
419
+ size = _ref$size === void 0 ? 16 : _ref$size,
420
+ color = _ref.color,
421
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
422
+ return createElement(SvgWithFillColor, Object.assign({
423
+ width: size,
424
+ height: size,
425
+ viewBox: "0 0 24 24",
426
+ color: color,
427
+ fill: "none",
428
+ xmlns: "http://www.w3.org/2000/svg",
429
+ className: "_icon"
430
+ }, props), createElement("path", {
431
+ d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z",
432
+ strokeWidth: 1.5,
433
+ strokeLinecap: "round",
434
+ strokeLinejoin: "round",
435
+ stroke: "#fff"
436
+ }), createElement("path", {
437
+ d: "m7.75 12 2.83 2.83 5.67-5.66",
438
+ strokeWidth: 1.5,
439
+ strokeLinecap: "round",
440
+ strokeLinejoin: "round",
441
+ stroke: "#fff"
442
+ }));
443
+ };
444
+ CheckCircleIcon.toString = function () {
445
+ return '._icon';
446
+ };
447
+
448
+ var _excluded$7 = ["size", "color"];
449
+ var CheckIcon = function CheckIcon(_ref) {
450
+ var _ref$size = _ref.size,
451
+ size = _ref$size === void 0 ? 16 : _ref$size,
452
+ color = _ref.color,
453
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
454
+ return createElement(SvgWithFillColor, Object.assign({
455
+ width: size,
456
+ height: size,
457
+ viewBox: "0 0 15 15",
458
+ fill: "none",
459
+ xmlns: "http://www.w3.org/2000/svg",
460
+ color: color,
461
+ className: "_icon"
462
+ }, props), createElement("path", {
463
+ d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
464
+ fillRule: "evenodd",
465
+ clipRule: "evenodd"
466
+ }));
467
+ };
468
+ CheckIcon.toString = function () {
469
+ return '._icon';
470
+ };
471
+
472
+ var _excluded$8 = ["size", "color"];
473
+ var BanIcon = function BanIcon(_ref) {
474
+ var _ref$size = _ref.size,
475
+ size = _ref$size === void 0 ? 16 : _ref$size,
476
+ color = _ref.color,
477
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
478
+ return createElement(SvgWithStrokeColor, Object.assign({
479
+ width: size,
480
+ height: size,
481
+ viewBox: "0 0 24 24",
482
+ color: color,
483
+ fill: "none",
484
+ xmlns: "http://www.w3.org/2000/svg",
485
+ className: "_icon"
486
+ }, props), createElement("path", {
487
+ d: "M12 22c5.52 0 10-4.48 10-10S17.52 2 12 2 2 6.48 2 12s4.48 10 10 10ZM18.9 5l-14 14",
488
+ strokeWidth: 1.5,
489
+ strokeMiterlimit: 10,
490
+ strokeLinecap: "round",
491
+ strokeLinejoin: "round"
492
+ }));
493
+ };
494
+ BanIcon.toString = function () {
495
+ return '._icon';
496
+ };
497
+
498
+ var _excluded$9 = ["size", "color"];
499
+ var WarningIcon = function WarningIcon(_ref) {
500
+ var _ref$size = _ref.size,
501
+ size = _ref$size === void 0 ? 16 : _ref$size,
502
+ color = _ref.color,
503
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
504
+ return createElement(SvgWithStrokeColor, Object.assign({
505
+ width: size,
506
+ height: size,
507
+ viewBox: "0 0 24 24",
508
+ color: color,
509
+ fill: "none",
510
+ xmlns: "http://www.w3.org/2000/svg",
511
+ className: "_icon"
512
+ }, props), createElement("path", {
513
+ d: "M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z",
514
+ strokeWidth: 1.5,
515
+ strokeLinecap: "round",
516
+ strokeLinejoin: "round"
517
+ }), createElement("path", {
518
+ d: "M11.994 17h.01",
519
+ strokeWidth: 2,
520
+ strokeLinecap: "round",
521
+ strokeLinejoin: "round"
522
+ }));
523
+ };
524
+ WarningIcon.toString = function () {
525
+ return '._icon';
526
+ };
527
+
528
+ var _excluded$a = ["size", "color"];
529
+ var HistoryIcon = function HistoryIcon(_ref) {
530
+ var _ref$size = _ref.size,
531
+ size = _ref$size === void 0 ? 16 : _ref$size,
532
+ color = _ref.color,
533
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
534
+ return createElement(SvgWithStrokeColor, Object.assign({
535
+ width: size,
536
+ height: size,
537
+ viewBox: "0 0 24 24",
538
+ color: color,
539
+ fill: "none",
540
+ stroke: "currentColor",
541
+ "stroke-width": "2",
542
+ "stroke-linecap": "round",
543
+ "stroke-linejoin": "round",
544
+ xmlns: "http://www.w3.org/2000/svg",
545
+ className: "_icon"
546
+ }, props), createElement("path", {
547
+ d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"
548
+ }), createElement("polyline", {
549
+ points: "14 2 14 8 20 8"
550
+ }), createElement("line", {
551
+ x1: "16",
552
+ y1: "13",
553
+ x2: "8",
554
+ y2: "13"
555
+ }), createElement("line", {
556
+ x1: "16",
557
+ y1: "17",
558
+ x2: "8",
559
+ y2: "17"
560
+ }), createElement("polyline", {
561
+ points: "10 9 9 9 8 9"
562
+ }));
563
+ };
564
+ HistoryIcon.toString = function () {
565
+ return '._icon';
566
+ };
567
+
568
+ var _excluded$b = ["size", "color"];
569
+ var GasIcon = function GasIcon(_ref) {
570
+ var _ref$size = _ref.size,
571
+ size = _ref$size === void 0 ? 16 : _ref$size,
572
+ color = _ref.color,
573
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
574
+ return createElement(SvgWithStrokeColor, Object.assign({
575
+ width: size,
576
+ height: size,
577
+ viewBox: "0 0 24 24",
578
+ color: color,
579
+ fill: "none",
580
+ xmlns: "http://www.w3.org/2000/svg",
581
+ className: "_icon"
582
+ }, props), createElement("path", {
583
+ d: "M4 22V5c0-2 1.34-3 3-3h8c1.66 0 3 1 3 3v17H4ZM2.5 22h17",
584
+ strokeWidth: 1.5,
585
+ strokeLinecap: "round",
586
+ strokeLinejoin: "round"
587
+ }), createElement("path", {
588
+ d: "M8.89 10h4.23c1.04 0 1.89-.5 1.89-1.89V6.88c0-1.39-.85-1.89-1.89-1.89H8.89C7.85 4.99 7 5.49 7 6.88v1.23C7 9.5 7.85 10 8.89 10ZM7 13h3M18 16.01l4.5-.01v-6l-2-1",
589
+ strokeWidth: 1.5,
590
+ strokeLinecap: "round",
591
+ strokeLinejoin: "round"
592
+ }));
593
+ };
594
+ GasIcon.toString = function () {
595
+ return '._icon';
596
+ };
597
+
598
+ var _excluded$c = ["size", "color"];
599
+ var SettingsIcon = function SettingsIcon(_ref) {
600
+ var _ref$size = _ref.size,
601
+ size = _ref$size === void 0 ? 16 : _ref$size,
602
+ color = _ref.color,
603
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
604
+ return createElement(SvgWithStrokeColor, Object.assign({
605
+ width: size,
606
+ height: size,
607
+ viewBox: "0 0 24 24",
608
+ color: color,
609
+ stroke: "currentColor",
610
+ "stroke-width": "2",
611
+ "stroke-linecap": "round",
612
+ "stroke-linejoin": "round",
613
+ fill: "none",
614
+ xmlns: "http://www.w3.org/2000/svg",
615
+ className: "_icon"
616
+ }, props), createElement("circle", {
617
+ cx: "12",
618
+ cy: "12",
619
+ r: "3"
620
+ }), createElement("path", {
621
+ d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
622
+ }));
623
+ };
624
+ SettingsIcon.toString = function () {
625
+ return '._icon';
626
+ };
627
+
628
+ var _excluded$d = ["size", "color"];
629
+ var TrashIcon = function TrashIcon(_ref) {
630
+ var _ref$size = _ref.size,
631
+ size = _ref$size === void 0 ? 16 : _ref$size,
632
+ color = _ref.color,
633
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
634
+ return createElement(SvgWithStrokeColor, Object.assign({
635
+ width: size,
636
+ height: size,
637
+ viewBox: "0 0 24 24",
638
+ color: color,
639
+ fill: "none",
640
+ xmlns: "http://www.w3.org/2000/svg",
641
+ className: "_icon"
642
+ }, props), createElement("path", {
643
+ d: "M21.5 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3l-2.04.2M9 4.97l.22-1.31C9.38 2.71 9.5 2 11.19 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M19.35 9.14l-.65 10.07c-.11 1.57-.2 2.79-2.99 2.79H9.29c-2.79 0-2.88-1.22-2.99-2.79L5.65 9.14M10.83 16.5h3.33M10 12.5h5",
644
+ strokeWidth: 1.5,
645
+ strokeLinecap: "round",
646
+ strokeLinejoin: "round"
647
+ }));
648
+ };
649
+ TrashIcon.toString = function () {
650
+ return '._icon';
651
+ };
652
+
653
+ var _excluded$e = ["size", "color"];
654
+ var SearchMinusIcon = function SearchMinusIcon(_ref) {
655
+ var _ref$size = _ref.size,
656
+ size = _ref$size === void 0 ? 16 : _ref$size,
657
+ color = _ref.color,
658
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
659
+ return createElement(SvgWithStrokeColor, Object.assign({
660
+ width: size,
661
+ height: size,
662
+ viewBox: "0 0 24 24",
663
+ color: color,
664
+ fill: "none",
665
+ xmlns: "http://www.w3.org/2000/svg",
666
+ className: "_icon"
667
+ }, props), createElement("path", {
668
+ d: "M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2",
669
+ strokeWidth: 1.5,
670
+ strokeLinecap: "round",
671
+ strokeLinejoin: "round"
672
+ }));
673
+ };
674
+ SearchMinusIcon.toString = function () {
675
+ return '._icon';
676
+ };
677
+
678
+ var _excluded$f = ["size", "color"];
679
+ var SearchIcon = function SearchIcon(_ref) {
680
+ var _ref$size = _ref.size,
681
+ size = _ref$size === void 0 ? 16 : _ref$size,
682
+ color = _ref.color,
683
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
684
+ return createElement(SvgWithStrokeColor, Object.assign({
685
+ width: size,
686
+ height: size,
687
+ viewBox: "0 0 24 24",
688
+ color: color,
689
+ fill: "none",
690
+ xmlns: "http://www.w3.org/2000/svg",
691
+ className: "_icon"
692
+ }, props), createElement("path", {
693
+ d: "M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2",
694
+ strokeWidth: 1.5,
695
+ strokeLinecap: "round",
696
+ strokeLinejoin: "round"
697
+ }));
698
+ };
699
+ SearchIcon.toString = function () {
700
+ return '._icon';
701
+ };
702
+
703
+ var _excluded$g = ["size", "color"];
704
+ var AngleRightIcon = function AngleRightIcon(_ref) {
705
+ var _ref$size = _ref.size,
706
+ size = _ref$size === void 0 ? 16 : _ref$size,
707
+ color = _ref.color,
708
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
709
+ return createElement(SvgWithStrokeColor, Object.assign({
710
+ width: size,
711
+ height: size,
712
+ fill: "none",
713
+ xmlns: "http://www.w3.org/2000/svg",
714
+ viewBox: "0 0 24 24",
715
+ color: color,
716
+ className: "_icon"
717
+ }, props), createElement("path", {
718
+ d: "m8.91 19.92 6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08",
719
+ strokeWidth: 1.5,
720
+ strokeMiterlimit: 10,
721
+ strokeLinecap: "round",
722
+ strokeLinejoin: "round"
723
+ }));
724
+ };
725
+ AngleRightIcon.toString = function () {
726
+ return '._icon';
727
+ };
728
+
729
+ var _excluded$h = ["size", "color"];
730
+ var AngleUpIcon = function AngleUpIcon(_ref) {
731
+ var _ref$size = _ref.size,
732
+ size = _ref$size === void 0 ? 16 : _ref$size,
733
+ color = _ref.color,
734
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
735
+ return createElement(SvgWithStrokeColor, Object.assign({
736
+ width: size,
737
+ height: size,
738
+ fill: "none",
739
+ xmlns: "http://www.w3.org/2000/svg",
740
+ viewBox: "0 0 24 24",
741
+ color: color,
742
+ className: "_icon"
743
+ }, props), createElement("path", {
744
+ d: "M19.92 15.05 13.4 8.53c-.77-.77-2.03-.77-2.8 0l-6.52 6.52",
745
+ strokeWidth: 1.5,
746
+ strokeMiterlimit: 10,
747
+ strokeLinecap: "round",
748
+ strokeLinejoin: "round"
749
+ }));
750
+ };
751
+ AngleUpIcon.toString = function () {
752
+ return '._icon';
753
+ };
754
+
755
+ var _excluded$i = ["size", "color"];
756
+ var AngleDownIcon = function AngleDownIcon(_ref) {
757
+ var _ref$size = _ref.size,
758
+ size = _ref$size === void 0 ? 16 : _ref$size,
759
+ color = _ref.color,
760
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
761
+ return React__default.createElement(SvgWithStrokeColor, Object.assign({
762
+ width: size,
763
+ height: size,
764
+ viewBox: "0 0 24 24",
765
+ color: color,
766
+ fill: "none",
767
+ xmlns: "http://www.w3.org/2000/svg",
768
+ className: "_icon"
769
+ }, props), React__default.createElement("path", {
770
+ d: "m19.92 8.95-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95",
771
+ strokeWidth: 1.5,
772
+ strokeMiterlimit: 10,
773
+ strokeLinecap: "round",
774
+ strokeLinejoin: "round"
775
+ }));
776
+ };
777
+ AngleDownIcon.toString = function () {
778
+ return '._icon';
779
+ };
780
+
781
+ var _excluded$j = ["size", "color"];
782
+ var AngleLeftIcon = function AngleLeftIcon(_ref) {
783
+ var _ref$size = _ref.size,
784
+ size = _ref$size === void 0 ? 16 : _ref$size,
785
+ color = _ref.color,
786
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
787
+ return createElement(SvgWithStrokeColor, Object.assign({
788
+ width: size,
789
+ height: size,
790
+ fill: "none",
791
+ viewBox: "0 0 24 24",
792
+ color: color,
793
+ xmlns: "http://www.w3.org/2000/svg",
794
+ className: "_icon"
795
+ }, props), createElement("path", {
796
+ d: "M15 19.92 8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08",
797
+ strokeWidth: 1.5,
798
+ strokeMiterlimit: 10,
799
+ strokeLinecap: "round",
800
+ strokeLinejoin: "round"
801
+ }));
802
+ };
803
+ AngleDownIcon.toString = function () {
804
+ return '._icon';
805
+ };
806
+
807
+ var _excluded$k = ["size", "color"];
808
+ var DownloadIcon = function DownloadIcon(_ref) {
809
+ var _ref$size = _ref.size,
810
+ size = _ref$size === void 0 ? 16 : _ref$size,
811
+ color = _ref.color,
812
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
813
+ return createElement(SvgWithStrokeColor, Object.assign({
814
+ width: size,
815
+ height: size,
816
+ viewBox: "0 0 24 24",
817
+ color: color,
818
+ fill: "none",
819
+ xmlns: "http://www.w3.org/2000/svg",
820
+ className: "_icon"
821
+ }, props), createElement("path", {
822
+ d: "M16.44 8.9c3.6.31 5.07 2.16 5.07 6.21v.13c0 4.47-1.79 6.26-6.26 6.26H8.74c-4.47 0-6.26-1.79-6.26-6.26v-.13c0-4.02 1.45-5.87 4.99-6.2M12 2v12.88",
823
+ strokeWidth: 1.5,
824
+ strokeLinecap: "round",
825
+ strokeLinejoin: "round"
826
+ }), createElement("path", {
827
+ d: "M15.35 12.65 12 16l-3.35-3.35",
828
+ strokeWidth: 1.5,
829
+ strokeLinecap: "round",
830
+ strokeLinejoin: "round"
831
+ }));
832
+ };
833
+ DownloadIcon.toString = function () {
834
+ return '._icon';
835
+ };
836
+
837
+ var _excluded$l = ["color", "size"];
838
+ var ChevronRightIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
839
+ var _ref$color = _ref.color,
840
+ color = _ref$color === void 0 ? 'black' : _ref$color,
841
+ _ref$size = _ref.size,
842
+ size = _ref$size === void 0 ? 16 : _ref$size,
843
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
844
+ return createElement(SvgWithStrokeColor, Object.assign({
845
+ xmlns: "http://www.w3.org/2000/svg",
846
+ width: size,
847
+ height: size,
848
+ color: color,
849
+ viewBox: "0 0 24 24",
850
+ fill: "none",
851
+ stroke: "currentColor",
852
+ "stroke-width": "2",
853
+ "stroke-linecap": "round",
854
+ "stroke-linejoin": "round",
855
+ className: "_icon"
856
+ }, props, {
857
+ ref: forwardedRef
858
+ }), createElement("polyline", {
859
+ points: "9 18 15 12 9 6"
860
+ }));
861
+ });
862
+ ChevronRightIcon.toString = function () {
863
+ return '._icon';
864
+ };
865
+
866
+ var _excluded$m = ["size", "color"];
867
+ var ArrowRightIcon = function ArrowRightIcon(_ref) {
868
+ var _ref$size = _ref.size,
869
+ size = _ref$size === void 0 ? 16 : _ref$size,
870
+ color = _ref.color,
871
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
872
+ return createElement(SvgWithStrokeColor, Object.assign({
873
+ width: size,
874
+ height: size,
875
+ viewBox: "0 0 24 24",
876
+ color: color,
877
+ fill: "none",
878
+ stroke: "currentColor",
879
+ "stroke-width": "2",
880
+ "stroke-linecap": "round",
881
+ "stroke-linejoin": "round",
882
+ xmlns: "http://www.w3.org/2000/svg",
883
+ className: "_icon"
884
+ }, props), createElement("line", {
885
+ x1: "5",
886
+ y1: "12",
887
+ x2: "19",
888
+ y2: "12"
889
+ }), createElement("polyline", {
890
+ points: "12 5 19 12 12 19"
891
+ }));
892
+ };
893
+ ArrowRightIcon.toString = function () {
894
+ return '._icon';
895
+ };
896
+
897
+ var _excluded$n = ["size", "color"];
898
+ var RetryRightIcon = function RetryRightIcon(_ref) {
899
+ var _ref$size = _ref.size,
900
+ size = _ref$size === void 0 ? 16 : _ref$size,
901
+ color = _ref.color,
902
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
903
+ return createElement(SvgWithStrokeColor, Object.assign({
904
+ width: size,
905
+ height: size,
906
+ viewBox: "0 0 24 24",
907
+ color: color,
908
+ fill: "none",
909
+ xmlns: "http://www.w3.org/2000/svg",
910
+ className: "_icon"
911
+ }, props), createElement("path", {
912
+ d: "M14.89 5.08c-.87-.26-1.83-.43-2.89-.43-4.79 0-8.67 3.88-8.67 8.67C3.33 18.12 7.21 22 12 22s8.67-3.88 8.67-8.67c0-1.78-.54-3.44-1.46-4.82M16.13 5.32 13.24 2M16.13 5.32l-3.37 2.46",
913
+ strokeWidth: 1.5,
914
+ strokeLinecap: "round",
915
+ strokeLinejoin: "round"
916
+ }));
917
+ };
918
+ RetryRightIcon.toString = function () {
919
+ return '._icon';
920
+ };
921
+
922
+ var _excluded$o = ["size", "color"];
923
+ var RetryLeftIcon = function RetryLeftIcon(_ref) {
924
+ var _ref$size = _ref.size,
925
+ size = _ref$size === void 0 ? 16 : _ref$size,
926
+ color = _ref.color,
927
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
928
+ return createElement(SvgWithStrokeColor, Object.assign({
929
+ width: size,
930
+ height: size,
931
+ viewBox: "0 0 24 24",
932
+ color: color,
933
+ fill: "none",
934
+ xmlns: "http://www.w3.org/2000/svg",
935
+ className: "_icon"
936
+ }, props), createElement("path", {
937
+ d: "M9.11 5.08c.87-.26 1.83-.43 2.89-.43 4.79 0 8.67 3.88 8.67 8.67s-3.88 8.67-8.67 8.67-8.67-3.88-8.67-8.67c0-1.78.54-3.44 1.46-4.82M7.87 5.32 10.76 2M7.87 5.32l3.37 2.46",
938
+ strokeWidth: 1.5,
939
+ strokeLinecap: "round",
940
+ strokeLinejoin: "round"
941
+ }));
942
+ };
943
+ RetryLeftIcon.toString = function () {
944
+ return '._icon';
945
+ };
946
+
947
+ var _excluded$p = ["size", "color"];
948
+ var TryAgainIcon = function TryAgainIcon(_ref) {
949
+ var _ref$size = _ref.size,
950
+ size = _ref$size === void 0 ? 16 : _ref$size,
951
+ color = _ref.color,
952
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
953
+ return createElement(SvgWithStrokeColor, Object.assign({
954
+ width: size,
955
+ height: size,
956
+ viewBox: "0 0 24 24",
957
+ color: color,
958
+ fill: "none",
959
+ xmlns: "http://www.w3.org/2000/svg",
960
+ className: "_icon"
961
+ }, props), createElement("path", {
962
+ d: "M22 12c0 5.52-4.48 10-10 10s-8.89-5.56-8.89-5.56m0 0h4.52m-4.52 0v5M2 12C2 6.48 6.44 2 12 2c6.67 0 10 5.56 10 5.56m0 0v-5m0 5h-4.44",
963
+ strokeWidth: 1.5,
964
+ strokeLinecap: "round",
965
+ strokeLinejoin: "round"
966
+ }));
967
+ };
968
+ TryAgainIcon.toString = function () {
969
+ return '._icon';
970
+ };
971
+
972
+ var _excluded$q = ["size", "color"];
973
+ var VerticalSwapIcon = function VerticalSwapIcon(_ref) {
974
+ var _ref$size = _ref.size,
975
+ size = _ref$size === void 0 ? 16 : _ref$size,
976
+ color = _ref.color,
977
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
978
+ return createElement(SvgWithStrokeColor, Object.assign({
979
+ width: size,
980
+ height: size,
981
+ viewBox: "0 0 24 24",
982
+ color: color,
983
+ fill: "none",
984
+ xmlns: "http://www.w3.org/2000/svg",
985
+ className: "_icon"
986
+ }, props), createElement("path", {
987
+ d: "m13.82 6.85 3.04 3.04M13.82 17.15V6.85M10.18 17.15l-3.04-3.04M10.18 6.85v10.3",
988
+ strokeWidth: 1.5,
989
+ strokeMiterlimit: 10,
990
+ strokeLinecap: "round",
991
+ strokeLinejoin: "round"
992
+ }), createElement("path", {
993
+ d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z",
994
+ strokeWidth: 1.5,
995
+ strokeLinecap: "round",
996
+ strokeLinejoin: "round"
997
+ }));
998
+ };
999
+ VerticalSwapIcon.toString = function () {
1000
+ return '._icon';
1001
+ };
1002
+
1003
+ var _excluded$r = ["size", "color"];
1004
+ var HorizontalSwapIcon = function HorizontalSwapIcon(_ref) {
1005
+ var _ref$size = _ref.size,
1006
+ size = _ref$size === void 0 ? 16 : _ref$size,
1007
+ color = _ref.color,
1008
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
1009
+ return createElement(SvgWithStrokeColor, Object.assign({
1010
+ width: size,
1011
+ height: size,
1012
+ viewBox: "0 0 24 24",
1013
+ color: color,
1014
+ fill: "none",
1015
+ xmlns: "http://www.w3.org/2000/svg",
1016
+ className: "_icon"
1017
+ }, props), createElement("path", {
1018
+ d: "m17.15 13.82-3.04 3.04M6.85 13.82h10.3M6.85 10.18l3.04-3.04M17.15 10.18H6.85",
1019
+ strokeWidth: 1.5,
1020
+ strokeMiterlimit: 10,
1021
+ strokeLinecap: "round",
1022
+ strokeLinejoin: "round"
1023
+ }), createElement("path", {
1024
+ d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z",
1025
+ strokeWidth: 1.5,
1026
+ strokeLinecap: "round",
1027
+ strokeLinejoin: "round"
1028
+ }));
1029
+ };
1030
+ HorizontalSwapIcon.toString = function () {
1031
+ return '._icon';
1032
+ };
1033
+
1034
+ var _excluded$s = ["color", "size"];
1035
+ var RetryIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
1036
+ var _ref$color = _ref.color,
1037
+ color = _ref$color === void 0 ? 'black' : _ref$color,
1038
+ _ref$size = _ref.size,
1039
+ size = _ref$size === void 0 ? 16 : _ref$size,
1040
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
1041
+ return createElement(SvgWithStrokeColor, Object.assign({
1042
+ xmlns: "http://www.w3.org/2000/svg",
1043
+ width: size,
1044
+ height: size,
1045
+ color: color,
1046
+ viewBox: "0 0 24 24",
1047
+ fill: "none",
1048
+ stroke: "currentColor",
1049
+ "stroke-width": "2",
1050
+ "stroke-linecap": "round",
1051
+ "stroke-linejoin": "round",
1052
+ className: "_icon"
1053
+ }, props, {
1054
+ ref: forwardedRef
1055
+ }), createElement("polyline", {
1056
+ points: "23 4 23 10 17 10"
1057
+ }), createElement("path", {
1058
+ d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10"
1059
+ }));
1060
+ });
1061
+ RetryIcon.toString = function () {
1062
+ return '._icon';
1063
+ };
1064
+
1065
+ var _excluded$t = ["size", "color"];
1066
+ var WalletIcon = function WalletIcon(_ref) {
1067
+ var _ref$size = _ref.size,
1068
+ size = _ref$size === void 0 ? 16 : _ref$size,
1069
+ color = _ref.color,
1070
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
1071
+ return createElement(SvgWithFillColor, Object.assign({
1072
+ width: size,
1073
+ height: size,
1074
+ viewBox: "0 0 24 24",
1075
+ color: color,
1076
+ fill: "none",
1077
+ xmlns: "http://www.w3.org/2000/svg",
1078
+ className: "_icon"
1079
+ }, props), createElement("path", {
1080
+ fillRule: "evenodd",
1081
+ clipRule: "evenodd",
1082
+ d: "M4.51 7.205a3.018 3.018 0 0 0-3.01 3.01v6.73a3.018 3.018 0 0 0 3.01 3.01h11.48a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.778-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227 2.743 2.743 0 0 1 1.971-.82H19v-.69a3.018 3.018 0 0 0-3.01-3.01H4.51ZM0 10.215a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.36 0-.675.14-.903.373l-.013.014c-.266.26-.415.63-.377 1.022v.009c.053.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51H4.51A4.518 4.518 0 0 1 0 16.945v-6.73Z"
1083
+ }), createElement("path", {
1084
+ fillRule: "evenodd",
1085
+ clipRule: "evenodd",
1086
+ d: "M12.35 2.655a1.15 1.15 0 0 0-1.554-1.079l-7.94 3A2.098 2.098 0 0 0 1.5 6.547v4.569a.75.75 0 1 1-1.5 0v-4.57c0-1.5.922-2.84 2.325-3.371l7.94-3s-.001 0 0 0c1.732-.657 3.585.629 3.585 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM17.729 12.405c-.36 0-.675.14-.903.373l-.013.014c-.266.26-.415.63-.377 1.022v.009c.053.635.664 1.182 1.413 1.182h1.943a.276.276 0 0 0 .267-.27v-2.06a.276.276 0 0 0-.267-.27h-2.063Zm-1.97-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.723 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.778-1.03-2.907-2.553a2.759 2.759 0 0 1 .816-2.227Z"
1087
+ }), createElement("path", {
1088
+ fillRule: "evenodd",
1089
+ clipRule: "evenodd",
1090
+ d: "M4.5 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75Z"
1091
+ }));
1092
+ };
1093
+ WalletIcon.toString = function () {
1094
+ return '._icon';
1095
+ };
1096
+
1097
+ var _excluded$u = ["size", "color"];
1098
+ var AddWalletIcon = function AddWalletIcon(_ref) {
1099
+ var _ref$size = _ref.size,
1100
+ size = _ref$size === void 0 ? 16 : _ref$size,
1101
+ color = _ref.color,
1102
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
1103
+ return createElement(SvgWithFillColor, Object.assign({
1104
+ width: size,
1105
+ height: size,
1106
+ viewBox: "0 0 24 24",
1107
+ color: color,
1108
+ fill: "none",
1109
+ xmlns: "http://www.w3.org/2000/svg",
1110
+ className: "_icon"
1111
+ }, props), createElement("path", {
1112
+ fillRule: "evenodd",
1113
+ clipRule: "evenodd",
1114
+ d: "M6.569 7.205a3.018 3.018 0 0 0-3.01 3.01v3.076a4.749 4.749 0 0 1 6.5 4.414c0 .808-.206 1.579-.574 2.25h8.564a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.778-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227 2.743 2.743 0 0 1 1.97-.82h1.27v-.69a3.018 3.018 0 0 0-3.01-3.01H6.569Zm-4.51 3.01a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.36 0-.675.14-.903.373l-.014.014c-.266.26-.414.63-.377 1.022l.001.009c.053.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51H7.939a.75.75 0 0 1-.482-1.324c.243-.204.457-.457.624-.744l.01-.015a3.17 3.17 0 0 0 .468-1.667 3.249 3.249 0 0 0-5.283-2.533.75.75 0 0 1-1.217-.587v-4.37Z"
1115
+ }), createElement("path", {
1116
+ fillRule: "evenodd",
1117
+ clipRule: "evenodd",
1118
+ d: "M14.409 2.655a1.15 1.15 0 0 0-1.555-1.078l-7.94 3a2.098 2.098 0 0 0-1.355 1.968v4.57a.75.75 0 0 1-1.5 0v-4.57c0-1.5.921-2.84 2.324-3.371l7.94-3c1.733-.657 3.586.629 3.586 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM19.787 12.405c-.359 0-.674.14-.902.374l-.014.013c-.266.26-.414.63-.377 1.022v.01c.054.634.664 1.181 1.413 1.181h1.943a.276.276 0 0 0 .267-.27v-2.06a.276.276 0 0 0-.267-.27h-2.063Zm-1.97-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.723 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.777-1.03-2.907-2.553a2.759 2.759 0 0 1 .817-2.227Z"
1119
+ }), createElement("path", {
1120
+ fillRule: "evenodd",
1121
+ clipRule: "evenodd",
1122
+ d: "M6.559 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75ZM5.309 14.455c-.762 0-1.469.267-2.033.717h-.001a3.22 3.22 0 0 0-1.216 2.533c0 .61.17 1.184.468 1.667l.006.01a3.22 3.22 0 0 0 2.776 1.573 3.155 3.155 0 0 0 2.148-.824c.243-.204.457-.457.624-.744l.01-.015a3.17 3.17 0 0 0 .468-1.667 3.249 3.249 0 0 0-3.25-3.25Zm-2.967-.457a4.749 4.749 0 0 1 7.717 3.707c0 .888-.248 1.73-.687 2.446-.25.427-.57.808-.941 1.12a4.656 4.656 0 0 1-3.122 1.184 4.72 4.72 0 0 1-4.062-2.301 4.671 4.671 0 0 1-.688-2.449 4.72 4.72 0 0 1 1.783-3.707Z"
1123
+ }), createElement("path", {
1124
+ fillRule: "evenodd",
1125
+ clipRule: "evenodd",
1126
+ d: "M3.07 17.685a.75.75 0 0 1 .75-.75H6.8a.75.75 0 0 1 0 1.5H3.82a.75.75 0 0 1-.75-.75Z"
1127
+ }), createElement("path", {
1128
+ fillRule: "evenodd",
1129
+ clipRule: "evenodd",
1130
+ d: "M5.309 15.475a.75.75 0 0 1 .75.75v2.99a.75.75 0 0 1-1.5 0v-2.99a.75.75 0 0 1 .75-.75Z"
1131
+ }));
1132
+ };
1133
+ AddWalletIcon.toString = function () {
1134
+ return '._icon';
1135
+ };
1136
+
1137
+ var _excluded$v = ["size", "color"];
1138
+ var DeleteWalletIcon = function DeleteWalletIcon(_ref) {
1139
+ var _ref$size = _ref.size,
1140
+ size = _ref$size === void 0 ? 16 : _ref$size,
1141
+ color = _ref.color,
1142
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
1143
+ return createElement(SvgWithFillColor, Object.assign({
1144
+ width: size,
1145
+ height: size,
1146
+ viewBox: "0 0 24 24",
1147
+ color: color,
1148
+ fill: "none",
1149
+ xmlns: "http://www.w3.org/2000/svg",
1150
+ className: "_icon"
1151
+ }, props), createElement("path", {
1152
+ fillRule: "evenodd",
1153
+ clipRule: "evenodd",
1154
+ d: "M6.627 7.205a3.018 3.018 0 0 0-3.01 3.01v3.076a4.749 4.749 0 0 1 6.5 4.414c0 .808-.205 1.579-.573 2.25h8.563a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.777-1.03-2.907-2.553a2.759 2.759 0 0 1 .817-2.227 2.743 2.743 0 0 1 1.97-.82h1.27v-.69a3.018 3.018 0 0 0-3.01-3.01H6.627Zm-4.51 3.01a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.359 0-.675.14-.902.373l-.014.014c-.266.26-.415.63-.377 1.022v.009c.054.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51H7.997a.75.75 0 0 1-.482-1.325c.243-.203.457-.456.624-.743l.01-.016a3.17 3.17 0 0 0 .468-1.666 3.249 3.249 0 0 0-5.282-2.533.75.75 0 0 1-1.218-.587v-4.37Z"
1155
+ }), createElement("path", {
1156
+ fillRule: "evenodd",
1157
+ clipRule: "evenodd",
1158
+ d: "M14.467 2.655a1.15 1.15 0 0 0-1.554-1.079l-7.94 3a2.098 2.098 0 0 0-1.356 1.97v4.569a.75.75 0 1 1-1.5 0v-4.57c0-1.5.922-2.84 2.325-3.371l7.94-3c1.732-.657 3.585.629 3.585 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM19.846 12.405c-.359 0-.675.14-.903.373l-.013.014c-.266.26-.415.63-.377 1.022v.009c.053.635.664 1.182 1.413 1.182h1.943a.276.276 0 0 0 .267-.27v-2.06a.276.276 0 0 0-.267-.27h-2.063Zm-1.97-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.723 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.778-1.03-2.907-2.553a2.759 2.759 0 0 1 .816-2.227Z"
1159
+ }), createElement("path", {
1160
+ fillRule: "evenodd",
1161
+ clipRule: "evenodd",
1162
+ d: "M6.617 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75ZM5.367 14.455c-.761 0-1.468.267-2.032.717h-.002a3.22 3.22 0 0 0-1.216 2.533c0 .61.17 1.183.469 1.666l.006.01a3.22 3.22 0 0 0 2.775 1.574 3.155 3.155 0 0 0 2.148-.825c.243-.203.457-.456.624-.743l.01-.016a3.17 3.17 0 0 0 .468-1.666 3.249 3.249 0 0 0-3.25-3.25ZM2.4 13.998a4.749 4.749 0 0 1 7.717 3.707 4.67 4.67 0 0 1-.687 2.446c-.25.427-.57.808-.94 1.12a4.655 4.655 0 0 1-3.123 1.184 4.72 4.72 0 0 1-4.061-2.301 4.67 4.67 0 0 1-.689-2.449A4.72 4.72 0 0 1 2.4 13.998Z"
1163
+ }), createElement("path", {
1164
+ fillRule: "evenodd",
1165
+ clipRule: "evenodd",
1166
+ d: "M3.785 16.106a.75.75 0 0 1 1.06-.003l2.12 2.11a.75.75 0 1 1-1.058 1.064l-2.12-2.11a.75.75 0 0 1-.002-1.061Z"
1167
+ }), createElement("path", {
1168
+ fillRule: "evenodd",
1169
+ clipRule: "evenodd",
1170
+ d: "M6.948 16.136a.75.75 0 0 1-.002 1.06l-2.12 2.11a.75.75 0 0 1-1.058-1.063l2.12-2.11a.75.75 0 0 1 1.06.003Z"
1171
+ }));
1172
+ };
1173
+ DeleteWalletIcon.toString = function () {
1174
+ return '._icon';
1175
+ };
1176
+
1177
+ var _excluded$w = ["size", "color"];
1178
+ var CheckWalletIcon = function CheckWalletIcon(_ref) {
1179
+ var _ref$size = _ref.size,
1180
+ size = _ref$size === void 0 ? 16 : _ref$size,
1181
+ color = _ref.color,
1182
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
1183
+ return createElement(SvgWithFillColor, Object.assign({
1184
+ width: size,
1185
+ height: size,
1186
+ viewBox: "0 0 24 24",
1187
+ color: color,
1188
+ fill: "none",
1189
+ xmlns: "http://www.w3.org/2000/svg",
1190
+ className: "_icon"
1191
+ }, props), createElement("path", {
1192
+ fillRule: "evenodd",
1193
+ clipRule: "evenodd",
1194
+ d: "M6.686 7.205a3.018 3.018 0 0 0-3.01 3.01v3.076a4.749 4.749 0 0 1 6.5 4.414c0 .808-.205 1.579-.573 2.25h8.563a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.778-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227 2.743 2.743 0 0 1 1.97-.82h1.27v-.69a3.018 3.018 0 0 0-3.01-3.01H6.686Zm-4.51 3.01a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.36 0-.675.14-.903.373l-.013.014c-.266.26-.415.63-.378 1.022l.001.009c.053.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51H8.056a.75.75 0 0 1-.482-1.324c.243-.204.457-.457.624-.744l.01-.015a3.17 3.17 0 0 0 .468-1.667 3.249 3.249 0 0 0-5.283-2.533.75.75 0 0 1-1.217-.587v-4.37Z"
1195
+ }), createElement("path", {
1196
+ fillRule: "evenodd",
1197
+ clipRule: "evenodd",
1198
+ d: "M14.526 2.655a1.15 1.15 0 0 0-1.554-1.078l-7.94 3a2.098 2.098 0 0 0-1.356 1.968v4.57a.75.75 0 0 1-1.5 0v-4.57c0-1.5.921-2.84 2.324-3.371l7.94-3c1.733-.657 3.586.629 3.586 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM19.905 12.405c-.36 0-.675.14-.903.374l-.014.013c-.265.26-.414.63-.377 1.022l.001.01c.053.634.664 1.181 1.413 1.181h1.942a.276.276 0 0 0 .268-.27v-2.06a.276.276 0 0 0-.268-.27h-2.062Zm-1.971-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.724 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.778-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227Z"
1199
+ }), createElement("path", {
1200
+ fillRule: "evenodd",
1201
+ clipRule: "evenodd",
1202
+ d: "M6.676 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75ZM5.426 14.455c-.762 0-1.469.267-2.033.717h-.001a3.22 3.22 0 0 0-1.216 2.533c0 .61.17 1.184.468 1.667l.006.01a3.22 3.22 0 0 0 2.776 1.573 3.155 3.155 0 0 0 2.148-.824c.243-.204.457-.457.624-.744l.01-.015a3.17 3.17 0 0 0 .468-1.667 3.249 3.249 0 0 0-3.25-3.25Zm-2.967-.457a4.749 4.749 0 0 1 7.717 3.707c0 .888-.248 1.73-.687 2.446-.25.427-.57.808-.941 1.12a4.656 4.656 0 0 1-3.122 1.184 4.72 4.72 0 0 1-4.062-2.301 4.671 4.671 0 0 1-.688-2.449 4.72 4.72 0 0 1 1.783-3.707Z"
1203
+ }), createElement("path", {
1204
+ fillRule: "evenodd",
1205
+ clipRule: "evenodd",
1206
+ d: "M7.538 16.215a.75.75 0 0 1-.042 1.06l-2.13 1.97a.75.75 0 0 1-1.04-.02l-.99-.99a.75.75 0 1 1 1.062-1.06l.48.48 1.6-1.48a.75.75 0 0 1 1.06.04Z"
1207
+ }));
1208
+ };
1209
+ CheckWalletIcon.toString = function () {
1210
+ return '._icon';
1211
+ };
1212
+
1213
+ var _excluded$x = ["size", "color"];
1214
+ var SwapWalletIcon = function SwapWalletIcon(_ref) {
1215
+ var _ref$size = _ref.size,
1216
+ size = _ref$size === void 0 ? 16 : _ref$size,
1217
+ color = _ref.color,
1218
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
1219
+ return createElement(SvgWithFillColor, Object.assign({
1220
+ width: size,
1221
+ height: size,
1222
+ viewBox: "0 0 24 24",
1223
+ color: color,
1224
+ fill: "none",
1225
+ xmlns: "http://www.w3.org/2000/svg",
1226
+ className: "_icon"
1227
+ }, props), createElement("path", {
1228
+ fillRule: "evenodd",
1229
+ clipRule: "evenodd",
1230
+ d: "M5.244 7.205a3.018 3.018 0 0 0-3.01 3.01v1.73a.75.75 0 0 1-1.5 0v-1.73a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.359 0-.674.14-.902.373l-.014.014c-.266.26-.414.63-.377 1.022v.009c.054.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51h-5.48a.75.75 0 0 1 0-1.5h5.48a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.777-1.03-2.907-2.553a2.758 2.758 0 0 1 .817-2.227 2.743 2.743 0 0 1 1.97-.82h1.27v-.69a3.018 3.018 0 0 0-3.01-3.01H5.244Z"
1231
+ }), createElement("path", {
1232
+ fillRule: "evenodd",
1233
+ clipRule: "evenodd",
1234
+ d: "M13.084 2.655a1.15 1.15 0 0 0-1.554-1.078l-7.94 3a2.098 2.098 0 0 0-1.356 1.968v4.57a.75.75 0 0 1-1.5 0v-4.57c0-1.5.922-2.84 2.325-3.371l7.94-3c1.732-.657 3.585.629 3.585 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM18.463 12.405c-.359 0-.675.14-.902.374l-.014.013c-.266.26-.415.63-.377 1.022v.01c.053.634.664 1.181 1.413 1.181h1.943a.276.276 0 0 0 .267-.27v-2.06a.276.276 0 0 0-.267-.27h-2.063Zm-1.97-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.723 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.777-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227Z"
1235
+ }), createElement("path", {
1236
+ fillRule: "evenodd",
1237
+ clipRule: "evenodd",
1238
+ d: "M5.234 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75ZM1.234 15.205a.75.75 0 0 1 .75-.75h5.34a1.91 1.91 0 0 1 1.91 1.91v1.28a.75.75 0 0 1-1.5 0v-1.28a.41.41 0 0 0-.41-.41h-5.34a.75.75 0 0 1-.75-.75Z"
1239
+ }), createElement("path", {
1240
+ fillRule: "evenodd",
1241
+ clipRule: "evenodd",
1242
+ d: "M3.735 13.455a.75.75 0 0 1 0 1.06l-.69.69.69.69a.75.75 0 1 1-1.061 1.06l-1.22-1.22a.75.75 0 0 1 0-1.06l1.22-1.22a.75.75 0 0 1 1.06 0ZM1.984 17.296a.75.75 0 0 1 .75.75v1.28c0 .225.185.41.41.41h5.34a.75.75 0 0 1 0 1.5h-5.34a1.91 1.91 0 0 1-1.91-1.91v-1.28a.75.75 0 0 1 .75-.75Z"
1243
+ }), createElement("path", {
1244
+ fillRule: "evenodd",
1245
+ clipRule: "evenodd",
1246
+ d: "M6.735 18.735a.75.75 0 0 1 1.061 0l1.22 1.22a.75.75 0 0 1 0 1.061l-1.22 1.22a.75.75 0 1 1-1.06-1.06l.689-.69-.69-.69a.75.75 0 0 1 0-1.06Z"
1247
+ }));
1248
+ };
1249
+ SwapWalletIcon.toString = function () {
1250
+ return '._icon';
1251
+ };
1252
+
1253
+ var _excluded$y = ["color", "size"];
1254
+ var DisconnectIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
1255
+ var _ref$color = _ref.color,
1256
+ color = _ref$color === void 0 ? 'black' : _ref$color,
1257
+ _ref$size = _ref.size,
1258
+ size = _ref$size === void 0 ? 16 : _ref$size,
1259
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
1260
+ return createElement(SvgWithStrokeColor, Object.assign({
1261
+ xmlns: "http://www.w3.org/2000/svg",
1262
+ width: size,
1263
+ height: size,
1264
+ color: color,
1265
+ viewBox: "0 0 24 24",
1266
+ fill: "none",
1267
+ stroke: "currentColor",
1268
+ "stroke-width": "2",
1269
+ "stroke-linecap": "round",
1270
+ "stroke-linejoin": "round",
1271
+ className: "_icon"
1272
+ }, props, {
1273
+ ref: forwardedRef
1274
+ }), createElement("path", {
1275
+ d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"
1276
+ }), createElement("polyline", {
1277
+ points: "16 17 21 12 16 7"
1278
+ }), createElement("line", {
1279
+ x1: "21",
1280
+ y1: "12",
1281
+ x2: "9",
1282
+ y2: "12"
1283
+ }));
1284
+ });
1285
+ DisconnectIcon.toString = function () {
1286
+ return '._icon';
1287
+ };
1288
+
1289
+ var _excluded$z = ["size", "color"];
1290
+ var BagIcon = function BagIcon(_ref) {
1291
+ var _ref$size = _ref.size,
1292
+ size = _ref$size === void 0 ? 16 : _ref$size,
1293
+ color = _ref.color,
1294
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
1295
+ return createElement(SvgWithStrokeColor, Object.assign({
1296
+ width: size,
1297
+ height: size,
1298
+ viewBox: "0 0 32 32",
1299
+ color: color,
1300
+ fill: "none",
1301
+ xmlns: "http://www.w3.org/2000/svg",
1302
+ className: "_icon"
1303
+ }, props), createElement("g", {
1304
+ clipPath: "url(#a)",
1305
+ strokeWidth: 1.5
1306
+ }, createElement("path", {
1307
+ d: "M9.333 9.333V4.8a.8.8 0 0 1 .8-.8h11.734a.8.8 0 0 1 .8.8v4.533M13.333 4v5.333M16 4v5.333m9.333 17.334H6.667A2.667 2.667 0 0 1 4 24V12a2.667 2.667 0 0 1 2.667-2.667h18.666A2.667 2.667 0 0 1 28 12v12a2.667 2.667 0 0 1-2.667 2.667Z"
1308
+ }), createElement("path", {
1309
+ d: "M22 18.666a.667.667 0 1 1 0-1.334.667.667 0 0 1 0 1.334Z",
1310
+ fill: color,
1311
+ strokeLinecap: "round",
1312
+ strokeLinejoin: "round"
1313
+ })), createElement("defs", null, createElement("clipPath", {
1314
+ id: "a"
1315
+ }, createElement("path", {
1316
+ fill: color,
1317
+ d: "M0 0h32v32H0z"
1318
+ }))));
1319
+ };
1320
+ BagIcon.toString = function () {
1321
+ return '._icon';
1322
+ };
1323
+
1324
+ var _excluded$A = ["size"];
1325
+ var TimeIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
1326
+ var _ref$size = _ref.size,
1327
+ size = _ref$size === void 0 ? 16 : _ref$size,
1328
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
1329
+ return createElement(SvgWithStrokeColor, Object.assign({
1330
+ width: size,
1331
+ height: size,
1332
+ viewBox: "0 0 20 20",
1333
+ fill: "none",
1334
+ xmlns: "http://www.w3.org/2000/svg",
1335
+ className: "_icon"
1336
+ }, props, {
1337
+ ref: forwardedRef
1338
+ }), createElement("circle", {
1339
+ cx: 10,
1340
+ cy: 10,
1341
+ r: 7.25,
1342
+ strokeWidth: 1.5
1343
+ }), createElement("path", {
1344
+ fillRule: "evenodd",
1345
+ clipRule: "evenodd",
1346
+ d: "M10.134 6.6a.6.6 0 0 0-1.2 0v4.27a.6.6 0 0 0 .28.507c.009.01.018.019.029.028l2.59 2.373a.472.472 0 0 0 .753-.109.763.763 0 0 0-.133-.919l-2.319-2.123V6.6Z"
1347
+ }));
1348
+ });
1349
+ TimeIcon.toString = function () {
1350
+ return '._icon';
1351
+ };
1352
+
1353
+ var CloseIcon = /*#__PURE__*/styled(AddIcon, {
1354
+ transform: 'rotate(45deg)',
1355
+ cursor: 'pointer'
1356
+ });
1357
+ CloseIcon.toString = function () {
1358
+ return '._icon';
1359
+ };
1360
+
1361
+ var _excluded$B = ["size", "color"];
1362
+ var SignatureIcon = function SignatureIcon(_ref) {
1363
+ var _ref$size = _ref.size,
1364
+ size = _ref$size === void 0 ? 16 : _ref$size,
1365
+ color = _ref.color,
1366
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
1367
+ return createElement(SvgWithFillColor, Object.assign({
1368
+ width: size,
1369
+ height: size,
1370
+ color: color,
1371
+ xmlns: "http://www.w3.org/2000/svg",
1372
+ viewBox: "0 0 122.88 107.95",
1373
+ xmlSpace: "preserve",
1374
+ className: "_icon"
1375
+ }, props), createElement("path", {
1376
+ d: "M82.19 0c1.22-.01 2.27.4 3.18 1.27l13.27 12.7c.86.82 1.28 1.91 1.3 3.11.02 1.22-.34 2.33-1.18 3.18l-7.06 7.35L72.09 8.67l6.99-7.28C79.94.5 80.98.02 82.19 0zM20.08 68.29a4.536 4.536 0 1 1 2.67 8.67c-6.98 2.14-11.66 6.28-13.21 10.17-.41 1.04-.55 1.99-.39 2.77.12.59.48 1.13 1.07 1.56 2.55 1.86 8.04 2.34 17.26.1 5.46-1.33 11.31-3.13 16.49-4.73 5.29-1.63 9.91-3.06 13.12-3.66 5.92-1.1 11.83-1.85 16.6-1.61 6.26.31 10.96 2.32 12.57 7.13 1.04 3.11.75 5.81.49 8.23-.09.87-.18 1.68-.14 2.21 0 .02.95-.05 5.53-.41 5.3-.42 10.79-2.51 16.21-4.58 2.78-1.06 5.54-2.11 8.67-3.07 2.4-.73 4.93.63 5.65 3.02.73 2.4-.63 4.93-3.02 5.65-2.43.74-5.24 1.82-8.06 2.89-6.04 2.3-12.14 4.63-18.74 5.15-12.07.95-14.87-2.46-15.3-7.95-.1-1.29.03-2.54.17-3.88.16-1.5.34-3.18-.07-4.39-.18-.54-1.89-.82-4.39-.94-3.99-.2-9.22.48-14.54 1.47-2.65.49-7.05 1.85-12.09 3.41-5.27 1.63-11.22 3.46-17.02 4.87-12.14 2.95-20.21 1.7-24.73-1.6-2.54-1.85-4.05-4.27-4.63-7-.54-2.54-.23-5.28.85-8 2.46-6.14 9.23-12.5 18.98-15.48zm21.19-19.84L53.3 60.02l-14.71 3.95c-.53.1-.74-.11-.65-.6l3.33-14.92zm24.6-33.34 19.59 18.87L58.7 62.23l-23.98 6.43c-.86.17-1.2-.17-1.06-.98l5.43-24.31 26.78-28.26z",
1377
+ style: {
1378
+ fillRule: 'evenodd',
1379
+ clipRule: 'evenodd'
1380
+ }
1381
+ }));
1382
+ };
1383
+ SignatureIcon.toString = function () {
1384
+ return '._icon';
1385
+ };
1386
+
1387
+ var _excluded$C = ["size", "color"];
1388
+ var CopyIcon = function CopyIcon(_ref) {
1389
+ var _ref$size = _ref.size,
1390
+ size = _ref$size === void 0 ? 16 : _ref$size,
1391
+ color = _ref.color,
1392
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
1393
+ return createElement(SvgWithFillColor, Object.assign({
1394
+ width: size,
1395
+ height: size,
1396
+ viewBox: "0 0 64 64",
1397
+ color: color,
1398
+ xmlns: "http://www.w3.org/2000/svg",
1399
+ className: "_icon"
1400
+ }, props), createElement("g", {
1401
+ id: "Text-files"
1402
+ }, createElement("path", {
1403
+ d: "M53.9791489,9.1429005H50.010849c-0.0826988,0-0.1562004,0.0283995-0.2331009,0.0469999V5.0228\n\t\tC49.7777481,2.253,47.4731483,0,44.6398468,0h-34.422596C7.3839517,0,5.0793519,2.253,5.0793519,5.0228v46.8432999\n\t\tc0,2.7697983,2.3045998,5.0228004,5.1378999,5.0228004h6.0367002v2.2678986C16.253952,61.8274002,18.4702511,64,21.1954517,64\n\t\th32.783699c2.7252007,0,4.9414978-2.1725998,4.9414978-4.8432007V13.9861002\n\t\tC58.9206467,11.3155003,56.7043495,9.1429005,53.9791489,9.1429005z M7.1110516,51.8661003V5.0228\n\t\tc0-1.6487999,1.3938999-2.9909999,3.1062002-2.9909999h34.422596c1.7123032,0,3.1062012,1.3422,3.1062012,2.9909999v46.8432999\n\t\tc0,1.6487999-1.393898,2.9911003-3.1062012,2.9911003h-34.422596C8.5049515,54.8572006,7.1110516,53.5149002,7.1110516,51.8661003z\n\t\t M56.8888474,59.1567993c0,1.550602-1.3055,2.8115005-2.9096985,2.8115005h-32.783699\n\t\tc-1.6042004,0-2.9097996-1.2608986-2.9097996-2.8115005v-2.2678986h26.3541946\n\t\tc2.8333015,0,5.1379013-2.2530022,5.1379013-5.0228004V11.1275997c0.0769005,0.0186005,0.1504021,0.0469999,0.2331009,0.0469999\n\t\th3.9682999c1.6041985,0,2.9096985,1.2609005,2.9096985,2.8115005V59.1567993z"
1404
+ }), createElement("path", {
1405
+ d: "M38.6031494,13.2063999H16.253952c-0.5615005,0-1.0159006,0.4542999-1.0159006,1.0158005\n\t\tc0,0.5615997,0.4544001,1.0158997,1.0159006,1.0158997h22.3491974c0.5615005,0,1.0158997-0.4542999,1.0158997-1.0158997\n\t\tC39.6190491,13.6606998,39.16465,13.2063999,38.6031494,13.2063999z"
1406
+ }), createElement("path", {
1407
+ d: "M38.6031494,21.3334007H16.253952c-0.5615005,0-1.0159006,0.4542999-1.0159006,1.0157986\n\t\tc0,0.5615005,0.4544001,1.0159016,1.0159006,1.0159016h22.3491974c0.5615005,0,1.0158997-0.454401,1.0158997-1.0159016\n\t\tC39.6190491,21.7877007,39.16465,21.3334007,38.6031494,21.3334007z"
1408
+ }), createElement("path", {
1409
+ d: "M38.6031494,29.4603004H16.253952c-0.5615005,0-1.0159006,0.4543991-1.0159006,1.0158997\n\t\ts0.4544001,1.0158997,1.0159006,1.0158997h22.3491974c0.5615005,0,1.0158997-0.4543991,1.0158997-1.0158997\n\t\tS39.16465,29.4603004,38.6031494,29.4603004z"
1410
+ }), createElement("path", {
1411
+ d: "M28.4444485,37.5872993H16.253952c-0.5615005,0-1.0159006,0.4543991-1.0159006,1.0158997\n\t\ts0.4544001,1.0158997,1.0159006,1.0158997h12.1904964c0.5615025,0,1.0158005-0.4543991,1.0158005-1.0158997\n\t\tS29.0059509,37.5872993,28.4444485,37.5872993z"
1412
+ })));
1413
+ };
1414
+ CopyIcon.toString = function () {
1415
+ return '._icon';
1416
+ };
1417
+
1418
+ var _excluded$D = ["children", "className", "color"];
1419
+ var TypographyContainer = /*#__PURE__*/styled('span', {
1420
+ margin: 0,
1421
+ display: 'inline-block',
1422
+ variants: {
1423
+ variant: {
1424
+ h1: {
1425
+ fontSize: '$36',
1426
+ fontWeight: '$700',
1427
+ '@md': {
1428
+ fontSize: '$40'
1429
+ },
1430
+ '@lg': {
1431
+ fontSize: '$48'
1432
+ }
1433
+ },
1434
+ h2: {
1435
+ fontSize: '$32',
1436
+ fontWeight: '$700',
1437
+ '@md': {
1438
+ fontSize: '$36'
1439
+ },
1440
+ '@lg': {
1441
+ fontSize: '$40'
1442
+ }
1443
+ },
1444
+ h3: {
1445
+ fontSize: '$20',
1446
+ fontWeight: '$700',
1447
+ '@md': {
1448
+ fontSize: '$24'
1449
+ },
1450
+ '@lg': {
1451
+ fontSize: '$32'
1452
+ }
1453
+ },
1454
+ h4: {
1455
+ fontSize: '$18',
1456
+ fontWeight: '$600',
1457
+ '@md': {
1458
+ fontSize: '$20'
1459
+ },
1460
+ '@lg': {
1461
+ fontSize: '$24'
1462
+ }
1463
+ },
1464
+ h5: {
1465
+ fontSize: '$16',
1466
+ fontWeight: '$600'
1467
+ },
1468
+ h6: {
1469
+ fontSize: '$14',
1470
+ fontWeight: '$500',
1471
+ '@md': {
1472
+ fontSize: '$16'
1473
+ },
1474
+ '@lg': {
1475
+ fontSize: '$18'
1476
+ }
1477
+ },
1478
+ body1: {
1479
+ fontSize: '$14',
1480
+ fontWeight: '$400',
1481
+ '@md': {
1482
+ fontSize: '$16'
1483
+ },
1484
+ '@lg': {
1485
+ fontSize: '$18'
1486
+ }
1487
+ },
1488
+ body2: {
1489
+ fontSize: '$14',
1490
+ fontWeight: '$400',
1491
+ '@lg': {
1492
+ fontSize: '$16'
1493
+ }
1494
+ },
1495
+ body3: {
1496
+ fontSize: '$12',
1497
+ fontWeight: '$400'
1498
+ },
1499
+ caption: {
1500
+ fontSize: '$10',
1501
+ fontWeight: '$400',
1502
+ '@lg': {
1503
+ fontSize: '$12'
1504
+ }
1505
+ }
1506
+ },
1507
+ align: {
1508
+ center: {
1509
+ textAlign: 'center'
1510
+ },
1511
+ left: {
1512
+ textAlign: 'left'
1513
+ },
1514
+ right: {
1515
+ textAlign: 'right'
1516
+ }
1517
+ },
1518
+ noWrap: {
1519
+ "true": {
1520
+ whiteSpace: 'nowrap'
1521
+ }
1522
+ },
1523
+ ml: {
1524
+ 2: {
1525
+ marginLeft: '$2'
1526
+ },
1527
+ 4: {
1528
+ marginLeft: '$4'
1529
+ },
1530
+ 8: {
1531
+ marginLeft: '$8'
1532
+ },
1533
+ 12: {
1534
+ marginLeft: '$12'
1535
+ }
1536
+ },
1537
+ mt: {
1538
+ 2: {
1539
+ marginTop: '$2'
1540
+ },
1541
+ 4: {
1542
+ marginTop: '$4'
1543
+ },
1544
+ 8: {
1545
+ marginTop: '$8'
1546
+ },
1547
+ 12: {
1548
+ marginTop: '$12'
1549
+ }
1550
+ },
1551
+ mr: {
1552
+ 2: {
1553
+ marginRight: '$2'
1554
+ },
1555
+ 4: {
1556
+ marginRight: '$4'
1557
+ },
1558
+ 8: {
1559
+ marginRight: '$8'
1560
+ },
1561
+ 12: {
1562
+ marginRight: '$12'
1563
+ }
1564
+ },
1565
+ mb: {
1566
+ 2: {
1567
+ marginBottom: '$2'
1568
+ },
1569
+ 4: {
1570
+ marginBottom: '$4'
1571
+ },
1572
+ 8: {
1573
+ marginBottom: '$8'
1574
+ },
1575
+ 12: {
1576
+ marginBottom: '$12'
1577
+ }
1578
+ }
1579
+ }
1580
+ });
1581
+ function Typography(_ref) {
1582
+ var children = _ref.children,
1583
+ className = _ref.className,
1584
+ color = _ref.color,
1585
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
1586
+ var customCss = color ? {
1587
+ color: color.startsWith('$') ? color : "$" + color
1588
+ } : {
1589
+ color: '$foreground'
1590
+ };
1591
+ return React__default.createElement(TypographyContainer, Object.assign({
1592
+ className: "_typography _text " + (className || ''),
1593
+ css: customCss
1594
+ }, props), children);
1595
+ }
1596
+ Typography.toString = function () {
1597
+ return '._typography';
1598
+ };
1599
+
1600
+ var StepLogoContainer = /*#__PURE__*/styled('div', {
1601
+ position: 'relative',
1602
+ width: '$28',
1603
+ height: '$28',
1604
+ variants: {
1605
+ direction: {
1606
+ vertical: {
1607
+ margin: 'auto'
1608
+ },
1609
+ horizontal: {}
1610
+ }
1611
+ }
1612
+ });
1613
+ var Logo = /*#__PURE__*/styled('img', {
1614
+ width: '$28',
1615
+ height: '$28',
1616
+ borderRadius: '50%'
1617
+ });
1618
+ var ChainLogo = /*#__PURE__*/styled('div', {
1619
+ position: 'absolute',
1620
+ right: -4,
1621
+ bottom: -4,
1622
+ width: '$16',
1623
+ height: '$16',
1624
+ padding: '$2',
1625
+ borderRadius: '50%',
1626
+ backgroundColor: '$background',
1627
+ border: '1px solid $neutrals400',
1628
+ img: {
1629
+ width: '100%',
1630
+ display: 'block'
1631
+ }
1632
+ });
1633
+ var StepContainer = /*#__PURE__*/styled('div', {
1634
+ display: 'flex',
1635
+ variants: {
1636
+ direction: {
1637
+ horizontal: {
1638
+ alignItems: 'center'
1639
+ },
1640
+ vertical: {
1641
+ flexDirection: 'column',
1642
+ textAlign: 'center',
1643
+ justifyContent: 'center'
1644
+ }
1645
+ }
1646
+ }
1647
+ });
1648
+ var Detail = /*#__PURE__*/styled('div', {
1649
+ variants: {
1650
+ pl: {
1651
+ "true": {
1652
+ paddingLeft: '$4',
1653
+ '@lg': {
1654
+ paddingLeft: '$8'
1655
+ }
1656
+ },
1657
+ "false": {
1658
+ paddingTop: '$8'
1659
+ }
1660
+ }
1661
+ }
1662
+ });
1663
+ var SubTitle = /*#__PURE__*/styled(Typography, {
1664
+ color: '$neutrals600',
1665
+ display: 'block'
1666
+ });
1667
+ function StepDetail(_ref) {
1668
+ var logo = _ref.logo,
1669
+ chainLogo = _ref.chainLogo,
1670
+ amount = _ref.amount,
1671
+ symbol = _ref.symbol,
1672
+ blockchain = _ref.blockchain,
1673
+ _ref$direction = _ref.direction,
1674
+ direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
1675
+ return React__default.createElement(StepContainer, {
1676
+ direction: direction
1677
+ }, React__default.createElement(StepLogoContainer, {
1678
+ direction: direction
1679
+ }, React__default.createElement(Logo, {
1680
+ src: logo,
1681
+ alt: symbol
1682
+ }), React__default.createElement(ChainLogo, null, React__default.createElement("img", {
1683
+ src: chainLogo,
1684
+ alt: blockchain
1685
+ }))), React__default.createElement(Detail, {
1686
+ pl: direction === 'horizontal'
1687
+ }, React__default.createElement(Typography, {
1688
+ noWrap: true,
1689
+ variant: direction === 'vertical' ? 'body2' : 'h6'
1690
+ }, amount ? parseFloat(amount).toFixed(2) : '?', " ", symbol), React__default.createElement(SubTitle, {
1691
+ noWrap: true,
1692
+ variant: "caption",
1693
+ color: "neutrals800"
1694
+ }, "on ", blockchain)));
1695
+ }
1696
+
1697
+ var waveSquares = /*#__PURE__*/keyframes({
1698
+ '0%': {
1699
+ backgroundPosition: '-468px 0'
1700
+ },
1701
+ '100%': {
1702
+ backgroundPosition: '468px 0'
1703
+ }
1704
+ });
1705
+ var SkeletonContainer = /*#__PURE__*/styled('div', {
1706
+ borderRadius: '$5',
1707
+ backgroundColor: '$neutrals300',
1708
+ background: "linear-gradient(to right, rgba(130, 130, 130, 0.2) 8%, rgba(130, 130, 130, 0.3) 18%, rgba(130, 130, 130, 0.2) 33%)",
1709
+ backgroundSize: '800px 100px',
1710
+ animation: waveSquares + " 2s infinite ease-out",
1711
+ variants: {
1712
+ width: {
1713
+ 16: {
1714
+ width: '$16'
1715
+ },
1716
+ 20: {
1717
+ width: '$20'
1718
+ },
1719
+ 24: {
1720
+ width: '$24'
1721
+ },
1722
+ 36: {
1723
+ width: '$36'
1724
+ },
1725
+ 48: {
1726
+ width: '$48'
1727
+ }
1728
+ },
1729
+ height: {
1730
+ 16: {
1731
+ height: '$16'
1732
+ },
1733
+ 20: {
1734
+ height: '$20'
1735
+ },
1736
+ 24: {
1737
+ height: '$24'
1738
+ },
1739
+ 36: {
1740
+ height: '$36'
1741
+ },
1742
+ 48: {
1743
+ height: '$48'
1744
+ },
1745
+ 94: {
1746
+ height: 94
1747
+ }
1748
+ }
1749
+ }
1750
+ });
1751
+ function Skeleton(_ref) {
1752
+ var _ref$width = _ref.width,
1753
+ width = _ref$width === void 0 ? 20 : _ref$width,
1754
+ _ref$height = _ref.height,
1755
+ height = _ref$height === void 0 ? 20 : _ref$height;
1756
+ return React__default.createElement(SkeletonContainer, {
1757
+ width: width,
1758
+ height: height
1759
+ });
1760
+ }
1761
+
1762
+ var spin = /*#__PURE__*/keyframes({
1763
+ '100%': {
1764
+ transform: 'rotate(360deg)'
1765
+ }
1766
+ });
1767
+ var SpinnerContainer = /*#__PURE__*/styled('div', {
1768
+ borderRadius: '50%',
1769
+ position: 'relative',
1770
+ border: "2px solid $neutrals300",
1771
+ borderRight: "2px solid",
1772
+ animation: spin + " 1.5s linear infinite",
1773
+ margin: "0px $8",
1774
+ variants: {
1775
+ color: {
1776
+ primary: {
1777
+ borderRightColor: '$primary'
1778
+ },
1779
+ error: {
1780
+ borderRightColor: '$error'
1781
+ },
1782
+ warning: {
1783
+ borderRightColor: '$warning'
1784
+ },
1785
+ success: {
1786
+ borderRightColor: '$success'
1787
+ },
1788
+ black: {
1789
+ borderRightColor: '$black'
1790
+ },
1791
+ white: {
1792
+ borderRightColor: '$white'
1793
+ }
1794
+ },
1795
+ size: {
1796
+ 16: {
1797
+ width: '$16',
1798
+ height: '$16'
1799
+ },
1800
+ 20: {
1801
+ width: '$20',
1802
+ height: '$20'
1803
+ },
1804
+ 24: {
1805
+ width: '$24',
1806
+ height: '$24'
1807
+ }
1808
+ }
1809
+ }
1810
+ });
1811
+ function Spinner(_ref) {
1812
+ var _ref$size = _ref.size,
1813
+ size = _ref$size === void 0 ? 16 : _ref$size,
1814
+ _ref$color = _ref.color,
1815
+ color = _ref$color === void 0 ? 'primary' : _ref$color;
1816
+ return React__default.createElement(SpinnerContainer, {
1817
+ size: size,
1818
+ color: color
1819
+ });
1820
+ }
1821
+
1822
+ var TooltipTrigger = /*#__PURE__*/styled(Trigger, {
1823
+ border: 0,
1824
+ padding: 0,
1825
+ backgroundColor: 'transparent'
1826
+ });
1827
+ var TooltipContent = /*#__PURE__*/styled(Content$1, {
1828
+ borderRadius: '$5',
1829
+ padding: '$4 $8',
1830
+ fontSize: '$14',
1831
+ animationDuration: '400ms',
1832
+ animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
1833
+ willChange: 'transform, opacity',
1834
+ variants: {
1835
+ color: {
1836
+ primary: {
1837
+ backgroundColor: '$primary',
1838
+ color: '$white'
1839
+ },
1840
+ error: {
1841
+ backgroundColor: '$error',
1842
+ color: '$white'
1843
+ },
1844
+ warning: {
1845
+ backgroundColor: '$warning',
1846
+ color: '$white'
1847
+ },
1848
+ success: {
1849
+ backgroundColor: '$success',
1850
+ color: '$white'
1851
+ },
1852
+ gray: {
1853
+ backgroundColor: '$neutrals300',
1854
+ color: '$black'
1855
+ },
1856
+ black: {
1857
+ backgroundColor: '$black',
1858
+ color: '$white'
1859
+ },
1860
+ white: {
1861
+ backgroundColor: '$white',
1862
+ color: '$black'
1863
+ }
1864
+ }
1865
+ }
1866
+ });
1867
+ var TooltipArrow = /*#__PURE__*/styled(Arrow, {
1868
+ variants: {
1869
+ color: {
1870
+ primary: {
1871
+ fill: '$primary'
1872
+ },
1873
+ error: {
1874
+ fill: '$error'
1875
+ },
1876
+ warning: {
1877
+ fill: '$warning'
1878
+ },
1879
+ success: {
1880
+ fill: '$success'
1881
+ },
1882
+ gray: {
1883
+ fill: '$neutrals300'
1884
+ },
1885
+ black: {
1886
+ fill: '$black'
1887
+ },
1888
+ white: {
1889
+ fill: '$white'
1890
+ }
1891
+ }
1892
+ }
1893
+ });
1894
+ var ChildrenWrapper = /*#__PURE__*/styled('div', {
1895
+ display: 'inline-block'
1896
+ });
1897
+ function Tooltip(_ref) {
1898
+ var children = _ref.children,
1899
+ content = _ref.content,
1900
+ _ref$side = _ref.side,
1901
+ side = _ref$side === void 0 ? 'top' : _ref$side,
1902
+ _ref$color = _ref.color,
1903
+ color = _ref$color === void 0 ? 'gray' : _ref$color;
1904
+ return React__default.createElement(Provider, null, React__default.createElement(Root, null, React__default.createElement(TooltipTrigger, {
1905
+ asChild: true
1906
+ }, React__default.createElement(ChildrenWrapper, null, children)), React__default.createElement(Portal, null, React__default.createElement(TooltipContent, {
1907
+ color: color,
1908
+ side: side,
1909
+ sideOffset: 5
1910
+ }, content, React__default.createElement(TooltipArrow, {
1911
+ color: color
1912
+ })))));
1913
+ }
1914
+
1915
+ var Container = /*#__PURE__*/styled('div', {
1916
+ borderRadius: '$5',
1917
+ border: '1px solid $neutrals300',
1918
+ display: 'flex',
1919
+ alignItems: 'center',
1920
+ minHeight: 126,
1921
+ justifyContent: 'space-between'
1922
+ });
1923
+ var ErrorMsg = /*#__PURE__*/styled(Typography, {
1924
+ color: '$error'
1925
+ });
1926
+ var BestRouteContainer = /*#__PURE__*/styled('div', {
1927
+ display: 'flex',
1928
+ alignItems: 'center',
1929
+ margin: '0 auto',
1930
+ overflowX: 'auto',
1931
+ overflowY: 'hidden',
1932
+ alignSelf: 'stretch',
1933
+ padding: '$4',
1934
+ '@md': {
1935
+ padding: '$8'
1936
+ }
1937
+ });
1938
+ var Line = /*#__PURE__*/styled('div', {
1939
+ height: '0',
1940
+ width: '$20',
1941
+ border: '1px dashed $foreground',
1942
+ borderRadius: 'inherit',
1943
+ '@lg': {
1944
+ width: '$32'
1945
+ }
1946
+ });
1947
+ var HR = /*#__PURE__*/styled('hr', {
1948
+ width: '100%',
1949
+ border: '1px solid $neutrals400',
1950
+ margin: '$8 0'
1951
+ });
1952
+ var SwapperLogo = /*#__PURE__*/styled('img', {
1953
+ width: '$16',
1954
+ height: '$16'
1955
+ });
1956
+ var RelativeContainer = /*#__PURE__*/styled('div', {
1957
+ position: 'relative'
1958
+ });
1959
+ var Dot = /*#__PURE__*/styled('div', {
1960
+ width: '$6',
1961
+ height: '$6',
1962
+ backgroundColor: '$foreground',
1963
+ position: 'absolute',
1964
+ top: '45%',
1965
+ right: -5,
1966
+ marginLeft: '$8',
1967
+ borderRadius: '50%',
1968
+ '@md': {
1969
+ width: '$8',
1970
+ height: '$8',
1971
+ right: -8,
1972
+ top: '45%'
1973
+ }
1974
+ });
1975
+ var ArrowRight = /*#__PURE__*/styled('div', {
1976
+ width: '0px',
1977
+ height: '0px',
1978
+ borderTop: '5px solid transparent',
1979
+ borderBottom: '5px solid transparent',
1980
+ borderLeft: '5px solid $foreground'
1981
+ });
1982
+ var pulse = /*#__PURE__*/keyframes({
1983
+ '0%': {
1984
+ opacity: 1
1985
+ },
1986
+ '50%': {
1987
+ opacity: 0.3
1988
+ },
1989
+ '100%': {
1990
+ opacity: 1
1991
+ }
1992
+ });
1993
+ var GasContainer = /*#__PURE__*/styled('div', {
1994
+ backgroundColor: '$neutrals300',
1995
+ borderRadius: '5px',
1996
+ margin: '$4',
1997
+ display: 'flex',
1998
+ flexDirection: 'column',
1999
+ justifyContent: 'center',
2000
+ alignItems: 'center',
2001
+ padding: '$4',
2002
+ '@md': {
2003
+ padding: '$8',
2004
+ margin: '$8'
2005
+ }
2006
+ });
2007
+ var CostContainer = /*#__PURE__*/styled('div', {
2008
+ display: 'flex',
2009
+ flexDirection: 'column',
2010
+ alignItems: 'center',
2011
+ variants: {
2012
+ warning: {
2013
+ "true": {
2014
+ animation: pulse + " 2s ease-in-out infinite"
2015
+ }
2016
+ }
2017
+ }
2018
+ });
2019
+ var TotalFee = /*#__PURE__*/styled(Typography, {
2020
+ variants: {
2021
+ warning: {
2022
+ "true": {
2023
+ color: '$warning300'
2024
+ }
2025
+ }
2026
+ }
2027
+ });
2028
+ var SkeletonContainer$1 = /*#__PURE__*/styled('div', {
2029
+ padding: '$4',
2030
+ '@md': {
2031
+ padding: '$8'
2032
+ }
2033
+ });
2034
+ var SwapperContainer = /*#__PURE__*/styled('div', {
2035
+ display: 'flex',
2036
+ justifyContent: 'center',
2037
+ alignItems: 'center'
2038
+ });
2039
+ function BestRoute(props) {
2040
+ var _data$result;
2041
+ var data = props.data,
2042
+ loading = props.loading,
2043
+ error = props.error,
2044
+ totalFee = props.totalFee,
2045
+ feeWarning = props.feeWarning,
2046
+ totalTime = props.totalTime;
2047
+ return React__default.createElement(Container, null, loading ? React__default.createElement(SkeletonContainer$1, null, React__default.createElement(Skeleton, {
2048
+ width: 48,
2049
+ height: 94
2050
+ })) : React__default.createElement(GasContainer, null, React__default.createElement(Tooltip, {
2051
+ content: "Transaction cost (fee)"
2052
+ }, React__default.createElement(CostContainer, {
2053
+ warning: feeWarning
2054
+ }, React__default.createElement(GasIcon, {
2055
+ size: 20,
2056
+ color: feeWarning ? 'warning' : undefined
2057
+ }), React__default.createElement(TotalFee, {
2058
+ mt: 4,
2059
+ align: "center",
2060
+ variant: "caption",
2061
+ warning: feeWarning
2062
+ }, error && '-', !!data && "$" + totalFee))), React__default.createElement(HR, null), React__default.createElement(Tooltip, {
2063
+ content: "Time estimate"
2064
+ }, React__default.createElement(CostContainer, {
2065
+ warning: feeWarning
2066
+ }, React__default.createElement(TimeIcon, {
2067
+ size: 20
2068
+ }), React__default.createElement(Typography, {
2069
+ mt: 4,
2070
+ align: "center",
2071
+ variant: "caption"
2072
+ }, error && '-', !!data && "~" + totalTime + "m")))), React__default.createElement(BestRouteContainer, null, loading && React__default.createElement(Spinner, {
2073
+ color: "primary"
2074
+ }), error && React__default.createElement(ErrorMsg, {
2075
+ variant: "caption"
2076
+ }, error), !!data && ((_data$result = data.result) == null ? void 0 : _data$result.swaps.map(function (swap, index) {
2077
+ var _data$result2;
2078
+ return React__default.createElement(Fragment, {
2079
+ key: index
2080
+ }, index === 0 && React__default.createElement(RelativeContainer, null, React__default.createElement(StepDetail, {
2081
+ direction: "vertical",
2082
+ logo: swap.from.logo,
2083
+ symbol: swap.from.symbol,
2084
+ chainLogo: swap.from.blockchainLogo,
2085
+ blockchain: swap.from.blockchain,
2086
+ amount: swap.fromAmount
2087
+ }), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(SwapperLogo, {
2088
+ src: swap.swapperLogo,
2089
+ alt: swap.swapperId
2090
+ }), React__default.createElement(Line, null)), index + 1 === ((_data$result2 = data.result) == null ? void 0 : _data$result2.swaps.length) && React__default.createElement(ArrowRight, null), React__default.createElement(StepDetail, {
2091
+ direction: "vertical",
2092
+ logo: swap.to.logo,
2093
+ symbol: swap.to.symbol,
2094
+ chainLogo: swap.to.blockchainLogo,
2095
+ blockchain: swap.to.blockchain,
2096
+ amount: swap.toAmount
2097
+ }));
2098
+ })), !!data && !(data != null && data.result) && React__default.createElement(Typography, {
2099
+ variant: "body2"
2100
+ }, "No routes found")));
2101
+ }
2102
+
2103
+ var _excluded$E = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
2104
+ var _ghost, _css, _css2, _css3;
2105
+ var ButtonContainer = /*#__PURE__*/styled('button', {
2106
+ borderRadius: '$5',
2107
+ fontSize: '$16',
2108
+ fontWeight: '$400',
2109
+ cursor: 'pointer',
2110
+ padding: '0 $12',
2111
+ display: 'flex',
2112
+ alignItems: 'center',
2113
+ justifyContent: 'center',
2114
+ transition: 'all 0.35s',
2115
+ border: '0',
2116
+ '&:active': {
2117
+ transform: 'scale(0.95)'
2118
+ },
2119
+ variants: {
2120
+ align: {
2121
+ start: {
2122
+ display: 'flex',
2123
+ width: '100%'
2124
+ },
2125
+ grow: {
2126
+ display: 'flex',
2127
+ width: '100%'
2128
+ }
2129
+ },
2130
+ size: {
2131
+ compact: {},
2132
+ free: {},
2133
+ small: {
2134
+ height: '$32'
2135
+ },
2136
+ medium: {
2137
+ height: '$40'
2138
+ },
2139
+ large: {
2140
+ height: '$48'
2141
+ }
2142
+ },
2143
+ variant: {
2144
+ contained: {
2145
+ backgroundColor: '$neutrals300',
2146
+ color: '$foreground',
2147
+ border: 0,
2148
+ '&:hover': {
2149
+ backgroundColor: '$neutrals200'
2150
+ },
2151
+ '&:disabled': {
2152
+ background: '$neutrals400'
2153
+ },
2154
+ '&:disabled:hover': {
2155
+ background: '$neutrals400',
2156
+ transform: 'unset'
2157
+ }
2158
+ },
2159
+ outlined: {
2160
+ backgroundColor: '$background',
2161
+ border: 1,
2162
+ borderStyle: 'solid',
2163
+ borderColor: '$neutrals400',
2164
+ color: '$foreground',
2165
+ '&:hover': {
2166
+ borderColor: '$neutrals600'
2167
+ },
2168
+ '&:disabled': {
2169
+ borderColor: '$neutrals300',
2170
+ color: '$neutrals400'
2171
+ }
2172
+ },
2173
+ ghost: (_ghost = {
2174
+ color: '$foreground',
2175
+ '&:hover': {
2176
+ backgroundColor: '$neutrals200'
2177
+ },
2178
+ '&:disabled': {
2179
+ color: '$neutrals400 !important'
2180
+ },
2181
+ background: 'transparent',
2182
+ border: 0
2183
+ }, _ghost["& " + Typography] = {
2184
+ color: 'inherit'
2185
+ }, _ghost)
2186
+ },
2187
+ fullWidth: {
2188
+ "true": {
2189
+ width: '100%'
2190
+ }
2191
+ },
2192
+ loading: {
2193
+ "true": {}
2194
+ },
2195
+ type: {
2196
+ primary: {},
2197
+ error: {},
2198
+ warning: {},
2199
+ success: {}
2200
+ }
2201
+ },
2202
+ compoundVariants: [{
2203
+ type: 'primary',
2204
+ variant: 'contained',
2205
+ css: {
2206
+ background: '$primary',
2207
+ color: '$white',
2208
+ '&:hover': {
2209
+ background: '$primary700'
2210
+ },
2211
+ '&:visited': {
2212
+ background: '$primary900'
2213
+ },
2214
+ '&:focus': {
2215
+ background: '$primary600'
2216
+ }
2217
+ }
2218
+ }, {
2219
+ type: 'primary',
2220
+ variant: 'outlined',
2221
+ css: {
2222
+ color: '$primary !important',
2223
+ borderColor: '$primary',
2224
+ '&:hover': {
2225
+ color: '$primary700 !important',
2226
+ borderColor: '$primary700 !important'
2227
+ },
2228
+ '&:visited': {
2229
+ color: '$primary900 !important',
2230
+ borderColor: '$primary900 !important'
2231
+ },
2232
+ '&:focus': {
2233
+ color: '$primary600 !important',
2234
+ borderColor: '$primary600 !important'
2235
+ }
2236
+ }
2237
+ }, {
2238
+ type: 'primary',
2239
+ variant: 'ghost',
2240
+ css: {
2241
+ color: '$primary',
2242
+ '&:hover': {
2243
+ color: '$primary700'
2244
+ },
2245
+ '&:visited': {
2246
+ color: '$primary900'
2247
+ },
2248
+ '&:focus': {
2249
+ color: '$primary600'
2250
+ }
2251
+ }
2252
+ }, {
2253
+ type: 'error',
2254
+ variant: 'contained',
2255
+ css: (_css = {
2256
+ background: '$error',
2257
+ $$color: '$colors$background'
2258
+ }, _css["." + darkTheme + " &"] = {
2259
+ $$color: '$colors$foreground'
2260
+ }, _css.color = '$$color !important', _css['&:hover'] = {
2261
+ background: '$error300'
2262
+ }, _css['&:visited'] = {
2263
+ background: '$error700'
2264
+ }, _css['&:focus'] = {
2265
+ background: '$error700'
2266
+ }, _css)
2267
+ }, {
2268
+ type: 'error',
2269
+ variant: 'outlined',
2270
+ css: {
2271
+ color: '$error !important',
2272
+ borderColor: '$error',
2273
+ '&:hover': {
2274
+ color: '$error300 !important',
2275
+ borderColor: '$error300 !important'
2276
+ },
2277
+ '&:visited': {
2278
+ color: '$error700 !important',
2279
+ borderColor: '$error700 !important'
2280
+ },
2281
+ '&:focus': {
2282
+ color: '$error700 !important',
2283
+ borderColor: '$error700 !important'
2284
+ }
2285
+ }
2286
+ }, {
2287
+ type: 'error',
2288
+ variant: 'ghost',
2289
+ css: {
2290
+ color: '$error',
2291
+ '&:hover': {
2292
+ color: '$error300'
2293
+ },
2294
+ '&:visited': {
2295
+ color: '$error700'
2296
+ },
2297
+ '&:focus': {
2298
+ color: '$error700'
2299
+ }
2300
+ }
2301
+ }, {
2302
+ type: 'warning',
2303
+ variant: 'contained',
2304
+ css: (_css2 = {
2305
+ background: '$warning',
2306
+ $$color: '$colors$background'
2307
+ }, _css2["." + darkTheme + " &"] = {
2308
+ $$color: '$colors$foreground'
2309
+ }, _css2.color = '$$color !important', _css2['&:hover'] = {
2310
+ background: '$warning300'
2311
+ }, _css2['&:visited'] = {
2312
+ background: '$warning700'
2313
+ }, _css2['&:focus'] = {
2314
+ background: '$warning700'
2315
+ }, _css2)
2316
+ }, {
2317
+ type: 'warning',
2318
+ variant: 'outlined',
2319
+ css: {
2320
+ color: '$warning !important',
2321
+ borderColor: '$warning',
2322
+ '&:hover': {
2323
+ color: '$warning300 !important',
2324
+ borderColor: '$warning300 !important'
2325
+ },
2326
+ '&:visited': {
2327
+ color: '$warning700 !important',
2328
+ borderColor: '$warning700 !important'
2329
+ },
2330
+ '&:focus': {
2331
+ color: '$warning700 !important',
2332
+ borderColor: '$warning700 !important'
2333
+ }
2334
+ }
2335
+ }, {
2336
+ type: 'warning',
2337
+ variant: 'ghost',
2338
+ css: {
2339
+ color: '$warning',
2340
+ '&:hover': {
2341
+ color: '$warning300'
2342
+ },
2343
+ '&:visited': {
2344
+ color: '$warning700'
2345
+ },
2346
+ '&:focus': {
2347
+ color: '$warning700'
2348
+ }
2349
+ }
2350
+ }, {
2351
+ type: 'success',
2352
+ variant: 'contained',
2353
+ css: (_css3 = {
2354
+ background: '$success',
2355
+ $$color: '$colors$background'
2356
+ }, _css3["." + darkTheme + " &"] = {
2357
+ $$color: '$colors$foreground'
2358
+ }, _css3.color = '$$color !important', _css3['&:hover'] = {
2359
+ background: '$success300'
2360
+ }, _css3['&:visited'] = {
2361
+ background: '$success700'
2362
+ }, _css3['&:focus'] = {
2363
+ background: '$success700'
2364
+ }, _css3)
2365
+ }, {
2366
+ type: 'success',
2367
+ variant: 'outlined',
2368
+ css: {
2369
+ color: '$success !important',
2370
+ borderColor: '$success',
2371
+ '&:hover': {
2372
+ color: '$success300 !important',
2373
+ borderColor: '$success300 !important'
2374
+ },
2375
+ '&:visited': {
2376
+ color: '$success700 !important',
2377
+ borderColor: '$success700 !important'
2378
+ },
2379
+ '&:focus': {
2380
+ color: '$success700 !important',
2381
+ borderColor: '$success700 !important'
2382
+ }
2383
+ }
2384
+ }, {
2385
+ type: 'success',
2386
+ variant: 'ghost',
2387
+ css: {
2388
+ color: '$success',
2389
+ '&:hover': {
2390
+ color: '$success300'
2391
+ },
2392
+ '&:visited': {
2393
+ color: '$success700'
2394
+ },
2395
+ '&:focus': {
2396
+ color: '$success700'
2397
+ }
2398
+ }
2399
+ }, {
2400
+ size: 'compact',
2401
+ css: {
2402
+ padding: '$2 $4',
2403
+ fontSize: '$12'
2404
+ }
2405
+ }],
2406
+ defaultVariants: {
2407
+ size: 'medium',
2408
+ variant: 'contained'
2409
+ }
2410
+ });
2411
+ var Content = /*#__PURE__*/styled('div', {
2412
+ flex: 1,
2413
+ variants: {
2414
+ align: {
2415
+ start: {
2416
+ textAlign: 'left'
2417
+ },
2418
+ grow: {
2419
+ textAlign: 'center'
2420
+ }
2421
+ },
2422
+ ml: {
2423
+ "true": {
2424
+ marginLeft: '$8'
2425
+ }
2426
+ },
2427
+ mr: {
2428
+ "true": {
2429
+ marginRight: '$8'
2430
+ }
2431
+ },
2432
+ flexContent: {
2433
+ "true": {
2434
+ display: 'flex',
2435
+ alignItems: 'center'
2436
+ }
2437
+ }
2438
+ }
2439
+ });
2440
+ function Button(_ref) {
2441
+ var children = _ref.children,
2442
+ loading = _ref.loading,
2443
+ disabled = _ref.disabled,
2444
+ prefix = _ref.prefix,
2445
+ suffix = _ref.suffix,
2446
+ align = _ref.align,
2447
+ flexContent = _ref.flexContent,
2448
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
2449
+ var isDisabled = loading || disabled;
2450
+ return React__default.createElement(ButtonContainer, Object.assign({
2451
+ disabled: isDisabled
2452
+ }, props, {
2453
+ align: align
2454
+ }), prefix, children && React__default.createElement(Content, {
2455
+ align: align,
2456
+ ml: !!prefix,
2457
+ mr: !!suffix && !loading,
2458
+ flexContent: flexContent,
2459
+ className: "_text"
2460
+ }, children), loading && React__default.createElement(Spinner, {
2461
+ size: 16,
2462
+ color: props.type
2463
+ }), suffix);
2464
+ }
2465
+
2466
+ var FilledCircle = /*#__PURE__*/styled('span', {
2467
+ width: '10px',
2468
+ height: '10px',
2469
+ backgroundColor: '$primary',
2470
+ borderRadius: '99999px'
2471
+ });
2472
+
2473
+ var ListContainer = /*#__PURE__*/styled('div', {
2474
+ display: 'grid',
2475
+ gap: '.5rem',
2476
+ gridTemplateColumns: ' repeat(2, minmax(0, 1fr))',
2477
+ alignContent: 'baseline',
2478
+ width: '100%',
2479
+ height: '100%'
2480
+ });
2481
+ var Image = /*#__PURE__*/styled('img', {
2482
+ width: '1.5rem',
2483
+ maxHeight: '1.5rem',
2484
+ marginRight: '$4'
2485
+ });
2486
+ function BlockchainsList(props) {
2487
+ var list = props.list,
2488
+ onChange = props.onChange,
2489
+ multiSelect = props.multiSelect,
2490
+ selectedList = props.selectedList;
2491
+ var _useState = useState(props.selected),
2492
+ selected = _useState[0],
2493
+ setSelected = _useState[1];
2494
+ var changeSelectedBlockchain = function changeSelectedBlockchain(blockchain) {
2495
+ setSelected(blockchain);
2496
+ onChange(blockchain);
2497
+ };
2498
+ var isSelect = function isSelect(name) {
2499
+ if (multiSelect && selectedList) {
2500
+ return selectedList === 'all' || selectedList.findIndex(function (item) {
2501
+ return name === item.name;
2502
+ }) > -1;
2503
+ }
2504
+ return name === (selected == null ? void 0 : selected.name);
2505
+ };
2506
+ return React__default.createElement(ListContainer, null, list.map(function (blockchain, index) {
2507
+ return React__default.createElement(Button, {
2508
+ type: isSelect(blockchain.name) ? 'primary' : undefined,
2509
+ variant: "outlined",
2510
+ size: "large",
2511
+ prefix: React__default.createElement(Image, {
2512
+ src: blockchain.logo
2513
+ }),
2514
+ suffix: isSelect(blockchain.name) ? React__default.createElement(FilledCircle, null) : undefined,
2515
+ align: "start",
2516
+ onClick: changeSelectedBlockchain.bind(null, blockchain),
2517
+ key: index
2518
+ }, React__default.createElement(Typography, {
2519
+ variant: "body2"
2520
+ }, blockchain.displayName));
2521
+ }));
2522
+ }
2523
+
2524
+ var DividerContainer = /*#__PURE__*/styled('div', {
2525
+ variants: {
2526
+ size: {
2527
+ 4: {
2528
+ height: '$4'
2529
+ },
2530
+ 8: {
2531
+ height: '$8'
2532
+ },
2533
+ 12: {
2534
+ height: '$12'
2535
+ },
2536
+ 16: {
2537
+ height: '$16'
2538
+ },
2539
+ 18: {
2540
+ height: '$18'
2541
+ },
2542
+ 20: {
2543
+ height: '$20'
2544
+ },
2545
+ 24: {
2546
+ height: '$24'
2547
+ },
2548
+ 32: {
2549
+ height: '$32'
2550
+ }
2551
+ }
2552
+ }
2553
+ });
2554
+ function Divider(_ref) {
2555
+ var _ref$size = _ref.size,
2556
+ size = _ref$size === void 0 ? 12 : _ref$size;
2557
+ return React__default.createElement(DividerContainer, {
2558
+ size: size
2559
+ });
2560
+ }
2561
+
2562
+ var HeaderContainer = /*#__PURE__*/styled('div', {
2563
+ display: 'flex',
2564
+ justifyContent: 'space-between',
2565
+ alignItems: 'center',
2566
+ padding: '$8 0',
2567
+ position: 'relative'
2568
+ });
2569
+ var BackButton = /*#__PURE__*/styled(Button, {
2570
+ padding: '$8'
2571
+ });
2572
+ function Header(props) {
2573
+ return React__default.createElement(HeaderContainer, null, props.onBack ? React__default.createElement(BackButton, {
2574
+ variant: "ghost",
2575
+ size: "small",
2576
+ onClick: props.onBack
2577
+ }, React__default.createElement(AngleLeftIcon, {
2578
+ size: 24
2579
+ })) : null, props.prefix, React__default.createElement(Typography, {
2580
+ variant: "h4"
2581
+ }, props.title), props.suffix || React__default.createElement("div", null));
2582
+ }
2583
+
2584
+ var _excluded$F = ["label", "prefix", "suffix", "children", "size", "style"];
2585
+ var InputContainer = /*#__PURE__*/styled('div', {
2586
+ backgroundColor: '$background',
2587
+ padding: '1px',
2588
+ boxSizing: 'border-box',
2589
+ border: '1px solid $neutrals400',
2590
+ borderRadius: '$5',
2591
+ height: '$48',
2592
+ display: 'flex',
2593
+ flexGrow: 1,
2594
+ position: 'relative',
2595
+ alignItems: 'center',
2596
+ color: '$foreground',
2597
+ transition: 'border-color ease .3s',
2598
+ '&:focus-within': {
2599
+ borderColor: '$success',
2600
+ outline: '1px solid $success'
2601
+ },
2602
+ variants: {
2603
+ size: {
2604
+ small: {
2605
+ height: '$32'
2606
+ },
2607
+ medium: {
2608
+ height: '$40'
2609
+ },
2610
+ large: {
2611
+ height: '$48'
2612
+ }
2613
+ },
2614
+ disabled: {
2615
+ "true": {
2616
+ backgroundColor: '$neutrals300',
2617
+ cursor: 'not-allowed',
2618
+ filter: 'grayscale(100%)'
2619
+ }
2620
+ },
2621
+ prefix: {
2622
+ "true": {
2623
+ paddingLeft: '$16'
2624
+ },
2625
+ "false": {
2626
+ paddingLeft: '$0'
2627
+ }
2628
+ },
2629
+ suffix: {
2630
+ "true": {
2631
+ paddingRight: '$16'
2632
+ },
2633
+ "false": {
2634
+ paddingRight: '$0'
2635
+ }
2636
+ }
2637
+ },
2638
+ defaultVariants: {
2639
+ size: 'medium'
2640
+ }
2641
+ });
2642
+ var Input = /*#__PURE__*/styled('input', {
2643
+ color: '$foreground',
2644
+ paddingLeft: '$16',
2645
+ paddingRight: '$16',
2646
+ flexGrow: 1,
2647
+ width: '100%',
2648
+ border: 'none',
2649
+ borderRadius: '$5',
2650
+ outline: 'none',
2651
+ fontSize: '$l',
2652
+ backgroundColor: 'transparent',
2653
+ '-webkit-appearance': 'none',
2654
+ margin: 0,
2655
+ '&:disabled': {
2656
+ cursor: 'not-allowed'
2657
+ }
2658
+ });
2659
+ var Label = /*#__PURE__*/styled('label', {
2660
+ display: 'inline-block',
2661
+ fontSize: '$14',
2662
+ color: '$foreground',
2663
+ marginBottom: '$4'
2664
+ });
2665
+ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
2666
+ var label = props.label,
2667
+ prefix = props.prefix,
2668
+ suffix = props.suffix,
2669
+ size = props.size,
2670
+ style = props.style,
2671
+ inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$F);
2672
+ return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
2673
+ className: "_text"
2674
+ }, inputAttributes.id && {
2675
+ htmlFor: inputAttributes.id
2676
+ }), label), React__default.createElement(InputContainer, {
2677
+ disabled: inputAttributes.disabled,
2678
+ prefix: !!prefix,
2679
+ suffix: !!suffix,
2680
+ size: size,
2681
+ style: style,
2682
+ className: "_text"
2683
+ }, prefix || null, React__default.createElement(Input, Object.assign({
2684
+ className: "_text"
2685
+ }, inputAttributes, {
2686
+ spellCheck: false,
2687
+ ref: ref
2688
+ })), suffix || null));
2689
+ });
2690
+
2691
+ var ContentContainer = /*#__PURE__*/styled('div', {
2692
+ overflow: 'hidden',
2693
+ display: 'flex',
2694
+ flexDirection: 'column',
2695
+ flex: '1',
2696
+ padding: '0 $4'
2697
+ });
2698
+ var TextFieldContainer = /*#__PURE__*/styled('div', {
2699
+ padding: '1px'
2700
+ });
2701
+ function SecondaryPage(props) {
2702
+ var title = props.title,
2703
+ Footer = props.Footer,
2704
+ TopButton = props.TopButton,
2705
+ onBack = props.onBack,
2706
+ _props$hasHeader = props.hasHeader,
2707
+ hasHeader = _props$hasHeader === void 0 ? true : _props$hasHeader;
2708
+ var _useState = useState(''),
2709
+ searchedFor = _useState[0],
2710
+ setSearchedFor = _useState[1];
2711
+ return React__default.createElement(React__default.Fragment, null, hasHeader && React__default.createElement(Header, {
2712
+ onBack: onBack,
2713
+ title: title || '',
2714
+ suffix: TopButton
2715
+ }), React__default.createElement(ContentContainer, null, props.textField && React__default.createElement(TextFieldContainer, null, React__default.createElement(TextField, {
2716
+ size: "large",
2717
+ prefix: React__default.createElement(SearchIcon, {
2718
+ size: 24
2719
+ }),
2720
+ placeholder: props.textFieldPlaceholder,
2721
+ onChange: function onChange(event) {
2722
+ return setSearchedFor(event.target.value);
2723
+ },
2724
+ value: searchedFor,
2725
+ autoFocus: true
2726
+ }), React__default.createElement(Divider, {
2727
+ size: 16
2728
+ })), props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
2729
+ }
2730
+
2731
+ var containsText = function containsText(text, searchText) {
2732
+ return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
2733
+ };
2734
+ var getConciseAddress = function getConciseAddress(address, maxChars, ellipsisLength) {
2735
+ if (maxChars === void 0) {
2736
+ maxChars = 8;
2737
+ }
2738
+ if (ellipsisLength === void 0) {
2739
+ ellipsisLength = 3;
2740
+ }
2741
+ if (!address) return null;
2742
+ if (address.length < 2 * maxChars + ellipsisLength) return address;
2743
+ var start = Math.ceil((address.length - maxChars) / 2);
2744
+ var end = address.length - maxChars;
2745
+ return "" + address.substr(start, maxChars) + '.'.repeat(ellipsisLength) + address.substr(end);
2746
+ };
2747
+
2748
+ var SpacerContainer = /*#__PURE__*/styled('div', {
2749
+ variants: {
2750
+ size: {
2751
+ 4: {},
2752
+ 8: {},
2753
+ 12: {},
2754
+ 16: {},
2755
+ 18: {},
2756
+ 20: {},
2757
+ 24: {}
2758
+ },
2759
+ direction: {
2760
+ vertical: {},
2761
+ horizontal: {}
2762
+ }
2763
+ },
2764
+ compoundVariants: [{
2765
+ size: 4,
2766
+ direction: 'horizontal',
2767
+ css: {
2768
+ width: '$4'
2769
+ }
2770
+ }, {
2771
+ size: 4,
2772
+ direction: 'vertical',
2773
+ css: {
2774
+ height: '$4'
2775
+ }
2776
+ }, {
2777
+ size: 8,
2778
+ direction: 'horizontal',
2779
+ css: {
2780
+ width: '$8'
2781
+ }
2782
+ }, {
2783
+ size: 8,
2784
+ direction: 'vertical',
2785
+ css: {
2786
+ height: '$8'
2787
+ }
2788
+ }, {
2789
+ size: 12,
2790
+ direction: 'horizontal',
2791
+ css: {
2792
+ width: '$12'
2793
+ }
2794
+ }, {
2795
+ size: 12,
2796
+ direction: 'vertical',
2797
+ css: {
2798
+ height: '$12'
2799
+ }
2800
+ }, {
2801
+ size: 16,
2802
+ direction: 'horizontal',
2803
+ css: {
2804
+ width: '$16'
2805
+ }
2806
+ }, {
2807
+ size: 16,
2808
+ direction: 'vertical',
2809
+ css: {
2810
+ height: '$16'
2811
+ }
2812
+ }, {
2813
+ size: 18,
2814
+ direction: 'horizontal',
2815
+ css: {
2816
+ width: '$18'
2817
+ }
2818
+ }, {
2819
+ size: 18,
2820
+ direction: 'vertical',
2821
+ css: {
2822
+ height: '$18'
2823
+ }
2824
+ }, {
2825
+ size: 20,
2826
+ direction: 'horizontal',
2827
+ css: {
2828
+ width: '$20'
2829
+ }
2830
+ }, {
2831
+ size: 20,
2832
+ direction: 'vertical',
2833
+ css: {
2834
+ height: '$20'
2835
+ }
2836
+ }, {
2837
+ size: 24,
2838
+ direction: 'horizontal',
2839
+ css: {
2840
+ width: '$24'
2841
+ }
2842
+ }, {
2843
+ size: 24,
2844
+ direction: 'vertical',
2845
+ css: {
2846
+ height: '$24'
2847
+ }
2848
+ }]
2849
+ });
2850
+ function Spacer(_ref) {
2851
+ var _ref$size = _ref.size,
2852
+ size = _ref$size === void 0 ? 12 : _ref$size,
2853
+ _ref$direction = _ref.direction,
2854
+ direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
2855
+ return React__default.createElement(SpacerContainer, {
2856
+ size: size,
2857
+ direction: direction
2858
+ });
2859
+ }
2860
+
2861
+ var MainContainer = /*#__PURE__*/styled('div', {
2862
+ width: '100%',
2863
+ padding: '$16',
2864
+ borderRadius: '$5',
2865
+ backgroundColor: '$neutrals300',
2866
+ color: '$neutrals800',
2867
+ '.main': {
2868
+ display: 'flex',
2869
+ alignItems: 'center'
2870
+ },
2871
+ '.footer': {
2872
+ paddingTop: '$8'
2873
+ },
2874
+ '&.hasIcon .footer': {
2875
+ paddingLeft: '$32'
2876
+ },
2877
+ variants: {
2878
+ type: {
2879
+ primary: {
2880
+ color: '$primary200'
2881
+ },
2882
+ secondary: {
2883
+ color: '$foreground'
2884
+ },
2885
+ success: {
2886
+ color: '$success300'
2887
+ },
2888
+ warning: {
2889
+ color: '$warning500'
2890
+ },
2891
+ error: {
2892
+ color: '$error300'
2893
+ }
2894
+ }
2895
+ }
2896
+ });
2897
+ function Alert(props) {
2898
+ var type = props.type,
2899
+ children = props.children,
2900
+ title = props.title;
2901
+ var showIcon = ['error', 'success', 'warning'].includes(type);
2902
+ return React__default.createElement(MainContainer, {
2903
+ type: type,
2904
+ className: showIcon ? 'hasIcon' : ''
2905
+ }, React__default.createElement("div", {
2906
+ className: "main"
2907
+ }, showIcon && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
2908
+ style: {
2909
+ width: '32px',
2910
+ display: 'flex',
2911
+ justifyContent: 'center',
2912
+ alignItems: 'center'
2913
+ }
2914
+ }, type === 'success' && React__default.createElement(CheckCircleIcon, {
2915
+ color: type,
2916
+ size: 24
2917
+ }), type === 'warning' && React__default.createElement(WarningIcon, {
2918
+ color: type,
2919
+ size: 24
2920
+ }), type === 'error' && React__default.createElement(InfoCircleIcon, {
2921
+ color: type,
2922
+ size: 24
2923
+ }), React__default.createElement(Spacer, {
2924
+ size: 8
2925
+ }))), React__default.createElement("div", {
2926
+ style: {
2927
+ display: 'flex',
2928
+ justifyContent: 'center',
2929
+ alignItems: 'start',
2930
+ flexDirection: 'column',
2931
+ width: '100%'
2932
+ }
2933
+ }, title && React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
2934
+ className: "title",
2935
+ variant: "h6",
2936
+ color: type
2937
+ }, title), !!children && React__default.createElement(Spacer, {
2938
+ size: 8,
2939
+ direction: "vertical"
2940
+ })), children)), props.footer ? React__default.createElement("div", {
2941
+ className: "footer"
2942
+ }, props.footer) : null);
2943
+ }
2944
+
2945
+ function LoadingFailedAlert() {
2946
+ return React__default.createElement(Alert, {
2947
+ type: "error",
2948
+ title: " Error connecting server, please reload the app and try again."
2949
+ });
2950
+ }
2951
+
2952
+ function NotFoundAlert(props) {
2953
+ var catergory = props.catergory,
2954
+ searchedFor = props.searchedFor;
2955
+ return React__default.createElement(Alert, {
2956
+ type: "secondary",
2957
+ title: catergory + " " + (searchedFor ? "'" + searchedFor + "'" : '') + " not found."
2958
+ });
2959
+ }
2960
+
2961
+ function VirtualizedList(props) {
2962
+ var itemCount = props.itemCount,
2963
+ hasNextPage = props.hasNextPage,
2964
+ loadNextPage = props.loadNextPage,
2965
+ Item = props.Item,
2966
+ innerElementType = props.innerElementType,
2967
+ size = props.size;
2968
+ var isItemLoaded = function isItemLoaded(index) {
2969
+ return !hasNextPage || index < itemCount;
2970
+ };
2971
+ return React__default.createElement(AutoSizer, null, function (_ref) {
2972
+ var width = _ref.width,
2973
+ height = _ref.height;
2974
+ return React__default.createElement(InfiniteLoader, {
2975
+ isItemLoaded: isItemLoaded,
2976
+ itemCount: hasNextPage ? itemCount + 1 : itemCount,
2977
+ loadMoreItems: loadNextPage,
2978
+ threshold: 1
2979
+ }, function (_ref2) {
2980
+ var onItemsRendered = _ref2.onItemsRendered,
2981
+ ref = _ref2.ref;
2982
+ return React__default.createElement(VariableSizeList, {
2983
+ innerElementType: innerElementType,
2984
+ ref: ref,
2985
+ itemSize: function itemSize() {
2986
+ return size;
2987
+ },
2988
+ itemCount: itemCount,
2989
+ height: height || 0,
2990
+ width: width || 0,
2991
+ onItemsRendered: onItemsRendered
2992
+ }, function (_ref3) {
2993
+ var index = _ref3.index,
2994
+ style = _ref3.style;
2995
+ return isItemLoaded(index) ? React__default.createElement(Item, {
2996
+ index: index,
2997
+ style: style
2998
+ }) : null;
2999
+ });
3000
+ });
3001
+ });
3002
+ }
3003
+
3004
+ var TokenImage = /*#__PURE__*/styled('img', {
3005
+ width: '$32',
3006
+ maxHeight: '$32',
3007
+ marginRight: '$16'
3008
+ });
3009
+ var TokenNameContainer = /*#__PURE__*/styled('div', {
3010
+ display: 'flex',
3011
+ flexDirection: 'column'
3012
+ });
3013
+ var TokenAmountContainer = /*#__PURE__*/styled('div', {
3014
+ display: 'flex',
3015
+ flexDirection: 'column',
3016
+ alignItems: 'flex-end'
3017
+ });
3018
+ function TokenItem(props) {
3019
+ var _token$balance;
3020
+ var token = props.token,
3021
+ style = props.style,
3022
+ onClick = props.onClick,
3023
+ selected = props.selected;
3024
+ return React__default.createElement("div", {
3025
+ style: _extends({
3026
+ display: 'flex',
3027
+ alignItems: 'center',
3028
+ width: '100%'
3029
+ }, style, {
3030
+ height: '48px',
3031
+ top: parseFloat(style == null ? void 0 : style.top) + 0 + "px",
3032
+ padding: '0 4px'
3033
+ })
3034
+ }, React__default.createElement(Button, {
3035
+ variant: "outlined",
3036
+ size: "large",
3037
+ align: "start",
3038
+ onClick: onClick.bind(null, token),
3039
+ type: selected ? 'primary' : undefined,
3040
+ prefix: React__default.createElement(TokenImage, {
3041
+ src: token.image
3042
+ }),
3043
+ suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
3044
+ variant: "body2"
3045
+ }, token.balance.amount), React__default.createElement(Typography, {
3046
+ variant: "caption"
3047
+ }, token.balance.usdValue + "$"))
3048
+ }, React__default.createElement(TokenNameContainer, null, React__default.createElement(Typography, {
3049
+ variant: "body1"
3050
+ }, token.symbol), React__default.createElement(Typography, {
3051
+ variant: "caption",
3052
+ color: "neutrals600"
3053
+ }, token.name))));
3054
+ }
3055
+
3056
+ var _excluded$G = ["style"];
3057
+ var PAGE_SIZE = 20;
3058
+ function TokenList(props) {
3059
+ var list = props.list,
3060
+ searchedText = props.searchedText,
3061
+ onChange = props.onChange,
3062
+ multiSelect = props.multiSelect,
3063
+ selectedList = props.selectedList;
3064
+ var _useState = useState(props.selected),
3065
+ selected = _useState[0],
3066
+ setSelected = _useState[1];
3067
+ var changeSelected = function changeSelected(token) {
3068
+ setSelected(token);
3069
+ onChange(token);
3070
+ };
3071
+ var isSelected = function isSelected(token) {
3072
+ if (multiSelect && selectedList) {
3073
+ return selectedList === 'all' || selectedList.map(function (item) {
3074
+ return item.symbol + item.address;
3075
+ }).indexOf(token.symbol + token.address) > -1;
3076
+ }
3077
+ return (selected == null ? void 0 : selected.symbol) === token.symbol && (selected == null ? void 0 : selected.address) === token.address;
3078
+ };
3079
+ var _useState2 = useState(true),
3080
+ hasNextPage = _useState2[0],
3081
+ setHasNextPage = _useState2[1];
3082
+ var _useState3 = useState(list),
3083
+ tokens = _useState3[0],
3084
+ setTokens = _useState3[1];
3085
+ var loadNextPage = function loadNextPage() {
3086
+ setTokens(list.slice(0, tokens.length + PAGE_SIZE));
3087
+ };
3088
+ useEffect(function () {
3089
+ setTokens(list.slice(0, PAGE_SIZE));
3090
+ }, [searchedText, list]);
3091
+ useEffect(function () {
3092
+ setHasNextPage(list.length > tokens.length);
3093
+ }, [tokens.length]);
3094
+ var innerElementType = forwardRef(function (_ref, ref) {
3095
+ var style = _ref.style,
3096
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
3097
+ return React__default.createElement("div", Object.assign({
3098
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3099
+ ref: ref,
3100
+ style: _extends({}, style, {
3101
+ height: parseFloat(style == null ? void 0 : style.height) + 8 * 2 + "px"
3102
+ })
3103
+ }, rest));
3104
+ });
3105
+ return React__default.createElement(VirtualizedList, {
3106
+ Item: function Item(_ref2) {
3107
+ var index = _ref2.index,
3108
+ style = _ref2.style;
3109
+ return React__default.createElement(TokenItem, {
3110
+ token: tokens[index],
3111
+ style: style,
3112
+ onClick: changeSelected,
3113
+ selected: isSelected(tokens[index])
3114
+ });
3115
+ },
3116
+ hasNextPage: hasNextPage,
3117
+ itemCount: tokens.length,
3118
+ loadNextPage: loadNextPage,
3119
+ innerElementType: innerElementType,
3120
+ size: 56
3121
+ });
3122
+ }
3123
+
3124
+ var Container$1 = /*#__PURE__*/styled('div', {
3125
+ flex: '1'
3126
+ });
3127
+ var LoaderContainer = /*#__PURE__*/styled('div', {
3128
+ display: 'flex',
3129
+ justifyContent: 'center',
3130
+ width: '100%',
3131
+ position: 'absolute',
3132
+ top: '50%'
3133
+ });
3134
+ var filterTokens = function filterTokens(list, searchedFor) {
3135
+ return list.filter(function (token) {
3136
+ return containsText(token.symbol, searchedFor) || containsText(token.address || '', searchedFor) || containsText(token.name || '', searchedFor);
3137
+ });
3138
+ };
3139
+ function TokenSelector(props) {
3140
+ var list = props.list,
3141
+ type = props.type,
3142
+ selected = props.selected,
3143
+ onChange = props.onChange,
3144
+ hasHeader = props.hasHeader,
3145
+ multiSelect = props.multiSelect,
3146
+ selectedList = props.selectedList,
3147
+ onBack = props.onBack,
3148
+ loadingStatus = props.loadingStatus;
3149
+ return React__default.createElement(SecondaryPage, {
3150
+ textField: true,
3151
+ textFieldPlaceholder: "Search Blockchain By Name",
3152
+ title: "Select " + type + " Token",
3153
+ hasHeader: hasHeader,
3154
+ onBack: onBack
3155
+ }, function (searchedFor) {
3156
+ var filteredTokens = filterTokens(list, searchedFor);
3157
+ return React__default.createElement(Container$1, null, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
3158
+ size: 24
3159
+ })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredTokens.length ? React__default.createElement(TokenList, {
3160
+ searchedText: searchedFor,
3161
+ list: filteredTokens,
3162
+ selected: selected,
3163
+ selectedList: selectedList,
3164
+ multiSelect: multiSelect,
3165
+ onChange: onChange
3166
+ }) : React__default.createElement(NotFoundAlert, {
3167
+ catergory: "Token",
3168
+ searchedFor: searchedFor
3169
+ })));
3170
+ });
3171
+ }
3172
+
3173
+ var ListContainer$1 = /*#__PURE__*/styled('div', {
3174
+ overflowY: 'auto'
3175
+ });
3176
+ var filterBlockchains = function filterBlockchains(list, searchedFor) {
3177
+ return list.filter(function (blockchain) {
3178
+ return containsText(blockchain.name, searchedFor) || containsText(blockchain.displayName, searchedFor);
3179
+ });
3180
+ };
3181
+ function BlockchainSelector(props) {
3182
+ var type = props.type,
3183
+ list = props.list,
3184
+ onChange = props.onChange,
3185
+ selected = props.selected,
3186
+ onBack = props.onBack,
3187
+ loadingStatus = props.loadingStatus,
3188
+ hasHeader = props.hasHeader,
3189
+ listContainerStyle = props.listContainerStyle,
3190
+ multiSelect = props.multiSelect,
3191
+ selectedList = props.selectedList;
3192
+ return React__default.createElement(SecondaryPage, {
3193
+ textField: true,
3194
+ hasHeader: hasHeader,
3195
+ textFieldPlaceholder: "Search Blockchain By Name",
3196
+ title: "Select " + type + " Network",
3197
+ onBack: onBack
3198
+ }, function (searchedFor) {
3199
+ var filteredBlockchains = filterBlockchains(list, searchedFor);
3200
+ return React__default.createElement(ListContainer$1, {
3201
+ style: listContainerStyle,
3202
+ key: "1"
3203
+ }, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
3204
+ size: 24
3205
+ })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
3206
+ list: filteredBlockchains,
3207
+ selected: selected,
3208
+ multiSelect: multiSelect,
3209
+ selectedList: selectedList,
3210
+ onChange: onChange
3211
+ }) : React__default.createElement(NotFoundAlert, {
3212
+ catergory: "Blockchain",
3213
+ searchedFor: searchedFor
3214
+ })));
3215
+ });
3216
+ }
3217
+
3218
+ var _excluded$H = ["label", "id"];
3219
+ var CheckboxContainer = /*#__PURE__*/styled('div', {
3220
+ display: 'flex',
3221
+ alignItems: 'center'
3222
+ });
3223
+ var CheckboxRoot = /*#__PURE__*/styled(Root$1, {
3224
+ borderRadius: '5px',
3225
+ width: 20,
3226
+ padding: 0,
3227
+ height: 20,
3228
+ border: '1px solid $foreground',
3229
+ display: 'flex',
3230
+ alignItems: 'center',
3231
+ justifyContent: 'center',
3232
+ marginRight: '$2',
3233
+ backgroundColor: '$neutral-100'
3234
+ });
3235
+ var Label$1 = /*#__PURE__*/styled('label', {
3236
+ color: '$foreground',
3237
+ fontSize: '$m',
3238
+ marginLeft: '$8'
3239
+ });
3240
+ function Checkbox(_ref) {
3241
+ var label = _ref.label,
3242
+ id = _ref.id,
3243
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
3244
+ return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
3245
+ id: id
3246
+ }, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
3247
+ size: 20
3248
+ }))), React__default.createElement(Label$1, {
3249
+ className: "_text",
3250
+ htmlFor: id
3251
+ }, label));
3252
+ }
3253
+
3254
+ var ChipCointainer = /*#__PURE__*/styled('div', {
3255
+ display: 'inline-flex',
3256
+ justifyContent: 'center',
3257
+ alignItems: 'center',
3258
+ borderRadius: '$5',
3259
+ padding: '$4 $8',
3260
+ height: '32',
3261
+ fontSize: '$14',
3262
+ cursor: 'pointer',
3263
+ transition: 'all 0.35s',
3264
+ color: '$foreground',
3265
+ '&:hover': {
3266
+ backgroundColor: '$success700',
3267
+ color: '$background'
3268
+ },
3269
+ variants: {
3270
+ selected: {
3271
+ "true": {
3272
+ backgroundColor: '$success',
3273
+ color: '$background'
3274
+ },
3275
+ "false": {
3276
+ backgroundColor: '$background'
3277
+ }
3278
+ }
3279
+ }
3280
+ });
3281
+ function Chip(props) {
3282
+ var label = props.label,
3283
+ selected = props.selected,
3284
+ prefix = props.prefix,
3285
+ suffix = props.suffix,
3286
+ onClick = props.onClick,
3287
+ style = props.style;
3288
+ return React__default.createElement(ChipCointainer, {
3289
+ selected: selected,
3290
+ onClick: onClick,
3291
+ style: style
3292
+ }, prefix || null, label, suffix || null);
3293
+ }
3294
+
3295
+ var BackDrop = /*#__PURE__*/styled('div', {
3296
+ position: 'fixed',
3297
+ display: 'flex',
3298
+ justifyContent: 'center',
3299
+ alignItems: 'center',
3300
+ top: '0',
3301
+ left: '0',
3302
+ width: '100vw',
3303
+ height: '100vh',
3304
+ backgroundColor: 'rgba(0,0,0,.1)'
3305
+ });
3306
+ var ModalContainer = /*#__PURE__*/styled('div', {
3307
+ backgroundColor: '$background',
3308
+ borderRadius: '$10',
3309
+ padding: '$16 $16',
3310
+ display: 'flex',
3311
+ flexDirection: 'column',
3312
+ boxShadow: '$s',
3313
+ zIndex: 10
3314
+ });
3315
+ var Row = /*#__PURE__*/styled('div', {
3316
+ display: 'flex',
3317
+ alignItems: 'center'
3318
+ });
3319
+ var ModalHeader = /*#__PURE__*/styled('div', {
3320
+ display: 'flex',
3321
+ justifyContent: 'space-between',
3322
+ alignItems: 'center',
3323
+ position: 'relative',
3324
+ marginBottom: '$16'
3325
+ });
3326
+ var ContentContainer$1 = /*#__PURE__*/styled('div', {});
3327
+ function Modal(props) {
3328
+ var title = props.title,
3329
+ content = props.content,
3330
+ open = props.open,
3331
+ onClose = props.onClose,
3332
+ containerStyle = props.containerStyle,
3333
+ action = props.action,
3334
+ contentStyle = props.contentStyle;
3335
+ var handleBackDropClick = function handleBackDropClick(event) {
3336
+ if (event.target === event.currentTarget) onClose();
3337
+ };
3338
+ useEffect(function () {
3339
+ if (open) document.body.style.overflow = 'hidden';else document.body.style.overflow = 'unset';
3340
+ }, [open]);
3341
+ return React__default.createElement(React__default.Fragment, null, open && createPortal(React__default.createElement(BackDrop, {
3342
+ onClick: handleBackDropClick
3343
+ }, React__default.createElement(ModalContainer, {
3344
+ style: containerStyle
3345
+ }, React__default.createElement(ModalHeader, null, React__default.createElement(Typography, {
3346
+ variant: "h4"
3347
+ }, title), React__default.createElement(Row, null, action, React__default.createElement(CloseIcon, {
3348
+ size: 24,
3349
+ onClick: onClose
3350
+ }))), React__default.createElement(ContentContainer$1, {
3351
+ style: contentStyle
3352
+ }, content))), document.body));
3353
+ }
3354
+
3355
+ var WalletState;
3356
+ (function (WalletState) {
3357
+ WalletState["NOT_INSTALLED"] = "not installed";
3358
+ WalletState["DISCONNECTED"] = "disconnected";
3359
+ WalletState["CONNECTING"] = "connecting";
3360
+ WalletState["CONNECTED"] = "connected";
3361
+ })(WalletState || (WalletState = {}));
3362
+
3363
+ var StateIconContainer = /*#__PURE__*/styled('span', {
3364
+ display: 'flex',
3365
+ justifyContent: 'center',
3366
+ alignItems: 'center'
3367
+ });
3368
+ var State = function State(_ref) {
3369
+ var walletState = _ref.walletState,
3370
+ installLink = _ref.installLink;
3371
+ return React__default.createElement(Fragment, null, walletState !== WalletState.DISCONNECTED && React__default.createElement(StateIconContainer, null, walletState === WalletState.NOT_INSTALLED && React__default.createElement("a", {
3372
+ href: detectInstallLink(installLink),
3373
+ target: "_blank"
3374
+ }, React__default.createElement(DownloadIcon, {
3375
+ size: 24,
3376
+ color: "success"
3377
+ })), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
3378
+ };
3379
+
3380
+ var WalletImage = /*#__PURE__*/styled('img', {
3381
+ width: '$24',
3382
+ height: '$24',
3383
+ marginRight: '$12'
3384
+ });
3385
+ var Text = /*#__PURE__*/styled('div', {
3386
+ display: 'flex',
3387
+ flexDirection: 'column'
3388
+ });
3389
+ var ExtendedButton = /*#__PURE__*/styled(Button, {
3390
+ variants: {
3391
+ type: {
3392
+ primary: {
3393
+ outline: '1px solid $primary',
3394
+ borderColor: '$primary',
3395
+ '&:hover': {
3396
+ borderColor: '$primary'
3397
+ }
3398
+ }
3399
+ }
3400
+ }
3401
+ });
3402
+ function Wallet(props) {
3403
+ var name = props.name,
3404
+ type = props.type,
3405
+ image = props.image,
3406
+ state = props.state,
3407
+ _onClick = props.onClick,
3408
+ installLink = props.installLink;
3409
+ return React__default.createElement(ExtendedButton, {
3410
+ type: state === WalletState.CONNECTED ? 'primary' : undefined,
3411
+ disabled: state == WalletState.CONNECTING,
3412
+ onClick: function onClick() {
3413
+ if (state === WalletState.NOT_INSTALLED) {
3414
+ window.open(detectInstallLink(installLink), '_blank');
3415
+ } else _onClick(type);
3416
+ },
3417
+ align: "start",
3418
+ variant: "outlined",
3419
+ size: "large",
3420
+ prefix: React__default.createElement(WalletImage, {
3421
+ src: image
3422
+ }),
3423
+ suffix: React__default.createElement(State, {
3424
+ walletState: state,
3425
+ installLink: installLink
3426
+ })
3427
+ }, React__default.createElement(Text, null, React__default.createElement(Typography, {
3428
+ variant: "h5",
3429
+ noWrap: false
3430
+ }, name), state === WalletState.CONNECTED ? React__default.createElement(Typography, {
3431
+ variant: "caption",
3432
+ noWrap: false,
3433
+ color: "primary"
3434
+ }, "Connected") : null));
3435
+ }
3436
+
3437
+ var ModalContent = /*#__PURE__*/styled('div', {
3438
+ display: 'grid',
3439
+ gap: '$8',
3440
+ gridTemplateColumns: 'repeat(2, minmax(0, 1fr))'
3441
+ });
3442
+ function ConnectWalletsModal(props) {
3443
+ var open = props.open,
3444
+ list = props.list,
3445
+ onSelect = props.onSelect,
3446
+ onClose = props.onClose;
3447
+ var Content = React__default.createElement(ModalContent, null, list.map(function (info, index) {
3448
+ return React__default.createElement(Wallet, Object.assign({}, info, {
3449
+ key: index,
3450
+ onClick: onSelect
3451
+ }));
3452
+ }));
3453
+ return React__default.createElement(Modal, {
3454
+ title: "Connect Wallets",
3455
+ open: open,
3456
+ content: Content,
3457
+ onClose: onClose,
3458
+ containerStyle: {
3459
+ width: '75%',
3460
+ maxWidth: '30rem',
3461
+ height: '70%'
3462
+ }
3463
+ });
3464
+ }
3465
+
3466
+ var StyledSwitchRoot = /*#__PURE__*/styled(Root$2, {
3467
+ boxSizing: 'border-box',
3468
+ boxShadow: 'none',
3469
+ borderStyle: 'solid',
3470
+ width: '42px',
3471
+ height: '22px',
3472
+ backgroundColor: '$neutrals600',
3473
+ borderColor: '$neutrals600',
3474
+ borderRadius: '99999px',
3475
+ position: 'relative',
3476
+ padding: '0',
3477
+ cursor: 'pointer',
3478
+ '&[data-state="checked"]': {
3479
+ backgroundColor: '$success',
3480
+ borderColor: '$success'
3481
+ },
3482
+ '-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)'
3483
+ });
3484
+ var StyledSwitchThumb = /*#__PURE__*/styled(Thumb, {
3485
+ position: 'absolute',
3486
+ top: '0',
3487
+ boxSizing: 'border-box',
3488
+ display: 'block',
3489
+ width: '18px',
3490
+ height: '18px',
3491
+ backgroundColor: '$white',
3492
+ transition: ' transform 300ms',
3493
+ borderRadius: '999999px',
3494
+ willChange: 'transform',
3495
+ '&[data-state="checked"]': {
3496
+ transform: 'translateX(20px)'
3497
+ }
3498
+ });
3499
+ function Switch(props) {
3500
+ var checked = props.checked,
3501
+ onChange = props.onChange;
3502
+ return React__default.createElement(StyledSwitchRoot, {
3503
+ checked: checked,
3504
+ onCheckedChange: onChange
3505
+ }, React__default.createElement(StyledSwitchThumb, null));
3506
+ }
3507
+
3508
+ var groupLiquiditySources = function groupLiquiditySources(liquiditySources) {
3509
+ return {
3510
+ bridge: liquiditySources.filter(function (liquiditySource) {
3511
+ return liquiditySource.type === 'BRIDGE' || liquiditySource.type === 'AGGREGATOR';
3512
+ }),
3513
+ exchange: liquiditySources.filter(function (liquiditySource) {
3514
+ return liquiditySource.type === 'DEX';
3515
+ })
3516
+ };
3517
+ };
3518
+ var MainContainer$1 = /*#__PURE__*/styled('div', {
3519
+ variants: {
3520
+ loaded: {
3521
+ "true": {
3522
+ overflowY: 'auto'
3523
+ }
3524
+ }
3525
+ }
3526
+ });
3527
+ var LiquiditySourceType = /*#__PURE__*/styled('div', {
3528
+ position: 'sticky',
3529
+ display: 'flex',
3530
+ justifyContent: 'space-between',
3531
+ alignItems: 'center',
3532
+ top: '0',
3533
+ backgroundColor: '$background',
3534
+ zIndex: '9999',
3535
+ paddingTop: '$8',
3536
+ paddingBottom: '$8'
3537
+ });
3538
+ var LiquidityImage = /*#__PURE__*/styled('img', {
3539
+ width: '$20',
3540
+ maxHeight: '$20',
3541
+ marginRight: '$16'
3542
+ });
3543
+ var LoaderContainer$1 = /*#__PURE__*/styled('div', {
3544
+ display: 'flex',
3545
+ justifyContent: 'center'
3546
+ });
3547
+ function LiquiditySourceList(props) {
3548
+ var list = props.list,
3549
+ onChange = props.onChange,
3550
+ listContainerStyle = props.listContainerStyle,
3551
+ loadingStatus = props.loadingStatus,
3552
+ searchedFor = props.searchedFor;
3553
+ var _useState = useState(list.filter(function (item) {
3554
+ return item.selected;
3555
+ })),
3556
+ selected = _useState[0],
3557
+ setSelected = _useState[1];
3558
+ var changeLiquiditySources = function changeLiquiditySources(clickedItem) {
3559
+ clickedItem.selected = !clickedItem.selected;
3560
+ setSelected(function (prevState) {
3561
+ if (clickedItem.selected) return [].concat(prevState, [clickedItem]);
3562
+ return prevState.filter(function (item) {
3563
+ return item.title != clickedItem.title;
3564
+ });
3565
+ });
3566
+ onChange(clickedItem);
3567
+ };
3568
+ var isSelected = function isSelected(liquiditySource) {
3569
+ return !!selected.find(function (item) {
3570
+ return liquiditySource.title === item.title;
3571
+ });
3572
+ };
3573
+ useEffect(function () {
3574
+ setSelected(list.filter(function (item) {
3575
+ return item.selected;
3576
+ }));
3577
+ }, [list]);
3578
+ var sections = groupLiquiditySources(list);
3579
+ var bridges = sections.bridge;
3580
+ var exchanges = sections.exchange;
3581
+ var totalBridges = bridges.length;
3582
+ var totalExchanges = exchanges.length;
3583
+ // TODO: This is not performant
3584
+ var totalSelectedBridges = bridges.filter(isSelected).length;
3585
+ var totalSelectedExchanges = exchanges.filter(isSelected).length;
3586
+ return React__default.createElement(MainContainer$1, {
3587
+ style: listContainerStyle,
3588
+ loaded: loadingStatus === 'success'
3589
+ }, React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
3590
+ variant: "h5"
3591
+ }, "Bridges"), React__default.createElement(Typography, {
3592
+ variant: "body1",
3593
+ color: "neutrals800"
3594
+ }, totalSelectedBridges === totalBridges ? totalBridges : totalSelectedBridges + " / " + totalBridges)), React__default.createElement(Spacer, {
3595
+ size: 12,
3596
+ direction: "vertical"
3597
+ }), loadingStatus === 'loading' && React__default.createElement(LoaderContainer$1, null, React__default.createElement(Spinner, {
3598
+ size: 24
3599
+ })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, totalBridges ? bridges.map(function (liquiditySource, index) {
3600
+ return React__default.createElement(LiquiditySourceItem, {
3601
+ liquiditySource: liquiditySource,
3602
+ key: index,
3603
+ selected: isSelected(liquiditySource),
3604
+ onChange: changeLiquiditySources
3605
+ });
3606
+ }) : React__default.createElement(NotFoundAlert, {
3607
+ catergory: "Bridge",
3608
+ searchedFor: searchedFor
3609
+ }))), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
3610
+ variant: "h5"
3611
+ }, "Exchanges"), React__default.createElement(Typography, {
3612
+ variant: "body1",
3613
+ color: "neutrals800"
3614
+ }, totalSelectedExchanges === totalExchanges ? totalExchanges : totalSelectedExchanges + " / " + totalExchanges)), React__default.createElement(Spacer, {
3615
+ size: 12,
3616
+ direction: "vertical"
3617
+ }), loadingStatus === 'loading' && React__default.createElement(LoaderContainer$1, null, React__default.createElement(Spinner, {
3618
+ size: 24
3619
+ })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus == 'success' && React__default.createElement(React__default.Fragment, null, totalExchanges ? exchanges.map(function (liquiditySource, index) {
3620
+ return React__default.createElement(LiquiditySourceItem, {
3621
+ liquiditySource: liquiditySource,
3622
+ key: index,
3623
+ selected: isSelected(liquiditySource),
3624
+ onChange: changeLiquiditySources
3625
+ });
3626
+ }) : React__default.createElement(NotFoundAlert, {
3627
+ catergory: "Exchange",
3628
+ searchedFor: searchedFor
3629
+ }))));
3630
+ }
3631
+ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
3632
+ var liquiditySource = _ref.liquiditySource,
3633
+ selected = _ref.selected,
3634
+ onChange = _ref.onChange;
3635
+ return React__default.createElement(Button, {
3636
+ size: "large",
3637
+ align: "start",
3638
+ variant: "outlined",
3639
+ prefix: React__default.createElement(LiquidityImage, {
3640
+ src: liquiditySource.logo
3641
+ }),
3642
+ suffix: React__default.createElement(Switch, {
3643
+ checked: selected
3644
+ }),
3645
+ style: {
3646
+ marginBottom: '12px'
3647
+ },
3648
+ onClick: onChange.bind(null, liquiditySource)
3649
+ }, React__default.createElement(Typography, {
3650
+ variant: "body1"
3651
+ }, liquiditySource.title));
3652
+ };
3653
+
3654
+ var filterLiquiditySources = function filterLiquiditySources(liquiditySources, searchedFor) {
3655
+ return liquiditySources.filter(function (liquiditySource) {
3656
+ return containsText(liquiditySource.title, searchedFor || '');
3657
+ });
3658
+ };
3659
+ function LiquiditySourcesSelector(props) {
3660
+ var list = props.list,
3661
+ onChange = props.onChange,
3662
+ onBack = props.onBack,
3663
+ hasHeader = props.hasHeader,
3664
+ listContainerStyle = props.listContainerStyle,
3665
+ toggleAll = props.toggleAll,
3666
+ loadingStatus = props.loadingStatus;
3667
+ return React__default.createElement(SecondaryPage, {
3668
+ textField: true,
3669
+ textFieldPlaceholder: "Search By Name",
3670
+ title: "Liquidity Sources",
3671
+ TopButton: React__default.createElement(Button, {
3672
+ variant: "ghost",
3673
+ type: "primary",
3674
+ onClick: toggleAll
3675
+ }, list.find(function (item) {
3676
+ return item.selected;
3677
+ }) ? 'Deselect all' : 'Select all'),
3678
+ hasHeader: hasHeader,
3679
+ onBack: onBack
3680
+ }, function (searchedFor) {
3681
+ return React__default.createElement(LiquiditySourceList, {
3682
+ listContainerStyle: listContainerStyle,
3683
+ list: filterLiquiditySources(list, searchedFor),
3684
+ onChange: onChange,
3685
+ loadingStatus: loadingStatus,
3686
+ searchedFor: searchedFor
3687
+ });
3688
+ });
3689
+ }
3690
+
3691
+ var Row$1 = /*#__PURE__*/styled('div', {
3692
+ display: 'flex',
3693
+ flexWrap: 'wrap'
3694
+ });
3695
+ var Circle = /*#__PURE__*/styled('div', {
3696
+ width: 12,
3697
+ height: 12,
3698
+ borderRadius: 6,
3699
+ border: '1px solid $neutrals400',
3700
+ position: 'absolute',
3701
+ top: 12,
3702
+ right: 12,
3703
+ variants: {
3704
+ checked: {
3705
+ "true": {
3706
+ borderColor: '$success'
3707
+ },
3708
+ "false": {
3709
+ borderColor: '$neutrals400'
3710
+ }
3711
+ }
3712
+ }
3713
+ });
3714
+ var SolidCircle = /*#__PURE__*/styled('div', {
3715
+ width: 6,
3716
+ margin: '20% auto',
3717
+ height: 6,
3718
+ borderRadius: 3,
3719
+ variants: {
3720
+ checked: {
3721
+ "true": {
3722
+ backgroundColor: '$success'
3723
+ },
3724
+ "false": {
3725
+ backgroundColor: '$neutrals400'
3726
+ }
3727
+ }
3728
+ }
3729
+ });
3730
+ var Container$2 = /*#__PURE__*/styled('div', {
3731
+ border: '1.5px solid',
3732
+ borderRadius: '$5',
3733
+ padding: '$12',
3734
+ flexBasis: 'calc(33.33% - 10px)',
3735
+ margin: 5,
3736
+ display: 'flex',
3737
+ flexDirection: 'column',
3738
+ justifyContent: 'space-between',
3739
+ width: 124,
3740
+ height: 92,
3741
+ cursor: 'pointer',
3742
+ position: 'relative',
3743
+ variants: {
3744
+ checked: {
3745
+ "true": {
3746
+ borderColor: '$success',
3747
+ color: '$success'
3748
+ },
3749
+ "false": {
3750
+ borderColor: '$neutrals400',
3751
+ color: '$neutrals400'
3752
+ }
3753
+ }
3754
+ }
3755
+ });
3756
+ function SelectableWalletList(_ref) {
3757
+ var _list$find;
3758
+ var list = _ref.list,
3759
+ onChange = _ref.onChange;
3760
+ var _useState = useState(((_list$find = list.find(function (item) {
3761
+ return item.selected;
3762
+ })) == null ? void 0 : _list$find.walletType) || ''),
3763
+ active = _useState[0],
3764
+ setActive = _useState[1];
3765
+ var onClick = function onClick(w) {
3766
+ setActive(w.walletType);
3767
+ onChange(w);
3768
+ };
3769
+ useEffect(function () {
3770
+ var _list$find2;
3771
+ setActive(((_list$find2 = list.find(function (item) {
3772
+ return item.selected;
3773
+ })) == null ? void 0 : _list$find2.walletType) || '');
3774
+ }, [list]);
3775
+ return React__default.createElement(Row$1, null, list.map(function (w, index) {
3776
+ var checked = active === w.walletType;
3777
+ return React__default.createElement(Container$2, {
3778
+ checked: checked,
3779
+ onClick: onClick.bind(null, w),
3780
+ key: index
3781
+ }, React__default.createElement("img", {
3782
+ src: w.image,
3783
+ alt: w.walletType,
3784
+ width: 24,
3785
+ height: 24
3786
+ }), React__default.createElement(Typography, {
3787
+ variant: "body2"
3788
+ }, w.name), React__default.createElement(Typography, {
3789
+ variant: "caption"
3790
+ }, getConciseAddress(w.address)), React__default.createElement(Circle, {
3791
+ checked: checked
3792
+ }, React__default.createElement(SolidCircle, {
3793
+ checked: checked
3794
+ })));
3795
+ }));
3796
+ }
3797
+
3798
+ var StyledRoot = /*#__PURE__*/styled(Root$3, {
3799
+ variants: {
3800
+ direction: {
3801
+ horizontal: {
3802
+ display: 'flex',
3803
+ flexDirection: 'row',
3804
+ flexWrap: 'wrap'
3805
+ },
3806
+ vertical: {
3807
+ display: 'grid',
3808
+ gridGap: '$24'
3809
+ }
3810
+ }
3811
+ }
3812
+ });
3813
+ var ItemContainer = /*#__PURE__*/styled('div', {
3814
+ display: 'flex',
3815
+ alignItems: 'center',
3816
+ marginRight: '$8'
3817
+ });
3818
+ var StyledItem = /*#__PURE__*/styled(Item, {
3819
+ padding: '0',
3820
+ width: '20px',
3821
+ height: '20px',
3822
+ borderRadius: '100%',
3823
+ cursor: 'pointer',
3824
+ backgroundColor: '$background',
3825
+ border: '1px solid $neutrals400',
3826
+ '&:hover': {
3827
+ borderColor: '$neutrals600'
3828
+ }
3829
+ });
3830
+ var Container$3 = /*#__PURE__*/styled('div', {
3831
+ display: 'flex'
3832
+ });
3833
+ var StyledIndicator = /*#__PURE__*/styled(Indicator$1, {
3834
+ display: 'flex',
3835
+ alignItems: 'center',
3836
+ justifyContent: 'center',
3837
+ width: '100%',
3838
+ height: '100%',
3839
+ position: 'relative',
3840
+ '&::after': {
3841
+ content: '',
3842
+ display: 'block',
3843
+ width: '10px',
3844
+ height: '10px',
3845
+ borderRadius: '50%',
3846
+ backgroundColor: '$success'
3847
+ }
3848
+ });
3849
+ var Label$2 = /*#__PURE__*/styled('label', {
3850
+ paddingLeft: '$8',
3851
+ cursor: 'pointer',
3852
+ color: '$foreground'
3853
+ });
3854
+ function Radio(props) {
3855
+ var value = props.value,
3856
+ onChange = props.onChange,
3857
+ _props$direction = props.direction,
3858
+ direction = _props$direction === void 0 ? 'vertical' : _props$direction,
3859
+ style = props.style;
3860
+ return React__default.createElement(Container$3, null, React__default.createElement(StyledRoot, {
3861
+ onValueChange: onChange,
3862
+ value: value,
3863
+ direction: direction,
3864
+ style: style
3865
+ }, props.options.map(function (option, index) {
3866
+ return React__default.createElement(ItemContainer, {
3867
+ key: index
3868
+ }, React__default.createElement(StyledItem, {
3869
+ value: option.value,
3870
+ id: option.value
3871
+ }, React__default.createElement(StyledIndicator, null)), React__default.createElement(Label$2, {
3872
+ className: "_text",
3873
+ htmlFor: option.value
3874
+ }, React__default.createElement(Typography, {
3875
+ variant: "body2"
3876
+ }, option.label)));
3877
+ })));
3878
+ }
3879
+
3880
+ var BaseContainer = /*#__PURE__*/styled('div', {
3881
+ borderRadius: '$5',
3882
+ backgroundColor: '$neutrals300',
3883
+ padding: '$16'
3884
+ });
3885
+ var Title = /*#__PURE__*/styled(Typography, {
3886
+ marginBottom: '$16'
3887
+ });
3888
+ var SlippageChipsContainer = /*#__PURE__*/styled('div', {
3889
+ display: 'grid',
3890
+ rowGap: '$16',
3891
+ gridTemplateColumns: 'repeat(auto-fill, 64px)'
3892
+ });
3893
+ var LiquiditySourceContainer = /*#__PURE__*/styled(BaseContainer, {
3894
+ display: 'flex',
3895
+ justifyContent: 'space-between',
3896
+ marginTop: '$32',
3897
+ cursor: 'pointer'
3898
+ });
3899
+ var InfiniteContainer = /*#__PURE__*/styled(BaseContainer, {
3900
+ display: 'flex',
3901
+ justifyContent: 'space-between',
3902
+ marginTop: '$32'
3903
+ });
3904
+ var StyledAngleRight = /*#__PURE__*/styled(AngleRightIcon, {
3905
+ marginLeft: '$8'
3906
+ });
3907
+ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
3908
+ display: 'flex',
3909
+ alignItems: 'center',
3910
+ justifyContent: 'center'
3911
+ });
3912
+ var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
3913
+ marginTop: '$32'
3914
+ });
3915
+ var Head = /*#__PURE__*/styled('div', {
3916
+ display: 'flex',
3917
+ justifyContent: 'space-between',
3918
+ alignItems: 'center',
3919
+ paddingBottom: '$16'
3920
+ });
3921
+ function Settings(props) {
3922
+ var slippages = props.slippages,
3923
+ selectedLiquiditySources = props.selectedLiquiditySources,
3924
+ liquiditySources = props.liquiditySources,
3925
+ onSlippageChange = props.onSlippageChange,
3926
+ onLiquiditySourcesClick = props.onLiquiditySourcesClick,
3927
+ onBack = props.onBack,
3928
+ customSlippage = props.customSlippage,
3929
+ onCustomSlippageChange = props.onCustomSlippageChange,
3930
+ maxSlippage = props.maxSlippage,
3931
+ minSlippage = props.minSlippage,
3932
+ selectedTheme = props.selectedTheme,
3933
+ onThemeChange = props.onThemeChange,
3934
+ toggleInfiniteApprove = props.toggleInfiniteApprove,
3935
+ infiniteApprove = props.infiniteApprove,
3936
+ loadingStatus = props.loadingStatus;
3937
+ var _useState = useState(props.selectedSlippage),
3938
+ selectedSlippage = _useState[0],
3939
+ setSelectedSlippage = _useState[1];
3940
+ var changeSlippage = function changeSlippage(slippage) {
3941
+ setSelectedSlippage(slippage);
3942
+ onSlippageChange(slippage);
3943
+ };
3944
+ var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(Head, null, React__default.createElement(Typography, {
3945
+ variant: "body1"
3946
+ }, "Slippage tolerance per swap"), customSlippage ? React__default.createElement(Typography, {
3947
+ variant: "caption",
3948
+ color: "error"
3949
+ }, customSlippage, "% Custom") : undefined), React__default.createElement(SlippageChipsContainer, null, slippages.map(function (slippage, index) {
3950
+ return React__default.createElement(Chip, {
3951
+ key: index,
3952
+ onClick: function onClick() {
3953
+ if (customSlippage) onCustomSlippageChange(null);
3954
+ changeSlippage(slippage);
3955
+ },
3956
+ selected: !customSlippage && slippage === selectedSlippage,
3957
+ label: slippage.toString() + "%",
3958
+ style: {
3959
+ marginRight: '8px'
3960
+ }
3961
+ });
3962
+ }), React__default.createElement(TextField, {
3963
+ type: "number",
3964
+ value: customSlippage,
3965
+ onChange: function onChange(event) {
3966
+ var parsedValue = parseFloat(event.target.value);
3967
+ if (!parsedValue || parsedValue >= minSlippage && parsedValue <= maxSlippage) onCustomSlippageChange(parsedValue);
3968
+ },
3969
+ suffix: customSlippage && React__default.createElement(Typography, {
3970
+ variant: "body2"
3971
+ }, "%"),
3972
+ size: "small",
3973
+ placeholder: "Custom %",
3974
+ style: {
3975
+ width: '128px',
3976
+ flexGrow: 'initial'
3977
+ }
3978
+ }))), React__default.createElement(ThemesContainer, null, React__default.createElement(Title, {
3979
+ variant: "body2"
3980
+ }, "Theme"), React__default.createElement(Radio, {
3981
+ value: selectedTheme,
3982
+ options: [{
3983
+ value: 'dark',
3984
+ label: 'Dark'
3985
+ }, {
3986
+ value: 'light',
3987
+ label: 'Light'
3988
+ }, {
3989
+ value: 'auto',
3990
+ label: 'Auto'
3991
+ }],
3992
+ onChange: function onChange(value) {
3993
+ return onThemeChange(value);
3994
+ },
3995
+ direction: "horizontal",
3996
+ style: {
3997
+ marginTop: '$24'
3998
+ }
3999
+ })), React__default.createElement(InfiniteContainer, null, React__default.createElement(Typography, {
4000
+ variant: "body1"
4001
+ }, "Infinite Approval"), React__default.createElement(Switch, {
4002
+ checked: infiniteApprove,
4003
+ onChange: toggleInfiniteApprove
4004
+ })), React__default.createElement(LiquiditySourceContainer, null, React__default.createElement(Button, {
4005
+ onClick: onLiquiditySourcesClick,
4006
+ align: "start",
4007
+ variant: "ghost",
4008
+ loading: loadingStatus === 'loading',
4009
+ suffix: React__default.createElement(LiquiditySourceNumber, null, loadingStatus === 'success' && React__default.createElement(Typography, {
4010
+ variant: "body2",
4011
+ color: "neutrals800"
4012
+ }, liquiditySources.length !== selectedLiquiditySources.length ? selectedLiquiditySources.length + " / " + liquiditySources.length : liquiditySources.length), loadingStatus === 'failed' && React__default.createElement(Typography, {
4013
+ variant: "body2",
4014
+ color: "$error500"
4015
+ }, "Loading failed"), React__default.createElement(StyledAngleRight, null))
4016
+ }, React__default.createElement(Typography, {
4017
+ variant: "body1"
4018
+ }, "Liquidity Sources"))));
4019
+ return React__default.createElement(SecondaryPage, {
4020
+ title: "Settings",
4021
+ textField: false,
4022
+ onBack: onBack
4023
+ }, PageContent);
4024
+ }
4025
+
4026
+ var MainContainer$2 = /*#__PURE__*/styled('div', {
4027
+ position: 'relative',
4028
+ display: 'flex',
4029
+ flexDirection: 'column',
4030
+ borderRadius: '$10',
4031
+ boxShadow: '$s',
4032
+ width: '100%',
4033
+ minWidth: '375px',
4034
+ maxWidth: '512px',
4035
+ maxHeight: '595px',
4036
+ padding: '$16',
4037
+ boxSizing: 'border-box',
4038
+ backgroundColor: '$background',
4039
+ variants: {
4040
+ fixedHeight: {
4041
+ "true": {
4042
+ height: '595px'
4043
+ },
4044
+ "false": {
4045
+ height: 'auto'
4046
+ }
4047
+ }
4048
+ }
4049
+ });
4050
+ function SwapContainer(props) {
4051
+ var children = props.children,
4052
+ style = props.style,
4053
+ _props$fixedHeight = props.fixedHeight,
4054
+ fixedHeight = _props$fixedHeight === void 0 ? true : _props$fixedHeight;
4055
+ return React__default.createElement(MainContainer$2, {
4056
+ style: style,
4057
+ id: "swap-box",
4058
+ fixedHeight: fixedHeight
4059
+ }, children);
4060
+ }
4061
+
4062
+ var TokenContainer = /*#__PURE__*/styled('div', {
4063
+ display: 'flex',
4064
+ alignItems: 'center',
4065
+ '& .amount': {
4066
+ fontWeight: 'bold'
4067
+ }
4068
+ });
4069
+ var TokenImage$1 = /*#__PURE__*/styled('div', {
4070
+ position: 'relative',
4071
+ width: '$24',
4072
+ height: '$24',
4073
+ img: {
4074
+ width: '100%',
4075
+ display: 'block'
4076
+ },
4077
+ '.overlay': {
4078
+ position: 'absolute',
4079
+ right: -4,
4080
+ bottom: -4,
4081
+ width: '$16',
4082
+ height: '$16',
4083
+ padding: '$2',
4084
+ borderRadius: '50%',
4085
+ backgroundColor: '$background',
4086
+ border: '1px solid $neutrals400'
4087
+ }
4088
+ });
4089
+ function Token(props) {
4090
+ return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage$1, null, React__default.createElement("img", {
4091
+ src: props.data.token.logo,
4092
+ alt: ""
4093
+ }), React__default.createElement("div", {
4094
+ className: "overlay"
4095
+ }, React__default.createElement("img", {
4096
+ src: props.data.blockchain.logo,
4097
+ alt: props.data.blockchain.name
4098
+ }))), React__default.createElement(Spacer, {
4099
+ size: 8
4100
+ }), React__default.createElement("span", {
4101
+ className: "amount"
4102
+ }, props.data.amount), React__default.createElement(Spacer, {
4103
+ size: 4
4104
+ }), props.data.token.symbol);
4105
+ }
4106
+
4107
+ var Container$4 = /*#__PURE__*/styled('div', {
4108
+ position: 'relative',
4109
+ display: 'flex',
4110
+ justifyContent: 'space-between',
4111
+ alignItems: 'center',
4112
+ padding: '$16 0',
4113
+ borderBottom: '1px solid $neutrals300',
4114
+ '& > .info': {
4115
+ display: 'flex',
4116
+ alignItems: 'center'
4117
+ },
4118
+ '.status': {
4119
+ textTransform: 'uppercase',
4120
+ fontWeight: 'bold',
4121
+ fontSize: '$12'
4122
+ },
4123
+ '&.running': {
4124
+ color: '$foreground'
4125
+ },
4126
+ '&.failed,&.success': {
4127
+ color: '$neutrals600'
4128
+ },
4129
+ '&.failed .status': {
4130
+ color: '$error'
4131
+ },
4132
+ '&.success .status': {
4133
+ color: '$success'
4134
+ }
4135
+ });
4136
+ function SwapDetail(_ref) {
4137
+ var swap = _ref.swap,
4138
+ status = _ref.status,
4139
+ onClick = _ref.onClick;
4140
+ var firstStep = swap.steps[0];
4141
+ var lastStep = swap.steps[swap.steps.length - 1];
4142
+ return React__default.createElement(Button, {
4143
+ variant: "ghost",
4144
+ size: "free",
4145
+ fullWidth: true,
4146
+ onClick: onClick.bind(null, swap.requestId)
4147
+ }, React__default.createElement(Container$4, {
4148
+ className: "" + status
4149
+ }, React__default.createElement("div", {
4150
+ className: "info"
4151
+ }, React__default.createElement(Token, {
4152
+ data: {
4153
+ token: {
4154
+ logo: firstStep.fromLogo,
4155
+ symbol: firstStep.fromSymbol
4156
+ },
4157
+ blockchain: {
4158
+ // @ts-ignore
4159
+ logo: firstStep.fromBlockchainLogo,
4160
+ name: firstStep.fromBlockchain
4161
+ },
4162
+ amount: swap.inputAmount
4163
+ }
4164
+ }), React__default.createElement(Spacer, {
4165
+ size: 12
4166
+ }), React__default.createElement(ArrowRightIcon, {
4167
+ size: 12
4168
+ }), React__default.createElement(Spacer, {
4169
+ size: 12
4170
+ }), React__default.createElement(Token, {
4171
+ data: {
4172
+ token: {
4173
+ logo: lastStep.toLogo,
4174
+ symbol: lastStep.toSymbol
4175
+ },
4176
+ blockchain: {
4177
+ // @ts-ignore
4178
+ logo: lastStep.toBlockchainLogo,
4179
+ name: lastStep.toBlockchain
4180
+ },
4181
+ amount: lastStep.outputAmount || lastStep.expectedOutputAmountHumanReadable || ''
4182
+ }
4183
+ })), React__default.createElement("div", {
4184
+ className: "status"
4185
+ }, status === 'running' ? React__default.createElement(Spinner, {
4186
+ size: 24,
4187
+ color: "primary"
4188
+ }) : status)));
4189
+ }
4190
+
4191
+ var Container$5 = /*#__PURE__*/styled('div', {
4192
+ position: 'relative'
4193
+ });
4194
+ var Color = /*#__PURE__*/styled('div', {
4195
+ border: '1px solid $neutrals300',
4196
+ borderRadius: '$5',
4197
+ width: '$32',
4198
+ height: '$32'
4199
+ });
4200
+ var Cover = /*#__PURE__*/styled('div', {
4201
+ position: 'fixed',
4202
+ top: '0px',
4203
+ right: '0px',
4204
+ bottom: '0px',
4205
+ left: '0px'
4206
+ });
4207
+ var Popover = /*#__PURE__*/styled('div', {
4208
+ position: 'absolute',
4209
+ zIndex: '2',
4210
+ variants: {
4211
+ place: {
4212
+ top: {
4213
+ top: '-241px'
4214
+ },
4215
+ bottom: {},
4216
+ left: {
4217
+ top: '-50%',
4218
+ left: '-225px'
4219
+ },
4220
+ right: {
4221
+ top: '-50%',
4222
+ right: '-225px'
4223
+ }
4224
+ }
4225
+ }
4226
+ });
4227
+ var Label$3 = /*#__PURE__*/styled('label', {
4228
+ display: 'inline-block',
4229
+ fontSize: '$14',
4230
+ marginBottom: '$4',
4231
+ color: '$foreground'
4232
+ });
4233
+ function ColorPicker(_ref) {
4234
+ var color = _ref.color,
4235
+ onChangeColor = _ref.onChangeColor,
4236
+ label = _ref.label,
4237
+ place = _ref.place;
4238
+ var _useState = useState(false),
4239
+ displayColorPicker = _useState[0],
4240
+ setDisplayColorPicker = _useState[1];
4241
+ return React__default.createElement(Container$5, null, React__default.createElement(Label$3, {
4242
+ className: "_text"
4243
+ }, label), React__default.createElement(Button, {
4244
+ variant: "outlined",
4245
+ prefix: React__default.createElement(Color, {
4246
+ style: {
4247
+ backgroundColor: color
4248
+ }
4249
+ }),
4250
+ fullWidth: true,
4251
+ align: "start",
4252
+ size: "large",
4253
+ onClick: function onClick() {
4254
+ return setDisplayColorPicker(function (prev) {
4255
+ return !prev;
4256
+ });
4257
+ }
4258
+ }, color), displayColorPicker && React__default.createElement(Popover, {
4259
+ place: place
4260
+ }, React__default.createElement(Cover, {
4261
+ onClick: function onClick() {
4262
+ return setDisplayColorPicker(false);
4263
+ }
4264
+ }), React__default.createElement(ChromePicker, {
4265
+ color: color,
4266
+ onChange: onChangeColor
4267
+ })));
4268
+ }
4269
+
4270
+ var BackDrop$1 = /*#__PURE__*/styled('div', {
4271
+ position: 'absolute',
4272
+ top: '0',
4273
+ left: '0',
4274
+ width: '100%',
4275
+ height: '100%',
4276
+ zIndex: 9999999,
4277
+ backgroundColor: 'rgba(0,0,0,.1)',
4278
+ borderRadius: '$10'
4279
+ });
4280
+ var DrawerContainer = /*#__PURE__*/styled('div', {
4281
+ position: 'absolute',
4282
+ boxShadow: '$s',
4283
+ background: '$background',
4284
+ padding: '$20',
4285
+ display: 'flex',
4286
+ flexDirection: 'column',
4287
+ justifyContent: 'space-between',
4288
+ zIndex: 9999999,
4289
+ borderRadius: '$10',
4290
+ variants: {
4291
+ anchor: {
4292
+ left: {
4293
+ top: 0,
4294
+ left: 0,
4295
+ height: '100%',
4296
+ minWidth: '300px',
4297
+ maxWidth: '90%'
4298
+ },
4299
+ right: {
4300
+ top: 0,
4301
+ right: 0,
4302
+ height: '100%',
4303
+ minWidth: '300px',
4304
+ maxWidth: '90%'
4305
+ },
4306
+ bottom: {
4307
+ bottom: 0,
4308
+ width: '100%',
4309
+ maxHeight: '90%'
4310
+ },
4311
+ top: {
4312
+ top: 0,
4313
+ width: '100%',
4314
+ maxHeight: '90%'
4315
+ }
4316
+ }
4317
+ }
4318
+ });
4319
+ var DrawerHeader = /*#__PURE__*/styled('div', {
4320
+ display: 'flex',
4321
+ justifyContent: 'space-between',
4322
+ alignItems: 'center',
4323
+ position: 'relative',
4324
+ marginBottom: '$16'
4325
+ });
4326
+ var Body = /*#__PURE__*/styled('div', {
4327
+ overflowY: 'auto',
4328
+ height: '100%'
4329
+ });
4330
+ var Footer = /*#__PURE__*/styled('footer', {
4331
+ width: '100%',
4332
+ marginTop: '$28'
4333
+ });
4334
+ function Drawer(props) {
4335
+ var title = props.title,
4336
+ content = props.content,
4337
+ open = props.open,
4338
+ onClose = props.onClose,
4339
+ containerStyle = props.containerStyle,
4340
+ _props$anchor = props.anchor,
4341
+ anchor = _props$anchor === void 0 ? 'bottom' : _props$anchor,
4342
+ _props$showClose = props.showClose,
4343
+ showClose = _props$showClose === void 0 ? false : _props$showClose,
4344
+ footer = props.footer,
4345
+ container = props.container;
4346
+ var handleBackDropClick = function handleBackDropClick(event) {
4347
+ if (event.target === event.currentTarget) onClose();
4348
+ };
4349
+ return React__default.createElement(React__default.Fragment, null, open && container && createPortal(React__default.createElement(BackDrop$1, {
4350
+ onClick: handleBackDropClick
4351
+ }, React__default.createElement(DrawerContainer, {
4352
+ anchor: anchor,
4353
+ style: containerStyle
4354
+ }, React__default.createElement(DrawerHeader, null, React__default.createElement(Typography, {
4355
+ variant: "h4"
4356
+ }, title), showClose && React__default.createElement(CloseIcon, {
4357
+ size: 24,
4358
+ onClick: onClose
4359
+ })), React__default.createElement(Body, null, content), React__default.createElement(Footer, null, footer))), container));
4360
+ }
4361
+
4362
+ var MainContainer$3 = /*#__PURE__*/styled('div', {
4363
+ overflowY: 'auto'
4364
+ });
4365
+ var Section = /*#__PURE__*/styled('div', {
4366
+ paddingBottom: '$32',
4367
+ marginBottom: '$32',
4368
+ borderBottom: '1px solid $neutrals400'
4369
+ });
4370
+ var Footer$1 = /*#__PURE__*/styled('div', {
4371
+ display: 'flex',
4372
+ alignItems: 'center'
4373
+ });
4374
+ var AlertContainer = /*#__PURE__*/styled('div', {
4375
+ padding: '$16 0'
4376
+ });
4377
+ var ConfirmButton = /*#__PURE__*/styled(Button, {
4378
+ marginTop: '$16'
4379
+ });
4380
+ var Container$6 = /*#__PURE__*/styled('div', {
4381
+ paddingBottom: '$24',
4382
+ '.title': {
4383
+ paddingBottom: '$8',
4384
+ display: 'flex',
4385
+ alignItems: 'center'
4386
+ },
4387
+ '.num': {
4388
+ backgroundColor: '$neutrals300',
4389
+ display: 'inline-flex',
4390
+ width: '24px',
4391
+ height: '24px',
4392
+ color: '$neutrals800',
4393
+ borderRadius: '50%',
4394
+ fontSize: '$14',
4395
+ border: '1px solid $neutrals400',
4396
+ justifyContent: 'center',
4397
+ alignItems: 'center'
4398
+ }
4399
+ });
4400
+ var Alerts = /*#__PURE__*/styled('div', {
4401
+ paddingBottom: '$16'
4402
+ });
4403
+ function ConfirmSwap(props) {
4404
+ var onBack = props.onBack,
4405
+ loading = props.loading,
4406
+ onConfirm = props.onConfirm,
4407
+ requiredWallets = props.requiredWallets,
4408
+ selectableWallets = props.selectableWallets,
4409
+ onChange = props.onChange,
4410
+ confirmDisabled = props.confirmDisabled,
4411
+ isExperimentalChain = props.isExperimentalChain,
4412
+ handleConnectChain = props.handleConnectChain,
4413
+ confirmButtonTitle = props.confirmButtonTitle,
4414
+ errors = props.errors,
4415
+ warnings = props.warnings,
4416
+ extraMessages = props.extraMessages;
4417
+ return React__default.createElement(SecondaryPage, {
4418
+ textField: false,
4419
+ title: "Confirm Swap",
4420
+ onBack: onBack,
4421
+ Footer: React__default.createElement(Footer$1, null, React__default.createElement(ConfirmButton, {
4422
+ fullWidth: true,
4423
+ loading: loading,
4424
+ type: "primary",
4425
+ variant: "contained",
4426
+ onClick: onConfirm,
4427
+ disabled: confirmDisabled
4428
+ }, confirmButtonTitle))
4429
+ }, React__default.createElement(MainContainer$3, null, React__default.createElement("div", null, extraMessages || null, React__default.createElement(Alerts, null, errors == null ? void 0 : errors.map(function (error, index) {
4430
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
4431
+ direction: "vertical"
4432
+ }), React__default.createElement(Alert, {
4433
+ type: "error",
4434
+ key: index
4435
+ }, error));
4436
+ }), warnings == null ? void 0 : warnings.map(function (warning, index) {
4437
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
4438
+ direction: "vertical"
4439
+ }), React__default.createElement(Alert, {
4440
+ type: "warning",
4441
+ key: index
4442
+ }, warning));
4443
+ }))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
4444
+ size: 16,
4445
+ direction: "vertical"
4446
+ }) : null, props.previewRoutes) : null, requiredWallets.map(function (wallet, index) {
4447
+ var list = selectableWallets.filter(function (w) {
4448
+ return wallet === w.chain;
4449
+ });
4450
+ return React__default.createElement(Container$6, {
4451
+ key: index
4452
+ }, React__default.createElement("div", {
4453
+ className: "title"
4454
+ }, React__default.createElement("div", {
4455
+ className: "num"
4456
+ }, index + 1), React__default.createElement(Spacer, {
4457
+ size: 8
4458
+ }), React__default.createElement(Typography, {
4459
+ variant: "body2"
4460
+ }, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
4461
+ type: "error"
4462
+ }, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
4463
+ variant: "contained",
4464
+ type: "primary",
4465
+ align: "grow",
4466
+ onClick: function onClick() {
4467
+ return handleConnectChain == null ? void 0 : handleConnectChain(wallet);
4468
+ }
4469
+ }, "Add " + wallet + " chain to Cosmos wallets")), list.length != 0 && React__default.createElement(SelectableWalletList, {
4470
+ list: list,
4471
+ onChange: onChange
4472
+ }));
4473
+ })));
4474
+ }
4475
+
4476
+ var Group = /*#__PURE__*/styled('div', {
4477
+ '.group-title': {
4478
+ textTransform: 'uppercase'
4479
+ }
4480
+ });
4481
+ var Container$7 = /*#__PURE__*/styled('div', {
4482
+ overflowY: 'auto'
4483
+ });
4484
+ var filteredHistory = function filteredHistory(list, searchedFor) {
4485
+ return list.filter(function (swap) {
4486
+ var firstStep = swap.steps[0];
4487
+ var lastStep = swap.steps[swap.steps.length - 1];
4488
+ return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
4489
+ });
4490
+ };
4491
+ var SwapsGroup = function SwapsGroup(props) {
4492
+ var list = props.list,
4493
+ onSwapClick = props.onSwapClick,
4494
+ groupBy = props.groupBy;
4495
+ var groups = groupBy ? groupBy(list) : [{
4496
+ title: 'History',
4497
+ swaps: list
4498
+ }];
4499
+ return React__default.createElement(React__default.Fragment, null, groups.filter(function (group) {
4500
+ return group.swaps.length > 0;
4501
+ }).map(function (group, index) {
4502
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(Group, {
4503
+ key: index
4504
+ }, React__default.createElement(Typography, {
4505
+ variant: "body2",
4506
+ color: "neutrals600",
4507
+ className: "group-title"
4508
+ }, group.title), group.swaps.map(function (swap, index) {
4509
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(SwapDetail, {
4510
+ key: index,
4511
+ swap: swap,
4512
+ status: swap.status,
4513
+ onClick: onSwapClick
4514
+ }), React__default.createElement(Divider, {
4515
+ size: 12
4516
+ }));
4517
+ })), React__default.createElement(Divider, {
4518
+ size: 24
4519
+ }));
4520
+ }));
4521
+ };
4522
+ function History(_ref) {
4523
+ var _ref$list = _ref.list,
4524
+ list = _ref$list === void 0 ? [] : _ref$list,
4525
+ onBack = _ref.onBack,
4526
+ onSwapClick = _ref.onSwapClick,
4527
+ groupBy = _ref.groupBy;
4528
+ return React__default.createElement(SecondaryPage, {
4529
+ onBack: onBack,
4530
+ textField: true,
4531
+ textFieldPlaceholder: "Search By Blockchain Or Token Or Request ID",
4532
+ title: "Swaps"
4533
+ }, function (searchedFor) {
4534
+ var filterSwaps = filteredHistory(list, searchedFor);
4535
+ return React__default.createElement(Container$7, null, filterSwaps.length ? React__default.createElement(SwapsGroup, {
4536
+ list: filterSwaps,
4537
+ onSwapClick: onSwapClick,
4538
+ groupBy: groupBy
4539
+ }) : React__default.createElement(NotFoundAlert, {
4540
+ catergory: "Swap"
4541
+ }));
4542
+ });
4543
+ }
4544
+
4545
+ var getAlertType = function getAlertType(messageType) {
4546
+ if (!messageType || messageType === 'info') return 'secondary';else return messageType;
4547
+ };
4548
+ var DetailedMessage = /*#__PURE__*/styled('div', {
4549
+ width: '90%',
4550
+ overflowWrap: 'break-word',
4551
+ color: '$error500 !important'
4552
+ });
4553
+ var SuccessText = /*#__PURE__*/styled(Typography, {
4554
+ color: '$success500 !important'
4555
+ });
4556
+ var SwapMessages = function SwapMessages(props) {
4557
+ var shortMessage = props.shortMessage,
4558
+ detailedMessage = props.detailedMessage,
4559
+ currentStepBlockchain = props.currentStepBlockchain,
4560
+ type = props.type,
4561
+ lastConvertedTokenInFailedSwap = props.lastConvertedTokenInFailedSwap;
4562
+ var _useState = useState(false),
4563
+ expandedMessage = _useState[0],
4564
+ setExpandedMessage = _useState[1];
4565
+ var allowedNumberOfChars = detailedMessage["long"] ? 0 : 150;
4566
+ var shouldShowMoreDetailsButton = !expandedMessage && detailedMessage.content.length > allowedNumberOfChars;
4567
+ return React__default.createElement(Alert, Object.assign({
4568
+ type: getAlertType(type),
4569
+ title: shortMessage
4570
+ }, shouldShowMoreDetailsButton && {
4571
+ footer: React__default.createElement(Button, {
4572
+ variant: "outlined",
4573
+ type: "primary",
4574
+ onClick: setExpandedMessage.bind(null, function (prevState) {
4575
+ return !prevState;
4576
+ })
4577
+ }, "Show more details")
4578
+ }, !!props.switchNetwork && {
4579
+ footer: React__default.createElement(Button, {
4580
+ variant: 'outlined',
4581
+ type: "primary",
4582
+ onClick: props.switchNetwork
4583
+ }, "Change network to ", currentStepBlockchain)
4584
+ }), !!detailedMessage.content ? React__default.createElement(DetailedMessage, null, React__default.createElement(Typography, {
4585
+ variant: "body2"
4586
+ }, shouldShowMoreDetailsButton && !expandedMessage ? detailedMessage.content.substring(0, allowedNumberOfChars) + (allowedNumberOfChars > 0 ? '...' : '') : detailedMessage.content)) : null, !!lastConvertedTokenInFailedSwap && React__default.createElement(React__default.Fragment, null, React__default.createElement("p", null, React__default.createElement(Typography, {
4587
+ variant: "body2"
4588
+ }, "Don't worry, your fund is\xA0"), React__default.createElement(SuccessText, {
4589
+ variant: "body2"
4590
+ }, React__default.createElement("b", null, "Safe"))), React__default.createElement("p", null, React__default.createElement(Typography, {
4591
+ variant: "body2"
4592
+ }, "It is converted to \xA0", React__default.createElement("u", null, lastConvertedTokenInFailedSwap.outputAmount), "\xA0"), React__default.createElement(SuccessText, {
4593
+ variant: "body2"
4594
+ }, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.symbol, "\xA0")), React__default.createElement(Typography, {
4595
+ variant: "body2"
4596
+ }, "on your\xA0"), React__default.createElement(SuccessText, {
4597
+ variant: "body2"
4598
+ }, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.blockchain, "\xA0")), React__default.createElement(Typography, {
4599
+ variant: "body2"
4600
+ }, "wallet"))));
4601
+ };
4602
+
4603
+ var _excluded$I = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "date", "onRetry", "previewInputs"];
4604
+ var SwapperContainer$1 = /*#__PURE__*/styled('div', {
4605
+ display: 'flex',
4606
+ alignItems: 'center',
4607
+ marginLeft: '6px'
4608
+ });
4609
+ var Fee = /*#__PURE__*/styled('div', {
4610
+ display: 'flex',
4611
+ alignItems: 'center'
4612
+ });
4613
+ var SwapperLogo$1 = /*#__PURE__*/styled('img', {
4614
+ width: '$16',
4615
+ height: '$16'
4616
+ });
4617
+ var RelativeContainer$1 = /*#__PURE__*/styled('div', {
4618
+ position: 'relative'
4619
+ });
4620
+ var Dot$1 = /*#__PURE__*/styled('div', {
4621
+ width: '$8',
4622
+ height: '$8',
4623
+ backgroundColor: '$foreground',
4624
+ borderRadius: '4px',
4625
+ marginLeft: '$8'
4626
+ });
4627
+ var ArrowDown = /*#__PURE__*/styled('div', {
4628
+ width: '0px',
4629
+ height: '0px',
4630
+ borderLeft: '5px solid transparent',
4631
+ borderRight: '5px solid transparent',
4632
+ borderTop: '5px solid $foreground',
4633
+ marginLeft: '$8'
4634
+ });
4635
+ var StyledAnchor = /*#__PURE__*/styled('a', {
4636
+ color: '$primary',
4637
+ fontWeight: '$600',
4638
+ marginLeft: '$12'
4639
+ });
4640
+ var SwapInfoContainer = /*#__PURE__*/styled('div', {
4641
+ display: 'flex',
4642
+ flexDirection: 'column',
4643
+ paddingBottom: '$16',
4644
+ borderBottom: '1px solid $neutrals300'
4645
+ });
4646
+ var InternalDetailsContainer = /*#__PURE__*/styled('div', {
4647
+ display: 'flex'
4648
+ });
4649
+ var InternalDetail = /*#__PURE__*/styled('div', {
4650
+ display: 'flex',
4651
+ padding: '$10'
4652
+ });
4653
+ var DescriptionContainer = /*#__PURE__*/styled('div', {
4654
+ display: 'flex',
4655
+ alignItems: 'center'
4656
+ });
4657
+ var Description = /*#__PURE__*/styled(Typography, {
4658
+ color: '$success',
4659
+ marginLeft: '$8'
4660
+ });
4661
+ var Error = /*#__PURE__*/styled(Description, {
4662
+ color: '$error'
4663
+ });
4664
+ var Line$1 = /*#__PURE__*/styled('div', {
4665
+ width: '0',
4666
+ minHeight: '$16',
4667
+ marginLeft: '$12',
4668
+ border: '1px dashed $foreground',
4669
+ borderRadius: 'inherit'
4670
+ });
4671
+ var Row$2 = /*#__PURE__*/styled('div', {
4672
+ display: 'flex',
4673
+ justifyContent: 'space-between',
4674
+ alignItems: 'center',
4675
+ fontSize: '$14',
4676
+ padding: '$8 0',
4677
+ '.name': {
4678
+ color: '$neutrals600'
4679
+ },
4680
+ '.value': {
4681
+ display: 'flex',
4682
+ alignItems: 'center',
4683
+ color: '$neutrals800'
4684
+ },
4685
+ '.status': {
4686
+ fontWeight: 'bold',
4687
+ textTransform: 'uppercase'
4688
+ },
4689
+ '.status.failed': {
4690
+ color: '$error'
4691
+ },
4692
+ '.status.success': {
4693
+ color: '$success'
4694
+ }
4695
+ });
4696
+ var RequestId = /*#__PURE__*/styled('div', {
4697
+ width: '150px',
4698
+ whiteSpace: 'nowrap',
4699
+ overflow: 'hidden',
4700
+ textOverflow: 'ellipsis',
4701
+ '@md': {
4702
+ width: 'auto'
4703
+ }
4704
+ });
4705
+ var ExtraDetails = /*#__PURE__*/styled('div', {
4706
+ padding: '$8 0',
4707
+ color: '$neutrals600',
4708
+ fontSize: '$12'
4709
+ });
4710
+ var StepContainer$1 = /*#__PURE__*/styled('div', {
4711
+ variants: {
4712
+ hasNotStarted: {
4713
+ "true": {
4714
+ filter: 'grayscale(100%)'
4715
+ }
4716
+ },
4717
+ isRunning: {
4718
+ "true": {
4719
+ animation: pulse + " 2s ease-in-out infinite"
4720
+ }
4721
+ }
4722
+ }
4723
+ });
4724
+ var SwapFlowContainer = /*#__PURE__*/styled('div', {
4725
+ overflowY: 'auto'
4726
+ });
4727
+ function SwapHistory(props) {
4728
+ var pendingSwap = props.pendingSwap,
4729
+ onBack = props.onBack,
4730
+ onCopy = props.onCopy,
4731
+ isCopied = props.isCopied,
4732
+ onCancel = props.onCancel,
4733
+ date = props.date,
4734
+ onRetry = props.onRetry,
4735
+ extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$I);
4736
+ var _useState = useState(false),
4737
+ showDrawer = _useState[0],
4738
+ setShowDrawer = _useState[1];
4739
+ return React__default.createElement(SecondaryPage, {
4740
+ title: "Swap Details",
4741
+ textField: false,
4742
+ onBack: onBack,
4743
+ Footer: React__default.createElement(React__default.Fragment, null, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Button, {
4744
+ variant: "outlined",
4745
+ fullWidth: true,
4746
+ type: "error",
4747
+ onClick: setShowDrawer.bind(null, true)
4748
+ }, "Cancel"), !!onRetry && React__default.createElement(Button, {
4749
+ variant: "contained",
4750
+ fullWidth: true,
4751
+ type: "primary",
4752
+ onClick: onRetry
4753
+ }, "Try again"))
4754
+ }, React__default.createElement("div", null, React__default.createElement(SwapInfoContainer, null, React__default.createElement(Row$2, null, React__default.createElement("div", {
4755
+ className: "name"
4756
+ }, "Request ID:"), React__default.createElement("div", {
4757
+ className: "value requestId",
4758
+ onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
4759
+ }, React__default.createElement(RequestId, null, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
4760
+ size: 4
4761
+ }), React__default.createElement(Button, {
4762
+ type: "primary",
4763
+ variant: "ghost",
4764
+ size: "compact"
4765
+ }, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement(Row$2, null, React__default.createElement("div", {
4766
+ className: "name"
4767
+ }, "Status:"), React__default.createElement("div", {
4768
+ className: "value status " + ((pendingSwap == null ? void 0 : pendingSwap.status) || '')
4769
+ }, pendingSwap == null ? void 0 : pendingSwap.status, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Spinner, {
4770
+ size: 16,
4771
+ color: "primary"
4772
+ }))), React__default.createElement(ExtraDetails, null, date))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
4773
+ size: 32
4774
+ }), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
4775
+ return React__default.createElement(StepContainer$1, {
4776
+ key: index,
4777
+ hasNotStarted: step.status === 'created',
4778
+ isRunning: step.status != 'failed' && step.status != 'success' && step.status != 'created'
4779
+ }, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
4780
+ logo: step.fromLogo,
4781
+ symbol: step.fromSymbol,
4782
+ // @ts-ignore
4783
+ chainLogo: step.fromBlockchainLogo,
4784
+ blockchain: step.fromBlockchain,
4785
+ amount: pendingSwap.inputAmount
4786
+ }), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1
4787
+ // @ts-ignore
4788
+ , {
4789
+ // @ts-ignore
4790
+ src: step.swapperLogo,
4791
+ alt: step.swapperId
4792
+ }), React__default.createElement("div", null, React__default.createElement(Typography, {
4793
+ ml: 4,
4794
+ variant: "caption"
4795
+ },
4796
+ // @ts-ignore
4797
+ step.swapperType, ' ', "from ", step.fromSymbol, " to ", step.toSymbol, "via ", step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
4798
+ ml: 4,
4799
+ variant: "caption"
4800
+ }, "$",
4801
+ // @ts-ignore
4802
+ step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
4803
+ style: {
4804
+ display: 'flex'
4805
+ }
4806
+ }, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
4807
+ return React__default.createElement(InternalDetail, {
4808
+ key: index
4809
+ }, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
4810
+ color: "success"
4811
+ }), React__default.createElement(Description, {
4812
+ variant: "body2"
4813
+ }, !item.description ? React__default.createElement("b", null, "View transaction") : React__default.createElement("b", null, item.description.substring(0, 1).toUpperCase(), item.description.substring(1)))), React__default.createElement(StyledAnchor, {
4814
+ href: item.url,
4815
+ target: "_blank",
4816
+ rel: "noreferrer",
4817
+ key: index
4818
+ }, "TX-Link"));
4819
+ }), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
4820
+ color: "error"
4821
+ }), React__default.createElement(Error, {
4822
+ variant: "body2"
4823
+ }, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
4824
+ logo: step.toLogo,
4825
+ symbol: step.toSymbol,
4826
+ // @ts-ignore
4827
+ chainLogo: step.toBlockchainLogo,
4828
+ blockchain: step.toBlockchain,
4829
+ amount: step.outputAmount || ''
4830
+ }));
4831
+ }), React__default.createElement(Divider, {
4832
+ size: 32
4833
+ })), React__default.createElement(Drawer, {
4834
+ onClose: setShowDrawer.bind(null, false),
4835
+ open: showDrawer,
4836
+ showClose: true,
4837
+ anchor: "bottom",
4838
+ title: "Cancel Progress",
4839
+ content: React__default.createElement(Alert, {
4840
+ type: "warning"
4841
+ }, React__default.createElement("p", null, "Warning: Rango ", React__default.createElement("u", null, "neither reverts"), " your transaction\xA0", React__default.createElement("u", null, "nor refunds"), " you if you've already signed and sent a transaction to the blockchain since it's out of Rango's control. Beware that \"Cancel\" only stops next steps from being executed."), React__default.createElement(Spacer, {
4842
+ size: 12,
4843
+ direction: "vertical"
4844
+ }), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")),
4845
+ footer: React__default.createElement("div", {
4846
+ style: {
4847
+ display: 'flex',
4848
+ justifyContent: 'center',
4849
+ alignItems: 'center'
4850
+ }
4851
+ }, React__default.createElement(Button, {
4852
+ variant: "contained",
4853
+ type: "success",
4854
+ onClick: setShowDrawer.bind(null, false)
4855
+ }, "Skip"), React__default.createElement(Spacer, {
4856
+ size: 16
4857
+ }), React__default.createElement(Button, {
4858
+ variant: "contained",
4859
+ type: "error",
4860
+ onClick: function onClick() {
4861
+ onCancel(pendingSwap.requestId);
4862
+ setShowDrawer(false);
4863
+ }
4864
+ }, "Cancel progress")),
4865
+ container: document.getElementById('swap-box')
4866
+ }));
4867
+ }
4868
+
4869
+ export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, ArrowRightIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, ChevronRightIcon, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConnectWalletsModal, CopyIcon, DeleteCircleIcon, DeleteWalletIcon, DisconnectIcon, Divider, DownloadIcon, Drawer, FilledCircle, GasIcon, Header, History, HistoryIcon, HorizontalSwapIcon, InfoCircleIcon, LiquiditySourcesSelector, LoadingFailedAlert, MinusCircleIcon, Modal, Radio, RetryIcon, RetryLeftIcon, RetryRightIcon, SearchIcon, SearchMinusIcon, SecondaryPage, SelectableWalletList, Settings, SettingsIcon, SignatureIcon, Spacer, Spinner, StepDetail, SwapContainer, SwapDetail, SwapHistory, SwapWalletIcon, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
4870
+ //# sourceMappingURL=ui.esm.js.map