import type { JSX, ValidComponent } from "@solidjs/web"; import { type MaybeAccessor } from "../../internals/maybe-accessor.js"; import type { BaseUIComponentProps, Orientation } from "../../internals/types.js"; import { type TabsRootChangeEventDetails, type TabsRootChangeEventReason, type TabsRootState, type TabsTabActivationDirection, type TabsTabMetadata, type TabsTabValue } from "../tabs-root-context.js"; export type { TabsRootChangeEventDetails, TabsRootChangeEventReason, TabsRootState, TabsTabActivationDirection, TabsTabMetadata, TabsTabValue, }; export type TabsRootOrientation = Orientation; export interface TabsRootProps extends BaseUIComponentProps<"div", TabsRootState> { /** Tag/component to render. Defaults to `"div"`. */ as?: ValidComponent; /** * Controlled selected tab. When provided (resolved value not * `undefined` — `null` counts as controlled and means "nothing * selected"), the consumer owns the state — pair with * {@link onValueChange}. When omitted, the tabs manage their own * selection (seeded from {@link defaultValue}). */ value?: MaybeAccessor; /** * Initial selected tab when uncontrolled. Read once at mount. * @default 0 */ defaultValue?: MaybeAccessor; /** * Layout orientation — drives `aria-orientation` on `` and the * direction that arrow-key navigation travels. * @default "horizontal" */ orientation?: MaybeAccessor; /** * Fires when the user activates a different tab. Calling * `eventDetails.cancel()` keeps the tabs' own (uncontrolled) selection * unchanged, mirroring React Base UI; controlled consumers simply * don't update their signal. */ onValueChange?: ((value: Value, eventDetails: TabsRootChangeEventDetails) => void) | undefined; } /** * Groups a `` + a series of ``s into a single coordinated * tabs widget. Renders a `
` by default. Holds selection state, the DOM * map of tabs (for activation-direction math + `aria-labelledby`), and the * mounted-panel registry (for `aria-controls`). * * Solid 2 notes: * * - Provider lives INSIDE `get children()` of `params.props` so the root's * attribute getters stay owned by this setup scope (matches the radio-group / * progress-root pattern). * - Activation direction is computed lazily inside `onValueChange`; we also * track the previous value so the `data-activation-direction` attribute can * roll over on the transition. React Base UI recomputes it during render to * avoid a one-frame flash — Solid 2's render-effect timing makes that * unnecessary: the attribute projection runs in a `createRenderEffect` after * the state memo settles, so descendants see the correct direction as soon * as `value` flips. */ export declare function TabsRoot(props: TabsRootProps): JSX.Element; //# sourceMappingURL=tabs-root.d.ts.map