@lifi/widget 2.5.1 → 2.6.1

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 (57) hide show
  1. package/AppDrawer.style.d.ts +1 -1
  2. package/cjs/AppDrawer.style.d.ts +1 -1
  3. package/cjs/components/BaseTransactionButton/BaseTransactionButton.d.ts +3 -0
  4. package/cjs/components/{DefaultTransactionButton/DefaultTransactionButton.js → BaseTransactionButton/BaseTransactionButton.js} +3 -3
  5. package/cjs/components/BaseTransactionButton/index.d.ts +2 -0
  6. package/cjs/components/{DefaultTransactionButton → BaseTransactionButton}/index.js +3 -3
  7. package/cjs/components/{DefaultTransactionButton → BaseTransactionButton}/types.d.ts +1 -1
  8. package/cjs/components/Card/CardLabel.d.ts +1 -1
  9. package/cjs/components/Card/CardTitle.d.ts +1 -1
  10. package/cjs/components/RouteCard/RouteCard.style.d.ts +1 -1
  11. package/cjs/components/Step/CircularProgress.style.js +33 -31
  12. package/cjs/components/Token/Token.style.d.ts +1 -1
  13. package/cjs/config/theme.js +9 -9
  14. package/cjs/config/version.d.ts +1 -1
  15. package/cjs/config/version.js +1 -1
  16. package/cjs/hooks/useNavigateBack.js +2 -0
  17. package/cjs/i18n/de.json +2 -1
  18. package/cjs/i18n/fr.json +2 -1
  19. package/cjs/i18n/zh.json +2 -1
  20. package/cjs/pages/MainPage/ReviewButton.js +2 -2
  21. package/cjs/pages/TransactionPage/StartTransactionButton.js +2 -2
  22. package/cjs/pages/TransactionPage/TransactionPage.js +7 -0
  23. package/cjs/pages/TransactionPage/types.d.ts +2 -2
  24. package/cjs/types/events.d.ts +3 -1
  25. package/cjs/types/events.js +1 -0
  26. package/components/BaseTransactionButton/BaseTransactionButton.d.ts +3 -0
  27. package/components/{DefaultTransactionButton/DefaultTransactionButton.js → BaseTransactionButton/BaseTransactionButton.js} +1 -1
  28. package/components/BaseTransactionButton/index.d.ts +2 -0
  29. package/components/BaseTransactionButton/index.js +2 -0
  30. package/components/{DefaultTransactionButton → BaseTransactionButton}/types.d.ts +1 -1
  31. package/components/Card/CardLabel.d.ts +1 -1
  32. package/components/Card/CardTitle.d.ts +1 -1
  33. package/components/RouteCard/RouteCard.style.d.ts +1 -1
  34. package/components/Step/CircularProgress.style.js +33 -31
  35. package/components/Token/Token.style.d.ts +1 -1
  36. package/config/theme.js +10 -10
  37. package/config/version.d.ts +1 -1
  38. package/config/version.js +1 -1
  39. package/hooks/useNavigateBack.js +2 -0
  40. package/i18n/de.json +2 -1
  41. package/i18n/fr.json +2 -1
  42. package/i18n/zh.json +2 -1
  43. package/package.json +9 -9
  44. package/pages/MainPage/ReviewButton.js +2 -2
  45. package/pages/TransactionPage/StartTransactionButton.js +2 -2
  46. package/pages/TransactionPage/TransactionPage.js +7 -0
  47. package/pages/TransactionPage/types.d.ts +2 -2
  48. package/tsconfig.cjs.tsbuildinfo +1 -1
  49. package/types/events.d.ts +3 -1
  50. package/types/events.js +1 -0
  51. package/cjs/components/DefaultTransactionButton/DefaultTransactionButton.d.ts +0 -3
  52. package/cjs/components/DefaultTransactionButton/index.d.ts +0 -2
  53. package/components/DefaultTransactionButton/DefaultTransactionButton.d.ts +0 -3
  54. package/components/DefaultTransactionButton/index.d.ts +0 -2
  55. package/components/DefaultTransactionButton/index.js +0 -2
  56. /package/cjs/components/{DefaultTransactionButton → BaseTransactionButton}/types.js +0 -0
  57. /package/components/{DefaultTransactionButton → BaseTransactionButton}/types.js +0 -0
