@ojiepermana/angular 0.1.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +41 -246
  2. package/chart/README.md +0 -0
  3. package/fesm2022/ojiepermana-angular-chart.mjs +3714 -0
  4. package/fesm2022/ojiepermana-angular-chart.mjs.map +1 -0
  5. package/fesm2022/ojiepermana-angular-component.mjs +3463 -0
  6. package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
  7. package/fesm2022/ojiepermana-angular-layout.mjs +272 -401
  8. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
  9. package/fesm2022/ojiepermana-angular-navigation.mjs +2225 -135
  10. package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
  11. package/fesm2022/ojiepermana-angular-theme.mjs +381 -1
  12. package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
  13. package/fesm2022/ojiepermana-angular.mjs +15 -1
  14. package/fesm2022/ojiepermana-angular.mjs.map +1 -1
  15. package/package.json +49 -36
  16. package/theme/styles/etos.css +38 -0
  17. package/theme/styles/index.css +32 -8
  18. package/theme/styles/themes/brand/etos/color.css +21 -0
  19. package/theme/styles/themes/brand/etos/style.css +50 -0
  20. package/theme/styles/themes/library/_components.css +63 -0
  21. package/theme/styles/themes/library/_layers.css +15 -0
  22. package/theme/styles/themes/library/_material-overrides.css +254 -0
  23. package/theme/styles/themes/library/_tokens.css +54 -0
  24. package/theme/styles/themes/library/color/amber.css +18 -0
  25. package/theme/styles/themes/library/color/blue.css +23 -0
  26. package/theme/styles/themes/library/color/green.css +18 -0
  27. package/theme/styles/themes/library/color/index.css +9 -0
  28. package/theme/styles/themes/library/color/purple.css +18 -0
  29. package/theme/styles/themes/library/color/red.css +18 -0
  30. package/theme/styles/themes/library/style/brutal.css +47 -0
  31. package/theme/styles/themes/library/style/default.css +51 -0
  32. package/theme/styles/themes/library/style/index.css +8 -0
  33. package/theme/styles/themes/library/style/sharp.css +47 -0
  34. package/theme/styles/themes/library/style/soft.css +47 -0
  35. package/theme/styles/themes/mode/dark.css +20 -0
  36. package/theme/styles/themes/mode/index.css +6 -0
  37. package/theme/styles/themes/mode/light.css +24 -0
  38. package/theme/styles/themes/taildwind.css +109 -0
  39. package/types/ojiepermana-angular-chart.d.ts +1094 -0
  40. package/types/ojiepermana-angular-component.d.ts +1174 -0
  41. package/types/ojiepermana-angular-layout.d.ts +123 -76
  42. package/types/ojiepermana-angular-navigation.d.ts +257 -71
  43. package/types/ojiepermana-angular-theme.d.ts +170 -1
  44. package/types/ojiepermana-angular.d.ts +2 -1
  45. package/fesm2022/ojiepermana-angular-internal.mjs +0 -473
  46. package/fesm2022/ojiepermana-angular-internal.mjs.map +0 -1
  47. package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs +0 -785
  48. package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs.map +0 -1
  49. package/fesm2022/ojiepermana-angular-navigation-vertical.mjs +0 -1568
  50. package/fesm2022/ojiepermana-angular-navigation-vertical.mjs.map +0 -1
  51. package/fesm2022/ojiepermana-angular-shell.mjs +0 -14
  52. package/fesm2022/ojiepermana-angular-shell.mjs.map +0 -1
  53. package/fesm2022/ojiepermana-angular-theme-component.mjs +0 -235
  54. package/fesm2022/ojiepermana-angular-theme-component.mjs.map +0 -1
  55. package/fesm2022/ojiepermana-angular-theme-directive.mjs +0 -29
  56. package/fesm2022/ojiepermana-angular-theme-directive.mjs.map +0 -1
  57. package/fesm2022/ojiepermana-angular-theme-service.mjs +0 -241
  58. package/fesm2022/ojiepermana-angular-theme-service.mjs.map +0 -1
  59. package/layout/README.md +0 -144
  60. package/navigation/README.md +0 -215
  61. package/shell/README.md +0 -37
  62. package/styles/index.css +0 -2
  63. package/styles/resets.css +0 -22
  64. package/theme/README.md +0 -379
  65. package/theme/styles/adapters/material-ui/index.css +0 -205
  66. package/theme/styles/layout/horizontal.css +0 -109
  67. package/theme/styles/layout/index.css +0 -19
  68. package/theme/styles/layout/vertical.css +0 -75
  69. package/theme/styles/modes/dark.css +0 -84
  70. package/theme/styles/presets/colors/blue.css +0 -45
  71. package/theme/styles/presets/colors/brand.css +0 -52
  72. package/theme/styles/presets/colors/cyan.css +0 -45
  73. package/theme/styles/presets/colors/green.css +0 -45
  74. package/theme/styles/presets/colors/index.css +0 -7
  75. package/theme/styles/presets/colors/orange.css +0 -45
  76. package/theme/styles/presets/colors/purple.css +0 -45
  77. package/theme/styles/presets/colors/red.css +0 -45
  78. package/theme/styles/presets/styles/flat.css +0 -61
  79. package/theme/styles/presets/styles/glass.css +0 -28
  80. package/theme/styles/presets/styles/index.css +0 -2
  81. package/theme/styles/roles/index.css +0 -67
  82. package/theme/styles/tokens/foundation.css +0 -136
  83. package/theme/styles/tokens/semantic.css +0 -87
  84. package/theme/styles/utilities/index.css +0 -88
  85. package/types/ojiepermana-angular-internal.d.ts +0 -89
  86. package/types/ojiepermana-angular-navigation-horizontal.d.ts +0 -77
  87. package/types/ojiepermana-angular-navigation-vertical.d.ts +0 -260
  88. package/types/ojiepermana-angular-shell.d.ts +0 -12
  89. package/types/ojiepermana-angular-theme-component.d.ts +0 -46
  90. package/types/ojiepermana-angular-theme-directive.d.ts +0 -10
  91. package/types/ojiepermana-angular-theme-service.d.ts +0 -68
