@lifi/widget 1.32.1 → 1.32.3

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.
Files changed (78) hide show
  1. package/AppDrawer.d.ts +3 -0
  2. package/AppDrawer.js +6 -4
  3. package/cjs/AppDrawer.d.ts +3 -0
  4. package/cjs/AppDrawer.js +8 -5
  5. package/cjs/components/ActiveSwaps/ActiveSwapItem.js +1 -1
  6. package/cjs/components/ActiveSwaps/ActiveSwaps.style.js +1 -1
  7. package/cjs/components/Card/Card.d.ts +0 -2
  8. package/cjs/components/Card/Card.js +2 -8
  9. package/cjs/components/ChainSelect/ChainSelect.style.d.ts +0 -1
  10. package/cjs/components/Header/WalletHeader.js +1 -1
  11. package/cjs/components/ListItemButton.js +1 -1
  12. package/cjs/components/SwapRouteCard/SwapRouteCard.js +1 -1
  13. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +1 -1
  14. package/cjs/components/TokenList/TokenListItem.js +1 -1
  15. package/cjs/config/theme.js +25 -0
  16. package/cjs/config/version.d.ts +1 -1
  17. package/cjs/config/version.js +1 -1
  18. package/cjs/hooks/index.d.ts +0 -1
  19. package/cjs/hooks/index.js +0 -1
  20. package/cjs/hooks/useTokenBalance.js +1 -1
  21. package/cjs/hooks/useTokenBalances.js +1 -1
  22. package/cjs/i18n/it.json +8 -8
  23. package/cjs/i18n/zh.json +8 -8
  24. package/cjs/pages/SelectChainPage/SelectChainPage.js +1 -1
  25. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +1 -1
  26. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +1 -1
  27. package/cjs/pages/SelectWalletPage/SelectWalletPage.js +1 -1
  28. package/cjs/pages/SettingsPage/EnabledToolsButton.js +1 -1
  29. package/cjs/providers/index.d.ts +0 -1
  30. package/cjs/providers/index.js +0 -1
  31. package/cjs/utils/colors.d.ts +2 -2
  32. package/cjs/utils/colors.js +1 -3
  33. package/components/ActiveSwaps/ActiveSwapItem.js +1 -1
  34. package/components/ActiveSwaps/ActiveSwaps.style.js +1 -1
  35. package/components/Card/Card.d.ts +0 -2
  36. package/components/Card/Card.js +2 -8
  37. package/components/ChainSelect/ChainSelect.style.d.ts +0 -1
  38. package/components/Header/WalletHeader.js +1 -1
  39. package/components/ListItemButton.js +1 -1
  40. package/components/SwapRouteCard/SwapRouteCard.js +1 -1
  41. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +1 -1
  42. package/components/TokenList/TokenListItem.js +1 -1
  43. package/config/theme.js +25 -0
  44. package/config/version.d.ts +1 -1
  45. package/config/version.js +1 -1
  46. package/hooks/index.d.ts +0 -1
  47. package/hooks/index.js +0 -1
  48. package/hooks/useTokenBalance.js +1 -1
  49. package/hooks/useTokenBalances.js +1 -1
  50. package/i18n/it.json +8 -8
  51. package/i18n/zh.json +8 -8
  52. package/package.json +8 -11
  53. package/pages/SelectChainPage/SelectChainPage.js +1 -1
  54. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +1 -1
  55. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +1 -1
  56. package/pages/SelectWalletPage/SelectWalletPage.js +1 -1
  57. package/pages/SettingsPage/EnabledToolsButton.js +1 -1
  58. package/providers/index.d.ts +0 -1
  59. package/providers/index.js +0 -1
  60. package/tsconfig.cjs.tsbuildinfo +1 -1
  61. package/utils/colors.d.ts +2 -2
  62. package/utils/colors.js +1 -3
  63. package/cjs/config/sentry.d.ts +0 -1
  64. package/cjs/config/sentry.js +0 -33
  65. package/cjs/hooks/useTelemetry.d.ts +0 -1
  66. package/cjs/hooks/useTelemetry.js +0 -25
  67. package/cjs/providers/TelemetryProvider/TelemetryProvider.d.ts +0 -4
  68. package/cjs/providers/TelemetryProvider/TelemetryProvider.js +0 -11
  69. package/cjs/providers/TelemetryProvider/index.d.ts +0 -1
  70. package/cjs/providers/TelemetryProvider/index.js +0 -17
  71. package/config/sentry.d.ts +0 -1
  72. package/config/sentry.js +0 -29
  73. package/hooks/useTelemetry.d.ts +0 -1
  74. package/hooks/useTelemetry.js +0 -21
  75. package/providers/TelemetryProvider/TelemetryProvider.d.ts +0 -4
  76. package/providers/TelemetryProvider/TelemetryProvider.js +0 -7
  77. package/providers/TelemetryProvider/index.d.ts +0 -1
  78. package/providers/TelemetryProvider/index.js +0 -1
