@stripe/stripe-js 3.0.3 → 3.0.5

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 (66) hide show
  1. package/README.md +10 -23
  2. package/dist/stripe.js +1 -1
  3. package/dist/stripe.mjs +1 -1
  4. package/package.json +4 -26
  5. package/{dist/pure.d.mts → pure/index.d.mts} +9536 -9567
  6. package/{dist/pure.d.ts → pure/index.d.ts} +9536 -9567
  7. package/{dist/pure.js → pure/index.js} +1 -1
  8. package/{dist/pure.mjs → pure/index.mjs} +1 -1
  9. package/types/.eslintrc.yml +0 -3
  10. package/types/api/bank-accounts.d.ts +0 -61
  11. package/types/api/cards.d.ts +0 -130
  12. package/types/api/financial-connections.d.ts +0 -232
  13. package/types/api/index.d.ts +0 -11
  14. package/types/api/orders.d.ts +0 -122
  15. package/types/api/payment-intents.d.ts +0 -330
  16. package/types/api/payment-methods.d.ts +0 -452
  17. package/types/api/setup-intents.d.ts +0 -184
  18. package/types/api/shared.d.ts +0 -125
  19. package/types/api/sources.d.ts +0 -1045
  20. package/types/api/tokens.d.ts +0 -639
  21. package/types/api/verification-sessions.d.ts +0 -9
  22. package/types/index.d.ts +0 -17
  23. package/types/pure.d.ts +0 -5
  24. package/types/stripe-js/checkout.d.ts +0 -153
  25. package/types/stripe-js/custom-checkout.d.ts +0 -220
  26. package/types/stripe-js/elements/address.d.ts +0 -261
  27. package/types/stripe-js/elements/affirm-message.d.ts +0 -65
  28. package/types/stripe-js/elements/afterpay-clearpay-message.d.ts +0 -119
  29. package/types/stripe-js/elements/apple-pay.d.ts +0 -156
  30. package/types/stripe-js/elements/au-bank-account.d.ts +0 -138
  31. package/types/stripe-js/elements/base.d.ts +0 -264
  32. package/types/stripe-js/elements/card-cvc.d.ts +0 -119
  33. package/types/stripe-js/elements/card-expiry.d.ts +0 -119
  34. package/types/stripe-js/elements/card-number.d.ts +0 -200
  35. package/types/stripe-js/elements/card.d.ts +0 -226
  36. package/types/stripe-js/elements/cart.d.ts +0 -224
  37. package/types/stripe-js/elements/eps-bank.d.ts +0 -140
  38. package/types/stripe-js/elements/express-checkout.d.ts +0 -446
  39. package/types/stripe-js/elements/fpx-bank.d.ts +0 -134
  40. package/types/stripe-js/elements/iban.d.ts +0 -135
  41. package/types/stripe-js/elements/ideal-bank.d.ts +0 -140
  42. package/types/stripe-js/elements/index.d.ts +0 -22
  43. package/types/stripe-js/elements/issuing/index.d.ts +0 -5
  44. package/types/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +0 -37
  45. package/types/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +0 -32
  46. package/types/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +0 -32
  47. package/types/stripe-js/elements/issuing/issuing-card-number-display.d.ts +0 -40
  48. package/types/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +0 -32
  49. package/types/stripe-js/elements/link-authentication.d.ts +0 -158
  50. package/types/stripe-js/elements/p24-bank.d.ts +0 -140
  51. package/types/stripe-js/elements/payment-method-messaging.d.ts +0 -98
  52. package/types/stripe-js/elements/payment-request-button.d.ts +0 -151
  53. package/types/stripe-js/elements/payment.d.ts +0 -275
  54. package/types/stripe-js/elements/shipping-address.d.ts +0 -215
  55. package/types/stripe-js/elements-group.d.ts +0 -1129
  56. package/types/stripe-js/embedded-checkout.d.ts +0 -30
  57. package/types/stripe-js/ephemeral-keys.d.ts +0 -3
  58. package/types/stripe-js/financial-connections.d.ts +0 -19
  59. package/types/stripe-js/index.d.ts +0 -13
  60. package/types/stripe-js/orders.d.ts +0 -9
  61. package/types/stripe-js/payment-intents.d.ts +0 -1465
  62. package/types/stripe-js/payment-request.d.ts +0 -529
  63. package/types/stripe-js/setup-intents.d.ts +0 -250
  64. package/types/stripe-js/stripe.d.ts +0 -1472
  65. package/types/stripe-js/token-and-sources.d.ts +0 -110
  66. package/types/utils.d.ts +0 -2
