@nextcloud/vue
Version:
Nextcloud vue components
320 lines (319 loc) • 15.9 kB
TypeScript
import { Slot, nextTick } from 'vue';
type __VLS_Props = {
/**
* Unique id for this menu
*/
id: string;
/**
* aria-label attribute of the menu open button
*/
ariaLabel?: string;
/**
* Current menu open state
*/
open?: boolean;
/**
* Pass `true` if the header menu is used for website navigation
*
* The wrapper tag will be set to `nav` and its `aria-labelledby`
* will be associated with the menu open button
*/
isNav?: boolean;
/**
* Additional visually hidden description text for the menu
* open button
*/
description?: string;
/**
* A query-selector or an array of query-selectors
* to be ignored when clicking outside an element
*/
excludeClickOutsideSelectors?: string | string[];
};
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: Readonly<{
/** The menu content */
default?: Slot;
/** Icon trigger slot. Make sure the svg path is at least 16px. Usually mdi icon works at 20px */
trigger?: Slot;
}> & {
/** The menu content */
default?: Slot;
/** Icon trigger slot. Make sure the svg path is at least 16px. Usually mdi icon works at 20px */
trigger?: Slot;
};
refs: {
headerMenu: unknown;
triggerButton: ({
$: import('vue').ComponentInternalInstance;
$data: {};
$props: {
readonly alignment?: import('../NcButton/NcButton.vue').ButtonAlignment | undefined;
readonly ariaLabel?: string | undefined;
readonly disabled?: boolean | undefined;
readonly download?: string | true | undefined;
readonly href?: string | undefined;
readonly pressed?: boolean | undefined | undefined;
readonly size?: import('../NcButton/NcButton.vue').ButtonSize | undefined;
readonly target?: string | undefined;
readonly text?: string | undefined;
readonly to?: import('vue-router').RouteLocationRaw | undefined;
readonly type?: import('../NcButton/NcButton.vue').ButtonType | undefined;
readonly variant?: import('../NcButton/NcButton.vue').ButtonVariant | undefined;
readonly wide?: boolean | undefined;
readonly onClick?: ((e: MouseEvent) => any) | undefined;
readonly "onUpdate:pressed"?: ((pressed: boolean) => any) | undefined;
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: import('vue').ComponentPublicInstance | null;
$parent: import('vue').ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "click", e: MouseEvent) => void) & ((event: "update:pressed", pressed: boolean) => void);
$el: any;
$options: import('vue').ComponentOptionsBase<Readonly<{
alignment?: import('../NcButton/NcButton.vue').ButtonAlignment;
ariaLabel?: string;
disabled?: boolean;
download?: string | true;
href?: string;
pressed?: boolean | undefined;
size?: import('../NcButton/NcButton.vue').ButtonSize;
target?: string;
text?: string;
to?: import('vue-router').RouteLocationRaw;
type?: import('../NcButton/NcButton.vue').ButtonType;
variant?: import('../NcButton/NcButton.vue').ButtonVariant;
wide?: boolean;
}> & Readonly<{
onClick?: ((e: MouseEvent) => any) | undefined;
"onUpdate:pressed"?: ((pressed: boolean) => any) | undefined;
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
click: (e: MouseEvent) => any;
"update:pressed": (pressed: boolean) => any;
}, string, {
size: import('../NcButton/NcButton.vue').ButtonSize;
type: import('../NcButton/NcButton.vue').ButtonType;
text: string;
alignment: import('../NcButton/NcButton.vue').ButtonAlignment;
ariaLabel: string;
download: string | true;
href: string;
pressed: boolean;
target: string;
to: import('vue-router').RouteLocationRaw;
variant: import('../NcButton/NcButton.vue').ButtonVariant;
}, {}, 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<{
size: import('../NcButton/NcButton.vue').ButtonSize;
type: import('../NcButton/NcButton.vue').ButtonType;
text: string;
alignment: import('../NcButton/NcButton.vue').ButtonAlignment;
ariaLabel: string;
download: string | true;
href: string;
pressed: boolean;
target: string;
to: import('vue-router').RouteLocationRaw;
variant: import('../NcButton/NcButton.vue').ButtonVariant;
}> & Omit<Readonly<{
alignment?: import('../NcButton/NcButton.vue').ButtonAlignment;
ariaLabel?: string;
disabled?: boolean;
download?: string | true;
href?: string;
pressed?: boolean | undefined;
size?: import('../NcButton/NcButton.vue').ButtonSize;
target?: string;
text?: string;
to?: import('vue-router').RouteLocationRaw;
type?: import('../NcButton/NcButton.vue').ButtonType;
variant?: import('../NcButton/NcButton.vue').ButtonVariant;
wide?: boolean;
}> & Readonly<{
onClick?: ((e: MouseEvent) => any) | undefined;
"onUpdate:pressed"?: ((pressed: boolean) => any) | undefined;
}>, "size" | "type" | "text" | "alignment" | "ariaLabel" | "download" | "href" | "pressed" | "target" | "to" | "variant"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
$slots: Readonly<{
default?: Slot;
icon?: Slot;
}> & {
default?: Slot;
icon?: Slot;
};
}) | null;
contentContainer: HTMLDivElement;
};
rootEl: any;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
closed: () => any;
opened: () => any;
"update:open": (v: boolean) => any;
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
onClosed?: (() => any) | undefined;
onOpened?: (() => any) | undefined;
"onUpdate:open"?: ((v: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
headerMenu: unknown;
triggerButton: ({
$: import('vue').ComponentInternalInstance;
$data: {};
$props: {
readonly alignment?: import('../NcButton/NcButton.vue').ButtonAlignment | undefined;
readonly ariaLabel?: string | undefined;
readonly disabled?: boolean | undefined;
readonly download?: string | true | undefined;
readonly href?: string | undefined;
readonly pressed?: boolean | undefined | undefined;
readonly size?: import('../NcButton/NcButton.vue').ButtonSize | undefined;
readonly target?: string | undefined;
readonly text?: string | undefined;
readonly to?: import('vue-router').RouteLocationRaw | undefined;
readonly type?: import('../NcButton/NcButton.vue').ButtonType | undefined;
readonly variant?: import('../NcButton/NcButton.vue').ButtonVariant | undefined;
readonly wide?: boolean | undefined;
readonly onClick?: ((e: MouseEvent) => any) | undefined;
readonly "onUpdate:pressed"?: ((pressed: boolean) => any) | undefined;
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: import('vue').ComponentPublicInstance | null;
$parent: import('vue').ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "click", e: MouseEvent) => void) & ((event: "update:pressed", pressed: boolean) => void);
$el: any;
$options: import('vue').ComponentOptionsBase<Readonly<{
alignment?: import('../NcButton/NcButton.vue').ButtonAlignment;
ariaLabel?: string;
disabled?: boolean;
download?: string | true;
href?: string;
pressed?: boolean | undefined;
size?: import('../NcButton/NcButton.vue').ButtonSize;
target?: string;
text?: string;
to?: import('vue-router').RouteLocationRaw;
type?: import('../NcButton/NcButton.vue').ButtonType;
variant?: import('../NcButton/NcButton.vue').ButtonVariant;
wide?: boolean;
}> & Readonly<{
onClick?: ((e: MouseEvent) => any) | undefined;
"onUpdate:pressed"?: ((pressed: boolean) => any) | undefined;
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
click: (e: MouseEvent) => any;
"update:pressed": (pressed: boolean) => any;
}, string, {
size: import('../NcButton/NcButton.vue').ButtonSize;
type: import('../NcButton/NcButton.vue').ButtonType;
text: string;
alignment: import('../NcButton/NcButton.vue').ButtonAlignment;
ariaLabel: string;
download: string | true;
href: string;
pressed: boolean;
target: string;
to: import('vue-router').RouteLocationRaw;
variant: import('../NcButton/NcButton.vue').ButtonVariant;
}, {}, 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<{
size: import('../NcButton/NcButton.vue').ButtonSize;
type: import('../NcButton/NcButton.vue').ButtonType;
text: string;
alignment: import('../NcButton/NcButton.vue').ButtonAlignment;
ariaLabel: string;
download: string | true;
href: string;
pressed: boolean;
target: string;
to: import('vue-router').RouteLocationRaw;
variant: import('../NcButton/NcButton.vue').ButtonVariant;
}> & Omit<Readonly<{
alignment?: import('../NcButton/NcButton.vue').ButtonAlignment;
ariaLabel?: string;
disabled?: boolean;
download?: string | true;
href?: string;
pressed?: boolean | undefined;
size?: import('../NcButton/NcButton.vue').ButtonSize;
target?: string;
text?: string;
to?: import('vue-router').RouteLocationRaw;
type?: import('../NcButton/NcButton.vue').ButtonType;
variant?: import('../NcButton/NcButton.vue').ButtonVariant;
wide?: boolean;
}> & Readonly<{
onClick?: ((e: MouseEvent) => any) | undefined;
"onUpdate:pressed"?: ((pressed: boolean) => any) | undefined;
}>, "size" | "type" | "text" | "alignment" | "ariaLabel" | "download" | "href" | "pressed" | "target" | "to" | "variant"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
$slots: Readonly<{
default?: Slot;
icon?: Slot;
}> & {
default?: Slot;
icon?: Slot;
};
}) | null;
contentContainer: HTMLDivElement;
}, any>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};