package/AppDrawer.d.ts CHANGED
@@ -9,3 +9,6 @@ export interface WidgetDrawer {
9
9
  export declare const AppDrawer: import("react").ForwardRefExoticComponent<import("./types").WidgetDrawerProps & WidgetConfig & {
10
10
  config?: WidgetConfig | undefined;
11
11
  } & import("react").RefAttributes<WidgetDrawer>>;
12
+ export declare const DrawerButtonText: ({ open }: {
13
+ open: boolean;
14
+ }) => JSX.Element;
package/AppDrawer.js CHANGED
@@ -7,9 +7,8 @@ import { AppDefault } from './App';
7
7
  import { DrawerButton, DrawerButtonTypography } from './AppDrawer.style';
8
8
  import { AppProvider } from './AppProvider';
9
9
  export const AppDrawer = forwardRef(({ elementRef, open, config }, ref) => {
10
- const { t } = useTranslation();
11
10
  const openRef = useRef(open);
12
- const [drawerOpen, setDrawerOpen] = useState(open);
11
+ const [drawerOpen, setDrawerOpen] = useState(Boolean(open));
13
12
  const toggleDrawer = useCallback(() => {
14
13
  setDrawerOpen((open) => !open);
15
14
  }, []);
@@ -31,9 +30,8 @@ export const AppDrawer = forwardRef(({ elementRef, open, config }, ref) => {
31
30
  ...config?.containerStyle,
32
31
  height: '100%',
33
32
  },
34
- variant: 'drawer',
35
33
  }), [config]);
36
- return (_jsxs(AppProvider, { config: drawerConfig, children: [_jsxs(DrawerButton, { variant: "contained", onClick: toggleDrawer, open: drawerOpen, drawerProps: config?.containerStyle, children: [drawerOpen ? _jsx(KeyboardArrowRightIcon, {}) : _jsx(KeyboardArrowLeftIcon, {}), _jsx(DrawerButtonTypography, { children: drawerOpen ? t('button.hide') : t('button.lifiSwap') })] }), _jsx(Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, BackdropProps: {
34
+ return (_jsxs(AppProvider, { config: drawerConfig, children: [_jsxs(DrawerButton, { variant: "contained", onClick: toggleDrawer, open: drawerOpen, drawerProps: config?.containerStyle, children: [drawerOpen ? _jsx(KeyboardArrowRightIcon, {}) : _jsx(KeyboardArrowLeftIcon, {}), _jsx(DrawerButtonText, { open: drawerOpen })] }), _jsx(Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, BackdropProps: {
37
35
  sx: {
38
36
  backgroundColor: 'rgb(0 0 0 / 48%)',
39
37
  backdropFilter: 'blur(3px)',
@@ -46,3 +44,7 @@ export const AppDrawer = forwardRef(({ elementRef, open, config }, ref) => {
46
44
  },
47
45
  }, keepMounted: true, children: _jsx(AppDefault, {}) })] }));
48
46
  });
47
+ export const DrawerButtonText = ({ open }) => {
48
+ const { t } = useTranslation();
49
+ return (_jsx(DrawerButtonTypography, { children: open ? t('button.hide') : t('button.lifiSwap') }));
50
+ };
@@ -9,3 +9,6 @@ export interface WidgetDrawer {
9
9
  export declare const AppDrawer: import("react").ForwardRefExoticComponent<import("./types").WidgetDrawerProps & WidgetConfig & {
10
10
  config?: WidgetConfig | undefined;
11
11
  } & import("react").RefAttributes<WidgetDrawer>>;
12
+ export declare const DrawerButtonText: ({ open }: {
13
+ open: boolean;
14
+ }) => JSX.Element;
package/cjs/AppDrawer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppDrawer = void 0;
3
+ exports.DrawerButtonText = exports.AppDrawer = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const icons_material_1 = require("@mui/icons-material");
6
6
  const material_1 = require("@mui/material");
@@ -10,9 +10,8 @@ const App_1 = require("./App");
10
10
  const AppDrawer_style_1 = require("./AppDrawer.style");
11
11
  const AppProvider_1 = require("./AppProvider");
12
12
  exports.AppDrawer = (0, react_1.forwardRef)(({ elementRef, open, config }, ref) => {
13
- const { t } = (0, react_i18next_1.useTranslation)();
14
13
  const openRef = (0, react_1.useRef)(open);
15
- const [drawerOpen, setDrawerOpen] = (0, react_1.useState)(open);
14
+ const [drawerOpen, setDrawerOpen] = (0, react_1.useState)(Boolean(open));
16
15
  const toggleDrawer = (0, react_1.useCallback)(() => {
17
16
  setDrawerOpen((open) => !open);
18
17
  }, []);
@@ -34,9 +33,8 @@ exports.AppDrawer = (0, react_1.forwardRef)(({ elementRef, open, config }, ref)
34
33
  ...config?.containerStyle,
35
34
  height: '100%',
36
35
  },
37
- variant: 'drawer',
38
36
  }), [config]);
39
- return ((0, jsx_runtime_1.jsxs)(AppProvider_1.AppProvider, { config: drawerConfig, children: [(0, jsx_runtime_1.jsxs)(AppDrawer_style_1.DrawerButton, { variant: "contained", onClick: toggleDrawer, open: drawerOpen, drawerProps: config?.containerStyle, children: [drawerOpen ? (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowRight, {}) : (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowLeft, {}), (0, jsx_runtime_1.jsx)(AppDrawer_style_1.DrawerButtonTypography, { children: drawerOpen ? t('button.hide') : t('button.lifiSwap') })] }), (0, jsx_runtime_1.jsx)(material_1.Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, BackdropProps: {
37
+ return ((0, jsx_runtime_1.jsxs)(AppProvider_1.AppProvider, { config: drawerConfig, children: [(0, jsx_runtime_1.jsxs)(AppDrawer_style_1.DrawerButton, { variant: "contained", onClick: toggleDrawer, open: drawerOpen, drawerProps: config?.containerStyle, children: [drawerOpen ? (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowRight, {}) : (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowLeft, {}), (0, jsx_runtime_1.jsx)(exports.DrawerButtonText, { open: drawerOpen })] }), (0, jsx_runtime_1.jsx)(material_1.Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, BackdropProps: {
40
38
  sx: {
41
39
  backgroundColor: 'rgb(0 0 0 / 48%)',
42
40
  backdropFilter: 'blur(3px)',
@@ -49,3 +47,8 @@ exports.AppDrawer = (0, react_1.forwardRef)(({ elementRef, open, config }, ref)
49
47
  },
50
48
  }, keepMounted: true, children: (0, jsx_runtime_1.jsx)(App_1.AppDefault, {}) })] }));
51
49
  });
50
+ const DrawerButtonText = ({ open }) => {
51
+ const { t } = (0, react_i18next_1.useTranslation)();
52
+ return ((0, jsx_runtime_1.jsx)(AppDrawer_style_1.DrawerButtonTypography, { children: open ? t('button.hide') : t('button.lifiSwap') }));
53
+ };
54
+ exports.DrawerButtonText = DrawerButtonText;
@@ -41,7 +41,7 @@ const ActiveSwapItem = ({ routeId, dense }) => {
41
41
  }
42
42
  };
43
43
  const ListItemComponent = dense ? ActiveSwaps_style_1.ListItem : ActiveSwaps_style_1.ListItemButton;
44
- return ((0, jsx_runtime_1.jsxs)(ListItemComponent, { onClick: handleClick, dense: true, disableRipple: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsxs)(TokenAvatar_1.TokenAvatarGroup, { total: 2, children: [(0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: route.fromToken }), (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: route.toToken })] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { sx: { margin: 0 }, disableTypography: true, primary: (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 500, lineHeight: 1, sx: {
44
+ return ((0, jsx_runtime_1.jsxs)(ListItemComponent, { onClick: handleClick, dense: true, disableRipple: dense, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsxs)(TokenAvatar_1.TokenAvatarGroup, { total: 2, children: [(0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: route.fromToken }), (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: route.toToken })] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { sx: { margin: 0 }, disableTypography: true, primary: (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 500, lineHeight: 1, sx: {
45
45
  display: 'flex',
46
46
  alignItems: 'center',
47
47
  marginLeft: 2,
@@ -11,7 +11,7 @@ exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ them
11
11
  paddingRight: theme.spacing(1.5),
12
12
  height: 64,
13
13
  '&:hover': {
14
- backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
14
+ backgroundColor: (0, utils_1.getContrastAlphaColor)(theme.palette.mode, '4%'),
15
15
  },
16
16
  }));
17
17
  exports.ListItem = (0, styles_1.styled)(material_1.ListItem, {
@@ -4,7 +4,6 @@ type CardVariant = 'default' | 'selected' | 'error';
4
4
  export type CardProps = {
5
5
  variant?: CardVariant;
6
6
  selectionColor?: 'primary' | 'secondary';
7
- dense?: boolean;
8
7
  indented?: boolean;
9
8
  onClick?: MouseEventHandler<HTMLDivElement>;
10
9
  pointerEvents?: 'auto' | 'none';
@@ -19,7 +18,6 @@ export declare const Card: import("@emotion/styled").StyledComponent<import("@mu
19
18
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
20
19
  variant?: CardVariant | undefined;
21
20
  selectionColor?: "primary" | "secondary" | undefined;
22
- dense?: boolean | undefined;
23
21
  indented?: boolean | undefined;
24
22
  onClick?: MouseEventHandler<HTMLDivElement> | undefined;
25
23
  pointerEvents?: "none" | "auto" | undefined;
@@ -12,14 +12,8 @@ const getBackgroundColor = (theme, variant, selectionColor) => variant === 'sele
12
12
  : (0, styles_1.alpha)(theme.palette.secondary.main, theme.palette.mode === 'light' ? 0.08 : 0.12)
13
13
  : theme.palette.background.paper;
14
14
  exports.Card = (0, styles_1.styled)(material_1.Box, {
15
- shouldForwardProp: (prop) => ![
16
- 'dense',
17
- 'variant',
18
- 'indented',
19
- 'selectionColor',
20
- 'pointerEvents',
21
- ].includes(prop),
22
- })(({ theme, variant, selectionColor = 'primary', dense, indented, pointerEvents, onClick, }) => {
15
+ shouldForwardProp: (prop) => !['variant', 'indented', 'selectionColor', 'pointerEvents'].includes(prop),
16
+ })(({ theme, variant, selectionColor = 'primary', indented, pointerEvents, onClick, }) => {
23
17
  const backgroundColor = getBackgroundColor(theme, variant, selectionColor);
24
18
  const backgroundHoverColor = onClick
25
19
  ? theme.palette.mode === 'light'
@@ -9,7 +9,6 @@ export declare const ChainCard: import("@emotion/styled").StyledComponent<import
9
9
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
10
10
  variant?: ("default" | "error" | "selected") | undefined;
11
11
  selectionColor?: "primary" | "secondary" | undefined;
12
- dense?: boolean | undefined;
13
12
  indented?: boolean | undefined;
14
13
  onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
15
14
  pointerEvents?: "none" | "auto" | undefined;
@@ -56,7 +56,7 @@ const ConnectedButton = () => {
56
56
  };
57
57
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, { endIcon: (0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {}), startIcon: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: chain?.logoURI, alt: chain?.key, sx: { width: 24, height: 24 }, children: chain?.name[0] }), sx: {
58
58
  marginRight: -1.25,
59
- }, onClick: handleClick, children: walletAddress }), (0, jsx_runtime_1.jsxs)(WalletMenu_1.WalletMenu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose, children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClick: handleCopyAddress, disableRipple: true, children: [(0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, {}), t(`button.copyAddress`)] }), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, { component: "a", onClick: handleClose, href: `${chain?.metamask.blockExplorerUrls[0]}address/${account.address}`, target: "_blank", disableRipple: true, children: [(0, jsx_runtime_1.jsx)(icons_material_1.OpenInNewOutlined, {}), t(`button.viewOnExplorer`)] }), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleDisconnect, fullWidth: true, startIcon: (0, jsx_runtime_1.jsx)(icons_material_1.PowerSettingsNewRounded, {}), sx: {
59
+ }, onClick: handleClick, children: walletAddress }), (0, jsx_runtime_1.jsxs)(WalletMenu_1.WalletMenu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose, children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClick: handleCopyAddress, children: [(0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, {}), t(`button.copyAddress`)] }), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, { component: "a", onClick: handleClose, href: `${chain?.metamask.blockExplorerUrls[0]}address/${account.address}`, target: "_blank", children: [(0, jsx_runtime_1.jsx)(icons_material_1.OpenInNewOutlined, {}), t(`button.viewOnExplorer`)] }), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleDisconnect, fullWidth: true, startIcon: (0, jsx_runtime_1.jsx)(icons_material_1.PowerSettingsNewRounded, {}), sx: {
60
60
  marginTop: 1,
61
61
  }, children: t(`button.disconnect`) })] })] }));
62
62
  };
@@ -9,6 +9,6 @@ exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ them
9
9
  paddingLeft: theme.spacing(1.5),
10
10
  height: 56,
11
11
  '&:hover': {
12
- backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
12
+ backgroundColor: (0, utils_1.getContrastAlphaColor)(theme.palette.mode, '4%'),
13
13
  },
14
14
  }));
