@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,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
 
4
4
  import { Button, PropTypes } from './Button';
5
5
  import { AddWalletIcon } from '../Icon';
@@ -7,6 +7,11 @@ import { AddWalletIcon } from '../Icon';
7
7
  export default {
8
8
  title: 'Components/Button',
9
9
  component: Button,
10
+ args: {
11
+ variant: 'contained',
12
+ size: 'medium',
13
+ type: 'primary',
14
+ },
10
15
  argTypes: {
11
16
  variant: {
12
17
  name: 'variant',
@@ -26,7 +31,7 @@ export default {
26
31
  },
27
32
  size: {
28
33
  name: 'size',
29
- control: { type: 'radio' },
34
+ control: { type: 'select' },
30
35
  options: ['small', 'medium', 'large', 'compact'],
31
36
  defaultValue: 'medium',
32
37
  },
@@ -35,7 +40,7 @@ export default {
35
40
  control: { type: 'boolean' },
36
41
  },
37
42
  },
38
- } as ComponentMeta<typeof Button>;
43
+ } as Meta<typeof Button>;
39
44
 
40
45
  export const Main = (props: PropTypes) => (
41
46
  <Button {...props}>I'm a button</Button>
@@ -1,10 +1,14 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { Checkbox, PropTypes } from './Checkbox';
4
4
 
5
5
  export default {
6
6
  title: 'Components/Checkbox',
7
7
  component: Checkbox,
8
+ args: {
9
+ label: 'I am a checkbox',
10
+ defaultChecked: true,
11
+ },
8
12
  argTypes: {
9
13
  label: {
10
14
  name: 'label',
@@ -17,6 +21,6 @@ export default {
17
21
  defaultValue: true,
18
22
  },
19
23
  },
20
- } as ComponentMeta<typeof Checkbox>;
24
+ } as Meta<typeof Checkbox>;
21
25
 
22
26
  export const Main = (props: PropTypes) => <Checkbox {...props} id="test" />;
@@ -1,22 +1,39 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
 
4
4
  import { Chip, PropTypes } from './Chip';
5
5
 
6
6
  export default {
7
- title: 'Chip',
7
+ title: 'Components/Chip',
8
8
  component: Chip,
9
- } as ComponentMeta<typeof Chip>;
9
+ args: {
10
+ label: 'chip',
11
+ selected: true,
12
+ },
13
+ argTypes: {
14
+ label: {
15
+ name: 'label',
16
+ defaultValue: 'chip',
17
+ control: {
18
+ type: 'text',
19
+ },
20
+ },
21
+ selected: {
22
+ name: 'selected',
23
+ control: { type: 'boolean' },
24
+ defaultValue: true,
25
+ },
26
+ },
27
+ } as Meta<typeof Chip>;
10
28
 
11
- export const Main = (args: PropTypes) => <Chip {...args} label="chip" />;
29
+ export const Main = (args: PropTypes) => <Chip {...args} />;
12
30
 
