feat(dees-appui-mainmenu): add status badges to main menu items with theme-aware styling
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-12-29 - 3.9.0 - feat(dees-appui-mainmenu)
|
||||||
|
add status badges to main menu items with theme-aware styling
|
||||||
|
|
||||||
|
- Introduce .badge element and layout (min-width, height, padding, font-size, weight, border-radius) to display counts/status on menu items.
|
||||||
|
- Add four badge variants: default, success, warning, error, using cssManager.bdTheme for light/dark color pairs.
|
||||||
|
- Render the badge element conditionally in the menu item template when tabArg.badge is provided; hide badges when host has [collapsed] attribute.
|
||||||
|
|
||||||
## 2025-12-29 - 3.8.0 - feat(dees-appui-base)
|
## 2025-12-29 - 3.8.0 - feat(dees-appui-base)
|
||||||
add interactive demo controls to manipulate appui via view activation context
|
add interactive demo controls to manipulate appui via view activation context
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '3.8.0',
|
version: '3.9.0',
|
||||||
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,6 +336,44 @@ export class DeesAppuiMainmenu extends DeesElement {
|
|||||||
transition-delay: 1s;
|
transition-delay: 1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Badge styles */
|
||||||
|
.badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
padding: 0 6px;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: 9px;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.default {
|
||||||
|
background: ${cssManager.bdTheme('#f4f4f5', '#27272a')};
|
||||||
|
color: ${cssManager.bdTheme('#3f3f46', '#a1a1aa')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.success {
|
||||||
|
background: ${cssManager.bdTheme('#dcfce7', '#14532d')};
|
||||||
|
color: ${cssManager.bdTheme('#166534', '#4ade80')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.warning {
|
||||||
|
background: ${cssManager.bdTheme('#fef3c7', '#451a03')};
|
||||||
|
color: ${cssManager.bdTheme('#92400e', '#fbbf24')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.error {
|
||||||
|
background: ${cssManager.bdTheme('#fee2e2', '#450a0a')};
|
||||||
|
color: ${cssManager.bdTheme('#991b1b', '#f87171')};
|
||||||
|
}
|
||||||
|
|
||||||
|
:host([collapsed]) .badge {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* Bottom Section */
|
/* Bottom Section */
|
||||||
.bottomSection {
|
.bottomSection {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -420,6 +458,9 @@ export class DeesAppuiMainmenu extends DeesElement {
|
|||||||
>
|
>
|
||||||
<dees-icon .icon="${tabArg.iconName || ''}"></dees-icon>
|
<dees-icon .icon="${tabArg.iconName || ''}"></dees-icon>
|
||||||
<span class="tabLabel">${tabArg.key}</span>
|
<span class="tabLabel">${tabArg.key}</span>
|
||||||
|
${tabArg.badge !== undefined ? html`
|
||||||
|
<span class="badge ${tabArg.badgeVariant || 'default'}">${tabArg.badge}</span>
|
||||||
|
` : ''}
|
||||||
<span class="tab-tooltip">${tabArg.key}</span>
|
<span class="tab-tooltip">${tabArg.key}</span>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user