import{type PropertyValues,type TemplateResult}from'lit';import type{Placement}from'@floating-ui/dom';import type{PlaceStrategy,PlaceSync}from'../../../internal/positioner.js';import type{LyraSize}from'../../../internal/variants.js';import type{LyraMenu,MenuItemSelectDetail}from'../../layout/menu/menu.class.js';import{LyraPopover,type LyraPopoverEventMap,type LyraPopupRole}from'./popover.class.js';export type{PlaceStrategy,PlaceSync};export interface LyraDropdownEventMap extends LyraPopoverEventMap{'lr-select':CustomEvent;} /** * `` — a trigger-owned action menu. The public host remains the Popover-style * trigger/positioning shell, but that shell is semantic-neutral: a contained `` is the * sole role/name owner and supplies roving focus, type-ahead, nested submenu intent, selection, * and focus return for mapped dropdown items. A consumer-supplied `` in the default slot * becomes that contained engine instead of being wrapped in a second menu, preserving its own * header/list/footer regions and naming precedence. The menu list scrolls within the popup's * height limit while the positioning shell lets nested submenus receive pointer input outside it. * Motion resolves through * `dropdown.show`/`dropdown.hide` in the public animation registry without changing the inherited * Popover lifecycle. ArrowDown and ArrowUp open the menu and focus its first or last enabled item * whether the trigger is slotted or resolved through `for`. * * @customElement lr-dropdown * @slot trigger - The interactive element that toggles the dropdown. * @slot - ``/`` rows, or one consumer-supplied ``. * @event lr-show - The dropdown is about to open. Cancelable. * @event lr-after-show - The dropdown is open and its transition has finished. * @event lr-hide - The dropdown is about to close. Cancelable. * @event lr-after-hide - The dropdown is closed and its transition has finished. * @event lr-select - A menu item was activated. `detail: { item }`. Cancelable; preventing the * event keeps the dropdown and any selected submenu open. * @method show - `show(): Promise` — opens unless disabled and resolves after * `lr-after-show`. * @method hide - `hide(options?): Promise` — closes, returns focus by default, and resolves * after `lr-after-hide`. * @method reposition - Immediately recomputes the popup position. * @method focusOnTrigger - Focuses the consumer-supplied trigger. * @method getMenu - Returns the currently contained menu engine. * @csspart trigger - The trigger wrapper. * @csspart base - Web Awesome compatibility name on the positioned popup. * @csspart base__popup - Shoelace compatibility name on the positioned popup. * @csspart panel - Shoelace compatibility name on the positioned popup. * @csspart menu - The contained menu engine. * @cssprop [--show-duration=var(--lr-transition-fast)] - Opening transition duration. * @cssprop [--hide-duration=var(--lr-transition-fast)] - Closing transition duration. * @cssprop [--max-width=var(--lr-overlay-max-inline-size,var(--lr-size-20rem))] - Maximum inline * size inherited from the popover surface. * @cssprop [--arrow-size=var(--lr-overlay-arrow-size,var(--lr-size-0-375rem))] - Arrow half-width * inherited from the popover surface. * @cssprop --lr-overlay-max-inline-size - Maximum inline size of the popup. * @cssprop --lr-overlay-arrow-size - Retained Lyra arrow-size fallback. * @cssprop [--lr-overlay-surface=var(--lr-color-surface-overlay)] - Shared floating-surface fill, * inherited from the popover surface. * @cssprop [--lr-overlay-border=var(--lr-color-border)] - Shared floating-surface edge colour, * inherited from the popover surface. * @cssprop [--lr-overlay-radius=var(--lr-radius)] - Shared floating-surface corner radius, * inherited from the popover surface. * @cssprop [--lr-overlay-shadow-anchored=var(--lr-shadow-m)] - Elevation of an anchored, * positioner-placed overlay, inherited from the popover surface. * @cssprop --lr-positioning-strategy - Cascading `absolute`/`fixed` override for * {@link positioningStrategy}/`hoist`, inherited from the popover surface. An explicit * `positioning-strategy`/`hoist` on the instance always wins over it. * @status stable * @since 4.0.0 */ export declare class LyraDropdown extends LyraPopover{static styles:(import("lit").CSSResultGroup[]|import("lit").CSSResult)[]; /** Dropdowns sit flush against their trigger by default; generic popovers retain eight pixels. */ distance:number; /** Action menus retain their mapped below-trigger placement. */ placement:Placement; /** Dropdowns do not render a pointer unless a consumer explicitly enables it. */ arrow:boolean; /** Density propagated to directly owned mapped items. */ size:LyraSize; /** Keeps the menu open after a selection unless the selected branch closes independently. */ stayOpenOnSelect:boolean; /** * Retained boolean alias of {@link positioningStrategy}: `hoist` is exactly * `positioningStrategy === 'fixed'`, and writing either spelling updates the other so the two * attributes can never disagree in the DOM. It is the established name here (and Shoelace's own * spelling on `sl-dropdown`), so it keeps working indefinitely; prefer `positioning-strategy` in * new code, which reads the same on every anchored surface in the library. * @default false */ get hoist():boolean;set hoist(next:boolean); /** Copies the trigger's width, height, or both onto the popup. */ sync?:PlaceSync; /** Optional element that counts as inside for light-dismiss handling. Property-only. */ containingElement?:HTMLElement;private consumerMenu?;private consumerMenuSnapshot?;private contentSlot?;constructor(); /** Dropdown semantics are invariant: the trigger announces a menu and the contained menu owns * that role/name. The inherited Popover write surface is narrowed to `menu`; any other runtime * or authored value normalizes back to `menu` instead of changing the outer positioning shell. * @default 'menu' */ get popupRole():'menu';set popupRole(_next:LyraPopupRole);attributeChangedCallback(name:string,oldValue:string|null,newValue:string|null):void;protected get defaultDistance():number; /** Action menus stay in their containing block unless the consumer opts out, which is both this * component's shipped default and the one its mirrored `hoist=false` has always meant. */ protected get defaultPositioningStrategy():PlaceStrategy; /** Keeps the `hoist` half of the alias reflecting: Lit only writes an attribute for a property * it saw change, and a `positioningStrategy` write changes `hoist`'s value without going * through its own setter. */ protected onPositioningStrategyChanged(previous:PlaceStrategy,next:PlaceStrategy):void;protected get positioningSync():PlaceSync|undefined;protected get animationNamespace():string; /** The positioned wrapper is presentation-only; the contained menu owns role and name. */ protected get popupSurfaceRole():undefined;protected animationDurationProperties(showing:boolean):readonly string[];protected get popupPartNames():string;protected isInsideLightDismissBoundary(path:EventTarget[]):boolean;protected onPopupPositioned():void;private get menuEngine();private configureMenu;connectedCallback():void;private releaseConsumerMenu;private onContentSlotChange; /** * Reads the default slot's currently assigned elements and adopts a consumer-supplied * `` among them (rather than wrapping mapped rows in a second, generated one) -- * wired as the `slotchange` handler (via `onContentSlotChange`) for every later mutation, and * called once more from `firstUpdated()` (see `collectInitialSlotAssignment`) to cover an * environment, or a real-browser timing race, where the slot's initial assignment never fires * `slotchange`. Idempotent: a second call finding the same (or still-absent) menu falls through * the `next !== this.consumerMenu` guard and only re-runs the harmless `configureMenu()` resync. */ private collectConsumerMenuFromSlot;protected onTriggerKeyDown(event:KeyboardEvent):void; /** Re-run positioning after an imperative anchor/layout change. */ reposition():void; /** Focus the assigned trigger, when one is present. */ focusOnTrigger(options?:FocusOptions):void; /** Return the active generated or consumer-supplied menu engine. */ getMenu():LyraMenu|null;protected updated(changed:PropertyValues):void;protected firstUpdated(changed:PropertyValues):void;disconnectedCallback():void;protected renderPopupContent():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-dropdown':LyraDropdown;}}