@rango-dev/ui 0.1.10-next.90 → 0.1.10-next.92

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 (47) hide show
  1. package/dist/components/Alert/Alert.d.ts +3 -2
  2. package/dist/components/Button/Button.d.ts +3 -3
  3. package/dist/components/Icon/ChevronRightIcon.d.ts +3 -0
  4. package/dist/components/Icon/DisconnectIcon.d.ts +3 -0
  5. package/dist/components/Icon/index.d.ts +2 -0
  6. package/dist/components/Icon/types.d.ts +1 -1
  7. package/dist/components/Spacer/Spacer.d.ts +1 -1
  8. package/dist/components/TextField/TextField.stories.d.ts +1 -1
  9. package/dist/components/Typography/Typography.d.ts +3 -2
  10. package/dist/containers/ConfirmWallets/ConfirmWallets.d.ts +3 -5
  11. package/dist/ui.cjs.development.js +643 -445
  12. package/dist/ui.cjs.development.js.map +1 -1
  13. package/dist/ui.cjs.production.min.js +1 -1
  14. package/dist/ui.cjs.production.min.js.map +1 -1
  15. package/dist/ui.esm.js +644 -448
  16. package/dist/ui.esm.js.map +1 -1
  17. package/package.json +2 -2
  18. package/src/components/Alert/Alert.tsx +40 -37
  19. package/src/components/BestRoute/BestRoute.tsx +28 -19
  20. package/src/components/BlockchainSelector/BlockchainSelector.tsx +1 -3
  21. package/src/components/Button/Button.stories.tsx +1 -1
  22. package/src/components/Button/Button.tsx +35 -23
  23. package/src/components/Chip/Chip.tsx +7 -4
  24. package/src/components/Icon/ChevronRightIcon.tsx +29 -0
  25. package/src/components/Icon/DisconnectIcon.tsx +31 -0
  26. package/src/components/Icon/HistoryIcon.tsx +12 -18
  27. package/src/components/Icon/RetryIcon.tsx +13 -13
  28. package/src/components/Icon/SettingIcon.tsx +6 -14
  29. package/src/components/Icon/index.ts +2 -0
  30. package/src/components/Icon/types.tsx +1 -1
  31. package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +34 -10
  32. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +1 -1
  33. package/src/components/Radio/Radio.tsx +5 -4
  34. package/src/components/SelectableWalletList/SelectableWalletList.tsx +0 -1
  35. package/src/components/Settings/Settings.tsx +22 -6
  36. package/src/components/Spacer/Spacer.tsx +31 -1
  37. package/src/components/StepDetail/StepDetail.tsx +18 -7
  38. package/src/components/SwapContainer/SwapContainer.tsx +1 -1
  39. package/src/components/Switch/Switch.tsx +7 -5
  40. package/src/components/TextField/TextField.tsx +2 -1
  41. package/src/components/Typography/Typography.stories.tsx +4 -0
  42. package/src/components/Typography/Typography.tsx +20 -9
  43. package/src/components/Wallet/State.tsx +2 -3
  44. package/src/components/Wallet/Wallet.tsx +32 -5
  45. package/src/containers/ConfirmSwap/ConfirmSwap.tsx +0 -2
  46. package/src/containers/ConfirmWallets/ConfirmWallets.tsx +76 -51
  47. package/src/theme.ts +4 -2
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';
2
+ import { Provider, Root, Portal, Trigger, Content as Content$1, Arrow as Arrow$1 } from '@radix-ui/react-tooltip';
3
+ import { Indicator, Root as Root$1 } from '@radix-ui/react-checkbox';
3
4
  import { createPortal } from 'react-dom';
4
5
  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';
6
+ import { Root as Root$2, Thumb } from '@radix-ui/react-switch';
7
+ import { Root as Root$3, Item, Indicator as Indicator$1 } from '@radix-ui/react-radio-group';
7
8
  import { VariableSizeList } from 'react-window';
8
9
  import InfiniteLoader from 'react-window-infinite-loader';
