@rango-dev/ui 0.1.10-next.91 → 0.1.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 (116) hide show
  1. package/README.md +1 -181
  2. package/dist/components/Alert/Alert.d.ts +3 -2
  3. package/dist/components/Alert/LoadingFailedAlert.d.ts +2 -0
  4. package/dist/components/Alert/NotFoundAlert.d.ts +7 -0
  5. package/dist/components/Alert/index.d.ts +1 -0
  6. package/dist/components/BlockchainSelector/BlockchainSelector.d.ts +1 -1
  7. package/dist/components/Button/Button.d.ts +3 -3
  8. package/dist/components/Divider/Divider.d.ts +6 -0
  9. package/dist/components/Divider/index.d.ts +1 -0
  10. package/dist/components/Header/Header.d.ts +9 -0
  11. package/dist/components/Header/index.d.ts +1 -0
  12. package/dist/components/Icon/ArrowRightIcon.d.ts +3 -0
  13. package/dist/components/Icon/ChevronRightIcon.d.ts +3 -0
  14. package/dist/components/Icon/DisconnectIcon.d.ts +3 -0
  15. package/dist/components/Icon/index.d.ts +3 -0
  16. package/dist/components/Icon/types.d.ts +1 -1
  17. package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +3 -1
  18. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +2 -1
  19. package/dist/components/SelectableWalletList/mock.d.ts +1 -1
  20. package/dist/components/Settings/Settings.d.ts +2 -1
  21. package/dist/components/Spacer/Spacer.d.ts +1 -1
  22. package/dist/components/SwapContainer/SwapContainer.d.ts +1 -0
  23. package/dist/components/SwapDetail/Token.d.ts +16 -0
  24. package/dist/components/TextField/TextField.stories.d.ts +1 -1
  25. package/dist/components/TokenSelector/TokenSelector.d.ts +3 -0
  26. package/dist/components/Typography/Typography.d.ts +3 -2
  27. package/dist/components/index.d.ts +2 -0
  28. package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +10 -17
  29. package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +1 -0
  30. package/dist/containers/ConfirmSwap/mock.d.ts +3 -0
  31. package/dist/containers/History/History.d.ts +6 -1
  32. package/dist/containers/History/index.d.ts +1 -1
  33. package/dist/containers/History/types.d.ts +3 -24
  34. package/dist/containers/SwapHistory/SwapHistory.d.ts +16 -3
  35. package/dist/containers/SwapHistory/SwapMessages.d.ts +17 -0
  36. package/dist/containers/index.d.ts +0 -1
  37. package/dist/helper/index.d.ts +1 -0
  38. package/dist/types/meta.d.ts +1 -0
  39. package/dist/ui.cjs.development.js +1455 -1033
  40. package/dist/ui.cjs.development.js.map +1 -1
  41. package/dist/ui.cjs.production.min.js +1 -1
  42. package/dist/ui.cjs.production.min.js.map +1 -1
  43. package/dist/ui.esm.js +1463 -1046
  44. package/dist/ui.esm.js.map +1 -1
  45. package/package.json +3 -2
  46. package/src/components/Alert/Alert.tsx +63 -39
  47. package/src/components/Alert/LoadingFailedAlert.tsx +11 -0
  48. package/src/components/Alert/NotFoundAlert.tsx +19 -0
  49. package/src/components/Alert/index.ts +1 -0
  50. package/src/components/BestRoute/BestRoute.tsx +28 -19
  51. package/src/components/BestRoute/mock.ts +10 -0
  52. package/src/components/BlockchainSelector/BlockchainSelector.tsx +13 -21
  53. package/src/components/Button/Button.stories.tsx +1 -1
  54. package/src/components/Button/Button.tsx +36 -23
  55. package/src/components/Chip/Chip.tsx +7 -4
  56. package/src/components/ConnectWalletsModal/mockData.ts +16 -0
  57. package/src/components/Divider/Divider.tsx +41 -0
  58. package/src/components/Divider/index.ts +1 -0
  59. package/src/components/Header/Header.tsx +39 -0
  60. package/src/components/Header/index.ts +1 -0
  61. package/src/components/Icon/ArrowRightIcon.tsx +31 -0
  62. package/src/components/Icon/ChevronRightIcon.tsx +29 -0
  63. package/src/components/Icon/DisconnectIcon.tsx +31 -0
  64. package/src/components/Icon/HistoryIcon.tsx +12 -18
  65. package/src/components/Icon/RetryIcon.tsx +13 -13
  66. package/src/components/Icon/SettingIcon.tsx +6 -14
  67. package/src/components/Icon/index.ts +3 -0
  68. package/src/components/Icon/types.tsx +1 -1
  69. package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +104 -30
  70. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +16 -11
  71. package/src/components/Radio/Radio.tsx +5 -4
  72. package/src/components/SecondaryPage/SecondaryPage.tsx +26 -52
  73. package/src/components/SelectableWalletList/SelectableWalletList.tsx +5 -1
  74. package/src/components/SelectableWalletList/mock.ts +4 -3
  75. package/src/components/Settings/Settings.tsx +47 -12
  76. package/src/components/Spacer/Spacer.tsx +31 -1
  77. package/src/components/StatusDrawer/StatusDrawer.tsx +1 -0
  78. package/src/components/StepDetail/StepDetail.tsx +19 -7
  79. package/src/components/SwapContainer/SwapContainer.tsx +22 -17
  80. package/src/components/SwapDetail/SwapDetail.tsx +77 -115
  81. package/src/components/SwapDetail/Token.tsx +68 -0
  82. package/src/components/SwapDetail/mock.ts +1 -0
  83. package/src/components/Switch/Switch.tsx +7 -5
  84. package/src/components/TextField/TextField.tsx +3 -1
  85. package/src/components/TokenList/TokenItem.tsx +4 -1
  86. package/src/components/TokenList/TokenList.tsx +16 -18
  87. package/src/components/TokenSelector/TokenSelector.tsx +47 -10
  88. package/src/components/Typography/Typography.stories.tsx +4 -0
  89. package/src/components/Typography/Typography.tsx +20 -9
  90. package/src/components/Wallet/State.tsx +2 -3
  91. package/src/components/Wallet/Wallet.tsx +33 -6
  92. package/src/components/index.ts +2 -0
  93. package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +11 -2
  94. package/src/containers/ConfirmSwap/ConfirmSwap.tsx +103 -119
  95. package/src/containers/ConfirmSwap/mock.ts +79 -2
  96. package/src/containers/History/History.tsx +57 -38
  97. package/src/containers/History/index.ts +1 -1
  98. package/src/containers/History/mock.ts +1 -0
  99. package/src/containers/History/types.tsx +2 -30
  100. package/src/containers/SwapHistory/SwapHistory.tsx +309 -165
  101. package/src/containers/SwapHistory/SwapMessages.tsx +116 -0
  102. package/src/containers/SwapHistory/mock.ts +1 -0
  103. package/src/containers/index.ts +0 -1
  104. package/src/helper/index.ts +14 -0
  105. package/src/theme.ts +4 -2
  106. package/src/types/meta.ts +2 -0
  107. package/dist/containers/ConfirmWallets/ConfirmWallets.d.ts +0 -18
  108. package/dist/containers/ConfirmWallets/ConfirmWallets.stories.d.ts +0 -6
  109. package/dist/containers/ConfirmWallets/index.d.ts +0 -1
  110. package/dist/containers/ConfirmWallets/mock.d.ts +0 -5
  111. package/dist/helper/swaps.d.ts +0 -5
  112. package/src/containers/ConfirmWallets/ConfirmWallets.stories.tsx +0 -26
  113. package/src/containers/ConfirmWallets/ConfirmWallets.tsx +0 -118
  114. package/src/containers/ConfirmWallets/index.ts +0 -1
  115. package/src/containers/ConfirmWallets/mock.ts +0 -222
  116. package/src/helper/swaps.ts +0 -23
package/dist/ui.esm.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import React__default, { createElement, forwardRef, Fragment, useState, useEffect } from 'react';
2
- import { Indicator, Root } from '@radix-ui/react-checkbox';
3
- import { createPortal } from 'react-dom';
4
- import { detectInstallLink } from '@rango-dev/wallets-shared';
5
- import { Root as Root$1, Thumb } from '@radix-ui/react-switch';
6
- import { Root as Root$2, Item, Indicator as Indicator$1 } from '@radix-ui/react-radio-group';
2
+ import { Provider, Root, Portal, Trigger, Content as Content$1, Arrow } from '@radix-ui/react-tooltip';
7
3
  import { VariableSizeList } from 'react-window';
8
4
  import InfiniteLoader from 'react-window-infinite-loader';
9
5
  import AutoSizer from 'react-virtualized-auto-sizer';
10
- import { Provider, Root as Root$3, Portal, Trigger, Content as Content$1, Arrow as Arrow$1 } from '@radix-ui/react-tooltip';
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
11
  import { ChromePicker } from 'react-color';
12
12
 
