'use client'; import { useFormStatus } from 'react-dom'; import { useEffect, useMemo, useState, type InputHTMLAttributes, type ReactNode, type SelectHTMLAttributes, type TextareaHTMLAttributes } from 'react'; import { Eye, EyeOff, Loader2 } from 'lucide-react'; import { passwordStrength } from '@/lib/auth/password-strength'; import type { ActionState } from '@/lib/auth/state'; import { cn } from '@/lib/format'; export const inputClass = 'block w-full rounded-md border border-border bg-elevated px-3 py-2 text-base text-fg shadow-none placeholder:text-subtle focus:border-border-strong focus:outline-none focus:ring-2 focus:ring-[var(--ri-ring)] md:text-sm disabled:opacity-60'; export function Field({ label, name, error, hint, children, className }: { label: ReactNode; name: string; error?: string | null; hint?: ReactNode; children: ReactNode; className?: string }) { return (
{children} {error ? (

{error}

) : hint ? (

{hint}

) : null}
); } export function TextInput(props: InputHTMLAttributes & { invalid?: boolean }) { const { invalid, className, ...rest } = props; return ; } export function Select(props: SelectHTMLAttributes) { const { className, ...rest } = props; return