@rango-dev/ui 0.1.10-next.87 → 0.1.10-next.90
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/Radio/Radio.d.ts +1 -1
- package/dist/components/TextField/TextField.stories.d.ts +1 -1
- package/dist/components/TokenSelector/TokenSelector.d.ts +1 -1
- package/dist/components/Typography/Typography.d.ts +4 -1
- package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +2 -2
- package/dist/containers/ConfirmWallets/ConfirmWallets.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/swaps.d.ts +8 -1
- package/dist/types/wallet.d.ts +1 -0
- package/dist/ui.cjs.development.js +51 -29
- 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 +51 -29
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +1 -0
- package/src/components/Checkbox/Checkbox.tsx +5 -3
- package/src/components/ColorPicker/ColorPicker.tsx +8 -4
- package/src/components/Modal/Modal.tsx +5 -1
- package/src/components/Radio/Radio.tsx +5 -4
- package/src/components/Settings/Settings.tsx +1 -1
- package/src/components/Switch/Switch.tsx +1 -1
- package/src/components/TextField/TextField.tsx +14 -4
- package/src/components/TokenList/TokenList.tsx +0 -1
- package/src/components/TokenSelector/TokenSelector.tsx +1 -1
- package/src/components/Typography/Typography.tsx +6 -1
- package/src/components/Wallet/State.tsx +0 -1
- package/src/components/common/FilledCircle.tsx +1 -1
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +16 -12
- package/src/containers/ConfirmWallets/ConfirmWallets.tsx +3 -3
- package/src/containers/SwapHistory/SwapHistory.tsx +1 -1
- package/src/types/index.ts +2 -0
- package/src/types/{swaps.tsx → swaps.ts} +8 -0
- package/src/types/wallet.ts +1 -0
package/dist/ui.esm.js
CHANGED
|
@@ -1307,7 +1307,7 @@ CopyIcon.toString = function () {
|
|
|
1307
1307
|
return '._icon';
|
|
1308
1308
|
};
|
|
1309
1309
|
|
|
1310
|
-
var _excluded$A = ["children"];
|
|
1310
|
+
var _excluded$A = ["children", "className"];
|
|
1311
1311
|
var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
1312
1312
|
margin: 0,
|
|
1313
1313
|
color: '$foreground',
|
|
@@ -1475,9 +1475,10 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1475
1475
|
});
|
|
1476
1476
|
function Typography(_ref) {
|
|
1477
1477
|
var children = _ref.children,
|
|
1478
|
+
className = _ref.className,
|
|
1478
1479
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
1479
1480
|
return React__default.createElement(TypographyContainer, Object.assign({
|
|
1480
|
-
className: "_typography"
|
|
1481
|
+
className: "_typography _text " + className
|
|
1481
1482
|
}, props), children);
|
|
1482
1483
|
}
|
|
1483
1484
|
Typography.toString = function () {
|
|
@@ -2218,7 +2219,8 @@ function Button(_ref) {
|
|
|
2218
2219
|
align: align,
|
|
2219
2220
|
ml: !!prefix,
|
|
2220
2221
|
mr: !!suffix && !loading,
|
|
2221
|
-
flexContent: flexContent
|
|
2222
|
+
flexContent: flexContent,
|
|
2223
|
+
className: "_text"
|
|
2222
2224
|
}, children), loading && React__default.createElement(Spinner, {
|
|
2223
2225
|
size: 16,
|
|
2224
2226
|
color: props.type
|
|
@@ -2228,7 +2230,7 @@ function Button(_ref) {
|
|
|
2228
2230
|
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
2229
2231
|
width: '10px',
|
|
2230
2232
|
height: '10px',
|
|
2231
|
-
backgroundColor: '$
|
|
2233
|
+
backgroundColor: '$primary',
|
|
2232
2234
|
borderRadius: '99999px'
|
|
2233
2235
|
});
|
|
2234
2236
|
|
|
@@ -2297,7 +2299,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
|
|
|
2297
2299
|
color: '$foreground',
|
|
2298
2300
|
transition: 'border-color ease .3s',
|
|
2299
2301
|
'&:focus-within': {
|
|
2300
|
-
borderColor: '$
|
|
2302
|
+
borderColor: '$primary'
|
|
2301
2303
|
},
|
|
2302
2304
|
variants: {
|
|
2303
2305
|
size: {
|
|
@@ -2340,7 +2342,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
|
|
|
2340
2342
|
}
|
|
2341
2343
|
});
|
|
2342
2344
|
var Input = /*#__PURE__*/styled('input', {
|
|
2343
|
-
color: '$
|
|
2345
|
+
color: '$foreground',
|
|
2344
2346
|
paddingLeft: '$16',
|
|
2345
2347
|
paddingRight: '$16',
|
|
2346
2348
|
flexGrow: 1,
|
|
@@ -2359,6 +2361,7 @@ var Input = /*#__PURE__*/styled('input', {
|
|
|
2359
2361
|
var Label = /*#__PURE__*/styled('label', {
|
|
2360
2362
|
display: 'inline-block',
|
|
2361
2363
|
fontSize: '$14',
|
|
2364
|
+
color: '$foreground',
|
|
2362
2365
|
marginBottom: '$4'
|
|
2363
2366
|
});
|
|
2364
2367
|
var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
@@ -2368,15 +2371,20 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2368
2371
|
size = props.size,
|
|
2369
2372
|
style = props.style,
|
|
2370
2373
|
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$C);
|
|
2371
|
-
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2374
|
+
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2375
|
+
className: "_text"
|
|
2376
|
+
}, inputAttributes.id && {
|
|
2372
2377
|
htmlFor: inputAttributes.id
|
|
2373
2378
|
}), label), React__default.createElement(InputContainer, {
|
|
2374
2379
|
disabled: inputAttributes.disabled,
|
|
2375
2380
|
prefix: !!prefix,
|
|
2376
2381
|
suffix: !!suffix,
|
|
2377
2382
|
size: size,
|
|
2378
|
-
style: style
|
|
2379
|
-
|
|
2383
|
+
style: style,
|
|
2384
|
+
className: "_text"
|
|
2385
|
+
}, prefix || null, React__default.createElement(Input, Object.assign({
|
|
2386
|
+
className: "_text"
|
|
2387
|
+
}, inputAttributes, {
|
|
2380
2388
|
spellCheck: false,
|
|
2381
2389
|
ref: ref
|
|
2382
2390
|
})), suffix || null));
|
|
@@ -2566,7 +2574,7 @@ var CheckboxRoot = /*#__PURE__*/styled(Root, {
|
|
|
2566
2574
|
width: 20,
|
|
2567
2575
|
padding: 0,
|
|
2568
2576
|
height: 20,
|
|
2569
|
-
border: '1px solid',
|
|
2577
|
+
border: '1px solid $foreground',
|
|
2570
2578
|
display: 'flex',
|
|
2571
2579
|
alignItems: 'center',
|
|
2572
2580
|
justifyContent: 'center',
|
|
@@ -2574,7 +2582,7 @@ var CheckboxRoot = /*#__PURE__*/styled(Root, {
|
|
|
2574
2582
|
backgroundColor: '$neutral-100'
|
|
2575
2583
|
});
|
|
2576
2584
|
var Label$1 = /*#__PURE__*/styled('label', {
|
|
2577
|
-
color: '$
|
|
2585
|
+
color: '$foreground',
|
|
2578
2586
|
fontSize: '$m',
|
|
2579
2587
|
marginLeft: '$8'
|
|
2580
2588
|
});
|
|
@@ -2587,8 +2595,9 @@ function Checkbox(_ref) {
|
|
|
2587
2595
|
}, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
|
|
2588
2596
|
size: 20
|
|
2589
2597
|
}))), React__default.createElement(Label$1, {
|
|
2598
|
+
className: "_text",
|
|
2590
2599
|
htmlFor: id
|
|
2591
|
-
}, label
|
|
2600
|
+
}, label));
|
|
2592
2601
|
}
|
|
2593
2602
|
|
|
2594
2603
|
var ChipCointainer = /*#__PURE__*/styled('div', {
|
|
@@ -2673,6 +2682,9 @@ function Modal(props) {
|
|
|
2673
2682
|
var handleBackDropClick = function handleBackDropClick(event) {
|
|
2674
2683
|
if (event.target === event.currentTarget) onClose();
|
|
2675
2684
|
};
|
|
2685
|
+
useEffect(function () {
|
|
2686
|
+
if (open) document.body.style.overflow = 'hidden';else document.body.style.overflow = 'unset';
|
|
2687
|
+
}, [open]);
|
|
2676
2688
|
return React__default.createElement(React__default.Fragment, null, open && createPortal(React__default.createElement(BackDrop, {
|
|
2677
2689
|
onClick: handleBackDropClick
|
|
2678
2690
|
}, React__default.createElement(ModalContainer, {
|
|
@@ -2696,7 +2708,6 @@ var WalletState;
|
|
|
2696
2708
|
})(WalletState || (WalletState = {}));
|
|
2697
2709
|
|
|
2698
2710
|
var StateIconContainer = /*#__PURE__*/styled('span', {
|
|
2699
|
-
width: '$28',
|
|
2700
2711
|
display: 'flex',
|
|
2701
2712
|
justifyContent: 'center',
|
|
2702
2713
|
alignItems: 'center'
|
|
@@ -2895,7 +2906,7 @@ var StyledSwitchThumb = /*#__PURE__*/styled(Thumb, {
|
|
|
2895
2906
|
willChange: 'transform',
|
|
2896
2907
|
'&[data-state="checked"]': {
|
|
2897
2908
|
transform: 'translateX(20px)',
|
|
2898
|
-
backgroundColor: '$
|
|
2909
|
+
backgroundColor: '$primary'
|
|
2899
2910
|
}
|
|
2900
2911
|
});
|
|
2901
2912
|
function Switch(props) {
|
|
@@ -3213,17 +3224,18 @@ var StyledIndicator = /*#__PURE__*/styled(Indicator$1, {
|
|
|
3213
3224
|
});
|
|
3214
3225
|
var Label$2 = /*#__PURE__*/styled('label', {
|
|
3215
3226
|
paddingLeft: '$8',
|
|
3216
|
-
cursor: 'pointer'
|
|
3227
|
+
cursor: 'pointer',
|
|
3228
|
+
color: '$foreground'
|
|
3217
3229
|
});
|
|
3218
3230
|
function Radio(props) {
|
|
3219
|
-
var
|
|
3231
|
+
var value = props.value,
|
|
3220
3232
|
onChange = props.onChange,
|
|
3221
3233
|
_props$direction = props.direction,
|
|
3222
3234
|
direction = _props$direction === void 0 ? 'vertical' : _props$direction,
|
|
3223
3235
|
style = props.style;
|
|
3224
3236
|
return React__default.createElement(Container$3, null, React__default.createElement(StyledRoot, {
|
|
3225
3237
|
onValueChange: onChange,
|
|
3226
|
-
|
|
3238
|
+
value: value,
|
|
3227
3239
|
direction: direction,
|
|
3228
3240
|
style: style
|
|
3229
3241
|
}, props.options.map(function (option, index) {
|
|
@@ -3233,6 +3245,7 @@ function Radio(props) {
|
|
|
3233
3245
|
value: option.value,
|
|
3234
3246
|
id: option.value
|
|
3235
3247
|
}, React__default.createElement(StyledIndicator, null)), React__default.createElement(Label$2, {
|
|
3248
|
+
className: "_text",
|
|
3236
3249
|
htmlFor: option.value
|
|
3237
3250
|
}, React__default.createElement(Typography, {
|
|
3238
3251
|
variant: "body2"
|
|
@@ -3332,7 +3345,7 @@ function Settings(props) {
|
|
|
3332
3345
|
}))), React__default.createElement(ThemesContainer, null, React__default.createElement(Title, {
|
|
3333
3346
|
variant: "body2"
|
|
3334
3347
|
}, "Theme"), React__default.createElement(Radio, {
|
|
3335
|
-
|
|
3348
|
+
value: selectedTheme,
|
|
3336
3349
|
options: [{
|
|
3337
3350
|
value: 'dark',
|
|
3338
3351
|
label: 'Dark'
|
|
@@ -3834,6 +3847,12 @@ var Popover = /*#__PURE__*/styled('div', {
|
|
|
3834
3847
|
}
|
|
3835
3848
|
}
|
|
3836
3849
|
});
|
|
3850
|
+
var Label$3 = /*#__PURE__*/styled('label', {
|
|
3851
|
+
display: 'inline-block',
|
|
3852
|
+
fontSize: '$14',
|
|
3853
|
+
marginBottom: '$4',
|
|
3854
|
+
color: '$foreground'
|
|
3855
|
+
});
|
|
3837
3856
|
function ColorPicker(_ref) {
|
|
3838
3857
|
var color = _ref.color,
|
|
3839
3858
|
onChangeColor = _ref.onChangeColor,
|
|
@@ -3842,9 +3861,8 @@ function ColorPicker(_ref) {
|
|
|
3842
3861
|
var _useState = useState(false),
|
|
3843
3862
|
displayColorPicker = _useState[0],
|
|
3844
3863
|
setDisplayColorPicker = _useState[1];
|
|
3845
|
-
return React__default.createElement(Container$5, null, React__default.createElement(
|
|
3846
|
-
|
|
3847
|
-
variant: "body2"
|
|
3864
|
+
return React__default.createElement(Container$5, null, React__default.createElement(Label$3, {
|
|
3865
|
+
className: "_text"
|
|
3848
3866
|
}, label), React__default.createElement(Button, {
|
|
3849
3867
|
variant: "outlined",
|
|
3850
3868
|
prefix: React__default.createElement(Color, {
|
|
@@ -4051,15 +4069,19 @@ function ConfirmSwap(props) {
|
|
|
4051
4069
|
onClick: onRefresh
|
|
4052
4070
|
})
|
|
4053
4071
|
}, React__default.createElement(MainContainer$2, null, React__default.createElement("div", null, extraMessages || null, React__default.createElement(Alerts, null, errors == null ? void 0 : errors.map(function (error, index) {
|
|
4054
|
-
return React__default.createElement(
|
|
4072
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4073
|
+
direction: "vertical"
|
|
4074
|
+
}), React__default.createElement(Alert, {
|
|
4055
4075
|
type: "error",
|
|
4056
4076
|
key: index
|
|
4057
|
-
}, error);
|
|
4077
|
+
}, error));
|
|
4058
4078
|
}), warnings == null ? void 0 : warnings.map(function (warning, index) {
|
|
4059
|
-
return React__default.createElement(
|
|
4079
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4080
|
+
direction: "vertical"
|
|
4081
|
+
}), React__default.createElement(Alert, {
|
|
4060
4082
|
type: "warning",
|
|
4061
4083
|
key: index
|
|
4062
|
-
}, warning);
|
|
4084
|
+
}, warning));
|
|
4063
4085
|
}))), React__default.createElement(BestRouteContainer$1, null, bestRoute == null ? void 0 : (_bestRoute$result = bestRoute.result) == null ? void 0 : _bestRoute$result.swaps.map(function (swap, index) {
|
|
4064
4086
|
var _bestRoute$result2;
|
|
4065
4087
|
return React__default.createElement(Fragment, {
|
|
@@ -4079,7 +4101,7 @@ function ConfirmSwap(props) {
|
|
|
4079
4101
|
}, swap.swapperType, " from ", swap.from.symbol, " to", ' ', swap.to.symbol, " via ", swap.swapperId, ' '), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4080
4102
|
ml: 4,
|
|
4081
4103
|
variant: "caption"
|
|
4082
|
-
},
|
|
4104
|
+
}, "$", swap.feeInUsd, " estimated gas fee")))), React__default.createElement(Line$2, null), index + 1 === ((_bestRoute$result2 = bestRoute.result) == null ? void 0 : _bestRoute$result2.swaps.length) && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4083
4105
|
logo: swap.to.logo,
|
|
4084
4106
|
symbol: swap.to.symbol,
|
|
4085
4107
|
chainLogo: swap.to.blockchainLogo,
|
|
@@ -4113,8 +4135,8 @@ function ConfirmWallets(props) {
|
|
|
4113
4135
|
handleConnectChain = props.handleConnectChain,
|
|
4114
4136
|
fromAmount = props.fromAmount,
|
|
4115
4137
|
toAmount = props.toAmount;
|
|
4116
|
-
var firstStep = (_swap$result = swap.result) == null ? void 0 : _swap$result.swaps[0];
|
|
4117
|
-
var lastStep = (_swap$result2 = swap.result) == null ? void 0 : _swap$result2.swaps[((_swap$result3 = swap.result) == null ? void 0 : _swap$result3.swaps.length) - 1];
|
|
4138
|
+
var firstStep = swap == null ? void 0 : (_swap$result = swap.result) == null ? void 0 : _swap$result.swaps[0];
|
|
4139
|
+
var lastStep = swap == null ? void 0 : (_swap$result2 = swap.result) == null ? void 0 : _swap$result2.swaps[((_swap$result3 = swap.result) == null ? void 0 : _swap$result3.swaps.length) - 1];
|
|
4118
4140
|
return React__default.createElement(SecondaryPage, {
|
|
4119
4141
|
textField: false,
|
|
4120
4142
|
title: "Confirm Swap",
|
|
@@ -4357,7 +4379,7 @@ function SwapHistory(props) {
|
|
|
4357
4379
|
}, 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, {
|
|
4358
4380
|
ml: 4,
|
|
4359
4381
|
variant: "caption"
|
|
4360
|
-
}, step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4382
|
+
}, "$", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4361
4383
|
style: {
|
|
4362
4384
|
display: 'flex'
|
|
4363
4385
|
}
|