@lifecorner/angular-ui-kit 3.30.2 → 3.31.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"lifecorner-angular-ui-kit-sidenav.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/sidenav/sidenav.component.ts","../../../../libs/angular-ui-kit/src/lib/sidenav/sidenav.component.html"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n signal,\n computed,\n input,\n output,\n model,\n effect,\n untracked,\n HostListener,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet, NgStyle } from '@angular/common';\nimport { NavigationEnd, Router, RouterLink } from '@angular/router';\nimport { filter } from 'rxjs';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { NavigationItem } from '@lifecorner/angular-ui-kit/models';\nimport {\n currentItemParents,\n currentNavigationItem,\n navigationLinks,\n navigationPath,\n sortNavigationItems,\n} from '@lifecorner/angular-ui-kit/internal/navigation';\nimport { IconComponent, ɵprovideKitIcons } from '@lifecorner/angular-ui-kit/icon';\nimport { ICON_CHEVRON_DOWN, ICON_CHEVRON_LEFT, ICON_CHEVRON_RIGHT } from '@lifecorner/angular-ui-kit/icons';\nimport { BadgeComponent } from '@lifecorner/angular-ui-kit/badge';\nimport { LogoComponent } from '@lifecorner/angular-ui-kit/logo';\n\nexport type SidenavPosition = 'left' | 'right';\nexport type SidenavMode = 'drawer' | 'docked';\n\n/**\n * Surface of the docked sidenav: `default` is the rail on `--color-sidebar`\n * with a border; `transparent` has no background and no border and draws the\n * items as 48 px pills (the side navigation on the page, \"Weite\"). A drawer\n * keeps its surface in both.\n */\nexport type SidenavVariant = 'default' | 'transparent';\n\n/**\n * Sidenav component for application navigation sidebar.\n *\n * Features:\n * - Drawer (overlay) and docked (persistent) modes\n * - Responsive mobile mode — docked automatically switches to drawer below a configurable breakpoint\n * - Collapsed icon-rail mode (narrow 56px sidebar with icons only and hover tooltips)\n * - Integrated logo area with collapse-toggle (sidebar-first layouts)\n * - Text brand (`brandName`, `brandIcon`): an icon tile and the product name,\n * one link to home (`brandHref`, else `routerLink=\"/\"`), as high as the\n * `lc-header` next to it; the rail shows only the tile. It never toggles:\n * `showCollapseToggle` adds a collapse button at the bottom of the rail\n * - Hierarchical navigation with collapsible groups (up to 3 levels)\n * - Section headlines for item grouping with optional action buttons\n * - Action buttons on any item (hover-reveal)\n * - Badge support on items (count / status indicator)\n * - One current item, announced and painted alike: the link for `activeRoute`\n * (or, without it, the one the router's URL matches) gets\n * `aria-current=\"page\"` and the current look, every other link neither\n * (AS-16). No hover color change on the current item\n * - Keyboard navigation support (Escape closes drawer)\n * - Configurable width and position (left/right)\n * - Optional backdrop overlay\n * - Theme variants: auto, light, dark (with teal accent for dark mode). The\n * theming hooks (`--lc-sidenav-bg`, `-fg`, `-fg-active`, `-border`,\n * `-hover-bg`, `-section-fg`, `-active-bg`, `-active-fg`, `-active-icon`,\n * `-badge-ring`) can be set on `lc-sidenav` or any ancestor (3.15); a value\n * on the element wins over an ancestor's, and both win over `theme` (3.14).\n * Set the same ones for `lc-sidenav-placeholder`, e.g. on a shared ancestor;\n * `--lc-sidenav-active-indicator`\n * (the current item's 2 px bar, default `--color-primary-500`; on a\n * `theme=\"light\"` rail #208497 on any page, like its focus rings),\n * `--lc-sidenav-brand-tile-bg` (default `--color-primary-fill`) and\n * `--lc-sidenav-brand-tile-fg` (default `--color-on-primary`) can be set on\n * any ancestor\n * - `variant=\"transparent\"`: no rail background or border, items as 48 px\n * pills with 16 px labels, the current one on `--color-surface-selected`\n * - Items are at least 44 px high in every density; the current item's ink is\n * `--color-on-surface-selected` (AA on the selected tint)\n * - Accessible: the inner `<nav>` is the navigation landmark; in drawer mode\n * the panel is a modal dialog (`role=\"dialog\"`, focus moved to the close\n * button on open, trapped while open, restored on close)\n *\n * @example\n * ```html\n * <lc-sidenav\n * [isOpen]=\"isOpen\"\n * mode=\"docked\"\n * [(collapsed)]=\"isCollapsed\"\n * [showLogo]=\"true\"\n * logoSize=\"md\"\n * [mobileBreakpoint]=\"768\"\n * [items]=\"navItems\"\n * activeRoute=\"/dashboard\"\n * theme=\"dark\"\n * (closed)=\"isOpen = false\"\n * (itemClicked)=\"navigate($event)\"\n * (itemAction)=\"onAction($event)\" />\n * ```\n */\n@Component({\n selector: 'lc-sidenav',\n standalone: true,\n imports: [NgTemplateOutlet, NgStyle, RouterLink, A11yModule, IconComponent, BadgeComponent, LogoComponent],\n viewProviders: [ɵprovideKitIcons([ICON_CHEVRON_DOWN, ICON_CHEVRON_LEFT, ICON_CHEVRON_RIGHT])],\n templateUrl: './sidenav.component.html',\n styleUrl: './sidenav.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.lc-sidenav-container]': 'true',\n '[class.lc-sidenav-container--docked]': \"effectiveMode() === 'docked'\",\n '[class.lc-sidenav-container--open]': 'isOpen()',\n // `theme` on the host (019): the themed values are private host variables\n // that the public `--lc-sidenav-*` hooks fall back to, so an app's hooks\n // on `lc-sidenav` win over `theme=\"dark\"` / `\"light\"`.\n '[class.lc-sidenav-container--light]': \"theme() === 'light'\",\n '[class.lc-sidenav-container--dark]': \"theme() === 'dark'\",\n },\n})\nexport class SidenavComponent implements OnDestroy {\n private readonly router = inject(Router);\n\n /**\n * The router's URL, updated on every `NavigationEnd`. Before the first\n * navigation it is the router's initial URL (`/`). Read only when\n * `activeRoute` is empty.\n */\n private readonly routerUrl = signal(this.router.url);\n\n /** Whether the sidenav is collapsed to icon-only rail (two-way bindable) */\n readonly collapsed = model(false);\n\n /** Whether to show the logo at the top of the sidenav */\n readonly showLogo = input(false);\n\n /** Custom URL for the full brand logo (forwarded to inner `<lc-logo>`). */\n readonly logoSrc = input('');\n /** Custom URL for the emblem-only brand logo. */\n readonly logoEmblemSrc = input('');\n /** Optional dark-theme URL for the full brand logo. */\n readonly logoDarkSrc = input('');\n /** Optional dark-theme URL for the emblem-only brand logo. */\n readonly logoDarkEmblemSrc = input('');\n /** Alt text for the brand logo. */\n readonly logoAlt = input('');\n\n /** Size of the brand logo (forwarded to inner `<lc-logo>`). Defaults to `md` for a prominent brand block aligned with `<lc-header size=\"md\">` (both 64px). Also sets the height of the text brand (`brandName`). */\n readonly logoSize = input<'xs' | 'sm' | 'md' | 'lg' | 'xl'>('md');\n\n /**\n * Product name shown as a text brand at the top: an icon tile and the name,\n * one link to home. Replaces the image logo (`showLogo`). The block is as\n * high as the image logo (`logoSize`: 64 px for `md`, matching\n * `lc-header size=\"md\"`); the name wraps to two lines at most, and the full\n * name stays the link's accessible name. Collapsed, only the tile shows.\n * The brand never toggles the rail (see `showCollapseToggle`). Under\n * `@defer`, give the `lc-sidenav-placeholder` `[showLogo]=\"true\"` and the\n * same `logoSize` to reserve the block. Empty: no text brand.\n * @default ''\n */\n readonly brandName = input('');\n\n /**\n * `lc-icon` name in the brand tile (decorative). Empty: the tile shows the\n * name's first letter. Renders nothing without `brandName`.\n * @default ''\n */\n readonly brandIcon = input('');\n\n /**\n * Plain URL of the brand link (a native `<a href>`, works without the\n * router). Empty: `routerLink=\"/\"`, as `lc-header`'s `homeHref`.\n * @default ''\n */\n readonly brandHref = input('');\n\n /**\n * Accessible name of the brand link. Empty: the brand name. Start it with\n * the visible name, e.g. `'Finance Intelligence – home'`.\n * @default ''\n */\n readonly brandAriaLabel = input('');\n\n /**\n * Docked mode: a button at the bottom of the rail collapses and expands it\n * (`collapsed`). Independent of the brand. With `showLogo` the image logo\n * toggles already, so use one of the two.\n * @default false\n */\n readonly showCollapseToggle = input(false);\n\n /**\n * Accessible name of the collapse button (`showCollapseToggle`) while the\n * rail is collapsed. Expanded, it uses `collapseAriaLabel`.\n * @default 'Expand navigation'\n */\n readonly expandAriaLabel = input('Expand navigation');\n\n /** Whether the sidenav is open */\n readonly isOpen = input(false);\n\n /** Display mode: 'drawer' (overlay) or 'docked' (persistent sidebar) */\n readonly mode = input<SidenavMode>('drawer');\n\n /** Mobile breakpoint in pixels. Below this width, docked mode switches to drawer. */\n readonly mobileBreakpoint = input(768);\n\n /** Whether the viewport is below the mobile breakpoint */\n readonly isMobile = signal(false);\n\n /** Effective mode: switches docked → drawer on mobile */\n readonly effectiveMode = computed(() => {\n if (this.isMobile() && this.mode() === 'docked') {\n return 'drawer' as SidenavMode;\n }\n return this.mode();\n });\n\n private mediaQuery: MediaQueryList | null = null;\n private mediaHandler = (e: MediaQueryListEvent) => this.isMobile.set(e.matches);\n\n /** Position of the sidenav (left or right) */\n readonly position = input<SidenavPosition>('left');\n\n /** Width of the sidenav drawer */\n readonly width = input('320px');\n\n /**\n * ARIA label of the navigation landmark (the inner `<nav>`) and, in drawer\n * mode, of the dialog panel.\n */\n readonly ariaLabel = input('Side navigation');\n\n /** Whether to show the overlay backdrop */\n readonly hasOverlay = input(true);\n\n /**\n * Navigation items (`NavigationItem[]`): `id`, `icon`, `label`, `route`,\n * `displayOrder` (sort order, 1 = first); optional `children`\n * (`NavigationItem[]`, a collapsible group, up to 3 levels), `isSection`\n * (renders `label` as a section headline over its `children`), `badge`\n * (`{ value: string | number; variant?: 'default' | 'primary' | 'success' |\n * 'warning' | 'error' | 'info' }`), `action` (`{ icon: string; ariaLabel?:\n * string }`, a button that emits `itemAction`), `requiredRole` (for the\n * app's own filtering; not evaluated here). Items link with `routerLink`;\n * exactly one link, the current item (see `activeRoute`), gets\n * `aria-current=\"page\"`.\n * @default []\n */\n readonly items = input<NavigationItem[]>([]);\n\n /**\n * The current route. When set, the first link (in display order) whose\n * `route` equals it is the current item: it alone gets `aria-current=\"page\"`\n * and the current look, whatever the router matches. When empty, the\n * sidenav follows the router: the link whose route equals the URL's path is\n * current, otherwise the one with the longest route the path starts with\n * (`/household` on `/household/members`; `/` only on `/`). Routes are\n * compared as written, so give them as absolute paths (`'/household'`).\n * @default ''\n */\n readonly activeRoute = input('');\n\n /** Theme variant for the sidenav */\n readonly theme = input<'light' | 'dark' | 'auto'>('auto');\n\n /**\n * Surface of the docked sidenav: `default` (the rail with background and\n * border) or `transparent` (no background, no border, items as 48 px pills\n * with radius full and 16 px labels; the current one on\n * `--color-surface-selected`). A drawer keeps its surface.\n */\n readonly variant = input<SidenavVariant>('default');\n\n /** Accessible name of the logo button that collapses/expands the sidebar. */\n readonly toggleAriaLabel = input('Toggle sidebar');\n\n /** Accessible name of the collapse button. Empty: \"Collapse navigation to the left/right\" by `position`. */\n readonly collapseAriaLabel = input('');\n\n /** Tooltip of the collapse button. */\n readonly collapseTitle = input('Collapse sidebar');\n\n /** Accessible name of the close button (drawer mode). */\n readonly closeAriaLabel = input('Close navigation');\n\n /**\n * Ids of the expanded parent items — the single source of truth for\n * `isExpanded`. Seeded with the current item's parent whenever it changes\n * (see constructor), so a group opens on navigation but can still\n * be collapsed by the user. (It used to be OR-ed with `hasActiveChild` at\n * read time, so toggling such a group flipped the set without ever closing\n * it — the set drifted out of sync with what was on screen.)\n */\n readonly expandedItems = signal<Set<string>>(new Set());\n\n /** Ids of the collapsible parents (top-level groups, section sub-groups) that contain the current item. */\n private readonly activeChildParents = computed(() => currentItemParents(this.items(), this.currentItem()));\n\n /**\n * Computed sorted navigation items by displayOrder\n */\n readonly sortedItems = computed(() => sortNavigationItems(this.items()));\n\n /**\n * Every item rendered as a link, in display order (depth first): simple\n * items, the children of a group, the children of a section, and the\n * children of a section's sub-group.\n */\n private readonly linkItems = computed(() => navigationLinks(this.sortedItems()));\n\n /** The router URL's path: primary outlet only, no query, fragment or matrix parameters. */\n private readonly routerPath = computed(() => navigationPath(this.router, this.routerUrl()));\n\n /**\n * The one current link (or none). The single source of both the current\n * look (`lc-sidenav__nav-item--active`) and `aria-current=\"page\"` (AS-16).\n * With `activeRoute` set: the first link whose route equals it. Without:\n * the router's path — the exact match wins, otherwise the longest link\n * route the path continues with a `/` (`/` matches only `/`); ties go to\n * the first link in display order. The rules live in\n * `internal/navigation` since 3.6, shared with `lc-sidenav-placeholder`.\n */\n private readonly currentItem = computed<NavigationItem | null>(() =>\n currentNavigationItem(this.linkItems(), this.activeRoute(), this.activeRoute() === '' ? this.routerPath() : ''),\n );\n\n /**\n * Event emitted when the sidenav should close\n */\n readonly closed = output<void>();\n\n /**\n * Event emitted when a navigation item is clicked\n */\n readonly itemClicked = output<NavigationItem>();\n\n /**\n * Event emitted when an item's action button is clicked\n */\n readonly itemAction = output<NavigationItem>();\n\n constructor() {\n this.router.events\n .pipe(\n filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.routerUrl.set(this.router.url));\n\n // React to mobileBreakpoint changes\n effect(() => {\n this.mobileBreakpoint(); // track dependency\n this.setupMediaQuery();\n });\n\n // Navigating into a group opens it: add the active child's parent(s) to\n // the expanded set. Only additive — the user's own collapses/expands of\n // other groups survive a route change.\n effect(() => {\n const parents = this.activeChildParents();\n if (parents.length === 0) return;\n const expanded = untracked(this.expandedItems);\n if (parents.every((id) => expanded.has(id))) return;\n this.expandedItems.set(new Set([...expanded, ...parents]));\n });\n }\n\n ngOnDestroy(): void {\n this.teardownMediaQuery();\n }\n\n private setupMediaQuery(): void {\n if (typeof window === 'undefined') return;\n this.teardownMediaQuery();\n this.mediaQuery = window.matchMedia(`(max-width: ${this.mobileBreakpoint()}px)`);\n this.isMobile.set(this.mediaQuery.matches);\n this.mediaQuery.addEventListener('change', this.mediaHandler);\n }\n\n private teardownMediaQuery(): void {\n this.mediaQuery?.removeEventListener('change', this.mediaHandler);\n this.mediaQuery = null;\n }\n\n /**\n * Computed CSS classes for the sidenav\n */\n sidenavClasses = computed(() => {\n const classes = ['lc-sidenav'];\n classes.push(`lc-sidenav--${this.position()}`);\n classes.push(`lc-sidenav--${this.effectiveMode()}`);\n if (this.isOpen()) {\n classes.push('lc-sidenav--open');\n }\n if (this.collapsed() && !this.isMobile()) {\n classes.push('lc-sidenav--collapsed');\n }\n if (this.theme() !== 'auto') {\n classes.push(`lc-sidenav--${this.theme()}`);\n }\n if (this.variant() === 'transparent') {\n classes.push('lc-sidenav--transparent');\n }\n return classes.join(' ');\n });\n\n /**\n * Computed inline styles for the sidenav\n */\n sidenavStyles = computed(() => ({\n width: this.isMobile() ? this.width() : (this.collapsed() ? '56px' : this.width()),\n }));\n\n /** The brand tile's letter when there is no `brandIcon`: the name's first character, upper-cased. */\n protected readonly brandInitial = computed(() => ([...this.brandName().trim()][0] ?? '').toUpperCase());\n\n /** Whether the rail shows only icons (as `lc-sidenav--collapsed`). */\n protected readonly isRail = computed(() => this.collapsed() && !this.isMobile());\n\n /** The collapse button's accessible name: what a press does. */\n protected readonly collapseToggleLabel = computed(() =>\n this.collapsed()\n ? this.expandAriaLabel()\n : this.collapseAriaLabel() ||\n (this.position() === 'right' ? 'Collapse navigation to the right' : 'Collapse navigation to the left'),\n );\n\n /** The collapse button's chevron points where the rail moves: ⟨ to collapse a left rail, ⟩ to expand it (mirrored on the right). */\n protected readonly collapseToggleIcon = computed(() => {\n const towardsLeft = this.position() === 'right' ? this.collapsed() : !this.collapsed();\n return towardsLeft ? 'chevron-left' : 'chevron-right';\n });\n\n /**\n * Toggle collapsed state\n */\n toggleCollapsed(): void {\n this.collapsed.set(!this.collapsed());\n }\n\n /** The brand link closes the drawer on a phone, as the items do. */\n handleBrandClick(): void {\n if (this.isMobile()) {\n this.handleClose();\n }\n }\n\n /**\n * Handle close action\n */\n handleClose(): void {\n this.closed.emit();\n }\n\n /**\n * Handle navigation item click\n */\n handleItemClick(item: NavigationItem): void {\n this.itemClicked.emit(item);\n // Auto-close drawer on mobile after navigation\n if (this.isMobile()) {\n this.handleClose();\n }\n }\n\n /**\n * Handle action button click on a navigation item\n */\n handleItemAction(event: Event, item: NavigationItem): void {\n event.stopPropagation();\n this.itemAction.emit(item);\n }\n\n /**\n * Whether the item is the current link (see `currentItem`): it alone is\n * painted current and carries `aria-current=\"page\"`.\n */\n isItemActive(item: NavigationItem): boolean {\n return this.currentItem() === item;\n }\n\n /**\n * Check if a parent item contains the current link\n */\n hasActiveChild(item: NavigationItem): boolean {\n const current = this.currentItem();\n return !!current && !!item.children?.includes(current);\n }\n\n /**\n * Toggle expansion of a parent item.\n * If the sidenav is collapsed, expand it first.\n */\n toggleExpanded(item: NavigationItem): void {\n if (this.collapsed()) {\n this.collapsed.set(false);\n // Expand the clicked item after uncollapsing\n const expanded = new Set(this.expandedItems());\n expanded.add(item.id);\n this.expandedItems.set(expanded);\n return;\n }\n const expanded = new Set(this.expandedItems());\n if (expanded.has(item.id)) {\n expanded.delete(item.id);\n } else {\n expanded.add(item.id);\n }\n this.expandedItems.set(expanded);\n }\n\n /**\n * Check if an item is expanded\n */\n isExpanded(item: NavigationItem): boolean {\n return this.expandedItems().has(item.id);\n }\n\n /**\n * Handle keyboard navigation. Keyed on the EFFECTIVE mode: a docked sidenav\n * that has become a drawer below the mobile breakpoint must close on Escape\n * like any drawer.\n */\n @HostListener('document:keydown', ['$event'])\n handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.isOpen() && this.effectiveMode() === 'drawer') {\n this.handleClose();\n }\n }\n}\n","<!-- Drawer mode: render with overlay and conditional visibility -->\n@if (effectiveMode() === 'drawer') {\n @if (isOpen()) {\n <!-- Overlay backdrop -->\n @if (hasOverlay()) {\n <div\n class=\"lc-sidenav__overlay\"\n (click)=\"handleClose()\"\n aria-hidden=\"true\">\n </div>\n }\n\n <ng-container *ngTemplateOutlet=\"sidenavPanel\" />\n }\n}\n\n<!-- Docked mode: always render, visibility controlled by CSS -->\n@if (effectiveMode() === 'docked') {\n <ng-container *ngTemplateOutlet=\"sidenavPanel\" />\n}\n\n<!-- Shared sidenav panel template.\n The <aside> is a plain complementary region; the navigation landmark is\n the inner <nav> (nesting a role=\"navigation\" wrapper around a <nav> gave\n two navigation landmarks). In drawer mode the panel is a modal dialog:\n focus is captured (close button first, see cdkFocusInitial), trapped\n while open and restored to the opener when the panel is destroyed. -->\n<ng-template #sidenavPanel>\n <aside\n [class]=\"sidenavClasses()\"\n [ngStyle]=\"sidenavStyles()\"\n [attr.role]=\"effectiveMode() === 'drawer' ? 'dialog' : null\"\n [attr.aria-modal]=\"effectiveMode() === 'drawer' ? 'true' : null\"\n [attr.aria-label]=\"effectiveMode() === 'drawer' ? ariaLabel() : null\"\n [cdkTrapFocus]=\"effectiveMode() === 'drawer'\"\n [cdkTrapFocusAutoCapture]=\"effectiveMode() === 'drawer'\">\n\n <!-- Text brand (019): one link to home, never a toggle. Replaces the image logo. -->\n @if (brandName()) {\n <div\n class=\"lc-sidenav__logo lc-sidenav__logo--brand\"\n [class.lc-sidenav__logo--size-xs]=\"logoSize() === 'xs'\"\n [class.lc-sidenav__logo--size-sm]=\"logoSize() === 'sm'\"\n [class.lc-sidenav__logo--size-md]=\"logoSize() === 'md'\"\n [class.lc-sidenav__logo--size-lg]=\"logoSize() === 'lg'\"\n [class.lc-sidenav__logo--size-xl]=\"logoSize() === 'xl'\"\n >\n @if (brandHref()) {\n <!-- Plain link: works without the router and without JavaScript. -->\n <a\n [href]=\"brandHref()\"\n class=\"lc-sidenav__brand\"\n [attr.aria-label]=\"brandAriaLabel() || null\"\n [attr.data-tooltip]=\"brandName()\"\n (click)=\"handleBrandClick()\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </a>\n } @else {\n <a\n routerLink=\"/\"\n class=\"lc-sidenav__brand\"\n [attr.aria-label]=\"brandAriaLabel() || null\"\n [attr.data-tooltip]=\"brandName()\"\n (click)=\"handleBrandClick()\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </a>\n }\n </div>\n } @else if (showLogo()) {\n <!-- Logo area (sidebar-first layout) -->\n <div\n class=\"lc-sidenav__logo\"\n [class.lc-sidenav__logo--size-xs]=\"logoSize() === 'xs'\"\n [class.lc-sidenav__logo--size-sm]=\"logoSize() === 'sm'\"\n [class.lc-sidenav__logo--size-md]=\"logoSize() === 'md'\"\n [class.lc-sidenav__logo--size-lg]=\"logoSize() === 'lg'\"\n [class.lc-sidenav__logo--size-xl]=\"logoSize() === 'xl'\"\n >\n <button type=\"button\" class=\"lc-sidenav__logo-link\" [attr.aria-label]=\"toggleAriaLabel()\" (click)=\"toggleCollapsed()\">\n <lc-logo\n [variant]=\"collapsed() ? 'emblem' : 'full'\"\n [size]=\"collapsed() ? 'sm' : logoSize()\"\n [clickable]=\"false\"\n [colorMode]=\"theme() === 'dark' ? 'dark' : theme() === 'light' ? 'light' : 'auto'\"\n [src]=\"logoSrc()\"\n [emblemSrc]=\"logoEmblemSrc()\"\n [darkSrc]=\"logoDarkSrc()\"\n [darkEmblemSrc]=\"logoDarkEmblemSrc()\"\n [alt]=\"logoAlt() || 'Logo'\"\n />\n </button>\n @if (!collapsed() && effectiveMode() === 'docked') {\n <button\n type=\"button\"\n class=\"lc-sidenav__logo-toggle\"\n (click)=\"toggleCollapsed()\"\n [attr.aria-label]=\"collapseAriaLabel() || (position() === 'right' ? 'Collapse navigation to the right' : 'Collapse navigation to the left')\"\n [attr.title]=\"collapseTitle()\">\n <lc-icon\n [name]=\"position() === 'right' ? 'chevron-right' : 'chevron-left'\"\n size=\"sm\"\n [decorative]=\"true\" />\n </button>\n }\n </div>\n }\n\n <!-- Close button (drawer mode only) -->\n @if (effectiveMode() === 'drawer') {\n <button\n type=\"button\"\n class=\"lc-sidenav__close\"\n cdkFocusInitial\n (click)=\"handleClose()\"\n [attr.aria-label]=\"closeAriaLabel()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n }\n\n <!-- Navigation items (if provided) -->\n @if (items().length > 0) {\n <nav\n class=\"lc-sidenav__nav\"\n [class.lc-sidenav__nav--docked]=\"effectiveMode() === 'docked'\"\n [attr.aria-label]=\"ariaLabel()\">\n @for (item of sortedItems(); track item.id) {\n <!-- Section headline -->\n @if (item.isSection) {\n <div class=\"lc-sidenav__section\">\n <div class=\"lc-sidenav__section-header\">\n <h2 class=\"lc-sidenav__section-title\">{{ item.label }}</h2>\n @if (item.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"item.action.ariaLabel || item.label + ' action'\"\n (click)=\"handleItemAction($event, item)\">\n <lc-icon [name]=\"item.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n @if (item.children?.length) {\n <ul class=\"lc-sidenav__section-items\">\n @for (child of item.children; track child.id) {\n <li>\n @if (child.children?.length) {\n <!-- Section child with nested children (collapsible) -->\n <div class=\"lc-sidenav__nav-item-row\">\n <button\n type=\"button\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--parent\"\n [class.lc-sidenav__nav-item--expanded]=\"isExpanded(child)\"\n [class.lc-sidenav__nav-item--has-active-child]=\"hasActiveChild(child)\"\n (click)=\"toggleExpanded(child)\"\n [attr.aria-expanded]=\"isExpanded(child)\"\n [title]=\"collapsed() ? child.label : ''\">\n @if (child.icon) {\n <lc-icon [name]=\"child.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n }\n <span class=\"lc-sidenav__nav-label\">{{ child.label }}</span>\n @if (child.badge) {\n <lc-badge [variant]=\"child.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ child.badge.value }}</lc-badge>\n }\n <lc-icon name=\"chevron-down\" size=\"xs\" [decorative]=\"true\" class=\"lc-sidenav__nav-chevron\" />\n </button>\n @if (child.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"child.action.ariaLabel || child.label + ' action'\"\n (click)=\"handleItemAction($event, child)\">\n <lc-icon [name]=\"child.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n @if (isExpanded(child)) {\n <div class=\"lc-sidenav__nav-children\">\n @for (grandchild of child.children; track grandchild.id) {\n <a\n [routerLink]=\"grandchild.route\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--child\"\n (click)=\"handleItemClick(grandchild)\"\n [class.lc-sidenav__nav-item--active]=\"isItemActive(grandchild)\"\n [attr.aria-current]=\"isItemActive(grandchild) ? 'page' : null\">\n @if (grandchild.icon) {\n <lc-icon [name]=\"grandchild.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n }\n <span class=\"lc-sidenav__nav-label\">{{ grandchild.label }}</span>\n @if (grandchild.badge) {\n <lc-badge [variant]=\"grandchild.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ grandchild.badge.value }}</lc-badge>\n }\n </a>\n }\n </div>\n }\n } @else {\n <!-- Section child (simple link) -->\n <div class=\"lc-sidenav__nav-item-row\">\n <a\n [routerLink]=\"child.route\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--child\"\n (click)=\"handleItemClick(child)\"\n [class.lc-sidenav__nav-item--active]=\"isItemActive(child)\"\n [attr.aria-current]=\"isItemActive(child) ? 'page' : null\"\n [title]=\"collapsed() ? child.label : ''\">\n @if (child.icon) {\n <lc-icon [name]=\"child.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n }\n <span class=\"lc-sidenav__nav-label\">{{ child.label }}</span>\n @if (child.badge) {\n <lc-badge [variant]=\"child.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ child.badge.value }}</lc-badge>\n }\n </a>\n @if (child.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"child.action.ariaLabel || child.label + ' action'\"\n (click)=\"handleItemAction($event, child)\">\n <lc-icon [name]=\"child.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n }\n </li>\n }\n </ul>\n }\n </div>\n } @else if (item.children?.length) {\n <!-- Parent item with children (collapsible group) -->\n <div class=\"lc-sidenav__nav-item-row\">\n <button\n type=\"button\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--parent\"\n [class.lc-sidenav__nav-item--expanded]=\"isExpanded(item)\"\n [class.lc-sidenav__nav-item--has-active-child]=\"hasActiveChild(item)\"\n (click)=\"toggleExpanded(item)\"\n [attr.aria-expanded]=\"isExpanded(item)\"\n [title]=\"collapsed() ? item.label : ''\">\n <lc-icon [name]=\"item.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n <span class=\"lc-sidenav__nav-label\">{{ item.label }}</span>\n @if (item.badge) {\n <lc-badge [variant]=\"item.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ item.badge.value }}</lc-badge>\n }\n <lc-icon name=\"chevron-down\" size=\"xs\" [decorative]=\"true\" class=\"lc-sidenav__nav-chevron\" />\n </button>\n @if (item.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"item.action.ariaLabel || item.label + ' action'\"\n (click)=\"handleItemAction($event, item)\">\n <lc-icon [name]=\"item.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n @if (isExpanded(item)) {\n <div class=\"lc-sidenav__nav-children\">\n @for (child of item.children; track child.id) {\n <a\n [routerLink]=\"child.route\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--child\"\n (click)=\"handleItemClick(child)\"\n [class.lc-sidenav__nav-item--active]=\"isItemActive(child)\"\n [attr.aria-current]=\"isItemActive(child) ? 'page' : null\">\n <lc-icon [name]=\"child.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n <span class=\"lc-sidenav__nav-label\">{{ child.label }}</span>\n @if (child.badge) {\n <lc-badge [variant]=\"child.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ child.badge.value }}</lc-badge>\n }\n </a>\n }\n </div>\n }\n } @else {\n <!-- Simple item without children -->\n <div class=\"lc-sidenav__nav-item-row\">\n <a\n [routerLink]=\"item.route\"\n class=\"lc-sidenav__nav-item\"\n (click)=\"handleItemClick(item)\"\n [class.lc-sidenav__nav-item--active]=\"isItemActive(item)\"\n [attr.aria-current]=\"isItemActive(item) ? 'page' : null\"\n [title]=\"collapsed() ? item.label : ''\">\n <lc-icon [name]=\"item.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n <span class=\"lc-sidenav__nav-label\">{{ item.label }}</span>\n @if (item.badge) {\n <lc-badge [variant]=\"item.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ item.badge.value }}</lc-badge>\n }\n </a>\n @if (item.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"item.action.ariaLabel || item.label + ' action'\"\n (click)=\"handleItemAction($event, item)\">\n <lc-icon [name]=\"item.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n }\n }\n </nav>\n }\n\n <!-- Content projection (for custom content) -->\n <div class=\"lc-sidenav__content\" [class.lc-sidenav__content--docked]=\"effectiveMode() === 'docked'\">\n <ng-content></ng-content>\n </div>\n\n <!-- Collapse button at the bottom of the rail (019, docked only): on the icon column in both states. -->\n @if (showCollapseToggle() && effectiveMode() === 'docked') {\n <div class=\"lc-sidenav__collapse-row\">\n <button\n type=\"button\"\n class=\"lc-sidenav__collapse-toggle\"\n (click)=\"toggleCollapsed()\"\n [attr.aria-label]=\"collapseToggleLabel()\">\n <lc-icon\n [name]=\"collapseToggleIcon()\"\n size=\"sm\"\n [decorative]=\"true\" />\n </button>\n </div>\n }\n </aside>\n</ng-template>\n\n<!-- The brand link's content: the tile (decorative) and the name. -->\n<ng-template #brandContent>\n <span class=\"lc-sidenav__brand-tile\" aria-hidden=\"true\">\n @if (brandIcon()) {\n <lc-icon [name]=\"brandIcon()\" size=\"sm\" [decorative]=\"true\" />\n } @else {\n {{ brandInitial() }}\n }\n </span>\n <span class=\"lc-sidenav__brand-name\" [class.lc-sidenav__sr-only]=\"isRail()\">{{ brandName() }}</span>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;AA0HA,IAAa,mBAAb,MAAa,iBAAgB;CACV,SAAS,OAAO,MAAM;CAOtB,YAAY,OAAO,KAAK,OAAO,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAG3C,YAAY,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAGxB,WAAW,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAGvB,UAAU,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAEnB,gBAAgB,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;CAEzB,cAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAEvB,oBAAoB,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAE7B,UAAU,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAGnB,WAAW,MAAwC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAaxD,YAAY,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAOrB,YAAY,MAAM,IAAG,GAAA,YAAA,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KAAA;IAAA;GAAA;EAAA;EAAA,eAC1F,CAAC,iBAAiB;GAAC;GAAmB;GAAmB;EAAkB,CAAC,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAelF,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EAnB5B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAY,YACV;GAAI,SACP;IAAC;IAAkB;IAAS;IAAY;IAAY;IAAe;IAAgB;GAAa;GAAC,eAC3F,CAAC,iBAAiB;IAAC;IAAmB;IAAmB;GAAkB,CAAC,CAAC;GAAC,iBAG5E,wBAAwB;GAAM,MACzC;IACJ,gCAAgC;IAChC,wCAAwC;IACxC,sCAAsC;IAItC,uCAAuC;IACvC,sCAAsC;GACvC;GAAA,UAAA;GAAA,QAAA,CAAA,gojBAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuZA,MAAA;GAAa,MAAA,CAAA,oBAAoB,CAAC,QAAQ,CAAC"}
1
+ {"version":3,"file":"lifecorner-angular-ui-kit-sidenav.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/sidenav/sidenav.component.ts","../../../../libs/angular-ui-kit/src/lib/sidenav/sidenav.component.html"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n signal,\n computed,\n input,\n output,\n model,\n effect,\n untracked,\n HostListener,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet, NgStyle } from '@angular/common';\nimport { NavigationEnd, Router, RouterLink } from '@angular/router';\nimport { filter } from 'rxjs';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { NavigationItem } from '@lifecorner/angular-ui-kit/models';\nimport {\n currentItemParents,\n currentNavigationItem,\n navigationLinks,\n navigationPath,\n sortNavigationItems,\n} from '@lifecorner/angular-ui-kit/internal/navigation';\nimport { IconComponent, ɵprovideKitIcons } from '@lifecorner/angular-ui-kit/icon';\nimport { ICON_CHEVRON_DOWN, ICON_CHEVRON_LEFT, ICON_CHEVRON_RIGHT } from '@lifecorner/angular-ui-kit/icons';\nimport { BadgeComponent } from '@lifecorner/angular-ui-kit/badge';\nimport { LogoComponent } from '@lifecorner/angular-ui-kit/logo';\n\nexport type SidenavPosition = 'left' | 'right';\nexport type SidenavMode = 'drawer' | 'docked';\n\n/**\n * Surface of the docked sidenav: `default` is the rail on `--color-sidebar`\n * with a border; `transparent` has no background and no border and draws the\n * items as 48 px pills (the side navigation on the page, \"Weite\"). A drawer\n * keeps its surface in both.\n */\nexport type SidenavVariant = 'default' | 'transparent';\n\n/**\n * Sidenav component for application navigation sidebar.\n *\n * Features:\n * - Drawer (overlay) and docked (persistent) modes\n * - Responsive mobile mode — docked automatically switches to drawer below a configurable breakpoint\n * - Collapsed icon-rail mode (narrow 56px sidebar with icons only and hover tooltips)\n * - Integrated logo area with collapse-toggle (sidebar-first layouts)\n * - Text brand (`brandName`, `brandIcon`): an icon tile and the product name,\n * one link to home (`brandHref`, else `routerLink=\"/\"`), as high as the\n * `lc-header` next to it; the rail shows only the tile. It never toggles:\n * `showCollapseToggle` adds a collapse button at the bottom of the rail\n * - Hierarchical navigation with collapsible groups (up to 3 levels)\n * - Section headlines for item grouping with optional action buttons\n * - Action buttons on any item (hover-reveal)\n * - Badge support on items (count / status indicator), read after the label\n * through `badgeAriaLabel` (3.31); on the collapsed rail the label and the\n * badge text name the item\n * - One current item, announced and painted alike: the link for `activeRoute`\n * (or, without it, the one the router's URL matches) gets\n * `aria-current=\"page\"` and the current look, every other link neither\n * (AS-16). No hover color change on the current item\n * - Keyboard navigation support (Escape closes drawer)\n * - Configurable width and position (left/right)\n * - Optional backdrop overlay\n * - Theme variants: auto, light, dark (with teal accent for dark mode). The\n * theming hooks (`--lc-sidenav-bg`, `-fg`, `-fg-active`, `-border`,\n * `-hover-bg`, `-section-fg`, `-active-bg`, `-active-fg`, `-active-icon`,\n * `-badge-ring`) can be set on `lc-sidenav` or any ancestor (3.15); a value\n * on the element wins over an ancestor's, and both win over `theme` (3.14).\n * Set the same ones for `lc-sidenav-placeholder`, e.g. on a shared ancestor;\n * `--lc-sidenav-active-indicator`\n * (the current item's 2 px bar, default `--color-primary-500`; on a\n * `theme=\"light\"` rail #208497 on any page, like its focus rings),\n * `--lc-sidenav-brand-tile-bg` (default `--color-primary-fill`) and\n * `--lc-sidenav-brand-tile-fg` (default `--color-on-primary`) can be set on\n * any ancestor\n * - `variant=\"transparent\"`: no rail background or border, items as 48 px\n * pills with 16 px labels, the current one on `--color-surface-selected`\n * - Items are at least 44 px high in every density; the current item's ink is\n * `--color-on-surface-selected` (AA on the selected tint)\n * - Accessible: the inner `<nav>` is the navigation landmark; in drawer mode\n * the panel is a modal dialog (`role=\"dialog\"`, focus moved to the close\n * button on open, trapped while open, restored on close)\n *\n * @example\n * ```html\n * <lc-sidenav\n * [isOpen]=\"isOpen\"\n * mode=\"docked\"\n * [(collapsed)]=\"isCollapsed\"\n * [showLogo]=\"true\"\n * logoSize=\"md\"\n * [mobileBreakpoint]=\"768\"\n * [items]=\"navItems\"\n * activeRoute=\"/dashboard\"\n * theme=\"dark\"\n * (closed)=\"isOpen = false\"\n * (itemClicked)=\"navigate($event)\"\n * (itemAction)=\"onAction($event)\" />\n * ```\n */\n@Component({\n selector: 'lc-sidenav',\n standalone: true,\n imports: [NgTemplateOutlet, NgStyle, RouterLink, A11yModule, IconComponent, BadgeComponent, LogoComponent],\n viewProviders: [ɵprovideKitIcons([ICON_CHEVRON_DOWN, ICON_CHEVRON_LEFT, ICON_CHEVRON_RIGHT])],\n templateUrl: './sidenav.component.html',\n styleUrl: './sidenav.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.lc-sidenav-container]': 'true',\n '[class.lc-sidenav-container--docked]': \"effectiveMode() === 'docked'\",\n '[class.lc-sidenav-container--open]': 'isOpen()',\n // `theme` on the host (019): the themed values are private host variables\n // that the public `--lc-sidenav-*` hooks fall back to, so an app's hooks\n // on `lc-sidenav` win over `theme=\"dark\"` / `\"light\"`.\n '[class.lc-sidenav-container--light]': \"theme() === 'light'\",\n '[class.lc-sidenav-container--dark]': \"theme() === 'dark'\",\n },\n})\nexport class SidenavComponent implements OnDestroy {\n private readonly router = inject(Router);\n\n /**\n * The router's URL, updated on every `NavigationEnd`. Before the first\n * navigation it is the router's initial URL (`/`). Read only when\n * `activeRoute` is empty.\n */\n private readonly routerUrl = signal(this.router.url);\n\n /** Whether the sidenav is collapsed to icon-only rail (two-way bindable) */\n readonly collapsed = model(false);\n\n /** Whether to show the logo at the top of the sidenav */\n readonly showLogo = input(false);\n\n /** Custom URL for the full brand logo (forwarded to inner `<lc-logo>`). */\n readonly logoSrc = input('');\n /** Custom URL for the emblem-only brand logo. */\n readonly logoEmblemSrc = input('');\n /** Optional dark-theme URL for the full brand logo. */\n readonly logoDarkSrc = input('');\n /** Optional dark-theme URL for the emblem-only brand logo. */\n readonly logoDarkEmblemSrc = input('');\n /** Alt text for the brand logo. */\n readonly logoAlt = input('');\n\n /** Size of the brand logo (forwarded to inner `<lc-logo>`). Defaults to `md` for a prominent brand block aligned with `<lc-header size=\"md\">` (both 64px). Also sets the height of the text brand (`brandName`). */\n readonly logoSize = input<'xs' | 'sm' | 'md' | 'lg' | 'xl'>('md');\n\n /**\n * Product name shown as a text brand at the top: an icon tile and the name,\n * one link to home. Replaces the image logo (`showLogo`). The block is as\n * high as the image logo (`logoSize`: 64 px for `md`, matching\n * `lc-header size=\"md\"`); the name wraps to two lines at most, and the full\n * name stays the link's accessible name. Collapsed, only the tile shows.\n * The brand never toggles the rail (see `showCollapseToggle`). Under\n * `@defer`, give the `lc-sidenav-placeholder` `[showLogo]=\"true\"` and the\n * same `logoSize` to reserve the block. Empty: no text brand.\n * @default ''\n */\n readonly brandName = input('');\n\n /**\n * `lc-icon` name in the brand tile (decorative). Empty: the tile shows the\n * name's first letter. Renders nothing without `brandName`.\n * @default ''\n */\n readonly brandIcon = input('');\n\n /**\n * Plain URL of the brand link (a native `<a href>`, works without the\n * router). Empty: `routerLink=\"/\"`, as `lc-header`'s `homeHref`.\n * @default ''\n */\n readonly brandHref = input('');\n\n /**\n * Accessible name of the brand link. Empty: the brand name. Start it with\n * the visible name, e.g. `'Finance Intelligence – home'`.\n * @default ''\n */\n readonly brandAriaLabel = input('');\n\n /**\n * Docked mode: a button at the bottom of the rail collapses and expands it\n * (`collapsed`). Independent of the brand. With `showLogo` the image logo\n * toggles already, so use one of the two.\n * @default false\n */\n readonly showCollapseToggle = input(false);\n\n /**\n * Accessible name of the collapse button (`showCollapseToggle`) while the\n * rail is collapsed. Expanded, it uses `collapseAriaLabel`.\n * @default 'Expand navigation'\n */\n readonly expandAriaLabel = input('Expand navigation');\n\n /** Whether the sidenav is open */\n readonly isOpen = input(false);\n\n /** Display mode: 'drawer' (overlay) or 'docked' (persistent sidebar) */\n readonly mode = input<SidenavMode>('drawer');\n\n /** Mobile breakpoint in pixels. Below this width, docked mode switches to drawer. */\n readonly mobileBreakpoint = input(768);\n\n /** Whether the viewport is below the mobile breakpoint */\n readonly isMobile = signal(false);\n\n /** Effective mode: switches docked → drawer on mobile */\n readonly effectiveMode = computed(() => {\n if (this.isMobile() && this.mode() === 'docked') {\n return 'drawer' as SidenavMode;\n }\n return this.mode();\n });\n\n private mediaQuery: MediaQueryList | null = null;\n private mediaHandler = (e: MediaQueryListEvent) => this.isMobile.set(e.matches);\n\n /** Position of the sidenav (left or right) */\n readonly position = input<SidenavPosition>('left');\n\n /** Width of the sidenav drawer */\n readonly width = input('320px');\n\n /**\n * ARIA label of the navigation landmark (the inner `<nav>`) and, in drawer\n * mode, of the dialog panel.\n */\n readonly ariaLabel = input('Side navigation');\n\n /** Whether to show the overlay backdrop */\n readonly hasOverlay = input(true);\n\n /**\n * Navigation items (`NavigationItem[]`): `id`, `icon`, `label`, `route`,\n * `displayOrder` (sort order, 1 = first); optional `children`\n * (`NavigationItem[]`, a collapsible group, up to 3 levels), `isSection`\n * (renders `label` as a section headline over its `children`), `badge`\n * (`{ value: string | number; variant?: 'default' | 'primary' | 'success' |\n * 'warning' | 'error' | 'info' }`), `action` (`{ icon: string; ariaLabel?:\n * string }`, a button that emits `itemAction`), `requiredRole` (for the\n * app's own filtering; not evaluated here). Items link with `routerLink`;\n * exactly one link, the current item (see `activeRoute`), gets\n * `aria-current=\"page\"`.\n * @default []\n */\n readonly items = input<NavigationItem[]>([]);\n\n /**\n * The current route. When set, the first link (in display order) whose\n * `route` equals it is the current item: it alone gets `aria-current=\"page\"`\n * and the current look, whatever the router matches. When empty, the\n * sidenav follows the router: the link whose route equals the URL's path is\n * current, otherwise the one with the longest route the path starts with\n * (`/household` on `/household/members`; `/` only on `/`). Routes are\n * compared as written, so give them as absolute paths (`'/household'`).\n * @default ''\n */\n readonly activeRoute = input('');\n\n /** Theme variant for the sidenav */\n readonly theme = input<'light' | 'dark' | 'auto'>('auto');\n\n /**\n * Surface of the docked sidenav: `default` (the rail with background and\n * border) or `transparent` (no background, no border, items as 48 px pills\n * with radius full and 16 px labels; the current one on\n * `--color-surface-selected`). A drawer keeps its surface.\n */\n readonly variant = input<SidenavVariant>('default');\n\n /** Accessible name of the logo button that collapses/expands the sidebar. */\n readonly toggleAriaLabel = input('Toggle sidebar');\n\n /** Accessible name of the collapse button. Empty: \"Collapse navigation to the left/right\" by `position`. */\n readonly collapseAriaLabel = input('');\n\n /** Tooltip of the collapse button. */\n readonly collapseTitle = input('Collapse sidebar');\n\n /** Accessible name of the close button (drawer mode). */\n readonly closeAriaLabel = input('Close navigation');\n\n /**\n * Text read after an item's label when it has a badge, at every level. On\n * the collapsed rail, where labels are hidden, the label and this text name\n * the item. `{value}` is replaced with the badge value, e.g.\n * `'{value} offen'` → \"Stammdaten 1 offen\". The badge itself is hidden from\n * screen readers. Empty: the badge isn't read.\n *\n * @default '{value}'\n */\n readonly badgeAriaLabel = input('{value}');\n\n /**\n * Ids of the expanded parent items — the single source of truth for\n * `isExpanded`. Seeded with the current item's parent whenever it changes\n * (see constructor), so a group opens on navigation but can still\n * be collapsed by the user. (It used to be OR-ed with `hasActiveChild` at\n * read time, so toggling such a group flipped the set without ever closing\n * it — the set drifted out of sync with what was on screen.)\n */\n readonly expandedItems = signal<Set<string>>(new Set());\n\n /** Ids of the collapsible parents (top-level groups, section sub-groups) that contain the current item. */\n private readonly activeChildParents = computed(() => currentItemParents(this.items(), this.currentItem()));\n\n /**\n * Computed sorted navigation items by displayOrder\n */\n readonly sortedItems = computed(() => sortNavigationItems(this.items()));\n\n /**\n * Every item rendered as a link, in display order (depth first): simple\n * items, the children of a group, the children of a section, and the\n * children of a section's sub-group.\n */\n private readonly linkItems = computed(() => navigationLinks(this.sortedItems()));\n\n /** The router URL's path: primary outlet only, no query, fragment or matrix parameters. */\n private readonly routerPath = computed(() => navigationPath(this.router, this.routerUrl()));\n\n /**\n * The one current link (or none). The single source of both the current\n * look (`lc-sidenav__nav-item--active`) and `aria-current=\"page\"` (AS-16).\n * With `activeRoute` set: the first link whose route equals it. Without:\n * the router's path — the exact match wins, otherwise the longest link\n * route the path continues with a `/` (`/` matches only `/`); ties go to\n * the first link in display order. The rules live in\n * `internal/navigation` since 3.6, shared with `lc-sidenav-placeholder`.\n */\n private readonly currentItem = computed<NavigationItem | null>(() =>\n currentNavigationItem(this.linkItems(), this.activeRoute(), this.activeRoute() === '' ? this.routerPath() : ''),\n );\n\n /**\n * Event emitted when the sidenav should close\n */\n readonly closed = output<void>();\n\n /**\n * Event emitted when a navigation item is clicked\n */\n readonly itemClicked = output<NavigationItem>();\n\n /**\n * Event emitted when an item's action button is clicked\n */\n readonly itemAction = output<NavigationItem>();\n\n constructor() {\n this.router.events\n .pipe(\n filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.routerUrl.set(this.router.url));\n\n // React to mobileBreakpoint changes\n effect(() => {\n this.mobileBreakpoint(); // track dependency\n this.setupMediaQuery();\n });\n\n // Navigating into a group opens it: add the active child's parent(s) to\n // the expanded set. Only additive — the user's own collapses/expands of\n // other groups survive a route change.\n effect(() => {\n const parents = this.activeChildParents();\n if (parents.length === 0) return;\n const expanded = untracked(this.expandedItems);\n if (parents.every((id) => expanded.has(id))) return;\n this.expandedItems.set(new Set([...expanded, ...parents]));\n });\n }\n\n ngOnDestroy(): void {\n this.teardownMediaQuery();\n }\n\n private setupMediaQuery(): void {\n if (typeof window === 'undefined') return;\n this.teardownMediaQuery();\n this.mediaQuery = window.matchMedia(`(max-width: ${this.mobileBreakpoint()}px)`);\n this.isMobile.set(this.mediaQuery.matches);\n this.mediaQuery.addEventListener('change', this.mediaHandler);\n }\n\n private teardownMediaQuery(): void {\n this.mediaQuery?.removeEventListener('change', this.mediaHandler);\n this.mediaQuery = null;\n }\n\n /**\n * Computed CSS classes for the sidenav\n */\n sidenavClasses = computed(() => {\n const classes = ['lc-sidenav'];\n classes.push(`lc-sidenav--${this.position()}`);\n classes.push(`lc-sidenav--${this.effectiveMode()}`);\n if (this.isOpen()) {\n classes.push('lc-sidenav--open');\n }\n if (this.collapsed() && !this.isMobile()) {\n classes.push('lc-sidenav--collapsed');\n }\n if (this.theme() !== 'auto') {\n classes.push(`lc-sidenav--${this.theme()}`);\n }\n if (this.variant() === 'transparent') {\n classes.push('lc-sidenav--transparent');\n }\n return classes.join(' ');\n });\n\n /**\n * Computed inline styles for the sidenav\n */\n sidenavStyles = computed(() => ({\n width: this.isMobile() ? this.width() : (this.collapsed() ? '56px' : this.width()),\n }));\n\n /** The brand tile's letter when there is no `brandIcon`: the name's first character, upper-cased. */\n protected readonly brandInitial = computed(() => ([...this.brandName().trim()][0] ?? '').toUpperCase());\n\n /** Whether the rail shows only icons (as `lc-sidenav--collapsed`). */\n protected readonly isRail = computed(() => this.collapsed() && !this.isMobile());\n\n /** Visually hidden badge text: `badgeAriaLabel` with `{value}`; on the rail, where labels are hidden, after the label. */\n protected badgeText(item: NavigationItem): string {\n if (!item.badge) return '';\n const text = this.badgeAriaLabel().replace('{value}', String(item.badge.value));\n return this.isRail() ? `${item.label} ${text}` : text;\n }\n\n /** The collapse button's accessible name: what a press does. */\n protected readonly collapseToggleLabel = computed(() =>\n this.collapsed()\n ? this.expandAriaLabel()\n : this.collapseAriaLabel() ||\n (this.position() === 'right' ? 'Collapse navigation to the right' : 'Collapse navigation to the left'),\n );\n\n /** The collapse button's chevron points where the rail moves: ⟨ to collapse a left rail, ⟩ to expand it (mirrored on the right). */\n protected readonly collapseToggleIcon = computed(() => {\n const towardsLeft = this.position() === 'right' ? this.collapsed() : !this.collapsed();\n return towardsLeft ? 'chevron-left' : 'chevron-right';\n });\n\n /**\n * Toggle collapsed state\n */\n toggleCollapsed(): void {\n this.collapsed.set(!this.collapsed());\n }\n\n /** The brand link closes the drawer on a phone, as the items do. */\n handleBrandClick(): void {\n if (this.isMobile()) {\n this.handleClose();\n }\n }\n\n /**\n * Handle close action\n */\n handleClose(): void {\n this.closed.emit();\n }\n\n /**\n * Handle navigation item click\n */\n handleItemClick(item: NavigationItem): void {\n this.itemClicked.emit(item);\n // Auto-close drawer on mobile after navigation\n if (this.isMobile()) {\n this.handleClose();\n }\n }\n\n /**\n * Handle action button click on a navigation item\n */\n handleItemAction(event: Event, item: NavigationItem): void {\n event.stopPropagation();\n this.itemAction.emit(item);\n }\n\n /**\n * Whether the item is the current link (see `currentItem`): it alone is\n * painted current and carries `aria-current=\"page\"`.\n */\n isItemActive(item: NavigationItem): boolean {\n return this.currentItem() === item;\n }\n\n /**\n * Check if a parent item contains the current link\n */\n hasActiveChild(item: NavigationItem): boolean {\n const current = this.currentItem();\n return !!current && !!item.children?.includes(current);\n }\n\n /**\n * Toggle expansion of a parent item.\n * If the sidenav is collapsed, expand it first.\n */\n toggleExpanded(item: NavigationItem): void {\n if (this.collapsed()) {\n this.collapsed.set(false);\n // Expand the clicked item after uncollapsing\n const expanded = new Set(this.expandedItems());\n expanded.add(item.id);\n this.expandedItems.set(expanded);\n return;\n }\n const expanded = new Set(this.expandedItems());\n if (expanded.has(item.id)) {\n expanded.delete(item.id);\n } else {\n expanded.add(item.id);\n }\n this.expandedItems.set(expanded);\n }\n\n /**\n * Check if an item is expanded\n */\n isExpanded(item: NavigationItem): boolean {\n return this.expandedItems().has(item.id);\n }\n\n /**\n * Handle keyboard navigation. Keyed on the EFFECTIVE mode: a docked sidenav\n * that has become a drawer below the mobile breakpoint must close on Escape\n * like any drawer.\n */\n @HostListener('document:keydown', ['$event'])\n handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.isOpen() && this.effectiveMode() === 'drawer') {\n this.handleClose();\n }\n }\n}\n","<!-- Drawer mode: render with overlay and conditional visibility -->\n@if (effectiveMode() === 'drawer') {\n @if (isOpen()) {\n <!-- Overlay backdrop -->\n @if (hasOverlay()) {\n <div\n class=\"lc-sidenav__overlay\"\n (click)=\"handleClose()\"\n aria-hidden=\"true\">\n </div>\n }\n\n <ng-container *ngTemplateOutlet=\"sidenavPanel\" />\n }\n}\n\n<!-- Docked mode: always render, visibility controlled by CSS -->\n@if (effectiveMode() === 'docked') {\n <ng-container *ngTemplateOutlet=\"sidenavPanel\" />\n}\n\n<!-- Shared sidenav panel template.\n The <aside> is a plain complementary region; the navigation landmark is\n the inner <nav> (nesting a role=\"navigation\" wrapper around a <nav> gave\n two navigation landmarks). In drawer mode the panel is a modal dialog:\n focus is captured (close button first, see cdkFocusInitial), trapped\n while open and restored to the opener when the panel is destroyed. -->\n<ng-template #sidenavPanel>\n <aside\n [class]=\"sidenavClasses()\"\n [ngStyle]=\"sidenavStyles()\"\n [attr.role]=\"effectiveMode() === 'drawer' ? 'dialog' : null\"\n [attr.aria-modal]=\"effectiveMode() === 'drawer' ? 'true' : null\"\n [attr.aria-label]=\"effectiveMode() === 'drawer' ? ariaLabel() : null\"\n [cdkTrapFocus]=\"effectiveMode() === 'drawer'\"\n [cdkTrapFocusAutoCapture]=\"effectiveMode() === 'drawer'\">\n\n <!-- Text brand (019): one link to home, never a toggle. Replaces the image logo. -->\n @if (brandName()) {\n <div\n class=\"lc-sidenav__logo lc-sidenav__logo--brand\"\n [class.lc-sidenav__logo--size-xs]=\"logoSize() === 'xs'\"\n [class.lc-sidenav__logo--size-sm]=\"logoSize() === 'sm'\"\n [class.lc-sidenav__logo--size-md]=\"logoSize() === 'md'\"\n [class.lc-sidenav__logo--size-lg]=\"logoSize() === 'lg'\"\n [class.lc-sidenav__logo--size-xl]=\"logoSize() === 'xl'\"\n >\n @if (brandHref()) {\n <!-- Plain link: works without the router and without JavaScript. -->\n <a\n [href]=\"brandHref()\"\n class=\"lc-sidenav__brand\"\n [attr.aria-label]=\"brandAriaLabel() || null\"\n [attr.data-tooltip]=\"brandName()\"\n (click)=\"handleBrandClick()\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </a>\n } @else {\n <a\n routerLink=\"/\"\n class=\"lc-sidenav__brand\"\n [attr.aria-label]=\"brandAriaLabel() || null\"\n [attr.data-tooltip]=\"brandName()\"\n (click)=\"handleBrandClick()\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </a>\n }\n </div>\n } @else if (showLogo()) {\n <!-- Logo area (sidebar-first layout) -->\n <div\n class=\"lc-sidenav__logo\"\n [class.lc-sidenav__logo--size-xs]=\"logoSize() === 'xs'\"\n [class.lc-sidenav__logo--size-sm]=\"logoSize() === 'sm'\"\n [class.lc-sidenav__logo--size-md]=\"logoSize() === 'md'\"\n [class.lc-sidenav__logo--size-lg]=\"logoSize() === 'lg'\"\n [class.lc-sidenav__logo--size-xl]=\"logoSize() === 'xl'\"\n >\n <button type=\"button\" class=\"lc-sidenav__logo-link\" [attr.aria-label]=\"toggleAriaLabel()\" (click)=\"toggleCollapsed()\">\n <lc-logo\n [variant]=\"collapsed() ? 'emblem' : 'full'\"\n [size]=\"collapsed() ? 'sm' : logoSize()\"\n [clickable]=\"false\"\n [colorMode]=\"theme() === 'dark' ? 'dark' : theme() === 'light' ? 'light' : 'auto'\"\n [src]=\"logoSrc()\"\n [emblemSrc]=\"logoEmblemSrc()\"\n [darkSrc]=\"logoDarkSrc()\"\n [darkEmblemSrc]=\"logoDarkEmblemSrc()\"\n [alt]=\"logoAlt() || 'Logo'\"\n />\n </button>\n @if (!collapsed() && effectiveMode() === 'docked') {\n <button\n type=\"button\"\n class=\"lc-sidenav__logo-toggle\"\n (click)=\"toggleCollapsed()\"\n [attr.aria-label]=\"collapseAriaLabel() || (position() === 'right' ? 'Collapse navigation to the right' : 'Collapse navigation to the left')\"\n [attr.title]=\"collapseTitle()\">\n <lc-icon\n [name]=\"position() === 'right' ? 'chevron-right' : 'chevron-left'\"\n size=\"sm\"\n [decorative]=\"true\" />\n </button>\n }\n </div>\n }\n\n <!-- Close button (drawer mode only) -->\n @if (effectiveMode() === 'drawer') {\n <button\n type=\"button\"\n class=\"lc-sidenav__close\"\n cdkFocusInitial\n (click)=\"handleClose()\"\n [attr.aria-label]=\"closeAriaLabel()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n }\n\n <!-- Navigation items (if provided) -->\n @if (items().length > 0) {\n <nav\n class=\"lc-sidenav__nav\"\n [class.lc-sidenav__nav--docked]=\"effectiveMode() === 'docked'\"\n [attr.aria-label]=\"ariaLabel()\">\n @for (item of sortedItems(); track item.id) {\n <!-- Section headline -->\n @if (item.isSection) {\n <div class=\"lc-sidenav__section\">\n <div class=\"lc-sidenav__section-header\">\n <h2 class=\"lc-sidenav__section-title\">{{ item.label }}</h2>\n @if (item.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"item.action.ariaLabel || item.label + ' action'\"\n (click)=\"handleItemAction($event, item)\">\n <lc-icon [name]=\"item.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n @if (item.children?.length) {\n <ul class=\"lc-sidenav__section-items\">\n @for (child of item.children; track child.id) {\n <li>\n @if (child.children?.length) {\n <!-- Section child with nested children (collapsible) -->\n <div class=\"lc-sidenav__nav-item-row\">\n <button\n type=\"button\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--parent\"\n [class.lc-sidenav__nav-item--expanded]=\"isExpanded(child)\"\n [class.lc-sidenav__nav-item--has-active-child]=\"hasActiveChild(child)\"\n (click)=\"toggleExpanded(child)\"\n [attr.aria-expanded]=\"isExpanded(child)\"\n [title]=\"collapsed() ? child.label : ''\">\n @if (child.icon) {\n <lc-icon [name]=\"child.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n }\n <span class=\"lc-sidenav__nav-label\">{{ child.label }}</span>\n @if (child.badge) {\n <lc-badge aria-hidden=\"true\" [variant]=\"child.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ child.badge.value }}</lc-badge>&ngsp;<span class=\"lc-sidenav__sr-only\">{{ badgeText(child) }}</span>\n }\n <lc-icon name=\"chevron-down\" size=\"xs\" [decorative]=\"true\" class=\"lc-sidenav__nav-chevron\" />\n </button>\n @if (child.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"child.action.ariaLabel || child.label + ' action'\"\n (click)=\"handleItemAction($event, child)\">\n <lc-icon [name]=\"child.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n @if (isExpanded(child)) {\n <div class=\"lc-sidenav__nav-children\">\n @for (grandchild of child.children; track grandchild.id) {\n <a\n [routerLink]=\"grandchild.route\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--child\"\n (click)=\"handleItemClick(grandchild)\"\n [class.lc-sidenav__nav-item--active]=\"isItemActive(grandchild)\"\n [attr.aria-current]=\"isItemActive(grandchild) ? 'page' : null\">\n @if (grandchild.icon) {\n <lc-icon [name]=\"grandchild.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n }\n <span class=\"lc-sidenav__nav-label\">{{ grandchild.label }}</span>\n @if (grandchild.badge) {\n <lc-badge aria-hidden=\"true\" [variant]=\"grandchild.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ grandchild.badge.value }}</lc-badge>&ngsp;<span class=\"lc-sidenav__sr-only\">{{ badgeText(grandchild) }}</span>\n }\n </a>\n }\n </div>\n }\n } @else {\n <!-- Section child (simple link) -->\n <div class=\"lc-sidenav__nav-item-row\">\n <a\n [routerLink]=\"child.route\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--child\"\n (click)=\"handleItemClick(child)\"\n [class.lc-sidenav__nav-item--active]=\"isItemActive(child)\"\n [attr.aria-current]=\"isItemActive(child) ? 'page' : null\"\n [title]=\"collapsed() ? child.label : ''\">\n @if (child.icon) {\n <lc-icon [name]=\"child.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n }\n <span class=\"lc-sidenav__nav-label\">{{ child.label }}</span>\n @if (child.badge) {\n <lc-badge aria-hidden=\"true\" [variant]=\"child.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ child.badge.value }}</lc-badge>&ngsp;<span class=\"lc-sidenav__sr-only\">{{ badgeText(child) }}</span>\n }\n </a>\n @if (child.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"child.action.ariaLabel || child.label + ' action'\"\n (click)=\"handleItemAction($event, child)\">\n <lc-icon [name]=\"child.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n }\n </li>\n }\n </ul>\n }\n </div>\n } @else if (item.children?.length) {\n <!-- Parent item with children (collapsible group) -->\n <div class=\"lc-sidenav__nav-item-row\">\n <button\n type=\"button\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--parent\"\n [class.lc-sidenav__nav-item--expanded]=\"isExpanded(item)\"\n [class.lc-sidenav__nav-item--has-active-child]=\"hasActiveChild(item)\"\n (click)=\"toggleExpanded(item)\"\n [attr.aria-expanded]=\"isExpanded(item)\"\n [title]=\"collapsed() ? item.label : ''\">\n <lc-icon [name]=\"item.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n <span class=\"lc-sidenav__nav-label\">{{ item.label }}</span>\n @if (item.badge) {\n <lc-badge aria-hidden=\"true\" [variant]=\"item.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ item.badge.value }}</lc-badge>&ngsp;<span class=\"lc-sidenav__sr-only\">{{ badgeText(item) }}</span>\n }\n <lc-icon name=\"chevron-down\" size=\"xs\" [decorative]=\"true\" class=\"lc-sidenav__nav-chevron\" />\n </button>\n @if (item.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"item.action.ariaLabel || item.label + ' action'\"\n (click)=\"handleItemAction($event, item)\">\n <lc-icon [name]=\"item.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n @if (isExpanded(item)) {\n <div class=\"lc-sidenav__nav-children\">\n @for (child of item.children; track child.id) {\n <a\n [routerLink]=\"child.route\"\n class=\"lc-sidenav__nav-item lc-sidenav__nav-item--child\"\n (click)=\"handleItemClick(child)\"\n [class.lc-sidenav__nav-item--active]=\"isItemActive(child)\"\n [attr.aria-current]=\"isItemActive(child) ? 'page' : null\">\n <lc-icon [name]=\"child.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n <span class=\"lc-sidenav__nav-label\">{{ child.label }}</span>\n @if (child.badge) {\n <lc-badge aria-hidden=\"true\" [variant]=\"child.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ child.badge.value }}</lc-badge>&ngsp;<span class=\"lc-sidenav__sr-only\">{{ badgeText(child) }}</span>\n }\n </a>\n }\n </div>\n }\n } @else {\n <!-- Simple item without children -->\n <div class=\"lc-sidenav__nav-item-row\">\n <a\n [routerLink]=\"item.route\"\n class=\"lc-sidenav__nav-item\"\n (click)=\"handleItemClick(item)\"\n [class.lc-sidenav__nav-item--active]=\"isItemActive(item)\"\n [attr.aria-current]=\"isItemActive(item) ? 'page' : null\"\n [title]=\"collapsed() ? item.label : ''\">\n <lc-icon [name]=\"item.icon\" size=\"sm\" [decorative]=\"true\" class=\"lc-sidenav__nav-icon\" />\n <span class=\"lc-sidenav__nav-label\">{{ item.label }}</span>\n @if (item.badge) {\n <lc-badge aria-hidden=\"true\" [variant]=\"item.badge.variant || 'default'\" size=\"xs\" [rounded]=\"true\" class=\"lc-sidenav__nav-badge\">{{ item.badge.value }}</lc-badge>&ngsp;<span class=\"lc-sidenav__sr-only\">{{ badgeText(item) }}</span>\n }\n </a>\n @if (item.action) {\n <button\n type=\"button\"\n class=\"lc-sidenav__action-btn\"\n [attr.aria-label]=\"item.action.ariaLabel || item.label + ' action'\"\n (click)=\"handleItemAction($event, item)\">\n <lc-icon [name]=\"item.action.icon\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </div>\n }\n }\n </nav>\n }\n\n <!-- Content projection (for custom content) -->\n <div class=\"lc-sidenav__content\" [class.lc-sidenav__content--docked]=\"effectiveMode() === 'docked'\">\n <ng-content></ng-content>\n </div>\n\n <!-- Collapse button at the bottom of the rail (019, docked only): on the icon column in both states. -->\n @if (showCollapseToggle() && effectiveMode() === 'docked') {\n <div class=\"lc-sidenav__collapse-row\">\n <button\n type=\"button\"\n class=\"lc-sidenav__collapse-toggle\"\n (click)=\"toggleCollapsed()\"\n [attr.aria-label]=\"collapseToggleLabel()\">\n <lc-icon\n [name]=\"collapseToggleIcon()\"\n size=\"sm\"\n [decorative]=\"true\" />\n </button>\n </div>\n }\n </aside>\n</ng-template>\n\n<!-- The brand link's content: the tile (decorative) and the name. -->\n<ng-template #brandContent>\n <span class=\"lc-sidenav__brand-tile\" aria-hidden=\"true\">\n @if (brandIcon()) {\n <lc-icon [name]=\"brandIcon()\" size=\"sm\" [decorative]=\"true\" />\n } @else {\n {{ brandInitial() }}\n }\n </span>\n <span class=\"lc-sidenav__brand-name\" [class.lc-sidenav__sr-only]=\"isRail()\">{{ brandName() }}</span>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;AA4HA,IAAa,mBAAb,MAAa,iBAAgB;CACV,SAAS,OAAO,MAAM;CAOtB,YAAY,OAAO,KAAK,OAAO,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAG3C,YAAY,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAGxB,WAAW,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAGvB,UAAU,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAEnB,gBAAgB,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;CAEzB,cAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;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;IACxC,sCAAsC;IAItC,uCAAuC;IACvC,sCAAsC;GACvC;GAAA,UAAA;GAAA,QAAA,CAAA,gojBAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyaA,MAAA;GAAa,MAAA,CAAA,oBAAoB,CAAC,QAAQ,CAAC"}
@@ -3,6 +3,7 @@ import { ChangeDetectionStrategy, Component, Directive, ElementRef, HostListener
3
3
  import { Overlay } from "@angular/cdk/overlay";
4
4
  import { ComponentPortal } from "@angular/cdk/portal";
5
5
  import { OverlayStackService } from "@lifecorner/angular-ui-kit/internal/overlay";
6
+ import { closestLang } from "@lifecorner/angular-ui-kit/internal/a11y";
6
7
  var TooltipContentComponent = class TooltipContentComponent {
7
8
  content = "";
8
9
  static ɵfac = i0.ɵɵngDeclareFactory({
@@ -153,6 +154,8 @@ var TooltipDirective = class TooltipDirective {
153
154
  this.tooltipRef.instance.content = this.lcTooltip();
154
155
  const tooltipEl = this.tooltipRef.location.nativeElement;
155
156
  this.renderer.setAttribute(tooltipEl, "id", this.tooltipId);
157
+ const lang = closestLang(this.elementRef.nativeElement);
158
+ if (lang !== null) this.renderer.setAttribute(tooltipEl, "lang", lang);
156
159
  this.addDescribedBy();
157
160
  this.setPositionClass(this.tooltipPosition());
158
161
  this.overlayStack.push(this.tooltipId);
@@ -1 +1 @@
1
- {"version":3,"file":"lifecorner-angular-ui-kit-tooltip.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/tooltip/tooltip.directive.ts"],"sourcesContent":["import {\n Directive,\n input,\n ElementRef,\n OnDestroy,\n Renderer2,\n ViewContainerRef,\n ComponentRef,\n HostListener,\n Component,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport { Overlay, OverlayRef, ConnectedPosition } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Subscription } from 'rxjs';\nimport { OverlayStackService } from '@lifecorner/angular-ui-kit/internal/overlay';\n\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Internal tooltip content component\n */\n@Component({\n selector: 'lc-tooltip-content',\n standalone: true,\n imports: [],\n template: `<div class=\"lc-tooltip-inner\">{{ content }}</div>`,\n styles: [\n `\n :host {\n display: block;\n /* Inverted surface: reads as a tooltip in both themes and keeps AAA\n contrast — near-white on the dark theme, near-black on the light one. */\n background-color: var(--color-text-primary);\n color: var(--color-surface);\n padding: 0.5rem 0.75rem;\n border-radius: var(--border-radius-md, 0.375rem);\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1.25rem;\n max-width: 300px;\n word-wrap: break-word;\n box-shadow: var(--elevation-2);\n }\n\n .lc-tooltip-inner {\n position: relative;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'lc-tooltip',\n role: 'tooltip',\n },\n})\nexport class TooltipContentComponent {\n content = '';\n}\n\nconst POSITIONS: Record<TooltipPosition, ConnectedPosition> = {\n top: {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -8,\n panelClass: 'lc-tooltip--top',\n },\n bottom: {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 8,\n panelClass: 'lc-tooltip--bottom',\n },\n left: {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -8,\n panelClass: 'lc-tooltip--left',\n },\n right: {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: 8,\n panelClass: 'lc-tooltip--right',\n },\n};\n\nconst POSITION_NAMES = Object.keys(POSITIONS) as TooltipPosition[];\n\n/** Fallback order when the preferred side does not fit the viewport. */\nconst FALLBACKS: Record<TooltipPosition, TooltipPosition[]> = {\n top: ['bottom', 'right', 'left'],\n bottom: ['top', 'right', 'left'],\n left: ['right', 'top', 'bottom'],\n right: ['left', 'top', 'bottom'],\n};\n\n/**\n * Tooltip directive for displaying contextual information.\n * Uses Angular CDK Overlay for positioning; flips to the opposite side when\n * the preferred one does not fit the viewport, and can be dismissed with\n * Escape (WCAG 1.4.13).\n *\n * @example\n * ```html\n * <button lcTooltip=\"Click me!\" tooltipPosition=\"top\">\n * Hover or focus\n * </button>\n * ```\n */\n@Directive({\n selector: '[lcTooltip]',\n standalone: true,\n})\nexport class TooltipDirective implements OnDestroy {\n private static nextId = 0;\n\n /**\n * Tooltip content text\n */\n lcTooltip = input.required<string>();\n\n /**\n * Tooltip position\n * @default 'top'\n */\n tooltipPosition = input<TooltipPosition>('top');\n\n /**\n * Show delay in milliseconds\n * @default 0\n */\n tooltipShowDelay = input<number>(0);\n\n /**\n * Hide delay in milliseconds\n * @default 0\n */\n tooltipHideDelay = input<number>(0);\n\n /**\n * Whether tooltip is disabled\n * @default false\n */\n tooltipDisabled = input<boolean>(false);\n\n /** Id of the tooltip element; the host's `aria-describedby` points at it while shown. */\n readonly tooltipId = `lc-tooltip-${++TooltipDirective.nextId}`;\n\n private overlayRef?: OverlayRef;\n private tooltipRef?: ComponentRef<TooltipContentComponent>;\n private positionSubscription?: Subscription;\n private showTimeout?: number;\n private hideTimeout?: number;\n private escapeListener?: (event: KeyboardEvent) => void;\n\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly renderer = inject(Renderer2);\n private readonly overlayStack = inject(OverlayStackService);\n\n ngOnDestroy(): void {\n this.hide();\n this.cleanup();\n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n this.showWithDelay();\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.hideWithDelay();\n }\n\n @HostListener('focus')\n onFocus(): void {\n this.showWithDelay();\n }\n\n @HostListener('blur')\n onBlur(): void {\n this.hideWithDelay();\n }\n\n /**\n * Show tooltip programmatically\n */\n show(): void {\n if (this.tooltipDisabled() || !this.lcTooltip()) {\n return;\n }\n\n this.clearTimeouts();\n\n if (!this.overlayRef) {\n this.createOverlay();\n }\n\n if (!this.tooltipRef && this.overlayRef) {\n const portal = new ComponentPortal(TooltipContentComponent, this.viewContainerRef);\n this.tooltipRef = this.overlayRef.attach(portal) as ComponentRef<TooltipContentComponent>;\n this.tooltipRef.instance.content = this.lcTooltip();\n\n const tooltipEl = this.tooltipRef.location.nativeElement as HTMLElement;\n // The id is what the host's aria-describedby points at\n this.renderer.setAttribute(tooltipEl, 'id', this.tooltipId);\n this.addDescribedBy();\n this.setPositionClass(this.tooltipPosition());\n\n // Escape dismisses the tooltip (WCAG 1.4.13) — only when it is the\n // top-most overlay, so a modal underneath is not closed by the same key\n this.overlayStack.push(this.tooltipId);\n if (typeof document !== 'undefined') {\n this.escapeListener = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !this.overlayStack.claim(this.tooltipId, event)) return;\n event.stopPropagation();\n this.hide();\n };\n document.addEventListener('keydown', this.escapeListener);\n }\n }\n }\n\n /**\n * Hide tooltip programmatically\n */\n hide(): void {\n this.clearTimeouts();\n\n if (this.escapeListener) {\n document.removeEventListener('keydown', this.escapeListener);\n this.escapeListener = undefined;\n }\n this.overlayStack.remove(this.tooltipId);\n\n if (this.tooltipRef) {\n this.tooltipRef.destroy();\n this.tooltipRef = undefined;\n }\n\n if (this.overlayRef) {\n this.overlayRef.detach();\n }\n\n this.removeDescribedBy();\n }\n\n /**\n * Toggle tooltip visibility\n */\n toggle(): void {\n if (this.tooltipRef) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n private showWithDelay(): void {\n this.clearTimeouts();\n const delay = this.tooltipShowDelay();\n\n if (delay > 0) {\n this.showTimeout = window.setTimeout(() => this.show(), delay);\n } else {\n this.show();\n }\n }\n\n private hideWithDelay(): void {\n this.clearTimeouts();\n const delay = this.tooltipHideDelay();\n\n if (delay > 0) {\n this.hideTimeout = window.setTimeout(() => this.hide(), delay);\n } else {\n this.hide();\n }\n }\n\n private createOverlay(): void {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions(this.getPositions());\n\n // Keep the tooltip element's position class in sync with the side the\n // overlay actually chose (it flips at viewport edges)\n this.positionSubscription = positionStrategy.positionChanges.subscribe((change) => {\n const applied = POSITION_NAMES.find((p) => POSITIONS[p] === change.connectionPair);\n if (applied) this.setPositionClass(applied);\n });\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n }) as OverlayRef;\n }\n\n /** Preferred position first, then the fallbacks the overlay may flip to. */\n private getPositions(): ConnectedPosition[] {\n const position = this.tooltipPosition();\n return [position, ...FALLBACKS[position]].map((p) => POSITIONS[p]);\n }\n\n private setPositionClass(position: TooltipPosition): void {\n const tooltipEl = this.tooltipRef?.location.nativeElement as HTMLElement | undefined;\n if (!tooltipEl) return;\n for (const p of POSITION_NAMES) {\n this.renderer.removeClass(tooltipEl, `lc-tooltip--${p}`);\n }\n this.renderer.addClass(tooltipEl, `lc-tooltip--${position}`);\n }\n\n /** Append the tooltip id to the host's aria-describedby without clobbering ids the caller set. */\n private addDescribedBy(): void {\n const host = this.elementRef.nativeElement;\n const ids = (host.getAttribute('aria-describedby') ?? '').split(/\\s+/).filter(Boolean);\n if (!ids.includes(this.tooltipId)) ids.push(this.tooltipId);\n this.renderer.setAttribute(host, 'aria-describedby', ids.join(' '));\n }\n\n private removeDescribedBy(): void {\n const host = this.elementRef.nativeElement;\n const ids = (host.getAttribute('aria-describedby') ?? '').split(/\\s+/).filter(Boolean);\n if (!ids.includes(this.tooltipId)) return;\n const rest = ids.filter((id) => id !== this.tooltipId);\n if (rest.length) {\n this.renderer.setAttribute(host, 'aria-describedby', rest.join(' '));\n } else {\n this.renderer.removeAttribute(host, 'aria-describedby');\n }\n }\n\n private clearTimeouts(): void {\n if (this.showTimeout) {\n window.clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n }\n if (this.hideTimeout) {\n window.clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n }\n\n private cleanup(): void {\n this.clearTimeouts();\n this.positionSubscription?.unsubscribe();\n this.positionSubscription = undefined;\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = undefined;\n }\n }\n}\n"],"mappings":";;;;;AAwDA,IAAa,0BAAb,MAAa,wBAAuB;CAClC,UAAU;CADC,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAuB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAvB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAuB,cAAA;EAAA,UAAA;EAAA,MAAA;GAAA,YAAA,EAAA,QAAA,UAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UA7BxB;EAAmD,UAAA;EAAA,QAAA,CAAA,oUAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA6BlD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EAjCnC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAoB,YAClB;GAAI,SACP,CAAA;GAAE,UACD;GAAmD,iBAuB5C,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,MAAM;GACP;GAAA,QAAA,CAAA,oUAAA;EAAA,CAAA;;;AAMH,MAAM,YAAwD;CAC5D,KAAK;EACH,SAAS;EACT,SAAS;EACT,UAAU;EACV,UAAU;EACV,SAAS;EACT,YAAY;CACb;C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IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,kBAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,iBAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,WAAA;GAAA,cAAA;GAAA,cAAA;GAAA,SAAA;GAAA,QAAA;EAAA,EAAA;EAAA,UAAA;CAAA,CAAA;;AAAhB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EAJ5B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,YAAY;EACb,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDE,MAAA;GAAa,MAAA,CAAA,YAAY;;;GAKzB,MAAA;GAAa,MAAA,CAAA,YAAY;;;GAKzB,MAAA;GAAa,MAAA,CAAA,OAAO;;;GAKpB,MAAA;GAAa,MAAA,CAAA,MAAM"}
1
+ {"version":3,"file":"lifecorner-angular-ui-kit-tooltip.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/tooltip/tooltip.directive.ts"],"sourcesContent":["import {\n Directive,\n input,\n ElementRef,\n OnDestroy,\n Renderer2,\n ViewContainerRef,\n ComponentRef,\n HostListener,\n Component,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport { Overlay, OverlayRef, ConnectedPosition } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Subscription } from 'rxjs';\nimport { OverlayStackService } from '@lifecorner/angular-ui-kit/internal/overlay';\nimport { closestLang } from '@lifecorner/angular-ui-kit/internal/a11y';\n\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Internal tooltip content component\n */\n@Component({\n selector: 'lc-tooltip-content',\n standalone: true,\n imports: [],\n template: `<div class=\"lc-tooltip-inner\">{{ content }}</div>`,\n styles: [\n `\n :host {\n display: block;\n /* Inverted surface: reads as a tooltip in both themes and keeps AAA\n contrast — near-white on the dark theme, near-black on the light one. */\n background-color: var(--color-text-primary);\n color: var(--color-surface);\n padding: 0.5rem 0.75rem;\n border-radius: var(--border-radius-md, 0.375rem);\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1.25rem;\n max-width: 300px;\n word-wrap: break-word;\n box-shadow: var(--elevation-2);\n }\n\n .lc-tooltip-inner {\n position: relative;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'lc-tooltip',\n role: 'tooltip',\n },\n})\nexport class TooltipContentComponent {\n content = '';\n}\n\nconst POSITIONS: Record<TooltipPosition, ConnectedPosition> = {\n top: {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -8,\n panelClass: 'lc-tooltip--top',\n },\n bottom: {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 8,\n panelClass: 'lc-tooltip--bottom',\n },\n left: {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -8,\n panelClass: 'lc-tooltip--left',\n },\n right: {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: 8,\n panelClass: 'lc-tooltip--right',\n },\n};\n\nconst POSITION_NAMES = Object.keys(POSITIONS) as TooltipPosition[];\n\n/** Fallback order when the preferred side does not fit the viewport. */\nconst FALLBACKS: Record<TooltipPosition, TooltipPosition[]> = {\n top: ['bottom', 'right', 'left'],\n bottom: ['top', 'right', 'left'],\n left: ['right', 'top', 'bottom'],\n right: ['left', 'top', 'bottom'],\n};\n\n/**\n * Tooltip directive for displaying contextual information.\n * Uses Angular CDK Overlay for positioning; flips to the opposite side when\n * the preferred one does not fit the viewport, and can be dismissed with\n * Escape (WCAG 1.4.13).\n *\n * The tooltip takes the `lang` of the host's closest `[lang]` (3.31).\n *\n * @example\n * ```html\n * <button lcTooltip=\"Click me!\" tooltipPosition=\"top\">\n * Hover or focus\n * </button>\n * ```\n */\n@Directive({\n selector: '[lcTooltip]',\n standalone: true,\n})\nexport class TooltipDirective implements OnDestroy {\n private static nextId = 0;\n\n /**\n * Tooltip content text\n */\n lcTooltip = input.required<string>();\n\n /**\n * Tooltip position\n * @default 'top'\n */\n tooltipPosition = input<TooltipPosition>('top');\n\n /**\n * Show delay in milliseconds\n * @default 0\n */\n tooltipShowDelay = input<number>(0);\n\n /**\n * Hide delay in milliseconds\n * @default 0\n */\n tooltipHideDelay = input<number>(0);\n\n /**\n * Whether tooltip is disabled\n * @default false\n */\n tooltipDisabled = input<boolean>(false);\n\n /** Id of the tooltip element; the host's `aria-describedby` points at it while shown. */\n readonly tooltipId = `lc-tooltip-${++TooltipDirective.nextId}`;\n\n private overlayRef?: OverlayRef;\n private tooltipRef?: ComponentRef<TooltipContentComponent>;\n private positionSubscription?: Subscription;\n private showTimeout?: number;\n private hideTimeout?: number;\n private escapeListener?: (event: KeyboardEvent) => void;\n\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly renderer = inject(Renderer2);\n private readonly overlayStack = inject(OverlayStackService);\n\n ngOnDestroy(): void {\n this.hide();\n this.cleanup();\n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n this.showWithDelay();\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.hideWithDelay();\n }\n\n @HostListener('focus')\n onFocus(): void {\n this.showWithDelay();\n }\n\n @HostListener('blur')\n onBlur(): void {\n this.hideWithDelay();\n }\n\n /**\n * Show tooltip programmatically\n */\n show(): void {\n if (this.tooltipDisabled() || !this.lcTooltip()) {\n return;\n }\n\n this.clearTimeouts();\n\n if (!this.overlayRef) {\n this.createOverlay();\n }\n\n if (!this.tooltipRef && this.overlayRef) {\n const portal = new ComponentPortal(TooltipContentComponent, this.viewContainerRef);\n this.tooltipRef = this.overlayRef.attach(portal) as ComponentRef<TooltipContentComponent>;\n this.tooltipRef.instance.content = this.lcTooltip();\n\n const tooltipEl = this.tooltipRef.location.nativeElement as HTMLElement;\n // The id is what the host's aria-describedby points at\n this.renderer.setAttribute(tooltipEl, 'id', this.tooltipId);\n // The overlay renders under <body>, outside the host's lang (WCAG 3.1.2):\n // the tooltip takes the host's closest [lang], read at every show\n const lang = closestLang(this.elementRef.nativeElement);\n if (lang !== null) this.renderer.setAttribute(tooltipEl, 'lang', lang);\n this.addDescribedBy();\n this.setPositionClass(this.tooltipPosition());\n\n // Escape dismisses the tooltip (WCAG 1.4.13) — only when it is the\n // top-most overlay, so a modal underneath is not closed by the same key\n this.overlayStack.push(this.tooltipId);\n if (typeof document !== 'undefined') {\n this.escapeListener = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !this.overlayStack.claim(this.tooltipId, event)) return;\n event.stopPropagation();\n this.hide();\n };\n document.addEventListener('keydown', this.escapeListener);\n }\n }\n }\n\n /**\n * Hide tooltip programmatically\n */\n hide(): void {\n this.clearTimeouts();\n\n if (this.escapeListener) {\n document.removeEventListener('keydown', this.escapeListener);\n this.escapeListener = undefined;\n }\n this.overlayStack.remove(this.tooltipId);\n\n if (this.tooltipRef) {\n this.tooltipRef.destroy();\n this.tooltipRef = undefined;\n }\n\n if (this.overlayRef) {\n this.overlayRef.detach();\n }\n\n this.removeDescribedBy();\n }\n\n /**\n * Toggle tooltip visibility\n */\n toggle(): void {\n if (this.tooltipRef) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n private showWithDelay(): void {\n this.clearTimeouts();\n const delay = this.tooltipShowDelay();\n\n if (delay > 0) {\n this.showTimeout = window.setTimeout(() => this.show(), delay);\n } else {\n this.show();\n }\n }\n\n private hideWithDelay(): void {\n this.clearTimeouts();\n const delay = this.tooltipHideDelay();\n\n if (delay > 0) {\n this.hideTimeout = window.setTimeout(() => this.hide(), delay);\n } else {\n this.hide();\n }\n }\n\n private createOverlay(): void {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions(this.getPositions());\n\n // Keep the tooltip element's position class in sync with the side the\n // overlay actually chose (it flips at viewport edges)\n this.positionSubscription = positionStrategy.positionChanges.subscribe((change) => {\n const applied = POSITION_NAMES.find((p) => POSITIONS[p] === change.connectionPair);\n if (applied) this.setPositionClass(applied);\n });\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n }) as OverlayRef;\n }\n\n /** Preferred position first, then the fallbacks the overlay may flip to. */\n private getPositions(): ConnectedPosition[] {\n const position = this.tooltipPosition();\n return [position, ...FALLBACKS[position]].map((p) => POSITIONS[p]);\n }\n\n private setPositionClass(position: TooltipPosition): void {\n const tooltipEl = this.tooltipRef?.location.nativeElement as HTMLElement | undefined;\n if (!tooltipEl) return;\n for (const p of POSITION_NAMES) {\n this.renderer.removeClass(tooltipEl, `lc-tooltip--${p}`);\n }\n this.renderer.addClass(tooltipEl, `lc-tooltip--${position}`);\n }\n\n /** Append the tooltip id to the host's aria-describedby without clobbering ids the caller set. */\n private addDescribedBy(): void {\n const host = this.elementRef.nativeElement;\n const ids = (host.getAttribute('aria-describedby') ?? '').split(/\\s+/).filter(Boolean);\n if (!ids.includes(this.tooltipId)) ids.push(this.tooltipId);\n this.renderer.setAttribute(host, 'aria-describedby', ids.join(' '));\n }\n\n private removeDescribedBy(): void {\n const host = this.elementRef.nativeElement;\n const ids = (host.getAttribute('aria-describedby') ?? '').split(/\\s+/).filter(Boolean);\n if (!ids.includes(this.tooltipId)) return;\n const rest = ids.filter((id) => id !== this.tooltipId);\n if (rest.length) {\n this.renderer.setAttribute(host, 'aria-describedby', rest.join(' '));\n } else {\n this.renderer.removeAttribute(host, 'aria-describedby');\n }\n }\n\n private clearTimeouts(): void {\n if (this.showTimeout) {\n window.clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n }\n if (this.hideTimeout) {\n window.clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n }\n\n private cleanup(): void {\n this.clearTimeouts();\n this.positionSubscription?.unsubscribe();\n this.positionSubscription = undefined;\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = undefined;\n }\n }\n}\n"],"mappings":";;;;;;AAyDA,IAAa,0BAAb,MAAa,wBAAuB;CAClC,UAAU;CADC,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAuB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAvB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAuB,cAAA;EAAA,UAAA;EAAA,MAAA;GAAA,YAAA,EAAA,QAAA,UAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UA7BxB;EAAmD,UAAA;EAAA,QAAA,CAAA,oUAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA6BlD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EAjCnC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAoB,YAClB;GAAI,SACP,CAAA;GAAE,UACD;GAAmD,iBAuB5C,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,MAAM;GACP;GAAA,QAAA,CAAA,oUAAA;EAAA,CAAA;;;AAMH,MAAM,YAAwD;CAC5D,KAAK;EACH,SAAS;EACT,SAAS;EACT,UAAU;EACV,UAAU;EACV,SAAS;EACT,YAAY;CACb;CACD,QAAQ;EACN,SAAS;EACT,SAAS;EACT,UAAU;EACV,UAAU;EACV,SAAS;EACT,YAAY;CACb;CACD,MAAM;EACJ,SAAS;EACT,SAAS;EACT,UAAU;EACV,UAAU;EACV,SAAS;EACT,YAAY;CACb;CACD,OAAO;EACL,SAAS;EACT,SAA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AAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,iBAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,WAAA;GAAA,cAAA;GAAA,cAAA;GAAA,SAAA;GAAA,QAAA;EAAA,EAAA;EAAA,UAAA;CAAA,CAAA;;AAAhB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EAJ5B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,YAAY;EACb,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDE,MAAA;GAAa,MAAA,CAAA,YAAY;;;GAKzB,MAAA;GAAa,MAAA,CAAA,YAAY;;;GAKzB,MAAA;GAAa,MAAA,CAAA,OAAO;;;GAKpB,MAAA;GAAa,MAAA,CAAA,MAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifecorner/angular-ui-kit",
3
- "version": "3.30.2",
3
+ "version": "3.31.0",
4
4
  "description": "LifeCorner Design System – Angular UI component library",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,4 +1,12 @@
1
+ import { BadgeVariant } from "@lifecorner/angular-ui-kit/badge";
1
2
  import * as i0 from "@angular/core";
3
+ /** A count or status on a bottom-nav entry (`BottomNavItem.badge`, `moreBadge`). */
4
+ export interface BottomNavBadge {
5
+ /** Text or number inside the badge. */
6
+ value: string | number;
7
+ /** Badge colour (`lc-badge` variant). */
8
+ variant?: BadgeVariant;
9
+ }
2
10
  /**
3
11
  * A destination in the bottom navigation bar. A subset of `NavigationItem`, so
4
12
  * the side navigation's items can be passed as they are (sections and children
@@ -16,12 +24,7 @@ export interface BottomNavItem {
16
24
  /** Sort order; items without one keep their array order. */
17
25
  displayOrder?: number;
18
26
  /** Count or status shown on the icon; read out through `badgeAriaLabel`. */
19
- badge?: {
20
- /** Text or number inside the badge. */
21
- value: string | number;
22
- /** Badge colour (`lc-badge` variant). */
23
- variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
24
- };
27
+ badge?: BottomNavBadge;
25
28
  }
26
29
  /** Surface of the bar: `docked` spans the bottom edge, `floating` is an inset pill. */
27
30
  export type BottomNavVariant = 'docked' | 'floating';
@@ -129,8 +132,22 @@ export declare class BottomNavComponent {
129
132
  */
130
133
  readonly moreRoute: import("@angular/core").InputSignal<string>;
131
134
  /**
132
- * Text read after an item's label when it has a badge; `{value}` is
133
- * replaced with the badge value (e.g. "3 new").
135
+ * Badge on the "More" entry (on overflow or with `showMore`), e.g. the open
136
+ * tasks on the pages behind it: drawn like an item badge and read after the
137
+ * label through `badgeAriaLabel`. The kit doesn't add up the hidden
138
+ * destinations' badges; pass the value to show. It sits on the bar's last
139
+ * entry, so keep it to two characters (`'9+'`). `null` or `undefined`: no
140
+ * badge.
141
+ *
142
+ * @default null
143
+ */
144
+ readonly moreBadge: import("@angular/core").InputSignal<BottomNavBadge | null | undefined>;
145
+ /**
146
+ * Text read after an item's label, and after the "More" label with
147
+ * `moreBadge`, when it has a badge; `{value}` is replaced with the badge
148
+ * value (e.g. "3 new").
149
+ *
150
+ * @default '{value} new'
134
151
  */
135
152
  readonly badgeAriaLabel: import("@angular/core").InputSignal<string>;
136
153
  /** The current item was tapped again (e.g. scroll the page to the top). */
@@ -205,6 +222,11 @@ export declare class BottomNavComponent {
205
222
  "required": false;
206
223
  "isSignal": true;
207
224
  };
225
+ "moreBadge": {
226
+ "alias": "moreBadge";
227
+ "required": false;
228
+ "isSignal": true;
229
+ };
208
230
  "badgeAriaLabel": {
209
231
  "alias": "badgeAriaLabel";
210
232
  "required": false;
@@ -24,6 +24,8 @@ export type SelectValue = string | number | string[] | number[] | null;
24
24
  * - CDK overlay positioning
25
25
  * - ControlValueAccessor integration for reactive forms
26
26
  *
27
+ * The dropdown takes the `lang` of the host's closest `[lang]` (3.31).
28
+ *
27
29
  * @example
28
30
  * ```html
29
31
  * <lc-select [options]="options" placeholder="Choose" [(ngModel)]="selected" />
@@ -115,6 +117,13 @@ export declare class SelectComponent implements ControlValueAccessor {
115
117
  private readonly formDisabled;
116
118
  /** Effective disabled state: the `disabled` input OR the form control's disabled state. */
117
119
  readonly isDisabled: import("@angular/core").Signal<boolean>;
120
+ private readonly host;
121
+ /**
122
+ * `lang` of the open dropdown (3.31, request 050, WCAG 3.1.2): the overlay
123
+ * renders under `<body>`, so it takes the host's closest `[lang]`, else none.
124
+ * Read at every opening; `null` while closed, so the server never reads the DOM.
125
+ */
126
+ protected readonly panelLang: import("@angular/core").Signal<string | null>;
118
127
  readonly filteredOptions: import("@angular/core").Signal<SelectOption[]>;
119
128
  /** Keyboard highlight; resets whenever the visible option list changes so it never points at a stale row. */
120
129
  readonly highlightedIndex: import("@angular/core").WritableSignal<number>;
@@ -25,7 +25,9 @@ export type SidenavVariant = 'default' | 'transparent';
25
25
  * - Hierarchical navigation with collapsible groups (up to 3 levels)
26
26
  * - Section headlines for item grouping with optional action buttons
27
27
  * - Action buttons on any item (hover-reveal)
28
- * - Badge support on items (count / status indicator)
28
+ * - Badge support on items (count / status indicator), read after the label
29
+ * through `badgeAriaLabel` (3.31); on the collapsed rail the label and the
30
+ * badge text name the item
29
31
  * - One current item, announced and painted alike: the link for `activeRoute`
30
32
  * (or, without it, the one the router's URL matches) gets
31
33
  * `aria-current="page"` and the current look, every other link neither
@@ -202,6 +204,16 @@ export declare class SidenavComponent implements OnDestroy {
202
204
  readonly collapseTitle: import("@angular/core").InputSignal<string>;
203
205
  /** Accessible name of the close button (drawer mode). */
204
206
  readonly closeAriaLabel: import("@angular/core").InputSignal<string>;
207
+ /**
208
+ * Text read after an item's label when it has a badge, at every level. On
209
+ * the collapsed rail, where labels are hidden, the label and this text name
210
+ * the item. `{value}` is replaced with the badge value, e.g.
211
+ * `'{value} offen'` → "Stammdaten 1 offen". The badge itself is hidden from
212
+ * screen readers. Empty: the badge isn't read.
213
+ *
214
+ * @default '{value}'
215
+ */
216
+ readonly badgeAriaLabel: import("@angular/core").InputSignal<string>;
205
217
  /**
206
218
  * Ids of the expanded parent items — the single source of truth for
207
219
  * `isExpanded`. Seeded with the current item's parent whenever it changes
@@ -265,6 +277,8 @@ export declare class SidenavComponent implements OnDestroy {
265
277
  protected readonly brandInitial: import("@angular/core").Signal<string>;
266
278
  /** Whether the rail shows only icons (as `lc-sidenav--collapsed`). */
267
279
  protected readonly isRail: import("@angular/core").Signal<boolean>;
280
+ /** Visually hidden badge text: `badgeAriaLabel` with `{value}`; on the rail, where labels are hidden, after the label. */
281
+ protected badgeText(item: NavigationItem): string;
268
282
  /** The collapse button's accessible name: what a press does. */
269
283
  protected readonly collapseToggleLabel: import("@angular/core").Signal<string>;
270
284
  /** The collapse button's chevron points where the rail moves: ⟨ to collapse a left rail, ⟩ to expand it (mirrored on the right). */
@@ -458,6 +472,11 @@ export declare class SidenavComponent implements OnDestroy {
458
472
  "required": false;
459
473
  "isSignal": true;
460
474
  };
475
+ "badgeAriaLabel": {
476
+ "alias": "badgeAriaLabel";
477
+ "required": false;
478
+ "isSignal": true;
479
+ };
461
480
  }, {
462
481
  "collapsed": "collapsedChange";
463
482
  "closed": "closed";
@@ -15,6 +15,8 @@ export declare class TooltipContentComponent {
15
15
  * the preferred one does not fit the viewport, and can be dismissed with
16
16
  * Escape (WCAG 1.4.13).
17
17
  *
18
+ * The tooltip takes the `lang` of the host's closest `[lang]` (3.31).
19
+ *
18
20
  * @example
19
21
  * ```html
20
22
  * <button lcTooltip="Click me!" tooltipPosition="top">