@rango-dev/ui 0.1.14 → 0.1.16-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/dist/components/Alert/Alert.d.ts +7 -7
  2. package/dist/components/Alert/Alert.stories.d.ts +7 -5
  3. package/dist/components/Alert/LoadingFailedAlert.d.ts +2 -2
  4. package/dist/components/Alert/NotFoundAlert.d.ts +7 -7
  5. package/dist/components/Alert/index.d.ts +2 -2
  6. package/dist/components/BestRoute/BestRoute.d.ts +15 -12
  7. package/dist/components/BestRoute/BestRoute.stories.d.ts +10 -8
  8. package/dist/components/BestRoute/index.d.ts +1 -1
  9. package/dist/components/BestRoute/mock.d.ts +4 -4
  10. package/dist/components/BlockchainsList/BlockchainsList.d.ts +10 -10
  11. package/dist/components/BlockchainsList/BlockchainsList.stories.d.ts +5 -5
  12. package/dist/components/BlockchainsList/index.d.ts +1 -1
  13. package/dist/components/BlockchainsList/mockData.d.ts +2 -2
  14. package/dist/components/Button/Button.d.ts +17 -17
  15. package/dist/components/Button/Button.stories.d.ts +10 -8
  16. package/dist/components/Button/index.d.ts +1 -1
  17. package/dist/components/Checkbox/Checkbox.d.ts +11 -11
  18. package/dist/components/Checkbox/Checkbox.stories.d.ts +7 -5
  19. package/dist/components/Checkbox/index.d.ts +1 -1
  20. package/dist/components/Chip/Chip.d.ts +12 -12
  21. package/dist/components/Chip/Chip.stories.d.ts +7 -7
  22. package/dist/components/Chip/index.d.ts +1 -1
  23. package/dist/components/ColorPicker/ColorPicker.d.ts +9 -9
  24. package/dist/components/ColorPicker/ColorPicker.stories.d.ts +5 -5
  25. package/dist/components/ColorPicker/index.d.ts +1 -1
  26. package/dist/components/Divider/Divider.d.ts +6 -6
  27. package/dist/components/Divider/index.d.ts +1 -1
  28. package/dist/components/Drawer/Drawer.d.ts +13 -13
  29. package/dist/components/Drawer/Drawer.stories.d.ts +8 -8
  30. package/dist/components/Drawer/index.d.ts +1 -1
  31. package/dist/components/Header/Header.d.ts +9 -9
  32. package/dist/components/Header/index.d.ts +1 -1
  33. package/dist/components/Icon/AddCircleIcon.d.ts +3 -3
  34. package/dist/components/Icon/AddIcon.d.ts +3 -3
  35. package/dist/components/Icon/AddWalletIcon.d.ts +3 -3
  36. package/dist/components/Icon/AngleDownIcon.d.ts +3 -3
  37. package/dist/components/Icon/AngleLeftIcon.d.ts +3 -3
  38. package/dist/components/Icon/AngleRightIcon.d.ts +3 -3
  39. package/dist/components/Icon/AngleUpIcon.d.ts +3 -3
  40. package/dist/components/Icon/ArrowRightIcon.d.ts +3 -3
  41. package/dist/components/Icon/BagIcon.d.ts +3 -3
  42. package/dist/components/Icon/BanIcon.d.ts +3 -3
  43. package/dist/components/Icon/CheckCircleIcon.d.ts +3 -3
  44. package/dist/components/Icon/CheckIcon.d.ts +3 -3
  45. package/dist/components/Icon/CheckSquareIcon.d.ts +3 -3
  46. package/dist/components/Icon/CheckWalletIcon.d.ts +3 -3
  47. package/dist/components/Icon/ChevronRightIcon.d.ts +3 -3
  48. package/dist/components/Icon/CloseIcon.d.ts +112 -1
  49. package/dist/components/Icon/CopyIcon.d.ts +3 -3
  50. package/dist/components/Icon/DeleteCircleIcon.d.ts +3 -3
  51. package/dist/components/Icon/DeleteWalletIcon.d.ts +3 -3
  52. package/dist/components/Icon/DisconnectIcon.d.ts +3 -3
  53. package/dist/components/Icon/DownloadIcon.d.ts +3 -3
  54. package/dist/components/Icon/GasIcon.d.ts +3 -3
  55. package/dist/components/Icon/HistoryIcon.d.ts +3 -3
  56. package/dist/components/Icon/HorizontalSwapIcon.d.ts +3 -3
  57. package/dist/components/Icon/Icons.stories.d.ts +5 -5
  58. package/dist/components/Icon/InfoCircleIcon.d.ts +3 -3
  59. package/dist/components/Icon/MinusCircleIcon.d.ts +3 -3
  60. package/dist/components/Icon/RetryIcon.d.ts +3 -3
  61. package/dist/components/Icon/RetryLeftIcon.d.ts +3 -3
  62. package/dist/components/Icon/RetryRightIcon.d.ts +3 -3
  63. package/dist/components/Icon/SearchIcon.d.ts +3 -3
  64. package/dist/components/Icon/SearchMinusIcon.d.ts +3 -3
  65. package/dist/components/Icon/SettingIcon.d.ts +3 -3
  66. package/dist/components/Icon/SignatureIcon.d.ts +3 -3
  67. package/dist/components/Icon/SwapWalletIcon.d.ts +3 -3
  68. package/dist/components/Icon/TimeIcon.d.ts +3 -3
  69. package/dist/components/Icon/TrashIcon.d.ts +3 -3
  70. package/dist/components/Icon/TryAgainIcon.d.ts +3 -3
  71. package/dist/components/Icon/VerticalSwapIcon.d.ts +3 -3
  72. package/dist/components/Icon/WalletIconIcon.d.ts +3 -3
  73. package/dist/components/Icon/WarningIcon.d.ts +3 -3
  74. package/dist/components/Icon/common.d.ts +228 -2
  75. package/dist/components/Icon/index.d.ts +40 -40
  76. package/dist/components/Icon/types.d.ts +7 -7
  77. package/dist/components/LiquiditySourceList/LiquiditySource.stories.d.ts +5 -5
  78. package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +11 -11
  79. package/dist/components/LiquiditySourceList/index.d.ts +1 -1
  80. package/dist/components/LiquiditySourceList/mockData.d.ts +2 -2
  81. package/dist/components/Modal/Modal.d.ts +11 -11
  82. package/dist/components/Modal/Modal.stories.d.ts +5 -5
  83. package/dist/components/Modal/index.d.ts +1 -1
  84. package/dist/components/Radio/Radio.d.ts +13 -13
  85. package/dist/components/Radio/Radio.stories.d.ts +5 -5
  86. package/dist/components/Radio/index.d.ts +1 -1
  87. package/dist/components/SecondaryPage/SecondaryPage.d.ts +16 -16
  88. package/dist/components/SecondaryPage/SecondaryPage.stories.d.ts +5 -2
  89. package/dist/components/SecondaryPage/index.d.ts +1 -1
  90. package/dist/components/SelectableWalletList/SelectableWalletList.d.ts +7 -7
  91. package/dist/components/SelectableWalletList/SelectableWalletList.stories.d.ts +7 -5
  92. package/dist/components/SelectableWalletList/index.d.ts +1 -1
  93. package/dist/components/SelectableWalletList/mock.d.ts +2 -2
  94. package/dist/components/Skeleton/Skeleton.d.ts +6 -6
  95. package/dist/components/Skeleton/Skeleton.stories.d.ts +5 -5
  96. package/dist/components/Skeleton/index.d.ts +1 -1
  97. package/dist/components/Spinner/Spinner.d.ts +6 -6
  98. package/dist/components/Spinner/Spinner.stories.d.ts +5 -5
  99. package/dist/components/Spinner/index.d.ts +1 -1
  100. package/dist/components/StatusDrawer/StatusDrawer.d.ts +11 -11
  101. package/dist/components/StatusDrawer/StatusDrawer.stories.d.ts +5 -5
  102. package/dist/components/StatusDrawer/index.d.ts +1 -1
  103. package/dist/components/StepDetail/StepDetail.d.ts +12 -12
  104. package/dist/components/StepDetail/StepDetail.stories.d.ts +7 -5
  105. package/dist/components/StepDetail/index.d.ts +1 -1
  106. package/dist/components/SwapContainer/SwapContainer.d.ts +7 -7
  107. package/dist/components/SwapContainer/index.d.ts +1 -1
  108. package/dist/components/SwapDetail/SwapDetail.d.ts +8 -8
  109. package/dist/components/SwapDetail/SwapDetail.stories.d.ts +7 -5
  110. package/dist/components/SwapDetail/Token.d.ts +17 -17
  111. package/dist/components/SwapDetail/index.d.ts +1 -1
  112. package/dist/components/SwapDetail/mock.d.ts +2 -2
  113. package/dist/components/Switch/Switch.d.ts +6 -6
  114. package/dist/components/Switch/Switch.stories.d.ts +5 -5
  115. package/dist/components/Switch/index.d.ts +1 -1
  116. package/dist/components/TextField/TextField.d.ts +10 -10
  117. package/dist/components/TextField/TextField.stories.d.ts +7 -7
  118. package/dist/components/TextField/index.d.ts +1 -1
  119. package/dist/components/TokenList/TokenItem.d.ts +11 -11
  120. package/dist/components/TokenList/TokenList.d.ts +17 -17
  121. package/dist/components/TokenList/TokenList.stories.d.ts +5 -5
  122. package/dist/components/TokenList/index.d.ts +1 -1
  123. package/dist/components/TokenList/mockData.d.ts +2 -2
  124. package/dist/components/Tooltip/Tooltip.d.ts +7 -7
  125. package/dist/components/Tooltip/Tooltip.stories.d.ts +7 -5
  126. package/dist/components/Tooltip/index.d.ts +1 -1
  127. package/dist/components/Typography/Typography.d.ts +18 -18
  128. package/dist/components/Typography/Typography.stories.d.ts +7 -5
  129. package/dist/components/Typography/index.d.ts +1 -1
  130. package/dist/components/VirtualizedList/VirtualizedList.d.ts +17 -17
  131. package/dist/components/Wallet/State.d.ts +7 -7
  132. package/dist/components/Wallet/Wallet.d.ts +7 -7
  133. package/dist/components/Wallet/Wallet.stories.d.ts +7 -5
  134. package/dist/components/Wallet/index.d.ts +1 -1
  135. package/dist/components/common/FilledCircle.d.ts +111 -1
  136. package/dist/components/common/Image.d.ts +6 -6
  137. package/dist/components/common/index.d.ts +2 -2
  138. package/dist/components/index.d.ts +25 -31
  139. package/dist/{components → containers}/BlockchainSelector/BlockchainSelector.d.ts +17 -17
  140. package/dist/{components → containers}/BlockchainSelector/BlockchainSelector.stories.d.ts +5 -5
  141. package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +22 -22
  142. package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +8 -6
  143. package/dist/containers/ConfirmSwap/index.d.ts +1 -1
  144. package/dist/containers/ConfirmSwap/mock.d.ts +5 -5
  145. package/dist/{components → containers}/ConnectWalletsModal/ConnectWallets.stories.d.ts +5 -5
  146. package/dist/{components → containers}/ConnectWalletsModal/ConnectWalletsModal.d.ts +11 -11
  147. package/dist/{components → containers}/ConnectWalletsModal/mockData.d.ts +2 -2
  148. package/dist/containers/History/History.d.ts +6 -6
  149. package/dist/containers/History/History.stories.d.ts +9 -5
  150. package/dist/containers/History/SwapsGroup.d.ts +13 -13
  151. package/dist/containers/History/index.d.ts +3 -2
  152. package/dist/containers/History/mock.d.ts +2 -2
  153. package/dist/containers/History/types.d.ts +39 -39
  154. package/dist/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +13 -13
  155. package/dist/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +5 -5
  156. package/dist/{components → containers}/Settings/Settings.d.ts +24 -24
  157. package/dist/{components → containers}/Settings/Settings.stories.d.ts +5 -5
  158. package/dist/containers/SwapHistory/SwapHistory.d.ts +1128 -24
  159. package/dist/containers/SwapHistory/SwapHistory.stories.d.ts +14 -5
  160. package/dist/containers/SwapHistory/SwapMessages.d.ts +17 -17
  161. package/dist/containers/SwapHistory/index.d.ts +1 -1
  162. package/dist/containers/SwapHistory/mock.d.ts +2 -2
  163. package/dist/containers/TokenSelector/TokenSelector.d.ts +124 -0
  164. package/dist/{components → containers}/TokenSelector/TokenSelector.stories.d.ts +5 -5
  165. package/dist/containers/index.d.ts +8 -3
  166. package/dist/helper/index.d.ts +6 -6
  167. package/dist/hooks/index.d.ts +1 -1
  168. package/dist/hooks/useCopyToClipboard.d.ts +1 -1
  169. package/dist/index.d.ts +6 -6
  170. package/dist/index.js +20 -8
  171. package/dist/index.js.map +7 -0
  172. package/dist/theme.d.ts +928 -8
  173. package/dist/types/index.d.ts +2 -2
  174. package/dist/types/meta.d.ts +23 -23
  175. package/dist/types/swaps.d.ts +29 -29
  176. package/dist/types/wallet.d.ts +23 -23
  177. package/package.json +18 -38
  178. package/src/components/Alert/Alert.stories.tsx +19 -6
  179. package/src/components/Alert/Alert.tsx +3 -3
  180. package/src/components/BestRoute/BestRoute.stories.tsx +15 -5
  181. package/src/components/BestRoute/mock.ts +1 -1
  182. package/src/components/BlockchainsList/BlockchainsList.stories.tsx +9 -3
  183. package/src/components/BlockchainsList/mockData.ts +603 -108
  184. package/src/components/Button/Button.stories.tsx +8 -3
  185. package/src/components/Checkbox/Checkbox.stories.tsx +6 -2
  186. package/src/components/Chip/Chip.stories.tsx +23 -7
  187. package/src/components/ColorPicker/ColorPicker.stories.tsx +6 -3
  188. package/src/components/Divider/Divider.tsx +113 -11
  189. package/src/components/Drawer/Drawer.stories.tsx +8 -11
  190. package/src/components/Icon/Icons.stories.tsx +8 -4
  191. package/src/components/LiquiditySourceList/LiquiditySource.stories.tsx +6 -3
  192. package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +3 -3
  193. package/src/components/Modal/Modal.stories.tsx +9 -10
  194. package/src/components/Radio/Radio.stories.tsx +12 -7
  195. package/src/components/SecondaryPage/SecondaryPage.stories.tsx +12 -3
  196. package/src/components/SelectableWalletList/SelectableWalletList.stories.tsx +2 -2
  197. package/src/components/SelectableWalletList/mock.ts +2 -2
  198. package/src/components/Skeleton/Skeleton.stories.tsx +6 -2
  199. package/src/components/Spinner/Spinner.stories.tsx +6 -2
  200. package/src/components/StatusDrawer/StatusDrawer.stories.tsx +7 -2
  201. package/src/components/StatusDrawer/StatusDrawer.tsx +2 -2
  202. package/src/components/StepDetail/StepDetail.stories.tsx +9 -2
  203. package/src/components/SwapDetail/SwapDetail.stories.tsx +5 -2
  204. package/src/components/SwapDetail/SwapDetail.tsx +3 -3
  205. package/src/components/SwapDetail/Token.tsx +4 -4
  206. package/src/components/Switch/Switch.stories.tsx +2 -2
  207. package/src/components/TextField/TextField.stories.tsx +3 -2
  208. package/src/components/TokenList/TokenList.stories.tsx +3 -3
  209. package/src/components/Tooltip/Tooltip.stories.tsx +7 -2
  210. package/src/components/Typography/Typography.stories.tsx +2 -2
  211. package/src/components/Wallet/Wallet.stories.tsx +7 -13
  212. package/src/components/index.ts +0 -6
  213. package/src/containers/BlockchainSelector/BlockchainSelector.stories.tsx +41 -0
  214. package/src/{components → containers}/BlockchainSelector/BlockchainSelector.tsx +5 -5
  215. package/{dist/components/BlockchainSelector/index.d.ts → src/containers/BlockchainSelector/index.ts} +1 -1
  216. package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +223 -10
  217. package/src/containers/ConfirmSwap/ConfirmSwap.tsx +21 -12
  218. package/src/containers/ConfirmSwap/mock.ts +12 -15
  219. package/src/containers/ConnectWalletsModal/ConnectWallets.stories.tsx +24 -0
  220. package/src/{components → containers}/ConnectWalletsModal/ConnectWalletsModal.tsx +3 -3
  221. package/{dist/components/ConnectWalletsModal/index.d.ts → src/containers/ConnectWalletsModal/index.ts} +1 -1
  222. package/src/{components → containers}/ConnectWalletsModal/mockData.ts +17 -17
  223. package/src/containers/History/History.stories.tsx +2 -2
  224. package/src/containers/History/History.tsx +1 -1
  225. package/src/containers/History/index.ts +2 -1
  226. package/src/containers/History/mock.ts +3 -3
  227. package/src/containers/History/types.tsx +1 -1
  228. package/src/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.tsx +7 -4
  229. package/src/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +2 -3
  230. package/{dist/components/LiquiditySourcesSelector/index.d.ts → src/containers/LiquiditySourcesSelector/index.ts} +1 -1
  231. package/src/containers/Settings/Settings.stories.tsx +27 -0
  232. package/src/{components → containers}/Settings/Settings.tsx +11 -8
  233. package/{dist/components/Settings/index.d.ts → src/containers/Settings/index.ts} +1 -1
  234. package/src/containers/SwapHistory/SwapHistory.stories.tsx +3 -3
  235. package/src/containers/SwapHistory/SwapHistory.tsx +4 -5
  236. package/src/containers/SwapHistory/mock.ts +2 -2
  237. package/src/{components → containers}/TokenSelector/TokenSelector.stories.tsx +7 -8
  238. package/src/{components → containers}/TokenSelector/TokenSelector.tsx +7 -6
  239. package/{dist/components/TokenSelector/index.d.ts → src/containers/TokenSelector/index.ts} +1 -1
  240. package/src/containers/index.ts +5 -0
  241. package/src/theme.ts +14 -22
  242. package/src/types/index.ts +1 -1
  243. package/dist/components/Spacer/Spacer.d.ts +0 -6
  244. package/dist/components/Spacer/Spacer.stories.d.ts +0 -5
  245. package/dist/components/Spacer/index.d.ts +0 -1
  246. package/dist/components/SwapContainer/SwapContainer.stories.d.ts +0 -5
  247. package/dist/components/TokenSelector/TokenSelector.d.ts +0 -14
  248. package/dist/ui.cjs.development.js +0 -5181
  249. package/dist/ui.cjs.development.js.map +0 -1
  250. package/dist/ui.cjs.production.min.js +0 -2
  251. package/dist/ui.cjs.production.min.js.map +0 -1
  252. package/dist/ui.esm.js +0 -5091
  253. package/dist/ui.esm.js.map +0 -1
  254. package/src/components/BlockchainSelector/BlockchainSelector.stories.tsx +0 -25
  255. package/src/components/ConnectWalletsModal/ConnectWallets.stories.tsx +0 -13
  256. package/src/components/Settings/Settings.stories.tsx +0 -34
  257. package/src/components/Spacer/Spacer.stories.tsx +0 -31
  258. package/src/components/Spacer/Spacer.tsx +0 -128
  259. package/src/components/Spacer/index.ts +0 -1
  260. package/src/components/SwapContainer/SwapContainer.stories.tsx +0 -13
  261. /package/{src/components/BlockchainSelector/index.ts → dist/containers/BlockchainSelector/index.d.ts} +0 -0
  262. /package/{src/components/ConnectWalletsModal/index.ts → dist/containers/ConnectWalletsModal/index.d.ts} +0 -0
  263. /package/{src/components/LiquiditySourcesSelector/index.ts → dist/containers/LiquiditySourcesSelector/index.d.ts} +0 -0
  264. /package/{src/components/Settings/index.ts → dist/containers/Settings/index.d.ts} +0 -0
  265. /package/{src/components/TokenSelector/index.ts → dist/containers/TokenSelector/index.d.ts} +0 -0
