@mintplayer/ng-bootstrap 22.4.0 → 22.5.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.
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +157 -184
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +287 -684
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +102 -57
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +173 -208
|
@@ -1,238 +1,203 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { ElementRef, TemplateRef,
|
|
3
|
-
import {
|
|
2
|
+
import { ElementRef, TemplateRef, OnDestroy } from '@angular/core';
|
|
3
|
+
import { NavbarBreakpoint, NavbarExpandedChangeEventDetail } from '@mintplayer/web-components/navbar';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* `<bs-navbar>` — Angular wrapper around the `<mp-navbar>` web component.
|
|
7
|
+
*
|
|
8
|
+
* Layout, the responsive collapse behaviour, the pure-CSS no-JS toggle and the
|
|
9
|
+
* theme-aware styling all live in the WC (single source of UI truth). This
|
|
10
|
+
* wrapper only bridges inputs to attributes and projects content into the WC's
|
|
11
|
+
* slots:
|
|
12
|
+
* - mark the brand with `bs-navbar-brand` (→ `slot="brand"`);
|
|
13
|
+
* - left-aligned items go in the default slot;
|
|
14
|
+
* - right-aligned items get `slot="end"`.
|
|
15
|
+
*
|
|
16
|
+
* The WC is registered **client-side only** (`afterNextRender`); on the server
|
|
17
|
+
* Angular emits a bare `<mp-navbar>` tag and the SSR layer injects its
|
|
18
|
+
* Declarative Shadow DOM (see `injectMpNavbarDsd`), so it renders with JS off.
|
|
19
|
+
*/
|
|
5
20
|
declare class BsNavbarComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
readonly
|
|
21
|
+
/** Host element — measured by `[bsNavbarContent]` to offset page content. */
|
|
22
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
|
23
|
+
/** Bootstrap breakpoint the navbar expands at; collapses below it. */
|
|
24
|
+
readonly breakpoint: _angular_core.InputSignal<NavbarBreakpoint>;
|
|
25
|
+
/** Theme color of the navbar background (e.g. `primary`, `dark`, `body-tertiary`). */
|
|
26
|
+
readonly color: _angular_core.InputSignal<string | undefined>;
|
|
27
|
+
/** Accessible label for the `<nav>` landmark. */
|
|
28
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
29
|
+
/** Whether the collapse is (visually) expanded; reflected to the WC. */
|
|
30
|
+
readonly expanded: _angular_core.InputSignal<boolean>;
|
|
31
|
+
/** `fixed` pins the bar to the top of the viewport, full width; omit for in-flow. */
|
|
32
|
+
readonly positioning: _angular_core.InputSignal<"fixed" | undefined>;
|
|
33
|
+
/** Fires when the collapse toggles (re-emits the WC's `expandedchange`). */
|
|
34
|
+
readonly expandedchange: _angular_core.OutputEmitterRef<NavbarExpandedChangeEventDetail>;
|
|
35
|
+
/** String-or-absent attributes derived once via signals. */
|
|
36
|
+
protected readonly colorAttr: _angular_core.Signal<string | null>;
|
|
37
|
+
protected readonly ariaLabelAttr: _angular_core.Signal<string | null>;
|
|
38
|
+
protected readonly positioningAttr: _angular_core.Signal<"fixed" | null>;
|
|
39
|
+
/** Presence attribute: `''` when expanded, `null` when collapsed. */
|
|
40
|
+
protected readonly expandedAttr: _angular_core.Signal<"" | null>;
|
|
41
|
+
protected onExpandedchange(event: Event): void;
|
|
14
42
|
constructor();
|
|
15
|
-
onWindowResize(): void;
|
|
16
|
-
readonly nav: _angular_core.Signal<ElementRef<any>>;
|
|
17
|
-
autoclose: _angular_core.InputSignal<boolean>;
|
|
18
|
-
ariaLabel: _angular_core.InputSignal<string>;
|
|
19
|
-
collapseId: _angular_core.InputSignal<string>;
|
|
20
|
-
/** Stable id for the noscript-friendly toggler-checkbox (label[for] target). */
|
|
21
|
-
readonly togglerCheckboxId: string;
|
|
22
|
-
expandButtonTemplate: _angular_core.WritableSignal<TemplateRef<any> | null>;
|
|
23
|
-
isExpanded: _angular_core.WritableSignal<boolean>;
|
|
24
|
-
windowWidth: _angular_core.WritableSignal<number | null>;
|
|
25
|
-
isResizing: _angular_core.WritableSignal<boolean>;
|
|
26
|
-
/**
|
|
27
|
-
* What color to render the navbar.
|
|
28
|
-
*
|
|
29
|
-
* - `null` (default): no background, no theme override — navbar is
|
|
30
|
-
* transparent and follows `<html data-bs-theme>` in both background and
|
|
31
|
-
* text colors.
|
|
32
|
-
* - A `Color` enum value: emits `bg-{name}` and (where appropriate)
|
|
33
|
-
* `data-bs-theme="light|dark"` per the mapping in
|
|
34
|
-
* `docs/issue_324_navbar_modernize_PRD.md` FR-2.
|
|
35
|
-
* - A `string` literal (e.g. `'body-tertiary'`, `'body-secondary'`): emits
|
|
36
|
-
* `bg-{value}` directly without any `data-bs-theme` override. Use this
|
|
37
|
-
* for theme-adaptive backgrounds — `bg-body-tertiary` swaps its color
|
|
38
|
-
* with the page theme automatically via Bootstrap's `--bs-tertiary-bg`.
|
|
39
|
-
*/
|
|
40
|
-
color: _angular_core.InputSignal<string | Color | null>;
|
|
41
|
-
breakpoint: _angular_core.InputSignal<Breakpoint | null>;
|
|
42
|
-
expandAt: _angular_core.Signal<1400 | 1200 | 992 | 768 | 576 | 0 | null>;
|
|
43
|
-
isSmallMode: _angular_core.Signal<boolean>;
|
|
44
|
-
expandClass: _angular_core.Signal<string | null>;
|
|
45
|
-
wAutoClass: _angular_core.Signal<string | null>;
|
|
46
|
-
dNoneClass: _angular_core.Signal<string | null>;
|
|
47
|
-
/**
|
|
48
|
-
* Background utility class for the rendered `<nav>` (or none).
|
|
49
|
-
*
|
|
50
|
-
* Bootstrap 5.3+ uses `data-bs-theme` for token resolution (see `dataBsTheme`
|
|
51
|
-
* below); the navbar's *background* is an independent decision driven by the
|
|
52
|
-
* `[color]` input. `null` (the default) emits no class so the navbar stays
|
|
53
|
-
* transparent and inherits whatever background sits behind it — the
|
|
54
|
-
* idiomatic adaptive setup pairs this with `class="bg-body-tertiary"` on
|
|
55
|
-
* the consumer side for a theme-aware tinted background.
|
|
56
|
-
*/
|
|
57
|
-
bgClass: _angular_core.Signal<string | null>;
|
|
58
|
-
/**
|
|
59
|
-
* Value for `[attr.data-bs-theme]` on the rendered `<nav>`, or `null` to
|
|
60
|
-
* inherit the page theme. Bootstrap 5.3 deprecated `.navbar-light` /
|
|
61
|
-
* `.navbar-dark` in favour of this attribute — components scope their CSS
|
|
62
|
-
* variables to `[data-bs-theme="light|dark"]`, so setting it on the navbar
|
|
63
|
-
* pins its theme regardless of `<html>`. Omitting it (returning `null`)
|
|
64
|
-
* lets the navbar follow the page's `<html data-bs-theme>` cascade.
|
|
65
|
-
*/
|
|
66
|
-
dataBsTheme: _angular_core.Signal<"light" | "dark" | null>;
|
|
67
|
-
navClassList: _angular_core.Signal<string[]>;
|
|
68
|
-
toggleExpanded(): void;
|
|
69
43
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarComponent, never>;
|
|
70
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarComponent, "bs-navbar", never, { "
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare class BsNavbarBrandComponent implements AfterContentChecked {
|
|
74
|
-
private element;
|
|
75
|
-
readonly routerLink: _angular_core.InputSignal<any[]>;
|
|
76
|
-
ngAfterContentChecked(): void;
|
|
77
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarBrandComponent, never>;
|
|
78
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarBrandComponent, "bs-navbar-brand", never, { "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
44
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarComponent, "bs-navbar", never, { "breakpoint": { "alias": "breakpoint"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "positioning": { "alias": "positioning"; "required": false; "isSignal": true; }; }, { "expandedchange": "expandedchange"; }, never, ["*"], true, never>;
|
|
79
45
|
}
|
|
80
46
|
|
|
47
|
+
/**
|
|
48
|
+
* `<bs-navbar-nav>` — groups navbar items into one of the WC's two nav lists.
|
|
49
|
+
*
|
|
50
|
+
* `align="start"` (default) joins the left list, `align="end"` the list pushed
|
|
51
|
+
* to the far edge in wide mode. The host is `display: contents`, so the grouped
|
|
52
|
+
* `<bs-navbar-item>` / `<bs-navbar-dropdown>` children flatten into the WC's
|
|
53
|
+
* `.navbar-nav` flex layout exactly like directly-slotted items — the same
|
|
54
|
+
* mechanism `<mp-navbar>` itself uses for its slots. The WC slot name stays an
|
|
55
|
+
* internal detail (mirrors `bs-navbar-brand` hiding `slot="brand"`).
|
|
56
|
+
*
|
|
57
|
+
* `display: contents` MUST stay static CSS (never applied via JS) so the no-JS
|
|
58
|
+
* SSR path lays out identically from first paint.
|
|
59
|
+
*/
|
|
81
60
|
declare class BsNavbarNavComponent {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
collapse: _angular_core.InputSignal<boolean>;
|
|
86
|
-
private resizeTimeout;
|
|
87
|
-
showNavs: _angular_core.Signal<boolean>;
|
|
88
|
-
constructor();
|
|
89
|
-
onWindowResize(): void;
|
|
61
|
+
/** Which nav group the items join: `start` (default) or `end` (pushed to the far edge in wide mode). */
|
|
62
|
+
readonly align: _angular_core.InputSignal<"start" | "end">;
|
|
63
|
+
protected readonly slotAttr: _angular_core.Signal<"end" | null>;
|
|
90
64
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarNavComponent, never>;
|
|
91
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarNavComponent, "bs-navbar-nav", never, { "
|
|
65
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarNavComponent, "bs-navbar-nav", never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
92
66
|
}
|
|
93
67
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
private readonly isPositioned;
|
|
123
|
-
/** What `[class.show]` actually binds to. */
|
|
124
|
-
readonly showClass: _angular_core.Signal<boolean>;
|
|
125
|
-
maxHeight: _angular_core.Signal<string | null>;
|
|
126
|
-
maxHeightOrNull: _angular_core.Signal<string | null>;
|
|
127
|
-
constructor();
|
|
128
|
-
ngOnDestroy(): void;
|
|
129
|
-
set showInOverlay(value: boolean);
|
|
130
|
-
get elementsToExclude(): HTMLElement[];
|
|
131
|
-
readonly childDropdowns: _angular_core.Signal<readonly BsNavbarDropdownComponent[]>;
|
|
132
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarDropdownComponent, never>;
|
|
133
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarDropdownComponent, "bs-navbar-dropdown", never, { "autoclose": { "alias": "autoclose"; "required": false; "isSignal": true; }; }, {}, ["childDropdowns"], ["*"], true, never>;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
declare class BsNavbarItemComponent implements AfterContentInit, AfterContentChecked {
|
|
137
|
-
private navbar;
|
|
138
|
-
element: ElementRef<any>;
|
|
139
|
-
private destroy;
|
|
140
|
-
private platformId;
|
|
141
|
-
private router;
|
|
142
|
-
parentDropdown: any;
|
|
143
|
-
readonly hasDropdown: _angular_core.Signal<boolean>;
|
|
144
|
-
anchorTag: HTMLAnchorElement | null;
|
|
145
|
-
readonly dropdowns: _angular_core.Signal<readonly BsNavbarDropdownComponent[]>;
|
|
146
|
-
constructor();
|
|
147
|
-
ngAfterContentInit(): void;
|
|
148
|
-
ngAfterContentChecked(): void;
|
|
149
|
-
/**
|
|
150
|
-
* Host-bound click handler. Fires for any click that bubbles up through
|
|
151
|
-
* this `<bs-navbar-item>`, including descendant navbar-items inside our
|
|
152
|
-
* projected `<bs-navbar-dropdown>`. We filter to the consumer-authored
|
|
153
|
-
* `<a>` element of THIS item (`this.anchorTag`) so the trigger logic only
|
|
154
|
-
* runs when the user clicked OUR anchor — descendant link clicks are
|
|
155
|
-
* already handled by their own navbar-item's host listener.
|
|
156
|
-
*
|
|
157
|
-
* This replaces the previous `addEventListener` calls in
|
|
158
|
-
* `ngAfterContentChecked`, which were brittle: on SSR the marker
|
|
159
|
-
* attribute (`close-init-b`/`-a`) was serialized into the HTML, on the
|
|
160
|
-
* client the guard read it as "already wired" and skipped attaching the
|
|
161
|
-
* listener on the live DOM. Host bindings serialize and re-bind on
|
|
162
|
-
* hydration like template bindings, so no race.
|
|
163
|
-
*/
|
|
164
|
-
onHostClick(ev: MouseEvent): void;
|
|
68
|
+
/**
|
|
69
|
+
* `<bs-navbar-item>` — one navbar entry, uniform at EVERY nesting level.
|
|
70
|
+
*
|
|
71
|
+
* Wraps a consumer light-DOM link: project an `<a routerLink>` / `<a href>` (or
|
|
72
|
+
* a `<button>`) as content. The rendered shape is context-aware:
|
|
73
|
+
*
|
|
74
|
+
* - **Directly in the navbar** (top level, or inside `<bs-navbar-nav>`): wraps
|
|
75
|
+
* the link in `<mp-navbar-item>`, which styles it as a `.nav-link` in its
|
|
76
|
+
* own shadow.
|
|
77
|
+
* - **Inside a dropdown** (`<bs-navbar-dropdown>` / `<bs-dropdown-menu>`,
|
|
78
|
+
* detected via `BS_DROPDOWN_MENU_CONTEXT`): the HOST itself becomes the
|
|
79
|
+
* `.dropdown-item` — the shape `mp-dropdown-menu` queries (roving tabindex,
|
|
80
|
+
* `role=menuitem` on the inner control) and styles via
|
|
81
|
+
* `::slotted(.dropdown-item)`. The link stays a DIRECT child of the host so
|
|
82
|
+
* the menu wrapper's companion `.dropdown-item > a` reset reaches it
|
|
83
|
+
* (`NgTemplateOutlet` through `<ng-container>` adds no wrapper element).
|
|
84
|
+
*
|
|
85
|
+
* `active` / `disabled` bridge to the WC's presence attributes (nav mode) or
|
|
86
|
+
* Bootstrap's item classes + `aria-disabled` (menu mode).
|
|
87
|
+
*/
|
|
88
|
+
declare class BsNavbarItemComponent {
|
|
89
|
+
readonly active: _angular_core.InputSignal<boolean>;
|
|
90
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
91
|
+
/** Menu mode when authored inside a dropdown; fixed per instance. */
|
|
92
|
+
protected readonly inMenu: boolean;
|
|
93
|
+
/** Presence attributes: `''` when set, `null` when absent. */
|
|
94
|
+
protected readonly activeAttr: _angular_core.Signal<"" | null>;
|
|
95
|
+
protected readonly disabledAttr: _angular_core.Signal<"" | null>;
|
|
165
96
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarItemComponent, never>;
|
|
166
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarItemComponent, "bs-navbar-item", never, {}, {},
|
|
97
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarItemComponent, "bs-navbar-item", never, { "active": { "alias": "active"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
167
98
|
}
|
|
168
99
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarContentDirective, never>;
|
|
180
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarContentDirective, "[bsNavbarContent]", never, { "navbar": { "alias": "bsNavbarContent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
100
|
+
/**
|
|
101
|
+
* `<bs-navbar-brand>` — Angular wrapper around `<mp-navbar-brand>`.
|
|
102
|
+
*
|
|
103
|
+
* Project an `<a routerLink>` / text as the brand. The host sets
|
|
104
|
+
* `slot="brand"` so the wrapper element lands in `<mp-navbar>`'s `brand` slot
|
|
105
|
+
* (mirrors `BsShellSidebarDirective`, which sets `slot="sidebar"`).
|
|
106
|
+
*/
|
|
107
|
+
declare class BsNavbarBrandComponent {
|
|
108
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarBrandComponent, never>;
|
|
109
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarBrandComponent, "bs-navbar-brand", never, {}, {}, never, ["*"], true, never>;
|
|
181
110
|
}
|
|
182
111
|
|
|
183
112
|
/**
|
|
184
|
-
* Marks
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* click handlers `preventDefault`).
|
|
113
|
+
* Marks the trigger-label template for `<bs-navbar-dropdown>` — any HTML
|
|
114
|
+
* (text, icon + text, badges, …). Rendered into the WC's trigger via
|
|
115
|
+
* `ngTemplateOutlet`; the trigger's accessible name derives from this content,
|
|
116
|
+
* so give an icon-only label an `aria-label`.
|
|
189
117
|
*
|
|
190
|
-
* @example
|
|
191
118
|
* ```html
|
|
192
|
-
* <
|
|
119
|
+
* <bs-navbar-dropdown>
|
|
120
|
+
* <span *bsNavbarDropdownLabel>Products</span>
|
|
121
|
+
* <bs-navbar-item><a routerLink="/p1">Product 1</a></bs-navbar-item>
|
|
122
|
+
* </bs-navbar-dropdown>
|
|
193
123
|
* ```
|
|
194
|
-
*
|
|
195
|
-
* Items inside the dropdown panel still use real `[routerLink]`s for
|
|
196
|
-
* navigation. Use this directive only for the trigger anchor that opens the
|
|
197
|
-
* dropdown panel.
|
|
198
124
|
*/
|
|
199
|
-
declare class
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
private targetUrl;
|
|
204
|
-
readonly isActive: _angular_core.Signal<boolean>;
|
|
205
|
-
constructor();
|
|
206
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarTriggerDirective, never>;
|
|
207
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarTriggerDirective, "[bsNavbarTrigger]", never, { "bsNavbarTrigger": { "alias": "bsNavbarTrigger"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
125
|
+
declare class BsNavbarDropdownLabelDirective {
|
|
126
|
+
readonly templateRef: TemplateRef<any>;
|
|
127
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarDropdownLabelDirective, never>;
|
|
128
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarDropdownLabelDirective, "[bsNavbarDropdownLabel]", never, {}, {}, never, never, true, never>;
|
|
208
129
|
}
|
|
209
130
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
131
|
+
/**
|
|
132
|
+
* `<bs-navbar-dropdown>` — Angular wrapper around `<mp-navbar-dropdown>`.
|
|
133
|
+
*
|
|
134
|
+
* The trigger content is the `*bsNavbarDropdownLabel` template — any HTML
|
|
135
|
+
* (matches the React/Vue wrappers, which take the WC's `label` slot directly).
|
|
136
|
+
* The dropdown panel (`<bs-dropdown-menu>`) is rendered internally — author
|
|
137
|
+
* the items directly between the tags, uniformly with the rest of the navbar:
|
|
138
|
+
*
|
|
139
|
+
* <bs-navbar-dropdown>
|
|
140
|
+
* <span *bsNavbarDropdownLabel>Basic</span>
|
|
141
|
+
* <bs-navbar-item><a routerLink="/basic/alert">Alert</a></bs-navbar-item>
|
|
142
|
+
* <bs-navbar-dropdown>…</bs-navbar-dropdown> <!-- submenu -->
|
|
143
|
+
* </bs-navbar-dropdown>
|
|
144
|
+
*
|
|
145
|
+
* `BS_DROPDOWN_MENU_CONTEXT` is provided here (element injectors follow the
|
|
146
|
+
* consumer template's nesting, not the projection site — the internally
|
|
147
|
+
* rendered menu is invisible to projected children's injectors), so nested
|
|
148
|
+
* `<bs-navbar-item>`s render their `.dropdown-item` shape.
|
|
149
|
+
* Reveal/positioning and the no-JS `:focus-within` fallback all live in the WC.
|
|
150
|
+
*/
|
|
151
|
+
declare class BsNavbarDropdownComponent {
|
|
152
|
+
protected readonly label: _angular_core.Signal<BsNavbarDropdownLabelDirective>;
|
|
153
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarDropdownComponent, never>;
|
|
154
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarDropdownComponent, "bs-navbar-dropdown", never, {}, {}, ["label"], ["*"], true, never>;
|
|
218
155
|
}
|
|
219
156
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
157
|
+
/**
|
|
158
|
+
* `[bsNavbarToggler]` — marks an element as the navbar's custom hamburger
|
|
159
|
+
* glyph, replacing the WC's built-in animated 3-bar → X toggler (the `toggler`
|
|
160
|
+
* slot's fallback). The slot name stays an internal detail of the WC.
|
|
161
|
+
*
|
|
162
|
+
* The glyph is a first-class no-JS citizen: DSD slot assignment happens at
|
|
163
|
+
* parse time (no fallback flash), the click reaches the in-shadow checkbox via
|
|
164
|
+
* native label activation, and the open-state arrives as the inherited
|
|
165
|
+
* `--mp-navbar-expanded: 0|1` custom property — derive the morph in CSS, e.g.
|
|
166
|
+
* `transform: rotate(calc(var(--mp-navbar-expanded, 0) * 45deg))`.
|
|
167
|
+
*
|
|
168
|
+
* The host must be NON-interactive: labels do not forward clicks from
|
|
169
|
+
* interactive descendants, so a `<button>`/`<a href>` here would kill the
|
|
170
|
+
* no-JS toggle. Use a `<span>`/`<div>` glyph. (For a programmatic boolean, use
|
|
171
|
+
* `[expanded]`/`(expandedchange)` on `bs-navbar` instead.)
|
|
172
|
+
*/
|
|
173
|
+
declare class BsNavbarTogglerDirective {
|
|
174
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarTogglerDirective, never>;
|
|
175
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarTogglerDirective, "[bsNavbarToggler]", never, {}, {}, never, never, true, never>;
|
|
226
176
|
}
|
|
227
177
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
178
|
+
/**
|
|
179
|
+
* `[bsNavbarContent]` — offsets page content below a `positioning="fixed"`
|
|
180
|
+
* navbar by its LIVE height (replaces hand-maintained `padding-top` constants).
|
|
181
|
+
*
|
|
182
|
+
* <bs-navbar [positioning]="'fixed'" #nav>…</bs-navbar>
|
|
183
|
+
* <div [bsNavbarContent]="nav"><router-outlet /></div>
|
|
184
|
+
*
|
|
185
|
+
* On the client a `ResizeObserver` tracks the bar (theme/viewport changes
|
|
186
|
+
* resize it) and sets `padding-top` = the element's own initial padding + the
|
|
187
|
+
* bar height. On the server — where the bar can't be measured — a fixed 58px
|
|
188
|
+
* approximation is serialized into the HTML so SSR/no-JS pages still clear the
|
|
189
|
+
* bar (same contract as the pre-WC directive).
|
|
190
|
+
*/
|
|
191
|
+
declare class BsNavbarContentDirective implements OnDestroy {
|
|
192
|
+
#private;
|
|
193
|
+
/** The `bs-navbar` to clear — pass its template reference (`#nav`). */
|
|
194
|
+
readonly navbar: _angular_core.InputSignal<BsNavbarComponent>;
|
|
195
|
+
/** Server-side height approximation (px) — the bar isn't measurable there. */
|
|
196
|
+
static readonly SSR_NAVBAR_HEIGHT = 58;
|
|
233
197
|
constructor();
|
|
234
|
-
|
|
235
|
-
static
|
|
198
|
+
ngOnDestroy(): void;
|
|
199
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarContentDirective, never>;
|
|
200
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarContentDirective, "[bsNavbarContent]", never, { "navbar": { "alias": "bsNavbarContent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
236
201
|
}
|
|
237
202
|
|
|
238
|
-
export {
|
|
203
|
+
export { BsNavbarBrandComponent, BsNavbarComponent, BsNavbarContentDirective, BsNavbarDropdownComponent, BsNavbarDropdownLabelDirective, BsNavbarItemComponent, BsNavbarNavComponent, BsNavbarTogglerDirective };
|