UNPKG

@nish1896/rhf-mui-components

Version:

A suite of 20+ production-ready react-hook-form components built with material-ui. Fully typed, tree-shakable, and optimized for enterprise-grade forms.

44 lines (43 loc) 1.44 kB
import { FormHelperTextProps, FormLabelProps, TextFieldProps } from "../../types/mui.js"; import { ChangeEvent, ReactNode } from "react"; import * as react_jsx_runtime0 from "react/jsx-runtime"; import { Control, FieldValues, Path, RegisterOptions } from "react-hook-form"; //#region src/mui/password-input/index.d.ts type InputPasswordProps = Omit<TextFieldProps, 'type' | 'multiline' | 'rows' | 'minRows' | 'maxRows'>; type RHFPasswordInputProps<T extends FieldValues> = { fieldName: Path<T>; control: Control<T>; registerOptions?: RegisterOptions<T, Path<T>>; onValueChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void; showLabelAboveFormField?: boolean; formLabelProps?: FormLabelProps; showPasswordIcon?: ReactNode; hidePasswordIcon?: ReactNode; errorMessage?: ReactNode; hideErrorMessage?: boolean; formHelperTextProps?: FormHelperTextProps; } & InputPasswordProps; declare const RHFPasswordInput: <T extends FieldValues>({ fieldName, control, registerOptions, onValueChange, disabled: muiDisabled, label, showLabelAboveFormField, formLabelProps, showPasswordIcon, hidePasswordIcon, required, helperText, errorMessage, hideErrorMessage, formHelperTextProps, slotProps, onBlur, autoComplete, InputProps, ...rest }: RHFPasswordInputProps<T>) => react_jsx_runtime0.JSX.Element; //#endregion export { RHFPasswordInputProps, RHFPasswordInput as default };