/** * @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 */ import { InjectionToken } from '@angular/core'; /** Injection token that can be used to access the data that was passed in to a bottom sheet. */ export const MAT_BOTTOM_SHEET_DATA = new InjectionToken('MatBottomSheetData'); /** * Configuration used when opening a bottom sheet. */ export class MatBottomSheetConfig { constructor() { /** Data being injected into the child component. */ this.data = null; /** Whether the bottom sheet has a backdrop. */ this.hasBackdrop = true; /** Whether the user can use escape or clicking outside to close the bottom sheet. */ this.disableClose = false; /** Aria label to assign to the bottom sheet element. */ this.ariaLabel = null; /** Whether this is a modal bottom sheet. Used to set the `aria-modal` attribute. */ this.ariaModal = true; /** * Whether the bottom sheet 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; // Note that this is set to 'dialog' by default, because while the a11y recommendations // are to focus the first focusable element, doing so prevents screen readers from reading out the // rest of the bottom sheet content. /** * Where the bottom sheet should focus on open. * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or * AutoFocusTarget instead. */ this.autoFocus = 'dialog'; /** * Whether the bottom sheet should restore focus to the * previously-focused element, after it's closed. */ this.restoreFocus = true; } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm90dG9tLXNoZWV0LWNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9ib3R0b20tc2hlZXQvYm90dG9tLXNoZWV0LWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFJSCxPQUFPLEVBQUMsY0FBYyxFQUFtQixNQUFNLGVBQWUsQ0FBQztBQUsvRCxnR0FBZ0c7QUFDaEcsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQUcsSUFBSSxjQU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