@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,140 +0,0 @@
1
- import {
2
- StripeElementBase,
3
- StripeElementStyle,
4
- StripeElementClasses,
5
- StripeElementChangeEvent,
6
- } from './base';
7
-
8
- export type StripeIdealBankElement = StripeElementBase & {
9
- /**
10
- * The change event is triggered when the `Element`'s value changes.
11
- */
12
- on(
13
- eventType: 'change',
14
- handler: (event: StripeIdealBankElementChangeEvent) => any
15
- ): StripeIdealBankElement;
16
- once(
17
- eventType: 'change',
18
- handler: (event: StripeIdealBankElementChangeEvent) => any
19
- ): StripeIdealBankElement;
20
- off(
21
- eventType: 'change',
22
- handler?: (event: StripeIdealBankElementChangeEvent) => any
23
- ): StripeIdealBankElement;
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: 'idealBank'}) => any
31
- ): StripeIdealBankElement;
32
- once(
33
- eventType: 'ready',
34
- handler: (event: {elementType: 'idealBank'}) => any
35
- ): StripeIdealBankElement;
36
- off(
37
- eventType: 'ready',
38
- handler?: (event: {elementType: 'idealBank'}) => any
39
- ): StripeIdealBankElement;
40
-
41
- /**
42
- * Triggered when the element gains focus.
43
- */
44
- on(
45
- eventType: 'focus',
46
- handler: (event: {elementType: 'idealBank'}) => any
47
- ): StripeIdealBankElement;
48
- once(
49
- eventType: 'focus',
50
- handler: (event: {elementType: 'idealBank'}) => any
51
- ): StripeIdealBankElement;
52
- off(
53
- eventType: 'focus',
54
- handler?: (event: {elementType: 'idealBank'}) => any
55
- ): StripeIdealBankElement;
56
-
57
- /**
58
- * Triggered when the element loses focus.
59
- */
60
- on(
61
- eventType: 'blur',
62
- handler: (event: {elementType: 'idealBank'}) => any
63
- ): StripeIdealBankElement;
64
- once(
65
- eventType: 'blur',
66
- handler: (event: {elementType: 'idealBank'}) => any
67
- ): StripeIdealBankElement;
68
- off(
69
- eventType: 'blur',
70
- handler?: (event: {elementType: 'idealBank'}) => any
71
- ): StripeIdealBankElement;
72
-
73
- /**
74
- * Triggered when the escape key is pressed within the element.
75
- */
76
- on(
77
- eventType: 'escape',
78
- handler: (event: {elementType: 'idealBank'}) => any
79
- ): StripeIdealBankElement;
80
- once(
81
- eventType: 'escape',
82
- handler: (event: {elementType: 'idealBank'}) => any
83
- ): StripeIdealBankElement;
84
- off(
85
- eventType: 'escape',
86
- handler?: (event: {elementType: 'idealBank'}) => any
87
- ): StripeIdealBankElement;
88
-
89
- /**
90
- * Updates the options the `IdealBankElement` was initialized with.
91
- * Updates are merged into the existing configuration.
92
- *
93
- * The styles of an `IdealBankElement` 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<StripeIdealBankElementOptions>): void;
97
- };
98
-
99
- export interface StripeIdealBankElementOptions {
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
- * A pre-filled value for the Element.
111
- * Can be one of the banks listed in the [iDEAL guide](https://stripe.com/docs/sources/ideal#specifying-customer-bank) (e.g., `abn_amro`).
112
- */
113
- value?: string;
114
-
115
- /**
116
- * Hides the icon in the Element.
117
- * Default is `false`.
118
- */
119
- hideIcon?: boolean;
120
-
121
- /**
122
- * Applies a disabled state to the Element such that user input is not accepted.
123
- * Default is false.
124
- */
125
- disabled?: boolean;
126
- }
127
-
128
- export interface StripeIdealBankElementChangeEvent
129
- extends StripeElementChangeEvent {
130
- /**
131
- * The type of element that emitted this event.
132
- */
133
- elementType: 'idealBank';
134
-
135
- /**
136
- * The selected bank.
137
- * Can be one of the banks listed in the [iDEAL guide](https://stripe.com/docs/sources/ideal#specifying-customer-bank).
138
- */
139
- value: string;
140
- }
@@ -1,22 +0,0 @@
1
- export * from './address';
2
- export * from './payment-method-messaging';
3
- export * from './affirm-message';
4
- export * from './afterpay-clearpay-message';
5
- export * from './au-bank-account';
6
- export * from './base';
7
- export * from './card-cvc';
8
- export * from './card-expiry';
9
- export * from './card-number';
10
- export * from './card';
11
- export * from './cart';
12
- export * from './eps-bank';
13
- export * from './express-checkout';
14
- export * from './fpx-bank';
15
- export * from './iban';
16
- export * from './ideal-bank';
17
- export * from './link-authentication';
18
- export * from './p24-bank';
19
- export * from './payment-request-button';
20
- export * from './payment';
21
- export * from './shipping-address';
22
- export * from './issuing';
@@ -1,5 +0,0 @@
1
- export * from './issuing-card-number-display';
2
- export * from './issuing-card-cvc-display';
3
- export * from './issuing-card-expiry-display';
4
- export * from './issuing-card-pin-display';
5
- export * from './issuing-card-copy-button';
@@ -1,37 +0,0 @@
1
- import {StripeElementBase, StripeElementStyle} from '../base';
2
-
3
- export type StripeIssuingCardCopyButtonElement = StripeElementBase & {
4
- /**
5
- * Triggered when the element is clicked.
6
- */
7
- on(
8
- eventType: 'click',
9
- handler: (event: {elementType: 'issuingCardCopyButton'}) => any
10
- ): StripeIssuingCardCopyButtonElement;
11
- once(
12
- eventType: 'click',
13
- handler: (event: {elementType: 'issuingCardCopyButton'}) => any
14
- ): StripeIssuingCardCopyButtonElement;
15
- off(
16
- eventType: 'click',
17
- handler?: (event: {elementType: 'issuingCardCopyButton'}) => any
18
- ): StripeIssuingCardCopyButtonElement;
19
-
20
- /**
21
- * Updates the options the `IssuingCardCopyButtonElement` was initialized with.
22
- * Updates are merged into the existing configuration.
23
- *
24
- * The styles of an `IssuingCardCopyButtonElement` can be dynamically changed using `element.update`.
25
- * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
26
- */
27
- update(options: Partial<StripeIssuingCardCopyButtonElementOptions>): void;
28
- };
29
-
30
- export interface StripeIssuingCardCopyButtonElementOptions {
31
- /**
32
- * The issued card data element to copy to the user's clipboard
33
- */
34
- toCopy: 'expiry' | 'cvc' | 'number' | 'pin';
35
-
36
- style?: StripeElementStyle;
37
- }
@@ -1,32 +0,0 @@
1
- import {StripeElementBase, StripeElementStyle} from '../base';
2
-
3
- export type StripeIssuingCardCvcDisplayElement = StripeElementBase & {
4
- /**
5
- * Updates the options the `IssuingCardCvcDisplayElement` was initialized with.
6
- * Updates are merged into the existing configuration.
7
- *
8
- * The styles of an `IssuingCardCvcDisplayElement` can be dynamically changed using `element.update`.
9
- * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
10
- */
11
- update(options: Partial<StripeIssuingCardCvcDisplayElementOptions>): void;
12
- };
13
-
14
- export interface StripeIssuingCardCvcDisplayElementOptions {
15
- /**
16
- * The token (e.g. `ic_abc123`) of the issued card to display in this Element
17
- */
18
- issuingCard: string;
19
-
20
- /**
21
- * The secret component of the ephemeral key with which to authenticate this sensitive
22
- * card details request
23
- */
24
- ephemeralKeySecret?: string;
25
-
26
- /**
27
- * The nonce used to mint the ephemeral key provided in `ephemeralKeySecret`
28
- */
29
- nonce?: string;
30
-
31
- style?: StripeElementStyle;
32
- }
@@ -1,32 +0,0 @@
1
- import {StripeElementBase, StripeElementStyle} from '../base';
2
-
3
- export type StripeIssuingCardExpiryDisplayElement = StripeElementBase & {
4
- /**
5
- * Updates the options the `IssuingCardExpiryDisplayElement` was initialized with.
6
- * Updates are merged into the existing configuration.
7
- *
8
- * The styles of an `IssuingCardExpiryDisplayElement` can be dynamically changed using `element.update`.
9
- * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
10
- */
11
- update(options: Partial<StripeIssuingCardExpiryDisplayElementOptions>): void;
12
- };
13
-
14
- export interface StripeIssuingCardExpiryDisplayElementOptions {
15
- /**
16
- * The token (e.g. `ic_abc123`) of the issued card to display in this Element
17
- */
18
- issuingCard: string;
19
-
20
- /**
21
- * The secret component of the ephemeral key with which to authenticate this sensitive
22
- * card details request
23
- */
24
- ephemeralKeySecret?: string;
25
-
26
- /**
27
- * The nonce used to mint the ephemeral key provided in `ephemeralKeySecret`
28
- */
29
- nonce?: string;
30
-
31
- style?: StripeElementStyle;
32
- }
@@ -1,40 +0,0 @@
1
- import {StripeElementBase, StripeElementStyle} from '../base';
2
-
3
- export type StripeIssuingCardNumberDisplayElement = StripeElementBase & {
4
- /**
5
- * Updates the options the `IssuingCardNumberDisplayElement` was initialized with.
6
- * Updates are merged into the existing configuration.
7
- *
8
- * The styles of an `IssuingCardNumberDisplayElement` can be dynamically changed using `element.update`.
9
- * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
10
- */
11
- update(options: Partial<StripeIssuingCardNumberDisplayElementOptions>): void;
12
-
13
- /**
14
- * Triggered when the element is fully rendered and can accept `element.focus` calls.
15
- */
16
- on(
17
- eventType: 'ready',
18
- handler: (event: {elementType: 'issuingCardNumberDisplay'}) => any
19
- ): StripeIssuingCardNumberDisplayElement;
20
- };
21
-
22
- export interface StripeIssuingCardNumberDisplayElementOptions {
23
- /**
24
- * The token (e.g. `ic_abc123`) of the issued card to display in this Element
25
- */
26
- issuingCard: string;
27
-
28
- /**
29
- * The secret component of the ephemeral key with which to authenticate this sensitive
30
- * card details request
31
- */
32
- ephemeralKeySecret?: string;
33
-
34
- /**
35
- * The nonce used to mint the ephemeral key provided in `ephemeralKeySecret`
36
- */
37
- nonce?: string;
38
-
39
- style?: StripeElementStyle;
40
- }
@@ -1,32 +0,0 @@
1
- import {StripeElementBase, StripeElementStyle} from '../base';
2
-
3
- export type StripeIssuingCardPinDisplayElement = StripeElementBase & {
4
- /**
5
- * Updates the options the `IssuingCardPinDisplayElement` was initialized with.
6
- * Updates are merged into the existing configuration.
7
- *
8
- * The styles of an `IssuingCardPinDisplayElement` can be dynamically changed using `element.update`.
9
- * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
10
- */
11
- update(options: Partial<StripeIssuingCardPinDisplayElementOptions>): void;
12
- };
13
-
14
- export interface StripeIssuingCardPinDisplayElementOptions {
15
- /**
16
- * The token (e.g. `ic_abc123`) of the issued card to display in this Element
17
- */
18
- issuingCard: string;
19
-
20
- /**
21
- * The secret component of the ephemeral key with which to authenticate this sensitive
22
- * card details request
23
- */
24
- ephemeralKeySecret?: string;
25
-
26
- /**
27
- * The nonce used to mint the ephemeral key provided in `ephemeralKeySecret`
28
- */
29
- nonce?: string;
30
-
31
- style?: StripeElementStyle;
32
- }
@@ -1,158 +0,0 @@
1
- import {StripeElementBase} from './base';
2
- import {StripeError} from '../stripe';
3
-
4
- export type StripeLinkAuthenticationElement = StripeElementBase & {
5
- /**
6
- * The change event is triggered when the `Element`'s value changes.
7
- */
8
- on(
9
- eventType: 'change',
10
- handler: (event: StripeLinkAuthenticationElementChangeEvent) => any
11
- ): StripeLinkAuthenticationElement;
12
- once(
13
- eventType: 'change',
14
- handler: (event: StripeLinkAuthenticationElementChangeEvent) => any
15
- ): StripeLinkAuthenticationElement;
16
- off(
17
- eventType: 'change',
18
- handler?: (event: StripeLinkAuthenticationElementChangeEvent) => any
19
- ): StripeLinkAuthenticationElement;
20
-
21
- /**
22
- * Triggered when the element is fully rendered and can accept `element.focus` calls.
23
- */
24
- on(
25
- eventType: 'ready',
26
- handler: (event: {elementType: 'linkAuthentication'}) => any
27
- ): StripeLinkAuthenticationElement;
28
- once(
29
- eventType: 'ready',
30
- handler: (event: {elementType: 'linkAuthentication'}) => any
31
- ): StripeLinkAuthenticationElement;
32
- off(
33
- eventType: 'ready',
34
- handler?: (event: {elementType: 'linkAuthentication'}) => any
35
- ): StripeLinkAuthenticationElement;
36
-
37
- /**
38
- * Triggered when the element gains focus.
39
- */
40
- on(
41
- eventType: 'focus',
42
- handler: (event: {elementType: 'linkAuthentication'}) => any
43
- ): StripeLinkAuthenticationElement;
44
- once(
45
- eventType: 'focus',
46
- handler: (event: {elementType: 'linkAuthentication'}) => any
47
- ): StripeLinkAuthenticationElement;
48
- off(
49
- eventType: 'focus',
50
- handler?: (event: {elementType: 'linkAuthentication'}) => any
51
- ): StripeLinkAuthenticationElement;
52
-
53
- /**
54
- * Triggered when the element loses focus.
55
- */
56
- on(
57
- eventType: 'blur',
58
- handler: (event: {elementType: 'linkAuthentication'}) => any
59
- ): StripeLinkAuthenticationElement;
60
- once(
61
- eventType: 'blur',
62
- handler: (event: {elementType: 'linkAuthentication'}) => any
63
- ): StripeLinkAuthenticationElement;
64
- off(
65
- eventType: 'blur',
66
- handler?: (event: {elementType: 'linkAuthentication'}) => any
67
- ): StripeLinkAuthenticationElement;
68
-
69
- /**
70
- * Triggered when the escape key is pressed within the element.
71
- */
72
- on(
73
- eventType: 'escape',
74
- handler: (event: {elementType: 'linkAuthentication'}) => any
75
- ): StripeLinkAuthenticationElement;
76
- once(
77
- eventType: 'escape',
78
- handler: (event: {elementType: 'linkAuthentication'}) => any
79
- ): StripeLinkAuthenticationElement;
80
- off(
81
- eventType: 'escape',
82
- handler?: (event: {elementType: 'linkAuthentication'}) => any
83
- ): StripeLinkAuthenticationElement;
84
-
85
- /**
86
- * Triggered when the element fails to load.
87
- */
88
- on(
89
- eventType: 'loaderror',
90
- handler: (event: {
91
- elementType: 'linkAuthentication';
92
- error: StripeError;
93
- }) => any
94
- ): StripeLinkAuthenticationElement;
95
- once(
96
- eventType: 'loaderror',
97
- handler: (event: {
98
- elementType: 'linkAuthentication';
99
- error: StripeError;
100
- }) => any
101
- ): StripeLinkAuthenticationElement;
102
- off(
103
- eventType: 'loaderror',
104
- handler?: (event: {
105
- elementType: 'linkAuthentication';
106
- error: StripeError;
107
- }) => any
108
- ): StripeLinkAuthenticationElement;
109
-
110
- /**
111
- * Triggered when the loader UI is mounted to the DOM and ready to be displayed.
112
- */
113
- on(
114
- eventType: 'loaderstart',
115
- handler: (event: {elementType: 'linkAuthentication'}) => any
116
- ): StripeLinkAuthenticationElement;
117
- once(
118
- eventType: 'loaderstart',
119
- handler: (event: {elementType: 'linkAuthentication'}) => any
120
- ): StripeLinkAuthenticationElement;
121
- off(
122
- eventType: 'loaderstart',
123
- handler?: (event: {elementType: 'linkAuthentication'}) => any
124
- ): StripeLinkAuthenticationElement;
125
- };
126
-
127
- export interface StripeLinkAuthenticationElementOptions {
128
- /**
129
- * Default value for LinkAuthenticationElement fields
130
- */
131
- defaultValues?: {
132
- email: string;
133
- };
134
- }
135
-
136
- export interface StripeLinkAuthenticationElementChangeEvent {
137
- /**
138
- * The type of element that emitted this event.
139
- */
140
- elementType: 'linkAuthentication';
141
-
142
- /**
143
- * Whether or not the LinkAuthentication Element is currently empty.
144
- */
145
- empty: boolean;
146
-
147
- /**
148
- * Whether or not the LinkAuthentication Element is complete.
149
- */
150
- complete: boolean;
151
-
152
- /**
153
- * An object containing the current email.
154
- */
155
- value: {
156
- email: string;
157
- };
158
- }
@@ -1,140 +0,0 @@
1
- import {
2
- StripeElementBase,
3
- StripeElementStyle,
4
- StripeElementClasses,
5
- StripeElementChangeEvent,
6
- } from './base';
7
-
8
- export type StripeP24BankElement = StripeElementBase & {
9
- /**
10
- * The change event is triggered when the `Element`'s value changes.
11
- */
12
- on(
13
- eventType: 'change',
14
- handler: (event: StripeP24BankElementChangeEvent) => any
15
- ): StripeP24BankElement;
16
- once(
17
- eventType: 'change',
18
- handler: (event: StripeP24BankElementChangeEvent) => any
19
- ): StripeP24BankElement;
20
- off(
21
- eventType: 'change',
22
- handler: (event: StripeP24BankElementChangeEvent) => any
23
- ): StripeP24BankElement;
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: 'p24Bank'}) => any
31
- ): StripeP24BankElement;
32
- once(
33
- eventType: 'ready',
34
- handler: (event: {elementType: 'p24Bank'}) => any
35
- ): StripeP24BankElement;
36
- off(
37
- eventType: 'ready',
38
- handler: (event: {elementType: 'p24Bank'}) => any
39
- ): StripeP24BankElement;
40
-
41
- /**
42
- * Triggered when the element gains focus.
43
- */
44
- on(
45
- eventType: 'focus',
46
- handler: (event: {elementType: 'p24Bank'}) => any
47
- ): StripeP24BankElement;
48
- once(
49
- eventType: 'focus',
50
- handler: (event: {elementType: 'p24Bank'}) => any
51
- ): StripeP24BankElement;
52
- off(
53
- eventType: 'focus',
54
- handler: (event: {elementType: 'p24Bank'}) => any
55
- ): StripeP24BankElement;
56
-
57
- /**
58
- * Triggered when the element loses focus.
59
- */
60
- on(
61
- eventType: 'blur',
62
- handler: (event: {elementType: 'p24Bank'}) => any
63
- ): StripeP24BankElement;
64
- once(
65
- eventType: 'blur',
66
- handler: (event: {elementType: 'p24Bank'}) => any
67
- ): StripeP24BankElement;
68
- off(
69
- eventType: 'blur',
70
- handler: (event: {elementType: 'p24Bank'}) => any
71
- ): StripeP24BankElement;
72
-
73
- /**
74
- * Triggered when the escape key is pressed within the element.
75
- */
76
- on(
77
- eventType: 'escape',
78
- handler: (event: {elementType: 'p24Bank'}) => any
79
- ): StripeP24BankElement;
80
- once(
81
- eventType: 'escape',
82
- handler: (event: {elementType: 'p24Bank'}) => any
83
- ): StripeP24BankElement;
84
- off(
85
- eventType: 'escape',
86
- handler: (event: {elementType: 'p24Bank'}) => any
87
- ): StripeP24BankElement;
88
-
89
- /**
90
- * Updates the options the `P24BankElement` was initialized with.
91
- * Updates are merged into the existing configuration.
92
- *
93
- * The styles of an `P24BankElement` 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<StripeP24BankElementOptions>): void;
97
- };
98
-
99
- export interface StripeP24BankElementOptions {
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
- * A pre-filled value for the Element.
111
- * Can be one of the banks listed in the [Przelewy24 guide](https://stripe.com/docs/payments/p24/accept-a-payment#bank-values) (e.g., `bank_austria`).
112
- */
113
- value?: string;
114
-
115
- /**
116
- * Hides the icon in the Element.
117
- * Default is `false`.
118
- */
119
- hideIcon?: boolean;
120
-
121
- /**
122
- * Applies a disabled state to the Element such that user input is not accepted.
123
- * Default is false.
124
- */
125
- disabled?: boolean;
126
- }
127
-
128
- export interface StripeP24BankElementChangeEvent
129
- extends StripeElementChangeEvent {
130
- /**
131
- * The type of element that emitted this event.
132
- */
133
- elementType: 'p24Bank';
134
-
135
- /**
136
- * A pre-filled value for the Element.
137
- * Can be one of the banks listed in the [Przelewy24 guide](https://stripe.com/docs/payments/p24/accept-a-payment#bank-values) (e.g., `ing`).
138
- */
139
- value?: string;
140
- }