import { type GestureResponderEvent, type TextInput as RNTextInput, type TextInputProps as RNTextInputProps } from "react-native"; import { type FieldWidthProps, type StyleProp, type ViewStyle } from "../../style/index.js"; import { type InputSkin } from "./input.styles.js"; /** * The curated slice of React Native's TextInput behavior forwarded by Input and * Textarea. Styling stays semantic (the kit's boolean props); BEHAVIOR — what * keyboard appears, how text is captured, focus/submit events — belongs to the * consumer, and hiding it made real forms (login, search, OTP) impossible to * build. Typed via Pick so the props track react-native's own definitions. */ export type TextEntryProps = Pick; export interface InputProps extends TextEntryProps, FieldWidthProps { /** Current text value (controlled). Omit and use `defaultValue` for uncontrolled use. */ value?: string; /** Called with the new text on each keystroke. */ onChangeText?: (text: string) => void; /** Placeholder shown while the field is empty. */ placeholder?: string; /** * The field's persistent label. Its placement is platform-adaptive: iOS and * web render it ABOVE the field (the static title the Field/Form composers * produce today); Android renders the Material 3 in-container FLOATING label * (centered like a placeholder at rest, floating to the top once the field is * focused or filled). The label is the field's programmatic name (wired via * both accessibilityLabel and aria-labelledby), so a placeholder is no longer * needed for the accessible name. */ label?: string; /** * Marks the field as required: appends a destructive "*" to the label (hidden * from the accessible name) and sets aria-required on the control. Takes effect * only alongside `label`. */ required?: boolean; error?: boolean; invalid?: boolean; disabled?: boolean; /** Read-only: shows the value but blocks editing without the dimmed look. */ readOnly?: boolean; small?: boolean; large?: boolean; /** Leading addon content (e.g. "https://", "$", an icon glyph). */ prefix?: string; /** Trailing addon content (e.g. "@canvas.dev", "USD", "Copy"). */ suffix?: string; /** Render `icon` as a passive glyph inside the left of the field. */ leadingIcon?: boolean; /** Render `icon` as a passive glyph inside the right of the field. */ trailingIcon?: boolean; /** Glyph name for leadingIcon/trailingIcon (e.g. "search", "mail"). */ icon?: string; /** Render the suffix as a pressable action button rather than a passive label. */ action?: boolean; /** Called when the action suffix is pressed (action only). */ onActionPress?: (event: GestureResponderEvent) => void; /** * Accessible name for the field when there is no programmatically-associated * visible label. Maps to accessibilityLabel + the aria-label web alias on the * underlying TextInput, so a Form/Field control is announced with its name. */ accessibilityLabel?: string; /** * ID of the visible label element that names this field (its `nativeID`). * react-native-web forwards aria-labelledby to the DOM input; prefer this over * accessibilityLabel when a visible label is present so the label and * field are programmatically linked. */ "aria-labelledby"?: string; /** * ID of the helper/error text that describes this field (its `nativeID`), so a * screen reader reads the hint after the field name. */ "aria-describedby"?: string; /** Outer flex composition within a parent only, never a restyle hook; width comes from the width axis (block/narrow/wide). */ style?: StyleProp; } /** Build an Input component from a platform skin. */ export declare function createInput(skin: InputSkin): import("react").ForwardRefExoticComponent>; //# sourceMappingURL=input.shared.d.ts.map