@masterteam/components 0.0.221 → 0.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-sidebar.mjs +24 -5
- package/fesm2022/masterteam-components-sidebar.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-sidebar.d.ts +5 -0
|
@@ -76,9 +76,9 @@ class Sidebar {
|
|
|
76
76
|
/** A parent is "active" when the current route matches it or any child. */
|
|
77
77
|
isSectionActive(item) {
|
|
78
78
|
const url = this.currentUrl().split('?')[0];
|
|
79
|
-
if (this.linkMatches(item.routerLink, url, true))
|
|
79
|
+
if (this.linkMatches(item.routerLink ?? item.href, url, true))
|
|
80
80
|
return true;
|
|
81
|
-
return !!item.children?.some((child) => this.linkMatches(child.routerLink, url));
|
|
81
|
+
return !!item.children?.some((child) => this.linkMatches(child.routerLink ?? child.href, url));
|
|
82
82
|
}
|
|
83
83
|
linkMatches(link, url, exact = false) {
|
|
84
84
|
const path = this.toPath(link);
|
|
@@ -89,9 +89,23 @@ class Sidebar {
|
|
|
89
89
|
toPath(link) {
|
|
90
90
|
if (!link)
|
|
91
91
|
return '';
|
|
92
|
+
if (typeof link === 'string' && /^[a-z][a-z0-9+.-]*:/i.test(link)) {
|
|
93
|
+
try {
|
|
94
|
+
const parsed = new URL(link);
|
|
95
|
+
return parsed.pathname || '/';
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return '';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
92
101
|
const parts = Array.isArray(link) ? link : [link];
|
|
93
102
|
return ('/' + parts.map((p) => String(p)).join('/')).replace(/\/{2,}/g, '/');
|
|
94
103
|
}
|
|
104
|
+
resolvedRel(item) {
|
|
105
|
+
if (item.rel)
|
|
106
|
+
return item.rel;
|
|
107
|
+
return item.target === '_blank' ? 'noopener noreferrer' : null;
|
|
108
|
+
}
|
|
95
109
|
// ============================================================================
|
|
96
110
|
// Collapsed mode — flyout panel
|
|
97
111
|
// ============================================================================
|
|
@@ -110,7 +124,12 @@ class Sidebar {
|
|
|
110
124
|
}
|
|
111
125
|
const maxHeight = Math.max(FLYOUT_MIN_HEIGHT, viewportHeight - top - FLYOUT_MARGIN);
|
|
112
126
|
this.flyout.set(this.isRtl()
|
|
113
|
-
? {
|
|
127
|
+
? {
|
|
128
|
+
item,
|
|
129
|
+
top,
|
|
130
|
+
right: window.innerWidth - rect.left + FLYOUT_GAP,
|
|
131
|
+
maxHeight,
|
|
132
|
+
}
|
|
114
133
|
: { item, top, left: rect.right + FLYOUT_GAP, maxHeight });
|
|
115
134
|
}
|
|
116
135
|
/** Keep the panel open while the pointer travels into it. */
|
|
@@ -132,11 +151,11 @@ class Sidebar {
|
|
|
132
151
|
this.closeFlyout();
|
|
133
152
|
}
|
|
134
153
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Sidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
135
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Sidebar, isStandalone: true, selector: "mt-sidebar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoLink: { classPropertyName: "logoLink", publicName: "logoLink", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, bgImage: { classPropertyName: "bgImage", publicName: "bgImage", isSignal: true, isRequired: false, transformFunction: null }, bgRepeat: { classPropertyName: "bgRepeat", publicName: "bgRepeat", isSignal: true, isRequired: false, transformFunction: null }, iconsColor: { classPropertyName: "iconsColor", publicName: "iconsColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, host: { listeners: { "window:resize": "onViewportChange()" } }, ngImport: i0, template: "<div\r\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\r\n [style.width]=\"expanded() ? '18rem' : '4rem'\"\r\n>\r\n <div\r\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n >\r\n <!-- Toggle Button & Branding -->\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <button\r\n type=\"button\"\r\n size=\"large\"\r\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n (click)=\"toggleSidebar()\"\r\n >\r\n <mt-icon\r\n icon=\"general.menu-01\"\r\n class=\"text-lg transition-transform duration-400 ease-in-out\"\r\n [class.rotate-180]=\"expanded()\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </button>\r\n\r\n @if (logo() || title()) {\r\n <div\r\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!expanded()\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.sidebar.logoAlt' | transloco\"\r\n class=\"h-8 shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div\r\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n ></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div\r\n class=\"flex flex-col gap-0.5 min-w-0\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\r\n @if (subTitle()) {\r\n <span class=\"text-xs opacity-70 truncate\">{{\r\n subTitle()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\r\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\r\n [class.pr-1]=\"expanded()\"\r\n [class.pr-px]=\"!expanded()\"\r\n (scroll)=\"closeFlyout()\"\r\n >\r\n @for (item of items(); track item.id) {\r\n <!-- ============ Submenu parent (has children) ============ -->\r\n @if (hasChildren(item)) {\r\n @if (expanded()) {\r\n <!-- Expanded: inline accordion -->\r\n <div class=\"flex flex-col\">\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"flex-1 truncate whitespace-nowrap text-sm font-medium\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"me-2 grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded hover:bg-surface-300/60 dark:hover:bg-surface-700/60 transition-colors\"\r\n [attr.aria-expanded]=\"isGroupOpen(item)\"\r\n (click)=\"toggleGroup(item, $event)\"\r\n >\r\n <mt-icon\r\n icon=\"arrow.chevron-down\"\r\n class=\"text-xs transition-transform duration-300 ease-in-out\"\r\n [class.rotate-180]=\"isGroupOpen(item)\"\r\n [style.--mt-icon-prev-width]=\"'14px'\"\r\n [style.--mt-icon-prev-height]=\"'14px'\"\r\n />\r\n </button>\r\n </a>\r\n\r\n <div\r\n class=\"grid transition-[grid-template-rows] duration-300 ease-in-out\"\r\n [style.gridTemplateRows]=\"isGroupOpen(item) ? '1fr' : '0fr'\"\r\n >\r\n <div class=\"overflow-hidden\">\r\n <div class=\"flex flex-col gap-0.5 py-1\">\r\n @if (item.loading && !item.children?.length) {\r\n <div\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 text-sm opacity-70\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\r\n <span class=\"truncate\">{{\r\n 'components.sidebar.loading' | transloco\r\n }}</span>\r\n </div>\r\n }\r\n @for (child of item.children ?? []; track child.id) {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #crla=\"routerLinkActive\"\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n mtTooltip=\"{{ child.title }}\"\r\n [style.color]=\"\r\n crla.isActive ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate text-sm\">{{ child.title }}</span>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Collapsed: icon trigger + hover/focus flyout -->\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n (mouseenter)=\"openFlyout(item, $event)\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n (focus)=\"openFlyout(item, $event)\"\r\n (blur)=\"scheduleFlyoutClose()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n </a>\r\n }\r\n } @else {\r\n <!-- ============ Leaf item ============ -->\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #rla=\"routerLinkActive\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"rla.isActive ? 'var(--p-primary-500)' : iconsColor()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- ============ Collapsed-mode flyout panel ============ -->\r\n@if (flyout(); as fly) {\r\n <div\r\n class=\"mt-sidebar-flyout flex w-60 flex-col overflow-hidden rounded-xl border border-surface-300 bg-surface-0 shadow-2xl dark:border-surface-700 dark:bg-surface-800\"\r\n [style.top.px]=\"fly.top\"\r\n [style.left.px]=\"fly.left\"\r\n [style.right.px]=\"fly.right\"\r\n (mouseenter)=\"cancelFlyoutClose()\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n >\r\n <div\r\n class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-2.5 dark:border-surface-700\"\r\n >\r\n @if (fly.item.icon) {\r\n <mt-icon\r\n [icon]=\"fly.item.icon\"\r\n class=\"text-primary-500 shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'18px'\"\r\n [style.--mt-icon-prev-height]=\"'18px'\"\r\n />\r\n }\r\n <span class=\"truncate text-sm font-semibold\">{{ fly.item.title }}</span>\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex flex-col gap-0.5 overflow-y-auto p-1.5\"\r\n [style.maxHeight.px]=\"fly.maxHeight\"\r\n >\r\n @if (fly.item.loading && !fly.item.children?.length) {\r\n <div\r\n class=\"flex items-center gap-2 px-3 py-2 text-sm text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\r\n <span>{{ 'components.sidebar.loading' | transloco }}</span>\r\n </div>\r\n } @else if (!fly.item.children?.length) {\r\n <div class=\"px-3 py-2 text-sm text-muted-color\">\r\n {{ 'components.sidebar.empty' | transloco }}\r\n </div>\r\n }\r\n @for (child of fly.item.children ?? []; track child.id) {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 text-(--p-primary-500) dark:bg-primary-900\"\r\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\r\n (click)=\"closeFlyout()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate\">{{ child.title }}</span>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [":host{display:block;height:100%;min-height:0}.mt-sidebar-menu{scrollbar-width:thin;scrollbar-color:var(--p-surface-400) transparent}.mt-sidebar-menu::-webkit-scrollbar{width:6px}.mt-sidebar-menu::-webkit-scrollbar-track{background:transparent}.mt-sidebar-menu::-webkit-scrollbar-thumb{border-radius:9999px;background:color-mix(in srgb,var(--p-surface-500) 58%,transparent)}.mt-sidebar-menu::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--p-surface-600) 72%,transparent)}.mt-sidebar-menu-collapsed{scrollbar-color:var(--p-surface-500) transparent}.mt-sidebar-menu-collapsed::-webkit-scrollbar{width:2px}.mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--p-surface-600) 82%,transparent)}.mt-sidebar-flyout{position:fixed;z-index:1200;animation:mt-sidebar-flyout-in .14s ease-out}@keyframes mt-sidebar-flyout-in{0%{opacity:0;transform:translateY(2px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.mt-sidebar-flyout{animation:none}}\n"], dependencies: [{ kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
154
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Sidebar, isStandalone: true, selector: "mt-sidebar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoLink: { classPropertyName: "logoLink", publicName: "logoLink", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, bgImage: { classPropertyName: "bgImage", publicName: "bgImage", isSignal: true, isRequired: false, transformFunction: null }, bgRepeat: { classPropertyName: "bgRepeat", publicName: "bgRepeat", isSignal: true, isRequired: false, transformFunction: null }, iconsColor: { classPropertyName: "iconsColor", publicName: "iconsColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, host: { listeners: { "window:resize": "onViewportChange()" } }, ngImport: i0, template: "<div\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\n [style.width]=\"expanded() ? '18rem' : '4rem'\"\n>\n <div\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\n [style.backgroundColor]=\"bgColor()\"\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\n [class.bg-no-repeat]=\"!bgRepeat()\"\n [class.bg-repeat]=\"bgRepeat()\"\n >\n <!-- Toggle Button & Branding -->\n <div class=\"flex shrink-0 items-center gap-2\">\n <button\n type=\"button\"\n size=\"large\"\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\n [style.color]=\"iconsColor()\"\n (click)=\"toggleSidebar()\"\n >\n <mt-icon\n icon=\"general.menu-01\"\n class=\"text-lg transition-transform duration-400 ease-in-out\"\n [class.rotate-180]=\"expanded()\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </button>\n\n @if (logo() || title()) {\n <div\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\n [class.max-w-0]=\"!expanded()\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n @if (logo()) {\n <img\n [src]=\"logo()\"\n [alt]=\"'components.sidebar.logoAlt' | transloco\"\n class=\"h-8 shrink-0\"\n [routerLink]=\"logoLink()\"\n [class.cursor-pointer]=\"logoLink()\"\n />\n }\n @if (logo() && (title() || subTitle())) {\n <div\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\n [style.color]=\"iconsColor()\"\n ></div>\n }\n @if (title() || subTitle()) {\n <div\n class=\"flex flex-col gap-0.5 min-w-0\"\n [style.color]=\"iconsColor()\"\n >\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\n @if (subTitle()) {\n <span class=\"text-xs opacity-70 truncate\">{{\n subTitle()\n }}</span>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <div\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\n [class.pr-1]=\"expanded()\"\n [class.pr-px]=\"!expanded()\"\n (scroll)=\"closeFlyout()\"\n >\n @for (item of items(); track item.id) {\n <!-- ============ Submenu parent (has children) ============ -->\n @if (hasChildren(item)) {\n @if (expanded()) {\n <!-- Expanded: inline accordion -->\n <div class=\"flex flex-col\">\n <a\n [routerLink]=\"item.routerLink\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"flex-1 truncate whitespace-nowrap text-sm font-medium\"\n >\n {{ item.title }}\n </div>\n <button\n type=\"button\"\n class=\"me-2 grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded hover:bg-surface-300/60 dark:hover:bg-surface-700/60 transition-colors\"\n [attr.aria-expanded]=\"isGroupOpen(item)\"\n (click)=\"toggleGroup(item, $event)\"\n >\n <mt-icon\n icon=\"arrow.chevron-down\"\n class=\"text-xs transition-transform duration-300 ease-in-out\"\n [class.rotate-180]=\"isGroupOpen(item)\"\n [style.--mt-icon-prev-width]=\"'14px'\"\n [style.--mt-icon-prev-height]=\"'14px'\"\n />\n </button>\n </a>\n\n <div\n class=\"grid transition-[grid-template-rows] duration-300 ease-in-out\"\n [style.gridTemplateRows]=\"isGroupOpen(item) ? '1fr' : '0fr'\"\n >\n <div class=\"overflow-hidden\">\n <div class=\"flex flex-col gap-0.5 py-1\">\n @if (item.loading && !item.children?.length) {\n <div\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 text-sm opacity-70\"\n [style.color]=\"iconsColor()\"\n >\n <mt-icon\n icon=\"general.loading-01\"\n class=\"animate-spin\"\n />\n <span class=\"truncate\">{{\n \"components.sidebar.loading\" | transloco\n }}</span>\n </div>\n }\n @for (child of item.children ?? []; track child.id) {\n <a\n [routerLink]=\"child.routerLink\"\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\n #crla=\"routerLinkActive\"\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\n mtTooltip=\"{{ child.title }}\"\n [style.color]=\"\n crla.isActive ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n @if (child.icon) {\n <mt-icon\n [icon]=\"child.icon\"\n class=\"shrink-0 opacity-80\"\n [style.--mt-icon-prev-width]=\"'16px'\"\n [style.--mt-icon-prev-height]=\"'16px'\"\n />\n } @else {\n <span\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\n ></span>\n }\n <span class=\"truncate text-sm\">{{ child.title }}</span>\n </a>\n }\n </div>\n </div>\n </div>\n </div>\n } @else {\n <!-- Collapsed: icon trigger + hover/focus flyout -->\n <a\n [routerLink]=\"item.routerLink\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n (mouseenter)=\"openFlyout(item, $event)\"\n (mouseleave)=\"scheduleFlyoutClose()\"\n (focus)=\"openFlyout(item, $event)\"\n (blur)=\"scheduleFlyoutClose()\"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n </a>\n }\n } @else {\n <!-- ============ Leaf item ============ -->\n @if (item.href) {\n <a\n [attr.href]=\"item.href\"\n [attr.target]=\"item.target ?? null\"\n [attr.rel]=\"resolvedRel(item)\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n mtTooltip=\"{{ item.title }}\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n {{ item.title }}\n </div>\n </a>\n } @else {\n <a\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\n #rla=\"routerLinkActive\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n mtTooltip=\"{{ item.title }}\"\n [style.color]=\"\n rla.isActive ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n {{ item.title }}\n </div>\n </a>\n }\n }\n }\n </div>\n </div>\n</div>\n\n<!-- ============ Collapsed-mode flyout panel ============ -->\n@if (flyout(); as fly) {\n <div\n class=\"mt-sidebar-flyout flex w-60 flex-col overflow-hidden rounded-xl border border-surface-300 bg-surface-0 shadow-2xl dark:border-surface-700 dark:bg-surface-800\"\n [style.top.px]=\"fly.top\"\n [style.left.px]=\"fly.left\"\n [style.right.px]=\"fly.right\"\n (mouseenter)=\"cancelFlyoutClose()\"\n (mouseleave)=\"scheduleFlyoutClose()\"\n >\n <div\n class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-2.5 dark:border-surface-700\"\n >\n @if (fly.item.icon) {\n <mt-icon\n [icon]=\"fly.item.icon\"\n class=\"text-primary-500 shrink-0\"\n [style.--mt-icon-prev-width]=\"'18px'\"\n [style.--mt-icon-prev-height]=\"'18px'\"\n />\n }\n <span class=\"truncate text-sm font-semibold\">{{ fly.item.title }}</span>\n </div>\n\n <div\n class=\"mt-sidebar-menu flex flex-col gap-0.5 overflow-y-auto p-1.5\"\n [style.maxHeight.px]=\"fly.maxHeight\"\n >\n @if (fly.item.loading && !fly.item.children?.length) {\n <div class=\"flex items-center gap-2 px-3 py-2 text-sm text-muted-color\">\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\n <span>{{ \"components.sidebar.loading\" | transloco }}</span>\n </div>\n } @else if (!fly.item.children?.length) {\n <div class=\"px-3 py-2 text-sm text-muted-color\">\n {{ \"components.sidebar.empty\" | transloco }}\n </div>\n }\n @for (child of fly.item.children ?? []; track child.id) {\n <a\n [routerLink]=\"child.routerLink\"\n routerLinkActive=\"bg-primary-50 text-(--p-primary-500) dark:bg-primary-900\"\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\n (click)=\"closeFlyout()\"\n >\n @if (child.icon) {\n <mt-icon\n [icon]=\"child.icon\"\n class=\"shrink-0 opacity-80\"\n [style.--mt-icon-prev-width]=\"'16px'\"\n [style.--mt-icon-prev-height]=\"'16px'\"\n />\n } @else {\n <span\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\n ></span>\n }\n <span class=\"truncate\">{{ child.title }}</span>\n </a>\n }\n </div>\n </div>\n}\n", styles: [":host{display:block;height:100%;min-height:0}.mt-sidebar-menu{scrollbar-width:thin;scrollbar-color:var(--p-surface-400) transparent}.mt-sidebar-menu::-webkit-scrollbar{width:6px}.mt-sidebar-menu::-webkit-scrollbar-track{background:transparent}.mt-sidebar-menu::-webkit-scrollbar-thumb{border-radius:9999px;background:color-mix(in srgb,var(--p-surface-500) 58%,transparent)}.mt-sidebar-menu::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--p-surface-600) 72%,transparent)}.mt-sidebar-menu-collapsed{scrollbar-color:var(--p-surface-500) transparent}.mt-sidebar-menu-collapsed::-webkit-scrollbar{width:2px}.mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--p-surface-600) 82%,transparent)}.mt-sidebar-flyout{position:fixed;z-index:1200;animation:mt-sidebar-flyout-in .14s ease-out}@keyframes mt-sidebar-flyout-in{0%{opacity:0;transform:translateY(2px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.mt-sidebar-flyout{animation:none}}\n"], dependencies: [{ kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
136
155
|
}
|
|
137
156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Sidebar, decorators: [{
|
|
138
157
|
type: Component,
|
|
139
|
-
args: [{ selector: 'mt-sidebar', standalone: true, imports: [RouterLinkActive, RouterLink, Icon, Tooltip, TranslocoPipe], template: "<div\r\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\r\n [style.width]=\"expanded() ? '18rem' : '4rem'\"\r\n>\r\n <div\r\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n >\r\n <!-- Toggle Button & Branding -->\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <button\r\n type=\"button\"\r\n size=\"large\"\r\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n (click)=\"toggleSidebar()\"\r\n >\r\n <mt-icon\r\n icon=\"general.menu-01\"\r\n class=\"text-lg transition-transform duration-400 ease-in-out\"\r\n [class.rotate-180]=\"expanded()\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </button>\r\n\r\n @if (logo() || title()) {\r\n <div\r\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!expanded()\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.sidebar.logoAlt' | transloco\"\r\n class=\"h-8 shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div\r\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n ></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div\r\n class=\"flex flex-col gap-0.5 min-w-0\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\r\n @if (subTitle()) {\r\n <span class=\"text-xs opacity-70 truncate\">{{\r\n subTitle()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\r\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\r\n [class.pr-1]=\"expanded()\"\r\n [class.pr-px]=\"!expanded()\"\r\n (scroll)=\"closeFlyout()\"\r\n >\r\n @for (item of items(); track item.id) {\r\n <!-- ============ Submenu parent (has children) ============ -->\r\n @if (hasChildren(item)) {\r\n @if (expanded()) {\r\n <!-- Expanded: inline accordion -->\r\n <div class=\"flex flex-col\">\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"flex-1 truncate whitespace-nowrap text-sm font-medium\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"me-2 grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded hover:bg-surface-300/60 dark:hover:bg-surface-700/60 transition-colors\"\r\n [attr.aria-expanded]=\"isGroupOpen(item)\"\r\n (click)=\"toggleGroup(item, $event)\"\r\n >\r\n <mt-icon\r\n icon=\"arrow.chevron-down\"\r\n class=\"text-xs transition-transform duration-300 ease-in-out\"\r\n [class.rotate-180]=\"isGroupOpen(item)\"\r\n [style.--mt-icon-prev-width]=\"'14px'\"\r\n [style.--mt-icon-prev-height]=\"'14px'\"\r\n />\r\n </button>\r\n </a>\r\n\r\n <div\r\n class=\"grid transition-[grid-template-rows] duration-300 ease-in-out\"\r\n [style.gridTemplateRows]=\"isGroupOpen(item) ? '1fr' : '0fr'\"\r\n >\r\n <div class=\"overflow-hidden\">\r\n <div class=\"flex flex-col gap-0.5 py-1\">\r\n @if (item.loading && !item.children?.length) {\r\n <div\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 text-sm opacity-70\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\r\n <span class=\"truncate\">{{\r\n 'components.sidebar.loading' | transloco\r\n }}</span>\r\n </div>\r\n }\r\n @for (child of item.children ?? []; track child.id) {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #crla=\"routerLinkActive\"\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n mtTooltip=\"{{ child.title }}\"\r\n [style.color]=\"\r\n crla.isActive ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate text-sm\">{{ child.title }}</span>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Collapsed: icon trigger + hover/focus flyout -->\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n (mouseenter)=\"openFlyout(item, $event)\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n (focus)=\"openFlyout(item, $event)\"\r\n (blur)=\"scheduleFlyoutClose()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n </a>\r\n }\r\n } @else {\r\n <!-- ============ Leaf item ============ -->\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #rla=\"routerLinkActive\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"rla.isActive ? 'var(--p-primary-500)' : iconsColor()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- ============ Collapsed-mode flyout panel ============ -->\r\n@if (flyout(); as fly) {\r\n <div\r\n class=\"mt-sidebar-flyout flex w-60 flex-col overflow-hidden rounded-xl border border-surface-300 bg-surface-0 shadow-2xl dark:border-surface-700 dark:bg-surface-800\"\r\n [style.top.px]=\"fly.top\"\r\n [style.left.px]=\"fly.left\"\r\n [style.right.px]=\"fly.right\"\r\n (mouseenter)=\"cancelFlyoutClose()\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n >\r\n <div\r\n class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-2.5 dark:border-surface-700\"\r\n >\r\n @if (fly.item.icon) {\r\n <mt-icon\r\n [icon]=\"fly.item.icon\"\r\n class=\"text-primary-500 shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'18px'\"\r\n [style.--mt-icon-prev-height]=\"'18px'\"\r\n />\r\n }\r\n <span class=\"truncate text-sm font-semibold\">{{ fly.item.title }}</span>\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex flex-col gap-0.5 overflow-y-auto p-1.5\"\r\n [style.maxHeight.px]=\"fly.maxHeight\"\r\n >\r\n @if (fly.item.loading && !fly.item.children?.length) {\r\n <div\r\n class=\"flex items-center gap-2 px-3 py-2 text-sm text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\r\n <span>{{ 'components.sidebar.loading' | transloco }}</span>\r\n </div>\r\n } @else if (!fly.item.children?.length) {\r\n <div class=\"px-3 py-2 text-sm text-muted-color\">\r\n {{ 'components.sidebar.empty' | transloco }}\r\n </div>\r\n }\r\n @for (child of fly.item.children ?? []; track child.id) {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 text-(--p-primary-500) dark:bg-primary-900\"\r\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\r\n (click)=\"closeFlyout()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate\">{{ child.title }}</span>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [":host{display:block;height:100%;min-height:0}.mt-sidebar-menu{scrollbar-width:thin;scrollbar-color:var(--p-surface-400) transparent}.mt-sidebar-menu::-webkit-scrollbar{width:6px}.mt-sidebar-menu::-webkit-scrollbar-track{background:transparent}.mt-sidebar-menu::-webkit-scrollbar-thumb{border-radius:9999px;background:color-mix(in srgb,var(--p-surface-500) 58%,transparent)}.mt-sidebar-menu::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--p-surface-600) 72%,transparent)}.mt-sidebar-menu-collapsed{scrollbar-color:var(--p-surface-500) transparent}.mt-sidebar-menu-collapsed::-webkit-scrollbar{width:2px}.mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--p-surface-600) 82%,transparent)}.mt-sidebar-flyout{position:fixed;z-index:1200;animation:mt-sidebar-flyout-in .14s ease-out}@keyframes mt-sidebar-flyout-in{0%{opacity:0;transform:translateY(2px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.mt-sidebar-flyout{animation:none}}\n"] }]
|
|
158
|
+
args: [{ selector: 'mt-sidebar', standalone: true, imports: [RouterLinkActive, RouterLink, Icon, Tooltip, TranslocoPipe], template: "<div\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\n [style.width]=\"expanded() ? '18rem' : '4rem'\"\n>\n <div\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\n [style.backgroundColor]=\"bgColor()\"\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\n [class.bg-no-repeat]=\"!bgRepeat()\"\n [class.bg-repeat]=\"bgRepeat()\"\n >\n <!-- Toggle Button & Branding -->\n <div class=\"flex shrink-0 items-center gap-2\">\n <button\n type=\"button\"\n size=\"large\"\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\n [style.color]=\"iconsColor()\"\n (click)=\"toggleSidebar()\"\n >\n <mt-icon\n icon=\"general.menu-01\"\n class=\"text-lg transition-transform duration-400 ease-in-out\"\n [class.rotate-180]=\"expanded()\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </button>\n\n @if (logo() || title()) {\n <div\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\n [class.max-w-0]=\"!expanded()\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n @if (logo()) {\n <img\n [src]=\"logo()\"\n [alt]=\"'components.sidebar.logoAlt' | transloco\"\n class=\"h-8 shrink-0\"\n [routerLink]=\"logoLink()\"\n [class.cursor-pointer]=\"logoLink()\"\n />\n }\n @if (logo() && (title() || subTitle())) {\n <div\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\n [style.color]=\"iconsColor()\"\n ></div>\n }\n @if (title() || subTitle()) {\n <div\n class=\"flex flex-col gap-0.5 min-w-0\"\n [style.color]=\"iconsColor()\"\n >\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\n @if (subTitle()) {\n <span class=\"text-xs opacity-70 truncate\">{{\n subTitle()\n }}</span>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <div\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\n [class.pr-1]=\"expanded()\"\n [class.pr-px]=\"!expanded()\"\n (scroll)=\"closeFlyout()\"\n >\n @for (item of items(); track item.id) {\n <!-- ============ Submenu parent (has children) ============ -->\n @if (hasChildren(item)) {\n @if (expanded()) {\n <!-- Expanded: inline accordion -->\n <div class=\"flex flex-col\">\n <a\n [routerLink]=\"item.routerLink\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"flex-1 truncate whitespace-nowrap text-sm font-medium\"\n >\n {{ item.title }}\n </div>\n <button\n type=\"button\"\n class=\"me-2 grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded hover:bg-surface-300/60 dark:hover:bg-surface-700/60 transition-colors\"\n [attr.aria-expanded]=\"isGroupOpen(item)\"\n (click)=\"toggleGroup(item, $event)\"\n >\n <mt-icon\n icon=\"arrow.chevron-down\"\n class=\"text-xs transition-transform duration-300 ease-in-out\"\n [class.rotate-180]=\"isGroupOpen(item)\"\n [style.--mt-icon-prev-width]=\"'14px'\"\n [style.--mt-icon-prev-height]=\"'14px'\"\n />\n </button>\n </a>\n\n <div\n class=\"grid transition-[grid-template-rows] duration-300 ease-in-out\"\n [style.gridTemplateRows]=\"isGroupOpen(item) ? '1fr' : '0fr'\"\n >\n <div class=\"overflow-hidden\">\n <div class=\"flex flex-col gap-0.5 py-1\">\n @if (item.loading && !item.children?.length) {\n <div\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 text-sm opacity-70\"\n [style.color]=\"iconsColor()\"\n >\n <mt-icon\n icon=\"general.loading-01\"\n class=\"animate-spin\"\n />\n <span class=\"truncate\">{{\n \"components.sidebar.loading\" | transloco\n }}</span>\n </div>\n }\n @for (child of item.children ?? []; track child.id) {\n <a\n [routerLink]=\"child.routerLink\"\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\n #crla=\"routerLinkActive\"\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\n mtTooltip=\"{{ child.title }}\"\n [style.color]=\"\n crla.isActive ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n @if (child.icon) {\n <mt-icon\n [icon]=\"child.icon\"\n class=\"shrink-0 opacity-80\"\n [style.--mt-icon-prev-width]=\"'16px'\"\n [style.--mt-icon-prev-height]=\"'16px'\"\n />\n } @else {\n <span\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\n ></span>\n }\n <span class=\"truncate text-sm\">{{ child.title }}</span>\n </a>\n }\n </div>\n </div>\n </div>\n </div>\n } @else {\n <!-- Collapsed: icon trigger + hover/focus flyout -->\n <a\n [routerLink]=\"item.routerLink\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n (mouseenter)=\"openFlyout(item, $event)\"\n (mouseleave)=\"scheduleFlyoutClose()\"\n (focus)=\"openFlyout(item, $event)\"\n (blur)=\"scheduleFlyoutClose()\"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n </a>\n }\n } @else {\n <!-- ============ Leaf item ============ -->\n @if (item.href) {\n <a\n [attr.href]=\"item.href\"\n [attr.target]=\"item.target ?? null\"\n [attr.rel]=\"resolvedRel(item)\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n mtTooltip=\"{{ item.title }}\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n {{ item.title }}\n </div>\n </a>\n } @else {\n <a\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\n #rla=\"routerLinkActive\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n mtTooltip=\"{{ item.title }}\"\n [style.color]=\"\n rla.isActive ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n {{ item.title }}\n </div>\n </a>\n }\n }\n }\n </div>\n </div>\n</div>\n\n<!-- ============ Collapsed-mode flyout panel ============ -->\n@if (flyout(); as fly) {\n <div\n class=\"mt-sidebar-flyout flex w-60 flex-col overflow-hidden rounded-xl border border-surface-300 bg-surface-0 shadow-2xl dark:border-surface-700 dark:bg-surface-800\"\n [style.top.px]=\"fly.top\"\n [style.left.px]=\"fly.left\"\n [style.right.px]=\"fly.right\"\n (mouseenter)=\"cancelFlyoutClose()\"\n (mouseleave)=\"scheduleFlyoutClose()\"\n >\n <div\n class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-2.5 dark:border-surface-700\"\n >\n @if (fly.item.icon) {\n <mt-icon\n [icon]=\"fly.item.icon\"\n class=\"text-primary-500 shrink-0\"\n [style.--mt-icon-prev-width]=\"'18px'\"\n [style.--mt-icon-prev-height]=\"'18px'\"\n />\n }\n <span class=\"truncate text-sm font-semibold\">{{ fly.item.title }}</span>\n </div>\n\n <div\n class=\"mt-sidebar-menu flex flex-col gap-0.5 overflow-y-auto p-1.5\"\n [style.maxHeight.px]=\"fly.maxHeight\"\n >\n @if (fly.item.loading && !fly.item.children?.length) {\n <div class=\"flex items-center gap-2 px-3 py-2 text-sm text-muted-color\">\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\n <span>{{ \"components.sidebar.loading\" | transloco }}</span>\n </div>\n } @else if (!fly.item.children?.length) {\n <div class=\"px-3 py-2 text-sm text-muted-color\">\n {{ \"components.sidebar.empty\" | transloco }}\n </div>\n }\n @for (child of fly.item.children ?? []; track child.id) {\n <a\n [routerLink]=\"child.routerLink\"\n routerLinkActive=\"bg-primary-50 text-(--p-primary-500) dark:bg-primary-900\"\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\n (click)=\"closeFlyout()\"\n >\n @if (child.icon) {\n <mt-icon\n [icon]=\"child.icon\"\n class=\"shrink-0 opacity-80\"\n [style.--mt-icon-prev-width]=\"'16px'\"\n [style.--mt-icon-prev-height]=\"'16px'\"\n />\n } @else {\n <span\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\n ></span>\n }\n <span class=\"truncate\">{{ child.title }}</span>\n </a>\n }\n </div>\n </div>\n}\n", styles: [":host{display:block;height:100%;min-height:0}.mt-sidebar-menu{scrollbar-width:thin;scrollbar-color:var(--p-surface-400) transparent}.mt-sidebar-menu::-webkit-scrollbar{width:6px}.mt-sidebar-menu::-webkit-scrollbar-track{background:transparent}.mt-sidebar-menu::-webkit-scrollbar-thumb{border-radius:9999px;background:color-mix(in srgb,var(--p-surface-500) 58%,transparent)}.mt-sidebar-menu::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--p-surface-600) 72%,transparent)}.mt-sidebar-menu-collapsed{scrollbar-color:var(--p-surface-500) transparent}.mt-sidebar-menu-collapsed::-webkit-scrollbar{width:2px}.mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--p-surface-600) 82%,transparent)}.mt-sidebar-flyout{position:fixed;z-index:1200;animation:mt-sidebar-flyout-in .14s ease-out}@keyframes mt-sidebar-flyout-in{0%{opacity:0;transform:translateY(2px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.mt-sidebar-flyout{animation:none}}\n"] }]
|
|
140
159
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: false }] }], logoLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoLink", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subTitle", required: false }] }], bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }], bgImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgImage", required: false }] }], bgRepeat: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgRepeat", required: false }] }], iconsColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconsColor", required: false }] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }], onViewportChange: [{
|
|
141
160
|
type: HostListener,
|
|
142
161
|
args: ['window:resize']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-sidebar.mjs","sources":["../../../../packages/masterteam/components/sidebar/sidebar.ts","../../../../packages/masterteam/components/sidebar/sidebar.html","../../../../packages/masterteam/components/sidebar/masterteam-components-sidebar.ts"],"sourcesContent":["import {\r\n booleanAttribute,\r\n Component,\r\n computed,\r\n HostListener,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { TranslocoPipe } from '@jsverse/transloco';\r\nimport { Icon, MTIcon } from '@masterteam/icons';\r\nimport { NavigationEnd, Router, RouterLink, RouterLinkActive } from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { filter } from 'rxjs';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { Tooltip } from '@masterteam/components/tooltip';\r\n\r\nexport interface SidebarItem {\r\n id: string | number;\r\n title: string;\r\n icon?: MTIcon;\r\n routerLink?: any[] | string;\r\n /**\r\n * Optional nested items. When present the entry becomes a submenu:\r\n * an inline accordion while the sidebar is expanded, and a hover/focus\r\n * flyout panel beside the icon while the sidebar is collapsed.\r\n */\r\n children?: SidebarItem[];\r\n /** Show a placeholder spinner row while the children load lazily. */\r\n loading?: boolean;\r\n}\r\n\r\n/** Positioned state for the collapsed-mode flyout panel. */\r\ninterface FlyoutState {\r\n item: SidebarItem;\r\n top: number;\r\n left?: number;\r\n right?: number;\r\n maxHeight: number;\r\n}\r\n\r\nconst FLYOUT_GAP = 8;\r\nconst FLYOUT_MARGIN = 16;\r\nconst FLYOUT_MIN_HEIGHT = 200;\r\nconst FLYOUT_CLOSE_DELAY = 140;\r\n\r\n@Component({\r\n selector: 'mt-sidebar',\r\n standalone: true,\r\n imports: [RouterLinkActive, RouterLink, Icon, Tooltip, TranslocoPipe],\r\n templateUrl: './sidebar.html',\r\n styles: [\r\n `\r\n :host {\r\n display: block;\r\n height: 100%;\r\n min-height: 0;\r\n }\r\n\r\n .mt-sidebar-menu {\r\n scrollbar-width: thin;\r\n scrollbar-color: var(--p-surface-400) transparent;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar {\r\n width: 6px;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-track {\r\n background: transparent;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-thumb {\r\n border-radius: 9999px;\r\n background: color-mix(in srgb, var(--p-surface-500) 58%, transparent);\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-thumb:hover {\r\n background: color-mix(in srgb, var(--p-surface-600) 72%, transparent);\r\n }\r\n\r\n .mt-sidebar-menu-collapsed {\r\n scrollbar-color: var(--p-surface-500) transparent;\r\n }\r\n\r\n .mt-sidebar-menu-collapsed::-webkit-scrollbar {\r\n width: 2px;\r\n }\r\n\r\n .mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb {\r\n background: color-mix(in srgb, var(--p-surface-600) 82%, transparent);\r\n }\r\n\r\n /* Collapsed-mode submenu flyout */\r\n .mt-sidebar-flyout {\r\n position: fixed;\r\n z-index: 1200;\r\n animation: mt-sidebar-flyout-in 140ms ease-out;\r\n }\r\n\r\n @keyframes mt-sidebar-flyout-in {\r\n from {\r\n opacity: 0;\r\n transform: translateY(2px) scale(0.98);\r\n }\r\n\r\n to {\r\n opacity: 1;\r\n transform: translateY(0) scale(1);\r\n }\r\n }\r\n\r\n @media (prefers-reduced-motion: reduce) {\r\n .mt-sidebar-flyout {\r\n animation: none;\r\n }\r\n }\r\n `,\r\n ],\r\n})\r\nexport class Sidebar {\r\n private readonly router = inject(Router);\r\n private readonly dir = inject(Directionality, { optional: true });\r\n\r\n items = input<SidebarItem[]>([]);\r\n\r\n logo = input<string>();\r\n logoLink = input<string | any[]>();\r\n title = input<string>();\r\n subTitle = input<string>();\r\n\r\n bgColor = input<string>();\r\n bgImage = input<string>();\r\n bgRepeat = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n iconsColor = input<string>('var(--p-text-color)');\r\n\r\n expanded = signal(false);\r\n expandedChange = output<boolean>();\r\n\r\n /** Parent items the user forced open / closed, overriding auto-expand. */\r\n private readonly openGroupIds = signal<Set<string | number>>(new Set());\r\n private readonly closedGroupIds = signal<Set<string | number>>(new Set());\r\n\r\n /** Currently anchored collapsed-mode flyout, if any. */\r\n readonly flyout = signal<FlyoutState | null>(null);\r\n private flyoutCloseTimer: ReturnType<typeof setTimeout> | null = null;\r\n\r\n /** Live URL so active sections auto-expand their submenu. */\r\n private readonly currentUrl = signal(this.router.url);\r\n\r\n protected readonly isRtl = computed(() => this.dir?.value === 'rtl');\r\n\r\n constructor() {\r\n this.router.events\r\n .pipe(\r\n filter(\r\n (event): event is NavigationEnd => event instanceof NavigationEnd,\r\n ),\r\n takeUntilDestroyed(),\r\n )\r\n .subscribe((event) => this.currentUrl.set(event.urlAfterRedirects));\r\n }\r\n\r\n toggleSidebar(): void {\r\n this.expanded.update((v) => !v);\r\n this.expandedChange.emit(this.expanded());\r\n this.closeFlyout();\r\n }\r\n\r\n hasChildren(item: SidebarItem): boolean {\r\n return !!item.children?.length || !!item.loading;\r\n }\r\n\r\n // ============================================================================\r\n // Expanded mode — inline accordion\r\n // ============================================================================\r\n\r\n isGroupOpen(item: SidebarItem): boolean {\r\n if (this.openGroupIds().has(item.id)) return true;\r\n if (this.closedGroupIds().has(item.id)) return false;\r\n return this.isSectionActive(item);\r\n }\r\n\r\n toggleGroup(item: SidebarItem, event?: Event): void {\r\n event?.stopPropagation();\r\n const open = new Set(this.openGroupIds());\r\n const closed = new Set(this.closedGroupIds());\r\n if (this.isGroupOpen(item)) {\r\n open.delete(item.id);\r\n closed.add(item.id);\r\n } else {\r\n closed.delete(item.id);\r\n open.add(item.id);\r\n }\r\n this.openGroupIds.set(open);\r\n this.closedGroupIds.set(closed);\r\n }\r\n\r\n /** A parent is \"active\" when the current route matches it or any child. */\r\n isSectionActive(item: SidebarItem): boolean {\r\n const url = this.currentUrl().split('?')[0];\r\n if (this.linkMatches(item.routerLink, url, true)) return true;\r\n return !!item.children?.some((child) =>\r\n this.linkMatches(child.routerLink, url),\r\n );\r\n }\r\n\r\n private linkMatches(\r\n link: SidebarItem['routerLink'],\r\n url: string,\r\n exact = false,\r\n ): boolean {\r\n const path = this.toPath(link);\r\n if (!path) return false;\r\n return exact ? url === path : url === path || url.startsWith(path + '/');\r\n }\r\n\r\n private toPath(link: SidebarItem['routerLink']): string {\r\n if (!link) return '';\r\n const parts = Array.isArray(link) ? link : [link];\r\n return ('/' + parts.map((p) => String(p)).join('/')).replace(/\\/{2,}/g, '/');\r\n }\r\n\r\n // ============================================================================\r\n // Collapsed mode — flyout panel\r\n // ============================================================================\r\n\r\n openFlyout(item: SidebarItem, event: Event): void {\r\n if (this.expanded() || !this.hasChildren(item)) return;\r\n\r\n const anchor = event.currentTarget as HTMLElement | null;\r\n if (!anchor) return;\r\n\r\n this.cancelFlyoutClose();\r\n\r\n const rect = anchor.getBoundingClientRect();\r\n const viewportHeight = window.innerHeight;\r\n\r\n let top = rect.top;\r\n if (top + FLYOUT_MIN_HEIGHT > viewportHeight) {\r\n top = Math.max(FLYOUT_MARGIN, viewportHeight - FLYOUT_MIN_HEIGHT - FLYOUT_MARGIN);\r\n }\r\n\r\n const maxHeight = Math.max(\r\n FLYOUT_MIN_HEIGHT,\r\n viewportHeight - top - FLYOUT_MARGIN,\r\n );\r\n\r\n this.flyout.set(\r\n this.isRtl()\r\n ? { item, top, right: window.innerWidth - rect.left + FLYOUT_GAP, maxHeight }\r\n : { item, top, left: rect.right + FLYOUT_GAP, maxHeight },\r\n );\r\n }\r\n\r\n /** Keep the panel open while the pointer travels into it. */\r\n cancelFlyoutClose(): void {\r\n if (this.flyoutCloseTimer !== null) {\r\n clearTimeout(this.flyoutCloseTimer);\r\n this.flyoutCloseTimer = null;\r\n }\r\n }\r\n\r\n scheduleFlyoutClose(): void {\r\n this.cancelFlyoutClose();\r\n this.flyoutCloseTimer = setTimeout(\r\n () => this.flyout.set(null),\r\n FLYOUT_CLOSE_DELAY,\r\n );\r\n }\r\n\r\n closeFlyout(): void {\r\n this.cancelFlyoutClose();\r\n this.flyout.set(null);\r\n }\r\n\r\n @HostListener('window:resize')\r\n onViewportChange(): void {\r\n this.closeFlyout();\r\n }\r\n}\r\n","<div\r\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\r\n [style.width]=\"expanded() ? '18rem' : '4rem'\"\r\n>\r\n <div\r\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n >\r\n <!-- Toggle Button & Branding -->\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <button\r\n type=\"button\"\r\n size=\"large\"\r\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n (click)=\"toggleSidebar()\"\r\n >\r\n <mt-icon\r\n icon=\"general.menu-01\"\r\n class=\"text-lg transition-transform duration-400 ease-in-out\"\r\n [class.rotate-180]=\"expanded()\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </button>\r\n\r\n @if (logo() || title()) {\r\n <div\r\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!expanded()\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.sidebar.logoAlt' | transloco\"\r\n class=\"h-8 shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div\r\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n ></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div\r\n class=\"flex flex-col gap-0.5 min-w-0\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\r\n @if (subTitle()) {\r\n <span class=\"text-xs opacity-70 truncate\">{{\r\n subTitle()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\r\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\r\n [class.pr-1]=\"expanded()\"\r\n [class.pr-px]=\"!expanded()\"\r\n (scroll)=\"closeFlyout()\"\r\n >\r\n @for (item of items(); track item.id) {\r\n <!-- ============ Submenu parent (has children) ============ -->\r\n @if (hasChildren(item)) {\r\n @if (expanded()) {\r\n <!-- Expanded: inline accordion -->\r\n <div class=\"flex flex-col\">\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"flex-1 truncate whitespace-nowrap text-sm font-medium\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"me-2 grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded hover:bg-surface-300/60 dark:hover:bg-surface-700/60 transition-colors\"\r\n [attr.aria-expanded]=\"isGroupOpen(item)\"\r\n (click)=\"toggleGroup(item, $event)\"\r\n >\r\n <mt-icon\r\n icon=\"arrow.chevron-down\"\r\n class=\"text-xs transition-transform duration-300 ease-in-out\"\r\n [class.rotate-180]=\"isGroupOpen(item)\"\r\n [style.--mt-icon-prev-width]=\"'14px'\"\r\n [style.--mt-icon-prev-height]=\"'14px'\"\r\n />\r\n </button>\r\n </a>\r\n\r\n <div\r\n class=\"grid transition-[grid-template-rows] duration-300 ease-in-out\"\r\n [style.gridTemplateRows]=\"isGroupOpen(item) ? '1fr' : '0fr'\"\r\n >\r\n <div class=\"overflow-hidden\">\r\n <div class=\"flex flex-col gap-0.5 py-1\">\r\n @if (item.loading && !item.children?.length) {\r\n <div\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 text-sm opacity-70\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\r\n <span class=\"truncate\">{{\r\n 'components.sidebar.loading' | transloco\r\n }}</span>\r\n </div>\r\n }\r\n @for (child of item.children ?? []; track child.id) {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #crla=\"routerLinkActive\"\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n mtTooltip=\"{{ child.title }}\"\r\n [style.color]=\"\r\n crla.isActive ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate text-sm\">{{ child.title }}</span>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Collapsed: icon trigger + hover/focus flyout -->\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n (mouseenter)=\"openFlyout(item, $event)\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n (focus)=\"openFlyout(item, $event)\"\r\n (blur)=\"scheduleFlyoutClose()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n </a>\r\n }\r\n } @else {\r\n <!-- ============ Leaf item ============ -->\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #rla=\"routerLinkActive\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"rla.isActive ? 'var(--p-primary-500)' : iconsColor()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- ============ Collapsed-mode flyout panel ============ -->\r\n@if (flyout(); as fly) {\r\n <div\r\n class=\"mt-sidebar-flyout flex w-60 flex-col overflow-hidden rounded-xl border border-surface-300 bg-surface-0 shadow-2xl dark:border-surface-700 dark:bg-surface-800\"\r\n [style.top.px]=\"fly.top\"\r\n [style.left.px]=\"fly.left\"\r\n [style.right.px]=\"fly.right\"\r\n (mouseenter)=\"cancelFlyoutClose()\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n >\r\n <div\r\n class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-2.5 dark:border-surface-700\"\r\n >\r\n @if (fly.item.icon) {\r\n <mt-icon\r\n [icon]=\"fly.item.icon\"\r\n class=\"text-primary-500 shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'18px'\"\r\n [style.--mt-icon-prev-height]=\"'18px'\"\r\n />\r\n }\r\n <span class=\"truncate text-sm font-semibold\">{{ fly.item.title }}</span>\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex flex-col gap-0.5 overflow-y-auto p-1.5\"\r\n [style.maxHeight.px]=\"fly.maxHeight\"\r\n >\r\n @if (fly.item.loading && !fly.item.children?.length) {\r\n <div\r\n class=\"flex items-center gap-2 px-3 py-2 text-sm text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\r\n <span>{{ 'components.sidebar.loading' | transloco }}</span>\r\n </div>\r\n } @else if (!fly.item.children?.length) {\r\n <div class=\"px-3 py-2 text-sm text-muted-color\">\r\n {{ 'components.sidebar.empty' | transloco }}\r\n </div>\r\n }\r\n @for (child of fly.item.children ?? []; track child.id) {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 text-(--p-primary-500) dark:bg-primary-900\"\r\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\r\n (click)=\"closeFlyout()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate\">{{ child.title }}</span>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AA0CA,MAAM,UAAU,GAAG,CAAC;AACpB,MAAM,aAAa,GAAG,EAAE;AACxB,MAAM,iBAAiB,GAAG,GAAG;AAC7B,MAAM,kBAAkB,GAAG,GAAG;MA4EjB,OAAO,CAAA;AACD,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IACvB,GAAG,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IA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["../../../../packages/masterteam/components/sidebar/sidebar.ts","../../../../packages/masterteam/components/sidebar/sidebar.html","../../../../packages/masterteam/components/sidebar/masterteam-components-sidebar.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n HostListener,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport { Icon, MTIcon } from '@masterteam/icons';\nimport {\n NavigationEnd,\n Router,\n RouterLink,\n RouterLinkActive,\n} from '@angular/router';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter } from 'rxjs';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { Tooltip } from '@masterteam/components/tooltip';\n\nexport interface SidebarItem {\n id: string | number;\n title: string;\n icon?: MTIcon;\n routerLink?: any[] | string;\n /** Full browser navigation target, for links outside the current Angular app. */\n href?: string;\n target?: string;\n rel?: string;\n /**\n * Optional nested items. When present the entry becomes a submenu:\n * an inline accordion while the sidebar is expanded, and a hover/focus\n * flyout panel beside the icon while the sidebar is collapsed.\n */\n children?: SidebarItem[];\n /** Show a placeholder spinner row while the children load lazily. */\n loading?: boolean;\n}\n\n/** Positioned state for the collapsed-mode flyout panel. */\ninterface FlyoutState {\n item: SidebarItem;\n top: number;\n left?: number;\n right?: number;\n maxHeight: number;\n}\n\nconst FLYOUT_GAP = 8;\nconst FLYOUT_MARGIN = 16;\nconst FLYOUT_MIN_HEIGHT = 200;\nconst FLYOUT_CLOSE_DELAY = 140;\n\n@Component({\n selector: 'mt-sidebar',\n standalone: true,\n imports: [RouterLinkActive, RouterLink, Icon, Tooltip, TranslocoPipe],\n templateUrl: './sidebar.html',\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n min-height: 0;\n }\n\n .mt-sidebar-menu {\n scrollbar-width: thin;\n scrollbar-color: var(--p-surface-400) transparent;\n }\n\n .mt-sidebar-menu::-webkit-scrollbar {\n width: 6px;\n }\n\n .mt-sidebar-menu::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .mt-sidebar-menu::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background: color-mix(in srgb, var(--p-surface-500) 58%, transparent);\n }\n\n .mt-sidebar-menu::-webkit-scrollbar-thumb:hover {\n background: color-mix(in srgb, var(--p-surface-600) 72%, transparent);\n }\n\n .mt-sidebar-menu-collapsed {\n scrollbar-color: var(--p-surface-500) transparent;\n }\n\n .mt-sidebar-menu-collapsed::-webkit-scrollbar {\n width: 2px;\n }\n\n .mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb {\n background: color-mix(in srgb, var(--p-surface-600) 82%, transparent);\n }\n\n /* Collapsed-mode submenu flyout */\n .mt-sidebar-flyout {\n position: fixed;\n z-index: 1200;\n animation: mt-sidebar-flyout-in 140ms ease-out;\n }\n\n @keyframes mt-sidebar-flyout-in {\n from {\n opacity: 0;\n transform: translateY(2px) scale(0.98);\n }\n\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .mt-sidebar-flyout {\n animation: none;\n }\n }\n `,\n ],\n})\nexport class Sidebar {\n private readonly router = inject(Router);\n private readonly dir = inject(Directionality, { optional: true });\n\n items = input<SidebarItem[]>([]);\n\n logo = input<string>();\n logoLink = input<string | any[]>();\n title = input<string>();\n subTitle = input<string>();\n\n bgColor = input<string>();\n bgImage = input<string>();\n bgRepeat = input<boolean, unknown>(false, { transform: booleanAttribute });\n iconsColor = input<string>('var(--p-text-color)');\n\n expanded = signal(false);\n expandedChange = output<boolean>();\n\n /** Parent items the user forced open / closed, overriding auto-expand. */\n private readonly openGroupIds = signal<Set<string | number>>(new Set());\n private readonly closedGroupIds = signal<Set<string | number>>(new Set());\n\n /** Currently anchored collapsed-mode flyout, if any. */\n readonly flyout = signal<FlyoutState | null>(null);\n private flyoutCloseTimer: ReturnType<typeof setTimeout> | null = null;\n\n /** Live URL so active sections auto-expand their submenu. */\n private readonly currentUrl = signal(this.router.url);\n\n protected readonly isRtl = computed(() => this.dir?.value === 'rtl');\n\n constructor() {\n this.router.events\n .pipe(\n filter(\n (event): event is NavigationEnd => event instanceof NavigationEnd,\n ),\n takeUntilDestroyed(),\n )\n .subscribe((event) => this.currentUrl.set(event.urlAfterRedirects));\n }\n\n toggleSidebar(): void {\n this.expanded.update((v) => !v);\n this.expandedChange.emit(this.expanded());\n this.closeFlyout();\n }\n\n hasChildren(item: SidebarItem): boolean {\n return !!item.children?.length || !!item.loading;\n }\n\n // ============================================================================\n // Expanded mode — inline accordion\n // ============================================================================\n\n isGroupOpen(item: SidebarItem): boolean {\n if (this.openGroupIds().has(item.id)) return true;\n if (this.closedGroupIds().has(item.id)) return false;\n return this.isSectionActive(item);\n }\n\n toggleGroup(item: SidebarItem, event?: Event): void {\n event?.stopPropagation();\n const open = new Set(this.openGroupIds());\n const closed = new Set(this.closedGroupIds());\n if (this.isGroupOpen(item)) {\n open.delete(item.id);\n closed.add(item.id);\n } else {\n closed.delete(item.id);\n open.add(item.id);\n }\n this.openGroupIds.set(open);\n this.closedGroupIds.set(closed);\n }\n\n /** A parent is \"active\" when the current route matches it or any child. */\n isSectionActive(item: SidebarItem): boolean {\n const url = this.currentUrl().split('?')[0];\n if (this.linkMatches(item.routerLink ?? item.href, url, true)) return true;\n return !!item.children?.some((child) =>\n this.linkMatches(child.routerLink ?? child.href, url),\n );\n }\n\n private linkMatches(\n link: SidebarItem['routerLink'] | SidebarItem['href'],\n url: string,\n exact = false,\n ): boolean {\n const path = this.toPath(link);\n if (!path) return false;\n return exact ? url === path : url === path || url.startsWith(path + '/');\n }\n\n private toPath(\n link: SidebarItem['routerLink'] | SidebarItem['href'],\n ): string {\n if (!link) return '';\n if (typeof link === 'string' && /^[a-z][a-z0-9+.-]*:/i.test(link)) {\n try {\n const parsed = new URL(link);\n return parsed.pathname || '/';\n } catch {\n return '';\n }\n }\n const parts = Array.isArray(link) ? link : [link];\n return ('/' + parts.map((p) => String(p)).join('/')).replace(\n /\\/{2,}/g,\n '/',\n );\n }\n\n resolvedRel(item: SidebarItem): string | null {\n if (item.rel) return item.rel;\n return item.target === '_blank' ? 'noopener noreferrer' : null;\n }\n\n // ============================================================================\n // Collapsed mode — flyout panel\n // ============================================================================\n\n openFlyout(item: SidebarItem, event: Event): void {\n if (this.expanded() || !this.hasChildren(item)) return;\n\n const anchor = event.currentTarget as HTMLElement | null;\n if (!anchor) return;\n\n this.cancelFlyoutClose();\n\n const rect = anchor.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n\n let top = rect.top;\n if (top + FLYOUT_MIN_HEIGHT > viewportHeight) {\n top = Math.max(\n FLYOUT_MARGIN,\n viewportHeight - FLYOUT_MIN_HEIGHT - FLYOUT_MARGIN,\n );\n }\n\n const maxHeight = Math.max(\n FLYOUT_MIN_HEIGHT,\n viewportHeight - top - FLYOUT_MARGIN,\n );\n\n this.flyout.set(\n this.isRtl()\n ? {\n item,\n top,\n right: window.innerWidth - rect.left + FLYOUT_GAP,\n maxHeight,\n }\n : { item, top, left: rect.right + FLYOUT_GAP, maxHeight },\n );\n }\n\n /** Keep the panel open while the pointer travels into it. */\n cancelFlyoutClose(): void {\n if (this.flyoutCloseTimer !== null) {\n clearTimeout(this.flyoutCloseTimer);\n this.flyoutCloseTimer = null;\n }\n }\n\n scheduleFlyoutClose(): void {\n this.cancelFlyoutClose();\n this.flyoutCloseTimer = setTimeout(\n () => this.flyout.set(null),\n FLYOUT_CLOSE_DELAY,\n );\n }\n\n closeFlyout(): void {\n this.cancelFlyoutClose();\n this.flyout.set(null);\n }\n\n @HostListener('window:resize')\n onViewportChange(): void {\n this.closeFlyout();\n }\n}\n","<div\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\n [style.width]=\"expanded() ? '18rem' : '4rem'\"\n>\n <div\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\n [style.backgroundColor]=\"bgColor()\"\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\n [class.bg-no-repeat]=\"!bgRepeat()\"\n [class.bg-repeat]=\"bgRepeat()\"\n >\n <!-- Toggle Button & Branding -->\n <div class=\"flex shrink-0 items-center gap-2\">\n <button\n type=\"button\"\n size=\"large\"\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\n [style.color]=\"iconsColor()\"\n (click)=\"toggleSidebar()\"\n >\n <mt-icon\n icon=\"general.menu-01\"\n class=\"text-lg transition-transform duration-400 ease-in-out\"\n [class.rotate-180]=\"expanded()\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </button>\n\n @if (logo() || title()) {\n <div\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\n [class.max-w-0]=\"!expanded()\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n @if (logo()) {\n <img\n [src]=\"logo()\"\n [alt]=\"'components.sidebar.logoAlt' | transloco\"\n class=\"h-8 shrink-0\"\n [routerLink]=\"logoLink()\"\n [class.cursor-pointer]=\"logoLink()\"\n />\n }\n @if (logo() && (title() || subTitle())) {\n <div\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\n [style.color]=\"iconsColor()\"\n ></div>\n }\n @if (title() || subTitle()) {\n <div\n class=\"flex flex-col gap-0.5 min-w-0\"\n [style.color]=\"iconsColor()\"\n >\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\n @if (subTitle()) {\n <span class=\"text-xs opacity-70 truncate\">{{\n subTitle()\n }}</span>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <div\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\n [class.pr-1]=\"expanded()\"\n [class.pr-px]=\"!expanded()\"\n (scroll)=\"closeFlyout()\"\n >\n @for (item of items(); track item.id) {\n <!-- ============ Submenu parent (has children) ============ -->\n @if (hasChildren(item)) {\n @if (expanded()) {\n <!-- Expanded: inline accordion -->\n <div class=\"flex flex-col\">\n <a\n [routerLink]=\"item.routerLink\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"flex-1 truncate whitespace-nowrap text-sm font-medium\"\n >\n {{ item.title }}\n </div>\n <button\n type=\"button\"\n class=\"me-2 grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded hover:bg-surface-300/60 dark:hover:bg-surface-700/60 transition-colors\"\n [attr.aria-expanded]=\"isGroupOpen(item)\"\n (click)=\"toggleGroup(item, $event)\"\n >\n <mt-icon\n icon=\"arrow.chevron-down\"\n class=\"text-xs transition-transform duration-300 ease-in-out\"\n [class.rotate-180]=\"isGroupOpen(item)\"\n [style.--mt-icon-prev-width]=\"'14px'\"\n [style.--mt-icon-prev-height]=\"'14px'\"\n />\n </button>\n </a>\n\n <div\n class=\"grid transition-[grid-template-rows] duration-300 ease-in-out\"\n [style.gridTemplateRows]=\"isGroupOpen(item) ? '1fr' : '0fr'\"\n >\n <div class=\"overflow-hidden\">\n <div class=\"flex flex-col gap-0.5 py-1\">\n @if (item.loading && !item.children?.length) {\n <div\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 text-sm opacity-70\"\n [style.color]=\"iconsColor()\"\n >\n <mt-icon\n icon=\"general.loading-01\"\n class=\"animate-spin\"\n />\n <span class=\"truncate\">{{\n \"components.sidebar.loading\" | transloco\n }}</span>\n </div>\n }\n @for (child of item.children ?? []; track child.id) {\n <a\n [routerLink]=\"child.routerLink\"\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\n #crla=\"routerLinkActive\"\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\n mtTooltip=\"{{ child.title }}\"\n [style.color]=\"\n crla.isActive ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n @if (child.icon) {\n <mt-icon\n [icon]=\"child.icon\"\n class=\"shrink-0 opacity-80\"\n [style.--mt-icon-prev-width]=\"'16px'\"\n [style.--mt-icon-prev-height]=\"'16px'\"\n />\n } @else {\n <span\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\n ></span>\n }\n <span class=\"truncate text-sm\">{{ child.title }}</span>\n </a>\n }\n </div>\n </div>\n </div>\n </div>\n } @else {\n <!-- Collapsed: icon trigger + hover/focus flyout -->\n <a\n [routerLink]=\"item.routerLink\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n (mouseenter)=\"openFlyout(item, $event)\"\n (mouseleave)=\"scheduleFlyoutClose()\"\n (focus)=\"openFlyout(item, $event)\"\n (blur)=\"scheduleFlyoutClose()\"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n </a>\n }\n } @else {\n <!-- ============ Leaf item ============ -->\n @if (item.href) {\n <a\n [attr.href]=\"item.href\"\n [attr.target]=\"item.target ?? null\"\n [attr.rel]=\"resolvedRel(item)\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n mtTooltip=\"{{ item.title }}\"\n [style.color]=\"\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n {{ item.title }}\n </div>\n </a>\n } @else {\n <a\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\n #rla=\"routerLinkActive\"\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\n mtTooltip=\"{{ item.title }}\"\n [style.color]=\"\n rla.isActive ? 'var(--p-primary-500)' : iconsColor()\n \"\n >\n <div class=\"px-3.5\">\n <mt-icon\n [icon]=\"item.icon\"\n class=\"shrink-0\"\n [style.--mt-icon-prev-width]=\"'20px'\"\n [style.--mt-icon-prev-height]=\"'20px'\"\n />\n </div>\n <div\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\n [class.opacity-0]=\"!expanded()\"\n [class.max-w-xs]=\"expanded()\"\n [class.opacity-100]=\"expanded()\"\n >\n {{ item.title }}\n </div>\n </a>\n }\n }\n }\n </div>\n </div>\n</div>\n\n<!-- ============ Collapsed-mode flyout panel ============ -->\n@if (flyout(); as fly) {\n <div\n class=\"mt-sidebar-flyout flex w-60 flex-col overflow-hidden rounded-xl border border-surface-300 bg-surface-0 shadow-2xl dark:border-surface-700 dark:bg-surface-800\"\n [style.top.px]=\"fly.top\"\n [style.left.px]=\"fly.left\"\n [style.right.px]=\"fly.right\"\n (mouseenter)=\"cancelFlyoutClose()\"\n (mouseleave)=\"scheduleFlyoutClose()\"\n >\n <div\n class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-2.5 dark:border-surface-700\"\n >\n @if (fly.item.icon) {\n <mt-icon\n [icon]=\"fly.item.icon\"\n class=\"text-primary-500 shrink-0\"\n [style.--mt-icon-prev-width]=\"'18px'\"\n [style.--mt-icon-prev-height]=\"'18px'\"\n />\n }\n <span class=\"truncate text-sm font-semibold\">{{ fly.item.title }}</span>\n </div>\n\n <div\n class=\"mt-sidebar-menu flex flex-col gap-0.5 overflow-y-auto p-1.5\"\n [style.maxHeight.px]=\"fly.maxHeight\"\n >\n @if (fly.item.loading && !fly.item.children?.length) {\n <div class=\"flex items-center gap-2 px-3 py-2 text-sm text-muted-color\">\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\n <span>{{ \"components.sidebar.loading\" | transloco }}</span>\n </div>\n } @else if (!fly.item.children?.length) {\n <div class=\"px-3 py-2 text-sm text-muted-color\">\n {{ \"components.sidebar.empty\" | transloco }}\n </div>\n }\n @for (child of fly.item.children ?? []; track child.id) {\n <a\n [routerLink]=\"child.routerLink\"\n routerLinkActive=\"bg-primary-50 text-(--p-primary-500) dark:bg-primary-900\"\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\n (click)=\"closeFlyout()\"\n >\n @if (child.icon) {\n <mt-icon\n [icon]=\"child.icon\"\n class=\"shrink-0 opacity-80\"\n [style.--mt-icon-prev-width]=\"'16px'\"\n [style.--mt-icon-prev-height]=\"'16px'\"\n />\n } @else {\n <span\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\n ></span>\n }\n <span class=\"truncate\">{{ child.title }}</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