/** @packageDocumentation * @module Widget */ import "./Tab.scss"; import * as React from "react"; import { CommonProps, PointProps, RectangleProps } from "@bentley/ui-core"; import { HorizontalAnchor, VerticalAnchor } from "../../Stacked"; /** Describes available tab modes. * @alpha */ export declare enum TabMode { Closed = 0, Open = 1, Active = 2 } /** Helpers for [[TabMode]]. * @alpha */ export declare class TabModeHelpers { /** Class name of [[TabMode.Closed]] */ static readonly CLOSED_CLASS_NAME = "nz-mode-closed"; /** Class name of [[TabMode.Open]] */ static readonly OPEN_CLASS_NAME = "nz-mode-open"; /** Class name of [[TabMode.Active]] */ static readonly ACTIVE_CLASS_NAME = "nz-mode-active"; /** @returns Class name of specified [[TabMode]] */ static getCssClassName(mode: TabMode): string; } /** Properties of [[Tab]] component. * @alpha */ export interface TabProps extends CommonProps { /** A badge to draw. */ badge?: React.ReactNode; /** Tab icon. */ children?: React.ReactNode; /** Describes to which side the widget of this tab is anchored. */ horizontalAnchor: HorizontalAnchor; /** Describes if the tab is collapsed. */ isCollapsed?: boolean; /** Describes if the tab is protruded when active. */ isProtruding: boolean; /** Last pointer position of draggable tab. */ lastPosition?: PointProps; /** Describes current tab mode. */ mode: TabMode; /** Function called when the tab is clicked. */ onClick?: () => void; /** Function called when tab is dragged. */ onDrag?: (dragged: PointProps) => void; /** Function called when tab drag action is started. * @param initialPosition Initial pointer position in window coordinates. */ onDragStart?: (initialPosition: PointProps) => void; /** Function called when tab drag action is finished. */ onDragEnd?: () => void; /** Title for the tab. */ title?: string; /** Describes to which side the widget is vertically anchored. */ verticalAnchor: VerticalAnchor; } /** Default properties of [[Tab]] component. * @alpha */ declare type TabDefaultProps = Pick; /** Rectangular widget tab. Used in [[Stacked]] component. * @alpha */ export declare class Tab extends React.PureComponent { private _tab; static defaultProps: TabDefaultProps; getBounds(): RectangleProps; render(): JSX.Element; } export {}; //# sourceMappingURL=Tab.d.ts.map