@basis-theory/react-elements 2.5.0 → 2.6.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/main/index.js +4 -2
- package/module/module.js +4 -2
- package/package.json +2 -2
- package/types/index.d.ts +5 -0
package/main/index.js
CHANGED
|
@@ -216,7 +216,7 @@ const $75e7ef6fe5d73b5f$export$b6487193f4d880e0 = (eventType, element, listener)
|
|
|
216
216
|
]);
|
|
217
217
|
|
|
218
218
|
|
|
219
|
-
const $b68de9bc89cba8c8$var$CardElementC = ({ autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, coBadgedSupport: coBadgedSupport, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value })=>{
|
|
219
|
+
const $b68de9bc89cba8c8$var$CardElementC = ({ autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, coBadgedSupport: coBadgedSupport, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, maxElapsedExpirationYear: maxElapsedExpirationYear, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value })=>{
|
|
220
220
|
const wrapperRef = (0, $6ZdRe$react.useRef)(null);
|
|
221
221
|
const element = (0, $515e46363124517b$export$93e1bc7222cfbdc8)(id, 'card', wrapperRef, {
|
|
222
222
|
autoComplete: autoComplete,
|
|
@@ -227,6 +227,7 @@ const $b68de9bc89cba8c8$var$CardElementC = ({ autoComplete: autoComplete, binLoo
|
|
|
227
227
|
binLookup: binLookup,
|
|
228
228
|
coBadgedSupport: coBadgedSupport,
|
|
229
229
|
inputMode: inputMode,
|
|
230
|
+
maxElapsedExpirationYear: maxElapsedExpirationYear,
|
|
230
231
|
placeholder: placeholder,
|
|
231
232
|
readOnly: readOnly,
|
|
232
233
|
skipLuhnValidation: skipLuhnValidation,
|
|
@@ -258,7 +259,7 @@ function CardElement(props, ref) {
|
|
|
258
259
|
|
|
259
260
|
|
|
260
261
|
|
|
261
|
-
const $a598ed1fc49faa5f$var$CardExpirationDateElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, bt: bt, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
|
|
262
|
+
const $a598ed1fc49faa5f$var$CardExpirationDateElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, bt: bt, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, maxElapsedExpirationYear: maxElapsedExpirationYear, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
|
|
262
263
|
const wrapperRef = (0, $6ZdRe$react.useRef)(null);
|
|
263
264
|
const element = (0, $515e46363124517b$export$93e1bc7222cfbdc8)(id, 'cardExpirationDate', wrapperRef, {
|
|
264
265
|
'aria-label': ariaLabel,
|
|
@@ -267,6 +268,7 @@ const $a598ed1fc49faa5f$var$CardExpirationDateElementC = ({ 'aria-label': ariaLa
|
|
|
267
268
|
disabled: disabled,
|
|
268
269
|
enableCopy: enableCopy,
|
|
269
270
|
inputMode: inputMode,
|
|
271
|
+
maxElapsedExpirationYear: maxElapsedExpirationYear,
|
|
270
272
|
placeholder: placeholder,
|
|
271
273
|
readOnly: readOnly,
|
|
272
274
|
style: style,
|
package/module/module.js
CHANGED
|
@@ -181,7 +181,7 @@ const $1b6d06f13820d117$export$b6487193f4d880e0 = (eventType, element, listener)
|
|
|
181
181
|
]);
|
|
182
182
|
|
|
183
183
|
|
|
184
|
-
const $22a85849b67e3ab0$var$CardElementC = ({ autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, coBadgedSupport: coBadgedSupport, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value })=>{
|
|
184
|
+
const $22a85849b67e3ab0$var$CardElementC = ({ autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, coBadgedSupport: coBadgedSupport, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, maxElapsedExpirationYear: maxElapsedExpirationYear, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value })=>{
|
|
185
185
|
const wrapperRef = (0, $gb0K4$useRef)(null);
|
|
186
186
|
const element = (0, $001f9ef7a572da43$export$93e1bc7222cfbdc8)(id, 'card', wrapperRef, {
|
|
187
187
|
autoComplete: autoComplete,
|
|
@@ -192,6 +192,7 @@ const $22a85849b67e3ab0$var$CardElementC = ({ autoComplete: autoComplete, binLoo
|
|
|
192
192
|
binLookup: binLookup,
|
|
193
193
|
coBadgedSupport: coBadgedSupport,
|
|
194
194
|
inputMode: inputMode,
|
|
195
|
+
maxElapsedExpirationYear: maxElapsedExpirationYear,
|
|
195
196
|
placeholder: placeholder,
|
|
196
197
|
readOnly: readOnly,
|
|
197
198
|
skipLuhnValidation: skipLuhnValidation,
|
|
@@ -223,7 +224,7 @@ function CardElement(props, ref) {
|
|
|
223
224
|
|
|
224
225
|
|
|
225
226
|
|
|
226
|
-
const $b04bbbda03b8923f$var$CardExpirationDateElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, bt: bt, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
|
|
227
|
+
const $b04bbbda03b8923f$var$CardExpirationDateElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, bt: bt, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, maxElapsedExpirationYear: maxElapsedExpirationYear, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
|
|
227
228
|
const wrapperRef = (0, $gb0K4$useRef)(null);
|
|
228
229
|
const element = (0, $001f9ef7a572da43$export$93e1bc7222cfbdc8)(id, 'cardExpirationDate', wrapperRef, {
|
|
229
230
|
'aria-label': ariaLabel,
|
|
@@ -232,6 +233,7 @@ const $b04bbbda03b8923f$var$CardExpirationDateElementC = ({ 'aria-label': ariaLa
|
|
|
232
233
|
disabled: disabled,
|
|
233
234
|
enableCopy: enableCopy,
|
|
234
235
|
inputMode: inputMode,
|
|
236
|
+
maxElapsedExpirationYear: maxElapsedExpirationYear,
|
|
235
237
|
placeholder: placeholder,
|
|
236
238
|
readOnly: readOnly,
|
|
237
239
|
style: style,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory/react-elements",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/basis-theory/react-elements.git"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"tag": "latest"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@basis-theory/web-elements": "2.
|
|
36
|
+
"@basis-theory/web-elements": "2.6.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
package/types/index.d.ts
CHANGED
|
@@ -261,6 +261,7 @@ export interface SanitizedElementOptions {
|
|
|
261
261
|
validateOnChange?: boolean;
|
|
262
262
|
validation?: RegExp;
|
|
263
263
|
value?: CardElementValue<'static'> | CardExpirationDateValue<'static'> | string;
|
|
264
|
+
maxElapsedExpirationYear?: number;
|
|
264
265
|
}
|
|
265
266
|
export type ElementOptions = ElementInternalOptions & SanitizedElementOptions;
|
|
266
267
|
export type Transform = RegExp | [RegExp, string?] | null;
|
|
@@ -300,6 +301,7 @@ export type CreateCardElementOptions = CardCustomizableElementOptions & Pick<Ele
|
|
|
300
301
|
coBadgedSupport?: CoBadgedSupport[];
|
|
301
302
|
placeholder?: CardElementPlaceholder;
|
|
302
303
|
value?: CardElementValue<'static'>;
|
|
304
|
+
maxElapsedExpirationYear?: number;
|
|
303
305
|
};
|
|
304
306
|
export type UpdateCardElementOptions = Omit<CreateCardElementOptions, 'validateOnChange' | 'enableCopy'>;
|
|
305
307
|
export type CreateTextElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'mask' | 'maxLength' | 'password' | 'validation' | 'title'> & TransformOption & Required<Pick<ElementOptions, 'targetId'>> & {
|
|
@@ -316,6 +318,7 @@ export type UpdateCardNumberElementOptions = Omit<CreateCardNumberElementOptions
|
|
|
316
318
|
export type CreateCardExpirationDateElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'title' | 'placeholder'> & Required<Pick<ElementOptions, 'targetId'>> & {
|
|
317
319
|
'aria-label'?: string;
|
|
318
320
|
value?: CardExpirationDateValue<'static'> | string;
|
|
321
|
+
maxElapsedExpirationYear?: number;
|
|
319
322
|
};
|
|
320
323
|
export type UpdateCardExpirationDateElementOptions = Omit<CreateCardExpirationDateElementOptions, 'targetId' | 'validateOnChange' | 'enableCopy'>;
|
|
321
324
|
export type CreateCardVerificationCodeElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'title' | 'cardBrand'> & Required<Pick<ElementOptions, 'targetId'>> & {
|
|
@@ -743,6 +746,7 @@ export interface CardElementProps {
|
|
|
743
746
|
enableCopy?: boolean;
|
|
744
747
|
id: string;
|
|
745
748
|
inputMode?: `${InputMode}`;
|
|
749
|
+
maxElapsedExpirationYear?: number;
|
|
746
750
|
onBlur?: ElementEventListener<CardElementEvents, 'blur'>;
|
|
747
751
|
onChange?: ElementEventListener<CardElementEvents, 'change'>;
|
|
748
752
|
onFocus?: ElementEventListener<CardElementEvents, 'focus'>;
|
|
@@ -766,6 +770,7 @@ export interface CardExpirationDateElementProps {
|
|
|
766
770
|
enableCopy?: boolean;
|
|
767
771
|
id: string;
|
|
768
772
|
inputMode?: `${InputMode}`;
|
|
773
|
+
maxElapsedExpirationYear?: number;
|
|
769
774
|
onBlur?: ElementEventListener<CardExpirationDateElementEvents, 'blur'>;
|
|
770
775
|
onChange?: ElementEventListener<CardExpirationDateElementEvents, 'change'>;
|
|
771
776
|
onFocus?: ElementEventListener<CardExpirationDateElementEvents, 'focus'>;
|