import { EventEmitter } from "../../stencil-public-runtime"; import { ThemeableComponent } from "../../common"; import { DuetLanguage, DuetMargin, DuetPadding, DuetTheme } from "../../common-types"; import { DuetLangObject } from "../../utils/language-utils"; export type DuetTabGroupEvent = { component: "duet-tab-group"; value: number; }; export type DuetTabVariation = "default" | "plain" | "checked" | "plain-scrolling"; /** * @part ${identifier}-button - piercing selector for styling tab buttons * @part ${identifier}-button--selected - piercing selector for styling selected tab button */ export declare class DuetTabGroup implements ThemeableComponent { /** * Own Properties. */ private mutationO?; private id; private tabsContainer; private intersectionObserver; /** * Reference to host HTML element. */ element: HTMLElement; /** * State() variables * Inlined decorator, alphabetical order. */ tabs: HTMLDuetTabElement[]; selected: number; /** * Theme of the component. */ theme: DuetTheme; /** * Controls whether the tab-group should scroll (by inflection this will disable collapsing to select box on small screens) * @deprecated scrolling is now the deafult behavior which can not be overridden, and this attribute has no effect */ scrolls: boolean; /** * Whether the tab-group collapses to a select dropwdown in minor breakpoints * @deprecated as scrolls is now always enabled, tabs never collapse to a dropdown, and this attribute has no effect */ collapses: boolean; /** * Aria label for the entire tab-group */ accessibleLabel: string; /** * Style variation of the tab group. Note that "plain-scrolling" is deprecated, as tab-group now allways has scrolling * behavior, use values "default", "plain" or "checked" */ variation: DuetTabVariation; /** * The currently active language. This setting changes the accessible labels to match the * chosen language. * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing * @default "fi" */ language: DuetLanguage; /** * Defaults for Label * @default {fi: "Valitse", en: "Choose", sv: "Välja"} */ labelDefaults: DuetLangObject | string; /** * Label for the select element which gets shown on mobile. * @default {fi: "Valitse", en: "Choose", sv: "Välja"} */ label: string; /** * Determines whether the label for the select element shown on mobile is visually hidden. */ labelHidden: boolean; /** * Optional identifier to add to buttons in the tab group */ identifier: string; /** * Controls the margin of the component. */ margin: DuetMargin; /** * Controls the padding of the component. */ padding: DuetPadding; /** * @deprecated in favour of Duet Tab component owning the tab indexing * Controls if tab container should have tab index and be accessible by pressing tab */ setTabIndex: boolean; /** * If this property is set to true, tab won't change immediately after clicking it. * Component will emit "duetTabChangeRequested" event, and it needs to be handled manually in order to change tab. */ tabChangeConfirm: boolean; /** * By default switches to larger size from small breakpoint. * Never disables switching to larger size and always forces it. */ switchLargeBreakpoint: "small" | "never" | "always"; /** * Makes the tab group fill the space with background, only used * when tab-group variation is default. */ fillSpace: boolean; /** * Makes the tab buttons stretch to fill the available space */ stretch: boolean; /** * @deprecated in favour of more specific duetTabChange event. * Callback for when the value changed. */ duetChange: EventEmitter; /** * Event raised when the selected tab is changed */ duetTabChange: EventEmitter; /** * Event raised when new tab is clicked and "tabChangeConfirm" property is set to true */ duetTabChangeRequested: EventEmitter; /** * Component lifecycle events. */ connectedCallback(): Promise; disconnectedCallback(): void; componentWillLoad(): void; componentDidLoad(): void; /** * Component event handling. */ private handleKeyDown; /** * This method allows you to open any of the tabs by calling the method and * passing the index of the tab. Please note that index starts from zero. */ openTab(tabIndex: number): Promise; private onTabSelect; private scrollToActive; /** * This method used to refresh the contents of the tab group * but is now deprecated as this is done automatically. * @deprecated */ refresh(): Promise; /** * Local methods. */ private getTabs; private getButtonId; private getTabId; private getAccessibleDescription; private updateTabs; /** * To support text-align: center; */ private isCentered; /** * render() function * Always the last one in the class. */ render(): any; }