/** @packageDocumentation * @module Toolbar */ import "./Toolbar.scss"; import * as React from "react"; import { CommonProps, NoChildrenProps } from "@bentley/ui-core"; import { Direction, OrthogonalDirection } from "../utilities/Direction"; /** Available alignment modes of [[Toolbar]] panels. * @beta */ export declare enum ToolbarPanelAlignment { Start = 0, End = 1 } /** Helpers for [[ToolbarPanelAlignment]]. * @alpha */ export declare class ToolbarPanelAlignmentHelpers { /** Class name of [[ToolbarPanelAlignment.Start]] */ static readonly START_CLASS_NAME = "nz-panel-alignment-start"; /** Class name of [[ToolbarPanelAlignment.End]] */ static readonly END_CLASS_NAME = "nz-panel-alignment-end"; /** @returns Class name of specified [[ToolbarPanelAlignment]] */ static getCssClassName(panelAlignment: ToolbarPanelAlignment): string; } /** Properties of [[PanelsProvider]] component. * @alpha */ export interface PanelsProviderProps { /** Render prop that provides item panels. */ children?: (items: React.ReactNode) => React.ReactNode; /** Items of the toolbar. */ items?: React.ReactNode; /** Panels container. */ panels: HTMLElement | null; } /** Provides panels and histories of toolbar items. * @alpha */ export declare class PanelsProvider extends React.PureComponent { private _update; private _refs; private appendPanels; componentDidMount(): void; componentDidUpdate(): void; render(): React.ReactNode; private _handleToolbarItemRef; } /** Properties of [[Toolbar]] component. * @beta */ export interface ToolbarProps extends CommonProps, NoChildrenProps { /** Describes to which direction the history/panel items are expanded. Defaults to: [[Direction.Bottom]] */ expandsTo?: Direction; /** Items of the toolbar. I.e. [[Item]], [[ExpandableItem]], [[Overflow]] */ items?: React.ReactNode; /** Describes how expanded panels are aligned. Defaults to: [[ToolbarPanelAlignment.Start]] */ panelAlignment?: ToolbarPanelAlignment; } /** @alpha */ export declare const getToolbarDirection: (expandsTo: Direction) => OrthogonalDirection; interface ToolbarState { panels: HTMLElement | null; } /** A toolbar that contains toolbar items. * @beta */ export declare class Toolbar extends React.PureComponent { static readonly defaultProps: { expandsTo: Direction; panelAlignment: ToolbarPanelAlignment; }; /** @internal */ readonly state: { panels: null; }; render(): JSX.Element; private _renderItems; private _handlePanelsRef; } /** Defines toolbar item component. * @alpha */ export interface ToolbarItem { readonly panel: HTMLElement; } /** These props will be injected by Toolbar. * @note Must be passed down when wrapping the toolbar item component. * @alpha */ export interface ToolbarItemProps { readonly toolbarItemRef?: React.Ref; } /** Extracts [[ToolbarItemProps]] from your props. * @alpha */ export declare const getToolbarItemProps: (props: TProps) => ToolbarItemProps; /** * Context used by Toolbar component to provide Direction to child components. * @internal */ export declare const ToolbarDirectionContext: React.Context; export {}; //# sourceMappingURL=Toolbar.d.ts.map