@angular/aria 21.0.0-rc.0 → 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 (48) hide show
  1. package/_adev_assets/aria-accordion.json +443 -59
  2. package/_adev_assets/aria-combobox.json +345 -37
  3. package/_adev_assets/aria-grid.json +408 -71
  4. package/_adev_assets/aria-listbox.json +115 -35
  5. package/_adev_assets/aria-menu.json +492 -167
  6. package/_adev_assets/aria-tabs.json +272 -88
  7. package/_adev_assets/aria-toolbar.json +151 -133
  8. package/_adev_assets/aria-tree.json +182 -35
  9. package/fesm2022/_widget-chunk.mjs +643 -190
  10. package/fesm2022/_widget-chunk.mjs.map +1 -1
  11. package/fesm2022/accordion.mjs +129 -77
  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 +140 -27
  16. package/fesm2022/combobox.mjs.map +1 -1
  17. package/fesm2022/grid.mjs +254 -68
  18. package/fesm2022/grid.mjs.map +1 -1
  19. package/fesm2022/listbox.mjs +54 -44
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +270 -108
  22. package/fesm2022/menu.mjs.map +1 -1
  23. package/fesm2022/private.mjs +752 -785
  24. package/fesm2022/private.mjs.map +1 -1
  25. package/fesm2022/tabs.mjs +101 -71
  26. package/fesm2022/tabs.mjs.map +1 -1
  27. package/fesm2022/toolbar.mjs +87 -64
  28. package/fesm2022/toolbar.mjs.map +1 -1
  29. package/fesm2022/tree.mjs +105 -60
  30. package/fesm2022/tree.mjs.map +1 -1
  31. package/package.json +2 -10
  32. package/types/_grid-chunk.d.ts +326 -83
  33. package/types/accordion.d.ts +134 -35
  34. package/types/combobox.d.ts +146 -13
  35. package/types/grid.d.ts +159 -32
  36. package/types/listbox.d.ts +59 -28
  37. package/types/menu.d.ts +151 -55
  38. package/types/private.d.ts +449 -567
  39. package/types/tabs.d.ts +121 -41
  40. package/types/toolbar.d.ts +74 -51
  41. package/types/tree.d.ts +116 -45
  42. package/_adev_assets/aria-radio-group.json +0 -389
  43. package/fesm2022/deferred-content.mjs +0 -99
  44. package/fesm2022/deferred-content.mjs.map +0 -1
  45. package/fesm2022/radio-group.mjs +0 -338
  46. package/fesm2022/radio-group.mjs.map +0 -1
  47. package/types/deferred-content.d.ts +0 -38
  48. package/types/radio-group.d.ts +0 -84
@@ -1,110 +1,9 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Signal } from '@angular/core';
3
- import { SignalLike, WritableSignalLike, KeyboardEventManager, PointerEventManager } from './_grid-chunk.js';
2
+ import { Signal, WritableSignal, OnDestroy } from '@angular/core';
3
+ import { ListFocusItem, SignalLike, ListFocusInputs, WritableSignalLike, ListFocus, ListNavigationItem, ListNavigationInputs, ListNavigation, KeyboardEventManager, PointerEventManager } from './_grid-chunk.js';
4
4
  export { GridCellInputs, GridCellPattern, GridCellWidgetInputs, GridCellWidgetPattern, GridInputs, GridPattern, GridRowInputs, GridRowPattern, convertGetterSetterToWritableSignalLike } from './_grid-chunk.js';
5
5
 
6
- /** Represents an item in a collection, such as a listbox option, than may receive focus. */
7
- interface ListFocusItem {
8
- /** A unique identifier for the item. */
9
- id: SignalLike<string>;
10
- /** The html element that should receive focus. */
11
- element: SignalLike<HTMLElement>;
12
- /** Whether an item is disabled. */
13
- disabled: SignalLike<boolean>;
14
- /** The index of the item in the list. */
15
- index: SignalLike<number>;
16
- }
17
- /** Represents the required inputs for a collection that contains focusable items. */
18
- interface ListFocusInputs<T extends ListFocusItem> {
19
- /** The focus strategy used by the list. */
20
- focusMode: SignalLike<'roving' | 'activedescendant'>;
21
- /** Whether the list is disabled. */
22
- disabled: SignalLike<boolean>;
23
- /** The items in the list. */
24
- items: SignalLike<T[]>;
25
- /** The active item. */
26
- activeItem: WritableSignalLike<T | undefined>;
27
- /** Whether disabled items in the list should be skipped when navigating. */
28
- skipDisabled: SignalLike<boolean>;
29
- element: SignalLike<HTMLElement | undefined>;
30
- }
31
- /** Controls focus for a list of items. */
32
- declare class ListFocus<T extends ListFocusItem> {
33
- readonly inputs: ListFocusInputs<T>;
34
- /** The last item that was active. */
35
- prevActiveItem: _angular_core.WritableSignal<T | undefined>;
36
- /** The index of the last item that was active. */
37
- prevActiveIndex: _angular_core.Signal<number>;
38
- /** The current active index in the list. */
39
- activeIndex: _angular_core.Signal<number>;
40
- constructor(inputs: ListFocusInputs<T>);
41
- /** Whether the list is in a disabled state. */
42
- isListDisabled(): boolean;
43
- /** The id of the current active item. */
44
- getActiveDescendant(): string | undefined;
45
- /** The tabindex for the list. */
46
- getListTabindex(): -1 | 0;
47
- /** Returns the tabindex for the given item. */
48
- getItemTabindex(item: T): -1 | 0;
49
- /** Moves focus to the given item if it is focusable. */
50
- focus(item: T, opts?: {
51
- focusElement?: boolean;
52
- }): boolean;
53
- /** Returns true if the given item can be navigated to. */
54
- isFocusable(item: T): boolean;
55
- }
56
-
57
- /** Represents an item in a collection, such as a listbox option, than can be navigated to. */
58
- interface ListNavigationItem extends ListFocusItem {
59
- }
60
- /** Represents the required inputs for a collection that has navigable items. */
61
- interface ListNavigationInputs<T extends ListNavigationItem> extends ListFocusInputs<T> {
62
- /** Whether focus should wrap when navigating. */
63
- wrap: SignalLike<boolean>;
64
- /** Whether the list is vertically or horizontally oriented. */
65
- orientation: SignalLike<'vertical' | 'horizontal'>;
66
- /** The direction that text is read based on the users locale. */
67
- textDirection: SignalLike<'rtl' | 'ltr'>;
68
- }
69
- /** Controls navigation for a list of items. */
70
- declare class ListNavigation<T extends ListNavigationItem> {
71
- readonly inputs: ListNavigationInputs<T> & {
72
- focusManager: ListFocus<T>;
73
- };
74
- constructor(inputs: ListNavigationInputs<T> & {
75
- focusManager: ListFocus<T>;
76
- });
77
- /** Navigates to the given item. */
78
- goto(item?: T, opts?: {
79
- focusElement?: boolean;
80
- }): boolean;
81
- /** Navigates to the next item in the list. */
82
- next(opts?: {
83
- focusElement?: boolean;
84
- }): boolean;
85
- /** Peeks the next item in the list. */
86
- peekNext(): T | undefined;
87
- /** Navigates to the previous item in the list. */
88
- prev(opts?: {
89
- focusElement?: boolean;
90
- }): boolean;
91
- /** Peeks the previous item in the list. */
92
- peekPrev(): T | undefined;
93
- /** Navigates to the first item in the list. */
94
- first(opts?: {
95
- focusElement?: boolean;
96
- }): boolean;
97
- /** Navigates to the last item in the list. */
98
- last(opts?: {
99
- focusElement?: boolean;
100
- }): boolean;
101
- /** Advances to the next or previous focusable item in the list based on the given delta. */
102
- private _advance;
103
- /** Peeks the next or previous focusable item in the list based on the given delta. */
104
- private _peek;
105
- }
106
-
107
- /** Represents an item in a collection, such as a listbox option, than can be selected. */
6
+ /** Represents an item in a collection, such as a listbox option, that can be selected. */
108
7
  interface ListSelectionItem<V> extends ListFocusItem {
109
8
  /** The value of the item. */
110
9
  value: SignalLike<V>;
@@ -116,7 +15,7 @@ interface ListSelectionInputs<T extends ListSelectionItem<V>, V> extends ListFoc
116
15
  /** Whether multiple items in the list can be selected at once. */
117
16
  multi: SignalLike<boolean>;
118
17
  /** The current value of the list selection. */
119
- value: WritableSignalLike<V[]>;
18
+ values: WritableSignalLike<V[]>;
120
19
  /** The selection strategy used by the list. */
121
20
  selectionMode: SignalLike<'follow' | 'explicit'>;
122
21
  }
@@ -139,9 +38,9 @@ declare class ListSelection<T extends ListSelectionItem<V>, V> {
139
38
  anchor: boolean;
140
39
  }): void;
141
40
  /** Deselects the item at the current active index. */
142
- deselect(item?: T | null): void;
41
+ deselect(item?: ListSelectionItem<V>): void;
143
42
  /** Toggles the item at the current active index. */
144
- toggle(): void;
43
+ toggle(item?: ListSelectionItem<V>): void;
145
44
  /** Toggles only the item at the current active index. */
146
45
  toggleOne(): void;
147
46
  /** Selects all items in the list. */
