@mintplayer/ng-bootstrap 22.28.0 → 22.30.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.
Files changed (134) hide show
  1. package/_bootstrap.scss +4 -101
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +62 -30
  3. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -64
  5. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +50 -46
  7. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +65 -94
  9. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +122 -97
  11. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +80 -133
  13. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -19
  15. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +41 -46
  17. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +76 -37
  19. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +37 -82
  21. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +157 -824
  25. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +172 -118
  27. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +180 -142
  29. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +66 -116
  31. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +41 -46
  33. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +80 -204
  35. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +2 -2
  37. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +2 -2
  39. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +32 -17
  41. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +283 -20
  43. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +98 -129
  45. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +144 -265
  47. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +133 -217
  49. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +46 -25
  51. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +166 -93
  53. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +148 -231
  55. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +133 -94
  57. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  58. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -2
  59. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +76 -7
  61. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +766 -812
  63. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +206 -180
  65. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +202 -141
  67. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +113 -59
  69. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +133 -76
  71. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +60 -87
  73. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +86 -83
  75. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +1 -2
  77. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +38 -34
  79. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +177 -147
  81. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +200 -94
  83. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +186 -233
  85. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +58 -136
  87. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +22 -16
  89. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  90. package/package.json +11 -9
  91. package/types/mintplayer-ng-bootstrap-a11y.d.ts +40 -21
  92. package/types/mintplayer-ng-bootstrap-accordion.d.ts +36 -33
  93. package/types/mintplayer-ng-bootstrap-calendar.d.ts +39 -16
  94. package/types/mintplayer-ng-bootstrap-card.d.ts +25 -33
  95. package/types/mintplayer-ng-bootstrap-carousel.d.ts +70 -55
  96. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +65 -45
  97. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +12 -3
  98. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +34 -19
  99. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +34 -8
  100. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +32 -59
  101. package/types/mintplayer-ng-bootstrap-datatable.d.ts +222 -422
  102. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +77 -29
  103. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +83 -51
  104. package/types/mintplayer-ng-bootstrap-dock.d.ts +57 -38
  105. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +25 -30
  106. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +61 -81
  107. package/types/mintplayer-ng-bootstrap-input-group.d.ts +17 -12
  108. package/types/mintplayer-ng-bootstrap-machine.d.ts +124 -4
  109. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +53 -27
  110. package/types/mintplayer-ng-bootstrap-navbar.d.ts +88 -164
  111. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +63 -30
  112. package/types/mintplayer-ng-bootstrap-pagination.d.ts +23 -7
  113. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +77 -47
  114. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +95 -98
  115. package/types/mintplayer-ng-bootstrap-radio.d.ts +68 -35
  116. package/types/mintplayer-ng-bootstrap-rating.d.ts +27 -2
  117. package/types/mintplayer-ng-bootstrap-ribbon.d.ts +546 -220
  118. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +82 -197
  119. package/types/mintplayer-ng-bootstrap-select.d.ts +113 -53
  120. package/types/mintplayer-ng-bootstrap-shell.d.ts +59 -33
  121. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +63 -27
  122. package/types/mintplayer-ng-bootstrap-splitter.d.ts +45 -56
  123. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +47 -26
  124. package/types/mintplayer-ng-bootstrap-table.d.ts +1 -2
  125. package/types/mintplayer-ng-bootstrap-theming.d.ts +19 -18
  126. package/types/mintplayer-ng-bootstrap-timeline.d.ts +287 -117
  127. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +100 -27
  128. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +188 -94
  129. package/types/mintplayer-ng-bootstrap-treeview.d.ts +74 -59
  130. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -0
  131. package/src/styles/utilities/cursor.scss +0 -12
  132. package/src/styles/utilities/overflow.scss +0 -12
  133. package/src/styles/utilities/white-space.scss +0 -12
  134. package/src/styles/utilities/width.scss +0 -14
@@ -1,313 +1,196 @@
1
1
  import * as i0 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
