@ojiepermana/angular-component 22.0.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 (244) hide show
  1. package/README.md +82 -0
  2. package/accordion/README.md +193 -0
  3. package/alert/README.md +180 -0
  4. package/alert-dialog/README.md +239 -0
  5. package/aspect-ratio/README.md +112 -0
  6. package/avatar/README.md +176 -0
  7. package/badge/README.md +133 -0
  8. package/breadcrumb/README.md +216 -0
  9. package/button/README.md +139 -0
  10. package/button-group/README.md +208 -0
  11. package/calendar/README.md +135 -0
  12. package/card/README.md +220 -0
  13. package/carousel/README.md +276 -0
  14. package/checkbox/README.md +149 -0
  15. package/collapsible/README.md +195 -0
  16. package/combobox/README.md +198 -0
  17. package/command/README.md +275 -0
  18. package/composer/README.md +235 -0
  19. package/context-menu/README.md +267 -0
  20. package/date-picker/README.md +179 -0
  21. package/dialog/README.md +235 -0
  22. package/drawer/README.md +145 -0
  23. package/dropdown-menu/README.md +311 -0
  24. package/editor/README.md +136 -0
  25. package/empty/README.md +183 -0
  26. package/fesm2022/ojiepermana-angular-component-accordion.mjs +186 -0
  27. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -0
  28. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +276 -0
  29. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -0
  30. package/fesm2022/ojiepermana-angular-component-alert.mjs +99 -0
  31. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -0
  32. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +37 -0
  33. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -0
  34. package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -0
  35. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -0
  36. package/fesm2022/ojiepermana-angular-component-badge.mjs +50 -0
  37. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -0
  38. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +200 -0
  39. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -0
  40. package/fesm2022/ojiepermana-angular-component-button-group.mjs +103 -0
  41. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -0
  42. package/fesm2022/ojiepermana-angular-component-button.mjs +68 -0
  43. package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -0
  44. package/fesm2022/ojiepermana-angular-component-calendar.mjs +103 -0
  45. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -0
  46. package/fesm2022/ojiepermana-angular-component-card.mjs +152 -0
  47. package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -0
  48. package/fesm2022/ojiepermana-angular-component-carousel.mjs +334 -0
  49. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -0
  50. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +165 -0
  51. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -0
  52. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +121 -0
  53. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -0
  54. package/fesm2022/ojiepermana-angular-component-combobox.mjs +274 -0
  55. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -0
  56. package/fesm2022/ojiepermana-angular-component-command.mjs +297 -0
  57. package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -0
  58. package/fesm2022/ojiepermana-angular-component-composer.mjs +352 -0
  59. package/fesm2022/ojiepermana-angular-component-composer.mjs.map +1 -0
  60. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +108 -0
  61. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -0
  62. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +186 -0
  63. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -0
  64. package/fesm2022/ojiepermana-angular-component-dialog.mjs +283 -0
  65. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -0
  66. package/fesm2022/ojiepermana-angular-component-drawer.mjs +6 -0
  67. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -0
  68. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +494 -0
  69. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -0
  70. package/fesm2022/ojiepermana-angular-component-editor.mjs +680 -0
  71. package/fesm2022/ojiepermana-angular-component-editor.mjs.map +1 -0
  72. package/fesm2022/ojiepermana-angular-component-empty.mjs +145 -0
  73. package/fesm2022/ojiepermana-angular-component-empty.mjs.map +1 -0
  74. package/fesm2022/ojiepermana-angular-component-form.mjs +364 -0
  75. package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -0
  76. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +275 -0
  77. package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +1 -0
  78. package/fesm2022/ojiepermana-angular-component-icon.mjs +86 -0
  79. package/fesm2022/ojiepermana-angular-component-icon.mjs.map +1 -0
  80. package/fesm2022/ojiepermana-angular-component-input-group.mjs +179 -0
  81. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -0
  82. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +517 -0
  83. package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +1 -0
  84. package/fesm2022/ojiepermana-angular-component-input.mjs +45 -0
  85. package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -0
  86. package/fesm2022/ojiepermana-angular-component-item.mjs +264 -0
  87. package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -0
  88. package/fesm2022/ojiepermana-angular-component-kanban.mjs +314 -0
  89. package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +1 -0
  90. package/fesm2022/ojiepermana-angular-component-kbd.mjs +55 -0
  91. package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +1 -0
  92. package/fesm2022/ojiepermana-angular-component-label.mjs +33 -0
  93. package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -0
  94. package/fesm2022/ojiepermana-angular-component-menubar.mjs +311 -0
  95. package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +1 -0
  96. package/fesm2022/ojiepermana-angular-component-native-select.mjs +67 -0
  97. package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +1 -0
  98. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +408 -0
  99. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +1 -0
  100. package/fesm2022/ojiepermana-angular-component-pagination.mjs +226 -0
  101. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -0
  102. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +810 -0
  103. package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +1 -0
  104. package/fesm2022/ojiepermana-angular-component-popover.mjs +145 -0
  105. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -0
  106. package/fesm2022/ojiepermana-angular-component-progress.mjs +60 -0
  107. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -0
  108. package/fesm2022/ojiepermana-angular-component-radio.mjs +173 -0
  109. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -0
  110. package/fesm2022/ojiepermana-angular-component-resizable.mjs +478 -0
  111. package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +1 -0
  112. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +54 -0
  113. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -0
  114. package/fesm2022/ojiepermana-angular-component-select.mjs +297 -0
  115. package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -0
  116. package/fesm2022/ojiepermana-angular-component-separator.mjs +37 -0
  117. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -0
  118. package/fesm2022/ojiepermana-angular-component-sheet.mjs +297 -0
  119. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -0
  120. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +31 -0
  121. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -0
  122. package/fesm2022/ojiepermana-angular-component-slider.mjs +423 -0
  123. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -0
  124. package/fesm2022/ojiepermana-angular-component-spinner.mjs +60 -0
  125. package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +1 -0
  126. package/fesm2022/ojiepermana-angular-component-switch.mjs +140 -0
  127. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -0
  128. package/fesm2022/ojiepermana-angular-component-table.mjs +155 -0
  129. package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -0
  130. package/fesm2022/ojiepermana-angular-component-tabs.mjs +271 -0
  131. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -0
  132. package/fesm2022/ojiepermana-angular-component-textarea.mjs +39 -0
  133. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -0
  134. package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -0
  135. package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +1 -0
  136. package/fesm2022/ojiepermana-angular-component-toast.mjs +161 -0
  137. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -0
  138. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +289 -0
  139. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +1 -0
  140. package/fesm2022/ojiepermana-angular-component-toggle.mjs +82 -0
  141. package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +1 -0
  142. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +410 -0
  143. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -0
  144. package/fesm2022/ojiepermana-angular-component-utils.mjs +81 -0
  145. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -0
  146. package/fesm2022/ojiepermana-angular-component.mjs +11 -0
  147. package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
  148. package/form/README.md +210 -0
  149. package/hover-card/README.md +142 -0
  150. package/icon/README.md +25 -0
  151. package/input/README.md +159 -0
  152. package/input-group/README.md +237 -0
  153. package/input-otp/README.md +278 -0
  154. package/item/README.md +247 -0
  155. package/kanban/README.md +81 -0
  156. package/kbd/README.md +139 -0
  157. package/label/README.md +135 -0
  158. package/menubar/README.md +269 -0
  159. package/native-select/README.md +176 -0
  160. package/navigation-menu/README.md +160 -0
  161. package/package.json +291 -0
  162. package/pagination/README.md +144 -0
  163. package/pillbox/README.md +67 -0
  164. package/popover/README.md +43 -0
  165. package/progress/README.md +160 -0
  166. package/radio/README.md +209 -0
  167. package/resizable/README.md +168 -0
  168. package/scroll-area/README.md +143 -0
  169. package/select/README.md +174 -0
  170. package/separator/README.md +170 -0
  171. package/sheet/README.md +183 -0
  172. package/skeleton/README.md +158 -0
  173. package/slider/README.md +207 -0
  174. package/spinner/README.md +160 -0
  175. package/switch/README.md +166 -0
  176. package/table/README.md +291 -0
  177. package/tabs/README.md +214 -0
  178. package/textarea/README.md +153 -0
  179. package/timeline/README.md +94 -0
  180. package/toast/README.md +321 -0
  181. package/toggle/README.md +131 -0
  182. package/toggle-group/README.md +206 -0
  183. package/tooltip/README.md +207 -0
  184. package/types/ojiepermana-angular-component-accordion.d.ts +51 -0
  185. package/types/ojiepermana-angular-component-alert-dialog.d.ts +93 -0
  186. package/types/ojiepermana-angular-component-alert.d.ts +37 -0
  187. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -0
  188. package/types/ojiepermana-angular-component-avatar.d.ts +51 -0
  189. package/types/ojiepermana-angular-component-badge.d.ts +19 -0
  190. package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -0
  191. package/types/ojiepermana-angular-component-button-group.d.ts +26 -0
  192. package/types/ojiepermana-angular-component-button.d.ts +22 -0
  193. package/types/ojiepermana-angular-component-calendar.d.ts +39 -0
  194. package/types/ojiepermana-angular-component-card.d.ts +60 -0
  195. package/types/ojiepermana-angular-component-carousel.d.ts +86 -0
  196. package/types/ojiepermana-angular-component-checkbox.d.ts +42 -0
  197. package/types/ojiepermana-angular-component-collapsible.d.ts +42 -0
  198. package/types/ojiepermana-angular-component-combobox.d.ts +53 -0
  199. package/types/ojiepermana-angular-component-command.d.ts +102 -0
  200. package/types/ojiepermana-angular-component-composer.d.ts +90 -0
  201. package/types/ojiepermana-angular-component-context-menu.d.ts +36 -0
  202. package/types/ojiepermana-angular-component-date-picker.d.ts +48 -0
  203. package/types/ojiepermana-angular-component-dialog.d.ts +87 -0
  204. package/types/ojiepermana-angular-component-drawer.d.ts +1 -0
  205. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +140 -0
  206. package/types/ojiepermana-angular-component-editor.d.ts +126 -0
  207. package/types/ojiepermana-angular-component-empty.d.ts +50 -0
  208. package/types/ojiepermana-angular-component-form.d.ts +140 -0
  209. package/types/ojiepermana-angular-component-hover-card.d.ts +75 -0
  210. package/types/ojiepermana-angular-component-icon.d.ts +31 -0
  211. package/types/ojiepermana-angular-component-input-group.d.ts +51 -0
  212. package/types/ojiepermana-angular-component-input-otp.d.ts +142 -0
  213. package/types/ojiepermana-angular-component-input.d.ts +16 -0
  214. package/types/ojiepermana-angular-component-item.d.ts +88 -0
  215. package/types/ojiepermana-angular-component-kanban.d.ts +70 -0
  216. package/types/ojiepermana-angular-component-kbd.d.ts +16 -0
  217. package/types/ojiepermana-angular-component-label.d.ts +11 -0
  218. package/types/ojiepermana-angular-component-menubar.d.ts +69 -0
  219. package/types/ojiepermana-angular-component-native-select.d.ts +26 -0
  220. package/types/ojiepermana-angular-component-navigation-menu.d.ts +98 -0
  221. package/types/ojiepermana-angular-component-pagination.d.ts +33 -0
  222. package/types/ojiepermana-angular-component-pillbox.d.ts +156 -0
  223. package/types/ojiepermana-angular-component-popover.d.ts +50 -0
  224. package/types/ojiepermana-angular-component-progress.d.ts +17 -0
  225. package/types/ojiepermana-angular-component-radio.d.ts +57 -0
  226. package/types/ojiepermana-angular-component-resizable.d.ts +99 -0
  227. package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -0
  228. package/types/ojiepermana-angular-component-select.d.ts +56 -0
  229. package/types/ojiepermana-angular-component-separator.d.ts +14 -0
  230. package/types/ojiepermana-angular-component-sheet.d.ts +78 -0
  231. package/types/ojiepermana-angular-component-skeleton.d.ts +10 -0
  232. package/types/ojiepermana-angular-component-slider.d.ts +74 -0
  233. package/types/ojiepermana-angular-component-spinner.d.ts +13 -0
  234. package/types/ojiepermana-angular-component-switch.d.ts +44 -0
  235. package/types/ojiepermana-angular-component-table.d.ts +52 -0
  236. package/types/ojiepermana-angular-component-tabs.d.ts +92 -0
  237. package/types/ojiepermana-angular-component-textarea.d.ts +12 -0
  238. package/types/ojiepermana-angular-component-timeline.d.ts +63 -0
  239. package/types/ojiepermana-angular-component-toast.d.ts +51 -0
  240. package/types/ojiepermana-angular-component-toggle-group.d.ts +89 -0
  241. package/types/ojiepermana-angular-component-toggle.d.ts +25 -0
  242. package/types/ojiepermana-angular-component-tooltip.d.ts +101 -0
  243. package/types/ojiepermana-angular-component-utils.d.ts +30 -0
  244. package/types/ojiepermana-angular-component.d.ts +2 -0
