@rango-dev/ui 0.1.10-next.69 → 0.1.10-next.71

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 (39) hide show
  1. package/dist/components/BlockchainSelector/BlockchainSelector.d.ts +3 -1
  2. package/dist/components/BlockchainsList/BlockchainsList.d.ts +3 -1
  3. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  4. package/dist/components/ColorPicker/ColorPicker.d.ts +9 -0
  5. package/dist/components/ColorPicker/ColorPicker.stories.d.ts +4 -0
  6. package/dist/components/ColorPicker/index.d.ts +1 -0
  7. package/dist/components/Modal/Modal.d.ts +1 -0
  8. package/dist/components/SecondaryPage/SecondaryPage.d.ts +1 -1
  9. package/dist/components/TextField/TextField.stories.d.ts +1 -1
  10. package/dist/components/TokenList/TokenList.d.ts +3 -1
  11. package/dist/components/TokenSelector/TokenSelector.d.ts +4 -2
  12. package/dist/components/index.d.ts +4 -0
  13. package/dist/ui.cjs.development.js +142 -31
  14. package/dist/ui.cjs.development.js.map +1 -1
  15. package/dist/ui.cjs.production.min.js +1 -1
  16. package/dist/ui.cjs.production.min.js.map +1 -1
  17. package/dist/ui.esm.js +139 -32
  18. package/dist/ui.esm.js.map +1 -1
  19. package/package.json +5 -3
  20. package/src/components/BlockchainSelector/BlockchainSelector.tsx +9 -3
  21. package/src/components/BlockchainsList/BlockchainsList.tsx +16 -6
  22. package/src/components/Checkbox/Checkbox.tsx +1 -1
  23. package/src/components/ColorPicker/ColorPicker.stories.tsx +36 -0
  24. package/src/components/ColorPicker/ColorPicker.tsx +81 -0
  25. package/src/components/ColorPicker/index.ts +1 -0
  26. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +1 -1
  27. package/src/components/Modal/Modal.tsx +20 -7
  28. package/src/components/Radio/Radio.tsx +8 -6
  29. package/src/components/SecondaryPage/SecondaryPage.tsx +1 -2
  30. package/src/components/Spacer/Spacer.stories.tsx +14 -1
  31. package/src/components/Spacer/Spacer.tsx +1 -1
  32. package/src/components/SwapContainer/SwapContainer.tsx +1 -0
  33. package/src/components/TextField/TextField.tsx +1 -1
  34. package/src/components/TokenList/TokenList.tsx +21 -9
  35. package/src/components/TokenSelector/TokenSelector.tsx +16 -3
  36. package/src/components/index.ts +4 -0
  37. package/src/helper/index.ts +1 -1
  38. package/dist/helpers.d.ts +0 -1
  39. package/src/helpers.ts +0 -2
@@ -4,11 +4,13 @@ export declare type LoadingStatus = 'loading' | 'success' | 'failed';
4
4
  export interface PropTypes {
5
5
  type?: 'Source' | 'Destination';
6
6
  list: BlockchainMeta[];
7
- selected: BlockchainMeta | null;
7
+ selected?: BlockchainMeta | null;
8
8
  onChange: (blockchain: BlockchainMeta) => void;
9
9
  onBack?: () => void;
10
10
  loadingStatus: LoadingStatus;
11
11
  hasHeader?: boolean;
12
12
  listContainerStyle?: CSSProperties;
13
+ multiSelect?: boolean;
14
+ selectedList?: BlockchainMeta[] | 'all';
13
15
  }
14
16
  export declare function BlockchainSelector(props: PropTypes): JSX.Element;
@@ -1,7 +1,9 @@
1
1
  import { BlockchainMeta } from 'rango-sdk';
2
2
  export interface PropTypes {
3
3
  list: BlockchainMeta[];
4
- selected: BlockchainMeta | null;
4
+ selected?: BlockchainMeta | null;
5
5
  onChange: (blockchain: BlockchainMeta) => void;
6
+ multiSelect?: boolean;
7
+ selectedList?: BlockchainMeta[] | 'all';
6
8
  }
7
9
  export declare function BlockchainsList(props: PropTypes): JSX.Element;
