/** @jsxImportSource react */ import { Widget, VDOM, getContent } from "../../ui/Widget"; import { TextField, TextFieldConfig } from "./TextField"; import { getFieldTooltip, FieldInstance } from "./Field"; import type { RenderingContext } from "../../ui/RenderingContext"; import type { Instance } from "../../ui/Instance"; import { tooltipParentWillReceiveProps, tooltipParentWillUnmount, tooltipMouseMove, tooltipMouseLeave, tooltipParentDidMount, } from "../overlay/tooltip-ops"; import { stopPropagation } from "../../util/eventCallbacks"; import { KeyCode } from "../../util/KeyCode"; import { autoFocus } from "../autoFocus"; import { getActiveElement } from "../../util/getActiveElement"; import { NumberProp } from "../../ui/Prop"; export interface TextAreaConfig extends TextFieldConfig { /** Specifies the number of visible lines. */ rows?: NumberProp; /** Event used to report on a new value. Defaults to `blur`. Other permitted value is `input`. */ reactOn?: string; /** Base CSS class to be applied to the element. Defaults to `textarea`. */ baseClass?: string; } export class TextArea extends TextField { constructor(config?: TextAreaConfig) { super(config); } declareData(...args: Record[]): void { super.declareData(...args, { rows: undefined, }); } prepareData(context: RenderingContext, instance: FieldInstance