2022-08-09 17:58:14 +03:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright 2022 Google LLC
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-08-24 21:00:50 +03:00
|
|
|
import {customElement} from 'lit/decorators.js';
|
2022-08-09 17:58:14 +03:00
|
|
|
|
2023-07-24 19:44:01 +03:00
|
|
|
import {MenuItemEl} from './internal/menuitem/menu-item.js';
|
|
|
|
import {styles} from './internal/menuitem/menu-item-styles.css.js';
|
2023-01-26 04:14:09 +03:00
|
|
|
|
2024-01-18 04:39:11 +03:00
|
|
|
export {type MenuItem} from './internal/controllers/menuItemController.js';
|
|
|
|
export {type CloseMenuEvent} from './internal/controllers/shared.js';
|
2022-08-09 17:58:14 +03:00
|
|
|
|
|
|
|
declare global {
|
|
|
|
interface HTMLElementTagNameMap {
|
|
|
|
'md-menu-item': MdMenuItem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-26 04:14:09 +03:00
|
|
|
/**
|
|
|
|
* @summary Menus display a list of choices on a temporary surface.
|
|
|
|
*
|
|
|
|
* @description
|
|
|
|
* Menu items are the selectable choices within the menu. Menu items must
|
|
|
|
* implement the `MenuItem` interface and also have the `md-menu-item`
|
|
|
|
* attribute. Additionally menu items are list items so they must also have the
|
|
|
|
* `md-list-item` attribute.
|
|
|
|
*
|
|
|
|
* Menu items can control a menu by selectively firing the `close-menu` and
|
|
|
|
* `deselect-items` events.
|
|
|
|
*
|
|
|
|
* @final
|
|
|
|
* @suppress {visibility}
|
|
|
|
*/
|
2022-08-09 17:58:14 +03:00
|
|
|
@customElement('md-menu-item')
|
2023-01-26 04:14:09 +03:00
|
|
|
export class MdMenuItem extends MenuItemEl {
|
2023-10-06 09:27:14 +03:00
|
|
|
static override styles = [styles];
|
2022-08-09 17:58:14 +03:00
|
|
|
}
|