@rango-dev/ui 0.1.10-next.69

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 (349) hide show
  1. package/README.md +181 -0
  2. package/dist/components/Alert/Alert.d.ts +6 -0
  3. package/dist/components/Alert/Alert.stories.d.ts +4 -0
  4. package/dist/components/Alert/index.d.ts +1 -0
  5. package/dist/components/BestRoute/BestRoute.d.ts +8 -0
  6. package/dist/components/BestRoute/BestRoute.stories.d.ts +8 -0
  7. package/dist/components/BestRoute/index.d.ts +1 -0
  8. package/dist/components/BestRoute/mock.d.ts +4 -0
  9. package/dist/components/BlockchainSelector/BlockchainSelector.d.ts +14 -0
  10. package/dist/components/BlockchainSelector/BlockchainSelector.stories.d.ts +4 -0
  11. package/dist/components/BlockchainSelector/index.d.ts +1 -0
  12. package/dist/components/BlockchainsList/BlockchainsList.d.ts +7 -0
  13. package/dist/components/BlockchainsList/BlockchainsList.stories.d.ts +4 -0
  14. package/dist/components/BlockchainsList/index.d.ts +1 -0
  15. package/dist/components/BlockchainsList/mockData.d.ts +2 -0
  16. package/dist/components/Button/Button.d.ts +17 -0
  17. package/dist/components/Button/Button.stories.d.ts +8 -0
  18. package/dist/components/Button/index.d.ts +1 -0
  19. package/dist/components/Checkbox/Checkbox.d.ts +11 -0
  20. package/dist/components/Checkbox/Checkbox.stories.d.ts +5 -0
  21. package/dist/components/Checkbox/index.d.ts +1 -0
  22. package/dist/components/Chip/Chip.d.ts +12 -0
  23. package/dist/components/Chip/Chip.stories.d.ts +6 -0
  24. package/dist/components/Chip/index.d.ts +1 -0
  25. package/dist/components/ConnectWalletsModal/ConnectWallets.stories.d.ts +4 -0
  26. package/dist/components/ConnectWalletsModal/ConnectWalletsModal.d.ts +10 -0
  27. package/dist/components/ConnectWalletsModal/index.d.ts +1 -0
  28. package/dist/components/ConnectWalletsModal/mockData.d.ts +2 -0
  29. package/dist/components/Drawer/Drawer.d.ts +12 -0
  30. package/dist/components/Drawer/Drawer.stories.d.ts +7 -0
  31. package/dist/components/Drawer/index.d.ts +1 -0
  32. package/dist/components/Icon/AddCircleIcon.d.ts +3 -0
  33. package/dist/components/Icon/AddIcon.d.ts +3 -0
  34. package/dist/components/Icon/AddWalletIcon.d.ts +3 -0
  35. package/dist/components/Icon/AngleDownIcon.d.ts +3 -0
  36. package/dist/components/Icon/AngleLeftIcon.d.ts +3 -0
  37. package/dist/components/Icon/AngleRightIcon.d.ts +3 -0
  38. package/dist/components/Icon/AngleUpIcon.d.ts +3 -0
  39. package/dist/components/Icon/BagIcon.d.ts +3 -0
  40. package/dist/components/Icon/BanIcon.d.ts +3 -0
  41. package/dist/components/Icon/CheckCircleIcon.d.ts +3 -0
  42. package/dist/components/Icon/CheckIcon.d.ts +3 -0
  43. package/dist/components/Icon/CheckSquareIcon.d.ts +3 -0
  44. package/dist/components/Icon/CheckWalletIcon.d.ts +3 -0
  45. package/dist/components/Icon/CloseIcon.d.ts +1 -0
  46. package/dist/components/Icon/DeleteCircleIcon.d.ts +3 -0
  47. package/dist/components/Icon/DeleteWalletIcon.d.ts +3 -0
  48. package/dist/components/Icon/DownloadIcon.d.ts +3 -0
  49. package/dist/components/Icon/GasIcon.d.ts +3 -0
  50. package/dist/components/Icon/HistoryIcon.d.ts +3 -0
  51. package/dist/components/Icon/HorizontalSwapIcon.d.ts +3 -0
  52. package/dist/components/Icon/Icons.stories.d.ts +5 -0
  53. package/dist/components/Icon/InfoCircleIcon.d.ts +3 -0
  54. package/dist/components/Icon/MinusCircleIcon.d.ts +3 -0
  55. package/dist/components/Icon/RetryIcon.d.ts +3 -0
  56. package/dist/components/Icon/RetryLeftIcon.d.ts +3 -0
  57. package/dist/components/Icon/RetryRightIcon.d.ts +3 -0
  58. package/dist/components/Icon/SearchIcon.d.ts +3 -0
  59. package/dist/components/Icon/SearchMinusIcon.d.ts +3 -0
  60. package/dist/components/Icon/SettingIcon.d.ts +3 -0
  61. package/dist/components/Icon/SignatureIcon.d.ts +3 -0
  62. package/dist/components/Icon/SwapWalletIcon.d.ts +3 -0
  63. package/dist/components/Icon/TimeIcon.d.ts +3 -0
  64. package/dist/components/Icon/TrashIcon.d.ts +3 -0
  65. package/dist/components/Icon/TryAgainIcon.d.ts +3 -0
  66. package/dist/components/Icon/VerticalSwapIcon.d.ts +3 -0
  67. package/dist/components/Icon/WalletIconIcon.d.ts +3 -0
  68. package/dist/components/Icon/WarningIcon.d.ts +3 -0
  69. package/dist/components/Icon/common.d.ts +2 -0
  70. package/dist/components/Icon/index.d.ts +36 -0
  71. package/dist/components/Icon/types.d.ts +6 -0
  72. package/dist/components/LiquiditySourceList/LiquiditySource.stories.d.ts +4 -0
  73. package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +8 -0
  74. package/dist/components/LiquiditySourceList/index.d.ts +1 -0
  75. package/dist/components/LiquiditySourceList/mockData.d.ts +2 -0
  76. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +11 -0
  77. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +4 -0
  78. package/dist/components/LiquiditySourcesSelector/index.d.ts +1 -0
  79. package/dist/components/Modal/Modal.d.ts +11 -0
  80. package/dist/components/Modal/Modal.stories.d.ts +4 -0
  81. package/dist/components/Modal/index.d.ts +1 -0
  82. package/dist/components/Radio/Radio.d.ts +12 -0
  83. package/dist/components/Radio/Radio.stories.d.ts +4 -0
  84. package/dist/components/Radio/index.d.ts +1 -0
  85. package/dist/components/SecondaryPage/SecondaryPage.d.ts +18 -0
  86. package/dist/components/SecondaryPage/SecondaryPage.stories.d.ts +2 -0
  87. package/dist/components/SecondaryPage/index.d.ts +1 -0
  88. package/dist/components/SelectableWalletList/SelectableWalletList.d.ts +7 -0
  89. package/dist/components/SelectableWalletList/SelectableWalletList.stories.d.ts +5 -0
  90. package/dist/components/SelectableWalletList/index.d.ts +1 -0
  91. package/dist/components/SelectableWalletList/mock.d.ts +2 -0
  92. package/dist/components/Settings/Settings.d.ts +19 -0
  93. package/dist/components/Settings/Settings.stories.d.ts +4 -0
  94. package/dist/components/Settings/index.d.ts +1 -0
  95. package/dist/components/Skeleton/Skeleton.d.ts +5 -0
  96. package/dist/components/Skeleton/Skeleton.stories.d.ts +4 -0
  97. package/dist/components/Skeleton/index.d.ts +1 -0
  98. package/dist/components/Spacer/Spacer.d.ts +5 -0
  99. package/dist/components/Spacer/Spacer.stories.d.ts +4 -0
  100. package/dist/components/Spacer/index.d.ts +1 -0
  101. package/dist/components/Spinner/Spinner.d.ts +5 -0
  102. package/dist/components/Spinner/Spinner.stories.d.ts +4 -0
  103. package/dist/components/Spinner/index.d.ts +1 -0
  104. package/dist/components/StatusDrawer/StatusDrawer.d.ts +11 -0
  105. package/dist/components/StatusDrawer/StatusDrawer.stories.d.ts +4 -0
  106. package/dist/components/StatusDrawer/index.d.ts +1 -0
  107. package/dist/components/StepDetail/StepDetail.d.ts +10 -0
  108. package/dist/components/StepDetail/StepDetail.stories.d.ts +5 -0
  109. package/dist/components/StepDetail/index.d.ts +1 -0
  110. package/dist/components/SwapContainer/SwapContainer.d.ts +6 -0
  111. package/dist/components/SwapContainer/SwapContainer.stories.d.ts +5 -0
  112. package/dist/components/SwapContainer/index.d.ts +1 -0
  113. package/dist/components/SwapDetail/SwapDetail.d.ts +8 -0
  114. package/dist/components/SwapDetail/SwapDetail.stories.d.ts +5 -0
  115. package/dist/components/SwapDetail/index.d.ts +1 -0
  116. package/dist/components/SwapDetail/mock.d.ts +2 -0
  117. package/dist/components/Switch/Switch.d.ts +5 -0
  118. package/dist/components/Switch/Switch.stories.d.ts +4 -0
  119. package/dist/components/Switch/index.d.ts +1 -0
  120. package/dist/components/TextField/TextField.d.ts +10 -0
  121. package/dist/components/TextField/TextField.stories.d.ts +7 -0
  122. package/dist/components/TextField/index.d.ts +1 -0
  123. package/dist/components/TokenList/TokenList.d.ts +14 -0
  124. package/dist/components/TokenList/TokenList.stories.d.ts +4 -0
  125. package/dist/components/TokenList/index.d.ts +1 -0
  126. package/dist/components/TokenList/mockData.d.ts +2 -0
  127. package/dist/components/TokenSelector/TokenSelector.d.ts +10 -0
  128. package/dist/components/TokenSelector/TokenSelector.stories.d.ts +4 -0
  129. package/dist/components/TokenSelector/index.d.ts +1 -0
  130. package/dist/components/Tooltip/Tooltip.d.ts +7 -0
  131. package/dist/components/Tooltip/Tooltip.stories.d.ts +5 -0
  132. package/dist/components/Tooltip/index.d.ts +1 -0
  133. package/dist/components/Typography/Typography.d.ts +14 -0
  134. package/dist/components/Typography/Typography.stories.d.ts +5 -0
  135. package/dist/components/Typography/index.d.ts +1 -0
  136. package/dist/components/VirtualizedList/VirtualizedList.d.ts +18 -0
  137. package/dist/components/Wallet/State.d.ts +6 -0
  138. package/dist/components/Wallet/Wallet.d.ts +6 -0
  139. package/dist/components/Wallet/Wallet.stories.d.ts +4 -0
  140. package/dist/components/Wallet/index.d.ts +1 -0
  141. package/dist/components/common/FilledCircle.d.ts +1 -0
  142. package/dist/components/common/index.d.ts +1 -0
  143. package/dist/components/index.d.ts +24 -0
  144. package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +23 -0
  145. package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +5 -0
  146. package/dist/containers/ConfirmSwap/index.d.ts +1 -0
  147. package/dist/containers/ConfirmSwap/mock.d.ts +2 -0
  148. package/dist/containers/ConfirmWallets/ConfirmWallets.d.ts +14 -0
  149. package/dist/containers/ConfirmWallets/ConfirmWallets.stories.d.ts +6 -0
  150. package/dist/containers/ConfirmWallets/index.d.ts +1 -0
  151. package/dist/containers/ConfirmWallets/mock.d.ts +5 -0
  152. package/dist/containers/ConfirmWallets/types.d.ts +8 -0
  153. package/dist/containers/History/History.d.ts +8 -0
  154. package/dist/containers/History/History.stories.d.ts +5 -0
  155. package/dist/containers/History/index.d.ts +1 -0
  156. package/dist/containers/History/mock.d.ts +2 -0
  157. package/dist/containers/History/types.d.ts +59 -0
  158. package/dist/containers/SwapHistory/SwapHistory.d.ts +7 -0
  159. package/dist/containers/SwapHistory/SwapHistory.stories.d.ts +4 -0
  160. package/dist/containers/SwapHistory/index.d.ts +1 -0
  161. package/dist/containers/SwapHistory/mock.d.ts +2 -0
  162. package/dist/containers/index.d.ts +4 -0
  163. package/dist/helper/index.d.ts +6 -0
  164. package/dist/helper/swaps.d.ts +5 -0
  165. package/dist/helpers.d.ts +1 -0
  166. package/dist/index.d.ts +4 -0
  167. package/dist/index.js +8 -0
  168. package/dist/theme.d.ts +8 -0
  169. package/dist/types/index.d.ts +1 -0
  170. package/dist/types/meta.d.ts +22 -0
  171. package/dist/types/swaps.d.ts +22 -0
  172. package/dist/types/wallet.d.ts +14 -0
  173. package/dist/ui.cjs.development.js +4103 -0
  174. package/dist/ui.cjs.development.js.map +1 -0
  175. package/dist/ui.cjs.production.min.js +2 -0
  176. package/dist/ui.cjs.production.min.js.map +1 -0
  177. package/dist/ui.esm.js +4028 -0
  178. package/dist/ui.esm.js.map +1 -0
  179. package/package.json +89 -0
  180. package/src/components/Alert/Alert.stories.tsx +22 -0
  181. package/src/components/Alert/Alert.tsx +78 -0
  182. package/src/components/Alert/index.ts +1 -0
  183. package/src/components/BestRoute/BestRoute.stories.tsx +31 -0
  184. package/src/components/BestRoute/BestRoute.tsx +189 -0
  185. package/src/components/BestRoute/index.ts +1 -0
  186. package/src/components/BestRoute/mock.ts +544 -0
  187. package/src/components/BlockchainSelector/BlockchainSelector.stories.tsx +25 -0
  188. package/src/components/BlockchainSelector/BlockchainSelector.tsx +93 -0
  189. package/src/components/BlockchainSelector/index.ts +1 -0
  190. package/src/components/BlockchainsList/BlockchainsList.stories.tsx +25 -0
  191. package/src/components/BlockchainsList/BlockchainsList.tsx +60 -0
  192. package/src/components/BlockchainsList/index.ts +1 -0
  193. package/src/components/BlockchainsList/mockData.ts +2972 -0
  194. package/src/components/Button/Button.stories.tsx +59 -0
  195. package/src/components/Button/Button.tsx +407 -0
  196. package/src/components/Button/index.ts +1 -0
  197. package/src/components/Checkbox/Checkbox.stories.tsx +22 -0
  198. package/src/components/Checkbox/Checkbox.tsx +54 -0
  199. package/src/components/Checkbox/index.ts +1 -0
  200. package/src/components/Chip/Chip.stories.tsx +37 -0
  201. package/src/components/Chip/Chip.tsx +45 -0
  202. package/src/components/Chip/index.ts +1 -0
  203. package/src/components/ConnectWalletsModal/ConnectWallets.stories.tsx +13 -0
  204. package/src/components/ConnectWalletsModal/ConnectWalletsModal.tsx +42 -0
  205. package/src/components/ConnectWalletsModal/index.ts +1 -0
  206. package/src/components/ConnectWalletsModal/mockData.ts +118 -0
  207. package/src/components/Drawer/Drawer.stories.tsx +86 -0
  208. package/src/components/Drawer/Drawer.tsx +128 -0
  209. package/src/components/Drawer/index.ts +1 -0
  210. package/src/components/Icon/AddCircleIcon.tsx +29 -0
  211. package/src/components/Icon/AddIcon.tsx +28 -0
  212. package/src/components/Icon/AddWalletIcon.tsx +48 -0
  213. package/src/components/Icon/AngleDownIcon.tsx +30 -0
  214. package/src/components/Icon/AngleLeftIcon.tsx +31 -0
  215. package/src/components/Icon/AngleRightIcon.tsx +30 -0
  216. package/src/components/Icon/AngleUpIcon.tsx +30 -0
  217. package/src/components/Icon/BagIcon.tsx +37 -0
  218. package/src/components/Icon/BanIcon.tsx +30 -0
  219. package/src/components/Icon/CheckCircleIcon.tsx +37 -0
  220. package/src/components/Icon/CheckIcon.tsx +28 -0
  221. package/src/components/Icon/CheckSquareIcon.tsx +35 -0
  222. package/src/components/Icon/CheckWalletIcon.tsx +43 -0
  223. package/src/components/Icon/CloseIcon.tsx +9 -0
  224. package/src/components/Icon/DeleteCircleIcon.tsx +29 -0
  225. package/src/components/Icon/DeleteWalletIcon.tsx +48 -0
  226. package/src/components/Icon/DownloadIcon.tsx +35 -0
  227. package/src/components/Icon/GasIcon.tsx +35 -0
  228. package/src/components/Icon/HistoryIcon.tsx +38 -0
  229. package/src/components/Icon/HorizontalSwapIcon.tsx +36 -0
  230. package/src/components/Icon/Icons.stories.tsx +44 -0
  231. package/src/components/Icon/InfoCircleIcon.tsx +37 -0
  232. package/src/components/Icon/MinusCircleIcon.tsx +29 -0
  233. package/src/components/Icon/RetryIcon.tsx +30 -0
  234. package/src/components/Icon/RetryLeftIcon.tsx +29 -0
  235. package/src/components/Icon/RetryRightIcon.tsx +29 -0
  236. package/src/components/Icon/SearchIcon.tsx +29 -0
  237. package/src/components/Icon/SearchMinusIcon.tsx +29 -0
  238. package/src/components/Icon/SettingIcon.tsx +37 -0
  239. package/src/components/Icon/SignatureIcon.tsx +30 -0
  240. package/src/components/Icon/SwapWalletIcon.tsx +48 -0
  241. package/src/components/Icon/TimeIcon.tsx +29 -0
  242. package/src/components/Icon/TrashIcon.tsx +29 -0
  243. package/src/components/Icon/TryAgainIcon.tsx +29 -0
  244. package/src/components/Icon/VerticalSwapIcon.tsx +36 -0
  245. package/src/components/Icon/WalletIconIcon.tsx +38 -0
  246. package/src/components/Icon/WarningIcon.tsx +35 -0
  247. package/src/components/Icon/common.ts +69 -0
  248. package/src/components/Icon/index.ts +44 -0
  249. package/src/components/Icon/types.tsx +44 -0
  250. package/src/components/LiquiditySourceList/LiquiditySource.stories.tsx +13 -0
  251. package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +114 -0
  252. package/src/components/LiquiditySourceList/index.ts +1 -0
  253. package/src/components/LiquiditySourceList/mockData.ts +316 -0
  254. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.tsx +16 -0
  255. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +55 -0
  256. package/src/components/LiquiditySourcesSelector/index.ts +1 -0
  257. package/src/components/Modal/Modal.stories.tsx +22 -0
  258. package/src/components/Modal/Modal.tsx +76 -0
  259. package/src/components/Modal/index.ts +1 -0
  260. package/src/components/Radio/Radio.stories.tsx +23 -0
  261. package/src/components/Radio/Radio.tsx +95 -0
  262. package/src/components/Radio/index.ts +1 -0
  263. package/src/components/SecondaryPage/SecondaryPage.stories.tsx +7 -0
  264. package/src/components/SecondaryPage/SecondaryPage.tsx +95 -0
  265. package/src/components/SecondaryPage/index.ts +1 -0
  266. package/src/components/SelectableWalletList/SelectableWalletList.stories.tsx +14 -0
  267. package/src/components/SelectableWalletList/SelectableWalletList.tsx +113 -0
  268. package/src/components/SelectableWalletList/index.ts +1 -0
  269. package/src/components/SelectableWalletList/mock.ts +12 -0
  270. package/src/components/Settings/Settings.stories.tsx +34 -0
  271. package/src/components/Settings/Settings.tsx +160 -0
  272. package/src/components/Settings/index.ts +1 -0
  273. package/src/components/Skeleton/Skeleton.stories.tsx +24 -0
  274. package/src/components/Skeleton/Skeleton.tsx +66 -0
  275. package/src/components/Skeleton/index.ts +1 -0
  276. package/src/components/Spacer/Spacer.stories.tsx +18 -0
  277. package/src/components/Spacer/Spacer.tsx +98 -0
  278. package/src/components/Spacer/index.ts +1 -0
  279. package/src/components/Spinner/Spinner.stories.tsx +25 -0
  280. package/src/components/Spinner/Spinner.tsx +61 -0
  281. package/src/components/Spinner/index.ts +1 -0
  282. package/src/components/StatusDrawer/StatusDrawer.stories.tsx +38 -0
  283. package/src/components/StatusDrawer/StatusDrawer.tsx +81 -0
  284. package/src/components/StatusDrawer/index.ts +1 -0
  285. package/src/components/StepDetail/StepDetail.stories.tsx +37 -0
  286. package/src/components/StepDetail/StepDetail.tsx +97 -0
  287. package/src/components/StepDetail/index.ts +1 -0
  288. package/src/components/SwapContainer/SwapContainer.stories.tsx +13 -0
  289. package/src/components/SwapContainer/SwapContainer.tsx +35 -0
  290. package/src/components/SwapContainer/index.ts +1 -0
  291. package/src/components/SwapDetail/SwapDetail.stories.tsx +19 -0
  292. package/src/components/SwapDetail/SwapDetail.tsx +150 -0
  293. package/src/components/SwapDetail/index.ts +1 -0
  294. package/src/components/SwapDetail/mock.ts +275 -0
  295. package/src/components/Switch/Switch.stories.tsx +9 -0
  296. package/src/components/Switch/Switch.tsx +52 -0
  297. package/src/components/Switch/index.ts +1 -0
  298. package/src/components/TextField/TextField.stories.tsx +31 -0
  299. package/src/components/TextField/TextField.tsx +129 -0
  300. package/src/components/TextField/index.ts +1 -0
  301. package/src/components/TokenList/TokenList.stories.tsx +18 -0
  302. package/src/components/TokenList/TokenList.tsx +180 -0
  303. package/src/components/TokenList/index.ts +1 -0
  304. package/src/components/TokenList/mockData.ts +1721 -0
  305. package/src/components/TokenSelector/TokenSelector.stories.tsx +18 -0
  306. package/src/components/TokenSelector/TokenSelector.tsx +35 -0
  307. package/src/components/TokenSelector/index.ts +1 -0
  308. package/src/components/Tooltip/Tooltip.stories.tsx +52 -0
  309. package/src/components/Tooltip/Tooltip.tsx +110 -0
  310. package/src/components/Tooltip/index.ts +1 -0
  311. package/src/components/Typography/Typography.stories.tsx +68 -0
  312. package/src/components/Typography/Typography.tsx +199 -0
  313. package/src/components/Typography/index.ts +1 -0
  314. package/src/components/VirtualizedList/VirtualizedList.tsx +78 -0
  315. package/src/components/Wallet/State.tsx +36 -0
  316. package/src/components/Wallet/Wallet.stories.tsx +36 -0
  317. package/src/components/Wallet/Wallet.tsx +42 -0
  318. package/src/components/Wallet/index.ts +1 -0
  319. package/src/components/common/FilledCircle.tsx +8 -0
  320. package/src/components/common/index.ts +1 -0
  321. package/src/components/index.ts +24 -0
  322. package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +13 -0
  323. package/src/containers/ConfirmSwap/ConfirmSwap.tsx +154 -0
  324. package/src/containers/ConfirmSwap/index.ts +1 -0
  325. package/src/containers/ConfirmSwap/mock.ts +146 -0
  326. package/src/containers/ConfirmWallets/ConfirmWallets.stories.tsx +26 -0
  327. package/src/containers/ConfirmWallets/ConfirmWallets.tsx +98 -0
  328. package/src/containers/ConfirmWallets/index.ts +1 -0
  329. package/src/containers/ConfirmWallets/mock.ts +222 -0
  330. package/src/containers/ConfirmWallets/types.ts +9 -0
  331. package/src/containers/History/History.stories.tsx +14 -0
  332. package/src/containers/History/History.tsx +93 -0
  333. package/src/containers/History/index.ts +1 -0
  334. package/src/containers/History/mock.ts +825 -0
  335. package/src/containers/History/types.tsx +66 -0
  336. package/src/containers/SwapHistory/SwapHistory.stories.tsx +13 -0
  337. package/src/containers/SwapHistory/SwapHistory.tsx +165 -0
  338. package/src/containers/SwapHistory/index.ts +1 -0
  339. package/src/containers/SwapHistory/mock.ts +275 -0
  340. package/src/containers/index.ts +4 -0
  341. package/src/helper/index.ts +23 -0
  342. package/src/helper/swaps.ts +23 -0
  343. package/src/helpers.ts +2 -0
  344. package/src/index.ts +4 -0
  345. package/src/theme.ts +161 -0
  346. package/src/types/index.ts +1 -0
  347. package/src/types/meta.ts +20 -0
  348. package/src/types/swaps.tsx +36 -0
  349. package/src/types/wallet.ts +20 -0
