@angular/aria 21.0.0-rc.1 → 21.0.0-rc.2

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 (41) hide show
  1. package/_adev_assets/aria-accordion.json +439 -55
  2. package/_adev_assets/aria-combobox.json +343 -35
  3. package/_adev_assets/aria-grid.json +345 -77
  4. package/_adev_assets/aria-listbox.json +113 -33
  5. package/_adev_assets/aria-menu.json +366 -141
  6. package/_adev_assets/aria-tabs.json +261 -77
  7. package/_adev_assets/aria-toolbar.json +72 -33
  8. package/_adev_assets/aria-tree.json +169 -26
  9. package/fesm2022/_widget-chunk.mjs +388 -57
  10. package/fesm2022/_widget-chunk.mjs.map +1 -1
  11. package/fesm2022/accordion.mjs +121 -68
  12. package/fesm2022/accordion.mjs.map +1 -1
  13. package/fesm2022/aria.mjs +1 -1
  14. package/fesm2022/aria.mjs.map +1 -1
  15. package/fesm2022/combobox.mjs +132 -21
  16. package/fesm2022/combobox.mjs.map +1 -1
  17. package/fesm2022/grid.mjs +198 -61
  18. package/fesm2022/grid.mjs.map +1 -1
  19. package/fesm2022/listbox.mjs +42 -31
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +173 -67
  22. package/fesm2022/menu.mjs.map +1 -1
  23. package/fesm2022/private.mjs +415 -439
  24. package/fesm2022/private.mjs.map +1 -1
  25. package/fesm2022/tabs.mjs +86 -55
  26. package/fesm2022/tabs.mjs.map +1 -1
  27. package/fesm2022/toolbar.mjs +13 -25
  28. package/fesm2022/toolbar.mjs.map +1 -1
  29. package/fesm2022/tree.mjs +86 -44
  30. package/fesm2022/tree.mjs.map +1 -1
  31. package/package.json +2 -2
  32. package/types/_grid-chunk.d.ts +216 -35
  33. package/types/accordion.d.ts +133 -34
  34. package/types/combobox.d.ts +145 -12
  35. package/types/grid.d.ts +149 -31
  36. package/types/listbox.d.ts +58 -26
  37. package/types/menu.d.ts +130 -46
  38. package/types/private.d.ts +210 -250
  39. package/types/tabs.d.ts +119 -39
  40. package/types/toolbar.d.ts +49 -29
  41. package/types/tree.d.ts +113 -41
package/fesm2022/menu.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, signal, computed, effect, Directive, contentChildren, output, afterRenderEffect, untracked, model } from '@angular/core';
2
+ import { inject, ElementRef, input, computed, booleanAttribute, effect, Directive, contentChildren, signal, output, afterRenderEffect, untracked, model } from '@angular/core';
3
3
  import * as i1 from '@angular/aria/private';
4
4
  import { MenuTriggerPattern, DeferredContentAware, MenuPattern, MenuBarPattern, MenuItemPattern, DeferredContent } from '@angular/aria/private';
5
5
  import { _IdGenerator } from '@angular/cdk/a11y';
@@ -7,24 +7,45 @@ import { Directionality } from '@angular/cdk/bidi';
7
7
 
