import { type ReactNode } from 'react'; import { type SegmentLayout, type SegmentTone } from './segmented.js'; export interface TabItem { value: Value; label: string; icon?: ReactNode; /** Beside the label, or in the corner when only the icon shows. */ badge?: ReactNode; /** How many things the view holds, as a pill after the label. */ count?: number | undefined; /** Colors the label and the count, for a view that needs attention, such * as what failed or what has been left behind. */ tone?: SegmentTone | undefined; /** Navigates instead of showing a panel, for tabs that are pages. */ href?: string; disabled?: boolean; testId?: string; } export interface TabsProps extends SegmentLayout { /** Names the set of tabs for assistive technology. */ label: string; items: TabItem[]; /** The current tab. For tabs that are pages, the page being shown. */ value?: Value | undefined; defaultValue?: Value | undefined; onValueChange?: ((value: Value) => void) | undefined; /** `line` underlines the current tab across a page; `segmented` matches a * SegmentedControl, for a few views in a small space. `fill`, `iconOnly` * and `size` apply to `segmented`. */ variant?: 'line' | 'segmented' | undefined; /** At the tab row's far end, such as a picker for what the tabs show. */ end?: ReactNode; /** Pins the tab row as the page scrolls, just below whatever the page's * scroller already pins at the top, such as the page header and a toolbar. */ sticky?: boolean | undefined; /** Keeps the panels as tall as the tallest, so changing tabs moves nothing * below them. Every panel stays mounted, so it suits a few light panels, and a * closed panel's fields still submit, and still validate, with a form around it. The * `TabPanel`s share one grid cell, so they must be the children, with no * element around them and nothing else beside them. */ steadyHeight?: boolean | undefined; /** On the tab row. */ className?: string | undefined; testId?: string | undefined; /** The `TabPanel`s; tabs that are pages leave this to the router. */ children?: ReactNode; } /** Views of one thing, one shown at a time: panels below the tabs, or pages * the tabs link to. A lone tab would only repeat the page's title, so the row * hides unless there are two or more, or something at its end. */ export declare function Tabs({ label, items, value, defaultValue, onValueChange, variant, fill, iconOnly, size, end, sticky, steadyHeight, className, testId, children, }: TabsProps): import("react").JSX.Element; /** One tab's content, shown while its tab is current. */ export declare function TabPanel({ value, keepMounted, className, children, }: { value: string; /** Keeps the content, and its state, while another tab is shown. */ keepMounted?: boolean | undefined; className?: string | undefined; children: ReactNode; }): import("react").JSX.Element;