import * as React from 'react'; import { type PopperContentProps } from './popper.js'; import { type PrimitivePropsWithRef } from './primitive.js'; /** Marks a portalled submenu panel as belonging to the menu that opened it, passed to `useDismiss` as an `insideSelector` since the panel isn't `contains()`-reachable from the menu's content ref. */ export declare const MENU_BRANCH_ATTRIBUTE = "data-skdx-menu-branch"; /** Props for a menu submenu root ({@link MenuSub}). */ export interface MenuSubProps { /** * The `SubTrigger` and `SubContent` parts of this submenu. * @default undefined — renders nothing if omitted. */ children?: React.ReactNode | undefined; /** * Whether the submenu is open, for controlled usage. Pair with `onOpenChange`. * @default undefined — uncontrolled, tracks its own open state internally. */ open?: boolean | undefined; /** * Whether the submenu is initially open, for uncontrolled usage. * @default false */ defaultOpen?: boolean | undefined; /** * Fires with the new open state whenever the submenu opens or closes, controlled or not. * @default undefined — no-op if omitted. */ onOpenChange?: ((open: boolean) => void) | undefined; /** * Fires with the new open state once the change has finished on screen, after the exit/enter animation ends or immediately if none; use for work that must not race the transition. * @default undefined — no-op if omitted. */ onOpenChangeComplete?: ((open: boolean) => void) | undefined; } /** Props for a menu submenu trigger ({@link MenuSubTrigger}). */ export interface MenuSubTriggerProps extends PrimitivePropsWithRef<'div'> { /** * Marks the trigger aria-disabled and blocks it from opening the submenu. It stays in the roving order and remains focusable, so a keyboard user still discovers it. * @default false */ disabled?: boolean | undefined; /** * Text typeahead matches this trigger by instead of its rendered text, reflected to `data-text-value`. * @default undefined — the trigger's rendered text is used. */ textValue?: string | undefined; } /** Props for a menu submenu panel ({@link MenuSubContent}), extending the shared popper positioning props (`side`, `align`, `sideOffset`, `alignOffset`, `avoidCollisions`, `collisionPadding`). */ export interface MenuSubContentProps extends PopperContentProps { /** * Keep this panel mounted even while the submenu is closed, for an animation library that needs the outgoing panel present during an exit transition. * @default false */ forceMount?: boolean | undefined; /** * Whether Up/Down arrow-key navigation wraps from the last item back to * the first (and vice versa). * @default true */ loop?: boolean | undefined; /** * Size rung the skin scales the panel by, mirrored to `data-size`. * @default undefined — the skin's own default size. */ size?: 'sm' | 'lg' | (string & {}) | undefined; } /** @internal Root of a nested submenu, owning open state and the hover grace timer and providing a popper anchor context for `MenuSubContent`; `family` is supplied by the wrapping family component, not a public prop. */ export declare function MenuSub({ family, children, open: openProp, defaultOpen, onOpenChange, onOpenChangeComplete, }: MenuSubProps & { family: string; }): React.JSX.Element; export declare namespace MenuSub { var displayName: string; } /** @internal Parent-menu item that opens a submenu (`role="menuitem"`, `aria-haspopup="menu"`), doubling as the popper anchor; opens on click, Enter, Space, ArrowRight (or ArrowLeft under RTL), and hover. */ export declare const MenuSubTrigger: { ({ disabled, textValue, ref: forwardedRef, ...props }: MenuSubTriggerProps): React.ReactNode; displayName: string; }; /** @internal Submenu's floating panel (`role="menu"`), positioned against its `MenuSubTrigger` with logical `side="end"`/`align="start"` defaults; owns vertical roving focus and typeahead, closing on ArrowLeft (or ArrowRight under RTL) or Escape. */ export declare const MenuSubContent: { ({ forceMount, loop, side, align, sideOffset, ref: forwardedRef, size, ...props }: MenuSubContentProps): React.ReactNode; displayName: string; };