@mintplayer/ng-bootstrap 22.5.0 → 22.5.1

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.
@@ -79,11 +79,11 @@ class BsDropdownMenuComponent {
79
79
  });
80
80
  }
81
81
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsDropdownMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
82
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: BsDropdownMenuComponent, isStandalone: true, selector: "bs-dropdown-menu", inputs: { mode: { classPropertyName: "mode", publicName: "menuMode", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, labelId: { classPropertyName: "labelId", publicName: "labelId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], ngImport: i0, template: "<mp-dropdown-menu [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" [attr.label-id]=\"labelIdAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n", styles: [".dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
82
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: BsDropdownMenuComponent, isStandalone: true, selector: "bs-dropdown-menu", inputs: { mode: { classPropertyName: "mode", publicName: "menuMode", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, labelId: { classPropertyName: "labelId", publicName: "labelId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], ngImport: i0, template: "<mp-dropdown-menu [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" [attr.label-id]=\"labelIdAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n", styles: [".dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}.dropdown-item>a.active,.dropdown-item>button.active{color:var(--bs-dropdown-link-active-color, #fff);background-color:var(--bs-dropdown-link-active-bg, var(--bs-primary))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
83
83
  }
84
84
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsDropdownMenuComponent, decorators: [{
85
85
  type: Component,
86
- args: [{ selector: 'bs-dropdown-menu', changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], encapsulation: ViewEncapsulation.None, template: "<mp-dropdown-menu [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" [attr.label-id]=\"labelIdAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n", styles: [".dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}\n"] }]
86
+ args: [{ selector: 'bs-dropdown-menu', changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], encapsulation: ViewEncapsulation.None, template: "<mp-dropdown-menu [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" [attr.label-id]=\"labelIdAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n", styles: [".dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}.dropdown-item>a.active,.dropdown-item>button.active{color:var(--bs-dropdown-link-active-color, #fff);background-color:var(--bs-dropdown-link-active-bg, var(--bs-primary))}\n"] }]
87
87
  }], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuMode", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], labelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelId", required: false }] }], select: [{ type: i0.Output, args: ["select"] }] } });
88
88
 
