import type { JSX, ValidComponent } from "@solidjs/web"; import { dynamic } from "@solidjs/web"; import { createMemo, createRenderEffect, createSignal, omit, onCleanup, Show, untrack, } from "solid-js"; import { useCspNonce } from "../../csp-provider/csp-context.ts"; import { isHydrating } from "../../internals/is-hydrating.ts"; import { mergeRootProps } from "../../internals/merge-root-props"; import { resolveClassStyle } from "../../internals/resolve-class-style"; import type { BaseUIComponentProps } from "../../internals/types"; import type { Orientation } from "../../internals/types.ts"; import { useTabsListContext } from "../tabs-list-context.ts"; import { type TabsRootState, type TabsTabActivationDirection, useTabsRootContext, } from "../tabs-root-context.ts"; import { tabsIndicatorPrehydrationScript } from "./prehydration-script.ts"; export interface TabsIndicatorPosition { left: number; right: number; top: number; bottom: number; } export interface TabsIndicatorSize { width: number; height: number; } export interface TabsIndicatorState extends TabsRootState { /** Rectangle of the active tab relative to the list. `null` when idle. */ activeTabPosition: TabsIndicatorPosition | null; /** Size of the active tab. `null` when idle. */ activeTabSize: TabsIndicatorSize | null; /** Layout orientation (inherited from root). */ orientation: Orientation; /** Activation direction (inherited from root). */ tabActivationDirection: TabsTabActivationDirection; } export interface TabsIndicatorProps extends BaseUIComponentProps<"span", TabsIndicatorState> { /** Tag/component to render. Defaults to `"span"`. */ as?: ValidComponent; /** * Whether to emit the inline prehydration `