@@ -28,7 +28,7 @@ const SwapRouteCard = ({ route, active, variant = 'default', expanded, ...other
28
28
  ? { ...route.fromToken, amount: route.fromAmount }
29
29
  : { ...route.toToken, amount: route.toAmount };
30
30
  const cardContent = ((0, jsx_runtime_1.jsxs)(material_1.Box, { flex: 1, children: [widgetVariant !== 'refuel' && !useRecommendedRoute ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2, children: [(0, jsx_runtime_1.jsx)(SwapRouteCard_style_1.Label, { active: active ?? label !== alternativeTag, children: label }), variant === 'stretched' ? ((0, jsx_runtime_1.jsx)(exports.SwapRouteCardEssentials, { route: route })) : null] })) : null, (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(Token_1.Token, { token: token, step: variant === 'stretched' ? route.steps[0] : undefined, disableDescription: variant === 'dense' && widgetVariant !== 'refuel' }), variant === 'stretched' && !expanded ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_style_1.IconButton, { onClick: handleExpand, size: "small", children: cardExpanded ? (0, jsx_runtime_1.jsx)(icons_material_1.ExpandLess, {}) : (0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {}) })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: 225, in: cardExpanded, mountOnEnter: true, unmountOnExit: true, children: route.steps.map((step) => ((0, jsx_runtime_1.jsx)(StepActions_1.StepActions, { step: step, mt: 2 }, step.id))) }), variant !== 'stretched' ? ((0, jsx_runtime_1.jsx)(exports.SwapRouteCardEssentials, { route: route, dense: true })) : null] }));
