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.

90 lines (89 loc) 3.68 kB
import type { AbstractConstructor } from '../common/mixins/constructor.js'; import { IgcInputBaseComponent, type IgcInputComponentEventMap } from '../input/input-base.js'; export interface IgcFileInputComponentEventMap extends Omit<IgcInputComponentEventMap, 'igcChange' | 'igcInput'> { igcCancel: CustomEvent<FileList>; igcChange: CustomEvent<FileList>; } declare const IgcFileInputComponent_base: import("../common/mixins/constructor.js").Constructor<import("../common/mixins/event-emitter.js").EventEmitterInterface<IgcFileInputComponentEventMap>> & AbstractConstructor<IgcInputBaseComponent>; /** * @element igc-file-input * * @slot prefix - Renders content before the input. * @slot suffix - Renders content after input. * @slot helper-text - Renders content below the input. * @slot file-selector-text - Renders content for the browse button when input type is file. * @slot file-missing-text - Renders content when input type is file and no file is chosen. * @slot value-missing - Renders content when the required validation fails. * @slot custom-error - Renders content when setCustomValidity(message) is set. * @slot invalid - Renders content when the component is in invalid state (validity.valid = false). * * @fires igcChange - Emitted when the control's checked state changes. * @fires igcCancel - Emitted when the control's file picker dialog is canceled. * * @csspart container - The main wrapper that holds all main input elements. * @csspart input - The native input element. * @csspart label - The native label element. * @csspart file-names - The file names wrapper when input type is 'file'. * @csspart file-selector-button - The browse button when input type is 'file'. * @csspart prefix - The prefix wrapper. * @csspart suffix - The suffix wrapper. * @csspart helper-text - The helper text wrapper. */ export default class IgcFileInputComponent extends IgcFileInputComponent_base { static readonly tagName = "igc-file-input"; static styles: import("lit").CSSResult[]; static register(): void; protected get __validators(): import("../common/validators.js").Validator<IgcFileInputComponent>[]; protected readonly _formValue: import("../common/mixins/forms/form-value.js").FormValue<FileList | null>; private _hasActivation; private get _fileNames(); /** * The value of the control. * @attr */ set value(value: string); get value(): string; /** * The multiple attribute of the control. * Used to indicate that a file input allows the user to select more than one file. * @attr */ multiple: boolean; /** * The accept attribute of the control. * Defines the file types as a list of comma-separated values that the file input should accept. * @attr */ accept: string; /** * The autofocus attribute of the control. * @attr */ autofocus: boolean; /** * @internal */ tabIndex: number; /** @hidden */ readonly readOnly = false; /** Returns the selected files, if any; otherwise returns null. */ get files(): FileList | null; constructor(); protected _restoreDefaultValue(): void; /** @hidden */ setSelectionRange(): void; /** @hidden */ setRangeText(): void; private _handleChange; private _handleCancel; protected _handleBlur(): void; protected _handleClick(): void; protected renderFileParts(): import("lit-html").TemplateResult<1>; protected renderInput(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'igc-file-input': IgcFileInputComponent; } } export {};