@angular/aria 22.2.0-next.2 → 22.2.0-next.4

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.
@@ -1,13 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, computed, input, booleanAttribute, model, signal, afterRenderEffect, afterNextRender, Directive, InjectionToken, contentChildren } from '@angular/core';
2
+ import { inject, ElementRef, computed, input, booleanAttribute, signal, afterRenderEffect, afterNextRender, Directive, InjectionToken, contentChildren } from '@angular/core';
3
3
  import { Directionality } from '@angular/cdk/bidi';
4
4
  import { ToolbarPattern, ToolbarWidgetPattern, ToolbarWidgetGroupPattern } from './_toolbar-widget-group-chunk.mjs';
5
5
  import { SortedCollection, reportViolations } from './_violations-chunk.mjs';
6
6
  import { _IdGenerator } from '@angular/cdk/a11y';
7
7
  import '@angular/cdk/platform';
8
- import './_list-chunk.mjs';
9
8
  import './_list-navigation-chunk.mjs';
10
- import './_list-typeahead-chunk.mjs';
11
9
  import '@angular/core/primitives/signals';
12
10
 
13
11
  class Toolbar {
@@ -39,29 +37,18 @@ class Toolbar {
39
37
  } : {}),
40
38
  transform: booleanAttribute
41
39
  });
42
- value = model([], ...(ngDevMode ? [{
43
- debugName: "value"
44
- }] : []));
45
40
  _pattern = new ToolbarPattern({
46
41
  ...this,
47
42
  items: this._itemPatterns,
48
43
  activeItem: signal(undefined),
49
44
  textDirection: this.textDirection,
50
45
  element: () => this._elementRef.nativeElement,
51
- getItem: e => this._getItem(e),
52
- value: this.value
46
+ getItem: e => this._getItem(e)
53
47
  });
54
48
  constructor() {
55
49
  afterRenderEffect({
56
50
  write: () => this._pattern.setDefaultStateEffect()
57
51
  });
58
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
59
- afterRenderEffect({
60
- read: () => {
61
- reportViolations(this._pattern.validate(), this.element);
62
- }
63
- });
64
- }
65
52
  afterNextRender(() => {
66
53
  this._collection.startObserving(this.element);
67
54
  });
@@ -74,7 +61,7 @@ class Toolbar {
74
61
  }
75
62
  static ɵfac = i0.ɵɵngDeclareFactory({
76
63
  minVersion: "12.0.0",
77
- version: "22.2.0-next.2",
64
+ version: "22.2.0-next.4",
78
65
  ngImport: i0,
79
66
  type: Toolbar,
80
67
  deps: [],
@@ -82,7 +69,7 @@ class Toolbar {
82
69
  });
83
70
  static ɵdir = i0.ɵɵngDeclareDirective({
84
71
  minVersion: "17.1.0",
85
- version: "22.2.0-next.2",
72
+ version: "22.2.0-next.4",
86
73
  type: Toolbar,
87
74
  isStandalone: true,
88
75
  selector: "[ngToolbar]",
@@ -114,18 +101,8 @@ class Toolbar {
114
101
  isSignal: true,
115
102
  isRequired: false,
116
103
  transformFunction: null
117
- },
118
- value: {
119
- classPropertyName: "value",
120
- publicName: "value",
121
- isSignal: true,
122
- isRequired: false,
123
- transformFunction: null
124
104
  }
125
105
  },
126
- outputs: {
127
- value: "valueChange"
128
- },
129
106
  host: {
130
107
  attributes: {
131
108
  "role": "toolbar"
@@ -148,7 +125,7 @@ class Toolbar {
148
125
  }
149
126
  i0.ɵɵngDeclareClassMetadata({
150
127
  minVersion: "12.0.0",
151
- version: "22.2.0-next.2",
128
+ version: "22.2.0-next.4",
152
129
  ngImport: i0,
153
130
  type: Toolbar,
154
131
  decorators: [{
@@ -201,17 +178,6 @@ i0.ɵɵngDeclareClassMetadata({
201
178
  alias: "wrap",
202
179
  required: false
203
180
  }]
204
- }],
205
- value: [{
206
- type: i0.Input,
207
- args: [{
208
- isSignal: true,
209
- alias: "value",
210
- required: false
211
- }]
212
- }, {
213
- type: i0.Output,
214
- args: ["valueChange"]
215
181
  }]
216
182
  }
217
183
  });
@@ -240,20 +206,15 @@ class ToolbarWidget {
240
206
  _group = inject(TOOLBAR_WIDGET_GROUP, {
241
207
  optional: true
242
208
  });
243
- value = input.required(...(ngDevMode ? [{
244
- debugName: "value"
245
- }] : []));
246
209
  active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
247
210
  debugName: "active"
248
211
  }] : []));
249
- selected = () => this._pattern.selected();
250
212
  _groupPattern = () => this._group?._pattern;
251
213
  _pattern = new ToolbarWidgetPattern({
252
214
  ...this,
253
215
  group: this._groupPattern,
254
216
  toolbar: this._toolbarPattern,
255
217
  id: this.id,
256
- value: this.value,
257
218
  element: () => this.element
258
219
  });
