import { EventEmitter } from '../../stencil-public-runtime'; import { FloatingUIPlacement, FloatingUIStrategy } from "../../type/floating-ui"; import { MdsDropdownEventDetail } from './meta/event-detail'; import { DropdownInteractionType } from './meta/types'; import { FloatingElement } from "../../common/floating-controller"; /** * @slot - Add `text string`, `HTML elements` or `components` to this slot, elements will be shown when the component is triggered. * @category overlays */ export declare class MdsDropdown implements FloatingElement { private readonly km; private cssMouseOverDelayDuration; private mouseoverTimer; private caller; private readonly backdropController; private floatingController; readonly host: HTMLMdsDropdownElement; /** * If set, the component will not have an arrow pointing to the caller. */ readonly hideArrow: boolean; /** * Sets the distance between arrow and dropdown margins. */ readonly arrowPadding: number; /** * Pins the component to `placement`: without it, the component moves to another side of the * caller when `placement` has no room. */ readonly disableAutoPlacement: boolean; /** * Specifies if the component has a backdrop background */ backdrop?: boolean; /** * With `disableAutoPlacement`, moves the component to the opposite side of the caller when * `placement` has no room. Auto-placement, the default, already does it. */ readonly flip: boolean; /** * Specifies if the component is triggered from the caller on mouseover or click event */ readonly interaction: DropdownInteractionType; /** * Specifies the selector of the target element, this attribute is used with `querySelector` method. * @example '#profile-button' */ readonly target: string; /** * Sets distance between the dropdown and the caller. */ readonly offset: number; /** * Specifies where the component should be placed relative to the caller: the side it takes * whenever it has room there. */ readonly placement: FloatingUIPlacement; /** * If set, the component will not be kept inside the viewport. */ readonly disableShift: boolean; /** * Sets a safe area distance between the dropdown and the viewport. */ readonly shiftPadding: number; /** * If set, the component will not follow the caller smoothly when the page scrolls. */ readonly disableSmooth: boolean; /** * Sets the CSS position strategy of the component. */ readonly strategy: FloatingUIStrategy; /** * Specifies the visibility of the component. */ visible: boolean; /** * Specifies the visibility of the component. */ readonly zIndex: number; /** * Emits when a modal is visible */ visibleEvent: EventEmitter; /** * Emits when a modal is hidden */ hiddenEvent: EventEmitter; /** * Emits when a modal is visible or hidden */ changedEvent: EventEmitter; hideArrowChanged(): void; arrowPaddingChanged(): void; disableAutoPlacementChanged(): void; backdropChanged(newValue: boolean): void; flipChanged(): void; offsetChanged(): void; placementChanged(): void; disableShiftChanged(): void; shiftPaddingChanged(): void; strategyChanged(): void; targetChanged(): void; visibleChanged(newValue: boolean): void; private readonly onClickTarget; private readonly onMouseOverTarget; private readonly onMouseOutTarget; /** * The panel declares itself a `menu`, whose children axe only accepts as entries * (`aria-required-children`), so what the slot receives is what has to carry the role. And what * it receives can be a slot of its own, when the dropdown is rendered by a component that hands * over the slot of its own host - `mds-button-dropdown`, `mds-pref-language`. An `mds-button` * names itself a button as soon as it loads and which of the two loads first is not guaranteed, * so `button` is the role an entry overwrites, any other being a deliberate choice of the * consumer. A panel that declares another role holds no entries at all: its children are left * alone, a calendar being no menu item. */ private readonly markEntries; private get isMenu(); private readonly entries; private readonly slottedEntries; /** * Walks the entries the way the menu button pattern asks for: the arrows open the menu and * land on an entry, Home and End go to the ends, Escape gives the focus back and Tab lets it * leave from the caller. A panel that declares another role is none of this - the arrows of a * calendar or of a form belong to what the panel holds. */ private readonly focusEntry; private readonly onCallerKeydown; private readonly onPanelKeydown; /** Escape is heard on window, so it closes the panel wherever the focus is. Giving the focus * back is only right when the panel was holding it: a panel that goes display:none under the * focus drops it on the body, and the place in the page is lost */ private readonly closeFromKeyboard; private readonly attachBackdrop; private readonly updateCSSCustomProps; private readonly handleCloseDropdown; private readonly setInteractionBehaviour; /** Hands the caller back what it was given: a caller the target no longer names would go on * opening a panel that is not its own */ private readonly unsetInteractionBehaviour; private readonly handleCloseDropdownMouseLeave; componentDidLoad(): void; connectedCallback(): void; disconnectedCallback(): void; render(): any; }