import type { InputHTMLAttributes, ReactNode, SelectHTMLAttributes, TextareaHTMLAttributes, } from 'react'; import Icon from '@/components/site/icon'; import { cn } from '@/lib/utils'; const controlClasses = 'w-full rounded-xl border border-outline-variant/60 bg-surface-container-lowest px-4 py-2.5 text-sm text-on-surface transition-colors placeholder:text-on-surface-variant/50 focus:border-primary focus:outline-hidden'; type FieldProps = { id: string; label: string; required?: boolean; className?: string; children: ReactNode; }; export function Field({ id, label, required, className, children, }: FieldProps) { return (
{children}
); } /** Validation message under a field. */ export function FieldError({ message }: { message?: string }) { if (!message) { return null; } return

{message}

; } /** * Hidden field only bots fill in; the server rejects any submission that * has a value here. */ export function Honeypot() { return ( ); } export function TextInput({ className, ...props }: InputHTMLAttributes) { return ; } export function SelectInput({ options, placeholder, className, ...props }: SelectHTMLAttributes & { options: ReadonlyArray<{ value: string; label: string }>; placeholder?: string; }) { return ( ); } export function TextArea({ className, ...props }: TextareaHTMLAttributes) { return