@funkit/connect 8.2.0 → 8.2.1-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -2
- package/dist/{chunk-WIDI2TYC.js → chunk-BP7VOYBS.js} +51 -2
- package/dist/{chunk-JIC2XXGY.js → chunk-KKGSXLMH.js} +12 -2
- package/dist/{chunk-QHRAQNOB.js → chunk-MYPFORR2.js} +12 -2
- package/dist/clients/fanatics.css +4375 -3286
- package/dist/clients/fanatics.d.ts +18 -7
- package/dist/clients/fanatics.js +739 -337
- package/dist/components/AsyncImage/useAsyncImage.d.ts +2 -0
- package/dist/components/Box/Box.d.ts +47 -47
- package/dist/components/Dialog/Dialog.d.ts +3 -1
- package/dist/components/Dialog/DialogContent.css.d.ts +9 -0
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +10 -0
- package/dist/components/FunInput/FunInput.d.ts +4 -0
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +7 -0
- package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +4 -1
- package/dist/components/FunSkeletonLoader/FunSkeletonBlock.d.ts +8 -3
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +1 -0
- package/dist/components/HelpAlert/HelpAlert.d.ts +1 -0
- package/dist/components/Icons/ApplePayIcon.d.ts +4 -0
- package/dist/components/Icons/FanaticsCreditCardIcon.d.ts +4 -0
- package/dist/components/Icons/GooglePayIcon.d.ts +4 -0
- package/dist/components/Icons/RevolutPayIcon.d.ts +4 -0
- package/dist/components/Icons/SepaBankIcon.d.ts +4 -0
- package/dist/components/Icons/VenmoIcon.d.ts +4 -0
- package/dist/components/Tabs/Tabs.d.ts +2 -2
- package/dist/components/Text/Text.d.ts +1 -0
- package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinner.d.ts +10 -0
- package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinnerLoading.d.ts +6 -0
- package/dist/components/TransactionStatus/AnimatedText.d.ts +10 -0
- package/dist/components/TransactionStatus/DotsDivider.d.ts +2 -0
- package/dist/components/TransactionStatus/StepSpinner.d.ts +17 -0
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +5 -7
- package/dist/components/TransactionStatus/TransactionStatusLoading.d.ts +6 -0
- package/dist/css/sprinkles.css.d.ts +241 -49
- package/dist/domains/paymentMethods.d.ts +8 -1
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +1 -1
- package/dist/index.css +4458 -3331
- package/dist/index.js +4275 -3096
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +2 -0
- package/dist/modals/CheckoutModal/{SelectAsset.d.ts → SelectAsset/SelectAsset.d.ts} +3 -3
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.d.ts +12 -0
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +24 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.d.ts +1 -1
- package/dist/providers/FunkitConfigContext.d.ts +94 -11
- package/dist/providers/FunkitThemeProvider.d.ts +291 -3
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/checkout.d.ts +6 -0
- package/dist/utils/customer.d.ts +2 -3
- package/dist/utils/flags/config.d.ts +2 -2
- package/dist/wallets/walletConnectors/index.js +7 -7
- package/package.json +4 -4
- package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +0 -2
|
@@ -19,11 +19,13 @@ interface DialogProps {
|
|
|
19
19
|
/** Whether the transition animation should be used on open/close */
|
|
20
20
|
withTransition?: boolean;
|
|
21
21
|
testId?: string;
|
|
22
|
+
/** Whether to use the fanatics bottom sheet style on mobile */
|
|
23
|
+
isFanaticsBottomSheet?: boolean;
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* Dialog components (title, content, bottom bar) must be rendered as direct children of Dialog for correct scrolling behavior
|
|
25
27
|
*/
|
|
26
|
-
export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withoutBottomPadding, withTransition, testId, }: DialogProps): React.ReactPortal | null;
|
|
28
|
+
export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withoutBottomPadding, withTransition, testId, isFanaticsBottomSheet, }: DialogProps): React.ReactPortal | null;
|
|
27
29
|
export declare namespace Dialog {
|
|
28
30
|
var Title: ({ title, titleMeta, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
|
|
29
31
|
var Content: ({ children, fullHeight, paddingLeft, paddingBottom, paddingTop, className, withTopDivider, withBottomDivider, id, withoutInternalPadding, ...boxProps }: DialogContentProps) => React.JSX.Element;
|
|
@@ -12,6 +12,15 @@ export declare const dialogWide: string;
|
|
|
12
12
|
export declare const withoutSidePadding: string;
|
|
13
13
|
export declare const withoutBottomPadding: string;
|
|
14
14
|
export declare const dialogMobile: string;
|
|
15
|
+
/**
|
|
16
|
+
* Fanatics-specific bottom sheet style for mobile
|
|
17
|
+
* - No margins from sides/bottom (full width)
|
|
18
|
+
* - No border radius on bottom corners (only top)
|
|
19
|
+
* - Side paddings 20px instead of 24
|
|
20
|
+
* - Max height 80% of viewport
|
|
21
|
+
* - Internal scrolling when content exceeds height
|
|
22
|
+
*/
|
|
23
|
+
export declare const dialogFanaticsBottomSheet: string;
|
|
15
24
|
export declare const scrollContent: string;
|
|
16
25
|
export declare const scrollbarHidden: string;
|
|
17
26
|
export declare const fullHeightContent: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { FunButtonProps } from '../../components/FunButton/FunButton';
|
|
3
|
+
interface FunDirectExecutionHistoryBottomBarProps {
|
|
4
|
+
isProcessing: boolean;
|
|
5
|
+
isLoaded: boolean;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
actionButtonProps?: FunButtonProps;
|
|
8
|
+
}
|
|
9
|
+
export declare const FunDirectExecutionHistoryBottomBar: FC<FunDirectExecutionHistoryBottomBarProps>;
|
|
10
|
+
export {};
|
|
@@ -33,6 +33,10 @@ export interface FunInputProps<T = HTMLInputElement | HTMLTextAreaElement> {
|
|
|
33
33
|
allowMultiline?: T extends HTMLInputElement ? false : true;
|
|
34
34
|
/** Remove default transitions from the input wrapper and base styles. Defaults to false. */
|
|
35
35
|
ignoreBaseTransitions?: boolean;
|
|
36
|
+
/** Color for decimal digits. When specified, decimal portion will be rendered in this color. */
|
|
37
|
+
decimalsColor?: BoxProps['color'];
|
|
38
|
+
/** Decimal separator character based on locale (e.g., '.' for en-US, ',' for de-DE). Required for decimalsColor to work. */
|
|
39
|
+
decimalSeparator?: string;
|
|
36
40
|
testId?: string;
|
|
37
41
|
}
|
|
38
42
|
export type FunInputChangeEvent = ChangeEvent<HTMLInputElement | HTMLTextAreaElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const funOptionBoxStyle: Record<"baseStyle" | "compactListStyle" | "defaultBorder" | "transparentBorder" | "activeBorder" | "disabledOptionBorder" | "defaultBackground" | "
|
|
1
|
+
export declare const funOptionBoxStyle: Record<"activeBackground" | "baseStyle" | "compactListStyle" | "defaultBorder" | "transparentBorder" | "activeBorder" | "disabledOptionBorder" | "defaultBackground" | "uninteractiveBackground", string>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type FunkitPaymentMethodIconsConfig } from '../../providers/FunkitConfigContext';
|
|
2
3
|
import { PaymentMethod, type PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
|
|
4
|
+
/**
|
|
5
|
+
* Get a custom icon passed in from UI customization config
|
|
6
|
+
* These icons are passed in from client to support enhanced branding+design
|
|
7
|
+
* Called "value icon" in the context of FunPaymentMethodItem
|
|
8
|
+
*/
|
|
9
|
+
export declare function getIconFromUiConfig(paymentMethod: PaymentMethod, iconConfig: FunkitPaymentMethodIconsConfig | undefined, defaultIconSize?: number): ReactNode | undefined;
|
|
3
10
|
export declare const getDynamicValueIconComponent: () => React.JSX.Element;
|
|
4
11
|
export declare function SupportedChainList({ chainIdList, iconSize, style, }: {
|
|
5
12
|
chainIdList: string[];
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type TextProps } from '../Text/Text';
|
|
2
3
|
export interface FunBrokerageItemProps {
|
|
3
4
|
exchangeName: string;
|
|
4
5
|
exchangeIcon: React.ReactNode;
|
|
5
6
|
hasActiveConnection: boolean;
|
|
6
7
|
badgeText?: string;
|
|
7
8
|
disabled?: boolean;
|
|
9
|
+
fontSize?: TextProps['size'];
|
|
10
|
+
fontWeight?: TextProps['weight'];
|
|
8
11
|
}
|
|
9
|
-
export declare const FunBrokerageItem: ({ exchangeName, exchangeIcon, hasActiveConnection, badgeText, disabled, }: FunBrokerageItemProps) => React.JSX.Element;
|
|
12
|
+
export declare const FunBrokerageItem: ({ exchangeName, exchangeIcon, hasActiveConnection, badgeText, disabled, fontSize, fontWeight, }: FunBrokerageItemProps) => React.JSX.Element;
|
|
@@ -5,9 +5,14 @@ type FunSkeletonBlockProps = {
|
|
|
5
5
|
marginBottom?: BoxProps['marginBottom'];
|
|
6
6
|
marginTop?: BoxProps['marginTop'];
|
|
7
7
|
style?: BoxProps['style'];
|
|
8
|
-
height: string;
|
|
9
8
|
/** Defaults to full width */
|
|
10
9
|
width?: BoxProps['width'];
|
|
11
|
-
}
|
|
12
|
-
|
|
10
|
+
} & ({
|
|
11
|
+
fontSize?: never;
|
|
12
|
+
height: Exclude<BoxProps['height'], undefined> | `${number}px`;
|
|
13
|
+
} | {
|
|
14
|
+
fontSize: Exclude<BoxProps['fontSize'], undefined | 'inherit'>;
|
|
15
|
+
height?: never;
|
|
16
|
+
});
|
|
17
|
+
export declare function FunSkeletonBlock({ borderRadius, fontSize, height, width, ...props }: FunSkeletonBlockProps): React.JSX.Element;
|
|
13
18
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type BoxProps } from '../Box/Box';
|
|
3
3
|
export declare function FunTxSummaryBox({ children, ...otherProps }: BoxProps): React.JSX.Element;
|
|
4
|
+
export declare function FunTxSummaryDivider(): React.JSX.Element;
|
|
4
5
|
export declare function FunTxSummaryLineItem({ children, ...otherProps }: BoxProps): React.JSX.Element;
|
|
5
6
|
export declare function FunTxSummaryLineItemKeyText({ text }: {
|
|
6
7
|
text: string;
|
|
@@ -9,13 +9,13 @@ export type TabsProps = {
|
|
|
9
9
|
tabs: Tab[];
|
|
10
10
|
activeTab: number;
|
|
11
11
|
onTabChange: (tab: number) => void;
|
|
12
|
-
/** Custom background color for the active tab highlight */
|
|
13
|
-
activeBackgroundColor?: string;
|
|
14
12
|
/** Custom background color for the container */
|
|
15
13
|
containerBackgroundColor?: BoxProps['background'];
|
|
16
14
|
/** Custom vertical padding for tab buttons */
|
|
17
15
|
tabPaddingY?: BoxProps['paddingY'];
|
|
18
16
|
fontWeight?: BoxProps['fontWeight'];
|
|
19
17
|
fontSize?: BoxProps['fontSize'];
|
|
18
|
+
activeTabStyles?: React.CSSProperties;
|
|
19
|
+
containerStyles?: React.CSSProperties;
|
|
20
20
|
};
|
|
21
21
|
export declare const Tabs: React.FC<TabsProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CheckoutProgressStep } from '../../../providers/FunkitCheckoutContext';
|
|
3
|
+
import type { TransactionStatusProps } from '../TransactionStatus';
|
|
4
|
+
interface AnimatedSpinnerProps {
|
|
5
|
+
currentStatus: TransactionStatusProps['status'];
|
|
6
|
+
initialStatus: TransactionStatusProps['status'];
|
|
7
|
+
initialStep: CheckoutProgressStep;
|
|
8
|
+
}
|
|
9
|
+
export declare const AnimatedSpinner: React.FC<AnimatedSpinnerProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TransactionStatusProps } from '../TransactionStatus';
|
|
3
|
+
export interface AnimatedSpinnerLoadingProps {
|
|
4
|
+
status: TransactionStatusProps['status'];
|
|
5
|
+
}
|
|
6
|
+
export declare const AnimatedSpinnerLoading: React.FC<AnimatedSpinnerLoadingProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type TextProps } from '../Text/Text';
|
|
3
|
+
export interface AnimatedTextProps extends TextProps {
|
|
4
|
+
animationDelay?: number;
|
|
5
|
+
animationDuration?: number;
|
|
6
|
+
animationMaxBlur?: number;
|
|
7
|
+
animationMaxDistance?: number;
|
|
8
|
+
textKey: number | string;
|
|
9
|
+
}
|
|
10
|
+
export declare const AnimatedText: FC<AnimatedTextProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CheckoutProgressStep } from '../../providers/FunkitCheckoutContext';
|
|
3
|
+
export declare const STEP_SPINNER_MORPH_DEGREES = 45;
|
|
4
|
+
export declare const STEP_SPINNER_MORPH_MAX_OFFSET = 4;
|
|
5
|
+
export declare const STEP_SPINNER_SIZE_BIG_SCALE = 1;
|
|
6
|
+
export declare const STEP_SPINNER_SIZE_SMALL_SCALE: number;
|
|
7
|
+
/**
|
|
8
|
+
* Returns SVG path for a circle that expands or retracts on one side.
|
|
9
|
+
* @param deg In degrees - Span of morphing arcs *on each side* (e.g. 90° would be morphing an entire half) - 90° at most
|
|
10
|
+
* @param offset In pixels - Positive offset expands, negative offset retracts
|
|
11
|
+
* @param side Which side are we morphing - "left" or "right"
|
|
12
|
+
*/
|
|
13
|
+
export declare function getCircleMorphPath(deg: number, offset: number, side: 'left' | 'right'): string;
|
|
14
|
+
export declare function StepSpinner({ initialStep, step, }: {
|
|
15
|
+
initialStep: CheckoutProgressStep;
|
|
16
|
+
step: CheckoutProgressStep;
|
|
17
|
+
}): React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
3
|
import type { CheckoutProgressStep } from '../../providers/FunkitCheckoutContext';
|
|
4
|
-
|
|
4
|
+
import { type FunkitTextCustomizationsConfig } from '../../providers/FunkitConfigContext';
|
|
5
|
+
export interface TransactionStatusProps {
|
|
5
6
|
isSlowTransaction: boolean;
|
|
6
7
|
isWithdrawal: boolean;
|
|
7
8
|
textConfigStatus?: TextConfigStatus;
|
|
@@ -24,13 +25,10 @@ export type TextConfigContext = {
|
|
|
24
25
|
durationUnits: string;
|
|
25
26
|
isWithdrawal: boolean;
|
|
26
27
|
finalizeVerb: string;
|
|
28
|
+
textCustomizations: FunkitTextCustomizationsConfig;
|
|
27
29
|
};
|
|
28
30
|
export type TextConfigStatus = Record<Exclude<TransactionStatusProps['status'], 'progress'> | 'progress_delayed', TextConfig | ((context: TextConfigContext) => TextConfig)>;
|
|
29
|
-
export declare const getDefaultTextConfigStatus: (t: TFunction) => TextConfigStatus;
|
|
30
31
|
export type TextConfigSteps = Record<CheckoutProgressStep, TextConfig | ((context: TextConfigContext) => TextConfig)>;
|
|
32
|
+
export declare const getDefaultTextConfigStatus: (t: TFunction) => TextConfigStatus;
|
|
31
33
|
export declare const getDefaultTextConfigSteps: (t: TFunction) => TextConfigSteps;
|
|
32
|
-
export declare
|
|
33
|
-
expectedStatus: TransactionStatusProps['status'];
|
|
34
|
-
}): React.JSX.Element;
|
|
35
|
-
export declare function TransactionStatus({ isSlowTransaction, isWithdrawal, status, step, textConfigStatus, textConfigSteps, }: TransactionStatusProps): React.JSX.Element;
|
|
36
|
-
export {};
|
|
34
|
+
export declare const TransactionStatus: React.FC<TransactionStatusProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { TransactionStatusProps } from './TransactionStatus';
|
|
3
|
+
export interface TransactionStatusLoadingProps {
|
|
4
|
+
expectedStatus: TransactionStatusProps['status'];
|
|
5
|
+
}
|
|
6
|
+
export declare const TransactionStatusLoading: FC<TransactionStatusLoadingProps>;
|