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.

43 lines (42 loc) 1.76 kB
import { LitElement, type TemplateResult, nothing } from 'lit'; import type { IgcFormControl } from '../common/mixins/forms/types.js'; 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 _target; private _hasSlottedContent; invalid: boolean; set target(value: IgcFormControl); get target(): IgcFormControl; protected createRenderRoot(): HTMLElement | DocumentFragment; handleEvent({ type }: Event): void; protected renderValidationMessage(slotName: string): TemplateResult<1>; protected renderValidationSlots(validity: ValidityState, projected?: boolean): Generator<TemplateResult<1>, void, unknown>; protected renderHelper(): TemplateResult<1> | typeof nothing; protected render(): TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'igc-validator': IgcValidationContainerComponent; } } export {};