import React from 'react'; import type { MaskType, MaskFunctionType, ConfigType } from './types'; /** * https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#guide */ interface TextMaskBaseProps { /** * `guide` is a boolean that tells the component whether to be in guide or no guide mode. */ guide?: boolean; /** * `mask` is an array or a function that defines how the user input is going to be masked. */ mask?: MaskType | MaskFunctionType | boolean; /** * `showMask` is a boolean that tells the Text Mask component to display the mask as a placeholder * in place of the regular placeholder when the input element value is empty. */ showMask?: boolean; /** The placeholder character represents the fillable spot in the mask. The default placeholder character is underscore, _. */ placeholderChar?: string; /** `keepCharPositions` changes the general behavior of the Text Mask component. */ keepCharPositions?: boolean; /** You can provide a `pipe` function that will give you the opportunity to modify the conformed value before it is displayed on the screen. */ pipe?: (conformedValue: string, config: ConfigType) => string; } export type TextMaskProps = TextMaskBaseProps & React.HTMLAttributes & { /** Custom rendering DOM */ render?: (ref: React.Ref, props: React.HTMLAttributes) => any; onChange?: (event: React.ChangeEvent) => void; value?: string | number; readOnly?: boolean; disabled?: boolean; }; /** * The `TextMask` component is used to format the user input data. * @see https://rsuitejs.com/components/input/#masked-input */ declare const TextMask: React.ForwardRefExoticComponent & { /** Custom rendering DOM */ render?: (ref: React.Ref, props: React.HTMLAttributes) => any; onChange?: (event: React.ChangeEvent) => void; value?: string | number; readOnly?: boolean; disabled?: boolean; } & React.RefAttributes>; export default TextMask;