import React, { forwardRef } from 'react'; import { classNames } from '@/utils/helpers'; interface InputProps extends React.InputHTMLAttributes { label?: string; error?: string; hint?: string; leftIcon?: React.ReactNode; rightIcon?: React.ReactNode; variant?: 'default' | 'filled'; } export const Input = forwardRef( ( { label, error, hint, leftIcon, rightIcon, variant = 'default', className, id, ...props }, ref ) => { const inputId = id || `input-${Math.random().toString(36).slice(2, 9)}`; const variantStyles = { default: 'bg-dark-900 border-dark-600', filled: 'bg-dark-700 border-transparent', }; return (
{label && ( )}
{leftIcon && (
{leftIcon}
)} {rightIcon && (
{rightIcon}
)}
{(error || hint) && (

{error || hint}

)}
); } ); Input.displayName = 'Input'; interface TextareaProps extends React.TextareaHTMLAttributes { label?: string; error?: string; hint?: string; } export const Textarea = forwardRef( ({ label, error, hint, className, id, ...props }, ref) => { const inputId = id || `textarea-${Math.random().toString(36).slice(2, 9)}`; return (
{label && ( )}