@@ -1,119 +0,0 @@
1
- export type StripeAfterpayClearpayMessageElement = {
2
- /**
3
- * The `element.mount` method attaches your [Element](https://stripe.com/docs/js/element) to the DOM.
4
- * `element.mount` accepts either a CSS Selector (e.g., `'#afterpay-clearpay-message'`) or a DOM element.
5
- */
6
- mount(domElement: string | HTMLElement): void;
7
-
8
- /**
9
- * Removes the element from the DOM and destroys it.
10
- * A destroyed element can not be re-activated or re-mounted to the DOM.
11
- */
12
- destroy(): void;
13
-
14
- /**
15
- * Unmounts the element from the DOM.
16
- * Call `element.mount` to re-attach it to the DOM.
17
- */
18
- unmount(): void;
19
-
20
- /**
21
- * Updates the options the `AfterpayClearpayMessageElement` was initialized with.
22
- * Updates are merged into the existing configuration.
23
- */
24
- update(options: Partial<StripeAfterpayClearpayMessageElementOptions>): void;
25
-
26
- /**
27
- * Triggered when the element is fully loaded and ready to perform method calls.
28
- */
29
- on(
30
- eventType: 'ready',
31
- handler: (event: {elementType: 'afterpayClearpayMessage'}) => any
32
- ): StripeAfterpayClearpayMessageElement;
33
- };
34
-
35
- export interface StripeAfterpayClearpayMessageElementOptions {
36
- /**
37
- * The total amount, divided into 4 installments, in the smallest currency unit.
38
- */
39
- amount: number;
40
-
41
- /**
42
- * The currency to display.
43
- */
44
- currency: 'USD' | 'AUD' | 'CAD' | 'GBP' | 'NZD' | 'EUR';
45
-
46
- /**
47
- * The badge color theme, applied when `logoType` is set to badge.
48
- */
49
- badgeTheme?:
50
- | 'black-on-mint'
51
- | 'black-on-white'
52
- | 'mint-on-black'
53
- | 'white-on-black';
54
-
55
- /**
56
- * The leading text for the mesage.
57
- */
58
- introText?: 'In' | 'in' | 'Or' | 'or' | 'Pay' | 'pay' | 'Pay in' | 'pay in';
59
-
60
- /**
61
- * Indicates whether an item is eligible for purchase with Afterpay Clearpay.
62
- */
63
- isEligible?: boolean;
64
-
65
- /**
66
- * Indicates whether an entire cart is eligible for purchase with Afterpay Clearpay.
67
- */
68
- isCartEligible?: boolean;
69
-
70
- /**
71
- * The lockup color theme, applied when `logoType` is set to lockup.
72
- */
73
- lockupTheme?: 'black' | 'white' | 'mint';
74
-
75
- /**
76
- * The logo style to display.
77
- */
78
- logoType?: 'badge' | 'lockup';
79
-
80
- /**
81
- * The maximum `amount` allowed for a purchase. This should match the limit defined in your Stripe dashboard.
82
- */
83
- max?: number;
84
-
85
- /**
86
- * The minimum `amount` allowed for a purchase. This should match the limit defined in your Stripe dashboard.
87
- */
88
- min?: number;
89
-
90
- /**
91
- * The style of modal link to display.
92
- */
93
- modalLinkStyle?: 'circled-info-icon' | 'learn-more-text' | 'more-info-text';
94
-
95
- /**
96
- * The background color for the info modal.
97
- */
98
- modalTheme?: 'mint' | 'white';
99
-
100
- /**
101
- * Determines whether 'interest-free' is displayed in the message.
102
- */
103
- showInterestFree?: boolean;
104
-
105
- /**
106
- * Determines whether 'with' is displayed before the logo.
107
- */
108
- showLowerLimit?: boolean;
109
-
110
- /**
111
- * Determines whether the lower limit is displayed when `amount` exceeds price limits.
112
- */
113
- showUpperLimit?: boolean;
114
-
115
- /**
116
- * Determines whether the upper limit is displayed when `amount` exceeds price limits.
117
- */
118
- showWith?: boolean;
119
- }
@@ -1,156 +0,0 @@
1
- export type ApplePayRecurringPaymentRequestIntervalUnit =
2
- | 'year'
3
- | 'month'
4
- | 'day'
5
- | 'hour'
6
- | 'minute';
7
-
8
- export interface ApplePayLineItem {
9
- /**
10
- * A short, localized description of the line item.
11
- */
12
- label: string;
13
-
14
- /**
15
- * The amount in the currency's subunit (e.g. cents, yen, etc.)
16
- */
17
- amount: number;
18
- }
19
-
20
- export type ApplePayRegularBilling = ApplePayLineItem & {
21
- /**
22
- * The date of the first payment.
23
- */
24
- recurringPaymentStartDate?: Date;
25
-
26
- /**
27
- * The date of the final payment.
28
- */
29
- recurringPaymentEndDate?: Date;
30
-
31
- /**
32
- * The amount of time — in calendar units, such as day, month, or year — that represents a fraction of the total payment interval.
33
- */
34
- recurringPaymentIntervalUnit?: ApplePayRecurringPaymentRequestIntervalUnit;
35
-
36
- /**
37
- * The number of interval units that make up the total payment interval.
38
- */
39
- recurringPaymentIntervalCount?: number;
40
- };
41
-
42
- export interface ApplePayRecurringPaymentRequest {
43
- /**
44
- * The description of the payment that the customer will see in their Apple Pay wallet.
45
- */
46
- paymentDescription: string;
47
-
48
- /**
49
- * The URL to manage items related to the recurring payment on your website.
50
- */
51
- managementURL: string;
52
- regularBilling: ApplePayRegularBilling;
53
-
54
- /**
55
- * The billing agreement label that is displayed to the customer in the Apple Pay payment interface.
56
- */
57
- billingAgreement?: string;
58
- }
59
-
60
- export type ApplePayAutomaticReloadBilling = ApplePayLineItem & {
61
- /**
62
- * The balance an account reaches before the merchant applies the automatic reload amount.
63
- */
64
- automaticReloadPaymentThresholdAmount: number;
65
- };
66
-
67
- export interface ApplePayAutomaticReloadPaymentRequest {
68
- /**
69
- * The description of the payment that the customer will see in their Apple Pay wallet.
70
- */
71
- paymentDescription: string;
72
-
73
- /**
74
- * The URL to manage items related to the automatic reload payment on your website.
75
- */
76
- managementURL: string;
77
- automaticReloadBilling: ApplePayAutomaticReloadBilling;
78
-
79
- /**
80
- * The billing agreement label that is displayed to the customer in the Apple Pay payment interface.
81
- */
82
- billingAgreement?: string;
83
- }
84
-
85
- export type ApplePayDeferredBilling = ApplePayLineItem & {
86
- /**
87
- * The date, in the future, of the payment.
88
- */
89
- deferredPaymentDate: Date;
90
- };
91
-
92
- export interface ApplePayDeferredPaymentRequest {
93
- /**
94
- * The description of the payment that the customer will see in their Apple Pay wallet.
95
- */
96
- paymentDescription: string;
97
-
98
- /**
99
- * The URL to manage items related to the deferred payment on your website.
100
- */
101
- managementURL: string;
102
- deferredBilling: ApplePayDeferredBilling;
103
-
104
- /**
105
- * The billing agreement label that is displayed to the customer in the Apple Pay payment interface.
106
- */
107
- billingAgreement?: string;
108
-
109
- /**
110
- * The future date before which the customer can cancel the deferred payment for free.
111
- */
112
- freeCancellationDate?: Date;
113
-
114
- /**
115
- * The time zone of the free cancellation date.
116
- *
117
- * These are [tz](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) timezones such as `America/Los_Angeles`, `Europe/Dublin`, and `Asia/Singapore`.
118
- */
119
- freeCancellationDateTimeZone?: string;
120
- }
121
-
122
- export type ApplePayOption =
123
- | {
124
- recurringPaymentRequest: ApplePayRecurringPaymentRequest;
125
- deferredPaymentRequest?: null;
126
- automaticReloadPaymentRequest?: null;
127
- }
128
- | {
129
- recurringPaymentRequest?: null;
130
- deferredPaymentRequest: ApplePayDeferredPaymentRequest;
131
- automaticReloadPaymentRequest?: null;
132
- }
133
- | {
134
- recurringPaymentRequest?: null;
135
- deferredPaymentRequest?: null;
136
- automaticReloadPaymentRequest: ApplePayAutomaticReloadPaymentRequest;
137
- }
138
- | {
139
- recurringPaymentRequest?: null;
140
- deferredPaymentRequest?: null;
141
- automaticReloadPaymentRequest?: null;
142
- };
143
-
144
- export type ApplePayUpdateOption =
145
- | {
146
- recurringPaymentRequest: ApplePayRecurringPaymentRequest;
147
- automaticReloadPaymentRequest?: null;
148
- }
149
- | {
150
- recurringPaymentRequest?: null;
151
- automaticReloadPaymentRequest: ApplePayAutomaticReloadPaymentRequest;
152
- }
153
- | {
154
- recurringPaymentRequest?: null;
155
- automaticReloadPaymentRequest?: null;
156
- };
@@ -1,138 +0,0 @@
1
- import {
2
- StripeElementBase,
3
- StripeElementStyle,
4
- StripeElementClasses,
5
- StripeElementChangeEvent,
6
- } from './base';
7
-
8
- export type StripeAuBankAccountElement = StripeElementBase & {
9
- /**
10
- * The change event is triggered when the `Element`'s value changes.
11
- */
12
- on(
13
- eventType: 'change',
14
- handler: (event: StripeAuBankAccountElementChangeEvent) => any
15
- ): StripeAuBankAccountElement;
16
- once(
17
- eventType: 'change',
18
- handler: (event: StripeAuBankAccountElementChangeEvent) => any
19
- ): StripeAuBankAccountElement;
20
- off(
21
- eventType: 'change',
22
- handler?: (event: StripeAuBankAccountElementChangeEvent) => any
23
- ): StripeAuBankAccountElement;
24
-
25
- /**
26
- * Triggered when the element is fully rendered and can accept `element.focus` calls.
27
- */
28
- on(
29
- eventType: 'ready',
30
- handler: (event: {elementType: 'auBankAccount'}) => any
31
- ): StripeAuBankAccountElement;
32
- once(
33
- eventType: 'ready',
34
- handler: (event: {elementType: 'auBankAccount'}) => any
35
- ): StripeAuBankAccountElement;
36
- off(
37
- eventType: 'ready',
38
- handler?: (event: {elementType: 'auBankAccount'}) => any
39
- ): StripeAuBankAccountElement;
40
-
41
- /**
42
- * Triggered when the element gains focus.
43
- */
44
- on(
45
- eventType: 'focus',
46
- handler: (event: {elementType: 'auBankAccount'}) => any
47
- ): StripeAuBankAccountElement;
48
- once(
49
- eventType: 'focus',
50
- handler: (event: {elementType: 'auBankAccount'}) => any
51
- ): StripeAuBankAccountElement;
52
- off(
53
- eventType: 'focus',
54
- handler?: (event: {elementType: 'auBankAccount'}) => any
55
- ): StripeAuBankAccountElement;
56
-
57
- /**
58
- * Triggered when the element loses focus.
59
- */
60
- on(
61
- eventType: 'blur',
62
- handler: (event: {elementType: 'auBankAccount'}) => any
63
- ): StripeAuBankAccountElement;
64
- once(
65
- eventType: 'blur',
66
- handler: (event: {elementType: 'auBankAccount'}) => any
67
- ): StripeAuBankAccountElement;
68
- off(
69
- eventType: 'blur',
70
- handler?: (event: {elementType: 'auBankAccount'}) => any
71
- ): StripeAuBankAccountElement;
72
-
73
- /**
74
- * Triggered when the escape key is pressed within the element.
75
- */
76
- on(
77
- eventType: 'escape',
78
- handler: (event: {elementType: 'auBankAccount'}) => any
79
- ): StripeAuBankAccountElement;
80
- once(
81
- eventType: 'escape',
82
- handler: (event: {elementType: 'auBankAccount'}) => any
83
- ): StripeAuBankAccountElement;
84
- off(
85
- eventType: 'escape',
86
- handler?: (event: {elementType: 'auBankAccount'}) => any
87
- ): StripeAuBankAccountElement;
88
-
89
- /**
90
- * Updates the options the `AuBankAccountElement` was initialized with.
91
- * Updates are merged into the existing configuration.
92
- *
93
- * The styles of an `AuBankAccountElement` can be dynamically changed using `element.update`.
94
- * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
95
- */
96
- update(options: Partial<StripeAuBankAccountElementOptions>): void;
97
- };
98
-
99
- export interface StripeAuBankAccountElementOptions {
100
- classes?: StripeElementClasses;
101
-
102
- style?: StripeElementStyle;
103
-
104
- /**
105
- * Appearance of the icon in the Element.
106
- */
107
- iconStyle?: 'default' | 'solid';
108
-
109
- /**
110
- * Hides the icon in the Element.
111
- * Default is `false`.
112
- */
113
- hideIcon?: boolean;
114
-
115
- /**
116
- * Applies a disabled state to the Element such that user input is not accepted.
117
- * Default is false.
118
- */
119
- disabled?: boolean;
120
- }
121
-
122
- export interface StripeAuBankAccountElementChangeEvent
123
- extends StripeElementChangeEvent {
124
- /**
125
- * The type of element that emitted this event.
126
- */
127
- elementType: 'auBankAccount';
128
-
129
- /**
130
- * The bank name corresponding to the entered BSB.
131
- */
132
- bankName?: string;
133
-
134
- /**
135
- * The branch name corresponding to the entered BSB.
136
- */
137
- branchName?: string;
138
- }
@@ -1,264 +0,0 @@
1
- import {StripeElementType} from '../elements-group';
2
-
3
- export type StripeElementBase = {
4
- /**
5
- * The `element.mount` method attaches your [Element](https://stripe.com/docs/js/element) to the DOM.
6
- * `element.mount` accepts either a CSS Selector (e.g., `'#card-element'`) or a DOM element.
7
- *
8
- * You need to create a container DOM element to mount an `Element`.
9
- * If the container DOM element has a label, the `Element` is automatically focused when its label is clicked.
10
- * There are two ways to do this:
11
- *
12
- * 1. Mount the instance within a `<label>`.
13
- * 2. Create a `<label>` with a `for` attribute, referencing the ID of your container.
14
- */
15
- mount(domElement: string | HTMLElement): void;
16
-
17
- /**
18
- * Blurs the element.
19
- */
20
- blur(): void;
21
-
22
- /**
23
- * Clears the value(s) of the element.
24
- */
25
- clear(): void;
26
-
27
- /**
28
- * Removes the element from the DOM and destroys it.
29
- * A destroyed element can not be re-activated or re-mounted to the DOM.
30
- */
31
- destroy(): void;
32
-
33
- /**
34
- * Focuses the element.
35
- */
36
- focus(): void;
37
-
38
- /**
39
- * Unmounts the element from the DOM.
40
- * Call `element.mount` to re-attach it to the DOM.
41
- */
42
- unmount(): void;
43
- };
44
-
45
- /**
46
- * Customize the appearance of an element using CSS properties passed in a `Style` object, which consists of CSS properties nested under objects for each variant.
47
- */
48
- export interface StripeElementStyle {
49
- /**
50
- * Base variant—all other variants inherit from these styles.
51
- */
52
- base?: StripeElementStyleVariant;
53
-
54
- /**
55
- * Applied when the element has valid input.
56
- */
57
- complete?: StripeElementStyleVariant;
58
-
59
- /**
60
- * Applied when the element has no customer input.
61
- */
62
- empty?: StripeElementStyleVariant;
63
-
64
- /**
65
- * Applied when the element has invalid input.
66
- */
67
- invalid?: StripeElementStyleVariant;
68
- }
69
-
70
- /**
71
- * An object with `CSSProperties` supported by Stripe.js.
72
- * Pseudo-classes and pseudo-elements can also be styled using a nested object inside of a variant.
73
- */
74
- export interface StripeElementStyleVariant extends StripeElementCSSProperties {
75
- ':hover'?: StripeElementCSSProperties;
76
-
77
- ':focus'?: StripeElementCSSProperties;
78
-
79
- '::placeholder'?: StripeElementCSSProperties;
80
-
81
- '::selection'?: StripeElementCSSProperties;
82
-
83
- ':-webkit-autofill'?: StripeElementCSSProperties;
84
-
85
- /**
86
- * Available for all elements except the `paymentRequestButton` element
87
- */
88
- ':disabled'?: StripeElementCSSProperties;
89
-
90
- /**
91
- * Available for the `cardNumber`, `cardExpiry`, and `cardCvc` elements.
92
- */
93
- '::-ms-clear'?: StripeElementCSSProperties & {display: string};
94
- }
95
-
96
- /**
97
- * CSS properties supported by Stripe.js.
98
- */
99
- export interface StripeElementCSSProperties {
100
- /**
101
- * The [background-color](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color) CSS property.
102
- *
103
- * This property works best with the `::selection` pseudo-class.
104
- * In other cases, consider setting the background color on the element's container instaed.
105
- */
106
- backgroundColor?: string;
107
-
108
- /**
109
- * The [color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) CSS property.
110
- */
111
- color?: string;
112
-
113
- /**
114
- * The [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) CSS property.
115
- */
116
- fontFamily?: string;
117
-
118
- /**
119
- * The [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) CSS property.
120
- */
121
- fontSize?: string;
122
-
123
- /**
124
- * The [font-smoothing](https://developer.mozilla.org/en-US/docs/Web/CSS/font-smoothing) CSS property.
125
- */
126
- fontSmoothing?: string;
127
-
128
- /**
129
- * The [font-style](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style) CSS property.
130
- */
131
- fontStyle?: string;
132
-
133
- /**
134
- * The [font-variant](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant) CSS property.
135
- */
136
- fontVariant?: string;
137
-
138
- /**
139
- * The [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) CSS property.
140
- */
141
- fontWeight?: string | number;
142
-
143
- /**
144
- * A custom property, used to set the color of the icons that are rendered in an element.
145
- */
146
- iconColor?: string;
147
-
148
- /**
149
- * The [line-height](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) CSS property.
150
- *
151
- * To avoid cursors being rendered inconsistently across browsers, consider using a padding on the element's container instead.
152
- */
153
- lineHeight?: string;
154
-
155
- /**
156
- * The [letter-spacing](https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing) CSS property.
157
- */
158
- letterSpacing?: string;
159
-
160
- /**
161
- * The [text-align](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) CSS property.
162
- *
163
- * Available for the `cardNumber`, `cardExpiry`, and `cardCvc` elements.
164
- */
165
- textAlign?: string;
166
-
167
- /**
168
- * The [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) CSS property.
169
- *
170
- * Available for the `idealBank` element.
171
- * Accepts integer length with `px` unit as values.
172
- */
173
- padding?: string;
174
-
175
- /**
176
- * The [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) CSS property.
177
- */
178
- textDecoration?: string;
179
-
180
- /**
181
- * The [text-shadow](https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow) CSS property.
182
- */
183
- textShadow?: string;
184
-
185
- /**
186
- * The [text-transform](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform) CSS property.
187
- */
188
- textTransform?: string;
189
- }
190
-
191
- /**
192
- * Use `Classes` to set custom class names on the container DOM element when the Stripe element is in a particular state.
193
- */
194
- export interface StripeElementClasses {
195
- /**
196
- * The base class applied to the container.
197
- * Defaults to `StripeElement`.
198
- */
199
- base?: string;
200
-
201
- /**
202
- * The class name to apply when the `Element` is complete.
203
- * Defaults to `StripeElement--complete`.
204
- */
205
- complete?: string;
206
-
207
- /**
208
- * The class name to apply when the `Element` is empty.
209
- * Defaults to `StripeElement--empty`.
210
- */
211
- empty?: string;
212
-
213
- /**
214
- * The class name to apply when the `Element` is focused.
215
- * Defaults to `StripeElement--focus`.
216
- */
217
- focus?: string;
218
-
219
- /**
220
- * The class name to apply when the `Element` is invalid.
221
- * Defaults to `StripeElement--invalid`.
222
- */
223
- invalid?: string;
224
-
225
- /**
226
- * The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).
227
- * Defaults to `StripeElement--webkit-autofill`.
228
- */
229
- webkitAutofill?: string;
230
- }
231
-
232
- export interface StripeElementChangeEvent {
233
- /**
234
- * The type of element that emitted this event.
235
- */
236
- elementType: StripeElementType;
237
-
238
- /**
239
- * `true` if the value is empty.
240
- */
241
- empty: boolean;
242
-
243
- /**
244
- * `true` if the value is well-formed and potentially complete.
245
- * The `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.
246
- *
247
- * It is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.
248
- * In many cases the customer could still add further input.
249
- *
250
- * The `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.
251
- */
252
- complete: boolean;
253
-
254
- /**
255
- * The current validation error, if any.
256
- */
257
- error:
258
- | undefined
259
- | {
260
- type: 'validation_error';
261
- code: string;
262
- message: string;
263
- };
264
- }