@@ -0,0 +1,59 @@
1
+ import React from 'react';
2
+ import { ComponentMeta } from '@storybook/react';
3
+
4
+ import { Button, PropTypes } from './Button';
5
+ import { AddWalletIcon } from '../Icon';
6
+
7
+ export default {
8
+ title: 'Components/Button',
9
+ component: Button,
10
+ argTypes: {
11
+ variant: {
12
+ name: 'variant',
13
+ control: { type: 'select' },
14
+ options: ['contained', 'outlined', 'ghost'],
15
+ defaultValue: 'contained',
16
+ },
17
+ type: {
18
+ name: 'type',
19
+ control: { type: 'select' },
20
+ options: ['primary', 'error', 'warning', 'success'],
21
+ },
22
+ align: {
23
+ name: 'align',
24
+ control: { type: 'select' },
25
+ options: ['start', 'grow'],
26
+ },
27
+ size: {
28
+ name: 'size',
29
+ control: { type: 'radio' },
30
+ options: ['small', 'medium', 'large'],
31
+ defaultValue: 'medium',
32
+ },
33
+ disabled: {
34
+ name: 'disabled',
35
+ control: { type: 'boolean' },
36
+ },
37
+ },
38
+ } as ComponentMeta<typeof Button>;
39
+
40
+ export const Main = (props: PropTypes) => (
41
+ <Button {...props}>I'm a button</Button>
42
+ );
43
+
44
+ export const WithPrefix = (args: PropTypes) => (
45
+ <Button prefix={<AddWalletIcon size={24} color="white" />} {...args}>
46
+ I'm a button
47
+ </Button>
48
+ );
49
+
50
+ export const WithSuffix = (args: PropTypes) => (
51
+ <Button suffix={<AddWalletIcon size={24} color="white" />} {...args}>
52
+ I'm a button
53
+ </Button>
54
+ );
55
+ export const IconButton = (args: PropTypes) => (
56
+ <div>
57
+ <Button suffix={<AddWalletIcon size={24} color="white" />} {...args} />
58
+ </div>
59
+ );
@@ -0,0 +1,407 @@
1
+ import { CSSProperties } from '@stitches/react';
2
+ import React, { PropsWithChildren } from 'react';
3
+ import { darkTheme, styled } from '../../theme';
4
+ import { Spinner } from '../Spinner';
5
+ import { Typography } from '../Typography';
6
+
7
+ const ButtonContainer = styled('button', {
8
+ borderRadius: '$5',
9
+ fontSize: '$16',
10
+ fontWeight: '$400',
11
+ cursor: 'pointer',
12
+ padding: '0 $12',
13
+ display: 'flex',
14
+ alignItems: 'center',
15
+ justifyContent: 'center',
16
+
17
+ variants: {
18
+ align: {
19
+ start: {
20
+ display: 'flex',
21
+ width: '100%',
22
+ },
23
+ grow: {
24
+ display: 'flex',
25
+ width: '100%',
26
+ },
27
+ },
28
+ size: {
29
+ small: {
30
+ height: '$32',
31
+ },
32
+ medium: {
33
+ height: '$40',
34
+ },
35
+ large: {
36
+ height: '$48',
37
+ },
38
+ },
39
+ variant: {
40
+ contained: {
41
+ backgroundColor: '$neutrals300',
42
+ color: '$foreground',
43
+ border: 0,
44
+ '&:hover': {
45
+ backgroundColor: '$neutrals200',
46
+ color: '$foreground',
47
+ },
48
+ '&:disabled': {
49
+ background: '$neutrals400 !important',
50
+ },
51
+ },
52
+ outlined: {
53
+ backgroundColor: '$background !important',
54
+ borderColor: '$neutrals400 !important',
55
+ color: '$foreground',
56
+ '&:hover': {
57
+ borderColor: '$neutrals600 !important',
58
+ color: '$neutrals500 !important',
59
+ },
60
+ '&:disabled': {
61
+ borderColor: '$neutrals300 !important',
62
+ color: '$neutrals400 !important',
63
+ },
64
+ background: 'transparent',
65
+ border: 1,
66
+ borderStyle: 'solid',
67
+ },
68
+ ghost: {
69
+ color: '$foreground',
70
+ '&:hover': {
71
+ backgroundColor: '$neutrals200',
72
+ },
73
+ '&:disabled': {
74
+ color: '$neutrals400 !important',
75
+ },
76
+ background: 'transparent',
77
+ border: 0,
78
+
79
+ [`& ${Typography}`]: {
80
+ color: 'inherit',
81
+ },
82
+ },
83
+ },
84
+ fullWidth: {
85
+ true: {
86
+ width: '100%',
87
+ },
88
+ },
89
+ loading: {
90
+ true: {},
91
+ },
92
+ type: {
93
+ primary: {},
94
+ error: {},
95
+ warning: {},
96
+ success: {},
97
+ },
98
+ },
99
+
100
+ compoundVariants: [
101
+ {
102
+ type: 'primary',
103
+ variant: 'contained',
104
+ css: {
105
+ background: '$primary',
106
+ $$color: '$colors$background',
107
+ [`.${darkTheme} &`]: {
108
+ $$color: '$colors$foreground',
109
+ },
110
+ color: '$$color !important',
111
+ '&:hover': {
112
+ background: '$primary700',
113
+ },
114
+ '&:visited': {
115
+ background: '$primary900',
116
+ },
117
+ '&:focus': {
118
+ background: '$primary600',
119
+ },
120
+ },
121
+ },
122
+ {
123
+ type: 'primary',
124
+ variant: 'outlined',
125
+ css: {
126
+ color: '$primary !important',
127
+ borderColor: '$primary !important',
128
+ '&:hover': {
129
+ color: '$primary700 !important',
130
+ borderColor: '$primary700 !important',
131
+ },
132
+ '&:visited': {
133
+ color: '$primary900 !important',
134
+ borderColor: '$primary900 !important',
135
+ },
136
+ '&:focus': {
137
+ color: '$primary600 !important',
138
+ borderColor: '$primary600 !important',
139
+ },
140
+ },
141
+ },
142
+ {
143
+ type: 'primary',
144
+ variant: 'ghost',
145
+ css: {
146
+ color: '$primary',
147
+ '&:hover': {
148
+ color: '$primary700',
149
+ },
150
+ '&:visited': { color: '$primary900' },
151
+ '&:focus': {
152
+ color: '$primary600',
153
+ },
154
+ },
155
+ },
156
+ {
157
+ type: 'error',
158
+ variant: 'contained',
159
+ css: {
160
+ background: '$error',
161
+ $$color: '$colors$background',
162
+ [`.${darkTheme} &`]: {
163
+ $$color: '$colors$foreground',
164
+ },
165
+ color: '$$color !important',
166
+ '&:hover': {
167
+ background: '$error300',
168
+ },
169
+ '&:visited': {
170
+ background: '$error700',
171
+ },
172
+ '&:focus': {
173
+ background: '$error700',
174
+ },
175
+ },
176
+ },
177
+ {
178
+ type: 'error',
179
+ variant: 'outlined',
180
+ css: {
181
+ color: '$error !important',
182
+ borderColor: '$error !important',
183
+ '&:hover': {
184
+ color: '$error300 !important',
185
+ borderColor: '$error300 !important',
186
+ },
187
+ '&:visited': {
188
+ color: '$error700 !important',
189
+ borderColor: '$error700 !important',
190
+ },
191
+ '&:focus': {
192
+ color: '$error700 !important',
193
+ borderColor: '$error700 !important',
194
+ },
195
+ },
196
+ },
197
+ {
198
+ type: 'error',
199
+ variant: 'ghost',
200
+ css: {
201
+ color: '$error',
202
+ '&:hover': {
203
+ color: '$error300',
204
+ },
205
+ '&:visited': {
206
+ color: '$error700',
207
+ },
208
+ '&:focus': {
209
+ color: '$error700',
210
+ },
211
+ },
212
+ },
213
+ {
214
+ type: 'warning',
215
+ variant: 'contained',
216
+ css: {
217
+ background: '$warning',
218
+ $$color: '$colors$background',
219
+ [`.${darkTheme} &`]: {
220
+ $$color: '$colors$foreground',
221
+ },
222
+ color: '$$color !important',
223
+ '&:hover': {
224
+ background: '$warning300',
225
+ },
226
+ '&:visited': {
227
+ background: '$warning700',
228
+ },
229
+ '&:focus': {
230
+ background: '$warning700',
231
+ },
232
+ },
233
+ },
234
+ {
235
+ type: 'warning',
236
+ variant: 'outlined',
237
+ css: {
238
+ color: '$warning !important',
239
+ borderColor: '$warning !important',
240
+ '&:hover': {
241
+ color: '$warning300 !important',
242
+ borderColor: '$warning300 !important',
243
+ },
244
+ '&:visited': {
245
+ color: '$warning700 !important',
246
+ borderColor: '$warning700 !important',
247
+ },
248
+ '&:focus': {
249
+ color: '$warning700 !important',
250
+ borderColor: '$warning700 !important',
251
+ },
252
+ },
253
+ },
254
+ {
255
+ type: 'warning',
256
+ variant: 'ghost',
257
+ css: {
258
+ color: '$warning',
259
+ '&:hover': {
260
+ color: '$warning300',
261
+ },
262
+ '&:visited': {
263
+ color: '$warning700',
264
+ },
265
+ '&:focus': {
266
+ color: '$warning700',
267
+ },
268
+ },
269
+ },
270
+ {
271
+ type: 'success',
272
+ variant: 'contained',
273
+ css: {
274
+ background: '$success',
275
+ $$color: '$colors$background',
276
+ [`.${darkTheme} &`]: {
277
+ $$color: '$colors$foreground',
278
+ },
279
+ color: '$$color !important',
280
+ '&:hover': {
281
+ background: '$success300',
282
+ },
283
+ '&:visited': {
284
+ background: '$success700',
285
+ },
286
+ '&:focus': {
287
+ background: '$success700',
288
+ },
289
+ },
290
+ },
291
+ {
292
+ type: 'success',
293
+ variant: 'outlined',
294
+ css: {
295
+ color: '$success !important',
296
+ borderColor: '$success !important',
297
+ '&:hover': {
298
+ color: '$success300 !important',
299
+ borderColor: '$success300 !important',
300
+ },
301
+ '&:visited': {
302
+ color: '$success700 !important',
303
+ borderColor: '$success700 !important',
304
+ },
305
+ '&:focus': {
306
+ color: '$success700 !important',
307
+ borderColor: '$success700 !important',
308
+ },
309
+ },
310
+ },
311
+ {
312
+ type: 'success',
313
+ variant: 'ghost',
314
+ css: {
315
+ color: '$success',
316
+ '&:hover': {
317
+ color: '$success300',
318
+ },
319
+ '&:visited': {
320
+ color: '$success700',
321
+ },
322
+ '&:focus': {
323
+ color: '$success700',
324
+ },
325
+ },
326
+ },
327
+ ],
328
+ defaultVariants: {
329
+ size: 'medium',
330
+ variant: 'contained',
331
+ },
332
+ });
333
+
334
+ const Content = styled('div', {
335
+ flex: 1,
336
+ variants: {
337
+ align: {
338
+ start: {
339
+ textAlign: 'left',
340
+ },
341
+ grow: {
342
+ textAlign: 'center',
343
+ },
344
+ },
345
+ ml: {
346
+ true: {
347
+ marginLeft: '$8',
348
+ },
349
+ },
350
+ mr: {
351
+ true: {
352
+ marginRight: '$8',
353
+ },
354
+ },
355
+ flexContent: {
356
+ true: {
357
+ display: 'flex',
358
+ alignItems: 'center',
359
+ },
360
+ },
361
+ },
362
+ });
363
+
364
+ export interface PropTypes {
365
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
366
+ size?: 'small' | 'medium' | 'large';
367
+ variant?: 'contained' | 'outlined' | 'ghost';
368
+ type?: 'primary' | 'error' | 'warning' | 'success';
369
+ prefix?: React.ReactNode;
370
+ suffix?: React.ReactNode;
371
+ align?: 'start' | 'grow';
372
+ loading?: boolean;
373
+ fullWidth?: boolean;
374
+ disabled?: boolean;
375
+ style?: CSSProperties;
376
+ flexContent?: boolean;
377
+ }
378
+
379
+ export function Button({
380
+ children,
381
+ loading,
382
+ disabled,
383
+ prefix,
384
+ suffix,
385
+ align,
386
+ flexContent,
387
+ ...props
388
+ }: PropsWithChildren<PropTypes>) {
389
+ const isDisabled = loading || disabled;
390
+ return (
391
+ <ButtonContainer disabled={isDisabled} {...props} align={align}>
392
+ {prefix}
393
+ {children && (
394
+ <Content
395
+ align={align}
396
+ ml={!!prefix}
397
+ mr={!!suffix && !loading}
398
+ flexContent={flexContent}
399
+ >
400
+ {children}
401
+ </Content>
402
+ )}
403
+ {loading && <Spinner size={16} color={props.type} />}
404
+ {suffix}
405
+ </ButtonContainer>
406
+ );
407
+ }
@@ -0,0 +1 @@
1
+ export { Button } from './Button';
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { ComponentMeta } from '@storybook/react';
3
+ import { Checkbox, PropTypes } from './Checkbox';
4
+
5
+ export default {
6
+ title: 'Components/Checkbox',
7
+ component: Checkbox,
8
+ argTypes: {
9
+ label: {
10
+ name: 'label',
11
+ control: { type: 'text' },
12
+ defaultValue: 'I am a checkbox',
13
+ },
14
+ defaultChecked: {
15
+ name: 'defaultChecked',
16
+ control: { type: 'boolean' },
17
+ defaultValue: true,
18
+ },
19
+ },
20
+ } as ComponentMeta<typeof Checkbox>;
21
+
22
+ export const Main = (props: PropTypes) => <Checkbox {...props} id="test" />;
@@ -0,0 +1,54 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { styled } from '../../theme';
3
+ import * as RadixCheckbox from '@radix-ui/react-checkbox';
4
+ import { CheckIcon } from '../Icon';
5
+
6
+ const CheckboxContainer = styled('div', {
7
+ display: 'flex',
8
+ alignItems: 'center',
9
+ });
10
+
11
+ const CheckboxRoot = styled(RadixCheckbox.Root, {
12
+ borderRadius: '5px',
13
+ width: 20,
14
+ padding: 0,
15
+ height: 20,
16
+ border: '1px solid',
17
+ display: 'flex',
18
+ alignItems: 'center',
19
+ justifyContent: 'center',
20
+ marginRight: '$2',
21
+ backgroundColor: '$neutral-100',
22
+ });
23
+ const Label = styled('label', {
24
+ color: '$text',
25
+ fontSize: '$m',
26
+ marginLeft: '$8',
27
+ });
28
+
29
+ export interface PropTypes {
30
+ id: string;
31
+ defaultChecked?: boolean;
32
+ label: string;
33
+ checked?: boolean;
34
+ onCheckedChange?: (checked: boolean | 'indeterminate') => void;
35
+ disabled?: boolean;
36
+ name?: string;
37
+ }
38
+
39
+ export function Checkbox({
40
+ label,
41
+ id,
42
+ ...props
43
+ }: PropsWithChildren<PropTypes>) {
44
+ return (
45
+ <CheckboxContainer>
46
+ <CheckboxRoot id={id} {...props}>
47
+ <RadixCheckbox.Indicator>
48
+ <CheckIcon size={20} />
49
+ </RadixCheckbox.Indicator>
50
+ </CheckboxRoot>
51
+ <Label htmlFor={id}>{label} </Label>
52
+ </CheckboxContainer>
53
+ );
54
+ }
@@ -0,0 +1 @@
1
+ export { Checkbox } from './Checkbox';
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { ComponentMeta } from '@storybook/react';
3
+
4
+ import { Chip, PropTypes } from './Chip';
5
+
6
+ export default {
7
+ title: 'Chip',
8
+ component: Chip,
9
+ } as ComponentMeta<typeof Chip>;
10
+
11
+ export const Main = (args: PropTypes) => <Chip {...args} label="chip" />;
12
+
13
+ export const ChipWithPrefix = (args: PropTypes) => (
14
+ <Chip
15
+ {...args}
16
+ label="chip"
17
+ prefix={
18
+ <img
19
+ src=" https://api.rango.exchange/blockchains/binance.svg"
20
+ style={{ width: '20px' }}
21
+ />
22
+ }
23
+ />
24
+ );
25
+
26
+ export const ChipWithSuffix = (args: PropTypes) => (
27
+ <Chip
28
+ {...args}
29
+ label="chip"
30
+ suffix={
31
+ <img
32
+ src=" https://api.rango.exchange/blockchains/binance.svg"
33
+ style={{ width: '20px' }}
34
+ />
35
+ }
36
+ />
37
+ );
@@ -0,0 +1,45 @@
1
+ import { CSSProperties } from '@stitches/react';
2
+ import React from 'react';
3
+ import { styled } from '../../theme';
4
+ import { Typography } from '../Typography';
5
+
6
+ const ChipCointainer = styled('div', {
7
+ display: 'inline-flex',
8
+ justifyContent: 'center',
9
+ alignItems: 'center',
10
+ borderRadius: '$5',
11
+ padding: '$4 $8',
12
+ height: '32',
13
+ fontSize: '$14',
14
+ cursor: 'pointer',
15
+ '&:hover': {
16
+ backgroundColor: '$neutrals300',
17
+ },
18
+ variants: {
19
+ selected: {
20
+ true: { backgroundColor: '$neutrals400' },
21
+ false: { backgroundColor: '$background' },
22
+ },
23
+ },
24
+ });
25
+
26
+ export interface PropTypes {
27
+ label: string;
28
+ selected?: boolean;
29
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
30
+ className?: string;
31
+ style?: CSSProperties;
32
+ prefix?: React.ReactNode;
33
+ suffix?: React.ReactNode;
34
+ }
35
+
36
+ export function Chip(props: PropTypes) {
37
+ const { label, selected, prefix, suffix, onClick, style } = props;
38
+ return (
39
+ <ChipCointainer selected={selected} onClick={onClick} style={style}>
40
+ {prefix || null}
41
+ <Typography variant="body2">{label}</Typography>
42
+ {suffix || null}
43
+ </ChipCointainer>
44
+ );
45
+ }
@@ -0,0 +1 @@
1
+ export { Chip } from './Chip';
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ComponentMeta } from '@storybook/react';
3
+ import { ConnectWalletsModal, PropTypes } from './ConnectWalletsModal';
4
+ import { walletsInfo } from './mockData';
5
+
6
+ export default {
7
+ title: 'Connect Wallets Modal',
8
+ component: ConnectWalletsModal,
9
+ } as ComponentMeta<typeof ConnectWalletsModal>;
10
+
11
+ export const Main = (args: PropTypes) => (
12
+ <ConnectWalletsModal {...args} list={walletsInfo} />
13
+ );
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { styled } from '../../theme';
3
+ import { WalletInfo } from '../../types/wallet';
4
+ import { Modal } from '../Modal';
5
+ import { WalletType } from '@rango-dev/wallets-shared';
6
+ import { Wallet } from '../Wallet';
7
+
8
+ export interface PropTypes {
9
+ open: boolean;
10
+ list: WalletInfo[];
11
+ onSelect: (walletType: WalletType) => void;
12
+ onClose: () => void;
13
+ error?: string;
14
+ }
15
+
16
+ const ModalContent = styled('div', {
17
+ display: 'grid',
18
+ gap: '$8',
19
+ gridTemplateColumns: 'repeat(2, minmax(0, 1fr))',
20
+ });
21
+
22
+ export function ConnectWalletsModal(props: PropTypes) {
23
+ const { open, list, onSelect, onClose } = props;
24
+
25
+ const Content = (
26
+ <ModalContent>
27
+ {list.map((info, index) => (
28
+ <Wallet {...info} key={index} onClick={onSelect} />
29
+ ))}
30
+ </ModalContent>
31
+ );
32
+
33
+ return (
34
+ <Modal
35
+ title="Connect Wallets"
36
+ open={open}
37
+ content={Content}
38
+ onClose={onClose}
39
+ containerStyle={{ width: '75%', maxWidth: '30rem', height: '70%' }}
40
+ />
41
+ );
42
+ }
@@ -0,0 +1 @@
1
+ export { ConnectWalletsModal } from './ConnectWalletsModal';