@rango-dev/ui 0.1.10-next.70 → 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 (38) 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/SecondaryPage/SecondaryPage.d.ts +1 -1
  8. package/dist/components/TextField/TextField.stories.d.ts +1 -1
  9. package/dist/components/TokenList/TokenList.d.ts +3 -1
  10. package/dist/components/TokenSelector/TokenSelector.d.ts +4 -2
  11. package/dist/components/index.d.ts +4 -0
  12. package/dist/ui.cjs.development.js +131 -26
  13. package/dist/ui.cjs.development.js.map +1 -1
  14. package/dist/ui.cjs.production.min.js +1 -1
  15. package/dist/ui.cjs.production.min.js.map +1 -1
  16. package/dist/ui.esm.js +128 -27
  17. package/dist/ui.esm.js.map +1 -1
  18. package/package.json +5 -3
  19. package/src/components/BlockchainSelector/BlockchainSelector.tsx +9 -3
  20. package/src/components/BlockchainsList/BlockchainsList.tsx +16 -6
  21. package/src/components/Checkbox/Checkbox.tsx +1 -1
  22. package/src/components/ColorPicker/ColorPicker.stories.tsx +36 -0
  23. package/src/components/ColorPicker/ColorPicker.tsx +81 -0
  24. package/src/components/ColorPicker/index.ts +1 -0
  25. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +1 -1
  26. package/src/components/Modal/Modal.tsx +1 -3
  27. package/src/components/Radio/Radio.tsx +8 -6
  28. package/src/components/SecondaryPage/SecondaryPage.tsx +1 -2
  29. package/src/components/Spacer/Spacer.stories.tsx +14 -1
  30. package/src/components/Spacer/Spacer.tsx +1 -1
  31. package/src/components/SwapContainer/SwapContainer.tsx +1 -0
  32. package/src/components/TextField/TextField.tsx +1 -1
  33. package/src/components/TokenList/TokenList.tsx +21 -9
  34. package/src/components/TokenSelector/TokenSelector.tsx +16 -3
  35. package/src/components/index.ts +4 -0
  36. package/src/helper/index.ts +1 -1
  37. package/dist/helpers.d.ts +0 -1
  38. 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';
@@ -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",
@@ -2620,9 +2631,7 @@ var ModalHeader = /*#__PURE__*/styled('div', {
2620
2631
  position: 'relative',
2621
2632
  marginBottom: '$16'
2622
2633
  });