- import { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';
2
+ import { inject, TemplateRef, Directive, ElementRef, input, model, output, contentChild, computed, ChangeDetectionStrategy, Component, booleanAttribute, signal, Renderer2, RendererStyleFlags2, PLATFORM_ID, afterNextRender } from '@angular/core';
4
3
  import { NgTemplateOutlet, isPlatformServer } from '@angular/common';
5
- import { BS_DROPDOWN_MENU_CONTEXT, BsDropdownMenuComponent } from '@mintplayer/ng-bootstrap/dropdown-menu';
4
+ import { useCore, useScopedStyles, MpPropsDirective, provideCoreContext } from '@mintplayer/ng-bootstrap/machine';
5
+ import { navbarCore, navbarScopedStyles, navbarNavCore, navbarItemCore, navbarDropdownCore, NAVBAR_NESTING } from '@mintplayer/ui-core/navbar';
6
6
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
7
  import * as i1 from '@angular/router';
8
8
  import { RouterLinkActive } from '@angular/router';
9
9
 
10
+ // GENERATED from the navbar manifest (navbar) by @mintplayer/nx-component-compiler. Do not edit.
11
+ /** The `brand` slot of `<bs-navbar>`: `<ng-template bsNavbarBrand>` or `*bsNavbarBrand`. */
12
+ class BsNavbarBrandDirective {
13
+ constructor() {
14
+ this.templateRef = inject(TemplateRef);
15
+ }
16
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarBrandDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
17
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsNavbarBrandDirective, isStandalone: true, selector: "[bsNavbarBrand]", ngImport: i0 }); }
18
+ }
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarBrandDirective, decorators: [{
20
+ type: Directive,
21
+ args: [{ selector: '[bsNavbarBrand]' }]
22
+ }] });
23
+ /** The `toggler` slot of `<bs-navbar>`: `<ng-template bsNavbarToggler>` or `*bsNavbarToggler`. */
24
+ class BsNavbarTogglerDirective {
25
+ constructor() {
26
+ this.templateRef = inject(TemplateRef);
27
+ }
28
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarTogglerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
29
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsNavbarTogglerDirective, isStandalone: true, selector: "[bsNavbarToggler]", ngImport: i0 }); }
30
+ }
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarTogglerDirective, decorators: [{
32
+ type: Directive,
33
+ args: [{ selector: '[bsNavbarToggler]' }]
34
+ }] });
10
35
  /**
11
- * `<bs-navbar>` — Angular wrapper around the `<mp-navbar>` web component.
36
+ * Bootstrap navbar with a no-JS collapse and native `<details>` dropdowns (#437).
12
37
  *
13
- * Layout, the responsive collapse behaviour, the pure-CSS no-JS toggle and the
14
- * theme-aware styling all live in the WC (single source of UI truth). This
15
- * wrapper only bridges inputs to attributes and projects content into the WC's
16
- * slots:
17
- * - mark the brand with `bs-navbar-brand` (→ `slot="brand"`);
18
- * - left-aligned items go in the default slot;
19
- * - right-aligned items get `slot="end"`.
20
- *
21
- * The WC is registered **client-side only** (`afterNextRender`); on the server
22
- * Angular emits a bare `<mp-navbar>` tag and the SSR layer injects its
23
- * Declarative Shadow DOM (see `injectMpNavbarDsd`), so it renders with JS off.
38
+ * The server-rendered page is the working navbar: the collapse is a checkbox and every
39
+ * dropdown a `<details>`, both of which work with JavaScript off. An `aria-label` names
40
+ * the landmark. The `brand` slot holds the brand; the `toggler` slot replaces the three
41
+ * hamburger bars and reads the open state from `--mp-navbar-expanded: 0|1`.
24
42
  */
25
43
  class BsNavbarComponent {
26
- onExpandedchange(event) {
27
- // The WC's `expandedchange` is a general-purpose DOM event (bubbles +
28
- // composed). The public Angular API is this typed `output()`, so consume
29
- // the raw event here. Without `stopPropagation` it keeps bubbling to the
30
- // consumer's `<bs-navbar>` host, where their `(expandedchange)` binding
31
- // fires a SECOND time with the raw `CustomEvent` (Angular doesn't unwrap
32
- // `.detail`).
33
- event.stopPropagation();
34
- this.expandedchange.emit(event.detail);
35
- }
44
+ #core;
36
45
  constructor() {
37
- /** Host element — measured by `[bsNavbarContent]` to offset page content. */
46
+ /** The host element. */
38
47
  this.elementRef = inject(ElementRef);
39
- /** Bootstrap breakpoint the navbar expands at; collapses below it. */
40
48
  this.breakpoint = input('md', /* @ts-ignore */
41
49
  ...(ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []));
42
- /** Theme color of the navbar background (e.g. `primary`, `dark`, `body-tertiary`). */
43
50
  this.color = input(/* @ts-ignore */
44
51
  ...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
45
- /** Accessible label for the `<nav>` landmark. */
46
- /** Whether the collapse is (visually) expanded; reflected to the WC. */
47
- this.expanded = input(false, /* @ts-ignore */
52
+ this.expanded = model(false, /* @ts-ignore */
48
53
  ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
49
- /** `fixed` pins the bar to the top of the viewport, full width; omit for in-flow. */
50
54
  this.positioning = input(/* @ts-ignore */
51
55
  ...(ngDevMode ? [undefined, { debugName: "positioning" }] : /* istanbul ignore next */ []));
52
- /** Fires when the collapse toggles (re-emits the WC's `expandedchange`). */
56
+ this.labels = input(/* @ts-ignore */
57
+ ...(ngDevMode ? [undefined, { debugName: "labels" }] : /* istanbul ignore next */ []));
58
+ /** The collapse opened or closed through the bar. */
53
59
  this.expandedchange = output();
54
- /** String-or-absent attributes derived once via signals. */
55
- this.colorAttr = computed(() => this.color() ?? null, /* @ts-ignore */
56
- ...(ngDevMode ? [{ debugName: "colorAttr" }] : /* istanbul ignore next */ []));
57
- this.positioningAttr = computed(() => this.positioning() ?? null, /* @ts-ignore */
58
- ...(ngDevMode ? [{ debugName: "positioningAttr" }] : /* istanbul ignore next */ []));
59
- /** Presence attribute: `''` when expanded, `null` when collapsed. */
60
- this.expandedAttr = computed(() => (this.expanded() ? '' : null), /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "expandedAttr" }] : /* istanbul ignore next */ []));
62
- afterNextRender(() => {
63
- // Side-effect import registers <mp-navbar> and friends; client-only so
64
- // SSR stays a bare tag for DSD injection.
65
- import('@mintplayer/web-components/navbar');
66
- });
60
+ this.brandSlot = contentChild(BsNavbarBrandDirective, /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "brandSlot" }] : /* istanbul ignore next */ []));
62
+ this.togglerSlot = contentChild(BsNavbarTogglerDirective, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "togglerSlot" }] : /* istanbul ignore next */ []));
64
+ /** The template's named slots. */
65
+ this.slots = computed(() => ({ brand: this.brandSlot()?.templateRef, toggler: this.togglerSlot()?.templateRef }), /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
67
+ this.#core = useCore(navbarCore, { inputs: () => ({ breakpoint: this.breakpoint(), color: this.color(), expanded: this.expanded(), positioning: this.positioning(), labels: this.labels() }), idPrefix: 'bs-navbar', outputs: { expandedChange: this.expandedchange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'navbar', role: 'navigation' }), models: { expanded: this.expanded } });
68
+ /** The template's props. */
69
+ this.props = this.#core.props;
70
+ useScopedStyles('navbar', navbarScopedStyles);
71
+ }
72
+ /** Opens or closes the collapse (flips it without an argument), and reports it. */
73
+ toggle(...args) {
74
+ return this.#core.call('toggle', args);
67
75
  }
