/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import '../../../elevation/elevation.js'; import {html, LitElement, nothing, PropertyValues} from 'lit'; import {property} from 'lit/decorators.js'; import {classMap} from 'lit/directives/class-map.js'; import {ARIAMixinStrict} from '../../../internal/aria/aria.js'; import {mixinDelegatesAria} from '../../../internal/aria/delegate.js'; // Separate variable needed for closure. const navigationDrawerBaseClass = mixinDelegatesAria(LitElement); /** * b/265346501 - add docs * * @fires navigation-drawer-changed {CustomEvent<{opened: boolean}>} * Dispatched whenever the drawer opens or closes --bubbles --composed */ export class NavigationDrawer extends navigationDrawerBaseClass { @property({type: Boolean}) opened = false; @property() pivot: 'start' | 'end' = 'end'; protected override render() { const ariaExpanded = this.opened ? 'true' : 'false'; const ariaHidden = !this.opened ? 'true' : 'false'; // Needed for closure conformance const {ariaLabel, ariaModal} = this as ARIAMixinStrict; return html`
`; } private getRenderClasses() { return classMap({ 'md3-navigation-drawer--opened': this.opened, 'md3-navigation-drawer--pivot-at-start': this.pivot === 'start', }); } protected override updated( changedProperties: PropertyValues