diff --git a/autocomplete/autocomplete-item.ts b/autocomplete/autocomplete-item.ts new file mode 100644 index 0000000000..ffc00db932 --- /dev/null +++ b/autocomplete/autocomplete-item.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {customElement} from 'lit/decorators.js'; + +import {styles} from '../list/lib/listitem/list-item-styles.css.js'; + +import {AutocompleteItem} from './lib/autocompleteitem/autocomplete-item.js'; + +declare global { + interface HTMLElementTagNameMap { + 'md-autocomplete-item': MdAutocompleteItem; + } +} + +/** + * @soyCompatible + * @final + * @suppress {visibility} + */ +@customElement('md-autocomplete-item') +export class MdAutocompleteItem extends AutocompleteItem { + static override styles = [styles]; +} diff --git a/autocomplete/lib/autocomplete.ts b/autocomplete/lib/autocomplete.ts index b7a567726e..82a3f15188 100644 --- a/autocomplete/lib/autocomplete.ts +++ b/autocomplete/lib/autocomplete.ts @@ -12,6 +12,8 @@ import {html as staticHtml, StaticValue} from 'lit/static-html.js'; import {MenuSurface} from '../../menusurface/lib/menu-surface.js'; import {TextField} from '../../textfield/lib/text-field.js'; +import {AutocompleteItem} from './autocompleteitem/autocomplete-item.js'; + /** @soyCompatible */ export abstract class Autocomplete extends LitElement { static override shadowRootOptions: @@ -47,7 +49,8 @@ export abstract class Autocomplete extends LitElement { override render(): TemplateResult { return html`