@@ -10,7 +10,7 @@ export declare const DrawerButton: import("@emotion/styled").StyledComponent<imp
10
10
  }, {}, {}>;
11
11
  export declare const DrawerButtonTypography: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
12
12
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
13
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
13
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
14
14
  export declare const CloseButtonLayout: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
15
15
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
16
16
  }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -10,7 +10,7 @@ export declare const DrawerButton: import("@emotion/styled").StyledComponent<imp
10
10
  }, {}, {}>;
11
11
  export declare const DrawerButtonTypography: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
12
12
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
13
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
13
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
14
14
  export declare const CloseButtonLayout: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
15
15
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
16
16
  }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { BaseTransactionButtonProps } from './types';
3
+ export declare const BaseTransactionButton: React.FC<BaseTransactionButtonProps>;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultTransactionButton = void 0;
3
+ exports.BaseTransactionButton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const lab_1 = require("@mui/lab");
6
6
  const react_i18next_1 = require("react-i18next");
7
7
  const react_router_dom_1 = require("react-router-dom");
8
8
  const providers_1 = require("../../providers");
9
9
  const utils_1 = require("../../utils");
10
- const DefaultTransactionButton = ({ onClick, text, disabled, loading }) => {
10
+ const BaseTransactionButton = ({ onClick, text, disabled, loading, }) => {
11
11
  const { t } = (0, react_i18next_1.useTranslation)();
12
12
  const navigate = (0, react_router_dom_1.useNavigate)();
13
13
  const { walletManagement } = (0, providers_1.useWidgetConfig)();
@@ -33,4 +33,4 @@ const DefaultTransactionButton = ({ onClick, text, disabled, loading }) => {
33
33
  };
34
34
  return ((0, jsx_runtime_1.jsx)(lab_1.LoadingButton, { variant: "contained", color: "primary", onClick: handleClick, disabled: disabled, loading: loading, loadingPosition: "center", fullWidth: true, children: getButtonText() }));
35
35
  };
36
- exports.DefaultTransactionButton = DefaultTransactionButton;
36
+ exports.BaseTransactionButton = BaseTransactionButton;
@@ -0,0 +1,2 @@
1
+ export { BaseTransactionButton } from './BaseTransactionButton';
2
+ export * from './types';
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.DefaultTransactionButton = void 0;
18
- var DefaultTransactionButton_1 = require("./DefaultTransactionButton");
19
- Object.defineProperty(exports, "DefaultTransactionButton", { enumerable: true, get: function () { return DefaultTransactionButton_1.DefaultTransactionButton; } });
17
+ exports.BaseTransactionButton = void 0;
18
+ var BaseTransactionButton_1 = require("./BaseTransactionButton");
19
+ Object.defineProperty(exports, "BaseTransactionButton", { enumerable: true, get: function () { return BaseTransactionButton_1.BaseTransactionButton; } });
20
20
  __exportStar(require("./types"), exports);
@@ -1,4 +1,4 @@
1
- export interface DefaultTransactionButtonProps {
1
+ export interface BaseTransactionButtonProps {
2
2
  onClick?(): void;
3
3
  text?: string;
4
4
  disabled?: boolean;
@@ -6,6 +6,6 @@ export declare const CardLabel: import("@emotion/styled").StyledComponent<import
6
6
  }, {}, {}>;
7
7
  export declare const CardLabelTypography: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
8
8
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
9
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
9
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
10
10
  type?: "icon" | undefined;
11
11
  }, {}, {}>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const CardTitle: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
5
5
  required?: boolean | undefined;
6
6
  }, {}, {}>;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export declare const IconTypography: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
4
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -4,20 +4,6 @@ exports.CircularProgressPending = exports.CircularIcon = void 0;
4
4
  const material_1 = require("@mui/material");
5
5
  const CircularProgress_1 = require("@mui/material/CircularProgress");
6
6
  const styles_1 = require("@mui/material/styles");