@@ -4,7 +4,7 @@ export interface PropTypes {
4
4
  defaultChecked?: boolean;
5
5
  label: string;
6
6
  checked?: boolean;
7
- onCheckedChange?: (checked: boolean | 'indeterminate') => void;
7
+ onCheckedChange?: (checked: boolean) => void;
8
8
  disabled?: boolean;
9
9
  name?: string;
10
10
  }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ColorResult } from 'react-color';
3
+ export interface PropTypes {
4
+ color: string;
5
+ place: 'top' | 'bottom' | 'left' | 'right';
6
+ onChangeColor: (color: ColorResult, event: React.ChangeEvent<HTMLInputElement>) => void;
7
+ label?: string;
8
+ }
9
+ export declare function ColorPicker({ color, onChangeColor, label, place }: PropTypes): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { PropTypes } from './ColorPicker';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, PropTypes>;
3
+ export default _default;
4
+ export declare const Main: (args: PropTypes) => JSX.Element;
@@ -0,0 +1 @@
1
+ export { ColorPicker } from './ColorPicker';
@@ -5,6 +5,7 @@ export interface PropTypes {
5
5
  open: boolean;
6
6
  onClose: () => void;
7
7
  content: React.ReactNode;
8
+ action?: React.ReactNode;
8
9
  containerStyle?: CSSProperties;
9
10
  contentStyle?: CSSProperties;
10
11
  }
@@ -9,7 +9,7 @@ export declare type PropTypes = ({
9
9
  textField: false;
10
10
  Content: React.ReactNode;
11
11
  }) & {
12
- title: string;
12
+ title?: string;
13
13
  onBack?: () => void;
14
14
  TopButton?: React.ReactNode;
15
15
  Footer?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PropTypes } from './TextField';
3
- declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, Pick<React.PropsWithChildren<PropTypes>, "style" | "size" | "form" | "label" | "slot" | "title" | "pattern" | "children" | "className" | "nonce" | "onResize" | "width" | "height" | "onScroll" | "hidden" | "color" | "type" | "list" | "onChange" | "onClick" | "prefix" | "suffix" | "disabled" | "id" | "lang" | "max" | "min" | "name" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "checked" | "translate" | "step" | "defaultValue" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "multiple" | "placeholder" | "readOnly" | "required" | "src" | "value" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & React.RefAttributes<HTMLInputElement>>;
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, Pick<React.PropsWithChildren<PropTypes>, "color" | "height" | "translate" | "width" | "list" | "onChange" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "hidden" | "size" | "type" | "onClick" | "prefix" | "suffix" | "disabled" | "children" | "className" | "id" | "lang" | "max" | "min" | "name" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "checked" | "step" | "defaultValue" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "multiple" | "placeholder" | "readOnly" | "required" | "src" | "value" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "nonce" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & React.RefAttributes<HTMLInputElement>>;
4
4
  export default _default;
5
5
  export declare const Main: (args: PropTypes) => JSX.Element;
6
6
  export declare const WithPrefix: (args: PropTypes) => JSX.Element;
@@ -7,8 +7,10 @@ export interface TokenWithAmount extends Token {
7
7
  }
8
8
  export interface PropTypes {
9
9
  list: TokenWithAmount[];
10
- selected: TokenWithAmount | null;
10
+ selected?: TokenWithAmount | null;
11
11
  searchedText: string;
12
12
  onChange: (token: TokenWithAmount) => void;
13
+ multiSelect?: boolean;
14
+ selectedList?: TokenWithAmount[] | 'all';
13
15
  }
14
16
  export declare function TokenList(props: PropTypes): JSX.Element;
@@ -2,9 +2,11 @@ import { TokenWithAmount } from '../TokenList/TokenList';
2
2
  export interface PropTypes {
3
3
  list: TokenWithAmount[];
4
4
  type?: 'Source' | 'Destination';
5
- selected: TokenWithAmount | null;
5
+ selected?: TokenWithAmount;
6
6
  onChange: (token: TokenWithAmount) => void;
7
- onBack?: () => void;
8
7
  hasHeader?: boolean;
8
+ multiSelect?: boolean;
9
+ onBack?: () => void;
10
+ selectedList?: TokenWithAmount[] | 'all';
9
11
  }
10
12
  export declare function TokenSelector(props: PropTypes): JSX.Element;
@@ -22,3 +22,7 @@ export * from './Tooltip';
22
22
  export * from './Typography';
23
23
  export * from './Wallet';
24
24
  export * from './Alert';
