/** * Copyright Aquera Inc 2023 * * This source code is licensed under the BSD-3-Clause license found in the * LICENSE file in the root directory of this source tree. */ import {LitElement, html, CSSResultArray, TemplateResult} from 'lit'; import { customElement, property } from 'lit/decorators.js'; import {styles} from './nile-textarea.css'; import { classMap } from 'lit/directives/class-map.js'; import { query, state } from 'lit/decorators.js'; import { defaultValue } from '../internal/default-value'; import { HasSlotController } from '../internal/slot'; import { ifDefined } from 'lit/directives/if-defined.js'; import { live } from 'lit/directives/live.js'; import { watch } from '../internal/watch'; import NileElement from '../internal/nile-element'; import type { CSSResultGroup } from 'lit'; import { unsafeHTML } from 'lit/directives/unsafe-html.js'; /** * @summary Textareas collect data from the user and allow multiple lines of text. * @tag nile-text-area * * @slot label - The textarea's label. Alternatively, you can use the `label` attribute. * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute. * * @event nile-blur - Emitted when the control loses focus. * @event nile-change - Emitted when an alteration to the control's value is committed by the user. * @event nile-focus - Emitted when the control gains focus. * @event nile-input - Emitted when the control receives input. * * @csspart form-control - The form control that wraps the label, input, and help text. * @csspart form-control-label - The label's wrapper. * @csspart form-control-input - The input's wrapper. * @csspart form-control-help-text - The help text's wrapper. * @csspart base - The component's base wrapper. * @csspart textarea - The internal ` ${hasHelpText ? html` ${this.helpText} ` : ``} ${hasErrorMessage ? html` ${this.errorMessage} ` : ``}
Non-printable character detected. Remove All
${unsafeHTML(this.markedValue)}
`; } } export default NileTextarea; declare global { interface HTMLElementTagNameMap { 'nile-textarea': NileTextarea; } }