31
- return widgetVariant === 'refuel' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, { dense: variant === 'dense', variant: active ? 'selected' : 'default', selectionColor: "secondary", indented: true, ...other, children: cardContent }));
31
+ return widgetVariant === 'refuel' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, { variant: active ? 'selected' : 'default', selectionColor: "secondary", indented: true, ...other, children: cardContent }));
32
32
  };
33
33
  exports.SwapRouteCard = SwapRouteCard;
34
34
  const SwapRouteCardEssentials = ({ route, dense }) => {
@@ -10,6 +10,6 @@ const SwapRouteCardSkeleton = ({ variant, ...other }) => {
10
10
  const cardContent = ((0, jsx_runtime_1.jsxs)(material_1.Box, { flex: 1, children: [widgetVariant !== 'refuel' && !useRecommendedRoute ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: 118, height: 24, sx: (theme) => ({
11
11
  borderRadius: `${theme.shape.borderRadiusSecondary}px`,
12
12
  }) }), variant === 'stretched' ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 52, height: 24, sx: { marginRight: 2 } }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 44, height: 24, sx: { marginRight: 2 } }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 32, height: 24 })] })) : null] })) : null, (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Box, { mr: 2, children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32 }) }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 96, height: 32 })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { ml: 6, display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 102, height: 16, sx: { borderRadius: 0.5 } }), variant === 'stretched' ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 72, height: 16, sx: { marginLeft: 1 } })) : null] })] }), variant !== 'stretched' ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { mt: 2, display: "flex", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 24 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 24 })] })) : null] }));
13
- return widgetVariant === 'refuel' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, { dense: variant === 'dense', indented: true, ...other, children: cardContent }));
13
+ return widgetVariant === 'refuel' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, { indented: true, ...other, children: cardContent }));
14
14
  };
15
15
  exports.SwapRouteCardSkeleton = SwapRouteCardSkeleton;