25
+ export * from './ColorPicker';
26
+ export * from './Radio';
27
+ export * from './TokenList';
28
+ export * from './common';
@@ -15,6 +15,7 @@ var reactWindow = require('react-window');
15
15
  var InfiniteLoader = _interopDefault(require('react-window-infinite-loader'));
16
16
  var AutoSizer = _interopDefault(require('react-virtualized-auto-sizer'));
17
17
  var RadixTooltip = require('@radix-ui/react-tooltip');
18
+ var reactColor = require('react-color');
18
19
 
19
20
  function _extends() {
20
21
  _extends = Object.assign ? Object.assign.bind() : function (target) {
@@ -1575,7 +1576,7 @@ var decimalNumber = function decimalNumber(number, toFixed) {
1575
1576
  return parseFloat(number).toFixed(toFixed);
1576
1577
  };
1577
1578
  var containsText = function containsText(text, searchText) {
1578
- return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
1579
+ return text.toLowerCase().includes(searchText.toLowerCase());
1579
1580
  };
1580
1581
 
1581
1582
  var waveSquares = /*#__PURE__*/keyframes({
@@ -1850,10 +1851,6 @@ function BestRoute(_ref) {
1850
1851
  }, "No routes found")));
1851
1852
  }
1852
1853
 
1853
- var containsText$1 = function containsText(text, searchText) {
1854
- return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
1855
- };
1856
-
1857
1854
  var _excluded$A = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
1858
1855
  var _ghost, _css, _css2, _css3, _css4;
