@ojiepermana/angular 22.1.14 → 22.2.1

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 (252) hide show
  1. package/README.md +8 -6
  2. package/SUPPORT.md +3 -3
  3. package/chart/README.md +1 -1
  4. package/component/README.md +2 -2
  5. package/component/calendar/README.md +3 -15
  6. package/component/drawer/README.md +1 -2
  7. package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
  8. package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
  9. package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
  10. package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
  11. package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
  12. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
  13. package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
  14. package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
  15. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
  16. package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
  17. package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
  18. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
  19. package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
  20. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
  21. package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
  22. package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
  23. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
  24. package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
  25. package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
  26. package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
  27. package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
  28. package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
  29. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
  30. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
  31. package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
  32. package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
  33. package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
  34. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
  35. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
  36. package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
  37. package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -5
  38. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
  39. package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
  40. package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
  41. package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
  42. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
  43. package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
  44. package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
  45. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
  46. package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
  47. package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
  48. package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
  49. package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
  50. package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
  51. package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
  52. package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
  53. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
  54. package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
  55. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
  56. package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
  57. package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
  58. package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
  59. package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
  60. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
  61. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
  62. package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
  63. package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
  64. package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
  65. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
  66. package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
  67. package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
  68. package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
  69. package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
  70. package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
  71. package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
  72. package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
  73. package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
  74. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
  75. package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
  76. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
  77. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
  78. package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
  79. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
  80. package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
  81. package/fesm2022/ojiepermana-angular-component.mjs +0 -10
  82. package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
  83. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
  84. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-DYuysKVf.mjs +129 -0
  85. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-COiTaw34.mjs +812 -0
  86. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs} +392 -207
  87. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-D2vwEwBY.mjs +650 -0
  88. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-B5D7yXfb.mjs +662 -0
  89. package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs +1219 -0
  90. package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-CrK16trj.mjs +327 -0
  91. package/fesm2022/ojiepermana-angular-navigation-service.mjs +544 -724
  92. package/fesm2022/ojiepermana-angular-navigation-types.mjs +139 -56
  93. package/fesm2022/ojiepermana-angular-navigation.mjs +3256 -4
  94. package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
  95. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1125 -737
  96. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
  97. package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
  98. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1928 -553
  99. package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -496
  100. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
  101. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
  102. package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
  103. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
  104. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
  105. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
  106. package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
  107. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
  108. package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
  109. package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
  110. package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
  111. package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
  112. package/fesm2022/ojiepermana-angular.mjs +5 -24
  113. package/navigation/README.md +69 -18
  114. package/package.json +16 -12
  115. package/sdk/README.md +1 -1
  116. package/sdk/src/writer/index.js +2 -2
  117. package/theme/README.md +1 -1
  118. package/theme/layout/README.md +2 -4
  119. package/theme/page/README.md +50 -0
  120. package/theme/styles/README.md +10 -10
  121. package/theme/styles/css/base/prefers-dark.css +1 -1
  122. package/theme/styles/css/base/status.css +1 -1
  123. package/theme/styles/css/color/amber.css +1 -1
  124. package/theme/styles/css/color/blue.css +1 -1
  125. package/theme/styles/css/color/cyan.css +1 -1
  126. package/theme/styles/css/color/emerald.css +1 -1
  127. package/theme/styles/css/color/fuchsia.css +1 -1
  128. package/theme/styles/css/color/green.css +1 -1
  129. package/theme/styles/css/color/indigo.css +1 -1
  130. package/theme/styles/css/color/lime.css +1 -1
  131. package/theme/styles/css/color/orange.css +1 -1
  132. package/theme/styles/css/color/pink.css +1 -1
  133. package/theme/styles/css/color/purple.css +1 -1
  134. package/theme/styles/css/color/red.css +1 -1
  135. package/theme/styles/css/color/rose.css +1 -1
  136. package/theme/styles/css/color/sky.css +1 -1
  137. package/theme/styles/css/color/teal.css +1 -1
  138. package/theme/styles/css/color/violet.css +1 -1
  139. package/theme/styles/css/color/yellow.css +1 -1
  140. package/theme/styles/css/neutral/gray.css +1 -1
  141. package/theme/styles/css/neutral/mauve.css +1 -1
  142. package/theme/styles/css/neutral/mist.css +1 -1
  143. package/theme/styles/css/neutral/neutral.css +1 -1
  144. package/theme/styles/css/neutral/olive.css +1 -1
  145. package/theme/styles/css/neutral/slate.css +1 -1
  146. package/theme/styles/css/neutral/stone.css +1 -1
  147. package/theme/styles/css/neutral/taupe.css +1 -1
  148. package/theme/styles/css/neutral/zinc.css +1 -1
  149. package/types/ojiepermana-angular-chart-area.d.ts +126 -63
  150. package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
  151. package/types/ojiepermana-angular-chart-core.d.ts +409 -398
  152. package/types/ojiepermana-angular-chart-line.d.ts +141 -68
  153. package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
  154. package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
  155. package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
  156. package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
  157. package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
  158. package/types/ojiepermana-angular-chart.d.ts +3 -2
  159. package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
  160. package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
  161. package/types/ojiepermana-angular-component-alert.d.ts +69 -39
  162. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
  163. package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
  164. package/types/ojiepermana-angular-component-badge.d.ts +36 -24
  165. package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
  166. package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
  167. package/types/ojiepermana-angular-component-button.d.ts +44 -27
  168. package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
  169. package/types/ojiepermana-angular-component-card.d.ts +112 -63
  170. package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
  171. package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
  172. package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
  173. package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
  174. package/types/ojiepermana-angular-component-command.d.ts +206 -121
  175. package/types/ojiepermana-angular-component-composer.d.ts +184 -84
  176. package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
  177. package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
  178. package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
  179. package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
  180. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
  181. package/types/ojiepermana-angular-component-editor.d.ts +215 -117
  182. package/types/ojiepermana-angular-component-empty.d.ts +80 -45
  183. package/types/ojiepermana-angular-component-form.d.ts +185 -121
  184. package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
  185. package/types/ojiepermana-angular-component-icon.d.ts +87 -57
  186. package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
  187. package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
  188. package/types/ojiepermana-angular-component-input.d.ts +27 -17
  189. package/types/ojiepermana-angular-component-item.d.ts +160 -84
  190. package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
  191. package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
  192. package/types/ojiepermana-angular-component-label.d.ts +19 -11
  193. package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
  194. package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
  195. package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
  196. package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
  197. package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
  198. package/types/ojiepermana-angular-component-popover.d.ts +94 -64
  199. package/types/ojiepermana-angular-component-progress.d.ts +45 -17
  200. package/types/ojiepermana-angular-component-radio.d.ts +129 -53
  201. package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
  202. package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
  203. package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
  204. package/types/ojiepermana-angular-component-select.d.ts +94 -77
  205. package/types/ojiepermana-angular-component-separator.d.ts +26 -14
  206. package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
  207. package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
  208. package/types/ojiepermana-angular-component-slider.d.ts +140 -75
  209. package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
  210. package/types/ojiepermana-angular-component-switch.d.ts +97 -40
  211. package/types/ojiepermana-angular-component-table.d.ts +102 -50
  212. package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
  213. package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
  214. package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
  215. package/types/ojiepermana-angular-component-toast.d.ts +51 -55
  216. package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
  217. package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
  218. package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
  219. package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
  220. package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
  221. package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
  222. package/types/ojiepermana-angular-component-utils.d.ts +2 -2
  223. package/types/ojiepermana-angular-component.d.ts +1 -2
  224. package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
  225. package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
  226. package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
  227. package/types/ojiepermana-angular-navigation-types.d.ts +166 -125
  228. package/types/ojiepermana-angular-navigation.d.ts +708 -375
  229. package/types/ojiepermana-angular-sdk.d.ts +69 -71
  230. package/types/ojiepermana-angular-theme-component-settings.d.ts +120 -86
  231. package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
  232. package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
  233. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +446 -187
  234. package/types/ojiepermana-angular-theme-layout.d.ts +201 -113
  235. package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
  236. package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
  237. package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
  238. package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
  239. package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
  240. package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
  241. package/types/ojiepermana-angular-theme-page.d.ts +7 -5
  242. package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
  243. package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
  244. package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
  245. package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
  246. package/types/ojiepermana-angular-theme.d.ts +1 -2
  247. package/types/ojiepermana-angular.d.ts +5 -5
  248. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-Be3IqzG4.mjs +0 -91
  249. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-Bc7DWK3R.mjs +0 -522
  250. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-DA8VPEn7.mjs +0 -404
  251. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-U2TJTzlW.mjs +0 -466
  252. package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-CIUhmytH.mjs +0 -2668
