@rango-dev/widget-embedded 0.1.11-next.5 → 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.
@@ -1,4 +1,4 @@
1
- import { WalletState, Typography, InfoCircleIcon, AngleDownIcon, Spacer, Button, TextField, styled, Tooltip, RetryIcon, HistoryIcon, SettingsIcon, Header as Header$1, VerticalSwapIcon, BestRoute, Alert, ChevronRightIcon, GasIcon, ConfirmSwap, History, LiquiditySourcesSelector, BlockchainSelector, TokenSelector, Settings, SecondaryPage, Spinner, LoadingFailedAlert, Wallet, SwapHistory, AddWalletIcon, globalCss, createTheme, SwapContainer } from '@rango-dev/ui';
1
+ import { WalletState, Typography, InfoCircleIcon, AngleDownIcon, Spacer, Button, Image, TextField, styled, Tooltip, RetryIcon, HistoryIcon, SettingsIcon, Header as Header$1, VerticalSwapIcon, BestRoute, Alert, ChevronRightIcon, GasIcon, ConfirmSwap, History, LiquiditySourcesSelector, BlockchainSelector, TokenSelector, Settings, SecondaryPage, Spinner, LoadingFailedAlert, Wallet, SwapHistory, AddWalletIcon, globalCss, createTheme, SwapContainer } from '@rango-dev/ui';
2
2
  import React, { useRef, useEffect, useState, useLayoutEffect } from 'react';
3
3
  import { useInRouterContext as useInRouterContext$1, MemoryRouter, useLocation as useLocation$1, useNavigate as useNavigate$1 } from 'react-router';
4
4
  import { PendingSwapNetworkStatus, useQueueManager, calculatePendingSwap, getCurrentStep, getCurrentBlockchainOfOrNull, getRelatedWalletOrNull, cancelSwap, swapQueueDef, checkWaitingForNetworkChange } from '@rango-dev/queue-manager-rango-preset';
@@ -1343,10 +1343,6 @@ const Container = /*#__PURE__*/styled('div', {
1343
1343
  }
1344
1344
  }
1345
1345
  });
