@rango-dev/ui 0.1.11-next.6 → 0.1.11-next.8

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.
@@ -10,6 +10,7 @@ interface PropTypes {
10
10
  name: string;
11
11
  };
12
12
  amount: string;
13
+ estimatedAmount?: string;
13
14
  };
14
15
  }
15
16
  export declare function Token(props: PropTypes): JSX.Element;
@@ -7,4 +7,4 @@ export declare type PropTypes = {
7
7
  } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'size'> & {
8
8
  ref?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
9
9
  };
10
- export declare const TextField: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<PropTypes>, "color" | "content" | "height" | "translate" | "width" | "label" | "prefix" | "size" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "children" | "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" | "onClick" | "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" | "suffix"> & React.RefAttributes<HTMLInputElement>>;
10
+ export declare const TextField: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<PropTypes>, "color" | "content" | "height" | "translate" | "width" | "hidden" | "label" | "prefix" | "size" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "children" | "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" | "onClick" | "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" | "suffix"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties } from '@stitches/react';
2
2
  import { PropsWithChildren } from 'react';
3
3
  export interface PropTypes {
4
- variant: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body1' | 'body2' | 'body3' | 'caption';
4
+ variant: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'title' | 'body1' | 'body2' | 'body3' | 'caption';
5
5
  align?: 'center' | 'left' | 'right';
6
6
  noWrap?: boolean;
7
7
  mt?: 2 | 4 | 8 | 12;
@@ -1,5 +1,6 @@
1
1
  import React, { PropsWithChildren, ReactNode } from 'react';
2
2
  import { SelectableWallet } from '../../types';
3
+ declare type Message = string | ReactNode;
3
4
  export interface PropTypes {
4
5
  onBack: () => void;
5
6
  onConfirm?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
@@ -13,8 +14,9 @@ export interface PropTypes {
13
14
  previewInputs?: ReactNode;
14
15
  previewRoutes?: ReactNode;
15
16
  confirmButtonTitle: string;
16
- errors?: ReactNode[];
17
- warnings?: ReactNode[];
17
+ errors?: Message[];
18
+ warnings?: Message[];
18
19
  extraMessages?: ReactNode;
19
20
  }
20
21
  export declare function ConfirmSwap(props: PropsWithChildren<PropTypes>): JSX.Element;
22
+ export {};
@@ -1492,6 +1492,13 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1492
1492
  fontSize: '$18'
1493
1493
  }
1494
1494
  },