7
- const circleAnimation = (0, styles_1.keyframes)({
8
- '0%': {
9
- strokeDashoffset: 129,
10
- transform: 'rotate(0)',
11
- },
12
- '50%': {
13
- strokeDashoffset: 56,
14
- transform: 'rotate(45deg)',
15
- },
16
- '100%': {
17
- strokeDashoffset: 129,
18
- transform: 'rotate(360deg)',
19
- },
20
- });
21
7
  const getStatusColor = (theme, status, substatus) => {
22
8
  switch (status) {
23
9
  case 'ACTION_REQUIRED':
@@ -51,20 +37,36 @@ exports.CircularIcon = (0, styles_1.styled)(material_1.Box, {
51
37
  height: 32,
52
38
  borderRadius: '50%',
53
39
  }));
54
- exports.CircularProgressPending = (0, styles_1.styled)(material_1.CircularProgress)(({ theme }) => ({
55
- color: theme.palette.mode === 'light'
56
- ? theme.palette.primary.main
57
- : theme.palette.primary.light,
58
- animationDuration: '3s',
59
- position: 'absolute',
60
- left: '-2px',
61
- [`.${CircularProgress_1.circularProgressClasses.circle}`]: {
62
- animationDuration: '2s',
63
- animationTimingFunction: 'linear',
64
- animationName: circleAnimation,
65
- strokeDasharray: 129,
66
- strokeDashoffset: 129,
67
- strokeLinecap: 'round',
68
- transformOrigin: '100% 100%',
69
- },
70
- }));
40
+ const circleAnimation = (0, styles_1.keyframes) `
41
+ 0% {
42
+ stroke-dashoffset: 129;
43
+ transform: rotate(0);
44
+ }
45
+ 50% {
46
+ stroke-dashoffset: 56;
47
+ transform: rotate(45deg);
48
+ };
49
+ 100% {
50
+ stroke-dashoffset: 129;
51
+ transform: rotate(360deg);
52
+ }
53
+ `;
54
+ // This `styled()` function invokes keyframes. `styled-components` only supports keyframes
55
+ // in string templates. Do not convert these styles in JS object as it will break.
56
+ exports.CircularProgressPending = (0, styles_1.styled)(material_1.CircularProgress) `
57
+ color: ${({ theme }) => theme.palette.mode === 'light'
58
+ ? theme.palette.primary.main
59
+ : theme.palette.primary.light};
60
+ animation-duration: '3s';
61
+ position: 'absolute';
62
+ left: '-2px';
63
+ .${CircularProgress_1.circularProgressClasses.circle} {
64
+ animation-duration: '2s';
65
+ animation-timing-function: 'linear';
66
+ animation-name: ${circleAnimation};
67
+ stroke-dasharray: 129;
68
+ stroke-dashoffset: 129;
69
+ stroke-linecap: 'round';
70
+ transform-origin: '100% 100%';
71
+ }
72
+ `;
@@ -6,7 +6,7 @@ export declare const TextSecondaryContainer: import("@emotion/styled").StyledCom
6
6
  }, {}, {}>;
7
7
  export declare const TextSecondary: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
8
8
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
9
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
9
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
10
10
  connected?: boolean | undefined;
11
11
  dot?: boolean | undefined;
12
12
  }, {}, {}>;
@@ -120,15 +120,15 @@ const createTheme = (mode, theme = {}) => {
120
120
  },
121
121
  MuiButtonBase: {
122
122
  styleOverrides: {
123
- root: {
124
- [`& .${ButtonBase_1.touchRippleClasses.ripple}.${ButtonBase_1.touchRippleClasses.rippleVisible}`]: {
125
- animationName: `${enterKeyframe}`,
126
- },
127
- [`& .${ButtonBase_1.touchRippleClasses.ripple}.${ButtonBase_1.touchRippleClasses.rippleVisible}`]: {
128
- opacity: 0.1,
129
- animationName: `${enterKeyframe}`,
130
- },
131
- },
123
+ // This `css()` function invokes keyframes. `styled-components` only supports keyframes
124
+ // in string templates. Do not convert these styles in JS object as it will break.
125
+ root: (0, styles_1.css) `
126
+ &
127
+ .${ButtonBase_1.touchRippleClasses.ripple}.${ButtonBase_1.touchRippleClasses.rippleVisible} {
128
+ opacity: 0.1;
129
+ animation-name: ${enterKeyframe};
130
+ }
131
+ `,
132
132
  },
133
133
  },
