@nextcloud/vue
Version:
Nextcloud vue components
153 lines (152 loc) • 4.56 kB
TypeScript
import { FocusTargetValueOrFalse } from 'focus-trap';
import { Slot } from 'vue';
type __VLS_Props = {
/**
* Name to be shown with the modal
*/
name?: string;
/**
* Declare if a previous slide is available
*/
hasPrevious?: boolean;
/**
* Declare if a next slide is available
*/
hasNext?: boolean;
/**
* Declare if hiding the modal should be animated
*/
outTransition?: boolean;
/**
* Declare if the slideshow functionality should be enabled
*/
enableSlideshow?: boolean;
/**
* Declare the slide interval
*/
slideshowDelay?: number;
/**
* Allow to pause an ongoing slideshow
*/
slideshowPaused?: boolean;
/**
* Disable swipe between slides
*/
disableSwipe?: boolean;
/**
* Enable spread navigation
*/
spreadNavigation?: boolean;
/**
* Defines the modal size.
* All sizes except 'small' change automatically to full-screen on mobile.
*/
size?: 'small' | 'normal' | 'large' | 'full';
/**
* Do not show the close button for the dialog.
*/
noClose?: boolean;
/**
* Close the modal if the user clicked outside the modal
* Only relevant if `noClose` is not set.
*/
closeOnClickOutside?: boolean;
/**
* Makes the modal backdrop opaque if true
* Will be overwritten if some buttons are shown outside
*/
dark?: boolean;
/**
* Set light backdrop. Makes the modal header appear light.
*/
lightBackdrop?: boolean;
/**
* Selector for the modal container, pass `null` to prevent automatic container mounting
*/
container?: string | null;
/**
* Pass in `true` if you want the modal 'close' button to be displayed
* outside the modal boundaries, in the top right corner of the window.
*
* @since 8.25.0
*/
closeButtonOutside?: boolean;
/**
* Additional elements to add to the focus trap
*/
additionalTrapElements?: (string | HTMLElement)[];
/**
* Display x items inline
*
* @see NcActions component usage
*/
inlineActions?: number;
/**
* Id of the element that labels the dialog (the name)
* Not needed if the `name` prop is set, but if no name is set you need to provide the ID of an element to label the dialog for accessibility.
*/
labelId?: string;
/**
* Set element to return focus to after focus trap deactivation
*/
setReturnFocus?: FocusTargetValueOrFalse;
};
type __VLS_PublicProps = {
'show'?: boolean;
} & __VLS_Props;
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: Readonly<{
/**
* Actions to show (one or more NcAction* components)
*/
actions?: Slot;
/**
* The modal content to show.
*/
default?: Slot;
}> & {
/**
* Actions to show (one or more NcAction* components)
*/
actions?: Slot;
/**
* The modal content to show.
*/
default?: Slot;
};
refs: {
mask: HTMLDivElement;
};
rootEl: any;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
close: (payload?: Event | undefined) => any;
next: (payload?: Event | undefined) => any;
previous: (payload?: Event | undefined) => any;
"update:show": (...args: unknown[]) => any;
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
onClose?: ((payload?: Event | undefined) => any) | undefined;
onNext?: ((payload?: Event | undefined) => any) | undefined;
onPrevious?: ((payload?: Event | undefined) => any) | undefined;
"onUpdate:show"?: ((...args: unknown[]) => any) | undefined;
}>, {
size: "small" | "normal" | "large" | "full";
name: string;
container: string | null;
setReturnFocus: FocusTargetValueOrFalse;
slideshowDelay: number;
additionalTrapElements: (string | HTMLElement)[];
inlineActions: number;
labelId: string;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
mask: 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;
};
};