1495
+ title: {
1496
+ fontSize: '$14',
1497
+ fontWeight: '$500',
1498
+ '@md': {
1499
+ fontSize: '$15'
1500
+ }
1501
+ },
1495
1502
  body1: {
1496
1503
  fontSize: '$14',
1497
1504
  fontWeight: '$400',
@@ -1716,13 +1723,13 @@ function StepDetail(props) {
1716
1723
  pl: direction === 'horizontal'
1717
1724
  }, amount && React__default.createElement(Typography, {
1718
1725
  noWrap: true,
1719
- variant: direction === 'vertical' ? 'body2' : 'h6'
1726
+ variant: direction === 'vertical' ? 'body2' : 'title'
1720
1727
  }, amount), !amount && estimatedAmount && React__default.createElement(Typography, {
1721
1728
  noWrap: true,
1722
- variant: direction === 'vertical' ? 'body2' : 'h6',
1723
- color: '$neutrals500'
1729
+ variant: direction === 'vertical' ? 'body2' : 'title',
1730
+ color: '$neutrals600'
1724
1731
  }, estimatedAmount), "\xA0", React__default.createElement(Typography, {
1725
- variant: direction === 'vertical' ? 'body2' : 'h6',
1732
+ variant: direction === 'vertical' ? 'body2' : 'title',
1726
1733
  noWrap: true
1727
1734
  }, symbol), React__default.createElement(SubTitle, {
1728
1735
  noWrap: true,
@@ -2651,6 +2658,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
2651
2658
  position: 'relative',
2652
2659
  alignItems: 'center',
2653
2660
  color: '$foreground',
2661
+ overflowX: 'hidden',
2654
2662
  transition: 'border-color ease .3s',
2655
2663
  '&:focus-within': {
2656
2664
  borderColor: '$success',
@@ -3001,7 +3009,7 @@ function Alert(props) {
3001
3009
  }
3002
3010
  }, title && React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
3003
3011
  className: "title",
3004
- variant: "h6",
3012
+ variant: "title",
3005
3013
  color: type
3006
3014
  }, title), !!children && React__default.createElement(Spacer, {
3007
3015
  size: 8,
@@ -3948,13 +3956,13 @@ var SlippageChipsContainer = /*#__PURE__*/styled('div', {
3948
3956
  var LiquiditySourceContainer = /*#__PURE__*/styled(BaseContainer, {
3949
3957
  display: 'flex',
3950
3958
  justifyContent: 'space-between',
3951
- marginTop: '$32',
3959
+ marginTop: '$16',
3952
3960
  cursor: 'pointer'
3953
3961
  });
3954
3962
  var InfiniteContainer = /*#__PURE__*/styled(BaseContainer, {
3955
3963
  display: 'flex',
3956
3964
  justifyContent: 'space-between',
3957
- marginTop: '$32'
3965
+ marginTop: '$16'
3958
3966
  });
3959
3967
  var StyledAngleRight = /*#__PURE__*/styled(AngleRightIcon, {
3960
3968
  marginLeft: '$8'
@@ -3965,7 +3973,7 @@ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
3965
3973
  justifyContent: 'center'
3966
3974
  });
3967
3975
  var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
3968
- marginTop: '$32'
3976
+ marginTop: '$16'
3969
3977
  });
3970
3978
  var Head = /*#__PURE__*/styled('div', {
3971
3979
  display: 'flex',
@@ -4087,14 +4095,14 @@ var MainContainer$2 = /*#__PURE__*/styled('div', {
4087
4095
  width: '100%',
4088
4096
  minWidth: '375px',
4089
4097
  maxWidth: '512px',
4090
- maxHeight: '595px',
4091
4098
  padding: '$16',
4092
4099
  boxSizing: 'border-box',
4093
4100
  backgroundColor: '$background',
4094
4101
  variants: {
4095
4102
  fixedHeight: {
4096
4103
  "true": {
4097
- height: '595px'
4104
+ height: '595px',
4105
+ maxHeight: '595px'
4098
4106
  },
4099
4107
  "false": {
4100
4108
  height: 'auto'
@@ -4120,6 +4128,9 @@ var TokenContainer = /*#__PURE__*/styled('div', {
4120
4128
  width: '160px',
4121
4129
  '& .amount': {
4122
4130
  fontWeight: 'bold'
4131
+ },
4132
+ '& .estimated': {
4133
+ color: '$neutrals600'
4123
4134
  }
4124
4135
  });
4125
4136
  var TokenImage = /*#__PURE__*/styled('div', {
@@ -4140,23 +4151,30 @@ var TokenImage = /*#__PURE__*/styled('div', {
4140
4151
  }
4141
4152
  });
4142
4153
  function Token(props) {
4154
+ var _props$data = props.data,
4155
+ token = _props$data.token,
4156
+ blockchain = _props$data.blockchain,
4157
+ amount = _props$data.amount,
4158
+ estimatedAmount = _props$data.estimatedAmount;
4143
4159
  return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage, null, React__default.createElement(Image, {
4144
- src: props.data.token.logo,
4160
+ src: token.logo,
4145
4161
  alt: "",
4146
4162
  size: 24
4147
4163
  }), React__default.createElement("div", {
4148
4164
  className: "overlay"
4149
4165
  }, React__default.createElement(Image, {
4150
- src: props.data.blockchain.logo,
4151
- alt: props.data.blockchain.name,
4166
+ src: blockchain.logo,
4167
+ alt: blockchain.name,
4152
4168
  size: 12
4153
4169
  }))), React__default.createElement(Spacer, {
4154
4170
  size: 8
4155
- }), React__default.createElement("span", {
4171
+ }), !!amount && React__default.createElement("span", {
4156
4172
  className: "amount"
4157
- }, props.data.amount), React__default.createElement(Spacer, {
4173
+ }, props.data.amount), !amount && estimatedAmount && React__default.createElement("span", {
4174
+ className: "amount estimated"
4175
+ }, props.data.estimatedAmount), React__default.createElement(Spacer, {
4158
4176
  size: 4
4159
- }), props.data.token.symbol);
4177
+ }), token.symbol);
4160
4178
  }
4161
4179
 
4162
4180
  var Container$3 = /*#__PURE__*/styled('div', {
@@ -4175,12 +4193,6 @@ var Container$3 = /*#__PURE__*/styled('div', {
4175
4193
  fontWeight: 'bold',
4176
4194
  fontSize: '$12'
4177
4195
  },
4178
- '&.running': {
4179
- color: '$foreground'
4180
- },
4181
- '&.failed,&.success': {
4182
- color: '$neutrals600'
4183
- },
4184
4196
  '&.failed .status': {
4185
4197
  color: '$error'
4186
4198
  },
@@ -4210,7 +4222,6 @@ function SwapDetail(_ref) {
4210
4222
  symbol: firstStep.fromSymbol
4211
4223
  },
4212
4224
  blockchain: {
4213
- // @ts-ignore
4214
4225
  logo: firstStep.fromBlockchainLogo || '',
4215
4226
  name: firstStep.fromBlockchain
4216
4227
  },
@@ -4229,11 +4240,11 @@ function SwapDetail(_ref) {
4229
4240
  symbol: lastStep.toSymbol
4230
4241
  },
4231
4242
  blockchain: {
4232
- // @ts-ignore
4233
- logo: lastStep.toBlockchainLogo,
4243
+ logo: lastStep.toBlockchainLogo || '',
4234
4244
  name: lastStep.toBlockchain
4235
4245
  },
4236
- amount: limitDecimalPlaces(lastStep.outputAmount || lastStep.expectedOutputAmountHumanReadable || '')
4246
+ amount: limitDecimalPlaces(lastStep.outputAmount || ''),
4247
+ estimatedAmount: limitDecimalPlaces(lastStep.expectedOutputAmountHumanReadable || '')
4237
4248
  }
4238
4249
  })), React__default.createElement("div", {
4239
4250
  className: "status"
@@ -4407,7 +4418,7 @@ function Drawer(props) {
4407
4418
  anchor: anchor,
4408
4419
  style: containerStyle
4409
4420
  }, React__default.createElement(DrawerHeader, null, React__default.createElement(Typography, {
4410
- variant: "h4"
4421
+ variant: "h6"
4411
4422
  }, title), showClose && React__default.createElement(CloseIcon, {
4412
4423
  size: 24,
4413
4424
  onClick: onClose
@@ -4484,17 +4495,25 @@ function ConfirmSwap(props) {
4484
4495
  }, React__default.createElement(MainContainer$3, null, React__default.createElement("div", null, extraMessages || null, React__default.createElement(Alerts, null, errors == null ? void 0 : errors.map(function (error, index) {
4485
4496
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
4486
4497
  direction: "vertical"
4487
- }), React__default.createElement(Alert, {
4498
+ }), React__default.createElement(Alert, Object.assign({
4488
4499
  type: "error",
4489
4500
  key: index
4490
- }, error));
4501
+ }, typeof error === 'string' ? {
4502
+ title: error
4503
+ } : {
4504
+ children: error
4505
+ })));
4491
4506
  }), warnings == null ? void 0 : warnings.map(function (warning, index) {
4492
4507
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
4493
4508
  direction: "vertical"
4494
- }), React__default.createElement(Alert, {
4509
+ }), React__default.createElement(Alert, Object.assign({
4495
4510
  type: "warning",
4496
4511
  key: index
4497
- }, warning));
4512
+ }, typeof warning === 'string' ? {
4513
+ title: warning
4514
+ } : {
4515
+ children: warning
4516
+ })));
4498
4517
  }))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