89
89
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-dropdown-menu.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/tokens/menu-context.token.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/dropdown-menu/dropdown-menu.component.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/dropdown-menu/dropdown-menu.component.html","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-divider.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/mintplayer-ng-bootstrap-dropdown-menu.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * DI marker meaning \"this content is authored inside a dropdown menu\".\n *\n * Provided by `BsDropdownMenuComponent` and `BsNavbarDropdownComponent`;\n * optionally injected by context-aware children (`bs-navbar-item`) to render\n * their `.dropdown-item` shape instead of their nav-link shape, so the same\n * item element works at every nesting level of a navbar.\n *\n * Element injectors follow the CONSUMER template's nesting (not the projection\n * site), so any `<bs-navbar-item>` written between the tags of either provider\n * sees the token — including content projected through `<ng-content>`.\n */\nexport const BS_DROPDOWN_MENU_CONTEXT = new InjectionToken<boolean>('BS_DROPDOWN_MENU_CONTEXT');\n","import { afterNextRender, ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, input, output, ViewEncapsulation } from '@angular/core';\nimport type { DropdownMode, DropdownSelectEventDetail } from '@mintplayer/web-components/dropdown-menu';\nimport { BS_DROPDOWN_MENU_CONTEXT } from '../tokens/menu-context.token';\n\n/**\n * `<bs-dropdown-menu>` — Angular wrapper around the `<mp-dropdown-menu>` web\n * component. This is the single dropdown-menu implementation: it is used\n * standalone (projected through `*bsDropdownMenu` by the `[bsDropdown]` trigger\n * stack), inside `<bs-navbar>`, and as the listbox panel for the combobox /\n * typeahead (`mode=\"listbox\"`).\n *\n * Keyboard navigation, roving tabindex, the ARIA roles and the theme-aware\n * styling all live in the WC (single source of UI truth). This wrapper bridges\n * inputs to attributes and projects `[bsDropdownItem]` / `[bsDropdownDivider]` /\n * `[bsDropdownHeader]` `<li>`s into the WC's default slot.\n *\n * The WC is registered **client-side only** (`afterNextRender`); on the server\n * Angular emits a bare `<mp-dropdown-menu>` tag and the SSR layer injects its\n * Declarative Shadow DOM (see `injectMpDropdownDsd`), so it renders with JS off.\n *\n * This wrapper stays framework-agnostic of the `[bsDropdown]` trigger stack (it\n * lives in a sibling entry point). When projected as a combobox/listbox panel,\n * the consumer sets `mode=\"listbox\"` and mirrors the trigger's `menuId`/\n * `popupRole` onto this host (`[attr.id]`/`[attr.role]`) via the exported\n * `bsDropdown` reference — the same directive the toggle and combobox read.\n */\n@Component({\n selector: 'bs-dropdown-menu',\n templateUrl: './dropdown-menu.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n // Marks content authored between these tags as \"inside a menu\" so\n // context-aware children (bs-navbar-item) render their dropdown-item shape.\n providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }],\n // The COMPANION light-DOM sheet: the one thing the menu's shadow `::slotted`\n // rules cannot reach is a nested `<a>`/`<button>` inside an item. Ship it as an\n // un-encapsulated (global, class-scoped) rule so the link fills the padded item\n // box and inherits its color — the whole row navigates, like Bootstrap. The\n // `--bs-dropdown-item-padding-*` tokens inherit out of the menu's shadow through\n // the flat tree (fallbacks cover standalone use).\n encapsulation: ViewEncapsulation.None,\n styles: [`\n .dropdown-item > a,\n .dropdown-item > button {\n display: block;\n width: auto;\n margin: calc(-1 * var(--bs-dropdown-item-padding-y, 0.25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));\n padding: var(--bs-dropdown-item-padding-y, 0.25rem) var(--bs-dropdown-item-padding-x, 1rem);\n color: inherit;\n text-decoration: none;\n text-align: inherit;\n background: none;\n border: 0;\n font: inherit;\n }\n `],\n})\nexport class BsDropdownMenuComponent {\n /**\n * `menu` (default, roving-tabindex nav) | `listbox` (consumer manages focus).\n *\n * Aliased to `menuMode` so it never collides with the `mode` input of the\n * a11y `bsRovingFocus` directive when a combobox/listbox stacks both on this\n * one element (same reason `bsCombobox` aliases its `autocomplete`).\n */\n readonly mode = input<DropdownMode>('menu', { alias: 'menuMode' });\n /** Pixel cap on the menu height; scrolls beyond. */\n readonly maxHeight = input<number>();\n /** Id of an external label, set as `aria-labelledby` on the WC's list. */\n readonly labelId = input<string>();\n\n /** Fires when an enabled item is activated (re-emits the WC's `select`). */\n readonly select = output<DropdownSelectEventDetail>();\n\n /** `max-height` attribute is numeric-or-absent; derive once via a signal. */\n protected readonly maxHeightAttr = computed(() => {\n const value = this.maxHeight();\n return value === undefined ? null : `${value}`;\n });\n\n protected readonly labelIdAttr = computed(() => this.labelId() ?? null);\n\n protected onSelect(event: Event) {\n // The WC's `select` is a general-purpose DOM event (bubbles + composed).\n // The public Angular API is this typed `output()`, so consume the raw\n // event here. Without `stopPropagation` it keeps bubbling to the consumer's\n // `<bs-dropdown-menu>` host, where their `(select)` binding fires a\n // SECOND time with the raw `CustomEvent` (Angular doesn't unwrap `.detail`).\n event.stopPropagation();\n this.select.emit((event as CustomEvent<DropdownSelectEventDetail>).detail);\n }\n\n constructor() {\n afterNextRender(() => {\n // Side-effect import registers <mp-dropdown-menu> and friends; client-only\n // so SSR stays a bare tag for DSD injection.\n import('@mintplayer/web-components/dropdown-menu');\n });\n }\n}\n","<mp-dropdown-menu [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" [attr.label-id]=\"labelIdAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n","import { Directive, ElementRef, effect, inject, input } from '@angular/core';\n\n/**\n * `[bsDropdownItem]` — marks a plain `<li>` as a Bootstrap `.dropdown-item`\n * inside a `<bs-dropdown-menu>`. There is no per-item web component: the item is\n * light-DOM `<li>` slotted into `<mp-dropdown-menu>`, whose shadow styles the box\n * via `::slotted(.dropdown-item)`. A nested `<a>`/`<button>` (e.g. a `routerLink`)\n * is reset by the companion light-DOM stylesheet the menu wrapper ships.\n *\n * Usage: `<li bsDropdownItem><a routerLink=\"/x\">Action</a></li>`.\n *\n * Inputs:\n * - `active` — Bootstrap `.active` appearance (also drives `aria-selected` in\n * a `listbox` menu).\n * - `disabled` — non-interactive; removed from the menu's roving order.\n * - `value` — opaque value carried in the menu's `select` event detail;\n * assigned as a `value` property on the host `<li>` (the WC reads it).\n */\n@Directive({\n selector: '[bsDropdownItem]',\n host: {\n '[class.dropdown-item]': 'true',\n '[class.active]': 'active()',\n '[class.disabled]': 'disabled()',\n '[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n },\n})\nexport class BsDropdownItemDirective {\n readonly active = input(false);\n readonly disabled = input(false);\n /** Opaque value carried in the menu's `select` event detail. */\n readonly value = input<unknown>();\n\n constructor() {\n const el = inject<ElementRef<HTMLElement>>(ElementRef);\n effect(() => {\n (el.nativeElement as HTMLElement & { value?: unknown }).value = this.value();\n });\n }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsDropdownDivider]` — marks an element (typically an `<li>`) as a Bootstrap\n * `.dropdown-divider` inside a `<bs-dropdown-menu>`. Styled by the menu shadow's\n * `::slotted(.dropdown-divider)` rule. Usage: `<li bsDropdownDivider></li>`.\n */\n@Directive({\n selector: '[bsDropdownDivider]',\n host: {\n '[class.dropdown-divider]': 'true',\n role: 'separator',\n },\n})\nexport class BsDropdownDividerDirective {}\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsDropdownHeader]` — marks an element (an `<li>` or a heading) as a Bootstrap\n * `.dropdown-header` inside a `<bs-dropdown-menu>`. Styled by the menu shadow's\n * `::slotted(.dropdown-header)` rule. Usage: `<li bsDropdownHeader>Section</li>`.\n */\n@Directive({\n selector: '[bsDropdownHeader]',\n host: {\n '[class.dropdown-header]': 'true',\n },\n})\nexport class BsDropdownHeaderDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;AAWG;MACU,wBAAwB,GAAG,IAAI,cAAc,CAAU,0BAA0B;;ACV9F;;;;;;;;;;;;;;;;;;;;;A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AM;AAClC,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-dropdown-menu.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/tokens/menu-context.token.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/dropdown-menu/dropdown-menu.component.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/dropdown-menu/dropdown-menu.component.html","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-divider.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/mintplayer-ng-bootstrap-dropdown-menu.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * DI marker meaning \"this content is authored inside a dropdown menu\".\n *\n * Provided by `BsDropdownMenuComponent` and `BsNavbarDropdownComponent`;\n * optionally injected by context-aware children (`bs-navbar-item`) to render\n * their `.dropdown-item` shape instead of their nav-link shape, so the same\n * item element works at every nesting level of a navbar.\n *\n * Element injectors follow the CONSUMER template's nesting (not the projection\n * site), so any `<bs-navbar-item>` written between the tags of either provider\n * sees the token — including content projected through `<ng-content>`.\n */\nexport const BS_DROPDOWN_MENU_CONTEXT = new InjectionToken<boolean>('BS_DROPDOWN_MENU_CONTEXT');\n","import { afterNextRender, ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, input, output, ViewEncapsulation } from '@angular/core';\nimport type { DropdownMode, DropdownSelectEventDetail } from '@mintplayer/web-components/dropdown-menu';\nimport { BS_DROPDOWN_MENU_CONTEXT } from '../tokens/menu-context.token';\n\n/**\n * `<bs-dropdown-menu>` — Angular wrapper around the `<mp-dropdown-menu>` web\n * component. This is the single dropdown-menu implementation: it is used\n * standalone (projected through `*bsDropdownMenu` by the `[bsDropdown]` trigger\n * stack), inside `<bs-navbar>`, and as the listbox panel for the combobox /\n * typeahead (`mode=\"listbox\"`).\n *\n * Keyboard navigation, roving tabindex, the ARIA roles and the theme-aware\n * styling all live in the WC (single source of UI truth). This wrapper bridges\n * inputs to attributes and projects `[bsDropdownItem]` / `[bsDropdownDivider]` /\n * `[bsDropdownHeader]` `<li>`s into the WC's default slot.\n *\n * The WC is registered **client-side only** (`afterNextRender`); on the server\n * Angular emits a bare `<mp-dropdown-menu>` tag and the SSR layer injects its\n * Declarative Shadow DOM (see `injectMpDropdownDsd`), so it renders with JS off.\n *\n * This wrapper stays framework-agnostic of the `[bsDropdown]` trigger stack (it\n * lives in a sibling entry point). When projected as a combobox/listbox panel,\n * the consumer sets `mode=\"listbox\"` and mirrors the trigger's `menuId`/\n * `popupRole` onto this host (`[attr.id]`/`[attr.role]`) via the exported\n * `bsDropdown` reference — the same directive the toggle and combobox read.\n */\n@Component({\n selector: 'bs-dropdown-menu',\n templateUrl: './dropdown-menu.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n // Marks content authored between these tags as \"inside a menu\" so\n // context-aware children (bs-navbar-item) render their dropdown-item shape.\n providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }],\n // The COMPANION light-DOM sheet: the one thing the menu's shadow `::slotted`\n // rules cannot reach is a nested `<a>`/`<button>` inside an item. Ship it as an\n // un-encapsulated (global, class-scoped) rule so the link fills the padded item\n // box and inherits its color — the whole row navigates, like Bootstrap. The\n // `--bs-dropdown-item-padding-*` tokens inherit out of the menu's shadow through\n // the flat tree (fallbacks cover standalone use).\n encapsulation: ViewEncapsulation.None,\n styles: [`\n .dropdown-item > a,\n .dropdown-item > button {\n display: block;\n width: auto;\n margin: calc(-1 * var(--bs-dropdown-item-padding-y, 0.25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));\n padding: var(--bs-dropdown-item-padding-y, 0.25rem) var(--bs-dropdown-item-padding-x, 1rem);\n color: inherit;\n text-decoration: none;\n text-align: inherit;\n background: none;\n border: 0;\n font: inherit;\n }\n /* Active route (routerLinkActive classes the ANCHOR, which ::slotted can't\n reach) — stock .dropdown-item.active look; the negative-margin fill above\n makes the anchor paint the FULL item row. */\n .dropdown-item > a.active,\n .dropdown-item > button.active {\n color: var(--bs-dropdown-link-active-color, #fff);\n background-color: var(--bs-dropdown-link-active-bg, var(--bs-primary));\n }\n `],\n})\nexport class BsDropdownMenuComponent {\n /**\n * `menu` (default, roving-tabindex nav) | `listbox` (consumer manages focus).\n *\n * Aliased to `menuMode` so it never collides with the `mode` input of the\n * a11y `bsRovingFocus` directive when a combobox/listbox stacks both on this\n * one element (same reason `bsCombobox` aliases its `autocomplete`).\n */\n readonly mode = input<DropdownMode>('menu', { alias: 'menuMode' });\n /** Pixel cap on the menu height; scrolls beyond. */\n readonly maxHeight = input<number>();\n /** Id of an external label, set as `aria-labelledby` on the WC's list. */\n readonly labelId = input<string>();\n\n /** Fires when an enabled item is activated (re-emits the WC's `select`). */\n readonly select = output<DropdownSelectEventDetail>();\n\n /** `max-height` attribute is numeric-or-absent; derive once via a signal. */\n protected readonly maxHeightAttr = computed(() => {\n const value = this.maxHeight();\n return value === undefined ? null : `${value}`;\n });\n\n protected readonly labelIdAttr = computed(() => this.labelId() ?? null);\n\n protected onSelect(event: Event) {\n // The WC's `select` is a general-purpose DOM event (bubbles + composed).\n // The public Angular API is this typed `output()`, so consume the raw\n // event here. Without `stopPropagation` it keeps bubbling to the consumer's\n // `<bs-dropdown-menu>` host, where their `(select)` binding fires a\n // SECOND time with the raw `CustomEvent` (Angular doesn't unwrap `.detail`).\n event.stopPropagation();\n this.select.emit((event as CustomEvent<DropdownSelectEventDetail>).detail);\n }\n\n constructor() {\n afterNextRender(() => {\n // Side-effect import registers <mp-dropdown-menu> and friends; client-only\n // so SSR stays a bare tag for DSD injection.\n import('@mintplayer/web-components/dropdown-menu');\n });\n }\n}\n","<mp-dropdown-menu [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" [attr.label-id]=\"labelIdAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n","import { Directive, ElementRef, effect, inject, input } from '@angular/core';\n\n/**\n * `[bsDropdownItem]` — marks a plain `<li>` as a Bootstrap `.dropdown-item`\n * inside a `<bs-dropdown-menu>`. There is no per-item web component: the item is\n * light-DOM `<li>` slotted into `<mp-dropdown-menu>`, whose shadow styles the box\n * via `::slotted(.dropdown-item)`. A nested `<a>`/`<button>` (e.g. a `routerLink`)\n * is reset by the companion light-DOM stylesheet the menu wrapper ships.\n *\n * Usage: `<li bsDropdownItem><a routerLink=\"/x\">Action</a></li>`.\n *\n * Inputs:\n * - `active` — Bootstrap `.active` appearance (also drives `aria-selected` in\n * a `listbox` menu).\n * - `disabled` — non-interactive; removed from the menu's roving order.\n * - `value` — opaque value carried in the menu's `select` event detail;\n * assigned as a `value` property on the host `<li>` (the WC reads it).\n */\n@Directive({\n selector: '[bsDropdownItem]',\n host: {\n '[class.dropdown-item]': 'true',\n '[class.active]': 'active()',\n '[class.disabled]': 'disabled()',\n '[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n },\n})\nexport class BsDropdownItemDirective {\n readonly active = input(false);\n readonly disabled = input(false);\n /** Opaque value carried in the menu's `select` event detail. */\n readonly value = input<unknown>();\n\n constructor() {\n const el = inject<ElementRef<HTMLElement>>(ElementRef);\n effect(() => {\n (el.nativeElement as HTMLElement & { value?: unknown }).value = this.value();\n });\n }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsDropdownDivider]` — marks an element (typically an `<li>`) as a Bootstrap\n * `.dropdown-divider` inside a `<bs-dropdown-menu>`. Styled by the menu shadow's\n * `::slotted(.dropdown-divider)` rule. Usage: `<li bsDropdownDivider></li>`.\n */\n@Directive({\n selector: '[bsDropdownDivider]',\n host: {\n '[class.dropdown-divider]': 'true',\n role: 'separator',\n },\n})\nexport class BsDropdownDividerDirective {}\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsDropdownHeader]` — marks an element (an `<li>` or a heading) as a Bootstrap\n * `.dropdown-header` inside a `<bs-dropdown-menu>`. Styled by the menu shadow's\n * `::slotted(.dropdown-header)` rule. Usage: `<li bsDropdownHeader>Section</li>`.\n */\n@Directive({\n selector: '[bsDropdownHeader]',\n host: {\n '[class.dropdown-header]': 'true',\n },\n})\nexport class BsDropdownHeaderDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;AAWG;MACU,wBAAwB,GAAG,IAAI,cAAc,CAAU,0BAA0B;;ACV9F;;;;;;;;;;;;;;;;;;;;;AAqBG;MAwCU,uBAAuB,CAAA;AAyBxB,IAAA,QAAQ,CAAC,KAAY,EAAA;;;;;;QAM7B,KAAK,CAAC,eAAe,EAAE;QACvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAE,KAAgD,CAAC,MAAM,CAAC;IAC5E;AAEA,IAAA,WAAA,GAAA;AAlCA;;;;;;AAMG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAe,MAAM,4EAAI,KAAK,EAAE,UAAU,EAAA,CAAG;;AAEzD,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;;AAE3B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAU;;QAGzB,IAAA,CAAA,MAAM,GAAG,MAAM,EAA6B;;AAGlC,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAK;AAC/C,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE;AAC9B,YAAA,OAAO,KAAK,KAAK,SAAS,GAAG,IAAI,GAAG,CAAA,EAAG,KAAK,EAAE;QAChD,CAAC;0FAAC;QAEiB,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI;wFAAC;QAarE,eAAe,CAAC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yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBANrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,yBAAyB,EAAE,MAAM;AAClC,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -1,7 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, output, computed, afterNextRender, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, TemplateRef, Directive, contentChild, Renderer2, PLATFORM_ID } from '@angular/core';
2
+ import { inject, ElementRef, input, output, computed, afterNextRender, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, TemplateRef, Directive, contentChild, signal, Renderer2, PLATFORM_ID } from '@angular/core';
3
3
  import { NgTemplateOutlet, isPlatformServer } from '@angular/common';
