import { ComponentPropsWithoutRef, ReactElement, RefObject } from 'react'; import { LayoutUtilProps } from '../../types'; import { ToolbarItemProps, ToolbarOverflowTypes } from './sharedTypes'; /** * Context for sharing toolbar state with child components for overflow handling */ export type ToolbarOverFlowContextProps = { /** * Array of toolbar items that should appear in the overflow menu */ overflowItems: ToolbarItemProps[]; /** * Function to add an item to the overflow menu */ addItem: (element: ToolbarItemProps) => void; /** * Function to remove an item from the overflow menu */ removeItem: (element: ToolbarItemProps) => void; /** * Reference to the toolbar container element */ toolbarRef: RefObject; /** * Array of item IDs in their original order */ orderedIds?: string[]; /** * Overflow behavior type (wrap or collapse) */ overflow: ToolbarOverflowTypes; }; /** * Context for managing toolbar overflow state and operations */ export declare const ToolbarOverflowContext: import('react').Context; /** * Props for the Toolbar component * @extends ComponentPropsWithoutRef<"div"> * @extends LayoutUtilProps */ export type ToolbarProps = ComponentPropsWithoutRef<"div"> & LayoutUtilProps & { /** * Description of the content this toolbar is associated with, used for accessibility */ associatedContent: string; /** * Orientation of the toolbar * @default horizontal */ direction?: "vertical" | "horizontal"; /** * How to handle overflow when items don't fit * @default wrap */ overflow?: ToolbarOverflowTypes; /** * Additional items to display in the overflow menu */ additionalItems?: ReactElement[]; }; /** * Toolbar component for grouping related interactive elements. * * Features: * - Horizontal or vertical orientation * - Overflow handling with wrap or collapse behavior * - Keyboard navigation following ARIA best practices * - Screen reader announcements and accessibility * - Automatic overflow menu for collapsed items * - Support for buttons, toggles, selects, and links * - Layout utilities for positioning and spacing * - Context-based state management for child components * * @example * * * * * */ export declare const Toolbar: import('react').ForwardRefExoticComponent, HTMLDivElement>, "ref"> & LayoutUtilProps & { /** * Description of the content this toolbar is associated with, used for accessibility */ associatedContent: string; /** * Orientation of the toolbar * @default horizontal */ direction?: "vertical" | "horizontal"; /** * How to handle overflow when items don't fit * @default wrap */ overflow?: ToolbarOverflowTypes; /** * Additional items to display in the overflow menu */ additionalItems?: ReactElement[]; } & import('react').RefAttributes> & { /** * ToolbarButton component for standard clickable actions within a toolbar. * * Features: * - Designed specifically for toolbar integration * - Consistent styling with other toolbar items * - Automatic tooltip for icon-only buttons * - Overflow menu support * - Accessibility enforcement for aria-labels * - Small size optimized for toolbar layout * - Ghost and primary appearance options * * @example * * * @example * * Save * */ Button: import('react').ForwardRefExoticComponent>; /** * ToolbarButtonToggle component for toggleable actions within a toolbar. * * Features: * - Toggle state management (on/off) * - Designed specifically for toolbar integration * - Consistent styling with other toolbar items * - Automatic tooltip for icon-only toggles * - Overflow menu support * - Accessibility enforcement for aria-labels * - Small size optimized for toolbar layout * - Visual feedback for toggle state * - Proper ARIA attributes for toggle semantics * * @example * * * @example * * Italic * */ ButtonToggle: import('react').ForwardRefExoticComponent>; /** * ToolbarButtonLink component for link actions within a toolbar. * * Features: * - Link functionality with href support * - Designed specifically for toolbar integration * - Consistent styling with other toolbar items * - Automatic tooltip for icon-only links * - Overflow menu support * - Accessibility enforcement for aria-labels * - Small size optimized for toolbar layout * - Ghost and primary appearance options * - Proper anchor element semantics * * @example * * Help * * * @example * */ ButtonLink: import('react').ForwardRefExoticComponent>; /** * ToolbarSelect component provides a dropdown selector within a toolbar. * * Features: * - Dropdown menu with selectable options * - Controlled and uncontrolled usage patterns * - Automatic overflow menu integration * - Accessibility support with proper ARIA labels * - Small size optimized for toolbar layout * - Ghost and primary appearance options * - Dropdown arrow icon indicator * - Listbox integration for keyboard navigation * * @example * setFont(id)} * /> * * @example * */ Select: import('react').ForwardRefExoticComponent, HTMLButtonElement>, "ref">, "children"> & LayoutUtilProps & { appearance?: import('../..').ButtonAppearance; size?: Extract; loading?: boolean; } & { children?: ComponentPropsWithoutRef<"button">["children"]; icon?: import('..').IconProps["svg"] | { after: import('..').IconProps["svg"]; } | { before: import('..').IconProps["svg"]; }; } & import('react').RefAttributes, "ref"> | Omit, HTMLButtonElement>, "ref">, "children"> & LayoutUtilProps & { appearance?: import('../..').ButtonAppearance; size?: Extract; loading?: boolean; } & { children?: never; icon?: import('..').IconProps["svg"]; } & import('react').RefAttributes, "ref">, "onChange" | "appearance"> & { appearance?: import('./sharedTypes').ToolbarItemAppearance; onChange?: (optionId: string) => void; selected?: string; items: (Record & { id: string; } & { label: string; disabled?: boolean; })[]; accessibleLabel: string; } & import('react').RefAttributes>; };