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