134
134
  MuiButton: {
@@ -1,2 +1,2 @@
1
1
  export declare const name = "@lifi/widget";
2
- export declare const version = "2.5.1";
2
+ export declare const version = "2.6.1";
@@ -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 = '2.5.1';
5
+ exports.version = '2.6.1';
@@ -6,7 +6,9 @@ const react_router_dom_1 = require("react-router-dom");
6
6
  const useNavigateBack = () => {
7
7
  const navigate = (0, react_router_dom_1.useNavigate)();
8
8
  const navigateBack = (0, react_1.useCallback)(() => {
9
+ // TODO: find a better router with nested memory routers support
9
10
  // https://github.com/remix-run/react-router/pull/9112
11
+ // https://github.com/remix-run/react-router/discussions/9601
10
12
  //
11
13
  // if (window.history.length > 2) {
12
14
  navigate(-1);
package/cjs/i18n/de.json CHANGED
@@ -255,7 +255,8 @@
255
255
  },
256
256
  "routePriority": "Routenpriorität",
257
257
  "showDestinationWallet": "Ziel Wallet anzeigen",
258
- "slippage": "Slippage"
258
+ "slippage": "Slippage",
259
+ "resetSettings": "Sie verwenden benutzerdefinierte Einstellungen, die die Anzahl der verfügbaren Routen begrenzen."
259
260
  },
260
261
  "wallet": {
261
262
  "extensionNotFound": "Bitte stellen Sie sicher, dass nur die Browsererweiterung {{name}} aktiv ist, bevor Sie dieses Wallet auswählen."
package/cjs/i18n/fr.json CHANGED
@@ -255,7 +255,8 @@
255
255
  },
256
256
  "routePriority": "Priorité de l'itinéraire",
257
257
  "showDestinationWallet": "Afficher le portefeuille de destination",
258
- "slippage": "Effet de glissement"
258
+ "slippage": "Effet de glissement",
259
+ "resetSettings": "Vous utilisez des paramètres personnalisés limitant le nombre de routes disponibles."
259
260
  },
260
261
  "wallet": {
261
262
  "extensionNotFound": "Veuillez vous assurer que seule l'extension de navigateur {{name}} est active avant de choisir ce portefeuille."
package/cjs/i18n/zh.json CHANGED
@@ -255,7 +255,8 @@
255
255
  },
256
256
  "routePriority": "路由优先级",
257
257
  "showDestinationWallet": "显示收款钱包",
258
- "slippage": "滑点"
258
+ "slippage": "滑点",
259
+ "resetSettings": "您正在使用自定义设置过滤可用路由。"
259
260
  },
260
261
  "wallet": {
261
262
  "extensionNotFound": "在选择钱包之前,请确保只有{{name}} 浏览器的扩展应用处于激活状态。"
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_hook_form_1 = require("react-hook-form");
6
6
  const react_i18next_1 = require("react-i18next");
7
7
  const react_router_dom_1 = require("react-router-dom");
8
- const DefaultTransactionButton_1 = require("../../components/DefaultTransactionButton");
8
+ const BaseTransactionButton_1 = require("../../components/BaseTransactionButton");
9
9
  const hooks_1 = require("../../hooks");
10
10
  const providers_1 = require("../../providers");
11
11
  const stores_1 = require("../../stores");
@@ -57,6 +57,6 @@ const ReviewButton = () => {
57
57
  }
58
58
  }
59
59
  };
60
- return ((0, jsx_runtime_1.jsx)(DefaultTransactionButton_1.DefaultTransactionButton, { text: getButtonText(), onClick: handleClick, disabled: currentRoute && (isValidating || !isValid) }));
60
+ return ((0, jsx_runtime_1.jsx)(BaseTransactionButton_1.BaseTransactionButton, { text: getButtonText(), onClick: handleClick, disabled: currentRoute && (isValidating || !isValid) }));
61
61
  };
62
62
  exports.ReviewButton = ReviewButton;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StartInsurableTransactionButton = exports.StartTransactionButton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const DefaultTransactionButton_1 = require("../../components/DefaultTransactionButton");
5
+ const BaseTransactionButton_1 = require("../../components/BaseTransactionButton");
6
6
  const hooks_1 = require("../../hooks");
7
7
  const providers_1 = require("../../providers");
8
8
  const stores_1 = require("../../stores");
