@edsis/angular 21.1.4 → 21.1.27

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 (150) hide show
  1. package/.npmignore +2 -0
  2. package/README.md +123 -88
  3. package/brand/etos/README.md +273 -0
  4. package/brand/etos/package.json +4 -0
  5. package/chart/README.md +0 -0
  6. package/chart/package.json +4 -0
  7. package/collection.json +30 -0
  8. package/component/package.json +4 -0
  9. package/etos/styles/color.css +73 -0
  10. package/etos/styles/index.css +7 -0
  11. package/etos/styles/layout.css +21 -0
  12. package/etos/styles/package.css +15 -0
  13. package/etos/styles/style.css +53 -0
  14. package/fesm2022/ojiepermana-angular-brand-etos.mjs +1060 -0
  15. package/fesm2022/ojiepermana-angular-brand-etos.mjs.map +1 -0
  16. package/fesm2022/ojiepermana-angular-chart.mjs +3714 -0
  17. package/fesm2022/ojiepermana-angular-chart.mjs.map +1 -0
  18. package/fesm2022/ojiepermana-angular-component.mjs +4069 -0
  19. package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
  20. package/fesm2022/ojiepermana-angular-generator-api.mjs +67 -0
  21. package/fesm2022/ojiepermana-angular-generator-api.mjs.map +1 -0
  22. package/fesm2022/ojiepermana-angular-layout.mjs +457 -0
  23. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -0
  24. package/fesm2022/ojiepermana-angular-navigation.mjs +2315 -0
  25. package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -0
  26. package/fesm2022/ojiepermana-angular-theme.mjs +407 -0
  27. package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -0
  28. package/fesm2022/ojiepermana-angular.mjs +22 -0
  29. package/fesm2022/ojiepermana-angular.mjs.map +1 -0
  30. package/generator/api/README.md +246 -0
  31. package/generator/api/bin/package.json +3 -0
  32. package/generator/api/bin/schematics/init/index.js +88 -0
  33. package/generator/api/bin/schematics/ng-add/index.js +108 -0
  34. package/generator/api/bin/schematics/sdk/index.js +76 -0
  35. package/generator/api/bin/src/config/loader.js +41 -0
  36. package/generator/api/bin/src/config/schema.js +56 -0
  37. package/generator/api/bin/src/emit/client.js +246 -0
  38. package/generator/api/bin/src/emit/metadata.js +295 -0
  39. package/generator/api/bin/src/emit/models.js +106 -0
  40. package/generator/api/bin/src/emit/navigation.js +56 -0
  41. package/generator/api/bin/src/emit/operations.js +122 -0
  42. package/generator/api/bin/src/emit/public-api.js +54 -0
  43. package/generator/api/bin/src/emit/services.js +87 -0
  44. package/generator/api/bin/src/engine.js +65 -0
  45. package/generator/api/bin/src/layout/per-domain.js +355 -0
  46. package/generator/api/bin/src/parser/bundle.js +25 -0
  47. package/generator/api/bin/src/parser/ir.js +320 -0
  48. package/generator/api/bin/src/parser/types.js +7 -0
  49. package/generator/api/bin/src/render/template.js +58 -0
  50. package/generator/api/bin/src/writer/index.js +236 -0
  51. package/generator/api/package.json +4 -0
  52. package/generator/api/schematics/init/schema.json +19 -0
  53. package/generator/api/schematics/ng-add/schema.json +14 -0
  54. package/generator/api/schematics/sdk/schema.json +19 -0
  55. package/generator/api/sdk.config.example.json +22 -0
  56. package/generator/guide/README.md +84 -0
  57. package/generator/guide/bin/package.json +3 -0
  58. package/generator/guide/bin/schematics/build/index.js +35 -0
  59. package/generator/guide/bin/schematics/init/index.js +70 -0
  60. package/generator/guide/bin/src/config/loader.js +50 -0
  61. package/generator/guide/bin/src/config/schema.js +12 -0
  62. package/generator/guide/bin/src/engine/component.js +73 -0
  63. package/generator/guide/bin/src/engine/frontmatter.js +42 -0
  64. package/generator/guide/bin/src/engine/index.js +42 -0
  65. package/generator/guide/bin/src/engine/naming.js +39 -0
  66. package/generator/guide/bin/src/engine/render.js +18 -0
  67. package/generator/guide/bin/src/engine/routes.js +106 -0
  68. package/generator/guide/bin/src/engine/walk.js +35 -0
  69. package/generator/guide/guide.config.example.json +9 -0
  70. package/generator/guide/schematics/build/schema.json +14 -0
  71. package/generator/guide/schematics/init/schema.json +19 -0
  72. package/layout/package.json +4 -0
  73. package/navigation/package.json +4 -0
  74. package/package.json +102 -39
  75. package/theme/package.json +4 -0
  76. package/theme/styles/etos.css +6 -0
  77. package/theme/styles/index.css +32 -0
  78. package/theme/styles/themes/library/_components.css +81 -0
  79. package/theme/styles/themes/library/_layers.css +15 -0
  80. package/theme/styles/themes/library/_material-overrides.css +254 -0
  81. package/theme/styles/themes/library/_tokens.css +55 -0
  82. package/theme/styles/themes/library/color/amber.css +31 -0
  83. package/theme/styles/themes/library/color/base.css +36 -0
  84. package/theme/styles/themes/library/color/blue.css +31 -0
  85. package/theme/styles/themes/library/color/cyan.css +31 -0
  86. package/theme/styles/themes/library/color/emerald.css +31 -0
  87. package/theme/styles/themes/library/color/fuchsia.css +31 -0
  88. package/theme/styles/themes/library/color/green.css +31 -0
  89. package/theme/styles/themes/library/color/index.css +22 -0
  90. package/theme/styles/themes/library/color/indigo.css +31 -0
  91. package/theme/styles/themes/library/color/lime.css +31 -0
  92. package/theme/styles/themes/library/color/orange.css +31 -0
  93. package/theme/styles/themes/library/color/pink.css +31 -0
  94. package/theme/styles/themes/library/color/purple.css +31 -0
  95. package/theme/styles/themes/library/color/red.css +31 -0
  96. package/theme/styles/themes/library/color/rose.css +31 -0
  97. package/theme/styles/themes/library/color/sky.css +31 -0
  98. package/theme/styles/themes/library/color/teal.css +31 -0
  99. package/theme/styles/themes/library/color/violet.css +31 -0
  100. package/theme/styles/themes/library/color/yellow.css +31 -0
  101. package/theme/styles/themes/library/style/brutal.css +50 -0
  102. package/theme/styles/themes/library/style/default.css +54 -0
  103. package/theme/styles/themes/library/style/index.css +8 -0
  104. package/theme/styles/themes/library/style/sharp.css +50 -0
  105. package/theme/styles/themes/library/style/soft.css +50 -0
  106. package/theme/styles/themes/mode/dark.css +20 -0
  107. package/theme/styles/themes/mode/index.css +6 -0
  108. package/theme/styles/themes/mode/light.css +24 -0
  109. package/theme/styles/themes/tailwind.css +114 -0
  110. package/types/ojiepermana-angular-brand-etos.d.ts +162 -0
  111. package/types/ojiepermana-angular-chart.d.ts +1094 -0
  112. package/types/ojiepermana-angular-component.d.ts +1386 -0
  113. package/types/ojiepermana-angular-generator-api.d.ts +85 -0
  114. package/types/ojiepermana-angular-layout.d.ts +163 -0
  115. package/types/ojiepermana-angular-navigation.d.ts +388 -0
  116. package/types/ojiepermana-angular-theme.d.ts +171 -0
  117. package/types/ojiepermana-angular.d.ts +3 -0
  118. package/fesm2022/edsis-angular-auth.mjs +0 -1209
  119. package/fesm2022/edsis-angular-auth.mjs.map +0 -1
  120. package/fesm2022/edsis-angular-sdk-access.mjs +0 -1364
  121. package/fesm2022/edsis-angular-sdk-access.mjs.map +0 -1
  122. package/fesm2022/edsis-angular-sdk-approval.mjs +0 -1258
  123. package/fesm2022/edsis-angular-sdk-approval.mjs.map +0 -1
  124. package/fesm2022/edsis-angular-sdk-auth.mjs +0 -253
  125. package/fesm2022/edsis-angular-sdk-auth.mjs.map +0 -1
  126. package/fesm2022/edsis-angular-sdk-employee.mjs +0 -283
  127. package/fesm2022/edsis-angular-sdk-employee.mjs.map +0 -1
  128. package/fesm2022/edsis-angular-sdk-health.mjs +0 -95
  129. package/fesm2022/edsis-angular-sdk-health.mjs.map +0 -1
  130. package/fesm2022/edsis-angular-sdk-shared.mjs +0 -2740
  131. package/fesm2022/edsis-angular-sdk-shared.mjs.map +0 -1
  132. package/fesm2022/edsis-angular-sdk-storage.mjs +0 -287
  133. package/fesm2022/edsis-angular-sdk-storage.mjs.map +0 -1
  134. package/fesm2022/edsis-angular-sdk-user.mjs +0 -488
  135. package/fesm2022/edsis-angular-sdk-user.mjs.map +0 -1
  136. package/fesm2022/edsis-angular-sdk.mjs +0 -6730
  137. package/fesm2022/edsis-angular-sdk.mjs.map +0 -1
  138. package/fesm2022/edsis-angular.mjs +0 -8
  139. package/fesm2022/edsis-angular.mjs.map +0 -1
  140. package/types/edsis-angular-auth.d.ts +0 -119
  141. package/types/edsis-angular-sdk-access.d.ts +0 -546
  142. package/types/edsis-angular-sdk-approval.d.ts +0 -637
  143. package/types/edsis-angular-sdk-auth.d.ts +0 -127
  144. package/types/edsis-angular-sdk-employee.d.ts +0 -158
  145. package/types/edsis-angular-sdk-health.d.ts +0 -34
  146. package/types/edsis-angular-sdk-shared.d.ts +0 -176
  147. package/types/edsis-angular-sdk-storage.d.ts +0 -101
  148. package/types/edsis-angular-sdk-user.d.ts +0 -188
  149. package/types/edsis-angular-sdk.d.ts +0 -1927
  150. package/types/edsis-angular.d.ts +0 -2
