@rango-dev/ui 0.1.11-next.8 → 0.1.12

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/ui.esm.js CHANGED
@@ -1504,10 +1504,7 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1504
1504
  },
1505
1505
  body2: {
1506
1506
  fontSize: '$14',
1507
- fontWeight: '$400',
1508
- '@lg': {
1509
- fontSize: '$16'
1510
- }
1507
+ fontWeight: '$400'
1511
1508
  },
1512
1509
  body3: {
1513
1510
  fontSize: '$12',
@@ -2712,6 +2709,13 @@ var Input = /*#__PURE__*/styled('input', {
2712
2709
  margin: 0,
2713
2710
  '&:disabled': {
2714
2711
  cursor: 'not-allowed'
2712
+ },
2713
+ '&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
2714
+ '-webkit-appearance': 'none',
2715
+ margin: 0
2716
+ },
2717
+ '&[type="number"]': {
2718
+ '-moz-appearance': 'textfield'
2715
2719
  }
2716
2720
  });
2717
2721
  var Label = /*#__PURE__*/styled('label', {
@@ -2991,7 +2995,7 @@ function Alert(props) {
2991
2995
  color: type,
2992
2996
  size: 24
2993
2997
  }), React__default.createElement(Spacer, {
2994
- size: 8
2998
+ size: 4
2995
2999
  }))), React__default.createElement("div", {
2996
3000
  style: {
2997
3001
  display: 'flex',
@@ -3005,7 +3009,7 @@ function Alert(props) {
3005
3009
  variant: "title",
3006
3010
  color: type
3007
3011
  }, title), !!children && React__default.createElement(Spacer, {
3008
- size: 8,
3012
+ size: 4,
3009
3013
  direction: "vertical"
3010
3014
  })), children)), props.footer ? React__default.createElement("div", {
3011
3015
  className: "footer"
@@ -3194,7 +3198,7 @@ var LoaderContainer = /*#__PURE__*/styled('div', {
3194
3198
  display: 'flex',
3195
3199
  justifyContent: 'center',
3196
3200
  width: '100%',
3197
- paddingTop: '5%',
3201
+ paddingTop: '33%',
3198
3202
  flex: 1
3199
3203
  });
3200
3204
  var filterTokens = function filterTokens(list, searchedFor) {
@@ -3260,12 +3264,12 @@ function BlockchainSelector(props) {
3260
3264
  onBack: onBack
3261
3265
  }, function (searchedFor) {
3262
3266
  var filteredBlockchains = filterBlockchains(list, searchedFor);
3263
- return React__default.createElement(ListContainer$1, {
3267
+ return React__default.createElement(React__default.Fragment, null, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
3268
+ size: 24
3269
+ })), React__default.createElement(ListContainer$1, {
3264
3270
  style: listContainerStyle,
3265
3271
  key: "1"
3266
- }, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
3267
- size: 24
3268
- })), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
3272
+ }, loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
3269
3273
  list: filteredBlockchains,
3270
3274
  selected: selected,
3271
3275
  multiSelect: multiSelect,
@@ -3274,7 +3278,7 @@ function BlockchainSelector(props) {
3274
3278
  }) : React__default.createElement(NotFoundAlert, {
3275
3279
  catergory: "Blockchain",
3276
3280
  searchedFor: searchedFor
3277
- })));
3281
+ }))));
3278
3282
  });
3279
3283
  }
3280
3284
 
@@ -3999,8 +4003,8 @@ function Settings(props) {
3999
4003
  onSlippageChange(slippage);
4000
4004
  };
4001
4005
  var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(Head, null, React__default.createElement(Typography, {
4002
- variant: "body1"
4003
- }, "Slippage tolerance per swap"), customSlippage ? React__default.createElement(Typography, {
4006
+ variant: "body2"
4007
+ }, "Slippage tolerance"), customSlippage ? React__default.createElement(Typography, {
4004
4008
  variant: "caption",
4005
4009
  color: "error"
4006
4010
  }, customSlippage, "% Custom") : undefined), React__default.createElement(SlippageChipsContainer, null, slippages.map(function (slippage, index) {
@@ -4054,7 +4058,7 @@ function Settings(props) {
4054
4058
  marginTop: '$24'
4055
4059
  }
4056
4060
  })), React__default.createElement(InfiniteContainer, null, React__default.createElement(Typography, {
4057
- variant: "body1"
4061
+ variant: "body2"
4058
4062
  }, "Infinite Approval"), React__default.createElement(Switch, {
4059
4063
  checked: infiniteApprove,
4060
4064
  onChange: toggleInfiniteApprove
@@ -4071,7 +4075,7 @@ function Settings(props) {
4071
4075
  color: "$error500"
4072
4076
  }, "Loading failed"), React__default.createElement(StyledAngleRight, null))
4073
4077
  }, React__default.createElement(Typography, {
4074
- variant: "body1"
4078
+ variant: "body2"
4075
4079
  }, "Liquidity Sources"))));
