import type DropdownSubmenu from '../dropdown-submenu/DropdownSubmenu.js'; import { LitElement } from 'lit'; import '../popout/Popout.js'; import '../icon/Icon.js'; import '../dropdown-item/DropdownItem.js'; declare const Dropdown_base: (new (...args: any[]) => import("../common/mixins/FloatingComponentMixin.js").FloatingMixinInterface) & typeof LitElement; /** * Dropdown menu displays a list of actions or selectable options for * a user. Dropdown uses popout component internally to create * the overlay functionality. * * @status ready * @category action * * @slot - The dropdown content. * @slot toggle - Used to place the toggle for dropdown. * @slot header - Optional slot that holds a header for the dropdown. * @slot header-end - Optional slot that positions content at the end of the header. Useful for actions or additional info. * * @fires {NordEvent} open - Dispatched when the popout is opened. * @fires {NordEvent} close - Dispatched when the popout is closed. * * @cssprop [--n-dropdown-size=250px] - Controls the inline size, or width, of the dropdown. Will resize up to 1.5 times to account for larger content. * @cssprop [--n-dropdown-max-block-size=460px] - Controls the maximum block size, or height, of the dropdown. Larger content will get a scrollbar. */ export default class Dropdown extends Dropdown_base { static styles: import("lit").CSSResult[]; /** * we delegate focus, to ensure focus does not move to body if you click * some whitespace or a dropdown-group heading, as this would close the dropdown * @internal */ static shadowRootOptions: { delegatesFocus: boolean; mode: ShadowRootMode; serializable?: boolean; slotAssignment?: SlotAssignmentMode; }; private headerSlot; private headerEndSlot; private list; private popout; private submenuStack; private isNavigating; private get isShowingSubmenu(); /** * @internal */ get submenuStackRef(): readonly DropdownSubmenu[]; /** * @internal */ get deepestSubmenu(): DropdownSubmenu | undefined; /** * Controls whether the toggle slot expands to fill the width of its container. */ expand: boolean; /** * The size of the dropdown. This affects the minimum and maximum inline-size * of the dropdown. */ size: 's' | 'm' | 'l'; /** * Set to true to always display the dropdown as a floating overlay, even on smaller viewports. */ alwaysFloating: boolean; protected handleAlwaysFloatingChange(): void; connectedCallback(): void; render(): import("lit").TemplateResult<1>; private handleBlur; private handleOpen; private handleBackClick; private handleClose; protected handleOpenChange(): void; /** * Navigate back one level in the submenu stack. * @internal */ navigateBack(): void; /** * Clear the entire submenu stack. * @internal */ private clearSubmenuStack; /** * Handle submenu navigation event. * @internal */ private handleSubmenuNavigate; /** * Hide the dropdown programmatically. * This method delegates to the Dropdown's internal Popout component. * See [Popout's hide() method](/components/popout#methods-hide) for more details. * @param moveFocusToButton A boolean option to move the focus to the original button that opens the dropdown. */ hide(moveFocusToButton?: boolean): Promise; /** * Show the dropdown programmatically. * This method delegates to the Dropdown's internal Popout component. * See [Popout's show() method](/components/popout#methods-hide) for more details. */ show(): Promise; } declare global { interface HTMLElementTagNameMap { 'nord-dropdown': Dropdown; } } export {};