4499
4518
  size: 16,
4500
4519
  direction: "vertical"
@@ -4514,7 +4533,7 @@ function ConfirmSwap(props) {
4514
4533
  variant: "body2"
4515
4534
  }, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
4516
4535
  type: "error"
4517
- }, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
4536
+ }, "You need to connect a compatible wallet with ", wallet, ".")), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
4518
4537
  variant: "contained",
4519
4538
  type: "primary",
4520
4539
  align: "grow",
@@ -4558,7 +4577,6 @@ var SwapsGroup = function SwapsGroup(props) {
4558
4577
  key: index
4559
4578
  }, React__default.createElement(Typography, {
4560
4579
  variant: "body2",
4561
- color: "neutrals600",
4562
4580
  className: "group-title"
4563
4581
  }, group.title), group.swaps.map(function (swap, index) {
4564
4582
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(SwapDetail, {
@@ -4583,7 +4601,7 @@ function History(_ref) {
4583
4601
  return React__default.createElement(SecondaryPage, {
4584
4602
  onBack: onBack,
4585
4603
  textField: true,
4586
- textFieldPlaceholder: "Search by Blockchain/Token/Request Id",
4604
+ textFieldPlaceholder: "Search by Network, Token or Request ID",
4587
4605
  title: "Swaps"
4588
4606
  }, function (searchedFor) {
4589
4607
  var filterSwaps = filteredHistory(list, searchedFor);
@@ -4637,21 +4655,21 @@ var SwapMessages = function SwapMessages(props) {
4637
4655
  onClick: props.switchNetwork
4638
4656
  }, "Change network to ", currentStepBlockchain)
4639
4657
  }), !!detailedMessage.content ? React__default.createElement(DetailedMessage, null, React__default.createElement(Typography, {
4640
- variant: "body2"
4658
+ variant: "body3"
4641
4659
  }, shouldShowMoreDetailsButton && !expandedMessage ? detailedMessage.content.substring(0, allowedNumberOfChars) + (allowedNumberOfChars > 0 ? '...' : '') : detailedMessage.content)) : null, !!lastConvertedTokenInFailedSwap && React__default.createElement(React__default.Fragment, null, React__default.createElement("p", null, React__default.createElement(Typography, {
4642
- variant: "body2"
4660
+ variant: "body3"
4643
4661
  }, "Don't worry, your fund is\xA0"), React__default.createElement(SuccessText, {
4644
- variant: "body2"
4662
+ variant: "body3"
4645
4663
  }, React__default.createElement("b", null, "Safe"))), React__default.createElement("p", null, React__default.createElement(Typography, {
4646
- variant: "body2"
4664
+ variant: "body3"
4647
4665
  }, "It is converted to \xA0", React__default.createElement("u", null, lastConvertedTokenInFailedSwap.outputAmount), "\xA0"), React__default.createElement(SuccessText, {
4648
- variant: "body2"
4666
+ variant: "body3"
4649
4667
  }, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.symbol, "\xA0")), React__default.createElement(Typography, {
4650
- variant: "body2"
4668
+ variant: "body3"
4651
4669
  }, "on your\xA0"), React__default.createElement(SuccessText, {
4652
- variant: "body2"
4670
+ variant: "body3"
4653
4671
  }, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.blockchain, "\xA0")), React__default.createElement(Typography, {
4654
- variant: "body2"
4672
+ variant: "body3"
4655
4673
  }, "wallet"))));
4656
4674
  };