@@ -12,7 +12,7 @@ const StartTransactionButton = ({ onClick, route, text, loading, }) => {
12
12
  const { insufficientGas, isInitialLoading: isGasSufficiencyLoading } = (0, hooks_1.useGasSufficiency)(route);
13
13
  const { insufficientFromToken, isInitialLoading: isFromTokenSufficiencyLoading, } = (0, hooks_1.useFromTokenSufficiency)(route);
14
14
  const shouldDisableButton = !isMultisigSigner && (insufficientFromToken || !!insufficientGas?.length);
15
- return ((0, jsx_runtime_1.jsx)(DefaultTransactionButton_1.DefaultTransactionButton, { onClick: onClick, text: text, disabled: shouldDisableButton, loading: isFromTokenSufficiencyLoading || isGasSufficiencyLoading || loading }));
15
+ return ((0, jsx_runtime_1.jsx)(BaseTransactionButton_1.BaseTransactionButton, { onClick: onClick, text: text, disabled: shouldDisableButton, loading: isFromTokenSufficiencyLoading || isGasSufficiencyLoading || loading }));
16
16
  };
17
17
  exports.StartTransactionButton = StartTransactionButton;
18
18
  const StartInsurableTransactionButton = ({ onClick, text, route, loading, disabled, insurableRouteId }) => {
@@ -52,6 +52,13 @@ const TransactionPage = () => {
52
52
  : t(`header.${transactionType.toLowerCase()}`));
53
53
  }
54
54
  }, [headerStoreContext, route, status, subvariant, t]);
55
+ (0, react_1.useEffect)(() => {
56
+ if (status === stores_1.RouteExecutionStatus.Idle) {
57
+ emitter.emit(events_1.WidgetEvent.ReviewTransactionPageEntered, route);
58
+ }
59
+ // We want to emit event only when the page is mounted
60
+ // eslint-disable-next-line react-hooks/exhaustive-deps
61
+ }, []);
55
62
  if (!route) {
56
63
  return null;
57
64
  }
@@ -1,6 +1,6 @@
1
1
  import type { Route } from '@lifi/sdk';