1346
- const StyledImage = /*#__PURE__*/styled('img', {
1347
- width: '$24',
1348
- maxHeight: '$24'
1349
- });
1350
1346
  const Options = /*#__PURE__*/styled('div', {
1351
1347
  display: 'flex',
1352
1348
  justifyContent: 'flex-end',
@@ -1443,8 +1439,9 @@ function TokenInfo(props) {
1443
1439
  variant: "outlined",
1444
1440
  disabled: loadingStatus === 'failed',
1445
1441
  loading: loadingStatus === 'loading',
1446
- prefix: loadingStatus === 'success' && chain ? React.createElement(StyledImage, {
1447
- src: chain.logo
1442
+ prefix: loadingStatus === 'success' && chain ? React.createElement(Image, {
1443
+ src: chain.logo,
1444
+ size: 24
1448
1445
  }) : React.createElement(ImagePlaceholder, null),
1449
1446
  suffix: ItemSuffix,
1450
1447
  align: "start",
@@ -1459,8 +1456,9 @@ function TokenInfo(props) {
1459
1456
  variant: "outlined",
1460
1457
  disabled: loadingStatus === 'failed' || type === 'From' && !fromChain || type === 'To' && !toChain,
1461
1458
  loading: loadingStatus === 'loading',
1462
- prefix: loadingStatus === 'success' && token ? React.createElement(StyledImage, {
1463
- src: token.image
1459
+ prefix: loadingStatus === 'success' && token ? React.createElement(Image, {
1460
+ src: token.image,
1461
+ size: 24
1464
1462
  }) : React.createElement(ImagePlaceholder, null),
1465
1463
  suffix: ItemSuffix,
1466
1464
  size: "large",
@@ -1605,7 +1603,8 @@ function HeaderButtons(props) {
1605
1603
  onClick: onClickRefresh,
1606
1604
  disabled: !onClickRefresh
1607
1605
  }, React.createElement(RetryIcon, {
1608
- size: 24
1606
+ size: 24,
1607
+ disabled: !onClickRefresh
1609
1608
  }))), React.createElement(Tooltip, {
1610
1609
  content: "Transactions History"
1611
1610
  }, React.createElement(Button, {
@@ -1852,10 +1851,6 @@ const Container$3 = /*#__PURE__*/styled('div', {
1852
1851
  }
1853
1852
  }
1854
1853
  });
1855
- const StyledImage$1 = /*#__PURE__*/styled('img', {
1856
- width: '$24',
1857
- maxHeight: '$24'
1858
- });
1859
1854
  const ImagePlaceholder$1 = /*#__PURE__*/styled('span', {
1860
1855
  width: '24px',
1861
1856
  height: '24px',
@@ -1911,8 +1906,9 @@ function TokenPreview(props) {
1911
1906
  className: "selectors",
1912
1907
  variant: "outlined",
1913
1908
  loading: loadingStatus === 'loading',
1914
- prefix: loadingStatus === 'success' && chain ? React.createElement(StyledImage$1, {
1915
- src: chain.logo
1909
+ prefix: loadingStatus === 'success' && chain ? React.createElement(Image, {
1910
+ src: chain.logo,
1911
+ size: 24
1916
1912
  }) : React.createElement(ImagePlaceholder$1, null),
1917
1913
  suffix: ItemSuffix,
1918
1914
  align: "start",
@@ -1923,8 +1919,9 @@ function TokenPreview(props) {
1923
1919
  className: "selectors",
1924
1920
  variant: "outlined",
1925
1921
  loading: loadingStatus === 'loading',
1926
- prefix: loadingStatus === 'success' && token ? React.createElement(StyledImage$1, {
1927
- src: token.image
1922
+ prefix: loadingStatus === 'success' && token ? React.createElement(Image, {
1923
+ src: token.image,
1924
+ size: 24
1928
1925
  }) : React.createElement(ImagePlaceholder$1, null),
1929
1926
  suffix: ItemSuffix,
1930
1927
  size: "large",
@@ -2954,9 +2951,7 @@ const Header = /*#__PURE__*/styled('div', {
2954
2951
  display: 'flex'
2955
2952
  }
2956
2953
  });
2957
- const WalletImage = /*#__PURE__*/styled('img', {
2958
- width: '$24',
2959
- height: '$24',
2954
+ const WalletImageContainer = /*#__PURE__*/styled('div', {
2960
2955
  marginLeft: -15,
2961
2956
  marginRight: '$6',
2962
2957
  borderRadius: '99999px'
@@ -3022,10 +3017,12 @@ function Layout(_ref) {
3022
3017
  onClick: () => {
3023
3018
  if (!connectWalletsButtonDisabled) navigate(navigationRoutes.wallets);
3024
3019
  }
3025
- }, connectedWalletsImages?.length ? connectedWalletsImages.map((walletImage, index) => React.createElement(WalletImage, {
3026
- key: index,
3027
- src: walletImage
3028
- })) : React.createElement(React.Fragment, null), React.createElement("div", {
3020
+ }, connectedWalletsImages?.length ? connectedWalletsImages.map((walletImage, index) => React.createElement(WalletImageContainer, {
3021
+ key: index
3022
+ }, React.createElement(Image, {
3023
+ src: walletImage,
3024
+ size: 24
3025
+ }))) : React.createElement(React.Fragment, null), React.createElement("div", {
3029
3026
  className: "balance"
3030
3027
  }, React.createElement(Typography, {
3031
3028
  variant: "body2"
@@ -3128,6 +3125,9 @@ function useTheme(_ref) {
3128
3125
  colors,
3129
3126
  radii: {
3130
3127
  5: `${borderRadius}px`
3128
+ },
3129
+ shadows: {
3130
+ s: '0px 3px 5px 3px #f0f2f5, 0px 6px 10px 3px #f0f2f5, 0px 1px 18px 3px #f0f2f5'
3131
3131
  }
3132
3132
  });
3133
3133
  const customeDarkTheme = createTheme({
@@ -3146,6 +3146,9 @@ function useTheme(_ref) {
3146
3146
  },
3147
3147
  radii: {
3148
3148
  5: `${borderRadius}px`
3149
+ },
3150
+ shadows: {
3151
+ s: '0px 3px 5px 3px #222, 0px 6px 10px 3px #222, 0px 1px 18px 3px #222'
3149
3152
  }
3150
3153
  });
3151
3154
  const [OSTheme, setOSTheme] = useState(customeLightTheme);