@cngx/ui 0.0.1-rc.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 (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +550 -0
  3. package/action-button/README.md +98 -0
  4. package/empty-state/README.md +103 -0
  5. package/feedback/README.md +33 -0
  6. package/fesm2022/cngx-ui-action-button.mjs +319 -0
  7. package/fesm2022/cngx-ui-action-button.mjs.map +1 -0
  8. package/fesm2022/cngx-ui-empty-state.mjs +138 -0
  9. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -0
  10. package/fesm2022/cngx-ui-feedback.mjs +2962 -0
  11. package/fesm2022/cngx-ui-feedback.mjs.map +1 -0
  12. package/fesm2022/cngx-ui-layout.mjs +89 -0
  13. package/fesm2022/cngx-ui-layout.mjs.map +1 -0
  14. package/fesm2022/cngx-ui-mat-stepper.mjs +567 -0
  15. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -0
  16. package/fesm2022/cngx-ui-mat-tabs.mjs +1405 -0
  17. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -0
  18. package/fesm2022/cngx-ui-material.mjs +79 -0
  19. package/fesm2022/cngx-ui-material.mjs.map +1 -0
  20. package/fesm2022/cngx-ui-overlay.mjs +91 -0
  21. package/fesm2022/cngx-ui-overlay.mjs.map +1 -0
  22. package/fesm2022/cngx-ui-sidenav.mjs +521 -0
  23. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -0
  24. package/fesm2022/cngx-ui-skeleton.mjs +158 -0
  25. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -0
  26. package/fesm2022/cngx-ui-speak.mjs +112 -0
  27. package/fesm2022/cngx-ui-speak.mjs.map +1 -0
  28. package/fesm2022/cngx-ui-stepper.mjs +312 -0
  29. package/fesm2022/cngx-ui-stepper.mjs.map +1 -0
  30. package/fesm2022/cngx-ui-tabs.mjs +507 -0
  31. package/fesm2022/cngx-ui-tabs.mjs.map +1 -0
  32. package/fesm2022/cngx-ui.mjs +45 -0
  33. package/fesm2022/cngx-ui.mjs.map +1 -0
  34. package/layout/README.md +133 -0
  35. package/mat-stepper/README.md +34 -0
  36. package/mat-tabs/README.md +163 -0
  37. package/mat-tabs/styles/mat-tabs.css +233 -0
  38. package/material/README.md +90 -0
  39. package/overlay/README.md +99 -0
  40. package/package.json +98 -0
  41. package/sidenav/README.md +127 -0
  42. package/skeleton/README.md +98 -0
  43. package/speak/README.md +93 -0
  44. package/speak/speak-button-theme.scss +78 -0
  45. package/stepper/README.md +40 -0
  46. package/tabs/README.md +28 -0
  47. package/types/cngx-ui-action-button.d.ts +126 -0
  48. package/types/cngx-ui-empty-state.d.ts +41 -0
  49. package/types/cngx-ui-feedback.d.ts +1174 -0
  50. package/types/cngx-ui-layout.d.ts +56 -0
  51. package/types/cngx-ui-mat-stepper.d.ts +234 -0
  52. package/types/cngx-ui-mat-tabs.d.ts +664 -0
  53. package/types/cngx-ui-material.d.ts +36 -0
  54. package/types/cngx-ui-overlay.d.ts +57 -0
  55. package/types/cngx-ui-sidenav.d.ts +209 -0
  56. package/types/cngx-ui-skeleton.d.ts +97 -0
  57. package/types/cngx-ui-speak.d.ts +31 -0
  58. package/types/cngx-ui-stepper.d.ts +129 -0
  59. package/types/cngx-ui-tabs.d.ts +165 -0
  60. package/types/cngx-ui.d.ts +18 -0
@@ -0,0 +1,521 @@
1
+ import { DOCUMENT } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, model, signal, inject, ElementRef, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, contentChildren, afterNextRender, DestroyRef, Directive } from '@angular/core';
4
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { fromEvent } from 'rxjs';
6
+ import { parseKeyCombo, matchesKeyCombo } from '@cngx/core/utils';
7
+
8
+ /**
9
+ * Declarative sidebar component that composes drawer, focus trap,
10
+ * scroll lock, swipe dismiss, and media query atoms internally.
11
+ *
12
+ * Supports responsive mode switching, two-way `[(opened)]` binding,
13
+ * and content projection via header/footer slots.
14
+ *
15
+ * Use inside `CngxSidenavLayout` for dual-sidebar support and
16
+ * shared backdrop coordination.
17
+ *
18
+ * ```html
19
+ * <cngx-sidenav-layout>
20
+ * <cngx-sidenav position="start" [(opened)]="navOpen"
21
+ * [responsive]="'(min-width: 1024px)'">
22
+ * <cngx-sidenav-header>Logo</cngx-sidenav-header>
23
+ * <a cngxNavLink [active]="true">Dashboard</a>
24
+ * <cngx-sidenav-footer>v1.0</cngx-sidenav-footer>
25
+ * </cngx-sidenav>
26
+ * <cngx-sidenav-content>
27
+ * <router-outlet />
28
+ * </cngx-sidenav-content>
29
+ * </cngx-sidenav-layout>
30
+ * ```
31
+ */
32
+ class CngxSidenav {
33
+ /** Logical position: `'start'` (default left in LTR) or `'end'` (right in LTR). */
34
+ position = input('start', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
35
+ /** Accessible label for the complementary landmark. */
36
+ ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
37
+ /** Drawer mode. Overridden by `responsive` when set. */
38
+ mode = input('over', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
39
+ /**
40
+ * CSS media query string for responsive mode switching.
41
+ * When the query matches, mode becomes `'side'` (permanent).
42
+ * When it doesn't match, mode becomes `'over'` (overlay).
43
+ */
44
+ responsive = input(undefined, ...(ngDevMode ? [{ debugName: "responsive" }] : /* istanbul ignore next */ []));
45
+ /** Width of the sidenav panel. Supports two-way `[(width)]` for resize. */
46
+ width = model('280px', ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
47
+ /** Width of the collapsed rail in `mini` mode. Any CSS value. */
48
+ miniWidth = input('56px', ...(ngDevMode ? [{ debugName: "miniWidth" }] : /* istanbul ignore next */ []));
49
+ /** Whether hovering the mini rail expands the sidenav to full width. */
50
+ expandOnHover = input(true, ...(ngDevMode ? [{ debugName: "expandOnHover" }] : /* istanbul ignore next */ []));
51
+ /** Whether the sidebar is user-resizable via a drag handle. */
52
+ resizable = input(false, ...(ngDevMode ? [{ debugName: "resizable" }] : /* istanbul ignore next */ []));
53
+ /** Minimum width constraint during resize. */
54
+ minWidth = input('120px', ...(ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []));
55
+ /** Maximum width constraint during resize. */
56
+ maxWidth = input('600px', ...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
57
+ /**
58
+ * Keyboard shortcut to toggle the sidenav, e.g. `'ctrl+b'` or `'meta+b'`.
59
+ * Uses `ctrl` on Windows/Linux and `meta` (Cmd) on macOS automatically
60
+ * when `'mod+<key>'` syntax is used.
61
+ */
62
+ shortcut = input(undefined, ...(ngDevMode ? [{ debugName: "shortcut" }] : /* istanbul ignore next */ []));
63
+ /** Whether a resize drag is in progress. */
64
+ resizingState = signal(false, ...(ngDevMode ? [{ debugName: "resizingState" }] : /* istanbul ignore next */ []));
65
+ resizing = this.resizingState.asReadonly();
66
+ /** Two-way opened state. Supports `[(opened)]="signal"`. */
67
+ opened = model(false, ...(ngDevMode ? [{ debugName: "opened" }] : /* istanbul ignore next */ []));
68
+ /** Whether the mini-mode rail is currently expanded (hover or programmatic). */
69
+ expandedState = signal(false, ...(ngDevMode ? [{ debugName: "expandedState" }] : /* istanbul ignore next */ []));
70
+ expanded = this.expandedState.asReadonly();
71
+ /** @internal Reference to host element for layout positioning. */
72
+ elementRef = inject((ElementRef));
73
+ // Inlined matchMedia, not CngxMediaQuery directive.
74
+ mediaMatches = signal(false, ...(ngDevMode ? [{ debugName: "mediaMatches" }] : /* istanbul ignore next */ []));
75
+ /** Resolved mode — responsive overrides to `'side'` when matching, falls back to `mode()`. */
76
+ effectiveMode = computed(() => {
77
+ if (!this.responsive()) {
78
+ return this.mode();
79
+ }
80
+ return this.mediaMatches() ? 'side' : this.mode();
81
+ }, ...(ngDevMode ? [{ debugName: "effectiveMode" }] : /* istanbul ignore next */ []));
82
+ /** Whether this sidenav is in overlay mode (over). */
83
+ isOverlay = computed(() => this.effectiveMode() === 'over', ...(ngDevMode ? [{ debugName: "isOverlay" }] : /* istanbul ignore next */ []));
84
+ /** Resolved width — mini mode uses miniWidth unless expanded. */
85
+ effectiveWidth = computed(() => {
86
+ if (this.effectiveMode() === 'mini' && !this.expandedState()) {
87
+ return this.miniWidth();
88
+ }
89
+ return this.width();
90
+ }, ...(ngDevMode ? [{ debugName: "effectiveWidth" }] : /* istanbul ignore next */ []));
91
+ doc = inject(DOCUMENT);
92
+ win = this.doc.defaultView;
93
+ /** Tracks the previous effective mode to detect transitions. */
94
+ prevMode = signal(undefined, ...(ngDevMode ? [{ debugName: "prevMode" }] : /* istanbul ignore next */ []));
95
+ constructor() {
96
+ effect((onCleanup) => {
97
+ const query = this.responsive();
98
+ const win = this.win;
99
+ if (!query || !win) {
100
+ return;
101
+ }
102
+ const mql = win.matchMedia(query);
103
+ this.mediaMatches.set(mql.matches);
104
+ const handler = (e) => this.mediaMatches.set(e.matches);
105
+ mql.addEventListener('change', handler);
106
+ onCleanup(() => mql.removeEventListener('change', handler));
107
+ });
108
+ // Keyboard shortcut toggle.
109
+ // Uses document.addEventListener instead of a host listener because:
110
+ // 1. The shortcut is a global hotkey — it must fire regardless of focus.
111
+ // 2. The combo string is a signal that can change at runtime, so the
112
+ // listener must be torn down and re-registered on each change.
113
+ // 3. Angular host listeners don't support dynamic registration/teardown
114
+ // driven by signal values — effect(onCleanup) handles this cleanly.
115
+ const isMac = this.win?.navigator?.userAgent?.includes('Mac') ?? false;
116
+ effect((onCleanup) => {
117
+ const shortcut = this.shortcut();
118
+ if (!shortcut) {
119
+ return;
120
+ }
121
+ const combo = parseKeyCombo(shortcut);
122
+ const handler = (e) => {
123
+ if (matchesKeyCombo(e, combo, isMac)) {
124
+ e.preventDefault();
125
+ this.opened.set(!this.opened());
126
+ }
127
+ };
128
+ this.doc.addEventListener('keydown', handler);
129
+ onCleanup(() => this.doc.removeEventListener('keydown', handler));
130
+ });
131
+ // Sync opened state on mode transitions.
132
+ // prevMode is a plain signal updated at the end of each run so the
133
+ // effect can compare previous vs current mode without linkedSignal
134
+ // (which updates eagerly before the effect reads it).
135
+ effect(() => {
136
+ const mode = this.effectiveMode();
137
+ const prev = this.prevMode();
138
+ if (prev !== undefined) {
139
+ const alwaysVisible = (m) => m === 'side' || m === 'mini';
140
+ if (alwaysVisible(prev) && !alwaysVisible(mode)) {
141
+ this.opened.set(true);
142
+ }
143
+ if (prev === 'mini' && mode !== 'mini') {
144
+ this.expandedState.set(false);
145
+ }
146
+ }
147
+ this.prevMode.set(mode);
148
+ });
149
+ }
150
+ /** Opens the sidenav. */
151
+ open() {
152
+ this.opened.set(true);
153
+ }
154
+ /** Closes the sidenav (only in over/push mode). No-op in side/mini mode. */
155
+ close() {
156
+ const mode = this.effectiveMode();
157
+ if (mode !== 'side' && mode !== 'mini') {
158
+ this.opened.set(false);
159
+ }
160
+ }
161
+ /** Toggles the sidenav. */
162
+ toggle() {
163
+ if (this.opened()) {
164
+ this.close();
165
+ }
166
+ else {
167
+ this.open();
168
+ }
169
+ }
170
+ /** @internal Close only if in overlay mode (for Escape key, click-outside). */
171
+ closeIfOverlay() {
172
+ if (this.isOverlay()) {
173
+ this.close();
174
+ }
175
+ }
176
+ /** Expand the mini rail to full width. */
177
+ expand() {
178
+ this.expandedState.set(true);
179
+ }
180
+ /** Collapse the expanded mini rail back to miniWidth. */
181
+ collapse() {
182
+ this.expandedState.set(false);
183
+ }
184
+ /** @internal */
185
+ handleMouseEnter() {
186
+ if (this.effectiveMode() === 'mini' && this.expandOnHover()) {
187
+ this.expandedState.set(true);
188
+ }
189
+ }
190
+ /** @internal */
191
+ handleMouseLeave() {
192
+ if (this.effectiveMode() === 'mini') {
193
+ this.expandedState.set(false);
194
+ }
195
+ }
196
+ /** @internal Parse a CSS px value to a number. */
197
+ widthPx = computed(() => Number.parseInt(this.width(), 10) || 280, ...(ngDevMode ? [{ debugName: "widthPx" }] : /* istanbul ignore next */ []));
198
+ minWidthPx = computed(() => Number.parseInt(this.minWidth(), 10) || 120, ...(ngDevMode ? [{ debugName: "minWidthPx" }] : /* istanbul ignore next */ []));
199
+ maxWidthPx = computed(() => Number.parseInt(this.maxWidth(), 10) || 600, ...(ngDevMode ? [{ debugName: "maxWidthPx" }] : /* istanbul ignore next */ []));
200
+ /** @internal */
201
+ handleResizeStart(e) {
202
+ if (!this.resizable()) {
203
+ return;
204
+ }
205
+ e.preventDefault();
206
+ e.target.setPointerCapture(e.pointerId);
207
+ this.resizingState.set(true);
208
+ const startX = e.clientX;
209
+ const el = this.elementRef.nativeElement;
210
+ const startWidth = el.getBoundingClientRect().width;
211
+ const isEnd = this.position() === 'end';
212
+ const min = this.minWidthPx();
213
+ const max = this.maxWidthPx();
214
+ let currentWidth = startWidth;
215
+ let rafId = 0;
216
+ const onMove = (ev) => {
217
+ const delta = isEnd ? startX - ev.clientX : ev.clientX - startX;
218
+ currentWidth = Math.round(Math.max(min, Math.min(max, startWidth + delta)));
219
+ // Set CSS var directly on DOM — no Angular change detection per frame
220
+ if (!rafId) {
221
+ rafId = requestAnimationFrame(() => {
222
+ el.style.setProperty('--cngx-sidenav-width', `${currentWidth}px`);
223
+ rafId = 0;
224
+ });
225
+ }
226
+ };
227
+ const onUp = () => {
228
+ cancelAnimationFrame(rafId);
229
+ this.resizingState.set(false);
230
+ // Sync final width back to the model (single CD cycle)
231
+ this.width.set(`${currentWidth}px`);
232
+ this.doc.removeEventListener('pointermove', onMove);
233
+ this.doc.removeEventListener('pointerup', onUp);
234
+ };
235
+ this.doc.addEventListener('pointermove', onMove);
236
+ this.doc.addEventListener('pointerup', onUp);
237
+ }
238
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenav, deps: [], target: i0.ɵɵFactoryTarget.Component });
239
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CngxSidenav, isStandalone: true, selector: "cngx-sidenav", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, miniWidth: { classPropertyName: "miniWidth", publicName: "miniWidth", isSignal: true, isRequired: false, transformFunction: null }, expandOnHover: { classPropertyName: "expandOnHover", publicName: "expandOnHover", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { width: "widthChange", opened: "openedChange" }, host: { attributes: { "role": "complementary" }, listeners: { "keydown.escape": "closeIfOverlay()", "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "class.cngx-sidenav": "true", "class.cngx-sidenav--start": "position() === 'start'", "class.cngx-sidenav--end": "position() === 'end'", "class.cngx-sidenav--open": "opened()", "class.cngx-sidenav--over": "effectiveMode() === 'over'", "class.cngx-sidenav--push": "effectiveMode() === 'push'", "class.cngx-sidenav--side": "effectiveMode() === 'side'", "class.cngx-sidenav--mini": "effectiveMode() === 'mini'", "class.cngx-sidenav--expanded": "expanded()", "class.cngx-sidenav--resizable": "resizable()", "class.cngx-sidenav--resizing": "resizing()", "attr.aria-hidden": "effectiveMode() === 'side' || effectiveMode() === 'mini' ? null : !opened()", "style.--cngx-sidenav-width": "effectiveWidth()", "style.--cngx-sidenav-mini-width": "miniWidth()", "attr.aria-label": "ariaLabel() || null" } }, exportAs: ["cngxSidenav"], ngImport: i0, template: `
240
+ <ng-content select="cngx-sidenav-header, [cngxSidenavHeader]" />
241
+ <div class="cngx-sidenav__body">
242
+ <ng-content />
243
+ </div>
244
+ <ng-content select="cngx-sidenav-footer, [cngxSidenavFooter]" />
245
+ @if (resizable()) {
246
+ <div
247
+ class="cngx-sidenav__resize-handle"
248
+ (pointerdown)="handleResizeStart($event)"
249
+ role="separator"
250
+ [attr.aria-orientation]="'vertical'"
251
+ [attr.aria-valuenow]="widthPx()"
252
+ [attr.aria-valuemin]="minWidthPx()"
253
+ [attr.aria-valuemax]="maxWidthPx()"
254
+ ></div>
255
+ }
256
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
257
+ }
258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenav, decorators: [{
259
+ type: Component,
260
+ args: [{
261
+ selector: 'cngx-sidenav',
262
+ exportAs: 'cngxSidenav',
263
+ standalone: true,
264
+ changeDetection: ChangeDetectionStrategy.OnPush,
265
+ encapsulation: ViewEncapsulation.None,
266
+ host: {
267
+ '[class.cngx-sidenav]': 'true',
268
+ '[class.cngx-sidenav--start]': "position() === 'start'",
269
+ '[class.cngx-sidenav--end]': "position() === 'end'",
270
+ '[class.cngx-sidenav--open]': 'opened()',
271
+ '[class.cngx-sidenav--over]': "effectiveMode() === 'over'",
272
+ '[class.cngx-sidenav--push]': "effectiveMode() === 'push'",
273
+ '[class.cngx-sidenav--side]': "effectiveMode() === 'side'",
274
+ '[class.cngx-sidenav--mini]': "effectiveMode() === 'mini'",
275
+ '[class.cngx-sidenav--expanded]': 'expanded()',
276
+ '[class.cngx-sidenav--resizable]': 'resizable()',
277
+ '[class.cngx-sidenav--resizing]': 'resizing()',
278
+ '[attr.aria-hidden]': "effectiveMode() === 'side' || effectiveMode() === 'mini' ? null : !opened()",
279
+ '[style.--cngx-sidenav-width]': 'effectiveWidth()',
280
+ '[style.--cngx-sidenav-mini-width]': 'miniWidth()',
281
+ role: 'complementary',
282
+ '[attr.aria-label]': 'ariaLabel() || null',
283
+ '(keydown.escape)': 'closeIfOverlay()',
284
+ '(mouseenter)': 'handleMouseEnter()',
285
+ '(mouseleave)': 'handleMouseLeave()',
286
+ },
287
+ template: `
288
+ <ng-content select="cngx-sidenav-header, [cngxSidenavHeader]" />
289
+ <div class="cngx-sidenav__body">
290
+ <ng-content />
291
+ </div>
292
+ <ng-content select="cngx-sidenav-footer, [cngxSidenavFooter]" />
293
+ @if (resizable()) {
294
+ <div
295
+ class="cngx-sidenav__resize-handle"
296
+ (pointerdown)="handleResizeStart($event)"
297
+ role="separator"
298
+ [attr.aria-orientation]="'vertical'"
299
+ [attr.aria-valuenow]="widthPx()"
300
+ [attr.aria-valuemin]="minWidthPx()"
301
+ [attr.aria-valuemax]="maxWidthPx()"
302
+ ></div>
303
+ }
304
+ `,
305
+ }]
306
+ }], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }, { type: i0.Output, args: ["widthChange"] }], miniWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "miniWidth", required: false }] }], expandOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandOnHover", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], opened: [{ type: i0.Input, args: [{ isSignal: true, alias: "opened", required: false }] }, { type: i0.Output, args: ["openedChange"] }] } });
307
+
308
+ /**
309
+ * Container for one or two `CngxSidenav` panels and a `CngxSidenavContent`.
310
+ *
311
+ * Manages shared backdrop, scroll lock, and click-outside coordination.
312
+ * Supports up to two sidenavs: one `position="start"` and one `position="end"`.
313
+ *
314
+ * ### Dual sidebar
315
+ * ```html
316
+ * <cngx-sidenav-layout>
317
+ * <cngx-sidenav position="start" [(opened)]="navOpen"
318
+ * [responsive]="'(min-width: 1024px)'">
319
+ * Left nav
320
+ * </cngx-sidenav>
321
+ * <cngx-sidenav-content>
322
+ * Main content
323
+ * </cngx-sidenav-content>
324
+ * <cngx-sidenav position="end" [(opened)]="detailOpen">
325
+ * Right detail panel
326
+ * </cngx-sidenav>
327
+ * </cngx-sidenav-layout>
328
+ * ```
329
+ */
330
+ class CngxSidenavLayout {
331
+ /** @internal */
332
+ ready = signal(false, ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
333
+ sidenavs = contentChildren(CngxSidenav, ...(ngDevMode ? [{ debugName: "sidenavs" }] : /* istanbul ignore next */ []));
334
+ /** The start-positioned sidenav, if any. */
335
+ startSidenav = computed(() => this.sidenavs().find((s) => s.position() === 'start') ?? null, ...(ngDevMode ? [{ debugName: "startSidenav" }] : /* istanbul ignore next */ []));
336
+ /** The end-positioned sidenav, if any. */
337
+ endSidenav = computed(() => this.sidenavs().find((s) => s.position() === 'end') ?? null, ...(ngDevMode ? [{ debugName: "endSidenav" }] : /* istanbul ignore next */ []));
338
+ /** Whether any sidenav is open in overlay mode. */
339
+ hasOverlay = computed(() => this.sidenavs().some((s) => s.isOverlay() && s.opened()), ...(ngDevMode ? [{ debugName: "hasOverlay" }] : /* istanbul ignore next */ []));
340
+ constructor() {
341
+ const doc = inject(DOCUMENT);
342
+ // Enable transitions only after first render to prevent jank on load
343
+ afterNextRender(() => this.ready.set(true));
344
+ // Scroll lock when overlay is active.
345
+ // Uses the same dataset-based ref-counting as CngxScrollLock so
346
+ // multiple lock sources don't corrupt each other's restore values.
347
+ const html = doc.documentElement;
348
+ const locked = signal(false, ...(ngDevMode ? [{ debugName: "locked" }] : /* istanbul ignore next */ []));
349
+ effect(() => {
350
+ if (this.hasOverlay() && !locked()) {
351
+ if (!html.dataset['cngxPrevOverflow']) {
352
+ html.dataset['cngxPrevOverflow'] = html.style.overflow;
353
+ html.dataset['cngxPrevScrollbarGutter'] = html.style.scrollbarGutter;
354
+ }
355
+ html.style.overflow = 'hidden';
356
+ html.style.scrollbarGutter = 'stable';
357
+ locked.set(true);
358
+ }
359
+ else if (!this.hasOverlay() && locked()) {
360
+ html.style.overflow = html.dataset['cngxPrevOverflow'] ?? '';
361
+ html.style.scrollbarGutter = html.dataset['cngxPrevScrollbarGutter'] ?? '';
362
+ delete html.dataset['cngxPrevOverflow'];
363
+ delete html.dataset['cngxPrevScrollbarGutter'];
364
+ locked.set(false);
365
+ }
366
+ });
367
+ inject(DestroyRef).onDestroy(() => {
368
+ if (locked()) {
369
+ html.style.overflow = html.dataset['cngxPrevOverflow'] ?? '';
370
+ html.style.scrollbarGutter = html.dataset['cngxPrevScrollbarGutter'] ?? '';
371
+ delete html.dataset['cngxPrevOverflow'];
372
+ delete html.dataset['cngxPrevScrollbarGutter'];
373
+ }
374
+ });
375
+ // Click-outside: close overlay sidenavs when clicking outside the layout
376
+ fromEvent(doc, 'click')
377
+ .pipe(takeUntilDestroyed())
378
+ .subscribe((e) => {
379
+ if (!this.hasOverlay()) {
380
+ return;
381
+ }
382
+ for (const nav of this.sidenavs()) {
383
+ if (nav.isOverlay() &&
384
+ nav.opened() &&
385
+ !nav.elementRef.nativeElement.contains(e.target)) {
386
+ nav.close();
387
+ }
388
+ }
389
+ });
390
+ }
391
+ /** Closes all sidenavs that are currently in overlay mode. */
392
+ closeAllOverlays() {
393
+ for (const nav of this.sidenavs()) {
394
+ if (nav.isOverlay() && nav.opened()) {
395
+ nav.close();
396
+ }
397
+ }
398
+ }
399
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenavLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
400
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CngxSidenavLayout, isStandalone: true, selector: "cngx-sidenav-layout", host: { properties: { "class.cngx-sidenav-layout": "true", "class.cngx-sidenav-layout--ready": "ready()", "class.cngx-sidenav-layout--has-overlay": "hasOverlay()" } }, queries: [{ propertyName: "sidenavs", predicate: CngxSidenav, isSignal: true }], exportAs: ["cngxSidenavLayout"], ngImport: i0, template: `
401
+ <ng-content select="cngx-sidenav[position=start], cngx-sidenav:not([position])" />
402
+ <ng-content select="cngx-sidenav-content" />
403
+ <ng-content select="cngx-sidenav[position=end]" />
404
+ @if (hasOverlay()) {
405
+ <div class="cngx-sidenav-backdrop" (click)="closeAllOverlays()"></div>
406
+ }
407
+ `, isInline: true, styles: ["cngx-sidenav-layout{display:flex;position:relative;width:100%;min-height:inherit;overflow:hidden}cngx-sidenav-layout:not(.cngx-sidenav-layout--ready) cngx-sidenav,cngx-sidenav-layout:not(.cngx-sidenav-layout--ready) cngx-sidenav-content{transition:none!important}cngx-sidenav{display:flex;flex-direction:column;flex-shrink:0;overflow:hidden;z-index:2;width:var(--cngx-sidenav-width, 280px);background:var(--cngx-sidenav-bg, #f5f6f7);color:var(--cngx-sidenav-color, inherit);transition:width var(--cngx-sidenav-transition-duration, .25s) var(--cngx-sidenav-transition-easing, ease),visibility 0s var(--cngx-sidenav-transition-duration, .25s)}cngx-sidenav:not(.cngx-sidenav--open):not(.cngx-sidenav--side):not(.cngx-sidenav--mini){width:0;visibility:hidden}cngx-sidenav.cngx-sidenav--open{visibility:visible;transition:width var(--cngx-sidenav-transition-duration, .25s) var(--cngx-sidenav-transition-easing, ease),visibility 0s 0s}cngx-sidenav.cngx-sidenav--side.cngx-sidenav--open{visibility:visible}cngx-sidenav.cngx-sidenav--over{position:absolute;top:0;bottom:0}cngx-sidenav.cngx-sidenav--over.cngx-sidenav--start{left:0}cngx-sidenav.cngx-sidenav--over.cngx-sidenav--end{right:0}cngx-sidenav.cngx-sidenav--push,cngx-sidenav.cngx-sidenav--side,cngx-sidenav.cngx-sidenav--mini{position:relative}cngx-sidenav.cngx-sidenav--mini.cngx-sidenav--open{width:var(--cngx-sidenav-mini-width, 56px);visibility:visible;transition:none}cngx-sidenav.cngx-sidenav--mini.cngx-sidenav--open.cngx-sidenav--expanded{width:var(--cngx-sidenav-width, 280px);z-index:3;box-shadow:var(--cngx-sidenav-expanded-shadow, 4px 0 12px rgba(0, 0, 0, .1))}cngx-sidenav.cngx-sidenav--mini.cngx-sidenav--open.cngx-sidenav--expanded.cngx-sidenav--start{margin-right:calc(var(--cngx-sidenav-mini-width, 56px) - var(--cngx-sidenav-width, 280px))}cngx-sidenav.cngx-sidenav--mini.cngx-sidenav--open.cngx-sidenav--expanded.cngx-sidenav--end{margin-left:calc(var(--cngx-sidenav-mini-width, 56px) - var(--cngx-sidenav-width, 280px))}cngx-sidenav.cngx-sidenav--start{border-right:var(--cngx-sidenav-border-width, 1px) solid var(--cngx-sidenav-border-color, #e0e0e0)}cngx-sidenav.cngx-sidenav--end{border-left:var(--cngx-sidenav-border-width, 1px) solid var(--cngx-sidenav-border-color, #e0e0e0);order:2}.cngx-sidenav__body{flex:1;overflow-y:auto;overflow-x:hidden;min-width:var(--cngx-sidenav-width, 280px);scrollbar-gutter:stable}.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-sidenav__body{min-width:var(--cngx-sidenav-mini-width, 56px)}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-sidenav-header,cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-sidenav-footer{overflow:hidden;white-space:nowrap;text-overflow:clip;text-align:center;padding:8px 4px}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) [cngxNavLabel],cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) [cngxNavGroup]{display:none!important}.cngx-sidenav-header{flex-shrink:0;padding:var(--cngx-sidenav-padding, 16px);background:var(--cngx-sidenav-header-bg, transparent);border-bottom:1px solid var(--cngx-sidenav-border-color, #e0e0e0);font-weight:600;font-size:var(--cngx-sidenav-header-font-size, .875rem)}.cngx-sidenav-footer{flex-shrink:0;margin-top:auto;padding:var(--cngx-sidenav-padding, 16px);background:var(--cngx-sidenav-footer-bg, transparent);border-top:1px solid var(--cngx-sidenav-footer-border-color, var(--cngx-sidenav-border-color, #e0e0e0));font-size:var(--cngx-sidenav-footer-font-size, .75rem);opacity:.7}cngx-sidenav .cngx-nav-link{display:block;padding:var(--cngx-nav-link-padding);text-decoration:none;font-size:var(--cngx-nav-link-font-size);color:var(--cngx-nav-link-color);border-radius:var(--cngx-nav-link-radius);transition:background .15s,color .15s}cngx-sidenav .cngx-nav-link:hover{color:var(--cngx-nav-link-hover-color);background:var(--cngx-nav-link-hover-bg)}cngx-sidenav .cngx-nav-link--active{color:var(--cngx-nav-link-active-color);background:var(--cngx-nav-link-active-bg);font-weight:var(--cngx-nav-link-active-font-weight)}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-nav-link{overflow:hidden;text-align:center;font-size:0!important;line-height:1;padding:var(--cngx-nav-link-padding, 10px 8px)}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-nav-link[data-initial]:before{content:attr(data-initial);font-size:var(--cngx-nav-link-initial-size, .875rem);font-weight:600;display:inline-block;width:var(--cngx-nav-link-initial-size, .875rem);text-align:center;line-height:1.6}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-nav-link [cngxNavBadge]{display:none}.cngx-nav-group-content{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--cngx-sidenav-transition-duration, .2s) ease}.cngx-nav-group-content>*{overflow:hidden;min-height:0}.cngx-nav-group-content--open{grid-template-rows:1fr}.cngx-sidenav__resize-handle{position:absolute;top:0;bottom:0;width:var(--cngx-sidenav-resize-handle-width, 4px);cursor:col-resize;z-index:4;background:transparent;transition:background .15s;touch-action:none}.cngx-sidenav--start .cngx-sidenav__resize-handle{right:0;transform:translate(50%)}.cngx-sidenav--end .cngx-sidenav__resize-handle{left:0;transform:translate(-50%)}.cngx-sidenav__resize-handle:hover,.cngx-sidenav--resizing .cngx-sidenav__resize-handle{background:var(--cngx-sidenav-resize-handle-color, var(--mat-sys-primary, #4f46e5))}cngx-sidenav.cngx-sidenav--resizing{transition:none!important;-webkit-user-select:none;user-select:none}cngx-sidenav.cngx-sidenav--resizing~cngx-sidenav-content{transition:none!important;-webkit-user-select:none;user-select:none}cngx-sidenav-content{display:block;flex:1;min-width:0;overflow:auto;order:1;transition:margin-inline-start var(--cngx-sidenav-transition-duration, .25s) var(--cngx-sidenav-transition-easing, ease),margin-inline-end var(--cngx-sidenav-transition-duration, .25s) var(--cngx-sidenav-transition-easing, ease)}.cngx-sidenav-backdrop{position:absolute;inset:0;z-index:1;background:var(--cngx-sidenav-backdrop-bg, rgb(0, 0, 0));opacity:var(--cngx-sidenav-backdrop-opacity, .5);cursor:pointer}@media(prefers-reduced-motion:reduce){cngx-sidenav,cngx-sidenav-content,.cngx-sidenav-backdrop{transition:none!important}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
408
+ }
409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenavLayout, decorators: [{
410
+ type: Component,
411
+ args: [{ selector: 'cngx-sidenav-layout', exportAs: 'cngxSidenavLayout', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
412
+ '[class.cngx-sidenav-layout]': 'true',
413
+ '[class.cngx-sidenav-layout--ready]': 'ready()',
414
+ '[class.cngx-sidenav-layout--has-overlay]': 'hasOverlay()',
415
+ }, template: `
416
+ <ng-content select="cngx-sidenav[position=start], cngx-sidenav:not([position])" />
417
+ <ng-content select="cngx-sidenav-content" />
418
+ <ng-content select="cngx-sidenav[position=end]" />
419
+ @if (hasOverlay()) {
420
+ <div class="cngx-sidenav-backdrop" (click)="closeAllOverlays()"></div>
421
+ }
422
+ `, styles: ["cngx-sidenav-layout{display:flex;position:relative;width:100%;min-height:inherit;overflow:hidden}cngx-sidenav-layout:not(.cngx-sidenav-layout--ready) cngx-sidenav,cngx-sidenav-layout:not(.cngx-sidenav-layout--ready) cngx-sidenav-content{transition:none!important}cngx-sidenav{display:flex;flex-direction:column;flex-shrink:0;overflow:hidden;z-index:2;width:var(--cngx-sidenav-width, 280px);background:var(--cngx-sidenav-bg, #f5f6f7);color:var(--cngx-sidenav-color, inherit);transition:width var(--cngx-sidenav-transition-duration, .25s) var(--cngx-sidenav-transition-easing, ease),visibility 0s var(--cngx-sidenav-transition-duration, .25s)}cngx-sidenav:not(.cngx-sidenav--open):not(.cngx-sidenav--side):not(.cngx-sidenav--mini){width:0;visibility:hidden}cngx-sidenav.cngx-sidenav--open{visibility:visible;transition:width var(--cngx-sidenav-transition-duration, .25s) var(--cngx-sidenav-transition-easing, ease),visibility 0s 0s}cngx-sidenav.cngx-sidenav--side.cngx-sidenav--open{visibility:visible}cngx-sidenav.cngx-sidenav--over{position:absolute;top:0;bottom:0}cngx-sidenav.cngx-sidenav--over.cngx-sidenav--start{left:0}cngx-sidenav.cngx-sidenav--over.cngx-sidenav--end{right:0}cngx-sidenav.cngx-sidenav--push,cngx-sidenav.cngx-sidenav--side,cngx-sidenav.cngx-sidenav--mini{position:relative}cngx-sidenav.cngx-sidenav--mini.cngx-sidenav--open{width:var(--cngx-sidenav-mini-width, 56px);visibility:visible;transition:none}cngx-sidenav.cngx-sidenav--mini.cngx-sidenav--open.cngx-sidenav--expanded{width:var(--cngx-sidenav-width, 280px);z-index:3;box-shadow:var(--cngx-sidenav-expanded-shadow, 4px 0 12px rgba(0, 0, 0, .1))}cngx-sidenav.cngx-sidenav--mini.cngx-sidenav--open.cngx-sidenav--expanded.cngx-sidenav--start{margin-right:calc(var(--cngx-sidenav-mini-width, 56px) - var(--cngx-sidenav-width, 280px))}cngx-sidenav.cngx-sidenav--mini.cngx-sidenav--open.cngx-sidenav--expanded.cngx-sidenav--end{margin-left:calc(var(--cngx-sidenav-mini-width, 56px) - var(--cngx-sidenav-width, 280px))}cngx-sidenav.cngx-sidenav--start{border-right:var(--cngx-sidenav-border-width, 1px) solid var(--cngx-sidenav-border-color, #e0e0e0)}cngx-sidenav.cngx-sidenav--end{border-left:var(--cngx-sidenav-border-width, 1px) solid var(--cngx-sidenav-border-color, #e0e0e0);order:2}.cngx-sidenav__body{flex:1;overflow-y:auto;overflow-x:hidden;min-width:var(--cngx-sidenav-width, 280px);scrollbar-gutter:stable}.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-sidenav__body{min-width:var(--cngx-sidenav-mini-width, 56px)}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-sidenav-header,cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-sidenav-footer{overflow:hidden;white-space:nowrap;text-overflow:clip;text-align:center;padding:8px 4px}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) [cngxNavLabel],cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) [cngxNavGroup]{display:none!important}.cngx-sidenav-header{flex-shrink:0;padding:var(--cngx-sidenav-padding, 16px);background:var(--cngx-sidenav-header-bg, transparent);border-bottom:1px solid var(--cngx-sidenav-border-color, #e0e0e0);font-weight:600;font-size:var(--cngx-sidenav-header-font-size, .875rem)}.cngx-sidenav-footer{flex-shrink:0;margin-top:auto;padding:var(--cngx-sidenav-padding, 16px);background:var(--cngx-sidenav-footer-bg, transparent);border-top:1px solid var(--cngx-sidenav-footer-border-color, var(--cngx-sidenav-border-color, #e0e0e0));font-size:var(--cngx-sidenav-footer-font-size, .75rem);opacity:.7}cngx-sidenav .cngx-nav-link{display:block;padding:var(--cngx-nav-link-padding);text-decoration:none;font-size:var(--cngx-nav-link-font-size);color:var(--cngx-nav-link-color);border-radius:var(--cngx-nav-link-radius);transition:background .15s,color .15s}cngx-sidenav .cngx-nav-link:hover{color:var(--cngx-nav-link-hover-color);background:var(--cngx-nav-link-hover-bg)}cngx-sidenav .cngx-nav-link--active{color:var(--cngx-nav-link-active-color);background:var(--cngx-nav-link-active-bg);font-weight:var(--cngx-nav-link-active-font-weight)}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-nav-link{overflow:hidden;text-align:center;font-size:0!important;line-height:1;padding:var(--cngx-nav-link-padding, 10px 8px)}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-nav-link[data-initial]:before{content:attr(data-initial);font-size:var(--cngx-nav-link-initial-size, .875rem);font-weight:600;display:inline-block;width:var(--cngx-nav-link-initial-size, .875rem);text-align:center;line-height:1.6}cngx-sidenav.cngx-sidenav--mini:not(.cngx-sidenav--expanded) .cngx-nav-link [cngxNavBadge]{display:none}.cngx-nav-group-content{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--cngx-sidenav-transition-duration, .2s) ease}.cngx-nav-group-content>*{overflow:hidden;min-height:0}.cngx-nav-group-content--open{grid-template-rows:1fr}.cngx-sidenav__resize-handle{position:absolute;top:0;bottom:0;width:var(--cngx-sidenav-resize-handle-width, 4px);cursor:col-resize;z-index:4;background:transparent;transition:background .15s;touch-action:none}.cngx-sidenav--start .cngx-sidenav__resize-handle{right:0;transform:translate(50%)}.cngx-sidenav--end .cngx-sidenav__resize-handle{left:0;transform:translate(-50%)}.cngx-sidenav__resize-handle:hover,.cngx-sidenav--resizing .cngx-sidenav__resize-handle{background:var(--cngx-sidenav-resize-handle-color, var(--mat-sys-primary, #4f46e5))}cngx-sidenav.cngx-sidenav--resizing{transition:none!important;-webkit-user-select:none;user-select:none}cngx-sidenav.cngx-sidenav--resizing~cngx-sidenav-content{transition:none!important;-webkit-user-select:none;user-select:none}cngx-sidenav-content{display:block;flex:1;min-width:0;overflow:auto;order:1;transition:margin-inline-start var(--cngx-sidenav-transition-duration, .25s) var(--cngx-sidenav-transition-easing, ease),margin-inline-end var(--cngx-sidenav-transition-duration, .25s) var(--cngx-sidenav-transition-easing, ease)}.cngx-sidenav-backdrop{position:absolute;inset:0;z-index:1;background:var(--cngx-sidenav-backdrop-bg, rgb(0, 0, 0));opacity:var(--cngx-sidenav-backdrop-opacity, .5);cursor:pointer}@media(prefers-reduced-motion:reduce){cngx-sidenav,cngx-sidenav-content,.cngx-sidenav-backdrop{transition:none!important}}\n"] }]
423
+ }], ctorParameters: () => [], propDecorators: { sidenavs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CngxSidenav), { isSignal: true }] }] } });
424
+
425
+ /**
426
+ * Main content area within a `CngxSidenavLayout`.
427
+ *
428
+ * Auto-adjusts margins when sibling sidenavs are in `push` or `side`
429
+ * mode. Must be a direct child of `CngxSidenavLayout`.
430
+ *
431
+ * ```html
432
+ * <cngx-sidenav-layout>
433
+ * <cngx-sidenav position="start">…</cngx-sidenav>
434
+ * <cngx-sidenav-content>
435
+ * <router-outlet />
436
+ * </cngx-sidenav-content>
437
+ * </cngx-sidenav-layout>
438
+ * ```
439
+ */
440
+ class CngxSidenavContent {
441
+ layout = inject(CngxSidenavLayout, { optional: true });
442
+ constructor() {
443
+ if (!this.layout) {
444
+ throw new Error('cngx-sidenav-content must be placed inside a cngx-sidenav-layout.');
445
+ }
446
+ }
447
+ /**
448
+ * Margin offset for the start sidenav.
449
+ *
450
+ * Push and side modes use `position: relative` — the sidenav sits in
451
+ * the flex flow and the content shrinks naturally via `flex: 1`.
452
+ * No margin needed. Over mode uses `position: absolute` — no margin needed
453
+ * either since the sidenav floats above content.
454
+ *
455
+ * Kept as a public computed so tests and consumers can still read it.
456
+ */
457
+ marginStart = '0';
458
+ /** Margin offset for the end sidenav — same rationale as start. */
459
+ marginEnd = '0';
460
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenavContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
461
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: CngxSidenavContent, isStandalone: true, selector: "cngx-sidenav-content", host: { properties: { "class.cngx-sidenav-content": "true", "style.margin-inline-start": "marginStart", "style.margin-inline-end": "marginEnd" } }, exportAs: ["cngxSidenavContent"], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
462
+ }
463
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenavContent, decorators: [{
464
+ type: Component,
465
+ args: [{
466
+ selector: 'cngx-sidenav-content',
467
+ exportAs: 'cngxSidenavContent',
468
+ standalone: true,
469
+ changeDetection: ChangeDetectionStrategy.OnPush,
470
+ encapsulation: ViewEncapsulation.None,
471
+ host: {
472
+ '[class.cngx-sidenav-content]': 'true',
473
+ '[style.margin-inline-start]': 'marginStart',
474
+ '[style.margin-inline-end]': 'marginEnd',
475
+ },
476
+ template: `<ng-content />`,
477
+ }]
478
+ }], ctorParameters: () => [] });
479
+
480
+ /**
481
+ * Marks content to be projected into the sidenav's sticky header area.
482
+ */
483
+ class CngxSidenavHeader {
484
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenavHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
485
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CngxSidenavHeader, isStandalone: true, selector: "cngx-sidenav-header, [cngxSidenavHeader]", host: { properties: { "class.cngx-sidenav-header": "true" } }, ngImport: i0 });
486
+ }
487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenavHeader, decorators: [{
488
+ type: Directive,
489
+ args: [{
490
+ selector: 'cngx-sidenav-header, [cngxSidenavHeader]',
491
+ standalone: true,
492
+ host: { '[class.cngx-sidenav-header]': 'true' },
493
+ }]
494
+ }] });
495
+
496
+ /**
497
+ * Marks content to be projected into the sidenav's sticky footer area.
498
+ */
499
+ class CngxSidenavFooter {
500
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenavFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
501
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CngxSidenavFooter, isStandalone: true, selector: "cngx-sidenav-footer, [cngxSidenavFooter]", host: { properties: { "class.cngx-sidenav-footer": "true" } }, ngImport: i0 });
502
+ }
503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxSidenavFooter, decorators: [{
504
+ type: Directive,
505
+ args: [{
506
+ selector: 'cngx-sidenav-footer, [cngxSidenavFooter]',
507
+ standalone: true,
508
+ host: { '[class.cngx-sidenav-footer]': 'true' },
509
+ }]
510
+ }] });
511
+
512
+ /**
513
+ * @module @cngx/ui/sidenav
514
+ */
515
+
516
+ /**
517
+ * Generated bundle index. Do not edit.
518
+ */
519
+
520
+ export { CngxSidenav, CngxSidenavContent, CngxSidenavFooter, CngxSidenavHeader, CngxSidenavLayout };
521
+ //# sourceMappingURL=cngx-ui-sidenav.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cngx-ui-sidenav.mjs","sources":["../../../projects/ui/sidenav/sidenav.ts","../../../projects/ui/sidenav/sidenav-layout.ts","../../../projects/ui/sidenav/sidenav-content.ts","../../../projects/ui/sidenav/sidenav-header.ts","../../../projects/ui/sidenav/sidenav-footer.ts","../../../projects/ui/sidenav/public-api.ts","../../../projects/ui/sidenav/cngx-ui-sidenav.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { matchesKeyCombo, parseKeyCombo } from '@cngx/core/utils';\n\n/** Logical position — flips in RTL. */\nexport type SidenavPosition = 'start' | 'end';\n/**\n * How the sidenav interacts with the content area.\n *\n * - `'over'` — floats above content (overlay + backdrop)\n * - `'push'` — pushes content aside when open\n * - `'side'` — always visible, content permanently offset\n * - `'mini'` — collapsed icon rail (miniWidth), expands to full width on hover\n */\nexport type SidenavMode = 'over' | 'push' | 'side' | 'mini';\n\n/**\n * Declarative sidebar component that composes drawer, focus trap,\n * scroll lock, swipe dismiss, and media query atoms internally.\n *\n * Supports responsive mode switching, two-way `[(opened)]` binding,\n * and content projection via header/footer slots.\n *\n * Use inside `CngxSidenavLayout` for dual-sidebar support and\n * shared backdrop coordination.\n *\n * ```html\n * <cngx-sidenav-layout>\n * <cngx-sidenav position=\"start\" [(opened)]=\"navOpen\"\n * [responsive]=\"'(min-width: 1024px)'\">\n * <cngx-sidenav-header>Logo</cngx-sidenav-header>\n * <a cngxNavLink [active]=\"true\">Dashboard</a>\n * <cngx-sidenav-footer>v1.0</cngx-sidenav-footer>\n * </cngx-sidenav>\n * <cngx-sidenav-content>\n * <router-outlet />\n * </cngx-sidenav-content>\n * </cngx-sidenav-layout>\n * ```\n */\n@Component({\n selector: 'cngx-sidenav',\n exportAs: 'cngxSidenav',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.cngx-sidenav]': 'true',\n '[class.cngx-sidenav--start]': \"position() === 'start'\",\n '[class.cngx-sidenav--end]': \"position() === 'end'\",\n '[class.cngx-sidenav--open]': 'opened()',\n '[class.cngx-sidenav--over]': \"effectiveMode() === 'over'\",\n '[class.cngx-sidenav--push]': \"effectiveMode() === 'push'\",\n '[class.cngx-sidenav--side]': \"effectiveMode() === 'side'\",\n '[class.cngx-sidenav--mini]': \"effectiveMode() === 'mini'\",\n '[class.cngx-sidenav--expanded]': 'expanded()',\n '[class.cngx-sidenav--resizable]': 'resizable()',\n '[class.cngx-sidenav--resizing]': 'resizing()',\n '[attr.aria-hidden]':\n \"effectiveMode() === 'side' || effectiveMode() === 'mini' ? null : !opened()\",\n '[style.--cngx-sidenav-width]': 'effectiveWidth()',\n '[style.--cngx-sidenav-mini-width]': 'miniWidth()',\n role: 'complementary',\n '[attr.aria-label]': 'ariaLabel() || null',\n '(keydown.escape)': 'closeIfOverlay()',\n '(mouseenter)': 'handleMouseEnter()',\n '(mouseleave)': 'handleMouseLeave()',\n },\n template: `\n <ng-content select=\"cngx-sidenav-header, [cngxSidenavHeader]\" />\n <div class=\"cngx-sidenav__body\">\n <ng-content />\n </div>\n <ng-content select=\"cngx-sidenav-footer, [cngxSidenavFooter]\" />\n @if (resizable()) {\n <div\n class=\"cngx-sidenav__resize-handle\"\n (pointerdown)=\"handleResizeStart($event)\"\n role=\"separator\"\n [attr.aria-orientation]=\"'vertical'\"\n [attr.aria-valuenow]=\"widthPx()\"\n [attr.aria-valuemin]=\"minWidthPx()\"\n [attr.aria-valuemax]=\"maxWidthPx()\"\n ></div>\n }\n `,\n})\nexport class CngxSidenav {\n /** Logical position: `'start'` (default left in LTR) or `'end'` (right in LTR). */\n readonly position = input<SidenavPosition>('start');\n\n /** Accessible label for the complementary landmark. */\n readonly ariaLabel = input<string | undefined>(undefined);\n\n /** Drawer mode. Overridden by `responsive` when set. */\n readonly mode = input<SidenavMode>('over');\n\n /**\n * CSS media query string for responsive mode switching.\n * When the query matches, mode becomes `'side'` (permanent).\n * When it doesn't match, mode becomes `'over'` (overlay).\n */\n readonly responsive = input<string | undefined>(undefined);\n\n /** Width of the sidenav panel. Supports two-way `[(width)]` for resize. */\n readonly width = model<string>('280px');\n\n /** Width of the collapsed rail in `mini` mode. Any CSS value. */\n readonly miniWidth = input<string>('56px');\n\n /** Whether hovering the mini rail expands the sidenav to full width. */\n readonly expandOnHover = input<boolean>(true);\n\n /** Whether the sidebar is user-resizable via a drag handle. */\n readonly resizable = input<boolean>(false);\n\n /** Minimum width constraint during resize. */\n readonly minWidth = input<string>('120px');\n\n /** Maximum width constraint during resize. */\n readonly maxWidth = input<string>('600px');\n\n /**\n * Keyboard shortcut to toggle the sidenav, e.g. `'ctrl+b'` or `'meta+b'`.\n * Uses `ctrl` on Windows/Linux and `meta` (Cmd) on macOS automatically\n * when `'mod+<key>'` syntax is used.\n */\n readonly shortcut = input<string | undefined>(undefined);\n\n /** Whether a resize drag is in progress. */\n private readonly resizingState = signal(false);\n readonly resizing = this.resizingState.asReadonly();\n\n /** Two-way opened state. Supports `[(opened)]=\"signal\"`. */\n readonly opened = model<boolean>(false);\n\n /** Whether the mini-mode rail is currently expanded (hover or programmatic). */\n private readonly expandedState = signal(false);\n readonly expanded = this.expandedState.asReadonly();\n\n /** @internal Reference to host element for layout positioning. */\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n // Inlined matchMedia, not CngxMediaQuery directive.\n private readonly mediaMatches = signal(false);\n\n /** Resolved mode — responsive overrides to `'side'` when matching, falls back to `mode()`. */\n readonly effectiveMode = computed<SidenavMode>(() => {\n if (!this.responsive()) {\n return this.mode();\n }\n return this.mediaMatches() ? 'side' : this.mode();\n });\n\n /** Whether this sidenav is in overlay mode (over). */\n readonly isOverlay = computed(() => this.effectiveMode() === 'over');\n\n /** Resolved width — mini mode uses miniWidth unless expanded. */\n readonly effectiveWidth = computed(() => {\n if (this.effectiveMode() === 'mini' && !this.expandedState()) {\n return this.miniWidth();\n }\n return this.width();\n });\n\n private readonly doc = inject(DOCUMENT);\n private readonly win = this.doc.defaultView;\n\n /** Tracks the previous effective mode to detect transitions. */\n private readonly prevMode = signal<SidenavMode | undefined>(undefined);\n\n constructor() {\n effect((onCleanup) => {\n const query = this.responsive();\n const win = this.win;\n if (!query || !win) {\n return;\n }\n const mql = win.matchMedia(query);\n this.mediaMatches.set(mql.matches);\n const handler = (e: MediaQueryListEvent): void => this.mediaMatches.set(e.matches);\n mql.addEventListener('change', handler);\n onCleanup(() => mql.removeEventListener('change', handler));\n });\n\n // Keyboard shortcut toggle.\n // Uses document.addEventListener instead of a host listener because:\n // 1. The shortcut is a global hotkey — it must fire regardless of focus.\n // 2. The combo string is a signal that can change at runtime, so the\n // listener must be torn down and re-registered on each change.\n // 3. Angular host listeners don't support dynamic registration/teardown\n // driven by signal values — effect(onCleanup) handles this cleanly.\n const isMac = this.win?.navigator?.userAgent?.includes('Mac') ?? false;\n effect((onCleanup) => {\n const shortcut = this.shortcut();\n if (!shortcut) {\n return;\n }\n const combo = parseKeyCombo(shortcut);\n const handler = (e: KeyboardEvent): void => {\n if (matchesKeyCombo(e, combo, isMac)) {\n e.preventDefault();\n this.opened.set(!this.opened());\n }\n };\n this.doc.addEventListener('keydown', handler);\n onCleanup(() => this.doc.removeEventListener('keydown', handler));\n });\n\n // Sync opened state on mode transitions.\n // prevMode is a plain signal updated at the end of each run so the\n // effect can compare previous vs current mode without linkedSignal\n // (which updates eagerly before the effect reads it).\n effect(() => {\n const mode = this.effectiveMode();\n const prev = this.prevMode();\n if (prev !== undefined) {\n const alwaysVisible = (m: SidenavMode) => m === 'side' || m === 'mini';\n if (alwaysVisible(prev) && !alwaysVisible(mode)) {\n this.opened.set(true);\n }\n if (prev === 'mini' && mode !== 'mini') {\n this.expandedState.set(false);\n }\n }\n this.prevMode.set(mode);\n });\n }\n\n /** Opens the sidenav. */\n open(): void {\n this.opened.set(true);\n }\n\n /** Closes the sidenav (only in over/push mode). No-op in side/mini mode. */\n close(): void {\n const mode = this.effectiveMode();\n if (mode !== 'side' && mode !== 'mini') {\n this.opened.set(false);\n }\n }\n\n /** Toggles the sidenav. */\n toggle(): void {\n if (this.opened()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /** @internal Close only if in overlay mode (for Escape key, click-outside). */\n closeIfOverlay(): void {\n if (this.isOverlay()) {\n this.close();\n }\n }\n\n /** Expand the mini rail to full width. */\n expand(): void {\n this.expandedState.set(true);\n }\n\n /** Collapse the expanded mini rail back to miniWidth. */\n collapse(): void {\n this.expandedState.set(false);\n }\n\n /** @internal */\n handleMouseEnter(): void {\n if (this.effectiveMode() === 'mini' && this.expandOnHover()) {\n this.expandedState.set(true);\n }\n }\n\n /** @internal */\n handleMouseLeave(): void {\n if (this.effectiveMode() === 'mini') {\n this.expandedState.set(false);\n }\n }\n\n\n /** @internal Parse a CSS px value to a number. */\n widthPx = computed(() => Number.parseInt(this.width(), 10) || 280);\n minWidthPx = computed(() => Number.parseInt(this.minWidth(), 10) || 120);\n maxWidthPx = computed(() => Number.parseInt(this.maxWidth(), 10) || 600);\n\n /** @internal */\n handleResizeStart(e: PointerEvent): void {\n if (!this.resizable()) {\n return;\n }\n e.preventDefault();\n (e.target as HTMLElement).setPointerCapture(e.pointerId);\n\n this.resizingState.set(true);\n const startX = e.clientX;\n const el = this.elementRef.nativeElement as HTMLElement;\n const startWidth = el.getBoundingClientRect().width;\n const isEnd = this.position() === 'end';\n const min = this.minWidthPx();\n const max = this.maxWidthPx();\n let currentWidth = startWidth;\n let rafId = 0;\n\n const onMove = (ev: PointerEvent): void => {\n const delta = isEnd ? startX - ev.clientX : ev.clientX - startX;\n currentWidth = Math.round(Math.max(min, Math.min(max, startWidth + delta)));\n // Set CSS var directly on DOM — no Angular change detection per frame\n if (!rafId) {\n rafId = requestAnimationFrame(() => {\n el.style.setProperty('--cngx-sidenav-width', `${currentWidth}px`);\n rafId = 0;\n });\n }\n };\n\n const onUp = (): void => {\n cancelAnimationFrame(rafId);\n this.resizingState.set(false);\n // Sync final width back to the model (single CD cycle)\n this.width.set(`${currentWidth}px`);\n this.doc.removeEventListener('pointermove', onMove);\n this.doc.removeEventListener('pointerup', onUp);\n };\n\n this.doc.addEventListener('pointermove', onMove);\n this.doc.addEventListener('pointerup', onUp);\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n DestroyRef,\n effect,\n inject,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent } from 'rxjs';\nimport { CngxSidenav } from './sidenav';\n\n/**\n * Container for one or two `CngxSidenav` panels and a `CngxSidenavContent`.\n *\n * Manages shared backdrop, scroll lock, and click-outside coordination.\n * Supports up to two sidenavs: one `position=\"start\"` and one `position=\"end\"`.\n *\n * ### Dual sidebar\n * ```html\n * <cngx-sidenav-layout>\n * <cngx-sidenav position=\"start\" [(opened)]=\"navOpen\"\n * [responsive]=\"'(min-width: 1024px)'\">\n * Left nav\n * </cngx-sidenav>\n * <cngx-sidenav-content>\n * Main content\n * </cngx-sidenav-content>\n * <cngx-sidenav position=\"end\" [(opened)]=\"detailOpen\">\n * Right detail panel\n * </cngx-sidenav>\n * </cngx-sidenav-layout>\n * ```\n */\n@Component({\n selector: 'cngx-sidenav-layout',\n exportAs: 'cngxSidenavLayout',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: './sidenav-layout.scss',\n host: {\n '[class.cngx-sidenav-layout]': 'true',\n '[class.cngx-sidenav-layout--ready]': 'ready()',\n '[class.cngx-sidenav-layout--has-overlay]': 'hasOverlay()',\n },\n template: `\n <ng-content select=\"cngx-sidenav[position=start], cngx-sidenav:not([position])\" />\n <ng-content select=\"cngx-sidenav-content\" />\n <ng-content select=\"cngx-sidenav[position=end]\" />\n @if (hasOverlay()) {\n <div class=\"cngx-sidenav-backdrop\" (click)=\"closeAllOverlays()\"></div>\n }\n `,\n})\nexport class CngxSidenavLayout {\n /** @internal */\n readonly ready = signal(false);\n\n private readonly sidenavs = contentChildren(CngxSidenav);\n\n /** The start-positioned sidenav, if any. */\n readonly startSidenav = computed(\n () => this.sidenavs().find((s) => s.position() === 'start') ?? null,\n );\n\n /** The end-positioned sidenav, if any. */\n readonly endSidenav = computed(() => this.sidenavs().find((s) => s.position() === 'end') ?? null);\n\n /** Whether any sidenav is open in overlay mode. */\n readonly hasOverlay = computed(() => this.sidenavs().some((s) => s.isOverlay() && s.opened()));\n\n constructor() {\n const doc = inject(DOCUMENT);\n\n // Enable transitions only after first render to prevent jank on load\n afterNextRender(() => this.ready.set(true));\n\n // Scroll lock when overlay is active.\n // Uses the same dataset-based ref-counting as CngxScrollLock so\n // multiple lock sources don't corrupt each other's restore values.\n const html = doc.documentElement;\n const locked = signal(false);\n\n effect(() => {\n if (this.hasOverlay() && !locked()) {\n if (!html.dataset['cngxPrevOverflow']) {\n html.dataset['cngxPrevOverflow'] = html.style.overflow;\n html.dataset['cngxPrevScrollbarGutter'] = html.style.scrollbarGutter;\n }\n html.style.overflow = 'hidden';\n html.style.scrollbarGutter = 'stable';\n locked.set(true);\n } else if (!this.hasOverlay() && locked()) {\n html.style.overflow = html.dataset['cngxPrevOverflow'] ?? '';\n html.style.scrollbarGutter = html.dataset['cngxPrevScrollbarGutter'] ?? '';\n delete html.dataset['cngxPrevOverflow'];\n delete html.dataset['cngxPrevScrollbarGutter'];\n locked.set(false);\n }\n });\n\n inject(DestroyRef).onDestroy(() => {\n if (locked()) {\n html.style.overflow = html.dataset['cngxPrevOverflow'] ?? '';\n html.style.scrollbarGutter = html.dataset['cngxPrevScrollbarGutter'] ?? '';\n delete html.dataset['cngxPrevOverflow'];\n delete html.dataset['cngxPrevScrollbarGutter'];\n }\n });\n\n // Click-outside: close overlay sidenavs when clicking outside the layout\n fromEvent<MouseEvent>(doc, 'click')\n .pipe(takeUntilDestroyed())\n .subscribe((e) => {\n if (!this.hasOverlay()) {\n return;\n }\n for (const nav of this.sidenavs()) {\n if (\n nav.isOverlay() &&\n nav.opened() &&\n !(nav.elementRef.nativeElement as HTMLElement).contains(e.target as Node)\n ) {\n nav.close();\n }\n }\n });\n }\n\n /** Closes all sidenavs that are currently in overlay mode. */\n closeAllOverlays(): void {\n for (const nav of this.sidenavs()) {\n if (nav.isOverlay() && nav.opened()) {\n nav.close();\n }\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CngxSidenavLayout } from './sidenav-layout';\n\n/**\n * Main content area within a `CngxSidenavLayout`.\n *\n * Auto-adjusts margins when sibling sidenavs are in `push` or `side`\n * mode. Must be a direct child of `CngxSidenavLayout`.\n *\n * ```html\n * <cngx-sidenav-layout>\n * <cngx-sidenav position=\"start\">…</cngx-sidenav>\n * <cngx-sidenav-content>\n * <router-outlet />\n * </cngx-sidenav-content>\n * </cngx-sidenav-layout>\n * ```\n */\n@Component({\n selector: 'cngx-sidenav-content',\n exportAs: 'cngxSidenavContent',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.cngx-sidenav-content]': 'true',\n '[style.margin-inline-start]': 'marginStart',\n '[style.margin-inline-end]': 'marginEnd',\n },\n template: `<ng-content />`,\n})\nexport class CngxSidenavContent {\n private readonly layout = inject(CngxSidenavLayout, { optional: true });\n\n constructor() {\n if (!this.layout) {\n throw new Error('cngx-sidenav-content must be placed inside a cngx-sidenav-layout.');\n }\n }\n\n /**\n * Margin offset for the start sidenav.\n *\n * Push and side modes use `position: relative` — the sidenav sits in\n * the flex flow and the content shrinks naturally via `flex: 1`.\n * No margin needed. Over mode uses `position: absolute` — no margin needed\n * either since the sidenav floats above content.\n *\n * Kept as a public computed so tests and consumers can still read it.\n */\n readonly marginStart = '0';\n\n /** Margin offset for the end sidenav — same rationale as start. */\n readonly marginEnd = '0';\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Marks content to be projected into the sidenav's sticky header area.\n */\n@Directive({\n selector: 'cngx-sidenav-header, [cngxSidenavHeader]',\n standalone: true,\n host: { '[class.cngx-sidenav-header]': 'true' },\n})\nexport class CngxSidenavHeader {}\n","import { Directive } from '@angular/core';\n\n/**\n * Marks content to be projected into the sidenav's sticky footer area.\n */\n@Directive({\n selector: 'cngx-sidenav-footer, [cngxSidenavFooter]',\n standalone: true,\n host: { '[class.cngx-sidenav-footer]': 'true' },\n})\nexport class CngxSidenavFooter {}\n","/**\n * @module @cngx/ui/sidenav\n */\n\nexport { CngxSidenavLayout } from './sidenav-layout';\nexport { CngxSidenav, type SidenavPosition, type SidenavMode } from './sidenav';\nexport { CngxSidenavContent } from './sidenav-content';\nexport { CngxSidenavHeader } from './sidenav-header';\nexport { CngxSidenavFooter } from './sidenav-footer';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA2BA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;MAgDU,WAAW,CAAA;;AAEb,IAAA,QAAQ,GAAG,KAAK,CAAkB,OAAO,+EAAC;;AAG1C,IAAA,SAAS,GAAG,KAAK,CAAqB,SAAS,gFAAC;;AAGhD,IAAA,IAAI,GAAG,KAAK,CAAc,MAAM,2EAAC;AAE1C;;;;AAIG;AACM,IAAA,UAAU,GAAG,KAAK,CAAqB,SAAS,iFAAC;;AAGjD,IAAA,KAAK,GAAG,KAAK,CAAS,OAAO,4EAAC;;AAG9B,IAAA,SAAS,GAAG,KAAK,CAAS,MAAM,gFAAC;;AAGjC,IAAA,aAAa,GAAG,KAAK,CAAU,IAAI,oFAAC;;AAGpC,IAAA,SAAS,GAAG,KAAK,CAAU,KAAK,gFAAC;;AAGjC,IAAA,QAAQ,GAAG,KAAK,CAAS,OAAO,+EAAC;;AAGjC,IAAA,QAAQ,GAAG,KAAK,CAAS,OAAO,+EAAC;AAE1C;;;;AAIG;AACM,IAAA,QAAQ,GAAG,KAAK,CAAqB,SAAS,+EAAC;;AAGvC,IAAA,aAAa,GA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