UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

53 lines (52 loc) 2.76 kB
import { MegaMenuProps } from './MegaMenu'; export declare const useMegaMenu: ({ initialOpen, isOpen: controlledOpen, onOpenChange: setControlledOpen, }?: MegaMenuProps) => { placement: import('@floating-ui/utils').Placement; strategy: import('@floating-ui/utils').Strategy; middlewareData: import('@floating-ui/core').MiddlewareData; x: number; y: number; isPositioned: boolean; update: () => void; floatingStyles: React.CSSProperties; refs: { reference: import('react').MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>; floating: React.MutableRefObject<HTMLElement | null>; setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void; setFloating: (node: HTMLElement | null) => void; } & import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>; elements: { reference: import('@floating-ui/react-dom').ReferenceType | null; floating: HTMLElement | null; } & import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>; context: { x: number; y: number; placement: import('@floating-ui/utils').Placement; strategy: import('@floating-ui/utils').Strategy; middlewareData: import('@floating-ui/core').MiddlewareData; isPositioned: boolean; update: () => void; floatingStyles: React.CSSProperties; open: boolean; onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void; events: import('@floating-ui/react').FloatingEvents; dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>; nodeId: string | undefined; floatingId: string | undefined; refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>; elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>; }; getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>; getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>; getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & { active?: boolean; selected?: boolean; }) => Record<string, unknown>; open: boolean; setOpen: (isOpen: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void; }; export declare const validateMegaMenuAnchor: (children: React.ReactNode) => void; export declare const validateMegaMenuChildren: ({ hasContent, hasAnchor, }: { hasContent: boolean; hasAnchor: boolean; }) => void;