259
220
  ngOnInit() {
@@ -264,7 +225,7 @@ class ToolbarWidget {
264
225
  }
265
226
  static ɵfac = i0.ɵɵngDeclareFactory({
266
227
  minVersion: "12.0.0",
267
- version: "22.2.0-next.2",
228
+ version: "22.2.0-next.4",
268
229
  ngImport: i0,
269
230
  type: ToolbarWidget,
270
231
  deps: [],
@@ -272,7 +233,7 @@ class ToolbarWidget {
272
233
  });
273
234
  static ɵdir = i0.ɵɵngDeclareDirective({
274
235
  minVersion: "17.1.0",
275
- version: "22.2.0-next.2",
236
+ version: "22.2.0-next.4",
276
237
  type: ToolbarWidget,
277
238
  isStandalone: true,
278
239
  selector: "[ngToolbarWidget]",
@@ -290,13 +251,6 @@ class ToolbarWidget {
290
251
  isSignal: true,
291
252
  isRequired: false,
292
253
  transformFunction: null
293
- },
294
- value: {
295
- classPropertyName: "value",
296
- publicName: "value",
297
- isSignal: true,
298
- isRequired: true,
299
- transformFunction: null
300
254
  }
301
255
  },
302
256
  host: {
@@ -318,7 +272,7 @@ class ToolbarWidget {
318
272
  }
319
273
  i0.ɵɵngDeclareClassMetadata({
320
274
  minVersion: "12.0.0",
321
- version: "22.2.0-next.2",
275
+ version: "22.2.0-next.4",
322
276
  ngImport: i0,
323
277
  type: ToolbarWidget,
324
278
  decorators: [{
@@ -353,14 +307,6 @@ i0.ɵɵngDeclareClassMetadata({
353
307
  alias: "disabled",
354
308
  required: false
355
309
  }]
356
- }],
357
- value: [{
358
- type: i0.Input,
359
- args: [{
360
- isSignal: true,
361
- alias: "value",
362
- required: true
363
- }]
364
310
  }]
365
311
  }
366
312
  });
@@ -387,12 +333,6 @@ class ToolbarWidgetGroup {
387
333
  transform: booleanAttribute
388
334
  });
389
335
  _itemPatterns = () => this._widgets().map(w => w._pattern);
390
- multi = input(false, {
391
- ...(ngDevMode ? {
392
- debugName: "multi"
393
- } : {}),
394
- transform: booleanAttribute
395
- });
396
336
  _pattern = new ToolbarWidgetGroupPattern({
397
337
  ...this,
398
338
  items: this._itemPatterns,
@@ -413,7 +353,7 @@ class ToolbarWidgetGroup {
413
353
  }
414
354
  static ɵfac = i0.ɵɵngDeclareFactory({
415
355
  minVersion: "12.0.0",
416
- version: "22.2.0-next.2",
356
+ version: "22.2.0-next.4",
417
357
  ngImport: i0,
418
358
  type: ToolbarWidgetGroup,
419
359
  deps: [],
@@ -421,7 +361,7 @@ class ToolbarWidgetGroup {
421
361
  });
422
362
  static ɵdir = i0.ɵɵngDeclareDirective({
423
363
  minVersion: "17.2.0",
424
- version: "22.2.0-next.2",
364
+ version: "22.2.0-next.4",
425
365
  type: ToolbarWidgetGroup,
426
366
  isStandalone: true,
427
367
  selector: "[ngToolbarWidgetGroup]",
@@ -432,13 +372,6 @@ class ToolbarWidgetGroup {
432
372
  isSignal: true,
433
373
  isRequired: false,
434
374
  transformFunction: null
435
- },
436
- multi: {
437
- classPropertyName: "multi",
438
- publicName: "multi",
439
- isSignal: true,
440
- isRequired: false,
441
- transformFunction: null
442
375
  }
443
376
  },
444
377
  providers: [{
@@ -457,7 +390,7 @@ class ToolbarWidgetGroup {
457
390
  }
458
391
  i0.ɵɵngDeclareClassMetadata({
459
392
  minVersion: "12.0.0",
460
- version: "22.2.0-next.2",
393
+ version: "22.2.0-next.4",
461
394
  ngImport: i0,
462
395
  type: ToolbarWidgetGroup,
463
396
  decorators: [{
@@ -489,14 +422,6 @@ i0.ɵɵngDeclareClassMetadata({
489
422
  alias: "disabled",
490
423
  required: false
491
424
  }]
492
- }],
493
- multi: [{
494
- type: i0.Input,
495
- args: [{
496
- isSignal: true,
497
- alias: "multi",
498
- required: false
499
- }]
500
425
  }]
501
426
  }
502
427
  });
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-widget.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-widget-group.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 afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n signal,\n} from '@angular/core';\nimport {ToolbarPattern, ToolbarWidgetPattern, SortedCollection, reportViolations} from '../private';\nimport {Directionality} from '@angular/cdk/bidi';\nimport type {ToolbarWidget} from './toolbar-widget';\n\n/**\n * A toolbar widget container for a group of interactive widgets, such as\n * buttons or radio groups. It provides a single point of reference for keyboard navigation\n * and focus management. It supports various orientations and disabled states.\n *\n * ```html\n * <div ngToolbar orientation=\"horizontal\" [wrap]=\"true\">\n * <button ngToolbarWidget value=\"save\">Save</button>\n * <button ngToolbarWidget value=\"print\">Print</button>\n *\n * <div ngToolbarWidgetGroup [(value)]=\"selectedAlignment\">\n * <button ngToolbarWidget value=\"left\">Left</button>\n * <button ngToolbarWidget value=\"center\">Center</button>\n * <button ngToolbarWidget value=\"right\">Right</button>\n * </div>\n * </div>\n * ```\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbar]',\n exportAs: 'ngToolbar',\n host: {\n 'role': 'toolbar',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-orientation]': '_pattern.orientation()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n})\nexport class Toolbar<V> implements OnDestroy {\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 collection of widgets in the toolbar. */\n readonly _collection = new SortedCollection<ToolbarWidget<V>>();\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Sorted UIPatterns of the child widgets */\n readonly _itemPatterns = computed<ToolbarWidgetPattern<V>[]>(() =>\n this._collection.orderedItems().map(widget => widget._pattern),\n );\n\n /** Whether the toolbar is vertically or horizontally oriented. */\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** Whether the toolbar is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The values of the selected widgets within the toolbar. */\n readonly value = model<V[]>([]);\n\n /** The toolbar UIPattern. */\n readonly _pattern: ToolbarPattern<V> = new ToolbarPattern<V>({\n ...this,\n items: this._itemPatterns,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n element: () => this._elementRef.nativeElement,\n getItem: e => this._getItem(e),\n value: this.value,\n });\n\n constructor() {\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n /** Finds the toolbar item associated with a given element. */\n private _getItem(element: Element) {\n return this._itemPatterns().find(item => item.element()?.contains(element));\n }\n}\n","/**\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 {InjectionToken} from '@angular/core';\nimport type {ToolbarWidgetGroup} from './toolbar-widget-group';\n\n/** Token used to provide the `ToolbarWidgetGroup` directive. */\nexport const TOOLBAR_WIDGET_GROUP = new InjectionToken<ToolbarWidgetGroup<unknown>>(\n 'TOOLBAR_WIDGET_GROUP',\n);\n","/**\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 Directive,\n ElementRef,\n inject,\n computed,\n input,\n booleanAttribute,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {\n ToolbarWidgetPattern,\n ToolbarWidgetGroupPattern,\n SignalLike,\n ToolbarPattern,\n} from '../private';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Toolbar} from './toolbar';\nimport {TOOLBAR_WIDGET_GROUP} from './toolbar-tokens';\nimport type {ToolbarWidgetGroup} from './toolbar-widget-group';\n\n/**\n * A widget within a toolbar.\n *\n * The `ngToolbarWidget` directive should be applied to any native HTML element that acts\n * as an interactive widget within an `ngToolbar` or `ngToolbarWidgetGroup`. It enables\n * keyboard navigation and selection within the toolbar.\n *\n * ```html\n * <button ngToolbarWidget value=\"action-id\" [disabled]=\"isDisabled\">\n * Perform Action\n * </button>\n * ```\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbarWidget]',\n exportAs: 'ngToolbarWidget',\n host: {\n // Ensure the attribute is applied even when used as a host directive.\n 'ngToolbarWidget': '',\n '[attr.data-active]': 'active()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.inert]': 'hardDisabled() ? true : null',\n '[attr.disabled]': 'hardDisabled() ? true : null',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[id]': '_pattern.id()',\n },\n})\nexport class ToolbarWidget<V> implements OnInit, OnDestroy {\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 parent Toolbar. */\n private readonly _toolbar = inject<Toolbar<V>>(Toolbar);\n\n /** A unique identifier for the widget. */\n readonly id = input(inject(_IdGenerator).getId('ng-toolbar-widget-', true));\n\n /** The parent Toolbar UIPattern. */\n readonly _toolbarPattern = computed<ToolbarPattern<V>>(() => this._toolbar._pattern);\n\n /** Whether the widget is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the widget is 'hard' disabled, which is different from `aria-disabled`. A hard disabled widget cannot receive focus. */\n readonly hardDisabled = computed(() => this._pattern.disabled() && !this._toolbar.softDisabled());\n\n /** The optional ToolbarWidgetGroup this widget belongs to. */\n readonly _group = inject<ToolbarWidgetGroup<V>>(TOOLBAR_WIDGET_GROUP, {optional: true});\n\n /** The value associated with the widget. */\n readonly value = input.required<V>();\n\n /** Whether the widget is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** Whether the widget is selected (only relevant in a selection group). */\n readonly selected = () => this._pattern.selected();\n\n private readonly _groupPattern: SignalLike<\n ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined\n > = () => this._group?._pattern;\n\n /** The ToolbarWidget UIPattern. */\n readonly _pattern = new ToolbarWidgetPattern<V>({\n ...this,\n group: this._groupPattern,\n toolbar: this._toolbarPattern,\n id: this.id,\n value: this.value,\n element: () => this.element,\n });\n\n ngOnInit() {\n this._toolbar._collection.register(this);\n }\n\n ngOnDestroy() {\n this._toolbar._collection.unregister(this);\n }\n}\n","/**\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 Directive,\n ElementRef,\n inject,\n computed,\n input,\n booleanAttribute,\n contentChildren,\n afterRenderEffect,\n} from '@angular/core';\nimport {ToolbarWidgetPattern, ToolbarWidgetGroupPattern, reportViolations} from '../private';\nimport {Toolbar} from './toolbar';\nimport {ToolbarWidget} from './toolbar-widget';\nimport {TOOLBAR_WIDGET_GROUP} from './toolbar-tokens';\n\n/**\n * A directive that groups toolbar widgets, used for more complex widgets like radio groups\n * that have their own internal navigation.\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbarWidgetGroup]',\n exportAs: 'ngToolbarWidgetGroup',\n providers: [{provide: TOOLBAR_WIDGET_GROUP, useExisting: ToolbarWidgetGroup}],\n})\nexport class ToolbarWidgetGroup<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 parent Toolbar. */\n private readonly _toolbar = inject<Toolbar<V>>(Toolbar, {optional: true});\n\n /** The list of child widgets within the group. */\n private readonly _widgets = contentChildren(ToolbarWidget, {descendants: true});\n\n /** The parent Toolbar UIPattern. */\n private readonly _toolbarPattern = computed(() => this._toolbar?._pattern);\n\n /** Whether the widget group is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The list of toolbar items within the group. */\n private readonly _itemPatterns = () => this._widgets().map(w => w._pattern);\n\n /** Whether the group allows multiple widgets to be selected. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** The ToolbarWidgetGroup UIPattern. */\n readonly _pattern = new ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V>({\n ...this,\n items: this._itemPatterns,\n toolbar: this._toolbarPattern,\n });\n\n constructor() {\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n const violations: string[] = [];\n if (!this._toolbar) {\n violations.push('ngToolbarWidgetGroup must be placed inside an ngToolbar container.');\n }\n reportViolations(violations, this.element);\n },\n });\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MA2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AAA,EAAA,CAAA,KAAA;AAAA,MAAA,IAAA,EAAA,CAAA;AAAA,QAAA,QAAA,EAAA,IAAA;AAAA,QAAA,KAAA,EAAA,UAAA;AAAA,QAAA,QAAA,EAAA;OAAA;AAAA,KAAA,CAAA;AAAA,IAAA,KAAA,EAAA,CAAA;MAAA,IAAA,EAAA,EAAA,CAAA,KAAA;AAAA,MAAA,IAAA,EAAA,CAAA;AAAA,QAAA,QAAA,EAAA,IAAA;AAAA,QAAA,KAAA,EAAA,OAAA;AAAA,QAAA,QAAA,EAAA;OAAA;KAAA;AAAA;AAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"toolbar.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-widget.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-widget-group.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 afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n signal,\n} from '@angular/core';\nimport {ToolbarPattern, ToolbarWidgetPattern, SortedCollection} from '../private';\nimport {Directionality} from '@angular/cdk/bidi';\nimport type {ToolbarWidget} from './toolbar-widget';\n\n/**\n * A toolbar widget container for a group of interactive widgets, such as\n * buttons or radio groups. It provides a single point of reference for keyboard navigation\n * and focus management. It supports various orientations and disabled states.\n *\n * ```html\n * <div ngToolbar orientation=\"horizontal\" [wrap]=\"true\">\n * <button ngToolbarWidget>Save</button>\n * <button ngToolbarWidget>Print</button>\n *\n * <div ngToolbarWidgetGroup>\n * <button ngToolbarWidget>Left</button>\n * <button ngToolbarWidget>Center</button>\n * <button ngToolbarWidget>Right</button>\n * </div>\n * </div>\n * ```\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbar]',\n exportAs: 'ngToolbar',\n host: {\n 'role': 'toolbar',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-orientation]': '_pattern.orientation()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n})\nexport class Toolbar implements OnDestroy {\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 collection of widgets in the toolbar. */\n readonly _collection = new SortedCollection<ToolbarWidget>();\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Sorted UIPatterns of the child widgets */\n readonly _itemPatterns = computed<ToolbarWidgetPattern[]>(() =>\n this._collection.orderedItems().map(widget => widget._pattern),\n );\n\n /** Whether the toolbar is vertically or horizontally oriented. */\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** Whether the toolbar is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The toolbar UIPattern. */\n readonly _pattern: ToolbarPattern = new ToolbarPattern({\n ...this,\n items: this._itemPatterns,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n element: () => this._elementRef.nativeElement,\n getItem: e => this._getItem(e),\n });\n\n constructor() {\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n /** Finds the toolbar item associated with a given element. */\n private _getItem(element: Element) {\n return this._itemPatterns().find(item => item.element()?.contains(element));\n }\n}\n","/**\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 {InjectionToken} from '@angular/core';\nimport type {ToolbarWidgetGroup} from './toolbar-widget-group';\n\n/** Token used to provide the `ToolbarWidgetGroup` directive. */\nexport const TOOLBAR_WIDGET_GROUP = new InjectionToken<ToolbarWidgetGroup>('TOOLBAR_WIDGET_GROUP');\n","/**\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 Directive,\n ElementRef,\n inject,\n computed,\n input,\n booleanAttribute,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {\n ToolbarWidgetPattern,\n ToolbarWidgetGroupPattern,\n SignalLike,\n ToolbarPattern,\n} from '../private';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Toolbar} from './toolbar';\nimport {TOOLBAR_WIDGET_GROUP} from './toolbar-tokens';\nimport type {ToolbarWidgetGroup} from './toolbar-widget-group';\n\n/**\n * A widget within a toolbar.\n *\n * The `ngToolbarWidget` directive should be applied to any native HTML element that acts\n * as an interactive widget within an `ngToolbar` or `ngToolbarWidgetGroup`. It enables\n * keyboard navigation within the toolbar.\n *\n * ```html\n * <button ngToolbarWidget [disabled]=\"isDisabled\">\n * Perform Action\n * </button>\n * ```\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbarWidget]',\n exportAs: 'ngToolbarWidget',\n host: {\n // Ensure the attribute is applied even when used as a host directive.\n 'ngToolbarWidget': '',\n '[attr.data-active]': 'active()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.inert]': 'hardDisabled() ? true : null',\n '[attr.disabled]': 'hardDisabled() ? true : null',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[id]': '_pattern.id()',\n },\n})\nexport class ToolbarWidget implements OnInit, OnDestroy {\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 parent Toolbar. */\n private readonly _toolbar = inject<Toolbar>(Toolbar);\n\n /** A unique identifier for the widget. */\n readonly id = input(inject(_IdGenerator).getId('ng-toolbar-widget-', true));\n\n /** The parent Toolbar UIPattern. */\n readonly _toolbarPattern = computed<ToolbarPattern>(() => this._toolbar._pattern);\n\n /** Whether the widget is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the widget is 'hard' disabled, which is different from `aria-disabled`. A hard disabled widget cannot receive focus. */\n readonly hardDisabled = computed(() => this._pattern.disabled() && !this._toolbar.softDisabled());\n\n /** The optional ToolbarWidgetGroup this widget belongs to. */\n readonly _group = inject<ToolbarWidgetGroup>(TOOLBAR_WIDGET_GROUP, {optional: true});\n\n /** Whether the widget is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n private readonly _groupPattern: SignalLike<ToolbarWidgetGroupPattern | undefined> = () =>\n this._group?._pattern;\n\n /** The ToolbarWidget UIPattern. */\n readonly _pattern = new ToolbarWidgetPattern({\n ...this,\n group: this._groupPattern,\n toolbar: this._toolbarPattern,\n id: this.id,\n element: () => this.element,\n });\n\n ngOnInit() {\n this._toolbar._collection.register(this);\n }\n\n ngOnDestroy() {\n this._toolbar._collection.unregister(this);\n }\n}\n","/**\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 Directive,\n ElementRef,\n inject,\n computed,\n input,\n booleanAttribute,\n contentChildren,\n afterRenderEffect,\n} from '@angular/core';\nimport {ToolbarWidgetGroupPattern, reportViolations} from '../private';\nimport {Toolbar} from './toolbar';\nimport {ToolbarWidget} from './toolbar-widget';\nimport {TOOLBAR_WIDGET_GROUP} from './toolbar-tokens';\n\n/**\n * A directive that groups toolbar widgets, used for more complex widgets like radio groups\n * that have their own internal navigation.\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbarWidgetGroup]',\n exportAs: 'ngToolbarWidgetGroup',\n providers: [{provide: TOOLBAR_WIDGET_GROUP, useExisting: ToolbarWidgetGroup}],\n})\nexport class ToolbarWidgetGroup {\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 parent Toolbar. */\n private readonly _toolbar = inject<Toolbar>(Toolbar, {optional: true});\n\n /** The list of child widgets within the group. */\n private readonly _widgets = contentChildren<ToolbarWidget>(ToolbarWidget, {descendants: true});\n\n /** The parent Toolbar UIPattern. */\n private readonly _toolbarPattern = computed(() => this._toolbar?._pattern);\n\n /** Whether the widget group is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The list of toolbar items within the group. */\n private readonly _itemPatterns = () => this._widgets().map(w => w._pattern);\n\n /** The ToolbarWidgetGroup UIPattern. */\n readonly _pattern = new ToolbarWidgetGroupPattern({\n ...this,\n items: this._itemPatterns,\n toolbar: this._toolbarPattern,\n });\n\n constructor() {\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n const violations: string[] = [];\n if (!this._toolbar) {\n violations.push('ngToolbarWidgetGroup must be placed inside an ngToolbar container.');\n }\n reportViolations(violations, this.element);\n },\n });\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;MA0Da,OAAO,CAAA;AAED,EAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAGxC,EAAA,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,aAA4B;AAGvD,EAAA,WA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,IAAA;AAAA,QAAA,KAAA,EAAA,UAAA;AAAA,QAAA,QAAA,EAAA;OAAA;KAAA;AAAA;AAAA,CAAA,CAAA;;;;"}
package/fesm2022/tree.mjs CHANGED
@@ -124,7 +124,7 @@ class Tree {
124
124
  }
125
125
  static ɵfac = i0.ɵɵngDeclareFactory({
126
126
  minVersion: "12.0.0",
127
- version: "22.2.0-next.2",
127
+ version: "22.2.0-next.4",
128
128
  ngImport: i0,
129
129
  type: Tree,
130
130
  deps: [],
@@ -132,7 +132,7 @@ class Tree {
132
132
  });
133
133
  static ɵdir = i0.ɵɵngDeclareDirective({
134
134
  minVersion: "17.1.0",
135
- version: "22.2.0-next.2",
135
+ version: "22.2.0-next.4",
136
136
  type: Tree,
137
137
  isStandalone: true,
138
138
  selector: "[ngTree]",
@@ -256,7 +256,7 @@ class Tree {
256
256
  }
257
257
  i0.ɵɵngDeclareClassMetadata({
258
258
  minVersion: "12.0.0",
259
- version: "22.2.0-next.2",
259
+ version: "22.2.0-next.4",
260
260
  ngImport: i0,
261
261
  type: Tree,
262
262
  decorators: [{
@@ -420,7 +420,7 @@ class TreeItemGroup {
420
420
  }
421
421
  static ɵfac = i0.ɵɵngDeclareFactory({
422
422
  minVersion: "12.0.0",
423
- version: "22.2.0-next.2",
423
+ version: "22.2.0-next.4",
424
424
  ngImport: i0,
425
425
  type: TreeItemGroup,
426
426
  deps: [],
@@ -428,7 +428,7 @@ class TreeItemGroup {
428
428
  });
429
429
  static ɵdir = i0.ɵɵngDeclareDirective({
430
430
  minVersion: "17.1.0",
431
- version: "22.2.0-next.2",
431
+ version: "22.2.0-next.4",
432
432
  type: TreeItemGroup,
433
433
  isStandalone: true,
434
434
  selector: "ng-template[ngTreeItemGroup]",
@@ -450,7 +450,7 @@ class TreeItemGroup {
450
450
  }
451
451
  i0.ɵɵngDeclareClassMetadata({
452
452
  minVersion: "12.0.0",
453
- version: "22.2.0-next.2",
453
+ version: "22.2.0-next.4",
454
454
  ngImport: i0,
455
455
  type: TreeItemGroup,
456
456
  decorators: [{
@@ -578,7 +578,7 @@ class TreeItem extends DeferredContentAware {
578
578
  }
579
579
  static ɵfac = i0.ɵɵngDeclareFactory({
580
580
  minVersion: "12.0.0",
581
- version: "22.2.0-next.2",
581
+ version: "22.2.0-next.4",
582
582
  ngImport: i0,
583
583
  type: TreeItem,
584
584
  deps: [],
@@ -586,7 +586,7 @@ class TreeItem extends DeferredContentAware {
586
586
  });
587
587
  static ɵdir = i0.ɵɵngDeclareDirective({
588
588
  minVersion: "17.1.0",
589
- version: "22.2.0-next.2",
589
+ version: "22.2.0-next.4",
590
590
  type: TreeItem,
591
591
  isStandalone: true,
592
592
  selector: "[ngTreeItem]",
@@ -668,7 +668,7 @@ class TreeItem extends DeferredContentAware {
668
668
  }
669
669
  i0.ɵɵngDeclareClassMetadata({
670
670
  minVersion: "12.0.0",
671
- version: "22.2.0-next.2",
671
+ version: "22.2.0-next.4",
672
672
  ngImport: i0,
673
673
  type: TreeItem,
674
674
  decorators: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/aria",
3
- "version": "22.2.0-next.2",
3
+ "version": "22.2.0-next.4",
4
4
  "description": "Angular Aria",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "homepage": "https://github.com/angular/components#readme",
14
14
  "peerDependencies": {
15
- "@angular/cdk": "22.2.0-next.2",
15
+ "@angular/cdk": "22.2.0-next.4",
16
16
  "@angular/core": "^22.0.0-0 || ^22.1.0-0 || ^22.2.0-0 || ^22.3.0-0 || ^23.0.0-0"
17
17
  },
18
18
  "devDependencies": {
@@ -18,9 +18,9 @@ declare class AccordionGroupPattern {
18
18
  readonly expansionBehavior: ListExpansion;
19
19
  constructor(inputs: AccordionGroupInputs);
20
20
  /** The key used to navigate to the previous accordion trigger. */
21
- readonly prevKey: SignalLike<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
21
+ readonly prevKey: SignalLike<"ArrowLeft" | "ArrowRight" | "ArrowUp">;
22
22
  /** The key used to navigate to the next accordion trigger. */
23
- readonly nextKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
23
+ readonly nextKey: SignalLike<"ArrowDown" | "ArrowLeft" | "ArrowRight">;
24
24
  /** The keydown event manager for the accordion trigger. */
25
25
  readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
26
26
  /** The click event manager for the accordion trigger. */
@@ -18,7 +18,7 @@ interface HasElement {
18
18
  /**
19
19
  * Sort directives by their document order.
20
20
  */
21
- declare function sortDirectives(a: HasElement, b: HasElement): 1 | -1;
21
+ declare function sortDirectives(a: HasElement, b: HasElement): -1 | 1;
22
22
 
23
23
  /**
24
24
  * A collection that lazily sorts its items based on their DOM position.
@@ -99,7 +99,7 @@ declare class GridFocus<T extends GridFocusCell> {
99
99
  /** Whether the grid is in a disabled state. */
100
100
  readonly gridDisabled: SignalLike<boolean>;
101
101
  /** The tab index for the grid container. */
102
- readonly gridTabIndex: SignalLike<0 | -1>;
102
+ readonly gridTabIndex: SignalLike<-1 | 0>;
103
103
  constructor(inputs: GridFocusInputs & GridFocusDeps<T>);
104
104
  /** Returns the tab index for the given grid cell cell. */
105
105
  getCellTabIndex(cell: T): -1 | 0;
@@ -504,7 +504,7 @@ declare class GridPattern {
504
504
  /** The cells in the grid. */
505
505
  readonly cells: SignalLike<GridCellPattern[][]>;
506
506
  /** The tab index for the grid. */
507
- readonly tabIndex: SignalLike<0 | -1>;
507
+ readonly tabIndex: SignalLike<-1 | 0>;
508
508
  /** Whether the grid is disabled. */
509
509
  readonly disabled: SignalLike<boolean>;
510
510
  /** Whether the grid is multi-selectable. */
@@ -524,9 +524,9 @@ declare class GridPattern {
524
524
  /** Whether the user is currently dragging to select a range of cells. */
525
525
  readonly dragging: WritableSignalLike<boolean>;
526
526
  /** The key for navigating to the previous column. */
527
- readonly prevColKey: SignalLike<"ArrowRight" | "ArrowLeft">;
527
+ readonly prevColKey: SignalLike<"ArrowLeft" | "ArrowRight">;
528
528
  /** The key for navigating to the next column. */
529
- readonly nextColKey: SignalLike<"ArrowRight" | "ArrowLeft">;
529
+ readonly nextColKey: SignalLike<"ArrowLeft" | "ArrowRight">;
530
530
  /** The keydown event manager for the grid. */
531
531
  readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
532
532
  /** The click event manager for the grid. */
@@ -140,7 +140,7 @@ declare class List<T extends ListItem<V>, V> {
140
140
  /** The id of the current active item. */
141
141
  readonly activeDescendant: SignalLike<string | undefined>;
142
142
  /** The tab index of the list. */
143
- readonly tabIndex: SignalLike<0 | -1>;
143
+ readonly tabIndex: SignalLike<-1 | 0>;
144
144
  /** The index of the currently active item in the list. */
145
145
  readonly activeIndex: SignalLike<number>;
146
146
  /**
@@ -160,7 +160,7 @@ declare class List<T extends ListItem<V>, V> {
160
160
  private readonly _wrap;
161
161
  constructor(inputs: ListInputs<T, V>);
162
162
  /** Returns the tab index for the given item. */
163
- getItemTabindex(item: T): 0 | -1;
163
+ getItemTabindex(item: T): -1 | 0;
164
164
  /** Navigates to the first option in the list. */
165
165
  first(opts?: NavOptions<T>): void;
166
166
  /** Navigates to the last option in the list. */
@@ -36,7 +36,7 @@ declare class OptionPattern<V> {
36
36
  /** A reference to the parent listbox. */
37
37
  readonly listbox: SignalLike<ListboxPattern$1<V> | undefined>;
38
38
  /** The tab index of the option. */
39
- readonly tabIndex: SignalLike<0 | -1 | undefined>;
39
+ readonly tabIndex: SignalLike<-1 | 0 | undefined>;
40
40
  /** The html element that should receive focus. */
41
41
  readonly element: SignalLike<HTMLElement | undefined>;
42
42
  constructor(args: OptionInputs<V>);
@@ -74,9 +74,9 @@ declare class ListboxPattern<V> {
74
74
  /** Whether the listbox should wrap. Used to disable wrapping while range selecting. */
75
75
  readonly wrap: WritableSignalLike<boolean>;
76
76
  /** The key used to navigate to the previous item in the list. */
77
- readonly prevKey: SignalLike<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
77
+ readonly prevKey: SignalLike<"ArrowLeft" | "ArrowRight" | "ArrowUp">;
78
78
  /** The key used to navigate to the next item in the list. */
79
- readonly nextKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
79
+ readonly nextKey: SignalLike<"ArrowDown" | "ArrowLeft" | "ArrowRight">;
80
80
  /** Represents the space key. Does nothing when the user is actively using typeahead. */
81
81
  readonly dynamicSpaceKey: SignalLike<"" | " ">;
82
82
  /** The regexp used to decide if a key should trigger typeahead. */
@@ -3,16 +3,16 @@ import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
3
3
  import { ListInputs, ListItem, List } from './_list-chunk.js';
4
4
 
5
5
  /** The inputs for the MenuBarPattern class. */
6
- interface MenuBarInputs<V> extends ListInputs<MenuItemPattern<V>, V> {
6
+ interface MenuBarInputs<V> extends ListInputs<MenuItemPattern<V>, V | undefined> {
7
7
  /** The menu items contained in the menu. */
8
8
  items: SignalLike<MenuItemPattern<V>[]>;
9
9
  /** Callback function triggered when a menu item is selected. */
10
- itemSelected?: (value: V) => void;
10
+ itemSelected?: (value: V | undefined) => void;
11
11
  /** The text direction of the menu bar. */
12
12
  textDirection: SignalLike<'ltr' | 'rtl'>;
13
13
  }
14
14
  /** The inputs for the MenuPattern class. */
15
- interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value'> {
15
+ interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V | undefined>, 'value'> {
16
16
  /** The unique ID of the menu. */
17
17
  id: SignalLike<string>;
18
18
  /** The menu items contained in the menu. */
@@ -20,7 +20,7 @@ interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value'>
20
20
  /** A reference to the parent menu or menu trigger. */
21
21
  parent: SignalLike<MenuTriggerPattern<V> | MenuItemPattern<V> | undefined>;
22
22
  /** Callback function triggered when a menu item is selected. */
23
- itemSelected?: (value: V) => void;
23
+ itemSelected?: (value: V | undefined) => void;
24
24
  /** The text direction of the menu bar. */
25
25
  textDirection: SignalLike<'ltr' | 'rtl'>;
26
26
  /** The delay in milliseconds before expanding sub-menus on hover. */
@@ -38,7 +38,9 @@ interface MenuTriggerInputs<V> {
38
38
  disabled: SignalLike<boolean>;
39
39
  }
40
40
  /** The inputs for the MenuItemPattern class. */
41
- interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
41
+ interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable' | 'value'> {
42
+ /** The value of the menu item. */
43
+ value?: SignalLike<V | undefined>;
42
44
  /** A reference to the parent menu or menu trigger. */
43
45
  parent: SignalLike<MenuPattern<V> | MenuBarPattern<V> | undefined>;
44
46
  /** A reference to the submenu associated with the menu item. */
@@ -58,19 +60,21 @@ declare class MenuPattern<V> {
58
60
  /** Whether the menu is visible. */
59
61
  readonly visible: SignalLike<boolean>;
60
62
  /** Controls list behavior for the menu items. */
61
- readonly listBehavior: List<MenuItemPattern<V>, V>;
63
+ readonly listBehavior: List<MenuItemPattern<V>, V | undefined>;
62
64
  /** Whether the menu or any of its child elements are currently focused. */
63
65
  readonly isFocused: WritableSignalLike<boolean>;
64
66
  /** Whether the menu has received interaction. */
65
67
  readonly hasBeenInteracted: WritableSignalLike<boolean>;
66
68
  /** Whether the menu trigger has been hovered. */
67
69
  readonly hasBeenHovered: WritableSignalLike<boolean>;
70
+ /** Items currently inside the menu. */
71
+ readonly items: () => MenuItemPattern<V>[];
68
72
  /** Timeout used to open sub-menus on hover. */
69
- _openTimeout: any;
73
+ private _openTimeout;
70
74
  /** Timeout used to close sub-menus on hover out. */
71
- _closeTimeout: any;
75
+ private _closeTimeout;
72
76
  /** The tab index of the menu. */
73
- readonly tabIndex: () => 0 | -1;
77
+ readonly tabIndex: () => -1 | 0;
74
78
  /** Whether the menu should be focused on mouse over. */
75
79
  readonly shouldFocus: SignalLike<boolean>;
76
80
  /** The key used to expand sub-menus. */
@@ -139,9 +143,9 @@ declare class MenuPattern<V> {
139
143
  declare class MenuBarPattern<V> {
140
144
  readonly inputs: MenuBarInputs<V>;
141
145
  /** Controls list behavior for the menu items. */
142
- readonly listBehavior: List<MenuItemPattern<V>, V>;
146
+ readonly listBehavior: List<MenuItemPattern<V>, V | undefined>;
143
147
  /** The tab index of the menu. */
144
- readonly tabIndex: () => 0 | -1;
148
+ readonly tabIndex: () => -1 | 0;
145
149
  /** The key used to navigate to the next item. */
146
150
  private readonly _nextKey;
147
151
  /** The key used to navigate to the previous item. */
@@ -227,10 +231,10 @@ declare class MenuTriggerPattern<V> {
227
231
  }): void;
228
232
  }
229
233
  /** The menu item ui pattern class. */
230
- declare class MenuItemPattern<V> implements ListItem<V> {
234
+ declare class MenuItemPattern<V> implements ListItem<V | undefined> {
231
235
  readonly inputs: MenuItemInputs<V>;
232
236
  /** The value of the menu item. */
233
- readonly value: SignalLike<V>;
237
+ readonly value: SignalLike<V | undefined>;
234
238
  /** The unique ID of the menu item. */
235
239
  readonly id: SignalLike<string>;
236
240
  /** Whether the menu item is disabled. */
@@ -244,7 +248,7 @@ declare class MenuItemPattern<V> implements ListItem<V> {
244
248
  /** Whether the menu item has received interaction. */
245
249
  readonly hasBeenInteracted: WritableSignalLike<boolean>;
246
250
  /** The tab index of the menu item. */
247
- readonly tabIndex: SignalLike<0 | -1>;
251
+ readonly tabIndex: SignalLike<-1 | 0>;
248
252
  /** The position of the menu item in the menu. */
249
253
  readonly index: SignalLike<number>;
250
254
  /** Whether the menu item is expanded. */
@@ -254,7 +258,7 @@ declare class MenuItemPattern<V> implements ListItem<V> {
254
258
  /** The ID of the menu that the menu item controls. */
255
259
  readonly controls: WritableSignalLike<string | undefined>;
256
260
  /** The role of the menu item. */
257
- readonly role: () => "menuitem" | "menuitemradio" | "menuitemcheckbox";
261
+ readonly role: () => "menuitem" | "menuitemcheckbox" | "menuitemradio";
258
262
  /** Whether the menu item has a popup. */
259
263
  readonly hasPopup: SignalLike<boolean>;
260
264
  /** The submenu associated with the menu item. */