@angular/aria 21.0.0-next.9 → 21.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/_adev_assets/aria-accordion.json +373 -0
  2. package/_adev_assets/aria-combobox.json +383 -0
  3. package/_adev_assets/aria-grid.json +647 -0
  4. package/_adev_assets/aria-listbox.json +511 -0
  5. package/_adev_assets/aria-menu.json +852 -0
  6. package/_adev_assets/aria-tabs.json +987 -0
  7. package/_adev_assets/aria-toolbar.json +696 -0
  8. package/_adev_assets/aria-tree.json +1071 -0
  9. package/fesm2022/_widget-chunk.mjs +949 -0
  10. package/fesm2022/_widget-chunk.mjs.map +1 -0
  11. package/fesm2022/accordion.mjs +372 -174
  12. package/fesm2022/accordion.mjs.map +1 -1
  13. package/fesm2022/aria.mjs +1 -2
  14. package/fesm2022/aria.mjs.map +1 -1
  15. package/fesm2022/combobox.mjs +308 -116
  16. package/fesm2022/combobox.mjs.map +1 -1
  17. package/fesm2022/grid.mjs +566 -0
  18. package/fesm2022/grid.mjs.map +1 -0
  19. package/fesm2022/listbox.mjs +384 -184
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +591 -0
  22. package/fesm2022/menu.mjs.map +1 -0
  23. package/fesm2022/private.mjs +2338 -0
  24. package/fesm2022/private.mjs.map +1 -0
  25. package/fesm2022/tabs.mjs +484 -276
  26. package/fesm2022/tabs.mjs.map +1 -1
  27. package/fesm2022/toolbar.mjs +366 -200
  28. package/fesm2022/toolbar.mjs.map +1 -1
  29. package/fesm2022/tree.mjs +515 -267
  30. package/fesm2022/tree.mjs.map +1 -1
  31. package/package.json +12 -12
  32. package/types/_grid-chunk.d.ts +608 -0
  33. package/types/accordion.d.ts +8 -8
  34. package/types/combobox.d.ts +20 -7
  35. package/types/grid.d.ts +120 -0
  36. package/types/listbox.d.ts +9 -7
  37. package/types/menu.d.ts +170 -0
  38. package/types/{ui-patterns.d.ts → private.d.ts} +555 -433
  39. package/types/tabs.d.ts +8 -8
  40. package/types/toolbar.d.ts +31 -28
  41. package/types/tree.d.ts +11 -9
  42. package/fesm2022/deferred-content.mjs +0 -60
  43. package/fesm2022/deferred-content.mjs.map +0 -1
  44. package/fesm2022/radio-group.mjs +0 -197
  45. package/fesm2022/radio-group.mjs.map +0 -1
  46. package/fesm2022/ui-patterns.mjs +0 -2504
  47. package/fesm2022/ui-patterns.mjs.map +0 -1
  48. package/types/deferred-content.d.ts +0 -38
  49. package/types/radio-group.d.ts +0 -82
@@ -1,114 +1,14 @@
1
1
  import * as _angular_core from '@angular/core';
2
-
3
- /**
4
- * Options that are applicable to all event handlers.
5
- *
6
- * This library has not yet had a need for stopPropagationImmediate.
7
- */
8
- interface EventHandlerOptions {
9
- stopPropagation: boolean;
10
- preventDefault: boolean;
11
- }
12
- /** A basic event handler. */
13
- type EventHandler<T extends Event> = (event: T) => void;
14
- /** A function that determines whether an event is to be handled. */
15
- type EventMatcher<T extends Event> = (event: T) => boolean;
16
- /** A config that specifies how to handle a particular event. */
17
- interface EventHandlerConfig<T extends Event> extends EventHandlerOptions {
18
- matcher: EventMatcher<T>;
19
- handler: EventHandler<T>;
20
- }
21
- /** Bit flag representation of the possible modifier keys that can be present on an event. */
22
- declare enum Modifier {
23
- None = 0,
24
- Ctrl = 1,
25
- Shift = 2,
26
- Alt = 4,
27
- Meta = 8,
28
- Any = "Any"
29
- }
30
- type ModifierInputs = Modifier | Modifier[];
31
- /**
32
- * Abstract base class for all event managers.
33
- *
34
- * Event managers are designed to normalize how event handlers are authored and create a safety net
35
- * for common event handling gotchas like remembering to call preventDefault or stopPropagation.
36
- */
37
- declare abstract class EventManager<T extends Event> {
38
- protected configs: EventHandlerConfig<T>[];
39
- abstract options: EventHandlerOptions;
40
- /** Runs the handlers that match with the given event. */
41
- handle(event: T): void;
42
- /** Configures the event manager to handle specific events. (See subclasses for more). */
43
- abstract on(...args: [...unknown[]]): this;
44
- }
45
-
46
- type SignalLike<T> = () => T;
47
- interface WritableSignalLike<T> extends SignalLike<T> {
48
- set(value: T): void;
49
- update(updateFn: (value: T) => T): void;
50
- }
51
- /** Converts a getter setter style signal to a WritableSignalLike. */
52
- declare function convertGetterSetterToWritableSignalLike<T>(getter: () => T, setter: (v: T) => void): WritableSignalLike<T>;
53
-
54
- /**
55
- * Used to represent a keycode.
56
- *
57
- * This is used to match whether an events keycode should be handled. The ability to match using a
58
- * string, SignalLike, or Regexp gives us more flexibility when authoring event handlers.
59
- */
60
- type KeyCode = string | SignalLike<string> | RegExp;
61
- /**
62
- * An event manager that is specialized for handling keyboard events. By default this manager stops
63
- * propagation and prevents default on all events it handles.
64
- */
65
- declare class KeyboardEventManager<T extends KeyboardEvent> extends EventManager<T> {
66
- options: EventHandlerOptions;
67
- /** Configures this event manager to handle events with a specific key and no modifiers. */
68
- on(key: KeyCode, handler: EventHandler<T>): this;
69
- /** Configures this event manager to handle events with a specific modifer and key combination. */
70
- on(modifiers: ModifierInputs, key: KeyCode, handler: EventHandler<T>): this;
71
- private _normalizeInputs;
72
- private _isMatch;
73
- }
74
-
75
- /**
76
- * The different mouse buttons that may appear on a pointer event.
77
- */
78
- declare enum MouseButton {
79
- Main = 0,
80
- Auxiliary = 1,
81
- Secondary = 2
82
- }
83
- /** An event manager that is specialized for handling pointer events. */
84
- declare class PointerEventManager<T extends PointerEvent> extends EventManager<T> {
85
- options: EventHandlerOptions;
86
- /**
87
- * Configures this event manager to handle events with a specific modifer and mouse button
88
- * combination.
89
- */
90
- on(button: MouseButton, modifiers: ModifierInputs, handler: EventHandler<T>): this;
91
- /**
92
- * Configures this event manager to handle events with a specific mouse button and no modifiers.
93
- */
94
- on(modifiers: ModifierInputs, handler: EventHandler<T>): this;
95
- /**
96
- * Configures this event manager to handle events with the main mouse button and no modifiers.
97
- *
98
- * @param handler The handler function
99
- * @param options Options for whether to stop propagation or prevent default.
100
- */
101
- on(handler: EventHandler<T>): this;
102
- private _normalizeInputs;
103
- _isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs): boolean;
104
- }
2
+ import { Signal, OnDestroy } from '@angular/core';
3
+ import { SignalLike, WritableSignalLike, KeyboardEventManager, PointerEventManager } from './_grid-chunk.js';
4
+ export { GridCellInputs, GridCellPattern, GridCellWidgetInputs, GridCellWidgetPattern, GridInputs, GridPattern, GridRowInputs, GridRowPattern, convertGetterSetterToWritableSignalLike } from './_grid-chunk.js';
105
5
 
106
6
  /** Represents an item in a collection, such as a listbox option, than may receive focus. */
107
7
  interface ListFocusItem {
108
8
  /** A unique identifier for the item. */
109
9
  id: SignalLike<string>;
110
10
  /** The html element that should receive focus. */
111
- element: SignalLike<HTMLElement>;
11
+ element: SignalLike<HTMLElement | undefined>;
112
12
  /** Whether an item is disabled. */
113
13
  disabled: SignalLike<boolean>;
114
14
  /** The index of the item in the list. */
@@ -124,8 +24,8 @@ interface ListFocusInputs<T extends ListFocusItem> {
124
24
  items: SignalLike<T[]>;
125
25
  /** The active item. */
126
26
  activeItem: WritableSignalLike<T | undefined>;
127
- /** Whether disabled items in the list should be skipped when navigating. */
128
- skipDisabled: SignalLike<boolean>;
27
+ /** Whether disabled items in the list should be focusable. */
28
+ softDisabled: SignalLike<boolean>;
129
29
  element: SignalLike<HTMLElement | undefined>;
130
30
  }
131
31
  /** Controls focus for a list of items. */
@@ -142,12 +42,14 @@ declare class ListFocus<T extends ListFocusItem> {
142
42
  isListDisabled(): boolean;
143
43
  /** The id of the current active item. */
144
44
  getActiveDescendant(): string | undefined;
145
- /** The tabindex for the list. */
146
- getListTabindex(): -1 | 0;
147
- /** Returns the tabindex for the given item. */
148
- getItemTabindex(item: T): -1 | 0;
45
+ /** The tab index for the list. */
46
+ getListTabIndex(): -1 | 0;
47
+ /** Returns the tab index for the given item. */
48
+ getItemTabIndex(item: T): -1 | 0;
149
49
  /** Moves focus to the given item if it is focusable. */
150
- focus(item: T): boolean;
50
+ focus(item: T, opts?: {
51
+ focusElement?: boolean;
52
+ }): boolean;
151
53
  /** Returns true if the given item can be navigated to. */
152
54
  isFocusable(item: T): boolean;
153
55
  }
@@ -173,19 +75,33 @@ declare class ListNavigation<T extends ListNavigationItem> {
173
75
  focusManager: ListFocus<T>;
174
76
  });