68
76
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
69
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsNavbarComponent, isStandalone: true, selector: "bs-navbar", inputs: { breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, positioning: { classPropertyName: "positioning", publicName: "positioning", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedchange: "expandedchange" }, ngImport: i0, template: "<mp-navbar bsForwardAria [attr.breakpoint]=\"breakpoint()\" [attr.color]=\"colorAttr()\" [attr.expanded]=\"expandedAttr()\" [attr.positioning]=\"positioningAttr()\" (expandedchange)=\"onExpandedchange($event)\">\n <ng-content></ng-content>\n</mp-navbar>\n", dependencies: [{ kind: "directive", type: BsForwardAriaDirective, selector: "[bsForwardAria]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
77
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsNavbarComponent, isStandalone: true, selector: "bs-navbar", inputs: { breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, positioning: { classPropertyName: "positioning", publicName: "positioning", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange", expandedchange: "expandedchange" }, queries: [{ propertyName: "brandSlot", first: true, predicate: BsNavbarBrandDirective, descendants: true, isSignal: true }, { propertyName: "togglerSlot", first: true, predicate: BsNavbarTogglerDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/navbar/src/templates/navbar.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_brand = props().brand;\n@let p_view = props().view;\n@if (slots().brand) {\n <div data-mps=\"navbar\" [mpProps]=\"p_brand\">\n @if (slots().brand; as slot_brand) {\n <ng-container [ngTemplateOutlet]=\"slot_brand\" />\n }\n </div>\n}\n<input data-mps=\"navbar\" [mpProps]=\"p_view.toggle\">\n<label data-mps=\"navbar\" [mpProps]=\"p_view.toggler\">\n @if (slots().toggler; as slot_toggler) {\n <ng-container [ngTemplateOutlet]=\"slot_toggler\" />\n } @else {\n <span data-mps=\"navbar\" [mpProps]=\"p_view.bar\"></span>\n <span data-mps=\"navbar\" [mpProps]=\"p_view.bar\"></span>\n <span data-mps=\"navbar\" [mpProps]=\"p_view.bar\"></span>\n }\n</label>\n<div data-mps=\"navbar\" [mpProps]=\"p_view.collapse\">\n <div data-mps=\"navbar\" [mpProps]=\"p_view.inner\">\n <ng-content />\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
70
78
  }
71
79
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarComponent, decorators: [{
72
80
  type: Component,
73
- args: [{ selector: 'bs-navbar', imports: [BsForwardAriaDirective], changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<mp-navbar bsForwardAria [attr.breakpoint]=\"breakpoint()\" [attr.color]=\"colorAttr()\" [attr.expanded]=\"expandedAttr()\" [attr.positioning]=\"positioningAttr()\" (expandedchange)=\"onExpandedchange($event)\">\n <ng-content></ng-content>\n</mp-navbar>\n" }]
74
- }], ctorParameters: () => [], propDecorators: { breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], positioning: [{ type: i0.Input, args: [{ isSignal: true, alias: "positioning", required: false }] }], expandedchange: [{ type: i0.Output, args: ["expandedchange"] }] } });
81
+ args: [{ selector: 'bs-navbar', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/navbar/src/templates/navbar.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_brand = props().brand;\n@let p_view = props().view;\n@if (slots().brand) {\n <div data-mps=\"navbar\" [mpProps]=\"p_brand\">\n @if (slots().brand; as slot_brand) {\n <ng-container [ngTemplateOutlet]=\"slot_brand\" />\n }\n </div>\n}\n<input data-mps=\"navbar\" [mpProps]=\"p_view.toggle\">\n<label data-mps=\"navbar\" [mpProps]=\"p_view.toggler\">\n @if (slots().toggler; as slot_toggler) {\n <ng-container [ngTemplateOutlet]=\"slot_toggler\" />\n } @else {\n <span data-mps=\"navbar\" [mpProps]=\"p_view.bar\"></span>\n <span data-mps=\"navbar\" [mpProps]=\"p_view.bar\"></span>\n <span data-mps=\"navbar\" [mpProps]=\"p_view.bar\"></span>\n }\n</label>\n<div data-mps=\"navbar\" [mpProps]=\"p_view.collapse\">\n <div data-mps=\"navbar\" [mpProps]=\"p_view.inner\">\n <ng-content />\n </div>\n</div>\n" }]
82
+ }], ctorParameters: () => [], propDecorators: { breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], positioning: [{ type: i0.Input, args: [{ isSignal: true, alias: "positioning", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], expandedchange: [{ type: i0.Output, args: ["expandedchange"] }], brandSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsNavbarBrandDirective), { isSignal: true }] }], togglerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsNavbarTogglerDirective), { isSignal: true }] }] } });
75
83
 
