/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Configuration for opening a modal dialog with the MatDialog service. */ export class MatDialogConfig { constructor() { /** The ARIA role of the dialog element. */ this.role = 'dialog'; /** Custom class for the overlay pane. */ this.panelClass = ''; /** Whether the dialog has a backdrop. */ this.hasBackdrop = true; /** Custom class for the backdrop. */ this.backdropClass = ''; /** Whether the user can use escape or clicking on the backdrop to close the modal. */ this.disableClose = false; /** Width of the dialog. */ this.width = ''; /** Height of the dialog. */ this.height = ''; /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */ this.maxWidth = '80vw'; /** Data being injected into the child component. */ this.data = null; /** ID of the element that describes the dialog. */ this.ariaDescribedBy = null; /** ID of the element that labels the dialog. */ this.ariaLabelledBy = null; /** Aria label to assign to the dialog element. */ this.ariaLabel = null; /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */ this.ariaModal = true; /** * Where the dialog should focus on open. * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or * AutoFocusTarget instead. */ this.autoFocus = 'first-tabbable'; /** * Whether the dialog should restore focus to the * previously-focused element, after it's closed. */ this.restoreFocus = true; /** Whether to wait for the opening animation to finish before trapping focus. */ this.delayFocusTrap = true; /** * Whether the dialog should close when the user goes backwards/forwards in history. * Note that this usually doesn't include clicking on links (unless the user is using * the `HashLocationStrategy`). */ this.closeOnNavigation = true; // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling. } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLWNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9kaWFsb2cvZGlhbG9nLWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUE0Qkg7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