import { DuetOverflowPadding, DuetTheme } from "../../common-types"; import { ThemeableComponent } from "../../common/themeable-component"; /** * @slot collapse-button-label - This is to label collapse button. */ export declare class DuetScrollable implements ThemeableComponent { /** * Private variables and constants index */ private currentIndex; private scrollPaneElement; private hasCollapseButtonLabelSlot; scrollPaneAtStart: boolean; needsScrolling: boolean; scrollPaneAtEnd: boolean; childrenData: any; element: HTMLElement; /** * Observer to check if the scrollable content is wider than the scroll pane, * and thus needs scrolling. */ private resizeObserver; /** * Theme of duet-tab-scrollable. When used this will override the color setting and * use "primary" or "primary-turva" as the color depending on which theme * is chosen. */ theme: DuetTheme; /** * Optional identifier to add to buttons in the tab group */ identifier: string; /** * Boolean to collapse scrollable items into normal flow. */ collapsed: boolean; /** * Whether or not include previous and forward buttons. Defaults to true. */ buttons: boolean; /** * Vertical alignment of the previous and forward buttons. Defaults to center. */ buttonAlignment: "top" | "center" | "bottom"; /** * @internal */ buttonPosition: "absolute" | "relative"; /** * Center the scrollable list. Defaults to false. */ center: boolean; /** * Whether to add padding to the scrollable list to account for * overflowing elements, such as shadows or outlines. */ padding: DuetOverflowPadding; /** * @internal */ gap: "none" | "large"; /** * Selected element */ selected: number; watchPropHandler(newValue: number): void; /** * Enables stretch mode for tab groups * @internal */ stretch: boolean; /** * Component lifecycle events. */ componentWillLoad(): void; componentDidLoad(): void; disconnectedCallback(): void; /** * Scrolls the scrollable so that the desired item is visible * @param itemIndex The first item is 1 */ scrollToItem(itemIndex: number): Promise; /** * Scrolls the scrollable so that the first item is visible */ scrollToStart(): Promise; /** * Scrolls the scrollable so that the last item is visible */ scrollToEnd(): Promise; /** * Private methods. */ private getScrollPaneElements; /** * Check if scrolling is needed. * * @param element - The element to check. * @param threshold - The threshold to allow content to be slightly wider before showing buttons. * Defaults to half of the overlay width, since gradient is 10px wide with 50/50 split. */ private checkScrollingNeeded; private getLastVisibleElement; private getFirstVisibleElement; private updateScrollButtons; private scrollToElement; private scrollLeft; private scrollRight; private collapsedOnClick; private getOverlayWidth; private renderButton; /** * render() function * Always the last one in the class. */ render(): any; }