2623
- var ContentContainer$2 = /*#__PURE__*/styled('div', {
2624
- overflowY: 'scroll'
2625
- });
2634
+ var ContentContainer$2 = /*#__PURE__*/styled('div', {});
2626
2635
  function Modal(props) {
2627
2636
  var title = props.title,
2628
2637
  content = props.content,
@@ -2968,7 +2977,7 @@ function LiquiditySourceList(props) {
2968
2977
 
2969
2978
  var filterLiquiditySources = function filterLiquiditySources(liquiditySources, searchedFor) {
2970
2979
  return liquiditySources.filter(function (liquiditySource) {
2971
- return containsText$1(liquiditySource.title, searchedFor || '');
2980
+ return containsText(liquiditySource.title, searchedFor || '');
2972
2981
  });
2973
2982
  };
2974
2983
  var ActionButton = /*#__PURE__*/styled(Button, {
@@ -3129,7 +3138,7 @@ var StyledRoot = /*#__PURE__*/styled(RadioGroup.Root, {
3129
3138
  var ItemContainer = /*#__PURE__*/styled('div', {
3130
3139
  display: 'flex',
3131
3140
  alignItems: 'center',
3132
- marginRight: '$24'
3141
+ marginRight: '$8'
3133
3142
  });
3134
3143
  var StyledItem = /*#__PURE__*/styled(RadioGroup.Item, {
3135
3144
  backgroundColor: '$neutrals300',
@@ -3142,6 +3151,9 @@ var StyledItem = /*#__PURE__*/styled(RadioGroup.Item, {
3142
3151
  backgroundColor: '$neutrals400'
3143
3152
  }
3144
3153
  });
3154
+ var Container$3 = /*#__PURE__*/styled('div', {
3155
+ display: 'flex'
3156
+ });
3145
3157
  var StyledIndicator = /*#__PURE__*/styled(RadioGroup.Indicator, {
3146
3158
  display: 'flex',
3147
3159
  alignItems: 'center',
@@ -3159,7 +3171,7 @@ var StyledIndicator = /*#__PURE__*/styled(RadioGroup.Indicator, {
3159
3171
  }
3160
3172
  });
3161
3173
  var Label$2 = /*#__PURE__*/styled('label', {
3162
- paddingLeft: '$16',
3174
+ paddingLeft: '$8',
3163
3175
  cursor: 'pointer'
3164
3176
  });
3165
3177
  function Radio(props) {
@@ -3168,7 +3180,7 @@ function Radio(props) {
3168
3180
  _props$direction = props.direction,
3169
3181
  direction = _props$direction === void 0 ? 'vertical' : _props$direction,
3170
3182
  style = props.style;
3171
- return React__default.createElement("form", null, React__default.createElement(StyledRoot, {
3183
+ return React__default.createElement(Container$3, null, React__default.createElement(StyledRoot, {
3172
3184
  onValueChange: onChange,
3173
3185
  defaultValue: defaultValue,
3174
3186
  direction: direction,
@@ -3309,6 +3321,7 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
3309
3321
  minWidth: '375px',
3310
3322
  width: '100%',
3311
3323
  backgroundColor: '$background',
3324
+ height: 'fit-content',
3312
3325
  display: 'flex',
3313
3326
  flexDirection: 'column',
3314
3327
  alignItems: 'end',
@@ -3325,7 +3338,7 @@ function SwapContainer(props) {
3325
3338
  }, React__default.createElement(ContentContainer$3, null, children));
3326
3339
  }
3327
3340
 
3328
- var Container$3 = /*#__PURE__*/styled('div', {
3341
+ var Container$4 = /*#__PURE__*/styled('div', {
3329
3342
  position: 'relative'
3330
3343
  });
3331
3344
  var ButtonContainer$1 = /*#__PURE__*/styled('div', {
@@ -3407,7 +3420,7 @@ function SwapDetail(_ref) {
3407
3420
  onClick = _ref.onClick;
3408
3421
  var firstStep = swap.steps[0];
3409
3422
  var lastStep = swap.steps[swap.steps.length - 1];
3410
- return React__default.createElement(Container$3, {
3423
+ return React__default.createElement(Container$4, {
3411
3424
  onClick: onClick.bind(null, swap.requestId)
3412
3425
  }, React__default.createElement(ButtonContainer$1, null, React__default.createElement(Button, {
3413
3426
  variant: "outlined",
@@ -3501,13 +3514,15 @@ var TokenAmountContainer = /*#__PURE__*/styled('div', {
3501
3514
  });
3502
3515
  var filterTokens = function filterTokens(list, searchedText, outputCount) {
3503
3516
  if (searchedText) return list.filter(function (token) {
3504
- 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);
3505
3518
  }).slice(0, outputCount);else return list.slice(0, outputCount);
3506
3519
  };
3507
3520
  function TokenList(props) {
3508
3521
  var list = props.list,
3509
3522
  searchedText = props.searchedText,
3510
- onChange = props.onChange;
3523
+ onChange = props.onChange,
3524
+ multiSelect = props.multiSelect,
3525
+ selectedList = props.selectedList;
3511
3526
  var _useState = React.useState(props.selected),
3512
3527
  selected = _useState[0],
3513
3528
  setSelected = _useState[1];
@@ -3515,6 +3530,14 @@ function TokenList(props) {
3515
3530
  setSelected(token);
3516
3531
  onChange(token);
3517
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
+ };
3518
3541
  var Token = function Token(_ref) {
3519
3542
  var _currentToken$balance;
3520
3543
  var filteredTokens = _ref.filteredTokens,
@@ -3535,7 +3558,7 @@ function TokenList(props) {
3535
3558
  size: "large",
3536
3559
  align: "start",
3537
3560
  onClick: changeSelected.bind(null, currentToken),
3538
- 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,
3539
3562
  prefix: React__default.createElement(TokenImage, {
3540
3563
  src: currentToken.image
3541
3564
  }),
@@ -3612,8 +3635,10 @@ function TokenSelector(props) {
3612
3635
  type = props.type,
3613
3636
  selected = props.selected,
3614
3637
  onChange = props.onChange,
3615
- onBack = props.onBack,
3616
- hasHeader = props.hasHeader;
3638
+ hasHeader = props.hasHeader,
3639
+ multiSelect = props.multiSelect,
3640
+ selectedList = props.selectedList,
3641
+ onBack = props.onBack;
3617
3642
  return React__default.createElement(SecondaryPage, {
3618
3643
  textField: true,
3619
3644
  textFieldPlaceholder: "Search Blockchain By Name",
@@ -3626,6 +3651,8 @@ function TokenSelector(props) {
3626
3651
  searchedText: searchedFor,
3627
3652
  list: list,
3628
3653
  selected: selected,
3654
+ selectedList: selectedList,
3655
+ multiSelect: multiSelect,
3629
3656
  onChange: onChange
3630
3657
  });
3631
3658
  }
@@ -3720,6 +3747,80 @@ function Tooltip(_ref) {
3720
3747
  })))));
3721
3748
  }
3722
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
+
3723
3824
  var Line$2 = /*#__PURE__*/styled('div', {
3724
3825
  width: '0',
3725
3826
  marginLeft: '$12',
@@ -4056,12 +4157,14 @@ exports.CheckWalletIcon = CheckWalletIcon;
4056
4157
  exports.Checkbox = Checkbox;
4057
4158
  exports.Chip = Chip;
4058
4159
  exports.CloseIcon = CloseIcon;
4160
+ exports.ColorPicker = ColorPicker;
4059
4161
  exports.ConfirmSwap = ConfirmSwap;
4060
4162
  exports.ConfirmWallets = ConfirmWallets;
4061
4163
  exports.ConnectWalletsModal = ConnectWalletsModal;
4062
4164
  exports.DeleteCircleIcon = DeleteCircleIcon;
4063
4165
  exports.DeleteWalletIcon = DeleteWalletIcon;
4064
4166
  exports.DownloadIcon = DownloadIcon;
4167
+ exports.FilledCircle = FilledCircle;
4065
4168
  exports.GasIcon = GasIcon;
4066
4169
  exports.History = History;
4067
4170
  exports.HistoryIcon = HistoryIcon;
@@ -4070,6 +4173,7 @@ exports.InfoCircleIcon = InfoCircleIcon;
4070
4173
  exports.LiquiditySourcesSelector = LiquiditySourcesSelector;
4071
4174
  exports.MinusCircleIcon = MinusCircleIcon;
4072
4175
  exports.Modal = Modal;
4176
+ exports.Radio = Radio;
4073
4177
  exports.RetryIcon = RetryIcon;
4074
4178
  exports.RetryLeftIcon = RetryLeftIcon;
4075
4179
  exports.RetryRightIcon = RetryRightIcon;
@@ -4090,6 +4194,7 @@ exports.SwapWalletIcon = SwapWalletIcon;
4090
4194
  exports.Switch = Switch;
4091
4195
  exports.TextField = TextField;
4092
4196
  exports.TimeIcon = TimeIcon;
4197
+ exports.TokenList = TokenList;
4093
4198
  exports.TokenSelector = TokenSelector;
4094
4199
  exports.Tooltip = Tooltip;
4095
4200
  exports.TrashIcon = TrashIcon;