@@ -1,2 +1,2 @@
1
- export * from './wallet';
2
- export { BestRouteWithFee } from './swaps';
1
+ export * from './wallet';
2
+ export type { BestRouteWithFee } from './swaps';
@@ -1,23 +1,23 @@
1
- export declare type TokenMeta = {
2
- blockchain: string;
3
- symbol: string;
4
- image: string;
5
- address: string | null;
6
- usdPrice: number | null;
7
- isSecondaryCoin: boolean;
8
- coinSource: string | null;
9
- coinSourceUrl: string | null;
10
- name: string | null;
11
- decimals: number;
12
- balance?: {
13
- amount: string;
14
- usdPrice: string;
15
- };
16
- };
17
- export interface LiquiditySource {
18
- title: string;
19
- logo: string;
20
- type: 'BRIDGE' | 'AGGREGATOR' | 'DEX';
21
- selected: boolean;
22
- }
23
- export declare type LoadingStatus = 'loading' | 'success' | 'failed';
1
+ export type TokenMeta = {
2
+ blockchain: string;
3
+ symbol: string;
4
+ image: string;
5
+ address: string | null;
6
+ usdPrice: number | null;
7
+ isSecondaryCoin: boolean;
8
+ coinSource: string | null;
9
+ coinSourceUrl: string | null;
10
+ name: string | null;
11
+ decimals: number;
12
+ balance?: {
13
+ amount: string;
14
+ usdPrice: string;
15
+ };
16
+ };
17
+ export interface LiquiditySource {
18
+ title: string;
19
+ logo: string;
20
+ type: 'BRIDGE' | 'AGGREGATOR' | 'DEX';
21
+ selected: boolean;
22
+ }
23
+ export type LoadingStatus = 'loading' | 'success' | 'failed';
@@ -1,29 +1,29 @@
1
- import { BestRouteResponse, BlockchainValidationStatus, SimulationResult, SwapResult, WalletRequiredAssets } from 'rango-sdk';
2
- export declare type SwapStatus = 'running' | 'failed' | 'success';
3
- export declare type MessageSeverity = 'error' | 'warning' | 'info' | 'success';
4
- export declare type StepStatus = 'created' | 'running' | 'failed' | 'success' | 'waitingForApproval' | 'approved';
5
- export declare enum PendingSwapNetworkStatus {
6
- WaitingForConnectingWallet = "waitingForConnectingWallet",
7
- WaitingForQueue = "waitingForQueue",
8
- WaitingForNetworkChange = "waitingForNetworkChange",
9
- NetworkChanged = "networkChanged"
10
- }
11
- export declare type WalletTypeAndAddress = {
12
- walletType: string;
13
- address: string;
14
- };
15
- export declare type SwapSavedSettings = {
16
- slippage: string;
17
- disabledSwappersIds: string[];
18
- disabledSwappersGroups: string[];
19
- };
20
- export declare type SimulationAssetAndAmount = WalletRequiredAssets;
21
- export declare type SimulationValidationStatus = BlockchainValidationStatus;
22
- export declare type BestRouteType = BestRouteResponse;
23
- export declare type BestRouteWithFee = Omit<BestRouteResponse, 'result'> & {
24
- result: Omit<SimulationResult, 'swaps'> & {
25
- swaps: (SwapResult & {
26
- feeInUsd?: string;
27
- })[];
28
- };
29
- };
1
+ import { BestRouteResponse, BlockchainValidationStatus, SimulationResult, SwapResult, WalletRequiredAssets } from 'rango-sdk';
2
+ export type SwapStatus = 'running' | 'failed' | 'success';
3
+ export type MessageSeverity = 'error' | 'warning' | 'info' | 'success';
4
+ export type StepStatus = 'created' | 'running' | 'failed' | 'success' | 'waitingForApproval' | 'approved';
5
+ export declare enum PendingSwapNetworkStatus {
6
+ WaitingForConnectingWallet = "waitingForConnectingWallet",
7
+ WaitingForQueue = "waitingForQueue",
8
+ WaitingForNetworkChange = "waitingForNetworkChange",
9
+ NetworkChanged = "networkChanged"
10
+ }
11
+ export type WalletTypeAndAddress = {
12
+ walletType: string;
13
+ address: string;
14
+ };
15
+ export type SwapSavedSettings = {
16
+ slippage: string;
17
+ disabledSwappersIds: string[];
18
+ disabledSwappersGroups: string[];
19
+ };
20
+ export type SimulationAssetAndAmount = WalletRequiredAssets;
21
+ export type SimulationValidationStatus = BlockchainValidationStatus;
22
+ export type BestRouteType = BestRouteResponse;
23
+ export type BestRouteWithFee = Omit<BestRouteResponse, 'result'> & {
24
+ result: Omit<SimulationResult, 'swaps'> & {
25
+ swaps: (SwapResult & {
26
+ feeInUsd?: string;
27
+ })[];
28
+ };
29
+ };
@@ -1,23 +1,23 @@
1
- import { InstallObjects, WalletType } from '@rango-dev/wallets-shared';
2
- export declare enum WalletState {
3
- NOT_INSTALLED = "not installed",
4
- DISCONNECTED = "disconnected",
5
- CONNECTING = "connecting",
6
- CONNECTED = "connected"
7
- }
8
- export declare type WalletInfo = {
9
- state: WalletState.CONNECTED | WalletState.DISCONNECTED | WalletState.CONNECTING | WalletState.NOT_INSTALLED;
10
- installLink: InstallObjects | string;
11
- name: string;
12
- image: string;
13
- type: WalletType;
14
- showOnMobile: boolean;
15
- };
16
- export interface SelectableWallet {
17
- chain: string;
18
- walletType: WalletType;
19
- address: string;
20
- image: string;
21
- selected: boolean;
22
- name: string;
23
- }
1
+ import { InstallObjects, WalletType } from '@rango-dev/wallets-shared';
2
+ export declare enum WalletState {
3
+ NOT_INSTALLED = "not installed",
4
+ DISCONNECTED = "disconnected",
5
+ CONNECTING = "connecting",
6
+ CONNECTED = "connected"
7
+ }
8
+ export type WalletInfo = {
9
+ state: WalletState.CONNECTED | WalletState.DISCONNECTED | WalletState.CONNECTING | WalletState.NOT_INSTALLED;
10
+ installLink: InstallObjects | string;
11
+ name: string;
12
+ image: string;
13
+ type: WalletType;
14
+ showOnMobile: boolean;
15
+ };
16
+ export interface SelectableWallet {
17
+ chain: string;
18
+ walletType: WalletType;
19
+ address: string;
20
+ image: string;
21
+ selected: boolean;
22
+ name: string;
23
+ }
package/package.json CHANGED
@@ -1,58 +1,37 @@
1
1
  {
2
2
  "name": "@rango-dev/ui",
3
- "version": "0.1.14",
3
+ "version": "0.1.16-next.0",
4
4
  "license": "MIT",
5
- "main": "dist/index.js",
5
+ "module": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "files": [
8
8
  "dist",
9
9
  "src"
10
10
  ],
11
11
  "scripts": {
12
- "dev": "tsdx watch",
13
- "build": "tsdx build --tsconfig ./tsconfig.json",
14
- "test": "tsdx test --passWithNoTests",
15
- "lint": "tsdx lint",
16
- "prepare": "tsdx build --tsconfig ./tsconfig.json",
17
- "size": "size-limit",
18
- "analyze": "size-limit --why",
19
- "storybook": "start-storybook -p 3000",
20
- "build-storybook": "build-storybook"
12
+ "dev": "yarn bundle --watch",
13
+ "bundle": "esbuild src/index.ts --bundle --minify --keep-names --sourcemap --outdir=dist --platform=node --format=esm --packages=external",
14
+ "build": "yarn type-checking && yarn bundle",
15
+ "type-checking": "tsc --declaration --emitDeclarationOnly",
16
+ "storybook": "storybook dev -p 3000",
17
+ "build-storybook": "storybook build"
21
18
  },
22
19
  "peerDependencies": {
23
20
  "@rango-dev/queue-manager-rango-preset": "*",
24
21
  "react": ">=16"
25
22
  },
26
- "husky": {
27
- "hooks": {
28
- "pre-commit": "tsdx lint"
29
- }
30
- },
31
- "prettier": {
32
- "printWidth": 80,
33
- "semi": true,
34
- "singleQuote": true,
35
- "trailingComma": "es5"
36
- },
37
- "module": "dist/ui.esm.js",
38
- "size-limit": [
39
- {
40
- "path": "dist/ui.cjs.production.min.js",
41
- "limit": "10 KB"
42
- },
43
- {
44
- "path": "dist/ui.esm.js",
45
- "limit": "10 KB"
46
- }
47
- ],
48
23
  "devDependencies": {
49
24
  "@babel/core": "^7.20.2",
25
+ "@babel/preset-env": "^7.21.4",
26
+ "@babel/preset-react": "^7.18.6",
27
+ "@babel/preset-typescript": "^7.21.4",
50
28
  "@size-limit/preset-small-lib": "^8.1.0",
51
- "@storybook/addon-essentials": "^6.5.13",
29
+ "@storybook/addon-essentials": "^7.0.9",
52
30
  "@storybook/addon-info": "^5.3.21",
53
- "@storybook/addon-links": "^6.5.13",
54
- "@storybook/addons": "^6.5.13",
55
- "@storybook/react": "^6.5.13",
31
+ "@storybook/addon-links": "^7.0.9",
32
+ "@storybook/addons": "^7.0.9",
33
+ "@storybook/react": "^7.0.9",
34
+ "@storybook/react-webpack5": "^7.0.9",
56
35
  "@types/react": "^18.0.25",
57
36
  "@types/react-dom": "^18.0.8",
58
37
  "@types/react-virtualized-auto-sizer": "^1.0.1",
@@ -64,6 +43,7 @@
64
43
  "react-dom": "^18.2.0",
65
44
  "react-is": "^18.2.0",
66
45
  "size-limit": "^8.1.0",
46
+ "storybook": "^7.0.9",
67
47
  "tsdx": "^0.14.1",
68
48
  "tslib": "^2.4.1",
69
49
  "typescript": "^4.8.4"
@@ -73,7 +53,7 @@
73
53
  "@radix-ui/react-radio-group": "^1.1.1",
74
54
  "@radix-ui/react-switch": "^1.0.1",
75
55
  "@radix-ui/react-tooltip": "^1.0.2",
76
- "@rango-dev/wallets-shared": "^0.1.13",
56
+ "@rango-dev/wallets-shared": "^0.1.14",
77
57
  "@stitches/react": "^1.2.8",
78
58
  "@types/react-color": "^3.0.6",
79
59
  "rango-sdk": "^0.1.27",
@@ -1,22 +1,35 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
3
2
  import { Alert } from '.';
4
3
  import { PropTypes } from './Alert';
4
+ import { Meta } from '@storybook/react';
5
+ import { Typography } from '../Typography';
5
6
 
6
7
  export default {
7
- title: 'Alert',
8
+ title: 'Components/Alert',
8
9
  component: Alert,
10
+ args: {
11
+ type: 'success',
12
+ title: 'Alert Title',
13
+ footer: <Typography variant='body1'>It's a Alert!</Typography>
14
+ },
9
15
  argTypes: {
10
16
  type: {
17
+ name: 'type',
11
18
  defaultValue: 'success',
19
+ control: {
20
+ type: 'select',
21
+ options: ['primary', 'secondary', 'success', 'warning', 'error'],
22
+ },
12
23
  },
24
+
13
25
  title: {
26
+ name: 'title',
14
27
  defaultValue: 'Alert Title',
15
- },
16
- description: {
17
- defaultValue: 'Alert description ...',
28
+ control: {
29
+ type: 'text',
30
+ },
18
31
  },
19
32
  },
20
- } as ComponentMeta<typeof Alert>;
33
+ } as Meta<typeof Alert>;
21
34
 
22
35
  export const Main = (args: PropTypes) => <Alert {...args} />;
@@ -2,7 +2,7 @@ import React, { PropsWithChildren, ReactNode } from 'react';
2
2
  import { CheckCircleIcon, InfoCircleIcon, WarningIcon } from '../Icon';
3
3
  import { Typography } from '../Typography';
4
4
  import { styled } from '../../theme';
5
- import { Spacer } from '../Spacer';
5
+ import { Divider } from '../Divider';
6
6
 
7
7
  const MainContainer = styled('div', {
8
8
  width: '100%',
@@ -72,7 +72,7 @@ export function Alert(props: PropsWithChildren<PropTypes>) {
72
72
  {type === 'success' && <CheckCircleIcon color={type} size={24} />}
73
73
  {type === 'warning' && <WarningIcon color={type} size={24} />}
74
74
  {type === 'error' && <InfoCircleIcon color={type} size={24} />}
75
- <Spacer size={4} />
75
+ <Divider size={4} direction='horizontal' />
76
76
  </div>
77
77
  </>
78
78
  )}
@@ -90,7 +90,7 @@ export function Alert(props: PropsWithChildren<PropTypes>) {
90
90
  <Typography className="title" variant="title" color={type}>
91
91
  {title}
92
92
  </Typography>
93
- {!!children && <Spacer size={4} direction="vertical" />}
93
+ {!!children && <Divider size={4} />}
94
94
  </>
95
95
  )}
96
96
  {children}
@@ -1,27 +1,37 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
3
2
  import { BestRoute, PropTypes } from './BestRoute';
4
3
  import { bestRoute, bestRouteExample2, bestRouteExample3 } from './mock';
4
+ import { Meta } from '@storybook/react';
5
5
 
6
6
  export default {
7
7
  title: 'Components/Best Route',
8
8
  component: BestRoute,
9
- } as ComponentMeta<typeof BestRoute>;
9
+ } as Meta<typeof BestRoute>;
10
10
 
