import type { HTMLTextareaAttributes } from 'svelte/elements';
type Props = {
value: string | null | undefined;
/** @default 'md' */
size?: 'sm' | 'md' | 'lg';
disabled?: boolean;
/** Non-editable but selectable. */
readonly?: boolean;
/** Visual display mode — non-focusable, no hover/focus animations. */
inert?: boolean;
/** Visual error state — also sets `aria-invalid="true"`. */
error?: boolean;
/** Strip border + background + focus underline. */
borderless?: boolean;
/** Show emoji-picker trigger inside the textarea. */
emoji?: boolean;
/**
* Single-line mode: starts at 1 row, strips Enter and pasted line breaks. Long text
* still soft-wraps and the textarea grows vertically up to `maxRows` — that's the
* point of using a textarea over `` for no-enter fields like article titles.
*/
singleLine?: boolean;
/** Fire `on.submit` on Enter (without modifiers). Shift+Enter still inserts a newline. */
submitOnEnter?: boolean;
/**
* Strip leading / trailing whitespace, including any surrounding blank lines, when the value is committed — on
* `change`, on blur, and before `on.submit`. Typing is never touched, so the committed value
* always equals what the field shows.
* @default true
*/
trim?: boolean;
placeholder?: string;
name?: string;
id?: string | null;
autofocus?: boolean;
maxLength?: number | null;
/** Minimum visible rows. @default 3 */
rows?: number;
/** Auto-grow to content up to maxRows. @default true */
autoresize?: boolean;
/** Maximum auto-grown rows before scrolling kicks in. @default 12 */
maxRows?: number;
autocomplete?: HTMLTextareaAttributes['autocomplete'];
spellcheck?: boolean;
'aria-describedby'?: string;
'aria-label'?: string;
'aria-required'?: boolean;
on?: {
input?: (value: string) => void;
change?: (value: string) => void;
submit?: () => void;
mounted?: (data: {
textarea: HTMLTextAreaElement;
}) => void;
blur?: () => void;
focus?: () => void;
};
};
/**
* Multi-line text input. Auto-resizes to content between `rows` and `maxRows` by default.
* Set `singleLine` to strip line breaks (paste-safe), `submitOnEnter` to fire `on.submit` on
* plain Enter, `emoji` to show the inline emoji picker. Imperative `focus()` / `select()`
* exposed via `bind:this`.
*
* Leading / trailing whitespace, including any surrounding blank lines, is stripped at every commit
* point — `change`, blur, and before `on.submit` — so the value the consumer receives always matches
* what the field shows. Blank lines inside the text are left alone. Typing is untouched. Pass
* `trim={false}` to opt out.
*
* ### CSS Custom Properties
* | Property | Description | Default |
* |---|---|---|
* | `--sc-kit--textarea--padding-block` | Vertical padding | per size |
* | `--sc-kit--textarea--padding-inline` | Horizontal padding | per size |
* | `--sc-kit--textarea--width` | Container width | `100%` |
* | `--sc-kit--textarea--background` | Container background | `var(--sc-kit--color--bg--field)` |
* | `--sc-kit--textarea--background--disabled` | Disabled / inert background | `var(--sc-kit--color--bg--field-alt)` |
* | `--sc-kit--textarea--border-color` | Border color | `var(--sc-kit--color--border--field)` |
* | `--sc-kit--textarea--border-color--hover` | Border color on hover | `var(--sc-kit--color--border--strong)` |
* | `--sc-kit--textarea--border-color--error` | Border color in error state | `var(--sc-kit--color--danger)` |
* | `--sc-kit--textarea--border-radius` | Border radius | per size — `sm` 4px, `md`/`lg` 6px |
* | `--sc-kit--textarea--underline-color` | Inset bottom-underline (transparent default, accent on focus-within, danger on error) | `transparent` |
* | `--sc-kit--textarea--font-size` | Text font size | per size |
* | `--sc-kit--textarea--color` | Text color | `var(--sc-kit--color--text--primary)` |
* | `--sc-kit--textarea--placeholder--color` | Placeholder text color | `var(--sc-kit--color--text--placeholder)` |
*/
declare const Cmp: import("svelte").Component`. */ focus: () => void;
select: () => void;
}, "">;
type Cmp = ReturnType;
export default Cmp;