4076
4080
  return React__default.createElement(SecondaryPage, {
4077
4081
  title: "Settings",
@@ -4546,17 +4550,7 @@ var Group = /*#__PURE__*/styled('div', {
4546
4550
  textTransform: 'uppercase'
4547
4551
  }
4548
4552
  });
4549
- var Container$6 = /*#__PURE__*/styled('div', {
4550
- overflowY: 'auto'
4551
- });
4552
- var filteredHistory = function filteredHistory(list, searchedFor) {
4553
- return list.filter(function (swap) {
4554
- var firstStep = swap.steps[0];
4555
- var lastStep = swap.steps[swap.steps.length - 1];
4556
- return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
4557
- });
4558
- };
4559
- var SwapsGroup = function SwapsGroup(props) {
4553
+ function SwapsGroup(props) {
4560
4554
  var list = props.list,
4561
4555
  onSwapClick = props.onSwapClick,
4562
4556
  groupBy = props.groupBy;
@@ -4571,6 +4565,7 @@ var SwapsGroup = function SwapsGroup(props) {
4571
4565
  key: index
4572
4566
  }, React__default.createElement(Typography, {
4573
4567
  variant: "body2",
4568
+ color: "neutrals600",
4574
4569
  className: "group-title"
4575
4570
  }, group.title), group.swaps.map(function (swap, index) {
4576
4571
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(SwapDetail, {
@@ -4585,13 +4580,25 @@ var SwapsGroup = function SwapsGroup(props) {
4585
4580
  size: 24
4586
4581
  }));
4587
4582
  }));
4583
+ }
4584
+
4585
+ var Container$6 = /*#__PURE__*/styled('div', {
4586
+ overflowY: 'auto'
4587
+ });
4588
+ var filteredHistory = function filteredHistory(list, searchedFor) {
4589
+ return list.filter(function (swap) {
4590
+ var firstStep = swap.steps[0];
4591
+ var lastStep = swap.steps[swap.steps.length - 1];
4592
+ return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
4593
+ });
4588
4594
  };
4589
- function History(_ref) {
4590
- var _ref$list = _ref.list,
4591
- list = _ref$list === void 0 ? [] : _ref$list,
4592
- onBack = _ref.onBack,
4593
- onSwapClick = _ref.onSwapClick,
4594
- groupBy = _ref.groupBy;
4595
+ function History(props) {
4596
+ var _props$list = props.list,
4597
+ list = _props$list === void 0 ? [] : _props$list,
4598
+ onBack = props.onBack,
4599
+ onSwapClick = props.onSwapClick,
4600
+ groupBy = props.groupBy,
4601
+ loading = props.loading;
4595
4602
  return React__default.createElement(SecondaryPage, {
4596
4603
  onBack: onBack,
4597
4604
  textField: true,
@@ -4599,13 +4606,15 @@ function History(_ref) {
4599
4606
  title: "Swaps"
4600
4607
  }, function (searchedFor) {
4601
4608
  var filterSwaps = filteredHistory(list, searchedFor);
4602
- return React__default.createElement(Container$6, null, filterSwaps.length ? React__default.createElement(SwapsGroup, {
4609
+ return React__default.createElement(React__default.Fragment, null, loading && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
4610
+ size: 24
4611
+ })), React__default.createElement(Container$6, null, !loading && React__default.createElement(React__default.Fragment, null, filterSwaps.length ? React__default.createElement(SwapsGroup, {
4603
4612
  list: filterSwaps,
4604
4613
  onSwapClick: onSwapClick,
4605
4614
  groupBy: groupBy
4606
4615
  }) : React__default.createElement(NotFoundAlert, {
4607
4616
  catergory: "Swap"
4608
- }));
4617
+ }))));
4609
4618
  });
4610
4619
  }
4611
4620
 
@@ -4649,21 +4658,21 @@ var SwapMessages = function SwapMessages(props) {
4649
4658
  onClick: props.switchNetwork
4650
4659
  }, "Change network to ", currentStepBlockchain)