13
13
  function _extends() {
@@ -78,7 +78,9 @@ var theme = {
78
78
  error100: '#F7D4D6',
79
79
  error300: '#FF3333',
80
80
  error500: '#FF0000',
81
- error700: '#E60000'
81
+ error700: '#E60000',
82
+ // Only use this color when you are going to use white for both dark and light theme.
83
+ white: '#fff'
82
84
  },
83
85
  space: {
84
86
  2: '2px',
@@ -133,8 +135,8 @@ var theme = {
133
135
  borderWidths: {},
134
136
  borderStyles: {},
135
137
  radii: {
136
- 5: '5px',
137
- 10: '10px'
138
+ 5: '8px',
139
+ 10: '12px'
138
140
  },
139
141
  shadows: {
140
142
  s: '0px 3px 5px 3px #f0f2f5, 0px 6px 10px 3px #f0f2f5, 0px 1px 18px 3px #f0f2f5'
@@ -529,26 +531,34 @@ var HistoryIcon = function HistoryIcon(_ref) {
529
531
  size = _ref$size === void 0 ? 16 : _ref$size,
530
532
  color = _ref.color,
531
533
  props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
532
- return createElement(SvgWithFillColor, Object.assign({
534
+ return createElement(SvgWithStrokeColor, Object.assign({
533
535
  width: size,
534
536
  height: size,
535
537
  viewBox: "0 0 24 24",
536
538
  color: color,
537
539
  fill: "none",
540
+ stroke: "currentColor",
541
+ "stroke-width": "2",
542
+ "stroke-linecap": "round",
543
+ "stroke-linejoin": "round",
538
544
  xmlns: "http://www.w3.org/2000/svg",
539
545
  className: "_icon"
540
546
  }, props), createElement("path", {
541
- fillRule: "evenodd",
542
- clipRule: "evenodd",
543
- d: "M16.767 1.5c-.7.002-1.267.57-1.267 1.26V9h2.67c.63 0 1.07-.196 1.352-.478C19.804 8.24 20 7.8 20 7.17V4.75c0-.89-.363-1.704-.952-2.301a3.27 3.27 0 0 0-2.281-.949ZM14 2.76C14 1.23 15.25 0 16.77 0h.007a4.77 4.77 0 0 1 3.333 1.39l.004.003A4.775 4.775 0 0 1 21.5 4.75v2.42c0 .95-.304 1.8-.917 2.413-.613.613-1.462.917-2.413.917h-3.42a.75.75 0 0 1-.75-.75V2.76Z"
544
- }), createElement("path", {
545
- fillRule: "evenodd",
546
- clipRule: "evenodd",
547
- d: "M1.057 1.431C1.862.5 3.097 0 4.75 0h12a.75.75 0 0 1 0 1.5c-.686 0-1.25.564-1.25 1.25v17c0 1.442-1.646 2.256-2.797 1.402l-.002-.002-1.718-1.285a.242.242 0 0 0-.313.025l-1.68 1.68a1.758 1.758 0 0 1-2.48 0l-.002-.001L4.85 19.9a.258.258 0 0 0-.34-.03l-1.707 1.278-.002.001C1.643 22.024 0 21.193 0 19.75v-15c0-1.203.27-2.408 1.057-3.319Zm13.245.069H4.75c-1.346 0-2.112.396-2.557.911C1.73 2.948 1.5 3.743 1.5 4.75v15c0 .216.235.325.397.202l.004-.002 1.709-1.28a1.757 1.757 0 0 1 2.3.17l.002.001L7.57 20.51a.259.259 0 0 0 .36 0l1.68-1.68c.61-.61 1.59-.688 2.283-.158l1.704 1.276c.17.125.403 0 .403-.198v-17c0-.45.109-.875.302-1.25Z"
548
- }), createElement("path", {
549
- fillRule: "evenodd",
550
- clipRule: "evenodd",
551
- d: "M4 7.75A.75.75 0 0 1 4.75 7h6a.75.75 0 0 1 0 1.5h-6A.75.75 0 0 1 4 7.75ZM4.75 11.75A.75.75 0 0 1 5.5 11H10a.75.75 0 0 1 0 1.5H5.5a.75.75 0 0 1-.75-.75Z"
547
+ d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"
548
+ }), createElement("polyline", {
549
+ points: "14 2 14 8 20 8"
550
+ }), createElement("line", {
551
+ x1: "16",
552
+ y1: "13",
553
+ x2: "8",
554
+ y2: "13"
555
+ }), createElement("line", {
556
+ x1: "16",
557
+ y1: "17",
558
+ x2: "8",
559
+ y2: "17"
560
+ }), createElement("polyline", {
561
+ points: "10 9 9 9 8 9"
552
562
  }));
553
563
  };
554
564
  HistoryIcon.toString = function () {
@@ -596,21 +606,19 @@ var SettingsIcon = function SettingsIcon(_ref) {
596
606
  height: size,
597
607
  viewBox: "0 0 24 24",
598
608
  color: color,
609
+ stroke: "currentColor",
610
+ "stroke-width": "2",
611
+ "stroke-linecap": "round",
612
+ "stroke-linejoin": "round",
599
613
  fill: "none",
600
614
  xmlns: "http://www.w3.org/2000/svg",
601
615
  className: "_icon"
602
- }, props), createElement("path", {
603
- d: "M12.5 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",
604
- strokeWidth: 1.5,
605
- strokeMiterlimit: 10,
606
- strokeLinecap: "round",
607
- strokeLinejoin: "round"
616
+ }, props), createElement("circle", {
617
+ cx: "12",
618
+ cy: "12",
619
+ r: "3"
608
620
  }), createElement("path", {
609
- d: "M2.5 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.899 1.899 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9Z",
610
- strokeWidth: 1.5,
611
- strokeMiterlimit: 10,
612
- strokeLinecap: "round",
613
- strokeLinejoin: "round"
621
+ 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"
614
622
  }));
615
623
  };
616
624
  SettingsIcon.toString = function () {
@@ -826,12 +834,72 @@ DownloadIcon.toString = function () {
826
834
  return '._icon';
827
835
  };
828
836
 
829
- var _excluded$l = ["size", "color"];
837
+ var _excluded$l = ["color", "size"];
838
+ var ChevronRightIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
839
+ var _ref$color = _ref.color,
840
+ color = _ref$color === void 0 ? 'black' : _ref$color,
841
+ _ref$size = _ref.size,
842
+ size = _ref$size === void 0 ? 16 : _ref$size,
843
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
844
+ return createElement(SvgWithStrokeColor, Object.assign({
845
+ xmlns: "http://www.w3.org/2000/svg",
846
+ width: size,
847
+ height: size,
848
+ color: color,
849
+ viewBox: "0 0 24 24",
850
+ fill: "none",
851
+ stroke: "currentColor",
852
+ "stroke-width": "2",
853
+ "stroke-linecap": "round",
854
+ "stroke-linejoin": "round",
855
+ className: "_icon"
856
+ }, props, {
857
+ ref: forwardedRef
858
+ }), createElement("polyline", {
859
+ points: "9 18 15 12 9 6"
860
+ }));
861
+ });
862
+ ChevronRightIcon.toString = function () {
863
+ return '._icon';
864
+ };
865
+
866
+ var _excluded$m = ["size", "color"];
867
+ var ArrowRightIcon = function ArrowRightIcon(_ref) {
868
+ var _ref$size = _ref.size,
869
+ size = _ref$size === void 0 ? 16 : _ref$size,
870
+ color = _ref.color,
871
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
872
+ return createElement(SvgWithStrokeColor, Object.assign({
873
+ width: size,
874
+ height: size,
875
+ viewBox: "0 0 24 24",
876
+ color: color,
877
+ fill: "none",
878
+ stroke: "currentColor",
879
+ "stroke-width": "2",
880
+ "stroke-linecap": "round",
881
+ "stroke-linejoin": "round",
882
+ xmlns: "http://www.w3.org/2000/svg",
883
+ className: "_icon"
884
+ }, props), createElement("line", {
885
+ x1: "5",
886
+ y1: "12",
887
+ x2: "19",
888
+ y2: "12"
889
+ }), createElement("polyline", {
890
+ points: "12 5 19 12 12 19"
891
+ }));
892
+ };
893
+ ArrowRightIcon.toString = function () {
894
+ return '._icon';
895
+ };
896
+
897
+ var _excluded$n = ["size", "color"];
830
898
  var RetryRightIcon = function RetryRightIcon(_ref) {
831
899
  var _ref$size = _ref.size,
832
900
  size = _ref$size === void 0 ? 16 : _ref$size,
833
901
  color = _ref.color,
834
- props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
902
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
835
903
  return createElement(SvgWithStrokeColor, Object.assign({
836
904
  width: size,
837
905
  height: size,
@@ -851,12 +919,12 @@ RetryRightIcon.toString = function () {
851
919
  return '._icon';
852
920
  };
853
921
 
854
- var _excluded$m = ["size", "color"];
922
+ var _excluded$o = ["size", "color"];
855
923
  var RetryLeftIcon = function RetryLeftIcon(_ref) {
856
924
  var _ref$size = _ref.size,
857
925
  size = _ref$size === void 0 ? 16 : _ref$size,
858
926
  color = _ref.color,
859
- props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
927
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
860
928
  return createElement(SvgWithStrokeColor, Object.assign({
861
929
  width: size,
862
930
  height: size,
@@ -876,12 +944,12 @@ RetryLeftIcon.toString = function () {
876
944
  return '._icon';
877
945
  };
878
946
 
879
- var _excluded$n = ["size", "color"];
947
+ var _excluded$p = ["size", "color"];
880
948
  var TryAgainIcon = function TryAgainIcon(_ref) {
881
949
  var _ref$size = _ref.size,
882
950
  size = _ref$size === void 0 ? 16 : _ref$size,
883
951
  color = _ref.color,
884
- props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
952
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
885
953
  return createElement(SvgWithStrokeColor, Object.assign({
886
954
  width: size,
887
955
  height: size,
@@ -901,12 +969,12 @@ TryAgainIcon.toString = function () {
901
969
  return '._icon';
902
970
  };
903
971
 
904
- var _excluded$o = ["size", "color"];
972
+ var _excluded$q = ["size", "color"];
905
973
  var VerticalSwapIcon = function VerticalSwapIcon(_ref) {
906
974
  var _ref$size = _ref.size,
907
975
  size = _ref$size === void 0 ? 16 : _ref$size,
908
976
  color = _ref.color,
909
- props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
977
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
910
978
  return createElement(SvgWithStrokeColor, Object.assign({
911
979
  width: size,
912
980
  height: size,
@@ -932,12 +1000,12 @@ VerticalSwapIcon.toString = function () {
932
1000
  return '._icon';
933
1001
  };
934
1002
 
935
- var _excluded$p = ["size", "color"];
1003
+ var _excluded$r = ["size", "color"];
936
1004
  var HorizontalSwapIcon = function HorizontalSwapIcon(_ref) {
937
1005
  var _ref$size = _ref.size,
938
1006
  size = _ref$size === void 0 ? 16 : _ref$size,
939
1007
  color = _ref.color,
940
- props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
1008
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
941
1009
  return createElement(SvgWithStrokeColor, Object.assign({
942
1010
  width: size,
943
1011
  height: size,
@@ -963,39 +1031,43 @@ HorizontalSwapIcon.toString = function () {
963
1031
  return '._icon';
964
1032
  };
965
1033
 
966
- var _excluded$q = ["color", "size"];
1034
+ var _excluded$s = ["color", "size"];
967
1035
  var RetryIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
968
- var color = _ref.color,
1036
+ var _ref$color = _ref.color,
1037
+ color = _ref$color === void 0 ? 'black' : _ref$color,
969
1038
  _ref$size = _ref.size,
970
1039
  size = _ref$size === void 0 ? 16 : _ref$size,
971
- props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
972
- return createElement(SvgWithFillColor, Object.assign({
1040
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
1041
+ return createElement(SvgWithStrokeColor, Object.assign({
1042
+ xmlns: "http://www.w3.org/2000/svg",
973
1043
  width: size,
974
1044
  height: size,
975
- fill: "none",
976
- xmlns: "http://www.w3.org/2000/svg",
977
- viewBox: "0 0 24 24",
978
1045
  color: color,
1046
+ viewBox: "0 0 24 24",
1047
+ fill: "none",
1048
+ stroke: "currentColor",
1049
+ "stroke-width": "2",
1050
+ "stroke-linecap": "round",
1051
+ "stroke-linejoin": "round",
979
1052
  className: "_icon"
980
1053
  }, props, {
981
1054
  ref: forwardedRef
1055
+ }), createElement("polyline", {
1056
+ points: "23 4 23 10 17 10"
982
1057
  }), createElement("path", {
983
- fillRule: "evenodd",
984
- clipRule: "evenodd",
985
- d: "M17.016 13.45c.199-.384.002-.842-.397-1.005-.406-.166-.864.033-1.077.416A6.17 6.17 0 0 1 13 15.345a6.051 6.051 0 0 1-4.244.513 6.127 6.127 0 0 1-3.543-2.425 6.286 6.286 0 0 1 .73-8.095A6.089 6.089 0 0 1 9.86 3.604a6.07 6.07 0 0 1 4.083 1.286 6.196 6.196 0 0 1 1.65 1.97l-1.053.363a.302.302 0 0 0-.073.534l2.607 1.758a.3.3 0 0 0 .45-.155l1.01-3.007a.298.298 0 0 0-.38-.378l-1.057.365a7.79 7.79 0 0 0-2.194-2.713 7.627 7.627 0 0 0-5.13-1.615A7.65 7.65 0 0 0 4.852 4.19a7.898 7.898 0 0 0-.917 10.17 7.7 7.7 0 0 0 4.452 3.048 7.604 7.604 0 0 0 5.333-.644 7.757 7.757 0 0 0 3.297-3.315Z",
986
- fill: color
1058
+ d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10"
987
1059
  }));
988
1060
  });
989
1061
  RetryIcon.toString = function () {
990
1062
  return '._icon';
991
1063
  };
992
1064
 
993
- var _excluded$r = ["size", "color"];
1065
+ var _excluded$t = ["size", "color"];
994
1066
  var WalletIcon = function WalletIcon(_ref) {
995
1067
  var _ref$size = _ref.size,
996
1068
  size = _ref$size === void 0 ? 16 : _ref$size,
997
1069
  color = _ref.color,
998
- props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
1070
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
999
1071
  return createElement(SvgWithFillColor, Object.assign({
1000
1072
  width: size,
1001
1073
  height: size,
@@ -1022,12 +1094,12 @@ WalletIcon.toString = function () {
1022
1094
  return '._icon';
1023
1095
  };
1024
1096
 
1025
- var _excluded$s = ["size", "color"];
1097
+ var _excluded$u = ["size", "color"];
1026
1098
  var AddWalletIcon = function AddWalletIcon(_ref) {
1027
1099
  var _ref$size = _ref.size,
1028
1100
  size = _ref$size === void 0 ? 16 : _ref$size,
1029
1101
  color = _ref.color,
1030
- props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
1102
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
1031
1103
  return createElement(SvgWithFillColor, Object.assign({
1032
1104
  width: size,
1033
1105
  height: size,
@@ -1062,12 +1134,12 @@ AddWalletIcon.toString = function () {
1062
1134
  return '._icon';
1063
1135
  };
1064
1136
 
1065
- var _excluded$t = ["size", "color"];
1137
+ var _excluded$v = ["size", "color"];
1066
1138
  var DeleteWalletIcon = function DeleteWalletIcon(_ref) {
1067
1139
  var _ref$size = _ref.size,
1068
1140
  size = _ref$size === void 0 ? 16 : _ref$size,
1069
1141
  color = _ref.color,
1070
- props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
1142
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
1071
1143
  return createElement(SvgWithFillColor, Object.assign({
1072
1144
  width: size,
1073
1145
  height: size,
@@ -1102,12 +1174,12 @@ DeleteWalletIcon.toString = function () {
1102
1174
  return '._icon';
1103
1175
  };
1104
1176
 
1105
- var _excluded$u = ["size", "color"];
1177
+ var _excluded$w = ["size", "color"];
1106
1178
  var CheckWalletIcon = function CheckWalletIcon(_ref) {
1107
1179
  var _ref$size = _ref.size,
1108
1180
  size = _ref$size === void 0 ? 16 : _ref$size,
1109
1181
  color = _ref.color,
1110
- props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
1182
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
1111
1183
  return createElement(SvgWithFillColor, Object.assign({
1112
1184
  width: size,
1113
1185
  height: size,
@@ -1138,12 +1210,12 @@ CheckWalletIcon.toString = function () {
1138
1210
  return '._icon';
1139
1211
  };
1140
1212
 
1141
- var _excluded$v = ["size", "color"];
1213
+ var _excluded$x = ["size", "color"];
1142
1214
  var SwapWalletIcon = function SwapWalletIcon(_ref) {
1143
1215
  var _ref$size = _ref.size,
1144
1216
  size = _ref$size === void 0 ? 16 : _ref$size,
1145
1217
  color = _ref.color,
1146
- props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
1218
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
1147
1219
  return createElement(SvgWithFillColor, Object.assign({
1148
1220
  width: size,
1149
1221
  height: size,
@@ -1178,12 +1250,48 @@ SwapWalletIcon.toString = function () {
1178
1250
  return '._icon';
1179
1251
  };
1180
1252
 
1181
- var _excluded$w = ["size", "color"];
1253
+ var _excluded$y = ["color", "size"];
1254
+ var DisconnectIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
1255
+ var _ref$color = _ref.color,
1256
+ color = _ref$color === void 0 ? 'black' : _ref$color,
1257
+ _ref$size = _ref.size,
1258
+ size = _ref$size === void 0 ? 16 : _ref$size,
1259
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
1260
+ return createElement(SvgWithStrokeColor, Object.assign({
1261
+ xmlns: "http://www.w3.org/2000/svg",
1262
+ width: size,
1263
+ height: size,
1264
+ color: color,
1265
+ viewBox: "0 0 24 24",
1266
+ fill: "none",
1267
+ stroke: "currentColor",
1268
+ "stroke-width": "2",
1269
+ "stroke-linecap": "round",
1270
+ "stroke-linejoin": "round",
1271
+ className: "_icon"
1272
+ }, props, {
1273
+ ref: forwardedRef
1274
+ }), createElement("path", {
1275
+ d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"
1276
+ }), createElement("polyline", {
1277
+ points: "16 17 21 12 16 7"
1278
+ }), createElement("line", {
1279
+ x1: "21",
1280
+ y1: "12",
1281
+ x2: "9",
1282
+ y2: "12"
1283
+ }));
1284
+ });
1285
+ DisconnectIcon.toString = function () {
1286
+ return '._icon';
1287
+ };
1288
+
1289
+ var _excluded$z = ["size", "color"];
1182
1290
  var BagIcon = function BagIcon(_ref) {
1183
1291
  var _ref$size = _ref.size,
1184
1292
  size = _ref$size === void 0 ? 16 : _ref$size,
1185
1293
  color = _ref.color,
1186
- props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
1294
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
1187
1295
  return createElement(SvgWithStrokeColor, Object.assign({
1188
1296
  width: size,
1189
1297
  height: size,
@@ -1213,11 +1321,11 @@ BagIcon.toString = function () {
1213
1321
  return '._icon';
1214
1322
  };
1215
1323
 
1216
- var _excluded$x = ["size"];
1324
+ var _excluded$A = ["size"];
1217
1325
  var TimeIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
1218
1326
  var _ref$size = _ref.size,
1219
1327
  size = _ref$size === void 0 ? 16 : _ref$size,
1220
- props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
1328
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
1221
1329
  return createElement(SvgWithStrokeColor, Object.assign({
1222
1330
  width: size,
1223
1331
  height: size,
@@ -1250,12 +1358,12 @@ CloseIcon.toString = function () {
1250
1358
  return '._icon';
1251
1359
  };
1252
1360
 
1253
- var _excluded$y = ["size", "color"];
1361
+ var _excluded$B = ["size", "color"];
1254
1362
  var SignatureIcon = function SignatureIcon(_ref) {
1255
1363
  var _ref$size = _ref.size,
1256
1364
  size = _ref$size === void 0 ? 16 : _ref$size,
1257
1365
  color = _ref.color,
1258
- props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
1366
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
1259
1367
  return createElement(SvgWithFillColor, Object.assign({
1260
1368
  width: size,
1261
1369
  height: size,
@@ -1276,12 +1384,12 @@ SignatureIcon.toString = function () {
1276
1384
  return '._icon';
1277
1385
  };
1278
1386
 
1279
- var _excluded$z = ["size", "color"];
1387
+ var _excluded$C = ["size", "color"];
1280
1388
  var CopyIcon = function CopyIcon(_ref) {
1281
1389
  var _ref$size = _ref.size,
1282
1390
  size = _ref$size === void 0 ? 16 : _ref$size,
1283
1391
  color = _ref.color,
1284
- props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
1392
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
1285
1393
  return createElement(SvgWithFillColor, Object.assign({
1286
1394
  width: size,
1287
1395
  height: size,
@@ -1307,10 +1415,9 @@ CopyIcon.toString = function () {
1307
1415
  return '._icon';
1308
1416
  };
1309
1417
 
1310
- var _excluded$A = ["children", "className"];
1418
+ var _excluded$D = ["children", "className", "color"];
1311
1419
  var TypographyContainer = /*#__PURE__*/styled('span', {
1312
1420
  margin: 0,
1313
- color: '$foreground',
1314
1421
  display: 'inline-block',
1315
1422
  variants: {
1316
1423
  variant: {
@@ -1356,13 +1463,7 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1356
1463
  },
1357
1464
  h5: {
1358
1465
  fontSize: '$16',
1359
- fontWeight: '$600',
1360
- '@md': {
1361
- fontSize: '$18'
1362
- },
1363
- '@lg': {
1364
- fontSize: '$20'
1365
- }
1466
+ fontWeight: '$600'
1366
1467
  },
1367
1468
  h6: {
1368
1469
  fontSize: '$14',
@@ -1391,6 +1492,10 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1391
1492
  fontSize: '$16'
1392
1493
  }
1393
1494
  },
1495
+ body3: {
1496
+ fontSize: '$12',
1497
+ fontWeight: '$400'
1498
+ },
1394
1499
  caption: {
1395
1500
  fontSize: '$10',
1396
1501
  fontWeight: '$400',
@@ -1476,9 +1581,16 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1476
1581
  function Typography(_ref) {
1477
1582
  var children = _ref.children,
1478
1583
  className = _ref.className,
1479
- props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
1584
+ color = _ref.color,
1585
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
1586
+ var customCss = color ? {
1587
+ color: color.startsWith('$') ? color : "$" + color
1588
+ } : {
1589
+ color: '$foreground'
1590
+ };
1480
1591
  return React__default.createElement(TypographyContainer, Object.assign({
1481
- className: "_typography _text " + className
1592
+ className: "_typography _text " + (className || ''),
1593
+ css: customCss
1482
1594
  }, props), children);
1483
1595
  }
1484
1596
  Typography.toString = function () {
@@ -1503,12 +1615,20 @@ var Logo = /*#__PURE__*/styled('img', {
1503
1615
  height: '$28',
1504
1616
  borderRadius: '50%'
1505
1617
  });
1506
- var ChainLogo = /*#__PURE__*/styled('img', {
1618
+ var ChainLogo = /*#__PURE__*/styled('div', {
1507
1619
  position: 'absolute',
1508
- bottom: 0,
1509
- width: '$12',
1510
- height: '$12',
1511
- right: 0
1620
+ right: -4,
1621
+ bottom: -4,
1622
+ width: '$16',
1623
+ height: '$16',
1624
+ padding: '$2',
1625
+ borderRadius: '50%',
1626
+ backgroundColor: '$background',
1627
+ border: '1px solid $neutrals400',
1628
+ img: {
1629
+ width: '100%',
1630
+ display: 'block'
1631
+ }
1512
1632
  });
1513
1633
  var StepContainer = /*#__PURE__*/styled('div', {
1514
1634
  display: 'flex',
@@ -1541,7 +1661,8 @@ var Detail = /*#__PURE__*/styled('div', {
1541
1661
  }
1542
1662
  });
1543
1663
  var SubTitle = /*#__PURE__*/styled(Typography, {
1544
- color: '$neutrals600'
1664
+ color: '$neutrals600',
1665
+ display: 'block'
1545
1666
  });
1546
1667
  function StepDetail(_ref) {
1547
1668
  var logo = _ref.logo,
@@ -1558,17 +1679,18 @@ function StepDetail(_ref) {
1558
1679
  }, React__default.createElement(Logo, {
1559
1680
  src: logo,
1560
1681
  alt: symbol
1561
- }), React__default.createElement(ChainLogo, {
1682
+ }), React__default.createElement(ChainLogo, null, React__default.createElement("img", {
1562
1683
  src: chainLogo,
1563
1684
  alt: blockchain
1564
- })), React__default.createElement(Detail, {
1685
+ }))), React__default.createElement(Detail, {
1565
1686
  pl: direction === 'horizontal'
1566
1687
  }, React__default.createElement(Typography, {
1567
1688
  noWrap: true,
1568
1689
  variant: direction === 'vertical' ? 'body2' : 'h6'
1569
1690
  }, amount ? parseFloat(amount).toFixed(2) : '?', " ", symbol), React__default.createElement(SubTitle, {
1570
1691
  noWrap: true,
1571
- variant: "caption"
1692
+ variant: "caption",
1693
+ color: "neutrals800"
1572
1694
  }, "on ", blockchain)));
1573
1695
  }
1574
1696
 
@@ -1697,6 +1819,99 @@ function Spinner(_ref) {
1697
1819
  });
1698
1820
  }
1699
1821
 
1822
+ var TooltipTrigger = /*#__PURE__*/styled(Trigger, {
1823
+ border: 0,
1824
+ padding: 0,
1825
+ backgroundColor: 'transparent'
1826
+ });
1827
+ var TooltipContent = /*#__PURE__*/styled(Content$1, {
1828
+ borderRadius: '$5',
1829
+ padding: '$4 $8',
1830
+ fontSize: '$14',
1831
+ animationDuration: '400ms',
1832
+ animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
1833
+ willChange: 'transform, opacity',
1834
+ variants: {
1835
+ color: {
1836
+ primary: {
1837
+ backgroundColor: '$primary',
1838
+ color: '$white'
1839
+ },
1840
+ error: {
1841
+ backgroundColor: '$error',
1842
+ color: '$white'
1843
+ },
1844
+ warning: {
1845
+ backgroundColor: '$warning',
1846
+ color: '$white'
1847
+ },
1848
+ success: {
1849
+ backgroundColor: '$success',
1850
+ color: '$white'
1851
+ },
1852
+ gray: {
1853
+ backgroundColor: '$neutrals300',
1854
+ color: '$black'
1855
+ },
1856
+ black: {
1857
+ backgroundColor: '$black',
1858
+ color: '$white'
1859
+ },
1860
+ white: {
1861
+ backgroundColor: '$white',
1862
+ color: '$black'
1863
+ }
1864
+ }
1865
+ }
1866
+ });
1867
+ var TooltipArrow = /*#__PURE__*/styled(Arrow, {
1868
+ variants: {
1869
+ color: {
1870
+ primary: {
1871
+ fill: '$primary'
1872
+ },
1873
+ error: {
1874
+ fill: '$error'
1875
+ },
1876
+ warning: {
1877
+ fill: '$warning'
1878
+ },
1879
+ success: {
1880
+ fill: '$success'
1881
+ },
1882
+ gray: {
1883
+ fill: '$neutrals300'
1884
+ },
1885
+ black: {
1886
+ fill: '$black'
1887
+ },
1888
+ white: {
1889
+ fill: '$white'
1890
+ }
1891
+ }
1892
+ }
1893
+ });
1894
+ var ChildrenWrapper = /*#__PURE__*/styled('div', {
1895
+ display: 'inline-block'
1896
+ });
1897
+ function Tooltip(_ref) {
1898
+ var children = _ref.children,
1899
+ content = _ref.content,
1900
+ _ref$side = _ref.side,
1901
+ side = _ref$side === void 0 ? 'top' : _ref$side,
1902
+ _ref$color = _ref.color,
1903
+ color = _ref$color === void 0 ? 'gray' : _ref$color;
1904
+ return React__default.createElement(Provider, null, React__default.createElement(Root, null, React__default.createElement(TooltipTrigger, {
1905
+ asChild: true
1906
+ }, React__default.createElement(ChildrenWrapper, null, children)), React__default.createElement(Portal, null, React__default.createElement(TooltipContent, {
1907
+ color: color,
1908
+ side: side,
1909
+ sideOffset: 5
1910
+ }, content, React__default.createElement(TooltipArrow, {
1911
+ color: color
1912
+ })))));
1913
+ }
1914
+
1700
1915
  var Container = /*#__PURE__*/styled('div', {
1701
1916
  borderRadius: '$5',
1702
1917
  border: '1px solid $neutrals300',
@@ -1731,7 +1946,7 @@ var Line = /*#__PURE__*/styled('div', {
1731
1946
  });
1732
1947
  var HR = /*#__PURE__*/styled('hr', {
1733
1948
  width: '100%',
1734
- background: '$neutrals200',
1949
+ border: '1px solid $neutrals400',
1735
1950
  margin: '$8 0'
1736
1951
  });
1737
1952
  var SwapperLogo = /*#__PURE__*/styled('img', {
@@ -1789,7 +2004,7 @@ var GasContainer = /*#__PURE__*/styled('div', {
1789
2004
  margin: '$8'
1790
2005
  }
1791
2006
  });
1792
- var FeeContainer = /*#__PURE__*/styled('div', {
2007
+ var CostContainer = /*#__PURE__*/styled('div', {
1793
2008
  display: 'flex',
1794
2009
  flexDirection: 'column',
1795
2010
  alignItems: 'center',
@@ -1832,7 +2047,9 @@ function BestRoute(props) {
1832
2047
  return React__default.createElement(Container, null, loading ? React__default.createElement(SkeletonContainer$1, null, React__default.createElement(Skeleton, {
1833
2048
  width: 48,
1834
2049
  height: 94
1835
- })) : React__default.createElement(GasContainer, null, React__default.createElement(FeeContainer, {
2050
+ })) : React__default.createElement(GasContainer, null, React__default.createElement(Tooltip, {
2051
+ content: "Transaction cost (fee)"
2052
+ }, React__default.createElement(CostContainer, {
1836
2053
  warning: feeWarning
1837
2054
  }, React__default.createElement(GasIcon, {
1838
2055
  size: 20,
@@ -1842,13 +2059,17 @@ function BestRoute(props) {
1842
2059
  align: "center",
1843
2060
  variant: "caption",
1844
2061
  warning: feeWarning
1845
- }, error && '-', !!data && "$" + totalFee)), React__default.createElement(HR, null), React__default.createElement(TimeIcon, {
2062
+ }, error && '-', !!data && "$" + totalFee))), React__default.createElement(HR, null), React__default.createElement(Tooltip, {
2063
+ content: "Time estimate"
2064
+ }, React__default.createElement(CostContainer, {
2065
+ warning: feeWarning
2066
+ }, React__default.createElement(TimeIcon, {
1846
2067
  size: 20
1847
2068
  }), React__default.createElement(Typography, {
1848
2069
  mt: 4,
1849
2070
  align: "center",
1850
2071
  variant: "caption"
1851
- }, error && '-', !!data && "~" + totalTime + "m")), React__default.createElement(BestRouteContainer, null, loading && React__default.createElement(Spinner, {
2072
+ }, error && '-', !!data && "~" + totalTime + "m")))), React__default.createElement(BestRouteContainer, null, loading && React__default.createElement(Spinner, {
1852
2073
  color: "primary"
1853
2074
  }), error && React__default.createElement(ErrorMsg, {
1854
2075
  variant: "caption"
@@ -1879,8 +2100,8 @@ function BestRoute(props) {
1879
2100
  }, "No routes found")));
1880
2101
  }
1881
2102
 
1882
- var _excluded$B = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
1883
- var _ghost, _css, _css2, _css3, _css4;
2103
+ var _excluded$E = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
2104
+ var _ghost, _css, _css2, _css3;
1884
2105
  var ButtonContainer = /*#__PURE__*/styled('button', {
1885
2106
  borderRadius: '$5',
1886
2107
  fontSize: '$16',
@@ -1890,6 +2111,11 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
1890
2111
  display: 'flex',
1891
2112
  alignItems: 'center',
1892
2113
  justifyContent: 'center',
2114
+ transition: 'all 0.35s',
2115
+ border: '0',
2116
+ '&:active': {
2117
+ transform: 'scale(0.95)'
2118
+ },
1893
2119
  variants: {
1894
2120
  align: {
1895
2121
  start: {
@@ -1902,6 +2128,8 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
1902
2128
  }
1903
2129
  },
1904
2130
  size: {
2131
+ compact: {},
2132
+ free: {},
1905
2133
  small: {
1906
2134
  height: '$32'
1907
2135
  },
@@ -1918,28 +2146,29 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
1918
2146
  color: '$foreground',
1919
2147
  border: 0,
1920
2148
  '&:hover': {
1921
- backgroundColor: '$neutrals200',
1922
- color: '$foreground'
2149
+ backgroundColor: '$neutrals200'
1923
2150
  },
1924
2151
  '&:disabled': {
1925
- background: '$neutrals400 !important'
2152
+ background: '$neutrals400'
2153
+ },
2154
+ '&:disabled:hover': {
2155
+ background: '$neutrals400',
2156
+ transform: 'unset'
1926
2157
  }
1927
2158
  },
1928
2159
  outlined: {
1929
- backgroundColor: '$background !important',
1930
- borderColor: '$neutrals400 !important',
2160
+ backgroundColor: '$background',
2161
+ border: 1,
2162
+ borderStyle: 'solid',
2163
+ borderColor: '$neutrals400',
1931
2164
  color: '$foreground',
1932
2165
  '&:hover': {
1933
- borderColor: '$neutrals600 !important',
1934
- color: '$neutrals500 !important'
2166
+ borderColor: '$neutrals600'
1935
2167
  },
1936
2168
  '&:disabled': {
1937
- borderColor: '$neutrals300 !important',
1938
- color: '$neutrals400 !important'
1939
- },
1940
- background: 'transparent',
1941
- border: 1,
1942
- borderStyle: 'solid'
2169
+ borderColor: '$neutrals300',
2170
+ color: '$neutrals400'
2171
+ }
1943
2172
  },
1944
2173
  ghost: (_ghost = {
1945
2174
  color: '$foreground',
@@ -1973,24 +2202,25 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
1973
2202
  compoundVariants: [{
1974
2203
  type: 'primary',
1975
2204
  variant: 'contained',
1976
- css: (_css = {
2205
+ css: {
1977
2206
  background: '$primary',
1978
- $$color: '$colors$background'
1979
- }, _css["." + darkTheme + " &"] = {
1980
- $$color: '$colors$foreground'
1981
- }, _css.color = '$$color !important', _css['&:hover'] = {
1982
- background: '$primary700'
1983
- }, _css['&:visited'] = {
1984
- background: '$primary900'
1985
- }, _css['&:focus'] = {
1986
- background: '$primary600'
1987
- }, _css)
2207
+ color: '$white',
2208
+ '&:hover': {
2209
+ background: '$primary700'
2210
+ },
2211
+ '&:visited': {
2212
+ background: '$primary900'
2213
+ },
2214
+ '&:focus': {
2215
+ background: '$primary600'
2216
+ }
2217
+ }
1988
2218
  }, {
1989
2219
  type: 'primary',
1990
2220
  variant: 'outlined',
1991
2221
  css: {
1992
2222
  color: '$primary !important',
1993
- borderColor: '$primary !important',
2223
+ borderColor: '$primary',
1994
2224
  '&:hover': {
1995
2225
  color: '$primary700 !important',
1996
2226
  borderColor: '$primary700 !important'
@@ -2022,24 +2252,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
2022
2252
  }, {
2023
2253
  type: 'error',
2024
2254
  variant: 'contained',
2025
- css: (_css2 = {
2255
+ css: (_css = {
2026
2256
  background: '$error',
2027
2257
  $$color: '$colors$background'
2028
- }, _css2["." + darkTheme + " &"] = {
2258
+ }, _css["." + darkTheme + " &"] = {
2029
2259
  $$color: '$colors$foreground'
2030
- }, _css2.color = '$$color !important', _css2['&:hover'] = {
2260
+ }, _css.color = '$$color !important', _css['&:hover'] = {
2031
2261
  background: '$error300'
2032
- }, _css2['&:visited'] = {
2262
+ }, _css['&:visited'] = {
2033
2263
  background: '$error700'
2034
- }, _css2['&:focus'] = {
2264
+ }, _css['&:focus'] = {
2035
2265
  background: '$error700'
2036
- }, _css2)
2266
+ }, _css)
2037
2267
  }, {
2038
2268
  type: 'error',
2039
2269
  variant: 'outlined',
2040
2270
  css: {
2041
2271
  color: '$error !important',
2042
- borderColor: '$error !important',
2272
+ borderColor: '$error',
2043
2273
  '&:hover': {
2044
2274
  color: '$error300 !important',
2045
2275
  borderColor: '$error300 !important'
@@ -2071,24 +2301,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
2071
2301
  }, {
2072
2302
  type: 'warning',
2073
2303
  variant: 'contained',
2074
- css: (_css3 = {
2304
+ css: (_css2 = {
2075
2305
  background: '$warning',
2076
2306
  $$color: '$colors$background'
2077
- }, _css3["." + darkTheme + " &"] = {
2307
+ }, _css2["." + darkTheme + " &"] = {
2078
2308
  $$color: '$colors$foreground'
2079
- }, _css3.color = '$$color !important', _css3['&:hover'] = {
2309
+ }, _css2.color = '$$color !important', _css2['&:hover'] = {
2080
2310
  background: '$warning300'
2081
- }, _css3['&:visited'] = {
2311
+ }, _css2['&:visited'] = {
2082
2312
  background: '$warning700'
2083
- }, _css3['&:focus'] = {
2313
+ }, _css2['&:focus'] = {
2084
2314
  background: '$warning700'
2085
- }, _css3)
2315
+ }, _css2)
2086
2316
  }, {
2087
2317
  type: 'warning',
2088
2318
  variant: 'outlined',
2089
2319
  css: {
2090
2320
  color: '$warning !important',
2091
- borderColor: '$warning !important',
2321
+ borderColor: '$warning',
2092
2322
  '&:hover': {
2093
2323
  color: '$warning300 !important',
2094
2324
  borderColor: '$warning300 !important'
@@ -2120,24 +2350,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
2120
2350
  }, {
2121
2351
  type: 'success',
2122
2352
  variant: 'contained',
2123
- css: (_css4 = {
2353
+ css: (_css3 = {
2124
2354
  background: '$success',
2125
2355
  $$color: '$colors$background'
2126
- }, _css4["." + darkTheme + " &"] = {
2356
+ }, _css3["." + darkTheme + " &"] = {
2127
2357
  $$color: '$colors$foreground'
2128
- }, _css4.color = '$$color !important', _css4['&:hover'] = {
2358
+ }, _css3.color = '$$color !important', _css3['&:hover'] = {
2129
2359
  background: '$success300'
2130
- }, _css4['&:visited'] = {
2360
+ }, _css3['&:visited'] = {
2131
2361
  background: '$success700'
2132
- }, _css4['&:focus'] = {
2362
+ }, _css3['&:focus'] = {
2133
2363
  background: '$success700'
2134
- }, _css4)
2364
+ }, _css3)
2135
2365
  }, {
2136
2366
  type: 'success',
2137
2367
  variant: 'outlined',
2138
2368
  css: {
2139
2369
  color: '$success !important',
2140
- borderColor: '$success !important',
2370
+ borderColor: '$success',
2141
2371
  '&:hover': {
2142
2372
  color: '$success300 !important',
2143
2373
  borderColor: '$success300 !important'
@@ -2166,6 +2396,12 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
2166
2396
  color: '$success700'
2167
2397
  }
2168
2398
  }
2399
+ }, {
2400
+ size: 'compact',
2401
+ css: {
2402
+ padding: '$2 $4',
2403
+ fontSize: '$12'
2404
+ }
2169
2405
  }],
2170
2406
  defaultVariants: {
2171
2407
  size: 'medium',
@@ -2209,7 +2445,7 @@ function Button(_ref) {
2209
2445
  suffix = _ref.suffix,
2210
2446
  align = _ref.align,
2211
2447
  flexContent = _ref.flexContent,
2212
- props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
2448
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
2213
2449
  var isDisabled = loading || disabled;
2214
2450
  return React__default.createElement(ButtonContainer, Object.assign({
2215
2451
  disabled: isDisabled
@@ -2285,9 +2521,70 @@ function BlockchainsList(props) {
2285
2521
  }));
2286
2522
  }
2287
2523
 
2288
- var _excluded$C = ["label", "prefix", "suffix", "children", "size", "style"];
2524
+ var DividerContainer = /*#__PURE__*/styled('div', {
2525
+ variants: {
2526
+ size: {
2527
+ 4: {
2528
+ height: '$4'
2529
+ },
2530
+ 8: {
2531
+ height: '$8'
2532
+ },
2533
+ 12: {
2534
+ height: '$12'
2535
+ },
2536
+ 16: {
2537
+ height: '$16'
2538
+ },
2539
+ 18: {
2540
+ height: '$18'
2541
+ },
2542
+ 20: {
2543
+ height: '$20'
2544
+ },
2545
+ 24: {
2546
+ height: '$24'
2547
+ },
2548
+ 32: {
2549
+ height: '$32'
2550
+ }
2551
+ }
2552
+ }
2553
+ });
2554
+ function Divider(_ref) {
2555
+ var _ref$size = _ref.size,
2556
+ size = _ref$size === void 0 ? 12 : _ref$size;
2557
+ return React__default.createElement(DividerContainer, {
2558
+ size: size
2559
+ });
2560
+ }
2561
+
2562
+ var HeaderContainer = /*#__PURE__*/styled('div', {
2563
+ display: 'flex',
2564
+ justifyContent: 'space-between',
2565
+ alignItems: 'center',
2566
+ padding: '$8 0',
2567
+ position: 'relative'
2568
+ });
2569
+ var BackButton = /*#__PURE__*/styled(Button, {
2570
+ padding: '$8'
2571
+ });
2572
+ function Header(props) {
2573
+ return React__default.createElement(HeaderContainer, null, props.onBack ? React__default.createElement(BackButton, {
2574
+ variant: "ghost",
2575
+ size: "small",
2576
+ onClick: props.onBack
2577
+ }, React__default.createElement(AngleLeftIcon, {
2578
+ size: 24
2579
+ })) : null, props.prefix, React__default.createElement(Typography, {
2580
+ variant: "h4"
2581
+ }, props.title), props.suffix || React__default.createElement("div", null));
2582
+ }
2583
+
2584
+ var _excluded$F = ["label", "prefix", "suffix", "children", "size", "style"];
2289
2585
  var InputContainer = /*#__PURE__*/styled('div', {
2290
2586
  backgroundColor: '$background',
2587
+ padding: '1px',
2291
2588
  boxSizing: 'border-box',
2292
2589
  border: '1px solid $neutrals400',
2293
2590
  borderRadius: '$5',
@@ -2299,7 +2596,8 @@ var InputContainer = /*#__PURE__*/styled('div', {
2299
2596
  color: '$foreground',
2300
2597
  transition: 'border-color ease .3s',
2301
2598
  '&:focus-within': {
2302
- borderColor: '$primary'
2599
+ borderColor: '$success',
2600
+ outline: '1px solid $success'
2303
2601
  },
2304
2602
  variants: {
2305
2603
  size: {
@@ -2370,7 +2668,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
2370
2668
  suffix = props.suffix,
2371
2669
  size = props.size,
2372
2670
  style = props.style,
2373
- inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$C);
2671
+ inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$F);
2374
2672
  return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
2375
2673
  className: "_text"
2376
2674
  }, inputAttributes.id && {
@@ -2390,36 +2688,15 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
2390
2688
  })), suffix || null));
2391
2689
  });
2392
2690
 
2393
- var Container$1 = /*#__PURE__*/styled('div', {
2691
+ var ContentContainer = /*#__PURE__*/styled('div', {
2692
+ overflow: 'hidden',
2394
2693
  display: 'flex',
2395
2694
  flexDirection: 'column',
2396
- height: '100%',
2397
- width: '100%',
2398
- padding: '$12 0',
2399
- position: 'relative',
2400
- '@lg': {
2401
- padding: '$16 0'
2402
- }
2403
- });
2404
- var HeaderContainer = /*#__PURE__*/styled('div', {
2405
- display: 'flex',
2406
- justifyContent: 'center',
2407
- alignItems: 'center',
2408
- marginBottom: '$16',
2409
- position: 'relative'
2410
- });
2411
- var BackIcon = /*#__PURE__*/styled(AngleLeftIcon, {
2412
- position: 'absolute',
2413
- left: '0'
2414
- });
2415
- var StyledBackIcon = /*#__PURE__*/styled(BackIcon, {
2416
- cursor: 'pointer'
2417
- });
2418
- var ContentContainer = /*#__PURE__*/styled('div', {
2419
2695
  flex: '1',
2420
- overflowY: 'auto',
2421
- overflowX: 'hidden',
2422
- marginTop: '$16'
2696
+ padding: '0 $4'
2697
+ });
2698
+ var TextFieldContainer = /*#__PURE__*/styled('div', {
2699
+ padding: '1px'
2423
2700
  });
2424
2701
  function SecondaryPage(props) {
2425
2702
  var title = props.title,
@@ -2431,12 +2708,11 @@ function SecondaryPage(props) {
2431
2708
  var _useState = useState(''),
2432
2709
  searchedFor = _useState[0],
2433
2710
  setSearchedFor = _useState[1];
2434
- return React__default.createElement(Container$1, null, hasHeader && React__default.createElement(HeaderContainer, null, React__default.createElement(StyledBackIcon, {
2435
- size: 24,
2436
- onClick: onBack
2437
- }), React__default.createElement(Typography, {
2438
- variant: "h4"
2439
- }, title), TopButton), props.textField && React__default.createElement("div", null, React__default.createElement(TextField, {
2711
+ return React__default.createElement(React__default.Fragment, null, hasHeader && React__default.createElement(Header, {
2712
+ onBack: onBack,
2713
+ title: title || '',
2714
+ suffix: TopButton
2715
+ }), React__default.createElement(ContentContainer, null, props.textField && React__default.createElement(TextFieldContainer, null, React__default.createElement(TextField, {
2440
2716
  size: "large",
2441
2717
  prefix: React__default.createElement(SearchIcon, {
2442
2718
  size: 24
@@ -2447,75 +2723,455 @@ function SecondaryPage(props) {
2447
2723
  },
2448
2724
  value: searchedFor,
2449
2725
  autoFocus: true
2450
- })), React__default.createElement(ContentContainer, null, props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
2726
+ }), React__default.createElement(Divider, {
2727
+ size: 16
2728
+ })), props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
2729
+ }
2730
+
2731
+ var containsText = function containsText(text, searchText) {
2732
+ return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
2733
+ };
2734
+ var getConciseAddress = function getConciseAddress(address, maxChars, ellipsisLength) {
2735
+ if (maxChars === void 0) {
2736
+ maxChars = 8;
2737
+ }
2738
+ if (ellipsisLength === void 0) {
2739
+ ellipsisLength = 3;
2740
+ }
2741
+ if (!address) return null;
2742
+ if (address.length < 2 * maxChars + ellipsisLength) return address;
2743
+ var start = Math.ceil((address.length - maxChars) / 2);
2744
+ var end = address.length - maxChars;
2745
+ return "" + address.substr(start, maxChars) + '.'.repeat(ellipsisLength) + address.substr(end);
2746
+ };
2747
+
2748
+ var SpacerContainer = /*#__PURE__*/styled('div', {
2749
+ variants: {
2750
+ size: {
2751
+ 4: {},
2752
+ 8: {},
2753
+ 12: {},
2754
+ 16: {},
2755
+ 18: {},
2756
+ 20: {},
2757
+ 24: {}
2758
+ },
2759
+ direction: {
2760
+ vertical: {},
2761
+ horizontal: {}
2762
+ }
2763
+ },
2764
+ compoundVariants: [{
2765
+ size: 4,
2766
+ direction: 'horizontal',
2767
+ css: {
2768
+ width: '$4'
2769
+ }
2770
+ }, {
2771
+ size: 4,
2772
+ direction: 'vertical',
2773
+ css: {
2774
+ height: '$4'
2775
+ }
2776
+ }, {
2777
+ size: 8,
2778
+ direction: 'horizontal',
2779
+ css: {
2780
+ width: '$8'
2781
+ }
2782
+ }, {
2783
+ size: 8,
2784
+ direction: 'vertical',
2785
+ css: {
2786
+ height: '$8'
2787
+ }
2788
+ }, {
2789
+ size: 12,
2790
+ direction: 'horizontal',
2791
+ css: {
2792
+ width: '$12'
2793
+ }
2794
+ }, {
2795
+ size: 12,
2796
+ direction: 'vertical',
2797
+ css: {
2798
+ height: '$12'
2799
+ }
2800
+ }, {
2801
+ size: 16,
2802
+ direction: 'horizontal',
2803
+ css: {
2804
+ width: '$16'
2805
+ }
2806
+ }, {
2807
+ size: 16,
2808
+ direction: 'vertical',
2809
+ css: {
2810
+ height: '$16'
2811
+ }
2812
+ }, {
2813
+ size: 18,
2814
+ direction: 'horizontal',
2815
+ css: {
2816
+ width: '$18'
2817
+ }
2818
+ }, {
2819
+ size: 18,
2820
+ direction: 'vertical',
2821
+ css: {
2822
+ height: '$18'
2823
+ }
2824
+ }, {
2825
+ size: 20,
2826
+ direction: 'horizontal',
2827
+ css: {
2828
+ width: '$20'
2829
+ }
2830
+ }, {
2831
+ size: 20,
2832
+ direction: 'vertical',
2833
+ css: {
2834
+ height: '$20'
2835
+ }
2836
+ }, {
2837
+ size: 24,
2838
+ direction: 'horizontal',
2839
+ css: {
2840
+ width: '$24'
2841
+ }
2842
+ }, {
2843
+ size: 24,
2844
+ direction: 'vertical',
2845
+ css: {
2846
+ height: '$24'
2847
+ }
2848
+ }]
2849
+ });
2850
+ function Spacer(_ref) {
2851
+ var _ref$size = _ref.size,
2852
+ size = _ref$size === void 0 ? 12 : _ref$size,
2853
+ _ref$direction = _ref.direction,
2854
+ direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
2855
+ return React__default.createElement(SpacerContainer, {
2856
+ size: size,
2857
+ direction: direction
2858
+ });
2451
2859
  }
2452
2860
 
2453
2861
  var MainContainer = /*#__PURE__*/styled('div', {
2454
- display: 'flex',
2455
2862
  width: '100%',
2456
- alignItems: 'center',
2457
2863
  padding: '$16',
2458
2864
  borderRadius: '$5',
2865
+ backgroundColor: '$neutrals300',
2866
+ color: '$neutrals800',
2867
+ '.main': {
2868
+ display: 'flex',
2869
+ alignItems: 'center'
2870
+ },
2871
+ '.footer': {
2872
+ paddingTop: '$8'
2873
+ },
2874
+ '&.hasIcon .footer': {
2875
+ paddingLeft: '$32'
2876
+ },
2459
2877
  variants: {
2460
2878
  type: {
2461
2879
  primary: {
2462
- backgroundColor: '$primary200'
2880
+ color: '$primary200'
2463
2881
  },
2464
2882
  secondary: {
2465
- backgroundColor: '$neutrals400'
2883
+ color: '$foreground'
2466
2884
  },
2467
2885
  success: {
2468
- backgroundColor: '$success300'
2886
+ color: '$success300'
2469
2887
  },
2470
2888
  warning: {
2471
- backgroundColor: '$warning500'
2889
+ color: '$warning500'
2472
2890
  },
2473
2891
  error: {
2474
- backgroundColor: '$error300'
2892
+ color: '$error300'
2475
2893
  }
2476
2894
  }
2477
2895
  }
2478
2896
  });
2479
- var ContentContainer$1 = /*#__PURE__*/styled('div', {});
2480
- var TitleContainer = /*#__PURE__*/styled('div', {
2481
- marginBottom: '$8'
2482
- });
2483
- var IconContainer = /*#__PURE__*/styled('div', {
2484
- marginRight: '$24'
2485
- });
2486
- var StyledTypography = /*#__PURE__*/styled(Typography, {
2487
- color: darkTheme.colors.foreground.value
2488
- });
2489
2897
  function Alert(props) {
2490
2898
  var type = props.type,
2491
2899
  children = props.children,
2492
2900
  title = props.title;
2493
2901
  var showIcon = ['error', 'success', 'warning'].includes(type);
2494
2902
  return React__default.createElement(MainContainer, {
2495
- type: type
2496
- }, showIcon && React__default.createElement(IconContainer, null, type === 'success' && React__default.createElement(CheckCircleIcon, {
2497
- color: "success",
2498
- size: 28
2903
+ type: type,
2904
+ className: showIcon ? 'hasIcon' : ''
2905
+ }, React__default.createElement("div", {
2906
+ className: "main"
2907
+ }, showIcon && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
2908
+ style: {
2909
+ width: '32px',
2910
+ display: 'flex',
2911
+ justifyContent: 'center',
2912
+ alignItems: 'center'
2913
+ }
2914
+ }, type === 'success' && React__default.createElement(CheckCircleIcon, {
2915
+ color: type,
2916
+ size: 24
2499
2917
  }), type === 'warning' && React__default.createElement(WarningIcon, {
2500
- color: "white",
2501
- size: 28
2918
+ color: type,
2919
+ size: 24
2502
2920
  }), type === 'error' && React__default.createElement(InfoCircleIcon, {
2503
- color: "error",
2504
- size: 28
2505
- })), React__default.createElement(ContentContainer$1, null, title && React__default.createElement(TitleContainer, null, React__default.createElement(StyledTypography, {
2506
- variant: "h6"
2507
- }, title)), children));
2921
+ color: type,
2922
+ size: 24
2923
+ }), React__default.createElement(Spacer, {
2924
+ size: 8
2925
+ }))), React__default.createElement("div", {
2926
+ style: {
2927
+ display: 'flex',
2928
+ justifyContent: 'center',
2929
+ alignItems: 'start',
2930
+ flexDirection: 'column',
2931
+ width: '100%'
2932
+ }
2933
+ }, title && React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
2934
+ className: "title",
2935
+ variant: "h6",
2936
+ color: type
2937
+ }, title), !!children && React__default.createElement(Spacer, {
2938
+ size: 8,
2939
+ direction: "vertical"
2940
+ })), children)), props.footer ? React__default.createElement("div", {
2941
+ className: "footer"
2942
+ }, props.footer) : null);
2508
2943
  }
2509
2944
 
2510
- var containsText = function containsText(text, searchText) {
2511
- return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
2512
- };
2945
+ function LoadingFailedAlert() {
2946
+ return React__default.createElement(Alert, {
2947
+ type: "error",
2948
+ title: " Error connecting server, please reload the app and try again."
2949
+ });
2950
+ }
2513
2951
 
2514
- var ListContainer$1 = /*#__PURE__*/styled('div', {
2515
- height: '450px',
2952
+ function NotFoundAlert(props) {
2953
+ var catergory = props.catergory,
2954
+ searchedFor = props.searchedFor;
2955
+ return React__default.createElement(Alert, {
2956
+ type: "secondary",
2957
+ title: catergory + " " + (searchedFor ? "'" + searchedFor + "'" : '') + " not found."
2958
+ });
2959
+ }
2960
+
2961
+ function VirtualizedList(props) {
2962
+ var itemCount = props.itemCount,
2963
+ hasNextPage = props.hasNextPage,
2964
+ loadNextPage = props.loadNextPage,
2965
+ Item = props.Item,
2966
+ innerElementType = props.innerElementType,
2967
+ size = props.size;
2968
+ var isItemLoaded = function isItemLoaded(index) {
2969
+ return !hasNextPage || index < itemCount;
2970
+ };
2971
+ return React__default.createElement(AutoSizer, null, function (_ref) {
2972
+ var width = _ref.width,
2973
+ height = _ref.height;
2974
+ return React__default.createElement(InfiniteLoader, {
2975
+ isItemLoaded: isItemLoaded,
2976
+ itemCount: hasNextPage ? itemCount + 1 : itemCount,
2977
+ loadMoreItems: loadNextPage,
2978
+ threshold: 1
2979
+ }, function (_ref2) {
2980
+ var onItemsRendered = _ref2.onItemsRendered,
2981
+ ref = _ref2.ref;
2982
+ return React__default.createElement(VariableSizeList, {
2983
+ innerElementType: innerElementType,
2984
+ ref: ref,
2985
+ itemSize: function itemSize() {
2986
+ return size;
2987
+ },
2988
+ itemCount: itemCount,
2989
+ height: height || 0,
2990
+ width: width || 0,
2991
+ onItemsRendered: onItemsRendered
2992
+ }, function (_ref3) {
2993
+ var index = _ref3.index,
2994
+ style = _ref3.style;
2995
+ return isItemLoaded(index) ? React__default.createElement(Item, {
2996
+ index: index,
2997
+ style: style
2998
+ }) : null;
2999
+ });
3000
+ });
3001
+ });
3002
+ }
3003
+
3004
+ var TokenImage = /*#__PURE__*/styled('img', {
3005
+ width: '$32',
3006
+ maxHeight: '$32',
3007
+ marginRight: '$16'
3008
+ });
3009
+ var TokenNameContainer = /*#__PURE__*/styled('div', {
3010
+ display: 'flex',
3011
+ flexDirection: 'column'
3012
+ });
3013
+ var TokenAmountContainer = /*#__PURE__*/styled('div', {
3014
+ display: 'flex',
3015
+ flexDirection: 'column',
3016
+ alignItems: 'flex-end'
3017
+ });
3018
+ function TokenItem(props) {
3019
+ var _token$balance;
3020
+ var token = props.token,
3021
+ style = props.style,
3022
+ onClick = props.onClick,
3023
+ selected = props.selected;
3024
+ return React__default.createElement("div", {
3025
+ style: _extends({
3026
+ display: 'flex',
3027
+ alignItems: 'center',
3028
+ width: '100%'
3029
+ }, style, {
3030
+ height: '48px',
3031
+ top: parseFloat(style == null ? void 0 : style.top) + 0 + "px",
3032
+ padding: '0 4px'
3033
+ })
3034
+ }, React__default.createElement(Button, {
3035
+ variant: "outlined",
3036
+ size: "large",
3037
+ align: "start",
3038
+ onClick: onClick.bind(null, token),
3039
+ type: selected ? 'primary' : undefined,
3040
+ prefix: React__default.createElement(TokenImage, {
3041
+ src: token.image
3042
+ }),
3043
+ suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
3044
+ variant: "body2"
3045
+ }, token.balance.amount), React__default.createElement(Typography, {
3046
+ variant: "caption"
3047
+ }, token.balance.usdValue + "$"))
3048
+ }, React__default.createElement(TokenNameContainer, null, React__default.createElement(Typography, {
3049
+ variant: "body1"
3050
+ }, token.symbol), React__default.createElement(Typography, {
3051
+ variant: "caption",
3052
+ color: "neutrals600"
3053
+ }, token.name))));
3054
+ }
3055
+
3056
+ var _excluded$G = ["style"];
3057
+ var PAGE_SIZE = 20;
3058
+ function TokenList(props) {
3059
+ var list = props.list,
3060
+ searchedText = props.searchedText,
3061
+ onChange = props.onChange,
3062
+ multiSelect = props.multiSelect,
3063
+ selectedList = props.selectedList;
3064
+ var _useState = useState(props.selected),
3065
+ selected = _useState[0],
3066
+ setSelected = _useState[1];
3067
+ var changeSelected = function changeSelected(token) {
3068
+ setSelected(token);
3069
+ onChange(token);
3070
+ };
3071
+ var isSelected = function isSelected(token) {
3072
+ if (multiSelect && selectedList) {
3073
+ return selectedList === 'all' || selectedList.map(function (item) {
3074
+ return item.symbol + item.address;
3075
+ }).indexOf(token.symbol + token.address) > -1;
3076
+ }
3077
+ return (selected == null ? void 0 : selected.symbol) === token.symbol && (selected == null ? void 0 : selected.address) === token.address;
3078
+ };
3079
+ var _useState2 = useState(true),
3080
+ hasNextPage = _useState2[0],
3081
+ setHasNextPage = _useState2[1];
3082
+ var _useState3 = useState(list),
3083
+ tokens = _useState3[0],
3084
+ setTokens = _useState3[1];
3085
+ var loadNextPage = function loadNextPage() {
3086
+ setTokens(list.slice(0, tokens.length + PAGE_SIZE));
3087
+ };
3088
+ useEffect(function () {
3089
+ setTokens(list.slice(0, PAGE_SIZE));
3090
+ }, [searchedText, list]);
3091
+ useEffect(function () {
3092
+ setHasNextPage(list.length > tokens.length);
3093
+ }, [tokens.length]);
3094
+ var innerElementType = forwardRef(function (_ref, ref) {
3095
+ var style = _ref.style,
3096
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
3097
+ return React__default.createElement("div", Object.assign({
3098
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3099
+ ref: ref,
3100
+ style: _extends({}, style, {
3101
+ height: parseFloat(style == null ? void 0 : style.height) + 8 * 2 + "px"
3102
+ })
3103
+ }, rest));
3104
+ });
3105
+ return React__default.createElement(VirtualizedList, {
3106
+ Item: function Item(_ref2) {
3107
+ var index = _ref2.index,
3108
+ style = _ref2.style;
3109
+ return React__default.createElement(TokenItem, {
3110
+ token: tokens[index],
3111
+ style: style,
3112
+ onClick: changeSelected,
3113
+ selected: isSelected(tokens[index])
3114
+ });
3115
+ },
3116
+ hasNextPage: hasNextPage,
3117
+ itemCount: tokens.length,
3118
+ loadNextPage: loadNextPage,
3119
+ innerElementType: innerElementType,
3120
+ size: 56
3121
+ });
3122
+ }
3123
+
3124
+ var Container$1 = /*#__PURE__*/styled('div', {
3125
+ flex: '1'
3126
+ });
3127
+ var LoaderContainer = /*#__PURE__*/styled('div', {
2516
3128
  display: 'flex',
2517
3129
  justifyContent: 'center',
2518
- alignItems: 'center'
3130
+ width: '100%',
3131
+ position: 'absolute',
3132
+ top: '50%'
3133
+ });
3134
+ var filterTokens = function filterTokens(list, searchedFor) {
3135
+ return list.filter(function (token) {
3136
+ return containsText(token.symbol, searchedFor) || containsText(token.address || '', searchedFor) || containsText(token.name || '', searchedFor);
3137
+ });
3138
+ };
3139
+ function TokenSelector(props) {
3140
+ var list = props.list,
3141
+ type = props.type,
3142
+ selected = props.selected,
3143
+ onChange = props.onChange,
3144
+ hasHeader = props.hasHeader,
3145
+ multiSelect = props.multiSelect,
3146
+ selectedList = props.selectedList,
3147
+ onBack = props.onBack,
3148
+ loadingStatus = props.loadingStatus;
3149
+ return React__default.createElement(SecondaryPage, {
3150
+ textField: true,
3151
+ textFieldPlaceholder: "Search Blockchain By Name",
3152
+ title: "Select " + type + " Token",
3153
+ hasHeader: hasHeader,
3154
+ onBack: onBack
3155
+ }, function (searchedFor) {
3156
+ var filteredTokens = filterTokens(list, searchedFor);
3157
+ return React__default.createElement(Container$1, null, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
3158
+ size: 24
3159
+ })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredTokens.length ? React__default.createElement(TokenList, {
3160
+ searchedText: searchedFor,
3161
+ list: filteredTokens,
3162
+ selected: selected,
3163
+ selectedList: selectedList,
3164
+ multiSelect: multiSelect,
3165
+ onChange: onChange
3166
+ }) : React__default.createElement(NotFoundAlert, {
3167
+ catergory: "Token",
3168
+ searchedFor: searchedFor
3169
+ })));
3170
+ });
3171
+ }
3172
+
3173
+ var ListContainer$1 = /*#__PURE__*/styled('div', {
3174
+ overflowY: 'auto'
2519
3175
  });
2520
3176
  var filterBlockchains = function filterBlockchains(list, searchedFor) {
2521
3177
  return list.filter(function (blockchain) {
@@ -2544,32 +3200,27 @@ function BlockchainSelector(props) {
2544
3200
  return React__default.createElement(ListContainer$1, {
2545
3201
  style: listContainerStyle,
2546
3202
  key: "1"
2547
- }, loadingStatus === 'loading' && React__default.createElement("div", null, React__default.createElement(Spinner, {
3203
+ }, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
2548
3204
  size: 24
2549
- })), loadingStatus === 'failed' && React__default.createElement(Alert, {
2550
- type: "error"
2551
- }, React__default.createElement(Typography, {
2552
- variant: "body2"
2553
- }, "Error connecting server, please reload the app and try again")), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length > 0 ? React__default.createElement(BlockchainsList, {
3205
+ })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
2554
3206
  list: filteredBlockchains,
2555
3207
  selected: selected,
2556
3208
  multiSelect: multiSelect,
2557
3209
  selectedList: selectedList,
2558
3210
  onChange: onChange
2559
- }) : React__default.createElement(Alert, {
2560
- type: "secondary"
2561
- }, React__default.createElement(Typography, {
2562
- variant: "body2"
2563
- }, searchedFor + " not found"))));
3211
+ }) : React__default.createElement(NotFoundAlert, {
3212
+ catergory: "Blockchain",
3213
+ searchedFor: searchedFor
3214
+ })));
2564
3215
  });
2565
3216
  }
2566
3217
 
2567
- var _excluded$D = ["label", "id"];
3218
+ var _excluded$H = ["label", "id"];
2568
3219
  var CheckboxContainer = /*#__PURE__*/styled('div', {
2569
3220
  display: 'flex',
2570
3221
  alignItems: 'center'
2571
3222
  });
2572
- var CheckboxRoot = /*#__PURE__*/styled(Root, {
3223
+ var CheckboxRoot = /*#__PURE__*/styled(Root$1, {
2573
3224
  borderRadius: '5px',
2574
3225
  width: 20,
2575
3226
  padding: 0,
@@ -2589,7 +3240,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
2589
3240
  function Checkbox(_ref) {
2590
3241
  var label = _ref.label,
2591
3242
  id = _ref.id,
2592
- props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
3243
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
2593
3244
  return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
2594
3245
  id: id
2595
3246
  }, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
@@ -2609,13 +3260,17 @@ var ChipCointainer = /*#__PURE__*/styled('div', {
2609
3260
  height: '32',
2610
3261
  fontSize: '$14',
2611
3262
  cursor: 'pointer',
3263
+ transition: 'all 0.35s',
3264
+ color: '$foreground',
2612
3265
  '&:hover': {
2613
- backgroundColor: '$neutrals300'
3266
+ backgroundColor: '$success700',
3267
+ color: '$background'
2614
3268
  },
2615
3269
  variants: {
2616
3270
  selected: {
2617
3271
  "true": {
2618
- backgroundColor: '$neutrals400'
3272
+ backgroundColor: '$success',
3273
+ color: '$background'
2619
3274
  },
2620
3275
  "false": {
2621
3276
  backgroundColor: '$background'
@@ -2634,9 +3289,7 @@ function Chip(props) {
2634
3289
  selected: selected,
2635
3290
  onClick: onClick,
2636
3291
  style: style
2637
- }, prefix || null, React__default.createElement(Typography, {
2638
- variant: "body2"
2639
- }, label), suffix || null);
3292
+ }, prefix || null, label, suffix || null);
2640
3293
  }
2641
3294
 
2642
3295
  var BackDrop = /*#__PURE__*/styled('div', {
@@ -2670,7 +3323,7 @@ var ModalHeader = /*#__PURE__*/styled('div', {
2670
3323
  position: 'relative',
2671
3324
  marginBottom: '$16'
2672
3325
  });
2673
- var ContentContainer$2 = /*#__PURE__*/styled('div', {});
3326
+ var ContentContainer$1 = /*#__PURE__*/styled('div', {});
2674
3327
  function Modal(props) {
2675
3328
  var title = props.title,
2676
3329
  content = props.content,
@@ -2694,7 +3347,7 @@ function Modal(props) {
2694
3347
  }, title), React__default.createElement(Row, null, action, React__default.createElement(CloseIcon, {
2695
3348
  size: 24,
2696
3349
  onClick: onClose
2697
- }))), React__default.createElement(ContentContainer$2, {
3350
+ }))), React__default.createElement(ContentContainer$1, {
2698
3351
  style: contentStyle
2699
3352
  }, content))), document.body));
2700
3353
  }
@@ -2721,7 +3374,7 @@ var State = function State(_ref) {
2721
3374
  }, React__default.createElement(DownloadIcon, {
2722
3375
  size: 24,
2723
3376
  color: "success"
2724
- })), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(FilledCircle, null)));
3377
+ })), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
2725
3378
  };
2726
3379
 
2727
3380
  var WalletImage = /*#__PURE__*/styled('img', {
@@ -2729,6 +3382,23 @@ var WalletImage = /*#__PURE__*/styled('img', {
2729
3382
  height: '$24',
2730
3383
  marginRight: '$12'
2731
3384
  });
3385
+ var Text = /*#__PURE__*/styled('div', {
3386
+ display: 'flex',
3387
+ flexDirection: 'column'
3388
+ });
3389
+ var ExtendedButton = /*#__PURE__*/styled(Button, {
3390
+ variants: {
3391
+ type: {
3392
+ primary: {
3393
+ outline: '1px solid $primary',
3394
+ borderColor: '$primary',
3395
+ '&:hover': {
3396
+ borderColor: '$primary'
3397
+ }
3398
+ }
3399
+ }
3400
+ }
3401
+ });
2732
3402
  function Wallet(props) {
2733
3403
  var name = props.name,
2734
3404
  type = props.type,
@@ -2736,9 +3406,9 @@ function Wallet(props) {
2736
3406
  state = props.state,
2737
3407
  _onClick = props.onClick,
2738
3408
  installLink = props.installLink;
2739
- return React__default.createElement(Button, {
3409
+ return React__default.createElement(ExtendedButton, {
2740
3410
  type: state === WalletState.CONNECTED ? 'primary' : undefined,
2741
- disabled: !state,
3411
+ disabled: state == WalletState.CONNECTING,
2742
3412
  onClick: function onClick() {
2743
3413
  if (state === WalletState.NOT_INSTALLED) {
2744
3414
  window.open(detectInstallLink(installLink), '_blank');
@@ -2754,10 +3424,14 @@ function Wallet(props) {
2754
3424
  walletState: state,
2755
3425
  installLink: installLink
2756
3426
  })
2757
- }, React__default.createElement(Typography, {
3427
+ }, React__default.createElement(Text, null, React__default.createElement(Typography, {
2758
3428
  variant: "h5",
2759
3429
  noWrap: false
2760
- }, name));
3430
+ }, name), state === WalletState.CONNECTED ? React__default.createElement(Typography, {
3431
+ variant: "caption",
3432
+ noWrap: false,
3433
+ color: "primary"
3434
+ }, "Connected") : null));
2761
3435
  }
2762
3436
 
2763
3437
  var ModalContent = /*#__PURE__*/styled('div', {
@@ -2789,107 +3463,21 @@ function ConnectWalletsModal(props) {
2789
3463
  });
2790
3464
  }
2791
3465
 
2792
- var SpacerContainer = /*#__PURE__*/styled('div', {
2793
- variants: {
2794
- size: {
2795
- 12: {},
2796
- 16: {},
2797
- 18: {},
2798
- 20: {},
2799
- 24: {}
2800
- },
2801
- direction: {
2802
- vertical: {},
2803
- horizontal: {}
2804
- }
2805
- },
2806
- compoundVariants: [{
2807
- size: 12,
2808
- direction: 'horizontal',
2809
- css: {
2810
- width: '$12'
2811
- }
2812
- }, {
2813
- size: 12,
2814
- direction: 'vertical',
2815
- css: {
2816
- height: '$12'
2817
- }
2818
- }, {
2819
- size: 16,
2820
- direction: 'horizontal',
2821
- css: {
2822
- width: '$16'
2823
- }
2824
- }, {
2825
- size: 16,
2826
- direction: 'vertical',
2827
- css: {
2828
- height: '$16'
2829
- }
2830
- }, {
2831
- size: 18,
2832
- direction: 'horizontal',
2833
- css: {
2834
- width: '$18'
2835
- }
2836
- }, {
2837
- size: 18,
2838
- direction: 'vertical',
2839
- css: {
2840
- height: '$18'
2841
- }
2842
- }, {
2843
- size: 20,
2844
- direction: 'horizontal',
2845
- css: {
2846
- width: '$20'
2847
- }
2848
- }, {
2849
- size: 20,
2850
- direction: 'vertical',
2851
- css: {
2852
- height: '$20'
2853
- }
2854
- }, {
2855
- size: 24,
2856
- direction: 'horizontal',
2857
- css: {
2858
- width: '$24'
2859
- }
2860
- }, {
2861
- size: 24,
2862
- direction: 'vertical',
2863
- css: {
2864
- height: '$24'
2865
- }
2866
- }]
2867
- });
2868
- function Spacer(_ref) {
2869
- var _ref$size = _ref.size,
2870
- size = _ref$size === void 0 ? 12 : _ref$size,
2871
- _ref$direction = _ref.direction,
2872
- direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
2873
- return React__default.createElement(SpacerContainer, {
2874
- size: size,
2875
- direction: direction
2876
- });
2877
- }
2878
-
2879
- var StyledSwitchRoot = /*#__PURE__*/styled(Root$1, {
2880
- boxSizing: 'border-box',
2881
- boxShadow: 'none',
2882
- borderStyle: 'solid',
2883
- width: '42px',
2884
- height: '22px',
2885
- backgroundColor: '$neutrals300',
2886
- borderColor: '$neutrals400',
2887
- borderRadius: '99999px',
2888
- position: 'relative',
2889
- padding: '0',
2890
- cursor: 'pointer',
2891
- '&[data-state="checked"]': {
2892
- backgroundColor: '$primary100'
3466
+ var StyledSwitchRoot = /*#__PURE__*/styled(Root$2, {
3467
+ boxSizing: 'border-box',
3468
+ boxShadow: 'none',
3469
+ borderStyle: 'solid',
3470
+ width: '42px',
3471
+ height: '22px',
3472
+ backgroundColor: '$neutrals600',
3473
+ borderColor: '$neutrals600',
3474
+ borderRadius: '99999px',
3475
+ position: 'relative',
3476
+ padding: '0',
3477
+ cursor: 'pointer',
3478
+ '&[data-state="checked"]': {
3479
+ backgroundColor: '$success',
3480
+ borderColor: '$success'
2893
3481
  },
2894
3482
  '-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)'
2895
3483
  });
@@ -2900,13 +3488,12 @@ var StyledSwitchThumb = /*#__PURE__*/styled(Thumb, {
2900
3488
  display: 'block',
2901
3489
  width: '18px',
2902
3490
  height: '18px',
2903
- backgroundColor: '$neutrals500',
3491
+ backgroundColor: '$white',
2904
3492
  transition: ' transform 300ms',
2905
3493
  borderRadius: '999999px',
2906
3494
  willChange: 'transform',
2907
3495
  '&[data-state="checked"]': {
2908
- transform: 'translateX(20px)',
2909
- backgroundColor: '$primary'
3496
+ transform: 'translateX(20px)'
2910
3497
  }
2911
3498
  });
2912
3499
  function Switch(props) {
@@ -2928,12 +3515,21 @@ var groupLiquiditySources = function groupLiquiditySources(liquiditySources) {
2928
3515
  })
2929
3516
  };
2930
3517
  };
2931
- var LiquiditySourceType = /*#__PURE__*/styled(Typography, {
3518
+ var MainContainer$1 = /*#__PURE__*/styled('div', {
3519
+ variants: {
3520
+ loaded: {
3521
+ "true": {
3522
+ overflowY: 'auto'
3523
+ }
3524
+ }
3525
+ }
3526
+ });
3527
+ var LiquiditySourceType = /*#__PURE__*/styled('div', {
2932
3528
  position: 'sticky',
2933
- display: 'block',
3529
+ display: 'flex',
3530
+ justifyContent: 'space-between',
3531
+ alignItems: 'center',
2934
3532
  top: '0',
2935
- marginTop: '$8',
2936
- marginBottom: '$8',
2937
3533
  backgroundColor: '$background',
2938
3534
  zIndex: '9999',
2939
3535
  paddingTop: '$8',
@@ -2944,10 +3540,16 @@ var LiquidityImage = /*#__PURE__*/styled('img', {
2944
3540
  maxHeight: '$20',
2945
3541
  marginRight: '$16'
2946
3542
  });
3543
+ var LoaderContainer$1 = /*#__PURE__*/styled('div', {
3544
+ display: 'flex',
3545
+ justifyContent: 'center'
3546
+ });
2947
3547
  function LiquiditySourceList(props) {
2948
3548
  var list = props.list,
2949
3549
  onChange = props.onChange,
2950
- listContainerStyle = props.listContainerStyle;
3550
+ listContainerStyle = props.listContainerStyle,
3551
+ loadingStatus = props.loadingStatus,
3552
+ searchedFor = props.searchedFor;
2951
3553
  var _useState = useState(list.filter(function (item) {
2952
3554
  return item.selected;
2953
3555
  })),
@@ -2973,35 +3575,58 @@ function LiquiditySourceList(props) {
2973
3575
  return item.selected;
2974
3576
  }));
2975
3577
  }, [list]);
2976
- return React__default.createElement("div", {
2977
- style: _extends({
2978
- height: '450px'
2979
- }, listContainerStyle)
2980
- }, React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, {
3578
+ var sections = groupLiquiditySources(list);
3579
+ var bridges = sections.bridge;
3580
+ var exchanges = sections.exchange;
3581
+ var totalBridges = bridges.length;
3582
+ var totalExchanges = exchanges.length;
3583
+ // TODO: This is not performant
3584
+ var totalSelectedBridges = bridges.filter(isSelected).length;
3585
+ var totalSelectedExchanges = exchanges.filter(isSelected).length;
3586
+ return React__default.createElement(MainContainer$1, {
3587
+ style: listContainerStyle,
3588
+ loaded: loadingStatus === 'success'
3589
+ }, React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
2981
3590
  variant: "h5"
2982
- }, "Bridges"), React__default.createElement(Spacer, {
2983
- size: 16,
3591
+ }, "Bridges"), React__default.createElement(Typography, {
3592
+ variant: "body1",
3593
+ color: "neutrals800"
3594
+ }, totalSelectedBridges === totalBridges ? totalBridges : totalSelectedBridges + " / " + totalBridges)), React__default.createElement(Spacer, {
3595
+ size: 12,
2984
3596
  direction: "vertical"
2985
- }), groupLiquiditySources(list).bridge.map(function (liquiditySource, index) {
3597
+ }), loadingStatus === 'loading' && React__default.createElement(LoaderContainer$1, null, React__default.createElement(Spinner, {
3598
+ size: 24
3599
+ })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, totalBridges ? bridges.map(function (liquiditySource, index) {
2986
3600
  return React__default.createElement(LiquiditySourceItem, {
2987
3601
  liquiditySource: liquiditySource,
2988
3602
  key: index,
2989
3603
  selected: isSelected(liquiditySource),
2990
3604
  onChange: changeLiquiditySources
2991
3605
  });
2992
- })), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, {
3606
+ }) : React__default.createElement(NotFoundAlert, {
3607
+ catergory: "Bridge",
3608
+ searchedFor: searchedFor
3609
+ }))), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
2993
3610
  variant: "h5"
2994
- }, "Exchanges"), React__default.createElement(Spacer, {
2995
- size: 16,
3611
+ }, "Exchanges"), React__default.createElement(Typography, {
3612
+ variant: "body1",
3613
+ color: "neutrals800"
3614
+ }, totalSelectedExchanges === totalExchanges ? totalExchanges : totalSelectedExchanges + " / " + totalExchanges)), React__default.createElement(Spacer, {
3615
+ size: 12,
2996
3616
  direction: "vertical"
2997
- }), groupLiquiditySources(list).exchange.map(function (liquiditySource, index) {
3617
+ }), loadingStatus === 'loading' && React__default.createElement(LoaderContainer$1, null, React__default.createElement(Spinner, {
3618
+ size: 24
3619
+ })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus == 'success' && React__default.createElement(React__default.Fragment, null, totalExchanges ? exchanges.map(function (liquiditySource, index) {
2998
3620
  return React__default.createElement(LiquiditySourceItem, {
2999
3621
  liquiditySource: liquiditySource,
3000
3622
  key: index,
3001
3623
  selected: isSelected(liquiditySource),
3002
3624
  onChange: changeLiquiditySources
3003
3625
  });
3004
- })));
3626
+ }) : React__default.createElement(NotFoundAlert, {
3627
+ catergory: "Exchange",
3628
+ searchedFor: searchedFor
3629
+ }))));
3005
3630
  }
3006
3631
  var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
3007
3632
  var liquiditySource = _ref.liquiditySource,
@@ -3020,7 +3645,6 @@ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
3020
3645
  style: {
3021
3646
  marginBottom: '12px'
3022
3647
  },
3023
- type: selected ? 'primary' : undefined,
3024
3648
  onClick: onChange.bind(null, liquiditySource)
3025
3649
  }, React__default.createElement(Typography, {
3026
3650
  variant: "body1"
@@ -3032,43 +3656,41 @@ var filterLiquiditySources = function filterLiquiditySources(liquiditySources, s
3032
3656
  return containsText(liquiditySource.title, searchedFor || '');
3033
3657
  });
3034
3658
  };
3035
- var ActionButton = /*#__PURE__*/styled(Button, {
3036
- position: 'absolute',
3037
- right: 0
3038
- });
3039
3659
  function LiquiditySourcesSelector(props) {
3040
3660
  var list = props.list,
3041
3661
  onChange = props.onChange,
3042
3662
  onBack = props.onBack,
3043
3663
  hasHeader = props.hasHeader,
3044
3664
  listContainerStyle = props.listContainerStyle,
3045
- toggleAll = props.toggleAll;
3665
+ toggleAll = props.toggleAll,
3666
+ loadingStatus = props.loadingStatus;
3046
3667
  return React__default.createElement(SecondaryPage, {
3047
3668
  textField: true,
3048
3669
  textFieldPlaceholder: "Search By Name",
3049
3670
  title: "Liquidity Sources",
3050
- TopButton: React__default.createElement(ActionButton, {
3671
+ TopButton: React__default.createElement(Button, {
3051
3672
  variant: "ghost",
3052
3673
  type: "primary",
3053
3674
  onClick: toggleAll
3054
3675
  }, list.find(function (item) {
3055
3676
  return item.selected;
3056
- }) ? 'Clear all' : 'Select all'),
3677
+ }) ? 'Deselect all' : 'Select all'),
3057
3678
  hasHeader: hasHeader,
3058
3679
  onBack: onBack
3059
3680
  }, function (searchedFor) {
3060
3681
  return React__default.createElement(LiquiditySourceList, {
3061
3682
  listContainerStyle: listContainerStyle,
3062
3683
  list: filterLiquiditySources(list, searchedFor),
3063
- onChange: onChange
3684
+ onChange: onChange,
3685
+ loadingStatus: loadingStatus,
3686
+ searchedFor: searchedFor
3064
3687
  });
3065
3688
  });
3066
3689
  }
3067
3690
 
3068
3691
  var Row$1 = /*#__PURE__*/styled('div', {
3069
3692
  display: 'flex',
3070
- flexWrap: 'wrap',
3071
- justifyContent: 'center'
3693
+ flexWrap: 'wrap'
3072
3694
  });
3073
3695
  var Circle = /*#__PURE__*/styled('div', {
3074
3696
  width: 12,
@@ -3163,7 +3785,9 @@ function SelectableWalletList(_ref) {
3163
3785
  height: 24
3164
3786
  }), React__default.createElement(Typography, {
3165
3787
  variant: "body2"
3166
- }, w.name), React__default.createElement(Circle, {
3788
+ }, w.name), React__default.createElement(Typography, {
3789
+ variant: "caption"
3790
+ }, getConciseAddress(w.address)), React__default.createElement(Circle, {
3167
3791
  checked: checked
3168
3792
  }, React__default.createElement(SolidCircle, {
3169
3793
  checked: checked
@@ -3171,7 +3795,7 @@ function SelectableWalletList(_ref) {
3171
3795
  }));
3172
3796
  }
3173
3797
 
3174
- var StyledRoot = /*#__PURE__*/styled(Root$2, {
3798
+ var StyledRoot = /*#__PURE__*/styled(Root$3, {
3175
3799
  variants: {
3176
3800
  direction: {
3177
3801
  horizontal: {
@@ -3193,14 +3817,14 @@ var ItemContainer = /*#__PURE__*/styled('div', {
3193
3817
  });
3194
3818
  var StyledItem = /*#__PURE__*/styled(Item, {
3195
3819
  padding: '0',
3196
- backgroundColor: '$neutrals300',
3197
3820
  width: '20px',
3198
3821
  height: '20px',
3199
3822
  borderRadius: '100%',
3200
- border: 'none',
3201
3823
  cursor: 'pointer',
3824
+ backgroundColor: '$background',
3825
+ border: '1px solid $neutrals400',
3202
3826
  '&:hover': {
3203
- backgroundColor: '$neutrals400'
3827
+ borderColor: '$neutrals600'
3204
3828
  }
3205
3829
  });
3206
3830
  var Container$3 = /*#__PURE__*/styled('div', {
@@ -3219,7 +3843,7 @@ var StyledIndicator = /*#__PURE__*/styled(Indicator$1, {
3219
3843
  width: '10px',
3220
3844
  height: '10px',
3221
3845
  borderRadius: '50%',
3222
- backgroundColor: '$primary'
3846
+ backgroundColor: '$success'
3223
3847
  }
3224
3848
  });
3225
3849
  var Label$2 = /*#__PURE__*/styled('label', {
@@ -3255,7 +3879,7 @@ function Radio(props) {
3255
3879
 
3256
3880
  var BaseContainer = /*#__PURE__*/styled('div', {
3257
3881
  borderRadius: '$5',
3258
- backgroundColor: '$neutrals200',
3882
+ backgroundColor: '$neutrals300',
3259
3883
  padding: '$16'
3260
3884
  });
3261
3885
  var Title = /*#__PURE__*/styled(Typography, {
@@ -3288,6 +3912,12 @@ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
3288
3912
  var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
3289
3913
  marginTop: '$32'
3290
3914
  });
3915
+ var Head = /*#__PURE__*/styled('div', {
3916
+ display: 'flex',
3917
+ justifyContent: 'space-between',
3918
+ alignItems: 'center',
3919
+ paddingBottom: '$16'
3920
+ });
3291
3921
  function Settings(props) {
3292
3922
  var slippages = props.slippages,
3293
3923
  selectedLiquiditySources = props.selectedLiquiditySources,
@@ -3302,7 +3932,8 @@ function Settings(props) {
3302
3932
  selectedTheme = props.selectedTheme,
3303
3933
  onThemeChange = props.onThemeChange,
3304
3934
  toggleInfiniteApprove = props.toggleInfiniteApprove,
3305
- infiniteApprove = props.infiniteApprove;
3935
+ infiniteApprove = props.infiniteApprove,
3936
+ loadingStatus = props.loadingStatus;
3306
3937
  var _useState = useState(props.selectedSlippage),
3307
3938
  selectedSlippage = _useState[0],
3308
3939
  setSelectedSlippage = _useState[1];
@@ -3310,9 +3941,12 @@ function Settings(props) {
3310
3941
  setSelectedSlippage(slippage);
3311
3942
  onSlippageChange(slippage);
3312
3943
  };
3313
- var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(Title, {
3944
+ var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(Head, null, React__default.createElement(Typography, {
3314
3945
  variant: "body1"
3315
- }, "Slippage tolerance per swap"), React__default.createElement(SlippageChipsContainer, null, slippages.map(function (slippage, index) {
3946
+ }, "Slippage tolerance per swap"), customSlippage ? React__default.createElement(Typography, {
3947
+ variant: "caption",
3948
+ color: "error"
3949
+ }, customSlippage, "% Custom") : undefined), React__default.createElement(SlippageChipsContainer, null, slippages.map(function (slippage, index) {
3316
3950
  return React__default.createElement(Chip, {
3317
3951
  key: index,
3318
3952
  onClick: function onClick() {
@@ -3320,7 +3954,7 @@ function Settings(props) {
3320
3954
  changeSlippage(slippage);
3321
3955
  },
3322
3956
  selected: !customSlippage && slippage === selectedSlippage,
3323
- label: slippage.toString() + " %",
3957
+ label: slippage.toString() + "%",
3324
3958
  style: {
3325
3959
  marginRight: '8px'
3326
3960
  }
@@ -3336,11 +3970,10 @@ function Settings(props) {
3336
3970
  variant: "body2"
3337
3971
  }, "%"),
3338
3972
  size: "small",
3339
- placeholder: "Custom",
3973
+ placeholder: "Custom %",
3340
3974
  style: {
3341
3975
  width: '128px',
3342
- flexGrow: 'initial',
3343
- borderColor: customSlippage ? '$success' : 'initial'
3976
+ flexGrow: 'initial'
3344
3977
  }
3345
3978
  }))), React__default.createElement(ThemesContainer, null, React__default.createElement(Title, {
3346
3979
  variant: "body2"
@@ -3368,13 +4001,21 @@ function Settings(props) {
3368
4001
  }, "Infinite Approval"), React__default.createElement(Switch, {
3369
4002
  checked: infiniteApprove,
3370
4003
  onChange: toggleInfiniteApprove
3371
- })), React__default.createElement(LiquiditySourceContainer, {
3372
- onClick: onLiquiditySourcesClick
4004
+ })), React__default.createElement(LiquiditySourceContainer, null, React__default.createElement(Button, {
4005
+ onClick: onLiquiditySourcesClick,
4006
+ align: "start",
4007
+ variant: "ghost",
4008
+ loading: loadingStatus === 'loading',
4009
+ suffix: React__default.createElement(LiquiditySourceNumber, null, loadingStatus === 'success' && React__default.createElement(Typography, {
4010
+ variant: "body2",
4011
+ color: "neutrals800"
4012
+ }, liquiditySources.length !== selectedLiquiditySources.length ? selectedLiquiditySources.length + " / " + liquiditySources.length : liquiditySources.length), loadingStatus === 'failed' && React__default.createElement(Typography, {
4013
+ variant: "body2",
4014
+ color: "$error500"
4015
+ }, "Loading failed"), React__default.createElement(StyledAngleRight, null))
3373
4016
  }, React__default.createElement(Typography, {
3374
4017
  variant: "body1"
3375
- }, "Liquidity Sources"), React__default.createElement(LiquiditySourceNumber, null, React__default.createElement(Typography, {
3376
- variant: "body2"
3377
- }, "( " + selectedLiquiditySources.length + " / " + liquiditySources.length + " )"), React__default.createElement(StyledAngleRight, null))));
4018
+ }, "Liquidity Sources"))));
3378
4019
  return React__default.createElement(SecondaryPage, {
3379
4020
  title: "Settings",
3380
4021
  textField: false,
@@ -3382,433 +4023,169 @@ function Settings(props) {
3382
4023
  }, PageContent);
3383
4024
  }
3384
4025
 
3385
- var MainContainer$1 = /*#__PURE__*/styled('div', {
4026
+ var MainContainer$2 = /*#__PURE__*/styled('div', {
4027
+ position: 'relative',
4028
+ display: 'flex',
4029
+ flexDirection: 'column',
3386
4030
  borderRadius: '$10',
3387
- maxWidth: '512px',
3388
4031
  boxShadow: '$s',
3389
- minWidth: '375px',
3390
4032
  width: '100%',
3391
- backgroundColor: '$background',
3392
- height: 'fit-content',
3393
- display: 'flex',
3394
- flexDirection: 'column',
3395
- alignItems: 'end',
3396
- padding: '$16 $24',
4033
+ minWidth: '375px',
4034
+ maxWidth: '512px',
4035
+ maxHeight: '595px',
4036
+ padding: '$16',
3397
4037
  boxSizing: 'border-box',
3398
- position: 'relative'
3399
- });
3400
- var ContentContainer$3 = /*#__PURE__*/styled('div', {
3401
- width: '100%'
4038
+ backgroundColor: '$background',
4039
+ variants: {
4040
+ fixedHeight: {
4041
+ "true": {
4042
+ height: '595px'
4043
+ },
4044
+ "false": {
4045
+ height: 'auto'
4046
+ }
4047
+ }
4048
+ }
3402
4049
  });
3403
4050
  function SwapContainer(props) {
3404
4051
  var children = props.children,
3405
- style = props.style;
3406
- return React__default.createElement(MainContainer$1, {
4052
+ style = props.style,
4053
+ _props$fixedHeight = props.fixedHeight,
4054
+ fixedHeight = _props$fixedHeight === void 0 ? true : _props$fixedHeight;
4055
+ return React__default.createElement(MainContainer$2, {
3407
4056
  style: style,
3408
- id: "swap-box"
3409
- }, React__default.createElement(ContentContainer$3, null, children));
4057
+ id: "swap-box",
4058
+ fixedHeight: fixedHeight
4059
+ }, children);
3410
4060
  }
3411
4061
 
3412
- var Container$4 = /*#__PURE__*/styled('div', {
3413
- position: 'relative'
3414
- });
3415
- var ButtonContainer$1 = /*#__PURE__*/styled('div', {
3416
- paddingTop: '$8'
3417
- });
3418
- var SwapContainer$1 = /*#__PURE__*/styled('div', {
4062
+ var TokenContainer = /*#__PURE__*/styled('div', {
3419
4063
  display: 'flex',
3420
- justifyContent: 'space-between',
3421
- '@md': {
3422
- padding: '$12'
3423
- },
3424
- '&:hover': {
3425
- borderColor: '$primary'
3426
- },
3427
- variants: {
3428
- status: {
3429
- failed: {
3430
- borderColor: '$error'
3431
- },
3432
- running: {
3433
- borderColor: '$neutrals400'
3434
- },
3435
- success: {
3436
- borderColor: '$success'
3437
- }
3438
- }
4064
+ alignItems: 'center',
4065
+ '& .amount': {
4066
+ fontWeight: 'bold'
3439
4067
  }
3440
4068
  });
3441
- var Arrow = /*#__PURE__*/styled('div', {
3442
- display: 'flex',
3443
- justifyContent: 'center',
3444
- alignItems: 'center'
3445
- });
3446
- var Line$1 = /*#__PURE__*/styled('div', {
3447
- height: '0',
3448
- width: '$20',
3449
- border: '1px dashed $foreground',
3450
- borderRadius: 'inherit',
3451
- '@md': {
3452
- width: '$36'
4069
+ var TokenImage$1 = /*#__PURE__*/styled('div', {
4070
+ position: 'relative',
4071
+ width: '$24',
4072
+ height: '$24',
4073
+ img: {
4074
+ width: '100%',
4075
+ display: 'block'
3453
4076
  },
3454
- '@lg': {
3455
- width: '$48'
3456
- }
3457
- });
3458
- var Dot$1 = /*#__PURE__*/styled('div', {
3459
- width: '$6',
3460
- height: '$6',
3461
- backgroundColor: '$foreground',
3462
- borderRadius: '50%',
3463
- '@lg': {
3464
- width: '$8',
3465
- height: '$8'
3466
- }
3467
- });
3468
- var ArrowRight$1 = /*#__PURE__*/styled('div', {
3469
- width: '0px',
3470
- height: '0px',
3471
- borderTop: '5px solid transparent',
3472
- borderBottom: '5px solid transparent',
3473
- borderLeft: '5px solid $foreground'
3474
- });
3475
- var StatusContainer = /*#__PURE__*/styled('div', {
3476
- position: 'absolute',
3477
- right: '-8px',
3478
- top: '30%',
3479
- background: '$background',
3480
- borderRadius: '50%',
3481
- display: 'flex',
3482
- justifyContent: 'center',
3483
- '@md': {
3484
- top: '40%',
3485
- right: '-8px'
4077
+ '.overlay': {
4078
+ position: 'absolute',
4079
+ right: -4,
4080
+ bottom: -4,
4081
+ width: '$16',
4082
+ height: '$16',
4083
+ padding: '$2',
4084
+ borderRadius: '50%',
4085
+ backgroundColor: '$background',
4086
+ border: '1px solid $neutrals400'
3486
4087
  }
3487
4088
  });
3488
- function SwapDetail(_ref) {
3489
- var swap = _ref.swap,
3490
- status = _ref.status,
3491
- onClick = _ref.onClick;
3492
- var firstStep = swap.steps[0];
3493
- var lastStep = swap.steps[swap.steps.length - 1];
3494
- return React__default.createElement(Container$4, {
3495
- onClick: onClick.bind(null, swap.requestId)
3496
- }, React__default.createElement(ButtonContainer$1, null, React__default.createElement(Button, {
3497
- variant: "outlined",
3498
- align: "grow",
3499
- size: "large",
3500
- type: status === 'failed' ? 'error' : status === 'success' ? 'success' : undefined
3501
- }, React__default.createElement(SwapContainer$1, null, React__default.createElement(StepDetail, {
3502
- logo: firstStep.fromLogo,
3503
- symbol: firstStep.fromSymbol,
3504
- chainLogo: firstStep.fromBlockchainLogo,
3505
- blockchain: firstStep.fromBlockchain,
3506
- amount: swap.inputAmount
3507
- }), React__default.createElement(Arrow, null, React__default.createElement(Dot$1, null), React__default.createElement(Line$1, null), React__default.createElement(ArrowRight$1, null)), React__default.createElement(StepDetail, {
3508
- logo: lastStep.toLogo,
3509
- symbol: lastStep.toSymbol,
3510
- chainLogo: lastStep.toBlockchainLogo,
3511
- blockchain: lastStep.toBlockchain,
3512
- amount: lastStep.outputAmount
3513
- })))), React__default.createElement(StatusContainer, null, status === 'running' ? React__default.createElement(TryAgainIcon, {
3514
- size: 16
3515
- }) : status === 'failed' ? React__default.createElement(InfoCircleIcon, {
3516
- size: 18,
3517
- color: "error"
3518
- }) : React__default.createElement(CheckCircleIcon, {
3519
- size: 18,
3520
- color: "success"
3521
- })));
3522
- }
3523
-
3524
- function VirtualizedList(props) {
3525
- var itemCount = props.itemCount,
3526
- hasNextPage = props.hasNextPage,
3527
- loadNextPage = props.loadNextPage,
3528
- Item = props.Item,
3529
- innerElementType = props.innerElementType,
3530
- size = props.size;
3531
- var isItemLoaded = function isItemLoaded(index) {
3532
- return !hasNextPage || index < itemCount;
3533
- };
3534
- return React__default.createElement(AutoSizer, null, function (_ref) {
3535
- var width = _ref.width,
3536
- height = _ref.height;
3537
- return React__default.createElement(InfiniteLoader, {
3538
- isItemLoaded: isItemLoaded,
3539
- itemCount: hasNextPage ? itemCount + 1 : itemCount,
3540
- loadMoreItems: loadNextPage,
3541
- threshold: 1
3542
- }, function (_ref2) {
3543
- var onItemsRendered = _ref2.onItemsRendered,
3544
- ref = _ref2.ref;
3545
- return React__default.createElement(VariableSizeList, {
3546
- innerElementType: innerElementType,
3547
- ref: ref,
3548
- itemSize: function itemSize() {
3549
- return size;
3550
- },
3551
- itemCount: itemCount,
3552
- height: height || 0,
3553
- width: width || 0,
3554
- onItemsRendered: onItemsRendered
3555
- }, function (_ref3) {
3556
- var index = _ref3.index,
3557
- style = _ref3.style;
3558
- return isItemLoaded(index) ? React__default.createElement(Item, {
3559
- index: index,
3560
- style: style
3561
- }) : null;
3562
- });
3563
- });
3564
- });
4089
+ function Token(props) {
4090
+ return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage$1, null, React__default.createElement("img", {
4091
+ src: props.data.token.logo,
4092
+ alt: ""
4093
+ }), React__default.createElement("div", {
4094
+ className: "overlay"
4095
+ }, React__default.createElement("img", {
4096
+ src: props.data.blockchain.logo,
4097
+ alt: props.data.blockchain.name
4098
+ }))), React__default.createElement(Spacer, {
4099
+ size: 8
4100
+ }), React__default.createElement("span", {
4101
+ className: "amount"
4102
+ }, props.data.amount), React__default.createElement(Spacer, {
4103
+ size: 4
4104
+ }), props.data.token.symbol);
3565
4105
  }
3566
4106
 
3567
- var TokenImage = /*#__PURE__*/styled('img', {
3568
- width: '$32',
3569
- maxHeight: '$32',
3570
- marginRight: '$16'
3571
- });
3572
- var TokenNameContainer = /*#__PURE__*/styled('div', {
3573
- display: 'flex',
3574
- flexDirection: 'column'
3575
- });
3576
- var TokenAmountContainer = /*#__PURE__*/styled('div', {
4107
+ var Container$4 = /*#__PURE__*/styled('div', {
4108
+ position: 'relative',
3577
4109
  display: 'flex',
3578
- flexDirection: 'column',
3579
- alignItems: 'flex-end'
3580
- });
3581
- function TokenItem(props) {
3582
- var _token$balance;
3583
- var token = props.token,
3584
- style = props.style,
3585
- onClick = props.onClick,
3586
- selected = props.selected;
3587
- return React__default.createElement("div", {
3588
- style: _extends({
3589
- display: 'flex',
3590
- alignItems: 'center',
3591
- width: '100%'
3592
- }, style, {
3593
- height: '48px',
3594
- top: parseFloat(style == null ? void 0 : style.top) + 0 + "px"
3595
- })
3596
- }, React__default.createElement(Button, {
3597
- variant: "outlined",
3598
- size: "large",
3599
- align: "start",
3600
- onClick: onClick.bind(null, token),
3601
- type: selected ? 'primary' : undefined,
3602
- prefix: React__default.createElement(TokenImage, {
3603
- src: token.image
3604
- }),
3605
- suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
3606
- variant: "body2"
3607
- }, token.balance.amount), React__default.createElement(Typography, {
3608
- variant: "caption"
3609
- }, token.balance.usdValue + "$"))
3610
- }, React__default.createElement(TokenNameContainer, null, React__default.createElement(Typography, {
3611
- variant: "body1"
3612
- }, token.symbol), React__default.createElement(Typography, {
3613
- variant: "body2"
3614
- }, token.name))));
3615
- }
3616
-
3617
- var _excluded$E = ["style"];
3618
- var PAGE_SIZE = 20;
3619
- function TokenList(props) {
3620
- var list = props.list,
3621
- searchedText = props.searchedText,
3622
- onChange = props.onChange,
3623
- multiSelect = props.multiSelect,
3624
- selectedList = props.selectedList;
3625
- var _useState = useState(props.selected),
3626
- selected = _useState[0],
3627
- setSelected = _useState[1];
3628
- var changeSelected = function changeSelected(token) {
3629
- setSelected(token);
3630
- onChange(token);
3631
- };
3632
- var isSelected = function isSelected(token) {
3633
- if (multiSelect && selectedList) {
3634
- return selectedList === 'all' || selectedList.map(function (item) {
3635
- return item.symbol + item.address;
3636
- }).indexOf(token.symbol + token.address) > -1;
3637
- }
3638
- return (selected == null ? void 0 : selected.symbol) === token.symbol && (selected == null ? void 0 : selected.address) === token.address;
3639
- };
3640
- var _useState2 = useState(true),
3641
- hasNextPage = _useState2[0],
3642
- setHasNextPage = _useState2[1];
3643
- var _useState3 = useState(list),
3644
- tokens = _useState3[0],
3645
- setTokens = _useState3[1];
3646
- var loadNextPage = function loadNextPage() {
3647
- setTokens(list.slice(0, tokens.length + PAGE_SIZE));
3648
- };
3649
- useEffect(function () {
3650
- setTokens(list.slice(0, PAGE_SIZE));
3651
- }, [searchedText]);
3652
- useEffect(function () {
3653
- setHasNextPage(list.length > tokens.length);
3654
- }, [tokens.length]);
3655
- var innerElementType = forwardRef(function (_ref, ref) {
3656
- var style = _ref.style,
3657
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$E);
3658
- return React__default.createElement("div", Object.assign({
3659
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3660
- ref: ref,
3661
- style: _extends({}, style, {
3662
- height: parseFloat(style == null ? void 0 : style.height) + 8 * 2 + "px"
3663
- })
3664
- }, rest));
3665
- });
3666
- return React__default.createElement("div", {
3667
- style: {
3668
- height: '450px'
3669
- }
3670
- }, React__default.createElement(VirtualizedList, {
3671
- Item: function Item(_ref2) {
3672
- var index = _ref2.index,
3673
- style = _ref2.style;
3674
- return React__default.createElement(TokenItem, {
3675
- token: tokens[index],
3676
- style: style,
3677
- onClick: changeSelected,
3678
- selected: isSelected(tokens[index])
3679
- });
3680
- },
3681
- hasNextPage: hasNextPage,
3682
- itemCount: tokens.length,
3683
- loadNextPage: loadNextPage,
3684
- innerElementType: innerElementType,
3685
- size: 56
3686
- }));
3687
- }
3688
-
3689
- var filterTokens = function filterTokens(list, searchedFor) {
3690
- return list.filter(function (token) {
3691
- return containsText(token.symbol, searchedFor) || containsText(token.address || '', searchedFor) || containsText(token.name || '', searchedFor);
3692
- });
3693
- };
3694
- function TokenSelector(props) {
3695
- var list = props.list,
3696
- type = props.type,
3697
- selected = props.selected,
3698
- onChange = props.onChange,
3699
- hasHeader = props.hasHeader,
3700
- multiSelect = props.multiSelect,
3701
- selectedList = props.selectedList,
3702
- onBack = props.onBack;
3703
- return React__default.createElement(SecondaryPage, {
3704
- textField: true,
3705
- textFieldPlaceholder: "Search Blockchain By Name",
3706
- title: "Select " + type + " Token",
3707
- hasHeader: hasHeader,
3708
- onBack: onBack
3709
- }, function (searchedFor) {
3710
- return React__default.createElement(TokenList, {
3711
- searchedText: searchedFor,
3712
- list: filterTokens(list, searchedFor),
3713
- selected: selected,
3714
- selectedList: selectedList,
3715
- multiSelect: multiSelect,
3716
- onChange: onChange
3717
- });
3718
- });
3719
- }
3720
-
3721
- var TooltipTrigger = /*#__PURE__*/styled(Trigger, {
3722
- border: 0,
3723
- padding: 0,
3724
- backgroundColor: 'transparent'
3725
- });
3726
- var TooltipContent = /*#__PURE__*/styled(Content$1, {
3727
- borderRadius: '$5',
3728
- padding: '$4 $8',
3729
- fontSize: '$14',
3730
- animationDuration: '400ms',
3731
- animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
3732
- willChange: 'transform, opacity',
3733
- variants: {
3734
- color: {
3735
- primary: {
3736
- backgroundColor: '$primary',
3737
- color: '$white'
3738
- },
3739
- error: {
3740
- backgroundColor: '$error',
3741
- color: '$white'
3742
- },
3743
- warning: {
3744
- backgroundColor: '$warning',
3745
- color: '$white'
3746
- },
3747
- success: {
3748
- backgroundColor: '$success',
3749
- color: '$white'
3750
- },
3751
- gray: {
3752
- backgroundColor: '$neutrals300',
3753
- color: '$black'
3754
- },
3755
- black: {
3756
- backgroundColor: '$black',
3757
- color: '$white'
3758
- },
3759
- white: {
3760
- backgroundColor: '$white',
3761
- color: '$black'
3762
- }
3763
- }
3764
- }
3765
- });
3766
- var TooltipArrow = /*#__PURE__*/styled(Arrow$1, {
3767
- variants: {
3768
- color: {
3769
- primary: {
3770
- fill: '$primary'
3771
- },
3772
- error: {
3773
- fill: '$error'
3774
- },
3775
- warning: {
3776
- fill: '$warning'
3777
- },
3778
- success: {
3779
- fill: '$success'
3780
- },
3781
- gray: {
3782
- fill: '$neutrals300'
3783
- },
3784
- black: {
3785
- fill: '$black'
3786
- },
3787
- white: {
3788
- fill: '$white'
3789
- }
3790
- }
4110
+ justifyContent: 'space-between',
4111
+ alignItems: 'center',
4112
+ padding: '$16 0',
4113
+ borderBottom: '1px solid $neutrals300',
4114
+ '& > .info': {
4115
+ display: 'flex',
4116
+ alignItems: 'center'
4117
+ },
4118
+ '.status': {
4119
+ textTransform: 'uppercase',
4120
+ fontWeight: 'bold',
4121
+ fontSize: '$12'
4122
+ },
4123
+ '&.running': {
4124
+ color: '$foreground'
4125
+ },
4126
+ '&.failed,&.success': {
4127
+ color: '$neutrals600'
4128
+ },
4129
+ '&.failed .status': {
4130
+ color: '$error'
4131
+ },
4132
+ '&.success .status': {
4133
+ color: '$success'
3791
4134
  }
3792
4135
  });
3793
- var ChildrenWrapper = /*#__PURE__*/styled('div', {
3794
- display: 'inline-block'
3795
- });
3796
- function Tooltip(_ref) {
3797
- var children = _ref.children,
3798
- content = _ref.content,
3799
- _ref$side = _ref.side,
3800
- side = _ref$side === void 0 ? 'top' : _ref$side,
3801
- _ref$color = _ref.color,
3802
- color = _ref$color === void 0 ? 'gray' : _ref$color;
3803
- return React__default.createElement(Provider, null, React__default.createElement(Root$3, null, React__default.createElement(TooltipTrigger, {
3804
- asChild: true
3805
- }, React__default.createElement(ChildrenWrapper, null, children)), React__default.createElement(Portal, null, React__default.createElement(TooltipContent, {
3806
- color: color,
3807
- side: side,
3808
- sideOffset: 5
3809
- }, content, React__default.createElement(TooltipArrow, {
3810
- color: color
3811
- })))));
4136
+ function SwapDetail(_ref) {
4137
+ var swap = _ref.swap,
4138
+ status = _ref.status,
4139
+ onClick = _ref.onClick;
4140
+ var firstStep = swap.steps[0];
4141
+ var lastStep = swap.steps[swap.steps.length - 1];
4142
+ return React__default.createElement(Button, {
4143
+ variant: "ghost",
4144
+ size: "free",
4145
+ fullWidth: true,
4146
+ onClick: onClick.bind(null, swap.requestId)
4147
+ }, React__default.createElement(Container$4, {
4148
+ className: "" + status
4149
+ }, React__default.createElement("div", {
4150
+ className: "info"
4151
+ }, React__default.createElement(Token, {
4152
+ data: {
4153
+ token: {
4154
+ logo: firstStep.fromLogo,
4155
+ symbol: firstStep.fromSymbol
4156
+ },
4157
+ blockchain: {
4158
+ // @ts-ignore
4159
+ logo: firstStep.fromBlockchainLogo,
4160
+ name: firstStep.fromBlockchain
4161
+ },
4162
+ amount: swap.inputAmount
4163
+ }
4164
+ }), React__default.createElement(Spacer, {
4165
+ size: 12
4166
+ }), React__default.createElement(ArrowRightIcon, {
4167
+ size: 12
4168
+ }), React__default.createElement(Spacer, {
4169
+ size: 12
4170
+ }), React__default.createElement(Token, {
4171
+ data: {
4172
+ token: {
4173
+ logo: lastStep.toLogo,
4174
+ symbol: lastStep.toSymbol
4175
+ },
4176
+ blockchain: {
4177
+ // @ts-ignore
4178
+ logo: lastStep.toBlockchainLogo,
4179
+ name: lastStep.toBlockchain
4180
+ },
4181
+ amount: lastStep.outputAmount || lastStep.expectedOutputAmountHumanReadable || ''
4182
+ }
4183
+ })), React__default.createElement("div", {
4184
+ className: "status"
4185
+ }, status === 'running' ? React__default.createElement(Spinner, {
4186
+ size: 24,
4187
+ color: "primary"
4188
+ }) : status)));
3812
4189
  }
3813
4190
 
3814
4191
  var Container$5 = /*#__PURE__*/styled('div', {
@@ -3982,93 +4359,74 @@ function Drawer(props) {
3982
4359
  })), React__default.createElement(Body, null, content), React__default.createElement(Footer, null, footer))), container));
3983
4360
  }
3984
4361
 
3985
- var MainContainer$2 = /*#__PURE__*/styled('div', {
3986
- overflow: 'hidden'
3987
- });
3988
- var Line$2 = /*#__PURE__*/styled('div', {
3989
- width: '0',
3990
- marginLeft: '$12',
3991
- height: '36px',
3992
- border: '1px dashed $foreground',
3993
- borderRadius: 'inherit'
3994
- });
3995
- var SwapperContainer$1 = /*#__PURE__*/styled('div', {
3996
- display: 'flex',
3997
- alignItems: 'center',
3998
- marginLeft: '6px'
3999
- });
4000
- var Fee = /*#__PURE__*/styled('div', {
4001
- display: 'flex',
4002
- alignItems: 'center'
4003
- });
4004
- var SwapperLogo$1 = /*#__PURE__*/styled('img', {
4005
- width: '$16',
4006
- height: '$16'
4362
+ var MainContainer$3 = /*#__PURE__*/styled('div', {
4363
+ overflowY: 'auto'
4007
4364
  });
4008
- var RelativeContainer$1 = /*#__PURE__*/styled('div', {
4009
- position: 'relative'
4365
+ var Section = /*#__PURE__*/styled('div', {
4366
+ paddingBottom: '$32',
4367
+ marginBottom: '$32',
4368
+ borderBottom: '1px solid $neutrals400'
4010
4369
  });
4011
4370
  var Footer$1 = /*#__PURE__*/styled('div', {
4012
4371
  display: 'flex',
4013
4372
  alignItems: 'center'
4014
4373
  });
4015
- var Dot$2 = /*#__PURE__*/styled('div', {
4016
- width: '$8',
4017
- height: '$8',
4018
- backgroundColor: '$foreground',
4019
- borderRadius: '4px',
4020
- marginLeft: '$8'
4021
- });
4022
- var ArrowDown = /*#__PURE__*/styled('div', {
4023
- width: '0px',
4024
- height: '0px',
4025
- borderLeft: '5px solid transparent',
4026
- borderRight: '5px solid transparent',
4027
- borderTop: '5px solid $foreground',
4028
- marginLeft: '$8'
4029
- });
4030
- var UpdateIcon = /*#__PURE__*/styled(RetryIcon, {
4031
- position: 'absolute',
4032
- right: '0'
4374
+ var AlertContainer = /*#__PURE__*/styled('div', {
4375
+ padding: '$16 0'
4033
4376
  });
4034
- var StyledUpdateIcon = /*#__PURE__*/styled(UpdateIcon, {
4035
- cursor: 'pointer'
4377
+ var ConfirmButton = /*#__PURE__*/styled(Button, {
4378
+ marginTop: '$16'
4036
4379
  });
4037
- var BestRouteContainer$1 = /*#__PURE__*/styled('div', {
4038
- overflow: 'auto'
4380
+ var Container$6 = /*#__PURE__*/styled('div', {
4381
+ paddingBottom: '$24',
4382
+ '.title': {
4383
+ paddingBottom: '$8',
4384
+ display: 'flex',
4385
+ alignItems: 'center'
4386
+ },
4387
+ '.num': {
4388
+ backgroundColor: '$neutrals300',
4389
+ display: 'inline-flex',
4390
+ width: '24px',
4391
+ height: '24px',
4392
+ color: '$neutrals800',
4393
+ borderRadius: '50%',
4394
+ fontSize: '$14',
4395
+ border: '1px solid $neutrals400',
4396
+ justifyContent: 'center',
4397
+ alignItems: 'center'
4398
+ }
4039
4399
  });
4040
4400
  var Alerts = /*#__PURE__*/styled('div', {
4041
4401
  paddingBottom: '$16'
4042
4402
  });
4043
4403
  function ConfirmSwap(props) {
4044
- var _bestRoute$result;
4045
- var bestRoute = props.bestRoute,
4046
- onRefresh = props.onRefresh,
4047
- onBack = props.onBack,
4048
- onConfirm = props.onConfirm,
4404
+ var onBack = props.onBack,
4049
4405
  loading = props.loading,
4406
+ onConfirm = props.onConfirm,
4407
+ requiredWallets = props.requiredWallets,
4408
+ selectableWallets = props.selectableWallets,
4409
+ onChange = props.onChange,
4410
+ confirmDisabled = props.confirmDisabled,
4411
+ isExperimentalChain = props.isExperimentalChain,
4412
+ handleConnectChain = props.handleConnectChain,
4413
+ confirmButtonTitle = props.confirmButtonTitle,
4050
4414
  errors = props.errors,
4051
4415
  warnings = props.warnings,
4052
- extraMessages = props.extraMessages,
4053
- confirmButtonTitle = props.confirmButtonTitle,
4054
- confirmButtonDisabled = props.confirmButtonDisabled;
4416
+ extraMessages = props.extraMessages;
4055
4417
  return React__default.createElement(SecondaryPage, {
4056
4418
  textField: false,
4057
- title: "Swap",
4419
+ title: "Confirm Swap",
4058
4420
  onBack: onBack,
4059
- Footer: React__default.createElement(Footer$1, null, React__default.createElement(Button, {
4060
- type: "primary",
4421
+ Footer: React__default.createElement(Footer$1, null, React__default.createElement(ConfirmButton, {
4061
4422
  fullWidth: true,
4062
4423
  loading: loading,
4424
+ type: "primary",
4063
4425
  variant: "contained",
4064
4426
  onClick: onConfirm,
4065
- disabled: confirmButtonDisabled
4066
- }, confirmButtonTitle)),
4067
- TopButton: React__default.createElement(StyledUpdateIcon, {
4068
- size: 24,
4069
- onClick: onRefresh
4070
- })
4071
- }, React__default.createElement(MainContainer$2, null, React__default.createElement("div", null, extraMessages || null, React__default.createElement(Alerts, null, errors == null ? void 0 : errors.map(function (error, index) {
4427
+ disabled: confirmDisabled
4428
+ }, confirmButtonTitle))
4429
+ }, 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) {
4072
4430
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
4073
4431
  direction: "vertical"
4074
4432
  }), React__default.createElement(Alert, {
@@ -4082,91 +4440,26 @@ function ConfirmSwap(props) {
4082
4440
  type: "warning",
4083
4441
  key: index
4084
4442
  }, warning));
4085
- }))), React__default.createElement(BestRouteContainer$1, null, bestRoute == null ? void 0 : (_bestRoute$result = bestRoute.result) == null ? void 0 : _bestRoute$result.swaps.map(function (swap, index) {
4086
- var _bestRoute$result2;
4087
- return React__default.createElement(Fragment, {
4088
- key: index
4089
- }, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
4090
- logo: swap.from.logo,
4091
- symbol: swap.from.symbol,
4092
- chainLogo: swap.from.blockchainLogo,
4093
- blockchain: swap.from.blockchain,
4094
- amount: swap.fromAmount
4095
- }), React__default.createElement(Dot$2, null)), React__default.createElement(Line$2, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1, {
4096
- src: swap.swapperLogo,
4097
- alt: swap.swapperId
4098
- }), React__default.createElement("div", null, React__default.createElement(Typography, {
4099
- ml: 4,
4100
- variant: "caption"
4101
- }, swap.swapperType, " from ", swap.from.symbol, " to", ' ', swap.to.symbol, " via ", swap.swapperId, ' '), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
4102
- ml: 4,
4103
- variant: "caption"
4104
- }, "$", swap.feeInUsd, " estimated gas fee")))), React__default.createElement(Line$2, null), index + 1 === ((_bestRoute$result2 = bestRoute.result) == null ? void 0 : _bestRoute$result2.swaps.length) && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
4105
- logo: swap.to.logo,
4106
- symbol: swap.to.symbol,
4107
- chainLogo: swap.to.blockchainLogo,
4108
- blockchain: swap.to.blockchain,
4109
- amount: swap.toAmount
4110
- }));
4111
- }))));
4112
- }
4113
-
4114
- var Footer$2 = /*#__PURE__*/styled('div', {
4115
- display: 'flex',
4116
- alignItems: 'center'
4117
- });
4118
- var AlertContainer = /*#__PURE__*/styled('div', {
4119
- padding: '$16 0'
4120
- });
4121
- var ConfirmButton = /*#__PURE__*/styled(Button, {
4122
- marginTop: '$16'
4123
- });
4124
- function ConfirmWallets(props) {
4125
- var _swap$result, _swap$result2, _swap$result3;
4126
- var onBack = props.onBack,
4127
- loading = props.loading,
4128
- onConfirm = props.onConfirm,
4129
- swap = props.swap,
4130
- requiredWallets = props.requiredWallets,
4131
- selectableWallets = props.selectableWallets,
4132
- onChange = props.onChange,
4133
- confirmDisabled = props.confirmDisabled,
4134
- isExperimentalChain = props.isExperimentalChain,
4135
- handleConnectChain = props.handleConnectChain,
4136
- fromAmount = props.fromAmount,
4137
- toAmount = props.toAmount;
4138
- var firstStep = swap == null ? void 0 : (_swap$result = swap.result) == null ? void 0 : _swap$result.swaps[0];
4139
- var lastStep = swap == null ? void 0 : (_swap$result2 = swap.result) == null ? void 0 : _swap$result2.swaps[((_swap$result3 = swap.result) == null ? void 0 : _swap$result3.swaps.length) - 1];
4140
- return React__default.createElement(SecondaryPage, {
4141
- textField: false,
4142
- title: "Confirm Swap",
4143
- onBack: onBack,
4144
- Footer: React__default.createElement(Footer$2, null, React__default.createElement(ConfirmButton, {
4145
- fullWidth: true,
4146
- loading: loading,
4147
- type: "primary",
4148
- variant: "contained",
4149
- onClick: onConfirm,
4150
- disabled: confirmDisabled
4151
- }, "Confirm"))
4152
- }, React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
4153
- variant: "h6",
4154
- mb: 12
4155
- }, "Confirm swap ", fromAmount, " ", firstStep == null ? void 0 : firstStep.from.symbol, " (", firstStep == null ? void 0 : firstStep.from.blockchain, ") to ", toAmount, " ", lastStep == null ? void 0 : lastStep.to.symbol, " (on", lastStep == null ? void 0 : lastStep.to.blockchain, ")"), requiredWallets.map(function (wallet, index) {
4443
+ }))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
4444
+ size: 16,
4445
+ direction: "vertical"
4446
+ }) : null, props.previewRoutes) : null, requiredWallets.map(function (wallet, index) {
4156
4447
  var list = selectableWallets.filter(function (w) {
4157
4448
  return wallet === w.chain;
4158
4449
  });
4159
- return React__default.createElement("div", {
4450
+ return React__default.createElement(Container$6, {
4160
4451
  key: index
4161
- }, React__default.createElement(Typography, {
4162
- variant: "body2",
4163
- mb: 12,
4164
- mt: 12
4165
- }, index + 1, ") Your ", wallet, " Wallet"), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
4166
- type: "error"
4167
- }, React__default.createElement(Typography, {
4452
+ }, React__default.createElement("div", {
4453
+ className: "title"
4454
+ }, React__default.createElement("div", {
4455
+ className: "num"
4456
+ }, index + 1), React__default.createElement(Spacer, {
4457
+ size: 8
4458
+ }), React__default.createElement(Typography, {
4168
4459
  variant: "body2"
4169
- }, "You should connect a " + wallet + " supported wallet"))), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
4460
+ }, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
4461
+ type: "error"
4462
+ }, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
4170
4463
  variant: "contained",
4171
4464
  type: "primary",
4172
4465
  align: "grow",
@@ -4180,31 +4473,13 @@ function ConfirmWallets(props) {
4180
4473
  })));
4181
4474
  }
4182
4475
 
4183
- function groupingOfSwaps(list) {
4184
- return list.reduce(function (acc, swap) {
4185
- var categoryIndex = acc.findIndex(function (item) {
4186
- return swap.status === 'running' && item.title == 'Active Swaps' || swap.status !== 'running' && item.title == 'Recent Swaps';
4187
- });
4188
- if (categoryIndex > -1) {
4189
- acc[categoryIndex].swaps.push(swap);
4190
- } else {
4191
- acc.push({
4192
- title: swap.status === 'running' ? 'Active Swaps' : 'Recent Swaps',
4193
- swaps: [swap]
4194
- });
4195
- }
4196
- return acc;
4197
- }, []);
4198
- }
4199
-
4200
- var BodyError = /*#__PURE__*/styled('div', {
4201
- height: '100%',
4202
- display: 'flex',
4203
- justifyContent: 'center',
4204
- alignItems: 'center'
4476
+ var Group = /*#__PURE__*/styled('div', {
4477
+ '.group-title': {
4478
+ textTransform: 'uppercase'
4479
+ }
4205
4480
  });
4206
- var ErrorMsg$1 = /*#__PURE__*/styled(Typography, {
4207
- color: '$error'
4481
+ var Container$7 = /*#__PURE__*/styled('div', {
4482
+ overflowY: 'auto'
4208
4483
  });
4209
4484
  var filteredHistory = function filteredHistory(list, searchedFor) {
4210
4485
  return list.filter(function (swap) {
@@ -4213,30 +4488,34 @@ var filteredHistory = function filteredHistory(list, searchedFor) {
4213
4488
  return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
4214
4489
  });
4215
4490
  };
4216
- var Group = /*#__PURE__*/styled('div', {
4217
- marginBottom: '$24',
4218
- paddingRight: '$8',
4219
- maxHeight: '600px'
4220
- });
4221
- var GroupTitle = /*#__PURE__*/styled(Typography, {
4222
- color: '$neutrals500'
4223
- });
4224
4491
  var SwapsGroup = function SwapsGroup(props) {
4225
4492
  var list = props.list,
4226
- onSwapClick = props.onSwapClick;
4227
- var swapsInGroup = groupingOfSwaps(list);
4228
- return React__default.createElement(React__default.Fragment, null, swapsInGroup.map(function (group, index) {
4229
- return React__default.createElement(Group, {
4493
+ onSwapClick = props.onSwapClick,
4494
+ groupBy = props.groupBy;
4495
+ var groups = groupBy ? groupBy(list) : [{
4496
+ title: 'History',
4497
+ swaps: list
4498
+ }];
4499
+ return React__default.createElement(React__default.Fragment, null, groups.filter(function (group) {
4500
+ return group.swaps.length > 0;
4501
+ }).map(function (group, index) {
4502
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(Group, {
4230
4503
  key: index
4231
- }, React__default.createElement(GroupTitle, {
4232
- variant: "body2"
4504
+ }, React__default.createElement(Typography, {
4505
+ variant: "body2",
4506
+ color: "neutrals600",
4507
+ className: "group-title"
4233
4508
  }, group.title), group.swaps.map(function (swap, index) {
4234
- return React__default.createElement(SwapDetail, {
4509
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(SwapDetail, {
4235
4510
  key: index,
4236
4511
  swap: swap,
4237
4512
  status: swap.status,
4238
4513
  onClick: onSwapClick
4239
- });
4514
+ }), React__default.createElement(Divider, {
4515
+ size: 12
4516
+ }));
4517
+ })), React__default.createElement(Divider, {
4518
+ size: 24
4240
4519
  }));
4241
4520
  }));
4242
4521
  };
@@ -4244,28 +4523,126 @@ function History(_ref) {
4244
4523
  var _ref$list = _ref.list,
4245
4524
  list = _ref$list === void 0 ? [] : _ref$list,
4246
4525
  onBack = _ref.onBack,
4247
- onSwapClick = _ref.onSwapClick;
4526
+ onSwapClick = _ref.onSwapClick,
4527
+ groupBy = _ref.groupBy;
4248
4528
  return React__default.createElement(SecondaryPage, {
4249
4529
  onBack: onBack,
4250
4530
  textField: true,
4251
- textFieldPlaceholder: "Search By Blockchain Or Token",
4531
+ textFieldPlaceholder: "Search By Blockchain Or Token Or Request ID",
4252
4532
  title: "Swaps"
4253
4533
  }, function (searchedFor) {
4254
4534
  var filterSwaps = filteredHistory(list, searchedFor);
4255
- return filterSwaps.length ? React__default.createElement(SwapsGroup, {
4535
+ return React__default.createElement(Container$7, null, filterSwaps.length ? React__default.createElement(SwapsGroup, {
4256
4536
  list: filterSwaps,
4257
- onSwapClick: onSwapClick
4258
- }) : React__default.createElement(BodyError, null, React__default.createElement(ErrorMsg$1, {
4259
- variant: "caption"
4260
- }, "Not Found"));
4537
+ onSwapClick: onSwapClick,
4538
+ groupBy: groupBy
4539
+ }) : React__default.createElement(NotFoundAlert, {
4540
+ catergory: "Swap"
4541
+ }));
4261
4542
  });
4262
4543
  }
4263
4544
 
4545
+ var getAlertType = function getAlertType(messageType) {
4546
+ if (!messageType || messageType === 'info') return 'secondary';else return messageType;
4547
+ };
4548
+ var DetailedMessage = /*#__PURE__*/styled('div', {
4549
+ width: '90%',
4550
+ overflowWrap: 'break-word',
4551
+ color: '$error500 !important'
4552
+ });
4553
+ var SuccessText = /*#__PURE__*/styled(Typography, {
4554
+ color: '$success500 !important'
4555
+ });
4556
+ var SwapMessages = function SwapMessages(props) {
4557
+ var shortMessage = props.shortMessage,
4558
+ detailedMessage = props.detailedMessage,
4559
+ currentStepBlockchain = props.currentStepBlockchain,
4560
+ type = props.type,
4561
+ lastConvertedTokenInFailedSwap = props.lastConvertedTokenInFailedSwap;
4562
+ var _useState = useState(false),
4563
+ expandedMessage = _useState[0],
4564
+ setExpandedMessage = _useState[1];
4565
+ var allowedNumberOfChars = detailedMessage["long"] ? 0 : 150;
4566
+ var shouldShowMoreDetailsButton = !expandedMessage && detailedMessage.content.length > allowedNumberOfChars;
4567
+ return React__default.createElement(Alert, Object.assign({
4568
+ type: getAlertType(type),
4569
+ title: shortMessage
4570
+ }, shouldShowMoreDetailsButton && {
4571
+ footer: React__default.createElement(Button, {
4572
+ variant: "outlined",
4573
+ type: "primary",
4574
+ onClick: setExpandedMessage.bind(null, function (prevState) {
4575
+ return !prevState;
4576
+ })
4577
+ }, "Show more details")
4578
+ }, !!props.switchNetwork && {
4579
+ footer: React__default.createElement(Button, {
4580
+ variant: 'outlined',
4581
+ type: "primary",
4582
+ onClick: props.switchNetwork
4583
+ }, "Change network to ", currentStepBlockchain)
4584
+ }), !!detailedMessage.content ? React__default.createElement(DetailedMessage, null, React__default.createElement(Typography, {
4585
+ variant: "body2"
4586
+ }, 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, {
4587
+ variant: "body2"
4588
+ }, "Don't worry, your fund is\xA0"), React__default.createElement(SuccessText, {
4589
+ variant: "body2"
4590
+ }, React__default.createElement("b", null, "Safe"))), React__default.createElement("p", null, React__default.createElement(Typography, {
4591
+ variant: "body2"
4592
+ }, "It is converted to \xA0", React__default.createElement("u", null, lastConvertedTokenInFailedSwap.outputAmount), "\xA0"), React__default.createElement(SuccessText, {
4593
+ variant: "body2"
4594
+ }, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.symbol, "\xA0")), React__default.createElement(Typography, {
4595
+ variant: "body2"
4596
+ }, "on your\xA0"), React__default.createElement(SuccessText, {
4597
+ variant: "body2"
4598
+ }, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.blockchain, "\xA0")), React__default.createElement(Typography, {
4599
+ variant: "body2"
4600
+ }, "wallet"))));
4601
+ };
4602
+
4603
+ var _excluded$I = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "date", "onRetry", "previewInputs"];
4604
+ var SwapperContainer$1 = /*#__PURE__*/styled('div', {
4605
+ display: 'flex',
4606
+ alignItems: 'center',
4607
+ marginLeft: '6px'
4608
+ });
4609
+ var Fee = /*#__PURE__*/styled('div', {
4610
+ display: 'flex',
4611
+ alignItems: 'center'
4612
+ });
4613
+ var SwapperLogo$1 = /*#__PURE__*/styled('img', {
4614
+ width: '$16',
4615
+ height: '$16'
4616
+ });
4617
+ var RelativeContainer$1 = /*#__PURE__*/styled('div', {
4618
+ position: 'relative'
4619
+ });
4620
+ var Dot$1 = /*#__PURE__*/styled('div', {
4621
+ width: '$8',
4622
+ height: '$8',
4623
+ backgroundColor: '$foreground',
4624
+ borderRadius: '4px',
4625
+ marginLeft: '$8'
4626
+ });
4627
+ var ArrowDown = /*#__PURE__*/styled('div', {
4628
+ width: '0px',
4629
+ height: '0px',
4630
+ borderLeft: '5px solid transparent',
4631
+ borderRight: '5px solid transparent',
4632
+ borderTop: '5px solid $foreground',
4633
+ marginLeft: '$8'
4634
+ });
4264
4635
  var StyledAnchor = /*#__PURE__*/styled('a', {
4265
4636
  color: '$primary',
4266
4637
  fontWeight: '$600',
4267
4638
  marginLeft: '$12'
4268
4639
  });
4640
+ var SwapInfoContainer = /*#__PURE__*/styled('div', {
4641
+ display: 'flex',
4642
+ flexDirection: 'column',
4643
+ paddingBottom: '$16',
4644
+ borderBottom: '1px solid $neutrals300'
4645
+ });
4269
4646
  var InternalDetailsContainer = /*#__PURE__*/styled('div', {
4270
4647
  display: 'flex'
4271
4648
  });
@@ -4284,30 +4661,51 @@ var Description = /*#__PURE__*/styled(Typography, {
4284
4661
  var Error = /*#__PURE__*/styled(Description, {
4285
4662
  color: '$error'
4286
4663
  });
4287
- var Line$3 = /*#__PURE__*/styled('div', {
4664
+ var Line$1 = /*#__PURE__*/styled('div', {
4288
4665
  width: '0',
4289
4666
  minHeight: '$16',
4290
4667
  marginLeft: '$12',
4291
4668
  border: '1px dashed $foreground',
4292
4669
  borderRadius: 'inherit'
4293
4670
  });
4294
- var RequestIdContainer = /*#__PURE__*/styled('div', {
4295
- cursor: 'pointer',
4296
- backgroundColor: '$neutrals200',
4297
- padding: '$4',
4671
+ var Row$2 = /*#__PURE__*/styled('div', {
4298
4672
  display: 'flex',
4299
- justifyContent: 'center',
4673
+ justifyContent: 'space-between',
4300
4674
  alignItems: 'center',
4301
- borderRadius: '$5',
4302
- marginBottom: '$16'
4675
+ fontSize: '$14',
4676
+ padding: '$8 0',
4677
+ '.name': {
4678
+ color: '$neutrals600'
4679
+ },
4680
+ '.value': {
4681
+ display: 'flex',
4682
+ alignItems: 'center',
4683
+ color: '$neutrals800'
4684
+ },
4685
+ '.status': {
4686
+ fontWeight: 'bold',
4687
+ textTransform: 'uppercase'
4688
+ },
4689
+ '.status.failed': {
4690
+ color: '$error'
4691
+ },
4692
+ '.status.success': {
4693
+ color: '$success'
4694
+ }
4303
4695
  });
4304
- var RequestId = /*#__PURE__*/styled(Typography, {
4305
- color: '$warning500'
4696
+ var RequestId = /*#__PURE__*/styled('div', {
4697
+ width: '150px',
4698
+ whiteSpace: 'nowrap',
4699
+ overflow: 'hidden',
4700
+ textOverflow: 'ellipsis',
4701
+ '@md': {
4702
+ width: 'auto'
4703
+ }
4306
4704
  });
4307
- var CancelButtonContainer = /*#__PURE__*/styled('div', {
4308
- display: 'flex',
4309
- justifyContent: 'center',
4310
- alignItems: 'center'
4705
+ var ExtraDetails = /*#__PURE__*/styled('div', {
4706
+ padding: '$8 0',
4707
+ color: '$neutrals600',
4708
+ fontSize: '$12'
4311
4709
  });
4312
4710
  var StepContainer$1 = /*#__PURE__*/styled('div', {
4313
4711
  variants: {
@@ -4323,43 +4721,57 @@ var StepContainer$1 = /*#__PURE__*/styled('div', {
4323
4721
  }
4324
4722
  }
4325
4723
  });
4724
+ var SwapFlowContainer = /*#__PURE__*/styled('div', {
4725
+ overflowY: 'auto'
4726
+ });
4326
4727
  function SwapHistory(props) {
4327
4728
  var pendingSwap = props.pendingSwap,
4328
4729
  onBack = props.onBack,
4329
4730
  onCopy = props.onCopy,
4330
4731
  isCopied = props.isCopied,
4331
- onCancel = props.onCancel;
4732
+ onCancel = props.onCancel,
4733
+ date = props.date,
4734
+ onRetry = props.onRetry,
4735
+ extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$I);
4332
4736
  var _useState = useState(false),
4333
4737
  showDrawer = _useState[0],
4334
4738
  setShowDrawer = _useState[1];
4335
4739
  return React__default.createElement(SecondaryPage, {
4336
4740
  title: "Swap Details",
4337
4741
  textField: false,
4338
- onBack: onBack
4339
- }, React__default.createElement("div", {
4340
- style: {
4341
- overflow: 'hidden'
4342
- }
4343
- }, React__default.createElement("div", null, React__default.createElement(Typography, {
4344
- variant: "body1"
4345
- }, " request ID :"), React__default.createElement(RequestIdContainer, {
4742
+ onBack: onBack,
4743
+ Footer: React__default.createElement(React__default.Fragment, null, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Button, {
4744
+ variant: "outlined",
4745
+ fullWidth: true,
4746
+ type: "error",
4747
+ onClick: setShowDrawer.bind(null, true)
4748
+ }, "Cancel"), !!onRetry && React__default.createElement(Button, {
4749
+ variant: "contained",
4750
+ fullWidth: true,
4751
+ type: "primary",
4752
+ onClick: onRetry
4753
+ }, "Try again"))
4754
+ }, React__default.createElement("div", null, React__default.createElement(SwapInfoContainer, null, React__default.createElement(Row$2, null, React__default.createElement("div", {
4755
+ className: "name"
4756
+ }, "Request ID:"), React__default.createElement("div", {
4757
+ className: "value requestId",
4346
4758
  onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
4347
- }, React__default.createElement(RequestId, {
4348
- variant: "body1"
4349
- }, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
4350
- size: 12
4351
- }), isCopied ? React__default.createElement(CheckSquareIcon, {
4352
- color: "success",
4353
- size: 18
4354
- }) : React__default.createElement(CopyIcon, {
4355
- color: "warning",
4356
- size: 18
4357
- }))), React__default.createElement("div", {
4358
- style: {
4359
- overflow: 'auto',
4360
- position: 'relative'
4361
- }
4362
- }, pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
4759
+ }, React__default.createElement(RequestId, null, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
4760
+ size: 4
4761
+ }), React__default.createElement(Button, {
4762
+ type: "primary",
4763
+ variant: "ghost",
4764
+ size: "compact"
4765
+ }, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement(Row$2, null, React__default.createElement("div", {
4766
+ className: "name"
4767
+ }, "Status:"), React__default.createElement("div", {
4768
+ className: "value status " + ((pendingSwap == null ? void 0 : pendingSwap.status) || '')
4769
+ }, pendingSwap == null ? void 0 : pendingSwap.status, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Spinner, {
4770
+ size: 16,
4771
+ color: "primary"
4772
+ }))), React__default.createElement(ExtraDetails, null, date))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
4773
+ size: 32
4774
+ }), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
4363
4775
  return React__default.createElement(StepContainer$1, {
4364
4776
  key: index,
4365
4777
  hasNotStarted: step.status === 'created',
@@ -4367,23 +4779,31 @@ function SwapHistory(props) {
4367
4779
  }, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
4368
4780
  logo: step.fromLogo,
4369
4781
  symbol: step.fromSymbol,
4782
+ // @ts-ignore
4370
4783
  chainLogo: step.fromBlockchainLogo,
4371
4784
  blockchain: step.fromBlockchain,
4372
4785
  amount: pendingSwap.inputAmount
4373
- }), React__default.createElement(Dot$2, null)), React__default.createElement(Line$3, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1, {
4786
+ }), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1
4787
+ // @ts-ignore
4788
+ , {
4789
+ // @ts-ignore
4374
4790
  src: step.swapperLogo,
4375
4791
  alt: step.swapperId
4376
4792
  }), React__default.createElement("div", null, React__default.createElement(Typography, {
4377
4793
  ml: 4,
4378
4794
  variant: "caption"
4379
- }, step.swapperType, " from ", step.fromSymbol, " to ", step.toSymbol, "via ", step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
4795
+ },
4796
+ // @ts-ignore
4797
+ step.swapperType, ' ', "from ", step.fromSymbol, " to ", step.toSymbol, "via ", step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
4380
4798
  ml: 4,
4381
4799
  variant: "caption"
4382
- }, "$", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
4800
+ }, "$",
4801
+ // @ts-ignore
4802
+ step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
4383
4803
  style: {
4384
4804
  display: 'flex'
4385
4805
  }
4386
- }, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$3, null), !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
4806
+ }, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
4387
4807
  return React__default.createElement(InternalDetail, {
4388
4808
  key: index
4389
4809
  }, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
@@ -4403,28 +4823,25 @@ function SwapHistory(props) {
4403
4823
  }, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
4404
4824
  logo: step.toLogo,
4405
4825
  symbol: step.toSymbol,
4826
+ // @ts-ignore
4406
4827
  chainLogo: step.toBlockchainLogo,
4407
4828
  blockchain: step.toBlockchain,
4408
- amount: step.outputAmount
4829
+ amount: step.outputAmount || ''
4409
4830
  }));
4410
- }), (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(CancelButtonContainer, null, React__default.createElement(Button, {
4411
- variant: "contained",
4412
- type: "error",
4413
- onClick: setShowDrawer.bind(null, true)
4414
- }, "Cancel")))), React__default.createElement(Drawer, {
4831
+ }), React__default.createElement(Divider, {
4832
+ size: 32
4833
+ })), React__default.createElement(Drawer, {
4415
4834
  onClose: setShowDrawer.bind(null, false),
4416
4835
  open: showDrawer,
4417
4836
  showClose: true,
4418
4837
  anchor: "bottom",
4419
4838
  title: "Cancel Progress",
4420
- content: React__default.createElement(React__default.Fragment, null, React__default.createElement(Alert, {
4839
+ content: React__default.createElement(Alert, {
4421
4840
  type: "warning"
4422
- }, React__default.createElement(Typography, {
4423
- variant: "body2"
4424
- }, React__default.createElement("p", null, "Warning: Rango ", React__default.createElement("u", null, "neither reverts"), " your transaction", React__default.createElement("u", null, "nor refunds"), " you if you've already signed and sent a transaction to the blockchain since it's out of Rango's control. Beware that \"Cancel\" only stops next steps from being executed."), React__default.createElement(Spacer, {
4841
+ }, React__default.createElement("p", null, "Warning: Rango ", React__default.createElement("u", null, "neither reverts"), " your transaction\xA0", React__default.createElement("u", null, "nor refunds"), " you if you've already signed and sent a transaction to the blockchain since it's out of Rango's control. Beware that \"Cancel\" only stops next steps from being executed."), React__default.createElement(Spacer, {
4425
4842
  size: 12,
4426
4843
  direction: "vertical"
4427
- }), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")))),
4844
+ }), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")),
4428
4845
  footer: React__default.createElement("div", {
4429
4846
  style: {
4430
4847
  display: 'flex',
@@ -4449,5 +4866,5 @@ function SwapHistory(props) {
4449
4866
  }));
4450
4867
  }
4451
4868
 
4452
- export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConfirmWallets, ConnectWalletsModal, CopyIcon, DeleteCircleIcon, DeleteWalletIcon, DownloadIcon, Drawer, FilledCircle, GasIcon, History, HistoryIcon, HorizontalSwapIcon, InfoCircleIcon, LiquiditySourcesSelector, MinusCircleIcon, Modal, Radio, RetryIcon, RetryLeftIcon, RetryRightIcon, SearchIcon, SearchMinusIcon, SecondaryPage, SelectableWalletList, Settings, SettingsIcon, SignatureIcon, Spacer, Spinner, StepDetail, SwapContainer, SwapDetail, SwapHistory, SwapWalletIcon, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
4869
+ 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, InfoCircleIcon, LiquiditySourcesSelector, LoadingFailedAlert, MinusCircleIcon, Modal, Radio, RetryIcon, RetryLeftIcon, RetryRightIcon, SearchIcon, SearchMinusIcon, SecondaryPage, SelectableWalletList, Settings, SettingsIcon, SignatureIcon, Spacer, Spinner, StepDetail, SwapContainer, SwapDetail, SwapHistory, SwapWalletIcon, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
4453
4870
  //# sourceMappingURL=ui.esm.js.map