UNPKG

@opencloud-eu/design-system

Version:

OpenCloud Design System is used to design OpenCloud UI components

221 lines (220 loc) 11.4 kB
import { nextTick } from 'vue'; export interface Props { /** * @docs The label of the input element. */ label: string; /** * @docs The element ID of the input. */ id?: string; /** * @docs The file types that the input should accept. E.g. 'image/*, .pdf'. * @default '' */ fileTypes?: string; /** * @docs Determines if the input should accept multiple files. * @default false */ multiple?: boolean; /** * @docs Value of the input element. */ modelValue?: FileList; /** * @docs Determines if the input should have a clear button. Only gets displayed if the input has a value. * @default true */ clearButtonEnabled?: boolean; /** * @docs Determines if the input is disabled. * @default false */ disabled?: boolean; /** * @docs The error message to be displayed below the input. */ errorMessage?: string; /** * @docs Determines if the message line should be fixed. * @default false */ fixMessageLine?: boolean; /** * @docs The description message to be displayed below the input. */ descriptionMessage?: string; /** * @docs Determines if a required mark (*) should be displayed next to the label. * @default false */ requiredMark?: boolean; } export interface Emits { /** * @docs Emitted when the value of the input has updated. */ (e: 'update:modelValue', value: FileList): void; /** * @docs Emitted when the input has been focused. */ (e: 'focus', value: HTMLElement): void; } export interface Slots { /** * @docs Can be used to overwrite the default rendering of the label. */ label?: () => unknown; } declare function __VLS_template(): { attrs: Partial<{}>; slots: Readonly<Slots> & Slots; refs: { inputRef: HTMLInputElement; inputBtnRef: { $: import('vue').ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{ readonly appearance?: import('../../helpers').AppearanceType; readonly ariaLabel?: string; readonly colorRole?: "primary" | "primaryContainer" | "primaryFixed" | "secondary" | "secondaryContainer" | "secondaryFixed" | "tertiary" | "tertiaryContainer" | "tertiaryFixed" | "surface" | "surfaceContainer" | "chrome"; readonly disabled?: boolean; readonly gapSize?: import('../../helpers').SizeType | "none"; readonly href?: string; readonly justifyContent?: "left" | "center" | "right" | "space-around" | "space-between" | "space-evenly"; readonly showSpinner?: boolean; readonly size?: "small" | "medium" | "large"; readonly submit?: "null" | "button" | "submit" | "reset"; readonly target?: "_blank" | "_self" | "_parent" | "_top"; readonly to?: import('vue-router').RouteLocationRaw; readonly type?: "button" | "a" | "router-link"; readonly noHover?: boolean; readonly onClick?: (event: MouseEvent) => any; } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; }; $slots: Readonly<{ [name: string]: import('vue').Slot<any>; }>; $root: import('vue').ComponentPublicInstance | null; $parent: import('vue').ComponentPublicInstance | null; $host: Element | null; $emit: (event: "click", event: MouseEvent) => void; $el: any; $options: import('vue').ComponentOptionsBase<Readonly<import('../OcButton/OcButton.vue').Props> & Readonly<{ onClick?: (event: MouseEvent) => any; }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { click: (event: MouseEvent) => any; }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]; renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: typeof nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle; } & Readonly<{}> & Omit<Readonly<import('../OcButton/OcButton.vue').Props> & Readonly<{ onClick?: (event: MouseEvent) => any; }>, never> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & { $slots: Readonly<import('../OcButton/OcButton.vue').Slots> & import('../OcButton/OcButton.vue').Slots; }; }; rootEl: any; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { focus: (value: HTMLElement) => any; "update:modelValue": (value: FileList) => any; }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{ onFocus?: (value: HTMLElement) => any; "onUpdate:modelValue"?: (value: FileList) => any; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, { inputRef: HTMLInputElement; inputBtnRef: { $: import('vue').ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{ readonly appearance?: import('../../helpers').AppearanceType; readonly ariaLabel?: string; readonly colorRole?: "primary" | "primaryContainer" | "primaryFixed" | "secondary" | "secondaryContainer" | "secondaryFixed" | "tertiary" | "tertiaryContainer" | "tertiaryFixed" | "surface" | "surfaceContainer" | "chrome"; readonly disabled?: boolean; readonly gapSize?: import('../../helpers').SizeType | "none"; readonly href?: string; readonly justifyContent?: "left" | "center" | "right" | "space-around" | "space-between" | "space-evenly"; readonly showSpinner?: boolean; readonly size?: "small" | "medium" | "large"; readonly submit?: "null" | "button" | "submit" | "reset"; readonly target?: "_blank" | "_self" | "_parent" | "_top"; readonly to?: import('vue-router').RouteLocationRaw; readonly type?: "button" | "a" | "router-link"; readonly noHover?: boolean; readonly onClick?: (event: MouseEvent) => any; } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; }; $slots: Readonly<{ [name: string]: import('vue').Slot<any>; }>; $root: import('vue').ComponentPublicInstance | null; $parent: import('vue').ComponentPublicInstance | null; $host: Element | null; $emit: (event: "click", event: MouseEvent) => void; $el: any; $options: import('vue').ComponentOptionsBase<Readonly<import('../OcButton/OcButton.vue').Props> & Readonly<{ onClick?: (event: MouseEvent) => any; }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { click: (event: MouseEvent) => any; }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]; renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: typeof nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle; } & Readonly<{}> & Omit<Readonly<import('../OcButton/OcButton.vue').Props> & Readonly<{ onClick?: (event: MouseEvent) => any; }>, never> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & { $slots: Readonly<import('../OcButton/OcButton.vue').Slots> & import('../OcButton/OcButton.vue').Slots; }; }, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };