@nextcloud/vue
Version:
Nextcloud vue components
278 lines (277 loc) • 14.1 kB
TypeScript
import { Slot } from 'vue';
import { NcInputFieldProps } from '../NcInputField/index.ts';
type __VLS_Props = NcInputFieldProps & {
/**
* Specifies which material design icon should be used for the trailing button.
*/
trailingButtonIcon?: 'arrowEnd' | 'close' | 'undo';
/**
* The `aria-label` to set on the trailing button
* If no explicit value is set it will default to the one matching the `trailingButtonIcon`:
* - 'Clear text'
* - 'Save changes'
* - 'Undo changes'
*/
trailingButtonLabel?: string;
};
/**
* 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 | number;
} & __VLS_Props;
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: Readonly<{
/**
* Leading icon, set the size to 20.
*/
icon?: Slot;
}> & {
/**
* Leading icon, set the size to 20.
*/
icon?: Slot;
};
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]: 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?: Slot;
'trailing-button-icon'?: Slot;
}> & {
icon?: Slot;
'trailing-button-icon'?: 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, {
"update:modelValue": (value: string | number) => any;
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
}>, {
trailingButtonLabel: string;
trailingButtonIcon: "arrowEnd" | "close" | "undo";
}, {}, {}, {}, 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]: 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?: Slot;
'trailing-button-icon'?: Slot;
}> & {
icon?: Slot;
'trailing-button-icon'?: 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;
};
};