@rango-dev/ui 0.1.13 → 0.1.14-next.10

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 (225) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/components/Alert/Alert.d.ts +7 -7
  3. package/dist/components/Alert/Alert.stories.d.ts +7 -5
  4. package/dist/components/Alert/LoadingFailedAlert.d.ts +2 -2
  5. package/dist/components/Alert/NotFoundAlert.d.ts +7 -7
  6. package/dist/components/Alert/index.d.ts +2 -2
  7. package/dist/components/BestRoute/BestRoute.d.ts +15 -12
  8. package/dist/components/BestRoute/BestRoute.stories.d.ts +9 -8
  9. package/dist/components/BestRoute/index.d.ts +1 -1
  10. package/dist/components/BestRoute/mock.d.ts +4 -4
  11. package/dist/components/BlockchainSelector/BlockchainSelector.d.ts +17 -17
  12. package/dist/components/BlockchainSelector/BlockchainSelector.stories.d.ts +6 -5
  13. package/dist/components/BlockchainSelector/index.d.ts +1 -1
  14. package/dist/components/BlockchainsList/BlockchainsList.d.ts +10 -10
  15. package/dist/components/BlockchainsList/BlockchainsList.stories.d.ts +6 -5
  16. package/dist/components/BlockchainsList/index.d.ts +1 -1
  17. package/dist/components/BlockchainsList/mockData.d.ts +2 -2
  18. package/dist/components/Button/Button.d.ts +17 -17
  19. package/dist/components/Button/Button.stories.d.ts +9 -8
  20. package/dist/components/Button/index.d.ts +1 -1
  21. package/dist/components/Checkbox/Checkbox.d.ts +11 -11
  22. package/dist/components/Checkbox/Checkbox.stories.d.ts +6 -5
  23. package/dist/components/Checkbox/index.d.ts +1 -1
  24. package/dist/components/Chip/Chip.d.ts +12 -12
  25. package/dist/components/Chip/Chip.stories.d.ts +8 -7
  26. package/dist/components/Chip/index.d.ts +1 -1
  27. package/dist/components/ColorPicker/ColorPicker.d.ts +9 -9
  28. package/dist/components/ColorPicker/ColorPicker.stories.d.ts +6 -5
  29. package/dist/components/ColorPicker/index.d.ts +1 -1
  30. package/dist/components/ConnectWalletsModal/ConnectWallets.stories.d.ts +6 -5
  31. package/dist/components/ConnectWalletsModal/ConnectWalletsModal.d.ts +11 -11
  32. package/dist/components/ConnectWalletsModal/index.d.ts +1 -1
  33. package/dist/components/ConnectWalletsModal/mockData.d.ts +2 -2
  34. package/dist/components/Divider/Divider.d.ts +6 -6
  35. package/dist/components/Divider/index.d.ts +1 -1
  36. package/dist/components/Drawer/Drawer.d.ts +13 -13
  37. package/dist/components/Drawer/Drawer.stories.d.ts +9 -8
  38. package/dist/components/Drawer/index.d.ts +1 -1
  39. package/dist/components/Header/Header.d.ts +9 -9
  40. package/dist/components/Header/index.d.ts +1 -1
  41. package/dist/components/Icon/AddCircleIcon.d.ts +3 -3
  42. package/dist/components/Icon/AddIcon.d.ts +3 -3
  43. package/dist/components/Icon/AddWalletIcon.d.ts +3 -3
  44. package/dist/components/Icon/AngleDownIcon.d.ts +3 -3
  45. package/dist/components/Icon/AngleLeftIcon.d.ts +3 -3
  46. package/dist/components/Icon/AngleRightIcon.d.ts +3 -3
  47. package/dist/components/Icon/AngleUpIcon.d.ts +3 -3
  48. package/dist/components/Icon/ArrowRightIcon.d.ts +3 -3
  49. package/dist/components/Icon/BagIcon.d.ts +3 -3
  50. package/dist/components/Icon/BanIcon.d.ts +3 -3
  51. package/dist/components/Icon/CheckCircleIcon.d.ts +3 -3
  52. package/dist/components/Icon/CheckIcon.d.ts +3 -3
  53. package/dist/components/Icon/CheckSquareIcon.d.ts +3 -3
  54. package/dist/components/Icon/CheckWalletIcon.d.ts +3 -3
  55. package/dist/components/Icon/ChevronRightIcon.d.ts +3 -3
  56. package/dist/components/Icon/CloseIcon.d.ts +112 -1
  57. package/dist/components/Icon/CopyIcon.d.ts +3 -3
  58. package/dist/components/Icon/DeleteCircleIcon.d.ts +3 -3
  59. package/dist/components/Icon/DeleteWalletIcon.d.ts +3 -3
  60. package/dist/components/Icon/DisconnectIcon.d.ts +3 -3
  61. package/dist/components/Icon/DownloadIcon.d.ts +3 -3
  62. package/dist/components/Icon/GasIcon.d.ts +3 -3
  63. package/dist/components/Icon/HistoryIcon.d.ts +3 -3
  64. package/dist/components/Icon/HorizontalSwapIcon.d.ts +3 -3
  65. package/dist/components/Icon/Icons.stories.d.ts +6 -5
  66. package/dist/components/Icon/InfoCircleIcon.d.ts +3 -3
  67. package/dist/components/Icon/MinusCircleIcon.d.ts +3 -3
  68. package/dist/components/Icon/RetryIcon.d.ts +3 -3
  69. package/dist/components/Icon/RetryLeftIcon.d.ts +3 -3
  70. package/dist/components/Icon/RetryRightIcon.d.ts +3 -3
  71. package/dist/components/Icon/SearchIcon.d.ts +3 -3
  72. package/dist/components/Icon/SearchMinusIcon.d.ts +3 -3
  73. package/dist/components/Icon/SettingIcon.d.ts +3 -3
  74. package/dist/components/Icon/SignatureIcon.d.ts +3 -3
  75. package/dist/components/Icon/SwapWalletIcon.d.ts +3 -3
  76. package/dist/components/Icon/TimeIcon.d.ts +3 -3
  77. package/dist/components/Icon/TrashIcon.d.ts +3 -3
  78. package/dist/components/Icon/TryAgainIcon.d.ts +3 -3
  79. package/dist/components/Icon/VerticalSwapIcon.d.ts +3 -3
  80. package/dist/components/Icon/WalletIconIcon.d.ts +3 -3
  81. package/dist/components/Icon/WarningIcon.d.ts +3 -3
  82. package/dist/components/Icon/common.d.ts +228 -2
  83. package/dist/components/Icon/index.d.ts +40 -40
  84. package/dist/components/Icon/types.d.ts +7 -7
  85. package/dist/components/LiquiditySourceList/LiquiditySource.stories.d.ts +6 -5
  86. package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +11 -11
  87. package/dist/components/LiquiditySourceList/index.d.ts +1 -1
  88. package/dist/components/LiquiditySourceList/mockData.d.ts +2 -2
  89. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +13 -13
  90. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +6 -5
  91. package/dist/components/LiquiditySourcesSelector/index.d.ts +1 -1
  92. package/dist/components/Modal/Modal.d.ts +11 -11
  93. package/dist/components/Modal/Modal.stories.d.ts +6 -5
  94. package/dist/components/Modal/index.d.ts +1 -1
  95. package/dist/components/Radio/Radio.d.ts +13 -13
  96. package/dist/components/Radio/Radio.stories.d.ts +6 -5
  97. package/dist/components/Radio/index.d.ts +1 -1
  98. package/dist/components/SecondaryPage/SecondaryPage.d.ts +16 -16
  99. package/dist/components/SecondaryPage/SecondaryPage.stories.d.ts +4 -2
  100. package/dist/components/SecondaryPage/index.d.ts +1 -1
  101. package/dist/components/SelectableWalletList/SelectableWalletList.d.ts +7 -7
  102. package/dist/components/SelectableWalletList/SelectableWalletList.stories.d.ts +6 -5
  103. package/dist/components/SelectableWalletList/index.d.ts +1 -1
  104. package/dist/components/SelectableWalletList/mock.d.ts +2 -2
  105. package/dist/components/Settings/Settings.d.ts +24 -23
  106. package/dist/components/Settings/Settings.stories.d.ts +6 -5
  107. package/dist/components/Settings/index.d.ts +1 -1
  108. package/dist/components/Skeleton/Skeleton.d.ts +6 -6
  109. package/dist/components/Skeleton/Skeleton.stories.d.ts +6 -5
  110. package/dist/components/Skeleton/index.d.ts +1 -1
  111. package/dist/components/Spacer/Spacer.d.ts +6 -6
  112. package/dist/components/Spacer/Spacer.stories.d.ts +6 -5
  113. package/dist/components/Spacer/index.d.ts +1 -1
  114. package/dist/components/Spinner/Spinner.d.ts +6 -6
  115. package/dist/components/Spinner/Spinner.stories.d.ts +6 -5
  116. package/dist/components/Spinner/index.d.ts +1 -1
  117. package/dist/components/StatusDrawer/StatusDrawer.d.ts +11 -11
  118. package/dist/components/StatusDrawer/StatusDrawer.stories.d.ts +6 -5
  119. package/dist/components/StatusDrawer/index.d.ts +1 -1
  120. package/dist/components/StepDetail/StepDetail.d.ts +12 -12
  121. package/dist/components/StepDetail/StepDetail.stories.d.ts +6 -5
  122. package/dist/components/StepDetail/index.d.ts +1 -1
  123. package/dist/components/SwapContainer/SwapContainer.d.ts +7 -7
  124. package/dist/components/SwapContainer/SwapContainer.stories.d.ts +6 -5
  125. package/dist/components/SwapContainer/index.d.ts +1 -1
  126. package/dist/components/SwapDetail/SwapDetail.d.ts +8 -8
  127. package/dist/components/SwapDetail/SwapDetail.stories.d.ts +6 -5
  128. package/dist/components/SwapDetail/Token.d.ts +17 -17
  129. package/dist/components/SwapDetail/index.d.ts +1 -1
  130. package/dist/components/SwapDetail/mock.d.ts +2 -2
  131. package/dist/components/Switch/Switch.d.ts +6 -6
  132. package/dist/components/Switch/Switch.stories.d.ts +6 -5
  133. package/dist/components/Switch/index.d.ts +1 -1
  134. package/dist/components/TextField/TextField.d.ts +10 -10
  135. package/dist/components/TextField/TextField.stories.d.ts +8 -7
  136. package/dist/components/TextField/index.d.ts +1 -1
  137. package/dist/components/TokenList/TokenItem.d.ts +11 -11
  138. package/dist/components/TokenList/TokenList.d.ts +17 -17
  139. package/dist/components/TokenList/TokenList.stories.d.ts +6 -5
  140. package/dist/components/TokenList/index.d.ts +1 -1
  141. package/dist/components/TokenList/mockData.d.ts +2 -2
  142. package/dist/components/TokenSelector/TokenSelector.d.ts +124 -14
  143. package/dist/components/TokenSelector/TokenSelector.stories.d.ts +6 -5
  144. package/dist/components/TokenSelector/index.d.ts +1 -1
  145. package/dist/components/Tooltip/Tooltip.d.ts +7 -7
  146. package/dist/components/Tooltip/Tooltip.stories.d.ts +6 -5
  147. package/dist/components/Tooltip/index.d.ts +1 -1
  148. package/dist/components/Typography/Typography.d.ts +18 -18
  149. package/dist/components/Typography/Typography.stories.d.ts +6 -5
  150. package/dist/components/Typography/index.d.ts +1 -1
  151. package/dist/components/VirtualizedList/VirtualizedList.d.ts +17 -17
  152. package/dist/components/Wallet/State.d.ts +7 -7
  153. package/dist/components/Wallet/Wallet.d.ts +7 -7
  154. package/dist/components/Wallet/Wallet.stories.d.ts +6 -5
  155. package/dist/components/Wallet/index.d.ts +1 -1
  156. package/dist/components/common/FilledCircle.d.ts +111 -1
  157. package/dist/components/common/Image.d.ts +6 -6
  158. package/dist/components/common/index.d.ts +2 -2
  159. package/dist/components/index.d.ts +31 -31
  160. package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +22 -22
  161. package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +7 -6
  162. package/dist/containers/ConfirmSwap/index.d.ts +1 -1
  163. package/dist/containers/ConfirmSwap/mock.d.ts +5 -5
  164. package/dist/containers/History/History.d.ts +6 -6
  165. package/dist/containers/History/History.stories.d.ts +6 -5
  166. package/dist/containers/History/SwapsGroup.d.ts +13 -13
  167. package/dist/containers/History/index.d.ts +3 -2
  168. package/dist/containers/History/mock.d.ts +2 -2
  169. package/dist/containers/History/types.d.ts +39 -39
  170. package/dist/containers/SwapHistory/SwapHistory.d.ts +1128 -24
  171. package/dist/containers/SwapHistory/SwapHistory.stories.d.ts +6 -5
  172. package/dist/containers/SwapHistory/SwapMessages.d.ts +17 -17
  173. package/dist/containers/SwapHistory/index.d.ts +1 -1
  174. package/dist/containers/SwapHistory/mock.d.ts +2 -2
  175. package/dist/containers/index.d.ts +3 -3
  176. package/dist/helper/index.d.ts +6 -3
  177. package/dist/hooks/index.d.ts +1 -1
  178. package/dist/hooks/useCopyToClipboard.d.ts +1 -1
  179. package/dist/index.d.ts +6 -5
  180. package/dist/index.js +20 -8
  181. package/dist/index.js.map +7 -0
  182. package/dist/theme.d.ts +928 -8
  183. package/dist/types/index.d.ts +2 -2
  184. package/dist/types/meta.d.ts +23 -23
  185. package/dist/types/swaps.d.ts +29 -29
  186. package/dist/types/wallet.d.ts +23 -23
  187. package/package.json +10 -34
  188. package/src/components/Alert/Alert.tsx +2 -2
  189. package/src/components/BestRoute/BestRoute.tsx +4 -3
  190. package/src/components/Button/Button.tsx +42 -42
  191. package/src/components/Checkbox/Checkbox.tsx +2 -0
  192. package/src/components/Chip/Chip.tsx +1 -1
  193. package/src/components/ColorPicker/ColorPicker.stories.tsx +9 -2
  194. package/src/components/ColorPicker/ColorPicker.tsx +34 -10
  195. package/src/components/Icon/common.ts +2 -2
  196. package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +2 -2
  197. package/src/components/Modal/Modal.tsx +3 -2
  198. package/src/components/Radio/Radio.tsx +2 -2
  199. package/src/components/SelectableWalletList/SelectableWalletList.tsx +5 -5
  200. package/src/components/Settings/Settings.tsx +22 -18
  201. package/src/components/Skeleton/Skeleton.tsx +1 -1
  202. package/src/components/Spinner/Spinner.tsx +1 -1
  203. package/src/components/StepDetail/StepDetail.tsx +4 -4
  204. package/src/components/SwapContainer/SwapContainer.tsx +3 -3
  205. package/src/components/SwapDetail/SwapDetail.tsx +1 -1
  206. package/src/components/SwapDetail/Token.tsx +2 -2
  207. package/src/components/Switch/Switch.tsx +2 -2
  208. package/src/components/TextField/TextField.tsx +3 -3
  209. package/src/components/TokenList/TokenItem.tsx +1 -1
  210. package/src/components/Tooltip/Tooltip.tsx +2 -2
  211. package/src/containers/ConfirmSwap/ConfirmSwap.tsx +4 -4
  212. package/src/containers/History/SwapsGroup.tsx +1 -1
  213. package/src/containers/History/index.ts +2 -1
  214. package/src/containers/History/types.tsx +1 -1
  215. package/src/containers/SwapHistory/SwapHistory.tsx +5 -5
  216. package/src/helper/index.ts +75 -0
  217. package/src/index.ts +1 -0
  218. package/src/theme.ts +34 -36
  219. package/src/types/index.ts +1 -1
  220. package/dist/ui.cjs.development.js +0 -5094
  221. package/dist/ui.cjs.development.js.map +0 -1
  222. package/dist/ui.cjs.production.min.js +0 -2
  223. package/dist/ui.cjs.production.min.js.map +0 -1
  224. package/dist/ui.esm.js +0 -5005
  225. package/dist/ui.esm.js.map +0 -1
