UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

47 lines (46 loc) 1.86 kB
import { LitElement, nothing, type TemplateResult } from 'lit'; import { type IgcFormControl } from '../common/mixins/forms/types.js'; /** Configuration for the validation container. */ interface ValidationContainerConfig { /** The id attribute for the validation container. */ id?: string; /** Project the validation container to the given slot inside the host shadow DOM. */ slot?: string; /** Additional part(s) that should be bound to the validation container. */ part?: string; /** Whether the validation container should expose a helper-text slot. */ hasHelperText?: boolean; } /** * @element igc-validator * * @csspart helper-text - The base wrapper * @csspart validation-message - The validation error message container * @csspart validation-icon - The validation error icon */ export default class IgcValidationContainerComponent extends LitElement { static readonly tagName = "igc-validator"; static styles: import("lit").CSSResult[]; static register(): void; static create(host: IgcFormControl, config?: ValidationContainerConfig): TemplateResult; private readonly _abortHandle; private _target; private _hasSlottedContent; invalid: boolean; set target(value: IgcFormControl); get target(): IgcFormControl; constructor(); protected createRenderRoot(): HTMLElement | DocumentFragment; /** @internal */ handleEvent(event: Event): void; protected _renderValidationMessage(slotName: string): TemplateResult; protected _renderValidationSlots(validity: ValidityState, projected?: boolean): Generator<TemplateResult>; protected _renderHelper(): TemplateResult | typeof nothing; protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'igc-validator': IgcValidationContainerComponent; } } export {};