@nextcloud/vue
Version:
Nextcloud vue components
660 lines (659 loc) • 21.4 kB
TypeScript
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
/**
* The details text displayed in the upper right part of the component
*/
details: {
type: StringConstructor;
default: string;
};
/**
* Name (first line of text)
*/
name: {
type: StringConstructor;
default: undefined;
};
/**
* The route for the router link.
*/
to: {
type: (ObjectConstructor | StringConstructor)[];
default: null;
};
/**
* The value for the external link
*/
href: {
type: StringConstructor;
default: string;
};
/**
* The HTML target attribute used for the link
*/
target: {
type: StringConstructor;
default: string;
};
/**
* Id for the `<a>` element
*/
anchorId: {
type: StringConstructor;
default: string;
};
/**
* Make subname bold
*/
bold: {
type: BooleanConstructor;
default: boolean;
};
/**
* Show the NcListItem in compact design
*/
compact: {
type: BooleanConstructor;
default: boolean;
};
/**
* Toggle the active state of the component
*/
active: {
type: BooleanConstructor;
default: undefined;
};
/**
* Aria label for the wrapper element
*/
linkAriaLabel: {
type: StringConstructor;
default: string;
};
/**
* Aria label for the actions toggle
*/
actionsAriaLabel: {
type: StringConstructor;
default: undefined;
};
/**
* If different from 0 this component will display the
* NcCounterBubble component
*/
counterNumber: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
/**
* Outlined or highlighted state of the counter
*/
counterType: {
type: StringConstructor;
default: string;
validator(value: unknown): boolean;
};
/**
* To be used only when the elements in the actions menu are very important
*/
forceDisplayActions: {
type: BooleanConstructor;
default: boolean;
};
/**
* Force the actions to display in a three dot menu
*/
forceMenu: {
type: BooleanConstructor;
default: boolean;
};
/**
* Show the list component layout
*/
oneLine: {
type: BooleanConstructor;
default: boolean;
};
}>, {}, {
hovered: boolean;
hasActions: boolean;
hasSubname: boolean;
displayActionsOnHoverFocus: boolean;
menuOpen: boolean;
hasIndicator: boolean;
hasDetails: boolean;
}, {
showAdditionalElements(): boolean;
showDetails(): boolean;
}, {
/**
* Handle link click
*
* @param {MouseEvent|KeyboardEvent} event - Native click or keydown event
* @param {Function} [navigate] - VueRouter link's navigate if any
* @param {string} [routerLinkHref] - VueRouter link's href
*/
onClick(event: MouseEvent | KeyboardEvent, navigate?: Function, routerLinkHref?: string): void;
showActions(): void;
hideActions(): void;
/**
* @param {FocusEvent} event UI event
*/
handleBlur(event: FocusEvent): void;
/**
* Hide the actions on mouseleave unless the menu is open
*/
handleMouseleave(): void;
handleMouseover(): void;
handleActionsUpdateOpen(e: any): void;
checkSlots(): void;
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("click" | "update:menuOpen")[], "click" | "update:menuOpen", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
/**
* The details text displayed in the upper right part of the component
*/
details: {
type: StringConstructor;
default: string;
};
/**
* Name (first line of text)
*/
name: {
type: StringConstructor;
default: undefined;
};
/**
* The route for the router link.
*/
to: {
type: (ObjectConstructor | StringConstructor)[];
default: null;
};
/**
* The value for the external link
*/
href: {
type: StringConstructor;
default: string;
};
/**
* The HTML target attribute used for the link
*/
target: {
type: StringConstructor;
default: string;
};
/**
* Id for the `<a>` element
*/
anchorId: {
type: StringConstructor;
default: string;
};
/**
* Make subname bold
*/
bold: {
type: BooleanConstructor;
default: boolean;
};
/**
* Show the NcListItem in compact design
*/
compact: {
type: BooleanConstructor;
default: boolean;
};
/**
* Toggle the active state of the component
*/
active: {
type: BooleanConstructor;
default: undefined;
};
/**
* Aria label for the wrapper element
*/
linkAriaLabel: {
type: StringConstructor;
default: string;
};
/**
* Aria label for the actions toggle
*/
actionsAriaLabel: {
type: StringConstructor;
default: undefined;
};
/**
* If different from 0 this component will display the
* NcCounterBubble component
*/
counterNumber: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
/**
* Outlined or highlighted state of the counter
*/
counterType: {
type: StringConstructor;
default: string;
validator(value: unknown): boolean;
};
/**
* To be used only when the elements in the actions menu are very important
*/
forceDisplayActions: {
type: BooleanConstructor;
default: boolean;
};
/**
* Force the actions to display in a three dot menu
*/
forceMenu: {
type: BooleanConstructor;
default: boolean;
};
/**
* Show the list component layout
*/
oneLine: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
onClick?: ((...args: any[]) => any) | undefined;
"onUpdate:menuOpen"?: ((...args: any[]) => any) | undefined;
}>, {
name: string;
bold: boolean;
details: string;
href: string;
target: string;
to: string | Record<string, any>;
active: boolean;
forceMenu: boolean;
compact: boolean;
anchorId: string;
linkAriaLabel: string;
actionsAriaLabel: string;
counterNumber: string | number;
counterType: string;
forceDisplayActions: boolean;
oneLine: boolean;
}, {}, {
NcActions: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
open: {
type: BooleanConstructor;
default: boolean;
};
manualOpen: {
type: BooleanConstructor;
default: boolean;
};
forceMenu: {
type: BooleanConstructor;
default: boolean;
};
forceName: {
type: BooleanConstructor;
default: boolean;
};
menuName: {
type: StringConstructor;
default: null;
};
primary: {
type: BooleanConstructor;
default: boolean;
};
defaultIcon: {
type: StringConstructor;
default: string;
};
ariaLabel: {
type: StringConstructor;
default: string;
};
placement: {
type: StringConstructor;
default: string;
};
boundariesElement: {
type: {
new (): Element;
prototype: Element;
};
default: () => HTMLElement | null;
};
container: {
type: (ObjectConstructor | BooleanConstructor | StringConstructor | {
new (): Element;
prototype: Element;
})[];
default: string;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
inline: {
type: NumberConstructor;
default: number;
};
variant: {
type: StringConstructor;
validator(value: unknown): boolean;
default: null;
};
size: {
type: StringConstructor;
default: string;
validator(value: unknown): boolean;
};
}>, {
randomId: string;
}, {
opened: boolean;
focusIndex: number;
actionsMenuSemanticType: "menu" | "navigation" | "dialog" | "tooltip" | "unknown";
}, {
triggerButtonVariant(): string;
config(): {
popupRole: string;
withArrowNavigation: boolean;
withTabNavigation: boolean;
withFocusTrap: boolean;
} | {
popupRole: undefined;
withArrowNavigation: boolean;
withTabNavigation: boolean;
withFocusTrap: boolean;
} | {
popupRole: string;
withArrowNavigation: boolean;
withTabNavigation: boolean;
withFocusTrap: boolean;
} | {
popupRole: undefined;
withArrowNavigation: boolean;
withTabNavigation: boolean;
withFocusTrap: boolean;
} | {
popupRole: undefined;
role: undefined;
withArrowNavigation: boolean;
withTabNavigation: boolean;
withFocusTrap: boolean;
};
withFocusTrap(): boolean;
}, {
getActionName(action: import('vue').VNode): string;
isValidSingleAction(action: import('vue').VNode): boolean;
isAction(action: any): boolean;
isIconUrl(url: string): boolean;
toggleMenu(state: any): void;
openMenu(): void;
closeMenu(returnFocus?: boolean): Promise<void>;
onOpened(): void;
onClosed(): void;
getCurrentActiveMenuItemElement(): HTMLElement | null;
getFocusableMenuItemElements(): NodeList<HTMLElement>;
onKeydown(event: object): void;
onTriggerKeydown(event: any): void;
handleEscapePressed(event: any): void;
removeCurrentActive(): void;
focusAction(): void;
focusPreviousAction(event: any): void;
focusNextAction(event: any): void;
focusFirstAction(event: any): void;
focusLastAction(event: any): void;
preventIfEvent(event: any): void;
onFocus(event: any): void;
onBlur(event: any): void;
onClick(event: any): void;
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "click" | "close" | "focus" | "open" | "closed" | "opened" | "update:open")[], "blur" | "click" | "close" | "focus" | "open" | "closed" | "opened" | "update:open", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
open: {
type: BooleanConstructor;
default: boolean;
};
manualOpen: {
type: BooleanConstructor;
default: boolean;
};
forceMenu: {
type: BooleanConstructor;
default: boolean;
};
forceName: {
type: BooleanConstructor;
default: boolean;
};
menuName: {
type: StringConstructor;
default: null;
};
primary: {
type: BooleanConstructor;
default: boolean;
};
defaultIcon: {
type: StringConstructor;
default: string;
};
ariaLabel: {
type: StringConstructor;
default: string;
};
placement: {
type: StringConstructor;
default: string;
};
boundariesElement: {
type: {
new (): Element;
prototype: Element;
};
default: () => HTMLElement | null;
};
container: {
type: (ObjectConstructor | BooleanConstructor | StringConstructor | {
new (): Element;
prototype: Element;
})[];
default: string;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
inline: {
type: NumberConstructor;
default: number;
};
variant: {
type: StringConstructor;
validator(value: unknown): boolean;
default: null;
};
size: {
type: StringConstructor;
default: string;
validator(value: unknown): boolean;
};
}>> & Readonly<{
onFocus?: ((...args: any[]) => any) | undefined;
onBlur?: ((...args: any[]) => any) | undefined;
onClick?: ((...args: any[]) => any) | undefined;
onClose?: ((...args: any[]) => any) | undefined;
onOpen?: ((...args: any[]) => any) | undefined;
onClosed?: ((...args: any[]) => any) | undefined;
onOpened?: ((...args: any[]) => any) | undefined;
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
}>, {
size: string;
disabled: boolean;
open: boolean;
primary: boolean;
ariaLabel: string;
variant: string;
inline: number;
placement: string;
container: string | boolean | Element | Record<string, any>;
manualOpen: boolean;
forceMenu: boolean;
forceName: boolean;
menuName: string;
defaultIcon: string;
boundariesElement: Element;
}, {}, {
NcButton: {
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<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;
}, import('vue').PublicProps, {
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;
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, 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: 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;
}>;
__isFragment?: never;
__isTeleport?: never;
__isSuspense?: never;
} & 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> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
$slots: Readonly<{
default?: import('vue').Slot;
icon?: import('vue').Slot;
}> & {
default?: import('vue').Slot;
icon?: import('vue').Slot;
};
});
NcPopover: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
}, {}, string, () => {
[x: symbol]: import('vue').ComputedRef<boolean> | ((returnFocus?: boolean) => Promise<void>);
}, true, {}, any>;
NcCounterBubble: import('vue').DefineComponent<{
count: number;
active?: boolean;
type?: "highlighted" | "outlined" | "";
raw?: boolean;
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
count: number;
active?: boolean;
type?: "highlighted" | "outlined" | "";
raw?: boolean;
}> & Readonly<{}>, {
type: "highlighted" | "outlined" | "";
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
NcVNodes: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
vnodes: {
type: import('vue').PropType<import('vue').VNode | import('vue').VNode[]>;
default: null;
};
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
vnodes: {
type: import('vue').PropType<import('vue').VNode | import('vue').VNode[]>;
default: null;
};
}>> & Readonly<{}>, {
vnodes: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
[key: string]: any;
}> | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
[key: string]: any;
}>[];
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;