import { Accessibility } from '../../types'; import { ButtonBehaviorProps } from '../Button/buttonBehavior'; /** * @specification * Adds role='button' if element type is other than 'button'. This allows screen readers to handle the component as a button. * Adds attribute 'tabIndex=0' if element type is other than 'button'. * Adds attribute 'aria-disabled=true' based on the property 'disabled'. This can be overriden by providing 'aria-disabled' property directly to the component. * Adds attribute 'aria-haspopup=menu' to 'root' slot if 'hasMenu' property is set. * Adds attribute 'aria-haspopup=dialog' to 'root' slot if 'hasPopup' property is set. * Triggers 'performClick' action with 'Enter' or 'Spacebar' on 'root'. * Triggers 'closeMenuAndFocusTrigger' action with 'Escape' on 'wrapper', when toolbar button has submenu and it is opened. * Triggers 'doNotNavigateNextToolbarItem' action with 'ArrowLeft' or 'ArrowRight' on 'wrapper', when toolbar button has submenu and it is opened. */ export declare const toolbarItemBehavior: Accessibility; export declare type ToolbarItemBehaviorProps = { /** Indicated if toolbar item has a menu. */ hasMenu?: boolean; /** If the menu is in open state. */ menuOpen?: boolean; /** Indicated if toolbar item has a popup. */ hasPopup?: boolean; } & ButtonBehaviorProps;