@@ -17,7 +17,7 @@ exports.TokenListItem = (0, react_1.memo)(({ onClick, size, start, token, showBa
17
17
  const TokenListItemButton = ({ onClick, token, showBalance, isBalanceLoading, }) => {
18
18
  const { t } = (0, react_i18next_1.useTranslation)();
19
19
  const tokenPrice = (0, utils_1.formatTokenPrice)(token.amount, token.priceUSD);
20
- return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItemButton, { onClick: onClick, dense: true, disableRipple: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: token.logoURI, alt: token.symbol, children: token.symbol[0] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: token.symbol, secondary: token.name }), showBalance ? (isBalanceLoading ? ((0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {})) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { textAlign: 'right' }, children: [Number(token.amount) ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", noWrap: true, children: t('format.number', {
20
+ return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItemButton, { onClick: onClick, dense: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: token.logoURI, alt: token.symbol, children: token.symbol[0] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: token.symbol, secondary: token.name }), showBalance ? (isBalanceLoading ? ((0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {})) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { textAlign: 'right' }, children: [Number(token.amount) ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", noWrap: true, children: t('format.number', {
21
21
  value: token.amount,
22
22
  }) })) : null, tokenPrice ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 400, fontSize: 12, color: "text.secondary", "data-price": token.priceUSD, children: t(`format.currency`, {
23
23
  value: tokenPrice,
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createTheme = void 0;
4
4
  const LoadingButton_1 = require("@mui/lab/LoadingButton");
5
+ const ButtonBase_1 = require("@mui/material/ButtonBase");
5
6
  const colors_1 = require("@mui/material/colors");
6
7
  const DialogActions_1 = require("@mui/material/DialogActions");
7
8
  const styles_1 = require("@mui/material/styles");
9
+ const system_1 = require("@mui/system");
8
10
  const palette = {
9
11
  primary: {
10
12
  main: '#3F49E1',
@@ -44,6 +46,16 @@ const shape = {
44
46
  borderRadius: 12,
45
47
  borderRadiusSecondary: 8,
46
48
  };
49
+ const enterKeyframe = (0, system_1.keyframes) `
50
+ 0% {
51
+ transform: scale(0);
52
+ opacity: 0.05;
53
+ }
54
+ 100% {
55
+ transform: scale(1);
56
+ opacity: 0.1;
57
+ }
58
+ `;
47
59
  const createTheme = (mode, theme = {}) => {
48
60
  const primaryMainColor = theme.palette?.primary?.main ??
49
61
  palette.primary.main;
@@ -107,6 +119,19 @@ const createTheme = (mode, theme = {}) => {
107
119
  },
108
120
  },
109
121
  },
122
+ MuiButtonBase: {
123
+ styleOverrides: {
124
+ root: {
125
+ [`& .${ButtonBase_1.touchRippleClasses.ripple}.${ButtonBase_1.touchRippleClasses.rippleVisible}`]: {
126
+ animationName: `${enterKeyframe}`,
127
+ },
128
+ [`& .${ButtonBase_1.touchRippleClasses.ripple}.${ButtonBase_1.touchRippleClasses.rippleVisible}`]: {
129
+ opacity: 0.1,
130
+ animationName: `${enterKeyframe}`,
131
+ },
132
+ },
133
+ },
134
+ },
110
135
  MuiButton: {
111
136
  defaultProps: {
112
137
  disableElevation: true,
@@ -1,2 +1,2 @@
1
1
  export declare const name = "@lifi/widget";
2
- export declare const version = "1.32.1";
2
+ export declare const version = "1.32.3";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = exports.name = void 0;
4
4
  exports.name = '@lifi/widget';
5
- exports.version = '1.32.1';
5
+ exports.version = '1.32.3';
@@ -12,7 +12,6 @@ export * from './useProcessMessage';
12
12
  export * from './useRouteExecution';
13
13
  export * from './useScrollableContainer';
14
14
  export * from './useSwapRoutes';
15
- export * from './useTelemetry';
16
15
  export * from './useToken';
17
16
  export * from './useTokenAddressBalance';
18
17
  export * from './useTokenBalance';
@@ -28,7 +28,6 @@ __exportStar(require("./useProcessMessage"), exports);
28
28
  __exportStar(require("./useRouteExecution"), exports);
29
29
  __exportStar(require("./useScrollableContainer"), exports);
30
30
  __exportStar(require("./useSwapRoutes"), exports);
31
- __exportStar(require("./useTelemetry"), exports);
32
31
  __exportStar(require("./useToken"), exports);
33
32
  __exportStar(require("./useTokenAddressBalance"), exports);
34
33
  __exportStar(require("./useTokenBalance"), exports);
@@ -5,7 +5,7 @@ const react_query_1 = require("@tanstack/react-query");
5
5
  const react_1 = require("react");
6
6
  const providers_1 = require("../providers");
7
7
  const utils_1 = require("../utils");
8
- const defaultRefetchInterval = 60000;
8
+ const defaultRefetchInterval = 30000;
9
9
  const useTokenBalance = (token, accountAddress) => {
10
10
  const lifi = (0, providers_1.useLiFi)();
11
11
  const { account } = (0, providers_1.useWallet)();
@@ -8,7 +8,7 @@ const providers_1 = require("../providers");
8
8
  const utils_1 = require("../utils");
9
9
  const useFeaturedTokens_1 = require("./useFeaturedTokens");
10
10
  const useTokens_1 = require("./useTokens");
11
- const defaultRefetchInterval = 60000;
11
+ const defaultRefetchInterval = 30000;
12
12
  const minRefetchInterval = 1000;
13
13
  const useTokenBalances = (selectedChainId) => {
14
14
  const lifi = (0, providers_1.useLiFi)();
package/cjs/i18n/it.json CHANGED
@@ -6,7 +6,6 @@
6
6
  "contactSupport": "Contatta l'assistenza",
7
7
  "continue": "Continua",
8
8
  "copyAddress": "Copia indirizzo",
9
- "viewOnExplorer": "Visualizza sull'Explorer",
10
9
  "dark": "Scuro",
11
10
  "delete": "Elimina",
12
11
  "disconnect": "Disconnetti",
@@ -19,6 +18,8 @@
19
18
  "ok": "Ok",
20
19
  "okay": "Okay",
21
20
  "removeSwap": "Rimuovi lo scambio",
21
+ "reset": "Ripristina",
22
+ "resetSettings": "Ripristina impostazioni",
22
23
  "restartSwap": "Riavvia lo scambio",
23
24
  "reviewGasSwap": "Rivedi lo scambio di gas",
24
25
  "reviewSwap": "Rivedi lo scambio",
@@ -27,7 +28,8 @@
27
28
  "startGasSwap": "Inizia lo scambio di gas",
28
29
  "startSwap": "Avvia lo scambio",
29
30
  "swap": "Scambio",
30
- "tryAgain": "Riprova"
31
+ "tryAgain": "Riprova",
32
+ "viewOnExplorer": "Visualizza sull'Explorer"
31
33
  },
32
34
  "format": {
33
35
  "currency": "{{value, currency(currency: USD)}}",
@@ -54,7 +56,6 @@
54
56
  "title": "Lingua"
55
57
  },
56
58
  "settings": {
57
- "advancedPreferences": "Preferenze avanzate",
58
59
  "enabledBridges": "Bridge abilitati",
59
60
  "enabledExchanges": "Exchange abilitati",
60
61
  "gasPrice": {
@@ -63,10 +64,7 @@
63
64
  "slow": "Lento",
64
65
  "title": "Prezzo gas"
65
66
  },
66
- "resetToDefault": "Ripristina le impostazioni predefinite",
67
67
  "routePriority": "Priorità di route",
68
- "selectEnabledBridges": "Selezionare i bridge abilitati",
69
- "selectEnabledExchanges": "Seleziona gli exchange abilitati",
70
68
  "showDestinationWallet": "Mostra il portafoglio di destinazione",
71
69
  "slippage": "Slittamento"
72
70
  },
@@ -201,7 +199,8 @@
201
199
  "highValueLoss": "Il valore dei token ricevuti è significativamente inferiore ai token scambiati più il costo della transazione.",
202
200
  "insufficientFunds": "Non hai abbastanza fondi per eseguire lo scambio.",
203
201
  "insufficientGas": "È necessario aggiungere almeno:",
204
- "rateChanged": "Il tasso di scambio è cambiato. Se procedi, confermi di accettare il nuovo tasso."
202
+ "rateChanged": "Il tasso di scambio è cambiato. Se procedi, confermi di accettare il nuovo tasso.",
203
+ "resetSettings": "Questo porterà al ripristino della priorità di route, slittamento di prezzo, prezzo del gas, bridge abilitati ed exchanges."
205
204
  },
206
205
  "title": {
207
206
  "deleteActiveSwaps": "Cancellare tutti gli scambi attivi?",
@@ -209,7 +208,8 @@
209
208
  "deleteSwapHistory": "Cancellare la cronologia degli scambi?",
210
209
  "highValueLoss": "Perdita di valore elevato",
211
210
  "insufficientGas": "Gas insufficiente",
212
- "rateChanged": "Tasso cambiato"
211
+ "rateChanged": "Tasso cambiato",
212
+ "resetSettings": "Ripristinare le impostazioni?"
213
213
  }
214
214
  }
215
215
  },
package/cjs/i18n/zh.json CHANGED
@@ -6,7 +6,6 @@
6
6
  "contactSupport": "联系我们",
7
7
  "continue": "继续",
8
8
  "copyAddress": "复制地址",
9
- "viewOnExplorer": "在区块链浏览器上查看",
10
9
  "dark": "深色模式",
11
10
  "delete": "删除",
12
11
  "disconnect": "断开连接",
@@ -19,6 +18,8 @@
19
18
  "ok": "确认",
20
19
  "okay": "确认",
21
20
  "removeSwap": "删除该兑换",
21
+ "reset": "重置",
22
+ "resetSettings": "恢复默认设置",
22
23
  "restartSwap": "重新兑换",
23
24
  "reviewGasSwap": "查看燃气费兑换",
24
25
  "reviewSwap": "查看该兑换",
@@ -27,7 +28,8 @@
27
28
  "startGasSwap": "开始兑换燃气费",
28
29
  "startSwap": "开始兑换",
29
30
  "swap": "兑换",
30
- "tryAgain": "重试"
31
+ "tryAgain": "重试",
32
+ "viewOnExplorer": "在区块链浏览器上查看"
31
33
  },
32
34
  "format": {
33
35
  "currency": "{{value, currency(currency: USD)}}",
@@ -54,7 +56,6 @@
54
56
  "title": "语言"
55
57
  },
56
58
  "settings": {
57
- "advancedPreferences": "偏好设置",
58
59
  "enabledBridges": "已选中的跨链桥",
59
60
  "enabledExchanges": "已选中的交易所",
60
61
  "gasPrice": {
@@ -63,10 +64,7 @@
63
64
  "slow": "缓慢",
64
65
  "title": "燃气费"
65
66
  },
66
- "resetToDefault": "重置为默认值",
67
67
  "routePriority": "路由优先级",
68
- "selectEnabledBridges": "选择要使用的跨链桥",
69
- "selectEnabledExchanges": "选择要使用的交易所",
70
68
  "showDestinationWallet": "显示收款钱包",
71
69
  "slippage": "滑点"
72
70
  },
@@ -201,7 +199,8 @@
201
199
  "highValueLoss": "收到的代币的价值明显低于要被兑换的代币和交易成本。",
202
200
  "insufficientFunds": "你没有足够的资金来执行这笔兑换。",
203
201
  "insufficientGas": "你至少需要:",
204
- "rateChanged": "兑换比例已经改变,如果继续兑换,您将接受新的兑换比例。"
202
+ "rateChanged": "兑换比例已经改变,如果继续兑换,您将接受新的兑换比例。",
203
+ "resetSettings": "这将重置您的路由优先级,滑点,燃气费,选中的跨链桥和链上交易所。"
205
204
  },
206
205
  "title": {
207
206
  "deleteActiveSwaps": "确定要清空正在进行的兑换记录?",
@@ -209,7 +208,8 @@
209
208
  "deleteSwapHistory": "确定要清空兑换记录?",
210
209
  "highValueLoss": "大额资金损失",
211
210
  "insufficientGas": "燃料费不足",
212
- "rateChanged": "兑换比例变动"
211
+ "rateChanged": "兑换比例变动",
212
+ "resetSettings": "确定要恢复默认设置吗?"
213
213
  }
214
214
  }
215
215
  },