@@ -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,21 +1,18 @@
1
1
  {
2
2
  "name": "@rango-dev/ui",
3
- "version": "0.1.13",
3
+ "version": "0.1.14-next.10",
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",
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",
19
16
  "storybook": "start-storybook -p 3000",
20
17
  "build-storybook": "build-storybook"
21
18
  },
@@ -23,28 +20,6 @@
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",
50
25
  "@size-limit/preset-small-lib": "^8.1.0",
@@ -73,14 +48,15 @@
73
48
  "@radix-ui/react-radio-group": "^1.1.1",
74
49
  "@radix-ui/react-switch": "^1.0.1",
75
50
  "@radix-ui/react-tooltip": "^1.0.2",
76
- "@rango-dev/wallets-shared": "^0.1.11",
51
+ "@rango-dev/wallets-shared": "^0.1.13",
77
52
  "@stitches/react": "^1.2.8",
78
53
  "@types/react-color": "^3.0.6",
79
- "rango-sdk": "^0.1.20",
54
+ "rango-sdk": "^0.1.27",
80
55
  "react-color": "^2.19.3",
81
56
  "react-virtualized-auto-sizer": "^1.0.7",
82
57
  "react-window": "^1.8.8",
83
- "react-window-infinite-loader": "^1.0.8"
58
+ "react-window-infinite-loader": "^1.0.8",
59
+ "rgb-hex": "^4.0.1"
84
60
  },