76
- /**
77
- * `<bs-navbar-nav>` — groups navbar items into one of the WC's two nav lists.
78
- *
79
- * `align="start"` (default) joins the left list, `align="end"` the list pushed
80
- * to the far edge in wide mode. The host is `display: contents`, so the grouped
81
- * `<bs-navbar-item>` / `<bs-navbar-dropdown>` children flatten into the WC's
82
- * `.navbar-nav` flex layout exactly like directly-slotted items — the same
83
- * mechanism `<mp-navbar>` itself uses for its slots. The WC slot name stays an
84
- * internal detail (mirrors `bs-navbar-brand` hiding `slot="brand"`).
85
- *
86
- * `display: contents` MUST stay static CSS (never applied via JS) so the no-JS
87
- * SSR path lays out identically from first paint.
88
- */
84
+ // GENERATED from the navbar manifest (navbar-nav) by @mintplayer/nx-component-compiler. Do not edit.
85
+ /** A group of navbar items; `align="end"` pushes it to the far side when the bar is wide. */
89
86
  class BsNavbarNavComponent {
87
+ #core;
90
88
  constructor() {
91
- /** Which nav group the items join: `start` (default) or `end` (pushed to the far edge in wide mode). */
89
+ /** The host element. */
90
+ this.elementRef = inject(ElementRef);
92
91
  this.align = input('start', /* @ts-ignore */
93
92
  ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
94
- this.slotAttr = computed(() => (this.align() === 'end' ? 'end' : null), /* @ts-ignore */
95
- ...(ngDevMode ? [{ debugName: "slotAttr" }] : /* istanbul ignore next */ []));
93
+ this.#core = useCore(navbarNavCore, { inputs: () => ({ align: this.align() }), idPrefix: 'bs-navbar-nav', hostBag: (props) => ({ ...props.bag, 'data-mps': 'navbar' }) });
94
+ /** The template's props. */
95
+ this.props = this.#core.props;
96
+ useScopedStyles('navbar', navbarScopedStyles);
96
97
  }
97
98
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
98
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsNavbarNavComponent, isStandalone: true, selector: "bs-navbar-nav", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.slot": "slotAttr()" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
99
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsNavbarNavComponent, isStandalone: true, selector: "bs-navbar-nav", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/navbar/src/templates/navbar-nav.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
99
100
  }
100
101
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
101
102
  type: Component,
102
- args: [{ selector: 'bs-navbar-nav', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, host: {
103
- '[attr.slot]': 'slotAttr()',
104
- }, styles: [":host{display:contents}\n"] }]
105
- }], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
103
+ args: [{ selector: 'bs-navbar-nav', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/navbar/src/templates/navbar-nav.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n" }]
104
+ }], ctorParameters: () => [], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
106
105
 
