import type { CSSResultGroup } from 'lit'; import DSATooltip from '../tooltip/tooltip'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary Menu items provide options for the user to pick from in a menu. * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/menu/menu-item/web-gxetLyc1 * * @dependency dsa-tooltip * * @slot - The menu item's label. * @slot prefix - Used to prepend an icon or similar element to the menu item. * @slot suffix - Used to append an icon or similar element to the menu item. */ export default class DSAMenuItem extends ShoelaceElement { static styles: CSSResultGroup; static dependencies: { 'dsa-tooltip': typeof DSATooltip; }; private readonly hasSlotController; private cachedTextLabel; defaultSlot: HTMLSlotElement; menuItem: HTMLElement; /** The type of menu item to render. */ type: 'link' | 'button'; /** The menu item's size. */ size: 'small' | 'medium' | 'large'; /** Draws the menu item in a disabled state, preventing selection. */ disabled: boolean; /** The link URL */ href: string; /** Tells the browser where to open the link. */ target: '_blank' | '_parent' | '_self' | '_top'; /** * When using `href`, this attribute will map to the underlying link's `rel` attribute. Unlike regular links, the * default is `noreferrer noopener` to prevent security exploits. However, if you're using `target` to point to a * specific tab/window, this will prevent that from working correctly. You can remove or change the default value by * setting the attribute to an empty string or a value of your choice, respectively. */ rel: string; /** Tells the browser to download the linked file as this filename. */ download?: string; /** Sets the link aria-current attribute and adds specific styles */ current?: string; /** * @internal When used inside a sidenav, enables to control the collapsed state */ collapsed: boolean; expanded?: boolean; connectedCallback(): void; disconnectedCallback(): void; firstUpdated(): void; private handleDefaultSlotChange; private handleHostClick; handleDisabledChange(): void; /** Returns a text label based on the contents of the menu item's default slot. */ getTextLabel(): string; focus(options?: FocusOptions): void; blur(): void; click(): void; render(): import("lit").TemplateResult; } declare global { interface HTMLElementTagNameMap { 'dsa-menu-item': DSAMenuItem; } }