feat(theme,interfaces): Introduce a global theming system and unify menu/tab interfaces; migrate components to use themeDefaultStyles and update APIs accordingly
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import type { TemplateResult } from '@design.estate/dees-element';
|
||||
import type { IAppBarMenuItem } from './appbarmenuitem.js';
|
||||
import type { ITab } from './tab.js';
|
||||
import type { ISecondaryMenuGroup } from './secondarymenu.js';
|
||||
import type { IMenuItem } from './tab.js';
|
||||
import type { IMenuGroup } from './menugroup.js';
|
||||
|
||||
// Forward declaration for circular reference
|
||||
@@ -15,22 +14,22 @@ export type TDeesAppuiBase = HTMLElement & {
|
||||
setWindowControlsVisible: (visible: boolean) => void;
|
||||
setMainMenu: (config: IMainMenuConfig) => void;
|
||||
updateMainMenuGroup: (groupName: string, update: Partial<IMenuGroup>) => void;
|
||||
addMainMenuItem: (groupName: string, tab: ITab) => void;
|
||||
addMainMenuItem: (groupName: string, tab: IMenuItem) => void;
|
||||
removeMainMenuItem: (groupName: string, tabKey: string) => void;
|
||||
setMainMenuSelection: (tabKey: string) => void;
|
||||
setMainMenuCollapsed: (collapsed: boolean) => void;
|
||||
setMainMenuBadge: (tabKey: string, badge: string | number) => void;
|
||||
clearMainMenuBadge: (tabKey: string) => void;
|
||||
setSecondaryMenu: (config: { heading?: string; groups: ISecondaryMenuGroup[] }) => void;
|
||||
updateSecondaryMenuGroup: (groupName: string, update: Partial<ISecondaryMenuGroup>) => void;
|
||||
addSecondaryMenuItem: (groupName: string, item: ISecondaryMenuGroup['items'][0]) => void;
|
||||
setSecondaryMenu: (config: { heading?: string; groups: IMenuGroup[] }) => void;
|
||||
updateSecondaryMenuGroup: (groupName: string, update: Partial<IMenuGroup>) => void;
|
||||
addSecondaryMenuItem: (groupName: string, item: IMenuGroup['items'][0]) => void;
|
||||
setSecondaryMenuSelection: (itemKey: string) => void;
|
||||
clearSecondaryMenu: () => void;
|
||||
setContentTabs: (tabs: ITab[]) => void;
|
||||
addContentTab: (tab: ITab) => void;
|
||||
setContentTabs: (tabs: IMenuItem[]) => void;
|
||||
addContentTab: (tab: IMenuItem) => void;
|
||||
removeContentTab: (tabKey: string) => void;
|
||||
selectContentTab: (tabKey: string) => void;
|
||||
getSelectedContentTab: () => ITab | undefined;
|
||||
getSelectedContentTab: () => IMenuItem | undefined;
|
||||
activityLog: IActivityLogAPI;
|
||||
navigateToView: (viewId: string, params?: Record<string, string>) => Promise<boolean>;
|
||||
getCurrentView: () => IViewDefinition | undefined;
|
||||
@@ -132,9 +131,9 @@ export interface IViewDefinition {
|
||||
| (() => TemplateResult)
|
||||
| (() => Promise<string | (new () => HTMLElement) | (() => TemplateResult)>);
|
||||
/** Secondary menu items specific to this view */
|
||||
secondaryMenu?: ISecondaryMenuGroup[];
|
||||
secondaryMenu?: IMenuGroup[];
|
||||
/** Content tabs specific to this view */
|
||||
contentTabs?: ITab[];
|
||||
contentTabs?: IMenuItem[];
|
||||
/** Optional route path (defaults to id). Supports params like 'settings/:section' */
|
||||
route?: string;
|
||||
/** Badge to show on menu item */
|
||||
@@ -169,7 +168,7 @@ export interface IMainMenuConfig {
|
||||
/** Bottom pinned items (view IDs or tabs) */
|
||||
bottomItems?: string[];
|
||||
/** Bottom tabs */
|
||||
bottomTabs?: ITab[];
|
||||
bottomTabs?: IMenuItem[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user