107
- /**
108
- * `<bs-navbar-item>` — one navbar entry, uniform at EVERY nesting level.
109
- *
110
- * Wraps a consumer light-DOM link: project an `<a routerLink>` / `<a href>` (or
111
- * a `<button>`) as content. The rendered shape is context-aware:
112
- *
113
- * - **Directly in the navbar** (top level, or inside `<bs-navbar-nav>`): wraps
114
- * the link in `<mp-navbar-item>`, which styles it as a `.nav-link` in its
115
- * own shadow.
116
- * - **Inside a dropdown** (`<bs-navbar-dropdown>` / `<bs-dropdown-menu>`,
117
- * detected via `BS_DROPDOWN_MENU_CONTEXT`): the HOST itself becomes the
118
- * `.dropdown-item` — the shape `mp-dropdown-menu` queries (roving tabindex,
119
- * `role=menuitem` on the inner control) and styles via
120
- * `::slotted(.dropdown-item)`. The link stays a DIRECT child of the host so
121
- * the menu wrapper's companion `.dropdown-item > a` reset reaches it
122
- * (`NgTemplateOutlet` through `<ng-container>` adds no wrapper element).
123
- *
124
- * `active` / `disabled` bridge to the WC's presence attributes (nav mode) or
125
- * Bootstrap's item classes + `aria-disabled` (menu mode).
126
- */
106
+ // GENERATED from the navbar manifest (navbar-item) by @mintplayer/nx-component-compiler. Do not edit.
107
+ /** One entry around a consumer link: a `.nav-item` in a nav group, a `.dropdown-item` in a dropdown. */
127
108
  class BsNavbarItemComponent {
109
+ #core;
128
110
  constructor() {
129
- this.active = input(false, /* @ts-ignore */
130
- ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
131
- this.disabled = input(false, /* @ts-ignore */
132
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
133
- /** Menu mode when authored inside a dropdown; fixed per instance. */
134
- this.inMenu = inject(BS_DROPDOWN_MENU_CONTEXT, { optional: true }) ?? false;
135
- /** Presence attributes: `''` when set, `null` when absent. */
136
- this.activeAttr = computed(() => (this.active() ? '' : null), /* @ts-ignore */
137
- ...(ngDevMode ? [{ debugName: "activeAttr" }] : /* istanbul ignore next */ []));
138
- this.disabledAttr = computed(() => (this.disabled() ? '' : null), /* @ts-ignore */
139
- ...(ngDevMode ? [{ debugName: "disabledAttr" }] : /* istanbul ignore next */ []));
111
+ /** The host element. */
112
+ this.elementRef = inject(ElementRef);
113
+ this.active = input(false, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
114
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
115
+ this.#core = useCore(navbarItemCore, { inputs: () => ({ active: this.active(), disabled: this.disabled() }), idPrefix: 'bs-navbar-item', hostBag: (props) => ({ ...props.bag, 'data-mps': 'navbar' }) });
116
+ /** The template's props. */
117
+ this.props = this.#core.props;
118
+ useScopedStyles('navbar', navbarScopedStyles);
140
119
  }
141
120
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
142
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsNavbarItemComponent, isStandalone: true, selector: "bs-navbar-item", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dropdown-item": "inMenu", "class.active": "inMenu && active()", "class.disabled": "inMenu && disabled()", "attr.aria-disabled": "inMenu && disabled() ? 'true' : null", "attr.aria-current": "inMenu && active() ? 'page' : null" } }, ngImport: i0, template: `
143
- <ng-template #content><ng-content></ng-content></ng-template>
144
- @if (inMenu) {
145
- <ng-container [ngTemplateOutlet]="content" />
146
- } @else {
147
- <mp-navbar-item [attr.active]="activeAttr()" [attr.disabled]="disabledAttr()" [attr.aria-current]="active() ? 'page' : null">
148
- <ng-container [ngTemplateOutlet]="content" />
149
- </mp-navbar-item>
150
- }
151
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
121
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsNavbarItemComponent, isStandalone: true, selector: "bs-navbar-item", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/navbar/src/templates/navbar-item.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
152
122
  }
153
123
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarItemComponent, decorators: [{
154
124
  type: Component,
155
- args: [{
156
- selector: 'bs-navbar-item',
157
- template: `
158
- <ng-template #content><ng-content></ng-content></ng-template>
159
- @if (inMenu) {
160
- <ng-container [ngTemplateOutlet]="content" />
161
- } @else {
162
- <mp-navbar-item [attr.active]="activeAttr()" [attr.disabled]="disabledAttr()" [attr.aria-current]="active() ? 'page' : null">
163
- <ng-container [ngTemplateOutlet]="content" />
164
- </mp-navbar-item>
165
- }
166
- `,
167
- changeDetection: ChangeDetectionStrategy.OnPush,
168
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
169
- imports: [NgTemplateOutlet],
170
- host: {
171
- '[class.dropdown-item]': 'inMenu',
172
- '[class.active]': 'inMenu && active()',
173
- '[class.disabled]': 'inMenu && disabled()',
174
- '[attr.aria-disabled]': "inMenu && disabled() ? 'true' : null",
175
- // Menu mode: the same active state is the current page.
176
- '[attr.aria-current]': "inMenu && active() ? 'page' : null",
177
- },
178
- }]
179
- }], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
125
+ args: [{ selector: 'bs-navbar-item', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/navbar/src/templates/navbar-item.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n" }]
126
+ }], ctorParameters: () => [], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
180
127
 
181
- /**
182
- * `<bs-navbar-brand>` — Angular wrapper around `<mp-navbar-brand>`.
183
- *
184
- * Project an `<a routerLink>` / text as the brand. The host sets
185
- * `slot="brand"` so the wrapper element lands in `<mp-navbar>`'s `brand` slot
186
- * (mirrors `BsShellSidebarDirective`, which sets `slot="sidebar"`).
128
+ /*
129
+ * The Angular extension of the generated `bs-navbar-dropdown` (PRD #437 D10
130
+ * escape hatch): a dropdown whose content holds the active route's link marks
131
+ * its trigger, the way Bootstrap marks an active nav link.
187
132
  */
188
- class BsNavbarBrandComponent {
189
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarBrandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
190
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: BsNavbarBrandComponent, isStandalone: true, selector: "bs-navbar-brand", host: { properties: { "attr.slot": "'brand'" } }, ngImport: i0, template: '<mp-navbar-brand><ng-content></ng-content></mp-navbar-brand>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
133
+ /** `RouterLinkActive` on the host watches the `routerLink`s in the content. */
134
+ const hostDirectives = [RouterLinkActive];
135
+ function extendInputs(inputs) {
136
+ const rla = inject(RouterLinkActive, { self: true });
137
+ // No class on this host: the state goes on the summary through the bag.
138
+ rla.routerLinkActive = [];
139
+ const routeActive = signal(false, /* @ts-ignore */
140
+ ...(ngDevMode ? [{ debugName: "routeActive" }] : /* istanbul ignore next */ []));
141
+ rla.isActiveChange.pipe(takeUntilDestroyed()).subscribe((active) => routeActive.set(active));
142
+ return () => {
143
+ const value = inputs();
144
+ return { ...value, active: value.active || routeActive() };
145
+ };
191
146
  }
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarBrandComponent, decorators: [{
193
- type: Component,
194
- args: [{
195
- selector: 'bs-navbar-brand',
196
- template: '<mp-navbar-brand><ng-content></ng-content></mp-navbar-brand>',
197
- changeDetection: ChangeDetectionStrategy.OnPush,
198
- host: {
199
- '[attr.slot]': "'brand'",
200
- },
201
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
202
- }]
203
- }] });
204
147
 
205
- /**
206
- * Marks the trigger-label template for `<bs-navbar-dropdown>` — any HTML
207
- * (text, icon + text, badges, …). Rendered into the WC's trigger via
208
- * `ngTemplateOutlet`; the trigger's accessible name derives from this content,
209
- * so give an icon-only label an `aria-label`.
210
- *
211
- * ```html
212
- * <bs-navbar-dropdown>
213
- * <span *bsNavbarDropdownLabel>Products</span>
214
- * <bs-navbar-item><a routerLink="/p1">Product 1</a></bs-navbar-item>
215
- * </bs-navbar-dropdown>
216
- * ```
217
- */
218
- class BsNavbarDropdownLabelDirective {
148
+ // GENERATED from the navbar manifest (navbar-dropdown) by @mintplayer/nx-component-compiler. Do not edit.
149
+ /** The `labelTemplate` slot of `<bs-navbar-dropdown>`: `<ng-template bsNavbarDropdownLabelTemplate>` or `*bsNavbarDropdownLabelTemplate`. */
150
+ class BsNavbarDropdownLabelTemplateDirective {
219
151
  constructor() {
220
152
  this.templateRef = inject(TemplateRef);
221
153
  }
222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarDropdownLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
223
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsNavbarDropdownLabelDirective, isStandalone: true, selector: "[bsNavbarDropdownLabel]", ngImport: i0 }); }
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarDropdownLabelTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
155
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsNavbarDropdownLabelTemplateDirective, isStandalone: true, selector: "[bsNavbarDropdownLabelTemplate]", ngImport: i0 }); }
224
156
  }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarDropdownLabelDirective, decorators: [{
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarDropdownLabelTemplateDirective, decorators: [{
226
158
  type: Directive,
227
- args: [{ selector: '[bsNavbarDropdownLabel]' }]
159
+ args: [{ selector: '[bsNavbarDropdownLabelTemplate]' }]
228
160
  }] });