@@ -24,6 +24,6 @@ const SelectChainPage = ({ formType, selectNativeToken, }) => {
24
24
  return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
25
25
  paddingLeft: 1.5,
26
26
  paddingRight: 1.5,
27
- }, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => handleClick(chain), disableRipple: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: chain.logoURI, alt: chain.name, children: chain.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: chain.name })] }, chain.id))) }) }));
27
+ }, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => handleClick(chain), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: chain.logoURI, alt: chain.name, children: chain.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: chain.name })] }, chain.id))) }) }));
28
28
  };
29
29
  exports.SelectChainPage = SelectChainPage;
@@ -46,6 +46,6 @@ const SelectEnabledToolsPage = ({ type }) => {
46
46
  return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
47
47
  paddingLeft: 1.5,
48
48
  paddingRight: 1.5,
49
- }, children: tools?.[typeKey].map((tool) => ((0, jsx_runtime_1.jsxs)(SelectEnabledToolsPage_style_1.ListItemButton, { onClick: () => handleClick(tool.key), disableRipple: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: tool.logoURI, alt: tool.name, children: tool.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: tool.name }), enabledTools?.includes(tool.key) ? ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBox, { color: "primary" })) : ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBoxOutlineBlankOutlined, {}))] }, tool.name))) }) }));
49
+ }, children: tools?.[typeKey].map((tool) => ((0, jsx_runtime_1.jsxs)(SelectEnabledToolsPage_style_1.ListItemButton, { onClick: () => handleClick(tool.key), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: tool.logoURI, alt: tool.name, children: tool.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: tool.name }), enabledTools?.includes(tool.key) ? ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBox, { color: "primary" })) : ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBoxOutlineBlankOutlined, {}))] }, tool.name))) }) }));
50
50
  };
