@rango-dev/ui 0.1.10-next.78 → 0.1.10-next.81
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.
- package/dist/components/Alert/Alert.d.ts +2 -2
- package/dist/components/Alert/Alert.stories.d.ts +2 -1
- package/dist/components/BestRoute/BestRoute.d.ts +4 -1
- package/dist/components/SecondaryPage/SecondaryPage.d.ts +3 -5
- package/dist/components/SelectableWalletList/SelectableWalletList.d.ts +1 -1
- package/dist/components/Settings/Settings.d.ts +2 -0
- package/dist/components/TextField/TextField.stories.d.ts +1 -1
- package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +8 -4
- package/dist/containers/ConfirmWallets/ConfirmWallets.d.ts +4 -2
- package/dist/containers/History/types.d.ts +1 -0
- package/dist/helper/index.d.ts +0 -5
- package/dist/types/wallet.d.ts +8 -0
- package/dist/ui.cjs.development.js +301 -263
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +301 -263
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +5 -9
- package/src/components/BestRoute/BestRoute.tsx +55 -21
- package/src/components/BlockchainSelector/BlockchainSelector.tsx +13 -11
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +21 -20
- package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +3 -2
- package/src/components/Radio/Radio.tsx +1 -0
- package/src/components/SecondaryPage/SecondaryPage.tsx +5 -6
- package/src/components/SelectableWalletList/SelectableWalletList.tsx +1 -1
- package/src/components/Settings/Settings.tsx +26 -13
- package/src/components/SwapContainer/SwapContainer.tsx +1 -0
- package/src/components/Switch/Switch.tsx +1 -0
- package/src/components/TokenSelector/TokenSelector.tsx +3 -2
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +92 -54
- package/src/containers/ConfirmWallets/ConfirmWallets.tsx +66 -62
- package/src/containers/History/History.tsx +3 -2
- package/src/containers/History/types.tsx +10 -1
- package/src/containers/SwapHistory/SwapHistory.tsx +87 -95
- package/src/helper/index.ts +1 -22
- package/src/types/wallet.ts +9 -0
- package/dist/containers/ConfirmWallets/types.d.ts +0 -9
- package/src/containers/ConfirmWallets/types.ts +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
1
2
|
export interface PropTypes {
|
|
2
3
|
type: 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
3
|
-
description: string;
|
|
4
4
|
title?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function Alert(props: PropTypes): JSX.Element;
|
|
6
|
+
export declare function Alert(props: PropsWithChildren<PropTypes>): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { PropTypes } from './Alert';
|
|
2
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, PropTypes
|
|
3
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, React.PropsWithChildren<PropTypes>>;
|
|
3
4
|
export default _default;
|
|
4
5
|
export declare const Main: (args: PropTypes) => JSX.Element;
|
|
@@ -2,7 +2,10 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { BestRouteResponse } from 'rango-sdk';
|
|
3
3
|
export interface PropTypes {
|
|
4
4
|
data: BestRouteResponse | null;
|
|
5
|
+
totalFee: string;
|
|
6
|
+
feeWarning: boolean;
|
|
7
|
+
totalTime: string;
|
|
5
8
|
loading?: boolean;
|
|
6
9
|
error?: string;
|
|
7
10
|
}
|
|
8
|
-
export declare function BestRoute(
|
|
11
|
+
export declare function BestRoute(props: PropsWithChildren<PropTypes>): JSX.Element;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export declare type PropTypes = ({
|
|
3
3
|
textField: true;
|
|
4
|
-
|
|
5
|
-
searchedFor: string;
|
|
6
|
-
}>;
|
|
4
|
+
children?: (searchedFor: string) => ReactNode;
|
|
7
5
|
textFieldPlaceholder: string;
|
|
8
6
|
} | {
|
|
9
7
|
textField: false;
|
|
10
|
-
|
|
8
|
+
children?: ReactNode;
|
|
11
9
|
}) & {
|
|
12
10
|
title?: string;
|
|
13
11
|
onBack?: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { SelectableWallet } from '../../
|
|
2
|
+
import { SelectableWallet } from '../../types';
|
|
3
3
|
export interface PropTypes {
|
|
4
4
|
list: SelectableWallet[];
|
|
5
5
|
onChange: (w: SelectableWallet) => void;
|
|
@@ -14,6 +14,8 @@ export interface PropTypes {
|
|
|
14
14
|
selectedTheme: Theme;
|
|
15
15
|
onThemeChange: (theme: Theme) => void;
|
|
16
16
|
onBack: () => void;
|
|
17
|
+
infiniteApprove: boolean;
|
|
18
|
+
toggleInfiniteApprove: (infinite: boolean) => void;
|
|
17
19
|
}
|
|
18
20
|
export declare function Settings(props: PropTypes): JSX.Element;
|
|
19
21
|
export {};
|
|
@@ -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>, "color" | "height" | "translate" | "width" | "list" | "onChange" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "hidden" | "size" | "type" | "
|
|
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" | "children" | "onClick" | "prefix" | "suffix" | "disabled" | "id" | "defaultChecked" | "checked" | "name" | "className" | "lang" | "max" | "min" | "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" | "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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BestRouteResponse } from 'rango-sdk';
|
|
2
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
3
3
|
export declare const Line: any;
|
|
4
4
|
export declare const SwapperContainer: any;
|
|
5
5
|
export declare const BodyError: any;
|
|
@@ -14,10 +14,14 @@ export declare const UpdateIcon: any;
|
|
|
14
14
|
export declare const StyledUpdateIcon: any;
|
|
15
15
|
export interface PropTypes {
|
|
16
16
|
bestRoute: BestRouteResponse | null;
|
|
17
|
+
onRefresh?: React.MouseEventHandler<SVGElement>;
|
|
18
|
+
confirmButtonTitle: string;
|
|
19
|
+
confirmButtonDisabled: boolean;
|
|
17
20
|
onBack: () => void;
|
|
18
21
|
onConfirm?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
19
22
|
loading?: boolean;
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
errors?: ReactNode[];
|
|
24
|
+
warnings?: ReactNode[];
|
|
25
|
+
extraMessages?: ReactNode;
|
|
22
26
|
}
|
|
23
|
-
export declare function ConfirmSwap(
|
|
27
|
+
export declare function ConfirmSwap(props: PropsWithChildren<PropTypes>): JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { BestRouteResponse } from 'rango-sdk';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
|
-
import { SelectableWallet } from '
|
|
3
|
+
import { SelectableWallet } from '../../types';
|
|
4
4
|
export interface PropTypes {
|
|
5
5
|
swap: BestRouteResponse;
|
|
6
|
+
fromAmount: string;
|
|
7
|
+
toAmount: string;
|
|
6
8
|
onBack: () => void;
|
|
7
9
|
onConfirm?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
10
|
confirmDisabled?: boolean;
|
|
@@ -13,4 +15,4 @@ export interface PropTypes {
|
|
|
13
15
|
isExperimentalChain?: (wallet: string) => boolean;
|
|
14
16
|
handleConnectChain?: (wallet: string) => void;
|
|
15
17
|
}
|
|
16
|
-
export declare function ConfirmWallets(
|
|
18
|
+
export declare function ConfirmWallets(props: PropsWithChildren<PropTypes>): JSX.Element;
|
package/dist/helper/index.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import { BestRouteResponse } from 'rango-sdk';
|
|
2
|
-
export declare const secondsToString: (s: number) => string;
|
|
3
|
-
export declare const totalArrivalTime: (data: BestRouteResponse) => number;
|
|
4
|
-
export declare const rawFees: (data: BestRouteResponse) => string;
|
|
5
|
-
export declare const decimalNumber: (number: string | undefined, toFixed: number) => string;
|
|
6
1
|
export declare const containsText: (text: string, searchText: string) => boolean;
|
package/dist/types/wallet.d.ts
CHANGED