import React from 'react'; import PropTypes from 'prop-types'; import Tab from './Tab'; import { ComponentProps } from '../utils/types'; /** @public */ type TabBarChangeHandler = (event: React.MouseEvent | React.FocusEvent, data: { selectedTabId?: string; }) => void; interface TabBarPropsBase { /** If `true`, tabs will trigger the `onChange` callback when they receive focus. */ autoActivate?: boolean; /** The `tabId` of the `TabBar.Tab` to activate. */ activeTabId?: string; /** * Must be `TabBar.Tab`. */ children?: React.ReactNode; /** @private */ disabled?: boolean; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** * Position of icon in `TabBar.Tab` if it has an icon. Defaults to "left". * @deprecated This prop is deprecated and will be removed in the next major version. */ iconPosition?: 'above' | 'left'; /** The layout of tabs. */ layout?: 'horizontal' | 'vertical'; /** Max width of each `TabBar.Tab` in pixels. Leave blank for auto max width. */ maxTabWidth?: number; /** A callback that receives the event and data (`selectedTabId`). */ onChange?: TabBarChangeHandler; } type TabBarProps = ComponentProps; declare function TabBar({ activeTabId, autoActivate, children, disabled, elementRef, iconPosition, layout, maxTabWidth, onChange, ...otherProps }: TabBarProps): React.JSX.Element; declare namespace TabBar { var propTypes: { autoActivate: PropTypes.Requireable; activeTabId: PropTypes.Requireable; children: PropTypes.Requireable; /** @private */ disabled: PropTypes.Requireable; elementRef: PropTypes.Requireable; iconPosition: PropTypes.Requireable; layout: PropTypes.Requireable; maxTabWidth: PropTypes.Requireable; onChange: PropTypes.Requireable<(...args: any[]) => any>; }; var Tab: { ({ ariaControls, count, disabled, elementRef, icon, label, maxCount, tabId: tabIdProp, to, tooltip, menu, index, ...otherProps }: import("./Tab").TabPropsBase & Omit, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>): React.JSX.Element; propTypes: { ariaControls: PropTypes.Requireable; count: PropTypes.Requireable; disabled: PropTypes.Requireable; elementRef: PropTypes.Requireable; icon: PropTypes.Requireable; id: PropTypes.Requireable; label: PropTypes.Requireable>; maxCount: PropTypes.Requireable; tabId: PropTypes.Requireable; to: PropTypes.Requireable; tooltip: PropTypes.Requireable; menu: PropTypes.Requireable; index: PropTypes.Requireable; }; as: string; }; } export default TabBar; export { Tab }; export type { TabBarChangeHandler, TabBarPropsBase };