4
4
  import { BS_DROPDOWN_MENU_CONTEXT, BsDropdownMenuComponent } from '@mintplayer/ng-bootstrap/dropdown-menu';
5
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
+ import * as i1 from '@angular/router';
7
+ import { RouterLinkActive } from '@angular/router';
5
8
 
6
9
  /**
7
10
  * `<bs-navbar>` — Angular wrapper around the `<mp-navbar>` web component.
@@ -243,19 +246,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
243
246
  * consumer template's nesting, not the projection site — the internally
244
247
  * rendered menu is invisible to projected children's injectors), so nested
245
248
  * `<bs-navbar-item>`s render their `.dropdown-item` shape.
249
+ *
250
+ * **Active-route trigger highlighting:** a `RouterLinkActive` host directive
251
+ * collects the projected descendant `routerLink`s; when any is active
252
+ * (non-exact — the whole subtree counts, like the legacy `[bsNavbarTrigger]`
253
+ * prefix match) the WC gets its `active` attribute, which recolors the
254
+ * shadow-rendered trigger (primary background for submenu triggers). Nested
255
+ * dropdowns each report their own subtree, so the full trigger chain of the
256
+ * active route highlights. Renders server-side, so it works with JS off.
257
+ *
246
258
  * Reveal/positioning and the no-JS `:focus-within` fallback all live in the WC.
247
259
  */