13
31
  export const ChipWithPrefix = (args: PropTypes) => (
14
32
  <Chip
15
33
  {...args}
16
- label="chip"
17
34
  prefix={
18
35
  <img
19
- src=" https://api.rango.exchange/blockchains/binance.svg"
36
+ src="https://api.rango.exchange/blockchains/binance.svg"
20
37
  style={{ width: '20px' }}
21
38
  />
22
39
  }
@@ -26,7 +43,6 @@ export const ChipWithPrefix = (args: PropTypes) => (
26
43
  export const ChipWithSuffix = (args: PropTypes) => (
27
44
  <Chip
28
45
  {...args}
29
- label="chip"
30
46
  suffix={
31
47
  <img
32
48
  src=" https://api.rango.exchange/blockchains/binance.svg"
@@ -1,10 +1,13 @@
1
1
  import React, { useState } from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { ColorPicker, PropTypes } from './ColorPicker';
4
4
 
5
5
  export default {
6
6
  title: 'Components/ColorPicker',
7
7
  component: ColorPicker,
8
+ args: {
9
+ place: 'left',
10
+ },
8
11
  argTypes: {
9
12
  place: {
10
13
  name: 'place',
@@ -18,14 +21,14 @@ export default {
18
21
  defaultValue: 'Choose a color',
19
22
  },
20
23
  },
21
- } as ComponentMeta<typeof ColorPicker>;
24
+ } as Meta<typeof ColorPicker>;
22
25
 
23
26
  export const Main = (args: PropTypes) => {
24
27
  const [color, setColor] = useState<string | undefined>('#5FA425');
25
28
  return (
26
29
  <div
27
30
  style={{
28
- height: 600,
31
+ height: 400,
29
32
  display: 'flex',
30
33
  justifyContent: 'center',
31
34
  alignItems: 'center',
@@ -4,38 +4,140 @@ import { styled } from '../../theme';
4
4
  const DividerContainer = styled('div', {
5
5
  variants: {
6
6
  size: {
7
- 4: {
7
+ 4: {},
8
+ 8: {},
9
+ 12: {},
10
+ 16: {},
11
+ 18: {},
12
+ 20: {},
13
+ 24: {},
14
+ 32: {},
15
+ },
16
+ direction: {
17
+ vertical: {},
18
+ horizontal: {},
19
+ },
20
+ },
21
+ compoundVariants: [
22
+ {
23
+ size: 4,
24
+ direction: 'horizontal',
25
+ css: {
26
+ width: '$4',
27
+ },
28
+ },
29
+ {
30
+ size: 4,
31
+ direction: 'vertical',
32
+ css: {
8
33
  height: '$4',
9
34
  },
10
- 8: {
35
+ },
36
+ {
37
+ size: 8,
38
+ direction: 'horizontal',
39
+ css: {
40
+ width: '$8',
41
+ },
42
+ },
43
+ {
44
+ size: 8,
45
+ direction: 'vertical',
46
+ css: {
11
47
  height: '$8',
12
48
  },
13
- 12: {
49
+ },
50
+ {
51
+ size: 12,
52
+ direction: 'horizontal',
53
+ css: {
54
+ width: '$12',
55
+ },
56
+ },
57
+ {
58
+ size: 12,
59
+ direction: 'vertical',
60
+ css: {
14
61
  height: '$12',
15
62
  },
16
- 16: {
63
+ },
64
+ {
65
+ size: 16,
66
+ direction: 'horizontal',
67
+ css: {
68
+ width: '$16',
69
+ },
70
+ },
71
+ {
72
+ size: 16,
73
+ direction: 'vertical',
74
+ css: {
17
75
  height: '$16',
18
76
  },
19
- 18: {
77
+ },
78
+ {
79
+ size: 18,
80
+ direction: 'horizontal',
81
+ css: {
82
+ width: '$18',
83
+ },
84
+ },
85
+ {
86
+ size: 18,
87
+ direction: 'vertical',
88
+ css: {
20
89
  height: '$18',
21
90
  },
22
- 20: {
91
+ },
92
+ {
93
+ size: 20,
94
+ direction: 'horizontal',
95
+ css: {
96
+ width: '$20',
97
+ },
98
+ },
99
+ {
100
+ size: 20,
101
+ direction: 'vertical',
102
+ css: {
23
103
  height: '$20',
24
104
  },
25
- 24: {
105
+ },
106
+ {
107
+ size: 24,
108
+ direction: 'horizontal',
109
+ css: {
110
+ width: '$24',
111
+ },
112
+ },
113
+ {
114
+ size: 24,
115
+ direction: 'vertical',
116
+ css: {
26
117
  height: '$24',
27
118
  },
28
- 32: {
119
+ },
120
+ {
121
+ size: 32,
122
+ direction: 'horizontal',
123
+ css: {
124
+ width: '$32',
125
+ },
126
+ },
127
+ {
128
+ size: 32,
129
+ direction: 'vertical',
130
+ css: {
29
131
  height: '$32',
30
132
  },
31
133
  },
32
- },
134
+ ],
33
135
  });
34
136
  export interface PropTypes {
35
137
  size?: 4 | 8 | 12 | 16 | 18 | 20 | 24 | 32;
36
138
  direction?: 'vertical' | 'horizontal';
37
139
  }
38
140
 
39
- export function Divider({ size = 12 }: PropTypes) {
40
- return <DividerContainer size={size} />;
141
+ export function Divider({ size = 12, direction = 'vertical' }: PropTypes) {
142
+ return <DividerContainer size={size} direction={direction} />;
41
143
  }
@@ -1,10 +1,15 @@
1
1
  import React, { useState } from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { Drawer, PropTypes } from './Drawer';
4
4
 
5
5
  export default {
6
6
  name: 'Components/Drawer',
7
7
  component: Drawer,
8
+ args: {
9
+ anchor: 'bottom',
10
+ title: 'I`m Drawer',
11
+ container: document.body,
12
+ },
8
13
  argTypes: {
9
14
  anchor: {
10
15
  name: 'anchor',
@@ -13,19 +18,14 @@ export default {
13
18
  defaultValue: 'bottom',
14
19
  },
15
20
  },
16
- } as ComponentMeta<typeof Drawer>;
21
+ } as Meta<typeof Drawer>;
17
22
 
18
23
  export const Main = (args: PropTypes) => {
19
24
  const [open, setOpen] = useState<boolean>(false);
20
25
  return (
21
26
  <div>
22
27
  <button onClick={() => setOpen(true)}>Open Drawer</button>
23
- <Drawer
24
- {...args}
25
- open={open}
26
- title="I'm Drawer"
27
- onClose={() => setOpen(false)}
28
- />
28
+ <Drawer {...args} open={open} onClose={() => setOpen(false)} />
29
29
  </div>
30
30
  );
31
31
  };
@@ -47,9 +47,7 @@ export const BottomAnchor = (args: PropTypes) => {
47
47
  <Drawer
48
48
  {...args}
49
49
  open={open}
50
- title="I'm Drawer"
51
50
  onClose={() => setOpen(false)}
52
- anchor="bottom"
53
51
  content={
54
52
  <div>
55
53
  {Array.from({ length: 50 }, (_, index) => (
@@ -70,7 +68,6 @@ export const LeftAnchor = (args: PropTypes) => {
70
68
  <Drawer
71
69
  {...args}
72
70
  open={open}
73
- title="I'm Drawer"
74
71
  onClose={() => setOpen(false)}
75
72
  anchor="left"
76
73
  content={
@@ -1,12 +1,16 @@
1
1
  import React from 'react';
2
2
  import { Icon, IconProps } from './types';
3
3
  import * as Icons from '.';
4
- import { ComponentMeta } from '@storybook/react';
4
+ import { Meta } from '@storybook/react';
5
5
  import { styled } from '../../theme';
6
6
 
7
7
  export default {
8
8
  title: 'Components/Icons',
9
9
  component: Icons.AngleRightIcon,
10
+ args: {
11
+ size: 16,
12
+ color: 'black',
13
+ },
10
14
  argTypes: {
11
15
  color: {
12
16
  name: 'color',
@@ -16,12 +20,12 @@ export default {
16
20
 
17
21
  size: {
18
22
  name: 'size',
19
- control: { type: 'radio' },
23
+ control: { type: 'select' },
20
24
  options: [16, 18, 20, 24, 28, 32, 36, 40],
21
25
  defaultValue: 16,
22
26
  },
23
27
  },
24
- } as ComponentMeta<typeof Icons.AngleRightIcon>;
28
+ } as Meta<typeof Icons.AngleRightIcon>;
25
29
 
26
30
  const Container = styled('div', {
27
31
  display: 'grid',
@@ -31,7 +35,7 @@ const Container = styled('div', {
31
35
 
32
36
  export const Main = (props: IconProps) => (
33
37
  <Container>
34
- {Object.keys(Icons).map(icon => {
38
+ {Object.keys(Icons).map((icon) => {
35
39
  const Component = Icons[icon as Icon];
36
40
  return (
37
41
  <div>
@@ -1,12 +1,15 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { LiquiditySourceList, PropTypes } from './LiquiditySourceList';
4
4
  import { liquiditySources } from './mockData';
5
5
 
6
6
  export default {
7
- title: 'Liquidity Source List',
7
+ title: 'Components/Liquidity Source List',
8
8
  component: LiquiditySourceList,
9
- } as ComponentMeta<typeof LiquiditySourceList>;
9
+ args: {
10
+ loadingStatus: 'success',
11
+ },
12
+ } as Meta<typeof LiquiditySourceList>;
10
13
 
11
14
  export const Main = (args: PropTypes) => (
12
15
  <LiquiditySourceList {...args} list={liquiditySources} />
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
3
3
  import { styled } from '../../theme';
4
4
  import { LiquiditySource, LoadingStatus } from '../../types/meta';
5
5
  import { Button } from '../Button/Button';
6
- import { Spacer } from '../Spacer';
6
+ import { Divider } from '../Divider';
7
7
  import { Switch } from '../Switch';
8
8
  import { Typography } from '../Typography';
9
9
  import { Spinner } from '../Spinner';
@@ -111,7 +111,7 @@ export function LiquiditySourceList(props: PropTypes) {
111
111
  : `${totalSelectedBridges} / ${totalBridges}`}
112
112
  </Typography>
113
113
  </LiquiditySourceType>
114
- <Spacer size={12} direction="vertical" />
114
+ <Divider size={12} />
115
115
  {loadingStatus === 'loading' && (
116
116
  <LoaderContainer>
117
117
  <Spinner size={24} />
@@ -144,7 +144,7 @@ export function LiquiditySourceList(props: PropTypes) {
144
144
  : `${totalSelectedExchanges} / ${totalExchanges}`}
145
145
  </Typography>
146
146
  </LiquiditySourceType>
147
- <Spacer size={12} direction="vertical" />
147
+ <Divider size={12} />
148
148
  {loadingStatus === 'loading' && (
149
149
  <LoaderContainer>
150
150
  <Spinner size={24} />
@@ -1,22 +1,21 @@
1
1
  import React, { useState } from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { Modal, PropTypes } from './Modal';
4
4
 
5
- export default { name: 'Modal', component: Modal } as ComponentMeta<
6
- typeof Modal
7
- >;
5
+ export default {
6
+ name: 'Modal',
7
+ component: Modal,
8
+ args: {
9
+ title: 'I`m a modal',
10
+ },
11
+ } as Meta<typeof Modal>;
8
12
 
9
13
  export const Main = (args: PropTypes) => {
10
14
  const [open, setOpen] = useState<boolean>(false);
11
15
  return (
12
16
  <div>
13
17
  <button onClick={() => setOpen(true)}>Open Modal</button>
14
- <Modal
15
- {...args}
16
- open={open}
17
- title="I'm modal"
18
- onClose={() => setOpen(false)}
19
- />
18
+ <Modal {...args} open={open} onClose={() => setOpen(false)} />
20
19
  </div>
21
20
  );
22
21
  };
@@ -1,10 +1,19 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { PropTypes, Radio } from './Radio';
4
4
 
5
5
  export default {
6
- title: 'Radio',
6
+ title: 'Components/Radio',
7
7
  component: Radio,
8
+ args: {
9
+ options: [
10
+ { value: 'one', label: 'One' },
11
+ { value: 'two', label: 'Two' },
12
+ { value: 'three', label: 'Three' },
13
+ ],
14
+ direction: 'horizontal',
15
+ defaultValue: 'one',
16
+ },
8
17
  argTypes: {
9
18
  options: {
10
19
  defaultValue: [
@@ -13,11 +22,7 @@ export default {
13
22
  { value: 'three', label: 'Three' },
14
23
  ],
15
24
  },
16
- defaultValue: { defaultValue: 'one' },
17
- direction: {
18
- defaultValue: 'horizontal',
19
- },
20
25
  },
21
- } as ComponentMeta<typeof Radio>;
26
+ } as Meta<typeof Radio>;
22
27
 
23
28
  export const Main = (args: PropTypes) => <Radio {...args} />;
@@ -1,7 +1,16 @@
1
- import { ComponentMeta } from '@storybook/react';
2
- import { SecondaryPage } from './SecondaryPage';
1
+ import { Meta } from '@storybook/react';
2
+ import { PropTypes, SecondaryPage } from './SecondaryPage';
3
+ import React from 'react';
3
4
 
4
5
  export default {
5
6
  title: 'Components/Secondary Page',
6
7
  component: SecondaryPage,
7
- } as ComponentMeta<typeof SecondaryPage>;
8
+ args:{
9
+ textField:true,
10
+ textFieldPlaceholder:'Search',
11
+ title:'Secondary Page'
12
+ }
13
+ } as Meta<typeof SecondaryPage>;
14
+
15
+
16
+ export const Main = (args: PropTypes) => <SecondaryPage {...args} />;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
 
4
4
  import { SelectableWalletList, PropTypes } from './SelectableWalletList';
5
5
  import { data } from './mock';
@@ -7,7 +7,7 @@ import { data } from './mock';
7
7
  export default {
8
8
  title: 'Components/SelectableWalletList',
9
9
  component: SelectableWalletList,
10
- } as ComponentMeta<typeof SelectableWalletList>;
10
+ } as Meta<typeof SelectableWalletList>;
11
11
 
12
12
  export const Main = (props: PropTypes) => (
13
13
  <SelectableWalletList {...props} list={data} />
@@ -1,11 +1,11 @@
1
- import { Network, WalletType } from '@rango-dev/wallets-shared';
1
+ import { Network, WalletTypes } from '@rango-dev/wallets-shared';
2
2
  import { SelectableWallet } from '../../types';
3
3
 
4
4
  export const data: SelectableWallet[] = [
5
5
  {
6
6
  chain: Network.BTC,
7
7
  name: Network.BTC,
8
- walletType: WalletType.META_MASK,
8
+ walletType: WalletTypes.META_MASK,
9
9
  address: '0x5423e28219d6d568dcf62a8134d623e6f4a1c2df',
10
10
  image: 'https://app.rango.exchange/wallets/metamask.svg',
11
11
  selected: true,
@@ -1,10 +1,14 @@
1
- import { ComponentMeta } from '@storybook/react';
1
+ import { Meta } from '@storybook/react';
2
2
  import React from 'react';
3
3
  import { Skeleton, PropTypes } from './Skeleton';
4
4
 
5
5
  export default {
6
6
  title: 'Components/Skeleton',
7
7
  component: Skeleton,
8
+ args: {
9
+ width: 20,
10
+ height: 20,
11
+ },
8
12
  argTypes: {
9
13
  width: {
10
14
  name: 'width',
@@ -19,6 +23,6 @@ export default {
19
23
  defaultValue: 20,
20
24
  },
21
25
  },
22
- } as ComponentMeta<typeof Skeleton>;
26
+ } as Meta<typeof Skeleton>;
23
27
 
24
28
  export const Main = (props: PropTypes) => <Skeleton {...props} />;
@@ -1,10 +1,14 @@
1
- import { ComponentMeta } from '@storybook/react';
1
+ import { Meta } from '@storybook/react';
2
2
  import React from 'react';
3
3
  import { Spinner, PropTypes } from './Spinner';
4
4
 
5
5
  export default {
6
6
  title: 'Components/Spinner',
7
7
  component: Spinner,
8
+ args: {
9
+ color: 'primary',
10
+ size: 16,
11
+ },
8
12
  argTypes: {
9
13
  color: {
10
14
  name: 'color',
@@ -20,6 +24,6 @@ export default {
20
24
  defaultValue: 16,
21
25
  },
22
26
  },
23
- } as ComponentMeta<typeof Spinner>;
27
+ } as Meta<typeof Spinner>;
24
28
 
25
29
  export const Main = (props: PropTypes) => <Spinner {...props} />;
@@ -1,11 +1,16 @@
1
1
  import React, { useState } from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { StatusDrawer, PropTypes } from './StatusDrawer';
4
4
  import { SwapContainer } from '../SwapContainer';
5
5
 
6
6
  export default {
7
7
  name: 'Components/StatusDrawer',
8
8
  component: StatusDrawer,
9
+ args: {
10
+ status: 'success',
11
+ title: 'Swap successful',
12
+ subtitle: 'There are now 0.0493 BNB in 0x542...C2Df wallet on BSC chain.',
13
+ },
9
14
  argTypes: {
10
15
  status: {
11
16
  name: 'status',
@@ -25,7 +30,7 @@ export default {
25
30
  'There are now 0.0493 BNB in 0x542...C2Df wallet on BSC chain.',
26
31
  },
27
32
  },
28
- } as ComponentMeta<typeof StatusDrawer>;
33
+ } as Meta<typeof StatusDrawer>;
29
34
 
30
35
  export const Main = (args: PropTypes) => {
31
36
  const [open, setOpen] = useState<boolean>(false);
@@ -3,7 +3,7 @@ import { styled } from '../../theme';
3
3
  import { Button } from '../Button';
4
4
  import { Drawer } from '../Drawer';
5
5
  import { CheckCircleIcon, InfoCircleIcon, WarningIcon } from '../Icon';
6
- import { Spacer } from '../Spacer';
6
+ import { Divider } from '../Divider';
7
7
  import { Typography } from '../Typography';
8
8
 
9
9
  export interface PropTypes {
@@ -60,7 +60,7 @@ export function StatusDrawer({
60
60
  {status === 'success' ? 'Cancel' : 'See detailes'}
61
61
  </Button>
62
62
  )}
63
- <Spacer size={16} />
63
+ <Divider size={16} direction='horizontal' />
64
64
  <Button
65
65
  fullWidth
66
66
  onClick={onSubmit}
@@ -1,10 +1,17 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
2
+ import { Meta } from '@storybook/react';
3
3
  import { StepDetail, PropTypes } from './StepDetail';
4
4
 
5
5
  export default {
6
6
  title: 'Components/StepDetail',
7
7
  component: StepDetail,
8
+ args: {
9
+ logo: 'https://api.rango.exchange/tokens/COSMOS/JUNO.png',
10
+ chainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
11
+ amount: '1',
12
+ symbol: 'JUNO',
13
+ blockchain: 'OSMOSIS',
14
+ },
8
15
  argTypes: {
9
16
  logo: {
10
17
  name: 'logo',
@@ -32,6 +39,6 @@ export default {
32
39
  defaultValue: 'OSMOSIS',
33
40
  },
34
41
  },
35
- } as ComponentMeta<typeof StepDetail>;
42
+ } as Meta<typeof StepDetail>;
36
43
 
37
44
  export const Main = (props: PropTypes) => <StepDetail {...props} />;