primereact
Version:
PrimeReact is an open source UI library for React featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with Prime
44 lines (38 loc) • 1.23 kB
TypeScript
import * as React from 'react';
import { InputText, InputTextProps } from '../inputtext';
import TooltipOptions from '../tooltip/tooltipoptions';
interface InputMaskCompleteParams {
originalEvent: React.SyntheticEvent;
value: string | undefined | null;
}
interface InputMaskChangeTargetOptions {
name: string;
id: string;
value: string;
}
interface InputMaskChangeParams {
originalEvent: React.SyntheticEvent;
value: string;
stopPropagation(): void;
preventDefault(): void;
target: InputMaskChangeTargetOptions;
}
export interface InputMaskProps extends Omit<InputTextProps, 'onChange'> {
mask?: string;
slotChar?: string;
autoClear?: boolean;
unmask?: boolean;
disabled?: boolean;
readOnly?: boolean;
required?: boolean;
tooltip?: string;
tooltipOptions?: TooltipOptions;
onComplete?(e: InputMaskCompleteParams): void;
onChange?(e: InputMaskChangeParams): void;
onFocus?(event: React.FocusEvent<HTMLInputElement>): void;
onBlur?(event: React.FocusEvent<HTMLInputElement>): void;
children?: React.ReactNode;
}
export declare class InputMask extends React.Component<InputMaskProps, any> {
public getElement(): InputText;
}