@@ -240,9 +139,9 @@ declare class List<T extends ListItem<V>, V> {
240
139
  /** Whether the list is disabled. */
241
140
  disabled: _angular_core.Signal<boolean>;
242
141
  /** The id of the current active item. */
243
- activedescendant: _angular_core.Signal<string | undefined>;
244
- /** The tabindex of the list. */
245
- tabindex: _angular_core.Signal<0 | -1>;
142
+ activeDescendant: _angular_core.Signal<string | undefined>;
143
+ /** The tab index of the list. */
144
+ tabIndex: _angular_core.Signal<0 | -1>;
246
145
  /** The index of the currently active item in the list. */
247
146
  activeIndex: _angular_core.Signal<number>;
248
147
  /**
@@ -261,7 +160,7 @@ declare class List<T extends ListItem<V>, V> {
261
160
  /** Whether the list should wrap. Used to disable wrapping while range selecting. */
262
161
  private _wrap;
263
162
  constructor(inputs: ListInputs<T, V>);
264
- /** Returns the tabindex for the given item. */
163
+ /** Returns the tab index for the given item. */
265
164
  getItemTabindex(item: T): 0 | -1;
266
165
  /** Navigates to the first option in the list. */
267
166
  first(opts?: NavOptions): void;
@@ -286,11 +185,11 @@ declare class List<T extends ListItem<V>, V> {
286
185
  /** Sets the selection to only the current active item. */
287
186
  selectOne(): void;
288
187
  /** Deselects the currently active item in the list. */
289
- deselect(): void;
188
+ deselect(item?: T): void;
290
189
  /** Deselects all items in the list. */
291
190
  deselectAll(): void;
292
191
  /** Toggles the currently active item in the list. */
293
- toggle(): void;
192
+ toggle(item?: T): void;
294
193
  /** Toggles the currently active item in the list, deselecting all other items. */
295
194
  toggleOne(): void;
296
195
  /** Toggles the selection of all items in the list. */
@@ -314,7 +213,7 @@ declare class List<T extends ListItem<V>, V> {
314
213
  /** Represents the required inputs for a combobox. */
315
214
  interface ComboboxInputs<T extends ListItem<V>, V> {
316
215
  /** The controls for the popup associated with the combobox. */
317
- popupControls: SignalLike<ComboboxListboxControls<T, V> | ComboboxTreeControls<T, V> | undefined>;
216
+ popupControls: SignalLike<ComboboxListboxControls<T, V> | ComboboxTreeControls<T, V> | ComboboxDialogPattern | undefined>;
318
217
  /** The HTML input element that serves as the combobox input. */
319
218
  inputEl: SignalLike<HTMLInputElement | undefined>;
320
219
  /** The HTML element that serves as the combobox container. */
@@ -331,6 +230,8 @@ interface ComboboxInputs<T extends ListItem<V>, V> {
331
230
  readonly: SignalLike<boolean>;
332
231
  /** Whether the combobox is in a right-to-left context. */
333
232
  textDirection: SignalLike<'rtl' | 'ltr'>;
233
+ /** Whether the combobox is always expanded. */
234
+ alwaysExpanded: SignalLike<boolean>;
334
235
  }
335
236
  /** An interface that allows combobox popups to expose the necessary controls for the combobox. */
336
237
  interface ComboboxListboxControls<T extends ListItem<V>, V> {
@@ -338,12 +239,16 @@ interface ComboboxListboxControls<T extends ListItem<V>, V> {
338
239
  id: () => string;
339
240
  /** The ARIA role for the popup. */
340
241
  role: SignalLike<'listbox' | 'tree' | 'grid'>;
242
+ /** Whether multiple items in the popup can be selected at once. */
243
+ multi: SignalLike<boolean>;
341
244
  /** The ID of the active item in the popup. */
342
245
  activeId: SignalLike<string | undefined>;
343
246
  /** The list of items in the popup. */
344
247
  items: SignalLike<T[]>;
345
248
  /** Navigates to the given item in the popup. */
346
- focus: (item: T) => void;
249
+ focus: (item: T, opts?: {
250
+ focusElement?: boolean;
251
+ }) => void;
347
252
  /** Navigates to the next item in the popup. */
348
253
  next: () => void;
349
254
  /** Navigates to the previous item in the popup. */
@@ -354,14 +259,18 @@ interface ComboboxListboxControls<T extends ListItem<V>, V> {
354
259
  last: () => void;
355
260
  /** Selects the current item in the popup. */
356
261
  select: (item?: T) => void;
262
+ /** Toggles the selection state of the given item in the popup. */
263
+ toggle: (item?: T) => void;
357
264
  /** Clears the selection state of the popup. */
358
265
  clearSelection: () => void;
359
266
  /** Removes focus from any item in the popup. */
360
267
  unfocus: () => void;
361
268
  /** Returns the item corresponding to the given event. */
362
269
  getItem: (e: PointerEvent) => T | undefined;
363
- /** Returns the currently selected item in the popup. */
364
- getSelectedItem: () => T | undefined;
270
+ /** Returns the currently active (focused) item in the popup. */
271
+ getActiveItem: () => T | undefined;
272
+ /** Returns the currently selected items in the popup. */
273
+ getSelectedItems: () => T[];
365
274
  /** Sets the value of the combobox based on the selected item. */
366
275
  setValue: (value: V | undefined) => void;
367
276
  }
@@ -373,25 +282,33 @@ interface ComboboxTreeControls<T extends ListItem<V>, V> extends ComboboxListbox
373
282
  /** Collapses the currently active item in the popup. */
374
283
  collapseItem: () => void;
375
284
  /** Checks if the currently active item in the popup is expandable. */
376
- isItemExpandable: () => boolean;
285
+ isItemExpandable: (item?: T) => boolean;
377
286
  /** Expands all nodes in the tree. */
378
287
  expandAll: () => void;
379
288
  /** Collapses all nodes in the tree. */
380
289
  collapseAll: () => void;
290
+ /** Toggles the expansion state of the currently active item in the popup. */
291
+ toggleExpansion: (item?: T) => void;
292
+ /** Whether the current active item is selectable. */
293
+ isItemSelectable: (item?: T) => boolean;
381
294
  }
382
295
  /** Controls the state of a combobox. */
383
296
  declare class ComboboxPattern<T extends ListItem<V>, V> {
384
297
  readonly inputs: ComboboxInputs<T, V>;
385
298
  /** Whether the combobox is expanded. */
386
299
  expanded: _angular_core.WritableSignal<boolean>;
300
+ /** Whether the combobox is disabled. */
301
+ disabled: () => boolean;
387
302
  /** The ID of the active item in the combobox. */
388
- activedescendant: _angular_core.Signal<string | null>;
303
+ activeDescendant: _angular_core.Signal<string | null>;
389
304
  /** The currently highlighted item in the combobox. */
390
305
  highlightedItem: _angular_core.WritableSignal<T | undefined>;
391
306
  /** Whether the most recent input event was a deletion. */
392
307
  isDeleting: boolean;
393
308
  /** Whether the combobox is focused. */
394
309
  isFocused: _angular_core.WritableSignal<boolean>;
310
+ /** Whether the combobox has ever been focused. */
311
+ hasBeenFocused: _angular_core.WritableSignal<boolean>;
395
312
  /** The key used to navigate to the previous item in the list. */
396
313
  expandKey: _angular_core.Signal<"ArrowLeft" | "ArrowRight">;
397
314
  /** The key used to navigate to the next item in the list. */
@@ -401,18 +318,22 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
401
318
  /** The autocomplete behavior of the combobox. */
402
319
  autocomplete: _angular_core.Signal<"both" | "list">;
403
320
  /** The ARIA role of the popup associated with the combobox. */
404
- hasPopup: _angular_core.Signal<"listbox" | "tree" | "grid" | null>;
405
- /** Whether the combobox is interactive. */
406
- isInteractive: _angular_core.Signal<boolean>;
321
+ hasPopup: _angular_core.Signal<"listbox" | "tree" | "grid" | "dialog" | null>;
322
+ /** Whether the combobox is read-only. */
323
+ readonly: _angular_core.Signal<true | null>;
324
+ /** Returns the listbox controls for the combobox. */
325
+ listControls: () => ComboboxListboxControls<T, V> | null | undefined;
326
+ /** Returns the tree controls for the combobox. */
327
+ treeControls: () => ComboboxTreeControls<T, V> | null;
407
328
  /** The keydown event manager for the combobox. */
408
329
  keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
409
- /** The pointerup event manager for the combobox. */
410
- pointerup: _angular_core.Signal<PointerEventManager<PointerEvent>>;
330
+ /** The click event manager for the combobox. */
331
+ click: _angular_core.Signal<PointerEventManager<PointerEvent>>;
411
332
  constructor(inputs: ComboboxInputs<T, V>);
412
333
  /** Handles keydown events for the combobox. */
413
334
  onKeydown(event: KeyboardEvent): void;
414
- /** Handles pointerup events for the combobox. */
415
- onPointerup(event: PointerEvent): void;
335
+ /** Handles click events for the combobox. */
336
+ onClick(event: MouseEvent): void;
416
337
  /** Handles input events for the combobox. */
417
338
  onInput(event: Event): void;
418
339
  /** Handles focus in events for the combobox. */
@@ -426,11 +347,14 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
426
347
  /** Highlights the currently selected item in the combobox. */
427
348
  highlight(): void;
428
349
  /** Closes the combobox. */
429
- close(): void;
350
+ close(opts?: {
351
+ reset: boolean;
352
+ }): void;
430
353
  /** Opens the combobox. */
431
354
  open(nav?: {
432
355
  first?: boolean;
433
356
  last?: boolean;
357
+ selected?: boolean;
434
358
  }): void;
435
359
  /** Navigates to the next focusable item in the combobox popup. */
436
360
  next(): void;
@@ -455,6 +379,23 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
455
379
  /** Navigates and handles additional actions based on filter mode. */
456
380
  private _navigate;
457
381
  }
382
+ declare class ComboboxDialogPattern {
383
+ readonly inputs: {
384
+ combobox: ComboboxPattern<any, any>;
385
+ element: SignalLike<HTMLDialogElement>;
386
+ id: SignalLike<string>;
387
+ };
388
+ id: () => string;
389
+ role: () => "dialog";
390
+ keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
391
+ constructor(inputs: {
392
+ combobox: ComboboxPattern<any, any>;
393
+ element: SignalLike<HTMLDialogElement>;
394
+ id: SignalLike<string>;
395
+ });
396
+ onKeydown(event: KeyboardEvent): void;
397
+ onClick(event: MouseEvent): void;
398
+ }
458
399
 
459
400
  /**
460
401
  * Represents the properties exposed by a listbox that need to be accessed by an option.
@@ -488,10 +429,10 @@ declare class OptionPattern<V> {
488
429
  searchTerm: SignalLike<string>;
489
430
  /** A reference to the parent listbox. */
490
431
  listbox: SignalLike<ListboxPattern$1<V> | undefined>;
491
- /** The tabindex of the option. */
492
- tabindex: _angular_core.Signal<0 | -1 | undefined>;
432
+ /** The tab index of the option. */
433
+ tabIndex: _angular_core.Signal<0 | -1 | undefined>;
493
434
  /** The html element that should receive focus. */
494
- element: SignalLike<HTMLElement>;
435
+ element: SignalLike<HTMLElement | undefined>;
495
436
  constructor(args: OptionInputs<V>);
496
437
  }
497
438
 
@@ -512,10 +453,10 @@ declare class ListboxPattern<V> {
512
453
  disabled: _angular_core.Signal<boolean>;
513
454
  /** Whether the listbox is readonly. */
514
455
  readonly: SignalLike<boolean>;
515
- /** The tabindex of the listbox. */
516
- tabindex: SignalLike<-1 | 0>;
456
+ /** The tab index of the listbox. */
457
+ tabIndex: SignalLike<-1 | 0>;
517
458
  /** The id of the current active item. */
518
- activedescendant: _angular_core.Signal<string | undefined>;
459
+ activeDescendant: _angular_core.Signal<string | undefined>;
519
460
  /** Whether multiple items in the list can be selected at once. */
520
461
  multi: SignalLike<boolean>;
521
462
  /** The number of items in the listbox. */
@@ -570,8 +511,10 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
570
511
  activeId: _angular_core.Signal<string | undefined>;
571
512
  /** The list of options in the listbox. */
572
513
  items: SignalLike<OptionPattern<V>[]>;
573
- /** The tabindex for the listbox. Always -1 because the combobox handles focus. */
574
- tabindex: SignalLike<-1 | 0>;
514
+ /** The tab index for the listbox. Always -1 because the combobox handles focus. */
515
+ tabIndex: SignalLike<-1 | 0>;
516
+ /** Whether multiple items in the list can be selected at once. */
517
+ multi: _angular_core.Signal<boolean>;
575
518
  constructor(inputs: ComboboxListboxInputs<V>);
576
519
  /** Noop. The combobox handles keydown events. */
577
520
  onKeydown(_: KeyboardEvent): void;
@@ -580,7 +523,11 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
580
523
  /** Noop. The combobox controls the open state. */
581
524
  setDefaultState(): void;
582
525
  /** Navigates to the specified item in the listbox. */
583
- focus: (item: OptionPattern<V>) => void;
526
+ focus: (item: OptionPattern<V>, opts?: {
527
+ focusElement?: boolean;
528
+ }) => void;
529
+ /** Navigates to the previous focusable item in the listbox. */
530
+ getActiveItem: () => OptionPattern<V> | undefined;
584
531
  /** Navigates to the next focusable item in the listbox. */
585
532
  next: () => void;
586
533
  /** Navigates to the previous focusable item in the listbox. */
@@ -593,25 +540,29 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
593
540
  unfocus: () => void;
594
541
  /** Selects the specified item in the listbox. */
595
542
  select: (item?: OptionPattern<V>) => void;
543
+ /** Toggles the selection state of the given item in the listbox. */
544
+ toggle: (item?: OptionPattern<V>) => void;
596
545
  /** Clears the selection in the listbox. */
597
546
  clearSelection: () => void;
598
547
  /** Retrieves the OptionPattern associated with a pointer event. */
599
548
  getItem: (e: PointerEvent) => OptionPattern<V> | undefined;
600
- /** Retrieves the currently selected item in the listbox. */
601
- getSelectedItem: () => OptionPattern<V> | undefined;
549
+ /** Retrieves the currently selected items in the listbox. */
550
+ getSelectedItems: () => OptionPattern<V>[];
602
551
  /** Sets the value of the combobox listbox. */
603
552
  setValue: (value: V | undefined) => void;
604
553
  }
605
554
 
606
555
  /** The inputs for the MenuBarPattern class. */
607
- interface MenuBarInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'disabled'> {
556
+ interface MenuBarInputs<V> extends ListInputs<MenuItemPattern<V>, V> {
608
557
  /** The menu items contained in the menu. */
609
558
  items: SignalLike<MenuItemPattern<V>[]>;
610
559
  /** Callback function triggered when a menu item is selected. */
611
- onSubmit?: (value: V) => void;
560
+ onSelect?: (value: V) => void;
561
+ /** The text direction of the menu bar. */
562
+ textDirection: SignalLike<'ltr' | 'rtl'>;
612
563
  }
613
564
  /** The inputs for the MenuPattern class. */
614
- interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value' | 'disabled'> {
565
+ interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'values'> {
615
566
  /** The unique ID of the menu. */
616
567
  id: SignalLike<string>;
617
568
  /** The menu items contained in the menu. */
@@ -619,16 +570,22 @@ interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value'
619
570
  /** A reference to the parent menu or menu trigger. */
620
571
  parent: SignalLike<MenuTriggerPattern<V> | MenuItemPattern<V> | undefined>;
621
572
  /** Callback function triggered when a menu item is selected. */
622
- onSubmit?: (value: V) => void;
573
+ onSelect?: (value: V) => void;
574
+ /** The text direction of the menu bar. */
575
+ textDirection: SignalLike<'ltr' | 'rtl'>;
576
+ /** The delay in milliseconds before expanding sub-menus on hover. */
577
+ expansionDelay: SignalLike<number>;
623
578
  }
624
579
  /** The inputs for the MenuTriggerPattern class. */
625
580
  interface MenuTriggerInputs<V> {
626
581
  /** A reference to the menu trigger element. */
627
582
  element: SignalLike<HTMLElement | undefined>;
628
- /** A reference to the submenu associated with the menu trigger. */
629
- submenu: SignalLike<MenuPattern<V> | undefined>;
630
- /** Callback function triggered when a menu item is selected. */
631
- onSubmit?: (value: V) => void;
583
+ /** A reference to the menu associated with the trigger. */
584
+ menu: SignalLike<MenuPattern<V> | undefined>;
585
+ /** The text direction of the menu bar. */
586
+ textDirection: SignalLike<'ltr' | 'rtl'>;
587
+ /** Whether the menu trigger is disabled. */
588
+ disabled: SignalLike<boolean>;
632
589
  }
633
590
  /** The inputs for the MenuItemPattern class. */
634
591
  interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
@@ -644,14 +601,22 @@ declare class MenuPattern<V> {
644
601
  id: SignalLike<string>;
645
602
  /** The role of the menu. */
646
603
  role: () => string;
604
+ /** Whether the menu is disabled. */
605
+ disabled: () => boolean;
647
606
  /** Whether the menu is visible. */
648
- isVisible: Signal<boolean>;
607
+ visible: Signal<boolean>;
649
608
  /** Controls list behavior for the menu items. */
650
609
  listBehavior: List<MenuItemPattern<V>, V>;
651
610
  /** Whether the menu or any of its child elements are currently focused. */
652
611
  isFocused: _angular_core.WritableSignal<boolean>;
653
612
  /** Whether the menu has received focus. */
654
613
  hasBeenFocused: _angular_core.WritableSignal<boolean>;
614
+ /** Timeout used to open sub-menus on hover. */
615
+ _openTimeout: any;
616
+ /** Timeout used to close sub-menus on hover out. */
617
+ _closeTimeout: any;
618
+ /** The tab index of the menu. */
619
+ tabIndex: () => 0 | -1;
655
620
  /** Whether the menu should be focused on mouse over. */
656
621
  shouldFocus: Signal<boolean>;
657
622
  /** The key used to expand sub-menus. */
@@ -673,6 +638,10 @@ declare class MenuPattern<V> {
673
638
  onKeydown(event: KeyboardEvent): void;
674
639
  /** Handles mouseover events for the menu. */
675
640
  onMouseOver(event: MouseEvent): void;
641
+ /** Closes the specified menu item after a delay. */
642
+ private _closeItem;
643
+ /** Opens the specified menu item after a delay. */
644
+ private _openItem;
676
645
  /** Handles mouseout events for the menu. */
677
646
  onMouseOut(event: MouseEvent): void;
678
647
  /** Handles click events for the menu. */
@@ -697,14 +666,24 @@ declare class MenuPattern<V> {
697
666
  collapse(): void;
698
667
  /** Expands the current menu or focuses the next item in the menubar. */
699
668
  expand(): void;
669
+ /** Closes the menu. */
670
+ close(): void;
700
671
  /** Closes the menu and all parent menus. */
701
672
  closeAll(): void;
673
+ /** Clears any open or close timeouts for sub-menus. */
674
+ _clearTimeouts(): void;
675
+ /** Clears the open timeout. */
676
+ _clearOpenTimeout(): void;
677
+ /** Clears the close timeout. */
678
+ _clearCloseTimeout(): void;
702
679
  }
703
680
  /** The menubar ui pattern class. */
704
681
  declare class MenuBarPattern<V> {
705
682
  readonly inputs: MenuBarInputs<V>;
706
683
  /** Controls list behavior for the menu items. */
707
684
  listBehavior: List<MenuItemPattern<V>, V>;
685
+ /** The tab index of the menu. */
686
+ tabIndex: () => 0 | -1;
708
687
  /** The key used to navigate to the next item. */
709
688
  private _nextKey;
710
689
  /** The key used to navigate to the previous item. */
@@ -717,6 +696,8 @@ declare class MenuBarPattern<V> {
717
696
  isFocused: _angular_core.WritableSignal<boolean>;
718
697
  /** Whether the menubar has been focused. */
719
698
  hasBeenFocused: _angular_core.WritableSignal<boolean>;
699
+ /** Whether the menubar is disabled. */
700
+ disabled: () => boolean;
720
701
  /** Handles keyboard events for the menu. */
721
702
  keydownManager: Signal<KeyboardEventManager<KeyboardEvent>>;
722
703
  constructor(inputs: MenuBarInputs<V>);
@@ -748,14 +729,18 @@ declare class MenuTriggerPattern<V> {
748
729
  readonly inputs: MenuTriggerInputs<V>;
749
730
  /** Whether the menu is expanded. */
750
731
  expanded: _angular_core.WritableSignal<boolean>;
732
+ /** Whether the menu trigger has received focus. */
733
+ hasBeenFocused: _angular_core.WritableSignal<boolean>;
751
734
  /** The role of the menu trigger. */
752
735
  role: () => string;
753
736
  /** Whether the menu trigger has a popup. */
754
737
  hasPopup: () => boolean;
755
- /** The submenu associated with the trigger. */
756
- submenu: SignalLike<MenuPattern<V> | undefined>;
757
- /** The tabindex of the menu trigger. */
758
- tabindex: Signal<-1 | 0>;
738
+ /** The menu associated with the trigger. */
739
+ menu: SignalLike<MenuPattern<V> | undefined>;
740
+ /** The tab index of the menu trigger. */
741
+ tabIndex: Signal<-1 | 0>;
742
+ /** Whether the menu trigger is disabled. */
743
+ disabled: () => boolean;
759
744
  /** Handles keyboard events for the menu trigger. */
760
745
  keydownManager: Signal<KeyboardEventManager<KeyboardEvent>>;
761
746
  constructor(inputs: MenuTriggerInputs<V>);
@@ -763,6 +748,8 @@ declare class MenuTriggerPattern<V> {
763
748
  onKeydown(event: KeyboardEvent): void;
764
749
  /** Handles click events for the menu trigger. */
765
750
  onClick(): void;
751
+ /** Handles focusin events for the menu trigger. */
752
+ onFocusIn(): void;
766
753
  /** Handles focusout events for the menu trigger. */
767
754
  onFocusOut(event: FocusEvent): void;
768
755
  /** Opens the menu. */
@@ -783,15 +770,17 @@ declare class MenuItemPattern<V> implements ListItem<V> {
783
770
  /** The unique ID of the menu item. */
784
771
  id: SignalLike<string>;
785
772
  /** Whether the menu item is disabled. */
786
- disabled: SignalLike<boolean>;
773
+ disabled: () => boolean;
787
774
  /** The search term for the menu item. */
788
775
  searchTerm: SignalLike<string>;
789
776
  /** The element of the menu item. */
790
- element: SignalLike<HTMLElement>;
777
+ element: SignalLike<HTMLElement | undefined>;
791
778
  /** Whether the menu item is active. */
792
- isActive: Signal<boolean>;
793
- /** The tabindex of the menu item. */
794
- tabindex: Signal<0 | -1>;
779
+ active: Signal<boolean>;
780
+ /** Whether the menu item has received focus. */
781
+ hasBeenFocused: _angular_core.WritableSignal<boolean>;
782
+ /** The tab index of the menu item. */
783
+ tabIndex: Signal<0 | -1>;
795
784
  /** The position of the menu item in the menu. */
796
785
  index: Signal<number>;
797
786
  /** Whether the menu item is expanded. */
@@ -818,315 +807,23 @@ declare class MenuItemPattern<V> implements ListItem<V> {
818
807
  close(opts?: {
819
808
  refocus?: boolean;
820
809
  }): void;
821
- }
822
-
823
- /** Represents the required inputs for a radio button in a radio group. */
824
- interface RadioButtonInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index' | 'selectable'> {
825
- /** A reference to the parent radio group. */
826
- group: SignalLike<RadioGroupPattern<V> | undefined>;
827
- }
828
- /** Represents a radio button within a radio group. */
829
- declare class RadioButtonPattern<V> {
830
- readonly inputs: RadioButtonInputs<V>;
831
- /** A unique identifier for the radio button. */
832
- readonly id: SignalLike<string>;
833
- /** The value associated with the radio button. */
834
- readonly value: SignalLike<V>;
835
- /** The position of the radio button within the group. */
836
- readonly index: SignalLike<number>;
837
- /** Whether the radio button is currently the active one (focused). */
838
- readonly active: _angular_core.Signal<boolean>;
839
- /** Whether the radio button is selected. */
840
- readonly selected: SignalLike<boolean>;
841
- /** Whether the radio button is selectable. */
842
- readonly selectable: () => boolean;
843
- /** Whether the radio button is disabled. */
844
- readonly disabled: SignalLike<boolean>;
845
- /** A reference to the parent radio group. */
846
- readonly group: SignalLike<RadioGroupPattern<V> | undefined>;
847
- /** The tabindex of the radio button. */
848
- readonly tabindex: _angular_core.Signal<0 | -1 | undefined>;
849
- /** The HTML element associated with the radio button. */
850
- readonly element: SignalLike<HTMLElement>;
851
- /** The search term for typeahead. */
852
- readonly searchTerm: () => string;
853
- constructor(inputs: RadioButtonInputs<V>);
854
- }
855
-
856
- /** Represents the required inputs for a radio group. */
857
- type RadioGroupInputs<V> = Omit<ListInputs<RadioButtonPattern<V>, V>, 'multi' | 'selectionMode' | 'wrap' | 'typeaheadDelay'> & {
858
- /** Whether the radio group is disabled. */
859
- disabled: SignalLike<boolean>;
860
- /** Whether the radio group is readonly. */
861
- readonly: SignalLike<boolean>;
862
- /** A function that returns the radio button associated with a given element. */
863
- getItem: (e: PointerEvent) => RadioButtonPattern<V> | undefined;
864
- };
865
- /** Controls the state of a radio group. */
866
- declare class RadioGroupPattern<V> {
867
- readonly inputs: RadioGroupInputs<V>;
868
- /** The list behavior for the radio group. */
869
- readonly listBehavior: List<RadioButtonPattern<V>, V>;
870
- /** Whether the radio group is vertically or horizontally oriented. */
871
- readonly orientation: SignalLike<'vertical' | 'horizontal'>;
872
- /** Whether focus should wrap when navigating. */
873
- readonly wrap: _angular_core.WritableSignal<boolean>;
874
- /** The selection strategy used by the radio group. */
875
- readonly selectionMode: _angular_core.WritableSignal<"follow" | "explicit">;
876
- /** Whether the radio group is disabled. */
877
- readonly disabled: _angular_core.Signal<boolean>;
878
- /** The currently selected radio button. */
879
- readonly selectedItem: _angular_core.Signal<RadioButtonPattern<V>>;
880
- /** Whether the radio group is readonly. */
881
- readonly readonly: _angular_core.Signal<boolean>;
882
- /** The tabindex of the radio group. */
883
- readonly tabindex: _angular_core.Signal<0 | -1>;
884
- /** The id of the current active radio button (if using activedescendant). */
885
- readonly activedescendant: _angular_core.Signal<string | undefined>;
886
- /** The key used to navigate to the previous radio button. */
887
- private readonly _prevKey;
888
- /** The key used to navigate to the next radio button. */
889
- private readonly _nextKey;
890
- /** The keydown event manager for the radio group. */
891
- readonly keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
892
- /** The pointerdown event manager for the radio group. */
893
- readonly pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
894
- constructor(inputs: RadioGroupInputs<V>);
895
- /** Handles keydown events for the radio group. */
896
- onKeydown(event: KeyboardEvent): void;
897
- /** Handles pointerdown events for the radio group. */
898
- onPointerdown(event: PointerEvent): void;
899
- /**
900
- * Sets the radio group to its default initial state.
901
- *
902
- * Sets the active index to the selected radio button if one exists and is focusable.
903
- * Otherwise, sets the active index to the first focusable radio button.
904
- */
905
- setDefaultState(): void;
906
- /** Validates the state of the radio group and returns a list of accessibility violations. */
907
- validate(): string[];
908
- }
909
-
910
- /** Represents the required inputs for a toolbar widget in a toolbar. */
911
- interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'value' | 'index' | 'selectable'> {
912
- /** A reference to the parent toolbar. */
913
- toolbar: SignalLike<ToolbarPattern<V>>;
914
- }
915
- declare class ToolbarWidgetPattern<V> implements ListItem<V> {
916
- readonly inputs: ToolbarWidgetInputs<V>;
917
- /** A unique identifier for the widget. */
918
- readonly id: SignalLike<string>;
919
- /** The html element that should receive focus. */
920
- readonly element: SignalLike<HTMLElement>;
921
- /** Whether the widget is disabled. */
922
- readonly disabled: SignalLike<boolean>;
923
- /** A reference to the parent toolbar. */
924
- readonly toolbar: SignalLike<ToolbarPattern<V>>;
925
- /** The tabindex of the widgdet. */
926
- readonly tabindex: _angular_core.Signal<0 | -1>;
927
- /** The text used by the typeahead search. */
928
- readonly searchTerm: () => string;
929
- /** The value associated with the widget. */
930
- readonly value: () => V;
931
- /** Whether the widget is selectable. */
932
- readonly selectable: () => boolean;
933
- /** The position of the widget within the toolbar. */
934
- readonly index: _angular_core.Signal<number>;
935
- /** Whether the widget is currently the active one (focused). */
936
- readonly active: _angular_core.Signal<boolean>;
937
- constructor(inputs: ToolbarWidgetInputs<V>);
938
- }
939
-
940
- /** An interface that allows sub patterns to expose the necessary controls for the toolbar. */
941
- interface ToolbarWidgetGroupControls {
942
- /** Whether the widget group is currently on the first item. */
943
- isOnFirstItem(): boolean;
944
- /** Whether the widget group is currently on the last item. */
945
- isOnLastItem(): boolean;
946
- /** Navigates to the next widget in the group. */
947
- next(wrap: boolean): void;
948
- /** Navigates to the previous widget in the group. */
949
- prev(wrap: boolean): void;
950
- /** Navigates to the first widget in the group. */
951
- first(): void;
952
- /** Navigates to the last widget in the group. */
953
- last(): void;
954
- /** Removes focus from the widget group. */
955
- unfocus(): void;
956
- /** Triggers the action of the currently active widget in the group. */
957
- trigger(): void;
958
- /** Navigates to the widget targeted by a pointer event. */
959
- goto(event: PointerEvent): void;
960
- /** Sets the widget group to its default initial state. */
961
- setDefaultState(): void;
962
- }
963
- /** Represents the required inputs for a toolbar widget group. */
964
- interface ToolbarWidgetGroupInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'value' | 'index' | 'selectable'> {
965
- /** A reference to the parent toolbar. */
966
- toolbar: SignalLike<ToolbarPattern<V> | undefined>;
967
- /** The controls for the sub patterns associated with the toolbar. */
968
- controls: SignalLike<ToolbarWidgetGroupControls | undefined>;
969
- }
970
- /** A group of widgets within a toolbar that provides nested navigation. */
971
- declare class ToolbarWidgetGroupPattern<V> implements ListItem<V> {
972
- readonly inputs: ToolbarWidgetGroupInputs<V>;
973
- /** A unique identifier for the widget. */
974
- readonly id: SignalLike<string>;
975
- /** The html element that should receive focus. */
976
- readonly element: SignalLike<HTMLElement>;
977
- /** Whether the widget is disabled. */
978
- readonly disabled: SignalLike<boolean>;
979
- /** A reference to the parent toolbar. */
980
- readonly toolbar: SignalLike<ToolbarPattern<V> | undefined>;
981
- /** The text used by the typeahead search. */
982
- readonly searchTerm: () => string;
983
- /** The value associated with the widget. */
984
- readonly value: () => V;
985
- /** Whether the widget is selectable. */
986
- readonly selectable: () => boolean;
987
- /** The position of the widget within the toolbar. */
988
- readonly index: _angular_core.Signal<number>;
989
- /** The actions that can be performed on the widget group. */
990
- readonly controls: SignalLike<ToolbarWidgetGroupControls>;
991
- /** Default toolbar widget group controls when no controls provided. */
992
- private readonly _defaultControls;
993
- constructor(inputs: ToolbarWidgetGroupInputs<V>);
994
- }
995
-
996
- /** Represents the required inputs for a toolbar. */
997
- type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'value' | 'selectionMode' | 'focusMode'> & {
998
- /** A function that returns the toolbar item associated with a given element. */
999
- getItem: (e: Element) => ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V> | undefined;
1000
- };
1001
- /** Controls the state of a toolbar. */
1002
- declare class ToolbarPattern<V> {
1003
- readonly inputs: ToolbarInputs<V>;
1004
- /** The list behavior for the toolbar. */
1005
- readonly listBehavior: List<ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>, V>;
1006
- /** Whether the tablist is vertically or horizontally oriented. */
1007
- readonly orientation: SignalLike<'vertical' | 'horizontal'>;
1008
- /** Whether disabled items in the group should be skipped when navigating. */
1009
- readonly skipDisabled: SignalLike<boolean>;
1010
- /** Whether the toolbar is disabled. */
1011
- readonly disabled: _angular_core.Signal<boolean>;
1012
- /** The tabindex of the toolbar (if using activedescendant). */
1013
- readonly tabindex: _angular_core.Signal<0 | -1>;
1014
- /** The id of the current active widget (if using activedescendant). */
1015
- readonly activedescendant: _angular_core.Signal<string | undefined>;
1016
- /** The key used to navigate to the previous widget. */
1017
- private readonly _prevKey;
1018
- /** The key used to navigate to the next widget. */
1019
- private readonly _nextKey;
1020
- /** The alternate key used to navigate to the previous widget. */
1021
- private readonly _altPrevKey;
1022
- /** The alternate key used to navigate to the next widget. */
1023
- private readonly _altNextKey;
1024
- /** The keydown event manager for the toolbar. */
1025
- private readonly _keydown;
1026
- /** The pointerdown event manager for the toolbar. */
1027
- private readonly _pointerdown;
1028
- /** Navigates to the next widget in the toolbar. */
1029
- private _next;
1030
- /** Navigates to the previous widget in the toolbar. */
1031
- private _prev;
1032
- private _groupNext;
1033
- private _groupPrev;
1034
- /** Triggers the action of the currently active widget. */
1035
- private _trigger;
1036
- /** Navigates to the first widget in the toolbar. */
1037
- private _first;
1038
- /** Navigates to the last widget in the toolbar. */
1039
- private _last;
1040
- /** Navigates to the widget targeted by a pointer event. */
1041
- private _goto;
1042
- constructor(inputs: ToolbarInputs<V>);
1043
- /** Handles keydown events for the toolbar. */
1044
- onKeydown(event: KeyboardEvent): void;
1045
- /** Handles pointerdown events for the toolbar. */
1046
- onPointerdown(event: PointerEvent): void;
1047
- /**
1048
- * Sets the toolbar to its default initial state.
1049
- *
1050
- * Sets the active index to the selected widget if one exists and is focusable.
1051
- * Otherwise, sets the active index to the first focusable widget.
1052
- */
1053
- setDefaultState(): void;
1054
- /** Validates the state of the toolbar and returns a list of accessibility violations. */
1055
- validate(): string[];
1056
- }
1057
-
1058
- /** Represents the required inputs for a toolbar controlled radio group. */
1059
- type ToolbarRadioGroupInputs<V> = RadioGroupInputs<V> & {
1060
- /** The toolbar controlling the radio group. */
1061
- toolbar: SignalLike<ToolbarPattern<V> | undefined>;
1062
- };
1063
- /** Controls the state of a radio group in a toolbar. */
1064
- declare class ToolbarRadioGroupPattern<V> extends RadioGroupPattern<V> implements ToolbarWidgetGroupControls {
1065
- readonly inputs: ToolbarRadioGroupInputs<V>;
1066
- constructor(inputs: ToolbarRadioGroupInputs<V>);
1067
- /** Noop. The toolbar handles keydown events. */
1068
- onKeydown(_: KeyboardEvent): void;
1069
- /** Noop. The toolbar handles pointerdown events. */
1070
- onPointerdown(_: PointerEvent): void;
1071
- /** Whether the radio group is currently on the first item. */
1072
- isOnFirstItem(): boolean;
1073
- /** Whether the radio group is currently on the last item. */
1074
- isOnLastItem(): boolean;
1075
- /** Navigates to the next radio button in the group. */
1076
- next(wrap: boolean): void;
1077
- /** Navigates to the previous radio button in the group. */
1078
- prev(wrap: boolean): void;
1079
- /** Navigates to the first radio button in the group. */
1080
- first(): void;
1081
- /** Navigates to the last radio button in the group. */
1082
- last(): void;
1083
- /** Removes focus from the radio group. */
1084
- unfocus(): void;
1085
- /** Triggers the action of the currently active radio button in the group. */
1086
- trigger(): void;
1087
- /** Navigates to the radio button targeted by a pointer event. */
1088
- goto(e: PointerEvent): void;
810
+ /** Handles focusin events for the menu item. */
811
+ onFocusIn(): void;
1089
812
  }
1090
813
 
1091
814
  /** Represents an item that can be expanded or collapsed. */
1092
815
  interface ExpansionItem {
1093
816
  /** Whether the item is expandable. */
1094
817
  expandable: SignalLike<boolean>;
1095
- /** Used to uniquely identify an expansion item. */
1096
- expansionId: SignalLike<string>;
818
+ /** Whether the item is expanded. */
819
+ expanded: WritableSignalLike<boolean>;
1097
820
  /** Whether the expansion is disabled. */
1098
821
  disabled: SignalLike<boolean>;
1099
822
  }
1100
- interface ExpansionControl extends ExpansionItem {
1101
- }
1102
- /**
1103
- * Controls a single item's expansion state and interactions,
1104
- * delegating actual state changes to an Expansion manager.
1105
- */
1106
- declare class ExpansionControl {
1107
- readonly inputs: ExpansionItem & {
1108
- expansionManager: ListExpansion;
1109
- };
1110
- /** Whether this specific item is currently expanded. Derived from the Expansion manager. */
1111
- readonly isExpanded: _angular_core.Signal<boolean>;
1112
- /** Whether this item can be expanded. */
1113
- readonly isExpandable: _angular_core.Signal<boolean>;
1114
- constructor(inputs: ExpansionItem & {
1115
- expansionManager: ListExpansion;
1116
- });
1117
- /** Requests the Expansion manager to open this item. */
1118
- open(): void;
1119
- /** Requests the Expansion manager to close this item. */
1120
- close(): void;
1121
- /** Requests the Expansion manager to toggle this item. */
1122
- toggle(): void;
1123
- }
1124
823
  /** Represents the required inputs for an expansion behavior. */
1125
824
  interface ListExpansionInputs {
1126
825
  /** Whether multiple items can be expanded at once. */
1127
826
  multiExpandable: SignalLike<boolean>;
1128
- /** An array of ids of the currently expanded items. */
1129
- expandedIds: WritableSignalLike<string[]>;
1130
827
  /** An array of expansion items. */
1131
828
  items: SignalLike<ExpansionItem[]>;
1132
829
  /** Whether all expansions are disabled. */
@@ -1135,23 +832,19 @@ interface ListExpansionInputs {
1135
832
  /** Manages the expansion state of a list of items. */
1136
833
  declare class ListExpansion {
1137
834
  readonly inputs: ListExpansionInputs;
1138
- /** A signal holding an array of ids of the currently expanded items. */
1139
- expandedIds: WritableSignalLike<string[]>;
1140
835
  constructor(inputs: ListExpansionInputs);
1141
836
  /** Opens the specified item. */
1142
- open(item: ExpansionItem): void;
837
+ open(item: ExpansionItem): boolean;
1143
838
  /** Closes the specified item. */
1144
- close(item: ExpansionItem): void;
839
+ close(item: ExpansionItem): boolean;
1145
840
  /** Toggles the expansion state of the specified item. */
1146
- toggle(item: ExpansionItem): void;
841
+ toggle(item: ExpansionItem): boolean;
1147
842
  /** Opens all focusable items in the list. */
1148
843
  openAll(): void;
1149
844
  /** Closes all focusable items in the list. */
1150
845
  closeAll(): void;
1151
846
  /** Checks whether the specified item is expandable / collapsible. */
1152
847
  isExpandable(item: ExpansionItem): boolean;
1153
- /** Checks whether the specified item is currently expanded. */
1154
- isExpanded(item: ExpansionItem): boolean;
1155
848
  }
1156
849
 
1157
850
  /** Represents the required inputs for the label control. */
@@ -1177,51 +870,50 @@ declare class LabelControl {
1177
870
  }
1178
871
 
1179
872
  /** The required inputs to tabs. */
1180
- interface TabInputs extends Omit<ListItem<string>, 'searchTerm' | 'index' | 'selectable'>, Omit<ExpansionItem, 'expansionId' | 'expandable'> {
873
+ interface TabInputs extends Omit<ListNavigationItem, 'index'>, Omit<ExpansionItem, 'expandable'> {
1181
874
  /** The parent tablist that controls the tab. */
1182
875
  tablist: SignalLike<TabListPattern>;
1183
876
  /** The remote tabpanel controlled by the tab. */
1184
877
  tabpanel: SignalLike<TabPanelPattern | undefined>;
878
+ /** The remote tabpanel unique identifier. */
879
+ value: SignalLike<string>;
1185
880
  }
1186
881
  /** A tab in a tablist. */
1187
882
  declare class TabPattern {
1188
883
  readonly inputs: TabInputs;
1189
- /** Controls expansion for this tab. */
1190
- readonly expansion: ExpansionControl;
1191
884
  /** A global unique identifier for the tab. */
1192
885
  readonly id: SignalLike<string>;
1193
886
  /** The index of the tab. */
1194
887
  readonly index: _angular_core.Signal<number>;
1195
- /** A local unique identifier for the tab. */
888
+ /** The remote tabpanel unique identifier. */
1196
889
  readonly value: SignalLike<string>;
1197
890
  /** Whether the tab is disabled. */
1198
891
  readonly disabled: SignalLike<boolean>;
1199
892
  /** The html element that should receive focus. */
1200
893
  readonly element: SignalLike<HTMLElement>;
1201
- /** Whether the tab is selectable. */
1202
- readonly selectable: () => boolean;
1203
- /** The text used by the typeahead search. */
1204
- readonly searchTerm: () => string;
1205
- /** Whether this tab has expandable content. */
1206
- readonly expandable: _angular_core.Signal<boolean>;
1207
- /** The unique identifier used by the expansion behavior. */
1208
- readonly expansionId: _angular_core.Signal<string>;
1209
- /** Whether the tab is expanded. */
1210
- readonly expanded: _angular_core.Signal<boolean>;
894
+ /** Whether this tab has expandable panel. */
895
+ readonly expandable: SignalLike<boolean>;
896
+ /** Whether the tab panel is expanded. */
897
+ readonly expanded: WritableSignalLike<boolean>;
1211
898
  /** Whether the tab is active. */
1212
899
  readonly active: _angular_core.Signal<boolean>;
1213
900
  /** Whether the tab is selected. */
1214
901
  readonly selected: _angular_core.Signal<boolean>;
1215
- /** The tabindex of the tab. */
1216
- readonly tabindex: _angular_core.Signal<0 | -1>;
902
+ /** The tab index of the tab. */
903
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1217
904
  /** The id of the tabpanel associated with the tab. */
1218
905
  readonly controls: _angular_core.Signal<string | undefined>;
1219
906
  constructor(inputs: TabInputs);
907
+ /** Opens the tab. */
908
+ open(): boolean;
1220
909
  }
1221
910
  /** The required inputs for the tabpanel. */
1222
911
  interface TabPanelInputs extends LabelControlOptionalInputs {
912
+ /** A global unique identifier for the tabpanel. */
1223
913
  id: SignalLike<string>;
914
+ /** The tab that controls this tabpanel. */
1224
915
  tab: SignalLike<TabPattern | undefined>;
916
+ /** A local unique identifier for the tabpanel. */
1225
917
  value: SignalLike<string>;
1226
918
  }
1227
919
  /** A tabpanel associated with a tab. */
@@ -1235,29 +927,38 @@ declare class TabPanelPattern {
1235
927
  readonly labelManager: LabelControl;
1236
928
  /** Whether the tabpanel is hidden. */
1237
929
  readonly hidden: _angular_core.Signal<boolean>;
1238
- /** The tabindex of this tabpanel. */
1239
- readonly tabindex: _angular_core.Signal<0 | -1>;
930
+ /** The tab index of this tabpanel. */
931
+ readonly tabIndex: _angular_core.Signal<-1 | 0>;
1240
932
  /** The aria-labelledby value for this tabpanel. */
1241
933
  readonly labelledBy: _angular_core.Signal<string | undefined>;
1242
934
  constructor(inputs: TabPanelInputs);
1243
935
  }
1244
936
  /** The required inputs for the tablist. */
1245
- type TabListInputs = Omit<ListInputs<TabPattern, string>, 'multi' | 'typeaheadDelay'> & Omit<ListExpansionInputs, 'multiExpandable' | 'expandedIds' | 'items'>;
937
+ interface TabListInputs extends Omit<ListNavigationInputs<TabPattern>, 'multi'>, Omit<ListExpansionInputs, 'multiExpandable' | 'items'> {
938
+ /** The selection strategy used by the tablist. */
939
+ selectionMode: SignalLike<'follow' | 'explicit'>;
940
+ }
1246
941
  /** Controls the state of a tablist. */
1247
942
  declare class TabListPattern {
1248
943
  readonly inputs: TabListInputs;
1249
- /** The list behavior for the tablist. */
1250
- readonly listBehavior: List<TabPattern, string>;
944
+ /** The list focus behavior for the tablist. */
945
+ readonly focusBehavior: ListFocus<TabPattern>;
946
+ /** The list navigation behavior for the tablist. */
947
+ readonly navigationBehavior: ListNavigation<TabPattern>;
1251
948
  /** Controls expansion for the tablist. */
1252
- readonly expansionManager: ListExpansion;
949
+ readonly expansionBehavior: ListExpansion;
950
+ /** The currently active tab. */
951
+ readonly activeTab: SignalLike<TabPattern | undefined>;
952
+ /** The currently selected tab. */
953
+ readonly selectedTab: WritableSignal<TabPattern | undefined>;
1253
954
  /** Whether the tablist is vertically or horizontally oriented. */
1254
955
  readonly orientation: SignalLike<'vertical' | 'horizontal'>;
1255
956
  /** Whether the tablist is disabled. */
1256
957
  readonly disabled: SignalLike<boolean>;
1257
- /** The tabindex of the tablist. */
1258
- readonly tabindex: _angular_core.Signal<0 | -1>;
958
+ /** The tab index of the tablist. */
959
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1259
960
  /** The id of the current active tab. */
1260
- readonly activedescendant: _angular_core.Signal<string | undefined>;
961
+ readonly activeDescendant: _angular_core.Signal<string | undefined>;
1261
962
  /** Whether selection should follow focus. */
1262
963
  readonly followFocus: _angular_core.Signal<boolean>;
1263
964
  /** The key used to navigate to the previous tab in the tablist. */
@@ -1282,95 +983,230 @@ declare class TabListPattern {
1282
983
  onKeydown(event: KeyboardEvent): void;
1283
984
  /** The pointerdown event manager for the tablist. */
1284
985
  onPointerdown(event: PointerEvent): void;
986
+ /** Opens the tab by given value. */
987
+ open(value: string): boolean;
988
+ /** Opens the given tab or the current active tab. */
989
+ open(tab?: TabPattern): boolean;
990
+ /** Executes a navigation operation and expand the active tab if needed. */
991
+ private _navigate;
1285
992
  /** Returns the tab item associated with the given pointer event. */
1286
993
  private _getItem;
1287
994
  }
1288
995
 
996
+ /** Represents the required inputs for a toolbar widget group. */
997
+ interface ToolbarWidgetGroupInputs<T extends ListItem<V>, V> {
998
+ /** A reference to the parent toolbar. */
999
+ toolbar: SignalLike<ToolbarPattern<V> | undefined>;
1000
+ /** Whether the widget group is disabled. */
1001
+ disabled: SignalLike<boolean>;
1002
+ /** The list of items within the widget group. */
1003
+ items: SignalLike<T[]>;
1004
+ /** Whether the group allows multiple widgets to be selected. */
1005
+ multi: SignalLike<boolean>;
1006
+ }
1007
+ /** A group of widgets within a toolbar that provides nested navigation. */
1008
+ declare class ToolbarWidgetGroupPattern<T extends ListItem<V>, V> {
1009
+ readonly inputs: ToolbarWidgetGroupInputs<T, V>;
1010
+ /** Whether the widget is disabled. */
1011
+ readonly disabled: () => boolean;
1012
+ /** A reference to the parent toolbar. */
1013
+ readonly toolbar: () => ToolbarPattern<V> | undefined;
1014
+ /** Whether the group allows multiple widgets to be selected. */
1015
+ readonly multi: () => boolean;
1016
+ readonly searchTerm: () => string;
1017
+ readonly value: () => V;
1018
+ readonly selectable: () => boolean;
1019
+ readonly element: () => undefined;
1020
+ constructor(inputs: ToolbarWidgetGroupInputs<T, V>);
1021
+ }
1022
+
1023
+ /** Represents the required inputs for a toolbar widget in a toolbar. */
1024
+ interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index' | 'selectable'> {
1025
+ /** A reference to the parent toolbar. */
1026
+ toolbar: SignalLike<ToolbarPattern<V>>;
1027
+ /** A reference to the parent widget group. */
1028
+ group: SignalLike<ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined>;
1029
+ }
1030
+ declare class ToolbarWidgetPattern<V> implements ListItem<V> {
1031
+ readonly inputs: ToolbarWidgetInputs<V>;
1032
+ /** A unique identifier for the widget. */
1033
+ readonly id: () => string;
1034
+ /** The html element that should receive focus. */
1035
+ readonly element: () => HTMLElement | undefined;
1036
+ /** Whether the widget is disabled. */
1037
+ readonly disabled: () => boolean;
1038
+ /** A reference to the parent toolbar. */
1039
+ readonly group: () => ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined;
1040
+ /** A reference to the toolbar containing the widget. */
1041
+ readonly toolbar: () => ToolbarPattern<V>;
1042
+ /** The tabindex of the widget. */
1043
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1044
+ /** The text used by the typeahead search. */
1045
+ readonly searchTerm: () => string;
1046
+ /** The value associated with the widget. */
1047
+ readonly value: () => V;
1048
+ /** Whether the widget is selectable. */
1049
+ readonly selectable: () => boolean;
1050
+ /** The position of the widget within the toolbar. */
1051
+ readonly index: _angular_core.Signal<number>;
1052
+ /** Whether the widget is selected (only relevant in a selection group). */
1053
+ readonly selected: _angular_core.Signal<boolean>;
1054
+ /** Whether the widget is currently the active one (focused). */
1055
+ readonly active: SignalLike<boolean>;
1056
+ constructor(inputs: ToolbarWidgetInputs<V>);
1057
+ }
1058
+
1059
+ /** Represents the required inputs for a toolbar. */
1060
+ type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'values' | 'selectionMode' | 'focusMode'> & {
1061
+ /** A function that returns the toolbar item associated with a given element. */
1062
+ getItem: (e: Element) => ToolbarWidgetPattern<V> | undefined;
1063
+ };
1064
+ /** Controls the state of a toolbar. */
1065
+ declare class ToolbarPattern<V> {
1066
+ readonly inputs: ToolbarInputs<V>;
1067
+ /** The list behavior for the toolbar. */
1068
+ readonly listBehavior: List<ToolbarWidgetPattern<V>, V>;
1069
+ /** Whether the tablist is vertically or horizontally oriented. */
1070
+ readonly orientation: SignalLike<'vertical' | 'horizontal'>;
1071
+ /** Whether disabled items in the group should be focusable. */
1072
+ readonly softDisabled: SignalLike<boolean>;
1073
+ /** Whether the toolbar is disabled. */
1074
+ readonly disabled: _angular_core.Signal<boolean>;
1075
+ /** The tab index of the toolbar (if using activedescendant). */
1076
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1077
+ /** The id of the current active widget (if using activedescendant). */
1078
+ readonly activeDescendant: _angular_core.Signal<string | undefined>;
1079
+ /** The currently active item in the toolbar. */
1080
+ readonly activeItem: () => ToolbarWidgetPattern<V> | undefined;
1081
+ /** The key used to navigate to the previous widget. */
1082
+ private readonly _prevKey;
1083
+ /** The key used to navigate to the next widget. */
1084
+ private readonly _nextKey;
1085
+ /** The alternate key used to navigate to the previous widget. */
1086
+ private readonly _altPrevKey;
1087
+ /** The alternate key used to navigate to the next widget. */
1088
+ private readonly _altNextKey;
1089
+ /** The keydown event manager for the toolbar. */
1090
+ private readonly _keydown;
1091
+ /** Navigates to the next widget in a widget group. */
1092
+ private _groupNext;
1093
+ /** Navigates to the previous widget in a widget group. */
1094
+ private _groupPrev;
1095
+ /** Navigates to the widget targeted by a pointer event. */
1096
+ private _goto;
1097
+ select(): void;
1098
+ constructor(inputs: ToolbarInputs<V>);
1099
+ /** Handles keydown events for the toolbar. */
1100
+ onKeydown(event: KeyboardEvent): void;
1101
+ onPointerdown(event: PointerEvent): void;
1102
+ /** Handles click events for the toolbar. */
1103
+ onClick(event: MouseEvent): void;
1104
+ /**
1105
+ * Sets the toolbar to its default initial state.
1106
+ *
1107
+ * Sets the active index to the selected widget if one exists and is focusable.
1108
+ * Otherwise, sets the active index to the first focusable widget.
1109
+ */
1110
+ setDefaultState(): void;
1111
+ /** Validates the state of the toolbar and returns a list of accessibility violations. */
1112
+ validate(): string[];
1113
+ }
1114
+
1289
1115
  /** Inputs of the AccordionGroupPattern. */
1290
- type AccordionGroupInputs = Omit<ListNavigationInputs<AccordionTriggerPattern> & ListFocusInputs<AccordionTriggerPattern> & Omit<ListExpansionInputs, 'items'>, 'focusMode'>;
1291
- interface AccordionGroupPattern extends AccordionGroupInputs {
1116
+ interface AccordionGroupInputs extends Omit<ListNavigationInputs<AccordionTriggerPattern> & ListFocusInputs<AccordionTriggerPattern> & Omit<ListExpansionInputs, 'items'>, 'focusMode'> {
1117
+ /** A function that returns the trigger associated with a given element. */
1118
+ getItem: (e: Element | null | undefined) => AccordionTriggerPattern | undefined;
1292
1119
  }
1293
1120
  /** A pattern controls the nested Accordions. */
1294
1121
  declare class AccordionGroupPattern {
1295
1122
  readonly inputs: AccordionGroupInputs;
1296
1123
  /** Controls navigation for the group. */
1297
- navigation: ListNavigation<AccordionTriggerPattern>;
1124
+ readonly navigationBehavior: ListNavigation<AccordionTriggerPattern>;
1298
1125
  /** Controls focus for the group. */
1299
- focusManager: ListFocus<AccordionTriggerPattern>;
1126
+ readonly focusBehavior: ListFocus<AccordionTriggerPattern>;
1300
1127
  /** Controls expansion for the group. */
1301
- expansionManager: ListExpansion;
1128
+ readonly expansionBehavior: ListExpansion;
1302
1129
  constructor(inputs: AccordionGroupInputs);
1130
+ /** The key used to navigate to the previous accordion trigger. */
1131
+ prevKey: _angular_core.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
1132
+ /** The key used to navigate to the next accordion trigger. */
1133
+ nextKey: _angular_core.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
1134
+ /** The keydown event manager for the accordion trigger. */
1135
+ keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
1136
+ /** The pointerdown event manager for the accordion trigger. */
1137
+ pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
1138
+ /** Handles keydown events on the trigger, delegating to the group if not disabled. */
1139
+ onKeydown(event: KeyboardEvent): void;
1140
+ /** Handles pointerdown events on the trigger, delegating to the group if not disabled. */
1141
+ onPointerdown(event: PointerEvent): void;
1142
+ /** Handles focus events on the trigger. This ensures the tabbing changes the active index. */
1143
+ onFocus(event: FocusEvent): void;
1144
+ /** Toggles the expansion state of the active accordion item. */
1145
+ toggle(): void;
1303
1146
  }
1304
1147
  /** Inputs for the AccordionTriggerPattern. */
1305
- type AccordionTriggerInputs = Omit<ListNavigationItem & ListFocusItem, 'index'> & Omit<ExpansionItem, 'expansionId' | 'expandable'> & {
1306
- /** A local unique identifier for the trigger. */
1307
- value: SignalLike<string>;
1148
+ interface AccordionTriggerInputs extends Omit<ListNavigationItem & ListFocusItem, 'index'>, Omit<ExpansionItem, 'expandable'> {
1149
+ /** A local unique identifier for the trigger's corresponding panel. */
1150
+ panelId: SignalLike<string>;
1308
1151
  /** The parent accordion group that controls this trigger. */
1309
1152
  accordionGroup: SignalLike<AccordionGroupPattern>;
1310
1153
  /** The accordion panel controlled by this trigger. */
1311
1154
  accordionPanel: SignalLike<AccordionPanelPattern | undefined>;
1312
- };
1313
- interface AccordionTriggerPattern extends AccordionTriggerInputs {
1314
1155
  }
1315
1156
  /** A pattern controls the expansion state of an accordion. */
1316
- declare class AccordionTriggerPattern {
1157
+ declare class AccordionTriggerPattern implements ListNavigationItem, ListFocusItem, ExpansionItem {
1317
1158
  readonly inputs: AccordionTriggerInputs;
1318
- /** Whether this tab has expandable content. */
1319
- expandable: SignalLike<boolean>;
1320
- /** The unique identifier used by the expansion behavior. */
1321
- expansionId: SignalLike<string>;
1322
- /** Whether an accordion is expanded. */
1323
- expanded: SignalLike<boolean>;
1324
- /** Controls the expansion state for the trigger. */
1325
- expansionControl: ExpansionControl;
1159
+ /** A unique identifier for this trigger. */
1160
+ readonly id: SignalLike<string>;
1161
+ /** A reference to the trigger element. */
1162
+ readonly element: SignalLike<HTMLElement>;
1163
+ /** Whether this trigger has expandable panel. */
1164
+ readonly expandable: SignalLike<boolean>;
1165
+ /** Whether the corresponding panel is expanded. */
1166
+ readonly expanded: WritableSignalLike<boolean>;
1326
1167
  /** Whether the trigger is active. */
1327
- active: _angular_core.Signal<boolean>;
1168
+ readonly active: _angular_core.Signal<boolean>;
1328
1169
  /** Id of the accordion panel controlled by the trigger. */
1329
- controls: _angular_core.Signal<string | undefined>;
1170
+ readonly controls: _angular_core.Signal<string | undefined>;
1330
1171
  /** The tabindex of the trigger. */
1331
- tabindex: _angular_core.Signal<-1 | 0>;
1172
+ readonly tabIndex: _angular_core.Signal<-1 | 0>;
1332
1173
  /** Whether the trigger is disabled. Disabling an accordion group disables all the triggers. */
1333
- disabled: _angular_core.Signal<boolean>;
1174
+ readonly disabled: _angular_core.Signal<boolean>;
1175
+ /** Whether the trigger is hard disabled. */
1176
+ readonly hardDisabled: _angular_core.Signal<boolean>;
1334
1177
  /** The index of the trigger within its accordion group. */
1335
- index: _angular_core.Signal<number>;
1178
+ readonly index: _angular_core.Signal<number>;
1336
1179
  constructor(inputs: AccordionTriggerInputs);
1337
- /** The key used to navigate to the previous accordion trigger. */
1338
- prevKey: _angular_core.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
1339
- /** The key used to navigate to the next accordion trigger. */
1340
- nextKey: _angular_core.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
1341
- /** The keydown event manager for the accordion trigger. */
1342
- keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
1343
- /** The pointerdown event manager for the accordion trigger. */
1344
- pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
1345
- /** Handles keydown events on the trigger, delegating to the group if not disabled. */
1346
- onKeydown(event: KeyboardEvent): void;
1347
- /** Handles pointerdown events on the trigger, delegating to the group if not disabled. */
1348
- onPointerdown(event: PointerEvent): void;
1349
- /** Handles focus events on the trigger. This ensures the tabbing changes the active index. */
1350
- onFocus(event: FocusEvent): void;
1351
- private _getItem;
1180
+ /** Opens the accordion panel. */
1181
+ open(): void;
1182
+ /** Closes the accordion panel. */
1183
+ close(): void;
1184
+ /** Toggles the accordion panel. */
1185
+ toggle(): void;
1352
1186
  }
1353
1187
  /** Represents the required inputs for the AccordionPanelPattern. */
1354
1188
  interface AccordionPanelInputs {
1355
1189
  /** A global unique identifier for the panel. */
1356
1190
  id: SignalLike<string>;
1357
- /** A local unique identifier for the panel, matching its trigger's value. */
1358
- value: SignalLike<string>;
1191
+ /** A local unique identifier for the panel, matching its trigger's panelId. */
1192
+ panelId: SignalLike<string>;
1359
1193
  /** The parent accordion trigger that controls this panel. */
1360
1194
  accordionTrigger: SignalLike<AccordionTriggerPattern | undefined>;
1361
1195
  }
1362
- interface AccordionPanelPattern extends AccordionPanelInputs {
1363
- }
1364
1196
  /** Represents an accordion panel. */
1365
1197
  declare class AccordionPanelPattern {
1366
1198
  readonly inputs: AccordionPanelInputs;
1199
+ /** A global unique identifier for the panel. */
1200
+ id: SignalLike<string>;
1201
+ /** The parent accordion trigger that controls this panel. */
1202
+ accordionTrigger: SignalLike<AccordionTriggerPattern | undefined>;
1367
1203
  /** Whether the accordion panel is hidden. True if the associated trigger is not expanded. */
1368
1204
  hidden: SignalLike<boolean>;
1369
1205
  constructor(inputs: AccordionPanelInputs);
1370
1206
  }
1371
1207
 
1372
1208
  /** Represents the required inputs for a tree item. */
1373
- interface TreeItemInputs<V> extends Omit<ListItem<V>, 'index'> {
1209
+ interface TreeItemInputs<V> extends Omit<ListItem<V>, 'index'>, Omit<ExpansionItem, 'expandable'> {
1374
1210
  /** The parent item. */
1375
1211
  parent: SignalLike<TreeItemPattern<V> | TreePattern<V>>;
1376
1212
  /** Whether this item has children. Children can be lazily loaded. */
@@ -1403,30 +1239,26 @@ declare class TreeItemPattern<V> implements ListItem<V>, ExpansionItem {
1403
1239
  readonly children: SignalLike<TreeItemPattern<V>[]>;
1404
1240
  /** The position of this item among its siblings. */
1405
1241
  readonly index: _angular_core.Signal<number>;
1406
- /** The unique identifier used by the expansion behavior. */
1407
- readonly expansionId: SignalLike<string>;
1408
1242
  /** Controls expansion for child items. */
1409
- readonly expansionManager: ListExpansion;
1410
- /** Controls expansion for this item. */
1411
- readonly expansion: ExpansionControl;
1243
+ readonly expansionBehavior: ListExpansion;
1412
1244
  /** Whether the item is expandable. It's expandable if children item exist. */
1413
1245
  readonly expandable: SignalLike<boolean>;
1414
1246
  /** Whether the item is selectable. */
1415
1247
  readonly selectable: SignalLike<boolean>;
1248
+ /** Whether the item is expanded. */
1249
+ readonly expanded: WritableSignalLike<boolean>;
1416
1250
  /** The level of the current item in a tree. */
1417
1251
  readonly level: SignalLike<number>;
1418
- /** Whether this item is currently expanded. */
1419
- readonly expanded: _angular_core.Signal<boolean>;
1420
1252
  /** Whether this item is visible. */
1421
- readonly visible: _angular_core.Signal<boolean>;
1253
+ readonly visible: SignalLike<boolean>;
1422
1254
  /** The number of items under the same parent at the same level. */
1423
1255
  readonly setsize: _angular_core.Signal<number>;
1424
1256
  /** The position of this item among its siblings (1-based). */
1425
1257
  readonly posinset: _angular_core.Signal<number>;
1426
1258
  /** Whether the item is active. */
1427
1259
  readonly active: _angular_core.Signal<boolean>;
1428
- /** The tabindex of the item. */
1429
- readonly tabindex: _angular_core.Signal<0 | -1>;
1260
+ /** The tab index of the item. */
1261
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1430
1262
  /** Whether the item is selected. */
1431
1263
  readonly selected: SignalLike<boolean | undefined>;
1432
1264
  /** The current type of this item. */
@@ -1451,29 +1283,31 @@ interface TreeInputs<V> extends Omit<ListInputs<TreeItemPattern<V>, V>, 'items'>
1451
1283
  /** The aria-current type. */
1452
1284
  currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;
1453
1285
  }
1454
- interface TreePattern<V> extends TreeInputs<V> {
1455
- }
1456
1286
  /** Controls the state and interactions of a tree view. */
1457
- declare class TreePattern<V> {
1287
+ declare class TreePattern<V> implements TreeInputs<V> {
1458
1288
  readonly inputs: TreeInputs<V>;
1459
1289
  /** The list behavior for the tree. */
1460
1290
  readonly listBehavior: List<TreeItemPattern<V>, V>;
1461
1291
  /** Controls expansion for direct children of the tree root (top-level items). */
1462
- readonly expansionManager: ListExpansion;
1292
+ readonly expansionBehavior: ListExpansion;
1463
1293
  /** The root level is 0. */
1464
1294
  readonly level: () => number;
1465
1295
  /** The root is always expanded. */
1466
1296
  readonly expanded: () => boolean;
1467
- /** The tabindex of the tree. */
1468
- readonly tabindex: SignalLike<-1 | 0>;
1297
+ /** The root is always visible. */
1298
+ readonly visible: () => boolean;
1299
+ /** The tab index of the tree. */
1300
+ readonly tabIndex: SignalLike<-1 | 0>;
1469
1301
  /** The id of the current active item. */
1470
- readonly activedescendant: _angular_core.Signal<string | undefined>;
1302
+ readonly activeDescendant: _angular_core.Signal<string | undefined>;
1471
1303
  /** The direct children of the root (top-level tree items). */
1472
1304
  readonly children: _angular_core.Signal<TreeItemPattern<V>[]>;
1473
1305
  /** All currently visible tree items. An item is visible if their parent is expanded. */
1474
1306
  readonly visibleItems: _angular_core.Signal<TreeItemPattern<V>[]>;
1475
1307
  /** Whether the tree selection follows focus. */
1476
1308
  readonly followFocus: _angular_core.Signal<boolean>;
1309
+ /** Whether the tree direction is RTL. */
1310
+ readonly isRtl: _angular_core.Signal<boolean>;
1477
1311
  /** The key for navigating to the previous item. */
1478
1312
  readonly prevKey: _angular_core.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
1479
1313
  /** The key for navigating to the next item. */
@@ -1491,33 +1325,37 @@ declare class TreePattern<V> {
1491
1325
  /** The pointerdown event manager for the tree. */
1492
1326
  pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
1493
1327
  /** A unique identifier for the tree. */
1494
- id: SignalLike<string>;
1328
+ readonly id: SignalLike<string>;
1329
+ /** The host native element. */
1330
+ readonly element: SignalLike<HTMLElement>;
1495
1331
  /** Whether the tree is in navigation mode. */
1496
- nav: SignalLike<boolean>;
1332
+ readonly nav: SignalLike<boolean>;
1497
1333
  /** The aria-current type. */
1498
- currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;
1334
+ readonly currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;
1499
1335
  /** All items in the tree, in document order (DFS-like, a flattened list). */
1500
- allItems: SignalLike<TreeItemPattern<V>[]>;
1336
+ readonly allItems: SignalLike<TreeItemPattern<V>[]>;
1337
+ /** The focus strategy used by the tree. */
1338
+ readonly focusMode: SignalLike<'roving' | 'activedescendant'>;
1501
1339
  /** Whether the tree is disabled. */
1502
- disabled: SignalLike<boolean>;
1340
+ readonly disabled: SignalLike<boolean>;
1503
1341
  /** The currently active item in the tree. */
1504
- activeItem: WritableSignalLike<TreeItemPattern<V> | undefined>;
1505
- /** Whether disabled items should be skipped when navigating. */
1506
- skipDisabled: SignalLike<boolean>;
1342
+ readonly activeItem: WritableSignalLike<TreeItemPattern<V> | undefined>;
1343
+ /** Whether disabled items should be focusable. */
1344
+ readonly softDisabled: SignalLike<boolean>;
1507
1345
  /** Whether the focus should wrap when navigating past the first or last item. */
1508
- wrap: SignalLike<boolean>;
1346
+ readonly wrap: SignalLike<boolean>;
1509
1347
  /** The orientation of the tree. */
1510
- orientation: SignalLike<'vertical' | 'horizontal'>;
1348
+ readonly orientation: SignalLike<'vertical' | 'horizontal'>;
1511
1349
  /** The text direction of the tree. */
1512
- textDirection: SignalLike<'ltr' | 'rtl'>;
1350
+ readonly textDirection: SignalLike<'ltr' | 'rtl'>;
1513
1351
  /** Whether multiple items can be selected at the same time. */
1514
- multi: SignalLike<boolean>;
1352
+ readonly multi: SignalLike<boolean>;
1515
1353
  /** The selection mode of the tree. */
1516
- selectionMode: SignalLike<'follow' | 'explicit'>;
1354
+ readonly selectionMode: SignalLike<'follow' | 'explicit'>;
1517
1355
  /** The delay in milliseconds to wait before clearing the typeahead buffer. */
1518
- typeaheadDelay: SignalLike<number>;
1519
- /** The current value of the tree (the selected items). */
1520
- value: WritableSignalLike<V[]>;
1356
+ readonly typeaheadDelay: SignalLike<number>;
1357
+ /** The current selected items of the tree. */
1358
+ readonly values: WritableSignalLike<V[]>;
1521
1359
  constructor(inputs: TreeInputs<V>);
1522
1360
  /**
1523
1361
  * Sets the tree to it's default initial state.
@@ -1555,10 +1393,12 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
1555
1393
  /** The ARIA role for the tree. */
1556
1394
  role: () => "tree";
1557
1395
  activeId: _angular_core.Signal<string | undefined>;
1396
+ /** Returns the currently active (focused) item in the tree. */
1397
+ getActiveItem: () => TreeItemPattern<V> | undefined;
1558
1398
  /** The list of items in the tree. */
1559
1399
  items: _angular_core.Signal<TreeItemPattern<V>[]>;
1560
- /** The tabindex for the tree. Always -1 because the combobox handles focus. */
1561
- tabindex: SignalLike<-1 | 0>;
1400
+ /** The tab index for the tree. Always -1 because the combobox handles focus. */
1401
+ tabIndex: SignalLike<-1 | 0>;
1562
1402
  constructor(inputs: ComboboxTreeInputs<V>);
1563
1403
  /** Noop. The combobox handles keydown events. */
1564
1404
  onKeydown(_: KeyboardEvent): void;
@@ -1580,12 +1420,14 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
1580
1420
  unfocus: () => void;
1581
1421
  /** Selects the specified item in the tree or the current active item if not provided. */
1582
1422
  select: (item?: TreeItemPattern<V>) => void;
1423
+ /** Toggles the selection state of the given item in the tree or the current active item if not provided. */
1424
+ toggle: (item?: TreeItemPattern<V>) => void;
1583
1425
  /** Clears the selection in the tree. */
1584
1426
  clearSelection: () => void;
1585
1427
  /** Retrieves the TreeItemPattern associated with a pointer event. */
1586
1428
  getItem: (e: PointerEvent) => TreeItemPattern<V> | undefined;
1587
- /** Retrieves the currently selected item in the tree */
1588
- getSelectedItem: () => TreeItemPattern<V> | undefined;
1429
+ /** Retrieves the currently selected items in the tree */
1430
+ getSelectedItems: () => TreeItemPattern<V>[];
1589
1431
  /** Sets the value of the combobox tree. */
1590
1432
  setValue: (value: V | undefined) => void;
1591
1433
  /** Expands the currently focused item if it is expandable. */
@@ -1598,7 +1440,47 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
1598
1440
  expandAll: () => void;
1599
1441
  /** Collapses all of the tree items. */
1600
1442
  collapseAll: () => void;
1443
+ /** Whether the currently active item is selectable. */
1444
+ isItemSelectable: (item?: TreeItemPattern<V> | undefined) => boolean;
1445
+ }
1446
+
1447
+ /**
1448
+ * A container directive controls the visibility of its content.
1449
+ */
1450
+ declare class DeferredContentAware {
1451
+ readonly contentVisible: _angular_core.WritableSignal<boolean>;
1452
+ readonly preserveContent: _angular_core.ModelSignal<boolean>;
1453
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContentAware, never>;
1454
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContentAware, never, never, { "preserveContent": { "alias": "preserveContent"; "required": false; "isSignal": true; }; }, { "preserveContent": "preserveContentChange"; }, never, never, true, never>;
1455
+ }
1456
+ /**
1457
+ * DeferredContent loads/unloads the content based on the visibility.
1458
+ * The visibilty signal is sent from a parent directive implements
1459
+ * DeferredContentAware.
1460
+ *
1461
+ * Use this directive as a host directive. For example:
1462
+ *
1463
+ * ```ts
1464
+ * @Directive({
1465
+ * selector: 'ng-template[AccordionContent]',
1466
+ * hostDirectives: [DeferredContent],
1467
+ * })
1468
+ * class AccordionContent {}
1469
+ * ```
1470
+ */
1471
+ declare class DeferredContent implements OnDestroy {
1472
+ private readonly _deferredContentAware;
1473
+ private readonly _templateRef;
1474
+ private readonly _viewContainerRef;
1475
+ private _currentViewRef;
1476
+ private _isRendered;
1477
+ readonly deferredContentAware: _angular_core.WritableSignal<DeferredContentAware | null>;
1478
+ constructor();
1479
+ ngOnDestroy(): void;
1480
+ private _destroyContent;
1481
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContent, never>;
1482
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContent, never, never, {}, {}, never, never, true, never>;
1601
1483
  }
1602
1484
 
1603
- export { AccordionGroupPattern, AccordionPanelPattern, AccordionTriggerPattern, ComboboxListboxPattern, ComboboxPattern, ComboboxTreePattern, ListboxPattern, MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern, OptionPattern, RadioButtonPattern, RadioGroupPattern, SignalLike, TabListPattern, TabPanelPattern, TabPattern, ToolbarPattern, ToolbarRadioGroupPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern, TreeItemPattern, TreePattern, WritableSignalLike };
1604
- export type { AccordionGroupInputs, AccordionPanelInputs, AccordionTriggerInputs, ComboboxInputs, ComboboxListboxControls, ComboboxListboxInputs, ComboboxTreeControls, ComboboxTreeInputs, ListboxInputs, MenuBarInputs, MenuInputs, MenuItemInputs, MenuTriggerInputs, OptionInputs, RadioButtonInputs, RadioGroupInputs, TabInputs, TabListInputs, TabPanelInputs, ToolbarInputs, ToolbarRadioGroupInputs, ToolbarWidgetGroupControls, ToolbarWidgetGroupInputs, ToolbarWidgetInputs, TreeInputs, TreeItemInputs };
1485
+ export { AccordionGroupPattern, AccordionPanelPattern, AccordionTriggerPattern, ComboboxDialogPattern, ComboboxListboxPattern, ComboboxPattern, ComboboxTreePattern, DeferredContent, DeferredContentAware, ListboxPattern, MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern, OptionPattern, SignalLike, TabListPattern, TabPanelPattern, TabPattern, ToolbarPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern, TreeItemPattern, TreePattern, WritableSignalLike };
1486
+ export type { AccordionGroupInputs, AccordionPanelInputs, AccordionTriggerInputs, ComboboxInputs, ComboboxListboxControls, ComboboxListboxInputs, ComboboxTreeControls, ComboboxTreeInputs, ListboxInputs, MenuBarInputs, MenuInputs, MenuItemInputs, MenuTriggerInputs, OptionInputs, TabInputs, TabListInputs, TabPanelInputs, ToolbarInputs, ToolbarWidgetGroupInputs, ToolbarWidgetInputs, TreeInputs, TreeItemInputs };