229
-
230
- /**
231
- * `<bs-navbar-dropdown>` — Angular wrapper around `<mp-navbar-dropdown>`.
232
- *
233
- * The trigger content is the `*bsNavbarDropdownLabel` template — any HTML
234
- * (matches the React/Vue wrappers, which take the WC's `label` slot directly).
235
- * The dropdown panel (`<bs-dropdown-menu>`) is rendered internally — author
236
- * the items directly between the tags, uniformly with the rest of the navbar:
237
- *
238
- * <bs-navbar-dropdown>
239
- * <span *bsNavbarDropdownLabel>Basic</span>
240
- * <bs-navbar-item><a routerLink="/basic/alert">Alert</a></bs-navbar-item>
241
- * <bs-navbar-dropdown>…</bs-navbar-dropdown> <!-- submenu -->
242
- * </bs-navbar-dropdown>
243
- *
244
- * `BS_DROPDOWN_MENU_CONTEXT` is provided here (element injectors follow the
245
- * consumer template's nesting, not the projection site — the internally
246
- * rendered menu is invisible to projected children's injectors), so nested
247
- * `<bs-navbar-item>`s render their `.dropdown-item` shape.
248
- *
249
- * **Active-route trigger highlighting:** a `RouterLinkActive` host directive
250
- * collects the projected descendant `routerLink`s; when any is active
251
- * (non-exact — the whole subtree counts, like the legacy `[bsNavbarTrigger]`
252
- * prefix match) the WC gets its `active` attribute, which recolors the
253
- * shadow-rendered trigger (primary background for submenu triggers). Nested
254
- * dropdowns each report their own subtree, so the full trigger chain of the
255
- * active route highlights. Renders server-side, so it works with JS off.
256
- *
257
- * Reveal/positioning and the no-JS `:focus-within` fallback all live in the WC.
258
- */
161
+ /** A navbar dropdown, or a submenu when nested: a native `<details>`, so it opens with JavaScript off. */
259
162
  class BsNavbarDropdownComponent {
163
+ #core;
260
164
  constructor() {
261
- this.label = contentChild.required(BsNavbarDropdownLabelDirective, /* @ts-ignore */
262
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
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));
165
+ /** The host element. */
166
+ this.elementRef = inject(ElementRef);
167
+ this.label = input(/* @ts-ignore */
168
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
169
+ this.active = input(false, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
170
+ this.labelTemplateSlot = contentChild(BsNavbarDropdownLabelTemplateDirective, /* @ts-ignore */
171
+ ...(ngDevMode ? [{ debugName: "labelTemplateSlot" }] : /* istanbul ignore next */ []));
172
+ /** The template's named slots. */
173
+ this.slots = computed(() => ({ labelTemplate: this.labelTemplateSlot()?.templateRef }), /* @ts-ignore */
174
+ ...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
175
+ this.#core = useCore(navbarDropdownCore, { inputs: extendInputs(() => ({ label: this.label(), active: this.active() })), idPrefix: 'bs-navbar-dropdown' });
176
+ /** What this component hands its content. */
177
+ this.provided = this.#core.provided;
178
+ /** The template's props. */
179
+ this.props = this.#core.props;
180
+ useScopedStyles('navbar', navbarScopedStyles);
272
181
  }
273
182
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
274
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", 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 bsForwardAria [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: BsForwardAriaDirective, selector: "[bsForwardAria]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BsDropdownMenuComponent, selector: "bs-dropdown-menu", inputs: ["maxHeight"], outputs: ["select"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
183
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsNavbarDropdownComponent, isStandalone: true, selector: "bs-navbar-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideCoreContext(NAVBAR_NESTING, BsNavbarDropdownComponent)], queries: [{ propertyName: "labelTemplateSlot", first: true, predicate: BsNavbarDropdownLabelTemplateDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.RouterLinkActive }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/navbar/src/templates/navbar-dropdown.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@let p_label = props().label;\n<details data-mps=\"navbar\" [mpProps]=\"p_view.details\" #root>\n <summary data-mps=\"navbar\" [mpProps]=\"p_view.summary\">\n @if (slots().labelTemplate; as slot_labelTemplate) {\n <ng-container [ngTemplateOutlet]=\"slot_labelTemplate\" />\n } @else {\n {{ p_label }}\n }\n </summary>\n <div data-mps=\"navbar\" [mpProps]=\"p_view.panel\">\n <ng-content />\n </div>\n</details>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
275
184
  }
276
185
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarDropdownComponent, decorators: [{
277
186
  type: Component,
278
- args: [{ selector: 'bs-navbar-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], imports: [BsForwardAriaDirective, NgTemplateOutlet, BsDropdownMenuComponent], providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], hostDirectives: [RouterLinkActive], template: "<mp-navbar-dropdown bsForwardAria [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 }] }] } });
187
+ args: [{ selector: 'bs-navbar-dropdown', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideCoreContext(NAVBAR_NESTING, BsNavbarDropdownComponent)], hostDirectives: hostDirectives, template: "<!-- GENERATED from libs/mintplayer-ui-core/navbar/src/templates/navbar-dropdown.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@let p_label = props().label;\n<details data-mps=\"navbar\" [mpProps]=\"p_view.details\" #root>\n <summary data-mps=\"navbar\" [mpProps]=\"p_view.summary\">\n @if (slots().labelTemplate; as slot_labelTemplate) {\n <ng-container [ngTemplateOutlet]=\"slot_labelTemplate\" />\n } @else {\n {{ p_label }}\n }\n </summary>\n <div data-mps=\"navbar\" [mpProps]=\"p_view.panel\">\n <ng-content />\n </div>\n</details>\n" }]
188
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], labelTemplateSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsNavbarDropdownLabelTemplateDirective), { isSignal: true }] }] } });
280
189
 
