UNPKG

@unicity/design-system

Version:

A comprehensive React component library built on Material-UI with advanced theming capabilities including neumorphism design support

122 lines 2.62 kB
import React from 'react'; import { MenuProps as MuiMenuProps } from '@mui/material'; export interface MenuItemData { /** * Unique identifier for the menu item */ id: string; /** * Display label */ label?: string; /** * Optional icon */ icon?: React.ReactNode; /** * Optional secondary text */ secondary?: string; /** * Whether the item is disabled */ disabled?: boolean; /** * Whether this is a divider */ divider?: boolean; /** * Click handler */ onClick?: () => void; /** * Color variant for the item */ color?: 'default' | 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success'; /** * Submenu items */ submenu?: MenuItemData[]; } export interface MenuProps extends Omit<MuiMenuProps, 'children' | 'variant'> { /** * Menu items data */ items: MenuItemData[]; /** * Whether the menu is open */ open: boolean; /** * Anchor element for positioning */ anchorEl?: null | HTMLElement; /** * Callback fired when menu should close */ onClose: () => void; /** * Menu variant */ variant?: 'dropdown' | 'context'; /** * Animation type */ animation?: 'fade' | 'grow'; /** * Whether to show icons column even when some items don't have icons */ showIconsColumn?: boolean; /** * Maximum height before scrolling */ maxHeight?: number; } export interface ContextMenuProps { /** * Menu items data */ items: MenuItemData[]; /** * Children that trigger the context menu */ children: React.ReactNode; /** * Whether context menu is disabled */ disabled?: boolean; /** * Animation type */ animation?: 'fade' | 'grow'; } export interface MenuButtonProps { /** * Menu items data */ items: MenuItemData[]; /** * Trigger button content (defaults to MoreVert icon) */ children?: React.ReactNode; /** * Button variant */ variant?: 'icon' | 'text' | 'contained' | 'outlined'; /** * Button size */ size?: 'small' | 'medium' | 'large'; /** * Whether button is disabled */ disabled?: boolean; /** * Custom button props */ buttonProps?: any; } export declare const Menu: React.FC<MenuProps>; export declare const ContextMenu: React.FC<ContextMenuProps>; export declare const MenuButton: React.FC<MenuButtonProps>; //# sourceMappingURL=Menu.d.ts.map