@stripe/stripe-js 3.0.9 → 3.0.10

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 (129) hide show
  1. package/dist/index.d.mts +12792 -4
  2. package/dist/index.d.ts +12792 -4
  3. package/dist/{index.js → stripe.js} +1 -1
  4. package/dist/{index.mjs → stripe.mjs} +1 -1
  5. package/package.json +10 -11
  6. package/pure/index.d.mts +12771 -1
  7. package/pure/index.d.ts +12771 -1
  8. package/pure/index.js +204 -1
  9. package/pure/index.mjs +200 -1
  10. package/dist/api/bank-accounts.d.mts +0 -61
  11. package/dist/api/bank-accounts.d.ts +0 -61
  12. package/dist/api/cards.d.mts +0 -130
  13. package/dist/api/cards.d.ts +0 -130
  14. package/dist/api/financial-connections.d.mts +0 -232
  15. package/dist/api/financial-connections.d.ts +0 -232
  16. package/dist/api/index.d.mts +0 -11
  17. package/dist/api/index.d.ts +0 -11
  18. package/dist/api/orders.d.mts +0 -122
  19. package/dist/api/orders.d.ts +0 -122
  20. package/dist/api/payment-intents.d.mts +0 -330
  21. package/dist/api/payment-intents.d.ts +0 -330
  22. package/dist/api/payment-methods.d.mts +0 -452
  23. package/dist/api/payment-methods.d.ts +0 -452
  24. package/dist/api/setup-intents.d.mts +0 -184
  25. package/dist/api/setup-intents.d.ts +0 -184
  26. package/dist/api/shared.d.mts +0 -125
  27. package/dist/api/shared.d.ts +0 -125
  28. package/dist/api/sources.d.mts +0 -1045
  29. package/dist/api/sources.d.ts +0 -1045
  30. package/dist/api/tokens.d.mts +0 -639
  31. package/dist/api/tokens.d.ts +0 -639
  32. package/dist/api/verification-sessions.d.mts +0 -9
  33. package/dist/api/verification-sessions.d.ts +0 -9
  34. package/dist/pure.d.mts +0 -5
  35. package/dist/pure.d.ts +0 -5
  36. package/dist/pure.js +0 -204
  37. package/dist/pure.mjs +0 -200
  38. package/dist/shared.d.mts +0 -6
  39. package/dist/shared.d.ts +0 -6
  40. package/dist/stripe-js/checkout.d.mts +0 -153
  41. package/dist/stripe-js/checkout.d.ts +0 -153
  42. package/dist/stripe-js/custom-checkout.d.mts +0 -402
  43. package/dist/stripe-js/custom-checkout.d.ts +0 -402
  44. package/dist/stripe-js/elements/address.d.mts +0 -261
  45. package/dist/stripe-js/elements/address.d.ts +0 -261
  46. package/dist/stripe-js/elements/affirm-message.d.mts +0 -65
  47. package/dist/stripe-js/elements/affirm-message.d.ts +0 -65
  48. package/dist/stripe-js/elements/afterpay-clearpay-message.d.mts +0 -119
  49. package/dist/stripe-js/elements/afterpay-clearpay-message.d.ts +0 -119
  50. package/dist/stripe-js/elements/apple-pay.d.mts +0 -156
  51. package/dist/stripe-js/elements/apple-pay.d.ts +0 -156
  52. package/dist/stripe-js/elements/au-bank-account.d.mts +0 -138
  53. package/dist/stripe-js/elements/au-bank-account.d.ts +0 -138
  54. package/dist/stripe-js/elements/base.d.mts +0 -264
  55. package/dist/stripe-js/elements/base.d.ts +0 -264
  56. package/dist/stripe-js/elements/card-cvc.d.mts +0 -119
  57. package/dist/stripe-js/elements/card-cvc.d.ts +0 -119
  58. package/dist/stripe-js/elements/card-expiry.d.mts +0 -119
  59. package/dist/stripe-js/elements/card-expiry.d.ts +0 -119
  60. package/dist/stripe-js/elements/card-number.d.mts +0 -200
  61. package/dist/stripe-js/elements/card-number.d.ts +0 -200
  62. package/dist/stripe-js/elements/card.d.mts +0 -226
  63. package/dist/stripe-js/elements/card.d.ts +0 -226
  64. package/dist/stripe-js/elements/cart.d.mts +0 -224
  65. package/dist/stripe-js/elements/cart.d.ts +0 -224
  66. package/dist/stripe-js/elements/eps-bank.d.mts +0 -140
  67. package/dist/stripe-js/elements/eps-bank.d.ts +0 -140
  68. package/dist/stripe-js/elements/express-checkout.d.mts +0 -446
  69. package/dist/stripe-js/elements/express-checkout.d.ts +0 -446
  70. package/dist/stripe-js/elements/fpx-bank.d.mts +0 -134
  71. package/dist/stripe-js/elements/fpx-bank.d.ts +0 -134
  72. package/dist/stripe-js/elements/iban.d.mts +0 -135
  73. package/dist/stripe-js/elements/iban.d.ts +0 -135
  74. package/dist/stripe-js/elements/ideal-bank.d.mts +0 -140
  75. package/dist/stripe-js/elements/ideal-bank.d.ts +0 -140
  76. package/dist/stripe-js/elements/index.d.mts +0 -22
  77. package/dist/stripe-js/elements/index.d.ts +0 -22
  78. package/dist/stripe-js/elements/issuing/index.d.mts +0 -5
  79. package/dist/stripe-js/elements/issuing/index.d.ts +0 -5
  80. package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.mts +0 -37
  81. package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +0 -37
  82. package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.mts +0 -32
  83. package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +0 -32
  84. package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.mts +0 -32
  85. package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +0 -32
  86. package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.mts +0 -40
  87. package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.ts +0 -40
  88. package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.mts +0 -32
  89. package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +0 -32
  90. package/dist/stripe-js/elements/link-authentication.d.mts +0 -158
  91. package/dist/stripe-js/elements/link-authentication.d.ts +0 -158
  92. package/dist/stripe-js/elements/p24-bank.d.mts +0 -140
  93. package/dist/stripe-js/elements/p24-bank.d.ts +0 -140
  94. package/dist/stripe-js/elements/payment-method-messaging.d.mts +0 -98
  95. package/dist/stripe-js/elements/payment-method-messaging.d.ts +0 -98
  96. package/dist/stripe-js/elements/payment-request-button.d.mts +0 -151
  97. package/dist/stripe-js/elements/payment-request-button.d.ts +0 -151
  98. package/dist/stripe-js/elements/payment.d.mts +0 -275
  99. package/dist/stripe-js/elements/payment.d.ts +0 -275
  100. package/dist/stripe-js/elements/shipping-address.d.mts +0 -215
  101. package/dist/stripe-js/elements/shipping-address.d.ts +0 -215
  102. package/dist/stripe-js/elements-group.d.mts +0 -1129
  103. package/dist/stripe-js/elements-group.d.ts +0 -1129
  104. package/dist/stripe-js/embedded-checkout.d.mts +0 -35
  105. package/dist/stripe-js/embedded-checkout.d.ts +0 -35
  106. package/dist/stripe-js/ephemeral-keys.d.mts +0 -3
  107. package/dist/stripe-js/ephemeral-keys.d.ts +0 -3
  108. package/dist/stripe-js/financial-connections.d.mts +0 -19
  109. package/dist/stripe-js/financial-connections.d.ts +0 -19
  110. package/dist/stripe-js/index.d.mts +0 -13
  111. package/dist/stripe-js/index.d.ts +0 -13
  112. package/dist/stripe-js/orders.d.mts +0 -9
  113. package/dist/stripe-js/orders.d.ts +0 -9
  114. package/dist/stripe-js/payment-intents.d.mts +0 -1470
  115. package/dist/stripe-js/payment-intents.d.ts +0 -1470
  116. package/dist/stripe-js/payment-request.d.mts +0 -529
  117. package/dist/stripe-js/payment-request.d.ts +0 -529
  118. package/dist/stripe-js/setup-intents.d.mts +0 -250
  119. package/dist/stripe-js/setup-intents.d.ts +0 -250
  120. package/dist/stripe-js/stripe.d.mts +0 -1472
  121. package/dist/stripe-js/stripe.d.ts +0 -1472
  122. package/dist/stripe-js/token-and-sources.d.mts +0 -110
  123. package/dist/stripe-js/token-and-sources.d.ts +0 -110
  124. package/dist/utils.d.mts +0 -2
  125. package/dist/utils.d.ts +0 -2
  126. package/lib/index.d.mts +0 -1
  127. package/lib/index.d.ts +0 -1
  128. package/lib/index.js +0 -2
  129. package/lib/index.mjs +0 -1
