UNPKG

primeng

Version:

PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,

125 lines (122 loc) 3.6 kB
import { PassThrough, PassThroughOption } from 'primeng/api'; import { ButtonPassThrough } from 'primeng/types/button'; import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; /** * Defines the position of the dialog. * @group Types */ type DialogPosition = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Dialog.pt} * @group Interface */ interface DialogPassThroughOptions<I = unknown> { /** * Used to pass attributes to the host's DOM element. */ host?: PassThroughOption<HTMLElement, I>; /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the mask's DOM element. */ mask?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the resize handle's DOM element. */ resizeHandle?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the header's DOM element. */ header?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the title's DOM element. */ title?: PassThroughOption<HTMLSpanElement, I>; /** * Used to pass attributes to the header actions' DOM element. */ headerActions?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the maximize Button component. * @see {@link ButtonPassThrough} */ pcMaximizeButton?: ButtonPassThrough; /** * Used to pass attributes to the close Button component. * @see {@link ButtonPassThrough} */ pcCloseButton?: ButtonPassThrough; /** * Used to pass attributes to the content's DOM element. */ content?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the footer's DOM element. */ footer?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass motion options for the dialog animation. */ motion?: MotionOptions; /** * Used to pass motion options for the mask animation. */ maskMotion?: MotionOptions; } /** * Defines valid pass-through options in Dialog. * @see {@link DialogPassThroughOptions} * * @template I Type of instance. */ type DialogPassThrough<I = unknown> = PassThrough<I, DialogPassThroughOptions<I>>; /** * Context interface for the Dialog header template. * @property {string | null} ariaLabelledBy - The aria-labelledby attribute value. * @group Interface */ interface DialogHeaderTemplateContext { ariaLabelledBy: string | null; } /** * Defines valid templates in Dialog. * @group Templates */ interface DialogTemplates { /** * Custom template of header. */ header(): TemplateRef<void>; /** * Custom template of content. */ content(): TemplateRef<void>; /** * Custom template of footer. */ footer(): TemplateRef<void>; /** * Custom template of closeicon. */ closeicon(): TemplateRef<void>; /** * Custom template of maximizeicon. */ maximizeicon(): TemplateRef<void>; /** * Custom template of minimizeicon. */ minimizeicon(): TemplateRef<void>; /** * Custom headless template to replace the entire dialog content. */ headless(): TemplateRef<void>; } export type { DialogHeaderTemplateContext, DialogPassThrough, DialogPassThroughOptions, DialogPosition, DialogTemplates };