import { ElementType, ReactNode, Ref, FocusEvent, KeyboardEvent, FormEvent, ComponentPropsWithoutRef } from 'react'; import { Color } from '../types.js'; import { SurfaceCutOwnProps } from './SurfaceCut.js'; export type TextareaSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl'; interface TextareaOwnProps { /** Polymorphic wrapper element. Defaults to `'div'`. The editable area itself is always a `contenteditable` `
`. */ as?: C; /** Forwarded to the `SurfaceCut` root element. */ ref?: Ref; /** Controlled value. Synced into the editable `innerText` on change (see `updateContentOnChange`). */ value?: string; /** Placeholder text shown when the editor is empty. */ placeholder?: string; /** Maximum number of characters the user can type or paste. Enforced manually since the editor is a `contenteditable` element, not a native `