51
51
  exports.SelectEnabledToolsPage = SelectEnabledToolsPage;
@@ -17,6 +17,6 @@ const SelectNativeTokenPage = ({ formType, }) => {
17
17
  return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
18
18
  paddingLeft: 1.5,
19
19
  paddingRight: 1.5,
20
- }, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => selectToken(chain.nativeToken.address, chain.id), disableRipple: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: chain.nativeToken, chain: chain }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: chain.nativeToken.symbol, secondary: t('swap.onChain', { chainName: chain.name }) })] }, chain.id))) }) }));
20
+ }, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => selectToken(chain.nativeToken.address, chain.id), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: chain.nativeToken, chain: chain }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: chain.nativeToken.symbol, secondary: t('swap.onChain', { chainName: chain.name }) })] }, chain.id))) }) }));
21
21
  };
22
22
  exports.SelectNativeTokenPage = SelectNativeTokenPage;
@@ -40,7 +40,7 @@ const SelectWalletPage = () => {
40
40
  return ((0, jsx_runtime_1.jsxs)(material_1.Container, { disableGutters: true, children: [(0, jsx_runtime_1.jsx)(material_1.List, { sx: {
41
41
  paddingLeft: 1.5,
42
42
  paddingRight: 1.5,
43
- }, children: wallet_management_1.supportedWallets.map((wallet) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => handleConnect(wallet), disableRipple: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: wallet.icon.src || wallet.icon, alt: wallet.name, children: wallet.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: wallet.name })] }, wallet.name))) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: walletIdentity.show, onClose: closeDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('wallet.extensionNotFound', {
43
+ }, children: wallet_management_1.supportedWallets.map((wallet) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => handleConnect(wallet), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: wallet.icon.src || wallet.icon, alt: wallet.name, children: wallet.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: wallet.name })] }, wallet.name))) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: walletIdentity.show, onClose: closeDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('wallet.extensionNotFound', {
44
44
  name: walletIdentity.wallet?.name,
45
45
  }) }) }), (0, jsx_runtime_1.jsx)(material_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: closeDialog, autoFocus: true, children: t('button.ok') }) })] })] }));
46
46
  };
@@ -20,6 +20,6 @@ const EnabledToolsButton = ({ type }) => {
20
20
  const handleClick = () => {
21
21
  navigate(utils_1.navigationRoutes[type.toLowerCase()]);
22
22
  };
23
- return ((0, jsx_runtime_1.jsxs)(EnabledToolsButton_style_1.ListItemButton, { onClick: handleClick, disableRipple: true, children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_style_1.ListItemText, { primary: t(`settings.enabled${type}`) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_style_1.ListItemText, { primary: `${enabledTools}/${tools}` }), (0, jsx_runtime_1.jsx)(icons_material_1.ChevronRight, {})] })] }));
23
+ return ((0, jsx_runtime_1.jsxs)(EnabledToolsButton_style_1.ListItemButton, { onClick: handleClick, children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_style_1.ListItemText, { primary: t(`settings.enabled${type}`) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_style_1.ListItemText, { primary: `${enabledTools}/${tools}` }), (0, jsx_runtime_1.jsx)(icons_material_1.ChevronRight, {})] })] }));
24
24
  };
25
25
  exports.EnabledToolsButton = EnabledToolsButton;
@@ -1,7 +1,6 @@
1
1
  export * from './I18nProvider';
2
2
  export * from './SDKProvider';
3
3
  export * from './SwapFormProvider';
4
- export * from './TelemetryProvider';
5
4
  export * from './ThemeProvider';
6
5
  export * from './WalletProvider';