175
77
  /** Navigates to the given item. */
176
- goto(item?: T): boolean;
78
+ goto(item?: T, opts?: {
79
+ focusElement?: boolean;
80
+ }): boolean;
177
81
  /** Navigates to the next item in the list. */
178
- next(): boolean;
82
+ next(opts?: {
83
+ focusElement?: boolean;
84
+ }): boolean;
179
85
  /** Peeks the next item in the list. */
180
86
  peekNext(): T | undefined;
181
87
  /** Navigates to the previous item in the list. */
182
- prev(): boolean;
88
+ prev(opts?: {
89
+ focusElement?: boolean;
90
+ }): boolean;
183
91
  /** Peeks the previous item in the list. */
184
92
  peekPrev(): T | undefined;
185
93
  /** Navigates to the first item in the list. */
186
- first(): boolean;
94
+ first(opts?: {
95
+ focusElement?: boolean;
96
+ }): boolean;
187
97
  /** Navigates to the last item in the list. */
188
- last(): boolean;
98
+ last(opts?: {
99
+ focusElement?: boolean;
100
+ }): boolean;
101
+ /** Gets the first focusable item from the given list of items. */
102
+ peekFirst(items?: T[]): T | undefined;
103
+ /** Gets the last focusable item from the given list of items. */
104
+ peekLast(items?: T[]): T | undefined;
189
105
  /** Advances to the next or previous focusable item in the list based on the given delta. */
190
106
  private _advance;
191
107
  /** Peeks the next or previous focusable item in the list based on the given delta. */
