import { type ComponentPropsWithoutRef, type ComponentRef, type ElementType, type ForwardRefExoticComponent, type ReactElement, type RefAttributes } from "react"; import { Primitive as RadixPrimitive } from "@radix-ui/react-primitive"; /** * Thin wrapper around `@radix-ui/react-primitive` that adds `render` prop support. * * When `render` is provided, it is converted to the equivalent `asChild` pattern: * render={} + children → asChild + {children} * * All prop merging, ref composition, and event handler chaining remain handled * by Radix's battle-tested Slot implementation — we add zero custom logic for that. */ declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"]; type PrimitiveNode = (typeof NODES)[number]; type WithRenderPropProps = ComponentPropsWithoutRef & { render?: ReactElement | undefined; }; type PrimitiveProps = WithRenderPropProps<(typeof RadixPrimitive)[E]>; declare function withRenderProp(Component: T): ForwardRefExoticComponent & RefAttributes>>; declare const Primitive: { a: ForwardRefExoticComponent & import("react").AnchorHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; button: ForwardRefExoticComponent & import("react").ButtonHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; div: ForwardRefExoticComponent & import("react").HTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; form: ForwardRefExoticComponent & import("react").FormHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; h2: ForwardRefExoticComponent & import("react").HTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; h3: ForwardRefExoticComponent & import("react").HTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; img: ForwardRefExoticComponent & import("react").ImgHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; input: ForwardRefExoticComponent & import("react").InputHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; label: ForwardRefExoticComponent & import("react").LabelHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; li: ForwardRefExoticComponent & import("react").LiHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; nav: ForwardRefExoticComponent & import("react").HTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; ol: ForwardRefExoticComponent & import("react").OlHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; p: ForwardRefExoticComponent & import("react").HTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; select: ForwardRefExoticComponent & import("react").SelectHTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; span: ForwardRefExoticComponent & import("react").HTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; ul: ForwardRefExoticComponent & import("react").HTMLAttributes & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; svg: ForwardRefExoticComponent & { asChild?: boolean; }, "ref"> & { render?: ReactElement | undefined; } & RefAttributes>; }; export { Primitive, withRenderProp }; export type { PrimitiveProps, WithRenderPropProps }; //# sourceMappingURL=Primitive.d.ts.map