7
6
  export * from './WidgetProvider';
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./I18nProvider"), exports);
18
18
  __exportStar(require("./SDKProvider"), exports);
19
19
  __exportStar(require("./SwapFormProvider"), exports);
20
- __exportStar(require("./TelemetryProvider"), exports);
21
20
  __exportStar(require("./ThemeProvider"), exports);
22
21
  __exportStar(require("./WalletProvider"), exports);
23
22
  __exportStar(require("./WidgetProvider"), exports);
@@ -1,3 +1,3 @@
1
- import type { Theme } from '@mui/material';
2
- export declare const getContrastAlphaColor: (theme: Theme, alpha: string | number) => string;
1
+ import type { PaletteMode, Theme } from '@mui/material';
2
+ export declare const getContrastAlphaColor: (mode: PaletteMode, alpha: string | number) => string;
3
3
  export declare const getContrastTextColor: (theme: Theme, background?: string) => "#fff" | "#000";
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getContrastTextColor = exports.getContrastAlphaColor = void 0;
4
4
  const colors_1 = require("@mui/material/colors");
5
5
  const styles_1 = require("@mui/material/styles");
6
- const getContrastAlphaColor = (theme, alpha) => theme.palette.mode === 'light'
7
- ? `rgb(0 0 0 / ${alpha})`
8
- : `rgb(255 255 255 / ${alpha})`;
6
+ const getContrastAlphaColor = (mode, alpha) => mode === 'light' ? `rgb(0 0 0 / ${alpha})` : `rgb(255 255 255 / ${alpha})`;
9
7
  exports.getContrastAlphaColor = getContrastAlphaColor;
10
8
  const getContrastTextColor = (theme, background) => (0, styles_1.getContrastRatio)(colors_1.common.white, background ?? theme.palette.primary.main) >= 3
11
9
  ? colors_1.common.white
@@ -38,7 +38,7 @@ export const ActiveSwapItem = ({ routeId, dense }) => {
38
38
  }
39
39
  };
40
40
  const ListItemComponent = dense ? ListItem : ListItemButton;
41
- return (_jsxs(ListItemComponent, { onClick: handleClick, dense: true, disableRipple: true, children: [_jsx(ListItemAvatar, { children: _jsxs(TokenAvatarGroup, { total: 2, children: [_jsx(TokenAvatar, { token: route.fromToken }), _jsx(TokenAvatar, { token: route.toToken })] }) }), _jsx(ListItemText, { sx: { margin: 0 }, disableTypography: true, primary: _jsxs(Typography, { fontWeight: 500, lineHeight: 1, sx: {
41
+ return (_jsxs(ListItemComponent, { onClick: handleClick, dense: true, disableRipple: dense, children: [_jsx(ListItemAvatar, { children: _jsxs(TokenAvatarGroup, { total: 2, children: [_jsx(TokenAvatar, { token: route.fromToken }), _jsx(TokenAvatar, { token: route.toToken })] }) }), _jsx(ListItemText, { sx: { margin: 0 }, disableTypography: true, primary: _jsxs(Typography, { fontWeight: 500, lineHeight: 1, sx: {
42
42
  display: 'flex',
43
43
  alignItems: 'center',
44
44
  marginLeft: 2,
@@ -8,7 +8,7 @@ export const ListItemButton = styled(MuiListItemButton)(({ theme }) => ({
8
8
  paddingRight: theme.spacing(1.5),
9
9
  height: 64,
10
10
  '&:hover': {
11
- backgroundColor: getContrastAlphaColor(theme, '4%'),
11
+ backgroundColor: getContrastAlphaColor(theme.palette.mode, '4%'),
12
12
  },
13
13
  }));
14
14
  export const ListItem = styled(MuiListItem, {
@@ -4,7 +4,6 @@ type CardVariant = 'default' | 'selected' | 'error';
4
4
  export type CardProps = {
5
5
  variant?: CardVariant;
6
6
  selectionColor?: 'primary' | 'secondary';
7
- dense?: boolean;
8
7
  indented?: boolean;
9
8
  onClick?: MouseEventHandler<HTMLDivElement>;
10
9
  pointerEvents?: 'auto' | 'none';
@@ -19,7 +18,6 @@ export declare const Card: import("@emotion/styled").StyledComponent<import("@mu
19
18
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
20
19
  variant?: CardVariant | undefined;
21
20
  selectionColor?: "primary" | "secondary" | undefined;
22
- dense?: boolean | undefined;
23
21
  indented?: boolean | undefined;
24
22
  onClick?: MouseEventHandler<HTMLDivElement> | undefined;
25
23
  pointerEvents?: "none" | "auto" | undefined;
@@ -9,14 +9,8 @@ const getBackgroundColor = (theme, variant, selectionColor) => variant === 'sele
9
9
  : alpha(theme.palette.secondary.main, theme.palette.mode === 'light' ? 0.08 : 0.12)
10
10
  : theme.palette.background.paper;
11
11
  export const Card = styled(Box, {
12
- shouldForwardProp: (prop) => ![
13
- 'dense',
14
- 'variant',
15
- 'indented',
16
- 'selectionColor',
17
- 'pointerEvents',
18
- ].includes(prop),
19
- })(({ theme, variant, selectionColor = 'primary', dense, indented, pointerEvents, onClick, }) => {
12
+ shouldForwardProp: (prop) => !['variant', 'indented', 'selectionColor', 'pointerEvents'].includes(prop),
13
+ })(({ theme, variant, selectionColor = 'primary', indented, pointerEvents, onClick, }) => {
20
14
  const backgroundColor = getBackgroundColor(theme, variant, selectionColor);
21
15
  const backgroundHoverColor = onClick
22
16
  ? theme.palette.mode === 'light'