@siemens/element-ng 51.0.1 → 51.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +7 -5
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +176 -33
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +5 -5
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/package.json +4 -4
- package/schematics/utils/index.js +0 -1
- package/template-i18n.json +1 -0
- package/types/siemens-element-ng-auto-collapsable-list.d.ts +2 -1
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +48 -1
- package/types/siemens-element-ng-translate.d.ts +1 -0
- package/schematics/migrations/data/migration-test-data.js +0 -304
- package/schematics/utils/testing.js +0 -54
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i1 from '@angular/cdk/portal';
|
|
2
2
|
import { DomPortal, PortalModule, TemplatePortal } from '@angular/cdk/portal';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, ElementRef, Component, InjectionToken, viewChild, linkedSignal, input, untracked,
|
|
4
|
+
import { inject, ElementRef, Component, InjectionToken, viewChild, linkedSignal, input, untracked, computed, signal, ViewContainerRef, DestroyRef, Injector, effect, Directive, booleanAttribute, model, contentChild, contentChildren, afterNextRender, afterRenderEffect, output } from '@angular/core';
|
|
5
5
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
6
6
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
-
import { elementRight2, elementDown2, elementLayoutPane2Right, elementLayoutPane2, elementDoubleRight, elementDoubleLeft, elementSearch } from '@siemens/element-icons';
|
|
7
|
+
import { elementRight2, elementDown2, elementLayoutPane2Right, elementLayoutPane2, elementDoubleRight, elementDoubleLeft, elementLeft2, elementSearch } from '@siemens/element-icons';
|
|
8
8
|
import { SI_UI_STATE_SERVICE } from '@siemens/element-ng/common';
|
|
9
9
|
import { SiIconComponent, addIcons } from '@siemens/element-ng/icon';
|
|
10
10
|
import { BOOTSTRAP_BREAKPOINTS } from '@siemens/element-ng/resize-observer';
|
|
@@ -175,6 +175,26 @@ class SiNavbarVerticalNextGroupTriggerDirective {
|
|
|
175
175
|
*/
|
|
176
176
|
flyout = linkedSignal({ ...(ngDevMode ? { debugName: "flyout" } : /* istanbul ignore next */ {}), source: () => this.flyoutMode(),
|
|
177
177
|
computation: () => false });
|
|
178
|
+
/** `true` when this group is currently rendered as a mobile flat group.
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
181
|
+
flatGroupActive = computed(() => this.navbar.flatMode() && this.navbar.openFlatGroupId() === this.groupId, /* @ts-ignore */
|
|
182
|
+
...(ngDevMode ? [{ debugName: "flatGroupActive" }] : /* istanbul ignore next */ []));
|
|
183
|
+
/**
|
|
184
|
+
* Whether the group is currently revealed to the user, taking the active
|
|
185
|
+
* rendering mode into account. Used for `aria-expanded`.
|
|
186
|
+
* @internal
|
|
187
|
+
*/
|
|
188
|
+
ariaExpanded = computed(() => {
|
|
189
|
+
if (this.navbar.flatMode()) {
|
|
190
|
+
return this.flatGroupActive();
|
|
191
|
+
}
|
|
192
|
+
if (this.flyoutMode()) {
|
|
193
|
+
return this.flyout();
|
|
194
|
+
}
|
|
195
|
+
return this.expanded();
|
|
196
|
+
}, /* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "ariaExpanded" }] : /* istanbul ignore next */ []));
|
|
178
198
|
/** `true` when this group contains the active route. Set by the group component.
|
|
179
199
|
* @internal
|
|
180
200
|
*/
|
|
@@ -188,6 +208,7 @@ class SiNavbarVerticalNextGroupTriggerDirective {
|
|
|
188
208
|
...(ngDevMode ? [{ debugName: "flyoutMode" }] : /* istanbul ignore next */ []));
|
|
189
209
|
flyoutOutsideClickSubscription;
|
|
190
210
|
viewContainer = inject(ViewContainerRef);
|
|
211
|
+
elementRef = inject(ElementRef);
|
|
191
212
|
overlay = inject(Overlay);
|
|
192
213
|
destroyRef = inject(DestroyRef);
|
|
193
214
|
injector = Injector.create({ parent: inject(Injector), providers: [] });
|
|
@@ -216,6 +237,9 @@ class SiNavbarVerticalNextGroupTriggerDirective {
|
|
|
216
237
|
});
|
|
217
238
|
});
|
|
218
239
|
this.destroyRef.onDestroy(() => {
|
|
240
|
+
if (this.navbar.openFlatGroupId() === this.groupId) {
|
|
241
|
+
this.navbar.closeFlatGroup();
|
|
242
|
+
}
|
|
219
243
|
this.overlayRef.detach();
|
|
220
244
|
this.overlayRef.dispose();
|
|
221
245
|
});
|
|
@@ -228,8 +252,15 @@ class SiNavbarVerticalNextGroupTriggerDirective {
|
|
|
228
252
|
this.detachFlyout();
|
|
229
253
|
this.attachInline();
|
|
230
254
|
}
|
|
255
|
+
/** @internal */
|
|
256
|
+
focus() {
|
|
257
|
+
this.elementRef.nativeElement.focus();
|
|
258
|
+
}
|
|
231
259
|
triggered() {
|
|
232
|
-
if (this.
|
|
260
|
+
if (this.navbar.flatMode()) {
|
|
261
|
+
this.navbar.openFlatGroupId.set(this.flatGroupActive() ? undefined : this.groupId);
|
|
262
|
+
}
|
|
263
|
+
else if (this.flyoutMode()) {
|
|
233
264
|
this.toggleFlyout();
|
|
234
265
|
}
|
|
235
266
|
else {
|
|
@@ -269,7 +300,7 @@ class SiNavbarVerticalNextGroupTriggerDirective {
|
|
|
269
300
|
this.flyoutOutsideClickSubscription = undefined;
|
|
270
301
|
}
|
|
271
302
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextGroupTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
272
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: SiNavbarVerticalNextGroupTriggerDirective, isStandalone: true, selector: "button[siNavbarVerticalNextGroupTriggerFor]", inputs: { groupTemplate: { classPropertyName: "groupTemplate", publicName: "siNavbarVerticalNextGroupTriggerFor", isSignal: true, isRequired: true, transformFunction: null }, stateId: { classPropertyName: "stateId", publicName: "stateId", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "triggered()" }, properties: { "id": "id", "class.show": "!flyoutMode() && expanded()", "attr.aria-controls": "groupId", "attr.aria-expanded": "
|
|
303
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: SiNavbarVerticalNextGroupTriggerDirective, isStandalone: true, selector: "button[siNavbarVerticalNextGroupTriggerFor]", inputs: { groupTemplate: { classPropertyName: "groupTemplate", publicName: "siNavbarVerticalNextGroupTriggerFor", isSignal: true, isRequired: true, transformFunction: null }, stateId: { classPropertyName: "stateId", publicName: "stateId", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "triggered()" }, properties: { "id": "id", "class.show": "navbar.flatMode() ? flatGroupActive() : !flyoutMode() && expanded()", "attr.aria-controls": "groupId", "attr.aria-expanded": "ariaExpanded()" }, classAttribute: "dropdown-toggle" }, ngImport: i0 });
|
|
273
304
|
}
|
|
274
305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextGroupTriggerDirective, decorators: [{
|
|
275
306
|
type: Directive,
|
|
@@ -278,9 +309,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
278
309
|
host: {
|
|
279
310
|
class: 'dropdown-toggle',
|
|
280
311
|
'[id]': 'id',
|
|
281
|
-
'[class.show]': '!flyoutMode() && expanded()',
|
|
312
|
+
'[class.show]': 'navbar.flatMode() ? flatGroupActive() : !flyoutMode() && expanded()',
|
|
282
313
|
'[attr.aria-controls]': 'groupId',
|
|
283
|
-
'[attr.aria-expanded]': '
|
|
314
|
+
'[attr.aria-expanded]': 'ariaExpanded()',
|
|
284
315
|
'(click)': 'triggered()'
|
|
285
316
|
}
|
|
286
317
|
}]
|
|
@@ -376,6 +407,10 @@ class SiNavbarVerticalNextItemComponent {
|
|
|
376
407
|
return badge.toString();
|
|
377
408
|
}, /* @ts-ignore */
|
|
378
409
|
...(ngDevMode ? [{ debugName: "formattedBadge" }] : /* istanbul ignore next */ []));
|
|
410
|
+
toggleIcon = computed(() => this.navbar.flyoutMode() || this.navbar.flatMode()
|
|
411
|
+
? this.icons.elementRight2
|
|
412
|
+
: this.icons.elementDown2, /* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [{ debugName: "toggleIcon" }] : /* istanbul ignore next */ []));
|
|
379
414
|
/** Active via override or router link — excludes group state.
|
|
380
415
|
* @internal
|
|
381
416
|
*/
|
|
@@ -416,7 +451,7 @@ class SiNavbarVerticalNextItemComponent {
|
|
|
416
451
|
}
|
|
417
452
|
}
|
|
418
453
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
419
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiNavbarVerticalNextItemComponent, isStandalone: true, selector: "a[si-navbar-vertical-next-item], button[si-navbar-vertical-next-item]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeColor: { classPropertyName: "badgeColor", publicName: "badgeColor", isSignal: true, isRequired: false, transformFunction: null }, hideBadgeWhenCollapsed: { classPropertyName: "hideBadgeWhenCollapsed", publicName: "hideBadgeWhenCollapsed", isSignal: true, isRequired: false, transformFunction: null }, activeOverride: { classPropertyName: "activeOverride", publicName: "activeOverride", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "triggered()" }, properties: { "class.active": "showActive()", "class.hide-badge-collapsed": "hideBadgeWhenCollapsed()" }, classAttribute: "navbar-vertical-item focus-inside" }, ngImport: i0, template: "@let icon = this.icon();\n@if (icon) {\n <si-icon class=\"icon\" [icon]=\"icon\" />\n}\n<div class=\"item-title text-truncate si-h5\">{{ label() }}</div>\n@if (!navbar.textOnly() && formattedBadge()) {\n @let badgeColor = this.badgeColor();\n <span\n [class]=\"[\n 'badge',\n badgeColor ? `bg-${badgeColor}` : 'bg-default',\n textOnlyBadge() ? 'badge-text-only' : '',\n navbar.collapsed() ? 'badge-collapsed' : ''\n ]\"\n >{{ formattedBadge() }}</span\n >\n}\n@if (group) {\n <si-icon
|
|
454
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiNavbarVerticalNextItemComponent, isStandalone: true, selector: "a[si-navbar-vertical-next-item], button[si-navbar-vertical-next-item]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeColor: { classPropertyName: "badgeColor", publicName: "badgeColor", isSignal: true, isRequired: false, transformFunction: null }, hideBadgeWhenCollapsed: { classPropertyName: "hideBadgeWhenCollapsed", publicName: "hideBadgeWhenCollapsed", isSignal: true, isRequired: false, transformFunction: null }, activeOverride: { classPropertyName: "activeOverride", publicName: "activeOverride", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "triggered()" }, properties: { "class.active": "showActive()", "class.hide-badge-collapsed": "hideBadgeWhenCollapsed()" }, classAttribute: "navbar-vertical-item focus-inside" }, ngImport: i0, template: "@let icon = this.icon();\n@if (icon) {\n <si-icon class=\"icon\" [icon]=\"icon\" />\n}\n<div class=\"item-title text-truncate si-h5\">{{ label() }}</div>\n@if (!navbar.textOnly() && formattedBadge()) {\n @let badgeColor = this.badgeColor();\n <span\n [class]=\"[\n 'badge',\n badgeColor ? `bg-${badgeColor}` : 'bg-default',\n textOnlyBadge() ? 'badge-text-only' : '',\n navbar.collapsed() ? 'badge-collapsed' : ''\n ]\"\n >{{ formattedBadge() }}</span\n >\n}\n@if (group) {\n <si-icon class=\"dropdown-caret me-0 text-primary\" [icon]=\"toggleIcon()\" />\n}\n", styles: [":host(.navbar-vertical-item){display:flex;align-items:center;position:relative;color:var(--si-sys-color-text-primary);background:none;border:0;font-size:var(--si-sys-typography-font-size-body);padding-block:var(--si-sys-sizing-spacing-y-40);padding-inline:0 var(--si-sys-sizing-spacing-x-50);min-inline-size:0;min-block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-50));inline-size:100%;border-radius:0}:host(.navbar-vertical-item) .item-title{margin-inline-start:var(--si-sys-sizing-spacing-x-50)}:host(.navbar-vertical-item) .icon{margin-inline-start:var(--si-sys-sizing-spacing-x-50);padding-inline:var(--si-sys-sizing-spacing-x-10);padding-block:var(--si-sys-sizing-spacing-y-10)}:host(.navbar-vertical-item) .icon+.item-title{margin-inline-start:var(--si-sys-sizing-spacing-x-40)}:host(.navbar-vertical-item).show .badge:not(.badge-collapsed){display:none}:host(.navbar-vertical-item):not(.show) .badge+.dropdown-caret{margin-inline:0;padding-inline:0}:host(.navbar-vertical-item).active{color:var(--si-sys-color-text-accent-active);background:var(--si-sys-color-background-active)}:host(.navbar-vertical-item).active:after{content:\"\";position:absolute;inset-block:0;inset-inline-start:0;inline-size:4px;background:var(--si-sys-color-border-accent-active)}:host(.navbar-vertical-item):hover{text-decoration:none;background:var(--si-sys-color-background-hover)}:host-context(si-navbar-vertical-next-items > .navbar-vertical-item)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-items > si-navbar-vertical-next-group)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-items > si-navbar-flyout-anchor)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-footer-items > .navbar-vertical-item)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-footer-items > si-navbar-vertical-next-group)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-footer-items > si-navbar-flyout-anchor)+:host(.navbar-vertical-item){margin-block-start:var(--si-sys-sizing-spacing-y-40)}:host-context(.nav-text-only si-navbar-vertical-next-group) .item-title{margin-inline-start:0}:host-context(si-navbar-vertical-next-group) :host(.navbar-vertical-item){padding-inline-start:var(--si-sys-sizing-spacing-x-90)}:host-context(si-navbar-vertical-next-group) :host(.navbar-vertical-item) .item-title{font-weight:400}:host-context(si-navbar-vertical-next-group.flat-group-active) :host(.navbar-vertical-item){padding-inline-start:calc(1lh + var(--si-sys-sizing-spacing-x-80))}:host-context(.dropdown-menu) :host(.navbar-vertical-item){padding-inline-start:0}:host-context(.dropdown-menu) :host(.navbar-vertical-item) .item-title{font-weight:400}:host-context(.nav-collapsed) .badge{position:absolute;inset-block-start:var(--si-sys-sizing-spacing-y-20);inset-inline-end:var(--si-sys-sizing-spacing-x-30);min-inline-size:.875rem;border-radius:.4375rem;font-size:var(--si-sys-typography-font-size-body-sm);line-height:.875rem;padding-block:0;padding-inline:var(--si-sys-sizing-spacing-x-20);font-family:var(--element-body-font-family);font-weight:600;text-align:center}:host-context(.nav-collapsed) .badge.badge-text-only{color:transparent;font-size:0}:host-context(.nav-collapsed) :is(.item-title,.dropdown-caret){position:absolute!important;inline-size:1px!important;block-size:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}:host-context(.nav-collapsed).hide-badge-collapsed .badge{display:none}.badge{margin-inline:auto 0}:host-context(.nav-flat-group-open){display:none}:host-context(si-navbar-vertical-next-group.flat-group-active){display:flex}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }] });
|
|
420
455
|
}
|
|
421
456
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextItemComponent, decorators: [{
|
|
422
457
|
type: Component,
|
|
@@ -425,7 +460,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
425
460
|
'[class.active]': 'showActive()',
|
|
426
461
|
'[class.hide-badge-collapsed]': 'hideBadgeWhenCollapsed()',
|
|
427
462
|
'(click)': 'triggered()'
|
|
428
|
-
}, template: "@let icon = this.icon();\n@if (icon) {\n <si-icon class=\"icon\" [icon]=\"icon\" />\n}\n<div class=\"item-title text-truncate si-h5\">{{ label() }}</div>\n@if (!navbar.textOnly() && formattedBadge()) {\n @let badgeColor = this.badgeColor();\n <span\n [class]=\"[\n 'badge',\n badgeColor ? `bg-${badgeColor}` : 'bg-default',\n textOnlyBadge() ? 'badge-text-only' : '',\n navbar.collapsed() ? 'badge-collapsed' : ''\n ]\"\n >{{ formattedBadge() }}</span\n >\n}\n@if (group) {\n <si-icon
|
|
463
|
+
}, template: "@let icon = this.icon();\n@if (icon) {\n <si-icon class=\"icon\" [icon]=\"icon\" />\n}\n<div class=\"item-title text-truncate si-h5\">{{ label() }}</div>\n@if (!navbar.textOnly() && formattedBadge()) {\n @let badgeColor = this.badgeColor();\n <span\n [class]=\"[\n 'badge',\n badgeColor ? `bg-${badgeColor}` : 'bg-default',\n textOnlyBadge() ? 'badge-text-only' : '',\n navbar.collapsed() ? 'badge-collapsed' : ''\n ]\"\n >{{ formattedBadge() }}</span\n >\n}\n@if (group) {\n <si-icon class=\"dropdown-caret me-0 text-primary\" [icon]=\"toggleIcon()\" />\n}\n", styles: [":host(.navbar-vertical-item){display:flex;align-items:center;position:relative;color:var(--si-sys-color-text-primary);background:none;border:0;font-size:var(--si-sys-typography-font-size-body);padding-block:var(--si-sys-sizing-spacing-y-40);padding-inline:0 var(--si-sys-sizing-spacing-x-50);min-inline-size:0;min-block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-50));inline-size:100%;border-radius:0}:host(.navbar-vertical-item) .item-title{margin-inline-start:var(--si-sys-sizing-spacing-x-50)}:host(.navbar-vertical-item) .icon{margin-inline-start:var(--si-sys-sizing-spacing-x-50);padding-inline:var(--si-sys-sizing-spacing-x-10);padding-block:var(--si-sys-sizing-spacing-y-10)}:host(.navbar-vertical-item) .icon+.item-title{margin-inline-start:var(--si-sys-sizing-spacing-x-40)}:host(.navbar-vertical-item).show .badge:not(.badge-collapsed){display:none}:host(.navbar-vertical-item):not(.show) .badge+.dropdown-caret{margin-inline:0;padding-inline:0}:host(.navbar-vertical-item).active{color:var(--si-sys-color-text-accent-active);background:var(--si-sys-color-background-active)}:host(.navbar-vertical-item).active:after{content:\"\";position:absolute;inset-block:0;inset-inline-start:0;inline-size:4px;background:var(--si-sys-color-border-accent-active)}:host(.navbar-vertical-item):hover{text-decoration:none;background:var(--si-sys-color-background-hover)}:host-context(si-navbar-vertical-next-items > .navbar-vertical-item)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-items > si-navbar-vertical-next-group)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-items > si-navbar-flyout-anchor)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-footer-items > .navbar-vertical-item)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-footer-items > si-navbar-vertical-next-group)+:host(.navbar-vertical-item),:host-context(si-navbar-vertical-next-footer-items > si-navbar-flyout-anchor)+:host(.navbar-vertical-item){margin-block-start:var(--si-sys-sizing-spacing-y-40)}:host-context(.nav-text-only si-navbar-vertical-next-group) .item-title{margin-inline-start:0}:host-context(si-navbar-vertical-next-group) :host(.navbar-vertical-item){padding-inline-start:var(--si-sys-sizing-spacing-x-90)}:host-context(si-navbar-vertical-next-group) :host(.navbar-vertical-item) .item-title{font-weight:400}:host-context(si-navbar-vertical-next-group.flat-group-active) :host(.navbar-vertical-item){padding-inline-start:calc(1lh + var(--si-sys-sizing-spacing-x-80))}:host-context(.dropdown-menu) :host(.navbar-vertical-item){padding-inline-start:0}:host-context(.dropdown-menu) :host(.navbar-vertical-item) .item-title{font-weight:400}:host-context(.nav-collapsed) .badge{position:absolute;inset-block-start:var(--si-sys-sizing-spacing-y-20);inset-inline-end:var(--si-sys-sizing-spacing-x-30);min-inline-size:.875rem;border-radius:.4375rem;font-size:var(--si-sys-typography-font-size-body-sm);line-height:.875rem;padding-block:0;padding-inline:var(--si-sys-sizing-spacing-x-20);font-family:var(--element-body-font-family);font-weight:600;text-align:center}:host-context(.nav-collapsed) .badge.badge-text-only{color:transparent;font-size:0}:host-context(.nav-collapsed) :is(.item-title,.dropdown-caret){position:absolute!important;inline-size:1px!important;block-size:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}:host-context(.nav-collapsed).hide-badge-collapsed .badge{display:none}.badge{margin-inline:auto 0}:host-context(.nav-flat-group-open){display:none}:host-context(si-navbar-vertical-next-group.flat-group-active){display:flex}\n"] }]
|
|
429
464
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], badgeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeColor", required: false }] }], hideBadgeWhenCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideBadgeWhenCollapsed", required: false }] }], activeOverride: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeOverride", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
430
465
|
|
|
431
466
|
/**
|
|
@@ -523,6 +558,23 @@ class SiNavbarVerticalNextComponent {
|
|
|
523
558
|
...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
|
|
524
559
|
smallScreen = signal(false, /* @ts-ignore */
|
|
525
560
|
...(ngDevMode ? [{ debugName: "smallScreen" }] : /* istanbul ignore next */ []));
|
|
561
|
+
mobileScreen = signal(false, /* @ts-ignore */
|
|
562
|
+
...(ngDevMode ? [{ debugName: "mobileScreen" }] : /* istanbul ignore next */ []));
|
|
563
|
+
/**
|
|
564
|
+
* `true` when triggering a group should open the mobile flat group
|
|
565
|
+
* instead of inline/flyout. Requires `alwaysFlyout` and a viewport width at
|
|
566
|
+
* or below {@link BOOTSTRAP_BREAKPOINTS.smMinimum}, 576px. Collapsing the
|
|
567
|
+
* drawer on mobile must not reset the open flat group, so this stays `true`
|
|
568
|
+
* regardless of `collapsed`.
|
|
569
|
+
* @internal
|
|
570
|
+
*/
|
|
571
|
+
flatMode = computed(() => this.alwaysFlyout() && this.mobileScreen(), /* @ts-ignore */
|
|
572
|
+
...(ngDevMode ? [{ debugName: "flatMode" }] : /* istanbul ignore next */ []));
|
|
573
|
+
/** Id of the group currently shown as a mobile flat group.
|
|
574
|
+
* @internal
|
|
575
|
+
*/
|
|
576
|
+
openFlatGroupId = signal(undefined, /* @ts-ignore */
|
|
577
|
+
...(ngDevMode ? [{ debugName: "openFlatGroupId" }] : /* istanbul ignore next */ []));
|
|
526
578
|
/** Chip menu sub-component; present only while the parent template renders it.
|
|
527
579
|
* @internal
|
|
528
580
|
*/
|
|
@@ -567,7 +619,7 @@ class SiNavbarVerticalNextComponent {
|
|
|
567
619
|
/** `true` when groups should render as flyout overlays.
|
|
568
620
|
* @internal
|
|
569
621
|
*/
|
|
570
|
-
flyoutMode = computed(() => this.alwaysFlyout() || this.collapsed(), /* @ts-ignore */
|
|
622
|
+
flyoutMode = computed(() => !this.flatMode() && (this.alwaysFlyout() || this.collapsed()), /* @ts-ignore */
|
|
571
623
|
...(ngDevMode ? [{ debugName: "flyoutMode" }] : /* istanbul ignore next */ []));
|
|
572
624
|
/** `true` when the chip menu overlay is open.
|
|
573
625
|
* @internal
|
|
@@ -580,6 +632,11 @@ class SiNavbarVerticalNextComponent {
|
|
|
580
632
|
hasVisibleChip = computed(() => this.chipMode() && !!this.activeItem(), /* @ts-ignore */
|
|
581
633
|
...(ngDevMode ? [{ debugName: "hasVisibleChip" }] : /* istanbul ignore next */ []));
|
|
582
634
|
constructor() {
|
|
635
|
+
effect(() => {
|
|
636
|
+
if (!this.flatMode()) {
|
|
637
|
+
this.closeFlatGroup();
|
|
638
|
+
}
|
|
639
|
+
});
|
|
583
640
|
this.breakpointObserver
|
|
584
641
|
.observe(`(max-width: ${BOOTSTRAP_BREAKPOINTS.lgMinimum}px)`)
|
|
585
642
|
.pipe(takeUntilDestroyed())
|
|
@@ -587,6 +644,10 @@ class SiNavbarVerticalNextComponent {
|
|
|
587
644
|
this.collapsed.set(matches || this.preferCollapse);
|
|
588
645
|
this.smallScreen.set(matches);
|
|
589
646
|
});
|
|
647
|
+
this.breakpointObserver
|
|
648
|
+
.observe(`(max-width: ${BOOTSTRAP_BREAKPOINTS.smMinimum}px)`)
|
|
649
|
+
.pipe(takeUntilDestroyed())
|
|
650
|
+
.subscribe(({ matches }) => this.mobileScreen.set(matches));
|
|
590
651
|
}
|
|
591
652
|
ngOnChanges(changes) {
|
|
592
653
|
if (changes.collapsed) {
|
|
@@ -642,6 +703,12 @@ class SiNavbarVerticalNextComponent {
|
|
|
642
703
|
}
|
|
643
704
|
this.saveUIState();
|
|
644
705
|
}
|
|
706
|
+
/** Closes the open mobile flat group.
|
|
707
|
+
* @internal
|
|
708
|
+
*/
|
|
709
|
+
closeFlatGroup() {
|
|
710
|
+
this.openFlatGroupId.set(undefined);
|
|
711
|
+
}
|
|
645
712
|
saveUIState() {
|
|
646
713
|
const stateId = this.stateId();
|
|
647
714
|
if (!this.uiStateService || !stateId) {
|
|
@@ -660,7 +727,7 @@ class SiNavbarVerticalNextComponent {
|
|
|
660
727
|
this.chipMenu()?.close();
|
|
661
728
|
}
|
|
662
729
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
663
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiNavbarVerticalNextComponent, isStandalone: true, selector: "si-navbar-vertical-next", inputs: { collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, textOnly: { classPropertyName: "textOnly", publicName: "textOnly", isSignal: true, isRequired: false, transformFunction: null }, inlineCollapse: { classPropertyName: "inlineCollapse", publicName: "inlineCollapse", isSignal: true, isRequired: false, transformFunction: null }, alwaysFlyout: { classPropertyName: "alwaysFlyout", publicName: "alwaysFlyout", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, toggleButtonText: { classPropertyName: "toggleButtonText", publicName: "toggleButtonText", isSignal: true, isRequired: false, transformFunction: null }, stateId: { classPropertyName: "stateId", publicName: "stateId", isSignal: true, isRequired: false, transformFunction: null }, skipLinkNavigationLabel: { classPropertyName: "skipLinkNavigationLabel", publicName: "skipLinkNavigationLabel", isSignal: true, isRequired: false, transformFunction: null }, skipLinkMainContentLabel: { classPropertyName: "skipLinkMainContentLabel", publicName: "skipLinkMainContentLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { properties: { "class.nav-collapsed": "collapsed()", "class.nav-text-only": "textOnly()", "class.nav-inline-collapse": "inlineCollapse()", "class.has-visible-chip": "hasVisibleChip()", "class.visible": "visible()", "class.ready": "ready()" }, classAttribute: "si-layout-inner ready" }, providers: [{ provide: SI_NAVBAR_VERTICAL_NEXT, useExisting: SiNavbarVerticalNextComponent }], queries: [{ propertyName: "itemsComponent", first: true, predicate: SiNavbarVerticalNextItemsComponent, descendants: true, isSignal: true }, { propertyName: "items", predicate: SiNavbarVerticalNextItemComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chipMenu", first: true, predicate: SiNavbarVerticalNextChipMenuComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (visible()) {\n @if (smallScreen() && !collapsed()) {\n <div class=\"modal-backdrop\" animate.leave=\"backdrop-leave\" (click)=\"toggleCollapse()\"></div>\n }\n <nav\n tabindex=\"-1\"\n class=\"background-1 focus-sub-inside\"\n [class.expanded]=\"!collapsed()\"\n [siSkipLinkTarget]=\"skipLinkNavigationLabel()\"\n [class.text-only]=\"textOnly()\"\n >\n <div class=\"collapse-toggle ms-auto\">\n <div class=\"mobile-drawer focus-inside\">\n <button\n type=\"button\"\n class=\"btn btn-icon toggle-button\"\n [class.btn-ghost]=\"chipMode()\"\n [class.btn-tertiary-ghost]=\"!chipMode()\"\n [attr.aria-label]=\"toggleButtonText() | translate\"\n [attr.aria-expanded]=\"!collapsed()\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"toggleIcon()\" />\n </button>\n </div>\n </div>\n @if (hasVisibleChip()) {\n <si-navbar-vertical-next-chip-menu />\n }\n <div\n class=\"nav-content\"\n [attr.inert]=\"chipMode() ? '' : null\"\n [attr.aria-hidden]=\"chipMode() ? 'true' : null\"\n >\n <ng-content select=\"si-navbar-vertical-next-search\" />\n <ng-content select=\"si-navbar-vertical-next-items\" />\n <ng-content select=\"si-navbar-vertical-next-footer-items\" />\n </div>\n </nav>\n @if (inlineCollapse()) {\n <div class=\"toggle-placeholder\" aria-hidden=\"true\"></div>\n }\n}\n<main\n class=\"si-layout-inner focus-none\"\n tabindex=\"-1\"\n [siSkipLinkTarget]=\"skipLinkMainContentLabel()\"\n>\n <ng-content />\n</main>\n", styles: [":host{display:block;--si-layout-header-first-element-offset: 40px}:host.ready:not(.visible){padding-inline-start:0!important}:host.ready{transition:padding-inline-start calc(.5s * var(--element-animations-enabled, 1))}nav{display:flex;flex-direction:column;position:fixed;z-index:1031;inset-block-start:calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px));inset-block-end:0;inset-inline-start:0;inline-size:0;transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-collapsed) nav{z-index:1030}nav.expanded{inline-size:240px}.mobile-drawer{display:block;text-align:end;border:0;inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50));color:var(--si-sys-color-text-primary);padding-block:var(--si-sys-sizing-spacing-y-20);padding-inline:var(--si-sys-sizing-spacing-x-40);margin-block-start:var(--si-sys-sizing-spacing-y-40);border-start-end-radius:var(--element-radius-2);border-end-end-radius:var(--element-radius-2);transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease,background-color calc(.5s * var(--element-animations-enabled, 1)) ease,box-shadow calc(.5s * var(--element-animations-enabled, 1)) ease}:host(:not(.nav-collapsed):not(.nav-inline-collapse)) .mobile-drawer{inline-size:240px}.modal-backdrop{z-index:1031;transition:opacity calc(.15s * var(--element-animations-enabled, 1)) linear;opacity:1}@starting-style{.modal-backdrop{opacity:0}}.modal-backdrop.backdrop-leave{opacity:0}:host(.nav-text-only:not(.nav-inline-collapse)).nav-collapsed .mobile-drawer{background:var(--si-sys-color-background-1);box-shadow:var(--si-sys-color-effects-shadow-1)}@media(max-width:575.98px){:host.nav-collapsed .mobile-drawer{background:var(--si-sys-color-background-1);box-shadow:var(--si-sys-color-effects-shadow-1)}}@media(min-width:576px){:host:not(.nav-text-only),:host:not(.nav-collapsed),:host(.nav-inline-collapse){--si-layout-header-first-element-offset: 0}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)){padding-inline-start:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50))}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)) nav{inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50))}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)) nav.expanded{inline-size:240px}}@media(min-width:992px){:host:not(.nav-collapsed){padding-inline-start:240px}}.nav-content{display:flex;flex-direction:column;flex:1 1 auto;min-block-size:0}:host(.nav-inline-collapse){--si-layout-header-first-element-offset: 0;--si-navbar-parked-inline-start: var(--si-sys-sizing-spacing-x-60)}@media(min-width:768px){:host(.nav-inline-collapse){--si-navbar-parked-inline-start: var(--si-sys-sizing-spacing-x-90)}}:host(.nav-inline-collapse) nav{overflow:hidden}:host(.nav-inline-collapse) nav:before{content:\"\";position:absolute;inset:0;background:var(--si-sys-color-background-1);z-index:1;pointer-events:none}:host(.nav-inline-collapse) .nav-content{position:relative;z-index:2}:host(.nav-inline-collapse) .mobile-drawer:before{content:\"\";display:block;block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40))}:host(.nav-inline-collapse) .toggle-placeholder{block-size:0;margin-block-start:0;transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease,margin-block-start calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-inline-collapse) .toggle-button{position:fixed;z-index:1031;inset-block-start:calc(calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px)) + var(--si-sys-sizing-spacing-y-40) + var(--si-sys-sizing-spacing-y-20));inset-inline-start:calc(240px - calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40)) - var(--si-sys-sizing-spacing-x-40));transition:inset-inline-start calc(.5s * var(--element-animations-enabled, 1)) ease,inset-block-start calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-inline-collapse).nav-collapsed .toggle-placeholder{block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40));margin-block-start:var(--si-sys-sizing-spacing-y-60)}:host(.nav-inline-collapse).nav-collapsed .toggle-button{inset-block-start:calc(calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px)) + var(--si-sys-sizing-spacing-y-60));inset-inline-start:var(--si-navbar-parked-inline-start)}:host(.has-visible-chip) .toggle-button{border-start-end-radius:0;border-end-end-radius:0}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiNavbarVerticalNextChipMenuComponent, selector: "si-navbar-vertical-next-chip-menu" }, { kind: "directive", type: SiSkipLinkTargetDirective, selector: "[siSkipLinkTarget]", inputs: ["siSkipLinkTarget"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
730
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiNavbarVerticalNextComponent, isStandalone: true, selector: "si-navbar-vertical-next", inputs: { collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, textOnly: { classPropertyName: "textOnly", publicName: "textOnly", isSignal: true, isRequired: false, transformFunction: null }, inlineCollapse: { classPropertyName: "inlineCollapse", publicName: "inlineCollapse", isSignal: true, isRequired: false, transformFunction: null }, alwaysFlyout: { classPropertyName: "alwaysFlyout", publicName: "alwaysFlyout", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, toggleButtonText: { classPropertyName: "toggleButtonText", publicName: "toggleButtonText", isSignal: true, isRequired: false, transformFunction: null }, stateId: { classPropertyName: "stateId", publicName: "stateId", isSignal: true, isRequired: false, transformFunction: null }, skipLinkNavigationLabel: { classPropertyName: "skipLinkNavigationLabel", publicName: "skipLinkNavigationLabel", isSignal: true, isRequired: false, transformFunction: null }, skipLinkMainContentLabel: { classPropertyName: "skipLinkMainContentLabel", publicName: "skipLinkMainContentLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { properties: { "class.nav-collapsed": "collapsed()", "class.nav-text-only": "textOnly()", "class.nav-inline-collapse": "inlineCollapse()", "class.has-visible-chip": "hasVisibleChip()", "class.visible": "visible()", "class.nav-flat-group-open": "!!openFlatGroupId()", "class.ready": "ready()" }, classAttribute: "si-layout-inner ready" }, providers: [{ provide: SI_NAVBAR_VERTICAL_NEXT, useExisting: SiNavbarVerticalNextComponent }], queries: [{ propertyName: "itemsComponent", first: true, predicate: SiNavbarVerticalNextItemsComponent, descendants: true, isSignal: true }, { propertyName: "items", predicate: SiNavbarVerticalNextItemComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chipMenu", first: true, predicate: SiNavbarVerticalNextChipMenuComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (visible()) {\n @if (smallScreen() && !collapsed()) {\n <div class=\"modal-backdrop\" animate.leave=\"backdrop-leave\" (click)=\"toggleCollapse()\"></div>\n }\n <nav\n tabindex=\"-1\"\n class=\"background-1 focus-sub-inside\"\n [class.expanded]=\"!collapsed()\"\n [siSkipLinkTarget]=\"skipLinkNavigationLabel()\"\n [class.text-only]=\"textOnly()\"\n >\n <div class=\"collapse-toggle ms-auto\">\n <div class=\"mobile-drawer focus-inside\">\n <button\n type=\"button\"\n class=\"btn btn-icon toggle-button\"\n [class.btn-ghost]=\"chipMode()\"\n [class.btn-tertiary-ghost]=\"!chipMode()\"\n [attr.aria-label]=\"toggleButtonText() | translate\"\n [attr.aria-expanded]=\"!collapsed()\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"toggleIcon()\" />\n </button>\n </div>\n </div>\n @if (hasVisibleChip()) {\n <si-navbar-vertical-next-chip-menu />\n }\n <div\n class=\"nav-content\"\n [attr.inert]=\"chipMode() ? '' : null\"\n [attr.aria-hidden]=\"chipMode() ? 'true' : null\"\n >\n <ng-content select=\"si-navbar-vertical-next-search\" />\n <ng-content select=\"si-navbar-vertical-next-items\" />\n <ng-content select=\"si-navbar-vertical-next-footer-items\" />\n </div>\n </nav>\n @if (inlineCollapse()) {\n <div class=\"toggle-placeholder\" aria-hidden=\"true\"></div>\n }\n}\n<main\n class=\"si-layout-inner focus-none\"\n tabindex=\"-1\"\n [siSkipLinkTarget]=\"skipLinkMainContentLabel()\"\n>\n <ng-content />\n</main>\n", styles: [":host{display:block;--si-layout-header-first-element-offset: 40px}:host.ready:not(.visible){padding-inline-start:0!important}:host.ready{transition:padding-inline-start calc(.5s * var(--element-animations-enabled, 1))}nav{display:flex;flex-direction:column;position:fixed;z-index:1031;inset-block-start:calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px));inset-block-end:0;inset-inline-start:0;inline-size:0;transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-collapsed) nav{z-index:1030}nav.expanded{inline-size:240px}.mobile-drawer{display:block;text-align:end;border:0;inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50));color:var(--si-sys-color-text-primary);padding-block:var(--si-sys-sizing-spacing-y-20);padding-inline:var(--si-sys-sizing-spacing-x-40);margin-block-start:var(--si-sys-sizing-spacing-y-40);border-start-end-radius:var(--element-radius-2);border-end-end-radius:var(--element-radius-2);transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease,background-color calc(.5s * var(--element-animations-enabled, 1)) ease,box-shadow calc(.5s * var(--element-animations-enabled, 1)) ease}:host(:not(.nav-collapsed):not(.nav-inline-collapse)) .mobile-drawer{inline-size:240px}.modal-backdrop{z-index:1031;transition:opacity calc(.15s * var(--element-animations-enabled, 1)) linear;opacity:1}@starting-style{.modal-backdrop{opacity:0}}.modal-backdrop.backdrop-leave{opacity:0}:host(.nav-text-only:not(.nav-inline-collapse)).nav-collapsed .mobile-drawer{background:var(--si-sys-color-background-1);box-shadow:var(--si-sys-color-effects-shadow-1)}@media(max-width:575.98px){:host.nav-collapsed .mobile-drawer{background:var(--si-sys-color-background-1);box-shadow:var(--si-sys-color-effects-shadow-1)}}@media(min-width:576px){:host:not(.nav-text-only),:host:not(.nav-collapsed),:host(.nav-inline-collapse){--si-layout-header-first-element-offset: 0}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)){padding-inline-start:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50))}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)) nav{inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50))}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)) nav.expanded{inline-size:240px}}@media(min-width:992px){:host:not(.nav-collapsed){padding-inline-start:240px}}.nav-content{display:flex;flex-direction:column;flex:1 1 auto;min-block-size:0}:host(.nav-inline-collapse){--si-layout-header-first-element-offset: 0;--si-navbar-parked-inline-start: var(--si-sys-sizing-spacing-x-60)}@media(min-width:768px){:host(.nav-inline-collapse){--si-navbar-parked-inline-start: var(--si-sys-sizing-spacing-x-90)}}:host(.nav-inline-collapse) nav{overflow:hidden}:host(.nav-inline-collapse) nav:before{content:\"\";position:absolute;inset:0;background:var(--si-sys-color-background-1);z-index:1;pointer-events:none}:host(.nav-inline-collapse) .nav-content{position:relative;z-index:2}:host(.nav-inline-collapse) .mobile-drawer:before{content:\"\";display:block;block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40))}:host(.nav-inline-collapse) .toggle-placeholder{block-size:0;margin-block-start:0;transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease,margin-block-start calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-inline-collapse) .toggle-button{position:fixed;z-index:1031;inset-block-start:calc(calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px)) + var(--si-sys-sizing-spacing-y-40) + var(--si-sys-sizing-spacing-y-20));inset-inline-start:calc(240px - calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40)) - var(--si-sys-sizing-spacing-x-40));transition:inset-inline-start calc(.5s * var(--element-animations-enabled, 1)) ease,inset-block-start calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-inline-collapse).nav-collapsed .toggle-placeholder{block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40));margin-block-start:var(--si-sys-sizing-spacing-y-60)}:host(.nav-inline-collapse).nav-collapsed .toggle-button{inset-block-start:calc(calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px)) + var(--si-sys-sizing-spacing-y-60));inset-inline-start:var(--si-navbar-parked-inline-start)}:host(.has-visible-chip) .toggle-button{border-start-end-radius:0;border-end-end-radius:0}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiNavbarVerticalNextChipMenuComponent, selector: "si-navbar-vertical-next-chip-menu" }, { kind: "directive", type: SiSkipLinkTargetDirective, selector: "[siSkipLinkTarget]", inputs: ["siSkipLinkTarget"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
664
731
|
}
|
|
665
732
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextComponent, decorators: [{
|
|
666
733
|
type: Component,
|
|
@@ -676,6 +743,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
676
743
|
'[class.nav-inline-collapse]': 'inlineCollapse()',
|
|
677
744
|
'[class.has-visible-chip]': 'hasVisibleChip()',
|
|
678
745
|
'[class.visible]': 'visible()',
|
|
746
|
+
'[class.nav-flat-group-open]': '!!openFlatGroupId()',
|
|
679
747
|
'[class.ready]': 'ready()'
|
|
680
748
|
}, template: "@if (visible()) {\n @if (smallScreen() && !collapsed()) {\n <div class=\"modal-backdrop\" animate.leave=\"backdrop-leave\" (click)=\"toggleCollapse()\"></div>\n }\n <nav\n tabindex=\"-1\"\n class=\"background-1 focus-sub-inside\"\n [class.expanded]=\"!collapsed()\"\n [siSkipLinkTarget]=\"skipLinkNavigationLabel()\"\n [class.text-only]=\"textOnly()\"\n >\n <div class=\"collapse-toggle ms-auto\">\n <div class=\"mobile-drawer focus-inside\">\n <button\n type=\"button\"\n class=\"btn btn-icon toggle-button\"\n [class.btn-ghost]=\"chipMode()\"\n [class.btn-tertiary-ghost]=\"!chipMode()\"\n [attr.aria-label]=\"toggleButtonText() | translate\"\n [attr.aria-expanded]=\"!collapsed()\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"toggleIcon()\" />\n </button>\n </div>\n </div>\n @if (hasVisibleChip()) {\n <si-navbar-vertical-next-chip-menu />\n }\n <div\n class=\"nav-content\"\n [attr.inert]=\"chipMode() ? '' : null\"\n [attr.aria-hidden]=\"chipMode() ? 'true' : null\"\n >\n <ng-content select=\"si-navbar-vertical-next-search\" />\n <ng-content select=\"si-navbar-vertical-next-items\" />\n <ng-content select=\"si-navbar-vertical-next-footer-items\" />\n </div>\n </nav>\n @if (inlineCollapse()) {\n <div class=\"toggle-placeholder\" aria-hidden=\"true\"></div>\n }\n}\n<main\n class=\"si-layout-inner focus-none\"\n tabindex=\"-1\"\n [siSkipLinkTarget]=\"skipLinkMainContentLabel()\"\n>\n <ng-content />\n</main>\n", styles: [":host{display:block;--si-layout-header-first-element-offset: 40px}:host.ready:not(.visible){padding-inline-start:0!important}:host.ready{transition:padding-inline-start calc(.5s * var(--element-animations-enabled, 1))}nav{display:flex;flex-direction:column;position:fixed;z-index:1031;inset-block-start:calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px));inset-block-end:0;inset-inline-start:0;inline-size:0;transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-collapsed) nav{z-index:1030}nav.expanded{inline-size:240px}.mobile-drawer{display:block;text-align:end;border:0;inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50));color:var(--si-sys-color-text-primary);padding-block:var(--si-sys-sizing-spacing-y-20);padding-inline:var(--si-sys-sizing-spacing-x-40);margin-block-start:var(--si-sys-sizing-spacing-y-40);border-start-end-radius:var(--element-radius-2);border-end-end-radius:var(--element-radius-2);transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease,background-color calc(.5s * var(--element-animations-enabled, 1)) ease,box-shadow calc(.5s * var(--element-animations-enabled, 1)) ease}:host(:not(.nav-collapsed):not(.nav-inline-collapse)) .mobile-drawer{inline-size:240px}.modal-backdrop{z-index:1031;transition:opacity calc(.15s * var(--element-animations-enabled, 1)) linear;opacity:1}@starting-style{.modal-backdrop{opacity:0}}.modal-backdrop.backdrop-leave{opacity:0}:host(.nav-text-only:not(.nav-inline-collapse)).nav-collapsed .mobile-drawer{background:var(--si-sys-color-background-1);box-shadow:var(--si-sys-color-effects-shadow-1)}@media(max-width:575.98px){:host.nav-collapsed .mobile-drawer{background:var(--si-sys-color-background-1);box-shadow:var(--si-sys-color-effects-shadow-1)}}@media(min-width:576px){:host:not(.nav-text-only),:host:not(.nav-collapsed),:host(.nav-inline-collapse){--si-layout-header-first-element-offset: 0}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)){padding-inline-start:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50))}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)) nav{inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-50))}:host:where(:not(.nav-text-only):not(.nav-inline-collapse)) nav.expanded{inline-size:240px}}@media(min-width:992px){:host:not(.nav-collapsed){padding-inline-start:240px}}.nav-content{display:flex;flex-direction:column;flex:1 1 auto;min-block-size:0}:host(.nav-inline-collapse){--si-layout-header-first-element-offset: 0;--si-navbar-parked-inline-start: var(--si-sys-sizing-spacing-x-60)}@media(min-width:768px){:host(.nav-inline-collapse){--si-navbar-parked-inline-start: var(--si-sys-sizing-spacing-x-90)}}:host(.nav-inline-collapse) nav{overflow:hidden}:host(.nav-inline-collapse) nav:before{content:\"\";position:absolute;inset:0;background:var(--si-sys-color-background-1);z-index:1;pointer-events:none}:host(.nav-inline-collapse) .nav-content{position:relative;z-index:2}:host(.nav-inline-collapse) .mobile-drawer:before{content:\"\";display:block;block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40))}:host(.nav-inline-collapse) .toggle-placeholder{block-size:0;margin-block-start:0;transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease,margin-block-start calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-inline-collapse) .toggle-button{position:fixed;z-index:1031;inset-block-start:calc(calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px)) + var(--si-sys-sizing-spacing-y-40) + var(--si-sys-sizing-spacing-y-20));inset-inline-start:calc(240px - calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40)) - var(--si-sys-sizing-spacing-x-40));transition:inset-inline-start calc(.5s * var(--element-animations-enabled, 1)) ease,inset-block-start calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-inline-collapse).nav-collapsed .toggle-placeholder{block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-40));margin-block-start:var(--si-sys-sizing-spacing-y-60)}:host(.nav-inline-collapse).nav-collapsed .toggle-button{inset-block-start:calc(calc(var(--si-sys-sizing-sizing-100) + 1px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px)) + var(--si-sys-sizing-spacing-y-60));inset-inline-start:var(--si-navbar-parked-inline-start)}:host(.has-visible-chip) .toggle-button{border-start-end-radius:0;border-end-end-radius:0}\n"] }]
|
|
681
749
|
}], ctorParameters: () => [], propDecorators: { collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], textOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "textOnly", required: false }] }], inlineCollapse: [{ type: i0.Input, args: [{ isSignal: true, alias: "inlineCollapse", required: false }] }], alwaysFlyout: [{ type: i0.Input, args: [{ isSignal: true, alias: "alwaysFlyout", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], toggleButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleButtonText", required: false }] }], stateId: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateId", required: false }] }], skipLinkNavigationLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipLinkNavigationLabel", required: false }] }], skipLinkMainContentLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipLinkMainContentLabel", required: false }] }], chipMenu: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiNavbarVerticalNextChipMenuComponent), { isSignal: true }] }], itemsComponent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SiNavbarVerticalNextItemsComponent), { isSignal: true }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SiNavbarVerticalNextItemComponent), { ...{
|
|
@@ -692,11 +760,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
692
760
|
*/
|
|
693
761
|
class SiNavbarVerticalNextDividerComponent {
|
|
694
762
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
695
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: SiNavbarVerticalNextDividerComponent, isStandalone: true, selector: "si-navbar-vertical-next-divider", ngImport: i0, template: '', isInline: true, styles: [":host{display:block;block-size:1px;background-color:var(--si-sys-color-border-4);margin-block:var(--si-sys-sizing-spacing-y-30);margin-inline:var(--si-sys-sizing-spacing-x-50)}\n"] });
|
|
763
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: SiNavbarVerticalNextDividerComponent, isStandalone: true, selector: "si-navbar-vertical-next-divider", ngImport: i0, template: '', isInline: true, styles: [":host{display:block;block-size:1px;background-color:var(--si-sys-color-border-4);margin-block:var(--si-sys-sizing-spacing-y-30);margin-inline:var(--si-sys-sizing-spacing-x-50)}:host-context(.nav-flat-group-open){display:none}\n"] });
|
|
696
764
|
}
|
|
697
765
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextDividerComponent, decorators: [{
|
|
698
766
|
type: Component,
|
|
699
|
-
args: [{ selector: 'si-navbar-vertical-next-divider', template: '', styles: [":host{display:block;block-size:1px;background-color:var(--si-sys-color-border-4);margin-block:var(--si-sys-sizing-spacing-y-30);margin-inline:var(--si-sys-sizing-spacing-x-50)}\n"] }]
|
|
767
|
+
args: [{ selector: 'si-navbar-vertical-next-divider', template: '', styles: [":host{display:block;block-size:1px;background-color:var(--si-sys-color-border-4);margin-block:var(--si-sys-sizing-spacing-y-30);margin-inline:var(--si-sys-sizing-spacing-x-50)}:host-context(.nav-flat-group-open){display:none}\n"] }]
|
|
700
768
|
}] });
|
|
701
769
|
|
|
702
770
|
/**
|
|
@@ -711,11 +779,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
711
779
|
*/
|
|
712
780
|
class SiNavbarVerticalNextFooterItemsComponent {
|
|
713
781
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextFooterItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
714
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: SiNavbarVerticalNextFooterItemsComponent, isStandalone: true, selector: "si-navbar-vertical-next-footer-items", ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:block;overflow-x:hidden;margin-block-start:auto;padding-block-end:var(--si-sys-sizing-spacing-y-40)}:host-context(.nav-collapsed){display:none}@media(min-width:576px){:host-context(:not(.nav-text-only).nav-collapsed){display:block}}\n"] });
|
|
782
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: SiNavbarVerticalNextFooterItemsComponent, isStandalone: true, selector: "si-navbar-vertical-next-footer-items", ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:block;overflow-x:hidden;margin-block-start:auto;padding-block-end:var(--si-sys-sizing-spacing-y-40)}:host-context(.nav-collapsed){display:none}:host-context(.nav-flat-group-open){display:none}@media(min-width:576px){:host-context(:not(.nav-text-only).nav-collapsed){display:block}}\n"] });
|
|
715
783
|
}
|
|
716
784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextFooterItemsComponent, decorators: [{
|
|
717
785
|
type: Component,
|
|
718
|
-
args: [{ selector: 'si-navbar-vertical-next-footer-items', template: '<ng-content />', styles: [":host{display:block;overflow-x:hidden;margin-block-start:auto;padding-block-end:var(--si-sys-sizing-spacing-y-40)}:host-context(.nav-collapsed){display:none}@media(min-width:576px){:host-context(:not(.nav-text-only).nav-collapsed){display:block}}\n"] }]
|
|
786
|
+
args: [{ selector: 'si-navbar-vertical-next-footer-items', template: '<ng-content />', styles: [":host{display:block;overflow-x:hidden;margin-block-start:auto;padding-block-end:var(--si-sys-sizing-spacing-y-40)}:host-context(.nav-collapsed){display:none}:host-context(.nav-flat-group-open){display:none}@media(min-width:576px){:host-context(:not(.nav-text-only).nav-collapsed){display:block}}\n"] }]
|
|
719
787
|
}] });
|
|
720
788
|
|
|
721
789
|
/**
|
|
@@ -724,60 +792,135 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
724
792
|
*/
|
|
725
793
|
/** @experimental */
|
|
726
794
|
class SiNavbarVerticalNextGroupComponent {
|
|
795
|
+
icons = addIcons({ elementLeft2 });
|
|
727
796
|
navbar = inject(SI_NAVBAR_VERTICAL_NEXT);
|
|
728
797
|
groupTrigger = inject(SiNavbarVerticalNextGroupTriggerDirective);
|
|
798
|
+
triggerItem = inject(SiNavbarVerticalNextItemComponent);
|
|
799
|
+
flatGroupTitleId = `${this.groupTrigger.groupId}-title`;
|
|
800
|
+
/**
|
|
801
|
+
* Back button text for flat groups.
|
|
802
|
+
*
|
|
803
|
+
* @defaultValue
|
|
804
|
+
* ```
|
|
805
|
+
* t(() => $localize`:@@SI_NAVBAR_VERTICAL.BACK:Back`)
|
|
806
|
+
* ```
|
|
807
|
+
*/
|
|
808
|
+
ariaLabel = input(t(() => $localize `:@@SI_NAVBAR_VERTICAL.BACK:Back`), /* @ts-ignore */
|
|
809
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
729
810
|
routerLinkActive = inject(RouterLinkActive, { optional: true });
|
|
811
|
+
focusTrap = viewChild.required(CdkTrapFocus, /* @ts-ignore */
|
|
812
|
+
...(ngDevMode ? [{ debugName: "focusTrap" }] : /* istanbul ignore next */ []));
|
|
813
|
+
wasFlatGroupActive = false;
|
|
730
814
|
visible = computed(() => {
|
|
731
|
-
return this.groupTrigger.flyout() ||
|
|
815
|
+
return (this.groupTrigger.flyout() ||
|
|
816
|
+
this.groupTrigger.flatGroupActive() ||
|
|
817
|
+
(!this.navbar.collapsed() && !this.navbar.flatMode() && this.groupTrigger.expanded()));
|
|
732
818
|
}, /* @ts-ignore */
|
|
733
819
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
734
820
|
constructor() {
|
|
735
821
|
this.routerLinkActive?.isActiveChange
|
|
736
822
|
.pipe(takeUntilDestroyed())
|
|
737
823
|
.subscribe(active => this.groupTrigger.active.set(active));
|
|
824
|
+
afterRenderEffect(() => this.updateFlatGroupFocus());
|
|
738
825
|
}
|
|
739
826
|
close() {
|
|
827
|
+
if (this.groupTrigger.flatGroupActive()) {
|
|
828
|
+
this.navbar.closeFlatGroup();
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
740
831
|
this.groupTrigger.hideFlyout();
|
|
741
832
|
}
|
|
833
|
+
updateFlatGroupFocus() {
|
|
834
|
+
const isFlatGroupActive = this.groupTrigger.flatGroupActive();
|
|
835
|
+
if (isFlatGroupActive === this.wasFlatGroupActive) {
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
this.wasFlatGroupActive = isFlatGroupActive;
|
|
839
|
+
if (isFlatGroupActive) {
|
|
840
|
+
this.focusTrap().focusTrap.focusFirstTabbableElementWhenReady();
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
this.groupTrigger.focus();
|
|
844
|
+
}
|
|
845
|
+
}
|
|
742
846
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
743
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiNavbarVerticalNextGroupComponent, isStandalone: true, selector: "si-navbar-vertical-next-group", host: { attributes: { "animate.enter": "component-enter" }, listeners: { "keydown.escape": "close()" }, properties: { "attr.role": "groupTrigger.flyout() ? 'dialog' : 'group'", "id": "groupTrigger.groupId", "attr.aria-labelledby": "groupTrigger.id" } }, ngImport: i0, template: `@if (visible()) {
|
|
847
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiNavbarVerticalNextGroupComponent, isStandalone: true, selector: "si-navbar-vertical-next-group", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "animate.enter": "component-enter" }, listeners: { "keydown.escape": "close()" }, properties: { "attr.role": "groupTrigger.flyout() ? 'dialog' : 'group'", "id": "groupTrigger.groupId", "attr.aria-labelledby": "groupTrigger.flatGroupActive() ? flatGroupTitleId : groupTrigger.id", "class.flat-group-active": "groupTrigger.flatGroupActive()" } }, viewQueries: [{ propertyName: "focusTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], ngImport: i0, template: `@if (visible()) {
|
|
744
848
|
@let flyout = groupTrigger.flyout();
|
|
849
|
+
@let flat = navbar.flatMode();
|
|
745
850
|
<div
|
|
746
851
|
animate.leave="group-leave"
|
|
747
|
-
[class.inline-group]="!flyout"
|
|
852
|
+
[class.inline-group]="!flyout && !flat"
|
|
748
853
|
[class.dropdown-menu]="flyout"
|
|
749
|
-
[
|
|
750
|
-
[cdkTrapFocusAutoCapture]="flyout"
|
|
854
|
+
[class.flat-group]="flat"
|
|
751
855
|
>
|
|
752
|
-
|
|
856
|
+
@if (groupTrigger.flatGroupActive()) {
|
|
857
|
+
<div class="flat-group-header">
|
|
858
|
+
<button
|
|
859
|
+
type="button"
|
|
860
|
+
class="btn btn-icon btn-tertiary-ghost"
|
|
861
|
+
[attr.aria-label]="ariaLabel() | translate"
|
|
862
|
+
(click)="navbar.closeFlatGroup()"
|
|
863
|
+
>
|
|
864
|
+
<si-icon class="flip-rtl" [icon]="icons.elementLeft2" />
|
|
865
|
+
</button>
|
|
866
|
+
<span class="item-title text-truncate si-h5" [id]="flatGroupTitleId">
|
|
867
|
+
{{ triggerItem.label() | translate }}
|
|
868
|
+
</span>
|
|
869
|
+
</div>
|
|
870
|
+
}
|
|
871
|
+
<div
|
|
872
|
+
[class.overflow-hidden]="!flyout"
|
|
873
|
+
[cdkTrapFocus]="flyout"
|
|
874
|
+
[cdkTrapFocusAutoCapture]="flyout"
|
|
875
|
+
>
|
|
753
876
|
<ng-content />
|
|
754
877
|
</div>
|
|
755
878
|
</div>
|
|
756
|
-
}`, isInline: true, styles: [":host.component-enter .inline-group{transition:none}.inline-group{display:grid;transition-property:grid-template-rows,opacity;transition-duration:calc(.5s * var(--element-animations-enabled, 1));transition-timing-function:ease;opacity:1;grid-template-rows:1fr;overflow:hidden}@starting-style{.inline-group{grid-template-rows:0fr;opacity:0}}.inline-group.group-leave{grid-template-rows:0fr;opacity:0}.dropdown-menu{display:block;position:static}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
|
879
|
+
}`, isInline: true, styles: [":host.component-enter .inline-group{transition:none}.inline-group{display:grid;transition-property:grid-template-rows,opacity;transition-duration:calc(.5s * var(--element-animations-enabled, 1));transition-timing-function:ease;opacity:1;grid-template-rows:1fr;overflow:hidden}@starting-style{.inline-group{grid-template-rows:0fr;opacity:0}}.inline-group.group-leave{grid-template-rows:0fr;opacity:0}.dropdown-menu{display:block;position:static}:host-context(.nav-flat-group-open){display:none}:host(.flat-group-active){display:block}.flat-group{opacity:1;transform:translate(0);transition:opacity calc(.25s * var(--element-animations-enabled, 1)) ease,transform calc(.25s * var(--element-animations-enabled, 1)) ease}@starting-style{.flat-group{opacity:0;transform:translate(16px)}}.flat-group.group-leave{display:none}.flat-group-header{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-40);padding-inline:var(--si-sys-sizing-spacing-x-50);color:var(--element-text-primary);opacity:1;transform:translateY(0);transition:opacity calc(.2s * var(--element-animations-enabled, 1)) ease,transform calc(.2s * var(--element-animations-enabled, 1)) ease}@starting-style{.flat-group-header{opacity:0;transform:translateY(-4px)}}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
757
880
|
}
|
|
758
881
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextGroupComponent, decorators: [{
|
|
759
882
|
type: Component,
|
|
760
|
-
args: [{ selector: 'si-navbar-vertical-next-group', imports: [CdkTrapFocus], template: `@if (visible()) {
|
|
883
|
+
args: [{ selector: 'si-navbar-vertical-next-group', imports: [CdkTrapFocus, SiIconComponent, SiTranslatePipe], template: `@if (visible()) {
|
|
761
884
|
@let flyout = groupTrigger.flyout();
|
|
885
|
+
@let flat = navbar.flatMode();
|
|
762
886
|
<div
|
|
763
887
|
animate.leave="group-leave"
|
|
764
|
-
[class.inline-group]="!flyout"
|
|
888
|
+
[class.inline-group]="!flyout && !flat"
|
|
765
889
|
[class.dropdown-menu]="flyout"
|
|
766
|
-
[
|
|
767
|
-
[cdkTrapFocusAutoCapture]="flyout"
|
|
890
|
+
[class.flat-group]="flat"
|
|
768
891
|
>
|
|
769
|
-
|
|
892
|
+
@if (groupTrigger.flatGroupActive()) {
|
|
893
|
+
<div class="flat-group-header">
|
|
894
|
+
<button
|
|
895
|
+
type="button"
|
|
896
|
+
class="btn btn-icon btn-tertiary-ghost"
|
|
897
|
+
[attr.aria-label]="ariaLabel() | translate"
|
|
898
|
+
(click)="navbar.closeFlatGroup()"
|
|
899
|
+
>
|
|
900
|
+
<si-icon class="flip-rtl" [icon]="icons.elementLeft2" />
|
|
901
|
+
</button>
|
|
902
|
+
<span class="item-title text-truncate si-h5" [id]="flatGroupTitleId">
|
|
903
|
+
{{ triggerItem.label() | translate }}
|
|
904
|
+
</span>
|
|
905
|
+
</div>
|
|
906
|
+
}
|
|
907
|
+
<div
|
|
908
|
+
[class.overflow-hidden]="!flyout"
|
|
909
|
+
[cdkTrapFocus]="flyout"
|
|
910
|
+
[cdkTrapFocusAutoCapture]="flyout"
|
|
911
|
+
>
|
|
770
912
|
<ng-content />
|
|
771
913
|
</div>
|
|
772
914
|
</div>
|
|
773
915
|
}`, host: {
|
|
774
916
|
'[attr.role]': "groupTrigger.flyout() ? 'dialog' : 'group'",
|
|
775
917
|
'[id]': 'groupTrigger.groupId',
|
|
776
|
-
'[attr.aria-labelledby]': 'groupTrigger.id',
|
|
918
|
+
'[attr.aria-labelledby]': 'groupTrigger.flatGroupActive() ? flatGroupTitleId : groupTrigger.id',
|
|
777
919
|
'animate.enter': 'component-enter',
|
|
920
|
+
'[class.flat-group-active]': 'groupTrigger.flatGroupActive()',
|
|
778
921
|
'(keydown.escape)': 'close()'
|
|
779
|
-
}, styles: [":host.component-enter .inline-group{transition:none}.inline-group{display:grid;transition-property:grid-template-rows,opacity;transition-duration:calc(.5s * var(--element-animations-enabled, 1));transition-timing-function:ease;opacity:1;grid-template-rows:1fr;overflow:hidden}@starting-style{.inline-group{grid-template-rows:0fr;opacity:0}}.inline-group.group-leave{grid-template-rows:0fr;opacity:0}.dropdown-menu{display:block;position:static}\n"] }]
|
|
780
|
-
}], ctorParameters: () => [] });
|
|
922
|
+
}, styles: [":host.component-enter .inline-group{transition:none}.inline-group{display:grid;transition-property:grid-template-rows,opacity;transition-duration:calc(.5s * var(--element-animations-enabled, 1));transition-timing-function:ease;opacity:1;grid-template-rows:1fr;overflow:hidden}@starting-style{.inline-group{grid-template-rows:0fr;opacity:0}}.inline-group.group-leave{grid-template-rows:0fr;opacity:0}.dropdown-menu{display:block;position:static}:host-context(.nav-flat-group-open){display:none}:host(.flat-group-active){display:block}.flat-group{opacity:1;transform:translate(0);transition:opacity calc(.25s * var(--element-animations-enabled, 1)) ease,transform calc(.25s * var(--element-animations-enabled, 1)) ease}@starting-style{.flat-group{opacity:0;transform:translate(16px)}}.flat-group.group-leave{display:none}.flat-group-header{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-40);padding-inline:var(--si-sys-sizing-spacing-x-50);color:var(--element-text-primary);opacity:1;transform:translateY(0);transition:opacity calc(.2s * var(--element-animations-enabled, 1)) ease,transform calc(.2s * var(--element-animations-enabled, 1)) ease}@starting-style{.flat-group-header{opacity:0;transform:translateY(-4px)}}\n"] }]
|
|
923
|
+
}], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], focusTrap: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkTrapFocus), { isSignal: true }] }] } });
|
|
781
924
|
|
|
782
925
|
/**
|
|
783
926
|
* Copyright (c) Siemens 2016 - 2026
|
|
@@ -795,7 +938,7 @@ class SiNavbarVerticalNextHeaderComponent {
|
|
|
795
938
|
} @else {
|
|
796
939
|
<si-navbar-vertical-next-divider class="divider" animate.leave="divider-leave" />
|
|
797
940
|
}
|
|
798
|
-
`, isInline: true, styles: [".divider,.title{opacity:1;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) calc(.25s * var(--element-animations-enabled, 1)) ease-out}@starting-style{.divider,.title{opacity:0}}:host{display:flex;align-items:center;block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-50));transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease-out}:host.collapsed{block-size:13px}:host.component-enter{transition:none}:host.component-enter .title,:host.component-enter .divider{transition:none}.title.title-leave{opacity:0;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) ease-in}:host.chip-mode .title{transition:none}.divider{flex:1;margin-block:0}.divider.divider-leave{opacity:0;transition-delay:0s}\n"], dependencies: [{ kind: "component", type: SiNavbarVerticalNextDividerComponent, selector: "si-navbar-vertical-next-divider" }] });
|
|
941
|
+
`, isInline: true, styles: [".divider,.title{opacity:1;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) calc(.25s * var(--element-animations-enabled, 1)) ease-out}@starting-style{.divider,.title{opacity:0}}:host{display:flex;align-items:center;block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-50));transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease-out}:host.collapsed{block-size:13px}:host.component-enter{transition:none}:host.component-enter .title,:host.component-enter .divider{transition:none}.title.title-leave{opacity:0;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) ease-in}:host.chip-mode .title{transition:none}.divider{flex:1;margin-block:0}.divider.divider-leave{opacity:0;transition-delay:0s}:host-context(.nav-flat-group-open){display:none}\n"], dependencies: [{ kind: "component", type: SiNavbarVerticalNextDividerComponent, selector: "si-navbar-vertical-next-divider" }] });
|
|
799
942
|
}
|
|
800
943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextHeaderComponent, decorators: [{
|
|
801
944
|
type: Component,
|
|
@@ -811,7 +954,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
811
954
|
'[class.collapsed]': 'navbar.collapsed() && !navbar.chipMenuOpen()',
|
|
812
955
|
'[class.chip-mode]': 'navbar.chipMode()',
|
|
813
956
|
'animate.enter': 'component-enter'
|
|
814
|
-
}, styles: [".divider,.title{opacity:1;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) calc(.25s * var(--element-animations-enabled, 1)) ease-out}@starting-style{.divider,.title{opacity:0}}:host{display:flex;align-items:center;block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-50));transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease-out}:host.collapsed{block-size:13px}:host.component-enter{transition:none}:host.component-enter .title,:host.component-enter .divider{transition:none}.title.title-leave{opacity:0;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) ease-in}:host.chip-mode .title{transition:none}.divider{flex:1;margin-block:0}.divider.divider-leave{opacity:0;transition-delay:0s}\n"] }]
|
|
957
|
+
}, styles: [".divider,.title{opacity:1;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) calc(.25s * var(--element-animations-enabled, 1)) ease-out}@starting-style{.divider,.title{opacity:0}}:host{display:flex;align-items:center;block-size:calc(1lh + 2 * var(--si-sys-sizing-spacing-y-50));transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease-out}:host.collapsed{block-size:13px}:host.component-enter{transition:none}:host.component-enter .title,:host.component-enter .divider{transition:none}.title.title-leave{opacity:0;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) ease-in}:host.chip-mode .title{transition:none}.divider{flex:1;margin-block:0}.divider.divider-leave{opacity:0;transition-delay:0s}:host-context(.nav-flat-group-open){display:none}\n"] }]
|
|
815
958
|
}] });
|
|
816
959
|
|
|
817
960
|
/**
|
|
@@ -849,11 +992,11 @@ class SiNavbarVerticalNextSearchComponent {
|
|
|
849
992
|
setTimeout(() => this.searchBar().focus());
|
|
850
993
|
}
|
|
851
994
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
852
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiNavbarVerticalNextSearchComponent, isStandalone: true, selector: "si-navbar-vertical-next-search", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChange: "searchChange" }, viewQueries: [{ propertyName: "searchBar", first: true, predicate: SiSearchBarComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<si-search-bar\n class=\"mx-4\"\n colorVariant=\"base-0\"\n prohibitedCharacters=\"*?\"\n [placeholder]=\"placeholder() | translate\"\n [debounceTime]=\"debounceTime()\"\n [showIcon]=\"true\"\n (searchChange)=\"searchChange.emit($event)\"\n/>\n<button\n type=\"button\"\n class=\"btn-search background-0 px-3 mx-4 mobile text-secondary\"\n [attr.aria-label]=\"placeholder() | translate\"\n (click)=\"expandForSearch()\"\n>\n <si-icon class=\"icon\" [icon]=\"icons.elementSearch\" />\n</button>\n", styles: [":host{display:flex;align-items:center;margin-block-start:var(--si-sys-sizing-spacing-y-40);padding-block:var(--si-sys-sizing-spacing-y-20);overflow-x:hidden}:host-context(.nav-collapsed){display:none}:host-context(.nav-collapsed) si-search-bar{display:none}si-search-bar{inline-size:100%}.btn-search{display:none;border:0;border-radius:var(--element-radius-2);block-size:var(--si-sys-sizing-sizing-80);inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-20));text-align:start}@media(min-width:576px){:host-context(:not(.nav-text-only).nav-collapsed){display:flex}.btn-search{display:none}:host-context(.nav-collapsed) .btn-search{display:block}}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiSearchBarComponent, selector: "si-search-bar", inputs: ["debounceTime", "prohibitedCharacters", "placeholder", "showIcon", "value", "readonly", "colorVariant", "disabled", "maxlength", "clearButtonAriaLabel"], outputs: ["searchChange"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
995
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiNavbarVerticalNextSearchComponent, isStandalone: true, selector: "si-navbar-vertical-next-search", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChange: "searchChange" }, viewQueries: [{ propertyName: "searchBar", first: true, predicate: SiSearchBarComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<si-search-bar\n class=\"mx-4\"\n colorVariant=\"base-0\"\n prohibitedCharacters=\"*?\"\n [placeholder]=\"placeholder() | translate\"\n [debounceTime]=\"debounceTime()\"\n [showIcon]=\"true\"\n (searchChange)=\"searchChange.emit($event)\"\n/>\n<button\n type=\"button\"\n class=\"btn-search background-0 px-3 mx-4 mobile text-secondary\"\n [attr.aria-label]=\"placeholder() | translate\"\n (click)=\"expandForSearch()\"\n>\n <si-icon class=\"icon\" [icon]=\"icons.elementSearch\" />\n</button>\n", styles: [":host{display:flex;align-items:center;margin-block-start:var(--si-sys-sizing-spacing-y-40);padding-block:var(--si-sys-sizing-spacing-y-20);overflow-x:hidden}:host-context(.nav-collapsed){display:none}:host-context(.nav-collapsed) si-search-bar{display:none}:host-context(.nav-flat-group-open){display:none}si-search-bar{inline-size:100%}.btn-search{display:none;border:0;border-radius:var(--element-radius-2);block-size:var(--si-sys-sizing-sizing-80);inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-20));text-align:start}@media(min-width:576px){:host-context(:not(.nav-text-only).nav-collapsed){display:flex}.btn-search{display:none}:host-context(.nav-collapsed) .btn-search{display:block}}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiSearchBarComponent, selector: "si-search-bar", inputs: ["debounceTime", "prohibitedCharacters", "placeholder", "showIcon", "value", "readonly", "colorVariant", "disabled", "maxlength", "clearButtonAriaLabel"], outputs: ["searchChange"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
853
996
|
}
|
|
854
997
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiNavbarVerticalNextSearchComponent, decorators: [{
|
|
855
998
|
type: Component,
|
|
856
|
-
args: [{ selector: 'si-navbar-vertical-next-search', imports: [SiIconComponent, SiSearchBarComponent, SiTranslatePipe], template: "<si-search-bar\n class=\"mx-4\"\n colorVariant=\"base-0\"\n prohibitedCharacters=\"*?\"\n [placeholder]=\"placeholder() | translate\"\n [debounceTime]=\"debounceTime()\"\n [showIcon]=\"true\"\n (searchChange)=\"searchChange.emit($event)\"\n/>\n<button\n type=\"button\"\n class=\"btn-search background-0 px-3 mx-4 mobile text-secondary\"\n [attr.aria-label]=\"placeholder() | translate\"\n (click)=\"expandForSearch()\"\n>\n <si-icon class=\"icon\" [icon]=\"icons.elementSearch\" />\n</button>\n", styles: [":host{display:flex;align-items:center;margin-block-start:var(--si-sys-sizing-spacing-y-40);padding-block:var(--si-sys-sizing-spacing-y-20);overflow-x:hidden}:host-context(.nav-collapsed){display:none}:host-context(.nav-collapsed) si-search-bar{display:none}si-search-bar{inline-size:100%}.btn-search{display:none;border:0;border-radius:var(--element-radius-2);block-size:var(--si-sys-sizing-sizing-80);inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-20));text-align:start}@media(min-width:576px){:host-context(:not(.nav-text-only).nav-collapsed){display:flex}.btn-search{display:none}:host-context(.nav-collapsed) .btn-search{display:block}}\n"] }]
|
|
999
|
+
args: [{ selector: 'si-navbar-vertical-next-search', imports: [SiIconComponent, SiSearchBarComponent, SiTranslatePipe], template: "<si-search-bar\n class=\"mx-4\"\n colorVariant=\"base-0\"\n prohibitedCharacters=\"*?\"\n [placeholder]=\"placeholder() | translate\"\n [debounceTime]=\"debounceTime()\"\n [showIcon]=\"true\"\n (searchChange)=\"searchChange.emit($event)\"\n/>\n<button\n type=\"button\"\n class=\"btn-search background-0 px-3 mx-4 mobile text-secondary\"\n [attr.aria-label]=\"placeholder() | translate\"\n (click)=\"expandForSearch()\"\n>\n <si-icon class=\"icon\" [icon]=\"icons.elementSearch\" />\n</button>\n", styles: [":host{display:flex;align-items:center;margin-block-start:var(--si-sys-sizing-spacing-y-40);padding-block:var(--si-sys-sizing-spacing-y-20);overflow-x:hidden}:host-context(.nav-collapsed){display:none}:host-context(.nav-collapsed) si-search-bar{display:none}:host-context(.nav-flat-group-open){display:none}si-search-bar{inline-size:100%}.btn-search{display:none;border:0;border-radius:var(--element-radius-2);block-size:var(--si-sys-sizing-sizing-80);inline-size:calc(1.5rem + 2 * var(--si-sys-sizing-spacing-x-20));text-align:start}@media(min-width:576px){:host-context(:not(.nav-text-only).nav-collapsed){display:flex}.btn-search{display:none}:host-context(.nav-collapsed) .btn-search{display:block}}\n"] }]
|
|
857
1000
|
}], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], searchBar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiSearchBarComponent), { isSignal: true }] }] } });
|
|
858
1001
|
|
|
859
1002
|
/**
|