@funkit/connect 5.1.1 → 5.1.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 (67) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/{chunk-SPLTPSN6.js → chunk-IDAA2OY6.js} +9 -1
  3. package/dist/{chunk-ZX3JBDYE.js → chunk-L55ALBJE.js} +9 -1
  4. package/dist/components/Box/Box.d.ts +43 -43
  5. package/dist/components/Dialog/Dialog.d.ts +2 -3
  6. package/dist/components/Dropdown/BaseActiveDropdownItem.d.ts +6 -3
  7. package/dist/components/Dropdown/BaseDropdown.d.ts +4 -9
  8. package/dist/components/Dropdown/BaseDropdownItem.d.ts +1 -1
  9. package/dist/components/Dropdown/ChainDropdown.d.ts +2 -1
  10. package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +2 -1
  11. package/dist/components/Dropdown/TokenDropdown.d.ts +3 -1
  12. package/dist/components/FunAlert/FunAlert.d.ts +3 -1
  13. package/dist/components/FunAsset/FunAssetItem.d.ts +1 -3
  14. package/dist/components/FunBadge/FunBadge.d.ts +14 -4
  15. package/dist/components/FunButton/FunButton.css.d.ts +2 -1
  16. package/dist/components/FunButton/FunLinkButton.d.ts +11 -8
  17. package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +2 -1
  18. package/dist/components/FunTooltip/FunTooltip.d.ts +2 -2
  19. package/dist/components/Icons/New/PercentageIcon.d.ts +2 -0
  20. package/dist/components/Icons/StatusIcons.d.ts +1 -0
  21. package/dist/components/QRCode/QRCodeSkeletonLoader.d.ts +1 -1
  22. package/dist/components/SolanaDepositAlert/SolanaDepositAlert.d.ts +6 -0
  23. package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +4 -3
  24. package/dist/consts/checkout.d.ts +4 -2
  25. package/dist/css/sprinkles.css.d.ts +55 -43
  26. package/dist/domains/asset.d.ts +12 -1
  27. package/dist/domains/checkoutRecipient.d.ts +6 -0
  28. package/dist/hooks/useTokenTransfer.d.ts +3 -2
  29. package/dist/index.css +2653 -2269
  30. package/dist/index.d.ts +7 -2
  31. package/dist/index.js +923 -705
  32. package/dist/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.d.ts +0 -1
  33. package/dist/modals/CheckoutModal/SelectAsset.d.ts +2 -0
  34. package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +8 -2
  35. package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -2
  36. package/dist/providers/AuthenticationContext.d.ts +1 -2
  37. package/dist/providers/FunkitCheckoutContext.d.ts +4 -4
  38. package/dist/providers/FunkitConfigContext.d.ts +1 -0
  39. package/dist/providers/FunkitMoonpayProvider.d.ts +2 -1
  40. package/dist/providers/FunkitThemeProvider.d.ts +18 -0
  41. package/dist/themes/darkTheme.js +1 -1
  42. package/dist/themes/lightTheme.js +1 -1
  43. package/dist/utils/consts.d.ts +1 -0
  44. package/dist/utils/flags/config.d.ts +9 -15
  45. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  46. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  47. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  49. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  50. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  51. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  52. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  53. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  54. package/dist/wallets/walletConnectors/index.js +49 -49
  55. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  56. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  57. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  58. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  59. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  60. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  61. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  62. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  63. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  64. package/package.json +5 -5
  65. package/dist/components/FunAsset/FunAssetBadge.d.ts +0 -16
  66. package/dist/components/FunNotificationBanner/FunNotificationBannerSummary.css.d.ts +0 -1
  67. package/dist/components/FunNotificationBanner/FunNotificationBannerSummary.d.ts +0 -7
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { type BoxProps } from '../Box/Box';
3
3
  interface BaseDropdownItemProps {
4
4
  iconComponent?: React.ReactNode;
5
- label: string;
5
+ label: React.ReactNode;
6
6
  id: string;
7
7
  onClick?: (id: string) => void;
8
8
  isSelected?: boolean;
@@ -15,6 +15,7 @@ interface ChainDropdownProps {
15
15
  openDropdownBackgroundColor?: BaseDropdownProps['openDropdownBackgroundColor'];
16
16
  dropdownItemBackgroundColor?: BaseDropdownProps['dropdownItemBackgroundColor'];
17
17
  size?: BaseActiveDropdownItemProps['size'];
18
+ isLoading?: BaseDropdownProps['isLoading'];
18
19
  }
19
- export declare const ChainDropdown: ({ assets, chainIds: chains, selectedChainId, selectedToken, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, dropdownItemBackgroundColor, openDropdownBoxShadow, }: ChainDropdownProps) => React.JSX.Element;
20
+ export declare const ChainDropdown: ({ assets, chainIds: chains, selectedChainId, selectedToken, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, dropdownItemBackgroundColor, openDropdownBoxShadow, isLoading, }: ChainDropdownProps) => React.JSX.Element;
20
21
  export {};
@@ -5,6 +5,7 @@ interface ReceiveTokenDropdownProps {
5
5
  tokens: DynamicTargetAssetCandidate[];
6
6
  onTokenSelected: (token: DynamicTargetAssetCandidate) => void;
7
7
  defaultSelectedToken?: string;
8
+ label?: string;
8
9
  }
9
- declare const ReceiveTokenDropdown: ({ tokens, chainId, defaultSelectedToken, onTokenSelected, }: ReceiveTokenDropdownProps) => React.JSX.Element;
10
+ declare const ReceiveTokenDropdown: ({ tokens, chainId, defaultSelectedToken, onTokenSelected, label, }: ReceiveTokenDropdownProps) => React.JSX.Element;
10
11
  export default ReceiveTokenDropdown;
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import type { TokenTransferSourceChainsAndAssets } from '~/modals/CheckoutModal/TransferToken/TransferToken';
3
+ import { type BaseDropdownProps } from './BaseDropdown';
3
4
  interface TokenDropdownProps {
4
5
  selectedChainId: number;
5
6
  assets: TokenTransferSourceChainsAndAssets;
6
7
  onTokenSelected: (token: string, chainId?: number) => void;
7
8
  defaultSelectedToken?: string;
9
+ isLoading?: BaseDropdownProps['isLoading'];
8
10
  }
9
- export declare const TokenDropdown: ({ assets, selectedChainId, defaultSelectedToken, onTokenSelected, }: TokenDropdownProps) => React.JSX.Element;
11
+ export declare const TokenDropdown: ({ assets, selectedChainId, defaultSelectedToken, onTokenSelected, isLoading, }: TokenDropdownProps) => React.JSX.Element;
10
12
  export {};
@@ -1,9 +1,11 @@
1
1
  import React, { type ReactNode } from 'react';
2
+ import { type BoxProps } from '../Box/Box';
2
3
  interface FunAlertProps {
3
4
  icon?: ReactNode;
4
5
  description: ReactNode;
5
6
  type?: 'info' | 'error';
6
7
  verticalAlignment?: 'top' | 'center';
8
+ paddingX?: BoxProps['paddingX'];
7
9
  }
8
- export declare function FunAlert({ icon, description, type, verticalAlignment, }: FunAlertProps): React.JSX.Element;
10
+ export declare function FunAlert({ icon, description, type, verticalAlignment, paddingX, }: FunAlertProps): React.JSX.Element;
9
11
  export {};
@@ -1,14 +1,12 @@
1
1
  import React from 'react';
2
2
  import type { AssetHoldingsItem } from '~/utils/assets';
3
- import { type BadgeColors } from '../FunAsset/FunAssetBadge';
4
3
  interface FunAssetItemProps {
5
4
  asset: AssetHoldingsItem;
6
5
  isActive?: boolean;
7
6
  isDisabled?: boolean;
8
- badgeColors?: BadgeColors;
9
7
  badgeText: string | null;
10
8
  onClick: () => void;
11
9
  }
12
- export declare const FunAssetItem: ({ asset, isActive, isDisabled, badgeColors, badgeText, onClick, }: FunAssetItemProps) => React.JSX.Element;
10
+ export declare const FunAssetItem: ({ asset, isActive, isDisabled, badgeText, onClick, }: FunAssetItemProps) => React.JSX.Element;
13
11
  export declare function FunAssetItemSkeleton(): React.JSX.Element;
14
12
  export {};
@@ -1,12 +1,22 @@
1
1
  import React from 'react';
2
2
  import { type BoxProps } from '../Box/Box';
3
+ import { type TextProps } from '../Text/Text';
3
4
  interface FunBadgeProps {
4
5
  children: React.ReactNode;
5
- paddingX?: BoxProps['paddingX'];
6
+ paddingLeft?: BoxProps['paddingLeft'];
7
+ paddingRight?: BoxProps['paddingRight'];
6
8
  paddingY?: BoxProps['paddingY'];
7
- borderRadius?: BoxProps['borderRadius'];
8
9
  background?: BoxProps['background'];
9
- color?: BoxProps['color'];
10
+ borderRadius?: BoxProps['borderRadius'];
11
+ borderColor?: BoxProps['borderColor'];
12
+ color?: TextProps['color'];
13
+ weight?: TextProps['weight'];
14
+ iconSrc?: string;
15
+ shadow?: string;
16
+ }
17
+ export declare function FunBadge({ children, background, color, weight, paddingLeft, paddingRight, paddingY, borderRadius, borderColor, shadow, iconSrc, }: FunBadgeProps): React.JSX.Element;
18
+ interface SolanaBadgeProps {
19
+ withIcon?: boolean;
10
20
  }
11
- export declare function FunBadge({ children, background, color, borderRadius, paddingY, paddingX, }: FunBadgeProps): React.JSX.Element;
21
+ export declare const SolanaBadge: ({ withIcon }: SolanaBadgeProps) => React.JSX.Element;
12
22
  export {};
@@ -1,6 +1,7 @@
1
- export declare const funLinkButtonStyle: string;
2
1
  export declare const transitionStyles: string;
3
2
  export declare const pressedStyles: string;
3
+ export declare const accentLinkStyle: string;
4
+ export declare const underlineLinkStyle: string;
4
5
  export declare const funButtonClickableStyle: string;
5
6
  export declare const funButtonNonClickableStyle: string;
6
7
  export declare const funButtonDisabledStyle: string;
@@ -1,14 +1,17 @@
1
1
  import React from 'react';
2
2
  import { type TextProps } from '../Text/Text';
3
- /**
4
- * A button that looks like a link. Behavior can be customized with `href` (anchor) or `onClick` (button).
5
- */
6
- export declare function FunLinkButton({ color, inline, hasPadding, href, onClick, text, textProps, }: {
7
- color?: TextProps['color'];
8
- hasPadding?: boolean;
3
+ interface FunLinkButtonProps {
9
4
  href?: string;
10
5
  inline?: boolean;
11
6
  onClick?: () => void;
12
7
  text: string;
13
- textProps?: Omit<TextProps, 'color'>;
14
- }): React.JSX.Element;
8
+ size?: TextProps['size'];
9
+ weight?: TextProps['weight'];
10
+ /** Whether link should be distinguished by accent color (with underline displayed after hover) or by underline (with color matching the primary text) */
11
+ variant?: 'accent' | 'underline';
12
+ }
13
+ /**
14
+ * A button that looks like a link. Behavior can be customized with `href` (anchor) or `onClick` (button).
15
+ */
16
+ export declare function FunLinkButton({ inline, href, onClick, text, size, weight, variant, }: FunLinkButtonProps): React.JSX.Element;
17
+ export {};
@@ -10,10 +10,11 @@ export interface FunPaymentMethodItemProps {
10
10
  keyText: string;
11
11
  valueIcon?: ReactNode;
12
12
  disclaimerText?: string;
13
+ badgeText?: string;
13
14
  onClick?: () => void;
14
15
  isError?: boolean;
15
16
  isDisabled?: boolean;
16
17
  isActive?: boolean;
17
18
  }
18
- export declare const FunPaymentMethodItem: ({ keyIcon, keyText, valueIcon, disclaimerText, onClick, isError, isDisabled, isActive, }: FunPaymentMethodItemProps) => React.JSX.Element;
19
+ export declare const FunPaymentMethodItem: ({ keyIcon, keyText, valueIcon, disclaimerText, badgeText, onClick, isError, isDisabled, isActive, }: FunPaymentMethodItemProps) => React.JSX.Element;
19
20
  export {};
@@ -1,7 +1,7 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  export interface FunTooltipProps {
3
- content: string;
4
- children: ReactNode;
3
+ content: ReactNode;
4
+ children?: ReactNode;
5
5
  wrapperElementRef?: React.RefObject<HTMLDivElement>;
6
6
  /** Renders the open tooltip based on available horizontal space, ie. ignoring the `tooltipPosition` prop,
7
7
  * if the tooltip were to overflow beyond the boundaries of the provided `wrapperElementRef` element
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const PercentageIcon: () => React.JSX.Element;
@@ -6,4 +6,5 @@ export declare const CompletedGradientSvg: () => React.JSX.Element;
6
6
  export declare const CompletedStatusIcon: ({ size }: IconProps) => React.JSX.Element;
7
7
  export declare const FailedGradientSvg: () => React.JSX.Element;
8
8
  export declare const FailedStatusIcon: ({ size }: IconProps) => React.JSX.Element;
9
+ export declare const DelayedStatusIcon: ({ size }: IconProps) => React.JSX.Element;
9
10
  export {};
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  interface QRCodeSkeletonLoaderProps {
3
3
  /** Dictates what square will be rendered, eg. diagonalDimension = 4 will render a 4x4 skeleton loader with 4 rows and 4 columns, diagonalDimension = 12 will render a 12x12 skeleton loader with 12 rows and 12 columns */
4
- diagonalDimension: number;
4
+ diagonalDimension?: number;
5
5
  }
6
6
  declare const QRCodeSkeletonLoader: ({ diagonalDimension, }: QRCodeSkeletonLoaderProps) => React.JSX.Element;
7
7
  export default QRCodeSkeletonLoader;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface SolanaDepositAlertProps {
3
+ onClick: () => void;
4
+ }
5
+ export declare const SolanaDepositAlert: ({ onClick }: SolanaDepositAlertProps) => React.JSX.Element | null;
6
+ export {};
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import type { PriceImpact } from '~/hooks/useTokenTransfer';
2
+ import type { FeeValue } from '~/hooks/useTokenTransfer';
3
3
  interface TransferTokenDetailsProps {
4
4
  minAmount?: number;
5
5
  disabled?: boolean;
6
- priceImpact: PriceImpact;
6
+ estPriceImpact: FeeValue;
7
+ maxSlippage: FeeValue;
7
8
  }
8
- export declare const TransferTokenDetails: ({ minAmount, disabled, priceImpact, }: TransferTokenDetailsProps) => React.JSX.Element;
9
+ export declare const TransferTokenDetails: ({ minAmount, disabled, estPriceImpact, maxSlippage, }: TransferTokenDetailsProps) => React.JSX.Element;
9
10
  export {};
@@ -1,14 +1,16 @@
1
1
  export declare enum CheckoutInitStepMessage {
2
2
  CONFIRMING = 0,
3
3
  PREPARING_DATA = 1,
4
- WAITING_FOR_SIGNATURE = 2,
5
- WAITING_FOR_CONFIRMATION = 3
4
+ SWITCH_CHAIN = 2,
5
+ WAITING_FOR_SIGNATURE = 3,
6
+ WAITING_FOR_CONFIRMATION = 4
6
7
  }
7
8
  export declare const CHECKOUT_STEP_MESSAGE: {
8
9
  1: string;
9
10
  0: string;
10
11
  2: string;
11
12
  3: string;
13
+ 4: string;
12
14
  };
13
15
  export declare enum Web3AccountBalanceMessage {
14
16
  SIGN_TX = 0,