85
61
  "publishConfig": {
86
62
  "access": "public"
@@ -8,8 +8,8 @@ const MainContainer = styled('div', {
8
8
  width: '100%',
9
9
  padding: '$16',
10
10
  borderRadius: '$5',
11
- backgroundColor: '$neutrals300',
12
- color: '$neutrals800',
11
+ backgroundColor: '$neutral100',
12
+ color: '$neutral800',
13
13
 
14
14
  '.main': {
15
15
  display: 'flex',
@@ -11,11 +11,12 @@ import { Image } from '../common';
11
11
 
12
12
  const Container = styled('div', {
13
13
  borderRadius: '$5',
14
- border: '1px solid $neutrals300',
14
+ border: '1px solid $neutral100',
15
15
  display: 'flex',
16
16
  alignItems: 'center',
17
17
  minHeight: 126,
18
18
  justifyContent: 'space-between',
19
+ backgroundColor: '$surface',
19
20
  });
20
21
 
21
22
  const ErrorMsg = styled(Typography, {
@@ -45,7 +46,7 @@ const Line = styled('div', {
45
46
 
46
47
  const HR = styled('hr', {
47
48
  width: '100%',
48
- border: '1px solid $neutrals400',
49
+ border: '1px solid $neutral400',
49
50
  margin: '$8 0',
50
51
  });
51
52
 
@@ -89,7 +90,7 @@ export const pulse = keyframes({
89
90
  });
90
91
 
91
92
  const GasContainer = styled('div', {
92
- backgroundColor: '$neutrals300',
93
+ backgroundColor: '$neutral100',
93
94
  borderRadius: '5px',
94
95
  margin: '$4',
95
96
  display: 'flex',
@@ -46,41 +46,41 @@ const ButtonContainer = styled('button', {
46
46
  },
47
47
  variant: {
48
48
  contained: {
49
- backgroundColor: '$neutrals300',
49
+ backgroundColor: '$neutral100',
50
50
  color: '$foreground',
51
51
  border: 0,
52
52
  '&:hover': {
53
- backgroundColor: '$neutrals200',
53
+ backgroundColor: '$neutral200',
54
54
  },
55
55
  '&:disabled': {
56
- background: '$neutrals400',
56
+ background: '$neutral400',
57
57
  },
58
58
  '&:disabled:hover': {
59
- background: '$neutrals400',
59
+ background: '$neutral400',
60
60
  transform: 'unset',
61
61
  },
62
62
  },
63
63
  outlined: {
64
- backgroundColor: '$background',
64
+ backgroundColor: '$surface',
65
65
  border: 1,
66
66
  borderStyle: 'solid',
67
- borderColor: '$neutrals400',
67
+ borderColor: '$neutral400',
68
68
  color: '$foreground',
69
69
  '&:hover': {
70
- borderColor: '$neutrals600',
70
+ borderColor: '$neutral600',
71
71
  },
72
72
  '&:disabled': {
73
- borderColor: '$neutrals300',
74
- color: '$neutrals400',
73
+ borderColor: '$neutral400',
74
+ color: '$neutral400',
75
75
  },
76
76
  },
77
77
  ghost: {
78
78
  color: '$foreground',
79
79
  '&:hover': {
80
- backgroundColor: '$neutrals200',
80
+ backgroundColor: '$neutral200',
81
81
  },
82
82
  '&:disabled': {
83
- color: '$neutrals400 !important',
83
+ color: '$neutral400',
84
84
  },
85
85
  background: 'transparent',
86
86
  border: 0,
@@ -128,19 +128,19 @@ const ButtonContainer = styled('button', {
128
128
  type: 'primary',
129
129
  variant: 'outlined',
130
130
  css: {
131
- color: '$primary !important',
131
+ color: '$primary',
132
132
  borderColor: '$primary',
133
133
  '&:hover': {
134
- color: '$primary700 !important',
135
- borderColor: '$primary700 !important',
134
+ color: '$primary700',
135
+ borderColor: '$primary700',
136
136
  },
137
137
  '&:visited': {
138
- color: '$primary900 !important',
139
- borderColor: '$primary900 !important',
138
+ color: '$primary900',
139
+ borderColor: '$primary900',
140
140
  },
141
141
  '&:focus': {
142
- color: '$primary600 !important',
143
- borderColor: '$primary600 !important',
142
+ color: '$primary600',
143
+ borderColor: '$primary600',
144
144
  },
145
145
  },
146
146
  },
@@ -167,7 +167,7 @@ const ButtonContainer = styled('button', {
167
167
  [`.${darkTheme} &`]: {
168
168
  $$color: '$colors$foreground',
169
169
  },
170
- color: '$$color !important',
170
+ color: '$$color',
171
171
  '&:hover': {
172
172
  background: '$error300',
173
173
  },
@@ -183,19 +183,19 @@ const ButtonContainer = styled('button', {
183
183
  type: 'error',
184
184
  variant: 'outlined',
185
185
  css: {
186
- color: '$error !important',
186
+ color: '$error',
187
187
  borderColor: '$error',
188
188
  '&:hover': {
189
- color: '$error300 !important',
190
- borderColor: '$error300 !important',
189
+ color: '$error300',
190
+ borderColor: '$error300',
191
191
  },
192
192
  '&:visited': {
193
- color: '$error700 !important',
194
- borderColor: '$error700 !important',
193
+ color: '$error700',
194
+ borderColor: '$error700',
195
195
  },
196
196
  '&:focus': {
197
- color: '$error700 !important',
198
- borderColor: '$error700 !important',
197
+ color: '$error700',
198
+ borderColor: '$error700',
199
199
  },
200
200
  },
201
201
  },
@@ -224,7 +224,7 @@ const ButtonContainer = styled('button', {
224
224
  [`.${darkTheme} &`]: {
225
225
  $$color: '$colors$foreground',
226
226
  },
227
- color: '$$color !important',
227
+ color: '$$color',
228
228
  '&:hover': {
229
229
  background: '$warning300',
230
230
  },
@@ -240,19 +240,19 @@ const ButtonContainer = styled('button', {
240
240
  type: 'warning',
241
241
  variant: 'outlined',
242
242
  css: {
243
- color: '$warning !important',
243
+ color: '$warning',
244
244
  borderColor: '$warning',
245
245
  '&:hover': {
246
- color: '$warning300 !important',
247
- borderColor: '$warning300 !important',
246
+ color: '$warning300',
247
+ borderColor: '$warning300',
248
248
  },
249
249
  '&:visited': {
250
- color: '$warning700 !important',
251
- borderColor: '$warning700 !important',
250
+ color: '$warning700',
251
+ borderColor: '$warning700',
252
252
  },
253
253
  '&:focus': {
254
- color: '$warning700 !important',
255
- borderColor: '$warning700 !important',
254
+ color: '$warning700',
255
+ borderColor: '$warning700',
256
256
  },
257
257
  },
258
258
  },
@@ -281,7 +281,7 @@ const ButtonContainer = styled('button', {
281
281
  [`.${darkTheme} &`]: {
282
282
  $$color: '$colors$foreground',
283
283
  },
284
- color: '$$color !important',
284
+ color: '$$color',
285
285
  '&:hover': {
286
286
  background: '$success300',
287
287
  },
@@ -297,19 +297,19 @@ const ButtonContainer = styled('button', {
297
297
  type: 'success',
298
298
  variant: 'outlined',
299
299
  css: {
300
- color: '$success !important',
300
+ color: '$success',
301
301
  borderColor: '$success',
302
302
  '&:hover': {
303
- color: '$success300 !important',
304
- borderColor: '$success300 !important',
303
+ color: '$success300',
304
+ borderColor: '$success300',
305
305
  },
306
306
  '&:visited': {
307
- color: '$success700 !important',
308
- borderColor: '$success700 !important',
307
+ color: '$success700',
308
+ borderColor: '$success700',
309
309
  },
310
310
  '&:focus': {
311
- color: '$success700 !important',
312
- borderColor: '$success700 !important',
311
+ color: '$success700',
312
+ borderColor: '$success700',
313
313
  },
314
314
  },
315
315
  },
@@ -19,11 +19,13 @@ const CheckboxRoot = styled(RadixCheckbox.Root, {
19
19
  justifyContent: 'center',
20
20
  marginRight: '$2',
21
21
  backgroundColor: '$neutral-100',
22
+ cursor: 'pointer',
22
23
  });
23
24
  const Label = styled('label', {
24
25
  color: '$foreground',
25
26
  fontSize: '$m',
26
27
  marginLeft: '$8',
28
+ cursor: 'pointer',
27
29
  });
28
30
 
29
31
  export interface PropTypes {
@@ -21,7 +21,7 @@ const ChipCointainer = styled('div', {
21
21
  variants: {
22
22
  selected: {
23
23
  true: { backgroundColor: '$success', color: '$background' },
24
- false: { backgroundColor: '$background' },
24
+ false: { backgroundColor: '$surface' },
25
25
  },
26
26
  },
27
27
  });
@@ -12,11 +12,16 @@ export default {
12
12
  options: ['top', 'bottom', 'left', 'right'],
13
13
  defaultValue: 'top',
14
14
  },
15
+ placeholder: {
16
+ name: 'placeholder',
17
+ control: { type: 'text' },
18
+ defaultValue: 'Choose a color',
19
+ },
15
20
  },
16
21
  } as ComponentMeta<typeof ColorPicker>;
17
22
 
18
23
  export const Main = (args: PropTypes) => {
19
- const [color, setColor] = useState<string>('#5FA425');
24
+ const [color, setColor] = useState<string | undefined>('#5FA425');
20
25
  return (
21
26
  <div
22
27
  style={{
@@ -29,7 +34,9 @@ export const Main = (args: PropTypes) => {
29
34
  <ColorPicker
30
35
  {...args}
31
36
  color={color}
32
- onChangeColor={(color) => setColor(color.hex)}
37
+ onChangeColor={(color) => {
38
+ console.log(color);
39
+ setColor(color)}}
33
40
  />
34
41
  </div>
35
42
  );
@@ -1,14 +1,16 @@
1
1
  import React, { useState } from 'react';
2
- import { ChromePicker, ColorResult } from 'react-color';
2
+ import { ChromePicker } from 'react-color';
3
3
  import { styled } from '../../theme';
4
4
  import { Button } from '../Button';
5
+ import { CloseIcon } from '../Icon';
6
+ import rgbHex from 'rgb-hex';
5
7
 
6
8
  const Container = styled('div', {
7
9
  position: 'relative',
8
10
  });
9
11
 
10
12
  const Color = styled('div', {
11
- border: '1px solid $neutrals300',
13
+ border: '1px solid $neutral100',
12
14
  borderRadius: '$5',
13
15
  width: '$32',
14
16
  height: '$32',
@@ -41,13 +43,11 @@ const Popover = styled('div', {
41
43
  },
42
44
  });
43
45
  export interface PropTypes {
44
- color: string;
46
+ color?: string;
45
47
  place: 'top' | 'bottom' | 'left' | 'right';
46
- onChangeColor: (
47
- color: ColorResult,
48
- event: React.ChangeEvent<HTMLInputElement>
49
- ) => void;
48
+ onChangeColor: (color?: string) => void;
50
49
  label?: string;
50
+ placeholder?: string;
51
51
  }
52
52
 
53
53
  const Label = styled('label', {
@@ -57,7 +57,13 @@ const Label = styled('label', {
57
57
  color: '$foreground',
58
58
  });
59
59
 
60
- export function ColorPicker({ color, onChangeColor, label, place }: PropTypes) {
60
+ export function ColorPicker({
61
+ color,
62
+ onChangeColor,
63
+ label,
64
+ place,
65
+ placeholder,
66
+ }: PropTypes) {
61
67
  const [displayColorPicker, setDisplayColorPicker] = useState<boolean>(false);
62
68
 
63
69
  return (
@@ -69,15 +75,33 @@ export function ColorPicker({ color, onChangeColor, label, place }: PropTypes) {
69
75
  fullWidth
70
76
  align="start"
71
77
  size="large"
78
+ suffix={
79
+ color && (
80
+ <div
81
+ onClick={(e) => {
82
+ e.stopPropagation();
83
+ onChangeColor(undefined);
84
+ }}
85
+ >
86
+ <CloseIcon size={20} />
87
+ </div>
88
+ )
89
+ }
72
90
  onClick={() => setDisplayColorPicker((prev) => !prev)}
73
91
  >
74
- {color}
92
+ {color || placeholder}
75
93
  </Button>
76
94
 
77
95
  {displayColorPicker && (
78
96
  <Popover place={place}>
79
97
  <Cover onClick={() => setDisplayColorPicker(false)} />
80
- <ChromePicker color={color} onChange={onChangeColor} />
98
+ <ChromePicker
99
+ color={color}
100
+ onChange={(c) => {
101
+ const color = '#' + rgbHex(c.rgb.r, c.rgb.g, c.rgb.b, c.rgb.a);
102
+ onChangeColor(color);
103
+ }}
104
+ />
81
105
  </Popover>
82
106
  )}
83
107
  </Container>
@@ -33,7 +33,7 @@ export const SvgWithStrokeColor = styled('svg', {
33
33
  },
34
34
  disabled: {
35
35
  true: {
36
- stroke: '$neutrals400',
36
+ stroke: '$neutral400',
37
37
  },
38
38
  },
39
39
  },
@@ -72,7 +72,7 @@ export const SvgWithFillColor = styled('svg', {
72
72
  },
73
73
  disabled: {
74
74
  true: {
75
- stroke: '$neutrals400',
75
+ stroke: '$neutral400',
76
76
  },
77
77
  },
78
78
  },
@@ -105,7 +105,7 @@ export function LiquiditySourceList(props: PropTypes) {
105
105
  <div>
106
106
  <LiquiditySourceType>
107
107
  <Typography variant="h5">Bridges</Typography>
108
- <Typography variant="body1" color="neutrals800">
108
+ <Typography variant="body1" color="neutral800">
109
109
  {totalSelectedBridges === totalBridges
110
110
  ? totalBridges
111
111
  : `${totalSelectedBridges} / ${totalBridges}`}
@@ -138,7 +138,7 @@ export function LiquiditySourceList(props: PropTypes) {
138
138
  <div>
139
139
  <LiquiditySourceType>
140
140
  <Typography variant="h5">Exchanges</Typography>
141
- <Typography variant="body1" color="neutrals800">
141
+ <Typography variant="body1" color="neutral800">
142
142
  {totalSelectedExchanges === totalExchanges
143
143
  ? totalExchanges
144
144
  : `${totalSelectedExchanges} / ${totalExchanges}`}
@@ -24,6 +24,8 @@ const BackDrop = styled('div', {
24
24
  width: '100vw',
25
25
  height: '100vh',
26
26
  backgroundColor: 'rgba(0,0,0,.1)',
27
+ zIndex: 10,
28
+
27
29
  });
28
30
 
29
31
  const ModalContainer = styled('div', {
@@ -32,8 +34,7 @@ const ModalContainer = styled('div', {
32
34
  padding: '$16 $16',
33
35
  display: 'flex',
34
36
  flexDirection: 'column',
35
- boxShadow: '$s',
36
- zIndex: 10,
37
+ zIndex: 20,
37
38
  });
38
39
  const Row = styled('div', {
39
40
  display: 'flex',