@@ -0,0 +1,408 @@
1
+ import { Overlay } from '@angular/cdk/overlay';
2
+ import { TemplatePortal } from '@angular/cdk/portal';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, ElementRef, input, Directive, signal, computed, ContentChildren, forwardRef, ChangeDetectionStrategy, Component, TemplateRef, output, ViewContainerRef, DestroyRef } from '@angular/core';
5
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
+ import { connectedPositionFor, cn } from '@ojiepermana/angular-component/utils';
7
+ import { merge } from 'rxjs';
8
+ import { filter } from 'rxjs/operators';
9
+
10
+ function position(align, side) {
11
+ return connectedPositionFor(side, align, 8);
12
+ }
13
+ class NavigationMenuRootItem {
14
+ elementRef = inject(ElementRef);
15
+ disabled = input(false, /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
17
+ isWithin(container) {
18
+ return container.contains(this.elementRef.nativeElement);
19
+ }
20
+ focus() {
21
+ this.elementRef.nativeElement.focus();
22
+ }
23
+ containsTarget(target) {
24
+ return target instanceof Node && this.elementRef.nativeElement.contains(target);
25
+ }
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuRootItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: NavigationMenuRootItem, isStandalone: true, inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuRootItem, decorators: [{
30
+ type: Directive
31
+ }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
32
+ class NavigationMenuComponent {
33
+ class = input('', /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
35
+ ariaLabel = input('Main navigation', /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
37
+ loop = input(true, /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "loop" }] : /* istanbul ignore next */ []));
39
+ items;
40
+ host = inject(ElementRef);
41
+ activeItem = signal(null, /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
43
+ openTrigger = signal(null, /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "openTrigger" }] : /* istanbul ignore next */ []));
45
+ classes = computed(() => cn('relative z-10 flex max-w-max flex-1 items-center justify-center', this.class()), /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
47
+ setActiveItem(item) {
48
+ if (item.disabled()) {
49
+ return;
50
+ }
51
+ this.activeItem.set(item);
52
+ }
53
+ tabIndexFor(item) {
54
+ if (item.disabled()) {
55
+ return -1;
56
+ }
57
+ const enabledItems = this.enabledItems();
58
+ if (enabledItems.length === 0) {
59
+ return -1;
60
+ }
61
+ const activeItem = this.activeItem();
62
+ const resolvedActiveItem = activeItem && enabledItems.includes(activeItem) ? activeItem : enabledItems[0];
63
+ return resolvedActiveItem === item ? 0 : -1;
64
+ }
65
+ hasOpenTrigger(except) {
66
+ const currentOpenTrigger = this.openTrigger();
67
+ return !!currentOpenTrigger && currentOpenTrigger !== except;
68
+ }
69
+ notifyOpen(trigger) {
70
+ const currentOpenTrigger = this.openTrigger();
71
+ if (currentOpenTrigger && currentOpenTrigger !== trigger) {
72
+ currentOpenTrigger.close({ restoreFocus: false });
73
+ }
74
+ this.openTrigger.set(trigger);
75
+ this.setActiveItem(trigger);
76
+ }
77
+ notifyClosed(trigger) {
78
+ if (this.openTrigger() === trigger) {
79
+ this.openTrigger.set(null);
80
+ }
81
+ }
82
+ onKeydown(event) {
83
+ const currentItem = this.resolveItem(event.target);
84
+ if (!currentItem) {
85
+ return;
86
+ }
87
+ if (event.key === 'ArrowDown' && currentItem instanceof NavigationMenuTriggerDirective) {
88
+ event.preventDefault();
89
+ currentItem.open({ focusFirstItem: true });
90
+ return;
91
+ }
92
+ if (event.key === 'Home' || event.key === 'End') {
93
+ event.preventDefault();
94
+ this.moveFocus(currentItem, event.key === 'Home' ? 'start' : 'end');
95
+ return;
96
+ }
97
+ if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {
98
+ event.preventDefault();
99
+ this.moveFocus(currentItem, event.key === 'ArrowRight' ? 'next' : 'previous');
100
+ }
101
+ }
102
+ enabledItems() {
103
+ return this.items
104
+ ? this.items.toArray().filter((item) => !item.disabled() && item.isWithin(this.host.nativeElement))
105
+ : [];
106
+ }
107
+ resolveItem(target) {
108
+ return this.enabledItems().find((item) => item.containsTarget(target)) ?? null;
109
+ }
110
+ moveFocus(currentItem, direction) {
111
+ const enabledItems = this.enabledItems();
112
+ if (enabledItems.length === 0) {
113
+ return;
114
+ }
115
+ const currentIndex = enabledItems.indexOf(currentItem);
116
+ if (currentIndex === -1) {
117
+ enabledItems[0]?.focus();
118
+ return;
119
+ }
120
+ const nextItem = direction === 'start'
121
+ ? enabledItems[0]
122
+ : direction === 'end'
123
+ ? enabledItems[enabledItems.length - 1]
124
+ : enabledItems[this.nextIndex(currentIndex, direction === 'next' ? this.horizontalStep() : -this.horizontalStep(), enabledItems.length)];
125
+ if (!nextItem || nextItem === currentItem) {
126
+ return;
127
+ }
128
+ const currentOpenTrigger = this.openTrigger();
129
+ if (!currentOpenTrigger) {
130
+ nextItem.focus();
131
+ this.setActiveItem(nextItem);
132
+ return;
133
+ }
134
+ if (nextItem instanceof NavigationMenuTriggerDirective) {
135
+ nextItem.open({ focusFirstItem: true });
136
+ return;
137
+ }
138
+ currentOpenTrigger.close({ restoreFocus: false });
139
+ this.setActiveItem(nextItem);
140
+ queueMicrotask(() => nextItem.focus());
141
+ }
142
+ nextIndex(currentIndex, delta, length) {
143
+ const rawIndex = currentIndex + delta;
144
+ if (this.loop()) {
145
+ return (rawIndex + length) % length;
146
+ }
147
+ return Math.max(0, Math.min(length - 1, rawIndex));
148
+ }
149
+ horizontalStep() {
150
+ return getComputedStyle(this.host.nativeElement).direction === 'rtl' ? -1 : 1;
151
+ }
152
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
153
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: NavigationMenuComponent, isStandalone: true, selector: "NavigationMenu", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($any($event))" }, properties: { "class": "classes()", "attr.role": "\"navigation\"", "attr.aria-label": "ariaLabel() || null" } }, queries: [{ propertyName: "items", predicate: i0.forwardRef(() => NavigationMenuRootItem), descendants: true }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
154
+ }
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuComponent, decorators: [{
156
+ type: Component,
157
+ args: [{
158
+ selector: 'NavigationMenu',
159
+ changeDetection: ChangeDetectionStrategy.OnPush,
160
+ host: {
161
+ '[class]': 'classes()',
162
+ '[attr.role]': '"navigation"',
163
+ '[attr.aria-label]': 'ariaLabel() || null',
164
+ '(keydown)': 'onKeydown($any($event))',
165
+ },
166
+ template: `<ng-content />`,
167
+ }]
168
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], items: [{
169
+ type: ContentChildren,
170
+ args: [forwardRef(() => NavigationMenuRootItem), { descendants: true }]
171
+ }] } });
172
+ class NavigationMenuListComponent {
173
+ class = input('', /* @ts-ignore */
174
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
175
+ classes = computed(() => cn('group flex flex-1 list-none items-center justify-center gap-1', this.class()), /* @ts-ignore */
176
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
177
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
178
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: NavigationMenuListComponent, isStandalone: true, selector: "NavigationMenuList", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "\"menubar\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
179
+ }
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuListComponent, decorators: [{
181
+ type: Component,
182
+ args: [{
183
+ selector: 'NavigationMenuList',
184
+ changeDetection: ChangeDetectionStrategy.OnPush,
185
+ host: {
186
+ '[class]': 'classes()',
187
+ '[attr.role]': '"menubar"',
188
+ },
189
+ template: `<ng-content />`,
190
+ }]
191
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
192
+ class NavigationMenuItemComponent {
193
+ class = input('', /* @ts-ignore */
194
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
195
+ classes = computed(() => cn('relative', this.class()), /* @ts-ignore */
196
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
197
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
198
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: NavigationMenuItemComponent, isStandalone: true, selector: "NavigationMenuItem", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
199
+ }
200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuItemComponent, decorators: [{
201
+ type: Component,
202
+ args: [{
203
+ selector: 'NavigationMenuItem',
204
+ changeDetection: ChangeDetectionStrategy.OnPush,
205
+ host: {
206
+ '[class]': 'classes()',
207
+ },
208
+ template: `<ng-content />`,
209
+ }]
210
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
211
+ class NavigationMenuContentDirective {
212
+ template = inject(TemplateRef);
213
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
214
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: NavigationMenuContentDirective, isStandalone: true, selector: "ng-template[NavigationMenuContent]", exportAs: ["NavigationMenuContent"], ngImport: i0 });
215
+ }
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuContentDirective, decorators: [{
217
+ type: Directive,
218
+ args: [{
219
+ selector: 'ng-template[NavigationMenuContent]',
220
+ exportAs: 'NavigationMenuContent',
221
+ }]
222
+ }] });
223
+ class NavigationMenuTriggerDirective extends NavigationMenuRootItem {
224
+ NavigationMenuTrigger = input.required(/* @ts-ignore */
225
+ ...(ngDevMode ? [{ debugName: "NavigationMenuTrigger" }] : /* istanbul ignore next */ []));
226
+ align = input('start', /* @ts-ignore */
227
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
228
+ class = input('', /* @ts-ignore */
229
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
230
+ openedChange = output();
231
+ isOpen = signal(false, /* @ts-ignore */
232
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
233
+ overlay = inject(Overlay);
234
+ vcr = inject(ViewContainerRef);
235
+ navigationMenu = inject(NavigationMenuComponent, { optional: true });
236
+ destroyRef = inject(DestroyRef);
237
+ overlayRef = null;
238
+ constructor() {
239
+ super();
240
+ this.destroyRef.onDestroy(() => this.close({ restoreFocus: false, emitOpenedChange: false }));
241
+ }
242
+ classes = computed(() => cn('group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors', 'after:mb-0.5 after:ml-2 after:inline-block after:h-2 after:w-2 after:shrink-0 after:rotate-45 after:border-b after:border-r after:border-current after:transition-transform after:content-[""]', 'hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:after:-rotate-135', this.class()), /* @ts-ignore */
243
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
244
+ toggle() {
245
+ if (this.disabled()) {
246
+ return;
247
+ }
248
+ this.isOpen() ? this.close() : this.open();
249
+ }
250
+ open(options = {}) {
251
+ if (this.isOpen() || this.disabled()) {
252
+ return;
253
+ }
254
+ this.navigationMenu?.notifyOpen(this);
255
+ const overlayRef = this.overlay.create({
256
+ positionStrategy: this.overlay
257
+ .position()
258
+ .flexibleConnectedTo(this.elementRef)
259
+ .withFlexibleDimensions(false)
260
+ .withPush(false)
261
+ .withPositions([position(this.align(), 'bottom'), position(this.align(), 'top')]),
262
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
263
+ hasBackdrop: false,
264
+ panelClass: 'navigation-menu-panel',
265
+ });
266
+ const portal = new TemplatePortal(this.NavigationMenuTrigger().template, this.vcr);
267
+ overlayRef.attach(portal);
268
+ this.overlayRef = overlayRef;
269
+ merge(overlayRef
270
+ .outsidePointerEvents()
271
+ .pipe(filter((event) => !this.elementRef.nativeElement.contains(event.target))), overlayRef.keydownEvents().pipe(filter((event) => event.key === 'Escape')), overlayRef.detachments())
272
+ .pipe(takeUntilDestroyed(this.destroyRef))
273
+ .subscribe(() => this.close());
274
+ this.isOpen.set(true);
275
+ this.openedChange.emit(true);
276
+ if (options.focusFirstItem) {
277
+ queueMicrotask(() => this.focusFirstItem());
278
+ }
279
+ }
280
+ close(options = {}) {
281
+ const { restoreFocus = true, emitOpenedChange = true } = options;
282
+ if (!this.isOpen()) {
283
+ return;
284
+ }
285
+ const overlayRef = this.overlayRef;
286
+ this.overlayRef = null;
287
+ this.isOpen.set(false);
288
+ if (emitOpenedChange) {
289
+ this.openedChange.emit(false);
290
+ }
291
+ this.navigationMenu?.notifyClosed(this);
292
+ overlayRef?.dispose();
293
+ if (restoreFocus) {
294
+ this.elementRef.nativeElement.focus();
295
+ }
296
+ }
297
+ tabIndex() {
298
+ return this.navigationMenu?.tabIndexFor(this) ?? (this.disabled() ? -1 : 0);
299
+ }
300
+ openFromKeyboard(event, focusFirstItem) {
301
+ if (this.disabled()) {
302
+ return;
303
+ }
304
+ event.preventDefault();
305
+ this.open({ focusFirstItem });
306
+ }
307
+ syncActiveState() {
308
+ this.navigationMenu?.setActiveItem(this);
309
+ }
310
+ openFromHover() {
311
+ if (this.disabled() || !this.navigationMenu?.hasOpenTrigger(this)) {
312
+ return;
313
+ }
314
+ this.open();
315
+ }
316
+ focusFirstItem() {
317
+ const overlayElement = this.overlayRef?.overlayElement;
318
+ if (!overlayElement) {
319
+ return;
320
+ }
321
+ const firstItem = overlayElement.querySelector('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])');
322
+ firstItem?.focus();
323
+ }
324
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
325
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: NavigationMenuTriggerDirective, isStandalone: true, selector: "[NavigationMenuTrigger]", inputs: { NavigationMenuTrigger: { classPropertyName: "NavigationMenuTrigger", publicName: "NavigationMenuTrigger", isSignal: true, isRequired: true, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "click": "toggle()", "keydown.enter": "openFromKeyboard($any($event), false)", "keydown.space": "openFromKeyboard($any($event), false)", "keydown.arrowDown": "openFromKeyboard($any($event), true)", "focus": "syncActiveState()", "mouseenter": "openFromHover()" }, properties: { "class": "classes()", "attr.role": "\"menuitem\"", "attr.aria-haspopup": "\"menu\"", "attr.aria-expanded": "isOpen()", "attr.data-state": "isOpen() ? \"open\" : \"closed\"", "attr.tabindex": "tabIndex()", "attr.disabled": "disabled() ? \"\" : null" } }, providers: [{ provide: NavigationMenuRootItem, useExisting: forwardRef(() => NavigationMenuTriggerDirective) }], exportAs: ["NavigationMenuTrigger"], usesInheritance: true, ngImport: i0 });
326
+ }
327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuTriggerDirective, decorators: [{
328
+ type: Directive,
329
+ args: [{
330
+ selector: '[NavigationMenuTrigger]',
331
+ exportAs: 'NavigationMenuTrigger',
332
+ providers: [{ provide: NavigationMenuRootItem, useExisting: forwardRef(() => NavigationMenuTriggerDirective) }],
333
+ host: {
334
+ '[class]': 'classes()',
335
+ '[attr.role]': '"menuitem"',
336
+ '[attr.aria-haspopup]': '"menu"',
337
+ '[attr.aria-expanded]': 'isOpen()',
338
+ '[attr.data-state]': 'isOpen() ? "open" : "closed"',
339
+ '[attr.tabindex]': 'tabIndex()',
340
+ '[attr.disabled]': 'disabled() ? "" : null',
341
+ '(click)': 'toggle()',
342
+ '(keydown.enter)': 'openFromKeyboard($any($event), false)',
343
+ '(keydown.space)': 'openFromKeyboard($any($event), false)',
344
+ '(keydown.arrowDown)': 'openFromKeyboard($any($event), true)',
345
+ '(focus)': 'syncActiveState()',
346
+ '(mouseenter)': 'openFromHover()',
347
+ },
348
+ }]
349
+ }], ctorParameters: () => [], propDecorators: { NavigationMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "NavigationMenuTrigger", required: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }] } });
350
+ class NavigationMenuLinkDirective extends NavigationMenuRootItem {
351
+ class = input('', /* @ts-ignore */
352
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
353
+ variant = input('content', /* @ts-ignore */
354
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
355
+ navigationMenu = inject(NavigationMenuComponent, { optional: true });
356
+ classes = computed(() => this.variant() === 'trigger'
357
+ ? cn('inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors', 'hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', 'aria-disabled:pointer-events-none aria-disabled:opacity-50', this.class())
358
+ : cn('block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors', 'hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring', 'aria-disabled:pointer-events-none aria-disabled:opacity-50', this.class()), /* @ts-ignore */
359
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
360
+ tabIndex() {
361
+ if (this.variant() !== 'trigger') {
362
+ return this.disabled() ? -1 : 0;
363
+ }
364
+ return this.navigationMenu?.tabIndexFor(this) ?? (this.disabled() ? -1 : 0);
365
+ }
366
+ focus() {
367
+ if (this.variant() === 'trigger' && this.elementRef.nativeElement.tabIndex < 0) {
368
+ this.elementRef.nativeElement.tabIndex = 0;
369
+ }
370
+ super.focus();
371
+ }
372
+ syncActiveState() {
373
+ if (this.variant() === 'trigger') {
374
+ this.navigationMenu?.setActiveItem(this);
375
+ }
376
+ }
377
+ preventDisabled(event) {
378
+ if (this.disabled()) {
379
+ event.preventDefault();
380
+ }
381
+ }
382
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuLinkDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
383
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: NavigationMenuLinkDirective, isStandalone: true, selector: "a[NavigationMenuLink], button[NavigationMenuLink]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "syncActiveState()", "click": "preventDisabled($any($event))" }, properties: { "class": "classes()", "attr.role": "\"menuitem\"", "attr.tabindex": "tabIndex()", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.data-variant": "variant()" } }, providers: [{ provide: NavigationMenuRootItem, useExisting: forwardRef(() => NavigationMenuLinkDirective) }], exportAs: ["NavigationMenuLink"], usesInheritance: true, ngImport: i0 });
384
+ }
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: NavigationMenuLinkDirective, decorators: [{
386
+ type: Directive,
387
+ args: [{
388
+ selector: 'a[NavigationMenuLink], button[NavigationMenuLink]',
389
+ exportAs: 'NavigationMenuLink',
390
+ providers: [{ provide: NavigationMenuRootItem, useExisting: forwardRef(() => NavigationMenuLinkDirective) }],
391
+ host: {
392
+ '[class]': 'classes()',
393
+ '[attr.role]': '"menuitem"',
394
+ '[attr.tabindex]': 'tabIndex()',
395
+ '[attr.aria-disabled]': 'disabled() ? "true" : null',
396
+ '[attr.data-variant]': 'variant()',
397
+ '(focus)': 'syncActiveState()',
398
+ '(click)': 'preventDisabled($any($event))',
399
+ },
400
+ }]
401
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
402
+
403
+ /**
404
+ * Generated bundle index. Do not edit.
405
+ */
406
+
407
+ export { NavigationMenuComponent, NavigationMenuContentDirective, NavigationMenuItemComponent, NavigationMenuLinkDirective, NavigationMenuListComponent, NavigationMenuRootItem, NavigationMenuTriggerDirective };
408
+ //# sourceMappingURL=ojiepermana-angular-component-navigation-menu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-navigation-menu.mjs","sources":["../../../library/component/navigation-menu/navigation-menu.component.ts","../../../library/component/navigation-menu/ojiepermana-angular-component-navigation-menu.ts"],"sourcesContent":["import { ConnectedPosition, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n QueryList,\n TemplateRef,\n ViewContainerRef,\n computed,\n forwardRef,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { cn, connectedPositionFor } from '@ojiepermana/angular-component/utils';\nimport { merge } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nexport type NavigationMenuAlign = 'start' | 'center' | 'end';\nexport type NavigationMenuLinkVariant = 'trigger' | 'content';\n\nfunction position(align: NavigationMenuAlign, side: 'bottom' | 'top'): ConnectedPosition {\n return connectedPositionFor(side, align, 8);\n}\n\n@Directive()\nexport abstract class NavigationMenuRootItem {\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly disabled = input<boolean>(false);\n\n isWithin(container: HTMLElement): boolean {\n return container.contains(this.elementRef.nativeElement);\n }\n\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n containsTarget(target: EventTarget | null): boolean {\n return target instanceof Node && this.elementRef.nativeElement.contains(target);\n }\n}\n\n@Component({\n selector: 'NavigationMenu',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.role]': '\"navigation\"',\n '[attr.aria-label]': 'ariaLabel() || null',\n '(keydown)': 'onKeydown($any($event))',\n },\n template: `<ng-content />`,\n})\nexport class NavigationMenuComponent {\n readonly class = input<string>('');\n readonly ariaLabel = input<string>('Main navigation');\n readonly loop = input<boolean>(true);\n\n @ContentChildren(forwardRef(() => NavigationMenuRootItem), { descendants: true })\n private readonly items!: QueryList<NavigationMenuRootItem>;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly activeItem = signal<NavigationMenuRootItem | null>(null);\n private readonly openTrigger = signal<NavigationMenuTriggerDirective | null>(null);\n\n protected readonly classes = computed(() =>\n cn('relative z-10 flex max-w-max flex-1 items-center justify-center', this.class()),\n );\n\n setActiveItem(item: NavigationMenuRootItem): void {\n if (item.disabled()) {\n return;\n }\n\n this.activeItem.set(item);\n }\n\n tabIndexFor(item: NavigationMenuRootItem): number {\n if (item.disabled()) {\n return -1;\n }\n\n const enabledItems = this.enabledItems();\n\n if (enabledItems.length === 0) {\n return -1;\n }\n\n const activeItem = this.activeItem();\n const resolvedActiveItem = activeItem && enabledItems.includes(activeItem) ? activeItem : enabledItems[0];\n\n return resolvedActiveItem === item ? 0 : -1;\n }\n\n hasOpenTrigger(except?: NavigationMenuTriggerDirective): boolean {\n const currentOpenTrigger = this.openTrigger();\n return !!currentOpenTrigger && currentOpenTrigger !== except;\n }\n\n notifyOpen(trigger: NavigationMenuTriggerDirective): void {\n const currentOpenTrigger = this.openTrigger();\n\n if (currentOpenTrigger && currentOpenTrigger !== trigger) {\n currentOpenTrigger.close({ restoreFocus: false });\n }\n\n this.openTrigger.set(trigger);\n this.setActiveItem(trigger);\n }\n\n notifyClosed(trigger: NavigationMenuTriggerDirective): void {\n if (this.openTrigger() === trigger) {\n this.openTrigger.set(null);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const currentItem = this.resolveItem(event.target);\n\n if (!currentItem) {\n return;\n }\n\n if (event.key === 'ArrowDown' && currentItem instanceof NavigationMenuTriggerDirective) {\n event.preventDefault();\n currentItem.open({ focusFirstItem: true });\n return;\n }\n\n if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault();\n this.moveFocus(currentItem, event.key === 'Home' ? 'start' : 'end');\n return;\n }\n\n if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.moveFocus(currentItem, event.key === 'ArrowRight' ? 'next' : 'previous');\n }\n }\n\n private enabledItems(): NavigationMenuRootItem[] {\n return this.items\n ? this.items.toArray().filter((item) => !item.disabled() && item.isWithin(this.host.nativeElement))\n : [];\n }\n\n private resolveItem(target: EventTarget | null): NavigationMenuRootItem | null {\n return this.enabledItems().find((item) => item.containsTarget(target)) ?? null;\n }\n\n private moveFocus(currentItem: NavigationMenuRootItem, direction: 'previous' | 'next' | 'start' | 'end'): void {\n const enabledItems = this.enabledItems();\n\n if (enabledItems.length === 0) {\n return;\n }\n\n const currentIndex = enabledItems.indexOf(currentItem);\n\n if (currentIndex === -1) {\n enabledItems[0]?.focus();\n return;\n }\n\n const nextItem =\n direction === 'start'\n ? enabledItems[0]\n : direction === 'end'\n ? enabledItems[enabledItems.length - 1]\n : enabledItems[\n this.nextIndex(\n currentIndex,\n direction === 'next' ? this.horizontalStep() : -this.horizontalStep(),\n enabledItems.length,\n )\n ];\n\n if (!nextItem || nextItem === currentItem) {\n return;\n }\n\n const currentOpenTrigger = this.openTrigger();\n\n if (!currentOpenTrigger) {\n nextItem.focus();\n this.setActiveItem(nextItem);\n return;\n }\n\n if (nextItem instanceof NavigationMenuTriggerDirective) {\n nextItem.open({ focusFirstItem: true });\n return;\n }\n\n currentOpenTrigger.close({ restoreFocus: false });\n this.setActiveItem(nextItem);\n queueMicrotask(() => nextItem.focus());\n }\n\n private nextIndex(currentIndex: number, delta: number, length: number): number {\n const rawIndex = currentIndex + delta;\n\n if (this.loop()) {\n return (rawIndex + length) % length;\n }\n\n return Math.max(0, Math.min(length - 1, rawIndex));\n }\n\n private horizontalStep(): number {\n return getComputedStyle(this.host.nativeElement).direction === 'rtl' ? -1 : 1;\n }\n}\n\n@Component({\n selector: 'NavigationMenuList',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.role]': '\"menubar\"',\n },\n template: `<ng-content />`,\n})\nexport class NavigationMenuListComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('group flex flex-1 list-none items-center justify-center gap-1', this.class()),\n );\n}\n\n@Component({\n selector: 'NavigationMenuItem',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n },\n template: `<ng-content />`,\n})\nexport class NavigationMenuItemComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('relative', this.class()));\n}\n\n@Directive({\n selector: 'ng-template[NavigationMenuContent]',\n exportAs: 'NavigationMenuContent',\n})\nexport class NavigationMenuContentDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n@Directive({\n selector: '[NavigationMenuTrigger]',\n exportAs: 'NavigationMenuTrigger',\n providers: [{ provide: NavigationMenuRootItem, useExisting: forwardRef(() => NavigationMenuTriggerDirective) }],\n host: {\n '[class]': 'classes()',\n '[attr.role]': '\"menuitem\"',\n '[attr.aria-haspopup]': '\"menu\"',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.data-state]': 'isOpen() ? \"open\" : \"closed\"',\n '[attr.tabindex]': 'tabIndex()',\n '[attr.disabled]': 'disabled() ? \"\" : null',\n '(click)': 'toggle()',\n '(keydown.enter)': 'openFromKeyboard($any($event), false)',\n '(keydown.space)': 'openFromKeyboard($any($event), false)',\n '(keydown.arrowDown)': 'openFromKeyboard($any($event), true)',\n '(focus)': 'syncActiveState()',\n '(mouseenter)': 'openFromHover()',\n },\n})\nexport class NavigationMenuTriggerDirective extends NavigationMenuRootItem {\n readonly NavigationMenuTrigger = input.required<NavigationMenuContentDirective>();\n readonly align = input<NavigationMenuAlign>('start');\n readonly class = input<string>('');\n\n readonly openedChange = output<boolean>();\n readonly isOpen = signal(false);\n\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly navigationMenu = inject(NavigationMenuComponent, { optional: true });\n private readonly destroyRef = inject(DestroyRef);\n\n private overlayRef: OverlayRef | null = null;\n\n constructor() {\n super();\n this.destroyRef.onDestroy(() => this.close({ restoreFocus: false, emitOpenedChange: false }));\n }\n\n protected readonly classes = computed(() =>\n cn(\n 'group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors',\n 'after:mb-0.5 after:ml-2 after:inline-block after:h-2 after:w-2 after:shrink-0 after:rotate-45 after:border-b after:border-r after:border-current after:transition-transform after:content-[\"\"]',\n 'hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:after:-rotate-135',\n this.class(),\n ),\n );\n\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n this.isOpen() ? this.close() : this.open();\n }\n\n open(options: { focusFirstItem?: boolean } = {}): void {\n if (this.isOpen() || this.disabled()) {\n return;\n }\n\n this.navigationMenu?.notifyOpen(this);\n\n const overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withFlexibleDimensions(false)\n .withPush(false)\n .withPositions([position(this.align(), 'bottom'), position(this.align(), 'top')]),\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: false,\n panelClass: 'navigation-menu-panel',\n });\n\n const portal = new TemplatePortal(this.NavigationMenuTrigger().template, this.vcr);\n\n overlayRef.attach(portal);\n this.overlayRef = overlayRef;\n\n merge(\n overlayRef\n .outsidePointerEvents()\n .pipe(filter((event) => !this.elementRef.nativeElement.contains(event.target as Node))),\n overlayRef.keydownEvents().pipe(filter((event) => event.key === 'Escape')),\n overlayRef.detachments(),\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.close());\n\n this.isOpen.set(true);\n this.openedChange.emit(true);\n\n if (options.focusFirstItem) {\n queueMicrotask(() => this.focusFirstItem());\n }\n }\n\n close(options: { restoreFocus?: boolean; emitOpenedChange?: boolean } = {}): void {\n const { restoreFocus = true, emitOpenedChange = true } = options;\n\n if (!this.isOpen()) {\n return;\n }\n\n const overlayRef = this.overlayRef;\n this.overlayRef = null;\n this.isOpen.set(false);\n\n if (emitOpenedChange) {\n this.openedChange.emit(false);\n }\n\n this.navigationMenu?.notifyClosed(this);\n overlayRef?.dispose();\n\n if (restoreFocus) {\n this.elementRef.nativeElement.focus();\n }\n }\n\n protected tabIndex(): number {\n return this.navigationMenu?.tabIndexFor(this) ?? (this.disabled() ? -1 : 0);\n }\n\n protected openFromKeyboard(event: KeyboardEvent, focusFirstItem: boolean): void {\n if (this.disabled()) {\n return;\n }\n\n event.preventDefault();\n this.open({ focusFirstItem });\n }\n\n protected syncActiveState(): void {\n this.navigationMenu?.setActiveItem(this);\n }\n\n protected openFromHover(): void {\n if (this.disabled() || !this.navigationMenu?.hasOpenTrigger(this)) {\n return;\n }\n\n this.open();\n }\n\n private focusFirstItem(): void {\n const overlayElement = this.overlayRef?.overlayElement;\n\n if (!overlayElement) {\n return;\n }\n\n const firstItem = overlayElement.querySelector<HTMLElement>(\n 'a[href], button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\n );\n\n firstItem?.focus();\n }\n}\n\n@Directive({\n selector: 'a[NavigationMenuLink], button[NavigationMenuLink]',\n exportAs: 'NavigationMenuLink',\n providers: [{ provide: NavigationMenuRootItem, useExisting: forwardRef(() => NavigationMenuLinkDirective) }],\n host: {\n '[class]': 'classes()',\n '[attr.role]': '\"menuitem\"',\n '[attr.tabindex]': 'tabIndex()',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.data-variant]': 'variant()',\n '(focus)': 'syncActiveState()',\n '(click)': 'preventDisabled($any($event))',\n },\n})\nexport class NavigationMenuLinkDirective extends NavigationMenuRootItem {\n readonly class = input<string>('');\n readonly variant = input<NavigationMenuLinkVariant>('content');\n\n private readonly navigationMenu = inject(NavigationMenuComponent, { optional: true });\n\n protected readonly classes = computed(() =>\n this.variant() === 'trigger'\n ? cn(\n 'inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors',\n 'hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n this.class(),\n )\n : cn(\n 'block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors',\n 'hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n this.class(),\n ),\n );\n\n protected tabIndex(): number {\n if (this.variant() !== 'trigger') {\n return this.disabled() ? -1 : 0;\n }\n\n return this.navigationMenu?.tabIndexFor(this) ?? (this.disabled() ? -1 : 0);\n }\n\n override focus(): void {\n if (this.variant() === 'trigger' && this.elementRef.nativeElement.tabIndex < 0) {\n this.elementRef.nativeElement.tabIndex = 0;\n }\n\n super.focus();\n }\n\n protected syncActiveState(): void {\n if (this.variant() === 'trigger') {\n this.navigationMenu?.setActiveItem(this);\n }\n }\n\n protected preventDisabled(event: MouseEvent): void {\n if (this.disabled()) {\n event.preventDefault();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA2BA,SAAS,QAAQ,CAAC,KAA0B,EAAE,IAAsB,EAAA;IAClE,OAAO,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7C;MAGsB,sBAAsB,CAAA;AACvB,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;IAElE,QAAQ,GAAG,KAAK,CAAU,KAAK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