import { Accessibility, ToolbarBehaviorProps } from '@fluentui/accessibility'; import { ComponentWithAs } from '@fluentui/react-bindings'; import * as PropTypes from 'prop-types'; import * as React from 'react'; import { ComponentEventHandler, ShorthandCollection, ShorthandValue } from '../../types'; import { UIComponentProps, ContentComponentProps, ChildrenComponentProps, ColorComponentProps } from '../../utils'; import { ToolbarCustomItemProps } from './ToolbarCustomItem'; import { ToolbarDividerProps } from './ToolbarDivider'; import { ToolbarItemProps } from './ToolbarItem'; import { ToolbarMenuProps } from './ToolbarMenu'; import { ToolbarMenuRadioGroupProps } from './ToolbarMenuRadioGroup'; export declare type ToolbarItemShorthandKinds = { item: ToolbarItemProps; divider: ToolbarDividerProps; group: ToolbarMenuRadioGroupProps; toggle: ToolbarItemProps; custom: ToolbarCustomItemProps; }; export interface ToolbarProps extends UIComponentProps, ContentComponentProps, ChildrenComponentProps, ColorComponentProps { /** Accessibility behavior if overridden by the user. */ accessibility?: Accessibility; /** Shorthand array of props for Toolbar. */ items?: ShorthandCollection; /** * Automatically move overflow items to overflow menu. * For automatic overflow to work correctly, toolbar items including overflowMenuItem * must NOT change their size! If you need to change item's size, rerender the Toolbar. */ overflow?: boolean; /** Indicates if the overflow menu is open. Only valid if `overflow` is enabled and regular items do not fit. */ overflowOpen?: boolean; /** * Shorthand for the overflow item which is displayed when `overflow` is enabled and regular toolbar items do not fit. * Do not set any menu on this item, Toolbar overrides it. */ overflowItem?: ShorthandValue; /** * Called when overflow is recomputed (after render, update or window resize). Even if all items fit. * @param itemsVisible - number of items visible */ onOverflow?: (itemsVisible: number) => void; /** * Event for request to change 'overflowOpen' value. * @param event - React's original SyntheticEvent. * @param data - All props and proposed value. */ onOverflowOpenChange?: ComponentEventHandler; /** * Callback to get items to be rendered in overflow menu. * Called when overflow menu is rendered opened. * @param startIndex - Index of the first item to be displayed in the overflow menu (the first item which does not fit the toolbar). */ getOverflowItems?: (startIndex: number) => ToolbarItemProps['menu']; } export declare type ToolbarStylesProps = never; export declare const toolbarClassName = "ui-toolbar"; /** * A Toolbar is a container for grouping a set of controls, often action controls (e.g. buttons) or input controls (e.g. checkboxes). * * @accessibility * * Implements [ARIA Toolbar](https://www.w3.org/TR/wai-aria-practices-1.1/#toolbar) design pattern. * @accessibilityIssues * [Issue 988424: VoiceOver narrates selected for button in toolbar](https://bugs.chromium.org/p/chromium/issues/detail?id=988424) */ export declare const Toolbar: ( = "div">(props: Pick, Exclude, "color" | "content" | "children" | "as" | "className" | "items" | "overflow" | "design" | "styles" | "variables" | "accessibility" | "overflowOpen" | "overflowItem" | "onOverflow" | "onOverflowOpenChange" | "getOverflowItems">> & { as?: TExtendedElementType; } & ToolbarProps) => JSX.Element) & { propTypes?: React.WeakValidationMap & { as: React.Requireable any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap; defaultProps?: Partial; displayName?: string; readonly __PRIVATE_PROPS?: Pick, HTMLDivElement>, "hidden" | "color" | "style" | "title" | "key" | "children" | "aria-label" | "role" | "tabIndex" | "id" | "aria-autocomplete" | "aria-checked" | "aria-current" | "aria-disabled" | "aria-expanded" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-pressed" | "aria-readonly" | "aria-required" | "aria-selected" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "aria-activedescendant" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-describedby" | "aria-details" | "aria-errormessage" | "aria-flowto" | "aria-labelledby" | "aria-owns" | "aria-posinset" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "contextMenu" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "dir" | "draggable" | "lang" | "placeholder" | "slot" | "spellCheck" | "inputMode" | "is" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-atomic" | "aria-busy" | "aria-dropeffect" | "aria-grabbed" | "aria-keyshortcuts" | "aria-placeholder" | "aria-relevant" | "aria-roledescription" | "aria-setsize" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & { ref?: React.Ref; }, "hidden" | "style" | "title" | "key" | "ref" | "aria-label" | "role" | "tabIndex" | "id" | "aria-autocomplete" | "aria-checked" | "aria-current" | "aria-disabled" | "aria-expanded" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-pressed" | "aria-readonly" | "aria-required" | "aria-selected" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "aria-activedescendant" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-describedby" | "aria-details" | "aria-errormessage" | "aria-flowto" | "aria-labelledby" | "aria-owns" | "aria-posinset" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "contextMenu" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "dir" | "draggable" | "lang" | "placeholder" | "slot" | "spellCheck" | "inputMode" | "is" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-atomic" | "aria-busy" | "aria-dropeffect" | "aria-grabbed" | "aria-keyshortcuts" | "aria-placeholder" | "aria-relevant" | "aria-roledescription" | "aria-setsize" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & { as?: "div"; } & ToolbarProps; } & { CustomItem: ComponentWithAs<"div", ToolbarCustomItemProps>; Divider: ComponentWithAs<"div", ToolbarDividerProps>; Item: ComponentWithAs<"button", ToolbarItemProps>; ItemWrapper: ComponentWithAs<"div", import("./ToolbarItemWrapper").ToolbarItemWrapperProps & import("../..").BoxProps>; ItemIcon: ComponentWithAs<"div", import("./ToolbarItemIcon").ToolbarItemIconProps & import("../..").BoxProps>; Menu: ComponentWithAs<"ul", ToolbarMenuProps>; MenuDivider: ComponentWithAs<"li", import("./ToolbarMenuDivider").ToolbarMenuDividerProps>; MenuItem: ComponentWithAs<"button", import("./ToolbarMenuItem").ToolbarMenuItemProps>; MenuItemIcon: ComponentWithAs<"span", import("./ToolbarMenuItemIcon").ToolbarMenuItemIconProps & import("../..").BoxProps>; MenuItemSubmenuIndicator: ComponentWithAs<"span", import("./ToolbarMenuItemSubmenuIndicator").ToolbarMenuItemSubmenuIndicatorProps & import("../..").BoxProps>; MenuItemActiveIndicator: ComponentWithAs<"span", import("./ToolbarMenuItemActiveIndicator").ToolbarMenuItemActiveIndicatorProps & import("../..").BoxProps>; MenuRadioGroup: ComponentWithAs<"ul", ToolbarMenuRadioGroupProps>; MenuRadioGroupWrapper: ComponentWithAs<"li", import("./ToolbarMenuRadioGroupWrapper").ToolbarMenuRadioGroupWrapperOwnProps & import("../..").BoxProps>; RadioGroup: ComponentWithAs<"div", import("./ToolbarRadioGroup").ToolbarRadioGroupProps>; };