import { type TextInput as RNTextInput } from "react-native"; import { type MeasureProps, type SizingKey, type StyleProp, type TextStyle } from "../../style/index.js"; import { type TextEntryProps } from "../input/input.shared.js"; import { type TextareaSkin, type Size } from "./textarea.styles.js"; export interface TextareaProps extends TextEntryProps, MeasureProps { /** Controlled text value. Omit and use `defaultValue` for uncontrolled use. */ value?: string; /** Fired with the next text value on each edit. */ onChangeText?: (next: 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; Android renders the Material 3 in-container FLOATING * label — a MULTILINE float pinned to the first text line at rest, floating to the * top once the field is focused or filled. * * * iOS renders it ABOVE the field. * * * Android renders the Material 3 in-container FLOATING label: a MULTILINE float * pinned to the first text line at rest, floating to the top once the field is focused or filled. * * The label names the field for a11y. */ label?: string; eyebrow?: boolean; /** Preserve the platform system focus outline. */ systemFocus?: boolean; /** Dense paragraph-entry metrics matching the application field family. */ dense?: boolean; /** Bare monospace prompt metrics for a terminal transcript composer. Implies embedded. */ terminal?: boolean; /** * A chat composer's entry: 15 / 20 text at 6 by 8 in, so one line sits in a 44 px * composer box beside 32 px controls (the Claude desktop composer). Pair with `embedded`. */ composer?: boolean; accessibilityLabel?: string; /** Prevent edits while retaining focus and the resting appearance. */ readOnly?: boolean; /** * Marks the field as required: appends a destructive "*" to the label (decorative, * never in the accessible name) and announces the field as required, * * through * aria-required on the web and with the word in its name ("Bio, required") on iOS * and Android. * * * with the word in its name ("Bio, required"). * * The star and the spoken word take effect only alongside `label`. */ required?: boolean; /** * Visible rows the field sizes to (4 when omitted). Sets the min height (rows times * the skin's line plus the field's padding); the field still grows with content past * this floor. */ rows?: number; /** * Show a live character-count line inside the field's own anatomy: an * end-aligned muted caption under the control reading "N / max" (just "N" * when no `maxLength` is set), where N is the current text length. * * When on, `maxLength` becomes a SOFT cap rather than a hard one: it is NOT * forwarded to the native TextInput (a hard cap silently drops the extra * keystroke, so the overage could never be seen), the user can type past it, * and once N exceeds `maxLength` the count turns destructive AND the field * enters its error state automatically (red border/underline). Leave * `showCount` off to keep `maxLength` as a hard input cap. */ showCount?: boolean; /** Error/validation state: a destructive cue. `invalid` is an alias. */ error?: boolean; invalid?: boolean; small?: boolean; large?: boolean; /** Blocks editing and focus, and dims the field. */ disabled?: boolean; /** * Borderless: drop the field's own border and radius so it sits flush inside a * framed container (e.g. a Card with a formatting toolbar above it). */ flush?: boolean; /** Bare editor inside a parent-owned field surface and focus frame. Implies flush. */ embedded?: boolean; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: StyleProp>; } export declare function sizeOf(p: TextareaProps): Size; /** The entry's metrics (pick one): bare terminal prompt, dense paragraph entry, or the skin's own. */ export type Metrics = "terminal" | "composer" | "dense" | "default"; export declare function metricsOf(p: TextareaProps): Metrics; /** Build a Textarea component from a platform skin. */ export declare function createTextarea(skin: TextareaSkin): import("react").ForwardRefExoticComponent>; //# sourceMappingURL=textarea.shared.d.ts.map