UNPKG

@nextcloud/vue

Version:
286 lines (285 loc) 14.7 kB
import { NcInputFieldProps } from '../NcInputField/NcInputField.vue'; type __VLS_Props = Omit<NcInputFieldProps, 'trailingButtonLabel' | 'type'> & { /** * Check if the user entered a valid password using the password_policy * app if available. * * Warning: this doesn't replace server side checking and will do nothing * if the password_policy app is disabled. */ checkPasswordStrength?: boolean; /** * The minlength property defines the minimum number of characters * (as UTF-16 code units) the user can enter. */ minlength?: number; /** * Render as input[type=text] that looks like password field. * Allows to avoid unwanted password-specific browser behavior, * such as save or generate password prompt. * Useful for secret token fields. * Note: autocomplete="off" is ignored by most browsers. */ asText?: boolean; }; /** * Focus the input element * * @param options - Focus options * @public */ declare function focus(options?: FocusOptions): void; /** * Select all the text in the input * * @public */ declare function select(): void; type __VLS_PublicProps = { modelValue?: string; 'visible'?: boolean; } & __VLS_Props; declare function __VLS_template(): { attrs: Partial<{}>; slots: { icon?(_: {}): any; }; refs: { inputField: ({ $: import('vue').ComponentInternalInstance; $data: {}; $props: { readonly modelValue: string | number; readonly class?: import('../../utils/VueTypes.ts').VueClassType | undefined; readonly inputClass?: import('../../utils/VueTypes.ts').VueClassType | undefined; readonly id?: string | undefined; readonly label?: string | undefined; readonly labelOutside?: boolean | undefined; readonly type?: "text" | "password" | "email" | "tel" | "url" | "search" | "number" | undefined; readonly placeholder?: string | undefined; readonly showTrailingButton?: boolean | undefined; readonly trailingButtonLabel?: string | undefined; readonly success?: boolean | undefined; readonly error?: boolean | undefined; readonly helperText?: string | undefined; readonly disabled?: boolean | undefined; readonly pill?: boolean | undefined; readonly "onUpdate:modelValue"?: ((value: string | number) => any) | undefined; readonly onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined; } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; } & { input: HTMLInputElement; }; $slots: Readonly<{ [name: string]: import('vue').Slot<any> | undefined; }>; $root: import('vue').ComponentPublicInstance | null; $parent: import('vue').ComponentPublicInstance | null; $host: Element | null; $emit: ((event: "update:modelValue", value: string | number) => void) & ((event: "trailingButtonClick", event: MouseEvent) => void); $el: any; $options: import('vue').ComponentOptionsBase<Readonly<{ modelValue: string | number; } & NcInputFieldProps> & Readonly<{ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined; onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined; }>, { focus: (options?: FocusOptions) => void; select: () => void; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { "update:modelValue": (value: string | number) => any; trailingButtonClick: (event: MouseEvent) => any; }, string, { id: string; type: "text" | "password" | "email" | "tel" | "url" | "search" | "number"; label: string; class: import('../../utils/VueTypes.ts').VueClassType; inputClass: import('../../utils/VueTypes.ts').VueClassType; placeholder: string; trailingButtonLabel: string; helperText: 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 import('vue').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<{ id: string; type: "text" | "password" | "email" | "tel" | "url" | "search" | "number"; label: string; class: import('../../utils/VueTypes.ts').VueClassType; inputClass: import('../../utils/VueTypes.ts').VueClassType; placeholder: string; trailingButtonLabel: string; helperText: string; }> & Omit<Readonly<{ modelValue: string | number; } & NcInputFieldProps> & Readonly<{ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined; onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined; }>, "select" | "focus" | ("id" | "type" | "label" | "class" | "inputClass" | "placeholder" | "trailingButtonLabel" | "helperText")> & import('vue').ShallowUnwrapRef<{ focus: (options?: FocusOptions) => void; select: () => void; }> & {} & import('vue').ComponentCustomProperties & {} & { $slots: Readonly<{ icon?: import('vue').Slot; 'trailing-button-icon'?: import('vue').Slot; }> & { icon?: import('vue').Slot; 'trailing-button-icon'?: import('vue').Slot; }; }) | null; }; rootEl: any; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, { focus: typeof focus; select: typeof select; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { invalid: () => any; "update:modelValue": (value: string) => any; valid: () => any; "update:visible": (value: boolean) => any; }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{ onInvalid?: (() => any) | undefined; "onUpdate:modelValue"?: ((value: string) => any) | undefined; onValid?: (() => any) | undefined; "onUpdate:visible"?: ((value: boolean) => any) | undefined; }>, { inputClass: import('../../utils/VueTypes.ts').VueClassType; showTrailingButton: boolean; minlength: number; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, { inputField: ({ $: import('vue').ComponentInternalInstance; $data: {}; $props: { readonly modelValue: string | number; readonly class?: import('../../utils/VueTypes.ts').VueClassType | undefined; readonly inputClass?: import('../../utils/VueTypes.ts').VueClassType | undefined; readonly id?: string | undefined; readonly label?: string | undefined; readonly labelOutside?: boolean | undefined; readonly type?: "text" | "password" | "email" | "tel" | "url" | "search" | "number" | undefined; readonly placeholder?: string | undefined; readonly showTrailingButton?: boolean | undefined; readonly trailingButtonLabel?: string | undefined; readonly success?: boolean | undefined; readonly error?: boolean | undefined; readonly helperText?: string | undefined; readonly disabled?: boolean | undefined; readonly pill?: boolean | undefined; readonly "onUpdate:modelValue"?: ((value: string | number) => any) | undefined; readonly onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined; } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; } & { input: HTMLInputElement; }; $slots: Readonly<{ [name: string]: import('vue').Slot<any> | undefined; }>; $root: import('vue').ComponentPublicInstance | null; $parent: import('vue').ComponentPublicInstance | null; $host: Element | null; $emit: ((event: "update:modelValue", value: string | number) => void) & ((event: "trailingButtonClick", event: MouseEvent) => void); $el: any; $options: import('vue').ComponentOptionsBase<Readonly<{ modelValue: string | number; } & NcInputFieldProps> & Readonly<{ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined; onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined; }>, { focus: (options?: FocusOptions) => void; select: () => void; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { "update:modelValue": (value: string | number) => any; trailingButtonClick: (event: MouseEvent) => any; }, string, { id: string; type: "text" | "password" | "email" | "tel" | "url" | "search" | "number"; label: string; class: import('../../utils/VueTypes.ts').VueClassType; inputClass: import('../../utils/VueTypes.ts').VueClassType; placeholder: string; trailingButtonLabel: string; helperText: 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 import('vue').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<{ id: string; type: "text" | "password" | "email" | "tel" | "url" | "search" | "number"; label: string; class: import('../../utils/VueTypes.ts').VueClassType; inputClass: import('../../utils/VueTypes.ts').VueClassType; placeholder: string; trailingButtonLabel: string; helperText: string; }> & Omit<Readonly<{ modelValue: string | number; } & NcInputFieldProps> & Readonly<{ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined; onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined; }>, "select" | "focus" | ("id" | "type" | "label" | "class" | "inputClass" | "placeholder" | "trailingButtonLabel" | "helperText")> & import('vue').ShallowUnwrapRef<{ focus: (options?: FocusOptions) => void; select: () => void; }> & {} & import('vue').ComponentCustomProperties & {} & { $slots: Readonly<{ icon?: import('vue').Slot; 'trailing-button-icon'?: import('vue').Slot; }> & { icon?: import('vue').Slot; 'trailing-button-icon'?: import('vue').Slot; }; }) | null; }, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };