@basis-theory/react-elements 1.23.0 → 1.24.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
@@ -215,7 +215,7 @@ const $75e7ef6fe5d73b5f$export$b6487193f4d880e0 = (eventType, element, listener)
215
215
  ]);
216
216
 
217
217
 
218
- const $b68de9bc89cba8c8$var$CardElementC = ({ autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, 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 })=>{
218
+ 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
219
  const wrapperRef = (0, $6ZdRe$react.useRef)(null);
220
220
  const element = (0, $515e46363124517b$export$93e1bc7222cfbdc8)(id, 'card', wrapperRef, {
221
221
  autoComplete: autoComplete,
@@ -224,6 +224,7 @@ const $b68de9bc89cba8c8$var$CardElementC = ({ autoComplete: autoComplete, binLoo
224
224
  disabled: disabled,
225
225
  enableCopy: enableCopy,
226
226
  binLookup: binLookup,
227
+ coBadgedSupport: coBadgedSupport,
227
228
  inputMode: inputMode,
228
229
  placeholder: placeholder,
229
230
  readOnly: readOnly,
package/module/module.js CHANGED
@@ -180,7 +180,7 @@ const $1b6d06f13820d117$export$b6487193f4d880e0 = (eventType, element, listener)
180
180
  ]);
181
181
 
182
182
 
183
- const $22a85849b67e3ab0$var$CardElementC = ({ autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, 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 })=>{
183
+ 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
184
  const wrapperRef = (0, $gb0K4$useRef)(null);
185
185
  const element = (0, $001f9ef7a572da43$export$93e1bc7222cfbdc8)(id, 'card', wrapperRef, {
186
186
  autoComplete: autoComplete,
@@ -189,6 +189,7 @@ const $22a85849b67e3ab0$var$CardElementC = ({ autoComplete: autoComplete, binLoo
189
189
  disabled: disabled,
190
190
  enableCopy: enableCopy,
191
191
  binLookup: binLookup,
192
+ coBadgedSupport: coBadgedSupport,
192
193
  inputMode: inputMode,
193
194
  placeholder: placeholder,
194
195
  readOnly: readOnly,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/react-elements",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "repository": "https://github.com/basis-theory/react-elements",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -30,7 +30,7 @@
30
30
  "tag": "latest"
31
31
  },
32
32
  "dependencies": {
33
- "@basis-theory/web-elements": "1.23.0"
33
+ "@basis-theory/web-elements": "1.24.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
package/types/index.d.ts CHANGED
@@ -27,6 +27,9 @@ export const MIR: CreditCardType;
27
27
  export const HIPER: CreditCardType;
28
28
  export const HIPERCARD: CreditCardType;
29
29
  export const DEFAULT_CARD_TYPES: CreditCardType[];
30
+ export enum CoBadgedSupport {
31
+ CartesBancaires = "cartes-bancaires"
32
+ }
30
33
  export interface RequestConfig {
31
34
  headers?: Record<string, string>;
32
35
  }
@@ -37,7 +40,7 @@ export interface HttpClient {
37
40
  get(url: string, config?: RequestConfig): Promise<unknown>;
38
41
  delete(url: string, config?: RequestConfig): Promise<unknown>;
39
42
  }
40
- export const CARD_BRANDS: readonly ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
43
+ export const CARD_BRANDS: readonly ["accel", "bancontact", "cartes-bancaires", "culiance", "dankort", "ebt", "eftpos-australia", "nyce", "private-label", "prop", "pulse", "rupay", "star", "uatp", "korean-local", "visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
41
44
  declare const CARD_ICON_POSITIONS: readonly ["left", "right", "none"];
42
45
  declare const AUTOCOMPLETE_VALUES: readonly ["additional-name", "address-level1", "address-level2", "address-level3", "address-level4", "address-line1", "address-line2", "address-line3", "bday-day", "bday-month", "bday-year", "bday", "billing", "cc-additional-name", "cc-csc", "cc-exp-month", "cc-exp-year", "cc-exp", "cc-family-name", "cc-given-name", "cc-name", "cc-number", "cc-type", "country-name", "country", "current-password", "email", "family-name", "fax", "given-name", "home", "honorific-prefix", "honorific-suffix", "language", "mobile", "name", "new-password", "nickname", "off", "on", "one-time-code", "organization-title", "organization", "page", "postal-code", "sex", "shipping", "street-address", "tel-area-code", "tel-country-code", "tel-extension", "tel-local-prefix", "tel-local-suffix", "tel-local", "tel-national", "tel", "transaction-amount", "transaction-currency", "url", "username", "work"];
43
46
  export type FieldErrorType = 'incomplete' | 'invalid';
@@ -179,6 +182,7 @@ export interface SanitizedElementOptions {
179
182
  binLookup?: boolean;
180
183
  cardBrand?: string;
181
184
  cardTypes?: CreditCardType[];
185
+ coBadgedSupport?: string;
182
186
  copyIconStyles?: CopyIconStyles;
183
187
  disabled?: boolean;
184
188
  enableCopy?: boolean;
@@ -209,7 +213,7 @@ interface AutoCompleteOption {
209
213
  interface CardAutoCompleteOption {
210
214
  autoComplete?: CardElementAutoComplete;
211
215
  }
212
- export type CustomizableElementOptions = Pick<ElementOptions, 'binLookup' | 'cardTypes' | 'copyIconStyles' | 'disabled' | 'enableCopy' | 'inputMode' | 'readOnly' | 'skipLuhnValidation' | 'style' | 'validateOnChange'> & AutoCompleteOption;
216
+ export type CustomizableElementOptions = Pick<ElementOptions, 'binLookup' | 'cardTypes' | 'copyIconStyles' | 'coBadgedSupport' | 'disabled' | 'enableCopy' | 'inputMode' | 'readOnly' | 'skipLuhnValidation' | 'style' | 'validateOnChange'> & AutoCompleteOption;
213
217
  export type CardCustomizableElementOptions = Pick<ElementOptions, 'binLookup' | 'cardTypes' | 'copyIconStyles' | 'disabled' | 'enableCopy' | 'inputMode' | 'readOnly' | 'skipLuhnValidation' | 'style' | 'validateOnChange'> & CardAutoCompleteOption;
214
218
  type ElementValueType = 'static' | 'reference';
215
219
  export interface CardElementValue<T extends ElementValueType> {
@@ -233,6 +237,7 @@ export interface CardElementAutoComplete {
233
237
  csc: AutoCompleteValue;
234
238
  }
235
239
  export type CreateCardElementOptions = CardCustomizableElementOptions & Pick<ElementOptions, 'binLookup' | 'cardTypes' | 'skipLuhnValidation' | 'title'> & {
240
+ coBadgedSupport?: CoBadgedSupport[];
236
241
  placeholder?: CardElementPlaceholder;
237
242
  value?: CardElementValue<'static'>;
238
243
  };
@@ -646,6 +651,7 @@ export interface CardElementProps {
646
651
  binLookup?: boolean;
647
652
  bt?: BasisTheoryElements;
648
653
  cardTypes?: CreditCardType[];
654
+ coBadgedSupport?: CoBadgedSupport[];
649
655
  copyIconStyles?: CopyIconStyles;
650
656
  disabled?: boolean;
651
657
  enableCopy?: boolean;