4657
4675
 
@@ -4674,7 +4692,7 @@ var SwapperContainer$1 = /*#__PURE__*/styled('div', {
4674
4692
  }
4675
4693
  });
4676
4694
  var FeeContainer = /*#__PURE__*/styled('div', {
4677
- paddingLeft: '$4'
4695
+ paddingLeft: '$16'
4678
4696
  });
4679
4697
  var Fee = /*#__PURE__*/styled('div', {
4680
4698
  display: 'flex',
@@ -4700,8 +4718,7 @@ var ArrowDown = /*#__PURE__*/styled('div', {
4700
4718
  });
4701
4719
  var StyledAnchor = /*#__PURE__*/styled('a', {
4702
4720
  color: '$primary',
4703
- fontWeight: '$600',
4704
- marginLeft: '$12'
4721
+ fontWeight: '$600'
4705
4722
  });
4706
4723
  var SwapInfoContainer = /*#__PURE__*/styled('div', {
4707
4724
  display: 'flex',
@@ -4710,11 +4727,14 @@ var SwapInfoContainer = /*#__PURE__*/styled('div', {
4710
4727
  borderBottom: '1px solid $neutrals300'
4711
4728
  });
4712
4729
  var InternalDetailsContainer = /*#__PURE__*/styled('div', {
4713
- display: 'flex'
4730
+ display: 'flex',
4731
+ '.details': {
4732
+ padding: '$8 0'
4733
+ }
4714
4734
  });
4715
4735
  var InternalDetail = /*#__PURE__*/styled('div', {
4716
4736
  display: 'flex',
4717
- padding: '$10'
4737
+ margin: '$12 0 $12 $20'
4718
4738
  });
4719
4739
  var DescriptionContainer = /*#__PURE__*/styled('div', {
4720
4740
  display: 'flex',
@@ -4722,7 +4742,7 @@ var DescriptionContainer = /*#__PURE__*/styled('div', {
4722
4742
  });
4723
4743
  var Description = /*#__PURE__*/styled(Typography, {
4724
4744
  color: '$success',
4725
- marginLeft: '$8'
4745
+ paddingLeft: '$4'
4726
4746
  });
4727
4747
  var Line$1 = /*#__PURE__*/styled('div', {
4728
4748
  width: '0',
@@ -4743,7 +4763,8 @@ var Row$2 = /*#__PURE__*/styled('div', {
4743
4763
  '.value': {
4744
4764
  display: 'flex',
4745
4765
  alignItems: 'center',
4746
- color: '$neutrals800'
4766
+ color: '$neutrals800',
4767
+ justifyContent: 'flex-end'
4747
4768
  },
4748
4769
  '.status': {
4749
4770
  fontWeight: 'bold',
@@ -4757,7 +4778,6 @@ var Row$2 = /*#__PURE__*/styled('div', {
4757
4778
  }
4758
4779
  });
4759
4780
  var RequestId = /*#__PURE__*/styled('div', {
4760
- width: '150px',
4761
4781
  whiteSpace: 'nowrap',
4762
4782
  overflow: 'hidden',
4763
4783
  textOverflow: 'ellipsis',
@@ -4766,13 +4786,13 @@ var RequestId = /*#__PURE__*/styled('div', {
4766
4786
  }
4767
4787
  });
4768
4788
  var ExtraDetails = /*#__PURE__*/styled('div', {
4769
- padding: '$8 0',
4789
+ padding: '0',
4770
4790
  color: '$neutrals600',
4771
- fontSize: '$12'
4791
+ fontSize: '$10'
4772
4792
  });
4773
4793
  var SwapFlowContainer = /*#__PURE__*/styled('div', {
4774
4794
  overflowY: 'auto',
4775
- paddingTop: '$8'
4795
+ padding: '$8 $4 $2 $4'
4776
4796
  });
4777
4797
  function SwapHistory(props) {
4778
4798
  var pendingSwap = props.pendingSwap,
@@ -4803,7 +4823,7 @@ function SwapHistory(props) {
4803
4823
  }, "Try again"))
4804
4824
  }, React__default.createElement("div", null, React__default.createElement(SwapInfoContainer, null, React__default.createElement(Row$2, null, React__default.createElement("div", {
4805
4825
  className: "name"
4806
- }, "Request ID:"), React__default.createElement("div", {
4826
+ }, "Request Id:", React__default.createElement("span", {
4807
4827
  className: "value requestId",
4808
4828
  onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
4809
4829
  }, React__default.createElement(RequestId, null, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
@@ -4812,15 +4832,15 @@ function SwapHistory(props) {
4812
4832
  type: "primary",
4813
4833
  variant: "ghost",
4814
4834
  size: "compact"
4815
- }, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement(Row$2, null, React__default.createElement("div", {
4835
+ }, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement("div", {
4816
4836
  className: "name"
4817
- }, "Status:"), React__default.createElement("div", {
4837
+ }, React__default.createElement("span", {
4818
4838
  className: "value status " + ((pendingSwap == null ? void 0 : pendingSwap.status) || '')
4819
4839
  }, pendingSwap == null ? void 0 : pendingSwap.status, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Spinner, {
4820
4840
  size: 16,
4821
4841
  color: "primary"
4822
- }))), React__default.createElement(ExtraDetails, null, date))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
4823
- size: 32
4842
+ })), React__default.createElement(ExtraDetails, null, date))))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
4843
+ size: 16
4824
4844
  }), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
4825
4845
  return React__default.createElement("div", {
4826
4846
  key: index
@@ -4839,29 +4859,33 @@ function SwapHistory(props) {
4839
4859
  size: 20
4840
4860
  }), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
4841
4861
  variant: "caption"
4842
- }, step.swapperType, " from ", step.fromSymbol, " to ", step.toSymbol, "\xA0 via ", step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
4862
+ }, step.swapperType === 'DEX' ? 'Swap' : 'Bridge', " via", ' ', step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
4843
4863
  variant: "caption"
4844
4864
  }, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
4845
4865
  style: {
4846
4866
  display: 'flex'
4847
4867
  }
4848
- }, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div", null, !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
4868
+ }, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div", {
4869
+ className: "details"
4870
+ }, !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
4849
4871
  return React__default.createElement(InternalDetail, {
4850
4872
  key: index
4851
- }, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
4852
- color: "success"
4873
+ }, React__default.createElement(DescriptionContainer, null, React__default.createElement(Divider, {
4874
+ size: 4
4875
+ }), React__default.createElement(CheckCircleIcon, {
4876
+ color: "primary"
4853
4877
  }), React__default.createElement(Description, {
4854
- variant: "body2"
4855
- }, !item.description ? React__default.createElement("b", null, "View transaction") : React__default.createElement("b", null, item.description.substring(0, 1).toUpperCase(), item.description.substring(1)))), React__default.createElement(StyledAnchor, {
4878
+ variant: "body3"
4879
+ }, React__default.createElement(StyledAnchor, {
4856
4880
  href: item.url,
4857
4881
  target: "_blank",
4858
4882
  rel: "noreferrer",
4859
4883
  key: index
4860
- }, "TX-Link"));
4884
+ }, !item.description ? React__default.createElement("b", null, "View transaction") : React__default.createElement("b", null, item.description.substring(0, 1).toUpperCase(), item.description.substring(1), " Tx")))));
4861
4885
  })), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
