@rango-dev/ui 0.1.11-next.4 → 0.1.11-next.6
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/StepDetail/StepDetail.d.ts +3 -1
- package/dist/containers/SwapHistory/SwapHistory.d.ts +1 -0
- package/dist/ui.cjs.development.js +124 -105
- 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 +124 -105
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/BlockchainSelector/BlockchainSelector.tsx +1 -0
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +1 -0
- package/src/components/StepDetail/StepDetail.tsx +55 -18
- package/src/containers/SwapHistory/SwapHistory.tsx +82 -94
package/dist/ui.esm.js
CHANGED
|
@@ -1607,37 +1607,6 @@ Typography.toString = function () {
|
|
|
1607
1607
|
return '._typography';
|
|
1608
1608
|
};
|
|
1609
1609
|
|
|
1610
|
-
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
1611
|
-
width: '10px',
|
|
1612
|
-
height: '10px',
|
|
1613
|
-
backgroundColor: '$primary',
|
|
1614
|
-
borderRadius: '99999px'
|
|
1615
|
-
});
|
|
1616
|
-
|
|
1617
|
-
var _excluded$E = ["size"];
|
|
1618
|
-
var ImageContainer = /*#__PURE__*/styled('div', {
|
|
1619
|
-
display: 'flex',
|
|
1620
|
-
justifyContent: 'center',
|
|
1621
|
-
alignItems: 'center',
|
|
1622
|
-
'.image': {
|
|
1623
|
-
width: '100%',
|
|
1624
|
-
height: '100%',
|
|
1625
|
-
objectFit: 'contain'
|
|
1626
|
-
}
|
|
1627
|
-
});
|
|
1628
|
-
function Image(props) {
|
|
1629
|
-
var size = props.size,
|
|
1630
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$E);
|
|
1631
|
-
return React__default.createElement(ImageContainer, {
|
|
1632
|
-
css: {
|
|
1633
|
-
width: size + 'px',
|
|
1634
|
-
height: size + 'px'
|
|
1635
|
-
}
|
|
1636
|
-
}, React__default.createElement("img", Object.assign({
|
|
1637
|
-
className: "image"
|
|
1638
|
-
}, otherProps)));
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
1610
|
var StepLogoContainer = /*#__PURE__*/styled('div', {
|
|
1642
1611
|
position: 'relative',
|
|
1643
1612
|
width: '$28',
|
|
@@ -1651,18 +1620,25 @@ var StepLogoContainer = /*#__PURE__*/styled('div', {
|
|
|
1651
1620
|
}
|
|
1652
1621
|
}
|
|
1653
1622
|
});
|
|
1623
|
+
var Logo = /*#__PURE__*/styled('img', {
|
|
1624
|
+
width: '$28',
|
|
1625
|
+
height: '$28',
|
|
1626
|
+
borderRadius: '50%'
|
|
1627
|
+
});
|
|
1654
1628
|
var ChainLogo = /*#__PURE__*/styled('div', {
|
|
1655
1629
|
position: 'absolute',
|
|
1656
1630
|
right: -4,
|
|
1657
1631
|
bottom: -4,
|
|
1658
1632
|
width: '$16',
|
|
1659
1633
|
height: '$16',
|
|
1634
|
+
padding: '$2',
|
|
1660
1635
|
borderRadius: '50%',
|
|
1661
|
-
display: 'flex',
|
|
1662
|
-
justifyContent: 'center',
|
|
1663
|
-
alignItems: 'center',
|
|
1664
1636
|
backgroundColor: '$background',
|
|
1665
|
-
border: '1px solid $neutrals400'
|
|
1637
|
+
border: '1px solid $neutrals400',
|
|
1638
|
+
img: {
|
|
1639
|
+
width: '100%',
|
|
1640
|
+
display: 'block'
|
|
1641
|
+
}
|
|
1666
1642
|
});
|
|
1667
1643
|
var StepContainer = /*#__PURE__*/styled('div', {
|
|
1668
1644
|
display: 'flex',
|
|
@@ -1676,6 +1652,14 @@ var StepContainer = /*#__PURE__*/styled('div', {
|
|
|
1676
1652
|
textAlign: 'center',
|
|
1677
1653
|
justifyContent: 'center'
|
|
1678
1654
|
}
|
|
1655
|
+
},
|
|
1656
|
+
success: {
|
|
1657
|
+
"true": {
|
|
1658
|
+
filter: 'none'
|
|
1659
|
+
},
|
|
1660
|
+
"false": {
|
|
1661
|
+
filter: 'grayscale(100%)'
|
|
1662
|
+
}
|
|
1679
1663
|
}
|
|
1680
1664
|
}
|
|
1681
1665
|
});
|
|
@@ -1696,37 +1680,47 @@ var Detail = /*#__PURE__*/styled('div', {
|
|
|
1696
1680
|
});
|
|
1697
1681
|
var SubTitle = /*#__PURE__*/styled(Typography, {
|
|
1698
1682
|
color: '$neutrals600',
|
|
1699
|
-
display: 'block'
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
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;
|
|
1709
1697
|
return React__default.createElement(StepContainer, {
|
|
1710
|
-
direction: direction
|
|
1698
|
+
direction: direction,
|
|
1699
|
+
success: success
|
|
1711
1700
|
}, React__default.createElement(StepLogoContainer, {
|
|
1712
1701
|
direction: direction
|
|
1713
|
-
}, React__default.createElement(
|
|
1702
|
+
}, React__default.createElement(Logo, {
|
|
1714
1703
|
src: logo,
|
|
1715
|
-
alt: symbol
|
|
1716
|
-
|
|
1717
|
-
}), React__default.createElement(ChainLogo, null, React__default.createElement(Image, {
|
|
1704
|
+
alt: symbol
|
|
1705
|
+
}), React__default.createElement(ChainLogo, null, React__default.createElement("img", {
|
|
1718
1706
|
src: chainLogo,
|
|
1719
|
-
alt: blockchain
|
|
1720
|
-
size: 12
|
|
1707
|
+
alt: blockchain
|
|
1721
1708
|
}))), React__default.createElement(Detail, {
|
|
1722
1709
|
pl: direction === 'horizontal'
|
|
1723
|
-
}, React__default.createElement(Typography, {
|
|
1710
|
+
}, amount && React__default.createElement(Typography, {
|
|
1724
1711
|
noWrap: true,
|
|
1725
1712
|
variant: direction === 'vertical' ? 'body2' : 'h6'
|
|
1726
|
-
}, 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, {
|
|
1727
1721
|
noWrap: true,
|
|
1728
1722
|
variant: "caption",
|
|
1729
|
-
color: "neutrals800"
|
|
1723
|
+
color: "$neutrals800"
|
|
1730
1724
|
}, "on ", blockchain)));
|
|
1731
1725
|
}
|
|
1732
1726
|
|
|
@@ -1948,6 +1942,37 @@ function Tooltip(_ref) {
|
|
|
1948
1942
|
})))));
|
|
1949
1943
|
}
|
|
1950
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
|
+
|
|
1951
1976
|
var Container = /*#__PURE__*/styled('div', {
|
|
1952
1977
|
borderRadius: '$5',
|
|
1953
1978
|
border: '1px solid $neutrals300',
|
|
@@ -3200,7 +3225,8 @@ function TokenSelector(props) {
|
|
|
3200
3225
|
}
|
|
3201
3226
|
|
|
3202
3227
|
var ListContainer$1 = /*#__PURE__*/styled('div', {
|
|
3203
|
-
overflowY: 'auto'
|
|
3228
|
+
overflowY: 'auto',
|
|
3229
|
+
padding: '0 $4'
|
|
3204
3230
|
});
|
|
3205
3231
|
var filterBlockchains = function filterBlockchains(list, searchedFor) {
|
|
3206
3232
|
return list.filter(function (blockchain) {
|
|
@@ -3543,7 +3569,8 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
3543
3569
|
variants: {
|
|
3544
3570
|
loaded: {
|
|
3545
3571
|
"true": {
|
|
3546
|
-
overflowY: 'auto'
|
|
3572
|
+
overflowY: 'auto',
|
|
3573
|
+
padding: '0 $4'
|
|
3547
3574
|
}
|
|
3548
3575
|
}
|
|
3549
3576
|
}
|
|
@@ -4626,7 +4653,22 @@ var _excluded$J = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "d
|
|
|
4626
4653
|
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4627
4654
|
display: 'flex',
|
|
4628
4655
|
alignItems: 'center',
|
|
4629
|
-
|
|
4656
|
+
paddingLeft: '$4',
|
|
4657
|
+
variants: {
|
|
4658
|
+
created: {
|
|
4659
|
+
"true": {
|
|
4660
|
+
filter: 'grayscale(100%)'
|
|
4661
|
+
}
|
|
4662
|
+
},
|
|
4663
|
+
running: {
|
|
4664
|
+
"true": {
|
|
4665
|
+
animation: pulse + " 2s ease-in-out infinite"
|
|
4666
|
+
}
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4669
|
+
});
|
|
4670
|
+
var FeeContainer = /*#__PURE__*/styled('div', {
|
|
4671
|
+
paddingLeft: '$4'
|
|
4630
4672
|
});
|
|
4631
4673
|
var Fee = /*#__PURE__*/styled('div', {
|
|
4632
4674
|
display: 'flex',
|
|
@@ -4640,7 +4682,7 @@ var Dot$1 = /*#__PURE__*/styled('div', {
|
|
|
4640
4682
|
height: '$8',
|
|
4641
4683
|
backgroundColor: '$foreground',
|
|
4642
4684
|
borderRadius: '4px',
|
|
4643
|
-
marginLeft: '
|
|
4685
|
+
marginLeft: '11px'
|
|
4644
4686
|
});
|
|
4645
4687
|
var ArrowDown = /*#__PURE__*/styled('div', {
|
|
4646
4688
|
width: '0px',
|
|
@@ -4648,7 +4690,7 @@ var ArrowDown = /*#__PURE__*/styled('div', {
|
|
|
4648
4690
|
borderLeft: '5px solid transparent',
|
|
4649
4691
|
borderRight: '5px solid transparent',
|
|
4650
4692
|
borderTop: '5px solid $foreground',
|
|
4651
|
-
marginLeft: '$
|
|
4693
|
+
marginLeft: '$10'
|
|
4652
4694
|
});
|
|
4653
4695
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4654
4696
|
color: '$primary',
|
|
@@ -4676,13 +4718,10 @@ var Description = /*#__PURE__*/styled(Typography, {
|
|
|
4676
4718
|
color: '$success',
|
|
4677
4719
|
marginLeft: '$8'
|
|
4678
4720
|
});
|
|
4679
|
-
var Error = /*#__PURE__*/styled(Description, {
|
|
4680
|
-
color: '$error'
|
|
4681
|
-
});
|
|
4682
4721
|
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4683
4722
|
width: '0',
|
|
4684
4723
|
minHeight: '$16',
|
|
4685
|
-
marginLeft: '
|
|
4724
|
+
marginLeft: '14px',
|
|
4686
4725
|
border: '1px dashed $foreground',
|
|
4687
4726
|
borderRadius: 'inherit'
|
|
4688
4727
|
});
|
|
@@ -4725,22 +4764,9 @@ var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
|
4725
4764
|
color: '$neutrals600',
|
|
4726
4765
|
fontSize: '$12'
|
|
4727
4766
|
});
|
|
4728
|
-
var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
4729
|
-
variants: {
|
|
4730
|
-
hasNotStarted: {
|
|
4731
|
-
"true": {
|
|
4732
|
-
filter: 'grayscale(100%)'
|
|
4733
|
-
}
|
|
4734
|
-
},
|
|
4735
|
-
isRunning: {
|
|
4736
|
-
"true": {
|
|
4737
|
-
animation: pulse + " 2s ease-in-out infinite"
|
|
4738
|
-
}
|
|
4739
|
-
}
|
|
4740
|
-
}
|
|
4741
|
-
});
|
|
4742
4767
|
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4743
|
-
overflowY: 'auto'
|
|
4768
|
+
overflowY: 'auto',
|
|
4769
|
+
paddingTop: '$8'
|
|
4744
4770
|
});
|
|
4745
4771
|
function SwapHistory(props) {
|
|
4746
4772
|
var pendingSwap = props.pendingSwap,
|
|
@@ -4790,39 +4816,30 @@ function SwapHistory(props) {
|
|
|
4790
4816
|
}))), React__default.createElement(ExtraDetails, null, date))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
|
|
4791
4817
|
size: 32
|
|
4792
4818
|
}), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4793
|
-
return React__default.createElement(
|
|
4794
|
-
key: index
|
|
4795
|
-
hasNotStarted: step.status === 'created',
|
|
4796
|
-
isRunning: step.status != 'failed' && step.status != 'success' && step.status != 'created'
|
|
4819
|
+
return React__default.createElement("div", {
|
|
4820
|
+
key: index
|
|
4797
4821
|
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4798
4822
|
logo: step.fromLogo,
|
|
4799
4823
|
symbol: step.fromSymbol,
|
|
4800
|
-
// @ts-ignore
|
|
4801
4824
|
chainLogo: step.fromBlockchainLogo || '',
|
|
4802
4825
|
blockchain: step.fromBlockchain,
|
|
4803
4826
|
amount: pendingSwap.inputAmount
|
|
4804
|
-
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1,
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
src: step.swapperLogo,
|
|
4827
|
+
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, {
|
|
4828
|
+
created: step.status === 'created',
|
|
4829
|
+
running: !['created', 'success', 'failed'].includes(step.status)
|
|
4830
|
+
}, React__default.createElement(Image, {
|
|
4831
|
+
src: step.swapperLogo || '',
|
|
4809
4832
|
alt: step.swapperId,
|
|
4810
|
-
size:
|
|
4811
|
-
}), React__default.createElement(
|
|
4812
|
-
ml: 4,
|
|
4833
|
+
size: 20
|
|
4834
|
+
}), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
|
|
4813
4835
|
variant: "caption"
|
|
4814
|
-
},
|
|
4815
|
-
// @ts-ignore
|
|
4816
|
-
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, {
|
|
4817
|
-
ml: 4,
|
|
4836
|
+
}, 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, {
|
|
4818
4837
|
variant: "caption"
|
|
4819
|
-
}, "$",
|
|
4820
|
-
// @ts-ignore
|
|
4821
|
-
step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
|
|
4838
|
+
}, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4822
4839
|
style: {
|
|
4823
4840
|
display: 'flex'
|
|
4824
4841
|
}
|
|
4825
|
-
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4842
|
+
}, 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) {
|
|
4826
4843
|
return React__default.createElement(InternalDetail, {
|
|
4827
4844
|
key: index
|
|
4828
4845
|
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
|
|
@@ -4835,17 +4852,19 @@ function SwapHistory(props) {
|
|
|
4835
4852
|
rel: "noreferrer",
|
|
4836
4853
|
key: index
|
|
4837
4854
|
}, "TX-Link"));
|
|
4838
|
-
}), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4855
|
+
})), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4839
4856
|
color: "error"
|
|
4840
|
-
}), React__default.createElement(
|
|
4841
|
-
variant: "body2"
|
|
4857
|
+
}), React__default.createElement(Description, {
|
|
4858
|
+
variant: "body2",
|
|
4859
|
+
color: "$error500"
|
|
4842
4860
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4843
4861
|
logo: step.toLogo,
|
|
4844
4862
|
symbol: step.toSymbol,
|
|
4845
|
-
// @ts-ignore
|
|
4846
4863
|
chainLogo: step.toBlockchainLogo || '',
|
|
4847
4864
|
blockchain: step.toBlockchain,
|
|
4848
|
-
amount: step.outputAmount || ''
|
|
4865
|
+
amount: step.outputAmount || '',
|
|
4866
|
+
estimatedAmount: step.expectedOutputAmountHumanReadable || '',
|
|
4867
|
+
success: step.status === 'success'
|
|
4849
4868
|
}));
|
|
4850
4869
|
}), React__default.createElement(Divider, {
|
|
4851
4870
|
size: 32
|