/** * SvTextInput - the base single-line text editor on the shared editor contract * (label / hint / error / RTL / a11y via SvField). Handles `text`, `email`, * `url`, `tel` and `search`. As a grid cell editor it honours the interaction * contract: Enter commits, Escape cancels. Parity: Smart `smart-input`. * * The control box, size, invalid state, clear button and leading/trailing * adornments are all owned by SvField's `frame` mode, so they behave identically * across the text-input family. */ import type { Snippet } from 'svelte'; import { type EditorAction, type SvEditorProps } from './editor-contract'; type Props = SvEditorProps & { value?: string; onChange?: (value: string) => void; /** Commit + stop editing (Enter, or supplied by the grid in a cell). */ onCommit?: (value: string) => void; /** Cancel editing (Escape). */ onCancel?: () => void; placeholder?: string; type?: 'text' | 'email' | 'url' | 'tel' | 'search'; maxlength?: number; /** Show an inline clear (x) button when non-empty. */ clearable?: boolean; autocomplete?: AutoFill; /** Autofocus + select on mount (used when mounted as a cell editor). */ autofocus?: boolean; /** Select the whole value whenever the field is focused. */ selectOnFocus?: boolean; /** Leading adornment (icon/button) inside the field. */ leading?: Snippet; /** Trailing adornment (icon/button) inside the field. */ trailing?: Snippet; /** Plain-text affix at the start (e.g. a `$` or protocol). */ prefix?: string; /** Plain-text affix at the end (e.g. a unit). */ suffix?: string; /** `floating` animates the label up on focus/value. Default `static`. */ labelMode?: 'static' | 'floating'; /** Compact in-field action buttons (lookup/generate/copy...). */ actions?: EditorAction[]; /** Stretch to the container width. */ block?: boolean; }; declare const SvTextInput: import("svelte").Component; type SvTextInput = ReturnType; export default SvTextInput;