4651
4660
  }), !!detailedMessage.content ? React__default.createElement(DetailedMessage, null, React__default.createElement(Typography, {
4652
- variant: "body3"
4661
+ variant: "body2"
4653
4662
  }, shouldShowMoreDetailsButton && !expandedMessage ? detailedMessage.content.substring(0, allowedNumberOfChars) + (allowedNumberOfChars > 0 ? '...' : '') : detailedMessage.content)) : null, !!lastConvertedTokenInFailedSwap && React__default.createElement(React__default.Fragment, null, React__default.createElement("p", null, React__default.createElement(Typography, {
4654
- variant: "body3"
4663
+ variant: "body2"
4655
4664
  }, "Don't worry, your fund is\xA0"), React__default.createElement(SuccessText, {
4656
- variant: "body3"
4665
+ variant: "body2"
4657
4666
  }, React__default.createElement("b", null, "Safe"))), React__default.createElement("p", null, React__default.createElement(Typography, {
4658
- variant: "body3"
4667
+ variant: "body2"
4659
4668
  }, "It is converted to \xA0", React__default.createElement("u", null, lastConvertedTokenInFailedSwap.outputAmount), "\xA0"), React__default.createElement(SuccessText, {
4660
- variant: "body3"
4669
+ variant: "body2"
4661
4670
  }, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.symbol, "\xA0")), React__default.createElement(Typography, {
4662
- variant: "body3"
4671
+ variant: "body2"
4663
4672
  }, "on your\xA0"), React__default.createElement(SuccessText, {
4664
- variant: "body3"
4673
+ variant: "body2"
4665
4674
  }, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.blockchain, "\xA0")), React__default.createElement(Typography, {
4666
- variant: "body3"
4675
+ variant: "body2"
4667
4676
  }, "wallet"))));
4668
4677
  };
4669
4678
 
@@ -4686,7 +4695,8 @@ var SwapperContainer$1 = /*#__PURE__*/styled('div', {
4686
4695
  }
4687
4696
  });
4688
4697
  var FeeContainer = /*#__PURE__*/styled('div', {
4689
- paddingLeft: '$16'
4698
+ paddingLeft: '$16',
4699
+ color: '$neutrals800'
4690
4700
  });
4691
4701
  var Fee = /*#__PURE__*/styled('div', {
4692
4702
  display: 'flex',
@@ -4772,6 +4782,7 @@ var Row$2 = /*#__PURE__*/styled('div', {
4772
4782
  }
4773
4783
  });
4774
4784
  var RequestId = /*#__PURE__*/styled('div', {
4785
+ width: '150px',
4775
4786
  whiteSpace: 'nowrap',
4776
4787
  overflow: 'hidden',
4777
4788
  textOverflow: 'ellipsis',
@@ -4852,9 +4863,9 @@ function SwapHistory(props) {
4852
4863
  alt: step.swapperId,
4853
4864
  size: 20
4854
4865
  }), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
4855
- variant: "caption"
4866
+ variant: "body2"
4856
4867
  }, step.swapperType === 'DEX' ? 'Swap' : 'Bridge', " via", ' ', step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
4857
- variant: "caption"
4868
+ variant: "body2"
4858
4869
  }, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
4859
4870
  style: {
4860
4871
  display: 'flex'
@@ -4869,7 +4880,7 @@ function SwapHistory(props) {
4869
4880
  }), React__default.createElement(CheckCircleIcon, {
4870
4881
  color: "primary"
4871
4882
  }), React__default.createElement(Description, {
4872
- variant: "body3"
4883
+ variant: "body2"
4873
4884
  }, React__default.createElement(StyledAnchor, {
4874
4885
  href: item.url,
4875
4886
  target: "_blank",
@@ -4879,7 +4890,7 @@ function SwapHistory(props) {
4879
4890
  })), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
4880
4891
  color: "error"
4881
4892
  }), React__default.createElement(Description, {
4882
- variant: "body3",
4893
+ variant: "body2",
4883
4894
  color: "$error500"
4884
4895
  }, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
4885
4896
  logo: step.toLogo,
@@ -4927,5 +4938,5 @@ function SwapHistory(props) {
4927
4938
  }));
4928
4939
  }
4929
4940
 
4930
- 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 };
4941
+ 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, SwapsGroup, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
4931
4942
  //# sourceMappingURL=ui.esm.js.map