@@ -196,6 +112,8 @@ declare class ListNavigation<T extends ListNavigationItem> {
196
112
  interface ListSelectionItem<V> extends ListFocusItem {
197
113
  /** The value of the item. */
198
114
  value: SignalLike<V>;
115
+ /** Whether the item is selectable. */
116
+ selectable: SignalLike<boolean>;
199
117
  }
200
118
  /** Represents the required inputs for a collection that contains selectable items. */
201
119
  interface ListSelectionInputs<T extends ListSelectionItem<V>, V> extends ListFocusInputs<T> {
@@ -225,9 +143,9 @@ declare class ListSelection<T extends ListSelectionItem<V>, V> {
225
143
  anchor: boolean;
226
144
  }): void;
227
145
  /** Deselects the item at the current active index. */
228
- deselect(item?: T | null): void;
146
+ deselect(item?: ListSelectionItem<V>): void;
229
147
  /** Toggles the item at the current active index. */
230
- toggle(): void;
148
+ toggle(item?: ListSelectionItem<V>): void;
231
149
  /** Toggles only the item at the current active index. */
232
150
  toggleOne(): void;
233
151
  /** Selects all items in the list. */
@@ -299,13 +217,14 @@ declare class ListTypeahead<T extends ListTypeaheadItem> {
299
217
  private _getItem;
300
218
  }
301
219
 
302
- /** The selection operations that the list can perform. */
303
- interface SelectOptions$1 {
220
+ /** The operations that the list can perform after navigation. */
221
+ interface NavOptions {
304
222
  toggle?: boolean;
305
223
  select?: boolean;
306
224
  selectOne?: boolean;
307
225
  selectRange?: boolean;
308
226
  anchor?: boolean;
227
+ focusElement?: boolean;
309
228
  }
310
229
  /** Represents an item in the list. */
311
230
  type ListItem<V> = ListTypeaheadItem & ListNavigationItem & ListSelectionItem<V> & ListFocusItem;
@@ -325,9 +244,9 @@ declare class List<T extends ListItem<V>, V> {
325
244
  /** Whether the list is disabled. */
326
245
  disabled: _angular_core.Signal<boolean>;
327
246
  /** The id of the current active item. */
328
- activedescendant: _angular_core.Signal<string | undefined>;
329
- /** The tabindex of the list. */
330
- tabindex: _angular_core.Signal<0 | -1>;
247
+ activeDescendant: _angular_core.Signal<string | undefined>;
248
+ /** The tab index of the list. */
249
+ tabIndex: _angular_core.Signal<0 | -1>;
331
250
  /** The index of the currently active item in the list. */
332
251
  activeIndex: _angular_core.Signal<number>;
333
252
  /**
@@ -346,24 +265,24 @@ declare class List<T extends ListItem<V>, V> {
346
265
  /** Whether the list should wrap. Used to disable wrapping while range selecting. */
347
266
  private _wrap;
348
267
  constructor(inputs: ListInputs<T, V>);
349
- /** Returns the tabindex for the given item. */
268
+ /** Returns the tab index for the given item. */
350
269
  getItemTabindex(item: T): 0 | -1;
351
270
  /** Navigates to the first option in the list. */
352
- first(opts?: SelectOptions$1): void;
271
+ first(opts?: NavOptions): void;
353
272
  /** Navigates to the last option in the list. */
354
- last(opts?: SelectOptions$1): void;
273
+ last(opts?: NavOptions): void;
355
274
  /** Navigates to the next option in the list. */
356
- next(opts?: SelectOptions$1): void;
275
+ next(opts?: NavOptions): void;
357
276
  /** Navigates to the previous option in the list. */
358
- prev(opts?: SelectOptions$1): void;
277
+ prev(opts?: NavOptions): void;
359
278
  /** Navigates to the given item in the list. */
360
- goto(item: T, opts?: SelectOptions$1): void;
279
+ goto(item: T, opts?: NavOptions): void;
361
280
  /** Removes focus from the list. */
362
281
  unfocus(): void;
363
282
  /** Marks the given index as the potential start of a range selection. */
364
283
  anchor(index: number): void;
365
284
  /** Handles typeahead search navigation for the list. */
366
- search(char: string, opts?: SelectOptions$1): void;
285
+ search(char: string, opts?: NavOptions): void;
367
286
  /** Checks if the list is currently typing for typeahead search. */
368
287
  isTyping(): boolean;
369
288
  /** Selects the currently active item in the list. */
@@ -371,11 +290,11 @@ declare class List<T extends ListItem<V>, V> {
371
290
  /** Sets the selection to only the current active item. */
372
291
  selectOne(): void;
373
292
  /** Deselects the currently active item in the list. */
374
- deselect(): void;
293
+ deselect(item?: T): void;
375
294
  /** Deselects all items in the list. */
376
295
  deselectAll(): void;
377
296
  /** Toggles the currently active item in the list. */
378
- toggle(): void;
297
+ toggle(item?: T): void;
379
298
  /** Toggles the currently active item in the list, deselecting all other items. */
380
299
  toggleOne(): void;
381
300
  /** Toggles the selection of all items in the list. */
@@ -383,7 +302,7 @@ declare class List<T extends ListItem<V>, V> {
383
302
  /** Checks if the given item is able to receive focus. */
384
303
  isFocusable(item: T): boolean;
385
304
  /** Handles updating selection for the list. */
386
- updateSelection(opts?: SelectOptions$1): void;
305
+ updateSelection(opts?: NavOptions): void;
387
306
  /**
388
307
  * Safely performs a navigation operation.
389
308
  *
@@ -410,6 +329,12 @@ interface ComboboxInputs<T extends ListItem<V>, V> {
410
329
  inputValue?: WritableSignalLike<string>;
411
330
  /** The value of the first matching item in the popup. */
412
331
  firstMatch: SignalLike<V | undefined>;
332
+ /** Whether the combobox is disabled. */
333
+ disabled: SignalLike<boolean>;
334
+ /** Whether the combobox is read-only. */
335
+ readonly: SignalLike<boolean>;
336
+ /** Whether the combobox is in a right-to-left context. */
337
+ textDirection: SignalLike<'rtl' | 'ltr'>;
413
338
  }
414
339
  /** An interface that allows combobox popups to expose the necessary controls for the combobox. */
415
340
  interface ComboboxListboxControls<T extends ListItem<V>, V> {
@@ -417,12 +342,16 @@ interface ComboboxListboxControls<T extends ListItem<V>, V> {
417
342
  id: () => string;
418
343
  /** The ARIA role for the popup. */
419
344
  role: SignalLike<'listbox' | 'tree' | 'grid'>;
345
+ /** Whether multiple items in the popup can be selected at once. */
346
+ multi: SignalLike<boolean>;
420
347
  /** The ID of the active item in the popup. */
421
348
  activeId: SignalLike<string | undefined>;
422
349
  /** The list of items in the popup. */
423
350
  items: SignalLike<T[]>;
424
351
  /** Navigates to the given item in the popup. */
425
- focus: (item: T) => void;
352
+ focus: (item: T, opts?: {
353
+ focusElement?: boolean;
354
+ }) => void;
426
355
  /** Navigates to the next item in the popup. */
427
356
  next: () => void;
428
357
  /** Navigates to the previous item in the popup. */
@@ -433,14 +362,16 @@ interface ComboboxListboxControls<T extends ListItem<V>, V> {
433
362
  last: () => void;
434
363
  /** Selects the current item in the popup. */
435
364
  select: (item?: T) => void;
365
+ /** Toggles the selection state of the given item in the popup. */
366
+ toggle: (item?: T) => void;
436
367
  /** Clears the selection state of the popup. */
437
368
  clearSelection: () => void;
438
369
  /** Removes focus from any item in the popup. */
439
370
  unfocus: () => void;
440
371
  /** Returns the item corresponding to the given event. */
441
372
  getItem: (e: PointerEvent) => T | undefined;
442
- /** Returns the currently selected item in the popup. */
443
- getSelectedItem: () => T | undefined;
373
+ /** Returns the currently selected items in the popup. */
374
+ getSelectedItems: () => T[];
444
375
  /** Sets the value of the combobox based on the selected item. */
445
376
  setValue: (value: V | undefined) => void;
446
377
  }
@@ -452,11 +383,15 @@ interface ComboboxTreeControls<T extends ListItem<V>, V> extends ComboboxListbox
452
383
  /** Collapses the currently active item in the popup. */
453
384
  collapseItem: () => void;
454
385
  /** Checks if the currently active item in the popup is expandable. */
455
- isItemExpandable: () => boolean;
386
+ isItemExpandable: (item?: T) => boolean;
456
387
  /** Expands all nodes in the tree. */
457
388
  expandAll: () => void;
458
389
  /** Collapses all nodes in the tree. */
459
390
  collapseAll: () => void;
391
+ /** Toggles the expansion state of the currently active item in the popup. */
392
+ toggleExpansion: (item?: T) => void;
393
+ /** Whether the current active item is selectable. */
394
+ isItemSelectable: (item?: T) => boolean;
460
395
  }
461
396
  /** Controls the state of a combobox. */
462
397
  declare class ComboboxPattern<T extends ListItem<V>, V> {
@@ -464,7 +399,7 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
464
399
  /** Whether the combobox is expanded. */
465
400
  expanded: _angular_core.WritableSignal<boolean>;
466
401
  /** The ID of the active item in the combobox. */
467
- activedescendant: _angular_core.Signal<string | null>;
402
+ activeDescendant: _angular_core.Signal<string | null>;
468
403
  /** The currently highlighted item in the combobox. */
469
404
  highlightedItem: _angular_core.WritableSignal<T | undefined>;
470
405
  /** Whether the most recent input event was a deletion. */
@@ -472,15 +407,17 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
472
407
  /** Whether the combobox is focused. */
473
408
  isFocused: _angular_core.WritableSignal<boolean>;
474
409
  /** The key used to navigate to the previous item in the list. */
475
- expandKey: _angular_core.Signal<string>;
410
+ expandKey: _angular_core.Signal<"ArrowLeft" | "ArrowRight">;
476
411
  /** The key used to navigate to the next item in the list. */
477
- collapseKey: _angular_core.Signal<string>;
412
+ collapseKey: _angular_core.Signal<"ArrowLeft" | "ArrowRight">;
478
413
  /** The ID of the popup associated with the combobox. */
479
414
  popupId: _angular_core.Signal<string | null>;
480
415
  /** The autocomplete behavior of the combobox. */
481
416
  autocomplete: _angular_core.Signal<"both" | "list">;
482
417
  /** The ARIA role of the popup associated with the combobox. */
483
418
  hasPopup: _angular_core.Signal<"listbox" | "tree" | "grid" | null>;
419
+ /** Whether the combobox is read-only. */
420
+ readonly: _angular_core.Signal<true | null>;
484
421
  /** The keydown event manager for the combobox. */
485
422
  keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
486
423
  /** The pointerup event manager for the combobox. */
@@ -492,18 +429,25 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
492
429
  onPointerup(event: PointerEvent): void;
493
430
  /** Handles input events for the combobox. */
494
431
  onInput(event: Event): void;
432
+ /** Handles focus in events for the combobox. */
495
433
  onFocusIn(): void;
496
434
  /** Handles focus out events for the combobox. */
497
435
  onFocusOut(event: FocusEvent): void;
436
+ /** The first matching item in the combobox. */
498
437
  firstMatch: _angular_core.Signal<T | undefined>;
438
+ /** Handles filtering logic for the combobox. */
499
439
  onFilter(): void;
440
+ /** Highlights the currently selected item in the combobox. */
500
441
  highlight(): void;
501
442
  /** Closes the combobox. */
502
- close(): void;
443
+ close(opts?: {
444
+ reset: boolean;
445
+ }): void;
503
446
  /** Opens the combobox. */
504
447
  open(nav?: {
505
448
  first?: boolean;
506
449
  last?: boolean;
450
+ selected?: boolean;
507
451
  }): void;
508
452
  /** Navigates to the next focusable item in the combobox popup. */
509
453
  next(): void;
@@ -513,7 +457,9 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
513
457
  first(): void;
514
458
  /** Navigates to the last focusable item in the combobox popup. */
515
459
  last(): void;
460
+ /** Collapses the currently focused item in the combobox. */
516
461
  collapseItem(): void;
462
+ /** Expands the currently focused item in the combobox. */
517
463
  expandItem(): void;
518
464
  /** Selects an item in the combobox popup. */
519
465
  select(opts?: {
@@ -536,7 +482,7 @@ interface ListboxPattern$1<V> {
536
482
  listBehavior: List<OptionPattern<V>, V>;
537
483
  }
538
484
  /** Represents the required inputs for an option in a listbox. */
539
- interface OptionInputs<V> extends Omit<ListItem<V>, 'index'> {
485
+ interface OptionInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
540
486
  listbox: SignalLike<ListboxPattern$1<V> | undefined>;
541
487
  }
542
488
  /** Represents an option in a listbox. */
@@ -551,16 +497,18 @@ declare class OptionPattern<V> {
551
497
  active: _angular_core.Signal<boolean>;
552
498
  /** Whether the option is selected. */
553
499
  selected: _angular_core.Signal<boolean | undefined>;
500
+ /** Whether the option is selectable. */
501
+ selectable: () => boolean;
554
502
  /** Whether the option is disabled. */
555
503
  disabled: SignalLike<boolean>;
556
504
  /** The text used by the typeahead search. */
557
505
  searchTerm: SignalLike<string>;
558
506
  /** A reference to the parent listbox. */
559
507
  listbox: SignalLike<ListboxPattern$1<V> | undefined>;
560
- /** The tabindex of the option. */
561
- tabindex: _angular_core.Signal<0 | -1 | undefined>;
508
+ /** The tab index of the option. */
509
+ tabIndex: _angular_core.Signal<0 | -1 | undefined>;
562
510
  /** The html element that should receive focus. */
563
- element: SignalLike<HTMLElement>;
511
+ element: SignalLike<HTMLElement | undefined>;
564
512
  constructor(args: OptionInputs<V>);
565
513
  }
566
514
 
@@ -581,10 +529,10 @@ declare class ListboxPattern<V> {
581
529
  disabled: _angular_core.Signal<boolean>;
582
530
  /** Whether the listbox is readonly. */
583
531
  readonly: SignalLike<boolean>;
584
- /** The tabindex of the listbox. */
585
- tabindex: SignalLike<-1 | 0>;
532
+ /** The tab index of the listbox. */
533
+ tabIndex: SignalLike<-1 | 0>;
586
534
  /** The id of the current active item. */
587
- activedescendant: _angular_core.Signal<string | undefined>;
535
+ activeDescendant: _angular_core.Signal<string | undefined>;
588
536
  /** Whether multiple items in the list can be selected at once. */
589
537
  multi: SignalLike<boolean>;
590
538
  /** The number of items in the listbox. */
@@ -639,8 +587,10 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
639
587
  activeId: _angular_core.Signal<string | undefined>;
640
588
  /** The list of options in the listbox. */
641
589
  items: SignalLike<OptionPattern<V>[]>;
642
- /** The tabindex for the listbox. Always -1 because the combobox handles focus. */
643
- tabindex: SignalLike<-1 | 0>;
590
+ /** The tab index for the listbox. Always -1 because the combobox handles focus. */
591
+ tabIndex: SignalLike<-1 | 0>;
592
+ /** Whether multiple items in the list can be selected at once. */
593
+ multi: _angular_core.Signal<boolean>;
644
594
  constructor(inputs: ComboboxListboxInputs<V>);
645
595
  /** Noop. The combobox handles keydown events. */
646
596
  onKeydown(_: KeyboardEvent): void;
@@ -649,7 +599,9 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
649
599
  /** Noop. The combobox controls the open state. */
650
600
  setDefaultState(): void;
651
601
  /** Navigates to the specified item in the listbox. */
652
- focus: (item: OptionPattern<V>) => void;
602
+ focus: (item: OptionPattern<V>, opts?: {
603
+ focusElement?: boolean;
604
+ }) => void;
653
605
  /** Navigates to the next focusable item in the listbox. */
654
606
  next: () => void;
655
607
  /** Navigates to the previous focusable item in the listbox. */
@@ -662,276 +614,237 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
662
614
  unfocus: () => void;
663
615
  /** Selects the specified item in the listbox. */
664
616
  select: (item?: OptionPattern<V>) => void;
617
+ /** Toggles the selection state of the given item in the listbox. */
618
+ toggle: (item?: OptionPattern<V>) => void;
665
619
  /** Clears the selection in the listbox. */
666
620
  clearSelection: () => void;
667
621
  /** Retrieves the OptionPattern associated with a pointer event. */
668
622
  getItem: (e: PointerEvent) => OptionPattern<V> | undefined;
669
- /** Retrieves the currently selected item in the listbox. */
670
- getSelectedItem: () => OptionPattern<V> | undefined;
623
+ /** Retrieves the currently selected items in the listbox. */
624
+ getSelectedItems: () => OptionPattern<V>[];
671
625
  /** Sets the value of the combobox listbox. */
672
626
  setValue: (value: V | undefined) => void;
673
627
  }
674
628
 
675
- /** Represents the required inputs for a radio button in a radio group. */
676
- interface RadioButtonInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index'> {
677
- /** A reference to the parent radio group. */
678
- group: SignalLike<RadioGroupPattern<V> | undefined>;
679
- }
680
- /** Represents a radio button within a radio group. */
681
- declare class RadioButtonPattern<V> {
682
- readonly inputs: RadioButtonInputs<V>;
683
- /** A unique identifier for the radio button. */
684
- readonly id: SignalLike<string>;
685
- /** The value associated with the radio button. */
686
- readonly value: SignalLike<V>;
687
- /** The position of the radio button within the group. */
688
- readonly index: SignalLike<number>;
689
- /** Whether the radio button is currently the active one (focused). */
690
- readonly active: _angular_core.Signal<boolean>;
691
- /** Whether the radio button is selected. */
692
- readonly selected: SignalLike<boolean>;
693
- /** Whether the radio button is disabled. */
694
- readonly disabled: SignalLike<boolean>;
695
- /** A reference to the parent radio group. */
696
- readonly group: SignalLike<RadioGroupPattern<V> | undefined>;
697
- /** The tabindex of the radio button. */
698
- readonly tabindex: _angular_core.Signal<0 | -1 | undefined>;
699
- /** The HTML element associated with the radio button. */
700
- readonly element: SignalLike<HTMLElement>;
701
- /** The search term for typeahead. */
702
- readonly searchTerm: () => string;
703
- constructor(inputs: RadioButtonInputs<V>);
704
- }
705
-
706
- /** Represents the required inputs for a radio group. */
707
- type RadioGroupInputs<V> = Omit<ListInputs<RadioButtonPattern<V>, V>, 'multi' | 'selectionMode' | 'wrap' | 'typeaheadDelay'> & {
708
- /** Whether the radio group is disabled. */
709
- disabled: SignalLike<boolean>;
710
- /** Whether the radio group is readonly. */
711
- readonly: SignalLike<boolean>;
712
- /** A function that returns the radio button associated with a given element. */
713
- getItem: (e: PointerEvent) => RadioButtonPattern<V> | undefined;
714
- };
715
- /** Controls the state of a radio group. */
716
- declare class RadioGroupPattern<V> {
717
- readonly inputs: RadioGroupInputs<V>;
718
- /** The list behavior for the radio group. */
719
- readonly listBehavior: List<RadioButtonPattern<V>, V>;
720
- /** Whether the radio group is vertically or horizontally oriented. */
721
- readonly orientation: SignalLike<'vertical' | 'horizontal'>;
722
- /** Whether focus should wrap when navigating. */
723
- readonly wrap: _angular_core.WritableSignal<boolean>;
724
- /** The selection strategy used by the radio group. */
725
- readonly selectionMode: _angular_core.WritableSignal<"follow" | "explicit">;
726
- /** Whether the radio group is disabled. */
727
- readonly disabled: _angular_core.Signal<boolean>;
728
- /** The currently selected radio button. */
729
- readonly selectedItem: _angular_core.Signal<RadioButtonPattern<V>>;
730
- /** Whether the radio group is readonly. */
731
- readonly readonly: _angular_core.Signal<boolean>;
732
- /** The tabindex of the radio group. */
733
- readonly tabindex: _angular_core.Signal<0 | -1>;
734
- /** The id of the current active radio button (if using activedescendant). */
735
- readonly activedescendant: _angular_core.Signal<string | undefined>;
736
- /** The key used to navigate to the previous radio button. */
737
- private readonly _prevKey;
738
- /** The key used to navigate to the next radio button. */
739
- private readonly _nextKey;
740
- /** The keydown event manager for the radio group. */
741
- readonly keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
742
- /** The pointerdown event manager for the radio group. */
743
- readonly pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
744
- constructor(inputs: RadioGroupInputs<V>);
745
- /** Handles keydown events for the radio group. */
746
- onKeydown(event: KeyboardEvent): void;
747
- /** Handles pointerdown events for the radio group. */
748
- onPointerdown(event: PointerEvent): void;
749
- /**
750
- * Sets the radio group to its default initial state.
751
- *
752
- * Sets the active index to the selected radio button if one exists and is focusable.
753
- * Otherwise, sets the active index to the first focusable radio button.
754
- */
629
+ /** The inputs for the MenuBarPattern class. */
630
+ interface MenuBarInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'disabled'> {
631
+ /** The menu items contained in the menu. */
632
+ items: SignalLike<MenuItemPattern<V>[]>;
633
+ /** Callback function triggered when a menu item is selected. */
634
+ onSelect?: (value: V) => void;
635
+ /** The text direction of the menu bar. */
636
+ textDirection: SignalLike<'ltr' | 'rtl'>;
637
+ }
638
+ /** The inputs for the MenuPattern class. */
639
+ interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value' | 'disabled'> {
640
+ /** The unique ID of the menu. */
641
+ id: SignalLike<string>;
642
+ /** The menu items contained in the menu. */
643
+ items: SignalLike<MenuItemPattern<V>[]>;
644
+ /** A reference to the parent menu or menu trigger. */
645
+ parent: SignalLike<MenuTriggerPattern<V> | MenuItemPattern<V> | undefined>;
646
+ /** Callback function triggered when a menu item is selected. */
647
+ onSelect?: (value: V) => void;
648
+ /** The text direction of the menu bar. */
649
+ textDirection: SignalLike<'ltr' | 'rtl'>;
650
+ }
651
+ /** The inputs for the MenuTriggerPattern class. */
652
+ interface MenuTriggerInputs<V> {
653
+ /** A reference to the menu trigger element. */
654
+ element: SignalLike<HTMLElement | undefined>;
655
+ /** A reference to the menu associated with the trigger. */
656
+ menu: SignalLike<MenuPattern<V> | undefined>;
657
+ /** The text direction of the menu bar. */
658
+ textDirection: SignalLike<'ltr' | 'rtl'>;
659
+ }
660
+ /** The inputs for the MenuItemPattern class. */
661
+ interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
662
+ /** A reference to the parent menu or menu trigger. */
663
+ parent: SignalLike<MenuPattern<V> | MenuBarPattern<V> | undefined>;
664
+ /** A reference to the submenu associated with the menu item. */
665
+ submenu: SignalLike<MenuPattern<V> | undefined>;
666
+ }
667
+ /** The menu ui pattern class. */
668
+ declare class MenuPattern<V> {
669
+ readonly inputs: MenuInputs<V>;
670
+ /** The unique ID of the menu. */
671
+ id: SignalLike<string>;
672
+ /** The role of the menu. */
673
+ role: () => string;
674
+ /** Whether the menu is visible. */
675
+ isVisible: Signal<boolean>;
676
+ /** Controls list behavior for the menu items. */
677
+ listBehavior: List<MenuItemPattern<V>, V>;
678
+ /** Whether the menu or any of its child elements are currently focused. */
679
+ isFocused: _angular_core.WritableSignal<boolean>;
680
+ /** Whether the menu has received focus. */
681
+ hasBeenFocused: _angular_core.WritableSignal<boolean>;
682
+ /** Whether the menu should be focused on mouse over. */
683
+ shouldFocus: Signal<boolean>;
684
+ /** The key used to expand sub-menus. */
685
+ private _expandKey;
686
+ /** The key used to collapse sub-menus. */
687
+ private _collapseKey;
688
+ /** Represents the space key. Does nothing when the user is actively using typeahead. */
689
+ dynamicSpaceKey: Signal<"" | " ">;
690
+ /** The regexp used to decide if a key should trigger typeahead. */
691
+ typeaheadRegexp: RegExp;
692
+ /** The root of the menu. */
693
+ root: Signal<MenuTriggerPattern<V> | MenuBarPattern<V> | MenuPattern<V> | undefined>;
694
+ /** Handles keyboard events for the menu. */
695
+ keydownManager: Signal<KeyboardEventManager<KeyboardEvent>>;
696
+ constructor(inputs: MenuInputs<V>);
697
+ /** Sets the default state for the menu. */
755
698
  setDefaultState(): void;
756
- /** Validates the state of the radio group and returns a list of accessibility violations. */
757
- validate(): string[];
758
- }
759
-
760
- /** Represents the required inputs for a toolbar widget in a toolbar. */
761
- interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'value' | 'index'> {
762
- /** A reference to the parent toolbar. */
763
- toolbar: SignalLike<ToolbarPattern<V>>;
764
- }
765
- declare class ToolbarWidgetPattern<V> implements ListItem<V> {
766
- readonly inputs: ToolbarWidgetInputs<V>;
767
- /** A unique identifier for the widget. */
768
- readonly id: SignalLike<string>;
769
- /** The html element that should receive focus. */
770
- readonly element: SignalLike<HTMLElement>;
771
- /** Whether the widget is disabled. */
772
- readonly disabled: SignalLike<boolean>;
773
- /** A reference to the parent toolbar. */
774
- readonly toolbar: SignalLike<ToolbarPattern<V>>;
775
- /** The tabindex of the widgdet. */
776
- readonly tabindex: _angular_core.Signal<0 | -1>;
777
- /** The text used by the typeahead search. */
778
- readonly searchTerm: () => string;
779
- /** The value associated with the widget. */
780
- readonly value: () => V;
781
- /** The position of the widget within the toolbar. */
782
- readonly index: _angular_core.Signal<number>;
783
- /** Whether the widget is currently the active one (focused). */
784
- readonly active: _angular_core.Signal<boolean>;
785
- constructor(inputs: ToolbarWidgetInputs<V>);
786
- }
787
-
788
- /** An interface that allows sub patterns to expose the necessary controls for the toolbar. */
789
- interface ToolbarWidgetGroupControls {
790
- /** Whether the widget group is currently on the first item. */
791
- isOnFirstItem(): boolean;
792
- /** Whether the widget group is currently on the last item. */
793
- isOnLastItem(): boolean;
794
- /** Navigates to the next widget in the group. */
795
- next(wrap: boolean): void;
796
- /** Navigates to the previous widget in the group. */
797
- prev(wrap: boolean): void;
798
- /** Navigates to the first widget in the group. */
699
+ /** Handles keyboard events for the menu. */
700
+ onKeydown(event: KeyboardEvent): void;
701
+ /** Handles mouseover events for the menu. */
702
+ onMouseOver(event: MouseEvent): void;
703
+ /** Handles mouseout events for the menu. */
704
+ onMouseOut(event: MouseEvent): void;
705
+ /** Handles click events for the menu. */
706
+ onClick(event: MouseEvent): void;
707
+ /** Handles focusin events for the menu. */
708
+ onFocusIn(): void;
709
+ /** Handles the focusout event for the menu. */
710
+ onFocusOut(event: FocusEvent): void;
711
+ /** Focuses the previous menu item. */
712
+ prev(): void;
713
+ /** Focuses the next menu item. */
714
+ next(): void;
715
+ /** Focuses the first menu item. */
799
716
  first(): void;
800
- /** Navigates to the last widget in the group. */
717
+ /** Focuses the last menu item. */
801
718
  last(): void;
802
- /** Removes focus from the widget group. */
803
- unfocus(): void;
804
- /** Triggers the action of the currently active widget in the group. */
719
+ /** Triggers the active menu item. */
805
720
  trigger(): void;
806
- /** Navigates to the widget targeted by a pointer event. */
807
- goto(event: PointerEvent): void;
808
- /** Sets the widget group to its default initial state. */
809
- setDefaultState(): void;
810
- }
811
- /** Represents the required inputs for a toolbar widget group. */
812
- interface ToolbarWidgetGroupInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'value' | 'index'> {
813
- /** A reference to the parent toolbar. */
814
- toolbar: SignalLike<ToolbarPattern<V> | undefined>;
815
- /** The controls for the sub patterns associated with the toolbar. */
816
- controls: SignalLike<ToolbarWidgetGroupControls | undefined>;
721
+ /** Submits the menu. */
722
+ submit(item?: MenuItemPattern<V> | undefined): void;
723
+ /** Collapses the current menu or focuses the previous item in the menubar. */
724
+ collapse(): void;
725
+ /** Expands the current menu or focuses the next item in the menubar. */
726
+ expand(): void;
727
+ /** Closes the menu and all parent menus. */
728
+ closeAll(): void;
817
729
  }
818
- /** A group of widgets within a toolbar that provides nested navigation. */
819
- declare class ToolbarWidgetGroupPattern<V> implements ListItem<V> {
820
- readonly inputs: ToolbarWidgetGroupInputs<V>;
821
- /** A unique identifier for the widget. */
822
- readonly id: SignalLike<string>;
823
- /** The html element that should receive focus. */
824
- readonly element: SignalLike<HTMLElement>;
825
- /** Whether the widget is disabled. */
826
- readonly disabled: SignalLike<boolean>;
827
- /** A reference to the parent toolbar. */
828
- readonly toolbar: SignalLike<ToolbarPattern<V> | undefined>;
829
- /** The text used by the typeahead search. */
830
- readonly searchTerm: () => string;
831
- /** The value associated with the widget. */
832
- readonly value: () => V;
833
- /** The position of the widget within the toolbar. */
834
- readonly index: _angular_core.Signal<number>;
835
- /** The actions that can be performed on the widget group. */
836
- readonly controls: SignalLike<ToolbarWidgetGroupControls>;
837
- /** Default toolbar widget group controls when no controls provided. */
838
- private readonly _defaultControls;
839
- constructor(inputs: ToolbarWidgetGroupInputs<V>);
730
+ /** The menubar ui pattern class. */
731
+ declare class MenuBarPattern<V> {
732
+ readonly inputs: MenuBarInputs<V>;
733
+ /** Controls list behavior for the menu items. */
734
+ listBehavior: List<MenuItemPattern<V>, V>;
735
+ /** The key used to navigate to the next item. */
736
+ private _nextKey;
737
+ /** The key used to navigate to the previous item. */
738
+ private _previousKey;
739
+ /** Represents the space key. Does nothing when the user is actively using typeahead. */
740
+ dynamicSpaceKey: Signal<"" | " ">;
741
+ /** The regexp used to decide if a key should trigger typeahead. */
742
+ typeaheadRegexp: RegExp;
743
+ /** Whether the menubar or any of its children are currently focused. */
744
+ isFocused: _angular_core.WritableSignal<boolean>;
745
+ /** Whether the menubar has been focused. */
746
+ hasBeenFocused: _angular_core.WritableSignal<boolean>;
747
+ /** Handles keyboard events for the menu. */
748
+ keydownManager: Signal<KeyboardEventManager<KeyboardEvent>>;
749
+ constructor(inputs: MenuBarInputs<V>);
750
+ /** Sets the default state for the menubar. */
751
+ setDefaultState(): void;
752
+ /** Handles keyboard events for the menu. */
753
+ onKeydown(event: KeyboardEvent): void;
754
+ /** Handles click events for the menu bar. */
755
+ onClick(event: MouseEvent): void;
756
+ /** Handles mouseover events for the menu bar. */
757
+ onMouseOver(event: MouseEvent): void;
758
+ /** Handles focusin events for the menu bar. */
759
+ onFocusIn(): void;
760
+ /** Handles focusout events for the menu bar. */
761
+ onFocusOut(event: FocusEvent): void;
762
+ /** Goes to and optionally focuses the specified menu item. */
763
+ goto(item: MenuItemPattern<V>, opts?: {
764
+ focusElement?: boolean;
765
+ }): void;
766
+ /** Focuses the next menu item. */
767
+ next(): void;
768
+ /** Focuses the previous menu item. */
769
+ prev(): void;
770
+ /** Closes the menubar and refocuses the root menu bar item. */
771
+ close(): void;
840
772
  }
841
-
842
- /** Represents the required inputs for a toolbar. */
843
- type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'value' | 'selectionMode' | 'focusMode'> & {
844
- /** A function that returns the toolbar item associated with a given element. */
845
- getItem: (e: Element) => ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V> | undefined;
846
- };
847
- /** Controls the state of a toolbar. */
848
- declare class ToolbarPattern<V> {
849
- readonly inputs: ToolbarInputs<V>;
850
- /** The list behavior for the toolbar. */
851
- readonly listBehavior: List<ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>, V>;
852
- /** Whether the tablist is vertically or horizontally oriented. */
853
- readonly orientation: SignalLike<'vertical' | 'horizontal'>;
854
- /** Whether disabled items in the group should be skipped when navigating. */
855
- readonly skipDisabled: SignalLike<boolean>;
856
- /** Whether the toolbar is disabled. */
857
- readonly disabled: _angular_core.Signal<boolean>;
858
- /** The tabindex of the toolbar (if using activedescendant). */
859
- readonly tabindex: _angular_core.Signal<0 | -1>;
860
- /** The id of the current active widget (if using activedescendant). */
861
- readonly activedescendant: _angular_core.Signal<string | undefined>;
862
- /** The key used to navigate to the previous widget. */
863
- private readonly _prevKey;
864
- /** The key used to navigate to the next widget. */
865
- private readonly _nextKey;
866
- /** The alternate key used to navigate to the previous widget. */
867
- private readonly _altPrevKey;
868
- /** The alternate key used to navigate to the next widget. */
869
- private readonly _altNextKey;
870
- /** The keydown event manager for the toolbar. */
871
- private readonly _keydown;
872
- /** The pointerdown event manager for the toolbar. */
873
- private readonly _pointerdown;
874
- /** Navigates to the next widget in the toolbar. */
875
- private _next;
876
- /** Navigates to the previous widget in the toolbar. */
877
- private _prev;
878
- private _groupNext;
879
- private _groupPrev;
880
- /** Triggers the action of the currently active widget. */
881
- private _trigger;
882
- /** Navigates to the first widget in the toolbar. */
883
- private _first;
884
- /** Navigates to the last widget in the toolbar. */
885
- private _last;
886
- /** Navigates to the widget targeted by a pointer event. */
887
- private _goto;
888
- constructor(inputs: ToolbarInputs<V>);
889
- /** Handles keydown events for the toolbar. */
773
+ /** The menu trigger ui pattern class. */
774
+ declare class MenuTriggerPattern<V> {
775
+ readonly inputs: MenuTriggerInputs<V>;
776
+ /** Whether the menu is expanded. */
777
+ expanded: _angular_core.WritableSignal<boolean>;
778
+ /** The role of the menu trigger. */
779
+ role: () => string;
780
+ /** Whether the menu trigger has a popup. */
781
+ hasPopup: () => boolean;
782
+ /** The menu associated with the trigger. */
783
+ menu: SignalLike<MenuPattern<V> | undefined>;
784
+ /** The tab index of the menu trigger. */
785
+ tabIndex: Signal<-1 | 0>;
786
+ /** Handles keyboard events for the menu trigger. */
787
+ keydownManager: Signal<KeyboardEventManager<KeyboardEvent>>;
788
+ constructor(inputs: MenuTriggerInputs<V>);
789
+ /** Handles keyboard events for the menu trigger. */
890
790
  onKeydown(event: KeyboardEvent): void;
891
- /** Handles pointerdown events for the toolbar. */
892
- onPointerdown(event: PointerEvent): void;
893
- /**
894
- * Sets the toolbar to its default initial state.
895
- *
896
- * Sets the active index to the selected widget if one exists and is focusable.
897
- * Otherwise, sets the active index to the first focusable widget.
898
- */
899
- setDefaultState(): void;
900
- /** Validates the state of the toolbar and returns a list of accessibility violations. */
901
- validate(): string[];
791
+ /** Handles click events for the menu trigger. */
792
+ onClick(): void;
793
+ /** Handles focusout events for the menu trigger. */
794
+ onFocusOut(event: FocusEvent): void;
795
+ /** Opens the menu. */
796
+ open(opts?: {
797
+ first?: boolean;
798
+ last?: boolean;
799
+ }): void;
800
+ /** Closes the menu. */
801
+ close(opts?: {
802
+ refocus?: boolean;
803
+ }): void;
902
804
  }
903
-
904
- /** Represents the required inputs for a toolbar controlled radio group. */
905
- type ToolbarRadioGroupInputs<V> = RadioGroupInputs<V> & {
906
- /** The toolbar controlling the radio group. */
907
- toolbar: SignalLike<ToolbarPattern<V> | undefined>;
908
- };
909
- /** Controls the state of a radio group in a toolbar. */
910
- declare class ToolbarRadioGroupPattern<V> extends RadioGroupPattern<V> implements ToolbarWidgetGroupControls {
911
- readonly inputs: ToolbarRadioGroupInputs<V>;
912
- constructor(inputs: ToolbarRadioGroupInputs<V>);
913
- /** Noop. The toolbar handles keydown events. */
914
- onKeydown(_: KeyboardEvent): void;
915
- /** Noop. The toolbar handles pointerdown events. */
916
- onPointerdown(_: PointerEvent): void;
917
- /** Whether the radio group is currently on the first item. */
918
- isOnFirstItem(): boolean;
919
- /** Whether the radio group is currently on the last item. */
920
- isOnLastItem(): boolean;
921
- /** Navigates to the next radio button in the group. */
922
- next(wrap: boolean): void;
923
- /** Navigates to the previous radio button in the group. */
924
- prev(wrap: boolean): void;
925
- /** Navigates to the first radio button in the group. */
926
- first(): void;
927
- /** Navigates to the last radio button in the group. */
928
- last(): void;
929
- /** Removes focus from the radio group. */
930
- unfocus(): void;
931
- /** Triggers the action of the currently active radio button in the group. */
932
- trigger(): void;
933
- /** Navigates to the radio button targeted by a pointer event. */
934
- goto(e: PointerEvent): void;
805
+ /** The menu item ui pattern class. */
806
+ declare class MenuItemPattern<V> implements ListItem<V> {
807
+ readonly inputs: MenuItemInputs<V>;
808
+ /** The value of the menu item. */
809
+ value: SignalLike<V>;
810
+ /** The unique ID of the menu item. */
811
+ id: SignalLike<string>;
812
+ /** Whether the menu item is disabled. */
813
+ disabled: SignalLike<boolean>;
814
+ /** The search term for the menu item. */
815
+ searchTerm: SignalLike<string>;
816
+ /** The element of the menu item. */
817
+ element: SignalLike<HTMLElement | undefined>;
818
+ /** Whether the menu item is active. */
819
+ isActive: Signal<boolean>;
820
+ /** The tab index of the menu item. */
821
+ tabIndex: Signal<0 | -1>;
822
+ /** The position of the menu item in the menu. */
823
+ index: Signal<number>;
824
+ /** Whether the menu item is expanded. */
825
+ expanded: Signal<boolean | null>;
826
+ /** Whether the menu item is expanded. */
827
+ _expanded: _angular_core.WritableSignal<boolean>;
828
+ /** The ID of the menu that the menu item controls. */
829
+ controls: _angular_core.WritableSignal<string | undefined>;
830
+ /** The role of the menu item. */
831
+ role: () => string;
832
+ /** Whether the menu item has a popup. */
833
+ hasPopup: Signal<boolean>;
834
+ /** The submenu associated with the menu item. */
835
+ submenu: SignalLike<MenuPattern<V> | undefined>;
836
+ /** Whether the menu item is selectable. */
837
+ selectable: SignalLike<boolean>;
838
+ constructor(inputs: MenuItemInputs<V>);
839
+ /** Opens the submenu. */
840
+ open(opts?: {
841
+ first?: boolean;
842
+ last?: boolean;
843
+ }): void;
844
+ /** Closes the submenu. */
845
+ close(opts?: {
846
+ refocus?: boolean;
847
+ }): void;
935
848
  }
936
849
 
937
850
  /** Represents an item that can be expanded or collapsed. */
@@ -1023,7 +936,7 @@ declare class LabelControl {
1023
936
  }
1024
937
 
1025
938
  /** The required inputs to tabs. */
1026
- interface TabInputs extends Omit<ListItem<string>, 'searchTerm' | 'index'>, Omit<ExpansionItem, 'expansionId' | 'expandable'> {
939
+ interface TabInputs extends Omit<ListItem<string>, 'searchTerm' | 'index' | 'selectable'>, Omit<ExpansionItem, 'expansionId' | 'expandable'> {
1027
940
  /** The parent tablist that controls the tab. */
1028
941
  tablist: SignalLike<TabListPattern>;
1029
942
  /** The remote tabpanel controlled by the tab. */
@@ -1043,7 +956,9 @@ declare class TabPattern {
1043
956
  /** Whether the tab is disabled. */
1044
957
  readonly disabled: SignalLike<boolean>;
1045
958
  /** The html element that should receive focus. */
1046
- readonly element: SignalLike<HTMLElement>;
959
+ readonly element: SignalLike<HTMLElement | undefined>;
960
+ /** Whether the tab is selectable. */
961
+ readonly selectable: () => boolean;
1047
962
  /** The text used by the typeahead search. */
1048
963
  readonly searchTerm: () => string;
1049
964
  /** Whether this tab has expandable content. */
@@ -1056,8 +971,8 @@ declare class TabPattern {
1056
971
  readonly active: _angular_core.Signal<boolean>;
1057
972
  /** Whether the tab is selected. */
1058
973
  readonly selected: _angular_core.Signal<boolean>;
1059
- /** The tabindex of the tab. */
1060
- readonly tabindex: _angular_core.Signal<0 | -1>;
974
+ /** The tab index of the tab. */
975
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1061
976
  /** The id of the tabpanel associated with the tab. */
1062
977
  readonly controls: _angular_core.Signal<string | undefined>;
1063
978
  constructor(inputs: TabInputs);
@@ -1079,8 +994,8 @@ declare class TabPanelPattern {
1079
994
  readonly labelManager: LabelControl;
1080
995
  /** Whether the tabpanel is hidden. */
1081
996
  readonly hidden: _angular_core.Signal<boolean>;
1082
- /** The tabindex of this tabpanel. */
1083
- readonly tabindex: _angular_core.Signal<0 | -1>;
997
+ /** The tab index of this tabpanel. */
998
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1084
999
  /** The aria-labelledby value for this tabpanel. */
1085
1000
  readonly labelledBy: _angular_core.Signal<string | undefined>;
1086
1001
  constructor(inputs: TabPanelInputs);
@@ -1098,10 +1013,10 @@ declare class TabListPattern {
1098
1013
  readonly orientation: SignalLike<'vertical' | 'horizontal'>;
1099
1014
  /** Whether the tablist is disabled. */
1100
1015
  readonly disabled: SignalLike<boolean>;
1101
- /** The tabindex of the tablist. */
1102
- readonly tabindex: _angular_core.Signal<0 | -1>;
1016
+ /** The tab index of the tablist. */
1017
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1103
1018
  /** The id of the current active tab. */
1104
- readonly activedescendant: _angular_core.Signal<string | undefined>;
1019
+ readonly activeDescendant: _angular_core.Signal<string | undefined>;
1105
1020
  /** Whether selection should follow focus. */
1106
1021
  readonly followFocus: _angular_core.Signal<boolean>;
1107
1022
  /** The key used to navigate to the previous tab in the tablist. */
@@ -1130,6 +1045,125 @@ declare class TabListPattern {
1130
1045
  private _getItem;
1131
1046
  }
1132
1047
 
1048
+ /** Represents the required inputs for a toolbar widget group. */
1049
+ interface ToolbarWidgetGroupInputs<T extends ListItem<V>, V> {
1050
+ /** A reference to the parent toolbar. */
1051
+ toolbar: SignalLike<ToolbarPattern<V> | undefined>;
1052
+ /** Whether the widget group is disabled. */
1053
+ disabled: SignalLike<boolean>;
1054
+ /** The list of items within the widget group. */
1055
+ items: SignalLike<T[]>;
1056
+ /** Whether the group allows multiple widgets to be selected. */
1057
+ multi: SignalLike<boolean>;
1058
+ }
1059
+ /** A group of widgets within a toolbar that provides nested navigation. */
1060
+ declare class ToolbarWidgetGroupPattern<T extends ListItem<V>, V> {
1061
+ readonly inputs: ToolbarWidgetGroupInputs<T, V>;
1062
+ /** Whether the widget is disabled. */
1063
+ readonly disabled: () => boolean;
1064
+ /** A reference to the parent toolbar. */
1065
+ readonly toolbar: () => ToolbarPattern<V> | undefined;
1066
+ /** Whether the group allows multiple widgets to be selected. */
1067
+ readonly multi: () => boolean;
1068
+ readonly searchTerm: () => string;
1069
+ readonly value: () => V;
1070
+ readonly selectable: () => boolean;
1071
+ readonly element: () => undefined;
1072
+ constructor(inputs: ToolbarWidgetGroupInputs<T, V>);
1073
+ }
1074
+
1075
+ /** Represents the required inputs for a toolbar widget in a toolbar. */
1076
+ interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index' | 'selectable'> {
1077
+ /** A reference to the parent toolbar. */
1078
+ toolbar: SignalLike<ToolbarPattern<V>>;
1079
+ /** A reference to the parent widget group. */
1080
+ group: SignalLike<ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined>;
1081
+ }
1082
+ declare class ToolbarWidgetPattern<V> implements ListItem<V> {
1083
+ readonly inputs: ToolbarWidgetInputs<V>;
1084
+ /** A unique identifier for the widget. */
1085
+ readonly id: () => string;
1086
+ /** The html element that should receive focus. */
1087
+ readonly element: () => HTMLElement | undefined;
1088
+ /** Whether the widget is disabled. */
1089
+ readonly disabled: () => boolean;
1090
+ /** A reference to the parent toolbar. */
1091
+ readonly group: () => ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined;
1092
+ /** A reference to the toolbar containing the widget. */
1093
+ readonly toolbar: () => ToolbarPattern<V>;
1094
+ /** The tabindex of the widget. */
1095
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1096
+ /** The text used by the typeahead search. */
1097
+ readonly searchTerm: () => string;
1098
+ /** The value associated with the widget. */
1099
+ readonly value: () => V;
1100
+ /** Whether the widget is selectable. */
1101
+ readonly selectable: () => boolean;
1102
+ /** The position of the widget within the toolbar. */
1103
+ readonly index: _angular_core.Signal<number>;
1104
+ /** Whether the widget is selected (only relevant in a selection group). */
1105
+ readonly selected: _angular_core.Signal<boolean>;
1106
+ /** Whether the widget is currently the active one (focused). */
1107
+ readonly active: SignalLike<boolean>;
1108
+ constructor(inputs: ToolbarWidgetInputs<V>);
1109
+ }
1110
+
1111
+ /** Represents the required inputs for a toolbar. */
1112
+ type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'value' | 'selectionMode' | 'focusMode'> & {
1113
+ /** A function that returns the toolbar item associated with a given element. */
1114
+ getItem: (e: Element) => ToolbarWidgetPattern<V> | undefined;
1115
+ };
1116
+ /** Controls the state of a toolbar. */
1117
+ declare class ToolbarPattern<V> {
1118
+ readonly inputs: ToolbarInputs<V>;
1119
+ /** The list behavior for the toolbar. */
1120
+ readonly listBehavior: List<ToolbarWidgetPattern<V>, V>;
1121
+ /** Whether the tablist is vertically or horizontally oriented. */
1122
+ readonly orientation: SignalLike<'vertical' | 'horizontal'>;
1123
+ /** Whether disabled items in the group should be focusable. */
1124
+ readonly softDisabled: SignalLike<boolean>;
1125
+ /** Whether the toolbar is disabled. */
1126
+ readonly disabled: _angular_core.Signal<boolean>;
1127
+ /** The tab index of the toolbar (if using activedescendant). */
1128
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1129
+ /** The id of the current active widget (if using activedescendant). */
1130
+ readonly activeDescendant: _angular_core.Signal<string | undefined>;
1131
+ /** The currently active item in the toolbar. */
1132
+ readonly activeItem: () => ToolbarWidgetPattern<V> | undefined;
1133
+ /** The key used to navigate to the previous widget. */
1134
+ private readonly _prevKey;
1135
+ /** The key used to navigate to the next widget. */
1136
+ private readonly _nextKey;
1137
+ /** The alternate key used to navigate to the previous widget. */
1138
+ private readonly _altPrevKey;
1139
+ /** The alternate key used to navigate to the next widget. */
1140
+ private readonly _altNextKey;
1141
+ /** The keydown event manager for the toolbar. */
1142
+ private readonly _keydown;
1143
+ /** Navigates to the next widget in a widget group. */
1144
+ private _groupNext;
1145
+ /** Navigates to the previous widget in a widget group. */
1146
+ private _groupPrev;
1147
+ /** Navigates to the widget targeted by a pointer event. */
1148
+ private _goto;
1149
+ select(): void;
1150
+ constructor(inputs: ToolbarInputs<V>);
1151
+ /** Handles keydown events for the toolbar. */
1152
+ onKeydown(event: KeyboardEvent): void;
1153
+ onPointerdown(event: PointerEvent): void;
1154
+ /** Handles click events for the toolbar. */
1155
+ onClick(event: MouseEvent): void;
1156
+ /**
1157
+ * Sets the toolbar to its default initial state.
1158
+ *
1159
+ * Sets the active index to the selected widget if one exists and is focusable.
1160
+ * Otherwise, sets the active index to the first focusable widget.
1161
+ */
1162
+ setDefaultState(): void;
1163
+ /** Validates the state of the toolbar and returns a list of accessibility violations. */
1164
+ validate(): string[];
1165
+ }
1166
+
1133
1167
  /** Inputs of the AccordionGroupPattern. */
1134
1168
  type AccordionGroupInputs = Omit<ListNavigationInputs<AccordionTriggerPattern> & ListFocusInputs<AccordionTriggerPattern> & Omit<ListExpansionInputs, 'items'>, 'focusMode'>;
1135
1169
  interface AccordionGroupPattern extends AccordionGroupInputs {
@@ -1171,8 +1205,8 @@ declare class AccordionTriggerPattern {
1171
1205
  active: _angular_core.Signal<boolean>;
1172
1206
  /** Id of the accordion panel controlled by the trigger. */
1173
1207
  controls: _angular_core.Signal<string | undefined>;
1174
- /** The tabindex of the trigger. */
1175
- tabindex: _angular_core.Signal<-1 | 0>;
1208
+ /** The tab index of the trigger. */
1209
+ tabIndex: _angular_core.Signal<-1 | 0>;
1176
1210
  /** Whether the trigger is disabled. Disabling an accordion group disables all the triggers. */
1177
1211
  disabled: _angular_core.Signal<boolean>;
1178
1212
  /** The index of the trigger within its accordion group. */
@@ -1224,13 +1258,27 @@ interface TreeItemInputs<V> extends Omit<ListItem<V>, 'index'> {
1224
1258
  /** The tree pattern this item belongs to. */
1225
1259
  tree: SignalLike<TreePattern<V>>;
1226
1260
  }
1227
- interface TreeItemPattern<V> extends TreeItemInputs<V> {
1228
- }
1229
1261
  /**
1230
1262
  * Represents an item in a Tree.
1231
1263
  */
1232
- declare class TreeItemPattern<V> implements ExpansionItem {
1264
+ declare class TreeItemPattern<V> implements ListItem<V>, ExpansionItem {
1233
1265
  readonly inputs: TreeItemInputs<V>;
1266
+ /** A unique identifier for this item. */
1267
+ readonly id: SignalLike<string>;
1268
+ /** The value of this item. */
1269
+ readonly value: SignalLike<V>;
1270
+ /** A reference to the item element. */
1271
+ readonly element: SignalLike<HTMLElement | undefined>;
1272
+ /** Whether the item is disabled. */
1273
+ readonly disabled: SignalLike<boolean>;
1274
+ /** The text used by the typeahead search. */
1275
+ readonly searchTerm: SignalLike<string>;
1276
+ /** The tree pattern this item belongs to. */
1277
+ readonly tree: SignalLike<TreePattern<V>>;
1278
+ /** The parent item. */
1279
+ readonly parent: SignalLike<TreeItemPattern<V> | TreePattern<V>>;
1280
+ /** The children items. */
1281
+ readonly children: SignalLike<TreeItemPattern<V>[]>;
1234
1282
  /** The position of this item among its siblings. */
1235
1283
  readonly index: _angular_core.Signal<number>;
1236
1284
  /** The unique identifier used by the expansion behavior. */
@@ -1241,24 +1289,26 @@ declare class TreeItemPattern<V> implements ExpansionItem {
1241
1289
  readonly expansion: ExpansionControl;
1242
1290
  /** Whether the item is expandable. It's expandable if children item exist. */
1243
1291
  readonly expandable: SignalLike<boolean>;
1292
+ /** Whether the item is selectable. */
1293
+ readonly selectable: SignalLike<boolean>;
1244
1294
  /** The level of the current item in a tree. */
1245
1295
  readonly level: SignalLike<number>;
1246
1296
  /** Whether this item is currently expanded. */
1247
1297
  readonly expanded: _angular_core.Signal<boolean>;
1248
1298
  /** Whether this item is visible. */
1249
- readonly visible: _angular_core.Signal<boolean>;
1299
+ readonly visible: SignalLike<boolean>;
1250
1300
  /** The number of items under the same parent at the same level. */
1251
1301
  readonly setsize: _angular_core.Signal<number>;
1252
1302
  /** The position of this item among its siblings (1-based). */
1253
1303
  readonly posinset: _angular_core.Signal<number>;
1254
1304
  /** Whether the item is active. */
1255
1305
  readonly active: _angular_core.Signal<boolean>;
1256
- /** The tabindex of the item. */
1257
- readonly tabindex: _angular_core.Signal<0 | -1>;
1306
+ /** The tab index of the item. */
1307
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
1258
1308
  /** Whether the item is selected. */
1259
- readonly selected: _angular_core.Signal<boolean | undefined>;
1309
+ readonly selected: SignalLike<boolean | undefined>;
1260
1310
  /** The current type of this item. */
1261
- readonly current: _angular_core.Signal<"page" | "step" | "location" | "date" | "time" | "true" | "false" | undefined>;
1311
+ readonly current: SignalLike<string | undefined>;
1262
1312
  constructor(inputs: TreeItemInputs<V>);
1263
1313
  }
1264
1314
  /** The selection operations that the tree can perform. */
@@ -1292,10 +1342,12 @@ declare class TreePattern<V> {
1292
1342
  readonly level: () => number;
1293
1343
  /** The root is always expanded. */
1294
1344
  readonly expanded: () => boolean;
1295
- /** The tabindex of the tree. */
1296
- tabindex: SignalLike<-1 | 0>;
1345
+ /** The roow is always visible. */
1346
+ readonly visible: () => boolean;
1347
+ /** The tab index of the tree. */
1348
+ readonly tabIndex: SignalLike<-1 | 0>;
1297
1349
  /** The id of the current active item. */
1298
- readonly activedescendant: _angular_core.Signal<string | undefined>;
1350
+ readonly activeDescendant: _angular_core.Signal<string | undefined>;
1299
1351
  /** The direct children of the root (top-level tree items). */
1300
1352
  readonly children: _angular_core.Signal<TreeItemPattern<V>[]>;
1301
1353
  /** All currently visible tree items. An item is visible if their parent is expanded. */
@@ -1318,6 +1370,34 @@ declare class TreePattern<V> {
1318
1370
  readonly keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
1319
1371
  /** The pointerdown event manager for the tree. */
1320
1372
  pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
1373
+ /** A unique identifier for the tree. */
1374
+ id: SignalLike<string>;
1375
+ /** Whether the tree is in navigation mode. */
1376
+ nav: SignalLike<boolean>;
1377
+ /** The aria-current type. */
1378
+ currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;
1379
+ /** All items in the tree, in document order (DFS-like, a flattened list). */
1380
+ allItems: SignalLike<TreeItemPattern<V>[]>;
1381
+ /** Whether the tree is disabled. */
1382
+ disabled: SignalLike<boolean>;
1383
+ /** The currently active item in the tree. */
1384
+ activeItem: WritableSignalLike<TreeItemPattern<V> | undefined>;
1385
+ /** Whether disabled items should be focusable. */
1386
+ softDisabled: SignalLike<boolean>;
1387
+ /** Whether the focus should wrap when navigating past the first or last item. */
1388
+ wrap: SignalLike<boolean>;
1389
+ /** The orientation of the tree. */
1390
+ orientation: SignalLike<'vertical' | 'horizontal'>;
1391
+ /** The text direction of the tree. */
1392
+ textDirection: SignalLike<'ltr' | 'rtl'>;
1393
+ /** Whether multiple items can be selected at the same time. */
1394
+ multi: SignalLike<boolean>;
1395
+ /** The selection mode of the tree. */
1396
+ selectionMode: SignalLike<'follow' | 'explicit'>;
1397
+ /** The delay in milliseconds to wait before clearing the typeahead buffer. */
1398
+ typeaheadDelay: SignalLike<number>;
1399
+ /** The current value of the tree (the selected items). */
1400
+ value: WritableSignalLike<V[]>;
1321
1401
  constructor(inputs: TreeInputs<V>);
1322
1402
  /**
1323
1403
  * Sets the tree to it's default initial state.
@@ -1357,8 +1437,8 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
1357
1437
  activeId: _angular_core.Signal<string | undefined>;
1358
1438
  /** The list of items in the tree. */
1359
1439
  items: _angular_core.Signal<TreeItemPattern<V>[]>;
1360
- /** The tabindex for the tree. Always -1 because the combobox handles focus. */
1361
- tabindex: SignalLike<-1 | 0>;
1440
+ /** The tab index for the tree. Always -1 because the combobox handles focus. */
1441
+ tabIndex: SignalLike<-1 | 0>;
1362
1442
  constructor(inputs: ComboboxTreeInputs<V>);
1363
1443
  /** Noop. The combobox handles keydown events. */
1364
1444
  onKeydown(_: KeyboardEvent): void;
@@ -1380,12 +1460,14 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
1380
1460
  unfocus: () => void;
1381
1461
  /** Selects the specified item in the tree or the current active item if not provided. */
1382
1462
  select: (item?: TreeItemPattern<V>) => void;
1463
+ /** Toggles the selection state of the given item in the tree or the current active item if not provided. */
1464
+ toggle: (item?: TreeItemPattern<V>) => void;
1383
1465
  /** Clears the selection in the tree. */
1384
1466
  clearSelection: () => void;
1385
1467
  /** Retrieves the TreeItemPattern associated with a pointer event. */
1386
1468
  getItem: (e: PointerEvent) => TreeItemPattern<V> | undefined;
1387
- /** Retrieves the currently selected item in the tree */
1388
- getSelectedItem: () => TreeItemPattern<V> | undefined;
1469
+ /** Retrieves the currently selected items in the tree */
1470
+ getSelectedItems: () => TreeItemPattern<V>[];
1389
1471
  /** Sets the value of the combobox tree. */
1390
1472
  setValue: (value: V | undefined) => void;
1391
1473
  /** Expands the currently focused item if it is expandable. */
@@ -1398,7 +1480,47 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
1398
1480
  expandAll: () => void;
1399
1481
  /** Collapses all of the tree items. */
1400
1482
  collapseAll: () => void;
1483
+ /** Whether the currently active item is selectable. */
1484
+ isItemSelectable: (item?: TreeItemPattern<V> | undefined) => boolean;
1485
+ }
1486
+
1487
+ /**
1488
+ * A container directive controls the visibility of its content.
1489
+ */
1490
+ declare class DeferredContentAware {
1491
+ readonly contentVisible: _angular_core.WritableSignal<boolean>;
1492
+ readonly preserveContent: _angular_core.ModelSignal<boolean>;
1493
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContentAware, never>;
1494
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContentAware, never, never, { "preserveContent": { "alias": "preserveContent"; "required": false; "isSignal": true; }; }, { "preserveContent": "preserveContentChange"; }, never, never, true, never>;
1495
+ }
1496
+ /**
1497
+ * DeferredContent loads/unloads the content based on the visibility.
1498
+ * The visibilty signal is sent from a parent directive implements
1499
+ * DeferredContentAware.
1500
+ *
1501
+ * Use this directive as a host directive. For example:
1502
+ *
1503
+ * ```ts
1504
+ * @Directive({
1505
+ * selector: 'ng-template[AccordionContent]',
1506
+ * hostDirectives: [DeferredContent],
1507
+ * })
1508
+ * class AccordionContent {}
1509
+ * ```
1510
+ */
1511
+ declare class DeferredContent implements OnDestroy {
1512
+ private readonly _deferredContentAware;
1513
+ private readonly _templateRef;
1514
+ private readonly _viewContainerRef;
1515
+ private _currentViewRef;
1516
+ private _isRendered;
1517
+ readonly deferredContentAware: _angular_core.WritableSignal<DeferredContentAware | null>;
1518
+ constructor();
1519
+ ngOnDestroy(): void;
1520
+ private _destroyContent;
1521
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContent, never>;
1522
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContent, never, never, {}, {}, never, never, true, never>;
1401
1523
  }
1402
1524
 
1403
- export { AccordionGroupPattern, AccordionPanelPattern, AccordionTriggerPattern, ComboboxListboxPattern, ComboboxPattern, ComboboxTreePattern, ListboxPattern, OptionPattern, RadioButtonPattern, RadioGroupPattern, TabListPattern, TabPanelPattern, TabPattern, ToolbarPattern, ToolbarRadioGroupPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern, TreeItemPattern, TreePattern, convertGetterSetterToWritableSignalLike };
1404
- export type { AccordionGroupInputs, AccordionPanelInputs, AccordionTriggerInputs, ComboboxInputs, ComboboxListboxControls, ComboboxListboxInputs, ComboboxTreeControls, ComboboxTreeInputs, ListboxInputs, OptionInputs, RadioButtonInputs, RadioGroupInputs, SignalLike, TabInputs, TabListInputs, TabPanelInputs, ToolbarInputs, ToolbarRadioGroupInputs, ToolbarWidgetGroupControls, ToolbarWidgetGroupInputs, ToolbarWidgetInputs, TreeInputs, TreeItemInputs, WritableSignalLike };
1525
+ export { AccordionGroupPattern, AccordionPanelPattern, AccordionTriggerPattern, ComboboxListboxPattern, ComboboxPattern, ComboboxTreePattern, DeferredContent, DeferredContentAware, ListboxPattern, MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern, OptionPattern, SignalLike, TabListPattern, TabPanelPattern, TabPattern, ToolbarPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern, TreeItemPattern, TreePattern, WritableSignalLike };
1526
+ export type { AccordionGroupInputs, AccordionPanelInputs, AccordionTriggerInputs, ComboboxInputs, ComboboxListboxControls, ComboboxListboxInputs, ComboboxTreeControls, ComboboxTreeInputs, ListboxInputs, MenuBarInputs, MenuInputs, MenuItemInputs, MenuTriggerInputs, OptionInputs, TabInputs, TabListInputs, TabPanelInputs, ToolbarInputs, ToolbarWidgetGroupInputs, ToolbarWidgetInputs, TreeInputs, TreeItemInputs };