import type * as React from "react"; /** CSS with `lineHeight` as a string, the one key whose meaning differs between native styles (px) and * React DOM (ratio). Prefer none: leading is a rung (`size`, `leading="tight"`). */ export type StyleValue = Omit & { lineHeight?: string; }; /** Every component's whole styling surface: tokens and props, plus these three for placement. DOM, class * names and sheets are private, so a gap is closed by a kit variant. `className` is a string, not Base * UI's state function. */ export interface StyleProps { className?: string; style?: StyleValue; /** The consumer's own state on the root beside the kit's; `undefined` writes nothing, other values * verbatim. The component's own key wins. */ [dataAttr: `data-${string}`]: string | number | boolean | undefined; } /** What an overlay hands the control it renders through — the toggle click, * `aria-haspopup`/`aria-expanded`, the popup's state attributes. A Base UI `render` target forwards `ref` * and spreads the rest, or the overlay never opens; every trigger-capable control extends and * `mergeProps` this. */ export type TriggerProps = Omit, "className" | "style" | "children" | "dangerouslySetInnerHTML"> & { /** State attributes an overlay or wrapper writes; React's `HTMLAttributes` has none. */ [dataAttr: `data-${string}`]: string | number | boolean | undefined; }; export type PartState = Record; /** Base UI's escape hatch for state attributes not named by the lowercased key; pass the same mapping to * `styleParts` and `useRender`, or CSS and DOM silently diverge. */ export type StateAttributesMapping = Record Record | null>; export interface PartAttrs { className?: string; style?: StyleValue; /** As wide as the prop that carried the consumer's values. */ [dataAttr: `data-${string}`]: string | number | boolean | undefined; } /** Named so a compound can thread it to a part-rendering helper. */ export type PartAccessor = (part: Part | "root", state?: PartState) => PartAttrs; /** `T` is the ref's element type, which an invariant `RefObject` cannot express. */ export declare function assignRef(ref: React.Ref | undefined, node: T | null): void; /** Both the caller's ref and an overlay's composed one receive the node. */ export declare function composeRefs(...refs: Array | undefined>): React.RefCallback; /** Drops falsy values; undefined when none survive. */ export declare function cn(...values: Array): string | undefined; /** The class list, inline style and data attributes for one part. `rootPart` is for a member of a larger * anatomy (`styleParts("dialog", props, "title")`), else `className` lands on an unrendered * root. `Part` defaults to never so a misspelled part fails to compile. */ export declare function styleParts(component: string, props: StyleProps, rootPart?: Part | "root", mapping?: StateAttributesMapping): PartAccessor;