import { styleProps } from './styles'; /** An object's own keys, typed as its keys rather than `string[]`. */ export declare const keysOf: (object: T) => (keyof T)[]; export type PrepareComponentPropsOptions> = { componentName: string; props: T; styleProps?: readonly (keyof typeof styleProps)[]; dataProps?: readonly (keyof T & string)[]; }; /** * Stamps `data-slot`, and puts each listed style prop on the element as * `data-ui-{key}` plus a raw `--props-{key}` for the rules in * `@uiid/tokens/props.css` to resolve. A caller's own `style` still wins. * * A data prop writes `data-ui-{key}` only, for a rule that lives elsewhere: a * toggle's in `props.css`, a component's own vocabulary's (Text's `size`) in * its CSS module. A value is written as itself, `true` as a bare attribute, * and `false` or nothing as no attribute at all, so a presence selector never * matches an off prop. */ export declare function prepareComponentProps>({ componentName, props, styleProps: stylePropKeys, dataProps: dataPropKeys, }: PrepareComponentPropsOptions): { style: import('react').CSSProperties; }; /** * DOM attributes a caller can put on a component without the props type * declaring them. `AriaAttributes` types every `aria-*` key exactly; the * template index signature covers `data-*` hooks. */ export type DomAttributes = React.AriaAttributes & Record<`data-${string}`, string | undefined>; /** * Splits leftover props into the DOM attributes a headless Root would swallow * and everything else. * * Base UI's `Root` parts group state and render no element, so an `aria-label` * or `data-*` spread onto one reaches no DOM at all — the only signal is the * absence of whatever it was meant to do. TypeScript cannot catch it either: * JSX exempts hyphenated attribute names from excess-property checks, so * `aria-label` compiles against a Root props interface that has no such key. * * The hyphen is the whole test. No Base UI Root prop contains one, so anything * hyphenated is a DOM attribute meant for the element the caller can see — * the focusable control, not the wrapper that renders nothing. */ export declare function splitDomAttributes>(props: T): readonly [DomAttributes, T]; //# sourceMappingURL=utils.d.ts.map