import React, { HTMLAttributes } from "react";
export interface ContextMenuItem {
id: string;
label: string;
icon?: React.ReactNode;
shortcut?: string;
disabled?: boolean;
destructive?: boolean;
separator?: boolean;
children?: ContextMenuItem[];
action?: () => void;
onClick?: () => void;
}
export interface GlassContextMenuProps extends HTMLAttributes {
/**
* Menu items
*/
items?: ContextMenuItem[];
/**
* Children to trigger the context menu
*/
children: React.ReactNode;
/**
* Custom trigger element
*/
trigger?: React.ReactNode;
/**
* Whether menu is open
*/
open?: boolean;
/**
* Callback when open state changes
*/
onOpenChange?: (open: boolean) => void;
/**
* Menu alignment
*/
align?: "start" | "center" | "end";
/**
* Menu side
*/
side?: "top" | "right" | "bottom" | "left";
/**
* Custom className
*/
className?: string;
/**
* Additional className for menu content element
*/
menuClassName?: string;
/**
* Whether to respect motion preferences for animations
*/
respectMotionPreference?: boolean;
positionStrategy?: "fixed" | "absolute" | "contained";
contained?: boolean;
}
export interface GlassContextMenuContentProps {
/**
* Menu items
*/
items: ContextMenuItem[];
/**
* Position of the menu
*/
position: {
x: number;
y: number;
};
/**
* Callback to close menu
*/
onClose: () => void;
/**
* Maximum width
*/
maxWidth?: string;
/**
* Custom className
*/
className?: string;
positionStrategy?: "fixed" | "absolute" | "contained";
}
export interface GlassContextMenuItemProps {
/**
* Menu item data
*/
item: ContextMenuItem;
/**
* Whether item is selected
*/
isSelected?: boolean;
/**
* Callback when item is clicked
*/
onClick: (item: ContextMenuItem) => void;
/**
* Callback to close menu
*/
onClose: () => void;
/**
* Whether this is a submenu
*/
isSubmenu?: boolean;
}
/**
* GlassContextMenu component
* A glassmorphism context menu that appears on right-click
*/
export declare const GlassContextMenu: React.FC;
/**
* GlassContextMenuContent component
* The actual menu content with positioning
*/
export declare const GlassContextMenuContent: React.FC;
/**
* GlassContextMenuItem component
* Individual menu item
*/
export declare const GlassContextMenuItem: React.FC;
/**
* Hook for creating context menu items
*/
export declare const useContextMenu: () => {
createItem: (id: string, label: string, action?: () => void, options?: Partial>) => ContextMenuItem;
createSeparator: () => ContextMenuItem;
};
//# sourceMappingURL=GlassContextMenu.d.ts.map