UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

191 lines (190 loc) 5.19 kB
import { NeonSize } from '@/common/enums/NeonSize'; import { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor'; import { NeonState } from '@/common/enums/NeonState'; /** * A file upload component. This is a wrapper around an HTML file input. It can display multiple files as well as * providing a convenient UI for removing/clearing files from the list. */ declare const _default: import("vue").DefineComponent<{ /** * The disabled state of the component */ disabled: { type: BooleanConstructor; default: boolean; }; /** * Files are uploaded directly once added, there is no waiting to click a confirmation button */ directUpload: { type: BooleanConstructor; default: boolean; }; /** * Support multiple files. */ multiple: { type: BooleanConstructor; default: boolean; }; /** * HTML file input accept property for filtering the files the user is allowed to select. This is a mime type, * e.g. 'application/pdf'. */ accept: { type: StringConstructor; default: null; }; /** * Provide an id to attach to the internal HTML input[file] (also adds an aria-controls link between the button and * the hidden input). */ id: { type: StringConstructor; default: null; }; /** * The file component size */ size: { type: () => NeonSize; default: NeonSize; }; /** * The state of the input, used to indicate loading, success and error states */ state: { type: () => NeonState; default: NeonState; }; /** * The file component color */ color: { type: () => NeonFunctionalColor; default: NeonFunctionalColor; }; /** * The label of the file component button */ label: { type: StringConstructor; default: null; }; /** * The icon of the file component button */ icon: { type: StringConstructor; default: null; }; }, { fileInput: import("vue").Ref<HTMLInputElement | null>; files: import("vue").Ref<{ readonly lastModified: number; readonly name: string; readonly webkitRelativePath: string; readonly size: number; readonly type: string; arrayBuffer: () => Promise<ArrayBuffer>; slice: (start?: number | undefined, end?: number | undefined, contentType?: string | undefined) => Blob; stream: () => ReadableStream<Uint8Array>; text: () => Promise<string>; }[]>; fileList: import("vue").ComputedRef<{ key: string; label: string; }[]>; fileInputModel: import("vue").Ref<string>; remove: (filename: string) => void; clearAll: () => void; openFileDialog: () => void; onInput: (event: Event) => void; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ /** * The disabled state of the component */ disabled: { type: BooleanConstructor; default: boolean; }; /** * Files are uploaded directly once added, there is no waiting to click a confirmation button */ directUpload: { type: BooleanConstructor; default: boolean; }; /** * Support multiple files. */ multiple: { type: BooleanConstructor; default: boolean; }; /** * HTML file input accept property for filtering the files the user is allowed to select. This is a mime type, * e.g. 'application/pdf'. */ accept: { type: StringConstructor; default: null; }; /** * Provide an id to attach to the internal HTML input[file] (also adds an aria-controls link between the button and * the hidden input). */ id: { type: StringConstructor; default: null; }; /** * The file component size */ size: { type: () => NeonSize; default: NeonSize; }; /** * The state of the input, used to indicate loading, success and error states */ state: { type: () => NeonState; default: NeonState; }; /** * The file component color */ color: { type: () => NeonFunctionalColor; default: NeonFunctionalColor; }; /** * The label of the file component button */ label: { type: StringConstructor; default: null; }; /** * The icon of the file component button */ icon: { type: StringConstructor; default: null; }; }>> & { "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; }, { disabled: boolean; label: string; icon: string; size: NeonSize; color: NeonFunctionalColor; id: string; state: NeonState; directUpload: boolean; multiple: boolean; accept: string; }, {}>; export default _default;