281
- /**
282
- * `[bsNavbarToggler]` — marks an element as the navbar's custom hamburger
283
- * glyph, replacing the WC's built-in animated 3-bar → X toggler (the `toggler`
284
- * slot's fallback). The slot name stays an internal detail of the WC.
285
- *
286
- * The glyph is a first-class no-JS citizen: DSD slot assignment happens at
287
- * parse time (no fallback flash), the click reaches the in-shadow checkbox via
288
- * native label activation, and the open-state arrives as the inherited
289
- * `--mp-navbar-expanded: 0|1` custom property — derive the morph in CSS, e.g.
290
- * `transform: rotate(calc(var(--mp-navbar-expanded, 0) * 45deg))`.
291
- *
292
- * The host must be NON-interactive: labels do not forward clicks from
293
- * interactive descendants, so a `<button>`/`<a href>` here would kill the
294
- * no-JS toggle. Use a `<span>`/`<div>` glyph. (For a programmatic boolean, use
295
- * `[expanded]`/`(expandedchange)` on `bs-navbar` instead.)
296
- */
297
- class BsNavbarTogglerDirective {
298
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarTogglerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
299
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsNavbarTogglerDirective, isStandalone: true, selector: "[bsNavbarToggler]", host: { attributes: { "slot": "toggler" } }, ngImport: i0 }); }
300
- }
301
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarTogglerDirective, decorators: [{
302
- type: Directive,
303
- args: [{
304
- selector: '[bsNavbarToggler]',
305
- host: {
306
- slot: 'toggler',
307
- },
308
- }]
309
- }] });
190
+ // GENERATED from the navbar manifest by @mintplayer/nx-component-compiler. Do not edit.
310
191
 