2
- import type { DefaultTransactionButtonProps } from '../../components/DefaultTransactionButton';
3
- export interface StartTransactionButtonProps extends DefaultTransactionButtonProps {
2
+ import type { BaseTransactionButtonProps } from '../../components/BaseTransactionButton';
3
+ export interface StartTransactionButtonProps extends BaseTransactionButtonProps {
4
4
  route?: Route;
5
5
  insurableRouteId: string;
6
6
  }
@@ -8,7 +8,8 @@ export declare enum WidgetEvent {
8
8
  RouteContactSupport = "routeContactSupport",
9
9
  SourceChainTokenSelected = "sourceChainTokenSelected",
10
10
  DestinationChainTokenSelected = "destinationChainTokenSelected",
11
- SendToWalletToggled = "sendToWalletToggled"
11
+ SendToWalletToggled = "sendToWalletToggled",
12
+ ReviewTransactionPageEntered = "reviewTransactionPageEntered"
12
13
  }
13
14
  export type WidgetEvents = {
14
15
  routeExecutionStarted: Route;
@@ -20,6 +21,7 @@ export type WidgetEvents = {
20
21
  sourceChainTokenSelected: ChainTokenSelected;
21
22
  destinationChainTokenSelected: ChainTokenSelected;
22
23
  sendToWalletToggled: boolean;
24
+ reviewTransactionPageEntered?: Route;
23
25
  };
24
26
  export interface RouteContactSupport {
25
27
  supportId?: string;
@@ -12,4 +12,5 @@ var WidgetEvent;
12
12
  WidgetEvent["SourceChainTokenSelected"] = "sourceChainTokenSelected";
13
13
  WidgetEvent["DestinationChainTokenSelected"] = "destinationChainTokenSelected";
14
14
  WidgetEvent["SendToWalletToggled"] = "sendToWalletToggled";
15
+ WidgetEvent["ReviewTransactionPageEntered"] = "reviewTransactionPageEntered";
15
16
  })(WidgetEvent || (exports.WidgetEvent = WidgetEvent = {}));
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { BaseTransactionButtonProps } from './types';
3
+ export declare const BaseTransactionButton: React.FC<BaseTransactionButtonProps>;
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
4
4
  import { useNavigate } from 'react-router-dom';
5
5
  import { useWallet, useWidgetConfig } from '../../providers';
6
6
  import { navigationRoutes } from '../../utils';
7
- export const DefaultTransactionButton = ({ onClick, text, disabled, loading }) => {
7
+ export const BaseTransactionButton = ({ onClick, text, disabled, loading, }) => {
8
8
  const { t } = useTranslation();
9
9
  const navigate = useNavigate();
10
10
  const { walletManagement } = useWidgetConfig();
@@ -0,0 +1,2 @@
1
+ export { BaseTransactionButton } from './BaseTransactionButton';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export { BaseTransactionButton } from './BaseTransactionButton';
2
+ export * from './types';
@@ -1,4 +1,4 @@
1
- export interface DefaultTransactionButtonProps {
1
+ export interface BaseTransactionButtonProps {
2
2
  onClick?(): void;
3
3
  text?: string;
4
4
  disabled?: boolean;
@@ -6,6 +6,6 @@ export declare const CardLabel: import("@emotion/styled").StyledComponent<import
6
6
  }, {}, {}>;
7
7
  export declare const CardLabelTypography: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
8
8
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
9
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
9
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
10
10
  type?: "icon" | undefined;
11
11
  }, {}, {}>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const CardTitle: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
5
5
  required?: boolean | undefined;
6
6
  }, {}, {}>;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export declare const IconTypography: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "children" | "sx" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
4
+ }, "className" | "style" | "classes" | "children" | "sx" | "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" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "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" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,20 +1,6 @@
1
1
  import { Box, CircularProgress as MuiCircularProgress } from '@mui/material';
2
2
  import { circularProgressClasses } from '@mui/material/CircularProgress';
3
3
  import { alpha, keyframes, styled } from '@mui/material/styles';
4
- const circleAnimation = keyframes({
5
- '0%': {
6
- strokeDashoffset: 129,
7
- transform: 'rotate(0)',
8
- },
9
- '50%': {
10
- strokeDashoffset: 56,
11
- transform: 'rotate(45deg)',
12
- },
13
- '100%': {
14
- strokeDashoffset: 129,
15
- transform: 'rotate(360deg)',
16
- },
17
- });
18
4
  const getStatusColor = (theme, status, substatus) => {
19
5
  switch (status) {
20
6
  case 'ACTION_REQUIRED':
@@ -48,20 +34,36 @@ export const CircularIcon = styled(Box, {
48
34
  height: 32,
49
35
  borderRadius: '50%',
50
36
  }));
51
- export const CircularProgressPending = styled(MuiCircularProgress)(({ theme }) => ({
52
- color: theme.palette.mode === 'light'
53
- ? theme.palette.primary.main
54
- : theme.palette.primary.light,
55
- animationDuration: '3s',
56
- position: 'absolute',
57
- left: '-2px',
58
- [`.${circularProgressClasses.circle}`]: {
59
- animationDuration: '2s',
60
- animationTimingFunction: 'linear',
61
- animationName: circleAnimation,
62
- strokeDasharray: 129,
63
- strokeDashoffset: 129,
64
- strokeLinecap: 'round',
65
- transformOrigin: '100% 100%',
66
- },
67
- }));
37
+ const circleAnimation = keyframes `
38
+ 0% {
39
+ stroke-dashoffset: 129;
40
+ transform: rotate(0);
41
+ }
42
+ 50% {
43
+ stroke-dashoffset: 56;
44
+ transform: rotate(45deg);
45
+ };
46
+ 100% {
47
+ stroke-dashoffset: 129;
48
+ transform: rotate(360deg);
49
+ }
50
+ `;
51
+ // This `styled()` function invokes keyframes. `styled-components` only supports keyframes
52
+ // in string templates. Do not convert these styles in JS object as it will break.
53
+ export const CircularProgressPending = styled(MuiCircularProgress) `
54
+ color: ${({ theme }) => theme.palette.mode === 'light'
55
+ ? theme.palette.primary.main
56
+ : theme.palette.primary.light};
57
+ animation-duration: '3s';
58
+ position: 'absolute';
59
+ left: '-2px';
60
+ .${circularProgressClasses.circle} {
61
+ animation-duration: '2s';
62
+ animation-timing-function: 'linear';
63
+ animation-name: ${circleAnimation};
64
+ stroke-dasharray: 129;
65
+ stroke-dashoffset: 129;
66
+ stroke-linecap: 'round';
67
+ transform-origin: '100% 100%';
68
+ }
69
+ `;