import { EventEmitter } from "../../stencil-public-runtime"; import { FocusableComponent, OpenerComponent, ThemeableComponent } from "../../common"; import { DuetColor, DuetLanguage, DuetTheme } from "../../common-types"; export type DuetSlideoutEventDetails = { originalEvent: Event; data: { element: HTMLElement; open: boolean; }; component: "duet-slideout"; }; /** * @slot sticky-header - Content will be fixed to the top of the modal when scrolling. */ export declare class DuetSlideout implements ThemeableComponent { /** * Own Properties. */ private dialog; private openButton; private closeButton; private exitLangObject; private topLevelOpenMenuBarLangObject; private isSafariBrowser; private mutationObserver; private teleport; private hasStickyHeaderSlot; private disconnectController; private eventListenerController; /** * Reference to host HTML element. */ element: HTMLElement; language: DuetLanguage; displaying: boolean; openPanel: boolean; /** * Theme. */ theme: DuetTheme; /** * Role of the slot's container. By default this is menubar and the slideout should by default contain menuitems. */ accessibleRole: string; /** * Open */ open: boolean; /** * DuetMenuBarButton or DuetButton element, or id of an element, that opens the slideout. If id is given, * the component automatically sets the click event listener to open the slideout. */ opener: string | HTMLElement | (HTMLElement & FocusableComponent & OpenerComponent); /** * Alias for property opener. */ get controller(): string | HTMLElement | (HTMLElement & FocusableComponent & OpenerComponent); set controller(value: string | HTMLElement | (HTMLElement & FocusableComponent & OpenerComponent)); /** * Background color. Use one of the color tokens. */ backgroundColor: DuetColor; /** * Whether the slideout behaves as a modal, i.e. with an overlay and preventing scrolling of the page content. * Note that even when false, we still use focus guards to contain keyboard navigation within, as moving focus out * could result in unexpected behavior. */ modal: boolean; /** * Event raised when the menu has been opened. You can prevent the * default browser functionality by calling **event.detail.originalEvent.preventDefault()** * inside your listener. Additionally, the passed data is available via **event.detail.data**. */ duetSlideoutEvent: EventEmitter; /** * Component lifecycle events. */ componentWillLoad(): void; connectedCallback(): void; disconnectedCallback(): void; handleOpenChange(newValue: any, oldValue: any): void; handleOpenerChange(newValue: any, oldValue: any): void; private setOpenButton; private setStickHeaderStyleMutations; private openButtonEventListener; private getOpenPanel; private toggleMenu; private onClick; /** * Component event handling. */ handleKeyUp(ev: any): void; handleDocumentClick(ev: MouseEvent): void; /** * Sets focus. Use this method instead of the global focus(). */ setFocus(options?: FocusOptions): Promise; /** * Toggles the slideout. */ toggle(): Promise; /** * Shows the slideout. Additionally saves the element (DuetButton or DuetMenuBarButton) that triggered * the slideout so that focus can be moved back to this specific element when * the slideout dialog is closed. */ show(): Promise; /** * Hides the slideout dialog and puts focus back to the original element * that triggered the slideout (if we’re still in the same view). */ hide(): Promise; /** * render() function * Always the last one in the class. */ render(): any; }