import * as React from 'react'; /** Writing direction of a subtree. */ export type Direction = 'ltr' | 'rtl'; /** Props for {@link DirectionProvider}. */ export interface DirectionProviderProps { /** Writing direction every descendant skdx component should assume. */ dir: Direction; children?: React.ReactNode | undefined; } /** * Declares the writing direction for every skdx component beneath it without rendering an element of its own, for when direction isn't already expressed as a `dir` attribute in the DOM. * * @example * ```tsx * * * * ``` */ export declare function DirectionProvider({ dir, children }: DirectionProviderProps): React.JSX.Element; /** The direction declared by an explicit prop or the nearest {@link DirectionProvider}, or `undefined` when neither is present. */ export declare function useDirection(dirProp?: Direction): Direction | undefined; /** * @internal The direction a portalled panel must carry on itself, resolved from an element still in the logical tree (its trigger) since the panel's own DOM walk would miss an ancestor `[dir]`. * @param anchorRef the trigger, or anything else still in the logical tree * @param dirProp an explicit `dir` prop, if the component takes one */ export declare function usePortalledDirection(anchorRef: React.RefObject, dirProp?: Direction): Direction; /** @internal Resolves `el`'s direction, with `override` (prop/provider) winning when set. */ export declare function resolveDirection(el: Element | null | undefined, override?: Direction): Direction; /** @internal An edge named logically: `start`/`end` follow the writing direction. */ export type LogicalSide = 'start' | 'end' | 'top' | 'bottom'; /** @internal An edge named physically, which is what CSS `left`/`right` and `data-side` mean. */ export type PhysicalSide = 'left' | 'right' | 'top' | 'bottom'; /** @internal Resolves a logical edge to the physical one it lands on: `start`/`end` swap under RTL, `top`/`bottom` and already-physical values pass through. */ export declare function resolvePhysicalSide(side: LogicalSide | PhysicalSide, direction: Direction): PhysicalSide; /** @internal Translates the physically-pressed key into the key an LTR-authored handler should act on: ArrowLeft/ArrowRight swap under RTL, every other key passes through unchanged. */ export declare function directionalKey(key: string, el: Element | null | undefined, override?: Direction): string;