8
8
  class MenuTrigger {
9
9
  _elementRef = inject(ElementRef);
10
- textDirection = inject(Directionality).valueSignal;
11
10
  element = this._elementRef.nativeElement;
11
+ textDirection = inject(Directionality).valueSignal;
12
12
  menu = input(undefined, ...(ngDevMode ? [{
13
13
  debugName: "menu"
14
14
  }] : []));
15
- hasBeenFocused = signal(false, ...(ngDevMode ? [{
16
- debugName: "hasBeenFocused"
15
+ expanded = computed(() => this._pattern.expanded(), ...(ngDevMode ? [{
16
+ debugName: "expanded"
17
+ }] : []));
18
+ hasPopup = computed(() => this._pattern.hasPopup(), ...(ngDevMode ? [{
19
+ debugName: "hasPopup"
17
20
  }] : []));
21
+ disabled = input(false, ...(ngDevMode ? [{
22
+ debugName: "disabled",
23
+ transform: booleanAttribute
24
+ }] : [{
25
+ transform: booleanAttribute
26
+ }]));
27
+ softDisabled = input(true, ...(ngDevMode ? [{
28
+ debugName: "softDisabled",
29
+ transform: booleanAttribute
30
+ }] : [{
31
+ transform: booleanAttribute
32
+ }]));
18
33
  _pattern = new MenuTriggerPattern({
19
34
  textDirection: this.textDirection,
20
35
  element: computed(() => this._elementRef.nativeElement),
21
- menu: computed(() => this.menu()?._pattern)
36
+ menu: computed(() => this.menu()?._pattern),
37
+ disabled: () => this.disabled()
22
38
  });
23
39
  constructor() {
24
40
  effect(() => this.menu()?.parent.set(this));
25
41
  }
26
- onFocusIn() {
27
- this.hasBeenFocused.set(true);
42
+ open() {
43
+ this._pattern.open({
44
+ first: true
45
+ });
46
+ }
47
+ close() {
48
+ this._pattern.close();
28
49
  }
29
50
  static ɵfac = i0.ɵɵngDeclareFactory({
30
51
  minVersion: "12.0.0",
@@ -47,6 +68,20 @@ class MenuTrigger {
47
68
  isSignal: true,
48
69
  isRequired: false,
49
70
  transformFunction: null
71
+ },
72
+ disabled: {
73
+ classPropertyName: "disabled",
74
+ publicName: "disabled",
75
+ isSignal: true,
76
+ isRequired: false,
77
+ transformFunction: null
78
+ },
79
+ softDisabled: {
80
+ classPropertyName: "softDisabled",
81
+ publicName: "softDisabled",
82
+ isSignal: true,
83
+ isRequired: false,
84
+ transformFunction: null
50
85
  }
51
86
  },
52
87
  host: {
@@ -54,15 +89,16 @@ class MenuTrigger {
54
89
  "click": "_pattern.onClick()",
55
90
  "keydown": "_pattern.onKeydown($event)",
56
91
  "focusout": "_pattern.onFocusOut($event)",
57
- "focusin": "onFocusIn()"
92
+ "focusin": "_pattern.onFocusIn()"
58
93
  },
59
94
  properties: {
60
95
  "attr.tabindex": "_pattern.tabIndex()",
61
- "attr.aria-haspopup": "_pattern.hasPopup()",
62
- "attr.aria-expanded": "_pattern.expanded()",
96
+ "attr.disabled": "!softDisabled() && _pattern.disabled() ? true : null",
97
+ "attr.aria-disabled": "_pattern.disabled()",
98
+ "attr.aria-haspopup": "hasPopup()",
99
+ "attr.aria-expanded": "expanded()",
63
100
  "attr.aria-controls": "_pattern.menu()?.id()"
64
- },
65
- classAttribute: "ng-menu-trigger"
101
+ }
66
102
  },
67
103
  exportAs: ["ngMenuTrigger"],
68
104
  ngImport: i0
@@ -79,15 +115,16 @@ i0.ɵɵngDeclareClassMetadata({
79
115
  selector: 'button[ngMenuTrigger]',
80
116
  exportAs: 'ngMenuTrigger',
81
117
  host: {
82
- 'class': 'ng-menu-trigger',
83
118
  '[attr.tabindex]': '_pattern.tabIndex()',
84
- '[attr.aria-haspopup]': '_pattern.hasPopup()',
85
- '[attr.aria-expanded]': '_pattern.expanded()',
119
+ '[attr.disabled]': '!softDisabled() && _pattern.disabled() ? true : null',
120
+ '[attr.aria-disabled]': '_pattern.disabled()',
121
+ '[attr.aria-haspopup]': 'hasPopup()',
122
+ '[attr.aria-expanded]': 'expanded()',
86
123
  '[attr.aria-controls]': '_pattern.menu()?.id()',
87
124
  '(click)': '_pattern.onClick()',
88
125
  '(keydown)': '_pattern.onKeydown($event)',
89
126
  '(focusout)': '_pattern.onFocusOut($event)',
90
- '(focusin)': 'onFocusIn()'
127
+ '(focusin)': '_pattern.onFocusIn()'
91
128
  }
92
129
  }]
93
130
  }],
@@ -113,20 +150,35 @@ class Menu {
113
150
  debugName: "id"
114
151
  }] : []));
115
152
  wrap = input(true, ...(ngDevMode ? [{
116
- debugName: "wrap"
117
- }] : []));
118
- typeaheadDelay = input(0.5, ...(ngDevMode ? [{
153
+ debugName: "wrap",
154
+ transform: booleanAttribute
155
+ }] : [{
156
+ transform: booleanAttribute
157
+ }]));
158
+ typeaheadDelay = input(500, ...(ngDevMode ? [{
119
159
  debugName: "typeaheadDelay"
120
160
  }] : []));
161
+ disabled = input(false, ...(ngDevMode ? [{
162
+ debugName: "disabled",
163
+ transform: booleanAttribute
164
+ }] : [{
165
+ transform: booleanAttribute
166
+ }]));
121
167
  parent = signal(undefined, ...(ngDevMode ? [{
122
168
  debugName: "parent"
123
169
  }] : []));
124
170
  _pattern;
125
171
  items = () => this._items().map(i => i._pattern);
126
- isVisible = computed(() => this._pattern.isVisible(), ...(ngDevMode ? [{
127
- debugName: "isVisible"
172
+ visible = computed(() => this._pattern.visible(), ...(ngDevMode ? [{
173
+ debugName: "visible"
174
+ }] : []));
175
+ tabIndex = computed(() => this._pattern.tabIndex(), ...(ngDevMode ? [{
176
+ debugName: "tabIndex"
128
177
  }] : []));
129
178
  onSelect = output();
179
+ expansionDelay = input(100, ...(ngDevMode ? [{
180
+ debugName: "expansionDelay"
181
+ }] : []));
130
182
  constructor() {
131
183
  this._pattern = new MenuPattern({
132
184
  ...this,
@@ -145,32 +197,23 @@ class Menu {
145
197
  if (parent instanceof MenuItem && parent.parent instanceof MenuBar) {
146
198
  this._deferredContentAware?.contentVisible.set(true);
147
199
  } else {
148
- this._deferredContentAware?.contentVisible.set(this._pattern.isVisible() || !!this.parent()?.hasBeenFocused());
200
+ this._deferredContentAware?.contentVisible.set(this._pattern.visible() || !!this.parent()?._pattern.hasBeenFocused());
149
201
  }
150
202
  });
151
203
  afterRenderEffect(() => {
152
- if (this._pattern.isVisible()) {
204
+ if (this._pattern.visible()) {
153
205
  const activeItem = untracked(() => this._pattern.inputs.activeItem());
154
206
  this._pattern.listBehavior.goto(activeItem);
155
207
  }
156
208
  });
157
209
  afterRenderEffect(() => {
158
- if (!this._pattern.hasBeenFocused()) {
159
- this._pattern.setDefaultState();
210
+ if (!this._pattern.hasBeenFocused() && this._items().length) {
211
+ untracked(() => this._pattern.setDefaultState());
160
212
  }
161
213
  });
162
214
  }
163
- close(opts) {
164
- this._pattern.inputs.parent()?.close(opts);
165
- }
166
- closeAll(opts) {
167
- const root = this._pattern.root();
168
- if (root instanceof MenuTriggerPattern) {
169
- root.close(opts);
170
- }
171
- if (root instanceof MenuPattern || root instanceof MenuBarPattern) {
172
- root.inputs.activeItem()?.close(opts);
173
- }
215
+ close() {
216
+ this._pattern.close();
174
217
  }
175
218
  static ɵfac = i0.ɵɵngDeclareFactory({
176
219
  minVersion: "12.0.0",
@@ -207,6 +250,20 @@ class Menu {
207
250
  isSignal: true,
208
251
  isRequired: false,
209
252
  transformFunction: null
253
+ },
254
+ disabled: {
255
+ classPropertyName: "disabled",
256
+ publicName: "disabled",
257
+ isSignal: true,
258
+ isRequired: false,
259
+ transformFunction: null
260
+ },
261
+ expansionDelay: {
262
+ classPropertyName: "expansionDelay",
263
+ publicName: "expansionDelay",
264
+ isSignal: true,
265
+ isRequired: false,
266
+ transformFunction: null
210
267
  }
211
268
  },
212
269
  outputs: {
@@ -226,9 +283,10 @@ class Menu {
226
283
  },
227
284
  properties: {
228
285
  "attr.id": "_pattern.id()",
229
- "attr.data-visible": "_pattern.isVisible()"
230
- },
231
- classAttribute: "ng-menu"
286
+ "attr.aria-disabled": "_pattern.disabled()",
287
+ "attr.tabindex": "tabIndex()",
288
+ "attr.data-visible": "visible()"
289
+ }
232
290
  },
233
291
  queries: [{
234
292
  propertyName: "_allItems",
@@ -256,9 +314,10 @@ i0.ɵɵngDeclareClassMetadata({
256
314
  exportAs: 'ngMenu',
257
315
  host: {
258
316
  'role': 'menu',
259
- 'class': 'ng-menu',
260
317
  '[attr.id]': '_pattern.id()',
261
- '[attr.data-visible]': '_pattern.isVisible()',
318
+ '[attr.aria-disabled]': '_pattern.disabled()',
319
+ '[attr.tabindex]': 'tabIndex()',
320
+ '[attr.data-visible]': 'visible()',
262
321
  '(keydown)': '_pattern.onKeydown($event)',
263
322
  '(mouseover)': '_pattern.onMouseOver($event)',
264
323
  '(mouseout)': '_pattern.onMouseOut($event)',
@@ -284,14 +343,29 @@ class MenuBar {
284
343
  _items = () => this._allItems().filter(i => i.parent === this);
285
344
  _elementRef = inject(ElementRef);
286
345
  element = this._elementRef.nativeElement;
346
+ disabled = input(false, ...(ngDevMode ? [{
347
+ debugName: "disabled",
348
+ transform: booleanAttribute
349
+ }] : [{
350
+ transform: booleanAttribute
351
+ }]));
352
+ softDisabled = input(true, ...(ngDevMode ? [{
353
+ debugName: "softDisabled",
354
+ transform: booleanAttribute
355
+ }] : [{
356
+ transform: booleanAttribute
357
+ }]));
287
358
  textDirection = inject(Directionality).valueSignal;
288
- value = model([], ...(ngDevMode ? [{
289
- debugName: "value"
359
+ values = model([], ...(ngDevMode ? [{
360
+ debugName: "values"
290
361
  }] : []));
291
362
  wrap = input(true, ...(ngDevMode ? [{
292
- debugName: "wrap"
293
- }] : []));
294
- typeaheadDelay = input(0.5, ...(ngDevMode ? [{
363
+ debugName: "wrap",
364
+ transform: booleanAttribute
365
+ }] : [{
366
+ transform: booleanAttribute
367
+ }]));
368
+ typeaheadDelay = input(500, ...(ngDevMode ? [{
295
369
  debugName: "typeaheadDelay"
296
370
  }] : []));
297
371
  _pattern;
@@ -320,6 +394,9 @@ class MenuBar {
320
394
  }
321
395
  });
322
396
  }
397
+ close() {
398
+ this._pattern.close();
399
+ }
323
400
  static ɵfac = i0.ɵɵngDeclareFactory({
324
401
  minVersion: "12.0.0",
325
402
  version: "20.2.0-next.2",
@@ -335,9 +412,23 @@ class MenuBar {
335
412
  isStandalone: true,
336
413
  selector: "[ngMenuBar]",
337
414
  inputs: {
338
- value: {
339
- classPropertyName: "value",
340
- publicName: "value",
415
+ disabled: {
416
+ classPropertyName: "disabled",
417
+ publicName: "disabled",
418
+ isSignal: true,
419
+ isRequired: false,
420
+ transformFunction: null
421
+ },
422
+ softDisabled: {
423
+ classPropertyName: "softDisabled",
424
+ publicName: "softDisabled",
425
+ isSignal: true,
426
+ isRequired: false,
427
+ transformFunction: null
428
+ },
429
+ values: {
430
+ classPropertyName: "values",
431
+ publicName: "values",
341
432
  isSignal: true,
342
433
  isRequired: false,
343
434
  transformFunction: null
@@ -358,7 +449,7 @@ class MenuBar {
358
449
  }
359
450
  },
360
451
  outputs: {
361
- value: "valueChange",
452
+ values: "valuesChange",
362
453
  onSelect: "onSelect"
363
454
  },
364
455
  host: {
@@ -372,7 +463,11 @@ class MenuBar {
372
463
  "focusin": "_pattern.onFocusIn()",
373
464
  "focusout": "_pattern.onFocusOut($event)"
374
465
  },
375
- classAttribute: "ng-menu-bar"
466
+ properties: {
467
+ "attr.disabled": "!softDisabled() && _pattern.disabled() ? true : null",
468
+ "attr.aria-disabled": "_pattern.disabled()",
469
+ "attr.tabindex": "_pattern.tabIndex()"
470
+ }
376
471
  },
377
472
  queries: [{
378
473
  propertyName: "_allItems",
@@ -396,7 +491,9 @@ i0.ɵɵngDeclareClassMetadata({
396
491
  exportAs: 'ngMenuBar',
397
492
  host: {
398
493
  'role': 'menubar',
399
- 'class': 'ng-menu-bar',
494
+ '[attr.disabled]': '!softDisabled() && _pattern.disabled() ? true : null',
495
+ '[attr.aria-disabled]': '_pattern.disabled()',
496
+ '[attr.tabindex]': '_pattern.tabIndex()',
400
497
  '(keydown)': '_pattern.onKeydown($event)',
401
498
  '(mouseover)': '_pattern.onMouseOver($event)',
402
499
  '(click)': '_pattern.onClick($event)',
@@ -432,8 +529,14 @@ class MenuItem {
432
529
  submenu = input(undefined, ...(ngDevMode ? [{
433
530
  debugName: "submenu"
434
531
  }] : []));
435
- hasBeenFocused = signal(false, ...(ngDevMode ? [{
436
- debugName: "hasBeenFocused"
532
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
533
+ debugName: "active"
534
+ }] : []));
535
+ expanded = computed(() => this._pattern.expanded(), ...(ngDevMode ? [{
536
+ debugName: "expanded"
537
+ }] : []));
538
+ hasPopup = computed(() => this._pattern.hasPopup(), ...(ngDevMode ? [{
539
+ debugName: "hasPopup"
437
540
  }] : []));
438
541
  _pattern = new MenuItemPattern({
439
542
  id: this.id,
@@ -447,8 +550,13 @@ class MenuItem {
447
550
  constructor() {
448
551
  effect(() => this.submenu()?.parent.set(this));
449
552
  }
450
- onFocusIn() {
451
- this.hasBeenFocused.set(true);
553
+ open() {
554
+ this._pattern.open({
555
+ first: true
556
+ });
557
+ }
558
+ close() {
559
+ this._pattern.close();
452
560
  }
453
561
  static ɵfac = i0.ɵɵngDeclareFactory({
454
562
  minVersion: "12.0.0",
@@ -509,17 +617,16 @@ class MenuItem {
509
617
  "role": "menuitem"
510
618
  },
511
619
  listeners: {
512
- "focusin": "onFocusIn()"
620
+ "focusin": "_pattern.onFocusIn()"
513
621
  },
514
622
  properties: {
515
623
  "attr.tabindex": "_pattern.tabIndex()",
516
- "attr.data-active": "_pattern.isActive()",
517
- "attr.aria-haspopup": "_pattern.hasPopup()",
518
- "attr.aria-expanded": "_pattern.expanded()",
624
+ "attr.data-active": "active()",
625
+ "attr.aria-haspopup": "hasPopup()",
626
+ "attr.aria-expanded": "expanded()",
519
627
  "attr.aria-disabled": "_pattern.disabled()",
520
628
  "attr.aria-controls": "_pattern.submenu()?.id()"
521
- },
522
- classAttribute: "ng-menu-item"
629
+ }
523
630
  },
524
631
  exportAs: ["ngMenuItem"],
525
632
  ngImport: i0
@@ -537,12 +644,11 @@ i0.ɵɵngDeclareClassMetadata({
537
644
  exportAs: 'ngMenuItem',
538
645
  host: {
539
646
  'role': 'menuitem',
540
- 'class': 'ng-menu-item',
541
- '(focusin)': 'onFocusIn()',
647
+ '(focusin)': '_pattern.onFocusIn()',
542
648
  '[attr.tabindex]': '_pattern.tabIndex()',
543
- '[attr.data-active]': '_pattern.isActive()',
544
- '[attr.aria-haspopup]': '_pattern.hasPopup()',
545
- '[attr.aria-expanded]': '_pattern.expanded()',
649
+ '[attr.data-active]': 'active()',
650
+ '[attr.aria-haspopup]': 'hasPopup()',
651
+ '[attr.aria-expanded]': 'expanded()',
546
652
  '[attr.aria-disabled]': '_pattern.disabled()',
547
653
  '[attr.aria-controls]': '_pattern.submenu()?.id()'
548
654
  }
@@ -1 +1 @@
1
- {"version":3,"file":"menu.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/aria/menu/menu.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n computed,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n Signal,\n signal,\n untracked,\n} from '@angular/core';\nimport {\n SignalLike,\n MenuBarPattern,\n MenuItemPattern,\n MenuPattern,\n MenuTriggerPattern,\n DeferredContent,\n DeferredContentAware,\n} from '@angular/aria/private';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\n\n/**\n * A trigger for a menu.\n *\n * The menu trigger is used to open and close menus, and can be placed on menu items to connect\n * sub-menus.\n */\n@Directive({\n selector: 'button[ngMenuTrigger]',\n exportAs: 'ngMenuTrigger',\n host: {\n 'class': 'ng-menu-trigger',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.aria-haspopup]': '_pattern.hasPopup()',\n '[attr.aria-expanded]': '_pattern.expanded()',\n '[attr.aria-controls]': '_pattern.menu()?.id()',\n '(click)': '_pattern.onClick()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': 'onFocusIn()',\n },\n})\nexport class MenuTrigger<V> {\n /** A reference to the menu trigger element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** A reference to the menu element. */\n readonly element: HTMLButtonElement = this._elementRef.nativeElement;\n\n /** The menu associated with the trigger. */\n menu = input<Menu<V> | undefined>(undefined);\n\n /** Whether the menu item has been focused. */\n readonly hasBeenFocused = signal(false);\n\n /** The menu trigger ui pattern instance. */\n _pattern: MenuTriggerPattern<V> = new MenuTriggerPattern({\n textDirection: this.textDirection,\n element: computed(() => this._elementRef.nativeElement),\n menu: computed(() => this.menu()?._pattern),\n });\n\n constructor() {\n effect(() => this.menu()?.parent.set(this));\n }\n\n /** Marks the menu trigger as having been focused. */\n onFocusIn() {\n this.hasBeenFocused.set(true);\n }\n}\n\n/**\n * A list of menu items.\n *\n * A menu is used to offer a list of menu item choices to users. Menus can be nested within other\n * menus to create sub-menus.\n *\n * ```html\n * <button ngMenuTrigger menu=\"menu\">Options</button>\n *\n * <div ngMenu #menu=\"ngMenu\">\n * <div ngMenuItem>Star</div>\n * <div ngMenuItem>Edit</div>\n * <div ngMenuItem>Delete</div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[ngMenu]',\n exportAs: 'ngMenu',\n host: {\n 'role': 'menu',\n 'class': 'ng-menu',\n '[attr.id]': '_pattern.id()',\n '[attr.data-visible]': '_pattern.isVisible()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(mouseout)': '_pattern.onMouseOut($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(click)': '_pattern.onClick($event)',\n },\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n})\nexport class Menu<V> {\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware, {optional: true});\n\n /** The menu items contained in the menu. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n /** The menu items that are direct children of this menu. */\n readonly _items: Signal<MenuItem<V>[]> = computed(() =>\n this._allItems().filter(i => i.parent === this),\n );\n\n /** A reference to the menu element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menu element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The unique ID of the menu. */\n readonly id = input<string>(inject(_IdGenerator).getId('ng-menu-', true));\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input<boolean>(true);\n\n /** The delay in seconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** A reference to the parent menu item or menu trigger. */\n readonly parent = signal<MenuTrigger<V> | MenuItem<V> | undefined>(undefined);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuPattern<V>;\n\n /**\n * The menu items as a writable signal.\n *\n * TODO(wagnermaciel): This would normally be a computed, but using a computed causes a bug where\n * sometimes the items array is empty. The bug can be reproduced by switching this to use a\n * computed and then quickly opening and closing menus in the dev app.\n */\n readonly items = () => this._items().map(i => i._pattern);\n\n /** Whether the menu is visible. */\n isVisible = computed(() => this._pattern.isVisible());\n\n /** A callback function triggered when a menu item is selected. */\n onSelect = output<V>();\n\n constructor() {\n this._pattern = new MenuPattern({\n ...this,\n parent: computed(() => this.parent()?._pattern),\n multi: () => false,\n softDisabled: () => true,\n focusMode: () => 'roving',\n orientation: () => 'vertical',\n selectionMode: () => 'explicit',\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n onSelect: (value: V) => this.onSelect.emit(value),\n });\n\n afterRenderEffect(() => {\n const parent = this.parent();\n if (parent instanceof MenuItem && parent.parent instanceof MenuBar) {\n this._deferredContentAware?.contentVisible.set(true);\n } else {\n this._deferredContentAware?.contentVisible.set(\n this._pattern.isVisible() || !!this.parent()?.hasBeenFocused(),\n );\n }\n });\n\n // TODO(wagnermaciel): This is a redundancy needed for if the user uses display: none to hide\n // submenus. In those cases, the ui pattern is calling focus() before the ui has a chance to\n // update the display property. The result is focus() being called on an element that is not\n // focusable. This simply retries focusing the element after render.\n afterRenderEffect(() => {\n if (this._pattern.isVisible()) {\n const activeItem = untracked(() => this._pattern.inputs.activeItem());\n this._pattern.listBehavior.goto(activeItem!);\n }\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused()) {\n this._pattern.setDefaultState();\n }\n });\n }\n\n // TODO(wagnermaciel): Author close, closeAll, and open methods for each directive.\n\n /** Closes the menu. */\n close(opts?: {refocus?: boolean}) {\n this._pattern.inputs.parent()?.close(opts);\n }\n\n /** Closes all parent menus. */\n closeAll(opts?: {refocus?: boolean}) {\n const root = this._pattern.root();\n\n if (root instanceof MenuTriggerPattern) {\n root.close(opts);\n }\n\n if (root instanceof MenuPattern || root instanceof MenuBarPattern) {\n root.inputs.activeItem()?.close(opts);\n }\n }\n}\n\n/**\n * A menu bar of menu items.\n *\n * Like the menu, a menubar is used to offer a list of menu item choices to users. However, a\n * menubar is used to display a persistent, top-level,\n * always-visible set of menu item choices.\n */\n@Directive({\n selector: '[ngMenuBar]',\n exportAs: 'ngMenuBar',\n host: {\n 'role': 'menubar',\n 'class': 'ng-menu-bar',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class MenuBar<V> {\n /** The menu items contained in the menubar. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n readonly _items: SignalLike<MenuItem<V>[]> = () =>\n this._allItems().filter(i => i.parent === this);\n\n /** A reference to the menu element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menubar element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The value of the menu. */\n readonly value = model<V[]>([]);\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input<boolean>(true);\n\n /** The delay in seconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(0.5);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuBarPattern<V>;\n\n /** The menu items as a writable signal. */\n readonly items = signal<MenuItemPattern<V>[]>([]);\n\n /** A callback function triggered when a menu item is selected. */\n onSelect = output<V>();\n\n constructor() {\n this._pattern = new MenuBarPattern({\n ...this,\n multi: () => false,\n softDisabled: () => true,\n focusMode: () => 'roving',\n orientation: () => 'horizontal',\n selectionMode: () => 'explicit',\n onSelect: (value: V) => this.onSelect.emit(value),\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n });\n\n afterRenderEffect(() => {\n this.items.set(this._items().map(i => i._pattern));\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused()) {\n this._pattern.setDefaultState();\n }\n });\n }\n}\n\n/**\n * An item in a Menu.\n *\n * Menu items can be used in menus and menubars to represent a choice or action a user can take.\n */\n@Directive({\n selector: '[ngMenuItem]',\n exportAs: 'ngMenuItem',\n host: {\n 'role': 'menuitem',\n 'class': 'ng-menu-item',\n '(focusin)': 'onFocusIn()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.data-active]': '_pattern.isActive()',\n '[attr.aria-haspopup]': '_pattern.hasPopup()',\n '[attr.aria-expanded]': '_pattern.expanded()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-controls]': '_pattern.submenu()?.id()',\n },\n})\nexport class MenuItem<V> {\n /** A reference to the menu item element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menu element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The unique ID of the menu item. */\n readonly id = input<string>(inject(_IdGenerator).getId('ng-menu-item-', true));\n\n /** The value of the menu item. */\n readonly value = input.required<V>();\n\n /** Whether the menu item is disabled. */\n readonly disabled = input<boolean>(false);\n\n // TODO(wagnermaciel): Discuss whether all inputs should be models.\n\n /** The search term associated with the menu item. */\n readonly searchTerm = model<string>('');\n\n /** A reference to the parent menu. */\n private readonly _menu = inject<Menu<V>>(Menu, {optional: true});\n\n /** A reference to the parent menu bar. */\n private readonly _menuBar = inject<MenuBar<V>>(MenuBar, {optional: true});\n\n /** A reference to the parent menu or menubar. */\n readonly parent = this._menu ?? this._menuBar;\n\n /** The submenu associated with the menu item. */\n readonly submenu = input<Menu<V> | undefined>(undefined);\n\n /** Whether the menu item has been focused. */\n readonly hasBeenFocused = signal(false);\n\n /** The menu item ui pattern instance. */\n readonly _pattern: MenuItemPattern<V> = new MenuItemPattern<V>({\n id: this.id,\n value: this.value,\n element: computed(() => this._elementRef.nativeElement),\n disabled: this.disabled,\n searchTerm: this.searchTerm,\n parent: computed(() => this.parent?._pattern),\n submenu: computed(() => this.submenu()?._pattern),\n });\n\n constructor() {\n effect(() => this.submenu()?.parent.set(this));\n }\n\n /** Marks the menu item as having been focused. */\n onFocusIn() {\n this.hasBeenFocused.set(true);\n }\n}\n\n/** Defers the rendering of the menu content. */\n@Directive({\n selector: 'ng-template[ngMenuContent]',\n exportAs: 'ngMenuContent',\n hostDirectives: [DeferredContent],\n})\nexport class MenuContent {}\n"],"names":["MenuTrigger","_elementRef","inject","ElementRef","textDirection","Directionality","valueSignal","element","nativeElement","menu","input","undefined","hasBeenFocused","signal","_pattern","MenuTriggerPattern","computed","constructor","effect","parent","set","onFocusIn","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","host","listeners","properties","classAttribute","exportAs","ngImport","decorators","args","Menu","_deferredContentAware","DeferredContentAware","optional","_allItems","contentChildren","MenuItem","descendants","_items","filter","i","ngDevMode","debugName","id","_IdGenerator","getId","wrap","typeaheadDelay","items","map","isVisible","onSelect","output","MenuPattern","multi","softDisabled","focusMode","orientation","selectionMode","activeItem","value","emit","afterRenderEffect","MenuBar","contentVisible","untracked","listBehavior","goto","setDefaultState","close","opts","closeAll","root","MenuBarPattern","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","hostDirectives","directive","i1","model","required","disabled","searchTerm","_menu","_menuBar","submenu","MenuItemPattern","outputs","attributes","MenuContent","DeferredContent"],"mappings":";;;;;;;MAwDaA,WAAW,CAAA;AAELC,EAAAA,WAAW,GAAGC,MAAM,CAACC,UAAU,CAAC;AAGxCC,EAAAA,aAAa,GAAGF,MAAM,CAACG,cAAc,CAAC,CAACC,WAAW;AAGlDC,EAAAA,OAAO,GAAsB,IAAI,CAACN,WAAW,CAACO,aAAa;EAGpEC,IAAI,GAAGC,KAAK,CAAsBC,SAAS;;WAAC;EAGnCC,cAAc,GAAGC,MAAM,CAAC,KAAK;;WAAC;EAGvCC,QAAQ,GAA0B,IAAIC,kBAAkB,CAAC;IACvDX,aAAa,EAAE,IAAI,CAACA,aAAa;IACjCG,OAAO,EAAES,QAAQ,CAAC,MAAM,IAAI,CAACf,WAAW,CAACO,aAAa,CAAC;IACvDC,IAAI,EAAEO,QAAQ,CAAC,MAAM,IAAI,CAACP,IAAI,EAAE,EAAEK,QAAQ;AAC3C,G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1B,QAAA,iBAAiB,EAAE,qBAAqB;AACxC,QAAA,oBAAoB,EAAE,qBAAqB;AAC3C,QAAA,sBAAsB,EAAE,qBAAqB;AAC7C,QAAA,sBAAsB,EAAE,qBAAqB;AAC7C,QAAA,sBAAsB,EAAE,qBAAqB;AAC7C,QAAA,sBAAsB,EAAE;AACzB;KACF;;;;MAgEYsE,WAAW,CAAA;;;;;UAAXA,WAAW;AAAAnF,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;;;;UAAX+E,WAAW;AAAA9E,IAAAA,YAAA,EAAA,IAAA;AAAAC,IAAAA,QAAA,EAAA,4BAAA;IAAAW,QAAA,EAAA,CAAA,eAAA,CAAA;AAAAqD,IAAAA,cAAA,EAAA,CAAA;MAAAC,SAAA,EAAAC,EAAA,CAAAY;AAAA,KAAA,CAAA;AAAAlE,IAAAA,QAAA,EAAAhB;AAAA,GAAA,CAAA;;;;;;QAAXiF,WAAW;AAAAhE,EAAAA,UAAA,EAAA,CAAA;UALvBf,SAAS;AAACgB,IAAAA,IAAA,EAAA,CAAA;AACTd,MAAAA,QAAQ,EAAE,4BAA4B;AACtCW,MAAAA,QAAQ,EAAE,eAAe;MACzBqD,cAAc,EAAE,CAACc,eAAe;KACjC;;;;;;"}
1
+ {"version":3,"file":"menu.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/menu/menu.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n Signal,\n signal,\n untracked,\n} from '@angular/core';\nimport {\n SignalLike,\n MenuBarPattern,\n MenuItemPattern,\n MenuPattern,\n MenuTriggerPattern,\n DeferredContent,\n DeferredContentAware,\n} from '@angular/aria/private';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\n\n/**\n * A trigger for a menu.\n *\n * The `ngMenuTrigger` directive is used to open and close menus. It can be applied to\n * any interactive element (e.g., a button) to associate it with a `ngMenu` instance.\n * It also supports linking to sub-menus when applied to a `ngMenuItem`.\n *\n * ```html\n * <button ngMenuTrigger [menu]=\"myMenu\">Open Menu</button>\n *\n * <div ngMenu #myMenu=\"ngMenu\">\n * <div ngMenuItem>Item 1</div>\n * <div ngMenuItem>Item 2</div>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: 'button[ngMenuTrigger]',\n exportAs: 'ngMenuTrigger',\n host: {\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.disabled]': '!softDisabled() && _pattern.disabled() ? true : null',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-haspopup]': 'hasPopup()',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-controls]': '_pattern.menu()?.id()',\n '(click)': '_pattern.onClick()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n})\nexport class MenuTrigger<V> {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The menu associated with the trigger. */\n menu = input<Menu<V> | undefined>(undefined);\n\n /** Whether the menu is expanded. */\n readonly expanded = computed(() => this._pattern.expanded());\n\n /** Whether the menu trigger has a popup. */\n readonly hasPopup = computed(() => this._pattern.hasPopup());\n\n /** Whether the menu trigger is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the menu trigger is soft disabled. */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** The menu trigger ui pattern instance. */\n _pattern: MenuTriggerPattern<V> = new MenuTriggerPattern({\n textDirection: this.textDirection,\n element: computed(() => this._elementRef.nativeElement),\n menu: computed(() => this.menu()?._pattern),\n disabled: () => this.disabled(),\n });\n\n constructor() {\n effect(() => this.menu()?.parent.set(this));\n }\n\n /** Opens the menu focusing on the first menu item. */\n open() {\n this._pattern.open({first: true});\n }\n\n /** Closes the menu. */\n close() {\n this._pattern.close();\n }\n}\n\n/**\n * A list of menu items.\n *\n * A `ngMenu` is used to offer a list of menu item choices to users. Menus can be nested\n * within other menus to create sub-menus. It works in conjunction with `ngMenuTrigger`\n * and `ngMenuItem` directives.\n *\n * ```html\n * <button ngMenuTrigger [menu]=\"myMenu\">Options</button>\n *\n * <div ngMenu #myMenu=\"ngMenu\">\n * <div ngMenuItem>Star</div>\n * <div ngMenuItem>Edit</div>\n * <div ngMenuItem [submenu]=\"subMenu\">More</div>\n * </div>\n *\n * <div ngMenu #subMenu=\"ngMenu\">\n * <div ngMenuItem>Sub Item 1</div>\n * <div ngMenuItem>Sub Item 2</div>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngMenu]',\n exportAs: 'ngMenu',\n host: {\n 'role': 'menu',\n '[attr.id]': '_pattern.id()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.tabindex]': 'tabIndex()',\n '[attr.data-visible]': 'visible()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(mouseout)': '_pattern.onMouseOut($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(click)': '_pattern.onClick($event)',\n },\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n})\nexport class Menu<V> {\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware, {optional: true});\n\n /** The menu items contained in the menu. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n /** The menu items that are direct children of this menu. */\n readonly _items: Signal<MenuItem<V>[]> = computed(() =>\n this._allItems().filter(i => i.parent === this),\n );\n\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The unique ID of the menu. */\n readonly id = input(inject(_IdGenerator).getId('ng-menu-', true));\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The delay in milliseconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(500); // Picked arbitrarily.\n\n /** Whether the menu is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** A reference to the parent menu item or menu trigger. */\n readonly parent = signal<MenuTrigger<V> | MenuItem<V> | undefined>(undefined);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuPattern<V>;\n\n /**\n * The menu items as a writable signal.\n *\n * TODO(wagnermaciel): This would normally be a computed, but using a computed causes a bug where\n * sometimes the items array is empty. The bug can be reproduced by switching this to use a\n * computed and then quickly opening and closing menus in the dev app.\n */\n readonly items = () => this._items().map(i => i._pattern);\n\n /** Whether the menu is visible. */\n readonly visible = computed(() => this._pattern.visible());\n\n /** The tab index of the menu. */\n readonly tabIndex = computed(() => this._pattern.tabIndex());\n\n /** A callback function triggered when a menu item is selected. */\n onSelect = output<V>();\n\n /** The delay in milliseconds before expanding sub-menus on hover. */\n readonly expansionDelay = input<number>(100); // Arbitrarily chosen.\n\n constructor() {\n this._pattern = new MenuPattern({\n ...this,\n parent: computed(() => this.parent()?._pattern),\n multi: () => false,\n softDisabled: () => true,\n focusMode: () => 'roving',\n orientation: () => 'vertical',\n selectionMode: () => 'explicit',\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n onSelect: (value: V) => this.onSelect.emit(value),\n });\n\n afterRenderEffect(() => {\n const parent = this.parent();\n if (parent instanceof MenuItem && parent.parent instanceof MenuBar) {\n this._deferredContentAware?.contentVisible.set(true);\n } else {\n this._deferredContentAware?.contentVisible.set(\n this._pattern.visible() || !!this.parent()?._pattern.hasBeenFocused(),\n );\n }\n });\n\n // TODO(wagnermaciel): This is a redundancy needed for if the user uses display: none to hide\n // submenus. In those cases, the ui pattern is calling focus() before the ui has a chance to\n // update the display property. The result is focus() being called on an element that is not\n // focusable. This simply retries focusing the element after render.\n afterRenderEffect(() => {\n if (this._pattern.visible()) {\n const activeItem = untracked(() => this._pattern.inputs.activeItem());\n this._pattern.listBehavior.goto(activeItem!);\n }\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused() && this._items().length) {\n untracked(() => this._pattern.setDefaultState());\n }\n });\n }\n\n /** Closes the menu. */\n close() {\n this._pattern.close();\n }\n}\n\n/**\n * A menu bar of menu items.\n *\n * Like the `ngMenu`, a `ngMenuBar` is used to offer a list of menu item choices to users.\n * However, a menubar is used to display a persistent, top-level, always-visible set of\n * menu item choices, typically found at the top of an application window.\n *\n * ```html\n * <div ngMenuBar>\n * <button ngMenuTrigger [menu]=\"fileMenu\">File</button>\n * <button ngMenuTrigger [menu]=\"editMenu\">Edit</button>\n * </div>\n *\n * <div ngMenu #fileMenu=\"ngMenu\">\n * <div ngMenuItem>New</div>\n * <div ngMenuItem>Open</div>\n * </div>\n *\n * <div ngMenu #editMenu=\"ngMenu\">\n * <div ngMenuItem>Cut</div>\n * <div ngMenuItem>Copy</div>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngMenuBar]',\n exportAs: 'ngMenuBar',\n host: {\n 'role': 'menubar',\n '[attr.disabled]': '!softDisabled() && _pattern.disabled() ? true : null',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class MenuBar<V> {\n /** The menu items contained in the menubar. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n readonly _items: SignalLike<MenuItem<V>[]> = () =>\n this._allItems().filter(i => i.parent === this);\n\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** Whether the menubar is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the menubar is soft disabled. */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The values of the currently selected menu items. */\n readonly values = model<V[]>([]);\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The delay in milliseconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(500);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuBarPattern<V>;\n\n /** The menu items as a writable signal. */\n readonly items = signal<MenuItemPattern<V>[]>([]);\n\n /** A callback function triggered when a menu item is selected. */\n onSelect = output<V>();\n\n constructor() {\n this._pattern = new MenuBarPattern({\n ...this,\n multi: () => false,\n softDisabled: () => true,\n focusMode: () => 'roving',\n orientation: () => 'horizontal',\n selectionMode: () => 'explicit',\n onSelect: (value: V) => this.onSelect.emit(value),\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n });\n\n afterRenderEffect(() => {\n this.items.set(this._items().map(i => i._pattern));\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused()) {\n this._pattern.setDefaultState();\n }\n });\n }\n\n /** Closes the menubar. */\n close() {\n this._pattern.close();\n }\n}\n\n/**\n * An item in a Menu.\n *\n * `ngMenuItem` directives can be used in `ngMenu` and `ngMenuBar` to represent a choice\n * or action a user can take. They can also act as triggers for sub-menus.\n *\n * ```html\n * <div ngMenuItem (onSelect)=\"doAction()\">Action Item</div>\n *\n * <div ngMenuItem [submenu]=\"anotherMenu\">Submenu Trigger</div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngMenuItem]',\n exportAs: 'ngMenuItem',\n host: {\n 'role': 'menuitem',\n '(focusin)': '_pattern.onFocusIn()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.data-active]': 'active()',\n '[attr.aria-haspopup]': 'hasPopup()',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-controls]': '_pattern.submenu()?.id()',\n },\n})\nexport class MenuItem<V> {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The unique ID of the menu item. */\n readonly id = input(inject(_IdGenerator).getId('ng-menu-item-', true));\n\n /** The value of the menu item. */\n readonly value = input.required<V>();\n\n /** Whether the menu item is disabled. */\n readonly disabled = input<boolean>(false);\n\n // TODO(wagnermaciel): Discuss whether all inputs should be models.\n\n /** The search term associated with the menu item. */\n readonly searchTerm = model<string>('');\n\n /** A reference to the parent menu. */\n private readonly _menu = inject<Menu<V>>(Menu, {optional: true});\n\n /** A reference to the parent menu bar. */\n private readonly _menuBar = inject<MenuBar<V>>(MenuBar, {optional: true});\n\n /** A reference to the parent menu or menubar. */\n readonly parent = this._menu ?? this._menuBar;\n\n /** The submenu associated with the menu item. */\n readonly submenu = input<Menu<V> | undefined>(undefined);\n\n /** Whether the menu item is active. */\n readonly active = computed(() => this._pattern.active());\n\n /** Whether the menu is expanded. */\n readonly expanded = computed(() => this._pattern.expanded());\n\n /** Whether the menu item has a popup. */\n readonly hasPopup = computed(() => this._pattern.hasPopup());\n\n /** The menu item ui pattern instance. */\n readonly _pattern: MenuItemPattern<V> = new MenuItemPattern<V>({\n id: this.id,\n value: this.value,\n element: computed(() => this._elementRef.nativeElement),\n disabled: this.disabled,\n searchTerm: this.searchTerm,\n parent: computed(() => this.parent?._pattern),\n submenu: computed(() => this.submenu()?._pattern),\n });\n\n constructor() {\n effect(() => this.submenu()?.parent.set(this));\n }\n\n /** Opens the submenu focusing on the first menu item. */\n open() {\n this._pattern.open({first: true});\n }\n\n /** Closes the submenu. */\n close() {\n this._pattern.close();\n }\n}\n\n/**\n * Defers the rendering of the menu content.\n *\n * This structural directive should be applied to an `ng-template` within a `ngMenu`\n * or `ngMenuBar` to lazily render its content only when the menu is opened.\n *\n * ```html\n * <div ngMenu #myMenu=\"ngMenu\">\n * <ng-template ngMenuContent>\n * <div ngMenuItem>Lazy Item 1</div>\n * <div ngMenuItem>Lazy Item 2</div>\n * </ng-template>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: 'ng-template[ngMenuContent]',\n exportAs: 'ngMenuContent',\n hostDirectives: [DeferredContent],\n})\nexport class MenuContent {}\n"],"names":["MenuTrigger","_elementRef","inject","ElementRef","element","nativeElement","textDirection","Directionality","valueSignal","menu","input","undefined","expanded","computed","_pattern","hasPopup","disabled","transform","booleanAttribute","softDisabled","MenuTriggerPattern","constructor","effect","parent","set","open","first","close","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","host","listeners","properties","exportAs","ngImport","decorators","args","Menu","_deferredContentAware","DeferredContentAware","optional","_allItems","contentChildren","MenuItem","descendants","_items","filter","i","ngDevMode","debugName","id","_IdGenerator","getId","wrap","typeaheadDelay","signal","items","map","visible","tabIndex","onSelect","output","expansionDelay","MenuPattern","multi","focusMode","orientation","selectionMode","activeItem","value","emit","afterRenderEffect","MenuBar","contentVisible","hasBeenFocused","untracked","listBehavior","goto","length","setDefaultState","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","hostDirectives","directive","i1","values","model","MenuBarPattern","required","searchT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