@rango-dev/widget-embedded 0.17.1-next.33 → 0.17.1-next.34
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/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +315 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
- package/dist/components/Layout/Layout.styles.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -1
- 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 +158 -0
- package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
- package/dist/components/Quote/index.d.ts +0 -1
- package/dist/components/Quote/index.d.ts.map +1 -1
- package/dist/components/QuoteSkeleton/QuoteSkeleton.d.ts.map +1 -0
- package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.styles.d.ts +314 -0
- package/dist/components/QuoteSkeleton/QuoteSkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.d.ts +4 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts +1571 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.types.d.ts +6 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.d.ts +4 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts +786 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.types.d.ts +4 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/index.d.ts +4 -0
- package/dist/components/QuoteSkeleton/index.d.ts.map +1 -0
- package/dist/components/Slippage/Slippage.d.ts.map +1 -1
- package/dist/components/Slippage/Slippage.styles.d.ts +158 -0
- package/dist/components/Slippage/Slippage.styles.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.styles.d.ts +158 -1
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/store/slices/config.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +1 -0
- package/dist/utils/wallets.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/BlockchainsSection/BlockchainsSection.styles.ts +1 -1
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +19 -10
- package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +20 -7
- package/src/components/ConfirmWalletsModal/WalletList.tsx +3 -3
- package/src/components/Layout/Layout.styles.ts +2 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +2 -1
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +25 -40
- package/src/components/Quote/Quote.styles.ts +9 -2
- package/src/components/Quote/Quote.tsx +3 -5
- package/src/components/Quote/index.ts +0 -1
- package/src/components/QuoteSkeleton/QuoteSkeleton.styles.ts +42 -0
- package/src/components/QuoteSkeleton/QuoteSkeleton.tsx +30 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.styles.ts +57 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.tsx +76 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.types.ts +6 -0
- package/src/components/QuoteSkeleton/StepSkeleton.styles.ts +33 -0
- package/src/components/QuoteSkeleton/StepSkeleton.tsx +44 -0
- package/src/components/QuoteSkeleton/StepSkeleton.types.ts +1 -0
- package/src/components/QuoteSkeleton/index.ts +3 -0
- package/src/components/Slippage/Slippage.styles.ts +15 -5
- package/src/components/Slippage/Slippage.tsx +8 -5
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +0 -1
- package/src/components/SwapDetails/SwapDetails.styles.ts +0 -1
- package/src/components/TokenList/TokenList.styles.ts +17 -2
- package/src/components/TokenList/TokenList.tsx +6 -2
- package/src/containers/QuoteInfo/QuoteInfo.tsx +2 -1
- package/src/pages/Home.tsx +5 -1
- package/src/pages/SettingsPage.tsx +4 -3
- package/src/pages/WalletsPage.tsx +5 -4
- package/src/store/slices/config.ts +1 -0
- package/src/utils/wallets.ts +8 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts +0 -4
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +0 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts +0 -4
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.styles.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.types.d.ts.map +0 -1
- package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +0 -48
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.types.ts +0 -3
- package/src/components/Quote/QuoteSkeleton.styles.ts +0 -110
- package/src/components/Quote/QuoteSkeleton.tsx +0 -108
- /package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.d.ts +0 -0
- /package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.types.d.ts +0 -0
- /package/src/components/{Quote → QuoteSkeleton}/QuoteSkeleton.types.ts +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PropTypes } from './StepSkeleton.types';
|
|
2
|
+
|
|
3
|
+
import { ChainToken, Divider, NextIcon, Skeleton } from '@rango-dev/ui';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { StepSeparator } from './QuoteSkeleton.styles';
|
|
7
|
+
import {
|
|
8
|
+
StepContent,
|
|
9
|
+
StepIconContainer,
|
|
10
|
+
StepTitle,
|
|
11
|
+
StepTokenInfo,
|
|
12
|
+
StepTokens,
|
|
13
|
+
} from './StepSkeleton.styles';
|
|
14
|
+
|
|
15
|
+
export function StepSkeleton(props: PropTypes) {
|
|
16
|
+
const { separator = true } = props;
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<StepTitle>
|
|
20
|
+
<Skeleton height={22} width={22} variant="circular" />
|
|
21
|
+
<Divider direction="horizontal" size={8} />
|
|
22
|
+
<Skeleton height={15} width={148} variant="rounded" />
|
|
23
|
+
</StepTitle>
|
|
24
|
+
<StepContent>
|
|
25
|
+
<StepSeparator hideSeparator={!separator} />
|
|
26
|
+
<StepTokens>
|
|
27
|
+
<StepTokenInfo>
|
|
28
|
+
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
29
|
+
<Divider direction="horizontal" size={8} />
|
|
30
|
+
<Skeleton height={12} variant="rounded" />
|
|
31
|
+
</StepTokenInfo>
|
|
32
|
+
<StepIconContainer>
|
|
33
|
+
<NextIcon color="gray" size={16} />
|
|
34
|
+
</StepIconContainer>
|
|
35
|
+
<StepTokenInfo>
|
|
36
|
+
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
37
|
+
<Divider direction="horizontal" size={8} />
|
|
38
|
+
<Skeleton height={12} variant="rounded" />
|
|
39
|
+
</StepTokenInfo>
|
|
40
|
+
</StepTokens>
|
|
41
|
+
</StepContent>
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PropTypes = { separator?: boolean };
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { styled } from '@rango-dev/ui';
|
|
1
|
+
import { Chip, styled, TextField } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const BaseContainer = styled('div', {
|
|
4
4
|
paddingTop: '$5',
|
|
5
|
-
|
|
5
|
+
padding: '$10 $5',
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
export const SlippageChipsContainer = styled('div', {
|
|
9
9
|
display: 'flex',
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
flexWrap: 'wrap',
|
|
11
|
+
gap: '$10',
|
|
12
|
+
[`& ${TextField}`]: {
|
|
13
|
+
flex: '1 1 0',
|
|
14
|
+
maxWidth: '127px',
|
|
15
|
+
minWidth: '85px',
|
|
16
|
+
},
|
|
12
17
|
});
|
|
13
18
|
|
|
14
19
|
export const Head = styled('div', {
|
|
@@ -19,6 +24,11 @@ export const Head = styled('div', {
|
|
|
19
24
|
});
|
|
20
25
|
|
|
21
26
|
export const SlippageTooltipContainer = styled('div', {
|
|
22
|
-
maxWidth: '
|
|
27
|
+
maxWidth: '280px',
|
|
23
28
|
padding: '$10',
|
|
24
29
|
});
|
|
30
|
+
|
|
31
|
+
export const SlippageChip = styled(Chip, {
|
|
32
|
+
width: '61px',
|
|
33
|
+
flexShrink: 0,
|
|
34
|
+
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { i18n } from '@lingui/core';
|
|
2
2
|
import {
|
|
3
|
-
Chip,
|
|
4
3
|
Divider,
|
|
5
4
|
InfoIcon,
|
|
6
5
|
TextField,
|
|
@@ -17,7 +16,12 @@ import {
|
|
|
17
16
|
import { useAppStore } from '../../store/AppStore';
|
|
18
17
|
import { getContainer } from '../../utils/common';
|
|
19
18
|
|
|
20
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
BaseContainer,
|
|
21
|
+
Head,
|
|
22
|
+
SlippageChip,
|
|
23
|
+
SlippageChipsContainer,
|
|
24
|
+
} from './Slippage.styles';
|
|
21
25
|
import { SlippageTooltipContent } from './SlippageTooltipContent';
|
|
22
26
|
|
|
23
27
|
export function Slippage() {
|
|
@@ -34,6 +38,7 @@ export function Slippage() {
|
|
|
34
38
|
<Tooltip
|
|
35
39
|
container={getContainer()}
|
|
36
40
|
side="top"
|
|
41
|
+
sideOffset={4}
|
|
37
42
|
content={<SlippageTooltipContent />}>
|
|
38
43
|
<InfoIcon color="gray" />
|
|
39
44
|
</Tooltip>
|
|
@@ -43,8 +48,7 @@ export function Slippage() {
|
|
|
43
48
|
const key = `slippage-${index}`;
|
|
44
49
|
return (
|
|
45
50
|
<>
|
|
46
|
-
<
|
|
47
|
-
style={{ width: '64px', flexShrink: 0 }}
|
|
51
|
+
<SlippageChip
|
|
48
52
|
key={key}
|
|
49
53
|
onClick={() => {
|
|
50
54
|
if (customSlippage) {
|
|
@@ -55,7 +59,6 @@ export function Slippage() {
|
|
|
55
59
|
selected={!customSlippage && slippageItem === slippage}
|
|
56
60
|
label={`${slippageItem.toString()}%`}
|
|
57
61
|
/>
|
|
58
|
-
<Divider direction="horizontal" size={8} />
|
|
59
62
|
</>
|
|
60
63
|
);
|
|
61
64
|
})}
|
|
@@ -18,7 +18,8 @@ export const tokenNameStyles = css({
|
|
|
18
18
|
export const descriptionStyles = css({
|
|
19
19
|
position: 'relative',
|
|
20
20
|
height: 12,
|
|
21
|
-
width:
|
|
21
|
+
width: '30%',
|
|
22
|
+
maxWidth: '150px',
|
|
22
23
|
});
|
|
23
24
|
export const tokenTitleStyles = css({
|
|
24
25
|
position: 'absolute',
|
|
@@ -30,6 +31,9 @@ export const tokenAddressStyles = css({
|
|
|
30
31
|
transform: 'translateY(12px)',
|
|
31
32
|
visibility: 'hidden',
|
|
32
33
|
'& a': {
|
|
34
|
+
display: 'flex',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
alignItems: 'center',
|
|
33
37
|
fontSize: '$12',
|
|
34
38
|
lineHeight: '$16',
|
|
35
39
|
$$color: '$colors$neutral600',
|
|
@@ -106,6 +110,10 @@ export const TagTitle = styled(Typography, {});
|
|
|
106
110
|
|
|
107
111
|
export const BalanceContainer = styled('div', {
|
|
108
112
|
textAlign: 'right',
|
|
113
|
+
width: '100%',
|
|
114
|
+
overflow: 'hidden',
|
|
115
|
+
textOverflow: 'ellipsis',
|
|
116
|
+
whiteSpace: 'nowrap',
|
|
109
117
|
[`& .${usdValueStyles}`]: {
|
|
110
118
|
$$color: '$colors$neutral600',
|
|
111
119
|
[`.${darkTheme} &`]: {
|
|
@@ -115,7 +123,7 @@ export const BalanceContainer = styled('div', {
|
|
|
115
123
|
},
|
|
116
124
|
});
|
|
117
125
|
|
|
118
|
-
export const End = styled('
|
|
126
|
+
export const End = styled('div', {
|
|
119
127
|
display: 'flex',
|
|
120
128
|
alignItems: 'end',
|
|
121
129
|
flexDirection: 'column',
|
|
@@ -140,3 +148,10 @@ export const Pin = styled('div', {
|
|
|
140
148
|
bottom: -6,
|
|
141
149
|
right: -6,
|
|
142
150
|
});
|
|
151
|
+
|
|
152
|
+
export const TokenBalance = styled(Typography, {
|
|
153
|
+
width: '100%',
|
|
154
|
+
overflow: 'hidden',
|
|
155
|
+
textOverflow: 'ellipsis',
|
|
156
|
+
whiteSpace: 'nowrap',
|
|
157
|
+
});
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
TagTitle,
|
|
37
37
|
Title,
|
|
38
38
|
tokenAddressStyles,
|
|
39
|
+
TokenBalance,
|
|
39
40
|
tokenNameStyles,
|
|
40
41
|
tokenTitleStyles,
|
|
41
42
|
tokenWithoutNameStyles,
|
|
@@ -80,6 +81,7 @@ const renderDesc = (props: RenderDescProps) => {
|
|
|
80
81
|
{length > 10
|
|
81
82
|
? `${address.slice(0, 5)}...${address.slice(length - 6, length)}`
|
|
82
83
|
: address}{' '}
|
|
84
|
+
<Divider size={4} direction="horizontal" />
|
|
83
85
|
<ExternalLinkIcon color="gray" size={12} />
|
|
84
86
|
</a>
|
|
85
87
|
</div>
|
|
@@ -175,6 +177,8 @@ export function TokenList(props: PropTypes) {
|
|
|
175
177
|
<ListItemButton
|
|
176
178
|
style={{
|
|
177
179
|
height: style?.height,
|
|
180
|
+
width: '100%',
|
|
181
|
+
overflow: 'hidden',
|
|
178
182
|
}}
|
|
179
183
|
tab-index={index}
|
|
180
184
|
key={`${token.symbol}${token.address}`}
|
|
@@ -237,9 +241,9 @@ export function TokenList(props: PropTypes) {
|
|
|
237
241
|
) : (
|
|
238
242
|
tokenBalance && (
|
|
239
243
|
<BalanceContainer>
|
|
240
|
-
<
|
|
244
|
+
<TokenBalance variant="title" size="small">
|
|
241
245
|
{tokenBalance.amount}
|
|
242
|
-
</
|
|
246
|
+
</TokenBalance>
|
|
243
247
|
<div />
|
|
244
248
|
{tokenBalance.usdValue && (
|
|
245
249
|
<Typography
|
|
@@ -3,7 +3,8 @@ import type { PropTypes } from './QuoteInfo.types';
|
|
|
3
3
|
import { Divider } from '@rango-dev/ui';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
-
import { Quote
|
|
6
|
+
import { Quote } from '../../components/Quote';
|
|
7
|
+
import { QuoteSkeleton } from '../../components/QuoteSkeleton';
|
|
7
8
|
import { QuoteWarningsAndErrors } from '../../components/QuoteWarningsAndErrors';
|
|
8
9
|
import { useQuoteStore } from '../../store/quote';
|
|
9
10
|
import { QuoteErrorType } from '../../types';
|
package/src/pages/Home.tsx
CHANGED
|
@@ -25,7 +25,7 @@ import { useWalletsStore } from '../store/wallets';
|
|
|
25
25
|
import { numberToString } from '../utils/numbers';
|
|
26
26
|
import { getPriceImpact, getPriceImpactLevel } from '../utils/quote';
|
|
27
27
|
import { canComputePriceImpact, getSwapButtonState } from '../utils/swap';
|
|
28
|
-
import { formatBalance } from '../utils/wallets';
|
|
28
|
+
import { formatBalance, isFetchingBalance } from '../utils/wallets';
|
|
29
29
|
|
|
30
30
|
const Container = styled('div', {
|
|
31
31
|
display: 'flex',
|
|
@@ -75,6 +75,9 @@ export function Home() {
|
|
|
75
75
|
const setCurrentPage = useUiStore.use.setCurrentPage();
|
|
76
76
|
const [showQuoteWarningModal, setShowQuoteWarningModal] = useState(false);
|
|
77
77
|
const layoutRef = useRef<HTMLDivElement>(null);
|
|
78
|
+
const fetchingBalance =
|
|
79
|
+
!!fromBlockchain &&
|
|
80
|
+
isFetchingBalance(connectedWallets, fromBlockchain.name);
|
|
78
81
|
|
|
79
82
|
const needsToWarnEthOnPath = false;
|
|
80
83
|
|
|
@@ -195,6 +198,7 @@ export function Home() {
|
|
|
195
198
|
}}
|
|
196
199
|
disabled={fetchMetaStatus === 'failed'}
|
|
197
200
|
loading={fetchMetaStatus === 'loading'}
|
|
201
|
+
loadingBalance={fetchingBalance}
|
|
198
202
|
onSelectMaxBalance={() => {
|
|
199
203
|
if (fromTokenFormattedBalance !== '0') {
|
|
200
204
|
setInputAmount(tokenBalanceReal.split(',').join(''));
|
|
@@ -144,17 +144,18 @@ export function SettingsPage() {
|
|
|
144
144
|
title: (
|
|
145
145
|
<>
|
|
146
146
|
<Typography variant="title" size="xmedium">
|
|
147
|
-
{i18n.t('Infinite
|
|
147
|
+
{i18n.t('Infinite approval')}
|
|
148
148
|
</Typography>
|
|
149
149
|
<Divider direction="horizontal" size={4} />
|
|
150
150
|
<Tooltip
|
|
151
151
|
side="top"
|
|
152
|
+
sideOffset={4}
|
|
152
153
|
container={getContainer()}
|
|
153
154
|
content={
|
|
154
155
|
<TooltipContainer>
|
|
155
156
|
<Typography variant="label" size="medium" color="neutral700">
|
|
156
157
|
{i18n.t(
|
|
157
|
-
"Enabling the 'Infinite
|
|
158
|
+
"Enabling the 'Infinite approval' mode grants unrestricted access to smart contracts of DEXes/Bridges, allowing them to utilize the approved token amount without limitations."
|
|
158
159
|
)}
|
|
159
160
|
</Typography>
|
|
160
161
|
</TooltipContainer>
|
|
@@ -180,7 +181,7 @@ export function SettingsPage() {
|
|
|
180
181
|
return (
|
|
181
182
|
<Layout
|
|
182
183
|
header={{
|
|
183
|
-
title: i18n.t('
|
|
184
|
+
title: i18n.t('Settings'),
|
|
184
185
|
}}>
|
|
185
186
|
<SettingsContainer>
|
|
186
187
|
<Slippage />
|
|
@@ -11,11 +11,12 @@ import { useAppStore } from '../store/AppStore';
|
|
|
11
11
|
import { getContainer } from '../utils/common';
|
|
12
12
|
|
|
13
13
|
const ListContainer = styled('div', {
|
|
14
|
-
display: '
|
|
14
|
+
display: 'flex',
|
|
15
|
+
justifyContent: 'space-evenly',
|
|
16
|
+
alignItems: 'center',
|
|
15
17
|
gap: '$10',
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
paddingTop: '$15',
|
|
18
|
+
flexWrap: 'wrap',
|
|
19
|
+
paddingTop: '$5',
|
|
19
20
|
height: '100%',
|
|
20
21
|
});
|
|
21
22
|
|
package/src/utils/wallets.ts
CHANGED
|
@@ -543,3 +543,11 @@ export function makeTokensBalance(connectedWallets: ConnectedWallet[]) {
|
|
|
543
543
|
return balances;
|
|
544
544
|
}, {});
|
|
545
545
|
}
|
|
546
|
+
|
|
547
|
+
export const isFetchingBalance = (
|
|
548
|
+
connectedWallets: ConnectedWallet[],
|
|
549
|
+
blockchain: string
|
|
550
|
+
) =>
|
|
551
|
+
!!connectedWallets.find(
|
|
552
|
+
(wallet) => wallet.chain === blockchain && wallet.loading
|
|
553
|
+
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSwapDetailStep.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGzE,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,sBAAsB,qBAiClE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSwapDetails.types.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingSwapDetails/LoadingSwapDetails.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Quote/QuoteSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAmC1B,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,qBAqE7C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteSkeleton.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Quote/QuoteSkeleton.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DA4FpB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAaxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteSkeleton.types.d.ts","sourceRoot":"","sources":["../../../src/components/Quote/QuoteSkeleton.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,OAAO,GAAG,WAAW,GAAG,cAAc,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { StepSkeletonPropsTypes } from './LoadingSwapDetails.types';
|
|
2
|
-
|
|
3
|
-
import { ChainToken, Divider, NextIcon, Skeleton } from '@rango-dev/ui';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
extraInfoStyles,
|
|
8
|
-
StepContainer,
|
|
9
|
-
stepIconStyles,
|
|
10
|
-
stepInfoStyles,
|
|
11
|
-
stepTitleStyles,
|
|
12
|
-
stepTokensStyles,
|
|
13
|
-
} from './LoadingSwapDetails.styles';
|
|
14
|
-
|
|
15
|
-
export function LoadingSwapDetailStep(props: StepSkeletonPropsTypes) {
|
|
16
|
-
const { extraInfo } = props;
|
|
17
|
-
return (
|
|
18
|
-
<StepContainer>
|
|
19
|
-
<div className={stepTitleStyles()}>
|
|
20
|
-
<Skeleton height={28} width={28} variant="circular" />
|
|
21
|
-
<Divider direction="horizontal" size={8} />
|
|
22
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
23
|
-
</div>
|
|
24
|
-
<div className={stepTokensStyles()}>
|
|
25
|
-
<Divider direction="horizontal" size={20} />
|
|
26
|
-
<div className={stepInfoStyles()}>
|
|
27
|
-
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
28
|
-
<Divider direction="horizontal" size={8} />
|
|
29
|
-
<Skeleton height={12} width={76} variant="rounded" />
|
|
30
|
-
</div>
|
|
31
|
-
<div className={stepIconStyles()}>
|
|
32
|
-
<NextIcon color="gray" size={16} />
|
|
33
|
-
</div>
|
|
34
|
-
<div className={stepInfoStyles()}>
|
|
35
|
-
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
36
|
-
<Divider direction="horizontal" size={8} />
|
|
37
|
-
<Skeleton height={12} width={76} variant="rounded" />
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
{extraInfo && (
|
|
41
|
-
<div className={extraInfoStyles()}>
|
|
42
|
-
<Divider direction="horizontal" size={20} />
|
|
43
|
-
<Skeleton height={22} width={297} variant="rectangular" />
|
|
44
|
-
</div>
|
|
45
|
-
)}
|
|
46
|
-
</StepContainer>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { darkTheme, styled } from '@rango-dev/ui';
|
|
2
|
-
|
|
3
|
-
export const Container = styled('div', {
|
|
4
|
-
$$color: '$colors$neutral100',
|
|
5
|
-
[`.${darkTheme} &`]: {
|
|
6
|
-
$$color: '$colors$neutral300',
|
|
7
|
-
},
|
|
8
|
-
backgroundColor: '$$color',
|
|
9
|
-
borderBottomLeftRadius: '$xm',
|
|
10
|
-
borderBottomRightRadius: '$xm',
|
|
11
|
-
padding: '$15 ',
|
|
12
|
-
'& .cost-and-tag': {
|
|
13
|
-
display: 'flex',
|
|
14
|
-
justifyContent: 'space-between',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
height: '22px',
|
|
17
|
-
},
|
|
18
|
-
variants: {
|
|
19
|
-
rounded: {
|
|
20
|
-
true: {
|
|
21
|
-
borderRadius: '$xm',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
'& .cost': {
|
|
26
|
-
display: 'flex',
|
|
27
|
-
},
|
|
28
|
-
'& .basic-summary': {
|
|
29
|
-
padding: '$15 $0 14px $0',
|
|
30
|
-
},
|
|
31
|
-
'& .output': {
|
|
32
|
-
padding: '$6 $0 $15 $0',
|
|
33
|
-
display: 'flex',
|
|
34
|
-
flexDirection: 'column',
|
|
35
|
-
},
|
|
36
|
-
'& .output__token-info': {
|
|
37
|
-
display: 'flex',
|
|
38
|
-
justifyContent: 'start',
|
|
39
|
-
alignItems: 'center',
|
|
40
|
-
paddingBottom: '$5',
|
|
41
|
-
},
|
|
42
|
-
'& .quote-summary': {
|
|
43
|
-
display: 'flex',
|
|
44
|
-
justifyContent: 'space-between',
|
|
45
|
-
alignItems: 'end',
|
|
46
|
-
},
|
|
47
|
-
'& .quote-summary__separator': {
|
|
48
|
-
height: '$28',
|
|
49
|
-
marginLeft: '13px',
|
|
50
|
-
borderLeft: '1px solid $neutral700',
|
|
51
|
-
},
|
|
52
|
-
'& .token-amount': {
|
|
53
|
-
display: 'flex',
|
|
54
|
-
justifyContent: 'space-between',
|
|
55
|
-
},
|
|
56
|
-
'& .token-amount__label': {
|
|
57
|
-
display: 'flex',
|
|
58
|
-
flexDirection: 'column',
|
|
59
|
-
alignItems: 'start',
|
|
60
|
-
},
|
|
61
|
-
'& .chains': {
|
|
62
|
-
paddingTop: '$2',
|
|
63
|
-
},
|
|
64
|
-
'& .swap-preview': {
|
|
65
|
-
padding: '$15 $0 $15 $0',
|
|
66
|
-
},
|
|
67
|
-
'& .steps': {
|
|
68
|
-
paddingLeft: '$8',
|
|
69
|
-
},
|
|
70
|
-
'& .step__title': {
|
|
71
|
-
display: 'flex',
|
|
72
|
-
alignItems: 'center',
|
|
73
|
-
},
|
|
74
|
-
'& .step__content': {
|
|
75
|
-
display: 'flex',
|
|
76
|
-
alignItems: 'start',
|
|
77
|
-
},
|
|
78
|
-
'& .step__tokens': {
|
|
79
|
-
paddingTop: '$5',
|
|
80
|
-
paddingBottom: '$10',
|
|
81
|
-
display: 'flex',
|
|
82
|
-
alignItems: 'center',
|
|
83
|
-
},
|
|
84
|
-
'& .step__token-info': {
|
|
85
|
-
display: 'flex',
|
|
86
|
-
alignItems: 'center',
|
|
87
|
-
},
|
|
88
|
-
'& .step__icon-container': {
|
|
89
|
-
margin: '$0 $2',
|
|
90
|
-
padding: '$4',
|
|
91
|
-
display: 'flex',
|
|
92
|
-
justifyContent: 'center',
|
|
93
|
-
alignItems: 'center',
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
export const StepSeparator = styled('div', {
|
|
98
|
-
borderLeft: '1px dashed black',
|
|
99
|
-
minHeight: ' 64px',
|
|
100
|
-
margin: '0px 11.5px',
|
|
101
|
-
alignSelf: 'stretch',
|
|
102
|
-
variants: {
|
|
103
|
-
hideSeparator: {
|
|
104
|
-
true: {
|
|
105
|
-
minHeight: 'unset',
|
|
106
|
-
height: '0',
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
});
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import type { PropTypes } from './QuoteSkeleton.types';
|
|
2
|
-
|
|
3
|
-
import { ChainToken, Divider, NextIcon, Skeleton } from '@rango-dev/ui';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import { Container, StepSeparator } from './QuoteSkeleton.styles';
|
|
7
|
-
|
|
8
|
-
function StepSkeleton(props: { separator?: boolean }) {
|
|
9
|
-
const { separator = true } = props;
|
|
10
|
-
return (
|
|
11
|
-
<>
|
|
12
|
-
<div className="step__title">
|
|
13
|
-
<Skeleton height={22} width={22} variant="circular" />
|
|
14
|
-
<Divider direction="horizontal" size={8} />
|
|
15
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
16
|
-
</div>
|
|
17
|
-
<div className="step__content">
|
|
18
|
-
<StepSeparator hideSeparator={!separator} />
|
|
19
|
-
<div className="step__tokens">
|
|
20
|
-
<div className="step__token-info">
|
|
21
|
-
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
22
|
-
<Divider direction="horizontal" size={8} />
|
|
23
|
-
<Skeleton height={12} width={76} variant="rounded" />
|
|
24
|
-
</div>
|
|
25
|
-
<div className="step__icon-container">
|
|
26
|
-
<NextIcon color="gray" size={16} />
|
|
27
|
-
</div>
|
|
28
|
-
<div className="step__token-info">
|
|
29
|
-
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
30
|
-
<Divider direction="horizontal" size={8} />
|
|
31
|
-
<Skeleton height={12} width={76} variant="rounded" />
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function QuoteSkeleton(props: PropTypes) {
|
|
40
|
-
const { type, expanded, tag = false } = props;
|
|
41
|
-
const quoteSummary = (
|
|
42
|
-
<div className="quote-summary">
|
|
43
|
-
<div className="token-amount">
|
|
44
|
-
<ChainToken loading size="medium" chainImage="" tokenImage="" />
|
|
45
|
-
<Divider size={8} direction="horizontal" />
|
|
46
|
-
<div className="token-amount__label">
|
|
47
|
-
<Skeleton height={10} width={60} variant="rounded" />
|
|
48
|
-
<Divider size={4} />
|
|
49
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<Skeleton height={12} width={64} variant="rounded" />
|
|
53
|
-
</div>
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<Container rounded={type !== 'basic'}>
|
|
58
|
-
<div className="cost-and-tag">
|
|
59
|
-
<div className="cost">
|
|
60
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
61
|
-
<Divider size={4} direction="horizontal" />
|
|
62
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
63
|
-
<Divider size={4} direction="horizontal" />
|
|
64
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
65
|
-
</div>
|
|
66
|
-
{tag && <Skeleton height={22} width={100} variant="rounded" />}
|
|
67
|
-
</div>
|
|
68
|
-
{type === 'basic' && (
|
|
69
|
-
<div className="basic-summary">
|
|
70
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
71
|
-
</div>
|
|
72
|
-
)}
|
|
73
|
-
{type === 'list-item' && (
|
|
74
|
-
<div className="output">
|
|
75
|
-
<div className="output__token-info">
|
|
76
|
-
<ChainToken loading size="medium" chainImage="" tokenImage="" />
|
|
77
|
-
<Divider direction="horizontal" size={4} />
|
|
78
|
-
<Skeleton height={15} width={150} variant="rounded" />
|
|
79
|
-
</div>
|
|
80
|
-
<Divider size={4} />
|
|
81
|
-
<Skeleton height={10} width={184} variant="rounded" />
|
|
82
|
-
</div>
|
|
83
|
-
)}
|
|
84
|
-
{type === 'swap-preview' && (
|
|
85
|
-
<>
|
|
86
|
-
<Divider size={4} />
|
|
87
|
-
<div className="swap-preview">
|
|
88
|
-
{quoteSummary}
|
|
89
|
-
<div className="quote-summary__separator" />
|
|
90
|
-
{quoteSummary}
|
|
91
|
-
</div>
|
|
92
|
-
</>
|
|
93
|
-
)}
|
|
94
|
-
<div className="chains">
|
|
95
|
-
<Skeleton height={15} width={321} variant="rounded" />
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
{expanded && (
|
|
99
|
-
<div className="steps">
|
|
100
|
-
<Divider size={20} />
|
|
101
|
-
<StepSkeleton />
|
|
102
|
-
<StepSkeleton />
|
|
103
|
-
<StepSkeleton separator={false} />
|
|
104
|
-
</div>
|
|
105
|
-
)}
|
|
106
|
-
</Container>
|
|
107
|
-
);
|
|
108
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|