UNPKG

@nextcloud/vue

Version:
135 lines (134 loc) 4.57 kB
import { Slot } from 'vue'; import { ComponentProps, VueClassType } from '../../utils/VueTypes.ts'; import { default as NcDialogButton } from '../NcDialogButton/index.ts'; type NcDialogButtonProps = ComponentProps<typeof NcDialogButton>; type __VLS_Props = { /** Name of the dialog (the heading) */ name: string; /** Text of the dialog */ message?: string; /** Additional elements to add to the focus trap */ additionalTrapElements?: Array<string | HTMLElement>; /** * The element where to mount the dialog, if `null` is passed the dialog is mounted in place. */ container?: string; /** * Size of the underlying NcModal */ size?: 'small' | 'normal' | 'large' | 'full'; /** * Buttons to display */ buttons?: NcDialogButtonProps[]; /** * Make the dialog wrapper a HTML form element. * The buttons will be wrapped within the form so they can be used as submit / reset buttons. * Please note that when using the property the `navigation` should not be used. */ isForm?: boolean; /** * Do not show the close button for the dialog. */ noClose?: boolean; /** * Close the dialog if the user clicked outside of the dialog * Only relevant if `noClose` is not set. */ closeOnClickOutside?: boolean; /** * Declare if hiding the modal should be animated */ outTransition?: boolean; /** * aria-label for the dialog navigation. * Use it when you want to provide a more meaningful label than the dialog name. * * By default, navigation is labeled by the dialog name. */ navigationAriaLabel?: string; /** * aria-labelledby for the dialog navigation. * Use it when you have an implicit navigation label (e.g. a heading). * * By default, navigation is labeled by the dialog name. */ navigationAriaLabelledby?: string; /** * Optionally pass additional classes which will be set on the content wrapper for custom styling */ contentClasses?: VueClassType; /** * Optionally pass additional classes which will be set on the dialog itself * (the default `class` attribute will be set on the modal wrapper) */ dialogClasses?: VueClassType; /** * Optionally pass additional classes which will be set on the navigation for custom styling * * @example * ```html * <DialogBase :navigation-classes="['mydialog-navigation']"><!-- --></DialogBase> * <!-- ... --> * <style lang="scss"> * :deep(.mydialog-navigation) { * flex-direction: row-reverse; * } * </style> * ``` */ navigationClasses?: VueClassType; }; type __VLS_PublicProps = { 'open'?: boolean; } & __VLS_Props; declare function __VLS_template(): { attrs: Partial<{}>; slots: Readonly<{ actions?: Slot; default?: Slot; navigation?: Slot; }> & { actions?: Slot; default?: Slot; navigation?: Slot; }; refs: { dialogElement: unknown; wrapper: 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, { submit: (event: SubmitEvent) => any; reset: (event: Event) => any; "update:open": (value: boolean) => any; closing: (result?: unknown) => any; }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{ onSubmit?: ((event: SubmitEvent) => any) | undefined; onReset?: ((event: Event) => any) | undefined; "onUpdate:open"?: ((value: boolean) => any) | undefined; onClosing?: ((result?: unknown) => any) | undefined; }>, { size: "small" | "normal" | "large" | "full"; container: string; message: string; additionalTrapElements: Array<string | HTMLElement>; buttons: NcDialogButtonProps[]; navigationAriaLabel: string; navigationAriaLabelledby: string; contentClasses: VueClassType; dialogClasses: VueClassType; navigationClasses: VueClassType; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, { dialogElement: unknown; wrapper: 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; }; };