@stripe/stripe-js 9.6.0 → 9.8.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/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/pure.js +2 -2
- package/dist/pure.mjs +2 -2
- package/dist/stripe-js/checkout.d.mts +6 -0
- package/dist/stripe-js/checkout.d.ts +6 -0
- package/dist/stripe-js/elements/currency-selector.d.mts +2 -0
- package/dist/stripe-js/elements/currency-selector.d.ts +2 -0
- package/dist/stripe-js/elements-group.d.mts +56 -1
- package/dist/stripe-js/elements-group.d.ts +56 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
71
71
|
|
|
72
72
|
stripe._registerWrapper({
|
|
73
73
|
name: 'stripe-js',
|
|
74
|
-
version: "9.
|
|
74
|
+
version: "9.8.0",
|
|
75
75
|
startTime: startTime
|
|
76
76
|
});
|
|
77
77
|
};
|
|
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
172
172
|
var expectedVersion = RELEASE_TRAIN;
|
|
173
173
|
|
|
174
174
|
if (isTestKey && version !== expectedVersion) {
|
|
175
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
175
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.8.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/index.mjs
CHANGED
|
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
67
67
|
|
|
68
68
|
stripe._registerWrapper({
|
|
69
69
|
name: 'stripe-js',
|
|
70
|
-
version: "9.
|
|
70
|
+
version: "9.8.0",
|
|
71
71
|
startTime: startTime
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
168
168
|
var expectedVersion = RELEASE_TRAIN;
|
|
169
169
|
|
|
170
170
|
if (isTestKey && version !== expectedVersion) {
|
|
171
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
171
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.8.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.js
CHANGED
|
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
71
71
|
|
|
72
72
|
stripe._registerWrapper({
|
|
73
73
|
name: 'stripe-js',
|
|
74
|
-
version: "9.
|
|
74
|
+
version: "9.8.0",
|
|
75
75
|
startTime: startTime
|
|
76
76
|
});
|
|
77
77
|
};
|
|
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
172
172
|
var expectedVersion = RELEASE_TRAIN;
|
|
173
173
|
|
|
174
174
|
if (isTestKey && version !== expectedVersion) {
|
|
175
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
175
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.8.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.mjs
CHANGED
|
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
67
67
|
|
|
68
68
|
stripe._registerWrapper({
|
|
69
69
|
name: 'stripe-js',
|
|
70
|
-
version: "9.
|
|
70
|
+
version: "9.8.0",
|
|
71
71
|
startTime: startTime
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
168
168
|
var expectedVersion = RELEASE_TRAIN;
|
|
169
169
|
|
|
170
170
|
if (isTestKey && version !== expectedVersion) {
|
|
171
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
171
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.8.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
var stripe = maybeStripe.apply(undefined, args);
|
|
@@ -164,6 +164,7 @@ export type StripeCheckoutLineItem = {
|
|
|
164
164
|
unitAmountDecimal: StripeCheckoutAmount | null;
|
|
165
165
|
description: string | null;
|
|
166
166
|
quantity: number;
|
|
167
|
+
unitLabel: string | null;
|
|
167
168
|
discountAmounts: Array<StripeCheckoutDiscountAmount> | null;
|
|
168
169
|
taxAmounts: Array<StripeCheckoutTaxAmount> | null;
|
|
169
170
|
recurring: {
|
|
@@ -419,6 +420,11 @@ export type StripeCheckoutFormOptions = {
|
|
|
419
420
|
* Express checkout configuration options.
|
|
420
421
|
*/
|
|
421
422
|
expressCheckout?: {
|
|
423
|
+
/**
|
|
424
|
+
* By default, the height of the buttons are 44px.
|
|
425
|
+
* You can override this to specify a custom button height in the range of 40px-55px.
|
|
426
|
+
*/
|
|
427
|
+
buttonHeight?: number;
|
|
422
428
|
/**
|
|
423
429
|
* Button theme options for express checkout payment methods.
|
|
424
430
|
*/
|
|
@@ -164,6 +164,7 @@ export type StripeCheckoutLineItem = {
|
|
|
164
164
|
unitAmountDecimal: StripeCheckoutAmount | null;
|
|
165
165
|
description: string | null;
|
|
166
166
|
quantity: number;
|
|
167
|
+
unitLabel: string | null;
|
|
167
168
|
discountAmounts: Array<StripeCheckoutDiscountAmount> | null;
|
|
168
169
|
taxAmounts: Array<StripeCheckoutTaxAmount> | null;
|
|
169
170
|
recurring: {
|
|
@@ -419,6 +420,11 @@ export type StripeCheckoutFormOptions = {
|
|
|
419
420
|
* Express checkout configuration options.
|
|
420
421
|
*/
|
|
421
422
|
expressCheckout?: {
|
|
423
|
+
/**
|
|
424
|
+
* By default, the height of the buttons are 44px.
|
|
425
|
+
* You can override this to specify a custom button height in the range of 40px-55px.
|
|
426
|
+
*/
|
|
427
|
+
buttonHeight?: number;
|
|
422
428
|
/**
|
|
423
429
|
* Button theme options for express checkout payment methods.
|
|
424
430
|
*/
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
StripeAddressElement,
|
|
3
3
|
StripeAddressElementOptions,
|
|
4
4
|
StripeCurrencySelectorElement,
|
|
5
|
+
StripeCurrencySelectorElementOptions,
|
|
5
6
|
StripeShippingAddressElement,
|
|
6
7
|
StripeShippingAddressElementOptions,
|
|
7
8
|
StripePaymentRequestButtonElement,
|
|
@@ -419,6 +420,31 @@ export interface StripeElements {
|
|
|
419
420
|
* Looks up a previously created `Element` by its type.
|
|
420
421
|
*/
|
|
421
422
|
getElement(elementType: 'taxId'): StripeTaxIdElement | null;
|
|
423
|
+
|
|
424
|
+
/////////////////////////////
|
|
425
|
+
/// currencySelector
|
|
426
|
+
/////////////////////////////
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Requires beta access:
|
|
430
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
431
|
+
*
|
|
432
|
+
* Creates a `CurrencySelectorElement`.
|
|
433
|
+
*/
|
|
434
|
+
create(
|
|
435
|
+
elementType: 'currencySelector',
|
|
436
|
+
options?: StripeCurrencySelectorElementOptions
|
|
437
|
+
): StripeCurrencySelectorElement;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Requires beta access:
|
|
441
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
442
|
+
*
|
|
443
|
+
* Looks up a previously created `Element` by its type.
|
|
444
|
+
*/
|
|
445
|
+
getElement(
|
|
446
|
+
elementType: 'currencySelector'
|
|
447
|
+
): StripeCurrencySelectorElement | null;
|
|
422
448
|
}
|
|
423
449
|
|
|
424
450
|
export type StripeElementType =
|
|
@@ -884,6 +910,12 @@ interface StripeElementsOptionsModeBase extends BaseStripeElementsOptions {
|
|
|
884
910
|
* @docs https://stripe.com/docs/js/elements_object/create#stripe_elements-options-externalPaymentMethodTypes
|
|
885
911
|
*/
|
|
886
912
|
externalPaymentMethodTypes?: string[];
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* Requires beta access:
|
|
916
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
917
|
+
*/
|
|
918
|
+
adaptivePricing?: {allowed?: boolean};
|
|
887
919
|
}
|
|
888
920
|
|
|
889
921
|
type StripeElementsOptionsModePayment = StripeElementsOptionsModeBase & {
|
|
@@ -1172,6 +1204,13 @@ export interface Appearance {
|
|
|
1172
1204
|
/** @deprecated Use accordionItemSpacing instead. */
|
|
1173
1205
|
spacingAccordionItem?: string;
|
|
1174
1206
|
|
|
1207
|
+
// AccordionItem labels
|
|
1208
|
+
accordionItemLabelColorText?: string;
|
|
1209
|
+
accordionItemLabelFontSize?: string;
|
|
1210
|
+
accordionItemLabelFontWeight?: string;
|
|
1211
|
+
accordionItemLabelSelectedColorText?: string;
|
|
1212
|
+
accordionItemLabelSelectedFontWeight?: string;
|
|
1213
|
+
|
|
1175
1214
|
// Colors
|
|
1176
1215
|
colorPrimary?: string;
|
|
1177
1216
|
colorBackground?: string;
|
|
@@ -1180,9 +1219,12 @@ export interface Appearance {
|
|
|
1180
1219
|
colorDanger?: string;
|
|
1181
1220
|
colorWarning?: string;
|
|
1182
1221
|
|
|
1183
|
-
//
|
|
1222
|
+
// Buttons
|
|
1184
1223
|
buttonColorBackground?: string;
|
|
1185
1224
|
buttonColorText?: string;
|
|
1225
|
+
buttonFontSize?: string;
|
|
1226
|
+
buttonFontWeight?: string;
|
|
1227
|
+
buttonPadding?: string;
|
|
1186
1228
|
|
|
1187
1229
|
// Text variations
|
|
1188
1230
|
colorTextSecondary?: string;
|
|
@@ -1277,8 +1319,21 @@ export interface Appearance {
|
|
|
1277
1319
|
focusBoxShadow?: string;
|
|
1278
1320
|
focusOutline?: string;
|
|
1279
1321
|
|
|
1322
|
+
// Inputs
|
|
1323
|
+
inputBoxShadow?: string;
|
|
1324
|
+
inputColorBorder?: string;
|
|
1325
|
+
inputFocusBoxShadow?: string;
|
|
1326
|
+
inputFocusColorBorder?: string;
|
|
1327
|
+
|
|
1328
|
+
// Labels
|
|
1329
|
+
labelColorText?: string;
|
|
1330
|
+
labelFontSize?: string;
|
|
1331
|
+
labelFontWeight?: string;
|
|
1332
|
+
labelSpacing?: string;
|
|
1333
|
+
|
|
1280
1334
|
// Radius
|
|
1281
1335
|
buttonBorderRadius?: string;
|
|
1336
|
+
buttonExpressCheckoutBorderRadius?: string;
|
|
1282
1337
|
borderRadius?: string;
|
|
1283
1338
|
};
|
|
1284
1339
|
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
StripeAddressElement,
|
|
3
3
|
StripeAddressElementOptions,
|
|
4
4
|
StripeCurrencySelectorElement,
|
|
5
|
+
StripeCurrencySelectorElementOptions,
|
|
5
6
|
StripeShippingAddressElement,
|
|
6
7
|
StripeShippingAddressElementOptions,
|
|
7
8
|
StripePaymentRequestButtonElement,
|
|
@@ -419,6 +420,31 @@ export interface StripeElements {
|
|
|
419
420
|
* Looks up a previously created `Element` by its type.
|
|
420
421
|
*/
|
|
421
422
|
getElement(elementType: 'taxId'): StripeTaxIdElement | null;
|
|
423
|
+
|
|
424
|
+
/////////////////////////////
|
|
425
|
+
/// currencySelector
|
|
426
|
+
/////////////////////////////
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Requires beta access:
|
|
430
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
431
|
+
*
|
|
432
|
+
* Creates a `CurrencySelectorElement`.
|
|
433
|
+
*/
|
|
434
|
+
create(
|
|
435
|
+
elementType: 'currencySelector',
|
|
436
|
+
options?: StripeCurrencySelectorElementOptions
|
|
437
|
+
): StripeCurrencySelectorElement;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Requires beta access:
|
|
441
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
442
|
+
*
|
|
443
|
+
* Looks up a previously created `Element` by its type.
|
|
444
|
+
*/
|
|
445
|
+
getElement(
|
|
446
|
+
elementType: 'currencySelector'
|
|
447
|
+
): StripeCurrencySelectorElement | null;
|
|
422
448
|
}
|
|
423
449
|
|
|
424
450
|
export type StripeElementType =
|
|
@@ -884,6 +910,12 @@ interface StripeElementsOptionsModeBase extends BaseStripeElementsOptions {
|
|
|
884
910
|
* @docs https://stripe.com/docs/js/elements_object/create#stripe_elements-options-externalPaymentMethodTypes
|
|
885
911
|
*/
|
|
886
912
|
externalPaymentMethodTypes?: string[];
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* Requires beta access:
|
|
916
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
917
|
+
*/
|
|
918
|
+
adaptivePricing?: {allowed?: boolean};
|
|
887
919
|
}
|
|
888
920
|
|
|
889
921
|
type StripeElementsOptionsModePayment = StripeElementsOptionsModeBase & {
|
|
@@ -1172,6 +1204,13 @@ export interface Appearance {
|
|
|
1172
1204
|
/** @deprecated Use accordionItemSpacing instead. */
|
|
1173
1205
|
spacingAccordionItem?: string;
|
|
1174
1206
|
|
|
1207
|
+
// AccordionItem labels
|
|
1208
|
+
accordionItemLabelColorText?: string;
|
|
1209
|
+
accordionItemLabelFontSize?: string;
|
|
1210
|
+
accordionItemLabelFontWeight?: string;
|
|
1211
|
+
accordionItemLabelSelectedColorText?: string;
|
|
1212
|
+
accordionItemLabelSelectedFontWeight?: string;
|
|
1213
|
+
|
|
1175
1214
|
// Colors
|
|
1176
1215
|
colorPrimary?: string;
|
|
1177
1216
|
colorBackground?: string;
|
|
@@ -1180,9 +1219,12 @@ export interface Appearance {
|
|
|
1180
1219
|
colorDanger?: string;
|
|
1181
1220
|
colorWarning?: string;
|
|
1182
1221
|
|
|
1183
|
-
//
|
|
1222
|
+
// Buttons
|
|
1184
1223
|
buttonColorBackground?: string;
|
|
1185
1224
|
buttonColorText?: string;
|
|
1225
|
+
buttonFontSize?: string;
|
|
1226
|
+
buttonFontWeight?: string;
|
|
1227
|
+
buttonPadding?: string;
|
|
1186
1228
|
|
|
1187
1229
|
// Text variations
|
|
1188
1230
|
colorTextSecondary?: string;
|
|
@@ -1277,8 +1319,21 @@ export interface Appearance {
|
|
|
1277
1319
|
focusBoxShadow?: string;
|
|
1278
1320
|
focusOutline?: string;
|
|
1279
1321
|
|
|
1322
|
+
// Inputs
|
|
1323
|
+
inputBoxShadow?: string;
|
|
1324
|
+
inputColorBorder?: string;
|
|
1325
|
+
inputFocusBoxShadow?: string;
|
|
1326
|
+
inputFocusColorBorder?: string;
|
|
1327
|
+
|
|
1328
|
+
// Labels
|
|
1329
|
+
labelColorText?: string;
|
|
1330
|
+
labelFontSize?: string;
|
|
1331
|
+
labelFontWeight?: string;
|
|
1332
|
+
labelSpacing?: string;
|
|
1333
|
+
|
|
1280
1334
|
// Radius
|
|
1281
1335
|
buttonBorderRadius?: string;
|
|
1336
|
+
buttonExpressCheckoutBorderRadius?: string;
|
|
1282
1337
|
borderRadius?: string;
|
|
1283
1338
|
};
|
|
1284
1339
|
|