@loadsmart/miranda-wc
Version:
Miranda Web Components component library
88 lines (87 loc) • 2.37 kB
TypeScript
import type { FieldStatus } from '../field';
import { Component } from '../component';
import '../button';
import '../icon';
import '../layout';
import '../link';
import '../text';
import type { FilePickerFile } from './file-picker.types';
import './file-item';
export type FilePickerProps = {
name?: string;
error?: string;
disabled?: boolean;
files?: FilePickerFile[];
accept?: HTMLInputElement['accept'];
status?: FieldStatus;
hint?: string;
onchange?: GlobalEventHandlers['onchange'];
};
export declare class FilePicker extends Component implements FilePickerProps {
#private;
static styles: import("lit").CSSResult[];
accept: FilePickerProps['accept'];
name: FilePickerProps['name'];
disabled: FilePickerProps['disabled'];
hint: FilePickerProps['hint'];
error: FilePickerProps['error'];
status: FilePickerProps['status'];
files: FilePickerProps['files'];
dragging: boolean;
static get properties(): {
accept: {
type: StringConstructor;
attribute: string;
reflect: boolean;
};
id: {
type: StringConstructor;
attribute: string;
reflect: boolean;
};
disabled: {
type: BooleanConstructor;
attribute: string;
reflect: boolean;
};
error: {
type: StringConstructor;
attribute: string;
reflect: boolean;
};
hint: {
type: StringConstructor;
attribute: string;
reflect: boolean;
};
name: {
type: StringConstructor;
attribute: string;
reflect: boolean;
};
status: {
type: StringConstructor;
attribute: string;
reflect: boolean;
};
files: {
type: ArrayConstructor;
attribute: string;
reflect: boolean;
};
dragging: {
type: BooleanConstructor;
state: boolean;
reflect: boolean;
};
};
static define(): void;
addFiles(files: FileList): void;
removeFiles(): void;
render(): import("lit-html").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'm-file-picker': FilePicker;
}
}