"use client"; /** * Tiny form primitives shared by the auth pages (RHF + Zod). Kept local and * dependency-free on purpose. */ import { forwardRef, type InputHTMLAttributes } from "react"; import { Loader2 } from "lucide-react"; import { cn } from "@/lib/utils"; export function Field({ label, htmlFor, error, hint, children }: { label: string; htmlFor: string; error?: string; hint?: string; children: React.ReactNode; }) { return (
{children} {error ? (

{error}

) : hint ? (

{hint}

) : null}
); } export const Input = forwardRef>( function Input({ className, ...props }, ref) { return ( ); } ); export function SubmitButton({ busy, children, ...props }: React.ButtonHTMLAttributes & { busy?: boolean }) { return ( ); } export function FormError({ message, "data-testid": testId }: { message?: string | null; "data-testid"?: string }) { if (!message) return null; return (

{message}

); }