9
10
  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';
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,41 @@ 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"];
830
867
  var RetryRightIcon = function RetryRightIcon(_ref) {
831
868
  var _ref$size = _ref.size,
832
869
  size = _ref$size === void 0 ? 16 : _ref$size,
833
870
  color = _ref.color,
834
- props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
871
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
835
872
  return createElement(SvgWithStrokeColor, Object.assign({
836
873
  width: size,
837
874
  height: size,
@@ -851,12 +888,12 @@ RetryRightIcon.toString = function () {
851
888
  return '._icon';
852
889
  };
853
890
 
854
- var _excluded$m = ["size", "color"];
891
+ var _excluded$n = ["size", "color"];
855
892
  var RetryLeftIcon = function RetryLeftIcon(_ref) {
856
893
  var _ref$size = _ref.size,
857
894
  size = _ref$size === void 0 ? 16 : _ref$size,
858
895
  color = _ref.color,
859
- props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
896
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
860
897
  return createElement(SvgWithStrokeColor, Object.assign({
861
898
  width: size,
862
899
  height: size,
@@ -876,12 +913,12 @@ RetryLeftIcon.toString = function () {
876
913
  return '._icon';
877
914
  };
878
915
 
879
- var _excluded$n = ["size", "color"];
916
+ var _excluded$o = ["size", "color"];
880
917
  var TryAgainIcon = function TryAgainIcon(_ref) {
881
918
  var _ref$size = _ref.size,
882
919
  size = _ref$size === void 0 ? 16 : _ref$size,
883
920
  color = _ref.color,
884
- props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
921
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
885
922
  return createElement(SvgWithStrokeColor, Object.assign({
886
923
  width: size,
887
924
  height: size,
@@ -901,12 +938,12 @@ TryAgainIcon.toString = function () {
901
938
  return '._icon';
902
939
  };
903
940
 
904
- var _excluded$o = ["size", "color"];
941
+ var _excluded$p = ["size", "color"];
905
942
  var VerticalSwapIcon = function VerticalSwapIcon(_ref) {
906
943
  var _ref$size = _ref.size,
907
944
  size = _ref$size === void 0 ? 16 : _ref$size,
908
945
  color = _ref.color,
909
- props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
946
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
910
947
  return createElement(SvgWithStrokeColor, Object.assign({
911
948
  width: size,
912
949
  height: size,
@@ -932,12 +969,12 @@ VerticalSwapIcon.toString = function () {
932
969
  return '._icon';
933
970
  };
934
971
 
935
- var _excluded$p = ["size", "color"];
972
+ var _excluded$q = ["size", "color"];
936
973
  var HorizontalSwapIcon = function HorizontalSwapIcon(_ref) {
937
974
  var _ref$size = _ref.size,
938
975
  size = _ref$size === void 0 ? 16 : _ref$size,
939
976
  color = _ref.color,
940
- props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
977
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
941
978
  return createElement(SvgWithStrokeColor, Object.assign({
942
979
  width: size,
943
980
  height: size,
@@ -963,39 +1000,43 @@ HorizontalSwapIcon.toString = function () {
963
1000
  return '._icon';
964
1001
  };
965
1002
 
966
- var _excluded$q = ["color", "size"];
1003
+ var _excluded$r = ["color", "size"];
967
1004
  var RetryIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
968
- var color = _ref.color,
1005
+ var _ref$color = _ref.color,
1006
+ color = _ref$color === void 0 ? 'black' : _ref$color,
969
1007
  _ref$size = _ref.size,
970
1008
  size = _ref$size === void 0 ? 16 : _ref$size,
971
- props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
972
- return createElement(SvgWithFillColor, Object.assign({
1009
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
1010
+ return createElement(SvgWithStrokeColor, Object.assign({
1011
+ xmlns: "http://www.w3.org/2000/svg",
973
1012
  width: size,
974
1013
  height: size,
975
- fill: "none",
976
- xmlns: "http://www.w3.org/2000/svg",
977
- viewBox: "0 0 24 24",
978
1014
  color: color,
1015
+ viewBox: "0 0 24 24",
1016
+ fill: "none",
1017
+ stroke: "currentColor",
1018
+ "stroke-width": "2",
1019
+ "stroke-linecap": "round",
1020
+ "stroke-linejoin": "round",
979
1021
  className: "_icon"
980
1022
  }, props, {
981
1023
  ref: forwardedRef
1024
+ }), createElement("polyline", {
1025
+ points: "23 4 23 10 17 10"
982
1026
  }), 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
1027
+ d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10"
987
1028
  }));
988
1029
  });
989
1030
  RetryIcon.toString = function () {
990
1031
  return '._icon';
991
1032
  };
992
1033
 
993
- var _excluded$r = ["size", "color"];
1034
+ var _excluded$s = ["size", "color"];
994
1035
  var WalletIcon = function WalletIcon(_ref) {
995
1036
  var _ref$size = _ref.size,
996
1037
  size = _ref$size === void 0 ? 16 : _ref$size,
997
1038
  color = _ref.color,
998
- props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
1039
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
999
1040
  return createElement(SvgWithFillColor, Object.assign({
1000
1041
  width: size,
1001
1042
  height: size,
@@ -1022,12 +1063,12 @@ WalletIcon.toString = function () {
1022
1063
  return '._icon';
1023
1064
  };
1024
1065
 
1025
- var _excluded$s = ["size", "color"];
1066
+ var _excluded$t = ["size", "color"];
1026
1067
  var AddWalletIcon = function AddWalletIcon(_ref) {
1027
1068
  var _ref$size = _ref.size,
1028
1069
  size = _ref$size === void 0 ? 16 : _ref$size,
1029
1070
  color = _ref.color,
1030
- props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
1071
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
1031
1072
  return createElement(SvgWithFillColor, Object.assign({
1032
1073
  width: size,
1033
1074
  height: size,
@@ -1062,12 +1103,12 @@ AddWalletIcon.toString = function () {
1062
1103
  return '._icon';
1063
1104
  };
1064
1105
 
1065
- var _excluded$t = ["size", "color"];
1106
+ var _excluded$u = ["size", "color"];
1066
1107
  var DeleteWalletIcon = function DeleteWalletIcon(_ref) {
1067
1108
  var _ref$size = _ref.size,
1068
1109
  size = _ref$size === void 0 ? 16 : _ref$size,
1069
1110
  color = _ref.color,
1070
- props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
1111
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
1071
1112
  return createElement(SvgWithFillColor, Object.assign({
1072
1113
  width: size,
1073
1114
  height: size,
@@ -1102,12 +1143,12 @@ DeleteWalletIcon.toString = function () {
1102
1143
  return '._icon';
1103
1144
  };
1104
1145
 
1105
- var _excluded$u = ["size", "color"];
1146
+ var _excluded$v = ["size", "color"];
1106
1147
  var CheckWalletIcon = function CheckWalletIcon(_ref) {
1107
1148
  var _ref$size = _ref.size,
1108
1149
  size = _ref$size === void 0 ? 16 : _ref$size,
1109
1150
  color = _ref.color,
1110
- props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
1151
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
1111
1152
  return createElement(SvgWithFillColor, Object.assign({
1112
1153
  width: size,
1113
1154
  height: size,
@@ -1138,12 +1179,12 @@ CheckWalletIcon.toString = function () {
1138
1179
  return '._icon';
1139
1180
  };
1140
1181
 
1141
- var _excluded$v = ["size", "color"];
1182
+ var _excluded$w = ["size", "color"];
1142
1183
  var SwapWalletIcon = function SwapWalletIcon(_ref) {
1143
1184
  var _ref$size = _ref.size,
1144
1185
  size = _ref$size === void 0 ? 16 : _ref$size,
1145
1186
  color = _ref.color,
1146
- props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
1187
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
1147
1188
  return createElement(SvgWithFillColor, Object.assign({
1148
1189
  width: size,
1149
1190
  height: size,
@@ -1178,12 +1219,48 @@ SwapWalletIcon.toString = function () {
1178
1219
  return '._icon';
1179
1220
  };
1180
1221
 
1181
- var _excluded$w = ["size", "color"];
1222
+ var _excluded$x = ["color", "size"];
1223
+ var DisconnectIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
1224
+ var _ref$color = _ref.color,
1225
+ color = _ref$color === void 0 ? 'black' : _ref$color,
1226
+ _ref$size = _ref.size,
1227
+ size = _ref$size === void 0 ? 16 : _ref$size,
1228
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
1229
+ return createElement(SvgWithStrokeColor, Object.assign({
1230
+ xmlns: "http://www.w3.org/2000/svg",
1231
+ width: size,
1232
+ height: size,
1233
+ color: color,
1234
+ viewBox: "0 0 24 24",
1235
+ fill: "none",
1236
+ stroke: "currentColor",
1237
+ "stroke-width": "2",
1238
+ "stroke-linecap": "round",
1239
+ "stroke-linejoin": "round",
1240
+ className: "_icon"
1241
+ }, props, {
1242
+ ref: forwardedRef
1243
+ }), createElement("path", {
1244
+ d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"
1245
+ }), createElement("polyline", {
1246
+ points: "16 17 21 12 16 7"
1247
+ }), createElement("line", {
1248
+ x1: "21",
1249
+ y1: "12",
1250
+ x2: "9",
1251
+ y2: "12"
1252
+ }));
1253
+ });
1254
+ DisconnectIcon.toString = function () {
1255
+ return '._icon';
1256
+ };
1257
+
1258
+ var _excluded$y = ["size", "color"];
1182
1259
  var BagIcon = function BagIcon(_ref) {
1183
1260
  var _ref$size = _ref.size,
1184
1261
  size = _ref$size === void 0 ? 16 : _ref$size,
1185
1262
  color = _ref.color,
1186
- props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
1263
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
1187
1264
  return createElement(SvgWithStrokeColor, Object.assign({
1188
1265
  width: size,
1189
1266
  height: size,
@@ -1213,11 +1290,11 @@ BagIcon.toString = function () {
1213
1290
  return '._icon';
1214
1291
  };
1215
1292
 
1216
- var _excluded$x = ["size"];
1293
+ var _excluded$z = ["size"];
1217
1294
  var TimeIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
1218
1295
  var _ref$size = _ref.size,
1219
1296
  size = _ref$size === void 0 ? 16 : _ref$size,
1220
- props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
1297
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
1221
1298
  return createElement(SvgWithStrokeColor, Object.assign({
1222
1299
  width: size,
1223
1300
  height: size,
@@ -1250,12 +1327,12 @@ CloseIcon.toString = function () {
1250
1327
  return '._icon';
1251
1328
  };
1252
1329
 
1253
- var _excluded$y = ["size", "color"];
1330
+ var _excluded$A = ["size", "color"];
1254
1331
  var SignatureIcon = function SignatureIcon(_ref) {
1255
1332
  var _ref$size = _ref.size,
1256
1333
  size = _ref$size === void 0 ? 16 : _ref$size,
1257
1334
  color = _ref.color,
1258
- props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
1335
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
1259
1336
  return createElement(SvgWithFillColor, Object.assign({
1260
1337
  width: size,
1261
1338
  height: size,
@@ -1276,12 +1353,12 @@ SignatureIcon.toString = function () {
1276
1353
  return '._icon';
1277
1354
  };
1278
1355
 
1279
- var _excluded$z = ["size", "color"];
1356
+ var _excluded$B = ["size", "color"];
1280
1357
  var CopyIcon = function CopyIcon(_ref) {
1281
1358
  var _ref$size = _ref.size,
1282
1359
  size = _ref$size === void 0 ? 16 : _ref$size,
1283
1360
  color = _ref.color,
1284
- props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
1361
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
1285
1362
  return createElement(SvgWithFillColor, Object.assign({
1286
1363
  width: size,
1287
1364
  height: size,
@@ -1307,10 +1384,9 @@ CopyIcon.toString = function () {
1307
1384
  return '._icon';
1308
1385
  };
1309
1386
 
1310
- var _excluded$A = ["children", "className"];
1387
+ var _excluded$C = ["children", "className", "color"];
1311
1388
  var TypographyContainer = /*#__PURE__*/styled('span', {
1312
1389
  margin: 0,
1313
- color: '$foreground',
1314
1390
  display: 'inline-block',
1315
1391
  variants: {
1316
1392
  variant: {
@@ -1356,13 +1432,7 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1356
1432
  },
1357
1433
  h5: {
1358
1434
  fontSize: '$16',
1359
- fontWeight: '$600',
1360
- '@md': {
1361
- fontSize: '$18'
1362
- },
1363
- '@lg': {
1364
- fontSize: '$20'
1365
- }
1435
+ fontWeight: '$600'
1366
1436
  },
1367
1437
  h6: {
1368
1438
  fontSize: '$14',
@@ -1391,6 +1461,10 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1391
1461
  fontSize: '$16'
1392
1462
  }
1393
1463
  },
1464
+ body3: {
1465
+ fontSize: '$12',
1466
+ fontWeight: '$400'
1467
+ },
1394
1468
  caption: {
1395
1469
  fontSize: '$10',
1396
1470
  fontWeight: '$400',
@@ -1476,9 +1550,16 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1476
1550
  function Typography(_ref) {
1477
1551
  var children = _ref.children,
1478
1552
  className = _ref.className,
1479
- props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
1553
+ color = _ref.color,
1554
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
1555
+ var customCss = color ? {
1556
+ color: color.startsWith('$') ? color : "$" + color
1557
+ } : {
1558
+ color: '$foreground'
1559
+ };
1480
1560
  return React__default.createElement(TypographyContainer, Object.assign({
1481
- className: "_typography _text " + className
1561
+ className: "_typography _text " + (className || ''),
1562
+ css: customCss
1482
1563
  }, props), children);
1483
1564
  }
1484
1565
  Typography.toString = function () {
@@ -1503,12 +1584,20 @@ var Logo = /*#__PURE__*/styled('img', {
1503
1584
  height: '$28',
1504
1585
  borderRadius: '50%'
1505
1586
  });
1506
- var ChainLogo = /*#__PURE__*/styled('img', {
1587
+ var ChainLogo = /*#__PURE__*/styled('div', {
1507
1588
  position: 'absolute',
1508
- bottom: 0,
1509
- width: '$12',
1510
- height: '$12',
1511
- right: 0
1589
+ right: -4,
1590
+ bottom: -4,
1591
+ width: '$16',
1592
+ height: '$16',
1593
+ padding: '$2',
1594
+ borderRadius: '50%',
1595
+ backgroundColor: '$background',
1596
+ border: '1px solid $neutrals400',
1597
+ img: {
1598
+ width: '100%',
1599
+ display: 'block'
1600
+ }
1512
1601
  });
1513
1602
  var StepContainer = /*#__PURE__*/styled('div', {
1514
1603
  display: 'flex',
@@ -1558,17 +1647,18 @@ function StepDetail(_ref) {
1558
1647
  }, React__default.createElement(Logo, {
1559
1648
  src: logo,
1560
1649
  alt: symbol
1561
- }), React__default.createElement(ChainLogo, {
1650
+ }), React__default.createElement(ChainLogo, null, React__default.createElement("img", {
1562
1651
  src: chainLogo,
1563
1652
  alt: blockchain
1564
- })), React__default.createElement(Detail, {
1653
+ }))), React__default.createElement(Detail, {
1565
1654
  pl: direction === 'horizontal'
1566
1655
  }, React__default.createElement(Typography, {
1567
1656
  noWrap: true,
1568
1657
  variant: direction === 'vertical' ? 'body2' : 'h6'
1569
1658
  }, amount ? parseFloat(amount).toFixed(2) : '?', " ", symbol), React__default.createElement(SubTitle, {
1570
1659
  noWrap: true,
1571
- variant: "caption"
1660
+ variant: "caption",
1661
+ color: "neutrals800"
1572
1662
  }, "on ", blockchain)));
1573
1663
  }
1574
1664
 
@@ -1697,6 +1787,99 @@ function Spinner(_ref) {
1697
1787
  });
1698
1788
  }
1699
1789
 
1790
+ var TooltipTrigger = /*#__PURE__*/styled(Trigger, {
1791
+ border: 0,
1792
+ padding: 0,
1793
+ backgroundColor: 'transparent'
1794
+ });
1795
+ var TooltipContent = /*#__PURE__*/styled(Content$1, {
1796
+ borderRadius: '$5',
1797
+ padding: '$4 $8',
1798
+ fontSize: '$14',
1799
+ animationDuration: '400ms',
1800
+ animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
1801
+ willChange: 'transform, opacity',
1802
+ variants: {
1803
+ color: {
1804
+ primary: {
1805
+ backgroundColor: '$primary',
1806
+ color: '$white'
1807
+ },
1808
+ error: {
1809
+ backgroundColor: '$error',
1810
+ color: '$white'
1811
+ },
1812
+ warning: {
1813
+ backgroundColor: '$warning',
1814
+ color: '$white'
1815
+ },
1816
+ success: {
1817
+ backgroundColor: '$success',
1818
+ color: '$white'
1819
+ },
1820
+ gray: {
1821
+ backgroundColor: '$neutrals300',
1822
+ color: '$black'
1823
+ },
1824
+ black: {
1825
+ backgroundColor: '$black',
1826
+ color: '$white'
1827
+ },
1828
+ white: {
1829
+ backgroundColor: '$white',
1830
+ color: '$black'
1831
+ }
1832
+ }
1833
+ }
1834
+ });
1835
+ var TooltipArrow = /*#__PURE__*/styled(Arrow$1, {
1836
+ variants: {
1837
+ color: {
1838
+ primary: {
1839
+ fill: '$primary'
1840
+ },
1841
+ error: {
1842
+ fill: '$error'
1843
+ },
1844
+ warning: {
1845
+ fill: '$warning'
1846
+ },
1847
+ success: {
1848
+ fill: '$success'
1849
+ },
1850
+ gray: {
1851
+ fill: '$neutrals300'
1852
+ },
1853
+ black: {
1854
+ fill: '$black'
1855
+ },
1856
+ white: {
1857
+ fill: '$white'
1858
+ }
1859
+ }
1860
+ }
1861
+ });
1862
+ var ChildrenWrapper = /*#__PURE__*/styled('div', {
1863
+ display: 'inline-block'
1864
+ });
1865
+ function Tooltip(_ref) {
1866
+ var children = _ref.children,
1867
+ content = _ref.content,
1868
+ _ref$side = _ref.side,
1869
+ side = _ref$side === void 0 ? 'top' : _ref$side,
1870
+ _ref$color = _ref.color,
1871
+ color = _ref$color === void 0 ? 'gray' : _ref$color;
1872
+ return React__default.createElement(Provider, null, React__default.createElement(Root, null, React__default.createElement(TooltipTrigger, {
1873
+ asChild: true
1874
+ }, React__default.createElement(ChildrenWrapper, null, children)), React__default.createElement(Portal, null, React__default.createElement(TooltipContent, {
1875
+ color: color,
1876
+ side: side,
1877
+ sideOffset: 5
1878
+ }, content, React__default.createElement(TooltipArrow, {
1879
+ color: color
1880
+ })))));
1881
+ }
1882
+
1700
1883
  var Container = /*#__PURE__*/styled('div', {
1701
1884
  borderRadius: '$5',
1702
1885
  border: '1px solid $neutrals300',
@@ -1731,7 +1914,7 @@ var Line = /*#__PURE__*/styled('div', {
1731
1914
  });
1732
1915
  var HR = /*#__PURE__*/styled('hr', {
1733
1916
  width: '100%',
1734
- background: '$neutrals200',
1917
+ border: '1px solid $neutrals400',
1735
1918
  margin: '$8 0'
1736
1919
  });
1737
1920
  var SwapperLogo = /*#__PURE__*/styled('img', {
@@ -1789,7 +1972,7 @@ var GasContainer = /*#__PURE__*/styled('div', {
1789
1972
  margin: '$8'
1790
1973
  }
1791
1974
  });
1792
- var FeeContainer = /*#__PURE__*/styled('div', {
1975
+ var CostContainer = /*#__PURE__*/styled('div', {
1793
1976
  display: 'flex',
1794
1977
  flexDirection: 'column',
1795
1978
  alignItems: 'center',
@@ -1832,7 +2015,9 @@ function BestRoute(props) {
1832
2015
  return React__default.createElement(Container, null, loading ? React__default.createElement(SkeletonContainer$1, null, React__default.createElement(Skeleton, {
1833
2016
  width: 48,
1834
2017
  height: 94
1835
- })) : React__default.createElement(GasContainer, null, React__default.createElement(FeeContainer, {
2018
+ })) : React__default.createElement(GasContainer, null, React__default.createElement(Tooltip, {
2019
+ content: "Transaction cost (fee)"
2020
+ }, React__default.createElement(CostContainer, {
1836
2021
  warning: feeWarning
1837
2022
  }, React__default.createElement(GasIcon, {
1838
2023
  size: 20,
@@ -1842,13 +2027,17 @@ function BestRoute(props) {
1842
2027
  align: "center",
1843
2028
  variant: "caption",
1844
2029
  warning: feeWarning
1845
- }, error && '-', !!data && "$" + totalFee)), React__default.createElement(HR, null), React__default.createElement(TimeIcon, {
2030
+ }, error && '-', !!data && "$" + totalFee))), React__default.createElement(HR, null), React__default.createElement(Tooltip, {
2031
+ content: "Time estimate"
2032
+ }, React__default.createElement(CostContainer, {
2033
+ warning: feeWarning
2034
+ }, React__default.createElement(TimeIcon, {
1846
2035
  size: 20
1847
2036
  }), React__default.createElement(Typography, {
1848
2037
  mt: 4,
1849
2038
  align: "center",
1850
2039
  variant: "caption"
1851
- }, error && '-', !!data && "~" + totalTime + "m")), React__default.createElement(BestRouteContainer, null, loading && React__default.createElement(Spinner, {
2040
+ }, error && '-', !!data && "~" + totalTime + "m")))), React__default.createElement(BestRouteContainer, null, loading && React__default.createElement(Spinner, {
1852
2041
  color: "primary"
1853
2042
  }), error && React__default.createElement(ErrorMsg, {
1854
2043
  variant: "caption"
@@ -1879,8 +2068,8 @@ function BestRoute(props) {
1879
2068
  }, "No routes found")));
1880
2069
  }
1881
2070
 
1882
- var _excluded$B = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
1883
- var _ghost, _css, _css2, _css3, _css4;
2071
+ var _excluded$D = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
2072
+ var _ghost, _css, _css2, _css3;
1884
2073
  var ButtonContainer = /*#__PURE__*/styled('button', {
1885
2074
  borderRadius: '$5',
1886
2075
  fontSize: '$16',
@@ -1890,6 +2079,11 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
1890
2079
  display: 'flex',
1891
2080
  alignItems: 'center',
1892
2081
  justifyContent: 'center',
2082
+ transition: 'all 0.35s',
2083
+ border: '0',
2084
+ '&:active': {
2085
+ transform: 'scale(0.95)'
2086
+ },
1893
2087
  variants: {
1894
2088
  align: {
1895
2089
  start: {
@@ -1902,6 +2096,7 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
1902
2096
  }
1903
2097
  },
1904
2098
  size: {
2099
+ compact: {},
1905
2100
  small: {
1906
2101
  height: '$32'
1907
2102
  },
@@ -1918,28 +2113,29 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
1918
2113
  color: '$foreground',
1919
2114
  border: 0,
1920
2115
  '&:hover': {
1921
- backgroundColor: '$neutrals200',
1922
- color: '$foreground'
2116
+ backgroundColor: '$neutrals200'
1923
2117
  },
1924
2118
  '&:disabled': {
1925
- background: '$neutrals400 !important'
2119
+ background: '$neutrals400'
2120
+ },
2121
+ '&:disabled:hover': {
2122
+ background: '$neutrals400',
2123
+ transform: 'unset'
1926
2124
  }
1927
2125
  },
1928
2126
  outlined: {
1929
- backgroundColor: '$background !important',
1930
- borderColor: '$neutrals400 !important',
2127
+ backgroundColor: '$background',
2128
+ border: 1,
2129
+ borderStyle: 'solid',
2130
+ borderColor: '$neutrals400',
1931
2131
  color: '$foreground',
1932
2132
  '&:hover': {
1933
- borderColor: '$neutrals600 !important',
1934
- color: '$neutrals500 !important'
2133
+ borderColor: '$neutrals600'
1935
2134
  },
1936
2135
  '&:disabled': {
1937
- borderColor: '$neutrals300 !important',
1938
- color: '$neutrals400 !important'
1939
- },
1940
- background: 'transparent',
1941
- border: 1,
1942
- borderStyle: 'solid'
2136
+ borderColor: '$neutrals300',
2137
+ color: '$neutrals400'
2138
+ }
1943
2139
  },
1944
2140
  ghost: (_ghost = {
1945
2141
  color: '$foreground',
@@ -1973,24 +2169,25 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
1973
2169
  compoundVariants: [{
1974
2170
  type: 'primary',
1975
2171
  variant: 'contained',
1976
- css: (_css = {
2172
+ css: {
1977
2173
  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)
2174
+ color: '$white',
2175
+ '&:hover': {
2176
+ background: '$primary700'
2177
+ },
2178
+ '&:visited': {
2179
+ background: '$primary900'
2180
+ },
2181
+ '&:focus': {
2182
+ background: '$primary600'
2183
+ }
2184
+ }
1988
2185
  }, {
1989
2186
  type: 'primary',
1990
2187
  variant: 'outlined',
1991
2188
  css: {
1992
2189
  color: '$primary !important',
1993
- borderColor: '$primary !important',
2190
+ borderColor: '$primary',
1994
2191
  '&:hover': {
1995
2192
  color: '$primary700 !important',
1996
2193
  borderColor: '$primary700 !important'
@@ -2022,24 +2219,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
2022
2219
  }, {
2023
2220
  type: 'error',
2024
2221
  variant: 'contained',
2025
- css: (_css2 = {
2222
+ css: (_css = {
2026
2223
  background: '$error',
2027
2224
  $$color: '$colors$background'
2028
- }, _css2["." + darkTheme + " &"] = {
2225
+ }, _css["." + darkTheme + " &"] = {
2029
2226
  $$color: '$colors$foreground'
2030
- }, _css2.color = '$$color !important', _css2['&:hover'] = {
2227
+ }, _css.color = '$$color !important', _css['&:hover'] = {
2031
2228
  background: '$error300'
2032
- }, _css2['&:visited'] = {
2229
+ }, _css['&:visited'] = {
2033
2230
  background: '$error700'
2034
- }, _css2['&:focus'] = {
2231
+ }, _css['&:focus'] = {
2035
2232
  background: '$error700'
2036
- }, _css2)
2233
+ }, _css)
2037
2234
  }, {
2038
2235
  type: 'error',
2039
2236
  variant: 'outlined',
2040
2237
  css: {
2041
2238
  color: '$error !important',
2042
- borderColor: '$error !important',
2239
+ borderColor: '$error',
2043
2240
  '&:hover': {
2044
2241
  color: '$error300 !important',
2045
2242
  borderColor: '$error300 !important'
@@ -2071,24 +2268,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
2071
2268
  }, {
2072
2269
  type: 'warning',
2073
2270
  variant: 'contained',
2074
- css: (_css3 = {
2271
+ css: (_css2 = {
2075
2272
  background: '$warning',
2076
2273
  $$color: '$colors$background'
2077
- }, _css3["." + darkTheme + " &"] = {
2274
+ }, _css2["." + darkTheme + " &"] = {
2078
2275
  $$color: '$colors$foreground'
2079
- }, _css3.color = '$$color !important', _css3['&:hover'] = {
2276
+ }, _css2.color = '$$color !important', _css2['&:hover'] = {
2080
2277
  background: '$warning300'
2081
- }, _css3['&:visited'] = {
2278
+ }, _css2['&:visited'] = {
2082
2279
  background: '$warning700'
2083
- }, _css3['&:focus'] = {
2280
+ }, _css2['&:focus'] = {
2084
2281
  background: '$warning700'
2085
- }, _css3)
2282
+ }, _css2)
2086
2283
  }, {
2087
2284
  type: 'warning',
2088
2285
  variant: 'outlined',
2089
2286
  css: {
2090
2287
  color: '$warning !important',
2091
- borderColor: '$warning !important',
2288
+ borderColor: '$warning',
2092
2289
  '&:hover': {
2093
2290
  color: '$warning300 !important',
2094
2291
  borderColor: '$warning300 !important'
@@ -2120,24 +2317,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
2120
2317
  }, {
2121
2318
  type: 'success',
2122
2319
  variant: 'contained',
2123
- css: (_css4 = {
2320
+ css: (_css3 = {
2124
2321
  background: '$success',
2125
2322
  $$color: '$colors$background'
2126
- }, _css4["." + darkTheme + " &"] = {
2323
+ }, _css3["." + darkTheme + " &"] = {
2127
2324
  $$color: '$colors$foreground'
2128
- }, _css4.color = '$$color !important', _css4['&:hover'] = {
2325
+ }, _css3.color = '$$color !important', _css3['&:hover'] = {
2129
2326
  background: '$success300'
2130
- }, _css4['&:visited'] = {
2327
+ }, _css3['&:visited'] = {
2131
2328
  background: '$success700'
2132
- }, _css4['&:focus'] = {
2329
+ }, _css3['&:focus'] = {
2133
2330
  background: '$success700'
2134
- }, _css4)
2331
+ }, _css3)
2135
2332
  }, {
2136
2333
  type: 'success',
2137
2334
  variant: 'outlined',
2138
2335
  css: {
2139
2336
  color: '$success !important',
2140
- borderColor: '$success !important',
2337
+ borderColor: '$success',
2141
2338
  '&:hover': {
2142
2339
  color: '$success300 !important',
2143
2340
  borderColor: '$success300 !important'
@@ -2166,6 +2363,12 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
2166
2363
  color: '$success700'
2167
2364
  }
2168
2365
  }
2366
+ }, {
2367
+ size: 'compact',
2368
+ css: {
2369
+ padding: '$2 $4',
2370
+ fontSize: '$12'
2371
+ }
2169
2372
  }],
2170
2373
  defaultVariants: {
2171
2374
  size: 'medium',
@@ -2209,7 +2412,7 @@ function Button(_ref) {
2209
2412
  suffix = _ref.suffix,
2210
2413
  align = _ref.align,
2211
2414
  flexContent = _ref.flexContent,
2212
- props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
2415
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
2213
2416
  var isDisabled = loading || disabled;
2214
2417
  return React__default.createElement(ButtonContainer, Object.assign({
2215
2418
  disabled: isDisabled
@@ -2285,7 +2488,7 @@ function BlockchainsList(props) {
2285
2488
  }));
2286
2489
  }
2287
2490
 
2288
- var _excluded$C = ["label", "prefix", "suffix", "children", "size", "style"];
2491
+ var _excluded$E = ["label", "prefix", "suffix", "children", "size", "style"];
2289
2492
  var InputContainer = /*#__PURE__*/styled('div', {
2290
2493
  backgroundColor: '$background',
2291
2494
  boxSizing: 'border-box',
@@ -2299,7 +2502,8 @@ var InputContainer = /*#__PURE__*/styled('div', {
2299
2502
  color: '$foreground',
2300
2503
  transition: 'border-color ease .3s',
2301
2504
  '&:focus-within': {
2302
- borderColor: '$primary'
2505
+ borderColor: '$success',
2506
+ outline: '1px solid $success'
2303
2507
  },
2304
2508
  variants: {
2305
2509
  size: {
@@ -2370,7 +2574,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
2370
2574
  suffix = props.suffix,
2371
2575
  size = props.size,
2372
2576
  style = props.style,
2373
- inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$C);
2577
+ inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$E);
2374
2578
  return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
2375
2579
  className: "_text"
2376
2580
  }, inputAttributes.id && {
@@ -2450,61 +2654,182 @@ function SecondaryPage(props) {
2450
2654
  })), React__default.createElement(ContentContainer, null, props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
2451
2655
  }
2452
2656
 
2657
+ var SpacerContainer = /*#__PURE__*/styled('div', {
2658
+ variants: {
2659
+ size: {
2660
+ 4: {},
2661
+ 8: {},
2662
+ 12: {},
2663
+ 16: {},
2664
+ 18: {},
2665
+ 20: {},
2666
+ 24: {}
2667
+ },
2668
+ direction: {
2669
+ vertical: {},
2670
+ horizontal: {}
2671
+ }
2672
+ },
2673
+ compoundVariants: [{
2674
+ size: 4,
2675
+ direction: 'horizontal',
2676
+ css: {
2677
+ width: '$4'
2678
+ }
2679
+ }, {
2680
+ size: 4,
2681
+ direction: 'vertical',
2682
+ css: {
2683
+ height: '$4'
2684
+ }
2685
+ }, {
2686
+ size: 8,
2687
+ direction: 'horizontal',
2688
+ css: {
2689
+ width: '$8'
2690
+ }
2691
+ }, {
2692
+ size: 8,
2693
+ direction: 'vertical',
2694
+ css: {
2695
+ height: '$8'
2696
+ }
2697
+ }, {
2698
+ size: 12,
2699
+ direction: 'horizontal',
2700
+ css: {
2701
+ width: '$12'
2702
+ }
2703
+ }, {
2704
+ size: 12,
2705
+ direction: 'vertical',
2706
+ css: {
2707
+ height: '$12'
2708
+ }
2709
+ }, {
2710
+ size: 16,
2711
+ direction: 'horizontal',
2712
+ css: {
2713
+ width: '$16'
2714
+ }
2715
+ }, {
2716
+ size: 16,
2717
+ direction: 'vertical',
2718
+ css: {
2719
+ height: '$16'
2720
+ }
2721
+ }, {
2722
+ size: 18,
2723
+ direction: 'horizontal',
2724
+ css: {
2725
+ width: '$18'
2726
+ }
2727
+ }, {
2728
+ size: 18,
2729
+ direction: 'vertical',
2730
+ css: {
2731
+ height: '$18'
2732
+ }
2733
+ }, {
2734
+ size: 20,
2735
+ direction: 'horizontal',
2736
+ css: {
2737
+ width: '$20'
2738
+ }
2739
+ }, {
2740
+ size: 20,
2741
+ direction: 'vertical',
2742
+ css: {
2743
+ height: '$20'
2744
+ }
2745
+ }, {
2746
+ size: 24,
2747
+ direction: 'horizontal',
2748
+ css: {
2749
+ width: '$24'
2750
+ }
2751
+ }, {
2752
+ size: 24,
2753
+ direction: 'vertical',
2754
+ css: {
2755
+ height: '$24'
2756
+ }
2757
+ }]
2758
+ });
2759
+ function Spacer(_ref) {
2760
+ var _ref$size = _ref.size,
2761
+ size = _ref$size === void 0 ? 12 : _ref$size,
2762
+ _ref$direction = _ref.direction,
2763
+ direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
2764
+ return React__default.createElement(SpacerContainer, {
2765
+ size: size,
2766
+ direction: direction
2767
+ });
2768
+ }
2769
+
2453
2770
  var MainContainer = /*#__PURE__*/styled('div', {
2454
- display: 'flex',
2455
2771
  width: '100%',
2456
- alignItems: 'center',
2457
2772
  padding: '$16',
2458
2773
  borderRadius: '$5',
2774
+ backgroundColor: '$neutrals300',
2775
+ color: '$neutrals800',
2776
+ '.main': {
2777
+ display: 'flex',
2778
+ alignItems: 'center'
2779
+ },
2780
+ '.footer': {
2781
+ paddingTop: '$8'
2782
+ },
2783
+ '&.hasIcon .footer': {
2784
+ paddingLeft: '$32'
2785
+ },
2459
2786
  variants: {
2460
2787
  type: {
2461
2788
  primary: {
2462
- backgroundColor: '$primary200'
2789
+ color: '$primary200'
2463
2790
  },
2464
2791
  secondary: {
2465
- backgroundColor: '$neutrals400'
2792
+ color: '$secondary'
2466
2793
  },
2467
2794
  success: {
2468
- backgroundColor: '$success300'
2795
+ color: '$success300'
2469
2796
  },
2470
2797
  warning: {
2471
- backgroundColor: '$warning500'
2798
+ color: '$warning500'
2472
2799
  },
2473
2800
  error: {
2474
- backgroundColor: '$error300'
2801
+ color: '$error300'
2475
2802
  }
2476
2803
  }
2477
2804
  }
2478
2805
  });
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
2806
  function Alert(props) {
2490
2807
  var type = props.type,
2491
2808
  children = props.children,
2492
2809
  title = props.title;
2493
2810
  var showIcon = ['error', 'success', 'warning'].includes(type);
2494
2811
  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
2812
+ type: type,
2813
+ className: showIcon ? 'hasIcon' : ''
2814
+ }, React__default.createElement("div", {
2815
+ className: "main"
2816
+ }, showIcon && React__default.createElement(React__default.Fragment, null, type === 'success' && React__default.createElement(CheckCircleIcon, {
2817
+ color: type,
2818
+ size: 24
2499
2819
  }), type === 'warning' && React__default.createElement(WarningIcon, {
2500
- color: "white",
2501
- size: 28
2820
+ color: type,
2821
+ size: 24
2502
2822
  }), 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));
2823
+ color: type,
2824
+ size: 24
2825
+ }), React__default.createElement(Spacer, {
2826
+ size: 8
2827
+ })), title && React__default.createElement(Typography, {
2828
+ variant: "h6",
2829
+ color: type
2830
+ }, title), children), props.footer ? React__default.createElement("div", {
2831
+ className: "footer"
2832
+ }, props.footer) : null);
2508
2833
  }
2509
2834
 
2510
2835
  var containsText = function containsText(text, searchText) {
@@ -2556,20 +2881,16 @@ function BlockchainSelector(props) {
2556
2881
  multiSelect: multiSelect,
2557
2882
  selectedList: selectedList,
2558
2883
  onChange: onChange
2559
- }) : React__default.createElement(Alert, {
2560
- type: "secondary"
2561
- }, React__default.createElement(Typography, {
2562
- variant: "body2"
2563
- }, searchedFor + " not found"))));
2884
+ }) : React__default.createElement(Alert, null, searchedFor + " not found")));
2564
2885
  });
2565
2886
  }
2566
2887
 
2567
- var _excluded$D = ["label", "id"];
2888
+ var _excluded$F = ["label", "id"];
2568
2889
  var CheckboxContainer = /*#__PURE__*/styled('div', {
2569
2890
  display: 'flex',
2570
2891
  alignItems: 'center'
2571
2892
  });
2572
- var CheckboxRoot = /*#__PURE__*/styled(Root, {
2893
+ var CheckboxRoot = /*#__PURE__*/styled(Root$1, {
2573
2894
  borderRadius: '5px',
2574
2895
  width: 20,
2575
2896
  padding: 0,
@@ -2589,7 +2910,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
2589
2910
  function Checkbox(_ref) {
2590
2911
  var label = _ref.label,
2591
2912
  id = _ref.id,
2592
- props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
2913
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
2593
2914
  return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
2594
2915
  id: id
2595
2916
  }, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
@@ -2609,13 +2930,17 @@ var ChipCointainer = /*#__PURE__*/styled('div', {
2609
2930
  height: '32',
2610
2931
  fontSize: '$14',
2611
2932
  cursor: 'pointer',
2933
+ transition: 'all 0.35s',
2934
+ color: '$foreground',
2612
2935
  '&:hover': {
2613
- backgroundColor: '$neutrals300'
2936
+ backgroundColor: '$success700',
2937
+ color: '$background'
2614
2938
  },
2615
2939
  variants: {
2616
2940
  selected: {
2617
2941
  "true": {
2618
- backgroundColor: '$neutrals400'
2942
+ backgroundColor: '$success',
2943
+ color: '$background'
2619
2944
  },
2620
2945
  "false": {
2621
2946
  backgroundColor: '$background'
@@ -2634,9 +2959,7 @@ function Chip(props) {
2634
2959
  selected: selected,
2635
2960
  onClick: onClick,
2636
2961
  style: style
2637
- }, prefix || null, React__default.createElement(Typography, {
2638
- variant: "body2"
2639
- }, label), suffix || null);
2962
+ }, prefix || null, label, suffix || null);
2640
2963
  }
2641
2964
 
2642
2965
  var BackDrop = /*#__PURE__*/styled('div', {
@@ -2670,7 +2993,7 @@ var ModalHeader = /*#__PURE__*/styled('div', {
2670
2993
  position: 'relative',
2671
2994
  marginBottom: '$16'
2672
2995
  });
2673
- var ContentContainer$2 = /*#__PURE__*/styled('div', {});
2996
+ var ContentContainer$1 = /*#__PURE__*/styled('div', {});
2674
2997
  function Modal(props) {
2675
2998
  var title = props.title,
2676
2999
  content = props.content,
@@ -2694,7 +3017,7 @@ function Modal(props) {
2694
3017
  }, title), React__default.createElement(Row, null, action, React__default.createElement(CloseIcon, {
2695
3018
  size: 24,
2696
3019
  onClick: onClose
2697
- }))), React__default.createElement(ContentContainer$2, {
3020
+ }))), React__default.createElement(ContentContainer$1, {
2698
3021
  style: contentStyle
2699
3022
  }, content))), document.body));
2700
3023
  }
@@ -2721,7 +3044,7 @@ var State = function State(_ref) {
2721
3044
  }, React__default.createElement(DownloadIcon, {
2722
3045
  size: 24,
2723
3046
  color: "success"
2724
- })), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(FilledCircle, null)));
3047
+ })), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
2725
3048
  };
2726
3049
 
2727
3050
  var WalletImage = /*#__PURE__*/styled('img', {
@@ -2729,6 +3052,23 @@ var WalletImage = /*#__PURE__*/styled('img', {
2729
3052
  height: '$24',
2730
3053
  marginRight: '$12'
2731
3054
  });
3055
+ var Text = /*#__PURE__*/styled('div', {
3056
+ display: 'flex',
3057
+ flexDirection: 'column'
3058
+ });
3059
+ var ExtendedButton = /*#__PURE__*/styled(Button, {
3060
+ variants: {
3061
+ type: {
3062
+ primary: {
3063
+ outline: '1px solid $primary',
3064
+ borderColor: '$primary',
3065
+ '&:hover': {
3066
+ borderColor: '$primary'
3067
+ }
3068
+ }
3069
+ }
3070
+ }
3071
+ });
2732
3072
  function Wallet(props) {
2733
3073
  var name = props.name,
2734
3074
  type = props.type,
@@ -2736,7 +3076,7 @@ function Wallet(props) {
2736
3076
  state = props.state,
2737
3077
  _onClick = props.onClick,
2738
3078
  installLink = props.installLink;
2739
- return React__default.createElement(Button, {
3079
+ return React__default.createElement(ExtendedButton, {
2740
3080
  type: state === WalletState.CONNECTED ? 'primary' : undefined,
2741
3081
  disabled: !state,
2742
3082
  onClick: function onClick() {
@@ -2754,10 +3094,14 @@ function Wallet(props) {
2754
3094
  walletState: state,
2755
3095
  installLink: installLink
2756
3096
  })
2757
- }, React__default.createElement(Typography, {
3097
+ }, React__default.createElement(Text, null, React__default.createElement(Typography, {
2758
3098
  variant: "h5",
2759
3099
  noWrap: false
2760
- }, name));
3100
+ }, name), state === WalletState.CONNECTED ? React__default.createElement(Typography, {
3101
+ variant: "caption",
3102
+ noWrap: false,
3103
+ color: "primary"
3104
+ }, "Connected") : null));
2761
3105
  }
2762
3106
 
2763
3107
  var ModalContent = /*#__PURE__*/styled('div', {
@@ -2789,107 +3133,21 @@ function ConnectWalletsModal(props) {
2789
3133
  });
2790
3134
  }
2791
3135
 
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, {
3136
+ var StyledSwitchRoot = /*#__PURE__*/styled(Root$2, {
2880
3137
  boxSizing: 'border-box',
2881
3138
  boxShadow: 'none',
2882
3139
  borderStyle: 'solid',
2883
3140
  width: '42px',
2884
3141
  height: '22px',
2885
- backgroundColor: '$neutrals300',
2886
- borderColor: '$neutrals400',
3142
+ backgroundColor: '$neutrals600',
3143
+ borderColor: '$neutrals600',
2887
3144
  borderRadius: '99999px',
2888
3145
  position: 'relative',
2889
3146
  padding: '0',
2890
3147
  cursor: 'pointer',
2891
3148
  '&[data-state="checked"]': {
2892
- backgroundColor: '$primary100'
3149
+ backgroundColor: '$success',
3150
+ borderColor: '$success'
2893
3151
  },
2894
3152
  '-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)'
2895
3153
  });
@@ -2900,13 +3158,12 @@ var StyledSwitchThumb = /*#__PURE__*/styled(Thumb, {
2900
3158
  display: 'block',
2901
3159
  width: '18px',
2902
3160
  height: '18px',
2903
- backgroundColor: '$neutrals500',
3161
+ backgroundColor: '$white',
2904
3162
  transition: ' transform 300ms',
2905
3163
  borderRadius: '999999px',
2906
3164
  willChange: 'transform',
2907
3165
  '&[data-state="checked"]': {
2908
- transform: 'translateX(20px)',
2909
- backgroundColor: '$primary'
3166
+ transform: 'translateX(20px)'
2910
3167
  }
2911
3168
  });
2912
3169
  function Switch(props) {
@@ -2928,9 +3185,11 @@ var groupLiquiditySources = function groupLiquiditySources(liquiditySources) {
2928
3185
  })
2929
3186
  };
2930
3187
  };
2931
- var LiquiditySourceType = /*#__PURE__*/styled(Typography, {
3188
+ var LiquiditySourceType = /*#__PURE__*/styled('div', {
2932
3189
  position: 'sticky',
2933
- display: 'block',
3190
+ display: 'flex',
3191
+ justifyContent: 'space-between',
3192
+ alignItems: 'center',
2934
3193
  top: '0',
2935
3194
  marginTop: '$8',
2936
3195
  marginBottom: '$8',
@@ -2973,28 +3232,42 @@ function LiquiditySourceList(props) {
2973
3232
  return item.selected;
2974
3233
  }));
2975
3234
  }, [list]);
3235
+ var sections = groupLiquiditySources(list);
3236
+ var bridges = sections.bridge;
3237
+ var exchanges = sections.exchange;
3238
+ var totalBridges = bridges.length;
3239
+ var totalExchanges = exchanges.length;
3240
+ // TODO: This is not performant
3241
+ var totalSelectedBridges = bridges.filter(isSelected).length;
3242
+ var totalSelectedExchanges = exchanges.filter(isSelected).length;
2976
3243
  return React__default.createElement("div", {
2977
3244
  style: _extends({
2978
3245
  height: '450px'
2979
3246
  }, listContainerStyle)
2980
- }, React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, {
3247
+ }, React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
2981
3248
  variant: "h5"
2982
- }, "Bridges"), React__default.createElement(Spacer, {
2983
- size: 16,
3249
+ }, "Bridges"), React__default.createElement(Typography, {
3250
+ variant: "body1",
3251
+ color: "neutrals800"
3252
+ }, totalSelectedBridges === totalBridges ? totalBridges : totalSelectedBridges + " / " + totalBridges)), React__default.createElement(Spacer, {
3253
+ size: 12,
2984
3254
  direction: "vertical"
2985
- }), groupLiquiditySources(list).bridge.map(function (liquiditySource, index) {
3255
+ }), bridges.map(function (liquiditySource, index) {
2986
3256
  return React__default.createElement(LiquiditySourceItem, {
2987
3257
  liquiditySource: liquiditySource,
2988
3258
  key: index,
2989
3259
  selected: isSelected(liquiditySource),
2990
3260
  onChange: changeLiquiditySources
2991
3261
  });
2992
- })), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, {
3262
+ })), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
2993
3263
  variant: "h5"
2994
- }, "Exchanges"), React__default.createElement(Spacer, {
2995
- size: 16,
3264
+ }, "Exchanges"), React__default.createElement(Typography, {
3265
+ variant: "body1",
3266
+ color: "neutrals800"
3267
+ }, totalSelectedExchanges === totalExchanges ? totalExchanges : totalSelectedExchanges + " / " + totalExchanges)), React__default.createElement(Spacer, {
3268
+ size: 12,
2996
3269
  direction: "vertical"
2997
- }), groupLiquiditySources(list).exchange.map(function (liquiditySource, index) {
3270
+ }), exchanges.map(function (liquiditySource, index) {
2998
3271
  return React__default.createElement(LiquiditySourceItem, {
2999
3272
  liquiditySource: liquiditySource,
3000
3273
  key: index,
@@ -3020,7 +3293,6 @@ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
3020
3293
  style: {
3021
3294
  marginBottom: '12px'
3022
3295
  },
3023
- type: selected ? 'primary' : undefined,
3024
3296
  onClick: onChange.bind(null, liquiditySource)
3025
3297
  }, React__default.createElement(Typography, {
3026
3298
  variant: "body1"
@@ -3053,7 +3325,7 @@ function LiquiditySourcesSelector(props) {
3053
3325
  onClick: toggleAll
3054
3326
  }, list.find(function (item) {
3055
3327
  return item.selected;
3056
- }) ? 'Clear all' : 'Select all'),
3328
+ }) ? 'Deselect all' : 'Select all'),
3057
3329
  hasHeader: hasHeader,
3058
3330
  onBack: onBack
3059
3331
  }, function (searchedFor) {
@@ -3067,8 +3339,7 @@ function LiquiditySourcesSelector(props) {
3067
3339
 
3068
3340
  var Row$1 = /*#__PURE__*/styled('div', {
3069
3341
  display: 'flex',
3070
- flexWrap: 'wrap',
3071
- justifyContent: 'center'
3342
+ flexWrap: 'wrap'
3072
3343
  });
3073
3344
  var Circle = /*#__PURE__*/styled('div', {
3074
3345
  width: 12,
@@ -3171,7 +3442,7 @@ function SelectableWalletList(_ref) {
3171
3442
  }));
3172
3443
  }
3173
3444
 
3174
- var StyledRoot = /*#__PURE__*/styled(Root$2, {
3445
+ var StyledRoot = /*#__PURE__*/styled(Root$3, {
3175
3446
  variants: {
3176
3447
  direction: {
3177
3448
  horizontal: {
@@ -3193,14 +3464,14 @@ var ItemContainer = /*#__PURE__*/styled('div', {
3193
3464
  });
3194
3465
  var StyledItem = /*#__PURE__*/styled(Item, {
3195
3466
  padding: '0',
3196
- backgroundColor: '$neutrals300',
3197
3467
  width: '20px',
3198
3468
  height: '20px',
3199
3469
  borderRadius: '100%',
3200
- border: 'none',
3201
3470
  cursor: 'pointer',
3471
+ backgroundColor: '$background',
3472
+ border: '1px solid $neutrals400',
3202
3473
  '&:hover': {
3203
- backgroundColor: '$neutrals400'
3474
+ borderColor: '$neutrals600'
3204
3475
  }
3205
3476
  });
3206
3477
  var Container$3 = /*#__PURE__*/styled('div', {
@@ -3219,7 +3490,7 @@ var StyledIndicator = /*#__PURE__*/styled(Indicator$1, {
3219
3490
  width: '10px',
3220
3491
  height: '10px',
3221
3492
  borderRadius: '50%',
3222
- backgroundColor: '$primary'
3493
+ backgroundColor: '$success'
3223
3494
  }
3224
3495
  });
3225
3496
  var Label$2 = /*#__PURE__*/styled('label', {
@@ -3255,7 +3526,7 @@ function Radio(props) {
3255
3526
 
3256
3527
  var BaseContainer = /*#__PURE__*/styled('div', {
3257
3528
  borderRadius: '$5',
3258
- backgroundColor: '$neutrals200',
3529
+ backgroundColor: '$neutrals300',
3259
3530
  padding: '$16'
3260
3531
  });
3261
3532
  var Title = /*#__PURE__*/styled(Typography, {
@@ -3288,6 +3559,12 @@ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
3288
3559
  var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
3289
3560
  marginTop: '$32'
3290
3561
  });
3562
+ var Head = /*#__PURE__*/styled('div', {
3563
+ display: 'flex',
3564
+ justifyContent: 'space-between',
3565
+ alignItems: 'center',
3566
+ paddingBottom: '$16'
3567
+ });
3291
3568
  function Settings(props) {
3292
3569
  var slippages = props.slippages,
3293
3570
  selectedLiquiditySources = props.selectedLiquiditySources,
@@ -3310,9 +3587,12 @@ function Settings(props) {
3310
3587
  setSelectedSlippage(slippage);
3311
3588
  onSlippageChange(slippage);
3312
3589
  };
3313
- var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(Title, {
3590
+ var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(Head, null, React__default.createElement(Typography, {
3314
3591
  variant: "body1"
3315
- }, "Slippage tolerance per swap"), React__default.createElement(SlippageChipsContainer, null, slippages.map(function (slippage, index) {
3592
+ }, "Slippage tolerance per swap"), customSlippage ? React__default.createElement(Typography, {
3593
+ variant: "caption",
3594
+ color: "error"
3595
+ }, customSlippage, "% Custom") : undefined), React__default.createElement(SlippageChipsContainer, null, slippages.map(function (slippage, index) {
3316
3596
  return React__default.createElement(Chip, {
3317
3597
  key: index,
3318
3598
  onClick: function onClick() {
@@ -3320,7 +3600,7 @@ function Settings(props) {
3320
3600
  changeSlippage(slippage);
3321
3601
  },
3322
3602
  selected: !customSlippage && slippage === selectedSlippage,
3323
- label: slippage.toString() + " %",
3603
+ label: slippage.toString() + "%",
3324
3604
  style: {
3325
3605
  marginRight: '8px'
3326
3606
  }
@@ -3336,11 +3616,10 @@ function Settings(props) {
3336
3616
  variant: "body2"
3337
3617
  }, "%"),
3338
3618
  size: "small",
3339
- placeholder: "Custom",
3619
+ placeholder: "Custom %",
3340
3620
  style: {
3341
3621
  width: '128px',
3342
- flexGrow: 'initial',
3343
- borderColor: customSlippage ? '$success' : 'initial'
3622
+ flexGrow: 'initial'
3344
3623
  }
3345
3624
  }))), React__default.createElement(ThemesContainer, null, React__default.createElement(Title, {
3346
3625
  variant: "body2"
@@ -3373,8 +3652,9 @@ function Settings(props) {
3373
3652
  }, React__default.createElement(Typography, {
3374
3653
  variant: "body1"
3375
3654
  }, "Liquidity Sources"), React__default.createElement(LiquiditySourceNumber, null, React__default.createElement(Typography, {
3376
- variant: "body2"
3377
- }, "( " + selectedLiquiditySources.length + " / " + liquiditySources.length + " )"), React__default.createElement(StyledAngleRight, null))));
3655
+ variant: "body2",
3656
+ color: "neutrals800"
3657
+ }, liquiditySources.length !== selectedLiquiditySources.length ? selectedLiquiditySources.length + " / " + liquiditySources.length : liquiditySources.length), React__default.createElement(StyledAngleRight, null))));
3378
3658
  return React__default.createElement(SecondaryPage, {
3379
3659
  title: "Settings",
3380
3660
  textField: false,
@@ -3393,11 +3673,11 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
3393
3673
  display: 'flex',
3394
3674
  flexDirection: 'column',
3395
3675
  alignItems: 'end',
3396
- padding: '$16 $24',
3676
+ padding: '$16',
3397
3677
  boxSizing: 'border-box',
3398
3678
  position: 'relative'
3399
3679
  });
3400
- var ContentContainer$3 = /*#__PURE__*/styled('div', {
3680
+ var ContentContainer$2 = /*#__PURE__*/styled('div', {
3401
3681
  width: '100%'
3402
3682
  });
3403
3683
  function SwapContainer(props) {
@@ -3406,7 +3686,7 @@ function SwapContainer(props) {
3406
3686
  return React__default.createElement(MainContainer$1, {
3407
3687
  style: style,
3408
3688
  id: "swap-box"
3409
- }, React__default.createElement(ContentContainer$3, null, children));
3689
+ }, React__default.createElement(ContentContainer$2, null, children));
3410
3690
  }
3411
3691
 
3412
3692
  var Container$4 = /*#__PURE__*/styled('div', {
@@ -3614,7 +3894,7 @@ function TokenItem(props) {
3614
3894
  }, token.name))));
3615
3895
  }
3616
3896
 
3617
- var _excluded$E = ["style"];
3897
+ var _excluded$G = ["style"];
3618
3898
  var PAGE_SIZE = 20;
3619
3899
  function TokenList(props) {
3620
3900
  var list = props.list,
@@ -3654,7 +3934,7 @@ function TokenList(props) {
3654
3934
  }, [tokens.length]);
3655
3935
  var innerElementType = forwardRef(function (_ref, ref) {
3656
3936
  var style = _ref.style,
3657
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$E);
3937
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
3658
3938
  return React__default.createElement("div", Object.assign({
3659
3939
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3660
3940
  ref: ref,
@@ -3718,99 +3998,6 @@ function TokenSelector(props) {
3718
3998
  });
3719
3999
  }
3720
4000
 
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
- }
3791
- }
3792
- });
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
- })))));
3812
- }
3813
-
3814
4001
  var Container$5 = /*#__PURE__*/styled('div', {
3815
4002
  position: 'relative'
3816
4003
  });
@@ -4027,13 +4214,6 @@ var ArrowDown = /*#__PURE__*/styled('div', {
4027
4214
  borderTop: '5px solid $foreground',
4028
4215
  marginLeft: '$8'
4029
4216
  });
4030
- var UpdateIcon = /*#__PURE__*/styled(RetryIcon, {
4031
- position: 'absolute',
4032
- right: '0'
4033
- });
4034
- var StyledUpdateIcon = /*#__PURE__*/styled(UpdateIcon, {
4035
- cursor: 'pointer'
4036
- });
4037
4217
  var BestRouteContainer$1 = /*#__PURE__*/styled('div', {
4038
4218
  overflow: 'auto'
4039
4219
  });
@@ -4043,7 +4223,6 @@ var Alerts = /*#__PURE__*/styled('div', {
4043
4223
  function ConfirmSwap(props) {
4044
4224
  var _bestRoute$result;
4045
4225
  var bestRoute = props.bestRoute,
4046
- onRefresh = props.onRefresh,
4047
4226
  onBack = props.onBack,
4048
4227
  onConfirm = props.onConfirm,
4049
4228
  loading = props.loading,
@@ -4063,11 +4242,7 @@ function ConfirmSwap(props) {
4063
4242
  variant: "contained",
4064
4243
  onClick: onConfirm,
4065
4244
  disabled: confirmButtonDisabled
4066
- }, confirmButtonTitle)),
4067
- TopButton: React__default.createElement(StyledUpdateIcon, {
4068
- size: 24,
4069
- onClick: onRefresh
4070
- })
4245
+ }, confirmButtonTitle))
4071
4246
  }, 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) {
4072
4247
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
4073
4248
  direction: "vertical"
@@ -4111,6 +4286,11 @@ function ConfirmSwap(props) {
4111
4286
  }))));
4112
4287
  }
4113
4288
 
4289
+ var Section = /*#__PURE__*/styled('div', {
4290
+ paddingBottom: '$32',
4291
+ marginBottom: '$32',
4292
+ borderBottom: '1px solid $neutrals400'
4293
+ });
4114
4294
  var Footer$2 = /*#__PURE__*/styled('div', {
4115
4295
  display: 'flex',
4116
4296
  alignItems: 'center'
@@ -4121,22 +4301,36 @@ var AlertContainer = /*#__PURE__*/styled('div', {
4121
4301
  var ConfirmButton = /*#__PURE__*/styled(Button, {
4122
4302
  marginTop: '$16'
4123
4303
  });
4304
+ var Container$6 = /*#__PURE__*/styled('div', {
4305
+ paddingBottom: '$24',
4306
+ '.title': {
4307
+ paddingBottom: '$8',
4308
+ display: 'flex',
4309
+ alignItems: 'center'
4310
+ },
4311
+ '.num': {
4312
+ backgroundColor: '$neutrals300',
4313
+ display: 'inline-flex',
4314
+ width: '24px',
4315
+ height: '24px',
4316
+ color: '$neutrals800',
4317
+ borderRadius: '50%',
4318
+ fontSize: '$14',
4319
+ border: '1px solid $neutrals400',
4320
+ justifyContent: 'center',
4321
+ alignItems: 'center'
4322
+ }
4323
+ });
4124
4324
  function ConfirmWallets(props) {
4125
- var _swap$result, _swap$result2, _swap$result3;
4126
4325
  var onBack = props.onBack,
4127
4326
  loading = props.loading,
4128
4327
  onConfirm = props.onConfirm,
4129
- swap = props.swap,
4130
4328
  requiredWallets = props.requiredWallets,
4131
4329
  selectableWallets = props.selectableWallets,
4132
4330
  onChange = props.onChange,
4133
4331
  confirmDisabled = props.confirmDisabled,
4134
4332
  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];
4333
+ handleConnectChain = props.handleConnectChain;
4140
4334
  return React__default.createElement(SecondaryPage, {
4141
4335
  textField: false,
4142
4336
  title: "Confirm Swap",
@@ -4148,25 +4342,27 @@ function ConfirmWallets(props) {
4148
4342
  variant: "contained",
4149
4343
  onClick: onConfirm,
4150
4344
  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) {
4345
+ }, "Confirm Swap"))
4346
+ }, props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
4347
+ size: 16,
4348
+ direction: "vertical"
4349
+ }) : null, props.previewRoutes) : null, requiredWallets.map(function (wallet, index) {
4156
4350
  var list = selectableWallets.filter(function (w) {
4157
4351
  return wallet === w.chain;
4158
4352
  });
4159
- return React__default.createElement("div", {
4353
+ return React__default.createElement(Container$6, {
4160
4354
  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, {
4355
+ }, React__default.createElement("div", {
4356
+ className: "title"
4357
+ }, React__default.createElement("div", {
4358
+ className: "num"
4359
+ }, index + 1), React__default.createElement(Spacer, {
4360
+ size: 8
4361
+ }), React__default.createElement(Typography, {
4168
4362
  variant: "body2"
4169
- }, "You should connect a " + wallet + " supported wallet"))), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
4363
+ }, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
4364
+ type: "error"
4365
+ }, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
4170
4366
  variant: "contained",
4171
4367
  type: "primary",
4172
4368
  align: "grow",
@@ -4177,7 +4373,7 @@ function ConfirmWallets(props) {
4177
4373
  list: list,
4178
4374
  onChange: onChange
4179
4375
  }));
4180
- })));
4376
+ }));
4181
4377
  }
4182
4378
 
4183
4379
  function groupingOfSwaps(list) {
@@ -4449,5 +4645,5 @@ function SwapHistory(props) {
4449
4645
  }));
4450
4646
  }
4451
4647
 
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 };
4648
+ export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, ChevronRightIcon, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConfirmWallets, ConnectWalletsModal, CopyIcon, DeleteCircleIcon, DeleteWalletIcon, DisconnectIcon, 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 };
4453
4649
  //# sourceMappingURL=ui.esm.js.map