@rango-dev/widget-embedded 0.17.1-next.30 → 0.17.1-next.31
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/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +314 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts +1727 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -1
- package/dist/components/Quote/Quote.d.ts.map +1 -1
- package/dist/components/Quote/Quote.styles.d.ts +471 -0
- package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
- package/dist/components/Quote/QuoteSummary.styles.d.ts +157 -0
- package/dist/components/Quote/QuoteSummary.styles.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts +628 -0
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts +157 -0
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.styles.d.ts +942 -0
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/BlockchainList/BlockchainList.styles.ts +2 -2
- package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +12 -6
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +4 -2
- package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +14 -7
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +63 -60
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +17 -8
- package/src/components/Quote/Quote.styles.ts +22 -19
- package/src/components/Quote/Quote.tsx +6 -3
- package/src/components/Quote/QuoteSummary.styles.ts +9 -8
- package/src/components/Quote/QuoteSummary.tsx +2 -2
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +5 -3
- package/src/components/SwapDetails/SwapDetails.styles.ts +37 -33
- package/src/components/SwapDetails/SwapDetails.tsx +14 -6
- package/src/components/SwapsGroup/SwapsGroup.styles.ts +4 -2
- package/src/components/SwapsGroup/SwapsGroup.tsx +3 -3
- package/src/components/TokenList/TokenList.styles.ts +52 -43
- package/src/components/TokenList/TokenList.tsx +13 -5
- package/src/pages/ConfirmSwapPage.tsx +24 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAyD5E,wBAAgB,eAAe,sBA2S9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.17.1-next.
|
|
3
|
+
"version": "0.17.1-next.31",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@rango-dev/queue-manager-core": "^0.22.1-next.3",
|
|
26
26
|
"@rango-dev/queue-manager-rango-preset": "^0.22.1-next.12",
|
|
27
27
|
"@rango-dev/queue-manager-react": "^0.22.1-next.3",
|
|
28
|
-
"@rango-dev/ui": "^0.22.1-next.
|
|
28
|
+
"@rango-dev/ui": "^0.22.1-next.18",
|
|
29
29
|
"@rango-dev/wallets-react": "^0.8.1-next.6",
|
|
30
30
|
"@rango-dev/wallets-shared": "^0.21.1-next.6",
|
|
31
31
|
"bignumber.js": "^9.1.1",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { styled } from '@rango-dev/ui';
|
|
1
|
+
import { ImageContainer, styled } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const Container = styled('div', {
|
|
4
4
|
display: 'flex',
|
|
@@ -12,7 +12,7 @@ export const List = styled('ul', {
|
|
|
12
12
|
listStyle: 'none',
|
|
13
13
|
overflowY: 'auto',
|
|
14
14
|
paddingRight: '$5',
|
|
15
|
-
|
|
15
|
+
[`& ${ImageContainer}`]: {
|
|
16
16
|
borderRadius: '$xm',
|
|
17
17
|
overflow: 'hidden',
|
|
18
18
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
|
+
css,
|
|
4
5
|
darkTheme,
|
|
5
6
|
IconButton,
|
|
6
7
|
keyframes,
|
|
@@ -110,12 +111,13 @@ export const NavigateBack = styled(IconButton, {
|
|
|
110
111
|
|
|
111
112
|
export const WalletsContainer = styled('div', {
|
|
112
113
|
paddingTop: '$20',
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export const walletsListStyles = css({
|
|
117
|
+
display: 'grid',
|
|
118
|
+
gap: '$10',
|
|
119
|
+
gridTemplateColumns: ' repeat(3, minmax(0, 1fr))',
|
|
120
|
+
alignContent: 'baseline',
|
|
119
121
|
});
|
|
120
122
|
|
|
121
123
|
export const CollapsibleRoot = styled(Collapsible.Root, {
|
|
@@ -171,6 +173,10 @@ export const CustomDestination = styled('div', {
|
|
|
171
173
|
'& .alarms': { paddingTop: '5px' },
|
|
172
174
|
});
|
|
173
175
|
|
|
176
|
+
export const alarmsStyles = css({
|
|
177
|
+
paddingTop: '5px',
|
|
178
|
+
});
|
|
179
|
+
|
|
174
180
|
export const ExpandedIcon = styled('div', {
|
|
175
181
|
transition: `all ${EXPANDABLE_TRANSITION_DURATION}ms ease`,
|
|
176
182
|
variants: {
|
|
@@ -28,6 +28,7 @@ import { confirmSwapDisabled } from '../../utils/swap';
|
|
|
28
28
|
|
|
29
29
|
import { getRequiredWallets, isValidAddress } from './ConfirmWallets.helpers';
|
|
30
30
|
import {
|
|
31
|
+
alarmsStyles,
|
|
31
32
|
CollapsibleContent,
|
|
32
33
|
CollapsibleRoot,
|
|
33
34
|
ConfirmButton,
|
|
@@ -43,6 +44,7 @@ import {
|
|
|
43
44
|
Trigger,
|
|
44
45
|
Wallets,
|
|
45
46
|
WalletsContainer,
|
|
47
|
+
walletsListStyles,
|
|
46
48
|
} from './ConfirmWallets.styles';
|
|
47
49
|
import { WalletList } from './WalletList';
|
|
48
50
|
|
|
@@ -318,7 +320,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
318
320
|
</Modal>
|
|
319
321
|
{showMoreWalletFor && (
|
|
320
322
|
<WalletsContainer>
|
|
321
|
-
<div className=
|
|
323
|
+
<div className={walletsListStyles()}>
|
|
322
324
|
<WalletList
|
|
323
325
|
chain={showMoreWalletFor}
|
|
324
326
|
isSelected={isSelected}
|
|
@@ -458,7 +460,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
458
460
|
</CollapsibleContent>
|
|
459
461
|
</CollapsibleRoot>
|
|
460
462
|
{isAddressMatched && (
|
|
461
|
-
<div className=
|
|
463
|
+
<div className={alarmsStyles()}>
|
|
462
464
|
<Alert
|
|
463
465
|
variant="alarm"
|
|
464
466
|
type="error"
|
|
@@ -3,35 +3,42 @@ import type { StepSkeletonPropsTypes } from './LoadingSwapDetails.types';
|
|
|
3
3
|
import { ChainToken, Divider, NextIcon, Skeleton } from '@rango-dev/ui';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
extraInfoStyles,
|
|
8
|
+
StepContainer,
|
|
9
|
+
stepIconStyles,
|
|
10
|
+
stepInfoStyles,
|
|
11
|
+
stepTitleStyles,
|
|
12
|
+
stepTokensStyles,
|
|
13
|
+
} from './LoadingSwapDetails.styles';
|
|
7
14
|
|
|
8
15
|
export function LoadingSwapDetailStep(props: StepSkeletonPropsTypes) {
|
|
9
16
|
const { extraInfo } = props;
|
|
10
17
|
return (
|
|
11
18
|
<StepContainer>
|
|
12
|
-
<div className=
|
|
19
|
+
<div className={stepTitleStyles()}>
|
|
13
20
|
<Skeleton height={28} width={28} variant="circular" />
|
|
14
21
|
<Divider direction="horizontal" size={8} />
|
|
15
22
|
<Skeleton height={15} width={148} variant="rounded" />
|
|
16
23
|
</div>
|
|
17
|
-
<div className=
|
|
24
|
+
<div className={stepTokensStyles()}>
|
|
18
25
|
<Divider direction="horizontal" size={20} />
|
|
19
|
-
<div className=
|
|
26
|
+
<div className={stepInfoStyles()}>
|
|
20
27
|
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
21
28
|
<Divider direction="horizontal" size={8} />
|
|
22
29
|
<Skeleton height={12} width={76} variant="rounded" />
|
|
23
30
|
</div>
|
|
24
|
-
<div className=
|
|
31
|
+
<div className={stepIconStyles()}>
|
|
25
32
|
<NextIcon color="gray" size={16} />
|
|
26
33
|
</div>
|
|
27
|
-
<div className=
|
|
34
|
+
<div className={stepInfoStyles()}>
|
|
28
35
|
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
29
36
|
<Divider direction="horizontal" size={8} />
|
|
30
37
|
<Skeleton height={12} width={76} variant="rounded" />
|
|
31
38
|
</div>
|
|
32
39
|
</div>
|
|
33
40
|
{extraInfo && (
|
|
34
|
-
<div className=
|
|
41
|
+
<div className={extraInfoStyles()}>
|
|
35
42
|
<Divider direction="horizontal" size={20} />
|
|
36
43
|
<Skeleton height={22} width={297} variant="rectangular" />
|
|
37
44
|
</div>
|
|
@@ -1,74 +1,15 @@
|
|
|
1
|
-
import { styled } from '@rango-dev/ui';
|
|
1
|
+
import { css, styled } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const Container = styled('div', {
|
|
4
4
|
width: '100%',
|
|
5
5
|
height: '100%',
|
|
6
6
|
padding: '$0 $20',
|
|
7
|
-
|
|
8
|
-
'.cost': {
|
|
9
|
-
paddingTop: '$15',
|
|
10
|
-
display: 'flex',
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
'.quote-summary': {
|
|
14
|
-
padding: '$15 $0',
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
'.quote-summary-item': {
|
|
18
|
-
display: 'flex',
|
|
19
|
-
justifyContent: 'space-between',
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
'.token-amount': {
|
|
24
|
-
display: 'flex',
|
|
25
|
-
justifyContent: 'space-between',
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
'.quote-summary-separator': {
|
|
30
|
-
width: '0px',
|
|
31
|
-
height: '$16',
|
|
32
|
-
borderLeft: '1px solid $neutral400',
|
|
33
|
-
marginLeft: '13px',
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
'.swaps-steps': {
|
|
37
|
-
paddingBottom: '$10',
|
|
38
|
-
},
|
|
39
7
|
});
|
|
40
8
|
|
|
41
9
|
export const StepContainer = styled('div', {
|
|
42
10
|
backgroundColor: '$neutral100',
|
|
43
11
|
borderRadius: '$xm',
|
|
44
12
|
padding: '$10 $15',
|
|
45
|
-
|
|
46
|
-
'.step-title': {
|
|
47
|
-
display: 'flex',
|
|
48
|
-
justifyContent: 'start',
|
|
49
|
-
alignItems: 'center',
|
|
50
|
-
},
|
|
51
|
-
'.step-tokens': {
|
|
52
|
-
paddingTop: '$5',
|
|
53
|
-
display: 'flex',
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
},
|
|
56
|
-
'.step-token-info': {
|
|
57
|
-
display: 'flex',
|
|
58
|
-
alignItems: 'center',
|
|
59
|
-
},
|
|
60
|
-
'.step-icon-container': {
|
|
61
|
-
padding: '$4 $6',
|
|
62
|
-
display: 'flex',
|
|
63
|
-
justifyContent: 'center',
|
|
64
|
-
alignItems: 'center',
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
'.extra-info': {
|
|
68
|
-
display: 'flex',
|
|
69
|
-
paddingTop: '$10',
|
|
70
|
-
paddingBottom: '$5',
|
|
71
|
-
},
|
|
72
13
|
});
|
|
73
14
|
export const StepSeparator = styled('div', {
|
|
74
15
|
width: '0px',
|
|
@@ -76,3 +17,65 @@ export const StepSeparator = styled('div', {
|
|
|
76
17
|
borderLeft: '1px dashed $neutral700',
|
|
77
18
|
marginLeft: '25px',
|
|
78
19
|
});
|
|
20
|
+
|
|
21
|
+
export const quoteSummaryItemStyles = css({
|
|
22
|
+
display: 'flex',
|
|
23
|
+
justifyContent: 'space-between',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const tokenAmountStyles = css({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const costStyles = css({
|
|
34
|
+
paddingTop: '$15',
|
|
35
|
+
display: 'flex',
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const quoteSummaryStyles = css({
|
|
39
|
+
padding: '$15 $0',
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export const quoteSummarySeparatorStyles = css({
|
|
43
|
+
width: '0px',
|
|
44
|
+
height: '$16',
|
|
45
|
+
borderLeft: '1px solid $neutral400',
|
|
46
|
+
marginLeft: '13px',
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const swapsStepsStyles = css({
|
|
50
|
+
paddingBottom: '$10',
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const stepTitleStyles = css({
|
|
54
|
+
display: 'flex',
|
|
55
|
+
justifyContent: 'start',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const stepTokensStyles = css({
|
|
60
|
+
paddingTop: '$5',
|
|
61
|
+
display: 'flex',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export const stepInfoStyles = css({
|
|
66
|
+
display: 'flex',
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export const stepIconStyles = css({
|
|
71
|
+
padding: '$4 $6',
|
|
72
|
+
display: 'flex',
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export const extraInfoStyles = css({
|
|
78
|
+
display: 'flex',
|
|
79
|
+
paddingTop: '$10',
|
|
80
|
+
paddingBottom: '$5',
|
|
81
|
+
});
|
|
@@ -2,13 +2,22 @@ import { i18n } from '@lingui/core';
|
|
|
2
2
|
import { ChainToken, Divider, Skeleton, Typography } from '@rango-dev/ui';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Container,
|
|
7
|
+
costStyles,
|
|
8
|
+
quoteSummaryItemStyles,
|
|
9
|
+
quoteSummarySeparatorStyles,
|
|
10
|
+
quoteSummaryStyles,
|
|
11
|
+
StepSeparator,
|
|
12
|
+
swapsStepsStyles,
|
|
13
|
+
tokenAmountStyles,
|
|
14
|
+
} from './LoadingSwapDetails.styles';
|
|
6
15
|
import { LoadingSwapDetailStep } from './LoadingSwapDetailStep';
|
|
7
16
|
|
|
8
17
|
export function LoadingSwapDetails() {
|
|
9
18
|
const quoteSummary = (
|
|
10
|
-
<div className=
|
|
11
|
-
<div className=
|
|
19
|
+
<div className={quoteSummaryItemStyles()}>
|
|
20
|
+
<div className={tokenAmountStyles()}>
|
|
12
21
|
<ChainToken loading size="medium" chainImage="" tokenImage="" />
|
|
13
22
|
<Divider size={8} direction="horizontal" />
|
|
14
23
|
<Skeleton height={15} width={148} variant="rounded" />
|
|
@@ -19,7 +28,7 @@ export function LoadingSwapDetails() {
|
|
|
19
28
|
|
|
20
29
|
return (
|
|
21
30
|
<Container>
|
|
22
|
-
<div className=
|
|
31
|
+
<div className={costStyles()}>
|
|
23
32
|
<Skeleton width={60} height={10} variant="rounded" />
|
|
24
33
|
<Divider size={4} direction="horizontal" />
|
|
25
34
|
<Skeleton width={60} height={10} variant="rounded" />
|
|
@@ -27,19 +36,19 @@ export function LoadingSwapDetails() {
|
|
|
27
36
|
<Skeleton width={60} height={10} variant="rounded" />
|
|
28
37
|
</div>
|
|
29
38
|
|
|
30
|
-
<div className=
|
|
39
|
+
<div className={quoteSummaryStyles()}>
|
|
31
40
|
{quoteSummary}
|
|
32
|
-
<div className=
|
|
41
|
+
<div className={quoteSummarySeparatorStyles()}></div>
|
|
33
42
|
{quoteSummary}
|
|
34
43
|
</div>
|
|
35
44
|
|
|
36
|
-
<div className=
|
|
45
|
+
<div className={swapsStepsStyles()}>
|
|
37
46
|
<Typography variant="title" size="small">
|
|
38
47
|
{i18n.t('Swaps steps')}
|
|
39
48
|
</Typography>
|
|
40
49
|
</div>
|
|
41
50
|
|
|
42
|
-
<div
|
|
51
|
+
<div>
|
|
43
52
|
<LoadingSwapDetailStep extraInfo />
|
|
44
53
|
<StepSeparator />
|
|
45
54
|
<LoadingSwapDetailStep />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
|
-
import { darkTheme, Image, styled } from '@rango-dev/ui';
|
|
2
|
+
import { css, darkTheme, Image, styled } from '@rango-dev/ui';
|
|
3
3
|
|
|
4
4
|
import { CollapsibleContent } from '../ConfirmWalletsModal/ConfirmWallets.styles';
|
|
5
5
|
|
|
@@ -32,9 +32,10 @@ export const QuoteContainer = styled(Collapsible.Root, {
|
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const stepsDetailsStyles = css({
|
|
38
|
+
padding: '$10 $15',
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
export const SummaryContainer = styled('div', {
|
|
@@ -105,22 +106,24 @@ export const SummaryContainer = styled('div', {
|
|
|
105
106
|
},
|
|
106
107
|
},
|
|
107
108
|
],
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export const summaryStyles = css({
|
|
112
|
+
width: '100%',
|
|
113
|
+
padding: '$15 $15 $10 $15',
|
|
114
|
+
cursor: 'default',
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export const basicInfoStyles = css({
|
|
118
|
+
paddingTop: '$10',
|
|
119
|
+
display: 'flex',
|
|
120
|
+
alignItems: 'center',
|
|
121
|
+
'.usd-value': {
|
|
122
|
+
$$color: '$colors$neutral600',
|
|
123
|
+
[`.${darkTheme} &`]: {
|
|
124
|
+
$$color: '$colors$neutral700',
|
|
123
125
|
},
|
|
126
|
+
color: '$$color',
|
|
124
127
|
},
|
|
125
128
|
});
|
|
126
129
|
|
|
@@ -48,6 +48,7 @@ import { getPriceImpact, getPriceImpactLevel } from '../../utils/quote';
|
|
|
48
48
|
import { getTotalFeeInUsd } from '../../utils/swap';
|
|
49
49
|
|
|
50
50
|
import {
|
|
51
|
+
basicInfoStyles,
|
|
51
52
|
ChainImageContainer,
|
|
52
53
|
Chains,
|
|
53
54
|
Content,
|
|
@@ -56,7 +57,9 @@ import {
|
|
|
56
57
|
HorizontalSeparator,
|
|
57
58
|
IconContainer,
|
|
58
59
|
QuoteContainer,
|
|
60
|
+
stepsDetailsStyles,
|
|
59
61
|
SummaryContainer,
|
|
62
|
+
summaryStyles,
|
|
60
63
|
} from './Quote.styles';
|
|
61
64
|
import { QuoteSummary } from './QuoteSummary';
|
|
62
65
|
|
|
@@ -280,10 +283,10 @@ export function Quote(props: QuoteProps) {
|
|
|
280
283
|
recommended={recommended}
|
|
281
284
|
listItem={type === 'list-item'}
|
|
282
285
|
basic={type === 'basic'}>
|
|
283
|
-
<div className=
|
|
286
|
+
<div className={summaryStyles()}>
|
|
284
287
|
<QuoteCost fee={totalFee} time={totalTime} steps={numberOfSteps} />
|
|
285
288
|
{type === 'basic' && (
|
|
286
|
-
<div className=
|
|
289
|
+
<div className={basicInfoStyles()}>
|
|
287
290
|
<FrameIcon>
|
|
288
291
|
<InfoIcon size={12} color="gray" />
|
|
289
292
|
</FrameIcon>
|
|
@@ -391,7 +394,7 @@ export function Quote(props: QuoteProps) {
|
|
|
391
394
|
</Chains>
|
|
392
395
|
<Content open={expanded}>
|
|
393
396
|
<HorizontalSeparator />
|
|
394
|
-
<div className=
|
|
397
|
+
<div className={stepsDetailsStyles()}>
|
|
395
398
|
{steps.map((step, index) => {
|
|
396
399
|
const key = `item-${index}`;
|
|
397
400
|
return (
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { styled } from '@rango-dev/ui';
|
|
1
|
+
import { css, styled } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const Container = styled('div', {
|
|
4
4
|
position: 'relative',
|
|
5
5
|
display: 'flex',
|
|
6
6
|
flexDirection: 'column',
|
|
7
7
|
width: '100%',
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const separatorStyles = css({
|
|
11
|
+
height: '14px',
|
|
12
|
+
marginLeft: '14px',
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
borderLeft: '1px solid $foreground',
|
|
15
|
+
top: '42%',
|
|
15
16
|
});
|
|
@@ -3,7 +3,7 @@ import type { PriceImpactWarningLevel, Step } from '@rango-dev/ui';
|
|
|
3
3
|
import { TokenAmount } from '@rango-dev/ui';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
-
import { Container } from './QuoteSummary.styles';
|
|
6
|
+
import { Container, separatorStyles } from './QuoteSummary.styles';
|
|
7
7
|
|
|
8
8
|
type PropTypes = {
|
|
9
9
|
from: Step['from'];
|
|
@@ -27,7 +27,7 @@ export function QuoteSummary(props: PropTypes) {
|
|
|
27
27
|
}}
|
|
28
28
|
chain={{ image: from.chain.image }}
|
|
29
29
|
/>
|
|
30
|
-
<div className=
|
|
30
|
+
<div className={separatorStyles()} />
|
|
31
31
|
<TokenAmount
|
|
32
32
|
direction="horizontal"
|
|
33
33
|
label="Estimated output"
|
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
Container,
|
|
19
19
|
HeaderDetails,
|
|
20
20
|
PlaceholderContainer,
|
|
21
|
+
requestIdStyles,
|
|
22
|
+
rowStyles,
|
|
21
23
|
} from './SwapDetails.styles';
|
|
22
24
|
|
|
23
25
|
export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
|
|
@@ -33,11 +35,11 @@ export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
|
|
|
33
35
|
{showSkeleton && (
|
|
34
36
|
<Container>
|
|
35
37
|
<HeaderDetails>
|
|
36
|
-
<div className=
|
|
38
|
+
<div className={rowStyles()}>
|
|
37
39
|
<Typography variant="label" size="large" color="neutral700">
|
|
38
40
|
{`${i18n.t('Request ID')}:`}
|
|
39
41
|
</Typography>
|
|
40
|
-
<div className=
|
|
42
|
+
<div className={requestIdStyles()}>
|
|
41
43
|
<Typography variant="label" size="small" color="neutral700">
|
|
42
44
|
<Skeleton width={60} height={10} variant="rounded" />
|
|
43
45
|
</Typography>
|
|
@@ -46,7 +48,7 @@ export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
|
|
|
46
48
|
</IconButton>
|
|
47
49
|
</div>
|
|
48
50
|
</div>
|
|
49
|
-
<div className=
|
|
51
|
+
<div className={rowStyles()}>
|
|
50
52
|
<Typography variant="label" size="large" color="neutral700">
|
|
51
53
|
{`${i18n.t('Created at')}:`}
|
|
52
54
|
</Typography>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { darkTheme, styled } from '@rango-dev/ui';
|
|
1
|
+
import { css, darkTheme, styled } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const Container = styled('div', {
|
|
4
4
|
display: 'flex',
|
|
@@ -7,38 +7,6 @@ export const Container = styled('div', {
|
|
|
7
7
|
alignItems: 'center',
|
|
8
8
|
height: '0',
|
|
9
9
|
flexGrow: 1,
|
|
10
|
-
'& .row': {
|
|
11
|
-
display: 'flex',
|
|
12
|
-
width: '100%',
|
|
13
|
-
justifyContent: 'space-between',
|
|
14
|
-
alignItems: 'center',
|
|
15
|
-
padding: '$10 $20',
|
|
16
|
-
borderBottom: '1px solid',
|
|
17
|
-
$$color: '$colors$neutral300',
|
|
18
|
-
[`.${darkTheme} &`]: {
|
|
19
|
-
$$color: '$colors$neutral400',
|
|
20
|
-
},
|
|
21
|
-
borderColor: '$$color',
|
|
22
|
-
color: '$neutral500',
|
|
23
|
-
},
|
|
24
|
-
'& .request-id': {
|
|
25
|
-
display: 'flex',
|
|
26
|
-
justifyContent: 'center',
|
|
27
|
-
alignItems: 'center',
|
|
28
|
-
height: '$24',
|
|
29
|
-
},
|
|
30
|
-
'& .output': {
|
|
31
|
-
display: 'flex',
|
|
32
|
-
width: '100%',
|
|
33
|
-
padding: '$15 $20 $20',
|
|
34
|
-
flexDirection: 'column',
|
|
35
|
-
alignItems: 'start',
|
|
36
|
-
},
|
|
37
|
-
'& .title-steps': {
|
|
38
|
-
textAlign: 'left',
|
|
39
|
-
width: '100%',
|
|
40
|
-
padding: '0 $20 $10',
|
|
41
|
-
},
|
|
42
10
|
});
|
|
43
11
|
|
|
44
12
|
export const HeaderDetails = styled('div', {
|
|
@@ -70,3 +38,39 @@ export const LoaderContainer = styled('div', {
|
|
|
70
38
|
paddingTop: '33%',
|
|
71
39
|
flex: 1,
|
|
72
40
|
});
|
|
41
|
+
|
|
42
|
+
export const rowStyles = css({
|
|
43
|
+
display: 'flex',
|
|
44
|
+
width: '100%',
|
|
45
|
+
justifyContent: 'space-between',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
padding: '$10 $20',
|
|
48
|
+
borderBottom: '1px solid',
|
|
49
|
+
$$color: '$colors$neutral300',
|
|
50
|
+
[`.${darkTheme} &`]: {
|
|
51
|
+
$$color: '$colors$neutral400',
|
|
52
|
+
},
|
|
53
|
+
borderColor: '$$color',
|
|
54
|
+
color: '$neutral500',
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const requestIdStyles = css({
|
|
58
|
+
display: 'flex',
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
height: '$24',
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const outputStyles = css({
|
|
65
|
+
display: 'flex',
|
|
66
|
+
width: '100%',
|
|
67
|
+
padding: '$15 $20 $20',
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
alignItems: 'start',
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export const titleStepsStyles = css({
|
|
73
|
+
textAlign: 'left',
|
|
74
|
+
width: '100%',
|
|
75
|
+
padding: '0 $20 $10',
|
|
76
|
+
});
|
|
@@ -57,7 +57,15 @@ import {
|
|
|
57
57
|
} from '../SwapDetailsModal';
|
|
58
58
|
|
|
59
59
|
import { getSteps, getStepState, RESET_INTERVAL } from './SwapDetails.helpers';
|
|
60
|
-
import {
|
|
60
|
+
import {
|
|
61
|
+
Container,
|
|
62
|
+
HeaderDetails,
|
|
63
|
+
outputStyles,
|
|
64
|
+
requestIdStyles,
|
|
65
|
+
rowStyles,
|
|
66
|
+
StepsList,
|
|
67
|
+
titleStepsStyles,
|
|
68
|
+
} from './SwapDetails.styles';
|
|
61
69
|
|
|
62
70
|
export function SwapDetails(props: SwapDetailsProps) {
|
|
63
71
|
const { swap, requestId, onDelete, onCancel: onCancelProps } = props;
|
|
@@ -255,11 +263,11 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
255
263
|
}>
|
|
256
264
|
<Container>
|
|
257
265
|
<HeaderDetails>
|
|
258
|
-
<div className=
|
|
266
|
+
<div className={rowStyles()}>
|
|
259
267
|
<Typography variant="label" size="large" color="neutral700">
|
|
260
268
|
{`${i18n.t('Request ID')}:`}
|
|
261
269
|
</Typography>
|
|
262
|
-
<div className=
|
|
270
|
+
<div className={requestIdStyles()}>
|
|
263
271
|
<Typography variant="label" size="small" color="neutral700">
|
|
264
272
|
{requestId}
|
|
265
273
|
</Typography>
|
|
@@ -270,7 +278,7 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
270
278
|
</IconButton>
|
|
271
279
|
</div>
|
|
272
280
|
</div>
|
|
273
|
-
<div className=
|
|
281
|
+
<div className={rowStyles()}>
|
|
274
282
|
<Typography variant="label" size="large" color="neutral700">
|
|
275
283
|
{`${i18n.t('Created at')}:`}
|
|
276
284
|
</Typography>
|
|
@@ -280,7 +288,7 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
280
288
|
</div>
|
|
281
289
|
</HeaderDetails>
|
|
282
290
|
|
|
283
|
-
<div className=
|
|
291
|
+
<div className={outputStyles()}>
|
|
284
292
|
<QuoteCost
|
|
285
293
|
fee={numberToString(
|
|
286
294
|
String(totalFee),
|
|
@@ -335,7 +343,7 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
335
343
|
warningLevel={getPriceImpactLevel(percentageChange ?? 0)}
|
|
336
344
|
/>
|
|
337
345
|
</div>
|
|
338
|
-
<div className=
|
|
346
|
+
<div className={titleStepsStyles()}>
|
|
339
347
|
<Typography variant="title" size="small">
|
|
340
348
|
{i18n.t('Swaps steps')}
|
|
341
349
|
</Typography>
|