@basis-theory/react-elements 2.8.4 → 2.9.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 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, 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 })=>{
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, onCopy: onCopy, 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,
@@ -238,6 +238,7 @@ const $b68de9bc89cba8c8$var$CardElementC = ({ autoComplete: autoComplete, binLoo
238
238
  }, bt, elementRef);
239
239
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('ready', element, onReady);
240
240
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('change', element, onChange);
241
+ (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('copy', element, onCopy);
241
242
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('focus', element, onFocus);
242
243
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('blur', element, onBlur);
243
244
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('keydown', element, onKeyDown);
@@ -259,7 +260,7 @@ function CardElement(props, ref) {
259
260
 
260
261
 
261
262
 
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 })=>{
263
+ 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, onCopy: onCopy, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
263
264
  const wrapperRef = (0, $6ZdRe$react.useRef)(null);
264
265
  const element = (0, $515e46363124517b$export$93e1bc7222cfbdc8)(id, 'cardExpirationDate', wrapperRef, {
265
266
  'aria-label': ariaLabel,
@@ -279,6 +280,7 @@ const $a598ed1fc49faa5f$var$CardExpirationDateElementC = ({ 'aria-label': ariaLa
279
280
  }, bt, elementRef, valueRef);
280
281
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('ready', element, onReady);
281
282
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('change', element, onChange);
283
+ (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('copy', element, onCopy);
282
284
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('focus', element, onFocus);
283
285
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('blur', element, onBlur);
284
286
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('keydown', element, onKeyDown);
@@ -299,7 +301,7 @@ const $a598ed1fc49faa5f$export$d5128efc3cebc889 = /*#__PURE__*/ (0, ($parcel$int
299
301
 
300
302
 
301
303
 
302
- const $89a8c5992dc7cf9a$var$CardNumberElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, copyIconStyles: copyIconStyles, coBadgedSupport: coBadgedSupport, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, iconPosition: iconPosition, 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, valueRef: valueRef })=>{
304
+ const $89a8c5992dc7cf9a$var$CardNumberElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, copyIconStyles: copyIconStyles, coBadgedSupport: coBadgedSupport, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, iconPosition: iconPosition, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onCopy: onCopy, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
303
305
  const wrapperRef = (0, $6ZdRe$react.useRef)(null);
304
306
  const element = (0, $515e46363124517b$export$93e1bc7222cfbdc8)(id, 'cardNumber', wrapperRef, {
305
307
  'aria-label': ariaLabel,
@@ -323,6 +325,7 @@ const $89a8c5992dc7cf9a$var$CardNumberElementC = ({ 'aria-label': ariaLabel, aut
323
325
  }, bt, elementRef, valueRef);
324
326
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('ready', element, onReady);
325
327
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('change', element, onChange);
328
+ (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('copy', element, onCopy);
326
329
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('focus', element, onFocus);
327
330
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('blur', element, onBlur);
328
331
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('keydown', element, onKeyDown);
@@ -343,7 +346,7 @@ const $89a8c5992dc7cf9a$export$a2311b18160d2f3f = /*#__PURE__*/ (0, ($parcel$int
343
346
 
344
347
 
345
348
 
346
- const $9bb5cbc1cc445953$var$CardVerificationCodeElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, bt: bt, cardBrand: cardBrand, 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 })=>{
349
+ const $9bb5cbc1cc445953$var$CardVerificationCodeElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, bt: bt, cardBrand: cardBrand, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onCopy: onCopy, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
347
350
  const wrapperRef = (0, $6ZdRe$react.useRef)(null);
348
351
  const element = (0, $515e46363124517b$export$93e1bc7222cfbdc8)(id, 'cardVerificationCode', wrapperRef, {
349
352
  'aria-label': ariaLabel,
@@ -363,6 +366,7 @@ const $9bb5cbc1cc445953$var$CardVerificationCodeElementC = ({ 'aria-label': aria
363
366
  }, bt, elementRef, valueRef);
364
367
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('ready', element, onReady);
365
368
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('change', element, onChange);
369
+ (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('copy', element, onCopy);
366
370
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('focus', element, onFocus);
367
371
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('blur', element, onBlur);
368
372
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('keydown', element, onKeyDown);
@@ -383,7 +387,7 @@ const $9bb5cbc1cc445953$export$36d668a024913c87 = /*#__PURE__*/ (0, ($parcel$int
383
387
 
384
388
 
385
389
 
386
- const $4a127cfedb958479$var$CopyButtonElementC = ({ bt: bt, elementRef: elementRef, id: id, text: text, onClick: onClick, style: style, valueRef: valueRef })=>{
390
+ const $4a127cfedb958479$var$CopyButtonElementC = ({ bt: bt, elementRef: elementRef, id: id, text: text, onClick: onClick, onCopy: onCopy, style: style, valueRef: valueRef })=>{
387
391
  const wrapperRef = (0, $6ZdRe$react.useRef)(null);
388
392
  const element = (0, $515e46363124517b$export$93e1bc7222cfbdc8)(id, 'copyButton', wrapperRef, {
389
393
  targetId: id,
@@ -391,6 +395,7 @@ const $4a127cfedb958479$var$CopyButtonElementC = ({ bt: bt, elementRef: elementR
391
395
  text: text
392
396
  }, bt, elementRef, valueRef);
393
397
  (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('click', element, onClick);
398
+ (0, $75e7ef6fe5d73b5f$export$b6487193f4d880e0)('copy', element, onCopy);
394
399
  return /*#__PURE__*/ (0, $6ZdRe$reactjsxruntime.jsx)("div", {
395
400
  id: id,
396
401
  ref: wrapperRef
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, 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 })=>{
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, onCopy: onCopy, 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,
@@ -203,6 +203,7 @@ const $22a85849b67e3ab0$var$CardElementC = ({ autoComplete: autoComplete, binLoo
203
203
  }, bt, elementRef);
204
204
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('ready', element, onReady);
205
205
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('change', element, onChange);
206
+ (0, $1b6d06f13820d117$export$b6487193f4d880e0)('copy', element, onCopy);
206
207
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('focus', element, onFocus);
207
208
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('blur', element, onBlur);
208
209
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('keydown', element, onKeyDown);
@@ -224,7 +225,7 @@ function CardElement(props, ref) {
224
225
 
225
226
 
226
227
 
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 })=>{
228
+ 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, onCopy: onCopy, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
228
229
  const wrapperRef = (0, $gb0K4$useRef)(null);
229
230
  const element = (0, $001f9ef7a572da43$export$93e1bc7222cfbdc8)(id, 'cardExpirationDate', wrapperRef, {
230
231
  'aria-label': ariaLabel,
@@ -244,6 +245,7 @@ const $b04bbbda03b8923f$var$CardExpirationDateElementC = ({ 'aria-label': ariaLa
244
245
  }, bt, elementRef, valueRef);
245
246
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('ready', element, onReady);
246
247
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('change', element, onChange);
248
+ (0, $1b6d06f13820d117$export$b6487193f4d880e0)('copy', element, onCopy);
247
249
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('focus', element, onFocus);
248
250
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('blur', element, onBlur);
249
251
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('keydown', element, onKeyDown);
@@ -264,7 +266,7 @@ const $b04bbbda03b8923f$export$d5128efc3cebc889 = /*#__PURE__*/ (0, $gb0K4$react
264
266
 
265
267
 
266
268
 
267
- const $c9d0638264a6246e$var$CardNumberElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, copyIconStyles: copyIconStyles, coBadgedSupport: coBadgedSupport, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, iconPosition: iconPosition, 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, valueRef: valueRef })=>{
269
+ const $c9d0638264a6246e$var$CardNumberElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, copyIconStyles: copyIconStyles, coBadgedSupport: coBadgedSupport, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, iconPosition: iconPosition, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onCopy: onCopy, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
268
270
  const wrapperRef = (0, $gb0K4$useRef)(null);
269
271
  const element = (0, $001f9ef7a572da43$export$93e1bc7222cfbdc8)(id, 'cardNumber', wrapperRef, {
270
272
  'aria-label': ariaLabel,
@@ -288,6 +290,7 @@ const $c9d0638264a6246e$var$CardNumberElementC = ({ 'aria-label': ariaLabel, aut
288
290
  }, bt, elementRef, valueRef);
289
291
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('ready', element, onReady);
290
292
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('change', element, onChange);
293
+ (0, $1b6d06f13820d117$export$b6487193f4d880e0)('copy', element, onCopy);
291
294
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('focus', element, onFocus);
292
295
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('blur', element, onBlur);
293
296
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('keydown', element, onKeyDown);
@@ -308,7 +311,7 @@ const $c9d0638264a6246e$export$a2311b18160d2f3f = /*#__PURE__*/ (0, $gb0K4$react
308
311
 
309
312
 
310
313
 
311
- const $6f922196262b492d$var$CardVerificationCodeElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, bt: bt, cardBrand: cardBrand, 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 })=>{
314
+ const $6f922196262b492d$var$CardVerificationCodeElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, bt: bt, cardBrand: cardBrand, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onCopy: onCopy, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
312
315
  const wrapperRef = (0, $gb0K4$useRef)(null);
313
316
  const element = (0, $001f9ef7a572da43$export$93e1bc7222cfbdc8)(id, 'cardVerificationCode', wrapperRef, {
314
317
  'aria-label': ariaLabel,
@@ -328,6 +331,7 @@ const $6f922196262b492d$var$CardVerificationCodeElementC = ({ 'aria-label': aria
328
331
  }, bt, elementRef, valueRef);
329
332
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('ready', element, onReady);
330
333
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('change', element, onChange);
334
+ (0, $1b6d06f13820d117$export$b6487193f4d880e0)('copy', element, onCopy);
331
335
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('focus', element, onFocus);
332
336
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('blur', element, onBlur);
333
337
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('keydown', element, onKeyDown);
@@ -348,7 +352,7 @@ const $6f922196262b492d$export$36d668a024913c87 = /*#__PURE__*/ (0, $gb0K4$react
348
352
 
349
353
 
350
354
 
351
- const $b1b4bfddfa231c63$var$CopyButtonElementC = ({ bt: bt, elementRef: elementRef, id: id, text: text, onClick: onClick, style: style, valueRef: valueRef })=>{
355
+ const $b1b4bfddfa231c63$var$CopyButtonElementC = ({ bt: bt, elementRef: elementRef, id: id, text: text, onClick: onClick, onCopy: onCopy, style: style, valueRef: valueRef })=>{
352
356
  const wrapperRef = (0, $gb0K4$useRef)(null);
353
357
  const element = (0, $001f9ef7a572da43$export$93e1bc7222cfbdc8)(id, 'copyButton', wrapperRef, {
354
358
  targetId: id,
@@ -356,6 +360,7 @@ const $b1b4bfddfa231c63$var$CopyButtonElementC = ({ bt: bt, elementRef: elementR
356
360
  text: text
357
361
  }, bt, elementRef, valueRef);
358
362
  (0, $1b6d06f13820d117$export$b6487193f4d880e0)('click', element, onClick);
363
+ (0, $1b6d06f13820d117$export$b6487193f4d880e0)('copy', element, onCopy);
359
364
  return /*#__PURE__*/ (0, $gb0K4$jsx)("div", {
360
365
  id: id,
361
366
  ref: wrapperRef
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/react-elements",
3
- "version": "2.8.4",
3
+ "version": "2.9.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.8.4"
36
+ "@basis-theory/web-elements": "2.9.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
package/types/index.d.ts CHANGED
@@ -138,7 +138,7 @@ export type DataElementReference = {
138
138
  elementId: string;
139
139
  path: string;
140
140
  };
141
- export type EventType = 'ready' | 'change' | 'focus' | 'blur' | 'keydown' | 'click';
141
+ export type EventType = 'ready' | 'change' | 'focus' | 'blur' | 'keydown' | 'click' | 'copy';
142
142
  export interface BaseEvent<T extends EventType> {
143
143
  type: T;
144
144
  }
@@ -161,13 +161,14 @@ export type InputKeydownEvent = BaseEvent<'keydown'> & Targeted & {
161
161
  key: ListenableKey;
162
162
  } & Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'shiftKey' | 'metaKey'>;
163
163
  export type ClickEvent = BaseEvent<'click'> & Targeted;
164
+ export type CopyEvent = BaseEvent<'copy'> & Targeted;
164
165
  export type BaseElementEvents = ReadyEvent | InputFocusEvent | InputBlurEvent | InputKeydownEvent;
165
166
  export type TextElementEvents = BaseElementEvents | ChangeEvent;
166
- export type CardElementEvents = BaseElementEvents | CardChangeEvent;
167
- export type CardNumberElementEvents = BaseElementEvents | CardChangeEvent;
168
- export type CardExpirationDateElementEvents = BaseElementEvents | ChangeEvent;
169
- export type CardVerificationCodeElementEvents = BaseElementEvents | ChangeEvent;
170
- export type CopyButtonElementEvents = BaseElementEvents | ClickEvent;
167
+ export type CardElementEvents = BaseElementEvents | CardChangeEvent | CopyEvent;
168
+ export type CardNumberElementEvents = BaseElementEvents | CardChangeEvent | CopyEvent;
169
+ export type CardExpirationDateElementEvents = BaseElementEvents | ChangeEvent | CopyEvent;
170
+ export type CardVerificationCodeElementEvents = BaseElementEvents | ChangeEvent | CopyEvent;
171
+ export type CopyButtonElementEvents = BaseElementEvents | ClickEvent | CopyEvent;
171
172
  /**
172
173
  * Utility type that helps find a Union type based on a `type` property
173
174
  */
@@ -755,6 +756,7 @@ export interface CardElementProps {
755
756
  maxElapsedExpirationYear?: number;
756
757
  onBlur?: ElementEventListener<CardElementEvents, 'blur'>;
757
758
  onChange?: ElementEventListener<CardElementEvents, 'change'>;
759
+ onCopy?: ElementEventListener<CardElementEvents, 'copy'>;
758
760
  onFocus?: ElementEventListener<CardElementEvents, 'focus'>;
759
761
  onKeyDown?: ElementEventListener<CardElementEvents, 'keydown'>;
760
762
  onReady?: ElementEventListener<CardElementEvents, 'ready'>;
@@ -779,6 +781,7 @@ export interface CardExpirationDateElementProps {
779
781
  maxElapsedExpirationYear?: number;
780
782
  onBlur?: ElementEventListener<CardExpirationDateElementEvents, 'blur'>;
781
783
  onChange?: ElementEventListener<CardExpirationDateElementEvents, 'change'>;
784
+ onCopy?: ElementEventListener<CardExpirationDateElementEvents, 'copy'>;
782
785
  onFocus?: ElementEventListener<CardExpirationDateElementEvents, 'focus'>;
783
786
  onKeyDown?: ElementEventListener<CardExpirationDateElementEvents, 'keydown'>;
784
787
  onReady?: ElementEventListener<CardExpirationDateElementEvents, 'ready'>;
@@ -806,6 +809,7 @@ export interface CardNumberElementProps {
806
809
  inputMode?: `${InputMode}`;
807
810
  onBlur?: ElementEventListener<CardNumberElementEvents, 'blur'>;
808
811
  onChange?: ElementEventListener<CardNumberElementEvents, 'change'>;
812
+ onCopy?: ElementEventListener<CardNumberElementEvents, 'copy'>;
809
813
  onFocus?: ElementEventListener<CardNumberElementEvents, 'focus'>;
810
814
  onKeyDown?: ElementEventListener<CardNumberElementEvents, 'keydown'>;
811
815
  onReady?: ElementEventListener<CardNumberElementEvents, 'ready'>;
@@ -831,6 +835,7 @@ export interface CardVerificationCodeElementProps {
831
835
  inputMode?: `${InputMode}`;
832
836
  onBlur?: ElementEventListener<CardVerificationCodeElementEvents, 'blur'>;
833
837
  onChange?: ElementEventListener<CardVerificationCodeElementEvents, 'change'>;
838
+ onCopy?: ElementEventListener<CardVerificationCodeElementEvents, 'copy'>;
834
839
  onFocus?: ElementEventListener<CardVerificationCodeElementEvents, 'focus'>;
835
840
  onKeyDown?: ElementEventListener<CardVerificationCodeElementEvents, 'keydown'>;
836
841
  onReady?: ElementEventListener<CardVerificationCodeElementEvents, 'ready'>;
@@ -847,6 +852,7 @@ export interface CopyButtonElementProps {
847
852
  bt?: BasisTheoryElements;
848
853
  id: string;
849
854
  onClick?: ElementEventListener<CopyButtonElementEvents, 'click'>;
855
+ onCopy?: ElementEventListener<CopyButtonElementEvents, 'copy'>;
850
856
  text?: string;
851
857
  style?: CopyButtonElementStyle;
852
858
  valueRef?: MutableRefObject<ICardNumberElement | ICardExpirationDateElement | ICardVerificationCodeElement | null>;