@arsedizioni/ars-utils 22.1.3 → 22.1.4
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/arsedizioni-ars-utils-ui.mjs +642 -86
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1 -1
- package/types/arsedizioni-ars-utils-ui.application.d.ts +2 -2
- package/types/arsedizioni-ars-utils-ui.d.ts +1098 -784
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { MatPaginatorIntl } from '@angular/material/paginator';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Injectable, InjectionToken, inject, Service, TemplateRef, ViewContainerRef, input, computed, effect, Directive, ElementRef, Renderer2, PLATFORM_ID, isDevMode, NgModule, signal, ChangeDetectionStrategy, Component, output, DestroyRef, viewChildren, forwardRef, model, booleanAttribute, numberAttribute } from '@angular/core';
|
|
4
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
4
|
+
import { Overlay, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
5
5
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
6
6
|
import { isPlatformBrowser, PlatformLocation } from '@angular/common';
|
|
7
7
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogClose, MatDialogActions, MatDialog } from '@angular/material/dialog';
|
|
8
8
|
import { MAT_SNACK_BAR_DATA, MatSnackBar } from '@angular/material/snack-bar';
|
|
9
|
-
import { SafeHtmlPipe, SystemUtils, PasswordValidatorDirective, EqualsValidatorDirective } from '@arsedizioni/ars-utils/core';
|
|
10
|
-
import { map, distinctUntilChanged, shareReplay, timer, filter } from 'rxjs';
|
|
9
|
+
import { SafeHtmlPipe, SystemUtils, PasswordValidatorDirective, EqualsValidatorDirective, ThemeService } from '@arsedizioni/ars-utils/core';
|
|
10
|
+
import { map, distinctUntilChanged, shareReplay, timer, EMPTY, filter } from 'rxjs';
|
|
11
11
|
import { tap, first } from 'rxjs/operators';
|
|
12
12
|
import * as i5 from '@angular/material/progress-spinner';
|
|
13
13
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
@@ -3219,6 +3219,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
3219
3219
|
* https://m3.material.io/components/navigation-rail/specs
|
|
3220
3220
|
* https://m3.material.io/components/navigation-drawer/specs
|
|
3221
3221
|
*/
|
|
3222
|
+
/**
|
|
3223
|
+
* Identifier of the synthesized overflow destination. Use it to recognise the
|
|
3224
|
+
* overflow entry inside `itemSelected`.
|
|
3225
|
+
*/
|
|
3226
|
+
const NAVIGATION_OVERFLOW_ID = '__overflow';
|
|
3222
3227
|
/**
|
|
3223
3228
|
* Default `auto` mapping, aligned with the Material 3 window size classes:
|
|
3224
3229
|
* compact windows get the navigation bar, medium and expanded windows get the
|
|
@@ -3252,14 +3257,23 @@ const EXPANDED_NAVIGATION_VARIANTS = [
|
|
|
3252
3257
|
* - Zoneless / signal based: no `NgZone`, no `setTimeout`, no manual change detection.
|
|
3253
3258
|
* - `OnPush` + pre-computed render models: the template contains no method calls.
|
|
3254
3259
|
* - Zero-DOM active indicator and state layer (rendered as pseudo-elements).
|
|
3260
|
+
* - Nested destinations expand inline in the wide variants and open in a single
|
|
3261
|
+
* shared overlay in the compact ones — one overlay for the whole component,
|
|
3262
|
+
* not one menu instance per destination.
|
|
3255
3263
|
* - Router integration that degrades gracefully when no `Router` is provided.
|
|
3256
3264
|
*/
|
|
3265
|
+
/** Default sprite geometry, applied when a `NavigationIconSprite` omits a field. */
|
|
3266
|
+
const SPRITE_DEFAULT_SIZE = 24;
|
|
3257
3267
|
class NavigationBarComponent {
|
|
3258
3268
|
constructor() {
|
|
3259
3269
|
// ── Injected dependencies ──────────────────────────────────────────────────
|
|
3260
3270
|
this.media = inject(MediaObserver);
|
|
3271
|
+
// Optional for the same reason `Router` is: the component must still render
|
|
3272
|
+
// inside a bare test bed, where no application theme has been bootstrapped.
|
|
3273
|
+
this.themeService = inject(ThemeService, { optional: true });
|
|
3261
3274
|
this.router = inject(Router, { optional: true });
|
|
3262
3275
|
this.directionality = inject(Directionality, { optional: true });
|
|
3276
|
+
this.hostRef = inject(ElementRef);
|
|
3263
3277
|
this.destroyRef = inject(DestroyRef);
|
|
3264
3278
|
// ── Inputs ─────────────────────────────────────────────────────────────────
|
|
3265
3279
|
/** Flat list of destinations. Ignored when `sections` is provided. */
|
|
@@ -3277,6 +3291,14 @@ class NavigationBarComponent {
|
|
|
3277
3291
|
/** Two-way bound id of the selected destination. The router, when active, takes precedence. */
|
|
3278
3292
|
this.selectedId = model(undefined, /* @ts-ignore */
|
|
3279
3293
|
...(ngDevMode ? [{ debugName: "selectedId" }] : /* istanbul ignore next */ []));
|
|
3294
|
+
/**
|
|
3295
|
+
* Two-way bound ids of the expanded parent destinations.
|
|
3296
|
+
* Leave unbound (`undefined`) to let the component manage the expansion state
|
|
3297
|
+
* on its own, seeding it from `NavigationItem.expanded` and auto-opening the
|
|
3298
|
+
* ancestors of the active destination.
|
|
3299
|
+
*/
|
|
3300
|
+
this.expandedIds = model(undefined, /* @ts-ignore */
|
|
3301
|
+
...(ngDevMode ? [{ debugName: "expandedIds" }] : /* istanbul ignore next */ []));
|
|
3280
3302
|
/** Two-way bound open state of the modal drawer. Ignored by the other variants. */
|
|
3281
3303
|
this.open = model(false, /* @ts-ignore */
|
|
3282
3304
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
@@ -3286,7 +3308,7 @@ class NavigationBarComponent {
|
|
|
3286
3308
|
/** Icon / label arrangement inside a destination. */
|
|
3287
3309
|
this.itemLayout = input('auto', /* @ts-ignore */
|
|
3288
3310
|
...(ngDevMode ? [{ debugName: "itemLayout" }] : /* istanbul ignore next */ []));
|
|
3289
|
-
/** Vertical alignment of the destination
|
|
3311
|
+
/** Vertical alignment of the `top` destination group inside a rail. */
|
|
3290
3312
|
this.alignment = input('top', /* @ts-ignore */
|
|
3291
3313
|
...(ngDevMode ? [{ debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
3292
3314
|
/** Edge the rail / drawer is anchored to. Mirrored automatically in RTL. */
|
|
@@ -3300,6 +3322,24 @@ class NavigationBarComponent {
|
|
|
3300
3322
|
/** Material Symbols ligature used by the menu button. */
|
|
3301
3323
|
this.menuIcon = input('menu', /* @ts-ignore */
|
|
3302
3324
|
...(ngDevMode ? [{ debugName: "menuIcon" }] : /* istanbul ignore next */ []));
|
|
3325
|
+
/** Material Symbols ligature used by the expand / collapse chevron. */
|
|
3326
|
+
this.expandIcon = input('expand_more', /* @ts-ignore */
|
|
3327
|
+
...(ngDevMode ? [{ debugName: "expandIcon" }] : /* istanbul ignore next */ []));
|
|
3328
|
+
/** Where `hideWhenCompact` destinations are collapsed into the overflow menu. */
|
|
3329
|
+
this.overflowMode = input('bar', /* @ts-ignore */
|
|
3330
|
+
...(ngDevMode ? [{ debugName: "overflowMode" }] : /* istanbul ignore next */ []));
|
|
3331
|
+
/** Material Symbols ligature of the overflow destination. */
|
|
3332
|
+
this.overflowIcon = input('more_vert', /* @ts-ignore */
|
|
3333
|
+
...(ngDevMode ? [{ debugName: "overflowIcon" }] : /* istanbul ignore next */ []));
|
|
3334
|
+
/** Accessible name and tooltip of the overflow destination, which renders icon-only. */
|
|
3335
|
+
this.overflowLabel = input('More', /* @ts-ignore */
|
|
3336
|
+
...(ngDevMode ? [{ debugName: "overflowLabel" }] : /* istanbul ignore next */ []));
|
|
3337
|
+
/**
|
|
3338
|
+
* Hard cap on the destinations rendered inline in the compact variants,
|
|
3339
|
+
* applied per anchoring group. The overflow destination counts as one slot.
|
|
3340
|
+
* `0` disables the cap; the M3 specs recommend 3 to 5 for the navigation bar.
|
|
3341
|
+
*/
|
|
3342
|
+
this.maxVisibleItems = input(0, { ...(ngDevMode ? { debugName: "maxVisibleItems" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
3303
3343
|
/** Accessible name of the menu button. */
|
|
3304
3344
|
this.menuAriaLabel = input('Menu', /* @ts-ignore */
|
|
3305
3345
|
...(ngDevMode ? [{ debugName: "menuAriaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -3334,10 +3374,87 @@ class NavigationBarComponent {
|
|
|
3334
3374
|
/** Focusable destination elements, in DOM order; used for keyboard roving. */
|
|
3335
3375
|
this.itemElements = viewChildren('navItem', /* @ts-ignore */
|
|
3336
3376
|
...(ngDevMode ? [{ debugName: "itemElements" }] : /* istanbul ignore next */ []));
|
|
3377
|
+
/** Focusable entries of the floating submenu panel, in DOM order. */
|
|
3378
|
+
this.panelElements = viewChildren('panelItem', /* @ts-ignore */
|
|
3379
|
+
...(ngDevMode ? [{ debugName: "panelElements" }] : /* istanbul ignore next */ []));
|
|
3337
3380
|
// ── Router state ───────────────────────────────────────────────────────────
|
|
3338
3381
|
/** Current router URL, kept in a signal so the template stays zoneless-friendly. */
|
|
3339
3382
|
this.routerUrl = signal(undefined, /* @ts-ignore */
|
|
3340
3383
|
...(ngDevMode ? [{ debugName: "routerUrl" }] : /* istanbul ignore next */ []));
|
|
3384
|
+
// ── Theme state ────────────────────────────────────────────────────────────
|
|
3385
|
+
/**
|
|
3386
|
+
* Ticks whenever the application theme moves. The emitted value is ignored on
|
|
3387
|
+
* purpose: it is a change notification, not the answer.
|
|
3388
|
+
*
|
|
3389
|
+
* Reads `themeService`, so it MUST stay below the injected dependencies: moved
|
|
3390
|
+
* above them it would read `undefined`, `?? EMPTY` would swallow it and the
|
|
3391
|
+
* theme would silently stop propagating, with nothing to show for it at
|
|
3392
|
+
* compile time.
|
|
3393
|
+
*/
|
|
3394
|
+
this.themeChanged = toSignal(this.themeService?.changed ?? EMPTY, { initialValue: undefined });
|
|
3395
|
+
/**
|
|
3396
|
+
* `true` when the dark theme is active; selects the dark frame set of a sprite.
|
|
3397
|
+
*
|
|
3398
|
+
* The answer comes from `getTheme()`, the only one that resolves `auto`
|
|
3399
|
+
* against the OS preference. `getTheme()` already reads a signal for the
|
|
3400
|
+
* explicit modes, so `themeChanged()` is read for the one case that is not
|
|
3401
|
+
* reactive on its own: mode `auto` plus a change of the OS colour scheme,
|
|
3402
|
+
* which leaves the stored mode on `auto` and only travels through `changed`.
|
|
3403
|
+
* Falls back to the light set when no `ThemeService` is provided.
|
|
3404
|
+
*/
|
|
3405
|
+
this.isDark = computed(() => {
|
|
3406
|
+
this.themeChanged();
|
|
3407
|
+
return this.themeService?.getTheme() === 'dark';
|
|
3408
|
+
}, /* @ts-ignore */
|
|
3409
|
+
...(ngDevMode ? [{ debugName: "isDark" }] : /* istanbul ignore next */ []));
|
|
3410
|
+
// ── Submenu overlay state ──────────────────────────────────────────────────
|
|
3411
|
+
/** Id of the destination whose children are currently shown in the floating panel. */
|
|
3412
|
+
this.popupId = signal(undefined, /* @ts-ignore */
|
|
3413
|
+
...(ngDevMode ? [{ debugName: "popupId" }] : /* istanbul ignore next */ []));
|
|
3414
|
+
/**
|
|
3415
|
+
* Destination whose children are currently shown in the floating panel.
|
|
3416
|
+
*
|
|
3417
|
+
* Derived from the id and NOT stored as an object: the render model is rebuilt
|
|
3418
|
+
* whenever the destinations, the resolved URLs or the theme change, and a
|
|
3419
|
+
* stored object would keep the panel painting the sprite frames of the
|
|
3420
|
+
* previous theme until the panel is closed and reopened.
|
|
3421
|
+
*
|
|
3422
|
+
* The search is recursive because a panel entry can itself own children and
|
|
3423
|
+
* open a panel of its own, and those nested render models are not part of the
|
|
3424
|
+
* top level of `visibleGroups`.
|
|
3425
|
+
*
|
|
3426
|
+
* Reads `visibleGroups`, which is declared further down: safe because
|
|
3427
|
+
* `computed` is lazy and nothing reads this before the first render — the
|
|
3428
|
+
* opposite of `themeChanged` above, which reads its dependency immediately.
|
|
3429
|
+
*/
|
|
3430
|
+
this.popupItem = computed(() => {
|
|
3431
|
+
const id = this.popupId();
|
|
3432
|
+
if (id === undefined)
|
|
3433
|
+
return undefined;
|
|
3434
|
+
const find = (list) => {
|
|
3435
|
+
for (const rendered of list) {
|
|
3436
|
+
if (rendered.item.id === id)
|
|
3437
|
+
return rendered;
|
|
3438
|
+
const nested = find(rendered.children);
|
|
3439
|
+
if (nested)
|
|
3440
|
+
return nested;
|
|
3441
|
+
}
|
|
3442
|
+
return undefined;
|
|
3443
|
+
};
|
|
3444
|
+
for (const group of this.visibleGroups()) {
|
|
3445
|
+
for (const section of group.sections) {
|
|
3446
|
+
const hit = find(section.items);
|
|
3447
|
+
if (hit)
|
|
3448
|
+
return hit;
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
// The destination went away while its panel was open.
|
|
3452
|
+
return undefined;
|
|
3453
|
+
}, /* @ts-ignore */
|
|
3454
|
+
...(ngDevMode ? [{ debugName: "popupItem" }] : /* istanbul ignore next */ []));
|
|
3455
|
+
/** Element the floating panel is anchored to. */
|
|
3456
|
+
this.popupAnchor = signal(undefined, /* @ts-ignore */
|
|
3457
|
+
...(ngDevMode ? [{ debugName: "popupAnchor" }] : /* istanbul ignore next */ []));
|
|
3341
3458
|
// ── Derived state ──────────────────────────────────────────────────────────
|
|
3342
3459
|
/** Sections actually rendered: the `sections` input, or a single implicit section wrapping `items`. */
|
|
3343
3460
|
this.resolvedSections = computed(() => {
|
|
@@ -3347,6 +3464,37 @@ class NavigationBarComponent {
|
|
|
3347
3464
|
return [{ id: '__default', items: this.items() }];
|
|
3348
3465
|
}, /* @ts-ignore */
|
|
3349
3466
|
...(ngDevMode ? [{ debugName: "resolvedSections" }] : /* istanbul ignore next */ []));
|
|
3467
|
+
/** Every destination, nested ones included, in depth-first order. */
|
|
3468
|
+
this.allItems = computed(() => {
|
|
3469
|
+
const result = [];
|
|
3470
|
+
const walk = (list) => {
|
|
3471
|
+
for (const item of list) {
|
|
3472
|
+
result.push(item);
|
|
3473
|
+
if (item.children?.length)
|
|
3474
|
+
walk(item.children);
|
|
3475
|
+
}
|
|
3476
|
+
};
|
|
3477
|
+
for (const section of this.resolvedSections())
|
|
3478
|
+
walk(section.items);
|
|
3479
|
+
return result;
|
|
3480
|
+
}, /* @ts-ignore */
|
|
3481
|
+
...(ngDevMode ? [{ debugName: "allItems" }] : /* istanbul ignore next */ []));
|
|
3482
|
+
/** Map of destination id to the id of its parent destination. */
|
|
3483
|
+
this.parentOf = computed(() => {
|
|
3484
|
+
const result = new Map();
|
|
3485
|
+
const walk = (list, parentId) => {
|
|
3486
|
+
for (const item of list) {
|
|
3487
|
+
if (parentId !== undefined)
|
|
3488
|
+
result.set(item.id, parentId);
|
|
3489
|
+
if (item.children?.length)
|
|
3490
|
+
walk(item.children, item.id);
|
|
3491
|
+
}
|
|
3492
|
+
};
|
|
3493
|
+
for (const section of this.resolvedSections())
|
|
3494
|
+
walk(section.items);
|
|
3495
|
+
return result;
|
|
3496
|
+
}, /* @ts-ignore */
|
|
3497
|
+
...(ngDevMode ? [{ debugName: "parentOf" }] : /* istanbul ignore next */ []));
|
|
3350
3498
|
/** The variant to render, resolving `auto` against the active CDK breakpoint. */
|
|
3351
3499
|
this.resolvedVariant = computed(() => {
|
|
3352
3500
|
const variant = this.variant();
|
|
@@ -3387,10 +3535,7 @@ class NavigationBarComponent {
|
|
|
3387
3535
|
return visibility === 'auto' ? 'labeled' : visibility;
|
|
3388
3536
|
}, /* @ts-ignore */
|
|
3389
3537
|
...(ngDevMode ? [{ debugName: "resolvedLabelVisibility" }] : /* istanbul ignore next */ []));
|
|
3390
|
-
/** `true` when the
|
|
3391
|
-
this.showsSections = computed(() => this.isExpanded(), /* @ts-ignore */
|
|
3392
|
-
...(ngDevMode ? [{ debugName: "showsSections" }] : /* istanbul ignore next */ []));
|
|
3393
|
-
/** `true` when the headline row (menu button, headline text, projected header) is rendered. */
|
|
3538
|
+
/** `true` when the headline row (menu button, headline text) is rendered. */
|
|
3394
3539
|
this.showsHeader = computed(() => this.resolvedVariant() !== 'bar' && (this.showMenuButton() || (this.isExpanded() && !!this.headline())), /* @ts-ignore */
|
|
3395
3540
|
...(ngDevMode ? [{ debugName: "showsHeader" }] : /* istanbul ignore next */ []));
|
|
3396
3541
|
/**
|
|
@@ -3418,61 +3563,61 @@ class NavigationBarComponent {
|
|
|
3418
3563
|
const result = new Map();
|
|
3419
3564
|
const router = this.router;
|
|
3420
3565
|
const relativeTo = this.relativeTo();
|
|
3421
|
-
for (const
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3566
|
+
for (const item of this.allItems()) {
|
|
3567
|
+
if (item.href) {
|
|
3568
|
+
result.set(item.id, item.href);
|
|
3569
|
+
continue;
|
|
3570
|
+
}
|
|
3571
|
+
if (item.route !== undefined && router) {
|
|
3572
|
+
const commands = Array.isArray(item.route) ? [...item.route] : [item.route];
|
|
3573
|
+
try {
|
|
3574
|
+
const tree = router.createUrlTree(commands, {
|
|
3575
|
+
queryParams: item.queryParams,
|
|
3576
|
+
fragment: item.fragment,
|
|
3577
|
+
relativeTo,
|
|
3578
|
+
});
|
|
3579
|
+
result.set(item.id, router.serializeUrl(tree));
|
|
3426
3580
|
}
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
try {
|
|
3430
|
-
const tree = router.createUrlTree(commands, {
|
|
3431
|
-
queryParams: item.queryParams,
|
|
3432
|
-
fragment: item.fragment,
|
|
3433
|
-
relativeTo,
|
|
3434
|
-
});
|
|
3435
|
-
result.set(item.id, router.serializeUrl(tree));
|
|
3436
|
-
}
|
|
3437
|
-
catch {
|
|
3438
|
-
// Invalid route commands: the destination degrades to a plain button.
|
|
3439
|
-
}
|
|
3581
|
+
catch {
|
|
3582
|
+
// Invalid route commands: the destination degrades to a plain button.
|
|
3440
3583
|
}
|
|
3441
3584
|
}
|
|
3442
3585
|
}
|
|
3443
3586
|
return result;
|
|
3444
3587
|
}, /* @ts-ignore */
|
|
3445
3588
|
...(ngDevMode ? [{ debugName: "hrefs" }] : /* istanbul ignore next */ []));
|
|
3446
|
-
/**
|
|
3447
|
-
|
|
3589
|
+
/**
|
|
3590
|
+
* Static render model, rebuilt only when the destinations, the resolved URLs
|
|
3591
|
+
* or the theme change — never when the selection or the expansion state
|
|
3592
|
+
* changes. The theme is a dependency because sprite icons carry one frame set
|
|
3593
|
+
* per theme, and the frames are baked into the inline style of the icon.
|
|
3594
|
+
*/
|
|
3595
|
+
this.renderGroups = computed(() => {
|
|
3448
3596
|
const hrefs = this.hrefs();
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
};
|
|
3472
|
-
}),
|
|
3473
|
-
}));
|
|
3597
|
+
const dark = this.isDark();
|
|
3598
|
+
const counter = { value: 0 };
|
|
3599
|
+
const top = [];
|
|
3600
|
+
const bottom = [];
|
|
3601
|
+
for (const section of this.resolvedSections()) {
|
|
3602
|
+
const topItems = [];
|
|
3603
|
+
const bottomItems = [];
|
|
3604
|
+
for (const item of section.items) {
|
|
3605
|
+
const rendered = NavigationBarComponent.buildRenderItem(item, section, undefined, 0, counter, hrefs, dark);
|
|
3606
|
+
(item.align === 'bottom' ? bottomItems : topItems).push(rendered);
|
|
3607
|
+
}
|
|
3608
|
+
if (topItems.length > 0)
|
|
3609
|
+
top.push({ section, items: topItems });
|
|
3610
|
+
if (bottomItems.length > 0)
|
|
3611
|
+
bottom.push({ section, items: bottomItems });
|
|
3612
|
+
}
|
|
3613
|
+
const groups = [];
|
|
3614
|
+
if (top.length > 0)
|
|
3615
|
+
groups.push({ align: 'top', sections: top });
|
|
3616
|
+
if (bottom.length > 0)
|
|
3617
|
+
groups.push({ align: 'bottom', sections: bottom });
|
|
3618
|
+
return groups;
|
|
3474
3619
|
}, /* @ts-ignore */
|
|
3475
|
-
...(ngDevMode ? [{ debugName: "
|
|
3620
|
+
...(ngDevMode ? [{ debugName: "renderGroups" }] : /* istanbul ignore next */ []));
|
|
3476
3621
|
/** Id of the destination matching the current router URL, using longest-prefix matching. */
|
|
3477
3622
|
this.routerActiveId = computed(() => {
|
|
3478
3623
|
if (!this.routerSync())
|
|
@@ -3484,21 +3629,19 @@ class NavigationBarComponent {
|
|
|
3484
3629
|
const hrefs = this.hrefs();
|
|
3485
3630
|
let best;
|
|
3486
3631
|
let bestLength = -1;
|
|
3487
|
-
for (const
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
bestLength = target.length;
|
|
3501
|
-
}
|
|
3632
|
+
for (const item of this.allItems()) {
|
|
3633
|
+
if (item.href || item.route === undefined)
|
|
3634
|
+
continue;
|
|
3635
|
+
const href = hrefs.get(item.id);
|
|
3636
|
+
if (!href)
|
|
3637
|
+
continue;
|
|
3638
|
+
const target = NavigationBarComponent.pathOf(href);
|
|
3639
|
+
const matches = item.exact
|
|
3640
|
+
? path === target
|
|
3641
|
+
: path === target || path.startsWith(target.endsWith('/') ? target : `${target}/`);
|
|
3642
|
+
if (matches && target.length > bestLength) {
|
|
3643
|
+
best = item.id;
|
|
3644
|
+
bestLength = target.length;
|
|
3502
3645
|
}
|
|
3503
3646
|
}
|
|
3504
3647
|
return best;
|
|
@@ -3507,6 +3650,165 @@ class NavigationBarComponent {
|
|
|
3507
3650
|
/** Id of the currently active destination: router URL first, explicit selection as fallback. */
|
|
3508
3651
|
this.activeId = computed(() => this.routerActiveId() ?? this.selectedId(), /* @ts-ignore */
|
|
3509
3652
|
...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
|
|
3653
|
+
/**
|
|
3654
|
+
* Expansion state used when `expandedIds` is left unbound: the destinations
|
|
3655
|
+
* flagged `expanded`, plus every ancestor of the active destination.
|
|
3656
|
+
*/
|
|
3657
|
+
this.defaultExpandedIds = computed(() => {
|
|
3658
|
+
const result = new Set();
|
|
3659
|
+
for (const item of this.allItems()) {
|
|
3660
|
+
if (item.expanded)
|
|
3661
|
+
result.add(item.id);
|
|
3662
|
+
}
|
|
3663
|
+
const parents = this.parentOf();
|
|
3664
|
+
const visited = new Set();
|
|
3665
|
+
let current = this.activeId();
|
|
3666
|
+
while (current !== undefined && !visited.has(current)) {
|
|
3667
|
+
visited.add(current);
|
|
3668
|
+
const parent = parents.get(current);
|
|
3669
|
+
if (parent === undefined)
|
|
3670
|
+
break;
|
|
3671
|
+
result.add(parent);
|
|
3672
|
+
current = parent;
|
|
3673
|
+
}
|
|
3674
|
+
return [...result];
|
|
3675
|
+
}, /* @ts-ignore */
|
|
3676
|
+
...(ngDevMode ? [{ debugName: "defaultExpandedIds" }] : /* istanbul ignore next */ []));
|
|
3677
|
+
/** Ids of the parent destinations currently expanded. */
|
|
3678
|
+
this.expandedSet = computed(() => new Set(this.expandedIds() ?? this.defaultExpandedIds()), /* @ts-ignore */
|
|
3679
|
+
...(ngDevMode ? [{ debugName: "expandedSet" }] : /* istanbul ignore next */ []));
|
|
3680
|
+
/** `true` when the current variant collapses `hideWhenCompact` destinations into the overflow menu. */
|
|
3681
|
+
this.overflowApplies = computed(() => {
|
|
3682
|
+
const mode = this.overflowMode();
|
|
3683
|
+
if (mode === 'never')
|
|
3684
|
+
return false;
|
|
3685
|
+
const variant = this.resolvedVariant();
|
|
3686
|
+
return mode === 'bar' ? variant === 'bar' : variant === 'bar' || variant === 'rail';
|
|
3687
|
+
}, /* @ts-ignore */
|
|
3688
|
+
...(ngDevMode ? [{ debugName: "overflowApplies" }] : /* istanbul ignore next */ []));
|
|
3689
|
+
/**
|
|
3690
|
+
* Render model actually walked by the template: the static model with the
|
|
3691
|
+
* compact-only destinations moved into the overflow menu and the children of
|
|
3692
|
+
* the expanded parents spliced in.
|
|
3693
|
+
*/
|
|
3694
|
+
this.visibleGroups = computed(() => {
|
|
3695
|
+
const inline = this.isExpanded();
|
|
3696
|
+
const open = this.expandedSet();
|
|
3697
|
+
const overflow = this.overflowApplies();
|
|
3698
|
+
const max = this.maxVisibleItems();
|
|
3699
|
+
// The bar ignores per-item anchoring, so both groups share a single row and
|
|
3700
|
+
// therefore a single overflow entry.
|
|
3701
|
+
let groups = this.resolvedVariant() === 'bar'
|
|
3702
|
+
? NavigationBarComponent.mergeGroups(this.renderGroups())
|
|
3703
|
+
: this.renderGroups();
|
|
3704
|
+
if (overflow || max > 0) {
|
|
3705
|
+
groups = groups.map(group => this.applyOverflow(group, overflow, max));
|
|
3706
|
+
}
|
|
3707
|
+
if (!inline)
|
|
3708
|
+
return groups;
|
|
3709
|
+
const flatten = (list) => {
|
|
3710
|
+
let expandedAny = false;
|
|
3711
|
+
const result = [];
|
|
3712
|
+
for (const rendered of list) {
|
|
3713
|
+
result.push(rendered);
|
|
3714
|
+
if (rendered.hasChildren && open.has(rendered.item.id)) {
|
|
3715
|
+
expandedAny = true;
|
|
3716
|
+
result.push(...flatten(rendered.children));
|
|
3717
|
+
}
|
|
3718
|
+
}
|
|
3719
|
+
return expandedAny ? result : list;
|
|
3720
|
+
};
|
|
3721
|
+
return groups.map(group => ({
|
|
3722
|
+
align: group.align,
|
|
3723
|
+
sections: group.sections.map(section => ({
|
|
3724
|
+
section: section.section,
|
|
3725
|
+
items: flatten(section.items),
|
|
3726
|
+
})),
|
|
3727
|
+
}));
|
|
3728
|
+
}, /* @ts-ignore */
|
|
3729
|
+
...(ngDevMode ? [{ debugName: "visibleGroups" }] : /* istanbul ignore next */ []));
|
|
3730
|
+
/**
|
|
3731
|
+
* Ids rendered with the selected styling. It is the active destination when it
|
|
3732
|
+
* is on screen, otherwise every rendered parent hiding it — a collapsed branch
|
|
3733
|
+
* or the overflow entry — so the user still sees where they are.
|
|
3734
|
+
*/
|
|
3735
|
+
this.highlightedIds = computed(() => {
|
|
3736
|
+
const active = this.activeId();
|
|
3737
|
+
const result = new Set();
|
|
3738
|
+
if (active === undefined)
|
|
3739
|
+
return result;
|
|
3740
|
+
const rendered = new Set();
|
|
3741
|
+
const parents = [];
|
|
3742
|
+
for (const group of this.visibleGroups()) {
|
|
3743
|
+
for (const section of group.sections) {
|
|
3744
|
+
for (const item of section.items) {
|
|
3745
|
+
rendered.add(item.item.id);
|
|
3746
|
+
if (item.hasChildren)
|
|
3747
|
+
parents.push(item);
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
if (rendered.has(active)) {
|
|
3752
|
+
result.add(active);
|
|
3753
|
+
return result;
|
|
3754
|
+
}
|
|
3755
|
+
const contains = (list) => list.some(child => child.item.id === active || contains(child.children));
|
|
3756
|
+
for (const parent of parents) {
|
|
3757
|
+
if (contains(parent.children))
|
|
3758
|
+
result.add(parent.item.id);
|
|
3759
|
+
}
|
|
3760
|
+
return result;
|
|
3761
|
+
}, /* @ts-ignore */
|
|
3762
|
+
...(ngDevMode ? [{ debugName: "highlightedIds" }] : /* istanbul ignore next */ []));
|
|
3763
|
+
/**
|
|
3764
|
+
* Rows of the floating submenu panel. Nested destinations one level down are
|
|
3765
|
+
* flattened under a heading, so the overflow menu can hold parents too.
|
|
3766
|
+
*/
|
|
3767
|
+
this.popupEntries = computed(() => {
|
|
3768
|
+
const parent = this.popupItem();
|
|
3769
|
+
if (!parent)
|
|
3770
|
+
return [];
|
|
3771
|
+
const result = [];
|
|
3772
|
+
for (const child of parent.children) {
|
|
3773
|
+
if (child.hasChildren) {
|
|
3774
|
+
result.push({ key: `${child.item.id}__heading`, label: child.item.label });
|
|
3775
|
+
for (const grandChild of child.children) {
|
|
3776
|
+
result.push({ key: grandChild.item.id, render: grandChild });
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
else {
|
|
3780
|
+
result.push({ key: child.item.id, render: child });
|
|
3781
|
+
}
|
|
3782
|
+
}
|
|
3783
|
+
return result;
|
|
3784
|
+
}, /* @ts-ignore */
|
|
3785
|
+
...(ngDevMode ? [{ debugName: "popupEntries" }] : /* istanbul ignore next */ []));
|
|
3786
|
+
/** `true` when the floating submenu panel must be shown. */
|
|
3787
|
+
this.isPopupOpen = computed(() => !this.isExpanded() && !!this.popupItem(), /* @ts-ignore */
|
|
3788
|
+
...(ngDevMode ? [{ debugName: "isPopupOpen" }] : /* istanbul ignore next */ []));
|
|
3789
|
+
/** Element the floating submenu panel is anchored to. */
|
|
3790
|
+
this.popupOrigin = computed(() => this.popupAnchor() ?? this.hostRef.nativeElement, /* @ts-ignore */
|
|
3791
|
+
...(ngDevMode ? [{ debugName: "popupOrigin" }] : /* istanbul ignore next */ []));
|
|
3792
|
+
/** Connected positions of the floating submenu panel, derived from the variant. */
|
|
3793
|
+
this.popupPositions = computed(() => {
|
|
3794
|
+
if (this.resolvedVariant() === 'bar') {
|
|
3795
|
+
return [
|
|
3796
|
+
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },
|
|
3797
|
+
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },
|
|
3798
|
+
];
|
|
3799
|
+
}
|
|
3800
|
+
if (this.position() === 'end') {
|
|
3801
|
+
return [
|
|
3802
|
+
{ originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },
|
|
3803
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },
|
|
3804
|
+
];
|
|
3805
|
+
}
|
|
3806
|
+
return [
|
|
3807
|
+
{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },
|
|
3808
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },
|
|
3809
|
+
];
|
|
3810
|
+
}, /* @ts-ignore */
|
|
3811
|
+
...(ngDevMode ? [{ debugName: "popupPositions" }] : /* istanbul ignore next */ []));
|
|
3510
3812
|
/** `true` when the layout runs right-to-left; used to mirror the arrow keys. */
|
|
3511
3813
|
this.isRtl = computed(() => this.directionality?.value === 'rtl', /* @ts-ignore */
|
|
3512
3814
|
...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
|
|
@@ -3520,8 +3822,9 @@ class NavigationBarComponent {
|
|
|
3520
3822
|
}
|
|
3521
3823
|
// ── Event handlers ─────────────────────────────────────────────────────────
|
|
3522
3824
|
/**
|
|
3523
|
-
* Activates a destination
|
|
3524
|
-
*
|
|
3825
|
+
* Activates a destination, or expands it when it owns nested destinations.
|
|
3826
|
+
* A parent never navigates: it toggles its group inline in the wide variants
|
|
3827
|
+
* and opens the floating panel in the compact ones.
|
|
3525
3828
|
* @param render - The render model of the activated destination.
|
|
3526
3829
|
* @param event - The originating mouse or keyboard event.
|
|
3527
3830
|
*/
|
|
@@ -3531,6 +3834,16 @@ class NavigationBarComponent {
|
|
|
3531
3834
|
event.preventDefault();
|
|
3532
3835
|
return;
|
|
3533
3836
|
}
|
|
3837
|
+
if (render.hasChildren) {
|
|
3838
|
+
event.preventDefault();
|
|
3839
|
+
if (this.isExpanded()) {
|
|
3840
|
+
this.toggleExpanded(item.id);
|
|
3841
|
+
}
|
|
3842
|
+
else {
|
|
3843
|
+
this.openPopup(render, event);
|
|
3844
|
+
}
|
|
3845
|
+
return;
|
|
3846
|
+
}
|
|
3534
3847
|
// Let the browser handle modified clicks (new tab / new window) natively.
|
|
3535
3848
|
const mouse = event;
|
|
3536
3849
|
if (render.href && (mouse.ctrlKey || mouse.metaKey || mouse.shiftKey || mouse.button === 1)) {
|
|
@@ -3541,7 +3854,8 @@ class NavigationBarComponent {
|
|
|
3541
3854
|
void this.router?.navigateByUrl(render.href);
|
|
3542
3855
|
}
|
|
3543
3856
|
this.selectedId.set(item.id);
|
|
3544
|
-
this.itemSelected.emit({ item, section: render.section, index: render.index });
|
|
3857
|
+
this.itemSelected.emit({ item, section: render.section, parent: render.parent, index: render.index });
|
|
3858
|
+
this.closePopup();
|
|
3545
3859
|
if (this.isModal() && this.closeOnSelect()) {
|
|
3546
3860
|
this.open.set(false);
|
|
3547
3861
|
}
|
|
@@ -3561,16 +3875,32 @@ class NavigationBarComponent {
|
|
|
3561
3875
|
/**
|
|
3562
3876
|
* Handles keyboard interaction: arrow keys move the focus between
|
|
3563
3877
|
* destinations, `Home` / `End` jump to the first / last one and `Escape`
|
|
3564
|
-
* closes the modal drawer.
|
|
3878
|
+
* closes the floating submenu panel or the modal drawer.
|
|
3879
|
+
*
|
|
3880
|
+
* The same handler serves the surface and the floating panel, and it tells
|
|
3881
|
+
* them apart by `currentTarget`: roving inside an open `role="menu"` must stay
|
|
3882
|
+
* inside it, and a programmatic `focus()` is NOT stopped by the focus trap, so
|
|
3883
|
+
* sharing one element list would send the focus onto the surface behind the
|
|
3884
|
+
* overlay.
|
|
3885
|
+
*
|
|
3565
3886
|
* @param event - The originating keyboard event.
|
|
3566
3887
|
*/
|
|
3567
3888
|
onKeydown(event) {
|
|
3568
|
-
if (event.key === 'Escape'
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3889
|
+
if (event.key === 'Escape') {
|
|
3890
|
+
if (this.popupItem()) {
|
|
3891
|
+
event.preventDefault();
|
|
3892
|
+
this.closePopup();
|
|
3893
|
+
return;
|
|
3894
|
+
}
|
|
3895
|
+
if (this.isOverlayOpen()) {
|
|
3896
|
+
event.preventDefault();
|
|
3897
|
+
this.open.set(false);
|
|
3898
|
+
return;
|
|
3899
|
+
}
|
|
3572
3900
|
}
|
|
3573
|
-
|
|
3901
|
+
// The panel is always a vertical list, whatever the variant behind it.
|
|
3902
|
+
const inPanel = event.currentTarget?.classList.contains('ars-nav-submenu') === true;
|
|
3903
|
+
const horizontal = !inPanel && this.resolvedVariant() === 'bar';
|
|
3574
3904
|
const forward = horizontal ? (this.isRtl() ? 'ArrowLeft' : 'ArrowRight') : 'ArrowDown';
|
|
3575
3905
|
const backward = horizontal ? (this.isRtl() ? 'ArrowRight' : 'ArrowLeft') : 'ArrowUp';
|
|
3576
3906
|
let delta = 0;
|
|
@@ -3580,7 +3910,7 @@ class NavigationBarComponent {
|
|
|
3580
3910
|
delta = -1;
|
|
3581
3911
|
else if (event.key !== 'Home' && event.key !== 'End')
|
|
3582
3912
|
return;
|
|
3583
|
-
const elements = this.itemElements();
|
|
3913
|
+
const elements = inPanel ? this.panelElements() : this.itemElements();
|
|
3584
3914
|
if (elements.length === 0)
|
|
3585
3915
|
return;
|
|
3586
3916
|
const current = elements.findIndex(ref => ref.nativeElement === event.target);
|
|
@@ -3597,6 +3927,36 @@ class NavigationBarComponent {
|
|
|
3597
3927
|
elements[next]?.nativeElement.focus();
|
|
3598
3928
|
}
|
|
3599
3929
|
// ── Public API ─────────────────────────────────────────────────────────────
|
|
3930
|
+
/**
|
|
3931
|
+
* Expands or collapses the parent destination with the given id.
|
|
3932
|
+
* @param id - Identifier of the parent destination to toggle.
|
|
3933
|
+
*/
|
|
3934
|
+
toggleExpanded(id) {
|
|
3935
|
+
const next = new Set(this.expandedSet());
|
|
3936
|
+
if (next.has(id))
|
|
3937
|
+
next.delete(id);
|
|
3938
|
+
else
|
|
3939
|
+
next.add(id);
|
|
3940
|
+
this.expandedIds.set([...next]);
|
|
3941
|
+
}
|
|
3942
|
+
/**
|
|
3943
|
+
* Opens the floating submenu panel of a parent destination.
|
|
3944
|
+
* @param render - The render model of the parent destination.
|
|
3945
|
+
* @param event - The originating event, used to anchor the panel.
|
|
3946
|
+
*/
|
|
3947
|
+
openPopup(render, event) {
|
|
3948
|
+
const anchor = event.currentTarget;
|
|
3949
|
+
this.popupAnchor.set(anchor ?? undefined);
|
|
3950
|
+
this.popupId.set(this.popupItem()?.item.id === render.item.id ? undefined : render.item.id);
|
|
3951
|
+
}
|
|
3952
|
+
/**
|
|
3953
|
+
* Closes the floating submenu panel.
|
|
3954
|
+
*/
|
|
3955
|
+
closePopup() {
|
|
3956
|
+
this.popupId.set(undefined);
|
|
3957
|
+
// Otherwise the component keeps a reference to a detached element.
|
|
3958
|
+
this.popupAnchor.set(undefined);
|
|
3959
|
+
}
|
|
3600
3960
|
/**
|
|
3601
3961
|
* Opens the modal drawer. No-op for the other variants.
|
|
3602
3962
|
*/
|
|
@@ -3621,8 +3981,7 @@ class NavigationBarComponent {
|
|
|
3621
3981
|
* @returns `true` when a matching destination was found and focused.
|
|
3622
3982
|
*/
|
|
3623
3983
|
focusItem(id) {
|
|
3624
|
-
const
|
|
3625
|
-
for (const ref of elements) {
|
|
3984
|
+
for (const ref of this.itemElements()) {
|
|
3626
3985
|
if (ref.nativeElement.dataset['navId'] === id) {
|
|
3627
3986
|
ref.nativeElement.focus();
|
|
3628
3987
|
return true;
|
|
@@ -3631,6 +3990,203 @@ class NavigationBarComponent {
|
|
|
3631
3990
|
return false;
|
|
3632
3991
|
}
|
|
3633
3992
|
// ── Helpers ────────────────────────────────────────────────────────────────
|
|
3993
|
+
/**
|
|
3994
|
+
* Moves the compact-only destinations of a group into a synthesized overflow
|
|
3995
|
+
* destination appended at the end of the group.
|
|
3996
|
+
* @param group - The group to process.
|
|
3997
|
+
* @param overflow - `true` when `hideWhenCompact` must be honoured.
|
|
3998
|
+
* @param max - Hard cap on the inline destinations; `0` disables it.
|
|
3999
|
+
* @returns The group with the overflow destination applied.
|
|
4000
|
+
*/
|
|
4001
|
+
applyOverflow(group, overflow, max) {
|
|
4002
|
+
const kept = [];
|
|
4003
|
+
const overflowed = [];
|
|
4004
|
+
group.sections.forEach((section, sectionIndex) => {
|
|
4005
|
+
for (const render of section.items) {
|
|
4006
|
+
if (overflow && render.item.hideWhenCompact)
|
|
4007
|
+
overflowed.push(render);
|
|
4008
|
+
else
|
|
4009
|
+
kept.push({ sectionIndex, render });
|
|
4010
|
+
}
|
|
4011
|
+
});
|
|
4012
|
+
const slots = kept.length + (overflowed.length > 0 ? 1 : 0);
|
|
4013
|
+
if (max > 0 && slots > max) {
|
|
4014
|
+
const moved = kept.splice(Math.max(1, max - 1));
|
|
4015
|
+
for (const entry of moved)
|
|
4016
|
+
overflowed.push(entry.render);
|
|
4017
|
+
}
|
|
4018
|
+
if (overflowed.length === 0)
|
|
4019
|
+
return group;
|
|
4020
|
+
const sections = group.sections.map((section, sectionIndex) => ({
|
|
4021
|
+
section: section.section,
|
|
4022
|
+
items: kept.filter(entry => entry.sectionIndex === sectionIndex).map(entry => entry.render),
|
|
4023
|
+
}));
|
|
4024
|
+
const last = sections[sections.length - 1];
|
|
4025
|
+
sections[sections.length - 1] = {
|
|
4026
|
+
section: last.section,
|
|
4027
|
+
items: [...last.items, this.buildOverflowItem(overflowed)],
|
|
4028
|
+
};
|
|
4029
|
+
return { align: group.align, sections: sections.filter(section => section.items.length > 0) };
|
|
4030
|
+
}
|
|
4031
|
+
/**
|
|
4032
|
+
* Builds the synthesized, icon-only overflow destination.
|
|
4033
|
+
* @param children - The destinations moved into the overflow menu.
|
|
4034
|
+
* @returns The render model of the overflow destination.
|
|
4035
|
+
*/
|
|
4036
|
+
buildOverflowItem(children) {
|
|
4037
|
+
const label = this.overflowLabel();
|
|
4038
|
+
const icon = this.overflowIcon();
|
|
4039
|
+
return {
|
|
4040
|
+
item: { id: NAVIGATION_OVERFLOW_ID, label, icon },
|
|
4041
|
+
index: -1,
|
|
4042
|
+
depth: 0,
|
|
4043
|
+
routed: false,
|
|
4044
|
+
iconOff: icon,
|
|
4045
|
+
iconOn: icon,
|
|
4046
|
+
badgeText: '',
|
|
4047
|
+
hasBadge: false,
|
|
4048
|
+
iconOnly: true,
|
|
4049
|
+
hasChildren: true,
|
|
4050
|
+
children,
|
|
4051
|
+
ariaLabel: label,
|
|
4052
|
+
tooltip: label,
|
|
4053
|
+
};
|
|
4054
|
+
}
|
|
4055
|
+
/**
|
|
4056
|
+
* Merges the `top` and `bottom` groups into a single `top` group, combining
|
|
4057
|
+
* the sections that share an id so `@for` track keys stay unique.
|
|
4058
|
+
* @param groups - The groups to merge.
|
|
4059
|
+
* @returns A single-group array, or the input when there is nothing to merge.
|
|
4060
|
+
*/
|
|
4061
|
+
static mergeGroups(groups) {
|
|
4062
|
+
if (groups.length < 2)
|
|
4063
|
+
return groups;
|
|
4064
|
+
const order = [];
|
|
4065
|
+
const byId = new Map();
|
|
4066
|
+
for (const group of groups) {
|
|
4067
|
+
for (const section of group.sections) {
|
|
4068
|
+
const existing = byId.get(section.section.id);
|
|
4069
|
+
if (existing) {
|
|
4070
|
+
byId.set(section.section.id, {
|
|
4071
|
+
section: existing.section,
|
|
4072
|
+
items: [...existing.items, ...section.items],
|
|
4073
|
+
});
|
|
4074
|
+
}
|
|
4075
|
+
else {
|
|
4076
|
+
order.push(section.section.id);
|
|
4077
|
+
byId.set(section.section.id, section);
|
|
4078
|
+
}
|
|
4079
|
+
}
|
|
4080
|
+
}
|
|
4081
|
+
return [{ align: 'top', sections: order.map(id => byId.get(id)) }];
|
|
4082
|
+
}
|
|
4083
|
+
/**
|
|
4084
|
+
* Builds the render model of a destination and, recursively, of its children.
|
|
4085
|
+
* @param item - The source destination.
|
|
4086
|
+
* @param section - The section the destination belongs to.
|
|
4087
|
+
* @param parent - The parent destination, for nested destinations.
|
|
4088
|
+
* @param depth - Nesting level of the destination.
|
|
4089
|
+
* @param counter - Shared counter producing the flat destination index.
|
|
4090
|
+
* @param hrefs - Map of destination id to resolved URL.
|
|
4091
|
+
* @param dark - `true` when the dark theme is active, selecting the dark sprite frames.
|
|
4092
|
+
* @returns The render model of the destination.
|
|
4093
|
+
*/
|
|
4094
|
+
static buildRenderItem(item, section, parent, depth, counter, hrefs, dark) {
|
|
4095
|
+
const href = hrefs.get(item.id);
|
|
4096
|
+
// Icon precedence: registered SVG, then sprite sheet, then image, then ligature.
|
|
4097
|
+
const svgOff = item.svgIcon;
|
|
4098
|
+
const svgOn = item.activeSvgIcon ?? item.svgIcon;
|
|
4099
|
+
const spriteStyle = NavigationBarComponent.buildSpriteStyle(item, dark);
|
|
4100
|
+
const imageOff = spriteStyle || svgOff ? undefined : item.imageIcon;
|
|
4101
|
+
const imageOn = spriteStyle || svgOn ? undefined : (item.activeImageIcon ?? item.imageIcon);
|
|
4102
|
+
const index = counter.value++;
|
|
4103
|
+
const children = (item.children ?? []).map(child => NavigationBarComponent.buildRenderItem(child, section, item, depth + 1, counter, hrefs, dark));
|
|
4104
|
+
return {
|
|
4105
|
+
item,
|
|
4106
|
+
section: section.id === '__default' ? undefined : section,
|
|
4107
|
+
parent,
|
|
4108
|
+
index,
|
|
4109
|
+
depth,
|
|
4110
|
+
href,
|
|
4111
|
+
routed: !!href && !item.href,
|
|
4112
|
+
iconOff: svgOff || spriteStyle || imageOff ? undefined : item.icon,
|
|
4113
|
+
iconOn: svgOn || spriteStyle || imageOn ? undefined : (item.activeIcon ?? item.icon),
|
|
4114
|
+
svgOff,
|
|
4115
|
+
svgOn,
|
|
4116
|
+
imageOff,
|
|
4117
|
+
imageOn,
|
|
4118
|
+
spriteStyle,
|
|
4119
|
+
badgeText: NavigationBarComponent.formatBadge(item),
|
|
4120
|
+
hasBadge: !!item.badge,
|
|
4121
|
+
iconOnly: false,
|
|
4122
|
+
hasChildren: children.length > 0,
|
|
4123
|
+
children,
|
|
4124
|
+
ariaLabel: item.ariaLabel ?? item.label,
|
|
4125
|
+
tooltip: item.tooltip ?? item.label,
|
|
4126
|
+
};
|
|
4127
|
+
}
|
|
4128
|
+
/**
|
|
4129
|
+
* Translates a sprite descriptor into the inline custom properties the
|
|
4130
|
+
* stylesheet uses to size the icon and to shift `background-position` per
|
|
4131
|
+
* interaction state.
|
|
4132
|
+
*
|
|
4133
|
+
* The sheet is rescaled through `background-size` instead of being drawn at
|
|
4134
|
+
* its natural size: that is what lets a strip of 26px frames be painted at the
|
|
4135
|
+
* 24px of the surrounding Material icons without the neighbouring frames
|
|
4136
|
+
* bleeding into the box, and it makes the step between two frames exactly the
|
|
4137
|
+
* rendered side.
|
|
4138
|
+
*
|
|
4139
|
+
* @param item - The destination whose sprite must be translated.
|
|
4140
|
+
* @param dark - `true` when the dark theme is active, selecting the `dark` frame set.
|
|
4141
|
+
* @returns The inline style map, or `undefined` when the destination uses no sprite.
|
|
4142
|
+
*/
|
|
4143
|
+
static buildSpriteStyle(item, dark) {
|
|
4144
|
+
const sprite = item.sprite;
|
|
4145
|
+
if (!sprite)
|
|
4146
|
+
return undefined;
|
|
4147
|
+
// The inline indices are the light set; `dark` overrides only what differs.
|
|
4148
|
+
const light = sprite;
|
|
4149
|
+
const frames = dark && sprite.dark ? { ...light, ...sprite.dark } : light;
|
|
4150
|
+
const normal = frames.normal ?? 0;
|
|
4151
|
+
const hover = frames.hover ?? normal;
|
|
4152
|
+
const active = frames.active ?? hover;
|
|
4153
|
+
const disabled = frames.disabled ?? normal;
|
|
4154
|
+
const source = sprite.size ?? SPRITE_DEFAULT_SIZE;
|
|
4155
|
+
const size = sprite.renderSize ?? source;
|
|
4156
|
+
const count = NavigationBarComponent.spriteFrameCount(sprite);
|
|
4157
|
+
const vertical = (sprite.direction ?? 'vertical') === 'vertical';
|
|
4158
|
+
return {
|
|
4159
|
+
'--sp-url': `url("${sprite.url}")`,
|
|
4160
|
+
'--sp-size': `${size}px`,
|
|
4161
|
+
'--sp-sheet-x': vertical ? `${size}px` : `${size * count}px`,
|
|
4162
|
+
'--sp-sheet-y': vertical ? `${size * count}px` : `${size}px`,
|
|
4163
|
+
'--sp-step-x': vertical ? '0px' : `${-size}px`,
|
|
4164
|
+
'--sp-step-y': vertical ? `${-size}px` : '0px',
|
|
4165
|
+
'--sp-normal': `${normal}`,
|
|
4166
|
+
'--sp-hover': `${hover}`,
|
|
4167
|
+
'--sp-active': `${active}`,
|
|
4168
|
+
'--sp-disabled': `${disabled}`,
|
|
4169
|
+
};
|
|
4170
|
+
}
|
|
4171
|
+
/**
|
|
4172
|
+
* Number of frames a sprite sheet holds, needed to rescale it.
|
|
4173
|
+
* @param sprite - The sprite descriptor to measure.
|
|
4174
|
+
* @returns The declared frame count, or the highest referenced index plus one.
|
|
4175
|
+
*/
|
|
4176
|
+
static spriteFrameCount(sprite) {
|
|
4177
|
+
if (sprite.frames !== undefined && sprite.frames > 0)
|
|
4178
|
+
return sprite.frames;
|
|
4179
|
+
const indices = [
|
|
4180
|
+
sprite.normal, sprite.hover, sprite.active, sprite.disabled,
|
|
4181
|
+
sprite.dark?.normal, sprite.dark?.hover, sprite.dark?.active, sprite.dark?.disabled,
|
|
4182
|
+
];
|
|
4183
|
+
let highest = 0;
|
|
4184
|
+
for (const index of indices) {
|
|
4185
|
+
if (index !== undefined && index > highest)
|
|
4186
|
+
highest = index;
|
|
4187
|
+
}
|
|
4188
|
+
return highest + 1;
|
|
4189
|
+
}
|
|
3634
4190
|
/**
|
|
3635
4191
|
* Formats the badge content of a destination.
|
|
3636
4192
|
* @param item - The destination whose badge must be formatted.
|
|
@@ -3656,11 +4212,11 @@ class NavigationBarComponent {
|
|
|
3656
4212
|
return withoutFragment.split('?')[0] ?? '';
|
|
3657
4213
|
}
|
|
3658
4214
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: NavigationBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3659
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: NavigationBarComponent, isStandalone: true, selector: "navigation-bar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, sections: { classPropertyName: "sections", publicName: "sections", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, autoVariants: { classPropertyName: "autoVariants", publicName: "autoVariants", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, labelVisibility: { classPropertyName: "labelVisibility", publicName: "labelVisibility", isSignal: true, isRequired: false, transformFunction: null }, itemLayout: { classPropertyName: "itemLayout", publicName: "itemLayout", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, headline: { classPropertyName: "headline", publicName: "headline", isSignal: true, isRequired: false, transformFunction: null }, showMenuButton: { classPropertyName: "showMenuButton", publicName: "showMenuButton", isSignal: true, isRequired: false, transformFunction: null }, menuIcon: { classPropertyName: "menuIcon", publicName: "menuIcon", isSignal: true, isRequired: false, transformFunction: null }, menuAriaLabel: { classPropertyName: "menuAriaLabel", publicName: "menuAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, scrim: { classPropertyName: "scrim", publicName: "scrim", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, elevated: { classPropertyName: "elevated", publicName: "elevated", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, tooltips: { classPropertyName: "tooltips", publicName: "tooltips", isSignal: true, isRequired: false, transformFunction: null }, routerSync: { classPropertyName: "routerSync", publicName: "routerSync", isSignal: true, isRequired: false, transformFunction: null }, relativeTo: { classPropertyName: "relativeTo", publicName: "relativeTo", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedId: "selectedIdChange", open: "openChange", itemSelected: "itemSelected", menuClick: "menuClick" }, host: { properties: { "attr.data-variant": "resolvedVariant()", "attr.data-layout": "resolvedLayout()", "attr.data-align": "alignment()", "attr.data-position": "position()", "attr.data-labels": "resolvedLabelVisibility()", "attr.data-indicator": "indicatorMode()", "class.ars-navigation--open": "isOverlayOpen()", "class.ars-navigation--elevated": "elevated()", "class.ars-navigation--bordered": "bordered()", "class.ars-navigation--hidden": "isHidden()", "style.--ars-navigation-width": "widthStyle()" }, classAttribute: "ars-navigation" }, viewQueries: [{ propertyName: "itemElements", predicate: ["navItem"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isModal() && scrim()) {\n <div class=\"ars-nav__scrim\" aria-hidden=\"true\" (click)=\"onScrimClick()\"></div>\n}\n\n<nav class=\"ars-nav\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.role]=\"isModal() ? 'dialog' : undefined\"\n [attr.aria-modal]=\"isModal() ? 'true' : undefined\"\n [attr.inert]=\"isHidden() ? '' : undefined\"\n [cdkTrapFocus]=\"isOverlayOpen()\"\n [cdkTrapFocusAutoCapture]=\"isOverlayOpen()\"\n (keydown)=\"onKeydown($event)\">\n\n @let labels = resolvedLabelVisibility();\n @let expanded = isExpanded();\n @let active = activeId();\n\n @if (showsHeader()) {\n <div class=\"ars-nav__header\">\n @if (showMenuButton()) {\n <button type=\"button\"\n class=\"ars-nav__menu\"\n [attr.aria-label]=\"menuAriaLabel()\"\n (click)=\"onMenuClick()\">\n <mat-icon aria-hidden=\"true\">{{ menuIcon() }}</mat-icon>\n </button>\n }\n @if (expanded) {\n @if (headline(); as headlineText) {\n <h2 class=\"ars-nav__headline\">{{ headlineText }}</h2>\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__leading\"><ng-content select=\"[navHeader]\" /></div>\n <div class=\"ars-nav__fab\"><ng-content select=\"[navFab]\" /></div>\n\n <div class=\"ars-nav__items\">\n @for (group of renderSections(); track group.section.id) {\n\n @if (expanded && group.section.label) {\n <h3 class=\"ars-nav__section-headline\">{{ group.section.label }}</h3>\n }\n\n @for (r of group.items; track r.item.id) {\n @let selected = r.item.id === active;\n @let labelVisible = labels === 'labeled' || (labels === 'selected' && selected);\n @let svg = selected ? r.svgOn : r.svgOff;\n @let ligature = selected ? r.iconOn : r.iconOff;\n\n <!--\n The anchor and the button branches duplicate the inner markup on purpose:\n an `ng-template` + `ngTemplateOutlet` would allocate one extra embedded\n view per destination, which is measurable on large drawers.\n -->\n @if (r.href) {\n <a #navItem\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [attr.href]=\"r.item.disabled ? undefined : r.href\"\n [attr.target]=\"r.item.target\"\n [attr.rel]=\"r.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"selected ? 'page' : undefined\"\n [attr.aria-disabled]=\"r.item.disabled ? 'true' : undefined\"\n [attr.tabindex]=\"r.item.disabled ? -1 : 0\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled') {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (expanded && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #navItem\n type=\"button\"\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [disabled]=\"!!r.item.disabled\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"selected ? 'page' : undefined\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled') {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (expanded && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n </button>\n }\n }\n\n @if (expanded && group.section.divider && !$last) {\n <hr class=\"ars-nav__divider\" aria-hidden=\"true\" />\n }\n }\n </div>\n\n <div class=\"ars-nav__footer\"><ng-content select=\"[navFooter]\" /></div>\n</nav>\n", styles: [":host{--_container: var(--ars-navigation-container-color, var(--mat-sys-surface-container, #eff1ef));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));--_icon: var(--ars-navigation-icon-color, var(--mat-sys-on-surface-variant, #3f4947));--_icon-active: var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c));--_label: var(--ars-navigation-label-color, var(--mat-sys-on-surface-variant, #3f4947));--_label-active: var(--ars-navigation-active-label-color, var(--ars-color-secondary, #4a635f));--_headline: var(--ars-navigation-headline-color, var(--mat-sys-on-surface-variant, #3f4947));--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_badge: var(--ars-navigation-badge-color, var(--ars-color-error, #ff5449));--_badge-text: var(--ars-navigation-badge-text-color, #ffffff);--_divider: var(--ars-navigation-divider-color, var(--ars-color-divider, #757d87));--_scrim: var(--ars-navigation-scrim-color, rgba(0, 0, 0, .4));--_focus: var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_hover-opacity: .08;--_focus-opacity: .1;--_press-opacity: .1;--_rtl: 1;display:block;box-sizing:border-box;color:var(--_label);-webkit-tap-highlight-color:transparent}:host-context([dir=rtl]){--_rtl: -1}.ars-nav{box-sizing:border-box;display:flex;position:relative;background:var(--_container);color:var(--_label);overflow:hidden}.ars-nav__items{box-sizing:border-box;display:flex;min-height:0;min-width:0;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--_state) 25%,transparent) transparent}.ars-nav__header{box-sizing:border-box;display:flex;align-items:center;flex:none;gap:12px}.ars-nav__leading,.ars-nav__fab,.ars-nav__footer{box-sizing:border-box;flex:none}.ars-nav__leading:empty,.ars-nav__fab:empty,.ars-nav__footer:empty{display:none}.ars-nav__headline{margin:0;padding:0 16px;font-size:22px;line-height:28px;font-weight:400;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__section-headline{margin:0;padding:18px 16px 8px;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__divider{flex:none;margin:8px 16px;border:0;border-top:1px solid var(--_divider);opacity:.4}.ars-nav__menu{display:inline-flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--_icon);cursor:pointer;transition:background-color var(--_dur-short) var(--_easing)}.ars-nav__menu:hover{background:color-mix(in srgb,var(--_state) 8%,transparent)}.ars-nav__menu:focus-visible{outline:3px solid var(--_focus);outline-offset:2px}.ars-nav__item{box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;flex:none;margin:0;border:0;background:transparent;color:var(--_label);font:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;-webkit-tap-highlight-color:transparent}.ars-nav__item:focus-visible{outline:3px solid var(--_focus);outline-offset:-3px;border-radius:16px}.ars-nav__item--disabled,.ars-nav__item:disabled{cursor:default;opacity:.38;pointer-events:none}.ars-nav__icon-box{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;color:var(--_icon);transition:color var(--_dur) var(--_easing)}.ars-nav__icon{position:relative;z-index:1;width:24px;height:24px;font-size:24px;line-height:24px;font-variation-settings:\"FILL\" 0;transition:font-variation-settings var(--_dur) var(--_easing)}.ars-nav__label{position:relative;z-index:1;min-width:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_label);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color var(--_dur) var(--_easing),opacity var(--_dur) var(--_easing),max-height var(--_dur) var(--_easing),margin var(--_dur) var(--_easing)}.ars-nav__label--hidden{opacity:0;max-height:0;margin:0!important;pointer-events:none}.ars-nav__trailing{position:relative;z-index:1;margin-inline-start:auto;padding-inline-start:12px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;color:var(--_label);white-space:nowrap}.ars-nav__badge{position:absolute;z-index:2;top:-6px;inset-inline-start:12px;box-sizing:border-box;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--_badge);color:var(--_badge-text);font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-align:center;white-space:nowrap}.ars-nav__badge--dot{top:-1px;inset-inline-start:16px;width:6px;min-width:6px;height:6px;padding:0;border-radius:3px}:host([data-indicator=compact]) .ars-nav__icon-box:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__icon-box:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before{opacity:1;transform:scaleX(1)}:host([data-indicator=compact]) .ars-nav__item:hover .ars-nav__icon-box:after{opacity:var(--_hover-opacity)}:host([data-indicator=compact]) .ars-nav__item:focus-visible .ars-nav__icon-box:after{opacity:var(--_focus-opacity)}:host([data-indicator=compact]) .ars-nav__item:active .ars-nav__icon-box:after{opacity:var(--_press-opacity)}:host([data-indicator=wide]) .ars-nav__item:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item--selected:before{opacity:1;transform:scaleX(1)}:host([data-indicator=wide]) .ars-nav__item:hover:after{opacity:var(--_hover-opacity)}:host([data-indicator=wide]) .ars-nav__item:focus-visible:after{opacity:var(--_focus-opacity)}:host([data-indicator=wide]) .ars-nav__item:active:after{opacity:var(--_press-opacity)}.ars-nav__item--selected .ars-nav__icon-box{color:var(--_icon-active)}.ars-nav__item--selected .ars-nav__icon{font-variation-settings:\"FILL\" 1}.ars-nav__item--selected .ars-nav__label{color:var(--_label-active)}:host([data-layout=vertical]) .ars-nav__item{flex-direction:column;justify-content:center}:host([data-layout=vertical]) .ars-nav__label{margin-top:4px;max-width:100%;text-align:center}:host([data-layout=horizontal]) .ars-nav__item{flex-direction:row;justify-content:flex-start}:host([data-layout=horizontal]) .ars-nav__label{margin-inline-start:4px}:host([data-variant=bar]){width:100%}:host([data-variant=bar]) .ars-nav{flex-direction:row;align-items:center;width:100%;height:var(--ars-navigation-bar-height, 64px);padding:0 8px}:host([data-variant=bar]) .ars-nav__header,:host([data-variant=bar]) .ars-nav__leading,:host([data-variant=bar]) .ars-nav__fab,:host([data-variant=bar]) .ars-nav__footer,:host([data-variant=bar]) .ars-nav__section-headline,:host([data-variant=bar]) .ars-nav__divider,:host([data-variant=bar]) .ars-nav__trailing{display:none}:host([data-variant=bar]) .ars-nav__items{flex:1 1 auto;flex-direction:row;align-items:stretch;justify-content:space-around;width:100%;height:100%}:host([data-variant=bar]) .ars-nav__item{flex:1 1 0;min-width:0;height:100%}:host([data-variant=bar][data-layout=horizontal]) .ars-nav__item{justify-content:center;max-width:var(--ars-navigation-item-max-width, 168px);padding:0 12px}:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:before,:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:after{inset:12px 0}:host([data-variant=rail]){height:100%}:host([data-variant=rail]) .ars-nav{flex-direction:column;align-items:center;width:var(--ars-navigation-width, 96px);height:100%;padding:var(--ars-navigation-rail-top-padding, 44px) 0 4px}:host([data-variant=rail]) .ars-nav__header{flex-direction:column;margin-bottom:40px}:host([data-variant=rail]) .ars-nav__headline,:host([data-variant=rail]) .ars-nav__section-headline,:host([data-variant=rail]) .ars-nav__divider,:host([data-variant=rail]) .ars-nav__trailing{display:none}:host([data-variant=rail]) .ars-nav__fab{margin-bottom:40px}:host([data-variant=rail]) .ars-nav__items{flex:1 1 auto;flex-direction:column;align-items:center;gap:4px;width:100%;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail]) .ars-nav__item{justify-content:center;width:100%;height:64px;padding:0 4px}:host([data-variant=rail-expanded]),:host([data-variant=drawer]),:host([data-variant=modal]){height:100%}:host([data-variant=rail-expanded]) .ars-nav,:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{flex-direction:column;align-items:stretch;height:100%;padding:12px 0}:host([data-variant=rail-expanded]) .ars-nav__header,:host([data-variant=drawer]) .ars-nav__header,:host([data-variant=modal]) .ars-nav__header{padding:4px 8px 8px}:host([data-variant=rail-expanded]) .ars-nav__items,:host([data-variant=drawer]) .ars-nav__items,:host([data-variant=modal]) .ars-nav__items{flex:1 1 auto;flex-direction:column;gap:4px;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail-expanded]) .ars-nav__item,:host([data-variant=drawer]) .ars-nav__item,:host([data-variant=modal]) .ars-nav__item{height:56px;padding:0 24px;margin:0 var(--ars-navigation-item-inset, 20px)}:host([data-variant=rail-expanded]) .ars-nav__icon-box,:host([data-variant=drawer]) .ars-nav__icon-box,:host([data-variant=modal]) .ars-nav__icon-box{margin-inline-end:12px}:host([data-variant=rail-expanded]) .ars-nav__label,:host([data-variant=drawer]) .ars-nav__label,:host([data-variant=modal]) .ars-nav__label{flex:1 1 auto;margin-inline-start:0}:host([data-variant=rail-expanded]) .ars-nav{width:var(--ars-navigation-width, 220px)}:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{width:var(--ars-navigation-width, 360px)}:host([data-variant=modal]){position:fixed;inset:0;z-index:var(--ars-navigation-z-index, 1000);height:auto;pointer-events:none}:host([data-variant=modal]) .ars-nav{position:absolute;inset-block:0;inset-inline-start:0;pointer-events:auto;border-start-end-radius:16px;border-end-end-radius:16px;translate:calc(var(--_shift, 0%) * var(--_rtl)) 0;transition:translate var(--_dur-long) var(--_easing),visibility var(--_dur-long) var(--_easing)}:host([data-variant=modal][data-position=end]) .ars-nav{inset-inline-start:auto;inset-inline-end:0;border-radius:0;border-start-start-radius:16px;border-end-start-radius:16px}:host([data-variant=modal].ars-navigation--hidden) .ars-nav__scrim{opacity:0;pointer-events:none}:host([data-variant=modal].ars-navigation--hidden) .ars-nav{--_shift: -100%;visibility:hidden}:host([data-variant=modal][data-position=end].ars-navigation--hidden) .ars-nav{--_shift: 100%}.ars-nav__scrim{position:absolute;inset:0;background:var(--_scrim);opacity:1;pointer-events:auto;transition:opacity var(--_dur-long) var(--_easing)}:host([data-align=center]) .ars-nav__items{justify-content:safe center}:host([data-align=bottom]) .ars-nav__items{justify-content:safe flex-end}:host(.ars-navigation--elevated) .ars-nav{box-shadow:0 1px 3px #0000004d,0 4px 8px 3px #00000026}:host([data-variant=bar].ars-navigation--bordered) .ars-nav{border-top:1px solid var(--_divider)}:host([data-variant=rail].ars-navigation--bordered) .ars-nav,:host([data-variant=rail-expanded].ars-navigation--bordered) .ars-nav,:host([data-variant=drawer].ars-navigation--bordered) .ars-nav{border-inline-end:1px solid var(--_divider)}:host([data-variant=rail][data-position=end].ars-navigation--bordered) .ars-nav,:host([data-variant=rail-expanded][data-position=end].ars-navigation--bordered) .ars-nav,:host([data-variant=drawer][data-position=end].ars-navigation--bordered) .ars-nav{border-inline-end:0;border-inline-start:1px solid var(--_divider)}:host(.ars-navigation--hidden):not([data-variant=modal]){display:none}@media(prefers-reduced-motion:reduce){:host{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms}:host([data-indicator=wide]) .ars-nav__item:before,:host([data-indicator=compact]) .ars-nav__icon-box:before{transform:none}}@media(forced-colors:active){:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before,:host([data-indicator=wide]) .ars-nav__item--selected:before{background:Highlight;forced-color-adjust:none}.ars-nav__item:focus-visible{outline:3px solid CanvasText}}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4215
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: NavigationBarComponent, isStandalone: true, selector: "navigation-bar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, sections: { classPropertyName: "sections", publicName: "sections", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, autoVariants: { classPropertyName: "autoVariants", publicName: "autoVariants", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, labelVisibility: { classPropertyName: "labelVisibility", publicName: "labelVisibility", isSignal: true, isRequired: false, transformFunction: null }, itemLayout: { classPropertyName: "itemLayout", publicName: "itemLayout", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, headline: { classPropertyName: "headline", publicName: "headline", isSignal: true, isRequired: false, transformFunction: null }, showMenuButton: { classPropertyName: "showMenuButton", publicName: "showMenuButton", isSignal: true, isRequired: false, transformFunction: null }, menuIcon: { classPropertyName: "menuIcon", publicName: "menuIcon", isSignal: true, isRequired: false, transformFunction: null }, expandIcon: { classPropertyName: "expandIcon", publicName: "expandIcon", isSignal: true, isRequired: false, transformFunction: null }, overflowMode: { classPropertyName: "overflowMode", publicName: "overflowMode", isSignal: true, isRequired: false, transformFunction: null }, overflowIcon: { classPropertyName: "overflowIcon", publicName: "overflowIcon", isSignal: true, isRequired: false, transformFunction: null }, overflowLabel: { classPropertyName: "overflowLabel", publicName: "overflowLabel", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleItems: { classPropertyName: "maxVisibleItems", publicName: "maxVisibleItems", isSignal: true, isRequired: false, transformFunction: null }, menuAriaLabel: { classPropertyName: "menuAriaLabel", publicName: "menuAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, scrim: { classPropertyName: "scrim", publicName: "scrim", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, elevated: { classPropertyName: "elevated", publicName: "elevated", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, tooltips: { classPropertyName: "tooltips", publicName: "tooltips", isSignal: true, isRequired: false, transformFunction: null }, routerSync: { classPropertyName: "routerSync", publicName: "routerSync", isSignal: true, isRequired: false, transformFunction: null }, relativeTo: { classPropertyName: "relativeTo", publicName: "relativeTo", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedId: "selectedIdChange", expandedIds: "expandedIdsChange", open: "openChange", itemSelected: "itemSelected", menuClick: "menuClick" }, host: { properties: { "attr.data-variant": "resolvedVariant()", "attr.data-layout": "resolvedLayout()", "attr.data-align": "alignment()", "attr.data-position": "position()", "attr.data-labels": "resolvedLabelVisibility()", "attr.data-indicator": "indicatorMode()", "class.ars-navigation--open": "isOverlayOpen()", "class.ars-navigation--elevated": "elevated()", "class.ars-navigation--bordered": "bordered()", "class.ars-navigation--hidden": "isHidden()", "style.--ars-navigation-width": "widthStyle()" }, classAttribute: "ars-navigation" }, viewQueries: [{ propertyName: "itemElements", predicate: ["navItem"], descendants: true, isSignal: true }, { propertyName: "panelElements", predicate: ["panelItem"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isModal() && scrim()) {\n <div class=\"ars-nav__scrim\" aria-hidden=\"true\" (click)=\"onScrimClick()\"></div>\n}\n\n<nav class=\"ars-nav\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.role]=\"isModal() ? 'dialog' : undefined\"\n [attr.aria-modal]=\"isModal() ? 'true' : undefined\"\n [attr.inert]=\"isHidden() ? '' : undefined\"\n [cdkTrapFocus]=\"isOverlayOpen()\"\n [cdkTrapFocusAutoCapture]=\"isOverlayOpen()\"\n (keydown)=\"onKeydown($event)\">\n\n @let labels = resolvedLabelVisibility();\n @let wide = isExpanded();\n @let active = activeId();\n @let highlighted = highlightedIds();\n @let openIds = expandedSet();\n @let popupOpenId = popupItem()?.item.id;\n\n @if (showsHeader()) {\n <div class=\"ars-nav__header\">\n @if (showMenuButton()) {\n <button type=\"button\"\n class=\"ars-nav__menu\"\n [attr.aria-label]=\"menuAriaLabel()\"\n (click)=\"onMenuClick()\">\n <mat-icon aria-hidden=\"true\">{{ menuIcon() }}</mat-icon>\n </button>\n }\n @if (wide) {\n @if (headline(); as headlineText) {\n <h2 class=\"ars-nav__headline\">{{ headlineText }}</h2>\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__leading\"><ng-content select=\"[navHeader]\" /></div>\n <div class=\"ars-nav__fab\"><ng-content select=\"[navFab]\" /></div>\n\n @for (group of visibleGroups(); track group.align) {\n <div class=\"ars-nav__items\" [class.ars-nav__items--bottom]=\"group.align === 'bottom'\">\n @for (block of group.sections; track block.section.id) {\n\n @if (wide && block.section.label) {\n <h3 class=\"ars-nav__section-headline\">{{ block.section.label }}</h3>\n }\n\n @for (r of block.items; track r.item.id) {\n @let current = r.item.id === active;\n @let selected = highlighted.has(r.item.id);\n @let labelVisible = !r.iconOnly && (labels === 'labeled' || (labels === 'selected' && selected));\n @let branchOpen = r.hasChildren && openIds.has(r.item.id);\n @let svg = selected ? r.svgOn : r.svgOff;\n @let image = selected ? r.imageOn : r.imageOff;\n @let ligature = selected ? r.iconOn : r.iconOff;\n\n <!--\n The anchor and the button branches duplicate the inner markup on purpose:\n an `ng-template` + `ngTemplateOutlet` would allocate one extra embedded\n view per destination and lose the typed template context.\n -->\n @if (r.href && !r.hasChildren) {\n <a #navItem\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [attr.data-depth]=\"r.depth\"\n [attr.href]=\"r.item.disabled ? undefined : r.href\"\n [attr.target]=\"r.item.target\"\n [attr.rel]=\"r.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"current ? 'page' : undefined\"\n [attr.aria-disabled]=\"r.item.disabled ? 'true' : undefined\"\n [attr.tabindex]=\"r.item.disabled ? -1 : 0\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (r.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (image; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled' && !r.iconOnly) {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (wide && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #navItem\n type=\"button\"\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [class.ars-nav__item--parent]=\"r.hasChildren\"\n [class.ars-nav__item--icon-only]=\"r.iconOnly\"\n [attr.data-depth]=\"r.depth\"\n [disabled]=\"!!r.item.disabled\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"current ? 'page' : undefined\"\n [attr.aria-expanded]=\"r.hasChildren ? (wide ? branchOpen : popupOpenId === r.item.id) : undefined\"\n [attr.aria-haspopup]=\"r.hasChildren && !wide ? 'menu' : undefined\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (r.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (image; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled' && !r.iconOnly) {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (wide && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n @if (r.hasChildren && wide) {\n <mat-icon class=\"ars-nav__chevron\"\n [class.ars-nav__chevron--open]=\"branchOpen\"\n aria-hidden=\"true\">{{ expandIcon() }}</mat-icon>\n }\n </button>\n }\n }\n\n @if (wide && block.section.divider && !$last) {\n <hr class=\"ars-nav__divider\" aria-hidden=\"true\" />\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__footer\"><ng-content select=\"[navFooter]\" /></div>\n</nav>\n\n<!--\n One overlay for the whole component: the overflow entry and every parent\n destination of the compact variants reuse it, instead of allocating a menu\n instance per destination.\n-->\n<ng-template cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"popupOrigin()\"\n [cdkConnectedOverlayOpen]=\"isPopupOpen()\"\n [cdkConnectedOverlayPositions]=\"popupPositions()\"\n [cdkConnectedOverlayPush]=\"true\"\n (overlayOutsideClick)=\"closePopup()\"\n (detach)=\"closePopup()\">\n <div class=\"ars-nav-submenu\"\n role=\"menu\"\n [attr.aria-label]=\"popupItem()?.ariaLabel\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onKeydown($event)\">\n @for (entry of popupEntries(); track entry.key) {\n @if (entry.render; as c) {\n @let childSelected = c.item.id === activeId();\n @let childSvg = childSelected ? c.svgOn : c.svgOff;\n @let childImage = childSelected ? c.imageOn : c.imageOff;\n @let childLigature = childSelected ? c.iconOn : c.iconOff;\n @if (c.href) {\n <a #panelItem\n class=\"ars-nav-submenu__item\"\n role=\"menuitem\"\n [class.ars-nav-submenu__item--selected]=\"childSelected\"\n [attr.href]=\"c.item.disabled ? undefined : c.href\"\n [attr.target]=\"c.item.target\"\n [attr.rel]=\"c.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-disabled]=\"c.item.disabled ? 'true' : undefined\"\n [attr.aria-current]=\"childSelected ? 'page' : undefined\"\n (click)=\"select(c, $event)\">\n @if (childSvg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (c.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (childImage; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (childLigature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n <span class=\"ars-nav-submenu__label\">{{ c.item.label }}</span>\n @if (c.badgeText) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.badgeText }}</span>\n } @else if (c.item.trailing) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #panelItem\n type=\"button\"\n class=\"ars-nav-submenu__item\"\n role=\"menuitem\"\n [class.ars-nav-submenu__item--selected]=\"childSelected\"\n [disabled]=\"!!c.item.disabled\"\n [attr.aria-current]=\"childSelected ? 'page' : undefined\"\n (click)=\"select(c, $event)\">\n @if (childSvg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (c.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (childImage; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (childLigature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n <span class=\"ars-nav-submenu__label\">{{ c.item.label }}</span>\n @if (c.badgeText) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.badgeText }}</span>\n } @else if (c.item.trailing) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.item.trailing }}</span>\n }\n </button>\n }\n } @else {\n <div class=\"ars-nav-submenu__heading\" role=\"presentation\">{{ entry.label }}</div>\n }\n }\n </div>\n</ng-template>\n", styles: [":host{--_container: var(--ars-navigation-container-color, var(--mat-sys-surface-container, #eff1ef));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));--_icon: var(--ars-navigation-icon-color, var(--mat-sys-on-surface-variant, #3f4947));--_icon-active: var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c));--_label: var(--ars-navigation-label-color, var(--mat-sys-on-surface-variant, #3f4947));--_label-active: var(--ars-navigation-active-label-color, var(--ars-color-secondary, #4a635f));--_headline: var(--ars-navigation-headline-color, var(--mat-sys-on-surface-variant, #3f4947));--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_badge: var(--ars-navigation-badge-color, var(--ars-color-error, #ff5449));--_badge-text: var(--ars-navigation-badge-text-color, #ffffff);--_divider: var(--ars-navigation-divider-color, var(--ars-color-divider, #757d87));--_scrim: var(--ars-navigation-scrim-color, rgba(0, 0, 0, .4));--_focus: var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_icon-hover-scale: var(--ars-navigation-icon-hover-scale, 1.12);--_icon-press-scale: var(--ars-navigation-icon-press-scale, .92);--_hover-opacity: .08;--_focus-opacity: .1;--_press-opacity: .1;--_rtl: 1;display:block;box-sizing:border-box;color:var(--_label);-webkit-tap-highlight-color:transparent}:host-context([dir=rtl]){--_rtl: -1}.ars-nav{box-sizing:border-box;display:flex;position:relative;background:var(--_container);color:var(--_label);overflow:hidden}.ars-nav__items{box-sizing:border-box;display:flex;min-height:0;min-width:0;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--_state) 25%,transparent) transparent}.ars-nav__header{box-sizing:border-box;display:flex;align-items:center;flex:none;gap:12px}.ars-nav__leading,.ars-nav__fab,.ars-nav__footer{box-sizing:border-box;flex:none}.ars-nav__leading:empty,.ars-nav__fab:empty,.ars-nav__footer:empty{display:none}.ars-nav__headline{margin:0;padding:0 16px;font-size:22px;line-height:28px;font-weight:400;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__section-headline{margin:0;padding:18px 16px 8px;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__divider{flex:none;margin:8px 16px;border:0;border-top:1px solid var(--_divider);opacity:.4}.ars-nav__menu{display:inline-flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--_icon);cursor:pointer;transition:background-color var(--_dur-short) var(--_easing)}.ars-nav__menu:hover{background:color-mix(in srgb,var(--_state) 8%,transparent)}.ars-nav__menu:focus-visible{outline:3px solid var(--_focus);outline-offset:2px}.ars-nav__item{box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;flex:none;margin:0;border:0;background:transparent;color:var(--_label);font:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;-webkit-tap-highlight-color:transparent}.ars-nav__item:focus-visible{outline:3px solid var(--_focus);outline-offset:-3px;border-radius:16px}.ars-nav__item--disabled,.ars-nav__item:disabled{cursor:default;opacity:.38;pointer-events:none}.ars-nav__icon-box{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;color:var(--_icon);transition:color var(--_dur) var(--_easing)}.ars-nav__icon{position:relative;z-index:1;width:24px;height:24px;font-size:24px;line-height:24px;font-variation-settings:\"FILL\" 0;transform:scale(1);transform-origin:center;transition:font-variation-settings var(--_dur, .25s) var(--_easing, cubic-bezier(.2, 0, 0, 1)),transform var(--_dur, .25s) var(--_easing, cubic-bezier(.2, 0, 0, 1))}.ars-nav__label{position:relative;z-index:1;min-width:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_label);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color var(--_dur) var(--_easing),opacity var(--_dur) var(--_easing),max-height var(--_dur) var(--_easing),margin var(--_dur) var(--_easing)}.ars-nav__label--hidden{opacity:0;max-height:0;margin:0!important;pointer-events:none}.ars-nav__trailing{position:relative;z-index:1;margin-inline-start:auto;padding-inline-start:12px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;color:var(--_label);white-space:nowrap}.ars-nav__badge{position:absolute;z-index:2;top:-6px;inset-inline-start:12px;box-sizing:border-box;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--_badge);color:var(--_badge-text);font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-align:center;white-space:nowrap}.ars-nav__badge--dot{top:-1px;inset-inline-start:16px;width:6px;min-width:6px;height:6px;padding:0;border-radius:3px}:host([data-indicator=compact]) .ars-nav__icon-box:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__icon-box:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before{opacity:1;transform:scaleX(1)}:host([data-indicator=compact]) .ars-nav__item:hover .ars-nav__icon-box:after{opacity:var(--_hover-opacity)}:host([data-indicator=compact]) .ars-nav__item:focus-visible .ars-nav__icon-box:after{opacity:var(--_focus-opacity)}:host([data-indicator=compact]) .ars-nav__item:active .ars-nav__icon-box:after{opacity:var(--_press-opacity)}:host([data-indicator=wide]) .ars-nav__item:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item--selected:before{opacity:1;transform:scaleX(1)}:host([data-indicator=wide]) .ars-nav__item:hover:after{opacity:var(--_hover-opacity)}:host([data-indicator=wide]) .ars-nav__item:focus-visible:after{opacity:var(--_focus-opacity)}:host([data-indicator=wide]) .ars-nav__item:active:after{opacity:var(--_press-opacity)}.ars-nav__item--selected .ars-nav__icon-box{color:var(--_icon-active)}.ars-nav__item--selected .ars-nav__icon{font-variation-settings:\"FILL\" 1}.ars-nav__item--selected .ars-nav__label{color:var(--_label-active)}:host([data-layout=vertical]) .ars-nav__item{flex-direction:column;justify-content:center}:host([data-layout=vertical]) .ars-nav__label{margin-top:4px;max-width:100%;text-align:center}:host([data-layout=horizontal]) .ars-nav__item{flex-direction:row;justify-content:flex-start}:host([data-layout=horizontal]) .ars-nav__label{margin-inline-start:4px}:host([data-variant=bar]){width:100%}:host([data-variant=bar]) .ars-nav{flex-direction:row;align-items:center;justify-content:space-around;width:100%;height:var(--ars-navigation-bar-height, 64px);padding:0 8px}:host([data-variant=bar]) .ars-nav__header,:host([data-variant=bar]) .ars-nav__leading,:host([data-variant=bar]) .ars-nav__fab,:host([data-variant=bar]) .ars-nav__footer,:host([data-variant=bar]) .ars-nav__section-headline,:host([data-variant=bar]) .ars-nav__divider,:host([data-variant=bar]) .ars-nav__trailing{display:none}:host([data-variant=bar]) .ars-nav__items{display:contents}:host([data-variant=bar]) .ars-nav__item{flex:1 1 0;min-width:0;height:100%}:host([data-variant=bar][data-layout=horizontal]) .ars-nav__item{justify-content:center;max-width:var(--ars-navigation-item-max-width, 168px);padding:0 12px}:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:before,:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:after{inset:12px 0}:host([data-variant=rail]){height:100%}:host([data-variant=rail]) .ars-nav{flex-direction:column;align-items:center;width:var(--ars-navigation-width, 96px);height:100%;padding:var(--ars-navigation-rail-top-padding, 20px) 0 8px}:host([data-variant=rail]) .ars-nav__header{flex-direction:column;margin-bottom:40px}:host([data-variant=rail]) .ars-nav__headline,:host([data-variant=rail]) .ars-nav__section-headline,:host([data-variant=rail]) .ars-nav__divider,:host([data-variant=rail]) .ars-nav__trailing{display:none}:host([data-variant=rail]) .ars-nav__fab{margin-bottom:40px}:host([data-variant=rail]) .ars-nav__items{flex:1 1 auto;flex-direction:column;align-items:center;gap:4px;width:100%;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail]) .ars-nav__item{justify-content:center;width:100%;height:64px;padding:0 4px}:host([data-variant=rail-expanded]),:host([data-variant=drawer]),:host([data-variant=modal]){height:100%}:host([data-variant=rail-expanded]) .ars-nav,:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{flex-direction:column;align-items:stretch;height:100%;padding:12px 0}:host([data-variant=rail-expanded]) .ars-nav__header,:host([data-variant=drawer]) .ars-nav__header,:host([data-variant=modal]) .ars-nav__header{padding:4px 8px 8px}:host([data-variant=rail-expanded]) .ars-nav__items,:host([data-variant=drawer]) .ars-nav__items,:host([data-variant=modal]) .ars-nav__items{flex:1 1 auto;flex-direction:column;gap:4px;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail-expanded]) .ars-nav__item,:host([data-variant=drawer]) .ars-nav__item,:host([data-variant=modal]) .ars-nav__item{height:56px;padding-block:0;padding-inline:calc(24px + var(--_depth-pad, 0px)) 24px;margin:0 var(--ars-navigation-item-inset, 20px)}:host([data-variant=rail-expanded]) .ars-nav__icon-box,:host([data-variant=drawer]) .ars-nav__icon-box,:host([data-variant=modal]) .ars-nav__icon-box{margin-inline-end:12px}:host([data-variant=rail-expanded]) .ars-nav__label,:host([data-variant=drawer]) .ars-nav__label,:host([data-variant=modal]) .ars-nav__label{flex:1 1 auto;margin-inline-start:0}:host([data-variant=rail-expanded]) .ars-nav{width:var(--ars-navigation-width, 220px)}:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{width:var(--ars-navigation-width, 360px)}:host([data-variant=modal]){position:fixed;inset:0;z-index:var(--ars-navigation-z-index, 1000);height:auto;pointer-events:none}:host([data-variant=modal]) .ars-nav{position:absolute;inset-block:0;inset-inline-start:0;pointer-events:auto;border-start-end-radius:16px;border-end-end-radius:16px;translate:calc(var(--_shift, 0%) * var(--_rtl)) 0;transition:translate var(--_dur-long) var(--_easing),visibility var(--_dur-long) var(--_easing)}:host([data-variant=modal][data-position=end]) .ars-nav{inset-inline-start:auto;inset-inline-end:0;border-radius:0;border-start-start-radius:16px;border-end-start-radius:16px}:host([data-variant=modal].ars-navigation--hidden) .ars-nav__scrim{opacity:0;pointer-events:none}:host([data-variant=modal].ars-navigation--hidden) .ars-nav{--_shift: -100%;visibility:hidden}:host([data-variant=modal][data-position=end].ars-navigation--hidden) .ars-nav{--_shift: 100%}.ars-nav__scrim{position:absolute;inset:0;background:var(--_scrim);opacity:1;pointer-events:auto;transition:opacity var(--_dur-long) var(--_easing)}:host(:not([data-variant=bar])) .ars-nav__items--bottom{flex:0 0 auto;margin-block-start:auto;overflow:visible}:host([data-align=center]) .ars-nav__items:not(.ars-nav__items--bottom){justify-content:safe center}:host([data-align=bottom]) .ars-nav__items:not(.ars-nav__items--bottom){justify-content:safe flex-end}:host(.ars-navigation--elevated) .ars-nav{box-shadow:0 1px 3px #0000004d,0 4px 8px 3px #00000026}:host(.ars-navigation--hidden):not([data-variant=modal]){display:none}.ars-nav__icon--image{object-fit:contain}.ars-nav__icon--sprite{display:inline-block;flex:none;width:var(--sp-size, 24px);height:var(--sp-size, 24px);background-image:var(--sp-url);background-repeat:no-repeat;background-size:var(--sp-sheet-x, auto) var(--sp-sheet-y, auto);background-position:calc(var(--sp-frame, var(--sp-normal, 0)) * var(--sp-step-x, 0px)) calc(var(--sp-frame, var(--sp-normal, 0)) * var(--sp-step-y, 0px))}.ars-nav__item:where(:hover,:focus-visible) .ars-nav__icon--sprite,.ars-nav-submenu__item:where(:hover,:focus-visible) .ars-nav__icon--sprite{--sp-frame: var(--sp-hover)}.ars-nav__item--selected .ars-nav__icon--sprite,.ars-nav-submenu__item--selected .ars-nav__icon--sprite{--sp-frame: var(--sp-active)}.ars-nav__item--disabled .ars-nav__icon--sprite,.ars-nav__item:where(:disabled) .ars-nav__icon--sprite,.ars-nav-submenu__item:where(:disabled,[aria-disabled=true]) .ars-nav__icon--sprite{--sp-frame: var(--sp-disabled)}.ars-nav__item:where(:hover,:focus-visible) .ars-nav__icon,.ars-nav-submenu__item:where(:hover,:focus-visible) .ars-nav__icon{transform:scale(var(--_icon-hover-scale, 1.12))}.ars-nav__item--selected .ars-nav__icon,.ars-nav-submenu__item--selected .ars-nav__icon{transform:scale(1)}.ars-nav__item:where(:active) .ars-nav__icon,.ars-nav-submenu__item:where(:active) .ars-nav__icon{transform:scale(var(--_icon-press-scale, .92));transition-duration:var(--_dur-short, .15s)}:host([data-variant=bar]) .ars-nav__item--icon-only{flex:0 0 auto;min-width:56px;max-width:72px}.ars-nav__chevron{position:relative;z-index:1;flex:none;margin-inline-start:8px;width:20px;height:20px;font-size:20px;line-height:20px;color:var(--_icon);rotate:0deg;transition:rotate var(--_dur) var(--_easing)}.ars-nav__chevron--open{rotate:180deg}.ars-nav__item[data-depth=\"1\"]{--_depth-pad: 24px}.ars-nav__item[data-depth=\"2\"]{--_depth-pad: 48px}.ars-nav__item[data-depth=\"3\"]{--_depth-pad: 72px}.ars-nav-submenu{--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_icon-hover-scale: var(--ars-navigation-icon-hover-scale, 1.12);--_icon-press-scale: var(--ars-navigation-icon-press-scale, .92);--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));box-sizing:border-box;display:flex;flex-direction:column;gap:2px;min-width:200px;max-width:320px;max-height:60vh;padding:8px;border-radius:12px;background:var(--ars-navigation-menu-container-color, var(--mat-sys-surface-container-high, #e7e9e8));color:var(--ars-navigation-label-color, var(--mat-sys-on-surface, #191c1b));box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026;overflow-y:auto;overscroll-behavior:contain}.ars-nav-submenu__item{box-sizing:border-box;display:flex;align-items:center;gap:12px;flex:none;min-height:48px;margin:0;padding:0 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:start;text-decoration:none;cursor:pointer;appearance:none}.ars-nav-submenu__item:hover{background:color-mix(in srgb,currentColor 8%,transparent)}.ars-nav-submenu__item:focus-visible{outline:3px solid var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));outline-offset:-3px}.ars-nav-submenu__item--selected{background:var(--_indicator);color:var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c))}.ars-nav-submenu__item--selected:where(:hover,:focus-visible){background:color-mix(in srgb,var(--_state) 8%,var(--_indicator))}.ars-nav-submenu__item:disabled,.ars-nav-submenu__item[aria-disabled=true]{opacity:.38;pointer-events:none}.ars-nav-submenu__heading{padding:12px 12px 4px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-transform:uppercase;opacity:.7}.ars-nav-submenu__heading:first-child{padding-top:4px}.ars-nav-submenu__label{flex:1 1 auto;min-width:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav-submenu__trailing{flex:none;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;opacity:.8}@media(prefers-reduced-motion:reduce){:host{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms;--_icon-hover-scale: 1;--_icon-press-scale: 1}:host([data-indicator=wide]) .ars-nav__item:before,:host([data-indicator=compact]) .ars-nav__icon-box:before{transform:none}.ars-nav-submenu{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms;--_icon-hover-scale: 1;--_icon-press-scale: 1}}@media(forced-colors:active){:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before,:host([data-indicator=wide]) .ars-nav__item--selected:before{background:Highlight;forced-color-adjust:none}.ars-nav__item:focus-visible{outline:3px solid CanvasText}}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3660
4216
|
}
|
|
3661
4217
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: NavigationBarComponent, decorators: [{
|
|
3662
4218
|
type: Component,
|
|
3663
|
-
args: [{ selector: 'navigation-bar', standalone: true, imports: [MatIconModule, MatTooltipModule, CdkTrapFocus], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4219
|
+
args: [{ selector: 'navigation-bar', standalone: true, imports: [MatIconModule, MatTooltipModule, CdkTrapFocus, CdkConnectedOverlay], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3664
4220
|
'class': 'ars-navigation',
|
|
3665
4221
|
'[attr.data-variant]': 'resolvedVariant()',
|
|
3666
4222
|
'[attr.data-layout]': 'resolvedLayout()',
|
|
@@ -3673,8 +4229,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
3673
4229
|
'[class.ars-navigation--bordered]': 'bordered()',
|
|
3674
4230
|
'[class.ars-navigation--hidden]': 'isHidden()',
|
|
3675
4231
|
'[style.--ars-navigation-width]': 'widthStyle()',
|
|
3676
|
-
}, template: "@if (isModal() && scrim()) {\n <div class=\"ars-nav__scrim\" aria-hidden=\"true\" (click)=\"onScrimClick()\"></div>\n}\n\n<nav class=\"ars-nav\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.role]=\"isModal() ? 'dialog' : undefined\"\n [attr.aria-modal]=\"isModal() ? 'true' : undefined\"\n [attr.inert]=\"isHidden() ? '' : undefined\"\n [cdkTrapFocus]=\"isOverlayOpen()\"\n [cdkTrapFocusAutoCapture]=\"isOverlayOpen()\"\n (keydown)=\"onKeydown($event)\">\n\n @let labels = resolvedLabelVisibility();\n @let expanded = isExpanded();\n @let active = activeId();\n\n @if (showsHeader()) {\n <div class=\"ars-nav__header\">\n @if (showMenuButton()) {\n <button type=\"button\"\n class=\"ars-nav__menu\"\n [attr.aria-label]=\"menuAriaLabel()\"\n (click)=\"onMenuClick()\">\n <mat-icon aria-hidden=\"true\">{{ menuIcon() }}</mat-icon>\n </button>\n }\n @if (expanded) {\n @if (headline(); as headlineText) {\n <h2 class=\"ars-nav__headline\">{{ headlineText }}</h2>\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__leading\"><ng-content select=\"[navHeader]\" /></div>\n <div class=\"ars-nav__fab\"><ng-content select=\"[navFab]\" /></div>\n\n <div class=\"ars-nav__items\">\n @for (group of renderSections(); track group.section.id) {\n\n @if (expanded && group.section.label) {\n <h3 class=\"ars-nav__section-headline\">{{ group.section.label }}</h3>\n }\n\n @for (r of group.items; track r.item.id) {\n @let selected = r.item.id === active;\n @let labelVisible = labels === 'labeled' || (labels === 'selected' && selected);\n @let svg = selected ? r.svgOn : r.svgOff;\n @let ligature = selected ? r.iconOn : r.iconOff;\n\n <!--\n The anchor and the button branches duplicate the inner markup on purpose:\n an `ng-template` + `ngTemplateOutlet` would allocate one extra embedded\n view per destination, which is measurable on large drawers.\n -->\n @if (r.href) {\n <a #navItem\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [attr.href]=\"r.item.disabled ? undefined : r.href\"\n [attr.target]=\"r.item.target\"\n [attr.rel]=\"r.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"selected ? 'page' : undefined\"\n [attr.aria-disabled]=\"r.item.disabled ? 'true' : undefined\"\n [attr.tabindex]=\"r.item.disabled ? -1 : 0\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled') {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (expanded && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #navItem\n type=\"button\"\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [disabled]=\"!!r.item.disabled\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"selected ? 'page' : undefined\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled') {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (expanded && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n </button>\n }\n }\n\n @if (expanded && group.section.divider && !$last) {\n <hr class=\"ars-nav__divider\" aria-hidden=\"true\" />\n }\n }\n </div>\n\n <div class=\"ars-nav__footer\"><ng-content select=\"[navFooter]\" /></div>\n</nav>\n", styles: [":host{--_container: var(--ars-navigation-container-color, var(--mat-sys-surface-container, #eff1ef));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));--_icon: var(--ars-navigation-icon-color, var(--mat-sys-on-surface-variant, #3f4947));--_icon-active: var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c));--_label: var(--ars-navigation-label-color, var(--mat-sys-on-surface-variant, #3f4947));--_label-active: var(--ars-navigation-active-label-color, var(--ars-color-secondary, #4a635f));--_headline: var(--ars-navigation-headline-color, var(--mat-sys-on-surface-variant, #3f4947));--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_badge: var(--ars-navigation-badge-color, var(--ars-color-error, #ff5449));--_badge-text: var(--ars-navigation-badge-text-color, #ffffff);--_divider: var(--ars-navigation-divider-color, var(--ars-color-divider, #757d87));--_scrim: var(--ars-navigation-scrim-color, rgba(0, 0, 0, .4));--_focus: var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_hover-opacity: .08;--_focus-opacity: .1;--_press-opacity: .1;--_rtl: 1;display:block;box-sizing:border-box;color:var(--_label);-webkit-tap-highlight-color:transparent}:host-context([dir=rtl]){--_rtl: -1}.ars-nav{box-sizing:border-box;display:flex;position:relative;background:var(--_container);color:var(--_label);overflow:hidden}.ars-nav__items{box-sizing:border-box;display:flex;min-height:0;min-width:0;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--_state) 25%,transparent) transparent}.ars-nav__header{box-sizing:border-box;display:flex;align-items:center;flex:none;gap:12px}.ars-nav__leading,.ars-nav__fab,.ars-nav__footer{box-sizing:border-box;flex:none}.ars-nav__leading:empty,.ars-nav__fab:empty,.ars-nav__footer:empty{display:none}.ars-nav__headline{margin:0;padding:0 16px;font-size:22px;line-height:28px;font-weight:400;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__section-headline{margin:0;padding:18px 16px 8px;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__divider{flex:none;margin:8px 16px;border:0;border-top:1px solid var(--_divider);opacity:.4}.ars-nav__menu{display:inline-flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--_icon);cursor:pointer;transition:background-color var(--_dur-short) var(--_easing)}.ars-nav__menu:hover{background:color-mix(in srgb,var(--_state) 8%,transparent)}.ars-nav__menu:focus-visible{outline:3px solid var(--_focus);outline-offset:2px}.ars-nav__item{box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;flex:none;margin:0;border:0;background:transparent;color:var(--_label);font:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;-webkit-tap-highlight-color:transparent}.ars-nav__item:focus-visible{outline:3px solid var(--_focus);outline-offset:-3px;border-radius:16px}.ars-nav__item--disabled,.ars-nav__item:disabled{cursor:default;opacity:.38;pointer-events:none}.ars-nav__icon-box{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;color:var(--_icon);transition:color var(--_dur) var(--_easing)}.ars-nav__icon{position:relative;z-index:1;width:24px;height:24px;font-size:24px;line-height:24px;font-variation-settings:\"FILL\" 0;transition:font-variation-settings var(--_dur) var(--_easing)}.ars-nav__label{position:relative;z-index:1;min-width:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_label);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color var(--_dur) var(--_easing),opacity var(--_dur) var(--_easing),max-height var(--_dur) var(--_easing),margin var(--_dur) var(--_easing)}.ars-nav__label--hidden{opacity:0;max-height:0;margin:0!important;pointer-events:none}.ars-nav__trailing{position:relative;z-index:1;margin-inline-start:auto;padding-inline-start:12px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;color:var(--_label);white-space:nowrap}.ars-nav__badge{position:absolute;z-index:2;top:-6px;inset-inline-start:12px;box-sizing:border-box;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--_badge);color:var(--_badge-text);font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-align:center;white-space:nowrap}.ars-nav__badge--dot{top:-1px;inset-inline-start:16px;width:6px;min-width:6px;height:6px;padding:0;border-radius:3px}:host([data-indicator=compact]) .ars-nav__icon-box:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__icon-box:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before{opacity:1;transform:scaleX(1)}:host([data-indicator=compact]) .ars-nav__item:hover .ars-nav__icon-box:after{opacity:var(--_hover-opacity)}:host([data-indicator=compact]) .ars-nav__item:focus-visible .ars-nav__icon-box:after{opacity:var(--_focus-opacity)}:host([data-indicator=compact]) .ars-nav__item:active .ars-nav__icon-box:after{opacity:var(--_press-opacity)}:host([data-indicator=wide]) .ars-nav__item:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item--selected:before{opacity:1;transform:scaleX(1)}:host([data-indicator=wide]) .ars-nav__item:hover:after{opacity:var(--_hover-opacity)}:host([data-indicator=wide]) .ars-nav__item:focus-visible:after{opacity:var(--_focus-opacity)}:host([data-indicator=wide]) .ars-nav__item:active:after{opacity:var(--_press-opacity)}.ars-nav__item--selected .ars-nav__icon-box{color:var(--_icon-active)}.ars-nav__item--selected .ars-nav__icon{font-variation-settings:\"FILL\" 1}.ars-nav__item--selected .ars-nav__label{color:var(--_label-active)}:host([data-layout=vertical]) .ars-nav__item{flex-direction:column;justify-content:center}:host([data-layout=vertical]) .ars-nav__label{margin-top:4px;max-width:100%;text-align:center}:host([data-layout=horizontal]) .ars-nav__item{flex-direction:row;justify-content:flex-start}:host([data-layout=horizontal]) .ars-nav__label{margin-inline-start:4px}:host([data-variant=bar]){width:100%}:host([data-variant=bar]) .ars-nav{flex-direction:row;align-items:center;width:100%;height:var(--ars-navigation-bar-height, 64px);padding:0 8px}:host([data-variant=bar]) .ars-nav__header,:host([data-variant=bar]) .ars-nav__leading,:host([data-variant=bar]) .ars-nav__fab,:host([data-variant=bar]) .ars-nav__footer,:host([data-variant=bar]) .ars-nav__section-headline,:host([data-variant=bar]) .ars-nav__divider,:host([data-variant=bar]) .ars-nav__trailing{display:none}:host([data-variant=bar]) .ars-nav__items{flex:1 1 auto;flex-direction:row;align-items:stretch;justify-content:space-around;width:100%;height:100%}:host([data-variant=bar]) .ars-nav__item{flex:1 1 0;min-width:0;height:100%}:host([data-variant=bar][data-layout=horizontal]) .ars-nav__item{justify-content:center;max-width:var(--ars-navigation-item-max-width, 168px);padding:0 12px}:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:before,:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:after{inset:12px 0}:host([data-variant=rail]){height:100%}:host([data-variant=rail]) .ars-nav{flex-direction:column;align-items:center;width:var(--ars-navigation-width, 96px);height:100%;padding:var(--ars-navigation-rail-top-padding, 44px) 0 4px}:host([data-variant=rail]) .ars-nav__header{flex-direction:column;margin-bottom:40px}:host([data-variant=rail]) .ars-nav__headline,:host([data-variant=rail]) .ars-nav__section-headline,:host([data-variant=rail]) .ars-nav__divider,:host([data-variant=rail]) .ars-nav__trailing{display:none}:host([data-variant=rail]) .ars-nav__fab{margin-bottom:40px}:host([data-variant=rail]) .ars-nav__items{flex:1 1 auto;flex-direction:column;align-items:center;gap:4px;width:100%;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail]) .ars-nav__item{justify-content:center;width:100%;height:64px;padding:0 4px}:host([data-variant=rail-expanded]),:host([data-variant=drawer]),:host([data-variant=modal]){height:100%}:host([data-variant=rail-expanded]) .ars-nav,:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{flex-direction:column;align-items:stretch;height:100%;padding:12px 0}:host([data-variant=rail-expanded]) .ars-nav__header,:host([data-variant=drawer]) .ars-nav__header,:host([data-variant=modal]) .ars-nav__header{padding:4px 8px 8px}:host([data-variant=rail-expanded]) .ars-nav__items,:host([data-variant=drawer]) .ars-nav__items,:host([data-variant=modal]) .ars-nav__items{flex:1 1 auto;flex-direction:column;gap:4px;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail-expanded]) .ars-nav__item,:host([data-variant=drawer]) .ars-nav__item,:host([data-variant=modal]) .ars-nav__item{height:56px;padding:0 24px;margin:0 var(--ars-navigation-item-inset, 20px)}:host([data-variant=rail-expanded]) .ars-nav__icon-box,:host([data-variant=drawer]) .ars-nav__icon-box,:host([data-variant=modal]) .ars-nav__icon-box{margin-inline-end:12px}:host([data-variant=rail-expanded]) .ars-nav__label,:host([data-variant=drawer]) .ars-nav__label,:host([data-variant=modal]) .ars-nav__label{flex:1 1 auto;margin-inline-start:0}:host([data-variant=rail-expanded]) .ars-nav{width:var(--ars-navigation-width, 220px)}:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{width:var(--ars-navigation-width, 360px)}:host([data-variant=modal]){position:fixed;inset:0;z-index:var(--ars-navigation-z-index, 1000);height:auto;pointer-events:none}:host([data-variant=modal]) .ars-nav{position:absolute;inset-block:0;inset-inline-start:0;pointer-events:auto;border-start-end-radius:16px;border-end-end-radius:16px;translate:calc(var(--_shift, 0%) * var(--_rtl)) 0;transition:translate var(--_dur-long) var(--_easing),visibility var(--_dur-long) var(--_easing)}:host([data-variant=modal][data-position=end]) .ars-nav{inset-inline-start:auto;inset-inline-end:0;border-radius:0;border-start-start-radius:16px;border-end-start-radius:16px}:host([data-variant=modal].ars-navigation--hidden) .ars-nav__scrim{opacity:0;pointer-events:none}:host([data-variant=modal].ars-navigation--hidden) .ars-nav{--_shift: -100%;visibility:hidden}:host([data-variant=modal][data-position=end].ars-navigation--hidden) .ars-nav{--_shift: 100%}.ars-nav__scrim{position:absolute;inset:0;background:var(--_scrim);opacity:1;pointer-events:auto;transition:opacity var(--_dur-long) var(--_easing)}:host([data-align=center]) .ars-nav__items{justify-content:safe center}:host([data-align=bottom]) .ars-nav__items{justify-content:safe flex-end}:host(.ars-navigation--elevated) .ars-nav{box-shadow:0 1px 3px #0000004d,0 4px 8px 3px #00000026}:host([data-variant=bar].ars-navigation--bordered) .ars-nav{border-top:1px solid var(--_divider)}:host([data-variant=rail].ars-navigation--bordered) .ars-nav,:host([data-variant=rail-expanded].ars-navigation--bordered) .ars-nav,:host([data-variant=drawer].ars-navigation--bordered) .ars-nav{border-inline-end:1px solid var(--_divider)}:host([data-variant=rail][data-position=end].ars-navigation--bordered) .ars-nav,:host([data-variant=rail-expanded][data-position=end].ars-navigation--bordered) .ars-nav,:host([data-variant=drawer][data-position=end].ars-navigation--bordered) .ars-nav{border-inline-end:0;border-inline-start:1px solid var(--_divider)}:host(.ars-navigation--hidden):not([data-variant=modal]){display:none}@media(prefers-reduced-motion:reduce){:host{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms}:host([data-indicator=wide]) .ars-nav__item:before,:host([data-indicator=compact]) .ars-nav__icon-box:before{transform:none}}@media(forced-colors:active){:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before,:host([data-indicator=wide]) .ars-nav__item--selected:before{background:Highlight;forced-color-adjust:none}.ars-nav__item:focus-visible{outline:3px solid CanvasText}}\n"] }]
|
|
3677
|
-
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], sections: [{ type: i0.Input, args: [{ isSignal: true, alias: "sections", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], autoVariants: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoVariants", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }, { type: i0.Output, args: ["selectedIdChange"] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], labelVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVisibility", required: false }] }], itemLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemLayout", required: false }] }], alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], headline: [{ type: i0.Input, args: [{ isSignal: true, alias: "headline", required: false }] }], showMenuButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMenuButton", required: false }] }], menuIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuIcon", required: false }] }], menuAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuAriaLabel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], scrim: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrim", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], tooltips: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltips", required: false }] }], routerSync: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerSync", required: false }] }], relativeTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "relativeTo", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }], menuClick: [{ type: i0.Output, args: ["menuClick"] }], itemElements: [{ type: i0.ViewChildren, args: ['navItem', { isSignal: true }] }] } });
|
|
4232
|
+
}, template: "@if (isModal() && scrim()) {\n <div class=\"ars-nav__scrim\" aria-hidden=\"true\" (click)=\"onScrimClick()\"></div>\n}\n\n<nav class=\"ars-nav\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.role]=\"isModal() ? 'dialog' : undefined\"\n [attr.aria-modal]=\"isModal() ? 'true' : undefined\"\n [attr.inert]=\"isHidden() ? '' : undefined\"\n [cdkTrapFocus]=\"isOverlayOpen()\"\n [cdkTrapFocusAutoCapture]=\"isOverlayOpen()\"\n (keydown)=\"onKeydown($event)\">\n\n @let labels = resolvedLabelVisibility();\n @let wide = isExpanded();\n @let active = activeId();\n @let highlighted = highlightedIds();\n @let openIds = expandedSet();\n @let popupOpenId = popupItem()?.item.id;\n\n @if (showsHeader()) {\n <div class=\"ars-nav__header\">\n @if (showMenuButton()) {\n <button type=\"button\"\n class=\"ars-nav__menu\"\n [attr.aria-label]=\"menuAriaLabel()\"\n (click)=\"onMenuClick()\">\n <mat-icon aria-hidden=\"true\">{{ menuIcon() }}</mat-icon>\n </button>\n }\n @if (wide) {\n @if (headline(); as headlineText) {\n <h2 class=\"ars-nav__headline\">{{ headlineText }}</h2>\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__leading\"><ng-content select=\"[navHeader]\" /></div>\n <div class=\"ars-nav__fab\"><ng-content select=\"[navFab]\" /></div>\n\n @for (group of visibleGroups(); track group.align) {\n <div class=\"ars-nav__items\" [class.ars-nav__items--bottom]=\"group.align === 'bottom'\">\n @for (block of group.sections; track block.section.id) {\n\n @if (wide && block.section.label) {\n <h3 class=\"ars-nav__section-headline\">{{ block.section.label }}</h3>\n }\n\n @for (r of block.items; track r.item.id) {\n @let current = r.item.id === active;\n @let selected = highlighted.has(r.item.id);\n @let labelVisible = !r.iconOnly && (labels === 'labeled' || (labels === 'selected' && selected));\n @let branchOpen = r.hasChildren && openIds.has(r.item.id);\n @let svg = selected ? r.svgOn : r.svgOff;\n @let image = selected ? r.imageOn : r.imageOff;\n @let ligature = selected ? r.iconOn : r.iconOff;\n\n <!--\n The anchor and the button branches duplicate the inner markup on purpose:\n an `ng-template` + `ngTemplateOutlet` would allocate one extra embedded\n view per destination and lose the typed template context.\n -->\n @if (r.href && !r.hasChildren) {\n <a #navItem\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [attr.data-depth]=\"r.depth\"\n [attr.href]=\"r.item.disabled ? undefined : r.href\"\n [attr.target]=\"r.item.target\"\n [attr.rel]=\"r.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"current ? 'page' : undefined\"\n [attr.aria-disabled]=\"r.item.disabled ? 'true' : undefined\"\n [attr.tabindex]=\"r.item.disabled ? -1 : 0\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (r.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (image; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled' && !r.iconOnly) {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (wide && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #navItem\n type=\"button\"\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [class.ars-nav__item--parent]=\"r.hasChildren\"\n [class.ars-nav__item--icon-only]=\"r.iconOnly\"\n [attr.data-depth]=\"r.depth\"\n [disabled]=\"!!r.item.disabled\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"current ? 'page' : undefined\"\n [attr.aria-expanded]=\"r.hasChildren ? (wide ? branchOpen : popupOpenId === r.item.id) : undefined\"\n [attr.aria-haspopup]=\"r.hasChildren && !wide ? 'menu' : undefined\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (r.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (image; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled' && !r.iconOnly) {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (wide && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n @if (r.hasChildren && wide) {\n <mat-icon class=\"ars-nav__chevron\"\n [class.ars-nav__chevron--open]=\"branchOpen\"\n aria-hidden=\"true\">{{ expandIcon() }}</mat-icon>\n }\n </button>\n }\n }\n\n @if (wide && block.section.divider && !$last) {\n <hr class=\"ars-nav__divider\" aria-hidden=\"true\" />\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__footer\"><ng-content select=\"[navFooter]\" /></div>\n</nav>\n\n<!--\n One overlay for the whole component: the overflow entry and every parent\n destination of the compact variants reuse it, instead of allocating a menu\n instance per destination.\n-->\n<ng-template cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"popupOrigin()\"\n [cdkConnectedOverlayOpen]=\"isPopupOpen()\"\n [cdkConnectedOverlayPositions]=\"popupPositions()\"\n [cdkConnectedOverlayPush]=\"true\"\n (overlayOutsideClick)=\"closePopup()\"\n (detach)=\"closePopup()\">\n <div class=\"ars-nav-submenu\"\n role=\"menu\"\n [attr.aria-label]=\"popupItem()?.ariaLabel\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onKeydown($event)\">\n @for (entry of popupEntries(); track entry.key) {\n @if (entry.render; as c) {\n @let childSelected = c.item.id === activeId();\n @let childSvg = childSelected ? c.svgOn : c.svgOff;\n @let childImage = childSelected ? c.imageOn : c.imageOff;\n @let childLigature = childSelected ? c.iconOn : c.iconOff;\n @if (c.href) {\n <a #panelItem\n class=\"ars-nav-submenu__item\"\n role=\"menuitem\"\n [class.ars-nav-submenu__item--selected]=\"childSelected\"\n [attr.href]=\"c.item.disabled ? undefined : c.href\"\n [attr.target]=\"c.item.target\"\n [attr.rel]=\"c.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-disabled]=\"c.item.disabled ? 'true' : undefined\"\n [attr.aria-current]=\"childSelected ? 'page' : undefined\"\n (click)=\"select(c, $event)\">\n @if (childSvg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (c.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (childImage; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (childLigature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n <span class=\"ars-nav-submenu__label\">{{ c.item.label }}</span>\n @if (c.badgeText) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.badgeText }}</span>\n } @else if (c.item.trailing) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #panelItem\n type=\"button\"\n class=\"ars-nav-submenu__item\"\n role=\"menuitem\"\n [class.ars-nav-submenu__item--selected]=\"childSelected\"\n [disabled]=\"!!c.item.disabled\"\n [attr.aria-current]=\"childSelected ? 'page' : undefined\"\n (click)=\"select(c, $event)\">\n @if (childSvg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (c.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (childImage; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (childLigature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n <span class=\"ars-nav-submenu__label\">{{ c.item.label }}</span>\n @if (c.badgeText) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.badgeText }}</span>\n } @else if (c.item.trailing) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.item.trailing }}</span>\n }\n </button>\n }\n } @else {\n <div class=\"ars-nav-submenu__heading\" role=\"presentation\">{{ entry.label }}</div>\n }\n }\n </div>\n</ng-template>\n", styles: [":host{--_container: var(--ars-navigation-container-color, var(--mat-sys-surface-container, #eff1ef));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));--_icon: var(--ars-navigation-icon-color, var(--mat-sys-on-surface-variant, #3f4947));--_icon-active: var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c));--_label: var(--ars-navigation-label-color, var(--mat-sys-on-surface-variant, #3f4947));--_label-active: var(--ars-navigation-active-label-color, var(--ars-color-secondary, #4a635f));--_headline: var(--ars-navigation-headline-color, var(--mat-sys-on-surface-variant, #3f4947));--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_badge: var(--ars-navigation-badge-color, var(--ars-color-error, #ff5449));--_badge-text: var(--ars-navigation-badge-text-color, #ffffff);--_divider: var(--ars-navigation-divider-color, var(--ars-color-divider, #757d87));--_scrim: var(--ars-navigation-scrim-color, rgba(0, 0, 0, .4));--_focus: var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_icon-hover-scale: var(--ars-navigation-icon-hover-scale, 1.12);--_icon-press-scale: var(--ars-navigation-icon-press-scale, .92);--_hover-opacity: .08;--_focus-opacity: .1;--_press-opacity: .1;--_rtl: 1;display:block;box-sizing:border-box;color:var(--_label);-webkit-tap-highlight-color:transparent}:host-context([dir=rtl]){--_rtl: -1}.ars-nav{box-sizing:border-box;display:flex;position:relative;background:var(--_container);color:var(--_label);overflow:hidden}.ars-nav__items{box-sizing:border-box;display:flex;min-height:0;min-width:0;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--_state) 25%,transparent) transparent}.ars-nav__header{box-sizing:border-box;display:flex;align-items:center;flex:none;gap:12px}.ars-nav__leading,.ars-nav__fab,.ars-nav__footer{box-sizing:border-box;flex:none}.ars-nav__leading:empty,.ars-nav__fab:empty,.ars-nav__footer:empty{display:none}.ars-nav__headline{margin:0;padding:0 16px;font-size:22px;line-height:28px;font-weight:400;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__section-headline{margin:0;padding:18px 16px 8px;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__divider{flex:none;margin:8px 16px;border:0;border-top:1px solid var(--_divider);opacity:.4}.ars-nav__menu{display:inline-flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--_icon);cursor:pointer;transition:background-color var(--_dur-short) var(--_easing)}.ars-nav__menu:hover{background:color-mix(in srgb,var(--_state) 8%,transparent)}.ars-nav__menu:focus-visible{outline:3px solid var(--_focus);outline-offset:2px}.ars-nav__item{box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;flex:none;margin:0;border:0;background:transparent;color:var(--_label);font:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;-webkit-tap-highlight-color:transparent}.ars-nav__item:focus-visible{outline:3px solid var(--_focus);outline-offset:-3px;border-radius:16px}.ars-nav__item--disabled,.ars-nav__item:disabled{cursor:default;opacity:.38;pointer-events:none}.ars-nav__icon-box{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;color:var(--_icon);transition:color var(--_dur) var(--_easing)}.ars-nav__icon{position:relative;z-index:1;width:24px;height:24px;font-size:24px;line-height:24px;font-variation-settings:\"FILL\" 0;transform:scale(1);transform-origin:center;transition:font-variation-settings var(--_dur, .25s) var(--_easing, cubic-bezier(.2, 0, 0, 1)),transform var(--_dur, .25s) var(--_easing, cubic-bezier(.2, 0, 0, 1))}.ars-nav__label{position:relative;z-index:1;min-width:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_label);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color var(--_dur) var(--_easing),opacity var(--_dur) var(--_easing),max-height var(--_dur) var(--_easing),margin var(--_dur) var(--_easing)}.ars-nav__label--hidden{opacity:0;max-height:0;margin:0!important;pointer-events:none}.ars-nav__trailing{position:relative;z-index:1;margin-inline-start:auto;padding-inline-start:12px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;color:var(--_label);white-space:nowrap}.ars-nav__badge{position:absolute;z-index:2;top:-6px;inset-inline-start:12px;box-sizing:border-box;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--_badge);color:var(--_badge-text);font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-align:center;white-space:nowrap}.ars-nav__badge--dot{top:-1px;inset-inline-start:16px;width:6px;min-width:6px;height:6px;padding:0;border-radius:3px}:host([data-indicator=compact]) .ars-nav__icon-box:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__icon-box:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before{opacity:1;transform:scaleX(1)}:host([data-indicator=compact]) .ars-nav__item:hover .ars-nav__icon-box:after{opacity:var(--_hover-opacity)}:host([data-indicator=compact]) .ars-nav__item:focus-visible .ars-nav__icon-box:after{opacity:var(--_focus-opacity)}:host([data-indicator=compact]) .ars-nav__item:active .ars-nav__icon-box:after{opacity:var(--_press-opacity)}:host([data-indicator=wide]) .ars-nav__item:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item--selected:before{opacity:1;transform:scaleX(1)}:host([data-indicator=wide]) .ars-nav__item:hover:after{opacity:var(--_hover-opacity)}:host([data-indicator=wide]) .ars-nav__item:focus-visible:after{opacity:var(--_focus-opacity)}:host([data-indicator=wide]) .ars-nav__item:active:after{opacity:var(--_press-opacity)}.ars-nav__item--selected .ars-nav__icon-box{color:var(--_icon-active)}.ars-nav__item--selected .ars-nav__icon{font-variation-settings:\"FILL\" 1}.ars-nav__item--selected .ars-nav__label{color:var(--_label-active)}:host([data-layout=vertical]) .ars-nav__item{flex-direction:column;justify-content:center}:host([data-layout=vertical]) .ars-nav__label{margin-top:4px;max-width:100%;text-align:center}:host([data-layout=horizontal]) .ars-nav__item{flex-direction:row;justify-content:flex-start}:host([data-layout=horizontal]) .ars-nav__label{margin-inline-start:4px}:host([data-variant=bar]){width:100%}:host([data-variant=bar]) .ars-nav{flex-direction:row;align-items:center;justify-content:space-around;width:100%;height:var(--ars-navigation-bar-height, 64px);padding:0 8px}:host([data-variant=bar]) .ars-nav__header,:host([data-variant=bar]) .ars-nav__leading,:host([data-variant=bar]) .ars-nav__fab,:host([data-variant=bar]) .ars-nav__footer,:host([data-variant=bar]) .ars-nav__section-headline,:host([data-variant=bar]) .ars-nav__divider,:host([data-variant=bar]) .ars-nav__trailing{display:none}:host([data-variant=bar]) .ars-nav__items{display:contents}:host([data-variant=bar]) .ars-nav__item{flex:1 1 0;min-width:0;height:100%}:host([data-variant=bar][data-layout=horizontal]) .ars-nav__item{justify-content:center;max-width:var(--ars-navigation-item-max-width, 168px);padding:0 12px}:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:before,:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:after{inset:12px 0}:host([data-variant=rail]){height:100%}:host([data-variant=rail]) .ars-nav{flex-direction:column;align-items:center;width:var(--ars-navigation-width, 96px);height:100%;padding:var(--ars-navigation-rail-top-padding, 20px) 0 8px}:host([data-variant=rail]) .ars-nav__header{flex-direction:column;margin-bottom:40px}:host([data-variant=rail]) .ars-nav__headline,:host([data-variant=rail]) .ars-nav__section-headline,:host([data-variant=rail]) .ars-nav__divider,:host([data-variant=rail]) .ars-nav__trailing{display:none}:host([data-variant=rail]) .ars-nav__fab{margin-bottom:40px}:host([data-variant=rail]) .ars-nav__items{flex:1 1 auto;flex-direction:column;align-items:center;gap:4px;width:100%;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail]) .ars-nav__item{justify-content:center;width:100%;height:64px;padding:0 4px}:host([data-variant=rail-expanded]),:host([data-variant=drawer]),:host([data-variant=modal]){height:100%}:host([data-variant=rail-expanded]) .ars-nav,:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{flex-direction:column;align-items:stretch;height:100%;padding:12px 0}:host([data-variant=rail-expanded]) .ars-nav__header,:host([data-variant=drawer]) .ars-nav__header,:host([data-variant=modal]) .ars-nav__header{padding:4px 8px 8px}:host([data-variant=rail-expanded]) .ars-nav__items,:host([data-variant=drawer]) .ars-nav__items,:host([data-variant=modal]) .ars-nav__items{flex:1 1 auto;flex-direction:column;gap:4px;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail-expanded]) .ars-nav__item,:host([data-variant=drawer]) .ars-nav__item,:host([data-variant=modal]) .ars-nav__item{height:56px;padding-block:0;padding-inline:calc(24px + var(--_depth-pad, 0px)) 24px;margin:0 var(--ars-navigation-item-inset, 20px)}:host([data-variant=rail-expanded]) .ars-nav__icon-box,:host([data-variant=drawer]) .ars-nav__icon-box,:host([data-variant=modal]) .ars-nav__icon-box{margin-inline-end:12px}:host([data-variant=rail-expanded]) .ars-nav__label,:host([data-variant=drawer]) .ars-nav__label,:host([data-variant=modal]) .ars-nav__label{flex:1 1 auto;margin-inline-start:0}:host([data-variant=rail-expanded]) .ars-nav{width:var(--ars-navigation-width, 220px)}:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{width:var(--ars-navigation-width, 360px)}:host([data-variant=modal]){position:fixed;inset:0;z-index:var(--ars-navigation-z-index, 1000);height:auto;pointer-events:none}:host([data-variant=modal]) .ars-nav{position:absolute;inset-block:0;inset-inline-start:0;pointer-events:auto;border-start-end-radius:16px;border-end-end-radius:16px;translate:calc(var(--_shift, 0%) * var(--_rtl)) 0;transition:translate var(--_dur-long) var(--_easing),visibility var(--_dur-long) var(--_easing)}:host([data-variant=modal][data-position=end]) .ars-nav{inset-inline-start:auto;inset-inline-end:0;border-radius:0;border-start-start-radius:16px;border-end-start-radius:16px}:host([data-variant=modal].ars-navigation--hidden) .ars-nav__scrim{opacity:0;pointer-events:none}:host([data-variant=modal].ars-navigation--hidden) .ars-nav{--_shift: -100%;visibility:hidden}:host([data-variant=modal][data-position=end].ars-navigation--hidden) .ars-nav{--_shift: 100%}.ars-nav__scrim{position:absolute;inset:0;background:var(--_scrim);opacity:1;pointer-events:auto;transition:opacity var(--_dur-long) var(--_easing)}:host(:not([data-variant=bar])) .ars-nav__items--bottom{flex:0 0 auto;margin-block-start:auto;overflow:visible}:host([data-align=center]) .ars-nav__items:not(.ars-nav__items--bottom){justify-content:safe center}:host([data-align=bottom]) .ars-nav__items:not(.ars-nav__items--bottom){justify-content:safe flex-end}:host(.ars-navigation--elevated) .ars-nav{box-shadow:0 1px 3px #0000004d,0 4px 8px 3px #00000026}:host(.ars-navigation--hidden):not([data-variant=modal]){display:none}.ars-nav__icon--image{object-fit:contain}.ars-nav__icon--sprite{display:inline-block;flex:none;width:var(--sp-size, 24px);height:var(--sp-size, 24px);background-image:var(--sp-url);background-repeat:no-repeat;background-size:var(--sp-sheet-x, auto) var(--sp-sheet-y, auto);background-position:calc(var(--sp-frame, var(--sp-normal, 0)) * var(--sp-step-x, 0px)) calc(var(--sp-frame, var(--sp-normal, 0)) * var(--sp-step-y, 0px))}.ars-nav__item:where(:hover,:focus-visible) .ars-nav__icon--sprite,.ars-nav-submenu__item:where(:hover,:focus-visible) .ars-nav__icon--sprite{--sp-frame: var(--sp-hover)}.ars-nav__item--selected .ars-nav__icon--sprite,.ars-nav-submenu__item--selected .ars-nav__icon--sprite{--sp-frame: var(--sp-active)}.ars-nav__item--disabled .ars-nav__icon--sprite,.ars-nav__item:where(:disabled) .ars-nav__icon--sprite,.ars-nav-submenu__item:where(:disabled,[aria-disabled=true]) .ars-nav__icon--sprite{--sp-frame: var(--sp-disabled)}.ars-nav__item:where(:hover,:focus-visible) .ars-nav__icon,.ars-nav-submenu__item:where(:hover,:focus-visible) .ars-nav__icon{transform:scale(var(--_icon-hover-scale, 1.12))}.ars-nav__item--selected .ars-nav__icon,.ars-nav-submenu__item--selected .ars-nav__icon{transform:scale(1)}.ars-nav__item:where(:active) .ars-nav__icon,.ars-nav-submenu__item:where(:active) .ars-nav__icon{transform:scale(var(--_icon-press-scale, .92));transition-duration:var(--_dur-short, .15s)}:host([data-variant=bar]) .ars-nav__item--icon-only{flex:0 0 auto;min-width:56px;max-width:72px}.ars-nav__chevron{position:relative;z-index:1;flex:none;margin-inline-start:8px;width:20px;height:20px;font-size:20px;line-height:20px;color:var(--_icon);rotate:0deg;transition:rotate var(--_dur) var(--_easing)}.ars-nav__chevron--open{rotate:180deg}.ars-nav__item[data-depth=\"1\"]{--_depth-pad: 24px}.ars-nav__item[data-depth=\"2\"]{--_depth-pad: 48px}.ars-nav__item[data-depth=\"3\"]{--_depth-pad: 72px}.ars-nav-submenu{--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_icon-hover-scale: var(--ars-navigation-icon-hover-scale, 1.12);--_icon-press-scale: var(--ars-navigation-icon-press-scale, .92);--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));box-sizing:border-box;display:flex;flex-direction:column;gap:2px;min-width:200px;max-width:320px;max-height:60vh;padding:8px;border-radius:12px;background:var(--ars-navigation-menu-container-color, var(--mat-sys-surface-container-high, #e7e9e8));color:var(--ars-navigation-label-color, var(--mat-sys-on-surface, #191c1b));box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026;overflow-y:auto;overscroll-behavior:contain}.ars-nav-submenu__item{box-sizing:border-box;display:flex;align-items:center;gap:12px;flex:none;min-height:48px;margin:0;padding:0 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:start;text-decoration:none;cursor:pointer;appearance:none}.ars-nav-submenu__item:hover{background:color-mix(in srgb,currentColor 8%,transparent)}.ars-nav-submenu__item:focus-visible{outline:3px solid var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));outline-offset:-3px}.ars-nav-submenu__item--selected{background:var(--_indicator);color:var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c))}.ars-nav-submenu__item--selected:where(:hover,:focus-visible){background:color-mix(in srgb,var(--_state) 8%,var(--_indicator))}.ars-nav-submenu__item:disabled,.ars-nav-submenu__item[aria-disabled=true]{opacity:.38;pointer-events:none}.ars-nav-submenu__heading{padding:12px 12px 4px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-transform:uppercase;opacity:.7}.ars-nav-submenu__heading:first-child{padding-top:4px}.ars-nav-submenu__label{flex:1 1 auto;min-width:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav-submenu__trailing{flex:none;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;opacity:.8}@media(prefers-reduced-motion:reduce){:host{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms;--_icon-hover-scale: 1;--_icon-press-scale: 1}:host([data-indicator=wide]) .ars-nav__item:before,:host([data-indicator=compact]) .ars-nav__icon-box:before{transform:none}.ars-nav-submenu{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms;--_icon-hover-scale: 1;--_icon-press-scale: 1}}@media(forced-colors:active){:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before,:host([data-indicator=wide]) .ars-nav__item--selected:before{background:Highlight;forced-color-adjust:none}.ars-nav__item:focus-visible{outline:3px solid CanvasText}}\n"] }]
|
|
4233
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], sections: [{ type: i0.Input, args: [{ isSignal: true, alias: "sections", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], autoVariants: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoVariants", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }, { type: i0.Output, args: ["selectedIdChange"] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], labelVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVisibility", required: false }] }], itemLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemLayout", required: false }] }], alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], headline: [{ type: i0.Input, args: [{ isSignal: true, alias: "headline", required: false }] }], showMenuButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMenuButton", required: false }] }], menuIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuIcon", required: false }] }], expandIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandIcon", required: false }] }], overflowMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowMode", required: false }] }], overflowIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowIcon", required: false }] }], overflowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabel", required: false }] }], maxVisibleItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleItems", required: false }] }], menuAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuAriaLabel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], scrim: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrim", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], tooltips: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltips", required: false }] }], routerSync: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerSync", required: false }] }], relativeTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "relativeTo", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }], menuClick: [{ type: i0.Output, args: ["menuClick"] }], itemElements: [{ type: i0.ViewChildren, args: ['navItem', { isSignal: true }] }], panelElements: [{ type: i0.ViewChildren, args: ['panelItem', { isSignal: true }] }] } });
|
|
3678
4234
|
|
|
3679
4235
|
/*
|
|
3680
4236
|
* Public API Surface of scm-utils
|
|
@@ -3684,5 +4240,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
3684
4240
|
* Generated bundle index. Do not edit.
|
|
3685
4241
|
*/
|
|
3686
4242
|
|
|
3687
|
-
export { ALIAS_FAMILIES, BS5_BREAKPOINTS, BusyDialogComponent, BusyTimer, CANONICAL_ALIASES, ConfirmDialogComponent, CredentialsDialogComponent, DEFAULT_NAVIGATION_AUTO_VARIANTS, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, EXPANDED_NAVIGATION_VARIANTS, FlexLayoutModule, FxClassDirective, FxFlexAlignDirective, FxFlexDirective, FxFlexFillDirective, FxFlexOffsetDirective, FxFlexOrderDirective, FxGridAreaDirective, FxGridColumnDirective, FxGridDirective, FxLayoutAlignDirective, FxLayoutDirective, FxLayoutGapDirective, FxLayoutWrapDirective, FxShowHideDirective, FxStyleDirective, IfBpDirective, InfoDialogComponent, LAYOUT_BREAKPOINTS, LAYOUT_VALUES, MediaObserver, NON_CANONICAL_PRIORITY, NavigationBarComponent, OtpInputComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ResponsiveBaseDirective, ToastComponent, UIService, applyVisibility, buildAlignStyles, buildFlexStyles, buildLayoutCSS, resolve, resolveAll, resolveFlexInput, resolveNonCanonical, resolveParentFlow, validateBasis, validateLayoutValue, validateWrapValue };
|
|
4243
|
+
export { ALIAS_FAMILIES, BS5_BREAKPOINTS, BusyDialogComponent, BusyTimer, CANONICAL_ALIASES, ConfirmDialogComponent, CredentialsDialogComponent, DEFAULT_NAVIGATION_AUTO_VARIANTS, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, EXPANDED_NAVIGATION_VARIANTS, FlexLayoutModule, FxClassDirective, FxFlexAlignDirective, FxFlexDirective, FxFlexFillDirective, FxFlexOffsetDirective, FxFlexOrderDirective, FxGridAreaDirective, FxGridColumnDirective, FxGridDirective, FxLayoutAlignDirective, FxLayoutDirective, FxLayoutGapDirective, FxLayoutWrapDirective, FxShowHideDirective, FxStyleDirective, IfBpDirective, InfoDialogComponent, LAYOUT_BREAKPOINTS, LAYOUT_VALUES, MediaObserver, NAVIGATION_OVERFLOW_ID, NON_CANONICAL_PRIORITY, NavigationBarComponent, OtpInputComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ResponsiveBaseDirective, ToastComponent, UIService, applyVisibility, buildAlignStyles, buildFlexStyles, buildLayoutCSS, resolve, resolveAll, resolveFlexInput, resolveNonCanonical, resolveParentFlow, validateBasis, validateLayoutValue, validateWrapValue };
|
|
3688
4244
|
//# sourceMappingURL=arsedizioni-ars-utils-ui.mjs.map
|