@funkit/connect 8.2.0 → 8.2.1-next.0
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 +34 -12
- package/dist/{chunk-QHRAQNOB.js → chunk-FBCU3TQA.js} +8 -2
- package/dist/{chunk-WIDI2TYC.js → chunk-MGQZMUZ2.js} +42 -2
- package/dist/{chunk-JIC2XXGY.js → chunk-OTMBU2BL.js} +8 -2
- package/dist/clients/fanatics.css +4006 -3298
- package/dist/clients/fanatics.d.ts +18 -7
- package/dist/clients/fanatics.js +495 -337
- 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/FunInput/FunInput.d.ts +4 -0
- 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/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 +217 -49
- package/dist/domains/paymentMethods.d.ts +8 -1
- package/dist/index.css +4061 -3315
- package/dist/index.js +3639 -2676
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +2 -0
- package/dist/providers/FunkitConfigContext.d.ts +86 -11
- package/dist/providers/FunkitThemeProvider.d.ts +255 -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 +20 -20
- package/package.json +3 -3
- package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +0 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
3
3
|
interface CheckoutPrimaryInfoProps {
|
|
4
|
+
showLeftAlignedDollarValueWithLabel: boolean;
|
|
4
5
|
showTokenAmount: boolean;
|
|
5
6
|
config: FunkitCheckoutConfig;
|
|
6
7
|
usdAmount?: number;
|
|
7
8
|
isLoading?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare function CheckoutPrimaryInfo({ showTokenAmount, usdAmount, config, isLoading, }: CheckoutPrimaryInfoProps): React.JSX.Element;
|
|
10
|
+
export declare function CheckoutPrimaryInfo({ showLeftAlignedDollarValueWithLabel, showTokenAmount, usdAmount, config, isLoading, }: CheckoutPrimaryInfoProps): React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -65,6 +65,8 @@ export interface AmountInputDerivedState extends AmountInputState {
|
|
|
65
65
|
};
|
|
66
66
|
isValid: boolean;
|
|
67
67
|
placeholder: string;
|
|
68
|
+
/** Decimal separator based on locale (e.g., '.' for en-US, ',' for de-DE) */
|
|
69
|
+
decimalSeparator: string;
|
|
68
70
|
}
|
|
69
71
|
export type AmountInputAction = {
|
|
70
72
|
/** Switches between fiat and crypto input mode */
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import type { BluvoExchangeType } from '../consts/bluvo';
|
|
3
|
+
import type { PaymentMethod } from '../domains/paymentMethods';
|
|
2
4
|
export interface FunkitTextCustomizationsConfig {
|
|
3
5
|
virtualFiat: string;
|
|
4
6
|
brokerageOrExchange: string;
|
|
@@ -12,9 +14,44 @@ export interface FunkitTextCustomizationsConfig {
|
|
|
12
14
|
transferTokens: string;
|
|
13
15
|
receiveDropdownTitle: string;
|
|
14
16
|
receiveDropdownLabel: string;
|
|
17
|
+
txStatus?: {
|
|
18
|
+
failed?: {
|
|
19
|
+
description?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
};
|
|
22
|
+
delayed?: {
|
|
23
|
+
description?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
};
|
|
26
|
+
depositPending?: {
|
|
27
|
+
description?: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
};
|
|
30
|
+
depositSucceeded?: {
|
|
31
|
+
description?: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
};
|
|
34
|
+
submitting?: {
|
|
35
|
+
description?: string;
|
|
36
|
+
title?: string;
|
|
37
|
+
};
|
|
38
|
+
waitingForExchange?: {
|
|
39
|
+
description?: string;
|
|
40
|
+
title?: string;
|
|
41
|
+
};
|
|
42
|
+
withdrawalPending?: {
|
|
43
|
+
description?: string;
|
|
44
|
+
title?: string;
|
|
45
|
+
};
|
|
46
|
+
withdrawalSucceeded?: {
|
|
47
|
+
description?: string;
|
|
48
|
+
title?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
15
51
|
confirmationScreen: {
|
|
16
52
|
payAmountLabel: string;
|
|
17
53
|
receiveAmountLabel: string;
|
|
54
|
+
sourceLabel?: string;
|
|
18
55
|
};
|
|
19
56
|
paymentMethodSubtitles: {
|
|
20
57
|
accountBalance?: string;
|
|
@@ -39,6 +76,13 @@ export interface FunkitUiSelectedRouteConfig {
|
|
|
39
76
|
/** Label for passthrough routes - defaults to "Native Bridge" */
|
|
40
77
|
passthroughLabel?: string;
|
|
41
78
|
}
|
|
79
|
+
export type FunkitPaymentMethodIconsConfig = Partial<Record<PaymentMethod, {
|
|
80
|
+
src: string;
|
|
81
|
+
size?: {
|
|
82
|
+
width: number;
|
|
83
|
+
height: number;
|
|
84
|
+
};
|
|
85
|
+
}>>;
|
|
42
86
|
export interface FunkitUiCustomizationsConfig {
|
|
43
87
|
/** Title alignment - defaults to "center" */
|
|
44
88
|
alignTitle?: 'left' | 'center';
|
|
@@ -46,15 +90,25 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
46
90
|
callToActionsUppercase?: boolean;
|
|
47
91
|
/** Whether to enable compact list style for option boxes - defaults to false */
|
|
48
92
|
enableCompactList?: boolean;
|
|
93
|
+
checkoutHistory?: {
|
|
94
|
+
/** Whether to show the bottom "Get help" text in a {@link FunAlert} - defaults to true */
|
|
95
|
+
showGetHelpAsAlert?: boolean;
|
|
96
|
+
/** Show a simplified UI with less rows and no "More details" section - defaults to false */
|
|
97
|
+
simplifiedUi?: boolean;
|
|
98
|
+
};
|
|
49
99
|
confirmationScreen?: {
|
|
50
100
|
/** Custom destination icon and text used in checkout summary */
|
|
51
101
|
destinationConfig?: FunkitUiDestinationConfig;
|
|
52
102
|
/** when source and destination are the same address, show destination as payment method instead of source - defaults to false */
|
|
53
103
|
preferDestinationWhenSame?: boolean;
|
|
104
|
+
/** Whether to show the bottom disclaimer in a {@link FunAlert} - defaults to true */
|
|
105
|
+
showDisclaimerAsAlert?: boolean;
|
|
54
106
|
/** Whether to show the total payment amount in USD below the token amount equivalent - defaults to false */
|
|
55
107
|
showPaymentAmountUsd?: boolean;
|
|
56
108
|
/** Whether to show the total receive amount in USD below the token amount equivalent - defaults to false */
|
|
57
109
|
showReceiveAmountUsd?: boolean;
|
|
110
|
+
/** Whether to show the amount summary above the payment method summary rather than below - defaults to false */
|
|
111
|
+
showAmountSummaryAbovePaymentMethod?: boolean;
|
|
58
112
|
/**
|
|
59
113
|
* Whether and how to show transaction fee's digest.
|
|
60
114
|
* - "none": show nothing (default)
|
|
@@ -63,6 +117,8 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
63
117
|
showTransactionDigest?: 'none' | 'chainDependent';
|
|
64
118
|
/** Whether to show the amount of tokens below the USD equivalent - defaults to true */
|
|
65
119
|
showTokenAmount?: boolean;
|
|
120
|
+
/** Instead of showing the dollar value centered, show it left-aligned with "Deposit" label - defaults to false */
|
|
121
|
+
showLeftAlignedDollarValueWithLabel?: boolean;
|
|
66
122
|
/**
|
|
67
123
|
* Config for "Selected Route" row. When defined, the row is shown.
|
|
68
124
|
* Omit to hide the selected route row (default).
|
|
@@ -74,6 +130,8 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
74
130
|
allowTokenAmountInput?: boolean;
|
|
75
131
|
};
|
|
76
132
|
selectAssetScreen?: {
|
|
133
|
+
/** Whether the secondary token symbol is visible - defaults to true */
|
|
134
|
+
isSecondaryTokenSymbolVisible?: boolean;
|
|
77
135
|
/** Whether to navigate directly on asset click, rather than having to select then click Continue - defaults to false */
|
|
78
136
|
navigateOnAssetClick?: boolean;
|
|
79
137
|
/**
|
|
@@ -97,6 +155,13 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
97
155
|
connectExchangeScreen?: {
|
|
98
156
|
/** Function that returns a custom React component to render before other UIs in the connect exchange screen */
|
|
99
157
|
customTopComponent?: () => ReactNode;
|
|
158
|
+
/** Function that returns a custom React component to render instead of the normal page */
|
|
159
|
+
CustomComponent?: ComponentType<{
|
|
160
|
+
appName: string;
|
|
161
|
+
exchangeIcon: JSX.Element | null;
|
|
162
|
+
exchangeName: string;
|
|
163
|
+
exchangeType: BluvoExchangeType | null;
|
|
164
|
+
}>;
|
|
100
165
|
};
|
|
101
166
|
sourceChangeScreen?: {
|
|
102
167
|
/** Whether to show target asset selection menu if dynamicTargetAssetCandidates exist - defaults to false */
|
|
@@ -105,24 +170,34 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
105
170
|
showWalletOnInsufficientBalance?: boolean;
|
|
106
171
|
/** Function that returns a custom React component to render before other UIs in the source change screen */
|
|
107
172
|
customTopComponent?: () => ReactNode;
|
|
173
|
+
paymentMethodIcons?: {
|
|
174
|
+
primary?: FunkitPaymentMethodIconsConfig;
|
|
175
|
+
/** Custom secondary icon or "value icon" in the context of FunPaymentMethodItem */
|
|
176
|
+
secondary?: FunkitPaymentMethodIconsConfig;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
customIcons?: {
|
|
180
|
+
paymentDestination?: ComponentType;
|
|
181
|
+
paymentSource?: ComponentType;
|
|
182
|
+
timeEstimate?: ComponentType;
|
|
183
|
+
youReceive?: ComponentType;
|
|
184
|
+
youSend?: ComponentType;
|
|
108
185
|
};
|
|
109
186
|
}
|
|
110
187
|
/**
|
|
111
|
-
* Makes all properties of T required except for
|
|
188
|
+
* Makes all properties of T required except for custom components which remains optional.
|
|
112
189
|
* Used for internal screen configs where we want defaults for all settings but allow
|
|
113
|
-
*
|
|
190
|
+
* custom slot components to be optionally provided.
|
|
114
191
|
*/
|
|
115
|
-
type
|
|
116
|
-
customTopComponent?: () => ReactNode;
|
|
117
|
-
};
|
|
192
|
+
type RequiredExceptCustomComponents<T> = Required<Omit<T & {}, `${string}Component`>>;
|
|
118
193
|
export type FunkitUiCustomizationsConfigInternal = Required<FunkitUiCustomizationsConfig> & {
|
|
119
194
|
confirmationScreen: FunkitUiCustomizationsConfig['confirmationScreen'] & Required<Omit<FunkitUiCustomizationsConfig['confirmationScreen'] & {}, 'destinationConfig' | 'selectedRouteConfig'>>;
|
|
120
195
|
inputAmountScreen: Required<FunkitUiCustomizationsConfig['inputAmountScreen'] & {}>;
|
|
121
|
-
selectAssetScreen:
|
|
122
|
-
transferCryptoScreen:
|
|
123
|
-
selectBrokerageScreen:
|
|
124
|
-
connectExchangeScreen:
|
|
125
|
-
sourceChangeScreen:
|
|
196
|
+
selectAssetScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['selectAssetScreen']>;
|
|
197
|
+
transferCryptoScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['transferCryptoScreen']>;
|
|
198
|
+
selectBrokerageScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['selectBrokerageScreen']>;
|
|
199
|
+
connectExchangeScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['connectExchangeScreen']>;
|
|
200
|
+
sourceChangeScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['sourceChangeScreen']>;
|
|
126
201
|
};
|
|
127
202
|
export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
|
|
128
203
|
export declare const DEFAULT_UI_CUSTOMIZATIONS: FunkitUiCustomizationsConfigInternal;
|