import type { JSX } from "@solidjs/web"; /** * Any intrinsic HTML tag name (matches what `dynamic()` accepts). */ export type HTMLElementTag = keyof JSX.IntrinsicElements; export type Orientation = "horizontal" | "vertical"; /** * Props object for a given HTML tag — Solid's `JSX.IntrinsicElements` entry. * This is the shape that consumers can splat onto a DOM element. */ export type HTMLPropsFor = JSX.IntrinsicElements[Tag]; /** * Generic "plain HTML attributes" shape, used where we don't know the tag. */ export type HTMLProps = JSX.HTMLAttributes; /** Solid's native class value accepted by an HTML element. */ export type ElementClass = JSX.HTMLAttributes["class"]; /** Solid's native style value accepted by an HTML element. */ export type ElementStyle = JSX.HTMLAttributes["style"]; /** @deprecated Prefer `ElementStyle` for public element style contracts. */ export type CSSProperties = JSX.CSSProperties; /** * A deliberately narrow bag of styling attributes. * * This is not a second arbitrary-props escape hatch: it carries only the * outputs produced together by styling systems such as extracted atomic CSS. */ export interface StylingAttrs { class?: ElementClass; style?: ElementStyle; "data-style-src"?: string | undefined; } /** * Shared props contract for every Base UI component. * * `class` / `style` may be a function of state (reactive — resolved against * the live state accessor at render time). Tag swap is via the `as` prop on * each compound part (routed through a `dynamic()` element). `ref` uses Solid's native * `Ref` which already supports arrays for composition. */ export type BaseUIComponentProps = Omit, "class" | "style" | "children" | "ref"> & { /** * CSS class applied to the element. * String, object, array (clsx-style) or a function of state. */ class?: ElementClass | ((state: State) => ElementClass) | undefined; /** * Solid-native element style, or a function of state returning one. */ style?: ElementStyle | ((state: State) => ElementStyle) | undefined; /** * Unified styling output, optionally derived from component state. * Applied after the legacy `class` and `style` props. */ attrs?: StylingAttrs | ((state: State) => StylingAttrs | undefined) | undefined; /** * Child content. */ children?: JSX.Element; /** * Ref to the rendered element. */ ref?: JSX.IntrinsicElements[Tag]["ref"]; }; /** * Props flag for components that render a native `