import { PropertyValues } from 'lit'; import { DDSElement } from "../../base/index.js"; import { DaikinAvatar } from "../avatar/index.js"; import { DaikinBreadcrumbItem } from "../breadcrumb-item/index.js"; import { DaikinButton } from "../button/index.js"; import { DaikinIconButton } from "../icon-button/index.js"; import { DaikinNavigationItem } from "../navigation-item/index.js"; /** * A menu component is used to show list information when a user interacts with an element. * * Hierarchy: * - `daikin-menu` > `daikin-list` > `daikin-list-item` * * @fires beforetoggle - _Cancellable._ A event emitted when the menu is about to be opened or closed by user interaction. * @fires toggle - A event emitted when the menu is opened or closed. * * @slot - A slot for the element to which the menu is attached (the trigger element). * @slot menu - A slot for the menu content (daikin-list component). * * @cssprop [--ddc-menu-spacing=0px] - Spacing between the menu and the trigger. * * @csspart menu - CSS styles applied to the `menu` part target the internal `` element wrapping the list. * * @example * * ```js * import "@daikin-oss/design-system-web-components/components/menu/index.js"; * import "@daikin-oss/design-system-web-components/components/button/index.js"; * import "@daikin-oss/design-system-web-components/components/list/index.js"; * import "@daikin-oss/design-system-web-components/components/list-item/index.js"; * ``` * * ```html * * Click me * * List item label 1 * List item label 2 * List item label 3 * * * ``` */ export declare class DaikinMenu extends DDSElement { static registerCSSCustomProperties(): void; static readonly styles: import('lit').CSSResult; private readonly _lists; private readonly _controls; /** * Specifies the initial position of the menu relative to the trigger. * However, if there isn't enough space in the specified direction, the menu will automatically adjust its direction. * * @default "bottom" */ placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"; /** * Whether the menu is open. */ open: boolean; /** * Specify the value of the popover attribute in the Popover API. * - `auto`: Clicking on a trigger element will open a menu, and clicking again will close it. You can also close it using the Esc button. You cannot open multiple menu at the same time. * - `manual`: No click operation is specified for the trigger element. It will not close even if the Esc button is pressed. Multiple menu can be opened at once. * * @default "auto" */ popoverValue: "auto" | "manual"; /** * How the menu is controlled. * - `click`: The menu is displayed when the mouse clicks on the trigger element, and hidden when you click on it again. (default) * - `manual`: The menu does not respond to user interaction. Use this to control the menu programmatically. * * @default "click" */ trigger: "click" | "manual"; private _autoUpdateController; private _hostStyles; /** * Controls whether the floating-ui `flip()` and `shift()` middleware are active. * * - **`flip()`** — When there is insufficient space on the side specified by `placement`, the menu * is automatically repositioned to the opposite side (e.g. `bottom` → `top`). * - **`shift()`** — Keeps the menu within the viewport by nudging it along the cross-axis when it * would otherwise overflow the screen edge. * * Both middlewares are disabled when the trigger element is a `daikin-navigation-item`. */ private _staticPlacement; /** * Exposes the trigger element contained within the menu to the outside of the component. * * Supported trigger elements: * - `` * - `` * - `` * - `` * - `` * * Returns the first matching element from the slot. */ get triggerElement(): DaikinAvatar | DaikinButton | DaikinIconButton | DaikinBreadcrumbItem | DaikinNavigationItem | null; /** * Reflects static attributes (e.g. ARIA roles) to slot components. * These are typically set once when the slot changes and do not change frequently. */ private _reflectStaticProperties; /** * Reflects dynamic attributes (e.g. `open`, `disabled`) to slot components. * These may changed when properties are updated. */ private _reflectDynamicProperties; private _handleSlotChange; private _handleTriggerClick; private _handleTouchEnd; /** * Handles click events on the menu-item. * When the popoverValue is manual, the logic for closing the popover should be entirely controlled by the developer and not be the responsibility of the component. */ private _handleClick; private _handleBeforeToggle; private _handleToggle; render(): import('lit-html').TemplateResult<1>; protected updated(changedProperties: PropertyValues): void; } declare global { interface HTMLElementTagNameMap { "daikin-menu": DaikinMenu; } }