/** * BasicInput Component (Phase 1) * * Lightweight text input component for Core-only applications. * Provides SwiftUI-style reactive binding without the complexity * of the Forms plugin validation and formatting system. */ import type { ModifiableComponentWithModifiers } from '@tachui/core'; import type { Signal } from '@tachui/core'; import type { ComponentInstance, ComponentProps, DOMNode } from '@tachui/core'; import { ComponentWithCSSClasses, type CSSClassesProps } from '@tachui/core'; /** * BasicInput supported input types */ export type BasicInputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url'; /** * BasicInput component properties with CSS classes support */ export interface BasicInputProps extends ComponentProps, CSSClassesProps { text: Signal; setText?: (value: string) => void; placeholder?: string | Signal; inputType?: BasicInputType | Signal; disabled?: boolean | Signal; readonly?: boolean | Signal; name?: string; required?: boolean | Signal; onChange?: (text: string) => void; onSubmit?: (text: string) => void; onFocus?: () => void; onBlur?: () => void; accessibilityLabel?: string; accessibilityHint?: string; } /** * BasicInput theme configuration */ export interface BasicInputTheme { colors: { background: string; border: string; text: string; placeholder: string; focusBorder: string; disabledBackground: string; disabledText: string; }; spacing: { padding: number; borderWidth: number; }; borderRadius: number; fontSize: number; fontFamily: string; transition: string; } /** * BasicInput component implementation with CSS classes support */ export declare class BasicInputComponent extends ComponentWithCSSClasses implements ComponentInstance { readonly type: "component"; readonly id: string; readonly props: BasicInputProps; private theme; private inputElement; constructor(props: BasicInputProps); private resolveValue; private getText; private setText; private getPlaceholder; private getInputType; private isDisabled; private isReadonly; private isRequired; private handleInput; private handleKeyDown; private handleFocus; private handleBlur; private getInputStyles; render(): DOMNode[]; } /** * Create a BasicInput component */ export declare function BasicInput(props: BasicInputProps): ModifiableComponentWithModifiers; /** * BasicInput utility functions and presets */ export declare const BasicInputUtils: { /** * Create a search input */ search(text: Signal, setText: (value: string) => void, onSearch?: (query: string) => void): BasicInputProps; /** * Create an email input */ email(text: Signal, setText: (value: string) => void): BasicInputProps; /** * Create a password input */ password(text: Signal, setText: (value: string) => void): BasicInputProps; /** * Create a phone number input */ phone(text: Signal, setText: (value: string) => void): BasicInputProps; }; /** * BasicInput styles and theming */ export declare const BasicInputStyles: { theme: BasicInputTheme; /** * Create a custom theme */ createTheme(overrides: Partial): BasicInputTheme; }; //# sourceMappingURL=BasicInput.d.ts.map