feat(dees-contextmenu): adjust menu item positioning for improved alignment fix(dees-appui-appbar.demo): add demo functionality for app bar with dynamic menu items and user interactions feat(interfaces): create IAppBarMenuItem interface for enhanced menu item configurations docs: add comprehensive improvement plan for dees-appui-appbar component
34 lines
815 B
TypeScript
34 lines
815 B
TypeScript
import * as plugins from '../00plugins.js';
|
|
|
|
/**
|
|
* Divider menu item
|
|
*/
|
|
export interface IAppBarMenuDivider {
|
|
divider: true;
|
|
}
|
|
|
|
/**
|
|
* Regular menu item
|
|
*/
|
|
export interface IAppBarMenuItemRegular extends plugins.tsclass.website.IMenuItem {
|
|
id?: string;
|
|
shortcut?: string; // e.g., "Cmd+S" or "Ctrl+S"
|
|
submenu?: IAppBarMenuItem[];
|
|
disabled?: boolean;
|
|
checked?: boolean; // For checkbox menu items
|
|
radioGroup?: string; // For radio button menu items
|
|
}
|
|
|
|
/**
|
|
* Extended menu item interface for app bar menus
|
|
* Can be either a regular menu item or a divider
|
|
*/
|
|
export type IAppBarMenuItem = IAppBarMenuItemRegular | IAppBarMenuDivider;
|
|
|
|
/**
|
|
* Interface for the menu bar configuration
|
|
*/
|
|
export interface IMenuBar {
|
|
menuItems: IAppBarMenuItem[];
|
|
onMenuSelect?: (item: IAppBarMenuItem) => void;
|
|
} |