1859
1856
  var ButtonContainer = /*#__PURE__*/styled('button', {
@@ -2223,7 +2220,9 @@ var Image = /*#__PURE__*/styled('img', {
2223
2220
  });
2224
2221
  function BlockchainsList(props) {
2225
2222
  var list = props.list,
2226
- onChange = props.onChange;
2223
+ onChange = props.onChange,
2224
+ multiSelect = props.multiSelect,
2225
+ selectedList = props.selectedList;
2227
2226
  var _useState = React.useState(props.selected),
2228
2227
  selected = _useState[0],
2229
2228
  setSelected = _useState[1];
@@ -2231,15 +2230,23 @@ function BlockchainsList(props) {
2231
2230
  setSelected(blockchain);
2232
2231
  onChange(blockchain);
2233
2232
  };
2233
+ var isSelect = function isSelect(name) {
2234
+ if (multiSelect && selectedList) {
2235
+ return selectedList === 'all' || selectedList.findIndex(function (item) {
2236
+ return name === item.name;
2237
+ }) > -1;
2238
+ }
2239
+ return name === (selected == null ? void 0 : selected.name);
2240
+ };
2234
2241
  return React__default.createElement(ListContainer, null, list.map(function (blockchain, index) {
2235
2242
  return React__default.createElement(Button, {
2236
- type: blockchain.name === (selected == null ? void 0 : selected.name) ? 'primary' : undefined,
2243
+ type: isSelect(blockchain.name) ? 'primary' : undefined,
2237
2244
  variant: "outlined",
2238
2245
  size: "large",
2239
2246
  prefix: React__default.createElement(Image, {
2240
2247
  src: blockchain.logo
2241
2248
  }),
2242
- suffix: blockchain.name === (selected == null ? void 0 : selected.name) ? React__default.createElement(FilledCircle, null) : undefined,
2249
+ suffix: isSelect(blockchain.name) ? React__default.createElement(FilledCircle, null) : undefined,
2243
2250
  align: "start",
2244
2251
  onClick: changeSelectedBlockchain.bind(null, blockchain),
2245
2252
  key: index
@@ -2324,7 +2331,7 @@ var Input = /*#__PURE__*/styled('input', {
2324
2331
  });
2325
2332
  var Label = /*#__PURE__*/styled('label', {
2326
2333
  display: 'inline-block',
2327
- fontSize: '$16',
2334
+ fontSize: '$14',
2328
2335
  marginBottom: '$4'
2329
2336
  });
2330
2337
  var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
@@ -2475,7 +2482,7 @@ var ListContainer$1 = /*#__PURE__*/styled('div', {
2475
2482
  });
2476
2483
  var filterBlockchains = function filterBlockchains(list, searchedFor) {
2477
2484
  return list.filter(function (blockchain) {
2478
- return containsText$1(blockchain.name, searchedFor) || containsText$1(blockchain.displayName, searchedFor);
2485
+ return containsText(blockchain.name, searchedFor) || containsText(blockchain.displayName, searchedFor);
2479
2486
  });
2480
2487
  };
2481
2488
  function BlockchainSelector(props) {
@@ -2486,12 +2493,14 @@ function BlockchainSelector(props) {
2486
2493
  onBack = props.onBack,
2487
2494
  loadingStatus = props.loadingStatus,
2488
2495
  hasHeader = props.hasHeader,
2489
- listContainerStyle = props.listContainerStyle;
2496
+ listContainerStyle = props.listContainerStyle,
2497
+ multiSelect = props.multiSelect,
2498
+ selectedList = props.selectedList;
2490
2499
  return React__default.createElement(SecondaryPage, {
2491
2500
  textField: true,
2501
+ hasHeader: hasHeader,
2492
2502
  textFieldPlaceholder: "Search Blockchain By Name",
2493
2503
  title: "Select " + type + " Network",
2494
- hasHeader: hasHeader,
2495
2504
  onBack: onBack,
2496
2505
  Content: function Content(_ref) {
2497
2506
  var searchedFor = _ref.searchedFor;
@@ -2506,6 +2515,8 @@ function BlockchainSelector(props) {
2506
2515
  }), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length > 0 ? React__default.createElement(BlockchainsList, {
2507
2516
  list: filteredBlockchains,
2508
2517
  selected: selected,
2518
+ multiSelect: multiSelect,
2519
+ selectedList: selectedList,
2509
2520
  onChange: onChange
2510
2521
  }) : React__default.createElement(Alert, {
2511
2522
  type: "secondary",
@@ -2606,7 +2617,12 @@ var ModalContainer = /*#__PURE__*/styled('div', {
2606
2617
  padding: '$16 $16',
2607
2618
  display: 'flex',
2608
2619
  flexDirection: 'column',
2609
- boxShadow: '$s'
2620
+ boxShadow: '$s',
2621
+ zIndex: 10
2622
+ });
2623
+ var Row = /*#__PURE__*/styled('div', {
2624
+ display: 'flex',
2625
+ alignItems: 'center'
2610
2626
  });
2611
2627
  var ModalHeader = /*#__PURE__*/styled('div', {
2612
2628
  display: 'flex',
@@ -2615,15 +2631,14 @@ var ModalHeader = /*#__PURE__*/styled('div', {
2615
2631
  position: 'relative',
2616
2632
  marginBottom: '$16'
2617
2633
  });
2618
- var ContentContainer$2 = /*#__PURE__*/styled('div', {
2619
- overflowY: 'scroll'
2620
- });
2634
+ var ContentContainer$2 = /*#__PURE__*/styled('div', {});
2621
2635
  function Modal(props) {
2622
2636
  var title = props.title,
2623
2637
  content = props.content,
2624
2638
  open = props.open,
2625
2639
  onClose = props.onClose,
2626
2640
  containerStyle = props.containerStyle,
2641
+ action = props.action,
2627
2642
  contentStyle = props.contentStyle;
2628
2643
  var handleBackDropClick = function handleBackDropClick(event) {
2629
2644
  if (event.target === event.currentTarget) onClose();
@@ -2634,10 +2649,10 @@ function Modal(props) {
2634
2649
  style: containerStyle
2635
2650
  }, React__default.createElement(ModalHeader, null, React__default.createElement(Typography, {
2636
2651
  variant: "h4"
2637
- }, title), React__default.createElement(CloseIcon, {
2652
+ }, title), React__default.createElement(Row, null, action, React__default.createElement(CloseIcon, {
2638
2653
  size: 24,
2639
2654
  onClick: onClose
2640
- })), React__default.createElement(ContentContainer$2, {
2655
+ }))), React__default.createElement(ContentContainer$2, {
2641
2656
  style: contentStyle
2642
2657
  }, content))), document.body));
2643
2658
  }
@@ -2962,7 +2977,7 @@ function LiquiditySourceList(props) {
2962
2977
 
2963
2978
  var filterLiquiditySources = function filterLiquiditySources(liquiditySources, searchedFor) {
2964
2979
  return liquiditySources.filter(function (liquiditySource) {
2965
- return containsText$1(liquiditySource.title, searchedFor || '');
2980
+ return containsText(liquiditySource.title, searchedFor || '');
2966
2981
  });
2967
2982
  };
2968
2983
  var ActionButton = /*#__PURE__*/styled(Button, {
@@ -3000,7 +3015,7 @@ function LiquiditySourcesSelector(props) {
3000
3015
  });
3001
3016
  }
3002
3017
 
3003
- var Row = /*#__PURE__*/styled('div', {
3018
+ var Row$1 = /*#__PURE__*/styled('div', {
3004
3019
  display: 'flex',
3005
3020
  flexWrap: 'wrap'
3006
3021
  });
@@ -3084,7 +3099,7 @@ function SelectableWalletList(_ref) {
3084
3099
  return item.selected;
3085
3100
  })) == null ? void 0 : _list$find2.walletType) || '');
3086
3101
  }, [list]);
3087
- return React__default.createElement(Row, null, list.map(function (w, index) {
3102
+ return React__default.createElement(Row$1, null, list.map(function (w, index) {
3088
3103
  var checked = active === w.walletType;
3089
3104
  return React__default.createElement(Container$2, {
3090
3105
  checked: checked,
@@ -3123,7 +3138,7 @@ var StyledRoot = /*#__PURE__*/styled(RadioGroup.Root, {
3123
3138
  var ItemContainer = /*#__PURE__*/styled('div', {
3124
3139
  display: 'flex',
3125
3140
  alignItems: 'center',
3126
- marginRight: '$24'
3141
+ marginRight: '$8'
3127
3142
  });
3128
3143
  var StyledItem = /*#__PURE__*/styled(RadioGroup.Item, {
3129
3144
  backgroundColor: '$neutrals300',
@@ -3136,6 +3151,9 @@ var StyledItem = /*#__PURE__*/styled(RadioGroup.Item, {
3136
3151
  backgroundColor: '$neutrals400'
3137
3152
  }
3138
3153
  });
3154
+ var Container$3 = /*#__PURE__*/styled('div', {
3155
+ display: 'flex'
3156
+ });
3139
3157
  var StyledIndicator = /*#__PURE__*/styled(RadioGroup.Indicator, {
3140
3158
  display: 'flex',
3141
3159
  alignItems: 'center',
@@ -3153,7 +3171,7 @@ var StyledIndicator = /*#__PURE__*/styled(RadioGroup.Indicator, {
3153
3171
  }
3154
3172
  });
3155
3173
  var Label$2 = /*#__PURE__*/styled('label', {
3156
- paddingLeft: '$16',
3174
+ paddingLeft: '$8',
3157
3175
  cursor: 'pointer'
3158
3176
  });
3159
3177
  function Radio(props) {
@@ -3162,7 +3180,7 @@ function Radio(props) {
3162
3180
  _props$direction = props.direction,
3163
3181
  direction = _props$direction === void 0 ? 'vertical' : _props$direction,
3164
3182
  style = props.style;
3165
- return React__default.createElement("form", null, React__default.createElement(StyledRoot, {
3183
+ return React__default.createElement(Container$3, null, React__default.createElement(StyledRoot, {
3166
3184
  onValueChange: onChange,
3167
3185
  defaultValue: defaultValue,
3168
3186
  direction: direction,
@@ -3303,6 +3321,7 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
3303
3321
  minWidth: '375px',
3304
3322
  width: '100%',
3305
3323
  backgroundColor: '$background',
3324
+ height: 'fit-content',
3306
3325
  display: 'flex',
3307
3326
  flexDirection: 'column',
3308
3327
  alignItems: 'end',
@@ -3319,7 +3338,7 @@ function SwapContainer(props) {
3319
3338
  }, React__default.createElement(ContentContainer$3, null, children));
3320
3339
  }
3321
3340
 
3322
- var Container$3 = /*#__PURE__*/styled('div', {
3341
+ var Container$4 = /*#__PURE__*/styled('div', {
3323
3342
  position: 'relative'
3324
3343
  });
3325
3344
  var ButtonContainer$1 = /*#__PURE__*/styled('div', {
@@ -3401,7 +3420,7 @@ function SwapDetail(_ref) {
3401
3420
  onClick = _ref.onClick;
3402
3421
  var firstStep = swap.steps[0];
3403
3422
  var lastStep = swap.steps[swap.steps.length - 1];
3404
- return React__default.createElement(Container$3, {
3423
+ return React__default.createElement(Container$4, {
3405
3424
  onClick: onClick.bind(null, swap.requestId)
3406
3425
  }, React__default.createElement(ButtonContainer$1, null, React__default.createElement(Button, {
3407
3426
  variant: "outlined",
@@ -3495,13 +3514,15 @@ var TokenAmountContainer = /*#__PURE__*/styled('div', {
3495
3514
  });
3496
3515
  var filterTokens = function filterTokens(list, searchedText, outputCount) {
3497
3516
  if (searchedText) return list.filter(function (token) {
3498
- return containsText$1(token.symbol, searchedText) || containsText$1(token.address || '', searchedText) || containsText$1(token.name || '', searchedText);
3517
+ return containsText(token.symbol, searchedText) || containsText(token.address || '', searchedText) || containsText(token.name || '', searchedText);
3499
3518
  }).slice(0, outputCount);else return list.slice(0, outputCount);
3500
3519
  };
3501
3520
  function TokenList(props) {
3502
3521
  var list = props.list,
3503
3522
  searchedText = props.searchedText,
3504
- onChange = props.onChange;
3523
+ onChange = props.onChange,
3524
+ multiSelect = props.multiSelect,
3525
+ selectedList = props.selectedList;
3505
3526
  var _useState = React.useState(props.selected),
3506
3527
  selected = _useState[0],
3507
3528
  setSelected = _useState[1];
@@ -3509,6 +3530,14 @@ function TokenList(props) {
3509
3530
  setSelected(token);
3510
3531
  onChange(token);
3511
3532
  };
3533
+ var isSelect = function isSelect(token) {
3534
+ if (multiSelect && selectedList) {
3535
+ return selectedList === 'all' || selectedList.map(function (item) {
3536
+ return item.symbol + item.address;
3537
+ }).indexOf(token.symbol + token.address) > -1;
3538
+ }
3539
+ return (selected == null ? void 0 : selected.symbol) === token.symbol && (selected == null ? void 0 : selected.address) === token.address;
3540
+ };
3512
3541
  var Token = function Token(_ref) {
3513
3542
  var _currentToken$balance;
3514
3543
  var filteredTokens = _ref.filteredTokens,
@@ -3529,7 +3558,7 @@ function TokenList(props) {
3529
3558
  size: "large",
3530
3559
  align: "start",
3531
3560
  onClick: changeSelected.bind(null, currentToken),
3532
- type: (selected == null ? void 0 : selected.symbol) === currentToken.symbol && (selected == null ? void 0 : selected.address) === currentToken.address ? 'primary' : undefined,
3561
+ type: isSelect(currentToken) ? 'primary' : undefined,
3533
3562
  prefix: React__default.createElement(TokenImage, {
3534
3563
  src: currentToken.image
3535
3564
  }),
@@ -3606,8 +3635,10 @@ function TokenSelector(props) {
3606
3635
  type = props.type,
3607
3636
  selected = props.selected,
3608
3637
  onChange = props.onChange,
3609
- onBack = props.onBack,
3610
- hasHeader = props.hasHeader;
3638
+ hasHeader = props.hasHeader,
3639
+ multiSelect = props.multiSelect,
3640
+ selectedList = props.selectedList,
3641
+ onBack = props.onBack;
3611
3642
  return React__default.createElement(SecondaryPage, {
3612
3643
  textField: true,
3613
3644
  textFieldPlaceholder: "Search Blockchain By Name",
@@ -3620,6 +3651,8 @@ function TokenSelector(props) {
3620
3651
  searchedText: searchedFor,
3621
3652
  list: list,
3622
3653
  selected: selected,
3654
+ selectedList: selectedList,
3655
+ multiSelect: multiSelect,
3623
3656
  onChange: onChange
3624
3657
  });
3625
3658
  }
@@ -3714,6 +3747,80 @@ function Tooltip(_ref) {
3714
3747
  })))));
3715
3748
  }
3716
3749
 
3750
+ var Container$5 = /*#__PURE__*/styled('div', {
3751
+ position: 'relative'
3752
+ });
3753
+ var Color = /*#__PURE__*/styled('div', {
3754
+ border: '1px solid $neutrals300',
3755
+ borderRadius: '$5',
3756
+ width: '$32',
3757
+ height: '$32'
3758
+ });
3759
+ var Cover = /*#__PURE__*/styled('div', {
3760
+ position: 'fixed',
3761
+ top: '0px',
3762
+ right: '0px',
3763
+ bottom: '0px',
3764
+ left: '0px'
3765
+ });
3766
+ var Popover = /*#__PURE__*/styled('div', {
3767
+ position: 'absolute',
3768
+ zIndex: '2',
3769
+ variants: {
3770
+ place: {
3771
+ top: {
3772
+ top: '-241px'
3773
+ },
3774
+ bottom: {},
3775
+ left: {
3776
+ top: '-50%',
3777
+ left: '-225px'
3778
+ },
3779
+ right: {
3780
+ top: '-50%',
3781
+ right: '-225px'
3782
+ }
3783
+ }
3784
+ }
3785
+ });
3786
+ function ColorPicker(_ref) {
3787
+ var color = _ref.color,
3788
+ onChangeColor = _ref.onChangeColor,
3789
+ label = _ref.label,
3790
+ place = _ref.place;
3791
+ var _useState = React.useState(false),
3792
+ displayColorPicker = _useState[0],
3793
+ setDisplayColorPicker = _useState[1];
3794
+ return React__default.createElement(Container$5, null, React__default.createElement(Typography, {
3795
+ mb: 4,
3796
+ variant: "body2"
3797
+ }, label), React__default.createElement(Button, {
3798
+ variant: "outlined",
3799
+ prefix: React__default.createElement(Color, {
3800
+ style: {
3801
+ backgroundColor: color
3802
+ }
3803
+ }),
3804
+ fullWidth: true,
3805
+ align: "start",
3806
+ size: "large",
3807
+ onClick: function onClick() {
3808
+ return setDisplayColorPicker(function (prev) {
3809
+ return !prev;
3810
+ });
3811
+ }
3812
+ }, color), displayColorPicker && React__default.createElement(Popover, {
3813
+ place: place
3814
+ }, React__default.createElement(Cover, {
3815
+ onClick: function onClick() {
3816
+ return setDisplayColorPicker(false);
3817
+ }
3818
+ }), React__default.createElement(reactColor.ChromePicker, {
3819
+ color: color,
3820
+ onChange: onChangeColor
3821
+ })));
3822
+ }
3823
+
3717
3824
  var Line$2 = /*#__PURE__*/styled('div', {
3718
3825
  width: '0',
3719
3826
  marginLeft: '$12',
@@ -4050,12 +4157,14 @@ exports.CheckWalletIcon = CheckWalletIcon;
4050
4157
  exports.Checkbox = Checkbox;
4051
4158
  exports.Chip = Chip;
4052
4159
  exports.CloseIcon = CloseIcon;
4160
+ exports.ColorPicker = ColorPicker;
4053
4161
  exports.ConfirmSwap = ConfirmSwap;
4054
4162
  exports.ConfirmWallets = ConfirmWallets;
4055
4163
  exports.ConnectWalletsModal = ConnectWalletsModal;
4056
4164
  exports.DeleteCircleIcon = DeleteCircleIcon;
4057
4165
  exports.DeleteWalletIcon = DeleteWalletIcon;
4058
4166
  exports.DownloadIcon = DownloadIcon;
4167
+ exports.FilledCircle = FilledCircle;
4059
4168
  exports.GasIcon = GasIcon;
4060
4169
  exports.History = History;
4061
4170
  exports.HistoryIcon = HistoryIcon;
@@ -4064,6 +4173,7 @@ exports.InfoCircleIcon = InfoCircleIcon;
4064
4173
  exports.LiquiditySourcesSelector = LiquiditySourcesSelector;
4065
4174
  exports.MinusCircleIcon = MinusCircleIcon;
4066
4175
  exports.Modal = Modal;
4176
+ exports.Radio = Radio;
4067
4177
  exports.RetryIcon = RetryIcon;
4068
4178
  exports.RetryLeftIcon = RetryLeftIcon;
4069
4179
  exports.RetryRightIcon = RetryRightIcon;
@@ -4084,6 +4194,7 @@ exports.SwapWalletIcon = SwapWalletIcon;
4084
4194
  exports.Switch = Switch;
4085
4195
  exports.TextField = TextField;
4086
4196
  exports.TimeIcon = TimeIcon;
4197
+ exports.TokenList = TokenList;
4087
4198
  exports.TokenSelector = TokenSelector;
4088
4199
  exports.Tooltip = Tooltip;
4089
4200
  exports.TrashIcon = TrashIcon;