import type { ComponentPropsWithRef, ReactNode } from 'react' import { cx } from '../lib/cx' /** * `glass` — controls on the navy CTA panel; `light` — on the white callback * dialog, the same fields as the fitness landing's. */ type Tone = 'glass' | 'light' const controlClass: Record = { glass: 'w-full rounded-[14px] border border-white/[0.18] bg-white/[0.08] px-[15px] text-white outline-none ' + 'transition-[border-color,background-color,box-shadow] duration-200 placeholder:text-white/[0.42] ' + 'focus:border-teal focus:bg-white/[0.12] focus:shadow-[0_0_0_4px_rgb(0_196_180/0.12)]', light: 'w-full rounded-[15px] border border-navy/15 bg-field px-[15px] py-[14px] text-ink outline-none ' + 'transition-[border-color,box-shadow,background-color] duration-200 ' + 'focus:border-teal focus:bg-white focus:shadow-[0_0_0_4px_rgb(0_196_180/0.10)]', } const labelClass: Record = { glass: 'text-[12px] font-[750] text-white/[0.7]', light: 'text-[11px] font-extrabold text-muted', } function Field({ id, label, full, tone, children, }: { id: string label: string full?: boolean tone: Tone children: ReactNode }) { return (
{children}
) } export function TextField({ id, label, full, tone = 'glass', ...rest }: { id: string; label: string; full?: boolean; tone?: Tone } & ComponentPropsWithRef<'input'>) { return ( ) } export function TextareaField({ id, label, full, ...rest }: { id: string; label: string; full?: boolean } & ComponentPropsWithRef<'textarea'>) { return (