@rango-dev/ui 0.1.10-next.84 → 0.1.10-next.87
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/BestRoute/BestRoute.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +1 -0
- package/dist/components/Icon/CopyIcon.d.ts +3 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.stories.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/containers/SwapHistory/SwapHistory.d.ts +3 -0
- package/dist/ui.cjs.development.js +263 -31
- 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 +262 -32
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/components/BestRoute/BestRoute.tsx +1 -1
- package/src/components/Drawer/Drawer.tsx +11 -15
- package/src/components/Icon/CopyIcon.tsx +59 -0
- package/src/components/Icon/index.ts +1 -0
- package/src/components/Icon/types.tsx +2 -1
- package/src/components/SecondaryPage/SecondaryPage.tsx +1 -0
- package/src/components/StepDetail/StepDetail.tsx +1 -1
- package/src/components/SwapContainer/SwapContainer.tsx +2 -1
- package/src/components/SwapDetail/SwapDetail.tsx +4 -4
- package/src/components/VirtualizedList/VirtualizedList.tsx +2 -2
- package/src/components/index.ts +1 -0
- package/src/containers/History/History.tsx +2 -1
- package/src/containers/SwapHistory/SwapHistory.tsx +226 -85
package/dist/ui.esm.js
CHANGED
|
@@ -1276,7 +1276,38 @@ SignatureIcon.toString = function () {
|
|
|
1276
1276
|
return '._icon';
|
|
1277
1277
|
};
|
|
1278
1278
|
|
|
1279
|
-
var _excluded$z = ["
|
|
1279
|
+
var _excluded$z = ["size", "color"];
|
|
1280
|
+
var CopyIcon = function CopyIcon(_ref) {
|
|
1281
|
+
var _ref$size = _ref.size,
|
|
1282
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1283
|
+
color = _ref.color,
|
|
1284
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
1285
|
+
return createElement(SvgWithFillColor, Object.assign({
|
|
1286
|
+
width: size,
|
|
1287
|
+
height: size,
|
|
1288
|
+
viewBox: "0 0 64 64",
|
|
1289
|
+
color: color,
|
|
1290
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1291
|
+
className: "_icon"
|
|
1292
|
+
}, props), createElement("g", {
|
|
1293
|
+
id: "Text-files"
|
|
1294
|
+
}, createElement("path", {
|
|
1295
|
+
d: "M53.9791489,9.1429005H50.010849c-0.0826988,0-0.1562004,0.0283995-0.2331009,0.0469999V5.0228\n\t\tC49.7777481,2.253,47.4731483,0,44.6398468,0h-34.422596C7.3839517,0,5.0793519,2.253,5.0793519,5.0228v46.8432999\n\t\tc0,2.7697983,2.3045998,5.0228004,5.1378999,5.0228004h6.0367002v2.2678986C16.253952,61.8274002,18.4702511,64,21.1954517,64\n\t\th32.783699c2.7252007,0,4.9414978-2.1725998,4.9414978-4.8432007V13.9861002\n\t\tC58.9206467,11.3155003,56.7043495,9.1429005,53.9791489,9.1429005z M7.1110516,51.8661003V5.0228\n\t\tc0-1.6487999,1.3938999-2.9909999,3.1062002-2.9909999h34.422596c1.7123032,0,3.1062012,1.3422,3.1062012,2.9909999v46.8432999\n\t\tc0,1.6487999-1.393898,2.9911003-3.1062012,2.9911003h-34.422596C8.5049515,54.8572006,7.1110516,53.5149002,7.1110516,51.8661003z\n\t\t M56.8888474,59.1567993c0,1.550602-1.3055,2.8115005-2.9096985,2.8115005h-32.783699\n\t\tc-1.6042004,0-2.9097996-1.2608986-2.9097996-2.8115005v-2.2678986h26.3541946\n\t\tc2.8333015,0,5.1379013-2.2530022,5.1379013-5.0228004V11.1275997c0.0769005,0.0186005,0.1504021,0.0469999,0.2331009,0.0469999\n\t\th3.9682999c1.6041985,0,2.9096985,1.2609005,2.9096985,2.8115005V59.1567993z"
|
|
1296
|
+
}), createElement("path", {
|
|
1297
|
+
d: "M38.6031494,13.2063999H16.253952c-0.5615005,0-1.0159006,0.4542999-1.0159006,1.0158005\n\t\tc0,0.5615997,0.4544001,1.0158997,1.0159006,1.0158997h22.3491974c0.5615005,0,1.0158997-0.4542999,1.0158997-1.0158997\n\t\tC39.6190491,13.6606998,39.16465,13.2063999,38.6031494,13.2063999z"
|
|
1298
|
+
}), createElement("path", {
|
|
1299
|
+
d: "M38.6031494,21.3334007H16.253952c-0.5615005,0-1.0159006,0.4542999-1.0159006,1.0157986\n\t\tc0,0.5615005,0.4544001,1.0159016,1.0159006,1.0159016h22.3491974c0.5615005,0,1.0158997-0.454401,1.0158997-1.0159016\n\t\tC39.6190491,21.7877007,39.16465,21.3334007,38.6031494,21.3334007z"
|
|
1300
|
+
}), createElement("path", {
|
|
1301
|
+
d: "M38.6031494,29.4603004H16.253952c-0.5615005,0-1.0159006,0.4543991-1.0159006,1.0158997\n\t\ts0.4544001,1.0158997,1.0159006,1.0158997h22.3491974c0.5615005,0,1.0158997-0.4543991,1.0158997-1.0158997\n\t\tS39.16465,29.4603004,38.6031494,29.4603004z"
|
|
1302
|
+
}), createElement("path", {
|
|
1303
|
+
d: "M28.4444485,37.5872993H16.253952c-0.5615005,0-1.0159006,0.4543991-1.0159006,1.0158997\n\t\ts0.4544001,1.0158997,1.0159006,1.0158997h12.1904964c0.5615025,0,1.0158005-0.4543991,1.0158005-1.0158997\n\t\tS29.0059509,37.5872993,28.4444485,37.5872993z"
|
|
1304
|
+
})));
|
|
1305
|
+
};
|
|
1306
|
+
CopyIcon.toString = function () {
|
|
1307
|
+
return '._icon';
|
|
1308
|
+
};
|
|
1309
|
+
|
|
1310
|
+
var _excluded$A = ["children"];
|
|
1280
1311
|
var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
1281
1312
|
margin: 0,
|
|
1282
1313
|
color: '$foreground',
|
|
@@ -1444,7 +1475,7 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1444
1475
|
});
|
|
1445
1476
|
function Typography(_ref) {
|
|
1446
1477
|
var children = _ref.children,
|
|
1447
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1478
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
1448
1479
|
return React__default.createElement(TypographyContainer, Object.assign({
|
|
1449
1480
|
className: "_typography"
|
|
1450
1481
|
}, props), children);
|
|
@@ -1534,7 +1565,7 @@ function StepDetail(_ref) {
|
|
|
1534
1565
|
}, React__default.createElement(Typography, {
|
|
1535
1566
|
noWrap: true,
|
|
1536
1567
|
variant: direction === 'vertical' ? 'body2' : 'h6'
|
|
1537
|
-
}, parseFloat(amount).toFixed(2), " ", symbol), React__default.createElement(SubTitle, {
|
|
1568
|
+
}, amount ? parseFloat(amount).toFixed(2) : '?', " ", symbol), React__default.createElement(SubTitle, {
|
|
1538
1569
|
noWrap: true,
|
|
1539
1570
|
variant: "caption"
|
|
1540
1571
|
}, "on ", blockchain)));
|
|
@@ -1847,7 +1878,7 @@ function BestRoute(props) {
|
|
|
1847
1878
|
}, "No routes found")));
|
|
1848
1879
|
}
|
|
1849
1880
|
|
|
1850
|
-
var _excluded$
|
|
1881
|
+
var _excluded$B = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
|
|
1851
1882
|
var _ghost, _css, _css2, _css3, _css4;
|
|
1852
1883
|
var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
1853
1884
|
borderRadius: '$5',
|
|
@@ -2177,7 +2208,7 @@ function Button(_ref) {
|
|
|
2177
2208
|
suffix = _ref.suffix,
|
|
2178
2209
|
align = _ref.align,
|
|
2179
2210
|
flexContent = _ref.flexContent,
|
|
2180
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2211
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
2181
2212
|
var isDisabled = loading || disabled;
|
|
2182
2213
|
return React__default.createElement(ButtonContainer, Object.assign({
|
|
2183
2214
|
disabled: isDisabled
|
|
@@ -2252,7 +2283,7 @@ function BlockchainsList(props) {
|
|
|
2252
2283
|
}));
|
|
2253
2284
|
}
|
|
2254
2285
|
|
|
2255
|
-
var _excluded$
|
|
2286
|
+
var _excluded$C = ["label", "prefix", "suffix", "children", "size", "style"];
|
|
2256
2287
|
var InputContainer = /*#__PURE__*/styled('div', {
|
|
2257
2288
|
backgroundColor: '$background',
|
|
2258
2289
|
boxSizing: 'border-box',
|
|
@@ -2336,7 +2367,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2336
2367
|
suffix = props.suffix,
|
|
2337
2368
|
size = props.size,
|
|
2338
2369
|
style = props.style,
|
|
2339
|
-
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2370
|
+
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$C);
|
|
2340
2371
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({}, inputAttributes.id && {
|
|
2341
2372
|
htmlFor: inputAttributes.id
|
|
2342
2373
|
}), label), React__default.createElement(InputContainer, {
|
|
@@ -2357,6 +2388,7 @@ var Container$1 = /*#__PURE__*/styled('div', {
|
|
|
2357
2388
|
height: '100%',
|
|
2358
2389
|
width: '100%',
|
|
2359
2390
|
padding: '$12 0',
|
|
2391
|
+
position: 'relative',
|
|
2360
2392
|
'@lg': {
|
|
2361
2393
|
padding: '$16 0'
|
|
2362
2394
|
}
|
|
@@ -2524,7 +2556,7 @@ function BlockchainSelector(props) {
|
|
|
2524
2556
|
});
|
|
2525
2557
|
}
|
|
2526
2558
|
|
|
2527
|
-
var _excluded$
|
|
2559
|
+
var _excluded$D = ["label", "id"];
|
|
2528
2560
|
var CheckboxContainer = /*#__PURE__*/styled('div', {
|
|
2529
2561
|
display: 'flex',
|
|
2530
2562
|
alignItems: 'center'
|
|
@@ -2549,7 +2581,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
|
|
|
2549
2581
|
function Checkbox(_ref) {
|
|
2550
2582
|
var label = _ref.label,
|
|
2551
2583
|
id = _ref.id,
|
|
2552
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2584
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
2553
2585
|
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
2554
2586
|
id: id
|
|
2555
2587
|
}, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
|
|
@@ -3349,7 +3381,8 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
3349
3381
|
flexDirection: 'column',
|
|
3350
3382
|
alignItems: 'end',
|
|
3351
3383
|
padding: '$16 $24',
|
|
3352
|
-
boxSizing: 'border-box'
|
|
3384
|
+
boxSizing: 'border-box',
|
|
3385
|
+
position: 'relative'
|
|
3353
3386
|
});
|
|
3354
3387
|
var ContentContainer$3 = /*#__PURE__*/styled('div', {
|
|
3355
3388
|
width: '100%'
|
|
@@ -3358,7 +3391,8 @@ function SwapContainer(props) {
|
|
|
3358
3391
|
var children = props.children,
|
|
3359
3392
|
style = props.style;
|
|
3360
3393
|
return React__default.createElement(MainContainer$1, {
|
|
3361
|
-
style: style
|
|
3394
|
+
style: style,
|
|
3395
|
+
id: "swap-box"
|
|
3362
3396
|
}, React__default.createElement(ContentContainer$3, null, children));
|
|
3363
3397
|
}
|
|
3364
3398
|
|
|
@@ -3458,10 +3492,10 @@ function SwapDetail(_ref) {
|
|
|
3458
3492
|
blockchain: firstStep.fromBlockchain,
|
|
3459
3493
|
amount: swap.inputAmount
|
|
3460
3494
|
}), React__default.createElement(Arrow, null, React__default.createElement(Dot$1, null), React__default.createElement(Line$1, null), React__default.createElement(ArrowRight$1, null)), React__default.createElement(StepDetail, {
|
|
3461
|
-
logo: lastStep.
|
|
3462
|
-
symbol: lastStep.
|
|
3463
|
-
chainLogo: lastStep.
|
|
3464
|
-
blockchain: lastStep.
|
|
3495
|
+
logo: lastStep.toLogo,
|
|
3496
|
+
symbol: lastStep.toSymbol,
|
|
3497
|
+
chainLogo: lastStep.toBlockchainLogo,
|
|
3498
|
+
blockchain: lastStep.toBlockchain,
|
|
3465
3499
|
amount: lastStep.outputAmount
|
|
3466
3500
|
})))), React__default.createElement(StatusContainer, null, status === 'running' ? React__default.createElement(TryAgainIcon, {
|
|
3467
3501
|
size: 16
|
|
@@ -3502,8 +3536,8 @@ function VirtualizedList(props) {
|
|
|
3502
3536
|
return size;
|
|
3503
3537
|
},
|
|
3504
3538
|
itemCount: itemCount,
|
|
3505
|
-
height: height,
|
|
3506
|
-
width: width,
|
|
3539
|
+
height: height || 0,
|
|
3540
|
+
width: width || 0,
|
|
3507
3541
|
onItemsRendered: onItemsRendered
|
|
3508
3542
|
}, function (_ref3) {
|
|
3509
3543
|
var index = _ref3.index,
|
|
@@ -3567,7 +3601,7 @@ function TokenItem(props) {
|
|
|
3567
3601
|
}, token.name))));
|
|
3568
3602
|
}
|
|
3569
3603
|
|
|
3570
|
-
var _excluded$
|
|
3604
|
+
var _excluded$E = ["style"];
|
|
3571
3605
|
var PAGE_SIZE = 20;
|
|
3572
3606
|
function TokenList(props) {
|
|
3573
3607
|
var list = props.list,
|
|
@@ -3607,7 +3641,7 @@ function TokenList(props) {
|
|
|
3607
3641
|
}, [tokens.length]);
|
|
3608
3642
|
var innerElementType = forwardRef(function (_ref, ref) {
|
|
3609
3643
|
var style = _ref.style,
|
|
3610
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3644
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
3611
3645
|
return React__default.createElement("div", Object.assign({
|
|
3612
3646
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3613
3647
|
ref: ref,
|
|
@@ -3838,6 +3872,98 @@ function ColorPicker(_ref) {
|
|
|
3838
3872
|
})));
|
|
3839
3873
|
}
|
|
3840
3874
|
|
|
3875
|
+
var BackDrop$1 = /*#__PURE__*/styled('div', {
|
|
3876
|
+
position: 'absolute',
|
|
3877
|
+
top: '0',
|
|
3878
|
+
left: '0',
|
|
3879
|
+
width: '100%',
|
|
3880
|
+
height: '100%',
|
|
3881
|
+
zIndex: 9999999,
|
|
3882
|
+
backgroundColor: 'rgba(0,0,0,.1)',
|
|
3883
|
+
borderRadius: '$10'
|
|
3884
|
+
});
|
|
3885
|
+
var DrawerContainer = /*#__PURE__*/styled('div', {
|
|
3886
|
+
position: 'absolute',
|
|
3887
|
+
boxShadow: '$s',
|
|
3888
|
+
background: '$background',
|
|
3889
|
+
padding: '$20',
|
|
3890
|
+
display: 'flex',
|
|
3891
|
+
flexDirection: 'column',
|
|
3892
|
+
justifyContent: 'space-between',
|
|
3893
|
+
zIndex: 9999999,
|
|
3894
|
+
borderRadius: '$10',
|
|
3895
|
+
variants: {
|
|
3896
|
+
anchor: {
|
|
3897
|
+
left: {
|
|
3898
|
+
top: 0,
|
|
3899
|
+
left: 0,
|
|
3900
|
+
height: '100%',
|
|
3901
|
+
minWidth: '300px',
|
|
3902
|
+
maxWidth: '90%'
|
|
3903
|
+
},
|
|
3904
|
+
right: {
|
|
3905
|
+
top: 0,
|
|
3906
|
+
right: 0,
|
|
3907
|
+
height: '100%',
|
|
3908
|
+
minWidth: '300px',
|
|
3909
|
+
maxWidth: '90%'
|
|
3910
|
+
},
|
|
3911
|
+
bottom: {
|
|
3912
|
+
bottom: 0,
|
|
3913
|
+
width: '100%',
|
|
3914
|
+
maxHeight: '90%'
|
|
3915
|
+
},
|
|
3916
|
+
top: {
|
|
3917
|
+
top: 0,
|
|
3918
|
+
width: '100%',
|
|
3919
|
+
maxHeight: '90%'
|
|
3920
|
+
}
|
|
3921
|
+
}
|
|
3922
|
+
}
|
|
3923
|
+
});
|
|
3924
|
+
var DrawerHeader = /*#__PURE__*/styled('div', {
|
|
3925
|
+
display: 'flex',
|
|
3926
|
+
justifyContent: 'space-between',
|
|
3927
|
+
alignItems: 'center',
|
|
3928
|
+
position: 'relative',
|
|
3929
|
+
marginBottom: '$16'
|
|
3930
|
+
});
|
|
3931
|
+
var Body = /*#__PURE__*/styled('div', {
|
|
3932
|
+
overflowY: 'auto',
|
|
3933
|
+
height: '100%'
|
|
3934
|
+
});
|
|
3935
|
+
var Footer = /*#__PURE__*/styled('footer', {
|
|
3936
|
+
width: '100%',
|
|
3937
|
+
marginTop: '$28'
|
|
3938
|
+
});
|
|
3939
|
+
function Drawer(props) {
|
|
3940
|
+
var title = props.title,
|
|
3941
|
+
content = props.content,
|
|
3942
|
+
open = props.open,
|
|
3943
|
+
onClose = props.onClose,
|
|
3944
|
+
containerStyle = props.containerStyle,
|
|
3945
|
+
_props$anchor = props.anchor,
|
|
3946
|
+
anchor = _props$anchor === void 0 ? 'bottom' : _props$anchor,
|
|
3947
|
+
_props$showClose = props.showClose,
|
|
3948
|
+
showClose = _props$showClose === void 0 ? false : _props$showClose,
|
|
3949
|
+
footer = props.footer,
|
|
3950
|
+
container = props.container;
|
|
3951
|
+
var handleBackDropClick = function handleBackDropClick(event) {
|
|
3952
|
+
if (event.target === event.currentTarget) onClose();
|
|
3953
|
+
};
|
|
3954
|
+
return React__default.createElement(React__default.Fragment, null, open && container && createPortal(React__default.createElement(BackDrop$1, {
|
|
3955
|
+
onClick: handleBackDropClick
|
|
3956
|
+
}, React__default.createElement(DrawerContainer, {
|
|
3957
|
+
anchor: anchor,
|
|
3958
|
+
style: containerStyle
|
|
3959
|
+
}, React__default.createElement(DrawerHeader, null, React__default.createElement(Typography, {
|
|
3960
|
+
variant: "h4"
|
|
3961
|
+
}, title), showClose && React__default.createElement(CloseIcon, {
|
|
3962
|
+
size: 24,
|
|
3963
|
+
onClick: onClose
|
|
3964
|
+
})), React__default.createElement(Body, null, content), React__default.createElement(Footer, null, footer))), container));
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3841
3967
|
var MainContainer$2 = /*#__PURE__*/styled('div', {
|
|
3842
3968
|
overflow: 'hidden'
|
|
3843
3969
|
});
|
|
@@ -3864,7 +3990,7 @@ var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
|
3864
3990
|
var RelativeContainer$1 = /*#__PURE__*/styled('div', {
|
|
3865
3991
|
position: 'relative'
|
|
3866
3992
|
});
|
|
3867
|
-
var Footer = /*#__PURE__*/styled('div', {
|
|
3993
|
+
var Footer$1 = /*#__PURE__*/styled('div', {
|
|
3868
3994
|
display: 'flex',
|
|
3869
3995
|
alignItems: 'center'
|
|
3870
3996
|
});
|
|
@@ -3912,7 +4038,7 @@ function ConfirmSwap(props) {
|
|
|
3912
4038
|
textField: false,
|
|
3913
4039
|
title: "Swap",
|
|
3914
4040
|
onBack: onBack,
|
|
3915
|
-
Footer: React__default.createElement(Footer, null, React__default.createElement(Button, {
|
|
4041
|
+
Footer: React__default.createElement(Footer$1, null, React__default.createElement(Button, {
|
|
3916
4042
|
type: "primary",
|
|
3917
4043
|
fullWidth: true,
|
|
3918
4044
|
loading: loading,
|
|
@@ -3963,7 +4089,7 @@ function ConfirmSwap(props) {
|
|
|
3963
4089
|
}))));
|
|
3964
4090
|
}
|
|
3965
4091
|
|
|
3966
|
-
var Footer$
|
|
4092
|
+
var Footer$2 = /*#__PURE__*/styled('div', {
|
|
3967
4093
|
display: 'flex',
|
|
3968
4094
|
alignItems: 'center'
|
|
3969
4095
|
});
|
|
@@ -3993,7 +4119,7 @@ function ConfirmWallets(props) {
|
|
|
3993
4119
|
textField: false,
|
|
3994
4120
|
title: "Confirm Swap",
|
|
3995
4121
|
onBack: onBack,
|
|
3996
|
-
Footer: React__default.createElement(Footer$
|
|
4122
|
+
Footer: React__default.createElement(Footer$2, null, React__default.createElement(ConfirmButton, {
|
|
3997
4123
|
fullWidth: true,
|
|
3998
4124
|
loading: loading,
|
|
3999
4125
|
type: "primary",
|
|
@@ -4067,7 +4193,8 @@ var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
|
4067
4193
|
};
|
|
4068
4194
|
var Group = /*#__PURE__*/styled('div', {
|
|
4069
4195
|
marginBottom: '$24',
|
|
4070
|
-
paddingRight: '$8'
|
|
4196
|
+
paddingRight: '$8',
|
|
4197
|
+
maxHeight: '600px'
|
|
4071
4198
|
});
|
|
4072
4199
|
var GroupTitle = /*#__PURE__*/styled(Typography, {
|
|
4073
4200
|
color: '$neutrals500'
|
|
@@ -4100,7 +4227,7 @@ function History(_ref) {
|
|
|
4100
4227
|
onBack: onBack,
|
|
4101
4228
|
textField: true,
|
|
4102
4229
|
textFieldPlaceholder: "Search By Blockchain Or Token",
|
|
4103
|
-
title: "
|
|
4230
|
+
title: "Swaps"
|
|
4104
4231
|
}, function (searchedFor) {
|
|
4105
4232
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
4106
4233
|
return filterSwaps.length ? React__default.createElement(SwapsGroup, {
|
|
@@ -4137,20 +4264,84 @@ var Error = /*#__PURE__*/styled(Description, {
|
|
|
4137
4264
|
});
|
|
4138
4265
|
var Line$3 = /*#__PURE__*/styled('div', {
|
|
4139
4266
|
width: '0',
|
|
4267
|
+
minHeight: '$16',
|
|
4140
4268
|
marginLeft: '$12',
|
|
4141
4269
|
border: '1px dashed $foreground',
|
|
4142
4270
|
borderRadius: 'inherit'
|
|
4143
4271
|
});
|
|
4272
|
+
var RequestIdContainer = /*#__PURE__*/styled('div', {
|
|
4273
|
+
cursor: 'pointer',
|
|
4274
|
+
backgroundColor: '$neutrals200',
|
|
4275
|
+
padding: '$4',
|
|
4276
|
+
display: 'flex',
|
|
4277
|
+
justifyContent: 'center',
|
|
4278
|
+
alignItems: 'center',
|
|
4279
|
+
borderRadius: '$5',
|
|
4280
|
+
marginBottom: '$16'
|
|
4281
|
+
});
|
|
4282
|
+
var RequestId = /*#__PURE__*/styled(Typography, {
|
|
4283
|
+
color: '$warning500'
|
|
4284
|
+
});
|
|
4285
|
+
var CancelButtonContainer = /*#__PURE__*/styled('div', {
|
|
4286
|
+
display: 'flex',
|
|
4287
|
+
justifyContent: 'center',
|
|
4288
|
+
alignItems: 'center'
|
|
4289
|
+
});
|
|
4290
|
+
var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
4291
|
+
variants: {
|
|
4292
|
+
hasNotStarted: {
|
|
4293
|
+
"true": {
|
|
4294
|
+
filter: 'grayscale(100%)'
|
|
4295
|
+
}
|
|
4296
|
+
},
|
|
4297
|
+
isRunning: {
|
|
4298
|
+
"true": {
|
|
4299
|
+
animation: pulse + " 2s ease-in-out infinite"
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
});
|
|
4144
4304
|
function SwapHistory(props) {
|
|
4145
4305
|
var pendingSwap = props.pendingSwap,
|
|
4146
|
-
onBack = props.onBack
|
|
4306
|
+
onBack = props.onBack,
|
|
4307
|
+
onCopy = props.onCopy,
|
|
4308
|
+
isCopied = props.isCopied,
|
|
4309
|
+
onCancel = props.onCancel;
|
|
4310
|
+
var _useState = useState(false),
|
|
4311
|
+
showDrawer = _useState[0],
|
|
4312
|
+
setShowDrawer = _useState[1];
|
|
4147
4313
|
return React__default.createElement(SecondaryPage, {
|
|
4148
|
-
title: "
|
|
4314
|
+
title: "Swap Details",
|
|
4149
4315
|
textField: false,
|
|
4150
4316
|
onBack: onBack
|
|
4151
|
-
}, React__default.createElement(
|
|
4152
|
-
|
|
4153
|
-
|
|
4317
|
+
}, React__default.createElement("div", {
|
|
4318
|
+
style: {
|
|
4319
|
+
overflow: 'hidden'
|
|
4320
|
+
}
|
|
4321
|
+
}, React__default.createElement("div", null, React__default.createElement(Typography, {
|
|
4322
|
+
variant: "body1"
|
|
4323
|
+
}, " request ID :"), React__default.createElement(RequestIdContainer, {
|
|
4324
|
+
onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
|
|
4325
|
+
}, React__default.createElement(RequestId, {
|
|
4326
|
+
variant: "body1"
|
|
4327
|
+
}, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
|
|
4328
|
+
size: 12
|
|
4329
|
+
}), isCopied ? React__default.createElement(CheckSquareIcon, {
|
|
4330
|
+
color: "success",
|
|
4331
|
+
size: 18
|
|
4332
|
+
}) : React__default.createElement(CopyIcon, {
|
|
4333
|
+
color: "warning",
|
|
4334
|
+
size: 18
|
|
4335
|
+
}))), React__default.createElement("div", {
|
|
4336
|
+
style: {
|
|
4337
|
+
overflow: 'auto',
|
|
4338
|
+
position: 'relative'
|
|
4339
|
+
}
|
|
4340
|
+
}, pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4341
|
+
return React__default.createElement(StepContainer$1, {
|
|
4342
|
+
key: index,
|
|
4343
|
+
hasNotStarted: step.status === 'created',
|
|
4344
|
+
isRunning: step.status != 'failed' && step.status != 'success' && step.status != 'created'
|
|
4154
4345
|
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4155
4346
|
logo: step.fromLogo,
|
|
4156
4347
|
symbol: step.fromSymbol,
|
|
@@ -4194,8 +4385,47 @@ function SwapHistory(props) {
|
|
|
4194
4385
|
blockchain: step.toBlockchain,
|
|
4195
4386
|
amount: step.outputAmount
|
|
4196
4387
|
}));
|
|
4197
|
-
}))
|
|
4388
|
+
}), (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(CancelButtonContainer, null, React__default.createElement(Button, {
|
|
4389
|
+
variant: "contained",
|
|
4390
|
+
type: "error",
|
|
4391
|
+
onClick: setShowDrawer.bind(null, true)
|
|
4392
|
+
}, "Cancel")))), React__default.createElement(Drawer, {
|
|
4393
|
+
onClose: setShowDrawer.bind(null, false),
|
|
4394
|
+
open: showDrawer,
|
|
4395
|
+
showClose: true,
|
|
4396
|
+
anchor: "bottom",
|
|
4397
|
+
title: "Cancel Progress",
|
|
4398
|
+
content: React__default.createElement(React__default.Fragment, null, React__default.createElement(Alert, {
|
|
4399
|
+
type: "warning"
|
|
4400
|
+
}, React__default.createElement(Typography, {
|
|
4401
|
+
variant: "body2"
|
|
4402
|
+
}, React__default.createElement("p", null, "Warning: Rango ", React__default.createElement("u", null, "neither reverts"), " your transaction", React__default.createElement("u", null, "nor refunds"), " you if you've already signed and sent a transaction to the blockchain since it's out of Rango's control. Beware that \"Cancel\" only stops next steps from being executed."), React__default.createElement(Spacer, {
|
|
4403
|
+
size: 12,
|
|
4404
|
+
direction: "vertical"
|
|
4405
|
+
}), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")))),
|
|
4406
|
+
footer: React__default.createElement("div", {
|
|
4407
|
+
style: {
|
|
4408
|
+
display: 'flex',
|
|
4409
|
+
justifyContent: 'center',
|
|
4410
|
+
alignItems: 'center'
|
|
4411
|
+
}
|
|
4412
|
+
}, React__default.createElement(Button, {
|
|
4413
|
+
variant: "contained",
|
|
4414
|
+
type: "success",
|
|
4415
|
+
onClick: setShowDrawer.bind(null, false)
|
|
4416
|
+
}, "Skip"), React__default.createElement(Spacer, {
|
|
4417
|
+
size: 16
|
|
4418
|
+
}), React__default.createElement(Button, {
|
|
4419
|
+
variant: "contained",
|
|
4420
|
+
type: "error",
|
|
4421
|
+
onClick: function onClick() {
|
|
4422
|
+
onCancel(pendingSwap.requestId);
|
|
4423
|
+
setShowDrawer(false);
|
|
4424
|
+
}
|
|
4425
|
+
}, "Cancel progress")),
|
|
4426
|
+
container: document.getElementById('swap-box')
|
|
4427
|
+
}));
|
|
4198
4428
|
}
|
|
4199
4429
|
|
|
4200
|
-
export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConfirmWallets, ConnectWalletsModal, DeleteCircleIcon, DeleteWalletIcon, DownloadIcon, FilledCircle, GasIcon, History, HistoryIcon, HorizontalSwapIcon, InfoCircleIcon, LiquiditySourcesSelector, 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 };
|
|
4430
|
+
export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConfirmWallets, ConnectWalletsModal, CopyIcon, DeleteCircleIcon, DeleteWalletIcon, DownloadIcon, Drawer, FilledCircle, GasIcon, History, HistoryIcon, HorizontalSwapIcon, InfoCircleIcon, LiquiditySourcesSelector, 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 };
|
|
4201
4431
|
//# sourceMappingURL=ui.esm.js.map
|