11
11
  export const Main = (props: PropTypes) => (
12
12
  <div style={{ maxWidth: 512 }}>
13
- <BestRoute {...props} data={bestRoute} />
13
+ <BestRoute {...props} data={bestRoute} totalFee="0.28" totalTime="10:45" />
14
14
  </div>
15
15
  );
16
16
  export const With4Step = (props: PropTypes) => (
17
17
  <div style={{ maxWidth: 512 }}>
18
- <BestRoute {...props} data={bestRouteExample2} />
18
+ <BestRoute
19
+ {...props}
20
+ data={bestRouteExample2}
21
+ totalFee="0.28"
22
+ totalTime="10:45"
23
+ />
19
24
  </div>
20
25
  );
21
26
 
22
27
  export const With2Step = (props: PropTypes) => (
23
28
  <div style={{ maxWidth: 512 }}>
24
- <BestRoute {...props} data={bestRouteExample3} />
29
+ <BestRoute
30
+ {...props}
31
+ data={bestRouteExample3}
32
+ totalFee="0.28"
33
+ totalTime="10:45"
34
+ />
25
35
  </div>
26
36
  );
27
37
  export const WithError = (props: PropTypes) => (
@@ -174,7 +174,7 @@ export const bestRouteExample2: BestRouteType = {
174
174
  warnings: [],
175
175
  swapperId: 'ParaSwap Bsc',
176
176
  swapperType: 'DEX',
177
- swapperLogo: 'https://api.rango.exchange/swappers/para-swap.png',
177
+ swapperLogo: 'https://api.rango.exchange/swappers/paraswap.svg',
178
178
 
179
179
  from: {
180
180
  symbol: 'USDC',
@@ -1,18 +1,24 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { BlockchainsList, PropTypes } from './BlockchainsList';
4
4
  import { blockchainMeta } from './mockData';
5
5
 
6
6
  export default {
7
- title: 'Blockchains List',
7
+ title: 'Components/Blockchains List',
8
8
  component: BlockchainsList,
9
+ args: {
10
+ searchedText: '',
11
+ },
9
12
  argTypes: {
10
13
  searchedText: {
11
14
  type: 'string',
12
15
  defaultValue: '',
16
+ control: {
17
+ type: 'text',
18
+ },
13
19
  },
14
20
  },
15
- } as ComponentMeta<typeof BlockchainsList>;
21
+ } as Meta<typeof BlockchainsList>;
16
22
 
17
23
  export const Main = (args: PropTypes) => {
18
24
  return (