import * as class_variance_authority_types from 'class-variance-authority/types'; import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; import { VariantProps } from 'class-variance-authority'; import { Tabs as Tabs$1 } from 'radix-ui'; import { HorizontalScrollRegionProps } from './horizontal-scroll-region.js'; import './horizontal-scroll-controls.js'; import './scroll-region.js'; declare function Tabs({ className, orientation, value, defaultValue, onValueChange, rememberScroll, ...props }: React.ComponentProps & { /** * Give each tab its own scroll position in the page scrollport: a tab opens at * its top the first time and where you left it after that. * * For tab rows that *are* the page's navigation — a record's module row, a * hub's views — where the panels have their own lengths and the scrollport is * shared, so the offset from the tab you left otherwise carries into the one * you asked for. Leave it off for a row inside a card or a panel: flipping a * chart between Chart and Trend must not move the page under the reader. */ rememberScroll?: boolean; }): react_jsx_runtime.JSX.Element; declare const tabsListVariants: (props?: ({ variant?: "line" | "default" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; interface TabsOverflowProps { /** * Set `false` to keep the row at its natural width and let it overflow or wrap * on its own terms. Only correct when something else already handles the * overflow, e.g. a `flex-wrap` list. */ overflow?: boolean; /** Accessible name for the scroll region around the row. */ ariaLabel?: string; /** Set `false` to always show every label and shed whole tabs instead. */ collapseLabels?: boolean; /** Set `false` to scroll the row instead of moving tabs into a menu. */ overflowMenu?: boolean; /** Accessible name for the overflow trigger. */ overflowLabel?: string; } /** * The `tablist`, which handles its own overflow. * * Overflow is not a per-surface decision, so it is not something a call site has * to remember to opt into: any row narrower than its tabs sheds them through the * ladder in {@link useRowFitLadder}. {@link TabsListScrollRegion} exists to name * the region or opt out, not to switch the behaviour on. */ declare function TabsList({ overflow, ariaLabel, collapseLabels, overflowMenu, overflowLabel, className, variant: variantProp, pinVariant, children, ...props }: React.ComponentProps & VariantProps & TabsOverflowProps & { /** * Keep `variant` exactly as passed, ignoring shell density. * * Only correct for a surface that *demonstrates* a variant rather than uses * one — the design system catalog. A product surface should stay adaptive, * so the shell can decide how its tabs read. */ pinVariant?: boolean; }): react_jsx_runtime.JSX.Element; /** * Marks the glyph in a {@link TabsTrigger}. Presence of this slot is what makes * a trigger eligible to collapse to icon only, so a label-only tab can never * collapse into nothing. */ declare function TabsTriggerIcon({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element; /** * Marks the text in a {@link TabsTrigger}. Beside an icon, it gives its width * back to the row when there is not enough of it, leaving the tab as its glyph. * * The text stays in the DOM rather than being replaced by the icon, so the tab * keeps its accessible name and a screen reader still announces it by label. * What goes away is the column it sits in: a grid track from `1fr` to `0fr`, * which unlike `display: none` is a length, and so can be crossed rather than * jumped. `overflow: hidden` on the inner span is what lets the track reach * zero — without it the text's own `min-width: auto` floors the column at its * full width. * * Labels close from the end of the row and only as far as they have to, so a row * one label too wide gives up one label rather than all of them. Which ones are * closed comes from the ladder; whether the selected tab honours it is CSS, off * Radix's `data-state`. Keeping the exemption in CSS means selecting another tab * re-opens its label without a render, so the row cannot be measured in the gap * between the click and the state that would have followed it. * * Pair with {@link TabsTriggerIcon}; without an icon this renders unchanged. */ declare function TabsTriggerLabel({ className, children, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element; declare function TabsTrigger({ className, children, ref: forwardedRef, ...props }: React.ComponentProps): react_jsx_runtime.JSX.Element; declare function TabsContent({ className, ...props }: React.ComponentProps): react_jsx_runtime.JSX.Element; /** * Configures the overflow behaviour {@link TabsList} already has. * * Wrapping is no longer how a row gets the ladder — every `TabsList` runs it. Use * this only to name the region, pass classes to it, or opt a row out; the same * settings are available directly on `TabsList` if you would rather not nest. */ declare function TabsListScrollRegion({ children, className, ariaLabel, scrollClassName, ...settings }: Pick & TabsOverflowProps): react_jsx_runtime.JSX.Element; /** Count pill inside a primary {@link TabsTrigger} — matches Views segment scale (`text-2xs`). */ declare function TabsCountBadge({ count, className }: { count: number; className?: string; }): react_jsx_runtime.JSX.Element; export { Tabs, TabsContent, TabsCountBadge, TabsList, TabsListScrollRegion, type TabsOverflowProps, TabsTrigger, TabsTriggerIcon, TabsTriggerLabel, tabsListVariants };