"use client"; import { type InputHTMLAttributes, forwardRef, useState } from "react"; import { Eye, EyeOff } from "lucide-react"; import clsx from "clsx"; interface PasswordFieldProps extends Omit, "type"> { label: string; error?: string; hint?: string; } /** Same visual language as `FormField`, plus a show/hide toggle - same * crossfade-icon-swap technique as `ApiKeyRow`'s Show/Hide button. */ export const PasswordField = forwardRef( ({ label, error, hint, id, className, ...props }, ref) => { const [revealed, setRevealed] = useState(false); const fieldId = id ?? props.name; return (
{hint && !error && (

{hint}

)} {error && ( )}
); }, ); PasswordField.displayName = "PasswordField";