File

src/interfaces/element.ts

Index

Properties

Properties

:-webkit-autofill
:-webkit-autofill: any
Type : any
::placeholder
::placeholder: any
Type : any
::selection
::selection: any
Type : any
:focus
:focus: any
Type : any
:hover
:hover: any
Type : any
color
color: any
Type : any
fontFamily
fontFamily: any
Type : any
fontSize
fontSize: any
Type : any
fontSmoothing
fontSmoothing: any
Type : any
fontStyle
fontStyle: any
Type : any
fontVariant
fontVariant: any
Type : any
fontWeight
fontWeight: any
Type : any
iconColor
iconColor: any
Type : any
letterSpacing
letterSpacing: any
Type : any
lineHeight
lineHeight: any
Type : any
textDecoration
textDecoration: any
Type : any
textShadow
textShadow: any
Type : any
textTransform
textTransform: any
Type : any
export interface Element {
  mount(el: HTMLElement | string): void;
  on(ev: ElementEventType, handler: (ev?: any) => void): void;
  blur(): void;
  clear(): void;
  focus(): void;
  unmount(): void;
  update(options: ElementOptions): void;
}

export type ElementEventType = 'blur' | 'change' | 'click' | 'focus' | 'ready';

export type ElementType =
  | 'card'
  | 'cardNumber'
  | 'cardExpiry'
  | 'cardCvc'
  | 'postalCode';

export interface ElementOptions {
  style?: {
    base?: ElementStyleAttributes;
    complete?: ElementStyleAttributes;
    empty?: ElementStyleAttributes;
    invalid?: ElementStyleAttributes;
  };
  hidePostalCode?: boolean;
  hideIcon?: boolean;
  iconStyle?: 'solid' | 'default';
  placeholder?: string;
  value?: string | object;
}

export interface ElementStyleAttributes {
  color?: any;
  fontFamily?: any;
  fontSize?: any;
  fontSmoothing?: any;
  fontStyle?: any;
  fontWeight?: any;
  fontVariant?: any;
  iconColor?: any;
  lineHeight?: any;
  letterSpacing?: any;
  textDecoration?: any;
  textShadow?: any;
  textTransform?: any;
  ':hover'?: any;
  ':focus'?: any;
  '::placeholder'?: any;
  '::selection'?: any;
  ':-webkit-autofill'?: any;
}

results matching ""

    No results matching ""