@@ -0,0 +1,2315 @@
1
+ import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, DestroyRef, signal, computed, effect, Injectable, PLATFORM_ID, input, ChangeDetectionStrategy, Component, ViewContainerRef, viewChild, ElementRef } from '@angular/core';
4
+ import { Router, NavigationEnd, RouterLink, RouterLinkActive } from '@angular/router';
5
+ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
6
+ import { filter, map } from 'rxjs/operators';
7
+ import { MatTooltip } from '@angular/material/tooltip';
8
+ import { clsx } from 'clsx';
9
+ import { twMerge } from 'tailwind-merge';
10
+ import { BreakpointObserver } from '@angular/cdk/layout';
11
+ import { Overlay } from '@angular/cdk/overlay';
12
+ import { TemplatePortal } from '@angular/cdk/portal';
13
+ import { FocusTrapFactory } from '@angular/cdk/a11y';
14
+ import { ScrollAreaComponent } from '@edsis/angular/component';
15
+ import { merge } from 'rxjs';
16
+
17
+ /** Default registry key used when no id is specified. */
18
+ const DEFAULT_NAVIGATION_ID = 'main';
19
+ const SIDEBAR_COLLAPSE_STORAGE_KEY = 'sidebar-collapse';
20
+ const LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY = 'sidebar-appearance';
21
+ function parseSidebarCollapsed(value) {
22
+ if (value === 'true')
23
+ return true;
24
+ if (value === 'false')
25
+ return false;
26
+ return null;
27
+ }
28
+ /**
29
+ * Signal-based global state untuk navigation (sidebar/topbar).
30
+ *
31
+ * Items disimpan dalam registry ber-key. Key default adalah `'main'`.
32
+ * Komponen `sidebar` / `topbar` memilih registry via input `navigationId`.
33
+ */
34
+ class NavigationService {
35
+ doc = inject(DOCUMENT);
36
+ router = inject(Router);
37
+ destroyRef = inject(DestroyRef);
38
+ persistedSidebarCollapsed = this.readPersistedSidebarCollapsed();
39
+ /** Internal version counter — incremented on every registry mutation. */
40
+ _version = signal(0, ...(ngDevMode ? [{ debugName: "_version" }] : /* istanbul ignore next */ []));
41
+ /** Internal map of registered navigation trees. */
42
+ _registry = new Map();
43
+ _collapsed = signal(this.persistedSidebarCollapsed ?? false, ...(ngDevMode ? [{ debugName: "_collapsed" }] : /* istanbul ignore next */ []));
44
+ _hasStoredSidebarCollapse = signal(this.persistedSidebarCollapsed !== null, ...(ngDevMode ? [{ debugName: "_hasStoredSidebarCollapse" }] : /* istanbul ignore next */ []));
45
+ /**
46
+ * Backward-compatible accessor — returns items for the default (`'main'`) key.
47
+ * Prefer `getItems(id)` when working with named registries.
48
+ */
49
+ items = computed(() => this.getItems(DEFAULT_NAVIGATION_ID)(), ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
50
+ /** Sidebar appearance preference (`default` or `thin`). */
51
+ sidebarAppearance = computed(() => (this._collapsed() ? 'thin' : 'default'), ...(ngDevMode ? [{ debugName: "sidebarAppearance" }] : /* istanbul ignore next */ []));
52
+ hasStoredSidebarCollapse = this._hasStoredSidebarCollapse.asReadonly();
53
+ /** Sidebar collapsed (default ↔ thin) toggle untuk desktop. */
54
+ collapsed = this._collapsed.asReadonly();
55
+ /** Sheet drawer terbuka di mobile. */
56
+ mobileOpen = signal(false, ...(ngDevMode ? [{ debugName: "mobileOpen" }] : /* istanbul ignore next */ []));
57
+ /** Set id grup / collapsable yang sedang terbuka. */
58
+ openGroups = signal(new Set(), ...(ngDevMode ? [{ debugName: "openGroups" }] : /* istanbul ignore next */ []));
59
+ /** URL aktif terakhir. Update otomatis dari Router `NavigationEnd`. */
60
+ activeUrl = signal(this.router.url, ...(ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []));
61
+ /** Trail id item yang sedang match dengan URL aktif (across ALL registries). */
62
+ activeTrail = computed(() => {
63
+ this._version(); // track changes
64
+ const url = this.activeUrl();
65
+ const trail = new Set();
66
+ const walk = (list, ancestors) => {
67
+ let matched = false;
68
+ for (const item of list) {
69
+ const id = item.id;
70
+ const link = 'link' in item ? item.link : undefined;
71
+ let selfMatch = false;
72
+ if (link) {
73
+ selfMatch = url === link || url.startsWith(link + '/') || url.startsWith(link + '?');
74
+ }
75
+ const children = 'children' in item ? (item.children ?? []) : [];
76
+ const nextAncestors = id ? [...ancestors, id] : ancestors;
77
+ const childMatch = children.length > 0 && walk(children, nextAncestors);
78
+ if (selfMatch || childMatch) {
79
+ if (id)
80
+ trail.add(id);
81
+ for (const a of ancestors)
82
+ trail.add(a);
83
+ matched = true;
84
+ }
85
+ }
86
+ return matched;
87
+ };
88
+ for (const items of this._registry.values()) {
89
+ walk(items, []);
90
+ }
91
+ return trail;
92
+ }, ...(ngDevMode ? [{ debugName: "activeTrail" }] : /* istanbul ignore next */ []));
93
+ constructor() {
94
+ effect(() => {
95
+ if (!this._hasStoredSidebarCollapse()) {
96
+ return;
97
+ }
98
+ this.persistSidebarCollapsed(this._collapsed());
99
+ });
100
+ this.router.events
101
+ .pipe(filter((e) => e instanceof NavigationEnd), takeUntilDestroyed(this.destroyRef))
102
+ .subscribe((e) => this.activeUrl.set(e.urlAfterRedirects));
103
+ }
104
+ registerItems(idOrItems, maybeItems) {
105
+ const [id, items] = typeof idOrItems === 'string' ? [idOrItems, maybeItems] : [DEFAULT_NAVIGATION_ID, idOrItems];
106
+ this._registry.set(id, items);
107
+ this._version.update((v) => v + 1);
108
+ }
109
+ /** Remove a named registry entry. */
110
+ removeItems(id) {
111
+ this._registry.delete(id);
112
+ this._version.update((v) => v + 1);
113
+ }
114
+ /**
115
+ * Computed yang mengembalikan items untuk key tertentu.
116
+ * Reactive terhadap perubahan registry.
117
+ */
118
+ getItems(id) {
119
+ return computed(() => {
120
+ this._version(); // track changes
121
+ return this._registry.get(id) ?? [];
122
+ });
123
+ }
124
+ setSidebarAppearance(value) {
125
+ this.setCollapsed(value === 'thin');
126
+ }
127
+ toggleSidebarAppearance(currentAppearance = this.sidebarAppearance()) {
128
+ this.setCollapsed(currentAppearance !== 'thin');
129
+ }
130
+ /** Toggle sidebar collapsed (default ↔ thin). */
131
+ toggleCollapsed() {
132
+ this.setCollapsed(!this._collapsed());
133
+ }
134
+ setCollapsed(value) {
135
+ this._collapsed.set(value);
136
+ this._hasStoredSidebarCollapse.set(true);
137
+ }
138
+ openMobile() {
139
+ this.mobileOpen.set(true);
140
+ }
141
+ closeMobile() {
142
+ this.mobileOpen.set(false);
143
+ }
144
+ toggleMobile() {
145
+ this.mobileOpen.update((v) => !v);
146
+ }
147
+ isGroupOpen(id) {
148
+ return this.openGroups().has(id);
149
+ }
150
+ toggleGroup(id) {
151
+ const next = new Set(this.openGroups());
152
+ if (next.has(id))
153
+ next.delete(id);
154
+ else
155
+ next.add(id);
156
+ this.openGroups.set(next);
157
+ }
158
+ setGroupOpen(id, open) {
159
+ const next = new Set(this.openGroups());
160
+ if (open)
161
+ next.add(id);
162
+ else
163
+ next.delete(id);
164
+ this.openGroups.set(next);
165
+ }
166
+ /** Apakah id termasuk dalam active trail saat ini. */
167
+ isActive(id) {
168
+ return !!id && this.activeTrail().has(id);
169
+ }
170
+ readPersistedSidebarCollapsed() {
171
+ try {
172
+ const storage = this.doc.defaultView?.localStorage;
173
+ const collapsed = parseSidebarCollapsed(storage?.getItem(SIDEBAR_COLLAPSE_STORAGE_KEY));
174
+ if (collapsed !== null) {
175
+ return collapsed;
176
+ }
177
+ const legacyAppearance = storage?.getItem(LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY);
178
+ if (legacyAppearance === 'thin') {
179
+ return true;
180
+ }
181
+ if (legacyAppearance === 'default') {
182
+ return false;
183
+ }
184
+ return null;
185
+ }
186
+ catch {
187
+ return null;
188
+ }
189
+ }
190
+ persistSidebarCollapsed(value) {
191
+ try {
192
+ const storage = this.doc.defaultView?.localStorage;
193
+ storage?.setItem(SIDEBAR_COLLAPSE_STORAGE_KEY, String(value));
194
+ storage?.removeItem(LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY);
195
+ }
196
+ catch {
197
+ /* ignore */
198
+ }
199
+ }
200
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
201
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: NavigationService, providedIn: 'root' });
202
+ }
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: NavigationService, decorators: [{
204
+ type: Injectable,
205
+ args: [{ providedIn: 'root' }]
206
+ }], ctorParameters: () => [] });
207
+
208
+ const MATERIAL_SYMBOLS_FONT_ATTR = 'data-ui-nav-icon-font';
209
+ const MATERIAL_SYMBOLS_FONT_ID = 'material-symbols-outlined';
210
+ const MATERIAL_SYMBOLS_FONT_HREF = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0';
211
+ /**
212
+ * Material Symbols icon renderer.
213
+ * Menyuntikkan stylesheet font sekali saat dipakai agar consumer tidak perlu
214
+ * menambahkan `<link>` manual di `index.html`.
215
+ */
216
+ class UiNavIconComponent {
217
+ doc = inject(DOCUMENT);
218
+ platformId = inject(PLATFORM_ID);
219
+ name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
220
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
221
+ size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
222
+ fontVariationSettings = '"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24';
223
+ constructor() {
224
+ this.ensureFontStylesheet();
225
+ }
226
+ classes = computed(() => {
227
+ const base = 'material-symbols-outlined inline-flex items-center justify-center leading-none select-none';
228
+ const extra = this.class();
229
+ return extra ? `${base} ${extra}` : base;
230
+ }, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
231
+ ensureFontStylesheet() {
232
+ if (!isPlatformBrowser(this.platformId) || !this.doc.head)
233
+ return;
234
+ const existing = this.doc.head.querySelector(`link[${MATERIAL_SYMBOLS_FONT_ATTR}="${MATERIAL_SYMBOLS_FONT_ID}"]`);
235
+ if (existing)
236
+ return;
237
+ const link = this.doc.createElement('link');
238
+ link.rel = 'stylesheet';
239
+ link.href = MATERIAL_SYMBOLS_FONT_HREF;
240
+ link.setAttribute(MATERIAL_SYMBOLS_FONT_ATTR, MATERIAL_SYMBOLS_FONT_ID);
241
+ this.doc.head.appendChild(link);
242
+ }
243
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: UiNavIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
244
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.13", type: UiNavIconComponent, isStandalone: true, selector: "ui-nav-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true", "translate": "no" }, properties: { "class": "classes()", "style.font-size.px": "size()", "style.font-variation-settings": "fontVariationSettings" } }, ngImport: i0, template: `{{ name() }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
245
+ }
246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: UiNavIconComponent, decorators: [{
247
+ type: Component,
248
+ args: [{
249
+ selector: 'ui-nav-icon',
250
+ changeDetection: ChangeDetectionStrategy.OnPush,
251
+ host: {
252
+ '[class]': 'classes()',
253
+ '[style.font-size.px]': 'size()',
254
+ '[style.font-variation-settings]': 'fontVariationSettings',
255
+ 'aria-hidden': 'true',
256
+ translate: 'no',
257
+ },
258
+ template: `{{ name() }}`,
259
+ }]
260
+ }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
261
+
262
+ /** Concatenate and dedupe Tailwind class names. */
263
+ function cn(...inputs) {
264
+ return twMerge(clsx(inputs));
265
+ }
266
+
267
+ /**
268
+ * Recursive navigation item renderer (vertical context).
269
+ *
270
+ * Menerima item polymorphic dan delegasi ke template sesuai `type`.
271
+ * Mega dirender sebagai group biasa saat muncul di konteks vertical.
272
+ */
273
+ class UiNavItemComponent {
274
+ nav = inject(NavigationService);
275
+ cn = cn;
276
+ item = input.required(...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
277
+ level = input(0, ...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
278
+ /** Compact / icon-only rendering (sidebar `thin`). */
279
+ compact = input(false, ...(ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []));
280
+ exactMatch = {
281
+ exact: true,
282
+ paths: 'exact',
283
+ queryParams: 'exact',
284
+ fragment: 'exact',
285
+ matrixParams: 'exact',
286
+ };
287
+ inexactMatch = {
288
+ paths: 'subset',
289
+ queryParams: 'subset',
290
+ fragment: 'ignored',
291
+ matrixParams: 'ignored',
292
+ };
293
+ type = computed(() => this.item().type, ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
294
+ groupItem = computed(() => this.item(), ...(ngDevMode ? [{ debugName: "groupItem" }] : /* istanbul ignore next */ []));
295
+ collapsableItem = computed(() => this.item(), ...(ngDevMode ? [{ debugName: "collapsableItem" }] : /* istanbul ignore next */ []));
296
+ megaItem = computed(() => this.item(), ...(ngDevMode ? [{ debugName: "megaItem" }] : /* istanbul ignore next */ []));
297
+ asideItem = computed(() => this.item(), ...(ngDevMode ? [{ debugName: "asideItem" }] : /* istanbul ignore next */ []));
298
+ basicItem = computed(() => this.item(), ...(ngDevMode ? [{ debugName: "basicItem" }] : /* istanbul ignore next */ []));
299
+ headingId = computed(() => {
300
+ const id = this.item().id ?? '';
301
+ return `nav-group-${id}`;
302
+ }, ...(ngDevMode ? [{ debugName: "headingId" }] : /* istanbul ignore next */ []));
303
+ isGroupOpen() {
304
+ const id = this.item().id;
305
+ if (!id)
306
+ return false;
307
+ // auto-open when any descendant is active
308
+ if (this.nav.isActive(id) && 'children' in this.item())
309
+ return true;
310
+ return this.nav.isGroupOpen(id);
311
+ }
312
+ isTrailActive() {
313
+ return this.nav.isActive(this.item().id);
314
+ }
315
+ toggleGroup() {
316
+ const id = this.item().id;
317
+ if (id)
318
+ this.nav.toggleGroup(id);
319
+ }
320
+ runAction() {
321
+ const item = this.item();
322
+ if ('action' in item && typeof item.action === 'function') {
323
+ item.action(item);
324
+ }
325
+ }
326
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: UiNavItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
327
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: UiNavItemComponent, isStandalone: true, selector: "ui-nav-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
328
+ @switch (type()) {
329
+ @case ('divider') {
330
+ <hr class="my-2 border-t border-border" role="separator" />
331
+ }
332
+ @case ('spacer') {
333
+ <div class="flex-1"></div>
334
+ }
335
+ @case ('group') {
336
+ <div role="group" [attr.aria-labelledby]="headingId()">
337
+ @if (!compact()) {
338
+ <div class="sticky top-0 z-10 p-3 text-muted-foreground backdrop-blur-3xl bg-transparent">
339
+ <div [id]="headingId()" [class]="cn('ui-nav-heading text-muted-foreground', item().classes?.title)">
340
+ {{ item().title }}
341
+ </div>
342
+ </div>
343
+ }
344
+ <div class="flex flex-col gap-0.5">
345
+ @for (child of groupItem().children; track child.id) {
346
+ <ui-nav-item [item]="child" [level]="level() + 1" [compact]="compact()" />
347
+ }
348
+ </div>
349
+ </div>
350
+ }
351
+ @case ('collapsable') {
352
+ @let id = collapsableItem().id ?? '';
353
+ @let open = isGroupOpen();
354
+ <button
355
+ type="button"
356
+ [class]="
357
+ cn(
358
+ 'ui-nav-text ui-nav-hover-surface group/ni flex w-full items-center gap-3 rounded p-3 text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
359
+ isTrailActive() && 'text-primary',
360
+ item().classes?.wrapper
361
+ )
362
+ "
363
+ [attr.aria-expanded]="open"
364
+ [attr.aria-controls]="id + '-panel'"
365
+ [disabled]="collapsableItem().disabled || null"
366
+ [matTooltip]="compact() ? (collapsableItem().title ?? '') : ''"
367
+ matTooltipPosition="right"
368
+ [matTooltipDisabled]="!compact()"
369
+ (click)="toggleGroup()">
370
+ @if (collapsableItem().icon) {
371
+ <span
372
+ [class]="
373
+ cn(
374
+ 'inline-flex shrink-0 items-center justify-center',
375
+ open && 'h-7 w-7 rounded-full border border-brand'
376
+ )
377
+ ">
378
+ <ui-nav-icon [name]="collapsableItem().icon!" [size]="18" [class]="item().classes?.icon ?? ''" />
379
+ </span>
380
+ }
381
+ @if (!compact()) {
382
+ <span [class]="cn('flex-1 truncate text-left', item().classes?.title)">
383
+ {{ collapsableItem().title }}
384
+ </span>
385
+ @if (collapsableItem().badge; as badge) {
386
+ <span [class]="badge.classes ?? 'ui-nav-badge ml-auto'">{{ badge.title }}</span>
387
+ }
388
+ <ui-nav-icon
389
+ [name]="'chevron_right'"
390
+ [size]="18"
391
+ [class]="cn('transition-transform duration-200', open && 'rotate-90')" />
392
+ }
393
+ </button>
394
+ @if (!compact() && open) {
395
+ <div
396
+ [id]="id + '-panel'"
397
+ role="region"
398
+ class="relative ml-6.5 mt-0.5 flex flex-col gap-0.5 pl-3 before:absolute before:bottom-0 before:left-0 before:-top-3.5 before:w-px before:bg-primary/30 before:content-['']">
399
+ @for (child of collapsableItem().children; track child.id) {
400
+ <ui-nav-item [item]="child" [level]="level() + 1" [compact]="false" />
401
+ }
402
+ </div>
403
+ }
404
+ }
405
+ @case ('mega') {
406
+ <!-- Mega direndahkan ke group saat berada di sidebar vertical. -->
407
+ <div class="mt-4 py-3 first:mt-0" role="group">
408
+ @if (!compact()) {
409
+ <div class="ui-nav-heading sticky top-0 z-10 bg-background px-3 pb-1 text-muted-foreground">
410
+ {{ item().title }}
411
+ </div>
412
+ }
413
+ <div class="flex flex-col gap-0.5">
414
+ @for (child of megaItem().children; track child.id) {
415
+ <ui-nav-item [item]="child" [level]="level() + 1" [compact]="compact()" />
416
+ }
417
+ </div>
418
+ </div>
419
+ }
420
+ @case ('aside') {
421
+ <a
422
+ [class]="
423
+ cn(
424
+ 'ui-nav-text ui-nav-hover-surface flex items-center gap-3 rounded px-3 py-2 text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-primary',
425
+ item().classes?.wrapper
426
+ )
427
+ "
428
+ routerLinkActive="text-primary"
429
+ #rla="routerLinkActive"
430
+ [attr.aria-current]="rla.isActive ? 'page' : null"
431
+ [routerLink]="asideItem().link"
432
+ [queryParams]="asideItem().queryParams"
433
+ [fragment]="asideItem().fragment ?? undefined"
434
+ [target]="asideItem().target ?? undefined"
435
+ [matTooltip]="compact() ? (asideItem().title ?? '') : ''"
436
+ matTooltipPosition="right"
437
+ [matTooltipDisabled]="!compact()">
438
+ @if (asideItem().icon) {
439
+ <ui-nav-icon [name]="asideItem().icon!" [size]="18" />
440
+ }
441
+ @if (!compact()) {
442
+ <span class="flex-1 truncate">{{ asideItem().title }}</span>
443
+ }
444
+ </a>
445
+ }
446
+ @default {
447
+ <!-- basic -->
448
+ @if (basicItem().link && !basicItem().externalLink) {
449
+ <a
450
+ [class]="
451
+ cn(
452
+ 'ui-nav-text ui-nav-hover-surface flex items-center gap-3 rounded px-3 py-2 text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-primary aria-disabled:pointer-events-none aria-disabled:opacity-50',
453
+ item().classes?.wrapper
454
+ )
455
+ "
456
+ routerLinkActive="text-primary"
457
+ #rla="routerLinkActive"
458
+ [routerLinkActiveOptions]="
459
+ basicItem().isActiveMatchOptions ?? (basicItem().exactMatch ? exactMatch : inexactMatch)
460
+ "
461
+ [attr.aria-current]="rla.isActive ? 'page' : null"
462
+ [attr.aria-disabled]="basicItem().disabled || null"
463
+ [matTooltip]="compact() ? (basicItem().title ?? '') : ''"
464
+ matTooltipPosition="right"
465
+ [matTooltipDisabled]="!compact()"
466
+ [routerLink]="basicItem().link"
467
+ [queryParams]="basicItem().queryParams"
468
+ [queryParamsHandling]="basicItem().queryParamsHandling ?? null"
469
+ [fragment]="basicItem().fragment ?? undefined"
470
+ [preserveFragment]="basicItem().preserveFragment ?? false"
471
+ [target]="basicItem().target ?? undefined"
472
+ (click)="runAction()">
473
+ @if (basicItem().icon) {
474
+ <ui-nav-icon [name]="basicItem().icon!" [size]="18" [class]="item().classes?.icon ?? ''" />
475
+ }
476
+ @if (!compact()) {
477
+ <span [class]="cn('flex-1 truncate', item().classes?.title)">{{ basicItem().title }}</span>
478
+ @if (basicItem().badge; as badge) {
479
+ <span [class]="badge.classes ?? 'ui-nav-badge ml-auto'">{{ badge.title }}</span>
480
+ }
481
+ }
482
+ </a>
483
+ } @else if (basicItem().link && basicItem().externalLink) {
484
+ <a
485
+ [class]="
486
+ cn(
487
+ 'ui-nav-text ui-nav-hover-surface flex items-center gap-3 rounded px-3 py-2 text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
488
+ item().classes?.wrapper
489
+ )
490
+ "
491
+ [attr.href]="basicItem().link"
492
+ [attr.target]="basicItem().target ?? '_blank'"
493
+ rel="noopener noreferrer"
494
+ [matTooltip]="compact() ? (basicItem().title ?? '') : ''"
495
+ matTooltipPosition="right"
496
+ [matTooltipDisabled]="!compact()">
497
+ @if (basicItem().icon) {
498
+ <ui-nav-icon [name]="basicItem().icon!" [size]="18" />
499
+ }
500
+ @if (!compact()) {
501
+ <span class="flex-1 truncate">{{ basicItem().title }}</span>
502
+ }
503
+ </a>
504
+ } @else {
505
+ <button
506
+ type="button"
507
+ [class]="
508
+ cn(
509
+ 'ui-nav-text ui-nav-hover-surface flex w-full items-center gap-3 rounded px-3 py-2 text-left text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',
510
+ item().classes?.wrapper
511
+ )
512
+ "
513
+ [disabled]="basicItem().disabled || null"
514
+ [matTooltip]="compact() ? (basicItem().title ?? '') : ''"
515
+ matTooltipPosition="right"
516
+ [matTooltipDisabled]="!compact()"
517
+ (click)="runAction()">
518
+ @if (basicItem().icon) {
519
+ <ui-nav-icon [name]="basicItem().icon!" [size]="18" />
520
+ }
521
+ @if (!compact()) {
522
+ <span class="flex-1 truncate">{{ basicItem().title }}</span>
523
+ }
524
+ </button>
525
+ }
526
+ }
527
+ }
528
+ `, isInline: true, dependencies: [{ kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: UiNavIconComponent, selector: "ui-nav-icon", inputs: ["name", "class", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
529
+ }
530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: UiNavItemComponent, decorators: [{
531
+ type: Component,
532
+ args: [{
533
+ selector: 'ui-nav-item',
534
+ changeDetection: ChangeDetectionStrategy.OnPush,
535
+ imports: [RouterLink, RouterLinkActive, MatTooltip, UiNavIconComponent],
536
+ template: `
537
+ @switch (type()) {
538
+ @case ('divider') {
539
+ <hr class="my-2 border-t border-border" role="separator" />
540
+ }
541
+ @case ('spacer') {
542
+ <div class="flex-1"></div>
543
+ }
544
+ @case ('group') {
545
+ <div role="group" [attr.aria-labelledby]="headingId()">
546
+ @if (!compact()) {
547
+ <div class="sticky top-0 z-10 p-3 text-muted-foreground backdrop-blur-3xl bg-transparent">
548
+ <div [id]="headingId()" [class]="cn('ui-nav-heading text-muted-foreground', item().classes?.title)">
549
+ {{ item().title }}
550
+ </div>
551
+ </div>
552
+ }
553
+ <div class="flex flex-col gap-0.5">
554
+ @for (child of groupItem().children; track child.id) {
555
+ <ui-nav-item [item]="child" [level]="level() + 1" [compact]="compact()" />
556
+ }
557
+ </div>
558
+ </div>
559
+ }
560
+ @case ('collapsable') {
561
+ @let id = collapsableItem().id ?? '';
562
+ @let open = isGroupOpen();
563
+ <button
564
+ type="button"
565
+ [class]="
566
+ cn(
567
+ 'ui-nav-text ui-nav-hover-surface group/ni flex w-full items-center gap-3 rounded p-3 text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
568
+ isTrailActive() && 'text-primary',
569
+ item().classes?.wrapper
570
+ )
571
+ "
572
+ [attr.aria-expanded]="open"
573
+ [attr.aria-controls]="id + '-panel'"
574
+ [disabled]="collapsableItem().disabled || null"
575
+ [matTooltip]="compact() ? (collapsableItem().title ?? '') : ''"
576
+ matTooltipPosition="right"
577
+ [matTooltipDisabled]="!compact()"
578
+ (click)="toggleGroup()">
579
+ @if (collapsableItem().icon) {
580
+ <span
581
+ [class]="
582
+ cn(
583
+ 'inline-flex shrink-0 items-center justify-center',
584
+ open && 'h-7 w-7 rounded-full border border-brand'
585
+ )
586
+ ">
587
+ <ui-nav-icon [name]="collapsableItem().icon!" [size]="18" [class]="item().classes?.icon ?? ''" />
588
+ </span>
589
+ }
590
+ @if (!compact()) {
591
+ <span [class]="cn('flex-1 truncate text-left', item().classes?.title)">
592
+ {{ collapsableItem().title }}
593
+ </span>
594
+ @if (collapsableItem().badge; as badge) {
595
+ <span [class]="badge.classes ?? 'ui-nav-badge ml-auto'">{{ badge.title }}</span>
596
+ }
597
+ <ui-nav-icon
598
+ [name]="'chevron_right'"
599
+ [size]="18"
600
+ [class]="cn('transition-transform duration-200', open && 'rotate-90')" />
601
+ }
602
+ </button>
603
+ @if (!compact() && open) {
604
+ <div
605
+ [id]="id + '-panel'"
606
+ role="region"
607
+ class="relative ml-6.5 mt-0.5 flex flex-col gap-0.5 pl-3 before:absolute before:bottom-0 before:left-0 before:-top-3.5 before:w-px before:bg-primary/30 before:content-['']">
608
+ @for (child of collapsableItem().children; track child.id) {
609
+ <ui-nav-item [item]="child" [level]="level() + 1" [compact]="false" />
610
+ }
611
+ </div>
612
+ }
613
+ }
614
+ @case ('mega') {
615
+ <!-- Mega direndahkan ke group saat berada di sidebar vertical. -->
616
+ <div class="mt-4 py-3 first:mt-0" role="group">
617
+ @if (!compact()) {
618
+ <div class="ui-nav-heading sticky top-0 z-10 bg-background px-3 pb-1 text-muted-foreground">
619
+ {{ item().title }}
620
+ </div>
621
+ }
622
+ <div class="flex flex-col gap-0.5">
623
+ @for (child of megaItem().children; track child.id) {
624
+ <ui-nav-item [item]="child" [level]="level() + 1" [compact]="compact()" />
625
+ }
626
+ </div>
627
+ </div>
628
+ }
629
+ @case ('aside') {
630
+ <a
631
+ [class]="
632
+ cn(
633
+ 'ui-nav-text ui-nav-hover-surface flex items-center gap-3 rounded px-3 py-2 text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-primary',
634
+ item().classes?.wrapper
635
+ )
636
+ "
637
+ routerLinkActive="text-primary"
638
+ #rla="routerLinkActive"
639
+ [attr.aria-current]="rla.isActive ? 'page' : null"
640
+ [routerLink]="asideItem().link"
641
+ [queryParams]="asideItem().queryParams"
642
+ [fragment]="asideItem().fragment ?? undefined"
643
+ [target]="asideItem().target ?? undefined"
644
+ [matTooltip]="compact() ? (asideItem().title ?? '') : ''"
645
+ matTooltipPosition="right"
646
+ [matTooltipDisabled]="!compact()">
647
+ @if (asideItem().icon) {
648
+ <ui-nav-icon [name]="asideItem().icon!" [size]="18" />
649
+ }
650
+ @if (!compact()) {
651
+ <span class="flex-1 truncate">{{ asideItem().title }}</span>
652
+ }
653
+ </a>
654
+ }
655
+ @default {
656
+ <!-- basic -->
657
+ @if (basicItem().link && !basicItem().externalLink) {
658
+ <a
659
+ [class]="
660
+ cn(
661
+ 'ui-nav-text ui-nav-hover-surface flex items-center gap-3 rounded px-3 py-2 text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-primary aria-disabled:pointer-events-none aria-disabled:opacity-50',
662
+ item().classes?.wrapper
663
+ )
664
+ "
665
+ routerLinkActive="text-primary"
666
+ #rla="routerLinkActive"
667
+ [routerLinkActiveOptions]="
668
+ basicItem().isActiveMatchOptions ?? (basicItem().exactMatch ? exactMatch : inexactMatch)
669
+ "
670
+ [attr.aria-current]="rla.isActive ? 'page' : null"
671
+ [attr.aria-disabled]="basicItem().disabled || null"
672
+ [matTooltip]="compact() ? (basicItem().title ?? '') : ''"
673
+ matTooltipPosition="right"
674
+ [matTooltipDisabled]="!compact()"
675
+ [routerLink]="basicItem().link"
676
+ [queryParams]="basicItem().queryParams"
677
+ [queryParamsHandling]="basicItem().queryParamsHandling ?? null"
678
+ [fragment]="basicItem().fragment ?? undefined"
679
+ [preserveFragment]="basicItem().preserveFragment ?? false"
680
+ [target]="basicItem().target ?? undefined"
681
+ (click)="runAction()">
682
+ @if (basicItem().icon) {
683
+ <ui-nav-icon [name]="basicItem().icon!" [size]="18" [class]="item().classes?.icon ?? ''" />
684
+ }
685
+ @if (!compact()) {
686
+ <span [class]="cn('flex-1 truncate', item().classes?.title)">{{ basicItem().title }}</span>
687
+ @if (basicItem().badge; as badge) {
688
+ <span [class]="badge.classes ?? 'ui-nav-badge ml-auto'">{{ badge.title }}</span>
689
+ }
690
+ }
691
+ </a>
692
+ } @else if (basicItem().link && basicItem().externalLink) {
693
+ <a
694
+ [class]="
695
+ cn(
696
+ 'ui-nav-text ui-nav-hover-surface flex items-center gap-3 rounded px-3 py-2 text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
697
+ item().classes?.wrapper
698
+ )
699
+ "
700
+ [attr.href]="basicItem().link"
701
+ [attr.target]="basicItem().target ?? '_blank'"
702
+ rel="noopener noreferrer"
703
+ [matTooltip]="compact() ? (basicItem().title ?? '') : ''"
704
+ matTooltipPosition="right"
705
+ [matTooltipDisabled]="!compact()">
706
+ @if (basicItem().icon) {
707
+ <ui-nav-icon [name]="basicItem().icon!" [size]="18" />
708
+ }
709
+ @if (!compact()) {
710
+ <span class="flex-1 truncate">{{ basicItem().title }}</span>
711
+ }
712
+ </a>
713
+ } @else {
714
+ <button
715
+ type="button"
716
+ [class]="
717
+ cn(
718
+ 'ui-nav-text ui-nav-hover-surface flex w-full items-center gap-3 rounded px-3 py-2 text-left text-foreground/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',
719
+ item().classes?.wrapper
720
+ )
721
+ "
722
+ [disabled]="basicItem().disabled || null"
723
+ [matTooltip]="compact() ? (basicItem().title ?? '') : ''"
724
+ matTooltipPosition="right"
725
+ [matTooltipDisabled]="!compact()"
726
+ (click)="runAction()">
727
+ @if (basicItem().icon) {
728
+ <ui-nav-icon [name]="basicItem().icon!" [size]="18" />
729
+ }
730
+ @if (!compact()) {
731
+ <span class="flex-1 truncate">{{ basicItem().title }}</span>
732
+ }
733
+ </button>
734
+ }
735
+ }
736
+ }
737
+ `,
738
+ }]
739
+ }], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }] } });
740
+
741
+ /**
742
+ * Vertical navigation (sidebar) — shadcn-styled.
743
+ *
744
+ * Variants:
745
+ * - `default`: 17.5rem, label + icon
746
+ * - `thin`: 4rem icon-only; hover memunculkan overlay expand (tidak push konten)
747
+ *
748
+ * Mobile (`< md`): saat `autoMobile=true` (default), host desktop disembunyikan
749
+ * dan konten dirender lewat CDK Overlay drawer dengan focus trap. State buka
750
+ * dikontrol lewat `NavigationService.mobileOpen`.
751
+ */
752
+ class SidebarComponent {
753
+ nav = inject(NavigationService);
754
+ bp = inject(BreakpointObserver);
755
+ overlay = inject(Overlay);
756
+ vcr = inject(ViewContainerRef);
757
+ focusTrapFactory = inject(FocusTrapFactory);
758
+ doc = inject(DOCUMENT);
759
+ destroyRef = inject(DestroyRef);
760
+ items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
761
+ /** Registry key di `NavigationService`. Default `'main'`. */
762
+ navigationId = input(DEFAULT_NAVIGATION_ID, ...(ngDevMode ? [{ debugName: "navigationId" }] : /* istanbul ignore next */ []));
763
+ appearance = input('default', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
764
+ /** Desktop border can be owned by the sidebar or by the surrounding layout shell. */
765
+ borderSource = input('component', ...(ngDevMode ? [{ debugName: "borderSource" }] : /* istanbul ignore next */ []));
766
+ position = input('left', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
767
+ ariaLabel = input('Primary', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
768
+ header = input(true, ...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
769
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
770
+ /** Auto switch ke CDK overlay drawer saat viewport `< md`. */
771
+ autoMobile = input(true, ...(ngDevMode ? [{ debugName: "autoMobile" }] : /* istanbul ignore next */ []));
772
+ /** Auto-register `items` ke `NavigationService` agar `activeTrail` bekerja. */
773
+ autoRegister = input(true, ...(ngDevMode ? [{ debugName: "autoRegister" }] : /* istanbul ignore next */ []));
774
+ /** Resolved items: input jika disediakan, fallback ke registry NavigationService. */
775
+ resolvedItems = computed(() => {
776
+ const explicit = this.items();
777
+ return explicit.length > 0 ? explicit : this.nav.getItems(this.navigationId())();
778
+ }, ...(ngDevMode ? [{ debugName: "resolvedItems" }] : /* istanbul ignore next */ []));
779
+ hovered = signal(false, ...(ngDevMode ? [{ debugName: "hovered" }] : /* istanbul ignore next */ []));
780
+ suppressHoverUntilLeave = signal(false, ...(ngDevMode ? [{ debugName: "suppressHoverUntilLeave" }] : /* istanbul ignore next */ []));
781
+ drawerTpl = viewChild.required('drawerTpl');
782
+ drawerRef = null;
783
+ focusTrap = null;
784
+ previouslyFocused = null;
785
+ /** True saat viewport `< md` (767.98px). */
786
+ isMobileMedia = toSignal(this.bp.observe('(max-width: 767.98px)').pipe(map((s) => s.matches)), {
787
+ initialValue: false,
788
+ });
789
+ isMobile = computed(() => this.autoMobile() && this.isMobileMedia(), ...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
790
+ resolvedCollapsed = computed(() => {
791
+ if (this.nav.hasStoredSidebarCollapse()) {
792
+ return this.nav.collapsed();
793
+ }
794
+ return this.appearance() === 'thin';
795
+ }, ...(ngDevMode ? [{ debugName: "resolvedCollapsed" }] : /* istanbul ignore next */ []));
796
+ resolvedAppearance = computed(() => {
797
+ return this.resolvedCollapsed() ? 'thin' : 'default';
798
+ }, ...(ngDevMode ? [{ debugName: "resolvedAppearance" }] : /* istanbul ignore next */ []));
799
+ hoverActive = computed(() => this.hovered() && !this.suppressHoverUntilLeave(), ...(ngDevMode ? [{ debugName: "hoverActive" }] : /* istanbul ignore next */ []));
800
+ isExpanded = computed(() => !this.resolvedCollapsed() || this.hoverActive(), ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
801
+ isCompact = computed(() => !this.isMobile() && this.resolvedCollapsed() && !this.hoverActive(), ...(ngDevMode ? [{ debugName: "isCompact" }] : /* istanbul ignore next */ []));
802
+ toggleButtonLabel = computed(() => this.resolvedCollapsed() ? 'Expand sidebar' : 'Collapse sidebar', ...(ngDevMode ? [{ debugName: "toggleButtonLabel" }] : /* istanbul ignore next */ []));
803
+ constructor() {
804
+ // Auto-register items ke service untuk active trail (hanya jika input non-kosong).
805
+ effect(() => {
806
+ const explicit = this.items();
807
+ if (this.autoRegister() && explicit.length > 0)
808
+ this.nav.registerItems(this.navigationId(), explicit);
809
+ });
810
+ // Kelola overlay drawer berdasarkan mobileOpen + isMobile.
811
+ effect(() => {
812
+ const open = this.nav.mobileOpen();
813
+ const mobile = this.isMobile();
814
+ if (mobile && open)
815
+ this.openDrawer();
816
+ else
817
+ this.closeDrawer();
818
+ });
819
+ this.destroyRef.onDestroy(() => this.closeDrawer());
820
+ }
821
+ hostClasses = computed(() => {
822
+ const base = ['relative flex shrink-0 text-foreground', 'transition-[width] duration-200 ease-out'];
823
+ if (this.resolvedCollapsed())
824
+ base.push('w-16');
825
+ else
826
+ base.push('[width:17.5rem]');
827
+ if (this.borderSource() === 'component') {
828
+ if (this.position() === 'right')
829
+ base.push('border-l', 'border-primary/30');
830
+ else
831
+ base.push('border-r', 'border-primary/30');
832
+ }
833
+ return [...base, this.class()].join(' ');
834
+ }, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
835
+ headerClasses = computed(() => {
836
+ const base = ['flex items-center gap-1 border-b border-primary/30'];
837
+ if (this.isCompact()) {
838
+ base.push('h-12', 'justify-center', 'px-2');
839
+ }
840
+ else {
841
+ base.push('h-12', 'pr-2');
842
+ }
843
+ return base.join(' ');
844
+ }, ...(ngDevMode ? [{ debugName: "headerClasses" }] : /* istanbul ignore next */ []));
845
+ headerSlotClasses = computed(() => {
846
+ const base = ['min-w-0'];
847
+ if (this.isCompact()) {
848
+ base.push('flex flex-1 items-center justify-center overflow-hidden', '[&>[sidebar-header]>*]:mx-auto', '[&>[sidebar-header]>*]:w-auto', '[&>[sidebar-header]>*]:max-w-full', '[&>[sidebar-header]>*]:justify-center', '[&>[sidebar-header]>*]:gap-0', '[&>[sidebar-header]>*]:px-0', '[&>[sidebar-header]>*]:shrink-0', '[&>[sidebar-header]>*>*:first-child]:mx-auto', '[&>[sidebar-header]>*>*:nth-child(n+2)]:hidden');
849
+ }
850
+ else {
851
+ base.push('flex min-w-0 flex-1 items-center');
852
+ }
853
+ return base.join(' ');
854
+ }, ...(ngDevMode ? [{ debugName: "headerSlotClasses" }] : /* istanbul ignore next */ []));
855
+ navClasses = computed(() => {
856
+ const base = ['min-h-full'];
857
+ if (this.isCompact()) {
858
+ base.push('px-2', '[&_.ui-nav-text]:mx-auto', '[&_.ui-nav-text]:w-10', '[&_.ui-nav-text]:justify-center', '[&_.ui-nav-text]:px-0');
859
+ }
860
+ return base.join(' ');
861
+ }, ...(ngDevMode ? [{ debugName: "navClasses" }] : /* istanbul ignore next */ []));
862
+ scrollViewportClasses = computed(() => 'overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-thumb-primary scrollbar-track-primary/10', ...(ngDevMode ? [{ debugName: "scrollViewportClasses" }] : /* istanbul ignore next */ []));
863
+ footerClasses = computed(() => {
864
+ const base = ['h-12 border-t border-primary/30'];
865
+ if (this.isCompact()) {
866
+ base.push('flex items-center justify-center px-2');
867
+ }
868
+ return base.join(' ');
869
+ }, ...(ngDevMode ? [{ debugName: "footerClasses" }] : /* istanbul ignore next */ []));
870
+ footerSlotClasses = computed(() => {
871
+ const base = ['h-full'];
872
+ if (this.isCompact()) {
873
+ base.push('flex h-full items-center justify-center overflow-hidden', '[&>[sidebar-footer]>*]:mx-auto', '[&>[sidebar-footer]>*]:w-auto', '[&>[sidebar-footer]>*]:max-w-full', '[&>[sidebar-footer]>*]:justify-center', '[&>[sidebar-footer]>*]:gap-0', '[&>[sidebar-footer]>*]:px-0', '[&>[sidebar-footer]>*>*:first-child]:mx-auto', '[&>[sidebar-footer]>*>*:nth-child(n+2)]:hidden');
874
+ }
875
+ else {
876
+ base.push('w-full');
877
+ }
878
+ return base.join(' ');
879
+ }, ...(ngDevMode ? [{ debugName: "footerSlotClasses" }] : /* istanbul ignore next */ []));
880
+ innerClasses = computed(() => {
881
+ const overlayActive = this.resolvedCollapsed() && this.hoverActive();
882
+ const base = ['flex h-full flex-col transition-[width] duration-200 ease-out'];
883
+ if (this.resolvedCollapsed()) {
884
+ base.push('bg-background');
885
+ }
886
+ if (overlayActive) {
887
+ base.push('absolute inset-y-0 z-30 border-l border-r border-primary/30 shadow-xl [width:17.5rem]', this.position() === 'right' ? 'right-0' : 'left-0');
888
+ }
889
+ else {
890
+ base.push('w-full');
891
+ }
892
+ return base.join(' ');
893
+ }, ...(ngDevMode ? [{ debugName: "innerClasses" }] : /* istanbul ignore next */ []));
894
+ onHoverEnter() {
895
+ if (!this.resolvedCollapsed() || this.isMobile() || this.suppressHoverUntilLeave())
896
+ return;
897
+ this.hovered.set(true);
898
+ }
899
+ onHoverLeave() {
900
+ this.suppressHoverUntilLeave.set(false);
901
+ if (this.resolvedCollapsed())
902
+ this.hovered.set(false);
903
+ }
904
+ toggleAppearance(event) {
905
+ event.stopPropagation();
906
+ const nextCollapsed = !this.resolvedCollapsed();
907
+ this.nav.setCollapsed(nextCollapsed);
908
+ this.hovered.set(false);
909
+ this.suppressHoverUntilLeave.set(nextCollapsed);
910
+ }
911
+ /** Touch fallback: tap pada strip thin (ketika belum expanded) untuk expand. */
912
+ onHostClick(event) {
913
+ if (!this.resolvedCollapsed() || this.isMobile())
914
+ return;
915
+ if (this.hovered())
916
+ return;
917
+ const target = event.target;
918
+ // Biarkan klik pada control interaktif terus propagate (tidak intercept).
919
+ if (target && target.closest('a,button,[role="menuitem"]'))
920
+ return;
921
+ this.hovered.set(true);
922
+ }
923
+ openDrawer() {
924
+ if (this.drawerRef)
925
+ return;
926
+ const side = this.position();
927
+ const pos = this.overlay.position().global().top('0');
928
+ if (side === 'right')
929
+ pos.right('0');
930
+ else
931
+ pos.left('0');
932
+ this.drawerRef = this.overlay.create({
933
+ positionStrategy: pos,
934
+ height: '100vh',
935
+ hasBackdrop: true,
936
+ backdropClass: 'cdk-overlay-dark-backdrop',
937
+ scrollStrategy: this.overlay.scrollStrategies.block(),
938
+ panelClass: ['sidebar-drawer'],
939
+ });
940
+ const portal = new TemplatePortal(this.drawerTpl(), this.vcr);
941
+ const viewRef = this.drawerRef.attach(portal);
942
+ viewRef.detectChanges();
943
+ const root = this.drawerRef.overlayElement;
944
+ this.focusTrap = this.focusTrapFactory.create(root);
945
+ this.previouslyFocused = this.doc.activeElement;
946
+ queueMicrotask(() => this.focusTrap?.focusInitialElementWhenReady());
947
+ this.drawerRef
948
+ .backdropClick()
949
+ .pipe(takeUntilDestroyed(this.destroyRef))
950
+ .subscribe(() => this.nav.closeMobile());
951
+ this.drawerRef
952
+ .keydownEvents()
953
+ .pipe(filter((e) => e.key === 'Escape'), takeUntilDestroyed(this.destroyRef))
954
+ .subscribe(() => this.nav.closeMobile());
955
+ }
956
+ closeDrawer() {
957
+ if (!this.drawerRef)
958
+ return;
959
+ this.focusTrap?.destroy();
960
+ this.focusTrap = null;
961
+ this.drawerRef.dispose();
962
+ this.drawerRef = null;
963
+ this.previouslyFocused?.focus?.();
964
+ this.previouslyFocused = null;
965
+ }
966
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
967
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: SidebarComponent, isStandalone: true, selector: "sidebar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, navigationId: { classPropertyName: "navigationId", publicName: "navigationId", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, borderSource: { classPropertyName: "borderSource", publicName: "borderSource", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, autoMobile: { classPropertyName: "autoMobile", publicName: "autoMobile", isSignal: true, isRequired: false, transformFunction: null }, autoRegister: { classPropertyName: "autoRegister", publicName: "autoRegister", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, listeners: { "mouseenter": "onHoverEnter()", "mouseleave": "onHoverLeave()", "focusin": "onHoverEnter()", "click": "onHostClick($event)" }, properties: { "attr.aria-label": "ariaLabel()", "class": "hostClasses()", "attr.data-appearance": "resolvedAppearance()", "attr.data-position": "position()", "attr.data-expanded": "isExpanded()", "hidden": "isMobile()" } }, viewQueries: [{ propertyName: "drawerTpl", first: true, predicate: ["drawerTpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
968
+ <div [class]="innerClasses()">
969
+ <ng-container [ngTemplateOutlet]="body" />
970
+ </div>
971
+
972
+ <ng-template #body>
973
+ @if (header()) {
974
+ <div [class]="headerClasses()">
975
+ <div [class]="headerSlotClasses()">
976
+ <ng-content select="[sidebar-header]" />
977
+ </div>
978
+ @if (!isMobile() && !isCompact()) {
979
+ <button
980
+ type="button"
981
+ data-sidebar-toggle
982
+ class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
983
+ [attr.aria-label]="toggleButtonLabel()"
984
+ [attr.title]="toggleButtonLabel()"
985
+ [attr.aria-pressed]="resolvedAppearance() === 'thin'"
986
+ (click)="toggleAppearance($event)">
987
+ <ui-nav-icon name="view_sidebar" [size]="18" class="text-current" />
988
+ </button>
989
+ }
990
+ </div>
991
+ }
992
+ <ui-scroll-area class="min-h-0 flex-1" [viewportClass]="scrollViewportClasses()">
993
+ <nav [class]="navClasses()">
994
+ @for (item of resolvedItems(); track item.id) {
995
+ <ui-nav-item [item]="item" [compact]="isCompact()" />
996
+ }
997
+ </nav>
998
+ </ui-scroll-area>
999
+ <div [class]="footerClasses()">
1000
+ <div [class]="footerSlotClasses()">
1001
+ <ng-content select="[sidebar-footer]" />
1002
+ </div>
1003
+ </div>
1004
+ </ng-template>
1005
+
1006
+ <ng-template #drawerTpl>
1007
+ <div
1008
+ role="dialog"
1009
+ aria-modal="true"
1010
+ [attr.aria-label]="ariaLabel()"
1011
+ class="flex h-full w-72 max-w-[85vw] flex-col border-primary/30 text-foreground shadow-xl"
1012
+ [class.border-r]="position() === 'left'"
1013
+ [class.border-l]="position() === 'right'"
1014
+ [class.border-primary/30]="position() === 'left' || position() === 'right'">
1015
+ <ng-container [ngTemplateOutlet]="body" />
1016
+ </div>
1017
+ </ng-template>
1018
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "viewportClass"] }, { kind: "component", type: UiNavIconComponent, selector: "ui-nav-icon", inputs: ["name", "class", "size"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1019
+ }
1020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SidebarComponent, decorators: [{
1021
+ type: Component,
1022
+ args: [{
1023
+ selector: 'sidebar',
1024
+ changeDetection: ChangeDetectionStrategy.OnPush,
1025
+ imports: [NgTemplateOutlet, ScrollAreaComponent, UiNavIconComponent, UiNavItemComponent],
1026
+ host: {
1027
+ role: 'navigation',
1028
+ '[attr.aria-label]': 'ariaLabel()',
1029
+ '[class]': 'hostClasses()',
1030
+ '[attr.data-appearance]': 'resolvedAppearance()',
1031
+ '[attr.data-position]': 'position()',
1032
+ '[attr.data-expanded]': 'isExpanded()',
1033
+ '[hidden]': 'isMobile()',
1034
+ '(mouseenter)': 'onHoverEnter()',
1035
+ '(mouseleave)': 'onHoverLeave()',
1036
+ '(focusin)': 'onHoverEnter()',
1037
+ '(click)': 'onHostClick($event)',
1038
+ },
1039
+ template: `
1040
+ <div [class]="innerClasses()">
1041
+ <ng-container [ngTemplateOutlet]="body" />
1042
+ </div>
1043
+
1044
+ <ng-template #body>
1045
+ @if (header()) {
1046
+ <div [class]="headerClasses()">
1047
+ <div [class]="headerSlotClasses()">
1048
+ <ng-content select="[sidebar-header]" />
1049
+ </div>
1050
+ @if (!isMobile() && !isCompact()) {
1051
+ <button
1052
+ type="button"
1053
+ data-sidebar-toggle
1054
+ class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
1055
+ [attr.aria-label]="toggleButtonLabel()"
1056
+ [attr.title]="toggleButtonLabel()"
1057
+ [attr.aria-pressed]="resolvedAppearance() === 'thin'"
1058
+ (click)="toggleAppearance($event)">
1059
+ <ui-nav-icon name="view_sidebar" [size]="18" class="text-current" />
1060
+ </button>
1061
+ }
1062
+ </div>
1063
+ }
1064
+ <ui-scroll-area class="min-h-0 flex-1" [viewportClass]="scrollViewportClasses()">
1065
+ <nav [class]="navClasses()">
1066
+ @for (item of resolvedItems(); track item.id) {
1067
+ <ui-nav-item [item]="item" [compact]="isCompact()" />
1068
+ }
1069
+ </nav>
1070
+ </ui-scroll-area>
1071
+ <div [class]="footerClasses()">
1072
+ <div [class]="footerSlotClasses()">
1073
+ <ng-content select="[sidebar-footer]" />
1074
+ </div>
1075
+ </div>
1076
+ </ng-template>
1077
+
1078
+ <ng-template #drawerTpl>
1079
+ <div
1080
+ role="dialog"
1081
+ aria-modal="true"
1082
+ [attr.aria-label]="ariaLabel()"
1083
+ class="flex h-full w-72 max-w-[85vw] flex-col border-primary/30 text-foreground shadow-xl"
1084
+ [class.border-r]="position() === 'left'"
1085
+ [class.border-l]="position() === 'right'"
1086
+ [class.border-primary/30]="position() === 'left' || position() === 'right'">
1087
+ <ng-container [ngTemplateOutlet]="body" />
1088
+ </div>
1089
+ </ng-template>
1090
+ `,
1091
+ }]
1092
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], navigationId: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigationId", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], borderSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderSource", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], autoMobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoMobile", required: false }] }], autoRegister: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoRegister", required: false }] }], drawerTpl: [{ type: i0.ViewChild, args: ['drawerTpl', { isSignal: true }] }] } });
1093
+
1094
+ /**
1095
+ * Horizontal navigation (topbar) — shadcn-styled.
1096
+ */
1097
+ class TopbarComponent {
1098
+ nav = inject(NavigationService);
1099
+ overlay = inject(Overlay);
1100
+ vcr = inject(ViewContainerRef);
1101
+ host = inject(ElementRef);
1102
+ destroyRef = inject(DestroyRef);
1103
+ items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
1104
+ /** Registry key di `NavigationService`. Default `'main'`. */
1105
+ navigationId = input(DEFAULT_NAVIGATION_ID, ...(ngDevMode ? [{ debugName: "navigationId" }] : /* istanbul ignore next */ []));
1106
+ appearance = input('default', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
1107
+ ariaLabel = input('Primary', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
1108
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
1109
+ /** Auto-register `items` ke `NavigationService` agar `activeTrail` bekerja. */
1110
+ autoRegister = input(true, ...(ngDevMode ? [{ debugName: "autoRegister" }] : /* istanbul ignore next */ []));
1111
+ /** Tampilkan hamburger di `< md` yang men-toggle mobile drawer sidebar. */
1112
+ showHamburger = input(true, ...(ngDevMode ? [{ debugName: "showHamburger" }] : /* istanbul ignore next */ []));
1113
+ hamburgerLabel = input('Open navigation', ...(ngDevMode ? [{ debugName: "hamburgerLabel" }] : /* istanbul ignore next */ []));
1114
+ /** Resolved items: input jika disediakan, fallback ke registry NavigationService. */
1115
+ resolvedItems = computed(() => {
1116
+ const explicit = this.items();
1117
+ return explicit.length > 0 ? explicit : this.nav.getItems(this.navigationId())();
1118
+ }, ...(ngDevMode ? [{ debugName: "resolvedItems" }] : /* istanbul ignore next */ []));
1119
+ openId = signal(null, ...(ngDevMode ? [{ debugName: "openId" }] : /* istanbul ignore next */ []));
1120
+ active = null;
1121
+ dropdownTpl = viewChild.required('dropdownTpl');
1122
+ constructor() {
1123
+ effect(() => {
1124
+ const explicit = this.items();
1125
+ if (this.autoRegister() && explicit.length > 0)
1126
+ this.nav.registerItems(this.navigationId(), explicit);
1127
+ });
1128
+ this.destroyRef.onDestroy(() => this.closeAll());
1129
+ }
1130
+ hostClasses = computed(() => {
1131
+ return ['sticky top-0 z-20 flex h-11 w-full items-center', this.class()].join(' ');
1132
+ }, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
1133
+ endSlotClasses = computed(() => {
1134
+ const base = ['flex h-full shrink-0 items-center justify-end gap-2 overflow-hidden'];
1135
+ base.push('[&>[topbar-end]]:flex', '[&>[topbar-end]]:min-w-0', '[&>[topbar-end]]:max-w-full', '[&>[topbar-end]]:items-center', '[&>[topbar-end]]:justify-end', '[&>[topbar-end]]:gap-2', '[&>[topbar-end]>*]:w-auto', '[&>[topbar-end]>*]:max-w-full', '[&>[topbar-end]>*]:justify-end', '[&>[topbar-end]>*]:gap-0', '[&>[topbar-end]>*]:px-2', '[&>[topbar-end]>*>*:first-child]:ml-auto', '[&>[topbar-end]>*>*:nth-child(n+2)]:hidden');
1136
+ return base.join(' ');
1137
+ }, ...(ngDevMode ? [{ debugName: "endSlotClasses" }] : /* istanbul ignore next */ []));
1138
+ asBasic(i) {
1139
+ return i;
1140
+ }
1141
+ asCollapsable(i) {
1142
+ return i;
1143
+ }
1144
+ asGroup(i) {
1145
+ return i;
1146
+ }
1147
+ isItemActive(id) {
1148
+ return this.nav.isActive(id);
1149
+ }
1150
+ toggleDropdown(trigger, item) {
1151
+ if (this.openId() === item.id)
1152
+ this.closeAll();
1153
+ else
1154
+ this.openDropdown(trigger, item);
1155
+ }
1156
+ openDropdown(trigger, item) {
1157
+ if (this.openId() === item.id)
1158
+ return;
1159
+ this.closeAll();
1160
+ this.attach(trigger, item, this.dropdownTpl());
1161
+ }
1162
+ attach(trigger, item, tpl) {
1163
+ const strategy = this.overlay
1164
+ .position()
1165
+ .flexibleConnectedTo(trigger)
1166
+ .withFlexibleDimensions(false)
1167
+ .withPush(false)
1168
+ .withPositions([
1169
+ {
1170
+ originX: 'start',
1171
+ originY: 'bottom',
1172
+ overlayX: 'start',
1173
+ overlayY: 'top',
1174
+ offsetY: 4,
1175
+ },
1176
+ {
1177
+ originX: 'start',
1178
+ originY: 'top',
1179
+ overlayX: 'start',
1180
+ overlayY: 'bottom',
1181
+ offsetY: -4,
1182
+ },
1183
+ ]);
1184
+ const ref = this.overlay.create({
1185
+ positionStrategy: strategy,
1186
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
1187
+ hasBackdrop: true,
1188
+ backdropClass: 'cdk-overlay-transparent-backdrop',
1189
+ panelClass: ['ui-dropdown-panel'],
1190
+ });
1191
+ const portal = new TemplatePortal(tpl, this.vcr, { $implicit: item });
1192
+ ref.attach(portal);
1193
+ this.active = { ref, id: item.id ?? '' };
1194
+ this.openId.set(item.id ?? null);
1195
+ merge(ref.backdropClick(), ref.keydownEvents().pipe(filter((e) => e.key === 'Escape')))
1196
+ .pipe(takeUntilDestroyed(this.destroyRef))
1197
+ .subscribe(() => {
1198
+ this.closeAll();
1199
+ trigger.focus();
1200
+ });
1201
+ }
1202
+ closeAll() {
1203
+ if (this.active) {
1204
+ this.active.ref.dispose();
1205
+ this.active = null;
1206
+ }
1207
+ this.openId.set(null);
1208
+ }
1209
+ /** Menubar keyboard navigation: ArrowLeft/Right antar trigger, Home/End, ArrowDown fokus panel. */
1210
+ onMenubarKeydown(event) {
1211
+ const key = event.key;
1212
+ const root = this.host.nativeElement;
1213
+ const triggers = Array.from(root.querySelectorAll('ul[role="menubar"] [role="menuitem"]')).filter((el) => !el.hasAttribute('disabled'));
1214
+ if (triggers.length === 0)
1215
+ return;
1216
+ const currentIndex = triggers.indexOf(document.activeElement);
1217
+ if (key === 'ArrowDown' && currentIndex !== -1) {
1218
+ event.preventDefault();
1219
+ // Jika open, fokus item pertama panel; jika belum, focus tetap (panel akan dibuka via click/mouseenter).
1220
+ queueMicrotask(() => this.focusFirstInPanel());
1221
+ return;
1222
+ }
1223
+ if (key !== 'ArrowLeft' && key !== 'ArrowRight' && key !== 'Home' && key !== 'End')
1224
+ return;
1225
+ let nextIndex = currentIndex;
1226
+ if (key === 'ArrowRight')
1227
+ nextIndex = (currentIndex + 1 + triggers.length) % triggers.length;
1228
+ else if (key === 'ArrowLeft')
1229
+ nextIndex = (currentIndex - 1 + triggers.length) % triggers.length;
1230
+ else if (key === 'Home')
1231
+ nextIndex = 0;
1232
+ else if (key === 'End')
1233
+ nextIndex = triggers.length - 1;
1234
+ if (nextIndex !== currentIndex && triggers[nextIndex]) {
1235
+ event.preventDefault();
1236
+ triggers[nextIndex].focus();
1237
+ }
1238
+ }
1239
+ /** Arrow-key navigation dalam dropdown panel. */
1240
+ onPanelKeydown(event) {
1241
+ const key = event.key;
1242
+ if (key !== 'ArrowDown' &&
1243
+ key !== 'ArrowUp' &&
1244
+ key !== 'ArrowLeft' &&
1245
+ key !== 'ArrowRight' &&
1246
+ key !== 'Home' &&
1247
+ key !== 'End')
1248
+ return;
1249
+ const panel = this.active?.ref.overlayElement;
1250
+ if (!panel)
1251
+ return;
1252
+ const items = this.collectPanelFocusables(panel);
1253
+ if (items.length === 0)
1254
+ return;
1255
+ const currentIndex = items.indexOf(document.activeElement);
1256
+ let nextIndex = currentIndex;
1257
+ if (key === 'ArrowDown' || key === 'ArrowRight')
1258
+ nextIndex = (currentIndex + 1 + items.length) % items.length;
1259
+ else if (key === 'ArrowUp' || key === 'ArrowLeft')
1260
+ nextIndex = (currentIndex - 1 + items.length) % items.length;
1261
+ else if (key === 'Home')
1262
+ nextIndex = 0;
1263
+ else if (key === 'End')
1264
+ nextIndex = items.length - 1;
1265
+ if (nextIndex !== currentIndex && items[nextIndex]) {
1266
+ event.preventDefault();
1267
+ items[nextIndex].focus();
1268
+ }
1269
+ }
1270
+ collectPanelFocusables(root) {
1271
+ return Array.from(root.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter((el) => el.offsetParent !== null || el.getClientRects().length > 0);
1272
+ }
1273
+ focusFirstInPanel() {
1274
+ const panel = this.active?.ref.overlayElement;
1275
+ if (!panel)
1276
+ return;
1277
+ const items = this.collectPanelFocusables(panel);
1278
+ items[0]?.focus();
1279
+ }
1280
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TopbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1281
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: TopbarComponent, isStandalone: true, selector: "topbar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, navigationId: { classPropertyName: "navigationId", publicName: "navigationId", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, autoRegister: { classPropertyName: "autoRegister", publicName: "autoRegister", isSignal: true, isRequired: false, transformFunction: null }, showHamburger: { classPropertyName: "showHamburger", publicName: "showHamburger", isSignal: true, isRequired: false, transformFunction: null }, hamburgerLabel: { classPropertyName: "hamburgerLabel", publicName: "hamburgerLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "ariaLabel()", "class": "hostClasses()", "attr.data-appearance": "appearance()" } }, viewQueries: [{ propertyName: "dropdownTpl", first: true, predicate: ["dropdownTpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
1282
+ <div class="flex h-full w-full items-center gap-3 px-1">
1283
+ <div data-topbar-slot="start" class="flex shrink-0 items-center gap-2">
1284
+ @if (showHamburger()) {
1285
+ <button
1286
+ type="button"
1287
+ class="inline-flex h-9 w-9 items-center justify-center rounded-md text-foreground/80 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring md:hidden"
1288
+ [attr.aria-label]="hamburgerLabel()"
1289
+ [attr.aria-expanded]="nav.mobileOpen()"
1290
+ (click)="nav.toggleMobile()">
1291
+ <ui-nav-icon name="menu" [size]="18" />
1292
+ </button>
1293
+ }
1294
+ <ng-content select="[topbar-start]" />
1295
+ </div>
1296
+
1297
+ <div data-topbar-slot="nav" class="flex min-w-0 flex-1 items-center justify-center">
1298
+ <ul
1299
+ class="flex min-w-0 flex-1 items-center justify-center gap-1"
1300
+ role="menubar"
1301
+ (keydown)="onMenubarKeydown($event)">
1302
+ @for (item of resolvedItems(); track item.id) {
1303
+ <li role="none" class="relative">
1304
+ @switch (item.type) {
1305
+ @case ('basic') {
1306
+ @let basic = asBasic(item);
1307
+ <a
1308
+ role="menuitem"
1309
+ class="ui-nav-text inline-flex items-center gap-2 rounded-md px-3 py-2 text-foreground/80 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-primary"
1310
+ [routerLink]="basic.link"
1311
+ routerLinkActive
1312
+ #rla="routerLinkActive"
1313
+ [class.text-primary]="rla.isActive"
1314
+ [attr.aria-current]="rla.isActive ? 'page' : null"
1315
+ [target]="basic.target ?? undefined">
1316
+ @if (basic.icon) {
1317
+ <ui-nav-icon [name]="basic.icon" [size]="18" />
1318
+ }
1319
+ <span>{{ basic.title }}</span>
1320
+ </a>
1321
+ }
1322
+ @case ('collapsable') {
1323
+ @let col = asCollapsable(item);
1324
+ <button
1325
+ #trigger
1326
+ type="button"
1327
+ role="menuitem"
1328
+ class="ui-nav-text inline-flex items-center gap-2 rounded-md px-3 py-2 text-foreground/80 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1329
+ [class.text-primary]="isItemActive(col.id)"
1330
+ [attr.aria-expanded]="openId() === col.id"
1331
+ [attr.aria-haspopup]="'menu'"
1332
+ (click)="toggleDropdown(trigger, item)"
1333
+ (mouseenter)="openDropdown(trigger, item)">
1334
+ @if (col.icon) {
1335
+ <ui-nav-icon [name]="col.icon" [size]="18" />
1336
+ }
1337
+ <span>{{ col.title }}</span>
1338
+ <ui-nav-icon name="expand_more" [size]="18" />
1339
+ </button>
1340
+ }
1341
+ @case ('group') {
1342
+ @let group = asGroup(item);
1343
+ <button
1344
+ #trigger
1345
+ type="button"
1346
+ role="menuitem"
1347
+ class="ui-nav-text inline-flex items-center gap-2 rounded-md px-3 py-2 text-foreground/80 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1348
+ [class.text-primary]="isItemActive(group.id)"
1349
+ [attr.aria-expanded]="openId() === group.id"
1350
+ [attr.aria-haspopup]="'menu'"
1351
+ (click)="toggleDropdown(trigger, item)"
1352
+ (mouseenter)="openDropdown(trigger, item)">
1353
+ @if (group.icon) {
1354
+ <ui-nav-icon [name]="group.icon" [size]="18" />
1355
+ }
1356
+ <span>{{ group.title }}</span>
1357
+ <ui-nav-icon name="expand_more" [size]="18" />
1358
+ </button>
1359
+ }
1360
+ @default {
1361
+ <span class="ui-nav-heading px-3 py-2 text-muted-foreground">
1362
+ {{ item.title }}
1363
+ </span>
1364
+ }
1365
+ }
1366
+ </li>
1367
+ }
1368
+ </ul>
1369
+ </div>
1370
+
1371
+ <div data-topbar-slot="end" [class]="endSlotClasses()">
1372
+ <ng-content select="[topbar-end]" />
1373
+ </div>
1374
+ </div>
1375
+
1376
+ <!-- Dropdown template -->
1377
+ <ng-template #dropdownTpl let-item>
1378
+ <div role="menu" class="min-w-56 border border-brand bg-background/95 p-1" (keydown)="onPanelKeydown($event)">
1379
+ @for (child of item.children; track child.id) {
1380
+ <ui-nav-item [item]="child" />
1381
+ }
1382
+ </div>
1383
+ </ng-template>
1384
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: UiNavIconComponent, selector: "ui-nav-icon", inputs: ["name", "class", "size"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1385
+ }
1386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TopbarComponent, decorators: [{
1387
+ type: Component,
1388
+ args: [{
1389
+ selector: 'topbar',
1390
+ changeDetection: ChangeDetectionStrategy.OnPush,
1391
+ imports: [RouterLink, RouterLinkActive, UiNavIconComponent, UiNavItemComponent],
1392
+ host: {
1393
+ role: 'navigation',
1394
+ '[attr.aria-label]': 'ariaLabel()',
1395
+ '[class]': 'hostClasses()',
1396
+ '[attr.data-appearance]': 'appearance()',
1397
+ },
1398
+ template: `
1399
+ <div class="flex h-full w-full items-center gap-3 px-1">
1400
+ <div data-topbar-slot="start" class="flex shrink-0 items-center gap-2">
1401
+ @if (showHamburger()) {
1402
+ <button
1403
+ type="button"
1404
+ class="inline-flex h-9 w-9 items-center justify-center rounded-md text-foreground/80 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring md:hidden"
1405
+ [attr.aria-label]="hamburgerLabel()"
1406
+ [attr.aria-expanded]="nav.mobileOpen()"
1407
+ (click)="nav.toggleMobile()">
1408
+ <ui-nav-icon name="menu" [size]="18" />
1409
+ </button>
1410
+ }
1411
+ <ng-content select="[topbar-start]" />
1412
+ </div>
1413
+
1414
+ <div data-topbar-slot="nav" class="flex min-w-0 flex-1 items-center justify-center">
1415
+ <ul
1416
+ class="flex min-w-0 flex-1 items-center justify-center gap-1"
1417
+ role="menubar"
1418
+ (keydown)="onMenubarKeydown($event)">
1419
+ @for (item of resolvedItems(); track item.id) {
1420
+ <li role="none" class="relative">
1421
+ @switch (item.type) {
1422
+ @case ('basic') {
1423
+ @let basic = asBasic(item);
1424
+ <a
1425
+ role="menuitem"
1426
+ class="ui-nav-text inline-flex items-center gap-2 rounded-md px-3 py-2 text-foreground/80 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-primary"
1427
+ [routerLink]="basic.link"
1428
+ routerLinkActive
1429
+ #rla="routerLinkActive"
1430
+ [class.text-primary]="rla.isActive"
1431
+ [attr.aria-current]="rla.isActive ? 'page' : null"
1432
+ [target]="basic.target ?? undefined">
1433
+ @if (basic.icon) {
1434
+ <ui-nav-icon [name]="basic.icon" [size]="18" />
1435
+ }
1436
+ <span>{{ basic.title }}</span>
1437
+ </a>
1438
+ }
1439
+ @case ('collapsable') {
1440
+ @let col = asCollapsable(item);
1441
+ <button
1442
+ #trigger
1443
+ type="button"
1444
+ role="menuitem"
1445
+ class="ui-nav-text inline-flex items-center gap-2 rounded-md px-3 py-2 text-foreground/80 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1446
+ [class.text-primary]="isItemActive(col.id)"
1447
+ [attr.aria-expanded]="openId() === col.id"
1448
+ [attr.aria-haspopup]="'menu'"
1449
+ (click)="toggleDropdown(trigger, item)"
1450
+ (mouseenter)="openDropdown(trigger, item)">
1451
+ @if (col.icon) {
1452
+ <ui-nav-icon [name]="col.icon" [size]="18" />
1453
+ }
1454
+ <span>{{ col.title }}</span>
1455
+ <ui-nav-icon name="expand_more" [size]="18" />
1456
+ </button>
1457
+ }
1458
+ @case ('group') {
1459
+ @let group = asGroup(item);
1460
+ <button
1461
+ #trigger
1462
+ type="button"
1463
+ role="menuitem"
1464
+ class="ui-nav-text inline-flex items-center gap-2 rounded-md px-3 py-2 text-foreground/80 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1465
+ [class.text-primary]="isItemActive(group.id)"
1466
+ [attr.aria-expanded]="openId() === group.id"
1467
+ [attr.aria-haspopup]="'menu'"
1468
+ (click)="toggleDropdown(trigger, item)"
1469
+ (mouseenter)="openDropdown(trigger, item)">
1470
+ @if (group.icon) {
1471
+ <ui-nav-icon [name]="group.icon" [size]="18" />
1472
+ }
1473
+ <span>{{ group.title }}</span>
1474
+ <ui-nav-icon name="expand_more" [size]="18" />
1475
+ </button>
1476
+ }
1477
+ @default {
1478
+ <span class="ui-nav-heading px-3 py-2 text-muted-foreground">
1479
+ {{ item.title }}
1480
+ </span>
1481
+ }
1482
+ }
1483
+ </li>
1484
+ }
1485
+ </ul>
1486
+ </div>
1487
+
1488
+ <div data-topbar-slot="end" [class]="endSlotClasses()">
1489
+ <ng-content select="[topbar-end]" />
1490
+ </div>
1491
+ </div>
1492
+
1493
+ <!-- Dropdown template -->
1494
+ <ng-template #dropdownTpl let-item>
1495
+ <div role="menu" class="min-w-56 border border-brand bg-background/95 p-1" (keydown)="onPanelKeydown($event)">
1496
+ @for (child of item.children; track child.id) {
1497
+ <ui-nav-item [item]="child" />
1498
+ }
1499
+ </div>
1500
+ </ng-template>
1501
+ `,
1502
+ }]
1503
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], navigationId: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigationId", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], autoRegister: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoRegister", required: false }] }], showHamburger: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHamburger", required: false }] }], hamburgerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hamburgerLabel", required: false }] }], dropdownTpl: [{ type: i0.ViewChild, args: ['dropdownTpl', { isSignal: true }] }] } });
1504
+
1505
+ const DemoNavigationData = [
1506
+ {
1507
+ id: 'documentation',
1508
+ title: 'Documentation',
1509
+ subtitle: 'Guides and getting started resources',
1510
+ type: 'group',
1511
+ icon: 'menu_book',
1512
+ children: [
1513
+ {
1514
+ id: 'documentation-introduction',
1515
+ title: 'Introduction',
1516
+ type: 'basic',
1517
+ icon: 'menu_book',
1518
+ link: '/docs/introduction',
1519
+ },
1520
+ {
1521
+ id: 'documentation-installation',
1522
+ title: 'Installation',
1523
+ type: 'basic',
1524
+ icon: 'download',
1525
+ link: '/docs/installation',
1526
+ },
1527
+ {
1528
+ id: 'documentation-getting-started',
1529
+ title: 'Getting started',
1530
+ type: 'basic',
1531
+ icon: 'rocket_launch',
1532
+ link: '/docs/getting-started',
1533
+ },
1534
+ {
1535
+ id: 'documentation-upgrade-guide',
1536
+ title: 'Upgrade Guide',
1537
+ type: 'basic',
1538
+ icon: 'arrow_circle_up',
1539
+ link: '/docs/upgrade-guide',
1540
+ },
1541
+ {
1542
+ id: 'documentation-changelog',
1543
+ title: 'Changelog',
1544
+ type: 'basic',
1545
+ icon: 'history',
1546
+ link: '/docs/changelog',
1547
+ },
1548
+ {
1549
+ id: 'documentation-icon-lucide',
1550
+ title: 'Lucide Icons',
1551
+ type: 'basic',
1552
+ icon: 'star',
1553
+ link: '/lucide-icons',
1554
+ badge: {
1555
+ title: 'Demo',
1556
+ classes: 'ml-2 px-2 py-0.5 rounded-full text-xs bg-blue-500 text-white',
1557
+ },
1558
+ },
1559
+ ],
1560
+ },
1561
+ {
1562
+ id: 'user-interface',
1563
+ title: 'User Interface',
1564
+ subtitle: 'Components and design elements',
1565
+ type: 'group',
1566
+ icon: 'dashboard',
1567
+ children: [
1568
+ {
1569
+ id: 'user-interface-material-components',
1570
+ title: 'Material Components',
1571
+ type: 'collapsable',
1572
+ icon: 'deployed_code',
1573
+ children: [
1574
+ {
1575
+ id: 'user-interface-material-components-inputs-forms',
1576
+ title: 'Inputs & Forms',
1577
+ type: 'collapsable',
1578
+ icon: 'input',
1579
+ children: [
1580
+ {
1581
+ id: 'user-interface-material-components-inputs-forms-autocomplete',
1582
+ title: 'Autocomplete',
1583
+ type: 'basic',
1584
+ icon: 'search',
1585
+ link: '/ui/material/autocomplete',
1586
+ },
1587
+ {
1588
+ id: 'user-interface-material-components-inputs-forms-checkbox',
1589
+ title: 'Checkbox',
1590
+ type: 'basic',
1591
+ icon: 'check_box',
1592
+ link: '/ui/material/checkbox',
1593
+ },
1594
+ {
1595
+ id: 'user-interface-material-components-inputs-forms-datepicker',
1596
+ title: 'Datepicker',
1597
+ type: 'basic',
1598
+ icon: 'calendar_today',
1599
+ link: '/ui/material/datepicker',
1600
+ },
1601
+ {
1602
+ id: 'user-interface-material-components-inputs-forms-form-field',
1603
+ title: 'Form field',
1604
+ type: 'basic',
1605
+ icon: 'text_fields',
1606
+ link: '/ui/material/form-field',
1607
+ },
1608
+ {
1609
+ id: 'user-interface-material-components-inputs-forms-input',
1610
+ title: 'Input',
1611
+ type: 'basic',
1612
+ icon: 'text_fields',
1613
+ link: '/ui/material/input',
1614
+ },
1615
+ {
1616
+ id: 'user-interface-material-components-inputs-forms-radio-button',
1617
+ title: 'Radio button',
1618
+ type: 'basic',
1619
+ icon: 'radio_button_checked',
1620
+ link: '/ui/material/radio',
1621
+ },
1622
+ {
1623
+ id: 'user-interface-material-components-inputs-forms-select',
1624
+ title: 'Select',
1625
+ type: 'basic',
1626
+ icon: 'expand_more',
1627
+ link: '/ui/material/select',
1628
+ },
1629
+ {
1630
+ id: 'user-interface-material-components-inputs-forms-slider',
1631
+ title: 'Slider',
1632
+ type: 'basic',
1633
+ icon: 'tune',
1634
+ link: '/ui/material/slider',
1635
+ },
1636
+ {
1637
+ id: 'user-interface-material-components-inputs-forms-slide-toggle',
1638
+ title: 'Slide toggle',
1639
+ type: 'basic',
1640
+ icon: 'toggle_on',
1641
+ link: '/ui/material/slide-toggle',
1642
+ },
1643
+ ],
1644
+ },
1645
+ {
1646
+ id: 'user-interface-material-components-buttons-actions',
1647
+ title: 'Buttons & Actions',
1648
+ type: 'collapsable',
1649
+ icon: 'ads_click',
1650
+ children: [
1651
+ {
1652
+ id: 'user-interface-material-components-buttons-actions-button',
1653
+ title: 'Button',
1654
+ type: 'basic',
1655
+ icon: 'crop_square',
1656
+ link: '/ui/material/button',
1657
+ },
1658
+ {
1659
+ id: 'user-interface-material-components-buttons-actions-button-toggle',
1660
+ title: 'Button toggle',
1661
+ type: 'basic',
1662
+ icon: 'view_column',
1663
+ link: '/ui/material/button-toggle',
1664
+ },
1665
+ {
1666
+ id: 'user-interface-material-components-buttons-actions-chips',
1667
+ title: 'Chips',
1668
+ type: 'basic',
1669
+ icon: 'label',
1670
+ link: '/ui/material/chips',
1671
+ badge: {
1672
+ title: 'New',
1673
+ classes: 'ml-2 px-2 py-0.5 rounded-full text-xs bg-green-500 text-white',
1674
+ },
1675
+ },
1676
+ {
1677
+ id: 'user-interface-material-components-buttons-actions-menu',
1678
+ title: 'Menu',
1679
+ type: 'basic',
1680
+ icon: 'menu',
1681
+ link: '/ui/material/menu',
1682
+ },
1683
+ {
1684
+ id: 'user-interface-material-components-buttons-actions-ripples',
1685
+ title: 'Ripples',
1686
+ type: 'basic',
1687
+ icon: 'waves',
1688
+ link: '/ui/material/ripples',
1689
+ },
1690
+ ],
1691
+ },
1692
+ {
1693
+ id: 'user-interface-material-components-layout-containers',
1694
+ title: 'Layout & Containers',
1695
+ type: 'collapsable',
1696
+ icon: 'dashboard',
1697
+ children: [
1698
+ {
1699
+ id: 'user-interface-material-components-layout-containers-card',
1700
+ title: 'Card',
1701
+ type: 'basic',
1702
+ icon: 'credit_card',
1703
+ link: '/ui/material/card',
1704
+ },
1705
+ {
1706
+ id: 'user-interface-material-components-layout-containers-divider',
1707
+ title: 'Divider',
1708
+ type: 'basic',
1709
+ icon: 'remove',
1710
+ link: '/ui/material/divider',
1711
+ },
1712
+ {
1713
+ id: 'user-interface-material-components-layout-containers-expansion-panel',
1714
+ title: 'Expansion Panel',
1715
+ type: 'basic',
1716
+ icon: 'expand_more',
1717
+ link: '/ui/material/expansion',
1718
+ },
1719
+ {
1720
+ id: 'user-interface-material-components-layout-containers-grid-list',
1721
+ title: 'Grid list',
1722
+ type: 'basic',
1723
+ icon: 'grid_view',
1724
+ link: '/ui/material/grid-list',
1725
+ },
1726
+ {
1727
+ id: 'user-interface-material-components-layout-containers-list',
1728
+ title: 'List',
1729
+ type: 'basic',
1730
+ icon: 'list',
1731
+ link: '/ui/material/list',
1732
+ },
1733
+ {
1734
+ id: 'user-interface-material-components-layout-containers-sidenav',
1735
+ title: 'Sidenav',
1736
+ type: 'basic',
1737
+ icon: 'view_sidebar',
1738
+ link: '/ui/material/sidenav',
1739
+ },
1740
+ {
1741
+ id: 'user-interface-material-components-layout-containers-tabs',
1742
+ title: 'Tabs',
1743
+ type: 'basic',
1744
+ icon: 'tab',
1745
+ link: '/ui/material/tabs',
1746
+ },
1747
+ {
1748
+ id: 'user-interface-material-components-layout-containers-toolbar',
1749
+ title: 'Toolbar',
1750
+ type: 'basic',
1751
+ icon: 'build',
1752
+ link: '/ui/material/toolbar',
1753
+ },
1754
+ ],
1755
+ },
1756
+ {
1757
+ id: 'user-interface-material-components-data-display',
1758
+ title: 'Data & Display',
1759
+ type: 'collapsable',
1760
+ icon: 'bar_chart',
1761
+ children: [
1762
+ {
1763
+ id: 'user-interface-material-components-data-display-badge',
1764
+ title: 'Badge',
1765
+ type: 'basic',
1766
+ icon: 'verified',
1767
+ link: '/ui/material/badge',
1768
+ },
1769
+ {
1770
+ id: 'user-interface-material-components-data-display-icon',
1771
+ title: 'Icon',
1772
+ type: 'basic',
1773
+ icon: 'star',
1774
+ link: '/ui/material/icon',
1775
+ },
1776
+ {
1777
+ id: 'user-interface-material-components-data-display-paginator',
1778
+ title: 'Paginator',
1779
+ type: 'basic',
1780
+ icon: 'first_page',
1781
+ link: '/ui/material/paginator',
1782
+ },
1783
+ {
1784
+ id: 'user-interface-material-components-data-display-progress-bar',
1785
+ title: 'Progress bar',
1786
+ type: 'basic',
1787
+ icon: 'hourglass_empty',
1788
+ link: '/ui/material/progress-bar',
1789
+ },
1790
+ {
1791
+ id: 'user-interface-material-components-data-display-progress-spinner',
1792
+ title: 'Progress spinner',
1793
+ type: 'basic',
1794
+ icon: 'progress_activity',
1795
+ link: '/ui/material/progress-spinner',
1796
+ },
1797
+ {
1798
+ id: 'user-interface-material-components-data-display-sort',
1799
+ title: 'Sort header',
1800
+ type: 'basic',
1801
+ icon: 'swap_vert',
1802
+ link: '/ui/material/sort',
1803
+ },
1804
+ {
1805
+ id: 'user-interface-material-components-data-display-table',
1806
+ title: 'Table',
1807
+ type: 'basic',
1808
+ icon: 'table_chart',
1809
+ link: '/ui/material/table',
1810
+ },
1811
+ {
1812
+ id: 'user-interface-material-components-data-display-tree',
1813
+ title: 'Tree',
1814
+ type: 'basic',
1815
+ icon: 'hub',
1816
+ link: '/ui/material/tree',
1817
+ },
1818
+ ],
1819
+ },
1820
+ {
1821
+ id: 'user-interface-material-components-overlays-modals',
1822
+ title: 'Overlays & Modals',
1823
+ type: 'collapsable',
1824
+ icon: 'layers',
1825
+ children: [
1826
+ {
1827
+ id: 'user-interface-material-components-overlays-modals-bottom-sheet',
1828
+ title: 'Bottom Sheet',
1829
+ type: 'basic',
1830
+ icon: 'south',
1831
+ link: '/ui/material/bottom-sheet',
1832
+ },
1833
+ {
1834
+ id: 'user-interface-material-components-overlays-modals-dialog',
1835
+ title: 'Dialog',
1836
+ type: 'basic',
1837
+ icon: 'chat',
1838
+ link: '/ui/material/dialog',
1839
+ },
1840
+ {
1841
+ id: 'user-interface-material-components-overlays-modals-snack-bar',
1842
+ title: 'Snack-bar',
1843
+ type: 'basic',
1844
+ icon: 'notifications',
1845
+ link: '/ui/material/snack-bar',
1846
+ },
1847
+ {
1848
+ id: 'user-interface-material-components-overlays-modals-tooltip',
1849
+ title: 'Tooltip',
1850
+ type: 'basic',
1851
+ icon: 'help',
1852
+ link: '/ui/material/tooltip',
1853
+ },
1854
+ ],
1855
+ },
1856
+ {
1857
+ id: 'user-interface-material-components-navigation-stepper',
1858
+ title: 'Navigation & Steps',
1859
+ type: 'collapsable',
1860
+ icon: 'account_tree',
1861
+ children: [
1862
+ {
1863
+ id: 'user-interface-material-components-navigation-stepper-stepper',
1864
+ title: 'Stepper',
1865
+ type: 'basic',
1866
+ icon: 'account_tree',
1867
+ link: '/ui/material/stepper',
1868
+ },
1869
+ ],
1870
+ },
1871
+ ],
1872
+ },
1873
+ {
1874
+ id: 'user-interface-angular-cdk',
1875
+ title: 'Angular CDK',
1876
+ type: 'collapsable',
1877
+ icon: 'widgets',
1878
+ children: [
1879
+ {
1880
+ id: 'user-interface-angular-cdk-accessibility-navigation',
1881
+ title: 'Accessibility & Navigation',
1882
+ type: 'collapsable',
1883
+ icon: 'accessibility',
1884
+ children: [
1885
+ {
1886
+ id: 'user-interface-angular-cdk-accessibility-navigation-a11y',
1887
+ title: 'Accessibility',
1888
+ type: 'basic',
1889
+ icon: 'accessibility',
1890
+ link: '/ui/cdk/a11y',
1891
+ },
1892
+ {
1893
+ id: 'user-interface-angular-cdk-accessibility-navigation-focus-trap',
1894
+ title: 'Focus Trap',
1895
+ type: 'basic',
1896
+ icon: 'center_focus_strong',
1897
+ link: '/ui/cdk/focus-trap',
1898
+ },
1899
+ {
1900
+ id: 'user-interface-angular-cdk-accessibility-navigation-live-announcer',
1901
+ title: 'Live Announcer',
1902
+ type: 'basic',
1903
+ icon: 'campaign',
1904
+ link: '/ui/cdk/live-announcer',
1905
+ },
1906
+ {
1907
+ id: 'user-interface-angular-cdk-accessibility-navigation-listbox',
1908
+ title: 'Listbox',
1909
+ type: 'basic',
1910
+ icon: 'list',
1911
+ link: '/ui/cdk/listbox',
1912
+ },
1913
+ {
1914
+ id: 'user-interface-angular-cdk-accessibility-navigation-menu-cdk',
1915
+ title: 'Menu',
1916
+ type: 'basic',
1917
+ icon: 'menu',
1918
+ link: '/ui/cdk/menu',
1919
+ },
1920
+ ],
1921
+ },
1922
+ {
1923
+ id: 'user-interface-angular-cdk-layout-positioning',
1924
+ title: 'Layout & Positioning',
1925
+ type: 'collapsable',
1926
+ icon: 'dashboard',
1927
+ children: [
1928
+ {
1929
+ id: 'user-interface-angular-cdk-layout-positioning-layout',
1930
+ title: 'Layout',
1931
+ type: 'basic',
1932
+ icon: 'dashboard',
1933
+ link: '/ui/cdk/layout',
1934
+ },
1935
+ {
1936
+ id: 'user-interface-angular-cdk-layout-positioning-overlay',
1937
+ title: 'Overlay',
1938
+ type: 'basic',
1939
+ icon: 'layers',
1940
+ link: '/ui/cdk/overlay',
1941
+ },
1942
+ {
1943
+ id: 'user-interface-angular-cdk-layout-positioning-portal',
1944
+ title: 'Portal',
1945
+ type: 'basic',
1946
+ icon: 'radio_button_checked',
1947
+ link: '/ui/cdk/portal',
1948
+ },
1949
+ {
1950
+ id: 'user-interface-angular-cdk-layout-positioning-scrolling',
1951
+ title: 'Scrolling',
1952
+ type: 'basic',
1953
+ icon: 'unfold_more',
1954
+ link: '/ui/cdk/scrolling',
1955
+ },
1956
+ {
1957
+ id: 'user-interface-angular-cdk-layout-positioning-virtual-scrolling',
1958
+ title: 'Virtual Scrolling',
1959
+ type: 'basic',
1960
+ icon: 'view_agenda',
1961
+ link: '/ui/cdk/virtual-scrolling',
1962
+ },
1963
+ ],
1964
+ },
1965
+ {
1966
+ id: 'user-interface-angular-cdk-interaction-behavior',
1967
+ title: 'Interaction & Behavior',
1968
+ type: 'collapsable',
1969
+ icon: 'pan_tool',
1970
+ children: [
1971
+ {
1972
+ id: 'user-interface-angular-cdk-interaction-behavior-drag-drop',
1973
+ title: 'Drag and Drop',
1974
+ type: 'basic',
1975
+ icon: 'open_with',
1976
+ link: '/ui/cdk/drag-drop',
1977
+ },
1978
+ {
1979
+ id: 'user-interface-angular-cdk-interaction-behavior-observers',
1980
+ title: 'Observers',
1981
+ type: 'basic',
1982
+ icon: 'visibility',
1983
+ link: '/ui/cdk/observers',
1984
+ },
1985
+ {
1986
+ id: 'user-interface-angular-cdk-interaction-behavior-platform',
1987
+ title: 'Platform',
1988
+ type: 'basic',
1989
+ icon: 'devices',
1990
+ link: '/ui/cdk/platform',
1991
+ },
1992
+ {
1993
+ id: 'user-interface-angular-cdk-interaction-behavior-stepper-cdk',
1994
+ title: 'Stepper',
1995
+ type: 'basic',
1996
+ icon: 'account_tree',
1997
+ link: '/ui/cdk/stepper',
1998
+ },
1999
+ ],
2000
+ },
2001
+ {
2002
+ id: 'user-interface-angular-cdk-forms-data',
2003
+ title: 'Forms & Data',
2004
+ type: 'collapsable',
2005
+ icon: 'storage',
2006
+ children: [
2007
+ {
2008
+ id: 'user-interface-angular-cdk-forms-data-accordion',
2009
+ title: 'Accordion',
2010
+ type: 'basic',
2011
+ icon: 'expand_more',
2012
+ link: '/ui/cdk/accordion',
2013
+ },
2014
+ {
2015
+ id: 'user-interface-angular-cdk-forms-data-table-cdk',
2016
+ title: 'Table',
2017
+ type: 'basic',
2018
+ icon: 'table_chart',
2019
+ link: '/ui/cdk/table',
2020
+ },
2021
+ {
2022
+ id: 'user-interface-angular-cdk-forms-data-tree-cdk',
2023
+ title: 'Tree',
2024
+ type: 'basic',
2025
+ icon: 'hub',
2026
+ link: '/ui/cdk/tree',
2027
+ },
2028
+ ],
2029
+ },
2030
+ {
2031
+ id: 'user-interface-angular-cdk-utilities-helpers',
2032
+ title: 'Utilities & Helpers',
2033
+ type: 'collapsable',
2034
+ icon: 'build',
2035
+ children: [
2036
+ {
2037
+ id: 'user-interface-angular-cdk-utilities-helpers-bidi',
2038
+ title: 'Bidirectionality',
2039
+ type: 'basic',
2040
+ icon: 'swap_horiz',
2041
+ link: '/ui/cdk/bidi',
2042
+ },
2043
+ {
2044
+ id: 'user-interface-angular-cdk-utilities-helpers-clipboard',
2045
+ title: 'Clipboard',
2046
+ type: 'basic',
2047
+ icon: 'content_paste',
2048
+ link: '/ui/cdk/clipboard',
2049
+ },
2050
+ {
2051
+ id: 'user-interface-angular-cdk-utilities-helpers-coercion',
2052
+ title: 'Coercion',
2053
+ type: 'basic',
2054
+ icon: 'shuffle',
2055
+ link: '/ui/cdk/coercion',
2056
+ },
2057
+ {
2058
+ id: 'user-interface-angular-cdk-utilities-helpers-collections',
2059
+ title: 'Collections',
2060
+ type: 'basic',
2061
+ icon: 'folder',
2062
+ link: '/ui/cdk/collections',
2063
+ },
2064
+ {
2065
+ id: 'user-interface-angular-cdk-utilities-helpers-keycodes',
2066
+ title: 'Keycodes',
2067
+ type: 'basic',
2068
+ icon: 'keyboard',
2069
+ link: '/ui/cdk/keycodes',
2070
+ },
2071
+ ],
2072
+ },
2073
+ {
2074
+ id: 'user-interface-angular-cdk-testing-tools',
2075
+ title: 'Testing Tools',
2076
+ type: 'collapsable',
2077
+ icon: 'bug_report',
2078
+ children: [
2079
+ {
2080
+ id: 'user-interface-angular-cdk-testing-tools-component-harnesses',
2081
+ title: 'Component Harnesses',
2082
+ type: 'basic',
2083
+ icon: 'science',
2084
+ link: '/ui/cdk/testing',
2085
+ },
2086
+ {
2087
+ id: 'user-interface-angular-cdk-testing-tools-test-harnesses',
2088
+ title: 'Test Harnesses',
2089
+ type: 'basic',
2090
+ icon: 'science',
2091
+ link: '/ui/cdk/test-harnesses',
2092
+ },
2093
+ ],
2094
+ },
2095
+ {
2096
+ id: 'user-interface-angular-cdk-advanced-feature',
2097
+ title: 'Advanced feature',
2098
+ type: 'collapsable',
2099
+ icon: 'settings',
2100
+ children: [
2101
+ {
2102
+ id: 'user-interface-angular-cdk-advanced-feature-dialog-cdk',
2103
+ title: 'Dialog',
2104
+ type: 'basic',
2105
+ icon: 'chat',
2106
+ link: '/ui/cdk/dialog',
2107
+ },
2108
+ {
2109
+ id: 'user-interface-angular-cdk-advanced-feature-text-field',
2110
+ title: 'Text Field',
2111
+ type: 'basic',
2112
+ icon: 'text_fields',
2113
+ link: '/ui/cdk/text-field',
2114
+ },
2115
+ ],
2116
+ },
2117
+ ],
2118
+ },
2119
+ {
2120
+ id: 'user-interface-tailwind',
2121
+ title: 'Tailwind CSS',
2122
+ type: 'collapsable',
2123
+ icon: 'air',
2124
+ children: [
2125
+ {
2126
+ id: 'user-interface-tailwind-css-heading',
2127
+ title: 'Heading',
2128
+ type: 'basic',
2129
+ icon: 'text_fields',
2130
+ link: '/ui/tailwind/heading',
2131
+ },
2132
+ {
2133
+ id: 'user-interface-tailwind-data-display',
2134
+ title: 'Data Display',
2135
+ type: 'basic',
2136
+ icon: 'bar_chart',
2137
+ link: '/ui/tailwind/data-display',
2138
+ },
2139
+ {
2140
+ id: 'user-interface-tailwind-list',
2141
+ title: 'List',
2142
+ type: 'basic',
2143
+ icon: 'list',
2144
+ link: '/ui/tailwind/list',
2145
+ },
2146
+ {
2147
+ id: 'user-interface-tailwind-form',
2148
+ title: 'Form',
2149
+ type: 'basic',
2150
+ icon: 'dynamic_form',
2151
+ link: '/ui/tailwind/form',
2152
+ },
2153
+ {
2154
+ id: 'user-interface-tailwind-feedback',
2155
+ title: 'Feedback',
2156
+ type: 'basic',
2157
+ icon: 'report',
2158
+ link: '/ui/tailwind/feedback',
2159
+ },
2160
+ ],
2161
+ },
2162
+ ],
2163
+ },
2164
+ {
2165
+ id: 'feature',
2166
+ title: 'Features',
2167
+ subtitle: 'Advanced functionality and customization options',
2168
+ type: 'group',
2169
+ icon: 'settings',
2170
+ children: [
2171
+ {
2172
+ id: 'feature-theme',
2173
+ title: 'Themes',
2174
+ type: 'collapsable',
2175
+ icon: 'palette',
2176
+ children: [
2177
+ {
2178
+ id: 'feature-theme-dark-mode',
2179
+ title: 'Dark Mode',
2180
+ type: 'basic',
2181
+ icon: 'dark_mode',
2182
+ link: '/feature/theme/dark-mode',
2183
+ },
2184
+ {
2185
+ id: 'feature-theme-color',
2186
+ title: 'Color Schemes',
2187
+ type: 'basic',
2188
+ icon: 'palette',
2189
+ link: '/feature/theme/color-schemes',
2190
+ badge: {
2191
+ title: 'Beta',
2192
+ classes: 'ml-2 px-2 py-0.5 rounded-full text-xs bg-yellow-500 text-white',
2193
+ },
2194
+ },
2195
+ {
2196
+ id: 'feature-layout',
2197
+ title: 'Layout',
2198
+ type: 'collapsable',
2199
+ icon: 'dashboard',
2200
+ children: [
2201
+ {
2202
+ id: 'feature-layout-apps',
2203
+ title: 'Application',
2204
+ type: 'collapsable',
2205
+ icon: 'web',
2206
+ children: [
2207
+ {
2208
+ id: 'feature-layout-apps-vertical',
2209
+ title: 'Vertical',
2210
+ type: 'basic',
2211
+ icon: 'view_sidebar',
2212
+ link: '/feature/layout/application/vertical',
2213
+ },
2214
+ {
2215
+ id: 'feature-layout-apps-horizontal',
2216
+ title: 'Horizontal',
2217
+ type: 'basic',
2218
+ icon: 'view_column',
2219
+ link: '/feature/layout/application/horizontal',
2220
+ },
2221
+ ],
2222
+ },
2223
+ {
2224
+ id: 'feature-layout-page',
2225
+ title: 'Pages',
2226
+ type: 'collapsable',
2227
+ icon: 'description',
2228
+ children: [
2229
+ {
2230
+ id: 'feature-layout-page-page',
2231
+ title: 'Page',
2232
+ type: 'basic',
2233
+ icon: 'description',
2234
+ link: '/feature/layout/page/page',
2235
+ },
2236
+ {
2237
+ id: 'feature-layout-page-content',
2238
+ title: 'Content',
2239
+ type: 'basic',
2240
+ icon: 'description',
2241
+ link: '/feature/layout/page/content',
2242
+ },
2243
+ ],
2244
+ },
2245
+ ],
2246
+ },
2247
+ ],
2248
+ },
2249
+ {
2250
+ id: 'feature-navigation',
2251
+ title: 'Navigation',
2252
+ type: 'collapsable',
2253
+ icon: 'navigation',
2254
+ children: [
2255
+ {
2256
+ id: 'feature-navigation-horizontal-navigation',
2257
+ title: 'Horizontal ',
2258
+ type: 'basic',
2259
+ icon: 'view_column',
2260
+ link: '/feature/navigation/horizontal',
2261
+ },
2262
+ {
2263
+ id: 'feature-navigation-vertical-navigation',
2264
+ title: 'Vertical ',
2265
+ type: 'collapsable',
2266
+ icon: 'view_agenda',
2267
+ children: [
2268
+ {
2269
+ id: 'feature-navigation-vertical-navigation-default',
2270
+ title: 'Default',
2271
+ type: 'basic',
2272
+ icon: 'view_agenda',
2273
+ link: '/feature/navigation/vertical/default',
2274
+ },
2275
+ {
2276
+ id: 'feature-navigation-vertical-navigation-thin',
2277
+ title: 'Thin',
2278
+ type: 'basic',
2279
+ icon: 'view_agenda',
2280
+ link: '/feature/navigation/vertical/thin',
2281
+ },
2282
+ {
2283
+ id: 'feature-navigation-vertical-navigation-compact',
2284
+ title: 'Compact',
2285
+ type: 'basic',
2286
+ icon: 'view_agenda',
2287
+ link: '/feature/navigation/vertical/compact',
2288
+ },
2289
+ {
2290
+ id: 'feature-navigation-vertical-navigation-dense',
2291
+ title: 'Dense',
2292
+ type: 'basic',
2293
+ icon: 'view_agenda',
2294
+ link: '/feature/navigation/vertical/dense',
2295
+ },
2296
+ ],
2297
+ },
2298
+ ],
2299
+ },
2300
+ ],
2301
+ },
2302
+ ];
2303
+
2304
+ /*
2305
+ * Public API Surface of @edsis/angular/navigation
2306
+ */
2307
+ // Core
2308
+ const NAVIGATION_VERSION = '0.0.1';
2309
+
2310
+ /**
2311
+ * Generated bundle index. Do not edit.
2312
+ */
2313
+
2314
+ export { DEFAULT_NAVIGATION_ID, DemoNavigationData, NAVIGATION_VERSION, NavigationService, SidebarComponent, TopbarComponent, UiNavIconComponent, UiNavItemComponent };
2315
+ //# sourceMappingURL=ojiepermana-angular-navigation.mjs.map