UNPKG

dgz-ui-shared

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library

24 lines 1.27 kB
import type { FieldValues } from 'react-hook-form'; import { type FormItemProps, type MaskInputProps } from 'dgz-ui/form'; export type MyMaskInputProps<TFieldValues extends FieldValues> = FormItemProps<TFieldValues> & MaskInputProps & { required?: boolean; }; /** * MyMaskInput is an input component with masking support and optional react-hook-form integration. * Works in both controlled (with control/name) and uncontrolled modes. By default it uses a space as * thousands separator, underscores as placeholder characters, lazy formatting disabled, and returns * unmasked value on change. * * @template TFieldValues - Form values type used by react-hook-form. * @param control * @param name * @param label * @param rules * @param helperText * @param required * @param floatingError * @param props - MaskInput and form item props such as control, name, label, rules, helperText. * @returns React element rendering a masked input with label, helper text, and validation message. */ export declare const MyMaskInput: <TFieldValues extends FieldValues>({ control, name, label, rules, helperText, required, floatingError, ...props }: MyMaskInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=MyMaskInput.d.ts.map