/** * `Slot` - forked from @radix-ui/react-slot (MIT, © WorkOS), inlined so * `veryfront/chat` takes no external Radix dependency. Merges its props onto a * single child element (the `asChild` pattern): className is concatenated, * style is shallow-merged, event handlers are chained (child first by default), * and refs are composed. The `disabled` contract gives composed controls a * capture-phase gate that suppresses primary, auxiliary, keyboard, and default * activation across Slot and child handlers. * * Scoped to the single-child case Veryfront's UI primitives use; Radix's * `Slottable`/lazy-children handling is intentionally omitted. * * @module react/components/ui/slot */ import * as React from "react"; /** Element attributes used by a control that may slot a native button. */ export type PolymorphicButtonAttributes = T extends HTMLButtonElement ? React.ButtonHTMLAttributes : React.HTMLAttributes; /** * Resolve button submission semantics for a native or slotted control. * Native controls and intrinsic slotted buttons default to `type="button"`. * Intrinsic non-buttons and opaque components never receive a button-only * attribute; an opaque component that renders a button must own its `type`. */ export declare function getPolymorphicButtonType(asChild: boolean | undefined, child: React.ReactNode): "button" | undefined; export declare function getPolymorphicButtonType(asChild: boolean | undefined, child: React.ReactNode, type: React.ButtonHTMLAttributes["type"]): React.ButtonHTMLAttributes["type"] | undefined; /** Compose multiple refs into one callback ref. */ export declare function composeRefs(...refs: Array | undefined>): React.RefCallback; /** Props accepted by ``. */ export interface SlotProps extends React.HTMLAttributes { children?: React.ReactNode; /** Block activation when an asChild consumer uses non-native disabled markup. */ disabled?: boolean; /** Button submission behavior for slotted button-like controls. */ type?: React.ButtonHTMLAttributes["type"]; } /** Render `Slot` — merge props onto its single child element. */ export declare const Slot: React.ForwardRefExoticComponent>; //# sourceMappingURL=slot.d.ts.map