4862
4886
  color: "error"
4863
4887
  }), React__default.createElement(Description, {
4864
- variant: "body2",
4888
+ variant: "body3",
4865
4889
  color: "$error500"
4866
4890
  }, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
4867
4891
  logo: step.toLogo,
@@ -4882,10 +4906,9 @@ function SwapHistory(props) {
4882
4906
  title: "Cancel Progress",
4883
4907
  content: React__default.createElement(Alert, {
4884
4908
  type: "warning"
4885
- }, React__default.createElement("p", null, "Warning: Rango ", React__default.createElement("u", null, "neither reverts"), " your transaction\xA0", React__default.createElement("u", null, "nor refunds"), " you if you've already signed and sent a transaction to the blockchain since it's out of Rango's control. Beware that \"Cancel\" only stops next steps from being executed."), React__default.createElement(Spacer, {
4886
- size: 12,
4887
- direction: "vertical"
4888
- }), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")),
4909
+ }, React__default.createElement(Typography, {
4910
+ variant: "body2"
4911
+ }, "Warning: Cancel ", React__default.createElement("u", null, "doesn't revert"), " your transaction if you've already signed and sent a transaction to the blockchain. It only stops next steps from being executed.")),
4889
4912
  footer: React__default.createElement("div", {
4890
4913
  style: {
4891
4914
  display: 'flex',