@flopay/react 0.2.1 → 0.3.4
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/dist/index.cjs +375 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.mjs +291 -147
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -81,11 +81,20 @@ interface FloPayCheckoutProps {
|
|
|
81
81
|
buttonsTheme?: _flopay_shared.ButtonsLayoutTheme;
|
|
82
82
|
/** Custom style overrides for the buttons layout. Merged on top of the theme preset. */
|
|
83
83
|
buttonsStyles?: _flopay_shared.ButtonsLayoutStyles;
|
|
84
|
+
/** Custom React content rendered inside the card button when `layout="buttons"`. */
|
|
85
|
+
cardButtonContent?: React.ReactNode;
|
|
84
86
|
/**
|
|
85
87
|
* Called when a payment method button is clicked.
|
|
86
88
|
* `method`: `'card'` | `'paypal'` | `'apple_pay'` | `'google_pay'`
|
|
87
89
|
*/
|
|
88
90
|
onButtonClick?: (method: string) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Enable AVS (Address Verification). Shows country dropdown + ZIP/postcode input
|
|
93
|
+
* in the card form. When enabled, billing_details are passed to Stripe for AVS checks.
|
|
94
|
+
*/
|
|
95
|
+
enableAVS?: boolean;
|
|
96
|
+
/** Layout for AVS fields: 'row' (side-by-side, default) or 'column' (stacked). */
|
|
97
|
+
avsLayout?: 'row' | 'column';
|
|
89
98
|
/** Label for the submit button. */
|
|
90
99
|
submitLabel?: string;
|
|
91
100
|
/** Additional CSS class for the wrapper. */
|
|
@@ -129,7 +138,7 @@ interface FloPayCheckoutProps {
|
|
|
129
138
|
* />
|
|
130
139
|
* ```
|
|
131
140
|
*/
|
|
132
|
-
declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, fallbackPublishableKey, loading: loadingNode, error: errorNode, onComplete, onError, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, onButtonClick, submitLabel, className, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
|
|
141
|
+
declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, fallbackPublishableKey, loading: loadingNode, error: errorNode, onComplete, onError, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, cardButtonContent, onButtonClick, enableAVS, avsLayout, submitLabel, className, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
|
|
133
142
|
|
|
134
143
|
/**
|
|
135
144
|
* Returns the current `FloPay` instance, or `null` if the provider
|
|
@@ -369,11 +378,28 @@ interface SplitCardFormProps {
|
|
|
369
378
|
buttonsTheme?: _flopay_shared.ButtonsLayoutTheme;
|
|
370
379
|
/** Custom style overrides for the `buttons` layout. Merged on top of the theme preset. */
|
|
371
380
|
buttonsStyles?: _flopay_shared.ButtonsLayoutStyles;
|
|
381
|
+
/** Custom React content rendered inside the card button when `layout="buttons"`. */
|
|
382
|
+
cardButtonContent?: React.ReactNode;
|
|
372
383
|
/**
|
|
373
384
|
* Called when a payment method button is clicked.
|
|
374
385
|
* `method`: `'card'` | `'paypal'` | `'apple_pay'` | `'google_pay'`
|
|
375
386
|
*/
|
|
376
387
|
onButtonClick?: (method: string) => void;
|
|
388
|
+
/**
|
|
389
|
+
* Enable AVS (Address Verification). Shows country dropdown + ZIP/postcode input.
|
|
390
|
+
* When enabled, billing_details are passed to Stripe's createPaymentMethod for AVS checks.
|
|
391
|
+
*/
|
|
392
|
+
enableAVS?: boolean;
|
|
393
|
+
/** Layout for AVS fields: 'row' (side-by-side, default) or 'column' (stacked). */
|
|
394
|
+
avsLayout?: 'row' | 'column';
|
|
395
|
+
/** Pre-filled country code (ISO 3166-1 alpha-2) for AVS. */
|
|
396
|
+
country?: string;
|
|
397
|
+
/** Pre-filled ZIP/postal code for AVS. */
|
|
398
|
+
zip?: string;
|
|
399
|
+
/** Callback when AVS country changes. */
|
|
400
|
+
onCountryChange?: (country: string) => void;
|
|
401
|
+
/** Callback when AVS ZIP/postal code changes. */
|
|
402
|
+
onZipChange?: (zip: string) => void;
|
|
377
403
|
/** Total amount in cents (smallest currency unit). Used for wallet/PayPal Elements config. */
|
|
378
404
|
totalAmount?: number;
|
|
379
405
|
/** Currency code (used for PayPal Elements config). */
|
package/dist/index.d.ts
CHANGED
|
@@ -81,11 +81,20 @@ interface FloPayCheckoutProps {
|
|
|
81
81
|
buttonsTheme?: _flopay_shared.ButtonsLayoutTheme;
|
|
82
82
|
/** Custom style overrides for the buttons layout. Merged on top of the theme preset. */
|
|
83
83
|
buttonsStyles?: _flopay_shared.ButtonsLayoutStyles;
|
|
84
|
+
/** Custom React content rendered inside the card button when `layout="buttons"`. */
|
|
85
|
+
cardButtonContent?: React.ReactNode;
|
|
84
86
|
/**
|
|
85
87
|
* Called when a payment method button is clicked.
|
|
86
88
|
* `method`: `'card'` | `'paypal'` | `'apple_pay'` | `'google_pay'`
|
|
87
89
|
*/
|
|
88
90
|
onButtonClick?: (method: string) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Enable AVS (Address Verification). Shows country dropdown + ZIP/postcode input
|
|
93
|
+
* in the card form. When enabled, billing_details are passed to Stripe for AVS checks.
|
|
94
|
+
*/
|
|
95
|
+
enableAVS?: boolean;
|
|
96
|
+
/** Layout for AVS fields: 'row' (side-by-side, default) or 'column' (stacked). */
|
|
97
|
+
avsLayout?: 'row' | 'column';
|
|
89
98
|
/** Label for the submit button. */
|
|
90
99
|
submitLabel?: string;
|
|
91
100
|
/** Additional CSS class for the wrapper. */
|
|
@@ -129,7 +138,7 @@ interface FloPayCheckoutProps {
|
|
|
129
138
|
* />
|
|
130
139
|
* ```
|
|
131
140
|
*/
|
|
132
|
-
declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, fallbackPublishableKey, loading: loadingNode, error: errorNode, onComplete, onError, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, onButtonClick, submitLabel, className, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
|
|
141
|
+
declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, fallbackPublishableKey, loading: loadingNode, error: errorNode, onComplete, onError, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, cardButtonContent, onButtonClick, enableAVS, avsLayout, submitLabel, className, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
|
|
133
142
|
|
|
134
143
|
/**
|
|
135
144
|
* Returns the current `FloPay` instance, or `null` if the provider
|
|
@@ -369,11 +378,28 @@ interface SplitCardFormProps {
|
|
|
369
378
|
buttonsTheme?: _flopay_shared.ButtonsLayoutTheme;
|
|
370
379
|
/** Custom style overrides for the `buttons` layout. Merged on top of the theme preset. */
|
|
371
380
|
buttonsStyles?: _flopay_shared.ButtonsLayoutStyles;
|
|
381
|
+
/** Custom React content rendered inside the card button when `layout="buttons"`. */
|
|
382
|
+
cardButtonContent?: React.ReactNode;
|
|
372
383
|
/**
|
|
373
384
|
* Called when a payment method button is clicked.
|
|
374
385
|
* `method`: `'card'` | `'paypal'` | `'apple_pay'` | `'google_pay'`
|
|
375
386
|
*/
|
|
376
387
|
onButtonClick?: (method: string) => void;
|
|
388
|
+
/**
|
|
389
|
+
* Enable AVS (Address Verification). Shows country dropdown + ZIP/postcode input.
|
|
390
|
+
* When enabled, billing_details are passed to Stripe's createPaymentMethod for AVS checks.
|
|
391
|
+
*/
|
|
392
|
+
enableAVS?: boolean;
|
|
393
|
+
/** Layout for AVS fields: 'row' (side-by-side, default) or 'column' (stacked). */
|
|
394
|
+
avsLayout?: 'row' | 'column';
|
|
395
|
+
/** Pre-filled country code (ISO 3166-1 alpha-2) for AVS. */
|
|
396
|
+
country?: string;
|
|
397
|
+
/** Pre-filled ZIP/postal code for AVS. */
|
|
398
|
+
zip?: string;
|
|
399
|
+
/** Callback when AVS country changes. */
|
|
400
|
+
onCountryChange?: (country: string) => void;
|
|
401
|
+
/** Callback when AVS ZIP/postal code changes. */
|
|
402
|
+
onZipChange?: (zip: string) => void;
|
|
377
403
|
/** Total amount in cents (smallest currency unit). Used for wallet/PayPal Elements config. */
|
|
378
404
|
totalAmount?: number;
|
|
379
405
|
/** Currency code (used for PayPal Elements config). */
|