@@ -0,0 +1,1219 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Component, computed, inject, input, output, signal } from "@angular/core";
3
+ import { ActivatedRoute, Router, RouterLink } from "@angular/router";
4
+ import { cn } from "@ojiepermana/angular/component/utils/core";
5
+ import { NAVIGATION_ADAPTER, NAVIGATION_ROUTE_CONTEXT_ADAPTER } from "@ojiepermana/angular/navigation/core";
6
+ import { NgTemplateOutlet } from "@angular/common";
7
+ import { IconComponent } from "@ojiepermana/angular/component/icon";
8
+ import { TooltipDirective } from "@ojiepermana/angular/component/tooltip";
9
+ var NavigationItemContentComponent = class NavigationItemContentComponent {
10
+ nav = inject(NAVIGATION_ADAPTER);
11
+ item = input.required(...ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []);
12
+ active = input(false, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
13
+ compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
14
+ orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
15
+ level = input(0, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
16
+ iconTemplate = input(void 0, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
17
+ iconSlotClasses = computed(() => cn("relative z-10 inline-flex shrink-0 items-center justify-center transition-colors duration-200", this.compact() && "mx-auto", this.active() ? "text-current" : "text-muted-foreground group-hover/nav:text-current"), ...ngDevMode ? [{ debugName: "iconSlotClasses" }] : /* istanbul ignore next */ []);
18
+ titleClasses = computed(() => cn("block truncate", this.active() && "text-foreground", this.item().classes?.title), ...ngDevMode ? [{ debugName: "titleClasses" }] : /* istanbul ignore next */ []);
19
+ showSubtitle = computed(() => !!this.item().subtitle && !(this.orientation() === "horizontal" && this.level() === 0), ...ngDevMode ? [{ debugName: "showSubtitle" }] : /* istanbul ignore next */ []);
20
+ subtitleClasses = computed(() => cn("nav-subtitle block truncate text-muted-foreground", this.item().classes?.subtitle), ...ngDevMode ? [{ debugName: "subtitleClasses" }] : /* istanbul ignore next */ []);
21
+ compactFallbackClasses = computed(() => cn("inline-flex h-5 min-w-5 items-center justify-center text-(length:--nav-icon-size-sub) font-semibold uppercase"), ...ngDevMode ? [{ debugName: "compactFallbackClasses" }] : /* istanbul ignore next */ []);
22
+ defaultBadgeClasses = computed(() => cn("nav-badge ml-auto inline-flex h-5 shrink-0 items-center rounded-full px-2", this.active() ? "bg-background text-foreground" : "bg-muted text-muted-foreground"), ...ngDevMode ? [{ debugName: "defaultBadgeClasses" }] : /* istanbul ignore next */ []);
23
+ defaultIconClasses = computed(() => cn(this.compact() ? "text-(length:--nav-icon-size-rail)" : "text-(length:--nav-icon-size)", "text-current", this.item().classes?.icon), ...ngDevMode ? [{ debugName: "defaultIconClasses" }] : /* istanbul ignore next */ []);
24
+ iconContext = computed(() => this.nav.iconContext(this.item(), this.active(), this.level(), this.orientation()), ...ngDevMode ? [{ debugName: "iconContext" }] : /* istanbul ignore next */ []);
25
+ compactFallback() {
26
+ return this.nav.compactFallback(this.item());
27
+ }
28
+ static ɵfac = i0.ɵɵngDeclareFactory({
29
+ minVersion: "12.0.0",
30
+ version: "22.2.2",
31
+ ngImport: i0,
32
+ type: NavigationItemContentComponent,
33
+ deps: [],
34
+ target: i0.ɵɵFactoryTarget.Component
35
+ });
36
+ static ɵcmp = i0.ɵɵngDeclareComponent({
37
+ minVersion: "17.0.0",
38
+ version: "22.2.2",
39
+ type: NavigationItemContentComponent,
40
+ isStandalone: true,
41
+ selector: "NavigationItemContent",
42
+ inputs: {
43
+ item: {
44
+ classPropertyName: "item",
45
+ publicName: "item",
46
+ isSignal: true,
47
+ isRequired: true,
48
+ transformFunction: null
49
+ },
50
+ active: {
51
+ classPropertyName: "active",
52
+ publicName: "active",
53
+ isSignal: true,
54
+ isRequired: false,
55
+ transformFunction: null
56
+ },
57
+ compact: {
58
+ classPropertyName: "compact",
59
+ publicName: "compact",
60
+ isSignal: true,
61
+ isRequired: false,
62
+ transformFunction: null
63
+ },
64
+ orientation: {
65
+ classPropertyName: "orientation",
66
+ publicName: "orientation",
67
+ isSignal: true,
68
+ isRequired: false,
69
+ transformFunction: null
70
+ },
71
+ level: {
72
+ classPropertyName: "level",
73
+ publicName: "level",
74
+ isSignal: true,
75
+ isRequired: false,
76
+ transformFunction: null
77
+ },
78
+ iconTemplate: {
79
+ classPropertyName: "iconTemplate",
80
+ publicName: "iconTemplate",
81
+ isSignal: true,
82
+ isRequired: false,
83
+ transformFunction: null
84
+ }
85
+ },
86
+ host: { classAttribute: "contents" },
87
+ ngImport: i0,
88
+ template: `
89
+ @if (item().icon; as iconName) {
90
+ <span data-navigation-icon-slot="true" [class]="iconSlotClasses()">
91
+ @if (iconTemplate(); as customIcon) {
92
+ <ng-container
93
+ [ngTemplateOutlet]="customIcon.template"
94
+ [ngTemplateOutletContext]="iconContext()"
95
+ />
96
+ } @else {
97
+ <Icon [name]="iconName" [class]="defaultIconClasses()" size="inherit" [fill]="1" />
98
+ }
99
+ </span>
100
+ }
101
+
102
+ @if (!compact()) {
103
+ <span class="min-w-0 flex-1">
104
+ <span [class]="titleClasses()">{{ item().title }}</span>
105
+ @if (showSubtitle()) {
106
+ <span [class]="subtitleClasses()">{{ item().subtitle }}</span>
107
+ }
108
+ </span>
109
+
110
+ @if (item().badge?.title; as badgeTitle) {
111
+ <span [class]="item().badge?.classes ?? defaultBadgeClasses()">{{ badgeTitle }}</span>
112
+ }
113
+ }
114
+
115
+ @if (compact() && !item().icon) {
116
+ <span aria-hidden="true" [class]="compactFallbackClasses()">{{ compactFallback() }}</span>
117
+ }
118
+ `,
119
+ isInline: true,
120
+ dependencies: [{
121
+ kind: "directive",
122
+ type: NgTemplateOutlet,
123
+ selector: "[ngTemplateOutlet]",
124
+ inputs: [
125
+ "ngTemplateOutletContext",
126
+ "ngTemplateOutlet",
127
+ "ngTemplateOutletInjector"
128
+ ]
129
+ }, {
130
+ kind: "component",
131
+ type: IconComponent,
132
+ selector: "Icon",
133
+ inputs: [
134
+ "name",
135
+ "class",
136
+ "size",
137
+ "fill",
138
+ "weight",
139
+ "grade",
140
+ "opticalSize"
141
+ ]
142
+ }]
143
+ });
144
+ };
145
+ i0.ɵɵngDeclareClassMetadata({
146
+ minVersion: "12.0.0",
147
+ version: "22.2.2",
148
+ ngImport: i0,
149
+ type: NavigationItemContentComponent,
150
+ decorators: [{
151
+ type: Component,
152
+ args: [{
153
+ selector: "NavigationItemContent",
154
+ imports: [NgTemplateOutlet, IconComponent],
155
+ host: { class: "contents" },
156
+ template: `
157
+ @if (item().icon; as iconName) {
158
+ <span data-navigation-icon-slot="true" [class]="iconSlotClasses()">
159
+ @if (iconTemplate(); as customIcon) {
160
+ <ng-container
161
+ [ngTemplateOutlet]="customIcon.template"
162
+ [ngTemplateOutletContext]="iconContext()"
163
+ />
164
+ } @else {
165
+ <Icon [name]="iconName" [class]="defaultIconClasses()" size="inherit" [fill]="1" />
166
+ }
167
+ </span>
168
+ }
169
+
170
+ @if (!compact()) {
171
+ <span class="min-w-0 flex-1">
172
+ <span [class]="titleClasses()">{{ item().title }}</span>
173
+ @if (showSubtitle()) {
174
+ <span [class]="subtitleClasses()">{{ item().subtitle }}</span>
175
+ }
176
+ </span>
177
+
178
+ @if (item().badge?.title; as badgeTitle) {
179
+ <span [class]="item().badge?.classes ?? defaultBadgeClasses()">{{ badgeTitle }}</span>
180
+ }
181
+ }
182
+
183
+ @if (compact() && !item().icon) {
184
+ <span aria-hidden="true" [class]="compactFallbackClasses()">{{ compactFallback() }}</span>
185
+ }
186
+ `
187
+ }]
188
+ }],
189
+ propDecorators: {
190
+ item: [{
191
+ type: i0.Input,
192
+ args: [{
193
+ isSignal: true,
194
+ alias: "item",
195
+ required: true
196
+ }]
197
+ }],
198
+ active: [{
199
+ type: i0.Input,
200
+ args: [{
201
+ isSignal: true,
202
+ alias: "active",
203
+ required: false
204
+ }]
205
+ }],
206
+ compact: [{
207
+ type: i0.Input,
208
+ args: [{
209
+ isSignal: true,
210
+ alias: "compact",
211
+ required: false
212
+ }]
213
+ }],
214
+ orientation: [{
215
+ type: i0.Input,
216
+ args: [{
217
+ isSignal: true,
218
+ alias: "orientation",
219
+ required: false
220
+ }]
221
+ }],
222
+ level: [{
223
+ type: i0.Input,
224
+ args: [{
225
+ isSignal: true,
226
+ alias: "level",
227
+ required: false
228
+ }]
229
+ }],
230
+ iconTemplate: [{
231
+ type: i0.Input,
232
+ args: [{
233
+ isSignal: true,
234
+ alias: "iconTemplate",
235
+ required: false
236
+ }]
237
+ }]
238
+ }
239
+ });
240
+ function navigationPanelId(navId, item) {
241
+ return `${safeNavId(navId)}-${item.panelId}`;
242
+ }
243
+ function navigationHeadingId(navId, item) {
244
+ return `${navigationPanelId(navId, item)}-heading`;
245
+ }
246
+ function safeNavId(value) {
247
+ return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-") || "default";
248
+ }
249
+ var NavigationItemComponent = class NavigationItemComponent {
250
+ nav = inject(NAVIGATION_ADAPTER);
251
+ routeContext = inject(NAVIGATION_ROUTE_CONTEXT_ADAPTER);
252
+ router = inject(Router, { optional: true });
253
+ activatedRoute = inject(ActivatedRoute, { optional: true });
254
+ navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
255
+ item = input.required(...ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []);
256
+ level = input(0, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
257
+ orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
258
+ compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
259
+ itemClass = input("", ...ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []);
260
+ activeIds = input(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "activeIds" }] : /* istanbul ignore next */ []);
261
+ activeUrl = input(null, ...ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []);
262
+ iconTemplate = input(void 0, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
263
+ tooltipPosition = input("above", {
264
+ ...ngDevMode ? { debugName: "tooltipPosition" } : /* istanbul ignore next */ {},
265
+ alias: "tooltip-position"
266
+ });
267
+ collapseTree = input("stairs", ...ngDevMode ? [{ debugName: "collapseTree" }] : /* istanbul ignore next */ []);
268
+ straightRail = input(false, ...ngDevMode ? [{ debugName: "straightRail" }] : /* istanbul ignore next */ []);
269
+ stairsRail = input(false, ...ngDevMode ? [{ debugName: "stairsRail" }] : /* istanbul ignore next */ []);
270
+ straightRailActive = input(false, ...ngDevMode ? [{ debugName: "straightRailActive" }] : /* istanbul ignore next */ []);
271
+ firstInBranch = input(false, ...ngDevMode ? [{ debugName: "firstInBranch" }] : /* istanbul ignore next */ []);
272
+ lastInBranch = input(false, ...ngDevMode ? [{ debugName: "lastInBranch" }] : /* istanbul ignore next */ []);
273
+ openedIds = input([], ...ngDevMode ? [{ debugName: "openedIds" }] : /* istanbul ignore next */ []);
274
+ openedIdsChange = output();
275
+ itemSelected = output();
276
+ openedIdSet = computed(() => new Set(this.openedIds()), ...ngDevMode ? [{ debugName: "openedIdSet" }] : /* istanbul ignore next */ []);
277
+ listedAsOpen = computed(() => this.openedIdSet().has(this.item().stateId) || this.openedIdSet().has(this.item().key), ...ngDevMode ? [{ debugName: "listedAsOpen" }] : /* istanbul ignore next */ []);
278
+ userToggled = signal(false, ...ngDevMode ? [{ debugName: "userToggled" }] : /* istanbul ignore next */ []);
279
+ isHorizontalRoot = computed(() => this.orientation() === "horizontal" && this.level() === 0, ...ngDevMode ? [{ debugName: "isHorizontalRoot" }] : /* istanbul ignore next */ []);
280
+ isActive = computed(() => this.nav.isItemActive(this.item(), this.activeIds(), this.activeUrl()), ...ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []);
281
+ isRouteActive = computed(() => {
282
+ const item = this.item();
283
+ if (item.disabled || !this.router?.lastSuccessfulNavigation()) return false;
284
+ return this.routeContext.isItemRouteActive(item, null, this.activatedRoute);
285
+ }, ...ngDevMode ? [{ debugName: "isRouteActive" }] : /* istanbul ignore next */ []);
286
+ isRouterItemActive = computed(() => this.isRouteActive() || this.isActive(), ...ngDevMode ? [{ debugName: "isRouterItemActive" }] : /* istanbul ignore next */ []);
287
+ showChildren = computed(() => !this.compact() && this.isOpen(), ...ngDevMode ? [{ debugName: "showChildren" }] : /* istanbul ignore next */ []);
288
+ hostClasses = computed(() => {
289
+ if (this.item().type === "divider") return this.dividerClasses();
290
+ if (this.item().type === "spacer") return "flex-1";
291
+ if (this.item().type === "group" || this.item().type === "mega") return this.groupContainerClasses();
292
+ return this.itemContainerClasses();
293
+ }, ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
294
+ hostRole = computed(() => {
295
+ return this.orientation() === "horizontal" ? "none" : null;
296
+ }, ...ngDevMode ? [{ debugName: "hostRole" }] : /* istanbul ignore next */ []);
297
+ panelId = computed(() => navigationPanelId(this.navId(), this.item()), ...ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []);
298
+ headingId = computed(() => navigationHeadingId(this.navId(), this.item()), ...ngDevMode ? [{ debugName: "headingId" }] : /* istanbul ignore next */ []);
299
+ isRouterItem() {
300
+ return this.nav.isRouterItem(this.item());
301
+ }
302
+ hrefFor() {
303
+ return this.nav.hrefFor(this.item());
304
+ }
305
+ routerLinkFor() {
306
+ return this.item().disabled ? null : this.item().link ?? null;
307
+ }
308
+ hrefAttribute() {
309
+ return this.item().disabled ? null : this.hrefFor();
310
+ }
311
+ leafTabIndex() {
312
+ return this.item().disabled ? -1 : null;
313
+ }
314
+ relFor() {
315
+ return this.nav.relFor(this.item());
316
+ }
317
+ itemRole() {
318
+ return this.nav.itemRole(this.orientation(), this.level());
319
+ }
320
+ compactLabel() {
321
+ return this.nav.compactLabel(this.item(), this.compact());
322
+ }
323
+ titleFor() {
324
+ return this.nav.titleFor(this.item(), this.compact());
325
+ }
326
+ isOpen() {
327
+ if (this.userToggled()) return this.listedAsOpen();
328
+ return this.listedAsOpen() || this.isActive();
329
+ }
330
+ toggleOpen() {
331
+ if (this.item().disabled) return;
332
+ const open = this.isOpen();
333
+ this.userToggled.set(true);
334
+ const next = new Set(this.openedIds());
335
+ if (open) next.delete(this.item().stateId);
336
+ else next.add(this.item().stateId);
337
+ this.openedIdsChange.emit([...next]);
338
+ }
339
+ selectItem(event) {
340
+ if (this.item().disabled) {
341
+ event.preventDefault();
342
+ event.stopPropagation();
343
+ return;
344
+ }
345
+ this.item().action?.(this.item().source);
346
+ this.itemSelected.emit({
347
+ item: this.item().source,
348
+ key: this.item().key,
349
+ type: this.item().type,
350
+ link: this.item().link,
351
+ external: !!this.hrefFor()
352
+ });
353
+ this.nav.closePanel(this.navId());
354
+ this.nav.closeDrawer(this.navId());
355
+ }
356
+ leafClasses(active) {
357
+ return cn("NavigationItem nav-text group/nav inline-flex min-w-0 items-center rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", this.orientation() === "horizontal" && this.level() === 0 ? "h-(--nav-item-height) px-(--nav-item-padding-x)" : "min-h-(--nav-item-height) w-full px-(--nav-item-padding-x) py-1 text-left", "gap-(--nav-item-gap)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0 py-0 text-center", this.interactiveStateClasses(active), this.item().disabled && "pointer-events-none opacity-50", this.item().classes?.wrapper, this.itemClass());
358
+ }
359
+ triggerClasses(active) {
360
+ return cn("nav-trigger nav-text group/nav inline-flex min-w-0 items-center rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", this.orientation() === "horizontal" && this.level() === 0 ? "h-(--nav-item-height) px-(--nav-item-padding-x)" : "min-h-(--nav-item-height) w-full px-(--nav-item-padding-x) py-1 text-left", "gap-(--nav-item-gap)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0 py-0 text-center", this.interactiveStateClasses(active), this.item().classes?.wrapper, this.itemClass());
361
+ }
362
+ interactiveStateClasses(active) {
363
+ const showsNestedActiveConnector = active && this.orientation() === "vertical" && !this.compact() && this.stairsRail();
364
+ if (this.orientation() === "vertical" && !this.compact()) return cn("relative isolate", "before:pointer-events-none before:absolute before:inset-y-0 before:left-2 before:right-2 before:-z-10 before:rounded-md before:border before:border-transparent before:bg-transparent before:transition-colors before:duration-200 before:content-['']", showsNestedActiveConnector && "after:pointer-events-none after:absolute after:-left-[calc(var(--nav-indent)-var(--nav-rail-offset))] after:top-1/2 after:-z-10 after:h-px after:w-[calc(var(--nav-indent)-var(--nav-rail-offset))] after:-translate-y-1/2 after:rounded-full after:bg-current/25 after:content-['']", active ? "text-foreground before:bg-accent" : "text-foreground/80 hover:text-accent-foreground hover:before:bg-accent");
365
+ return active ? "text-foreground bg-accent" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground";
366
+ }
367
+ chevronClasses() {
368
+ return cn("ml-auto shrink-0 self-center text-(length:--nav-icon-size-sub) text-muted-foreground transition-transform duration-200", this.isOpen() && "rotate-90");
369
+ }
370
+ itemContainerClasses() {
371
+ return cn(this.orientation() === "horizontal" && this.level() === 0 ? "relative" : "w-full", this.compact() && "flex justify-center", this.straightRailClasses());
372
+ }
373
+ groupContainerClasses() {
374
+ return cn("w-full", this.level() > 0 && "pt-2");
375
+ }
376
+ dividerClasses() {
377
+ return cn(this.orientation() === "horizontal" && this.level() === 0 ? "mx-1 h-5 w-px" : "my-2 w-full px-2");
378
+ }
379
+ groupHeadingClasses() {
380
+ return cn("nav-heading px-(--nav-item-padding-x) pt-4 pb-1 text-muted-foreground", this.item().classes?.title);
381
+ }
382
+ childListClasses() {
383
+ const isGroupedBranch = this.item().type === "group" || this.item().type === "mega";
384
+ const usesStairsTree = this.collapseTree() === "stairs";
385
+ return cn("flex list-none flex-col gap-0.5 p-0", !this.compact() && "mt-0.5", this.level() >= 0 && !this.compact() && !isGroupedBranch && usesStairsTree && cn("relative ml-(--nav-rail-offset) pl-[calc(var(--nav-indent)-var(--nav-rail-offset))] before:absolute before:-top-2 before:bottom-0 before:left-0 before:w-px before:-translate-x-1/2 before:rounded-full before:content-['']", this.isActive() ? "before:bg-current/25" : "before:bg-border"));
386
+ }
387
+ showsStairsRailForChildren() {
388
+ return !this.compact() && this.collapseTree() === "stairs" && this.item().type !== "group" && this.item().type !== "mega";
389
+ }
390
+ showStraightRailForChildren() {
391
+ return !this.compact() && this.collapseTree() === "straight" && this.item().type !== "group" && this.item().type !== "mega";
392
+ }
393
+ straightRailClasses() {
394
+ if (!this.straightRail() || this.orientation() !== "vertical" || this.compact()) return "";
395
+ return cn("relative", "before:pointer-events-none before:absolute before:left-(--nav-rail-offset) before:w-0 before:-z-10 before:border-l before:border-dotted before:content-['']", this.straightRailActive() ? "before:border-primary/50" : "before:border-border/50", this.firstInBranch() ? "before:-top-[calc(var(--nav-item-height)/2+var(--spacing-base)*0.5)]" : "before:-top-0.5", this.lastInBranch() ? "before:bottom-[calc(100%-var(--nav-item-height)/2)]" : "before:-bottom-0.5");
396
+ }
397
+ static ɵfac = i0.ɵɵngDeclareFactory({
398
+ minVersion: "12.0.0",
399
+ version: "22.2.2",
400
+ ngImport: i0,
401
+ type: NavigationItemComponent,
402
+ deps: [],
403
+ target: i0.ɵɵFactoryTarget.Component
404
+ });
405
+ static ɵcmp = i0.ɵɵngDeclareComponent({
406
+ minVersion: "17.0.0",
407
+ version: "22.2.2",
408
+ type: NavigationItemComponent,
409
+ isStandalone: true,
410
+ selector: "li[NavigationItem]",
411
+ inputs: {
412
+ navId: {
413
+ classPropertyName: "navId",
414
+ publicName: "navId",
415
+ isSignal: true,
416
+ isRequired: false,
417
+ transformFunction: null
418
+ },
419
+ item: {
420
+ classPropertyName: "item",
421
+ publicName: "item",
422
+ isSignal: true,
423
+ isRequired: true,
424
+ transformFunction: null
425
+ },
426
+ level: {
427
+ classPropertyName: "level",
428
+ publicName: "level",
429
+ isSignal: true,
430
+ isRequired: false,
431
+ transformFunction: null
432
+ },
433
+ orientation: {
434
+ classPropertyName: "orientation",
435
+ publicName: "orientation",
436
+ isSignal: true,
437
+ isRequired: false,
438
+ transformFunction: null
439
+ },
440
+ compact: {
441
+ classPropertyName: "compact",
442
+ publicName: "compact",
443
+ isSignal: true,
444
+ isRequired: false,
445
+ transformFunction: null
446
+ },
447
+ itemClass: {
448
+ classPropertyName: "itemClass",
449
+ publicName: "itemClass",
450
+ isSignal: true,
451
+ isRequired: false,
452
+ transformFunction: null
453
+ },
454
+ activeIds: {
455
+ classPropertyName: "activeIds",
456
+ publicName: "activeIds",
457
+ isSignal: true,
458
+ isRequired: false,
459
+ transformFunction: null
460
+ },
461
+ activeUrl: {
462
+ classPropertyName: "activeUrl",
463
+ publicName: "activeUrl",
464
+ isSignal: true,
465
+ isRequired: false,
466
+ transformFunction: null
467
+ },
468
+ iconTemplate: {
469
+ classPropertyName: "iconTemplate",
470
+ publicName: "iconTemplate",
471
+ isSignal: true,
472
+ isRequired: false,
473
+ transformFunction: null
474
+ },
475
+ tooltipPosition: {
476
+ classPropertyName: "tooltipPosition",
477
+ publicName: "tooltip-position",
478
+ isSignal: true,
479
+ isRequired: false,
480
+ transformFunction: null
481
+ },
482
+ collapseTree: {
483
+ classPropertyName: "collapseTree",
484
+ publicName: "collapseTree",
485
+ isSignal: true,
486
+ isRequired: false,
487
+ transformFunction: null
488
+ },
489
+ straightRail: {
490
+ classPropertyName: "straightRail",
491
+ publicName: "straightRail",
492
+ isSignal: true,
493
+ isRequired: false,
494
+ transformFunction: null
495
+ },
496
+ stairsRail: {
497
+ classPropertyName: "stairsRail",
498
+ publicName: "stairsRail",
499
+ isSignal: true,
500
+ isRequired: false,
501
+ transformFunction: null
502
+ },
503
+ straightRailActive: {
504
+ classPropertyName: "straightRailActive",
505
+ publicName: "straightRailActive",
506
+ isSignal: true,
507
+ isRequired: false,
508
+ transformFunction: null
509
+ },
510
+ firstInBranch: {
511
+ classPropertyName: "firstInBranch",
512
+ publicName: "firstInBranch",
513
+ isSignal: true,
514
+ isRequired: false,
515
+ transformFunction: null
516
+ },
517
+ lastInBranch: {
518
+ classPropertyName: "lastInBranch",
519
+ publicName: "lastInBranch",
520
+ isSignal: true,
521
+ isRequired: false,
522
+ transformFunction: null
523
+ },
524
+ openedIds: {
525
+ classPropertyName: "openedIds",
526
+ publicName: "openedIds",
527
+ isSignal: true,
528
+ isRequired: false,
529
+ transformFunction: null
530
+ }
531
+ },
532
+ outputs: {
533
+ openedIdsChange: "openedIdsChange",
534
+ itemSelected: "itemSelected"
535
+ },
536
+ host: { properties: {
537
+ "class": "hostClasses()",
538
+ "attr.role": "hostRole()",
539
+ "attr.data-navigation-item-key": "item().key",
540
+ "attr.aria-hidden": "item().type === \"spacer\" || item().type === \"divider\" ? \"true\" : null"
541
+ } },
542
+ ngImport: i0,
543
+ template: `
544
+ @switch (item().type) {
545
+ @case ('divider') {
546
+ <span class="block h-px w-full bg-border"></span>
547
+ }
548
+
549
+ @case ('spacer') {}
550
+
551
+ @case ('group') {
552
+ @if (!compact() && item().title) {
553
+ <div [id]="headingId()" [class]="groupHeadingClasses()">
554
+ <span class="block truncate">{{ item().title }}</span>
555
+
556
+ @if (item().subtitle) {
557
+ <span
558
+ class="nav-subtitle -mt-0.5 block truncate text-2xs normal-case text-muted-foreground"
559
+ data-navigation-group-subtitle
560
+ >
561
+ {{ item().subtitle }}
562
+ </span>
563
+ }
564
+ </div>
565
+ }
566
+
567
+ <ul
568
+ [class]="childListClasses()"
569
+ role="list"
570
+ [attr.aria-labelledby]="item().title ? headingId() : null"
571
+ >
572
+ <ng-container [ngTemplateOutlet]="childItems" />
573
+ </ul>
574
+ }
575
+
576
+ @case ('collapsible') {
577
+ <button
578
+ type="button"
579
+ [class]="triggerClasses(isActive())"
580
+ [attr.aria-expanded]="showChildren()"
581
+ [attr.aria-controls]="showChildren() ? panelId() : null"
582
+ [attr.aria-label]="compactLabel()"
583
+ [attr.title]="titleFor()"
584
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
585
+ [TooltipPosition]="tooltipPosition()"
586
+ [disabled]="item().disabled || null"
587
+ (click)="toggleOpen()"
588
+ >
589
+ <NavigationItemContent
590
+ [item]="item()"
591
+ [active]="isActive()"
592
+ [compact]="compact()"
593
+ [orientation]="orientation()"
594
+ [level]="level()"
595
+ [iconTemplate]="iconTemplate()"
596
+ />
597
+
598
+ @if (!compact()) {
599
+ <Icon name="chevron_right" size="inherit" [class]="chevronClasses()" />
600
+ }
601
+ </button>
602
+
603
+ @if (showChildren()) {
604
+ <ul [id]="panelId()" [class]="childListClasses()" role="list">
605
+ <ng-container [ngTemplateOutlet]="childItems" />
606
+ </ul>
607
+ }
608
+ }
609
+
610
+ @case ('mega') {
611
+ @if (!compact() && item().title) {
612
+ <div [id]="headingId()" [class]="groupHeadingClasses()">{{ item().title }}</div>
613
+ }
614
+
615
+ <ul
616
+ [class]="childListClasses()"
617
+ role="list"
618
+ [attr.aria-labelledby]="item().title ? headingId() : null"
619
+ >
620
+ <ng-container [ngTemplateOutlet]="childItems" />
621
+ </ul>
622
+ }
623
+
624
+ @default {
625
+ @if (isRouterItem()) {
626
+ <a
627
+ [class]="leafClasses(isRouterItemActive())"
628
+ [routerLink]="routerLinkFor()"
629
+ [queryParams]="item().queryParams ?? null"
630
+ [queryParamsHandling]="item().queryParamsHandling ?? null"
631
+ [fragment]="item().fragment ?? undefined"
632
+ [preserveFragment]="item().preserveFragment ?? false"
633
+ [target]="item().target ?? undefined"
634
+ [attr.rel]="relFor()"
635
+ [attr.aria-current]="isRouterItemActive() ? 'page' : null"
636
+ [attr.aria-disabled]="item().disabled || null"
637
+ [attr.tabindex]="leafTabIndex()"
638
+ [attr.aria-label]="compactLabel()"
639
+ [attr.title]="titleFor()"
640
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
641
+ [TooltipPosition]="tooltipPosition()"
642
+ [attr.role]="itemRole()"
643
+ [attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
644
+ (click)="selectItem($event)"
645
+ >
646
+ <NavigationItemContent
647
+ [item]="item()"
648
+ [active]="isRouterItemActive()"
649
+ [compact]="compact()"
650
+ [orientation]="orientation()"
651
+ [level]="level()"
652
+ [iconTemplate]="iconTemplate()"
653
+ />
654
+ </a>
655
+ } @else if (hrefFor()) {
656
+ <a
657
+ [class]="leafClasses(isActive())"
658
+ [attr.href]="hrefAttribute()"
659
+ [attr.target]="item().target ?? (item().externalLink ? '_blank' : null)"
660
+ [attr.rel]="relFor()"
661
+ [attr.aria-current]="isActive() ? 'page' : null"
662
+ [attr.aria-disabled]="item().disabled || null"
663
+ [attr.tabindex]="leafTabIndex()"
664
+ [attr.aria-label]="compactLabel()"
665
+ [attr.title]="titleFor()"
666
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
667
+ [TooltipPosition]="tooltipPosition()"
668
+ [attr.role]="itemRole()"
669
+ [attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
670
+ (click)="selectItem($event)"
671
+ >
672
+ <NavigationItemContent
673
+ [item]="item()"
674
+ [active]="isActive()"
675
+ [compact]="compact()"
676
+ [orientation]="orientation()"
677
+ [level]="level()"
678
+ [iconTemplate]="iconTemplate()"
679
+ />
680
+ </a>
681
+ } @else {
682
+ <button
683
+ type="button"
684
+ [class]="leafClasses(isActive())"
685
+ [disabled]="item().disabled || null"
686
+ [attr.aria-current]="isActive() ? 'page' : null"
687
+ [attr.aria-label]="compactLabel()"
688
+ [attr.title]="titleFor()"
689
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
690
+ [TooltipPosition]="tooltipPosition()"
691
+ [attr.role]="itemRole()"
692
+ [attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
693
+ (click)="selectItem($event)"
694
+ >
695
+ <NavigationItemContent
696
+ [item]="item()"
697
+ [active]="isActive()"
698
+ [compact]="compact()"
699
+ [orientation]="orientation()"
700
+ [level]="level()"
701
+ [iconTemplate]="iconTemplate()"
702
+ />
703
+ </button>
704
+ }
705
+ }
706
+ }
707
+ <!--
708
+ The recursive child list, defined once.
709
+
710
+ It was written out three times, in the group, collapsible, and mega
711
+ branches, 25 identical lines each. Nothing needs passing in: every binding
712
+ is a member of this component and so is lexically in scope here, and
713
+ isFirst / isLast are @for locals declared inside.
714
+
715
+ The collapsible copy used to hardcode compact="false". That is the same
716
+ value there: its list only renders under showChildren(), which already
717
+ requires compact() to be false.
718
+ -->
719
+ <ng-template #childItems>
720
+ @for (child of item().children; track child.key; let isFirst = $first; let isLast = $last) {
721
+ <li
722
+ NavigationItem
723
+ [navId]="navId()"
724
+ [item]="child"
725
+ [level]="level() + 1"
726
+ [orientation]="orientation()"
727
+ [compact]="compact()"
728
+ [itemClass]="itemClass()"
729
+ [activeIds]="activeIds()"
730
+ [activeUrl]="activeUrl()"
731
+ [iconTemplate]="iconTemplate()"
732
+ [tooltip-position]="tooltipPosition()"
733
+ [collapseTree]="collapseTree()"
734
+ [straightRail]="showStraightRailForChildren()"
735
+ [stairsRail]="showsStairsRailForChildren()"
736
+ [straightRailActive]="isActive()"
737
+ [firstInBranch]="isFirst"
738
+ [lastInBranch]="isLast"
739
+ [openedIds]="openedIds()"
740
+ (openedIdsChange)="openedIdsChange.emit($event)"
741
+ (itemSelected)="itemSelected.emit($event)"
742
+ ></li>
743
+ }
744
+ </ng-template>
745
+ `,
746
+ isInline: true,
747
+ dependencies: [
748
+ {
749
+ kind: "component",
750
+ type: NavigationItemComponent,
751
+ selector: "li[NavigationItem]",
752
+ inputs: [
753
+ "navId",
754
+ "item",
755
+ "level",
756
+ "orientation",
757
+ "compact",
758
+ "itemClass",
759
+ "activeIds",
760
+ "activeUrl",
761
+ "iconTemplate",
762
+ "tooltip-position",
763
+ "collapseTree",
764
+ "straightRail",
765
+ "stairsRail",
766
+ "straightRailActive",
767
+ "firstInBranch",
768
+ "lastInBranch",
769
+ "openedIds"
770
+ ],
771
+ outputs: ["openedIdsChange", "itemSelected"]
772
+ },
773
+ {
774
+ kind: "component",
775
+ type: IconComponent,
776
+ selector: "Icon",
777
+ inputs: [
778
+ "name",
779
+ "class",
780
+ "size",
781
+ "fill",
782
+ "weight",
783
+ "grade",
784
+ "opticalSize"
785
+ ]
786
+ },
787
+ {
788
+ kind: "component",
789
+ type: NavigationItemContentComponent,
790
+ selector: "NavigationItemContent",
791
+ inputs: [
792
+ "item",
793
+ "active",
794
+ "compact",
795
+ "orientation",
796
+ "level",
797
+ "iconTemplate"
798
+ ]
799
+ },
800
+ {
801
+ kind: "directive",
802
+ type: NgTemplateOutlet,
803
+ selector: "[ngTemplateOutlet]",
804
+ inputs: [
805
+ "ngTemplateOutletContext",
806
+ "ngTemplateOutlet",
807
+ "ngTemplateOutletInjector"
808
+ ]
809
+ },
810
+ {
811
+ kind: "directive",
812
+ type: RouterLink,
813
+ selector: "[routerLink]",
814
+ inputs: [
815
+ "target",
816
+ "queryParams",
817
+ "fragment",
818
+ "queryParamsHandling",
819
+ "state",
820
+ "info",
821
+ "relativeTo",
822
+ "preserveFragment",
823
+ "skipLocationChange",
824
+ "replaceUrl",
825
+ "browserUrl",
826
+ "routerLink"
827
+ ]
828
+ },
829
+ {
830
+ kind: "directive",
831
+ type: TooltipDirective,
832
+ selector: "[Tooltip]",
833
+ inputs: [
834
+ "Tooltip",
835
+ "TooltipPosition",
836
+ "TooltipDisabled",
837
+ "TooltipShowDelay",
838
+ "TooltipHideDelay"
839
+ ],
840
+ exportAs: ["Tooltip"]
841
+ }
842
+ ]
843
+ });
844
+ };
845
+ i0.ɵɵngDeclareClassMetadata({
846
+ minVersion: "12.0.0",
847
+ version: "22.2.2",
848
+ ngImport: i0,
849
+ type: NavigationItemComponent,
850
+ decorators: [{
851
+ type: Component,
852
+ args: [{
853
+ selector: "li[NavigationItem]",
854
+ imports: [
855
+ IconComponent,
856
+ NavigationItemContentComponent,
857
+ NgTemplateOutlet,
858
+ RouterLink,
859
+ TooltipDirective
860
+ ],
861
+ host: {
862
+ "[class]": "hostClasses()",
863
+ "[attr.role]": "hostRole()",
864
+ "[attr.data-navigation-item-key]": "item().key",
865
+ "[attr.aria-hidden]": "item().type === \"spacer\" || item().type === \"divider\" ? \"true\" : null"
866
+ },
867
+ template: `
868
+ @switch (item().type) {
869
+ @case ('divider') {
870
+ <span class="block h-px w-full bg-border"></span>
871
+ }
872
+
873
+ @case ('spacer') {}
874
+
875
+ @case ('group') {
876
+ @if (!compact() && item().title) {
877
+ <div [id]="headingId()" [class]="groupHeadingClasses()">
878
+ <span class="block truncate">{{ item().title }}</span>
879
+
880
+ @if (item().subtitle) {
881
+ <span
882
+ class="nav-subtitle -mt-0.5 block truncate text-2xs normal-case text-muted-foreground"
883
+ data-navigation-group-subtitle
884
+ >
885
+ {{ item().subtitle }}
886
+ </span>
887
+ }
888
+ </div>
889
+ }
890
+
891
+ <ul
892
+ [class]="childListClasses()"
893
+ role="list"
894
+ [attr.aria-labelledby]="item().title ? headingId() : null"
895
+ >
896
+ <ng-container [ngTemplateOutlet]="childItems" />
897
+ </ul>
898
+ }
899
+
900
+ @case ('collapsible') {
901
+ <button
902
+ type="button"
903
+ [class]="triggerClasses(isActive())"
904
+ [attr.aria-expanded]="showChildren()"
905
+ [attr.aria-controls]="showChildren() ? panelId() : null"
906
+ [attr.aria-label]="compactLabel()"
907
+ [attr.title]="titleFor()"
908
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
909
+ [TooltipPosition]="tooltipPosition()"
910
+ [disabled]="item().disabled || null"
911
+ (click)="toggleOpen()"
912
+ >
913
+ <NavigationItemContent
914
+ [item]="item()"
915
+ [active]="isActive()"
916
+ [compact]="compact()"
917
+ [orientation]="orientation()"
918
+ [level]="level()"
919
+ [iconTemplate]="iconTemplate()"
920
+ />
921
+
922
+ @if (!compact()) {
923
+ <Icon name="chevron_right" size="inherit" [class]="chevronClasses()" />
924
+ }
925
+ </button>
926
+
927
+ @if (showChildren()) {
928
+ <ul [id]="panelId()" [class]="childListClasses()" role="list">
929
+ <ng-container [ngTemplateOutlet]="childItems" />
930
+ </ul>
931
+ }
932
+ }
933
+
934
+ @case ('mega') {
935
+ @if (!compact() && item().title) {
936
+ <div [id]="headingId()" [class]="groupHeadingClasses()">{{ item().title }}</div>
937
+ }
938
+
939
+ <ul
940
+ [class]="childListClasses()"
941
+ role="list"
942
+ [attr.aria-labelledby]="item().title ? headingId() : null"
943
+ >
944
+ <ng-container [ngTemplateOutlet]="childItems" />
945
+ </ul>
946
+ }
947
+
948
+ @default {
949
+ @if (isRouterItem()) {
950
+ <a
951
+ [class]="leafClasses(isRouterItemActive())"
952
+ [routerLink]="routerLinkFor()"
953
+ [queryParams]="item().queryParams ?? null"
954
+ [queryParamsHandling]="item().queryParamsHandling ?? null"
955
+ [fragment]="item().fragment ?? undefined"
956
+ [preserveFragment]="item().preserveFragment ?? false"
957
+ [target]="item().target ?? undefined"
958
+ [attr.rel]="relFor()"
959
+ [attr.aria-current]="isRouterItemActive() ? 'page' : null"
960
+ [attr.aria-disabled]="item().disabled || null"
961
+ [attr.tabindex]="leafTabIndex()"
962
+ [attr.aria-label]="compactLabel()"
963
+ [attr.title]="titleFor()"
964
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
965
+ [TooltipPosition]="tooltipPosition()"
966
+ [attr.role]="itemRole()"
967
+ [attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
968
+ (click)="selectItem($event)"
969
+ >
970
+ <NavigationItemContent
971
+ [item]="item()"
972
+ [active]="isRouterItemActive()"
973
+ [compact]="compact()"
974
+ [orientation]="orientation()"
975
+ [level]="level()"
976
+ [iconTemplate]="iconTemplate()"
977
+ />
978
+ </a>
979
+ } @else if (hrefFor()) {
980
+ <a
981
+ [class]="leafClasses(isActive())"
982
+ [attr.href]="hrefAttribute()"
983
+ [attr.target]="item().target ?? (item().externalLink ? '_blank' : null)"
984
+ [attr.rel]="relFor()"
985
+ [attr.aria-current]="isActive() ? 'page' : null"
986
+ [attr.aria-disabled]="item().disabled || null"
987
+ [attr.tabindex]="leafTabIndex()"
988
+ [attr.aria-label]="compactLabel()"
989
+ [attr.title]="titleFor()"
990
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
991
+ [TooltipPosition]="tooltipPosition()"
992
+ [attr.role]="itemRole()"
993
+ [attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
994
+ (click)="selectItem($event)"
995
+ >
996
+ <NavigationItemContent
997
+ [item]="item()"
998
+ [active]="isActive()"
999
+ [compact]="compact()"
1000
+ [orientation]="orientation()"
1001
+ [level]="level()"
1002
+ [iconTemplate]="iconTemplate()"
1003
+ />
1004
+ </a>
1005
+ } @else {
1006
+ <button
1007
+ type="button"
1008
+ [class]="leafClasses(isActive())"
1009
+ [disabled]="item().disabled || null"
1010
+ [attr.aria-current]="isActive() ? 'page' : null"
1011
+ [attr.aria-label]="compactLabel()"
1012
+ [attr.title]="titleFor()"
1013
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
1014
+ [TooltipPosition]="tooltipPosition()"
1015
+ [attr.role]="itemRole()"
1016
+ [attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
1017
+ (click)="selectItem($event)"
1018
+ >
1019
+ <NavigationItemContent
1020
+ [item]="item()"
1021
+ [active]="isActive()"
1022
+ [compact]="compact()"
1023
+ [orientation]="orientation()"
1024
+ [level]="level()"
1025
+ [iconTemplate]="iconTemplate()"
1026
+ />
1027
+ </button>
1028
+ }
1029
+ }
1030
+ }
1031
+ <!--
1032
+ The recursive child list, defined once.
1033
+
1034
+ It was written out three times, in the group, collapsible, and mega
1035
+ branches, 25 identical lines each. Nothing needs passing in: every binding
1036
+ is a member of this component and so is lexically in scope here, and
1037
+ isFirst / isLast are @for locals declared inside.
1038
+
1039
+ The collapsible copy used to hardcode compact="false". That is the same
1040
+ value there: its list only renders under showChildren(), which already
1041
+ requires compact() to be false.
1042
+ -->
1043
+ <ng-template #childItems>
1044
+ @for (child of item().children; track child.key; let isFirst = $first; let isLast = $last) {
1045
+ <li
1046
+ NavigationItem
1047
+ [navId]="navId()"
1048
+ [item]="child"
1049
+ [level]="level() + 1"
1050
+ [orientation]="orientation()"
1051
+ [compact]="compact()"
1052
+ [itemClass]="itemClass()"
1053
+ [activeIds]="activeIds()"
1054
+ [activeUrl]="activeUrl()"
1055
+ [iconTemplate]="iconTemplate()"
1056
+ [tooltip-position]="tooltipPosition()"
1057
+ [collapseTree]="collapseTree()"
1058
+ [straightRail]="showStraightRailForChildren()"
1059
+ [stairsRail]="showsStairsRailForChildren()"
1060
+ [straightRailActive]="isActive()"
1061
+ [firstInBranch]="isFirst"
1062
+ [lastInBranch]="isLast"
1063
+ [openedIds]="openedIds()"
1064
+ (openedIdsChange)="openedIdsChange.emit($event)"
1065
+ (itemSelected)="itemSelected.emit($event)"
1066
+ ></li>
1067
+ }
1068
+ </ng-template>
1069
+ `
1070
+ }]
1071
+ }],
1072
+ propDecorators: {
1073
+ navId: [{
1074
+ type: i0.Input,
1075
+ args: [{
1076
+ isSignal: true,
1077
+ alias: "navId",
1078
+ required: false
1079
+ }]
1080
+ }],
1081
+ item: [{
1082
+ type: i0.Input,
1083
+ args: [{
1084
+ isSignal: true,
1085
+ alias: "item",
1086
+ required: true
1087
+ }]
1088
+ }],
1089
+ level: [{
1090
+ type: i0.Input,
1091
+ args: [{
1092
+ isSignal: true,
1093
+ alias: "level",
1094
+ required: false
1095
+ }]
1096
+ }],
1097
+ orientation: [{
1098
+ type: i0.Input,
1099
+ args: [{
1100
+ isSignal: true,
1101
+ alias: "orientation",
1102
+ required: false
1103
+ }]
1104
+ }],
1105
+ compact: [{
1106
+ type: i0.Input,
1107
+ args: [{
1108
+ isSignal: true,
1109
+ alias: "compact",
1110
+ required: false
1111
+ }]
1112
+ }],
1113
+ itemClass: [{
1114
+ type: i0.Input,
1115
+ args: [{
1116
+ isSignal: true,
1117
+ alias: "itemClass",
1118
+ required: false
1119
+ }]
1120
+ }],
1121
+ activeIds: [{
1122
+ type: i0.Input,
1123
+ args: [{
1124
+ isSignal: true,
1125
+ alias: "activeIds",
1126
+ required: false
1127
+ }]
1128
+ }],
1129
+ activeUrl: [{
1130
+ type: i0.Input,
1131
+ args: [{
1132
+ isSignal: true,
1133
+ alias: "activeUrl",
1134
+ required: false
1135
+ }]
1136
+ }],
1137
+ iconTemplate: [{
1138
+ type: i0.Input,
1139
+ args: [{
1140
+ isSignal: true,
1141
+ alias: "iconTemplate",
1142
+ required: false
1143
+ }]
1144
+ }],
1145
+ tooltipPosition: [{
1146
+ type: i0.Input,
1147
+ args: [{
1148
+ isSignal: true,
1149
+ alias: "tooltip-position",
1150
+ required: false
1151
+ }]
1152
+ }],
1153
+ collapseTree: [{
1154
+ type: i0.Input,
1155
+ args: [{
1156
+ isSignal: true,
1157
+ alias: "collapseTree",
1158
+ required: false
1159
+ }]
1160
+ }],
1161
+ straightRail: [{
1162
+ type: i0.Input,
1163
+ args: [{
1164
+ isSignal: true,
1165
+ alias: "straightRail",
1166
+ required: false
1167
+ }]
1168
+ }],
1169
+ stairsRail: [{
1170
+ type: i0.Input,
1171
+ args: [{
1172
+ isSignal: true,
1173
+ alias: "stairsRail",
1174
+ required: false
1175
+ }]
1176
+ }],
1177
+ straightRailActive: [{
1178
+ type: i0.Input,
1179
+ args: [{
1180
+ isSignal: true,
1181
+ alias: "straightRailActive",
1182
+ required: false
1183
+ }]
1184
+ }],
1185
+ firstInBranch: [{
1186
+ type: i0.Input,
1187
+ args: [{
1188
+ isSignal: true,
1189
+ alias: "firstInBranch",
1190
+ required: false
1191
+ }]
1192
+ }],
1193
+ lastInBranch: [{
1194
+ type: i0.Input,
1195
+ args: [{
1196
+ isSignal: true,
1197
+ alias: "lastInBranch",
1198
+ required: false
1199
+ }]
1200
+ }],
1201
+ openedIds: [{
1202
+ type: i0.Input,
1203
+ args: [{
1204
+ isSignal: true,
1205
+ alias: "openedIds",
1206
+ required: false
1207
+ }]
1208
+ }],
1209
+ openedIdsChange: [{
1210
+ type: i0.Output,
1211
+ args: ["openedIdsChange"]
1212
+ }],
1213
+ itemSelected: [{
1214
+ type: i0.Output,
1215
+ args: ["itemSelected"]
1216
+ }]
1217
+ }
1218
+ });
1219
+ export { navigationPanelId as n, NavigationItemContentComponent as r, NavigationItemComponent as t };