@rango-dev/ui 0.1.11-next.3 → 0.1.11-next.5
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/Icon/types.d.ts +1 -0
- package/dist/components/StepDetail/StepDetail.d.ts +3 -1
- package/dist/components/common/Image.d.ts +6 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/containers/SwapHistory/SwapHistory.d.ts +1 -1
- package/dist/ui.cjs.development.js +166 -130
- 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 +166 -131
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/BestRoute/BestRoute.tsx +2 -5
- package/src/components/BlockchainsList/BlockchainsList.tsx +8 -6
- package/src/components/Icon/common.ts +10 -0
- package/src/components/Icon/types.tsx +1 -0
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +8 -5
- package/src/components/SelectableWalletList/SelectableWalletList.tsx +2 -1
- package/src/components/StepDetail/StepDetail.tsx +42 -12
- package/src/components/SwapDetail/Token.tsx +7 -9
- package/src/components/TokenList/TokenItem.tsx +8 -5
- package/src/components/Wallet/Wallet.tsx +8 -5
- package/src/components/common/Image.tsx +27 -0
- package/src/components/common/index.ts +1 -0
- package/src/containers/History/History.tsx +1 -1
- package/src/containers/SwapHistory/SwapHistory.tsx +84 -101
package/dist/ui.esm.js
CHANGED
|
@@ -218,6 +218,11 @@ var SvgWithStrokeColor = /*#__PURE__*/styled('svg', {
|
|
|
218
218
|
}, _white["." + darkTheme + " &"] = {
|
|
219
219
|
$$color: '$colors$foreground'
|
|
220
220
|
}, _white.stroke = '$$color', _white)
|
|
221
|
+
},
|
|
222
|
+
disabled: {
|
|
223
|
+
"true": {
|
|
224
|
+
stroke: '$neutrals400'
|
|
225
|
+
}
|
|
221
226
|
}
|
|
222
227
|
}
|
|
223
228
|
});
|
|
@@ -247,6 +252,11 @@ var SvgWithFillColor = /*#__PURE__*/styled('svg', {
|
|
|
247
252
|
}, _white2["." + darkTheme + " &"] = {
|
|
248
253
|
$$color: '$colors$foreground'
|
|
249
254
|
}, _white2.fill = '$$color', _white2)
|
|
255
|
+
},
|
|
256
|
+
disabled: {
|
|
257
|
+
"true": {
|
|
258
|
+
stroke: '$neutrals400'
|
|
259
|
+
}
|
|
250
260
|
}
|
|
251
261
|
}
|
|
252
262
|
});
|
|
@@ -1642,6 +1652,14 @@ var StepContainer = /*#__PURE__*/styled('div', {
|
|
|
1642
1652
|
textAlign: 'center',
|
|
1643
1653
|
justifyContent: 'center'
|
|
1644
1654
|
}
|
|
1655
|
+
},
|
|
1656
|
+
success: {
|
|
1657
|
+
"true": {
|
|
1658
|
+
filter: 'none'
|
|
1659
|
+
},
|
|
1660
|
+
"false": {
|
|
1661
|
+
filter: 'grayscale(100%)'
|
|
1662
|
+
}
|
|
1645
1663
|
}
|
|
1646
1664
|
}
|
|
1647
1665
|
});
|
|
@@ -1662,18 +1680,23 @@ var Detail = /*#__PURE__*/styled('div', {
|
|
|
1662
1680
|
});
|
|
1663
1681
|
var SubTitle = /*#__PURE__*/styled(Typography, {
|
|
1664
1682
|
color: '$neutrals600',
|
|
1665
|
-
display: 'block'
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1683
|
+
display: 'block',
|
|
1684
|
+
paddingLeft: '$8'
|
|
1685
|
+
});
|
|
1686
|
+
function StepDetail(props) {
|
|
1687
|
+
var logo = props.logo,
|
|
1688
|
+
chainLogo = props.chainLogo,
|
|
1689
|
+
amount = props.amount,
|
|
1690
|
+
symbol = props.symbol,
|
|
1691
|
+
blockchain = props.blockchain,
|
|
1692
|
+
estimatedAmount = props.estimatedAmount,
|
|
1693
|
+
_props$success = props.success,
|
|
1694
|
+
success = _props$success === void 0 ? true : _props$success,
|
|
1695
|
+
_props$direction = props.direction,
|
|
1696
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction;
|
|
1675
1697
|
return React__default.createElement(StepContainer, {
|
|
1676
|
-
direction: direction
|
|
1698
|
+
direction: direction,
|
|
1699
|
+
success: success
|
|
1677
1700
|
}, React__default.createElement(StepLogoContainer, {
|
|
1678
1701
|
direction: direction
|
|
1679
1702
|
}, React__default.createElement(Logo, {
|
|
@@ -1684,13 +1707,20 @@ function StepDetail(_ref) {
|
|
|
1684
1707
|
alt: blockchain
|
|
1685
1708
|
}))), React__default.createElement(Detail, {
|
|
1686
1709
|
pl: direction === 'horizontal'
|
|
1687
|
-
}, React__default.createElement(Typography, {
|
|
1710
|
+
}, amount && React__default.createElement(Typography, {
|
|
1688
1711
|
noWrap: true,
|
|
1689
1712
|
variant: direction === 'vertical' ? 'body2' : 'h6'
|
|
1690
|
-
}, amount
|
|
1713
|
+
}, amount), !amount && estimatedAmount && React__default.createElement(Typography, {
|
|
1714
|
+
noWrap: true,
|
|
1715
|
+
variant: direction === 'vertical' ? 'body2' : 'h6',
|
|
1716
|
+
color: '$neutrals500'
|
|
1717
|
+
}, estimatedAmount), "\xA0", React__default.createElement(Typography, {
|
|
1718
|
+
variant: direction === 'vertical' ? 'body2' : 'h6',
|
|
1719
|
+
noWrap: true
|
|
1720
|
+
}, symbol), React__default.createElement(SubTitle, {
|
|
1691
1721
|
noWrap: true,
|
|
1692
1722
|
variant: "caption",
|
|
1693
|
-
color: "neutrals800"
|
|
1723
|
+
color: "$neutrals800"
|
|
1694
1724
|
}, "on ", blockchain)));
|
|
1695
1725
|
}
|
|
1696
1726
|
|
|
@@ -1912,6 +1942,37 @@ function Tooltip(_ref) {
|
|
|
1912
1942
|
})))));
|
|
1913
1943
|
}
|
|
1914
1944
|
|
|
1945
|
+
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
1946
|
+
width: '10px',
|
|
1947
|
+
height: '10px',
|
|
1948
|
+
backgroundColor: '$primary',
|
|
1949
|
+
borderRadius: '99999px'
|
|
1950
|
+
});
|
|
1951
|
+
|
|
1952
|
+
var _excluded$E = ["size"];
|
|
1953
|
+
var ImageContainer = /*#__PURE__*/styled('div', {
|
|
1954
|
+
display: 'flex',
|
|
1955
|
+
justifyContent: 'center',
|
|
1956
|
+
alignItems: 'center',
|
|
1957
|
+
'.image': {
|
|
1958
|
+
width: '100%',
|
|
1959
|
+
height: '100%',
|
|
1960
|
+
objectFit: 'contain'
|
|
1961
|
+
}
|
|
1962
|
+
});
|
|
1963
|
+
function Image(props) {
|
|
1964
|
+
var size = props.size,
|
|
1965
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$E);
|
|
1966
|
+
return React__default.createElement(ImageContainer, {
|
|
1967
|
+
css: {
|
|
1968
|
+
width: size + 'px',
|
|
1969
|
+
height: size + 'px'
|
|
1970
|
+
}
|
|
1971
|
+
}, React__default.createElement("img", Object.assign({
|
|
1972
|
+
className: "image"
|
|
1973
|
+
}, otherProps)));
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1915
1976
|
var Container = /*#__PURE__*/styled('div', {
|
|
1916
1977
|
borderRadius: '$5',
|
|
1917
1978
|
border: '1px solid $neutrals300',
|
|
@@ -1949,10 +2010,6 @@ var HR = /*#__PURE__*/styled('hr', {
|
|
|
1949
2010
|
border: '1px solid $neutrals400',
|
|
1950
2011
|
margin: '$8 0'
|
|
1951
2012
|
});
|
|
1952
|
-
var SwapperLogo = /*#__PURE__*/styled('img', {
|
|
1953
|
-
width: '$16',
|
|
1954
|
-
height: '$16'
|
|
1955
|
-
});
|
|
1956
2013
|
var RelativeContainer = /*#__PURE__*/styled('div', {
|
|
1957
2014
|
position: 'relative'
|
|
1958
2015
|
});
|
|
@@ -2084,9 +2141,10 @@ function BestRoute(props) {
|
|
|
2084
2141
|
chainLogo: swap.from.blockchainLogo,
|
|
2085
2142
|
blockchain: swap.from.blockchain,
|
|
2086
2143
|
amount: swap.fromAmount
|
|
2087
|
-
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(
|
|
2144
|
+
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(Image, {
|
|
2088
2145
|
src: swap.swapperLogo,
|
|
2089
|
-
alt: swap.swapperId
|
|
2146
|
+
alt: swap.swapperId,
|
|
2147
|
+
size: 20
|
|
2090
2148
|
}), React__default.createElement(Line, null)), index + 1 === ((_data$result2 = data.result) == null ? void 0 : _data$result2.swaps.length) && React__default.createElement(ArrowRight, null), React__default.createElement(StepDetail, {
|
|
2091
2149
|
direction: "vertical",
|
|
2092
2150
|
logo: swap.to.logo,
|
|
@@ -2100,7 +2158,7 @@ function BestRoute(props) {
|
|
|
2100
2158
|
}, "No routes found")));
|
|
2101
2159
|
}
|
|
2102
2160
|
|
|
2103
|
-
var _excluded$
|
|
2161
|
+
var _excluded$F = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
|
|
2104
2162
|
var _ghost, _css, _css2, _css3;
|
|
2105
2163
|
var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
2106
2164
|
borderRadius: '$5',
|
|
@@ -2445,7 +2503,7 @@ function Button(_ref) {
|
|
|
2445
2503
|
suffix = _ref.suffix,
|
|
2446
2504
|
align = _ref.align,
|
|
2447
2505
|
flexContent = _ref.flexContent,
|
|
2448
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2506
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
2449
2507
|
var isDisabled = loading || disabled;
|
|
2450
2508
|
return React__default.createElement(ButtonContainer, Object.assign({
|
|
2451
2509
|
disabled: isDisabled
|
|
@@ -2463,13 +2521,6 @@ function Button(_ref) {
|
|
|
2463
2521
|
}), suffix);
|
|
2464
2522
|
}
|
|
2465
2523
|
|
|
2466
|
-
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
2467
|
-
width: '10px',
|
|
2468
|
-
height: '10px',
|
|
2469
|
-
backgroundColor: '$primary',
|
|
2470
|
-
borderRadius: '99999px'
|
|
2471
|
-
});
|
|
2472
|
-
|
|
2473
2524
|
var ListContainer = /*#__PURE__*/styled('div', {
|
|
2474
2525
|
display: 'grid',
|
|
2475
2526
|
gap: '.5rem',
|
|
@@ -2478,10 +2529,8 @@ var ListContainer = /*#__PURE__*/styled('div', {
|
|
|
2478
2529
|
width: '100%',
|
|
2479
2530
|
height: '100%'
|
|
2480
2531
|
});
|
|
2481
|
-
var
|
|
2482
|
-
|
|
2483
|
-
maxHeight: '1.5rem',
|
|
2484
|
-
marginRight: '$4'
|
|
2532
|
+
var ImageContainer$1 = /*#__PURE__*/styled('div', {
|
|
2533
|
+
paddingRight: '$4'
|
|
2485
2534
|
});
|
|
2486
2535
|
function BlockchainsList(props) {
|
|
2487
2536
|
var list = props.list,
|
|
@@ -2508,9 +2557,10 @@ function BlockchainsList(props) {
|
|
|
2508
2557
|
type: isSelect(blockchain.name) ? 'primary' : undefined,
|
|
2509
2558
|
variant: "outlined",
|
|
2510
2559
|
size: "large",
|
|
2511
|
-
prefix: React__default.createElement(Image, {
|
|
2560
|
+
prefix: React__default.createElement(ImageContainer$1, null, React__default.createElement(Image, {
|
|
2561
|
+
size: 24,
|
|
2512
2562
|
src: blockchain.logo
|
|
2513
|
-
}),
|
|
2563
|
+
})),
|
|
2514
2564
|
suffix: isSelect(blockchain.name) ? React__default.createElement(FilledCircle, null) : undefined,
|
|
2515
2565
|
align: "start",
|
|
2516
2566
|
onClick: changeSelectedBlockchain.bind(null, blockchain),
|
|
@@ -2581,7 +2631,7 @@ function Header(props) {
|
|
|
2581
2631
|
}, props.title), props.suffix || React__default.createElement("div", null));
|
|
2582
2632
|
}
|
|
2583
2633
|
|
|
2584
|
-
var _excluded$
|
|
2634
|
+
var _excluded$G = ["label", "prefix", "suffix", "children", "size", "style"];
|
|
2585
2635
|
var InputContainer = /*#__PURE__*/styled('div', {
|
|
2586
2636
|
backgroundColor: '$background',
|
|
2587
2637
|
padding: '1px',
|
|
@@ -2668,7 +2718,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2668
2718
|
suffix = props.suffix,
|
|
2669
2719
|
size = props.size,
|
|
2670
2720
|
style = props.style,
|
|
2671
|
-
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2721
|
+
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$G);
|
|
2672
2722
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2673
2723
|
className: "_text"
|
|
2674
2724
|
}, inputAttributes.id && {
|
|
@@ -3013,10 +3063,8 @@ function VirtualizedList(props) {
|
|
|
3013
3063
|
});
|
|
3014
3064
|
}
|
|
3015
3065
|
|
|
3016
|
-
var
|
|
3017
|
-
|
|
3018
|
-
maxHeight: '$32',
|
|
3019
|
-
marginRight: '$16'
|
|
3066
|
+
var TokenImageContainer = /*#__PURE__*/styled('div', {
|
|
3067
|
+
paddingRight: '$16'
|
|
3020
3068
|
});
|
|
3021
3069
|
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
3022
3070
|
display: 'flex',
|
|
@@ -3049,9 +3097,10 @@ function TokenItem(props) {
|
|
|
3049
3097
|
align: "start",
|
|
3050
3098
|
onClick: onClick.bind(null, token),
|
|
3051
3099
|
type: selected ? 'primary' : undefined,
|
|
3052
|
-
prefix: React__default.createElement(
|
|
3053
|
-
src: token.image
|
|
3054
|
-
|
|
3100
|
+
prefix: React__default.createElement(TokenImageContainer, null, React__default.createElement(Image, {
|
|
3101
|
+
src: token.image,
|
|
3102
|
+
size: 32
|
|
3103
|
+
})),
|
|
3055
3104
|
suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
|
|
3056
3105
|
variant: "body2"
|
|
3057
3106
|
}, token.balance.amount), React__default.createElement(Typography, {
|
|
@@ -3065,7 +3114,7 @@ function TokenItem(props) {
|
|
|
3065
3114
|
}, token.name))));
|
|
3066
3115
|
}
|
|
3067
3116
|
|
|
3068
|
-
var _excluded$
|
|
3117
|
+
var _excluded$H = ["style"];
|
|
3069
3118
|
var PAGE_SIZE = 20;
|
|
3070
3119
|
function TokenList(props) {
|
|
3071
3120
|
var list = props.list,
|
|
@@ -3105,7 +3154,7 @@ function TokenList(props) {
|
|
|
3105
3154
|
}, [tokens.length]);
|
|
3106
3155
|
var innerElementType = forwardRef(function (_ref, ref) {
|
|
3107
3156
|
var style = _ref.style,
|
|
3108
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3157
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
3109
3158
|
return React__default.createElement("div", Object.assign({
|
|
3110
3159
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3111
3160
|
ref: ref,
|
|
@@ -3220,7 +3269,7 @@ function BlockchainSelector(props) {
|
|
|
3220
3269
|
});
|
|
3221
3270
|
}
|
|
3222
3271
|
|
|
3223
|
-
var _excluded$
|
|
3272
|
+
var _excluded$I = ["label", "id"];
|
|
3224
3273
|
var CheckboxContainer = /*#__PURE__*/styled('div', {
|
|
3225
3274
|
display: 'flex',
|
|
3226
3275
|
alignItems: 'center'
|
|
@@ -3245,7 +3294,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
|
|
|
3245
3294
|
function Checkbox(_ref) {
|
|
3246
3295
|
var label = _ref.label,
|
|
3247
3296
|
id = _ref.id,
|
|
3248
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3297
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
3249
3298
|
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
3250
3299
|
id: id
|
|
3251
3300
|
}, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
|
|
@@ -3378,10 +3427,8 @@ var State = function State(_ref) {
|
|
|
3378
3427
|
})), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
|
|
3379
3428
|
};
|
|
3380
3429
|
|
|
3381
|
-
var
|
|
3382
|
-
|
|
3383
|
-
height: '$24',
|
|
3384
|
-
marginRight: '$12'
|
|
3430
|
+
var WalletImageContainer = /*#__PURE__*/styled('div', {
|
|
3431
|
+
paddingRight: '$12'
|
|
3385
3432
|
});
|
|
3386
3433
|
var Text = /*#__PURE__*/styled('div', {
|
|
3387
3434
|
display: 'flex',
|
|
@@ -3418,9 +3465,10 @@ function Wallet(props) {
|
|
|
3418
3465
|
align: "start",
|
|
3419
3466
|
variant: "outlined",
|
|
3420
3467
|
size: "large",
|
|
3421
|
-
prefix: React__default.createElement(
|
|
3422
|
-
src: image
|
|
3423
|
-
|
|
3468
|
+
prefix: React__default.createElement(WalletImageContainer, null, React__default.createElement(Image, {
|
|
3469
|
+
src: image,
|
|
3470
|
+
size: 24
|
|
3471
|
+
})),
|
|
3424
3472
|
suffix: React__default.createElement(State, {
|
|
3425
3473
|
walletState: state,
|
|
3426
3474
|
installLink: installLink
|
|
@@ -3536,10 +3584,8 @@ var LiquiditySourceType = /*#__PURE__*/styled('div', {
|
|
|
3536
3584
|
paddingTop: '$8',
|
|
3537
3585
|
paddingBottom: '$8'
|
|
3538
3586
|
});
|
|
3539
|
-
var
|
|
3540
|
-
|
|
3541
|
-
maxHeight: '$20',
|
|
3542
|
-
marginRight: '$16'
|
|
3587
|
+
var LiquidityImageContainer = /*#__PURE__*/styled('div', {
|
|
3588
|
+
paddingRight: '$16'
|
|
3543
3589
|
});
|
|
3544
3590
|
var LoaderContainer$1 = /*#__PURE__*/styled('div', {
|
|
3545
3591
|
display: 'flex',
|
|
@@ -3637,9 +3683,10 @@ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
|
3637
3683
|
size: "large",
|
|
3638
3684
|
align: "start",
|
|
3639
3685
|
variant: "outlined",
|
|
3640
|
-
prefix: React__default.createElement(
|
|
3641
|
-
src: liquiditySource.logo
|
|
3642
|
-
|
|
3686
|
+
prefix: React__default.createElement(LiquidityImageContainer, null, React__default.createElement(Image, {
|
|
3687
|
+
src: liquiditySource.logo,
|
|
3688
|
+
size: 20
|
|
3689
|
+
})),
|
|
3643
3690
|
suffix: React__default.createElement(Switch, {
|
|
3644
3691
|
checked: selected
|
|
3645
3692
|
}),
|
|
@@ -3779,11 +3826,10 @@ function SelectableWalletList(_ref) {
|
|
|
3779
3826
|
checked: checked,
|
|
3780
3827
|
onClick: onClick.bind(null, w),
|
|
3781
3828
|
key: index
|
|
3782
|
-
}, React__default.createElement(
|
|
3829
|
+
}, React__default.createElement(Image, {
|
|
3783
3830
|
src: w.image,
|
|
3784
3831
|
alt: w.walletType,
|
|
3785
|
-
|
|
3786
|
-
height: 24
|
|
3832
|
+
size: 24
|
|
3787
3833
|
}), React__default.createElement(Typography, {
|
|
3788
3834
|
variant: "body2"
|
|
3789
3835
|
}, w.name), React__default.createElement(Typography, {
|
|
@@ -4068,14 +4114,8 @@ var TokenContainer = /*#__PURE__*/styled('div', {
|
|
|
4068
4114
|
fontWeight: 'bold'
|
|
4069
4115
|
}
|
|
4070
4116
|
});
|
|
4071
|
-
var TokenImage
|
|
4117
|
+
var TokenImage = /*#__PURE__*/styled('div', {
|
|
4072
4118
|
position: 'relative',
|
|
4073
|
-
width: '$24',
|
|
4074
|
-
height: '$24',
|
|
4075
|
-
img: {
|
|
4076
|
-
width: '100%',
|
|
4077
|
-
display: 'block'
|
|
4078
|
-
},
|
|
4079
4119
|
'.overlay': {
|
|
4080
4120
|
position: 'absolute',
|
|
4081
4121
|
right: -4,
|
|
@@ -4084,19 +4124,24 @@ var TokenImage$1 = /*#__PURE__*/styled('div', {
|
|
|
4084
4124
|
height: '$16',
|
|
4085
4125
|
padding: '$2',
|
|
4086
4126
|
borderRadius: '50%',
|
|
4127
|
+
display: 'flex',
|
|
4128
|
+
justifyContent: 'center',
|
|
4129
|
+
alignItems: 'center',
|
|
4087
4130
|
backgroundColor: '$background',
|
|
4088
4131
|
border: '1px solid $neutrals400'
|
|
4089
4132
|
}
|
|
4090
4133
|
});
|
|
4091
4134
|
function Token(props) {
|
|
4092
|
-
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage
|
|
4135
|
+
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage, null, React__default.createElement(Image, {
|
|
4093
4136
|
src: props.data.token.logo,
|
|
4094
|
-
alt: ""
|
|
4137
|
+
alt: "",
|
|
4138
|
+
size: 24
|
|
4095
4139
|
}), React__default.createElement("div", {
|
|
4096
4140
|
className: "overlay"
|
|
4097
|
-
}, React__default.createElement(
|
|
4141
|
+
}, React__default.createElement(Image, {
|
|
4098
4142
|
src: props.data.blockchain.logo,
|
|
4099
|
-
alt: props.data.blockchain.name
|
|
4143
|
+
alt: props.data.blockchain.name,
|
|
4144
|
+
size: 12
|
|
4100
4145
|
}))), React__default.createElement(Spacer, {
|
|
4101
4146
|
size: 8
|
|
4102
4147
|
}), React__default.createElement("span", {
|
|
@@ -4530,7 +4575,7 @@ function History(_ref) {
|
|
|
4530
4575
|
return React__default.createElement(SecondaryPage, {
|
|
4531
4576
|
onBack: onBack,
|
|
4532
4577
|
textField: true,
|
|
4533
|
-
textFieldPlaceholder: "Search
|
|
4578
|
+
textFieldPlaceholder: "Search by Blockchain/Token/Request Id",
|
|
4534
4579
|
title: "Swaps"
|
|
4535
4580
|
}, function (searchedFor) {
|
|
4536
4581
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
@@ -4602,20 +4647,31 @@ var SwapMessages = function SwapMessages(props) {
|
|
|
4602
4647
|
}, "wallet"))));
|
|
4603
4648
|
};
|
|
4604
4649
|
|
|
4605
|
-
var _excluded$
|
|
4650
|
+
var _excluded$J = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "date", "onRetry", "previewInputs"];
|
|
4606
4651
|
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4607
4652
|
display: 'flex',
|
|
4608
4653
|
alignItems: 'center',
|
|
4609
|
-
|
|
4654
|
+
paddingLeft: '$4',
|
|
4655
|
+
variants: {
|
|
4656
|
+
created: {
|
|
4657
|
+
"true": {
|
|
4658
|
+
filter: 'grayscale(100%)'
|
|
4659
|
+
}
|
|
4660
|
+
},
|
|
4661
|
+
running: {
|
|
4662
|
+
"true": {
|
|
4663
|
+
animation: pulse + " 2s ease-in-out infinite"
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
}
|
|
4667
|
+
});
|
|
4668
|
+
var FeeContainer = /*#__PURE__*/styled('div', {
|
|
4669
|
+
paddingLeft: '$4'
|
|
4610
4670
|
});
|
|
4611
4671
|
var Fee = /*#__PURE__*/styled('div', {
|
|
4612
4672
|
display: 'flex',
|
|
4613
4673
|
alignItems: 'center'
|
|
4614
4674
|
});
|
|
4615
|
-
var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
4616
|
-
width: '$16',
|
|
4617
|
-
height: '$16'
|
|
4618
|
-
});
|
|
4619
4675
|
var RelativeContainer$1 = /*#__PURE__*/styled('div', {
|
|
4620
4676
|
position: 'relative'
|
|
4621
4677
|
});
|
|
@@ -4624,7 +4680,7 @@ var Dot$1 = /*#__PURE__*/styled('div', {
|
|
|
4624
4680
|
height: '$8',
|
|
4625
4681
|
backgroundColor: '$foreground',
|
|
4626
4682
|
borderRadius: '4px',
|
|
4627
|
-
marginLeft: '
|
|
4683
|
+
marginLeft: '11px'
|
|
4628
4684
|
});
|
|
4629
4685
|
var ArrowDown = /*#__PURE__*/styled('div', {
|
|
4630
4686
|
width: '0px',
|
|
@@ -4632,7 +4688,7 @@ var ArrowDown = /*#__PURE__*/styled('div', {
|
|
|
4632
4688
|
borderLeft: '5px solid transparent',
|
|
4633
4689
|
borderRight: '5px solid transparent',
|
|
4634
4690
|
borderTop: '5px solid $foreground',
|
|
4635
|
-
marginLeft: '$
|
|
4691
|
+
marginLeft: '$10'
|
|
4636
4692
|
});
|
|
4637
4693
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4638
4694
|
color: '$primary',
|
|
@@ -4660,13 +4716,10 @@ var Description = /*#__PURE__*/styled(Typography, {
|
|
|
4660
4716
|
color: '$success',
|
|
4661
4717
|
marginLeft: '$8'
|
|
4662
4718
|
});
|
|
4663
|
-
var Error = /*#__PURE__*/styled(Description, {
|
|
4664
|
-
color: '$error'
|
|
4665
|
-
});
|
|
4666
4719
|
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4667
4720
|
width: '0',
|
|
4668
4721
|
minHeight: '$16',
|
|
4669
|
-
marginLeft: '
|
|
4722
|
+
marginLeft: '14px',
|
|
4670
4723
|
border: '1px dashed $foreground',
|
|
4671
4724
|
borderRadius: 'inherit'
|
|
4672
4725
|
});
|
|
@@ -4709,22 +4762,9 @@ var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
|
4709
4762
|
color: '$neutrals600',
|
|
4710
4763
|
fontSize: '$12'
|
|
4711
4764
|
});
|
|
4712
|
-
var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
4713
|
-
variants: {
|
|
4714
|
-
hasNotStarted: {
|
|
4715
|
-
"true": {
|
|
4716
|
-
filter: 'grayscale(100%)'
|
|
4717
|
-
}
|
|
4718
|
-
},
|
|
4719
|
-
isRunning: {
|
|
4720
|
-
"true": {
|
|
4721
|
-
animation: pulse + " 2s ease-in-out infinite"
|
|
4722
|
-
}
|
|
4723
|
-
}
|
|
4724
|
-
}
|
|
4725
|
-
});
|
|
4726
4765
|
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4727
|
-
overflowY: 'auto'
|
|
4766
|
+
overflowY: 'auto',
|
|
4767
|
+
paddingTop: '$8'
|
|
4728
4768
|
});
|
|
4729
4769
|
function SwapHistory(props) {
|
|
4730
4770
|
var pendingSwap = props.pendingSwap,
|
|
@@ -4734,7 +4774,7 @@ function SwapHistory(props) {
|
|
|
4734
4774
|
onCancel = props.onCancel,
|
|
4735
4775
|
date = props.date,
|
|
4736
4776
|
onRetry = props.onRetry,
|
|
4737
|
-
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
4777
|
+
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$J);
|
|
4738
4778
|
var _useState = useState(false),
|
|
4739
4779
|
showDrawer = _useState[0],
|
|
4740
4780
|
setShowDrawer = _useState[1];
|
|
@@ -4774,37 +4814,30 @@ function SwapHistory(props) {
|
|
|
4774
4814
|
}))), React__default.createElement(ExtraDetails, null, date))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
|
|
4775
4815
|
size: 32
|
|
4776
4816
|
}), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4777
|
-
return React__default.createElement(
|
|
4778
|
-
key: index
|
|
4779
|
-
hasNotStarted: step.status === 'created',
|
|
4780
|
-
isRunning: step.status != 'failed' && step.status != 'success' && step.status != 'created'
|
|
4817
|
+
return React__default.createElement("div", {
|
|
4818
|
+
key: index
|
|
4781
4819
|
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4782
4820
|
logo: step.fromLogo,
|
|
4783
4821
|
symbol: step.fromSymbol,
|
|
4784
|
-
// @ts-ignore
|
|
4785
4822
|
chainLogo: step.fromBlockchainLogo || '',
|
|
4786
4823
|
blockchain: step.fromBlockchain,
|
|
4787
4824
|
amount: pendingSwap.inputAmount
|
|
4788
|
-
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1,
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4825
|
+
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, {
|
|
4826
|
+
created: step.status === 'created',
|
|
4827
|
+
running: !['created', 'success', 'failed'].includes(step.status)
|
|
4828
|
+
}, React__default.createElement(Image, {
|
|
4829
|
+
src: step.swapperLogo || '',
|
|
4830
|
+
alt: step.swapperId,
|
|
4831
|
+
size: 20
|
|
4832
|
+
}), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
|
|
4795
4833
|
variant: "caption"
|
|
4796
|
-
},
|
|
4797
|
-
// @ts-ignore
|
|
4798
|
-
step.swapperType, ' ', "from ", step.fromSymbol, " to ", step.toSymbol, "via ", step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4799
|
-
ml: 4,
|
|
4834
|
+
}, 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, {
|
|
4800
4835
|
variant: "caption"
|
|
4801
|
-
}, "$",
|
|
4802
|
-
// @ts-ignore
|
|
4803
|
-
step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
|
|
4836
|
+
}, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4804
4837
|
style: {
|
|
4805
4838
|
display: 'flex'
|
|
4806
4839
|
}
|
|
4807
|
-
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4840
|
+
}, 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) {
|
|
4808
4841
|
return React__default.createElement(InternalDetail, {
|
|
4809
4842
|
key: index
|
|
4810
4843
|
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
|
|
@@ -4817,17 +4850,19 @@ function SwapHistory(props) {
|
|
|
4817
4850
|
rel: "noreferrer",
|
|
4818
4851
|
key: index
|
|
4819
4852
|
}, "TX-Link"));
|
|
4820
|
-
}), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4853
|
+
})), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4821
4854
|
color: "error"
|
|
4822
|
-
}), React__default.createElement(
|
|
4823
|
-
variant: "body2"
|
|
4855
|
+
}), React__default.createElement(Description, {
|
|
4856
|
+
variant: "body2",
|
|
4857
|
+
color: "$error500"
|
|
4824
4858
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4825
4859
|
logo: step.toLogo,
|
|
4826
4860
|
symbol: step.toSymbol,
|
|
4827
|
-
// @ts-ignore
|
|
4828
4861
|
chainLogo: step.toBlockchainLogo || '',
|
|
4829
4862
|
blockchain: step.toBlockchain,
|
|
4830
|
-
amount: step.outputAmount || ''
|
|
4863
|
+
amount: step.outputAmount || '',
|
|
4864
|
+
estimatedAmount: step.expectedOutputAmountHumanReadable || '',
|
|
4865
|
+
success: step.status === 'success'
|
|
4831
4866
|
}));
|
|
4832
4867
|
}), React__default.createElement(Divider, {
|
|
4833
4868
|
size: 32
|
|
@@ -4867,5 +4902,5 @@ function SwapHistory(props) {
|
|
|
4867
4902
|
}));
|
|
4868
4903
|
}
|
|
4869
4904
|
|
|
4870
|
-
export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, ArrowRightIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, ChevronRightIcon, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConnectWalletsModal, CopyIcon, DeleteCircleIcon, DeleteWalletIcon, DisconnectIcon, Divider, DownloadIcon, Drawer, FilledCircle, GasIcon, Header, History, HistoryIcon, HorizontalSwapIcon, InfoCircleIcon, LiquiditySourcesSelector, LoadingFailedAlert, MinusCircleIcon, Modal, Radio, RetryIcon, RetryLeftIcon, RetryRightIcon, SearchIcon, SearchMinusIcon, SecondaryPage, SelectableWalletList, Settings, SettingsIcon, SignatureIcon, Spacer, Spinner, StepDetail, SwapContainer, SwapDetail, SwapHistory, SwapWalletIcon, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
|
|
4905
|
+
export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, ArrowRightIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, ChevronRightIcon, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConnectWalletsModal, CopyIcon, DeleteCircleIcon, DeleteWalletIcon, DisconnectIcon, Divider, DownloadIcon, Drawer, FilledCircle, GasIcon, Header, History, HistoryIcon, HorizontalSwapIcon, Image, InfoCircleIcon, LiquiditySourcesSelector, LoadingFailedAlert, MinusCircleIcon, Modal, Radio, RetryIcon, RetryLeftIcon, RetryRightIcon, SearchIcon, SearchMinusIcon, SecondaryPage, SelectableWalletList, Settings, SettingsIcon, SignatureIcon, Spacer, Spinner, StepDetail, SwapContainer, SwapDetail, SwapHistory, SwapWalletIcon, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
|
|
4871
4906
|
//# sourceMappingURL=ui.esm.js.map
|