{"name":"rhf-password-field","title":"RHF Password Field","description":"Password input field with React Hook Form integration.","type":"registry:ui","docs":"/components/rhf-password-field","categories":["forms"],"registryDependencies":["https://pb-ui-five.vercel.app/registry/rhf-base-controller","https://pb-ui-five.vercel.app/registry/password-input"],"dependencies":["react-hook-form"],"files":[{"path":"components/ui/rhf-inputs/password-field.tsx","target":"components/ui/rhf-inputs/password-field.tsx","type":"registry:ui","content":"\"use client\";\n\nimport { InputHTMLAttributes } from \"react\";\nimport { FieldValues } from \"react-hook-form\";\nimport PasswordInput from \"../password-input\";\nimport { BaseController, BaseControllerProps } from \"./base-controller\";\n\ntype FieldInputProps<T extends FieldValues> = Omit<\n  InputHTMLAttributes<HTMLInputElement>,\n  \"name\" | \"id\"\n> &\n  Omit<BaseControllerProps<T>, \"children\">;\n\nexport function PasswordField<T extends FieldValues>({\n  control,\n  name,\n  label,\n  description,\n  disableFieldError = false,\n  required,\n  ...inputProps\n}: FieldInputProps<T>) {\n  return (\n    <BaseController\n      control={control}\n      name={name}\n      label={label}\n      required={required}\n      description={description}\n      disableFieldError={disableFieldError}\n    >\n      {({ field, fieldState, ariaDescribedBy }) => (\n        <PasswordInput\n          id={field.name}\n          aria-invalid={!!fieldState.error}\n          aria-required={required}\n          aria-describedby={ariaDescribedBy}\n          {...field}\n          {...inputProps}\n          className={`${inputProps.className || \"\"}`}\n        />\n      )}\n    </BaseController>\n  );\n}\n"}]}