@@ -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
- }
@@ -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
- }
@@ -1,119 +0,0 @@
1
- import {
2
- StripeElementBase,
3
- StripeElementStyle,
4
- StripeElementClasses,
5
- StripeElementChangeEvent,
6
- } from './base';
7
-
8
- export type StripeCardCvcElement = StripeElementBase & {
9
- /**
10
- * The change event is triggered when the `Element`'s value changes.
11
- */
12
- on(
13
- eventType: 'change',
14
- handler: (event: StripeCardCvcElementChangeEvent) => any
15
- ): StripeCardCvcElement;
16
- once(
17
- eventType: 'change',
18
- handler: (event: StripeCardCvcElementChangeEvent) => any
19
- ): StripeCardCvcElement;
20
- off(
21
- eventType: 'change',
22
- handler?: (event: StripeCardCvcElementChangeEvent) => any
23
- ): StripeCardCvcElement;
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: 'cardCvc'}) => any
31
- ): StripeCardCvcElement;
32
- once(
33
- eventType: 'ready',
34
- handler: (event: {elementType: 'cardCvc'}) => any
35
- ): StripeCardCvcElement;
36
- off(
37
- eventType: 'ready',
38
- handler?: (event: {elementType: 'cardCvc'}) => any
39
- ): StripeCardCvcElement;
40
-
41
- /**
42
- * Triggered when the element gains focus.
43
- */
44
- on(
45
- eventType: 'focus',
46
- handler: (event: {elementType: 'cardCvc'}) => any
47
- ): StripeCardCvcElement;
48
- once(
49
- eventType: 'focus',
50
- handler: (event: {elementType: 'cardCvc'}) => any
51
- ): StripeCardCvcElement;
52
- off(
53
- eventType: 'focus',
54
- handler?: (event: {elementType: 'cardCvc'}) => any
55
- ): StripeCardCvcElement;
56
-
57
- /**
58
- * Triggered when the element loses focus.
59
- */
60
- on(
61
- eventType: 'blur',
62
- handler: (event: {elementType: 'cardCvc'}) => any
63
- ): StripeCardCvcElement;
64
- once(
65
- eventType: 'blur',
66
- handler: (event: {elementType: 'cardCvc'}) => any
67
- ): StripeCardCvcElement;
68
- off(
69
- eventType: 'blur',
70
- handler?: (event: {elementType: 'cardCvc'}) => any
71
- ): StripeCardCvcElement;
72
-
73
- /**
74
- * Triggered when the escape key is pressed within the element.
75
- */
76
- on(
77
- eventType: 'escape',
78
- handler: (event: {elementType: 'cardCvc'}) => any
79
- ): StripeCardCvcElement;
80
- once(
81
- eventType: 'escape',
82
- handler: (event: {elementType: 'cardCvc'}) => any
83
- ): StripeCardCvcElement;
84
- off(
85
- eventType: 'escape',
86
- handler?: (event: {elementType: 'cardCvc'}) => any
87
- ): StripeCardCvcElement;
88
-
89
- /**
90
- * Updates the options the `CardCvcElement` was initialized with.
91
- * Updates are merged into the existing configuration.
92
- *
93
- * The styles of an `CardCvcElement` 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<StripeCardCvcElementOptions>): void;
97
- };
98
-
99
- export interface StripeCardCvcElementOptions {
100
- classes?: StripeElementClasses;
101
-
102
- style?: StripeElementStyle;
103
-
104
- placeholder?: string;
105
-
106
- /**
107
- * Applies a disabled state to the Element such that user input is not accepted.
108
- * Default is false.
109
- */
110
- disabled?: boolean;
111
- }
112
-
113
- export interface StripeCardCvcElementChangeEvent
114
- extends StripeElementChangeEvent {
115
- /**
116
- * The type of element that emitted this event.
117
- */
118
- elementType: 'cardCvc';
119
- }