/// import Foundation, { HandledProps } from "@microsoft/fast-components-foundation-react"; import { TabManagedClasses } from "./tab"; import { TabPanelManagedClasses } from "./tab-panel"; import { TabsHandledProps, TabsProps, TabsUnhandledProps } from "./tabs.props"; export declare enum TabLocation { first = 0, last = 1, previous = 2, next = 3 } export declare enum TabsSlot { tab = "tab", tabItem = "tab-item", tabPanel = "tab-panel" } export interface TabsState { activeId: string; } declare class Tabs extends Foundation { static defaultProps: Partial; static displayName: string; /** * React life-cycle method */ static getDerivedStateFromProps(nextProps: TabsProps, prevState: TabsState): null | TabsState; protected handledProps: HandledProps; /** * React ref for the tab list */ private tabListRef; constructor(props: TabsProps); /** * Renders the component */ render(): JSX.Element; /** * React lifecycle hook */ componentDidUpdate(prevProps: TabsProps): void; /** * Generates class names based on props */ protected generateClassNames(): string; /** * Create tab content class names */ protected generateTabContentClassNames(): string; /** * Create tab panel content class names */ protected generateTabPanelContentClassNames(): string; /** * Create tab class names */ protected generateTabClassNames(): TabManagedClasses; /** * Create tab panel class names */ protected generateTabPanelClassNames(): TabPanelManagedClasses; /** * Renders the tab elements */ private renderTabElements; private setActive; private tabItems; private renderTabItem; /** * Renders the tab panels */ private renderTabPanels; private renderTabPanel; /** * Handles the click event on the tab element */ private handleClick; /** * Handles the keydown event on the tab element */ private handleKeyDown; /** * Activates a tab */ private activateTab; /** * Gets the current index by tab item ID */ private getCurrentIndexById; /** * Gets the slot to use for tab children */ private getSlot; /** * Gets the child by the slot property */ private getChildrenBySlot; /** * Need to filter out none truthy results for Preact. * Can remove if below gets merged in. * https://github.com/preactjs/preact-compat/pull/461 */ private filterChildren; /** * Return a tab item if it has a tab and tab panel */ private isValidTabItem; } export default Tabs; export * from "./tabs.props";