import { ScrollRegionProps, ScrollRegion } from './scroll-region.js'; import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; /** Default horizontal scroll distance per chevron click (px). */ declare const HORIZONTAL_SCROLL_STEP_PX = 240; interface HorizontalScrollAffordances { canScrollLeft: boolean; canScrollRight: boolean; overflowing: boolean; scrollPrev: () => void; scrollNext: () => void; } /** * Tracks overflow + scroll position for a horizontally scrollable element. * Pair with {@link HorizontalScrollControls} or compose your own chrome. */ declare function useHorizontalScrollAffordances(scrollRef: React.RefObject, stepPx?: number): HorizontalScrollAffordances; /** Pin scroll position to the trailing edge when content grows (breadcrumb trails). */ declare function useHorizontalScrollAlignEnd(scrollRef: React.RefObject, enabled: boolean, deps?: React.DependencyList): void; /** * Keeps an active child visible inside a horizontal scroll viewport (wizards, tab strips). */ declare function useHorizontalScrollItemIntoView(containerRef: React.RefObject, itemRef: React.RefObject, deps?: React.DependencyList): void; type HorizontalScrollControlsLayout = "group" | "split-prev" | "split-next"; interface HorizontalScrollControlsProps { /** Prefix for prev/next `aria-label`s (e.g. "Views", "Breadcrumb"). */ ariaLabel: string; layout?: HorizontalScrollControlsLayout; canScrollLeft: boolean; canScrollRight: boolean; onScrollPrev: () => void; onScrollNext: () => void; className?: string; } /** * Shared prev/next chevron control for horizontally overflowed rows. * * - **`group`** — segmented `[← | →]` button (default for view tabs, breadcrumbs). * - **`split-prev` / `split-next`** — single chevron for flanking layouts. */ declare function HorizontalScrollControls({ ariaLabel, layout, canScrollLeft, canScrollRight, onScrollPrev, onScrollNext, className, }: HorizontalScrollControlsProps): react_jsx_runtime.JSX.Element; /** Tailwind classes for a clipped horizontal scroll viewport (scrollbar hidden). */ /** * `p-1.5 -m-1.5` is room for a focus ring, not spacing. * * `overflow-x: auto` forces the block axis to `auto` as well — CSS has no way to * scroll one axis and let the other paint outside — so this box clips its * children's focus indicators, and the DS indicator is outset (a 3px ring plus a * 1px outline at 2px offset). A 36px tab in a 35px viewport therefore showed its * ring sliced flat top and bottom, and the first and last items lost the near * edge too. Padding gives the indicator somewhere to paint inside the clip. 6px * rather than the indicator's 3px reach, because a line-variant tab hangs a pixel * past its own row to sit on the track. * * The negative margin is what makes it free. Flex positions the margin box, so * pulling the padding back on every side leaves the content box exactly where it * was and the same size: rows keep their height, gaps to the scroll chevrons are * unchanged, and {@link useRowFitLadder} still compares like with like, since * `clientWidth` and `scrollWidth` grow by the same amount. */ declare const horizontalScrollViewportClassName = "flex min-w-0 flex-1 items-center overflow-x-auto p-1.5 -m-1.5 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"; type HorizontalScrollViewportProps = React.ComponentProps; /** * Horizontal scroll viewport with keyboard access — use with * {@link useHorizontalScrollAffordances} + {@link HorizontalScrollControls} * when not using {@link HorizontalScrollRegion}. * * **Edges fade rather than cut.** A clipped row ends mid-card, mid-label, or * mid-chart, which reads as a rendering fault rather than as "there is more this * way". `data-fade` names which edge has content behind it and one rule in * `globals.css` masks that side to transparent — a mask, not a coloured overlay, * because these rows sit on white cards, tinted washes, and the page canvas, and * a gradient painted in one of those colours is wrong on the other two. * * The fade is state, so the viewport tracks its own scroll position through the * same hook a caller uses for the chevrons. That is a second observer on the same * node in the common case, and worth it: every caller gets the treatment without * remembering to wire it, including the ones with no chevrons at all. */ declare const HorizontalScrollViewport: React.ForwardRefExoticComponent & React.RefAttributes, "ref"> & React.RefAttributes>; export { HORIZONTAL_SCROLL_STEP_PX, type HorizontalScrollAffordances, HorizontalScrollControls, type HorizontalScrollControlsLayout, type HorizontalScrollControlsProps, HorizontalScrollViewport, type HorizontalScrollViewportProps, horizontalScrollViewportClassName, useHorizontalScrollAffordances, useHorizontalScrollAlignEnd, useHorizontalScrollItemIntoView };