import React from 'react'; import { Input as BaseInput } from '@base-ui/react/input'; import { NumberField } from '@base-ui/react/number-field'; import { useSkin } from '@/themes/skins'; interface ThemeProps { $isLight?: boolean; $hasError?: boolean; } const controlState = ({ $isLight, $hasError }: ThemeProps) => ({ light: !!$isLight, error: !!$hasError }); type WithStringClassName = Omit & { className?: string }; export type TextInputProps = ThemeProps & WithStringClassName>; export type TextAreaProps = ThemeProps & React.ComponentProps<'textarea'>; export type NumberInputProps = ThemeProps & Pick< React.ComponentProps, 'value' | 'onValueChange' | 'min' | 'max' | 'step' | 'format' | 'disabled' > & WithStringClassName, 'value' | 'onChange' | 'disabled'>>; export type FileInputProps = Omit, 'type'>; export const TextInput = ({ $isLight, $hasError, className, ...props }: TextInputProps) => { const ui = useSkin('Input', controlState({ $isLight, $hasError })); return ; }; export const FileInput = ({ className, ...props }: FileInputProps) => { const ui = useSkin('FileInput', {}); return ; }; export const TextArea = ({ $isLight, $hasError, className, ...props }: TextAreaProps) => { const ui = useSkin('TextArea', controlState({ $isLight, $hasError })); return