@@ -1,785 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, signal, input, output, computed, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
3
- import { RouterLink } from '@angular/router';
4
- import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
5
- import { shouldRenderNavigationItem, hasNavigationChildren, NavigationService, getNavigationItemAction } from '@ojiepermana/angular/navigation';
6
- import { trackNavigationTreeItem, getNavigationTreePathKey, isNavigationTreeItemExpanded, toggleNavigationTreeItemExpanded, NavigationItemContent, NavigationTreeOutlet } from '@ojiepermana/angular/internal';
7
- import * as i2 from '@angular/material/divider';
8
- import { MatDividerModule } from '@angular/material/divider';
9
- import * as i1 from '@angular/material/menu';
10
- import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
11
-
12
- class HorizontalNavigationBranchItem {
13
- _menuTrigger;
14
- _rootTrigger;
15
- _activeChildBranch = null;
16
- _document = inject(DOCUMENT);
17
- isMenuOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMenuOpen" }] : /* istanbul ignore next */ []));
18
- expandedInlineBranchByParent = signal({}, ...(ngDevMode ? [{ debugName: "expandedInlineBranchByParent" }] : /* istanbul ignore next */ []));
19
- item = input.required(...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
20
- menuItem = input(false, ...(ngDevMode ? [{ debugName: "menuItem" }] : /* istanbul ignore next */ []));
21
- nested = input(false, ...(ngDevMode ? [{ debugName: "nested" }] : /* istanbul ignore next */ []));
22
- itemClicked = output();
23
- branchOpened = output();
24
- branchClosed = output();
25
- itemChildren = computed(() => this.item().children ?? [], ...(ngDevMode ? [{ debugName: "itemChildren" }] : /* istanbul ignore next */ []));
26
- treeTemplateData = computed(() => ({ inlineBranch: !this.menuItem() }), ...(ngDevMode ? [{ debugName: "treeTemplateData" }] : /* istanbul ignore next */ []));
27
- treeTrackByFn = trackNavigationTreeItem;
28
- treeShouldRenderItemFn = shouldRenderNavigationItem;
29
- treeHasChildrenFn = hasNavigationChildren;
30
- treeResolveParentKeyFn = getNavigationTreePathKey;
31
- menuPanelClass = computed(() => this.menuItem()
32
- ? 'horizontal-navigation-menu horizontal-navigation-menu--nested'
33
- : 'horizontal-navigation-menu horizontal-navigation-menu--root', ...(ngDevMode ? [{ debugName: "menuPanelClass" }] : /* istanbul ignore next */ []));
34
- hasChildren(item) {
35
- return hasNavigationChildren(item);
36
- }
37
- shouldRenderItem(item) {
38
- return shouldRenderNavigationItem(item);
39
- }
40
- trackByFn(index, item) {
41
- return trackNavigationTreeItem(index, item) ?? index;
42
- }
43
- onMenuItemTriggerClick(event) {
44
- event.stopPropagation();
45
- }
46
- onChildItemClicked(child) {
47
- this.itemClicked.emit(child);
48
- }
49
- isInlineBranchExpanded(item, parentKey) {
50
- return isNavigationTreeItemExpanded(this.expandedInlineBranchByParent(), parentKey, item);
51
- }
52
- toggleInlineBranch(item, parentKey) {
53
- this.expandedInlineBranchByParent.update((current) => toggleNavigationTreeItemExpanded(current, parentKey, item));
54
- }
55
- onInlineBranchHeaderClick(event, item, parentKey) {
56
- event.preventDefault();
57
- event.stopPropagation();
58
- this.toggleInlineBranch(item, parentKey);
59
- }
60
- getPathKey(parentKey, item) {
61
- return getNavigationTreePathKey(parentKey, item);
62
- }
63
- onChildBranchOpened(branch) {
64
- if (this._activeChildBranch && this._activeChildBranch !== branch) {
65
- this._activeChildBranch.closeMenu();
66
- }
67
- this._activeChildBranch = branch;
68
- }
69
- onChildBranchClosed(branch) {
70
- if (this._activeChildBranch === branch) {
71
- this._activeChildBranch = null;
72
- }
73
- }
74
- handleMenuOpened() {
75
- this.isMenuOpen.set(true);
76
- this._syncRootTriggerWidth();
77
- this.branchOpened.emit(this);
78
- }
79
- handleMenuClosed() {
80
- this.isMenuOpen.set(false);
81
- this._activeChildBranch?.closeMenu();
82
- this._activeChildBranch = null;
83
- this.branchClosed.emit(this);
84
- }
85
- closeMenu() {
86
- this.isMenuOpen.set(false);
87
- this._activeChildBranch?.closeMenu();
88
- this._activeChildBranch = null;
89
- this._menuTrigger?.closeMenu();
90
- }
91
- _syncRootTriggerWidth() {
92
- if (this.menuItem()) {
93
- return;
94
- }
95
- const width = this._rootTrigger?.nativeElement.offsetWidth;
96
- if (!width) {
97
- return;
98
- }
99
- this._document.documentElement.style.setProperty('--horizontal-navigation-root-trigger-width', `${width}px`);
100
- }
101
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HorizontalNavigationBranchItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
102
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: HorizontalNavigationBranchItem, isStandalone: true, selector: "horizontal-navigation-branch-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, menuItem: { classPropertyName: "menuItem", publicName: "menuItem", isSignal: true, isRequired: false, transformFunction: null }, nested: { classPropertyName: "nested", publicName: "nested", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClicked: "itemClicked", branchOpened: "branchOpened", branchClosed: "branchClosed" }, viewQueries: [{ propertyName: "_menuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }, { propertyName: "_rootTrigger", first: true, predicate: ["rootTrigger"], descendants: true }], ngImport: i0, template: `
103
- @if (menuItem()) {
104
- <button
105
- type="button"
106
- mat-menu-item
107
- class="horizontal-navigation-menu-entry horizontal-navigation-menu-entry--branch"
108
- [class.horizontal-navigation-menu-entry--nested]="nested()"
109
- [class.horizontal-navigation-menu-entry--open]="isMenuOpen()"
110
- [matMenuTriggerFor]="matMenu"
111
- [matMenuTriggerRestoreFocus]="false"
112
- (click)="onMenuItemTriggerClick($event)"
113
- (menuOpened)="handleMenuOpened()"
114
- (menuClosed)="handleMenuClosed()">
115
- <ng-container
116
- [ngTemplateOutlet]="itemBody"
117
- [ngTemplateOutletContext]="{ $implicit: item(), level: nested() ? 1 : 0 }"></ng-container>
118
- <span class="horizontal-navigation-item-dot" aria-hidden="true"></span>
119
- </button>
120
- } @else {
121
- <button
122
- type="button"
123
- #rootTrigger
124
- class="horizontal-navigation-root-trigger"
125
- [class.horizontal-navigation-root-trigger--open]="isMenuOpen()"
126
- [matMenuTriggerFor]="matMenu"
127
- [matMenuTriggerRestoreFocus]="false"
128
- (menuOpened)="handleMenuOpened()"
129
- (menuClosed)="handleMenuClosed()">
130
- <ng-container
131
- [ngTemplateOutlet]="itemBody"
132
- [ngTemplateOutletContext]="{ $implicit: item(), level: 0 }"></ng-container>
133
- <span class="horizontal-navigation-item-dot" aria-hidden="true"></span>
134
- </button>
135
- }
136
-
137
- <mat-menu
138
- #matMenu="matMenu"
139
- [class]="menuPanelClass()"
140
- [hasBackdrop]="!menuItem()"
141
- [overlapTrigger]="false"
142
- xPosition="after"
143
- yPosition="below">
144
- <navigation-tree-outlet
145
- [items]="itemChildren()"
146
- [level]="0"
147
- [parentKey]="getPathKey('root', item())"
148
- [data]="treeTemplateData()"
149
- [branchTemplate]="branchItem"
150
- [leafTemplate]="leafItem"
151
- [groupTemplate]="groupItem"
152
- [dividerTemplate]="dividerItem"
153
- [spacerTemplate]="spacerItem"
154
- [trackByFn]="treeTrackByFn"
155
- [shouldRenderItemFn]="treeShouldRenderItemFn"
156
- [hasChildrenFn]="treeHasChildrenFn"
157
- [resolveParentKeyFn]="treeResolveParentKeyFn" />
158
- </mat-menu>
159
-
160
- <ng-template #branchItem let-child let-level="level" let-parentKey="parentKey" let-isLast="isLast" let-data="data">
161
- @if (data?.['inlineBranch']) {
162
- <ng-container
163
- [ngTemplateOutlet]="inlineBranchItem"
164
- [ngTemplateOutletContext]="{
165
- $implicit: child,
166
- level: level,
167
- parentKey: parentKey,
168
- isLast: isLast,
169
- }"></ng-container>
170
- } @else {
171
- <horizontal-navigation-branch-item
172
- [item]="child"
173
- [menuItem]="true"
174
- [nested]="level > 0"
175
- (itemClicked)="onChildItemClicked($event)"
176
- (branchOpened)="onChildBranchOpened($event)"
177
- (branchClosed)="onChildBranchClosed($event)" />
178
- }
179
- </ng-template>
180
-
181
- <ng-template #groupItem let-child let-level="level" let-isLast="isLast">
182
- <div
183
- class="horizontal-navigation-group-label"
184
- [class.horizontal-navigation-group-label--nested]="level > 0"
185
- [class.horizontal-navigation-group-label--last]="isLast"
186
- [style.--horizontal-navigation-item-level]="level">
187
- {{ child.title }}
188
- </div>
189
- </ng-template>
190
-
191
- <ng-template #dividerItem>
192
- <mat-divider class="horizontal-navigation-divider"></mat-divider>
193
- </ng-template>
194
-
195
- <ng-template #spacerItem></ng-template>
196
-
197
- <ng-template #inlineBranchItem let-child let-level="level" let-parentKey="parentKey" let-isLast="isLast">
198
- <div
199
- class="horizontal-navigation-inline-branch"
200
- [class.horizontal-navigation-inline-branch--nested]="level > 0"
201
- [class.horizontal-navigation-inline-branch--expanded]="isInlineBranchExpanded(child, parentKey)"
202
- [class.horizontal-navigation-inline-branch--last]="isLast"
203
- [style.--horizontal-navigation-item-level]="level">
204
- <button
205
- type="button"
206
- class="horizontal-navigation-inline-branch-header"
207
- [title]="child.tooltip"
208
- [attr.aria-expanded]="isInlineBranchExpanded(child, parentKey)"
209
- (click)="onInlineBranchHeaderClick($event, child, parentKey)">
210
- <ng-container
211
- [ngTemplateOutlet]="itemBody"
212
- [ngTemplateOutletContext]="{ $implicit: child, level: level }"></ng-container>
213
- <span class="horizontal-navigation-inline-branch-dot" aria-hidden="true"></span>
214
- </button>
215
-
216
- @if (isInlineBranchExpanded(child, parentKey)) {
217
- <div
218
- class="horizontal-navigation-inline-branch-children"
219
- [style.--horizontal-navigation-child-level]="level + 1">
220
- <navigation-tree-outlet
221
- [items]="child.children || []"
222
- [level]="level + 1"
223
- [parentKey]="getPathKey(parentKey, child)"
224
- [data]="treeTemplateData()"
225
- [branchTemplate]="branchItem"
226
- [leafTemplate]="leafItem"
227
- [groupTemplate]="groupItem"
228
- [dividerTemplate]="dividerItem"
229
- [spacerTemplate]="spacerItem"
230
- [trackByFn]="treeTrackByFn"
231
- [shouldRenderItemFn]="treeShouldRenderItemFn"
232
- [hasChildrenFn]="treeHasChildrenFn"
233
- [resolveParentKeyFn]="treeResolveParentKeyFn" />
234
- </div>
235
- }
236
- </div>
237
- </ng-template>
238
-
239
- <ng-template #leafItem let-child let-level="level" let-isLast="isLast">
240
- @if (child.link && !child.externalLink) {
241
- <a
242
- mat-menu-item
243
- [routerLink]="child.link"
244
- [title]="child.tooltip"
245
- class="horizontal-navigation-menu-entry"
246
- [class.horizontal-navigation-menu-entry--nested]="level > 0"
247
- [class.horizontal-navigation-menu-entry--last]="isLast"
248
- [style.--horizontal-navigation-item-level]="level"
249
- (click)="onChildItemClicked(child)">
250
- <ng-container
251
- [ngTemplateOutlet]="itemBody"
252
- [ngTemplateOutletContext]="{ $implicit: child, level: level }"></ng-container>
253
- </a>
254
- } @else if (child.link && child.externalLink) {
255
- <a
256
- mat-menu-item
257
- [href]="child.link"
258
- [target]="child.target || '_blank'"
259
- [title]="child.tooltip"
260
- class="horizontal-navigation-menu-entry"
261
- [class.horizontal-navigation-menu-entry--nested]="level > 0"
262
- [class.horizontal-navigation-menu-entry--last]="isLast"
263
- [style.--horizontal-navigation-item-level]="level"
264
- (click)="onChildItemClicked(child)">
265
- <ng-container
266
- [ngTemplateOutlet]="itemBody"
267
- [ngTemplateOutletContext]="{ $implicit: child, level: level }"></ng-container>
268
- </a>
269
- } @else {
270
- <button
271
- type="button"
272
- mat-menu-item
273
- class="horizontal-navigation-menu-entry"
274
- [class.horizontal-navigation-menu-entry--nested]="level > 0"
275
- [class.horizontal-navigation-menu-entry--last]="isLast"
276
- [style.--horizontal-navigation-item-level]="level"
277
- [title]="child.tooltip"
278
- (click)="onChildItemClicked(child)">
279
- <ng-container
280
- [ngTemplateOutlet]="itemBody"
281
- [ngTemplateOutletContext]="{ $implicit: child, level: level }"></ng-container>
282
- </button>
283
- }
284
- </ng-template>
285
-
286
- <ng-template #itemBody let-currentItem let-level="level">
287
- <navigation-item-content [item]="currentItem" [level]="level" variant="horizontal"></navigation-item-content>
288
- </ng-template>
289
- `, isInline: true, styles: [".horizontal-navigation-menu.mat-mdc-menu-panel{min-width:280px;max-width:360px;overflow:hidden;border:1px solid var(--border);border-radius:1rem;background:var(--popover);color:var(--popover-foreground);font-family:var(--nav-font-family);box-shadow:0 18px 48px #0f172a29,0 6px 18px #0f172a1a}.horizontal-navigation-menu--root.mat-mdc-menu-panel{margin-top:.5rem;position:relative;border-radius:1rem;overflow:hidden}.horizontal-navigation-menu--root.mat-mdc-menu-panel:before{display:none}.horizontal-navigation-menu--nested.mat-mdc-menu-panel{margin-left:.5rem}.horizontal-navigation-menu .mat-mdc-menu-content{padding:.5rem 0;background:var(--popover)}.horizontal-navigation-menu .mat-mdc-menu-item{min-height:3rem;line-height:normal;color:inherit;background:transparent}.horizontal-navigation-menu .mat-mdc-menu-item .mat-mdc-menu-item-text{display:flex;align-items:center;width:100%;min-width:0;gap:.75rem}.horizontal-navigation-menu .horizontal-navigation-menu-entry.mat-mdc-menu-item-submenu-trigger .mat-mdc-menu-submenu-icon{display:none}.horizontal-navigation-root-trigger{display:inline-flex;align-items:center;gap:.75rem;width:auto;border:0;border-radius:0;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight);color:inherit;background:transparent;transition:background-color .15s ease,color .15s ease}.horizontal-navigation-menu-entry{display:flex;align-items:center;width:100%;gap:.875rem;border-radius:.75rem;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight);color:inherit;background:transparent;transition:background-color .15s ease,color .15s ease}.horizontal-navigation-root-trigger{position:relative;padding:0 .875rem 0 0;white-space:nowrap}.horizontal-navigation-menu-entry{box-sizing:border-box;padding:.75rem;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight)}.horizontal-navigation-menu-entry.horizontal-navigation-menu-entry--nested{position:relative;padding-left:calc(1rem + (var(--horizontal-navigation-item-level, 1) * .5rem))}.horizontal-navigation-root-trigger:hover,.horizontal-navigation-menu .horizontal-navigation-menu-entry:hover,.horizontal-navigation-menu .horizontal-navigation-menu-entry.cdk-program-focused,.horizontal-navigation-menu .horizontal-navigation-menu-entry.cdk-keyboard-focused,.horizontal-navigation-menu .horizontal-navigation-menu-entry.mat-mdc-menu-item-highlighted{background:var(--accent);color:var(--accent-foreground)}.horizontal-navigation-root-trigger:hover,.horizontal-navigation-root-trigger:focus-visible{background:transparent;color:inherit}.horizontal-navigation-root-trigger.horizontal-navigation-root-trigger--open{z-index:1101;border-color:transparent;padding-bottom:0;background:transparent;color:inherit;box-shadow:none}.horizontal-navigation-root-trigger.horizontal-navigation-root-trigger--open:hover,.horizontal-navigation-root-trigger.horizontal-navigation-root-trigger--open:focus-visible{background:transparent;color:inherit}.horizontal-navigation-item-body{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:.875rem}.horizontal-navigation-item-leading{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:.75rem}.horizontal-navigation-item-leading--nested:before{content:\"\";width:.875rem;min-width:.875rem;border-top:1px dashed var(--border);opacity:.9}.horizontal-navigation-item-icon{width:1.125rem;height:1.125rem;flex-shrink:0}.horizontal-navigation-item-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-word}.horizontal-navigation-item-badge{margin-left:auto;display:inline-flex;align-items:center;padding:.1875rem .5rem;border-radius:9999px;font-size:.75rem;line-height:1rem;font-weight:500;flex-shrink:0}.horizontal-navigation-item-dot,.horizontal-navigation-inline-branch-dot{margin-left:auto;width:.5rem;height:.5rem;flex-shrink:0;border-radius:9999px;background:#9ca3af;opacity:.85;transition:background-color .18s ease,opacity .18s ease,transform .18s ease}.horizontal-navigation-inline-branch{padding:.125rem 0}.horizontal-navigation-inline-branch-header{display:flex;align-items:center;width:100%;box-sizing:border-box;padding:.875rem .75rem .375rem;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight);color:var(--foreground);background:transparent;transition:background-color .15s ease,color .15s ease}.horizontal-navigation-inline-branch-header:hover,.horizontal-navigation-inline-branch-header:focus-visible{background:var(--accent);color:var(--accent-foreground)}.horizontal-navigation-inline-branch--nested .horizontal-navigation-inline-branch-header{position:relative;padding-left:calc(1rem + (var(--horizontal-navigation-item-level, 1) * .5rem))}.horizontal-navigation-root-trigger.horizontal-navigation-root-trigger--open .horizontal-navigation-item-dot,.horizontal-navigation-menu-entry.horizontal-navigation-menu-entry--open .horizontal-navigation-item-dot,.horizontal-navigation-inline-branch--expanded>.horizontal-navigation-inline-branch-header .horizontal-navigation-inline-branch-dot{background:#16a34a;opacity:1;transform:scale(1.1)}.horizontal-navigation-inline-branch-header:hover .horizontal-navigation-inline-branch-dot,.horizontal-navigation-menu .horizontal-navigation-menu-entry--branch:hover .horizontal-navigation-item-dot,.horizontal-navigation-root-trigger:hover .horizontal-navigation-item-dot{opacity:1}.horizontal-navigation-inline-branch-children{position:relative;display:block;overflow:hidden;padding-left:0;padding-bottom:.25rem}.horizontal-navigation-inline-branch-children:before{content:\"\";position:absolute;left:calc(.875rem + ((var(--horizontal-navigation-child-level, 1) - 1) * 1rem));top:-.25rem;bottom:0;border-left:1px dashed color-mix(in srgb,var(--border) 82%,transparent);pointer-events:none}.horizontal-navigation-group-label{padding:.875rem .75rem .375rem;font-size:var(--nav-group-title-font-size);line-height:var(--nav-group-title-line-height);font-weight:var(--nav-group-title-font-weight);text-transform:uppercase;letter-spacing:var(--nav-group-title-letter-spacing);color:var(--muted-foreground)}.horizontal-navigation-group-label--nested{position:relative;padding-left:calc(1rem + (var(--horizontal-navigation-item-level, 1) * .5rem))}.horizontal-navigation-group-label--nested:before{content:\"\";position:absolute;left:calc(.875rem + ((var(--horizontal-navigation-item-level, 1) - 1) * 1rem));top:calc(50% + .375rem);width:.875rem;border-top:1px dashed var(--border);transform:translateY(-50%);pointer-events:none}.horizontal-navigation-menu-entry.horizontal-navigation-menu-entry--nested.horizontal-navigation-menu-entry--last:after,.horizontal-navigation-group-label--nested.horizontal-navigation-group-label--last:after,.horizontal-navigation-inline-branch--nested.horizontal-navigation-inline-branch--last:not(.horizontal-navigation-inline-branch--expanded) .horizontal-navigation-inline-branch-header:after{content:\"\";position:absolute;left:calc(.875rem + ((var(--horizontal-navigation-item-level, 1) - 1) * 1rem));top:calc(50% + .375rem);bottom:-.5rem;width:2px;background:var(--popover);transform:translate(-50%);pointer-events:none}.horizontal-navigation-menu .horizontal-navigation-divider{margin:.375rem 0;border-top-color:var(--border)}.cdk-overlay-pane .horizontal-navigation-menu.mat-mdc-menu-panel{z-index:1000}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => HorizontalNavigationBranchItem), selector: "horizontal-navigation-branch-item", inputs: ["item", "menuItem", "nested"], outputs: ["itemClicked", "branchOpened", "branchClosed"] }, { kind: "ngmodule", type: i0.forwardRef(() => MatMenuModule) }, { kind: "component", type: i0.forwardRef(() => i1.MatMenu), selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i0.forwardRef(() => i1.MatMenuItem), selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i0.forwardRef(() => i1.MatMenuTrigger), selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: i0.forwardRef(() => MatDividerModule) }, { kind: "component", type: i0.forwardRef(() => i2.MatDivider), selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i0.forwardRef(() => RouterLink), selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => NavigationItemContent), selector: "navigation-item-content", inputs: ["item", "level", "variant"] }, { kind: "component", type: i0.forwardRef(() => NavigationTreeOutlet), selector: "navigation-tree-outlet", inputs: ["items", "level", "parentKey", "data", "branchTemplate", "leafTemplate", "groupTemplate", "dividerTemplate", "spacerTemplate", "trackByFn", "shouldRenderItemFn", "hasChildrenFn", "resolveParentKeyFn"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
290
- }
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HorizontalNavigationBranchItem, decorators: [{
292
- type: Component,
293
- args: [{ selector: 'horizontal-navigation-branch-item', template: `
294
- @if (menuItem()) {
295
- <button
296
- type="button"
297
- mat-menu-item
298
- class="horizontal-navigation-menu-entry horizontal-navigation-menu-entry--branch"
299
- [class.horizontal-navigation-menu-entry--nested]="nested()"
300
- [class.horizontal-navigation-menu-entry--open]="isMenuOpen()"
301
- [matMenuTriggerFor]="matMenu"
302
- [matMenuTriggerRestoreFocus]="false"
303
- (click)="onMenuItemTriggerClick($event)"
304
- (menuOpened)="handleMenuOpened()"
305
- (menuClosed)="handleMenuClosed()">
306
- <ng-container
307
- [ngTemplateOutlet]="itemBody"
308
- [ngTemplateOutletContext]="{ $implicit: item(), level: nested() ? 1 : 0 }"></ng-container>
309
- <span class="horizontal-navigation-item-dot" aria-hidden="true"></span>
310
- </button>
311
- } @else {
312
- <button
313
- type="button"
314
- #rootTrigger
315
- class="horizontal-navigation-root-trigger"
316
- [class.horizontal-navigation-root-trigger--open]="isMenuOpen()"
317
- [matMenuTriggerFor]="matMenu"
318
- [matMenuTriggerRestoreFocus]="false"
319
- (menuOpened)="handleMenuOpened()"
320
- (menuClosed)="handleMenuClosed()">
321
- <ng-container
322
- [ngTemplateOutlet]="itemBody"
323
- [ngTemplateOutletContext]="{ $implicit: item(), level: 0 }"></ng-container>
324
- <span class="horizontal-navigation-item-dot" aria-hidden="true"></span>
325
- </button>
326
- }
327
-
328
- <mat-menu
329
- #matMenu="matMenu"
330
- [class]="menuPanelClass()"
331
- [hasBackdrop]="!menuItem()"
332
- [overlapTrigger]="false"
333
- xPosition="after"
334
- yPosition="below">
335
- <navigation-tree-outlet
336
- [items]="itemChildren()"
337
- [level]="0"
338
- [parentKey]="getPathKey('root', item())"
339
- [data]="treeTemplateData()"
340
- [branchTemplate]="branchItem"
341
- [leafTemplate]="leafItem"
342
- [groupTemplate]="groupItem"
343
- [dividerTemplate]="dividerItem"
344
- [spacerTemplate]="spacerItem"
345
- [trackByFn]="treeTrackByFn"
346
- [shouldRenderItemFn]="treeShouldRenderItemFn"
347
- [hasChildrenFn]="treeHasChildrenFn"
348
- [resolveParentKeyFn]="treeResolveParentKeyFn" />
349
- </mat-menu>
350
-
351
- <ng-template #branchItem let-child let-level="level" let-parentKey="parentKey" let-isLast="isLast" let-data="data">
352
- @if (data?.['inlineBranch']) {
353
- <ng-container
354
- [ngTemplateOutlet]="inlineBranchItem"
355
- [ngTemplateOutletContext]="{
356
- $implicit: child,
357
- level: level,
358
- parentKey: parentKey,
359
- isLast: isLast,
360
- }"></ng-container>
361
- } @else {
362
- <horizontal-navigation-branch-item
363
- [item]="child"
364
- [menuItem]="true"
365
- [nested]="level > 0"
366
- (itemClicked)="onChildItemClicked($event)"
367
- (branchOpened)="onChildBranchOpened($event)"
368
- (branchClosed)="onChildBranchClosed($event)" />
369
- }
370
- </ng-template>
371
-
372
- <ng-template #groupItem let-child let-level="level" let-isLast="isLast">
373
- <div
374
- class="horizontal-navigation-group-label"
375
- [class.horizontal-navigation-group-label--nested]="level > 0"
376
- [class.horizontal-navigation-group-label--last]="isLast"
377
- [style.--horizontal-navigation-item-level]="level">
378
- {{ child.title }}
379
- </div>
380
- </ng-template>
381
-
382
- <ng-template #dividerItem>
383
- <mat-divider class="horizontal-navigation-divider"></mat-divider>
384
- </ng-template>
385
-
386
- <ng-template #spacerItem></ng-template>
387
-
388
- <ng-template #inlineBranchItem let-child let-level="level" let-parentKey="parentKey" let-isLast="isLast">
389
- <div
390
- class="horizontal-navigation-inline-branch"
391
- [class.horizontal-navigation-inline-branch--nested]="level > 0"
392
- [class.horizontal-navigation-inline-branch--expanded]="isInlineBranchExpanded(child, parentKey)"
393
- [class.horizontal-navigation-inline-branch--last]="isLast"
394
- [style.--horizontal-navigation-item-level]="level">
395
- <button
396
- type="button"
397
- class="horizontal-navigation-inline-branch-header"
398
- [title]="child.tooltip"
399
- [attr.aria-expanded]="isInlineBranchExpanded(child, parentKey)"
400
- (click)="onInlineBranchHeaderClick($event, child, parentKey)">
401
- <ng-container
402
- [ngTemplateOutlet]="itemBody"
403
- [ngTemplateOutletContext]="{ $implicit: child, level: level }"></ng-container>
404
- <span class="horizontal-navigation-inline-branch-dot" aria-hidden="true"></span>
405
- </button>
406
-
407
- @if (isInlineBranchExpanded(child, parentKey)) {
408
- <div
409
- class="horizontal-navigation-inline-branch-children"
410
- [style.--horizontal-navigation-child-level]="level + 1">
411
- <navigation-tree-outlet
412
- [items]="child.children || []"
413
- [level]="level + 1"
414
- [parentKey]="getPathKey(parentKey, child)"
415
- [data]="treeTemplateData()"
416
- [branchTemplate]="branchItem"
417
- [leafTemplate]="leafItem"
418
- [groupTemplate]="groupItem"
419
- [dividerTemplate]="dividerItem"
420
- [spacerTemplate]="spacerItem"
421
- [trackByFn]="treeTrackByFn"
422
- [shouldRenderItemFn]="treeShouldRenderItemFn"
423
- [hasChildrenFn]="treeHasChildrenFn"
424
- [resolveParentKeyFn]="treeResolveParentKeyFn" />
425
- </div>
426
- }
427
- </div>
428
- </ng-template>
429
-
430
- <ng-template #leafItem let-child let-level="level" let-isLast="isLast">
431
- @if (child.link && !child.externalLink) {
432
- <a
433
- mat-menu-item
434
- [routerLink]="child.link"
435
- [title]="child.tooltip"
436
- class="horizontal-navigation-menu-entry"
437
- [class.horizontal-navigation-menu-entry--nested]="level > 0"
438
- [class.horizontal-navigation-menu-entry--last]="isLast"
439
- [style.--horizontal-navigation-item-level]="level"
440
- (click)="onChildItemClicked(child)">
441
- <ng-container
442
- [ngTemplateOutlet]="itemBody"
443
- [ngTemplateOutletContext]="{ $implicit: child, level: level }"></ng-container>
444
- </a>
445
- } @else if (child.link && child.externalLink) {
446
- <a
447
- mat-menu-item
448
- [href]="child.link"
449
- [target]="child.target || '_blank'"
450
- [title]="child.tooltip"
451
- class="horizontal-navigation-menu-entry"
452
- [class.horizontal-navigation-menu-entry--nested]="level > 0"
453
- [class.horizontal-navigation-menu-entry--last]="isLast"
454
- [style.--horizontal-navigation-item-level]="level"
455
- (click)="onChildItemClicked(child)">
456
- <ng-container
457
- [ngTemplateOutlet]="itemBody"
458
- [ngTemplateOutletContext]="{ $implicit: child, level: level }"></ng-container>
459
- </a>
460
- } @else {
461
- <button
462
- type="button"
463
- mat-menu-item
464
- class="horizontal-navigation-menu-entry"
465
- [class.horizontal-navigation-menu-entry--nested]="level > 0"
466
- [class.horizontal-navigation-menu-entry--last]="isLast"
467
- [style.--horizontal-navigation-item-level]="level"
468
- [title]="child.tooltip"
469
- (click)="onChildItemClicked(child)">
470
- <ng-container
471
- [ngTemplateOutlet]="itemBody"
472
- [ngTemplateOutletContext]="{ $implicit: child, level: level }"></ng-container>
473
- </button>
474
- }
475
- </ng-template>
476
-
477
- <ng-template #itemBody let-currentItem let-level="level">
478
- <navigation-item-content [item]="currentItem" [level]="level" variant="horizontal"></navigation-item-content>
479
- </ng-template>
480
- `, imports: [
481
- MatMenuModule,
482
- MatDividerModule,
483
- RouterLink,
484
- NgTemplateOutlet,
485
- NavigationItemContent,
486
- NavigationTreeOutlet,
487
- forwardRef(() => HorizontalNavigationBranchItem),
488
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".horizontal-navigation-menu.mat-mdc-menu-panel{min-width:280px;max-width:360px;overflow:hidden;border:1px solid var(--border);border-radius:1rem;background:var(--popover);color:var(--popover-foreground);font-family:var(--nav-font-family);box-shadow:0 18px 48px #0f172a29,0 6px 18px #0f172a1a}.horizontal-navigation-menu--root.mat-mdc-menu-panel{margin-top:.5rem;position:relative;border-radius:1rem;overflow:hidden}.horizontal-navigation-menu--root.mat-mdc-menu-panel:before{display:none}.horizontal-navigation-menu--nested.mat-mdc-menu-panel{margin-left:.5rem}.horizontal-navigation-menu .mat-mdc-menu-content{padding:.5rem 0;background:var(--popover)}.horizontal-navigation-menu .mat-mdc-menu-item{min-height:3rem;line-height:normal;color:inherit;background:transparent}.horizontal-navigation-menu .mat-mdc-menu-item .mat-mdc-menu-item-text{display:flex;align-items:center;width:100%;min-width:0;gap:.75rem}.horizontal-navigation-menu .horizontal-navigation-menu-entry.mat-mdc-menu-item-submenu-trigger .mat-mdc-menu-submenu-icon{display:none}.horizontal-navigation-root-trigger{display:inline-flex;align-items:center;gap:.75rem;width:auto;border:0;border-radius:0;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight);color:inherit;background:transparent;transition:background-color .15s ease,color .15s ease}.horizontal-navigation-menu-entry{display:flex;align-items:center;width:100%;gap:.875rem;border-radius:.75rem;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight);color:inherit;background:transparent;transition:background-color .15s ease,color .15s ease}.horizontal-navigation-root-trigger{position:relative;padding:0 .875rem 0 0;white-space:nowrap}.horizontal-navigation-menu-entry{box-sizing:border-box;padding:.75rem;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight)}.horizontal-navigation-menu-entry.horizontal-navigation-menu-entry--nested{position:relative;padding-left:calc(1rem + (var(--horizontal-navigation-item-level, 1) * .5rem))}.horizontal-navigation-root-trigger:hover,.horizontal-navigation-menu .horizontal-navigation-menu-entry:hover,.horizontal-navigation-menu .horizontal-navigation-menu-entry.cdk-program-focused,.horizontal-navigation-menu .horizontal-navigation-menu-entry.cdk-keyboard-focused,.horizontal-navigation-menu .horizontal-navigation-menu-entry.mat-mdc-menu-item-highlighted{background:var(--accent);color:var(--accent-foreground)}.horizontal-navigation-root-trigger:hover,.horizontal-navigation-root-trigger:focus-visible{background:transparent;color:inherit}.horizontal-navigation-root-trigger.horizontal-navigation-root-trigger--open{z-index:1101;border-color:transparent;padding-bottom:0;background:transparent;color:inherit;box-shadow:none}.horizontal-navigation-root-trigger.horizontal-navigation-root-trigger--open:hover,.horizontal-navigation-root-trigger.horizontal-navigation-root-trigger--open:focus-visible{background:transparent;color:inherit}.horizontal-navigation-item-body{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:.875rem}.horizontal-navigation-item-leading{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:.75rem}.horizontal-navigation-item-leading--nested:before{content:\"\";width:.875rem;min-width:.875rem;border-top:1px dashed var(--border);opacity:.9}.horizontal-navigation-item-icon{width:1.125rem;height:1.125rem;flex-shrink:0}.horizontal-navigation-item-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-word}.horizontal-navigation-item-badge{margin-left:auto;display:inline-flex;align-items:center;padding:.1875rem .5rem;border-radius:9999px;font-size:.75rem;line-height:1rem;font-weight:500;flex-shrink:0}.horizontal-navigation-item-dot,.horizontal-navigation-inline-branch-dot{margin-left:auto;width:.5rem;height:.5rem;flex-shrink:0;border-radius:9999px;background:#9ca3af;opacity:.85;transition:background-color .18s ease,opacity .18s ease,transform .18s ease}.horizontal-navigation-inline-branch{padding:.125rem 0}.horizontal-navigation-inline-branch-header{display:flex;align-items:center;width:100%;box-sizing:border-box;padding:.875rem .75rem .375rem;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight);color:var(--foreground);background:transparent;transition:background-color .15s ease,color .15s ease}.horizontal-navigation-inline-branch-header:hover,.horizontal-navigation-inline-branch-header:focus-visible{background:var(--accent);color:var(--accent-foreground)}.horizontal-navigation-inline-branch--nested .horizontal-navigation-inline-branch-header{position:relative;padding-left:calc(1rem + (var(--horizontal-navigation-item-level, 1) * .5rem))}.horizontal-navigation-root-trigger.horizontal-navigation-root-trigger--open .horizontal-navigation-item-dot,.horizontal-navigation-menu-entry.horizontal-navigation-menu-entry--open .horizontal-navigation-item-dot,.horizontal-navigation-inline-branch--expanded>.horizontal-navigation-inline-branch-header .horizontal-navigation-inline-branch-dot{background:#16a34a;opacity:1;transform:scale(1.1)}.horizontal-navigation-inline-branch-header:hover .horizontal-navigation-inline-branch-dot,.horizontal-navigation-menu .horizontal-navigation-menu-entry--branch:hover .horizontal-navigation-item-dot,.horizontal-navigation-root-trigger:hover .horizontal-navigation-item-dot{opacity:1}.horizontal-navigation-inline-branch-children{position:relative;display:block;overflow:hidden;padding-left:0;padding-bottom:.25rem}.horizontal-navigation-inline-branch-children:before{content:\"\";position:absolute;left:calc(.875rem + ((var(--horizontal-navigation-child-level, 1) - 1) * 1rem));top:-.25rem;bottom:0;border-left:1px dashed color-mix(in srgb,var(--border) 82%,transparent);pointer-events:none}.horizontal-navigation-group-label{padding:.875rem .75rem .375rem;font-size:var(--nav-group-title-font-size);line-height:var(--nav-group-title-line-height);font-weight:var(--nav-group-title-font-weight);text-transform:uppercase;letter-spacing:var(--nav-group-title-letter-spacing);color:var(--muted-foreground)}.horizontal-navigation-group-label--nested{position:relative;padding-left:calc(1rem + (var(--horizontal-navigation-item-level, 1) * .5rem))}.horizontal-navigation-group-label--nested:before{content:\"\";position:absolute;left:calc(.875rem + ((var(--horizontal-navigation-item-level, 1) - 1) * 1rem));top:calc(50% + .375rem);width:.875rem;border-top:1px dashed var(--border);transform:translateY(-50%);pointer-events:none}.horizontal-navigation-menu-entry.horizontal-navigation-menu-entry--nested.horizontal-navigation-menu-entry--last:after,.horizontal-navigation-group-label--nested.horizontal-navigation-group-label--last:after,.horizontal-navigation-inline-branch--nested.horizontal-navigation-inline-branch--last:not(.horizontal-navigation-inline-branch--expanded) .horizontal-navigation-inline-branch-header:after{content:\"\";position:absolute;left:calc(.875rem + ((var(--horizontal-navigation-item-level, 1) - 1) * 1rem));top:calc(50% + .375rem);bottom:-.5rem;width:2px;background:var(--popover);transform:translate(-50%);pointer-events:none}.horizontal-navigation-menu .horizontal-navigation-divider{margin:.375rem 0;border-top-color:var(--border)}.cdk-overlay-pane .horizontal-navigation-menu.mat-mdc-menu-panel{z-index:1000}\n"] }]
489
- }], propDecorators: { _menuTrigger: [{
490
- type: ViewChild,
491
- args: [MatMenuTrigger]
492
- }], _rootTrigger: [{
493
- type: ViewChild,
494
- args: ['rootTrigger']
495
- }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], menuItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItem", required: false }] }], nested: [{ type: i0.Input, args: [{ isSignal: true, alias: "nested", required: false }] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }], branchOpened: [{ type: i0.Output, args: ["branchOpened"] }], branchClosed: [{ type: i0.Output, args: ["branchClosed"] }] } });
496
-
497
- class HorizontalNavigation {
498
- _navigationService = inject(NavigationService);
499
- _activeRootBranch = null;
500
- // Navigation name identifier
501
- name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
502
- // Input for navigation data
503
- navigation = input([], ...(ngDevMode ? [{ debugName: "navigation" }] : /* istanbul ignore next */ []));
504
- // Output for item clicks
505
- itemClicked = output();
506
- // Computed navigation data (from input or service)
507
- navigationData = computed(() => {
508
- const inputData = this.navigation();
509
- if (inputData.length > 0) {
510
- return inputData;
511
- }
512
- return this._navigationService.getNavigation();
513
- }, ...(ngDevMode ? [{ debugName: "navigationData" }] : /* istanbul ignore next */ []));
514
- /**
515
- * Handle item click
516
- */
517
- onItemClicked(item) {
518
- getNavigationItemAction(item)?.(item);
519
- this.itemClicked.emit(item);
520
- }
521
- onRootBranchOpened(branch) {
522
- if (this._activeRootBranch && this._activeRootBranch !== branch) {
523
- this._activeRootBranch.closeMenu();
524
- }
525
- this._activeRootBranch = branch;
526
- }
527
- onRootBranchClosed(branch) {
528
- if (this._activeRootBranch === branch) {
529
- this._activeRootBranch = null;
530
- }
531
- }
532
- shouldRenderItem(item) {
533
- return shouldRenderNavigationItem(item);
534
- }
535
- hasChildren(item) {
536
- return hasNavigationChildren(item);
537
- }
538
- /**
539
- * Get flat navigation for utility purposes
540
- */
541
- getFlatNavigation() {
542
- return this._navigationService.getFlatNavigation(this.navigationData());
543
- }
544
- /**
545
- * Get navigation item by ID
546
- */
547
- getItem(id) {
548
- return this._navigationService.getItem(id, this.navigationData());
549
- }
550
- /**
551
- * Get navigation item parent by ID
552
- */
553
- getItemParent(id) {
554
- return this._navigationService.getItemParent(id, this.navigationData(), this.navigationData());
555
- }
556
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HorizontalNavigation, deps: [], target: i0.ɵɵFactoryTarget.Component });
557
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: HorizontalNavigation, isStandalone: true, selector: "horizontal-navigation", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, navigation: { classPropertyName: "navigation", publicName: "navigation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClicked: "itemClicked" }, ngImport: i0, template: `
558
- <nav class="horizontal-navigation">
559
- @if (navigationData()) {
560
- <div class="horizontal-navigation-items">
561
- @for (item of navigationData(); track item.id || item.title) {
562
- @if (shouldRenderItem(item)) {
563
- @switch (item.type) {
564
- @case ('basic') {
565
- @if (item.link) {
566
- <a
567
- [routerLink]="item.link"
568
- [title]="item.tooltip"
569
- class="horizontal-navigation-root-trigger"
570
- (click)="onItemClicked(item)">
571
- <ng-container
572
- [ngTemplateOutlet]="itemBody"
573
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
574
- </a>
575
- } @else {
576
- <button
577
- type="button"
578
- class="horizontal-navigation-root-trigger"
579
- [title]="item.tooltip"
580
- (click)="onItemClicked(item)"
581
- (keydown.enter)="onItemClicked(item)"
582
- (keydown.space)="$event.preventDefault(); onItemClicked(item)">
583
- <ng-container
584
- [ngTemplateOutlet]="itemBody"
585
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
586
- </button>
587
- }
588
- }
589
-
590
- @case ('collapsable') {
591
- @if (hasChildren(item)) {
592
- <horizontal-navigation-branch-item
593
- [item]="item"
594
- (itemClicked)="onItemClicked($event)"
595
- (branchOpened)="onRootBranchOpened($event)"
596
- (branchClosed)="onRootBranchClosed($event)" />
597
- } @else {
598
- <button
599
- type="button"
600
- class="horizontal-navigation-root-trigger"
601
- [title]="item.tooltip"
602
- (click)="onItemClicked(item)"
603
- (keydown.enter)="onItemClicked(item)"
604
- (keydown.space)="$event.preventDefault(); onItemClicked(item)">
605
- <ng-container
606
- [ngTemplateOutlet]="itemBody"
607
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
608
- </button>
609
- }
610
- }
611
-
612
- @case ('group') {
613
- @if (hasChildren(item)) {
614
- <horizontal-navigation-branch-item
615
- [item]="item"
616
- (itemClicked)="onItemClicked($event)"
617
- (branchOpened)="onRootBranchOpened($event)"
618
- (branchClosed)="onRootBranchClosed($event)" />
619
- } @else {
620
- <button
621
- type="button"
622
- class="horizontal-navigation-root-trigger"
623
- [title]="item.tooltip"
624
- (click)="onItemClicked(item)"
625
- (keydown.enter)="onItemClicked(item)"
626
- (keydown.space)="$event.preventDefault(); onItemClicked(item)">
627
- <ng-container
628
- [ngTemplateOutlet]="itemBody"
629
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
630
- </button>
631
- }
632
- }
633
-
634
- @case ('divider') {
635
- <div class="w-px h-6 bg-border mx-2"></div>
636
- }
637
-
638
- @case ('spacer') {
639
- <div class="flex-1"></div>
640
- }
641
-
642
- @default {
643
- <button
644
- type="button"
645
- class="horizontal-navigation-root-trigger"
646
- [title]="item.tooltip"
647
- (click)="onItemClicked(item)"
648
- (keydown.enter)="onItemClicked(item)"
649
- (keydown.space)="$event.preventDefault(); onItemClicked(item)">
650
- <ng-container
651
- [ngTemplateOutlet]="itemBody"
652
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
653
- </button>
654
- }
655
- }
656
- }
657
- }
658
- </div>
659
- }
660
-
661
- <ng-template #itemBody let-currentItem>
662
- <navigation-item-content [item]="currentItem" variant="horizontal"></navigation-item-content>
663
- </ng-template>
664
- </nav>
665
- `, isInline: true, styles: [".horizontal-navigation{@apply w-full;font-family:var(--nav-font-family)}.horizontal-navigation-items{display:flex;align-items:center;gap:.25rem;overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.5) transparent}.horizontal-navigation-items::-webkit-scrollbar{height:4px}.horizontal-navigation-items::-webkit-scrollbar-track{background:transparent}.horizontal-navigation-items::-webkit-scrollbar-thumb{background:#9ca3af80;border-radius:2px}.horizontal-navigation-items::-webkit-scrollbar-thumb:hover{background:#9ca3afcc}.horizontal-navigation-root-trigger{display:inline-flex;align-items:center;gap:.75rem;width:auto;padding:.5rem 1rem .5rem .75rem;border-radius:.5rem;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight);color:inherit;background:transparent;white-space:nowrap;transition:background-color .15s ease,color .15s ease}.horizontal-navigation-root-trigger:hover,.horizontal-navigation-root-trigger:focus-visible{background:var(--accent);color:var(--accent-foreground)}.horizontal-navigation-item-body{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:.75rem}.horizontal-navigation-item-leading{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:.625rem}.horizontal-navigation-item-icon{width:1rem;height:1rem;flex-shrink:0}.horizontal-navigation-item-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.horizontal-navigation-item-badge{margin-left:auto;display:inline-flex;align-items:center;padding:.125rem .375rem;border-radius:9999px;font-size:var(--nav-badge-font-size);line-height:var(--nav-badge-line-height);font-weight:var(--nav-badge-font-weight);flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NavigationItemContent, selector: "navigation-item-content", inputs: ["item", "level", "variant"] }, { kind: "component", type: HorizontalNavigationBranchItem, selector: "horizontal-navigation-branch-item", inputs: ["item", "menuItem", "nested"], outputs: ["itemClicked", "branchOpened", "branchClosed"] }] });
666
- }
667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HorizontalNavigation, decorators: [{
668
- type: Component,
669
- args: [{ selector: 'horizontal-navigation', template: `
670
- <nav class="horizontal-navigation">
671
- @if (navigationData()) {
672
- <div class="horizontal-navigation-items">
673
- @for (item of navigationData(); track item.id || item.title) {
674
- @if (shouldRenderItem(item)) {
675
- @switch (item.type) {
676
- @case ('basic') {
677
- @if (item.link) {
678
- <a
679
- [routerLink]="item.link"
680
- [title]="item.tooltip"
681
- class="horizontal-navigation-root-trigger"
682
- (click)="onItemClicked(item)">
683
- <ng-container
684
- [ngTemplateOutlet]="itemBody"
685
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
686
- </a>
687
- } @else {
688
- <button
689
- type="button"
690
- class="horizontal-navigation-root-trigger"
691
- [title]="item.tooltip"
692
- (click)="onItemClicked(item)"
693
- (keydown.enter)="onItemClicked(item)"
694
- (keydown.space)="$event.preventDefault(); onItemClicked(item)">
695
- <ng-container
696
- [ngTemplateOutlet]="itemBody"
697
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
698
- </button>
699
- }
700
- }
701
-
702
- @case ('collapsable') {
703
- @if (hasChildren(item)) {
704
- <horizontal-navigation-branch-item
705
- [item]="item"
706
- (itemClicked)="onItemClicked($event)"
707
- (branchOpened)="onRootBranchOpened($event)"
708
- (branchClosed)="onRootBranchClosed($event)" />
709
- } @else {
710
- <button
711
- type="button"
712
- class="horizontal-navigation-root-trigger"
713
- [title]="item.tooltip"
714
- (click)="onItemClicked(item)"
715
- (keydown.enter)="onItemClicked(item)"
716
- (keydown.space)="$event.preventDefault(); onItemClicked(item)">
717
- <ng-container
718
- [ngTemplateOutlet]="itemBody"
719
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
720
- </button>
721
- }
722
- }
723
-
724
- @case ('group') {
725
- @if (hasChildren(item)) {
726
- <horizontal-navigation-branch-item
727
- [item]="item"
728
- (itemClicked)="onItemClicked($event)"
729
- (branchOpened)="onRootBranchOpened($event)"
730
- (branchClosed)="onRootBranchClosed($event)" />
731
- } @else {
732
- <button
733
- type="button"
734
- class="horizontal-navigation-root-trigger"
735
- [title]="item.tooltip"
736
- (click)="onItemClicked(item)"
737
- (keydown.enter)="onItemClicked(item)"
738
- (keydown.space)="$event.preventDefault(); onItemClicked(item)">
739
- <ng-container
740
- [ngTemplateOutlet]="itemBody"
741
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
742
- </button>
743
- }
744
- }
745
-
746
- @case ('divider') {
747
- <div class="w-px h-6 bg-border mx-2"></div>
748
- }
749
-
750
- @case ('spacer') {
751
- <div class="flex-1"></div>
752
- }
753
-
754
- @default {
755
- <button
756
- type="button"
757
- class="horizontal-navigation-root-trigger"
758
- [title]="item.tooltip"
759
- (click)="onItemClicked(item)"
760
- (keydown.enter)="onItemClicked(item)"
761
- (keydown.space)="$event.preventDefault(); onItemClicked(item)">
762
- <ng-container
763
- [ngTemplateOutlet]="itemBody"
764
- [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
765
- </button>
766
- }
767
- }
768
- }
769
- }
770
- </div>
771
- }
772
-
773
- <ng-template #itemBody let-currentItem>
774
- <navigation-item-content [item]="currentItem" variant="horizontal"></navigation-item-content>
775
- </ng-template>
776
- </nav>
777
- `, imports: [RouterLink, NgTemplateOutlet, NavigationItemContent, HorizontalNavigationBranchItem], styles: [".horizontal-navigation{@apply w-full;font-family:var(--nav-font-family)}.horizontal-navigation-items{display:flex;align-items:center;gap:.25rem;overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.5) transparent}.horizontal-navigation-items::-webkit-scrollbar{height:4px}.horizontal-navigation-items::-webkit-scrollbar-track{background:transparent}.horizontal-navigation-items::-webkit-scrollbar-thumb{background:#9ca3af80;border-radius:2px}.horizontal-navigation-items::-webkit-scrollbar-thumb:hover{background:#9ca3afcc}.horizontal-navigation-root-trigger{display:inline-flex;align-items:center;gap:.75rem;width:auto;padding:.5rem 1rem .5rem .75rem;border-radius:.5rem;font-size:var(--nav-item-font-size);line-height:var(--nav-item-line-height);font-weight:var(--nav-item-font-weight);color:inherit;background:transparent;white-space:nowrap;transition:background-color .15s ease,color .15s ease}.horizontal-navigation-root-trigger:hover,.horizontal-navigation-root-trigger:focus-visible{background:var(--accent);color:var(--accent-foreground)}.horizontal-navigation-item-body{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:.75rem}.horizontal-navigation-item-leading{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:.625rem}.horizontal-navigation-item-icon{width:1rem;height:1rem;flex-shrink:0}.horizontal-navigation-item-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.horizontal-navigation-item-badge{margin-left:auto;display:inline-flex;align-items:center;padding:.125rem .375rem;border-radius:9999px;font-size:var(--nav-badge-font-size);line-height:var(--nav-badge-line-height);font-weight:var(--nav-badge-font-weight);flex-shrink:0}\n"] }]
778
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], navigation: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigation", required: false }] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }] } });
779
-
780
- /**
781
- * Generated bundle index. Do not edit.
782
- */
783
-
784
- export { HorizontalNavigation, HorizontalNavigationBranchItem };
785
- //# sourceMappingURL=ojiepermana-angular-navigation-horizontal.mjs.map