192
+ /** The offset before the bar is measured: Bootstrap's default navbar is 3.5rem tall. */
193
+ const ESTIMATE = 'var(--bs-navbar-content-offset, 3.5rem)';
311
194
  /**
312
195
  * `[bsNavbarContent]` — offsets page content below a `positioning="fixed"`
313
196
  * navbar by its LIVE height (replaces hand-maintained `padding-top` constants).
@@ -317,13 +200,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
317
200
  *
318
201
  * On the client a `ResizeObserver` tracks the bar (theme/viewport changes
319
202
  * resize it) and sets `padding-top` = the element's own initial padding + the
320
- * bar height. On the server — where the bar can't be measured — a fixed 58px
321
- * approximation is serialized into the HTML so SSR/no-JS pages still clear the
322
- * bar (same contract as the pre-WC directive).
203
+ * bar height. Until then (on the server, and with JavaScript off) the offset
204
+ * is CSS: `--bs-navbar-content-offset`, defaulting to 3.5rem, the height of
205
+ * Bootstrap's default navbar. A theme with a taller bar sets that property.
323
206
  */
324
207
  class BsNavbarContentDirective {
325
- /** Server-side height approximation (px) — the bar isn't measurable there. */
326
- static { this.SSR_NAVBAR_HEIGHT = 58; }
327
208
  #element;
328
209
  #renderer;
329
210
  #observer;
@@ -332,19 +213,15 @@ class BsNavbarContentDirective {
332
213
  this.navbar = input.required({ ...(ngDevMode ? { debugName: "navbar" } : /* istanbul ignore next */ {}), alias: 'bsNavbarContent' });
333
214
  this.#element = inject(ElementRef).nativeElement;
334
215
  this.#renderer = inject(Renderer2);
335
- if (isPlatformServer(inject(PLATFORM_ID))) {
336
- this.#setPadding(BsNavbarContentDirective.SSR_NAVBAR_HEIGHT);
216
+ this.#renderer.setStyle(this.#element, 'padding-top', ESTIMATE, RendererStyleFlags2.DashCase);
217
+ if (isPlatformServer(inject(PLATFORM_ID)))
337
218
  return;
338
- }
339
219
  afterNextRender(() => {
340
- // The measurable bar is the WC inside the wrapper host (the host itself
341
- // is inline and reports no height for a fixed child).
342
- const bar = this.navbar().elementRef.nativeElement.querySelector('mp-navbar');
343
- if (!bar)
344
- return;
345
- // Hydration reuses the SSR element, so the 58px approximation this
346
- // directive wrote server-side is still inline here. Remove it BEFORE
347
- // measuring, or the author's baseline would double-count it.
220
+ // The bs-navbar host is the .navbar itself.
221
+ const bar = this.navbar().elementRef.nativeElement;
222
+ // The CSS estimate is still inline here (hydration reuses the server
223
+ // element). Remove it BEFORE measuring, or the author's baseline would
224
+ // count it.
348
225
  this.#renderer.removeStyle(this.#element, 'padding-top');
349
226
  const initial = parseFloat(getComputedStyle(this.#element).paddingTop) || 0;
350
227
  this.#observer = new ResizeObserver(() => this.#setPadding(initial + bar.offsetHeight));
@@ -367,9 +244,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
367
244
  }]
368
245
  }], ctorParameters: () => [], propDecorators: { navbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsNavbarContent", required: true }] }] } });
369
246
 
247
+ // The navbar components are generated from @mintplayer/ui-core/navbar (PRD #437 D10).
248
+
370
249
  /**
371
250
  * Generated bundle index. Do not edit.
372
251
  */
373
252
 
374
- export { BsNavbarBrandComponent, BsNavbarComponent, BsNavbarContentDirective, BsNavbarDropdownComponent, BsNavbarDropdownLabelDirective, BsNavbarItemComponent, BsNavbarNavComponent, BsNavbarTogglerDirective };
253
+ export { BsNavbarBrandDirective, BsNavbarComponent, BsNavbarContentDirective, BsNavbarDropdownComponent, BsNavbarDropdownLabelTemplateDirective, BsNavbarItemComponent, BsNavbarNavComponent, BsNavbarTogglerDirective };
375
254
  //# sourceMappingURL=mintplayer-ng-bootstrap-navbar.mjs.map