248
260
  class BsNavbarDropdownComponent {
249
261
  constructor() {
250
262
  this.label = contentChild.required(BsNavbarDropdownLabelDirective);
263
+ /** A projected descendant link's route is active → highlight the trigger. */
264
+ this.routeActive = signal(false, /* @ts-ignore */
265
+ ...(ngDevMode ? [{ debugName: "routeActive" }] : /* istanbul ignore next */ []));
266
+ const rla = inject(RouterLinkActive, { self: true });
267
+ // No class on this host — the state is bridged to the WC's `active`
268
+ // attribute instead (the trigger lives in the WC's shadow, out of reach
269
+ // of any class-based styling from here).
270
+ rla.routerLinkActive = [];
271
+ rla.isActiveChange.pipe(takeUntilDestroyed()).subscribe((active) => this.routeActive.set(active));
251
272
  }
252
273
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsNavbarDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
253
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.0", type: BsNavbarDropdownComponent, isStandalone: true, selector: "bs-navbar-dropdown", providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], queries: [{ propertyName: "label", first: true, predicate: BsNavbarDropdownLabelDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<mp-navbar-dropdown>\n <span slot=\"label\"><ng-container [ngTemplateOutlet]=\"label().templateRef\"></ng-container></span>\n <bs-dropdown-menu>\n <ng-content></ng-content>\n </bs-dropdown-menu>\n</mp-navbar-dropdown>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BsDropdownMenuComponent, selector: "bs-dropdown-menu", inputs: ["menuMode", "maxHeight", "labelId"], outputs: ["select"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
274
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.0", type: BsNavbarDropdownComponent, isStandalone: true, selector: "bs-navbar-dropdown", providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], queries: [{ propertyName: "label", first: true, predicate: BsNavbarDropdownLabelDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.RouterLinkActive }], ngImport: i0, template: "<mp-navbar-dropdown [attr.active]=\"routeActive() ? '' : null\">\n <span slot=\"label\"><ng-container [ngTemplateOutlet]=\"label().templateRef\"></ng-container></span>\n <bs-dropdown-menu>\n <ng-content></ng-content>\n </bs-dropdown-menu>\n</mp-navbar-dropdown>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BsDropdownMenuComponent, selector: "bs-dropdown-menu", inputs: ["menuMode", "maxHeight", "labelId"], outputs: ["select"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
254
275
  }
255
276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsNavbarDropdownComponent, decorators: [{
256
277
  type: Component,
257
- args: [{ selector: 'bs-navbar-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], imports: [NgTemplateOutlet, BsDropdownMenuComponent], providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], template: "<mp-navbar-dropdown>\n <span slot=\"label\"><ng-container [ngTemplateOutlet]=\"label().templateRef\"></ng-container></span>\n <bs-dropdown-menu>\n <ng-content></ng-content>\n </bs-dropdown-menu>\n</mp-navbar-dropdown>\n" }]
258
- }], propDecorators: { label: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsNavbarDropdownLabelDirective), { isSignal: true }] }] } });
278
+ args: [{ selector: 'bs-navbar-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], imports: [NgTemplateOutlet, BsDropdownMenuComponent], providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], hostDirectives: [RouterLinkActive], template: "<mp-navbar-dropdown [attr.active]=\"routeActive() ? '' : null\">\n <span slot=\"label\"><ng-container [ngTemplateOutlet]=\"label().templateRef\"></ng-container></span>\n <bs-dropdown-menu>\n <ng-content></ng-content>\n </bs-dropdown-menu>\n</mp-navbar-dropdown>\n" }]
279
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsNavbarDropdownLabelDirective), { isSignal: true }] }] } });
259
280
 
