import React, { useId } from 'react'; import { cn } from '@/shared/lib/cn'; const BASE_CONTROL = 'w-full rounded-xl bg-surface-2 border border-line-strong text-ink-1 placeholder:text-ink-3 text-xs sm:text-sm outline-none transition focus:border-accent focus-visible:ring-2 focus-visible:ring-accent/40 disabled:opacity-60'; interface InputProps extends React.InputHTMLAttributes { label?: string; helperText?: string; error?: string; leftIcon?: React.ReactNode; } export function Input({ label, helperText, error, leftIcon, id, className, ...rest }: InputProps) { const autoId = useId(); const fieldId = id || autoId; return (
{label && ( )}
{leftIcon && ( )}
{error && (

{error}

)} {!error && helperText &&

{helperText}

}
); } interface TextareaProps extends React.TextareaHTMLAttributes { label?: string; helperText?: string; error?: string; } export function Textarea({ label, helperText, error, id, className, ...rest }: TextareaProps) { const autoId = useId(); const fieldId = id || autoId; return (
{label && ( )}