260
281
  /**
261
282
  * `[bsNavbarToggler]` — marks an element as the navbar's custom hamburger
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-navbar.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar/navbar.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar/navbar.component.html","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-nav/navbar-nav.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-item/navbar-item.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-brand/navbar-brand.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-dropdown/navbar-dropdown-label.directive.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-dropdown/navbar-dropdown.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-dropdown/navbar-dropdown.component.html","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-toggler-slot/navbar-toggler.directive.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-content/navbar-content.directive.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/mintplayer-ng-bootstrap-navbar.ts"],"sourcesContent":["import { afterNextRender, ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, ElementRef, inject, input, output } from '@angular/core';\nimport type { NavbarBreakpoint, NavbarExpandedChangeEventDetail } from '@mintplayer/web-components/navbar';\n\n/**\n * `<bs-navbar>` — Angular wrapper around the `<mp-navbar>` web component.\n *\n * Layout, the responsive collapse behaviour, the pure-CSS no-JS toggle and the\n * theme-aware styling all live in the WC (single source of UI truth). This\n * wrapper only bridges inputs to attributes and projects content into the WC's\n * slots:\n * - mark the brand with `bs-navbar-brand` (→ `slot=\"brand\"`);\n * - left-aligned items go in the default slot;\n * - right-aligned items get `slot=\"end\"`.\n *\n * The WC is registered **client-side only** (`afterNextRender`); on the server\n * Angular emits a bare `<mp-navbar>` tag and the SSR layer injects its\n * Declarative Shadow DOM (see `injectMpNavbarDsd`), so it renders with JS off.\n */\n@Component({\n selector: 'bs-navbar',\n templateUrl: './navbar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class BsNavbarComponent {\n /** Host element — measured by `[bsNavbarContent]` to offset page content. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Bootstrap breakpoint the navbar expands at; collapses below it. */\n readonly breakpoint = input<NavbarBreakpoint>('md');\n /** Theme color of the navbar background (e.g. `primary`, `dark`, `body-tertiary`). */\n readonly color = input<string>();\n /** Accessible label for the `<nav>` landmark. */\n readonly ariaLabel = input<string>();\n /** Whether the collapse is (visually) expanded; reflected to the WC. */\n readonly expanded = input(false);\n /** `fixed` pins the bar to the top of the viewport, full width; omit for in-flow. */\n readonly positioning = input<'fixed'>();\n\n /** Fires when the collapse toggles (re-emits the WC's `expandedchange`). */\n readonly expandedchange = output<NavbarExpandedChangeEventDetail>();\n\n /** String-or-absent attributes derived once via signals. */\n protected readonly colorAttr = computed(() => this.color() ?? null);\n protected readonly ariaLabelAttr = computed(() => this.ariaLabel() ?? null);\n protected readonly positioningAttr = computed(() => this.positioning() ?? null);\n /** Presence attribute: `''` when expanded, `null` when collapsed. */\n protected readonly expandedAttr = computed(() => (this.expanded() ? '' : null));\n\n protected onExpandedchange(event: Event) {\n // The WC's `expandedchange` is a general-purpose DOM event (bubbles +\n // composed). The public Angular API is this typed `output()`, so consume\n // the raw event here. Without `stopPropagation` it keeps bubbling to the\n // consumer's `<bs-navbar>` host, where their `(expandedchange)` binding\n // fires a SECOND time with the raw `CustomEvent` (Angular doesn't unwrap\n // `.detail`).\n event.stopPropagation();\n this.expandedchange.emit((event as CustomEvent<NavbarExpandedChangeEventDetail>).detail);\n }\n\n constructor() {\n afterNextRender(() => {\n // Side-effect import registers <mp-navbar> and friends; client-only so\n // SSR stays a bare tag for DSD injection.\n import('@mintplayer/web-components/navbar');\n });\n }\n}\n","<mp-navbar [attr.breakpoint]=\"breakpoint()\" [attr.color]=\"colorAttr()\" [attr.aria-label]=\"ariaLabelAttr()\" [attr.expanded]=\"expandedAttr()\" [attr.positioning]=\"positioningAttr()\" (expandedchange)=\"onExpandedchange($event)\">\n <ng-content></ng-content>\n</mp-navbar>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\n/**\n * `<bs-navbar-nav>` — groups navbar items into one of the WC's two nav lists.\n *\n * `align=\"start\"` (default) joins the left list, `align=\"end\"` the list pushed\n * to the far edge in wide mode. The host is `display: contents`, so the grouped\n * `<bs-navbar-item>` / `<bs-navbar-dropdown>` children flatten into the WC's\n * `.navbar-nav` flex layout exactly like directly-slotted items — the same\n * mechanism `<mp-navbar>` itself uses for its slots. The WC slot name stays an\n * internal detail (mirrors `bs-navbar-brand` hiding `slot=\"brand\"`).\n *\n * `display: contents` MUST stay static CSS (never applied via JS) so the no-JS\n * SSR path lays out identically from first paint.\n */\n@Component({\n selector: 'bs-navbar-nav',\n template: '<ng-content></ng-content>',\n styles: ':host { display: contents; }',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.slot]': 'slotAttr()',\n },\n})\nexport class BsNavbarNavComponent {\n /** Which nav group the items join: `start` (default) or `end` (pushed to the far edge in wide mode). */\n readonly align = input<'start' | 'end'>('start');\n\n protected readonly slotAttr = computed(() => (this.align() === 'end' ? 'end' : null));\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, inject, input } from '@angular/core';\nimport { BS_DROPDOWN_MENU_CONTEXT } from '@mintplayer/ng-bootstrap/dropdown-menu';\n\n/**\n * `<bs-navbar-item>` — one navbar entry, uniform at EVERY nesting level.\n *\n * Wraps a consumer light-DOM link: project an `<a routerLink>` / `<a href>` (or\n * a `<button>`) as content. The rendered shape is context-aware:\n *\n * - **Directly in the navbar** (top level, or inside `<bs-navbar-nav>`): wraps\n * the link in `<mp-navbar-item>`, which styles it as a `.nav-link` in its\n * own shadow.\n * - **Inside a dropdown** (`<bs-navbar-dropdown>` / `<bs-dropdown-menu>`,\n * detected via `BS_DROPDOWN_MENU_CONTEXT`): the HOST itself becomes the\n * `.dropdown-item` — the shape `mp-dropdown-menu` queries (roving tabindex,\n * `role=menuitem` on the inner control) and styles via\n * `::slotted(.dropdown-item)`. The link stays a DIRECT child of the host so\n * the menu wrapper's companion `.dropdown-item > a` reset reaches it\n * (`NgTemplateOutlet` through `<ng-container>` adds no wrapper element).\n *\n * `active` / `disabled` bridge to the WC's presence attributes (nav mode) or\n * Bootstrap's item classes + `aria-disabled` (menu mode).\n */\n@Component({\n selector: 'bs-navbar-item',\n template: `\n <ng-template #content><ng-content></ng-content></ng-template>\n @if (inMenu) {\n <ng-container [ngTemplateOutlet]=\"content\" />\n } @else {\n <mp-navbar-item [attr.active]=\"activeAttr()\" [attr.disabled]=\"disabledAttr()\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </mp-navbar-item>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet],\n host: {\n '[class.dropdown-item]': 'inMenu',\n '[class.active]': 'inMenu && active()',\n '[class.disabled]': 'inMenu && disabled()',\n '[attr.aria-disabled]': \"inMenu && disabled() ? 'true' : null\",\n },\n})\nexport class BsNavbarItemComponent {\n readonly active = input(false);\n readonly disabled = input(false);\n\n /** Menu mode when authored inside a dropdown; fixed per instance. */\n protected readonly inMenu = inject(BS_DROPDOWN_MENU_CONTEXT, { optional: true }) ?? false;\n\n /** Presence attributes: `''` when set, `null` when absent. */\n protected readonly activeAttr = computed(() => (this.active() ? '' : null));\n protected readonly disabledAttr = computed(() => (this.disabled() ? '' : null));\n}\n","import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\n\n/**\n * `<bs-navbar-brand>` — Angular wrapper around `<mp-navbar-brand>`.\n *\n * Project an `<a routerLink>` / text as the brand. The host sets\n * `slot=\"brand\"` so the wrapper element lands in `<mp-navbar>`'s `brand` slot\n * (mirrors `BsShellSidebarDirective`, which sets `slot=\"sidebar\"`).\n */\n@Component({\n selector: 'bs-navbar-brand',\n template: '<mp-navbar-brand><ng-content></ng-content></mp-navbar-brand>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.slot]': \"'brand'\",\n },\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class BsNavbarBrandComponent {}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Marks the trigger-label template for `<bs-navbar-dropdown>` — any HTML\n * (text, icon + text, badges, …). Rendered into the WC's trigger via\n * `ngTemplateOutlet`; the trigger's accessible name derives from this content,\n * so give an icon-only label an `aria-label`.\n *\n * ```html\n * <bs-navbar-dropdown>\n * <span *bsNavbarDropdownLabel>Products</span>\n * <bs-navbar-item><a routerLink=\"/p1\">Product 1</a></bs-navbar-item>\n * </bs-navbar-dropdown>\n * ```\n */\n@Directive({ selector: '[bsNavbarDropdownLabel]' })\nexport class BsNavbarDropdownLabelDirective {\n readonly templateRef = inject(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, contentChild, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { BS_DROPDOWN_MENU_CONTEXT, BsDropdownMenuComponent } from '@mintplayer/ng-bootstrap/dropdown-menu';\nimport { BsNavbarDropdownLabelDirective } from './navbar-dropdown-label.directive';\n\n/**\n * `<bs-navbar-dropdown>` — Angular wrapper around `<mp-navbar-dropdown>`.\n *\n * The trigger content is the `*bsNavbarDropdownLabel` template — any HTML\n * (matches the React/Vue wrappers, which take the WC's `label` slot directly).\n * The dropdown panel (`<bs-dropdown-menu>`) is rendered internally — author\n * the items directly between the tags, uniformly with the rest of the navbar:\n *\n * <bs-navbar-dropdown>\n * <span *bsNavbarDropdownLabel>Basic</span>\n * <bs-navbar-item><a routerLink=\"/basic/alert\">Alert</a></bs-navbar-item>\n * <bs-navbar-dropdown>…</bs-navbar-dropdown> <!-- submenu -->\n * </bs-navbar-dropdown>\n *\n * `BS_DROPDOWN_MENU_CONTEXT` is provided here (element injectors follow the\n * consumer template's nesting, not the projection site — the internally\n * rendered menu is invisible to projected children's injectors), so nested\n * `<bs-navbar-item>`s render their `.dropdown-item` shape.\n * Reveal/positioning and the no-JS `:focus-within` fallback all live in the WC.\n */\n@Component({\n selector: 'bs-navbar-dropdown',\n templateUrl: './navbar-dropdown.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet, BsDropdownMenuComponent],\n providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }],\n})\nexport class BsNavbarDropdownComponent {\n protected readonly label = contentChild.required(BsNavbarDropdownLabelDirective);\n}\n","<mp-navbar-dropdown>\n <span slot=\"label\"><ng-container [ngTemplateOutlet]=\"label().templateRef\"></ng-container></span>\n <bs-dropdown-menu>\n <ng-content></ng-content>\n </bs-dropdown-menu>\n</mp-navbar-dropdown>\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsNavbarToggler]` — marks an element as the navbar's custom hamburger\n * glyph, replacing the WC's built-in animated 3-bar → X toggler (the `toggler`\n * slot's fallback). The slot name stays an internal detail of the WC.\n *\n * The glyph is a first-class no-JS citizen: DSD slot assignment happens at\n * parse time (no fallback flash), the click reaches the in-shadow checkbox via\n * native label activation, and the open-state arrives as the inherited\n * `--mp-navbar-expanded: 0|1` custom property — derive the morph in CSS, e.g.\n * `transform: rotate(calc(var(--mp-navbar-expanded, 0) * 45deg))`.\n *\n * The host must be NON-interactive: labels do not forward clicks from\n * interactive descendants, so a `<button>`/`<a href>` here would kill the\n * no-JS toggle. Use a `<span>`/`<div>` glyph. (For a programmatic boolean, use\n * `[expanded]`/`(expandedchange)` on `bs-navbar` instead.)\n */\n@Directive({\n selector: '[bsNavbarToggler]',\n host: {\n slot: 'toggler',\n },\n})\nexport class BsNavbarTogglerDirective {}\n","import { afterNextRender, Directive, ElementRef, inject, input, OnDestroy, PLATFORM_ID, Renderer2 } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { BsNavbarComponent } from '../navbar/navbar.component';\n\n/**\n * `[bsNavbarContent]` — offsets page content below a `positioning=\"fixed\"`\n * navbar by its LIVE height (replaces hand-maintained `padding-top` constants).\n *\n * <bs-navbar [positioning]=\"'fixed'\" #nav>…</bs-navbar>\n * <div [bsNavbarContent]=\"nav\"><router-outlet /></div>\n *\n * On the client a `ResizeObserver` tracks the bar (theme/viewport changes\n * resize it) and sets `padding-top` = the element's own initial padding + the\n * bar height. On the server — where the bar can't be measured — a fixed 58px\n * approximation is serialized into the HTML so SSR/no-JS pages still clear the\n * bar (same contract as the pre-WC directive).\n */\n@Directive({\n selector: '[bsNavbarContent]',\n})\nexport class BsNavbarContentDirective implements OnDestroy {\n /** The `bs-navbar` to clear — pass its template reference (`#nav`). */\n readonly navbar = input.required<BsNavbarComponent>({ alias: 'bsNavbarContent' });\n\n /** Server-side height approximation (px) — the bar isn't measurable there. */\n static readonly SSR_NAVBAR_HEIGHT = 58;\n\n readonly #element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly #renderer = inject(Renderer2);\n #observer?: ResizeObserver;\n\n constructor() {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n this.#setPadding(BsNavbarContentDirective.SSR_NAVBAR_HEIGHT);\n return;\n }\n afterNextRender(() => {\n // The measurable bar is the WC inside the wrapper host (the host itself\n // is inline and reports no height for a fixed child).\n const bar = this.navbar().elementRef.nativeElement.querySelector('mp-navbar');\n if (!bar) return;\n // Hydration reuses the SSR element, so the 58px approximation this\n // directive wrote server-side is still inline here. Remove it BEFORE\n // measuring, or the author's baseline would double-count it.\n this.#renderer.removeStyle(this.#element, 'padding-top');\n const initial = parseFloat(getComputedStyle(this.#element).paddingTop) || 0;\n this.#observer = new ResizeObserver(() =>\n this.#setPadding(initial + (bar as HTMLElement).offsetHeight),\n );\n this.#observer.observe(bar);\n });\n }\n\n #setPadding(px: number): void {\n this.#renderer.setStyle(this.#element, 'padding-top', `${px}px`);\n }\n\n ngOnDestroy(): void {\n this.#observer?.disconnect();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;;;;;;;;;;;AAcG;MAOU,iBAAiB,CAAA;AAyBlB,IAAA,gBAAgB,CAAC,KAAY,EAAA;;;;;;;QAOrC,KAAK,CAAC,eAAe,EAAE;QACvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAE,KAAsD,CAAC,MAAM,CAAC;IAC1F;AAEA,IAAA,WAAA,GA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O,CAAC,GAAG,CAAC;AAC7B,QAAA,CAAC,CAAC;IACJ;AAEA,IAAA,WAAW,CAAC,EAAU,EAAA;AACpB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAA,EAAG,EAAE,CAAA,EAAA,CAAI,CAAC;IAClE;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE;IAC9B;8GAvCW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC9B,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-navbar.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar/navbar.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar/navbar.component.html","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-nav/navbar-nav.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-item/navbar-item.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-brand/navbar-brand.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-dropdown/navbar-dropdown-label.directive.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-dropdown/navbar-dropdown.component.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-dropdown/navbar-dropdown.component.html","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-toggler-slot/navbar-toggler.directive.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/src/navbar-content/navbar-content.directive.ts","../../../../libs/mintplayer-ng-bootstrap/navbar/mintplayer-ng-bootstrap-navbar.ts"],"sourcesContent":["import { afterNextRender, ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, ElementRef, inject, input, output } from '@angular/core';\nimport type { NavbarBreakpoint, NavbarExpandedChangeEventDetail } from '@mintplayer/web-components/navbar';\n\n/**\n * `<bs-navbar>` — Angular wrapper around the `<mp-navbar>` web component.\n *\n * Layout, the responsive collapse behaviour, the pure-CSS no-JS toggle and the\n * theme-aware styling all live in the WC (single source of UI truth). This\n * wrapper only bridges inputs to attributes and projects content into the WC's\n * slots:\n * - mark the brand with `bs-navbar-brand` (→ `slot=\"brand\"`);\n * - left-aligned items go in the default slot;\n * - right-aligned items get `slot=\"end\"`.\n *\n * The WC is registered **client-side only** (`afterNextRender`); on the server\n * Angular emits a bare `<mp-navbar>` tag and the SSR layer injects its\n * Declarative Shadow DOM (see `injectMpNavbarDsd`), so it renders with JS off.\n */\n@Component({\n selector: 'bs-navbar',\n templateUrl: './navbar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class BsNavbarComponent {\n /** Host element — measured by `[bsNavbarContent]` to offset page content. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Bootstrap breakpoint the navbar expands at; collapses below it. */\n readonly breakpoint = input<NavbarBreakpoint>('md');\n /** Theme color of the navbar background (e.g. `primary`, `dark`, `body-tertiary`). */\n readonly color = input<string>();\n /** Accessible label for the `<nav>` landmark. */\n readonly ariaLabel = input<string>();\n /** Whether the collapse is (visually) expanded; reflected to the WC. */\n readonly expanded = input(false);\n /** `fixed` pins the bar to the top of the viewport, full width; omit for in-flow. */\n readonly positioning = input<'fixed'>();\n\n /** Fires when the collapse toggles (re-emits the WC's `expandedchange`). */\n readonly expandedchange = output<NavbarExpandedChangeEventDetail>();\n\n /** String-or-absent attributes derived once via signals. */\n protected readonly colorAttr = computed(() => this.color() ?? null);\n protected readonly ariaLabelAttr = computed(() => this.ariaLabel() ?? null);\n protected readonly positioningAttr = computed(() => this.positioning() ?? null);\n /** Presence attribute: `''` when expanded, `null` when collapsed. */\n protected readonly expandedAttr = computed(() => (this.expanded() ? '' : null));\n\n protected onExpandedchange(event: Event) {\n // The WC's `expandedchange` is a general-purpose DOM event (bubbles +\n // composed). The public Angular API is this typed `output()`, so consume\n // the raw event here. Without `stopPropagation` it keeps bubbling to the\n // consumer's `<bs-navbar>` host, where their `(expandedchange)` binding\n // fires a SECOND time with the raw `CustomEvent` (Angular doesn't unwrap\n // `.detail`).\n event.stopPropagation();\n this.expandedchange.emit((event as CustomEvent<NavbarExpandedChangeEventDetail>).detail);\n }\n\n constructor() {\n afterNextRender(() => {\n // Side-effect import registers <mp-navbar> and friends; client-only so\n // SSR stays a bare tag for DSD injection.\n import('@mintplayer/web-components/navbar');\n });\n }\n}\n","<mp-navbar [attr.breakpoint]=\"breakpoint()\" [attr.color]=\"colorAttr()\" [attr.aria-label]=\"ariaLabelAttr()\" [attr.expanded]=\"expandedAttr()\" [attr.positioning]=\"positioningAttr()\" (expandedchange)=\"onExpandedchange($event)\">\n <ng-content></ng-content>\n</mp-navbar>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\n/**\n * `<bs-navbar-nav>` — groups navbar items into one of the WC's two nav lists.\n *\n * `align=\"start\"` (default) joins the left list, `align=\"end\"` the list pushed\n * to the far edge in wide mode. The host is `display: contents`, so the grouped\n * `<bs-navbar-item>` / `<bs-navbar-dropdown>` children flatten into the WC's\n * `.navbar-nav` flex layout exactly like directly-slotted items — the same\n * mechanism `<mp-navbar>` itself uses for its slots. The WC slot name stays an\n * internal detail (mirrors `bs-navbar-brand` hiding `slot=\"brand\"`).\n *\n * `display: contents` MUST stay static CSS (never applied via JS) so the no-JS\n * SSR path lays out identically from first paint.\n */\n@Component({\n selector: 'bs-navbar-nav',\n template: '<ng-content></ng-content>',\n styles: ':host { display: contents; }',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.slot]': 'slotAttr()',\n },\n})\nexport class BsNavbarNavComponent {\n /** Which nav group the items join: `start` (default) or `end` (pushed to the far edge in wide mode). */\n readonly align = input<'start' | 'end'>('start');\n\n protected readonly slotAttr = computed(() => (this.align() === 'end' ? 'end' : null));\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, inject, input } from '@angular/core';\nimport { BS_DROPDOWN_MENU_CONTEXT } from '@mintplayer/ng-bootstrap/dropdown-menu';\n\n/**\n * `<bs-navbar-item>` — one navbar entry, uniform at EVERY nesting level.\n *\n * Wraps a consumer light-DOM link: project an `<a routerLink>` / `<a href>` (or\n * a `<button>`) as content. The rendered shape is context-aware:\n *\n * - **Directly in the navbar** (top level, or inside `<bs-navbar-nav>`): wraps\n * the link in `<mp-navbar-item>`, which styles it as a `.nav-link` in its\n * own shadow.\n * - **Inside a dropdown** (`<bs-navbar-dropdown>` / `<bs-dropdown-menu>`,\n * detected via `BS_DROPDOWN_MENU_CONTEXT`): the HOST itself becomes the\n * `.dropdown-item` — the shape `mp-dropdown-menu` queries (roving tabindex,\n * `role=menuitem` on the inner control) and styles via\n * `::slotted(.dropdown-item)`. The link stays a DIRECT child of the host so\n * the menu wrapper's companion `.dropdown-item > a` reset reaches it\n * (`NgTemplateOutlet` through `<ng-container>` adds no wrapper element).\n *\n * `active` / `disabled` bridge to the WC's presence attributes (nav mode) or\n * Bootstrap's item classes + `aria-disabled` (menu mode).\n */\n@Component({\n selector: 'bs-navbar-item',\n template: `\n <ng-template #content><ng-content></ng-content></ng-template>\n @if (inMenu) {\n <ng-container [ngTemplateOutlet]=\"content\" />\n } @else {\n <mp-navbar-item [attr.active]=\"activeAttr()\" [attr.disabled]=\"disabledAttr()\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </mp-navbar-item>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet],\n host: {\n '[class.dropdown-item]': 'inMenu',\n '[class.active]': 'inMenu && active()',\n '[class.disabled]': 'inMenu && disabled()',\n '[attr.aria-disabled]': \"inMenu && disabled() ? 'true' : null\",\n },\n})\nexport class BsNavbarItemComponent {\n readonly active = input(false);\n readonly disabled = input(false);\n\n /** Menu mode when authored inside a dropdown; fixed per instance. */\n protected readonly inMenu = inject(BS_DROPDOWN_MENU_CONTEXT, { optional: true }) ?? false;\n\n /** Presence attributes: `''` when set, `null` when absent. */\n protected readonly activeAttr = computed(() => (this.active() ? '' : null));\n protected readonly disabledAttr = computed(() => (this.disabled() ? '' : null));\n}\n","import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\n\n/**\n * `<bs-navbar-brand>` — Angular wrapper around `<mp-navbar-brand>`.\n *\n * Project an `<a routerLink>` / text as the brand. The host sets\n * `slot=\"brand\"` so the wrapper element lands in `<mp-navbar>`'s `brand` slot\n * (mirrors `BsShellSidebarDirective`, which sets `slot=\"sidebar\"`).\n */\n@Component({\n selector: 'bs-navbar-brand',\n template: '<mp-navbar-brand><ng-content></ng-content></mp-navbar-brand>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.slot]': \"'brand'\",\n },\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class BsNavbarBrandComponent {}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Marks the trigger-label template for `<bs-navbar-dropdown>` — any HTML\n * (text, icon + text, badges, …). Rendered into the WC's trigger via\n * `ngTemplateOutlet`; the trigger's accessible name derives from this content,\n * so give an icon-only label an `aria-label`.\n *\n * ```html\n * <bs-navbar-dropdown>\n * <span *bsNavbarDropdownLabel>Products</span>\n * <bs-navbar-item><a routerLink=\"/p1\">Product 1</a></bs-navbar-item>\n * </bs-navbar-dropdown>\n * ```\n */\n@Directive({ selector: '[bsNavbarDropdownLabel]' })\nexport class BsNavbarDropdownLabelDirective {\n readonly templateRef = inject(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, contentChild, CUSTOM_ELEMENTS_SCHEMA, inject, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { RouterLinkActive } from '@angular/router';\nimport { BS_DROPDOWN_MENU_CONTEXT, BsDropdownMenuComponent } from '@mintplayer/ng-bootstrap/dropdown-menu';\nimport { BsNavbarDropdownLabelDirective } from './navbar-dropdown-label.directive';\n\n/**\n * `<bs-navbar-dropdown>` — Angular wrapper around `<mp-navbar-dropdown>`.\n *\n * The trigger content is the `*bsNavbarDropdownLabel` template — any HTML\n * (matches the React/Vue wrappers, which take the WC's `label` slot directly).\n * The dropdown panel (`<bs-dropdown-menu>`) is rendered internally — author\n * the items directly between the tags, uniformly with the rest of the navbar:\n *\n * <bs-navbar-dropdown>\n * <span *bsNavbarDropdownLabel>Basic</span>\n * <bs-navbar-item><a routerLink=\"/basic/alert\">Alert</a></bs-navbar-item>\n * <bs-navbar-dropdown>…</bs-navbar-dropdown> <!-- submenu -->\n * </bs-navbar-dropdown>\n *\n * `BS_DROPDOWN_MENU_CONTEXT` is provided here (element injectors follow the\n * consumer template's nesting, not the projection site — the internally\n * rendered menu is invisible to projected children's injectors), so nested\n * `<bs-navbar-item>`s render their `.dropdown-item` shape.\n *\n * **Active-route trigger highlighting:** a `RouterLinkActive` host directive\n * collects the projected descendant `routerLink`s; when any is active\n * (non-exact — the whole subtree counts, like the legacy `[bsNavbarTrigger]`\n * prefix match) the WC gets its `active` attribute, which recolors the\n * shadow-rendered trigger (primary background for submenu triggers). Nested\n * dropdowns each report their own subtree, so the full trigger chain of the\n * active route highlights. Renders server-side, so it works with JS off.\n *\n * Reveal/positioning and the no-JS `:focus-within` fallback all live in the WC.\n */\n@Component({\n selector: 'bs-navbar-dropdown',\n templateUrl: './navbar-dropdown.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet, BsDropdownMenuComponent],\n providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }],\n hostDirectives: [RouterLinkActive],\n})\nexport class BsNavbarDropdownComponent {\n protected readonly label = contentChild.required(BsNavbarDropdownLabelDirective);\n\n /** A projected descendant link's route is active → highlight the trigger. */\n protected readonly routeActive = signal(false);\n\n constructor() {\n const rla = inject(RouterLinkActive, { self: true });\n // No class on this host — the state is bridged to the WC's `active`\n // attribute instead (the trigger lives in the WC's shadow, out of reach\n // of any class-based styling from here).\n rla.routerLinkActive = [];\n rla.isActiveChange.pipe(takeUntilDestroyed()).subscribe((active) => this.routeActive.set(active));\n }\n}\n","<mp-navbar-dropdown [attr.active]=\"routeActive() ? '' : null\">\n <span slot=\"label\"><ng-container [ngTemplateOutlet]=\"label().templateRef\"></ng-container></span>\n <bs-dropdown-menu>\n <ng-content></ng-content>\n </bs-dropdown-menu>\n</mp-navbar-dropdown>\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsNavbarToggler]` — marks an element as the navbar's custom hamburger\n * glyph, replacing the WC's built-in animated 3-bar → X toggler (the `toggler`\n * slot's fallback). The slot name stays an internal detail of the WC.\n *\n * The glyph is a first-class no-JS citizen: DSD slot assignment happens at\n * parse time (no fallback flash), the click reaches the in-shadow checkbox via\n * native label activation, and the open-state arrives as the inherited\n * `--mp-navbar-expanded: 0|1` custom property — derive the morph in CSS, e.g.\n * `transform: rotate(calc(var(--mp-navbar-expanded, 0) * 45deg))`.\n *\n * The host must be NON-interactive: labels do not forward clicks from\n * interactive descendants, so a `<button>`/`<a href>` here would kill the\n * no-JS toggle. Use a `<span>`/`<div>` glyph. (For a programmatic boolean, use\n * `[expanded]`/`(expandedchange)` on `bs-navbar` instead.)\n */\n@Directive({\n selector: '[bsNavbarToggler]',\n host: {\n slot: 'toggler',\n },\n})\nexport class BsNavbarTogglerDirective {}\n","import { afterNextRender, Directive, ElementRef, inject, input, OnDestroy, PLATFORM_ID, Renderer2 } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { BsNavbarComponent } from '../navbar/navbar.component';\n\n/**\n * `[bsNavbarContent]` — offsets page content below a `positioning=\"fixed\"`\n * navbar by its LIVE height (replaces hand-maintained `padding-top` constants).\n *\n * <bs-navbar [positioning]=\"'fixed'\" #nav>…</bs-navbar>\n * <div [bsNavbarContent]=\"nav\"><router-outlet /></div>\n *\n * On the client a `ResizeObserver` tracks the bar (theme/viewport changes\n * resize it) and sets `padding-top` = the element's own initial padding + the\n * bar height. On the server — where the bar can't be measured — a fixed 58px\n * approximation is serialized into the HTML so SSR/no-JS pages still clear the\n * bar (same contract as the pre-WC directive).\n */\n@Directive({\n selector: '[bsNavbarContent]',\n})\nexport class BsNavbarContentDirective implements OnDestroy {\n /** The `bs-navbar` to clear — pass its template reference (`#nav`). */\n readonly navbar = input.required<BsNavbarComponent>({ alias: 'bsNavbarContent' });\n\n /** Server-side height approximation (px) — the bar isn't measurable there. */\n static readonly SSR_NAVBAR_HEIGHT = 58;\n\n readonly #element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly #renderer = inject(Renderer2);\n #observer?: ResizeObserver;\n\n constructor() {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n this.#setPadding(BsNavbarContentDirective.SSR_NAVBAR_HEIGHT);\n return;\n }\n afterNextRender(() => {\n // The measurable bar is the WC inside the wrapper host (the host itself\n // is inline and reports no height for a fixed child).\n const bar = this.navbar().elementRef.nativeElement.querySelector('mp-navbar');\n if (!bar) return;\n // Hydration reuses the SSR element, so the 58px approximation this\n // directive wrote server-side is still inline here. Remove it BEFORE\n // measuring, or the author's baseline would double-count it.\n this.#renderer.removeStyle(this.#element, 'padding-top');\n const initial = parseFloat(getComputedStyle(this.#element).paddingTop) || 0;\n this.#observer = new ResizeObserver(() =>\n this.#setPadding(initial + (bar as HTMLElement).offsetHeight),\n );\n this.#observer.observe(bar);\n });\n }\n\n #setPadding(px: number): void {\n this.#renderer.setStyle(this.#element, 'padding-top', `${px}px`);\n }\n\n ngOnDestroy(): void {\n this.#observer?.disconnect();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGA;;;;;;;;;;;;;;AAcG;MAOU,iBAAiB,CAAA;AAyBlB,IAAA,gBAAgB,CAAC,KAAY,EAAA;;;;;;;QAOrC,KAAK,CAAC,eAAe,EAAE;QACvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAE,KAAsD,CAAC,MAAM,CAAC;IAC1F;AAEA,IAAA,WAAA,GAAA;;AAlCS,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;;QAGxD,IAAA,CAAA,UAAU,GAAG,KAAK,CAAmB,IAAI;uFAAC;;AAE1C,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;AAEvB,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;;QAE3B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;qFAAC;;AAEvB,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAW;;QAG9B,IAAA,CAAA,cAAc,GAAG,MAAM,EAAmC;;QAGhD,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI;sFAAC;QAChD,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,IAAI,IAAI;0FAAC;QACxD,IA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,CAAC,EAAU,EAAA;AACpB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAA,EAAG,EAAE,CAAA,EAAA,CAAI,CAAC;IAClE;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE;IAC9B;8GAvCW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC9B,iBAAA;;;ACnBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintplayer/ng-bootstrap",
3
3
  "private": false,
4
- "version": "22.5.0",
4
+ "version": "22.5.1",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,6 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ElementRef, TemplateRef, OnDestroy } from '@angular/core';
3
3
  import { NavbarBreakpoint, NavbarExpandedChangeEventDetail } from '@mintplayer/web-components/navbar';
4
+ import * as i1 from '@angular/router';
4
5
 
5
6
  /**
6
7
  * `<bs-navbar>` — Angular wrapper around the `<mp-navbar>` web component.
@@ -146,12 +147,24 @@ declare class BsNavbarDropdownLabelDirective {
146
147
  * consumer template's nesting, not the projection site — the internally
147
148
  * rendered menu is invisible to projected children's injectors), so nested
148
149
  * `<bs-navbar-item>`s render their `.dropdown-item` shape.
150
+ *
151
+ * **Active-route trigger highlighting:** a `RouterLinkActive` host directive
152
+ * collects the projected descendant `routerLink`s; when any is active
153
+ * (non-exact — the whole subtree counts, like the legacy `[bsNavbarTrigger]`
154
+ * prefix match) the WC gets its `active` attribute, which recolors the
155
+ * shadow-rendered trigger (primary background for submenu triggers). Nested
156
+ * dropdowns each report their own subtree, so the full trigger chain of the
157
+ * active route highlights. Renders server-side, so it works with JS off.
158
+ *
149
159
  * Reveal/positioning and the no-JS `:focus-within` fallback all live in the WC.
150
160
  */
151
161
  declare class BsNavbarDropdownComponent {
152
162
  protected readonly label: _angular_core.Signal<BsNavbarDropdownLabelDirective>;
163
+ /** A projected descendant link's route is active → highlight the trigger. */
164
+ protected readonly routeActive: _angular_core.WritableSignal<boolean>;
165
+ constructor();
153
166
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarDropdownComponent, never>;
154
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarDropdownComponent, "bs-navbar-dropdown", never, {}, {}, ["label"], ["*"], true, never>;
167
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarDropdownComponent, "bs-navbar-dropdown", never, {}, {}, ["label"], ["*"], true, [{ directive: typeof i1.RouterLinkActive; inputs: {}; outputs: {}; }]>;
155
168
  }
156
169
 
157
170
  /**