@angular/aria 22.0.0-next.4 → 22.0.0-next.5

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 (84) hide show
  1. package/fesm2022/_accordion-chunk.mjs +5 -5
  2. package/fesm2022/_accordion-chunk.mjs.map +1 -1
  3. package/fesm2022/_click-event-manager-chunk.mjs.map +1 -1
  4. package/fesm2022/_combobox-chunk.mjs +5 -5
  5. package/fesm2022/_combobox-chunk.mjs.map +1 -1
  6. package/fesm2022/_combobox-listbox-chunk.mjs +1 -1
  7. package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -1
  8. package/fesm2022/_combobox-tree-chunk.mjs +6 -6
  9. package/fesm2022/_combobox-tree-chunk.mjs.map +1 -1
  10. package/fesm2022/_element-chunk.mjs +6 -0
  11. package/fesm2022/_element-chunk.mjs.map +1 -0
  12. package/fesm2022/_list-chunk.mjs.map +1 -1
  13. package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
  14. package/fesm2022/_list-typeahead-chunk.mjs.map +1 -1
  15. package/fesm2022/_menu-chunk.mjs.map +1 -1
  16. package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -1
  17. package/fesm2022/_signal-like-chunk.mjs.map +1 -1
  18. package/fesm2022/_tabs-chunk.mjs +1 -1
  19. package/fesm2022/_tabs-chunk.mjs.map +1 -1
  20. package/fesm2022/_widget-chunk.mjs +12 -166
  21. package/fesm2022/_widget-chunk.mjs.map +1 -1
  22. package/fesm2022/accordion-testing.mjs +61 -0
  23. package/fesm2022/accordion-testing.mjs.map +1 -0
  24. package/fesm2022/accordion.mjs +208 -183
  25. package/fesm2022/accordion.mjs.map +1 -1
  26. package/fesm2022/aria.mjs +1 -1
  27. package/fesm2022/aria.mjs.map +1 -1
  28. package/fesm2022/combobox.mjs.map +1 -1
  29. package/fesm2022/grid.mjs +14 -85
  30. package/fesm2022/grid.mjs.map +1 -1
  31. package/fesm2022/listbox-testing.mjs +55 -0
  32. package/fesm2022/listbox-testing.mjs.map +1 -0
  33. package/fesm2022/listbox.mjs +1 -1
  34. package/fesm2022/listbox.mjs.map +1 -1
  35. package/fesm2022/menu-testing.mjs +75 -0
  36. package/fesm2022/menu-testing.mjs.map +1 -0
  37. package/fesm2022/menu.mjs.map +1 -1
  38. package/fesm2022/private.mjs +2 -1
  39. package/fesm2022/private.mjs.map +1 -1
  40. package/fesm2022/tabs-testing.mjs +57 -0
  41. package/fesm2022/tabs-testing.mjs.map +1 -0
  42. package/fesm2022/tabs.mjs +3 -5
  43. package/fesm2022/tabs.mjs.map +1 -1
  44. package/fesm2022/toolbar-testing.mjs +56 -0
  45. package/fesm2022/toolbar-testing.mjs.map +1 -0
  46. package/fesm2022/toolbar.mjs +8 -6
  47. package/fesm2022/toolbar.mjs.map +1 -1
  48. package/fesm2022/tree-testing.mjs +88 -0
  49. package/fesm2022/tree-testing.mjs.map +1 -0
  50. package/fesm2022/tree.mjs +4 -6
  51. package/fesm2022/tree.mjs.map +1 -1
  52. package/package.json +26 -2
  53. package/resources/code-examples.db +0 -0
  54. package/types/_accordion-chunk.d.ts +10 -9
  55. package/types/_click-event-manager-chunk.d.ts +1 -1
  56. package/types/_combobox-chunk.d.ts +23 -23
  57. package/types/_element-chunk.d.ts +10 -0
  58. package/types/_expansion-chunk.d.ts +1 -1
  59. package/types/_grid-chunk.d.ts +11 -49
  60. package/types/_keyboard-event-manager-chunk.d.ts +2 -2
  61. package/types/_list-chunk.d.ts +19 -18
  62. package/types/_list-navigation-chunk.d.ts +6 -16
  63. package/types/_listbox-chunk.d.ts +27 -27
  64. package/types/_menu-chunk.d.ts +51 -51
  65. package/types/_pointer-event-manager-chunk.d.ts +1 -1
  66. package/types/_signal-like-chunk.d.ts +14 -0
  67. package/types/_tabs-chunk.d.ts +2 -1
  68. package/types/_toolbar-chunk.d.ts +1 -1
  69. package/types/_tree-chunk.d.ts +18 -17
  70. package/types/accordion-testing.d.ts +63 -0
  71. package/types/accordion.d.ts +69 -55
  72. package/types/combobox.d.ts +6 -5
  73. package/types/grid.d.ts +8 -14
  74. package/types/listbox-testing.d.ts +39 -0
  75. package/types/listbox.d.ts +19 -18
  76. package/types/menu-testing.d.ts +50 -0
  77. package/types/menu.d.ts +4 -3
  78. package/types/private.d.ts +46 -44
  79. package/types/tabs-testing.d.ts +57 -0
  80. package/types/tabs.d.ts +3 -5
  81. package/types/toolbar-testing.d.ts +72 -0
  82. package/types/toolbar.d.ts +3 -2
  83. package/types/tree-testing.d.ts +75 -0
  84. package/types/tree.d.ts +5 -6
package/types/grid.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { Signal, ElementRef } from '@angular/core';
3
3
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
4
  import { GridPattern, GridCellPattern, GridRowPattern, GridCellWidgetPattern } from './_grid-chunk.js';
5
- import './_list-navigation-chunk.js';
5
+ import './_signal-like-chunk.js';
6
6
  import './_keyboard-event-manager-chunk.js';
7
7
  import './_pointer-event-manager-chunk.js';
8
8
 
@@ -77,15 +77,13 @@ declare class Grid {
77
77
  * - `explicit`: Cells are selected explicitly by the user (e.g., via click or spacebar).
78
78
  */
79
79
  readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
80
- /** Whether enable range selections (with modifier keys or dragging). */
81
- readonly enableRangeSelection: _angular_core.InputSignalWithTransform<boolean, unknown>;
82
80
  /** The UI pattern for the grid. */
83
81
  readonly _pattern: GridPattern;
84
82
  constructor();
85
83
  /** Gets the cell pattern for a given element. */
86
84
  private _getCell;
87
85
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Grid, never>;
88
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Grid, "[ngGrid]", ["ngGrid"], { "enableSelection": { "alias": "enableSelection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "rowWrap": { "alias": "rowWrap"; "required": false; "isSignal": true; }; "colWrap": { "alias": "colWrap"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "enableRangeSelection": { "alias": "enableRangeSelection"; "required": false; "isSignal": true; }; }, {}, ["_rows"], never, true, never>;
86
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Grid, "[ngGrid]", ["ngGrid"], { "enableSelection": { "alias": "enableSelection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "rowWrap": { "alias": "rowWrap"; "required": false; "isSignal": true; }; "colWrap": { "alias": "colWrap"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; }, {}, ["_rows"], never, true, never>;
89
87
  }
90
88
 
91
89
  /**
@@ -110,10 +108,10 @@ declare class GridCell {
110
108
  readonly element: HTMLElement;
111
109
  /** Whether the cell is currently active (focused). */
112
110
  readonly active: Signal<boolean>;
113
- /** The widgets contained within this cell, if any. */
114
- private readonly _widgets;
111
+ /** The widget contained within this cell, if any. */
112
+ private readonly _widget;
115
113
  /** The UI pattern for the widget in this cell. */
116
- private readonly _widgetPatterns;
114
+ private readonly _widgetPattern;
117
115
  /** The parent row. */
118
116
  private readonly _row;
119
117
  /** Text direction. */
@@ -136,10 +134,6 @@ declare class GridCell {
136
134
  readonly selected: _angular_core.ModelSignal<boolean>;
137
135
  /** Whether the cell is selectable. */
138
136
  readonly selectable: _angular_core.InputSignal<boolean>;
139
- /** Orientation of the widgets in the cell. */
140
- readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
141
- /** Whether widgets navigation wraps. */
142
- readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
143
137
  /** The tabindex override. */
144
138
  readonly tabindex: _angular_core.InputSignal<number | undefined>;
145
139
  /**
@@ -154,7 +148,7 @@ declare class GridCell {
154
148
  /** Gets the cell widget pattern for a given element. */
155
149
  private _getWidget;
156
150
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridCell, never>;
157
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridCell, "[ngGridCell]", ["ngGridCell"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "rowSpan": { "alias": "rowSpan"; "required": false; "isSignal": true; }; "colSpan": { "alias": "colSpan"; "required": false; "isSignal": true; }; "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; "colIndex": { "alias": "colIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["_widgets"], never, true, never>;
151
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridCell, "[ngGridCell]", ["ngGridCell"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "rowSpan": { "alias": "rowSpan"; "required": false; "isSignal": true; }; "colSpan": { "alias": "colSpan"; "required": false; "isSignal": true; }; "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; "colIndex": { "alias": "colIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["_widget"], never, true, never>;
158
152
  }
159
153
 
160
154
  /**
@@ -227,9 +221,9 @@ declare class GridCellWidget {
227
221
  /** The target that will receive focus instead of the widget. */
228
222
  readonly focusTarget: _angular_core.InputSignal<ElementRef<any> | HTMLElement | undefined>;
229
223
  /** Emits when the widget is activated. */
230
- readonly activated: _angular_core.OutputEmitterRef<FocusEvent | KeyboardEvent | undefined>;
224
+ readonly activated: _angular_core.OutputEmitterRef<KeyboardEvent | FocusEvent | undefined>;
231
225
  /** Emits when the widget is deactivated. */
232
- readonly deactivated: _angular_core.OutputEmitterRef<FocusEvent | KeyboardEvent | undefined>;
226
+ readonly deactivated: _angular_core.OutputEmitterRef<KeyboardEvent | FocusEvent | undefined>;
233
227
  /** The tabindex override. */
234
228
  readonly tabindex: _angular_core.InputSignal<number | undefined>;
235
229
  /**
@@ -0,0 +1,39 @@
1
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+
3
+ /** Filters for locating a `ListboxOptionHarness`. */
4
+ interface ListboxOptionHarnessFilters extends BaseHarnessFilters {
5
+ /** Only find instances whose text matches the given value. */
6
+ text?: string | RegExp;
7
+ /** Only find instances whose selected state matches the given value. */
8
+ selected?: boolean;
9
+ /** Only find instances whose disabled state matches the given value. */
10
+ disabled?: boolean;
11
+ }
12
+ /** Filters for locating a `ListboxHarness`. */
13
+ interface ListboxHarnessFilters extends BaseHarnessFilters {
14
+ /** Only find instances whose disabled state matches the given value. */
15
+ disabled?: boolean;
16
+ }
17
+
18
+ declare class ListboxOptionHarness extends ComponentHarness {
19
+ static hostSelector: string;
20
+ static with(options?: ListboxOptionHarnessFilters): HarnessPredicate<ListboxOptionHarness>;
21
+ isSelected(): Promise<boolean>;
22
+ isDisabled(): Promise<boolean>;
23
+ getText(): Promise<string>;
24
+ click(): Promise<void>;
25
+ }
26
+ declare class ListboxHarness extends ComponentHarness {
27
+ static hostSelector: string;
28
+ static with(options?: ListboxHarnessFilters): HarnessPredicate<ListboxHarness>;
29
+ getOrientation(): Promise<'vertical' | 'horizontal'>;
30
+ isMulti(): Promise<boolean>;
31
+ isDisabled(): Promise<boolean>;
32
+ getOptions(filters?: ListboxOptionHarnessFilters): Promise<ListboxOptionHarness[]>;
33
+ focus(): Promise<void>;
34
+ /** Blurs the listbox container. */
35
+ blur(): Promise<void>;
36
+ }
37
+
38
+ export { ListboxHarness, ListboxOptionHarness };
39
+ export type { ListboxHarnessFilters, ListboxOptionHarnessFilters };
@@ -3,8 +3,9 @@ import * as _angular_core from '@angular/core';
3
3
  import { OptionPattern, ListboxPattern } from './_listbox-chunk.js';
4
4
  import { ComboboxPopup } from './combobox.js';
5
5
  export { Combobox as ɵɵCombobox, ComboboxDialog as ɵɵComboboxDialog, ComboboxInput as ɵɵComboboxInput, ComboboxPopupContainer as ɵɵComboboxPopupContainer } from './combobox.js';
6
- import './_list-navigation-chunk.js';
6
+ import './_signal-like-chunk.js';
7
7
  import './_list-chunk.js';
8
+ import './_list-navigation-chunk.js';
8
9
  import './_keyboard-event-manager-chunk.js';
9
10
  import './_click-event-manager-chunk.js';
10
11
  import './_combobox-chunk.js';
@@ -47,40 +48,40 @@ declare class Listbox<V> {
47
48
  /** The Options nested inside of the Listbox. */
48
49
  private readonly _options;
49
50
  /** A signal wrapper for directionality. */
50
- protected textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
51
+ protected readonly textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
51
52
  /** The Option UIPatterns of the child Options. */
52
- protected items: _angular_core.Signal<OptionPattern<V>[]>;
53
+ protected readonly items: _angular_core.Signal<OptionPattern<V>[]>;
53
54
  /** Whether the list is vertically or horizontally oriented. */
54
- orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
55
+ readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
55
56
  /** Whether multiple items in the list can be selected at once. */
56
- multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
57
+ readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
57
58
  /** Whether focus should wrap when navigating. */
58
- wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
59
+ readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
59
60
  /**
60
61
  * Whether to allow disabled items to receive focus. When `true`, disabled items are
61
62
  * focusable but not interactive. When `false`, disabled items are skipped during navigation.
62
63
  */
63
- softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
64
+ readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
64
65
  /**
65
66
  * The focus strategy used by the list.
66
67
  * - `roving`: Focus is moved to the active item using `tabindex`.
67
68
  * - `activedescendant`: Focus remains on the listbox container, and `aria-activedescendant` is used to indicate the active item.
68
69
  */
69
- focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
70
+ readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
70
71
  /**
71
72
  * The selection strategy used by the list.
72
73
  * - `follow`: The focused item is automatically selected.
73
74
  * - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).
74
75
  */
75
- selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
76
+ readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
76
77
  /** The amount of time before the typeahead search is reset. */
77
- typeaheadDelay: _angular_core.InputSignal<number>;
78
+ readonly typeaheadDelay: _angular_core.InputSignal<number>;
78
79
  /** Whether the listbox is disabled. */
79
- disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
80
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
80
81
  /** Whether the listbox is readonly. */
81
- readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
82
+ readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
82
83
  /** The values of the currently selected items. */
83
- value: _angular_core.ModelSignal<V[]>;
84
+ readonly value: _angular_core.ModelSignal<V[]>;
84
85
  /** The Listbox UIPattern. */
85
86
  readonly _pattern: ListboxPattern<V>;
86
87
  constructor();
@@ -115,21 +116,21 @@ declare class Option<V> {
115
116
  /** A reference to the host element. */
116
117
  readonly element: HTMLElement;
117
118
  /** Whether the option is currently active (focused). */
118
- active: _angular_core.Signal<boolean>;
119
+ readonly active: _angular_core.Signal<boolean>;
119
120
  /** The parent Listbox. */
120
121
  private readonly _listbox;
121
122
  /** A unique identifier for the option. */
122
123
  readonly id: _angular_core.InputSignal<string>;
123
124
  /** The text used by the typeahead search. */
124
- protected searchTerm: _angular_core.Signal<string>;
125
+ protected readonly searchTerm: _angular_core.Signal<string>;
125
126
  /** The parent Listbox UIPattern. */
126
127
  private readonly _listboxPattern;
127
128
  /** The value of the option. */
128
- value: _angular_core.InputSignal<V>;
129
+ readonly value: _angular_core.InputSignal<V>;
129
130
  /** Whether an item is disabled. */
130
- disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
131
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
131
132
  /** The text used by the typeahead search. */
132
- label: _angular_core.InputSignal<string | undefined>;
133
+ readonly label: _angular_core.InputSignal<string | undefined>;
133
134
  /** Whether the option is selected. */
134
135
  readonly selected: _angular_core.Signal<boolean | undefined>;
135
136
  /** The Option UIPattern. */
@@ -0,0 +1,50 @@
1
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate, TestElement } from '@angular/cdk/testing';
2
+
3
+ /** Filters for locating a `MenuHarness`. */
4
+ interface MenuHarnessFilters extends BaseHarnessFilters {
5
+ /** Only find instances whose trigger text matches the given value. */
6
+ triggerText?: string | RegExp;
7
+ }
8
+ /** Filters for locating a `MenuItemHarness`. */
9
+ interface MenuItemHarnessFilters extends BaseHarnessFilters {
10
+ /** Only find instances whose text matches the given value. */
11
+ text?: string | RegExp;
12
+ /** Only find instances whose disabled state matches the given value. */
13
+ disabled?: boolean;
14
+ /** Only find instances whose expanded state matches the given value. */
15
+ expanded?: boolean;
16
+ }
17
+
18
+ /** Harness for interacting with a standard ngMenuItem in tests. */
19
+ declare class MenuItemHarness extends ComponentHarness {
20
+ static hostSelector: string;
21
+ static with(options?: MenuItemHarnessFilters): HarnessPredicate<MenuItemHarness>;
22
+ /** Gets the text content of the menu item. */
23
+ getText(): Promise<string>;
24
+ /** Whether the menu item is disabled. */
25
+ isDisabled(): Promise<boolean>;
26
+ /** Whether the menu item is expanded (contains an open submenu). */
27
+ isExpanded(): Promise<boolean>;
28
+ /** Clicks the menu item to trigger its action or toggle its submenu. */
29
+ click(): Promise<void>;
30
+ /** Resolves the nested submenu panel associated with this menu item, if any exists. */
31
+ getSubmenu(): Promise<MenuHarness | null>;
32
+ }
33
+ /** Harness for interacting with a standard ngMenu or ngMenuBar in tests. */
34
+ declare class MenuHarness extends ComponentHarness {
35
+ static hostSelector: string;
36
+ static with(options?: MenuHarnessFilters): HarnessPredicate<MenuHarness>;
37
+ /** Resolves the trigger associated with this menu container via aria-controls inversion. */
38
+ _getTrigger(): Promise<TestElement | null>;
39
+ /** Checks whether the menu container is visible. */
40
+ isOpen(): Promise<boolean>;
41
+ /** Opens the menu if it is currently closed. */
42
+ open(): Promise<void>;
43
+ /** Closes the menu if it is currently open. */
44
+ close(): Promise<void>;
45
+ /** Queries all menu items inside this menu container. */
46
+ getItems(filters?: MenuItemHarnessFilters): Promise<MenuItemHarness[]>;
47
+ }
48
+
49
+ export { MenuHarness, MenuItemHarness };
50
+ export type { MenuHarnessFilters, MenuItemHarnessFilters };
package/types/menu.d.ts CHANGED
@@ -3,9 +3,10 @@ import { Signal } from '@angular/core';
3
3
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
4
  import { MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern } from './_menu-chunk.js';
5
5
  import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
6
- import { SignalLike } from './_list-navigation-chunk.js';
6
+ import { SignalLike } from './_signal-like-chunk.js';
7
7
  import './_keyboard-event-manager-chunk.js';
8
8
  import './_list-chunk.js';
9
+ import './_list-navigation-chunk.js';
9
10
 
10
11
  /**
11
12
  * A menu bar of menu items.
@@ -225,7 +226,7 @@ declare class MenuTrigger<V> {
225
226
  /** The directionality (LTR / RTL) context for the application (or a subtree of it). */
226
227
  readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
227
228
  /** The menu associated with the trigger. */
228
- menu: _angular_core.InputSignal<Menu<V> | undefined>;
229
+ readonly menu: _angular_core.InputSignal<Menu<V> | undefined>;
229
230
  /** Whether the menu is expanded. */
230
231
  readonly expanded: _angular_core.Signal<boolean>;
231
232
  /** Whether the menu trigger has a popup. */
@@ -235,7 +236,7 @@ declare class MenuTrigger<V> {
235
236
  /** Whether the menu trigger is soft disabled. */
236
237
  readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
237
238
  /** The menu trigger ui pattern instance. */
238
- _pattern: MenuTriggerPattern<V>;
239
+ readonly _pattern: MenuTriggerPattern<V>;
239
240
  constructor();
240
241
  /** Opens the menu focusing on the first menu item. */
241
242
  open(): void;
@@ -2,8 +2,8 @@ import { ComboboxPattern, ComboboxListboxControls, ComboboxTreeControls } from '
2
2
  export { ComboboxDialogPattern, ComboboxInputs } from './_combobox-chunk.js';
3
3
  import { ListboxInputs, OptionPattern, ListboxPattern } from './_listbox-chunk.js';
4
4
  export { OptionInputs } from './_listbox-chunk.js';
5
- import { SignalLike } from './_list-navigation-chunk.js';
6
- export { WritableSignalLike, computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal } from './_list-navigation-chunk.js';
5
+ import { SignalLike } from './_signal-like-chunk.js';
6
+ export { WritableSignalLike, computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal } from './_signal-like-chunk.js';
7
7
  export { MenuBarInputs, MenuBarPattern, MenuInputs, MenuItemInputs, MenuItemPattern, MenuPattern, MenuTriggerInputs, MenuTriggerPattern } from './_menu-chunk.js';
8
8
  export { TabInputs, TabListInputs, TabListPattern, TabPanelInputs, TabPanelPattern, TabPattern } from './_tabs-chunk.js';
9
9
  export { ToolbarInputs, ToolbarPattern, ToolbarWidgetGroupInputs, ToolbarWidgetGroupPattern, ToolbarWidgetInputs, ToolbarWidgetPattern } from './_toolbar-chunk.js';
@@ -12,10 +12,12 @@ import { TreeInputs, TreeItemPattern, TreePattern } from './_tree-chunk.js';
12
12
  export { TreeItemInputs } from './_tree-chunk.js';
13
13
  export { GridCellInputs, GridCellPattern, GridCellWidgetInputs, GridCellWidgetPattern, GridInputs, GridPattern, GridRowInputs, GridRowPattern } from './_grid-chunk.js';
14
14
  export { DeferredContent, DeferredContentAware } from './_deferred-content-chunk.js';
15
+ export { HasElement, sortDirectives } from './_element-chunk.js';
15
16
  export { untracked } from '@angular/core/primitives/signals';
16
17
  import './_keyboard-event-manager-chunk.js';
17
18
  import './_pointer-event-manager-chunk.js';
18
19
  import './_list-chunk.js';
20
+ import './_list-navigation-chunk.js';
19
21
  import './_click-event-manager-chunk.js';
20
22
  import './_expansion-chunk.js';
21
23
  import '@angular/core';
@@ -27,13 +29,13 @@ type ComboboxListboxInputs<V> = ListboxInputs<V> & {
27
29
  declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements ComboboxListboxControls<OptionPattern<V>, V> {
28
30
  readonly inputs: ComboboxListboxInputs<V>;
29
31
  /** A unique identifier for the popup. */
30
- id: SignalLike<string>;
32
+ readonly id: SignalLike<string>;
31
33
  /** The ARIA role for the listbox. */
32
- role: SignalLike<"listbox">;
34
+ readonly role: SignalLike<"listbox">;
33
35
  /** The id of the active (focused) item in the listbox. */
34
- activeId: SignalLike<string | undefined>;
36
+ readonly activeId: SignalLike<string | undefined>;
35
37
  /** The list of options in the listbox. */
36
- items: SignalLike<OptionPattern<V>[]>;
38
+ readonly items: SignalLike<OptionPattern<V>[]>;
37
39
  /** The tab index for the listbox. Always -1 because the combobox handles focus. */
38
40
  tabIndex: SignalLike<-1 | 0>;
39
41
  /** Whether multiple items in the list can be selected at once. */
@@ -46,33 +48,33 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
46
48
  /** Noop. The combobox controls the open state. */
47
49
  setDefaultState(): void;
48
50
  /** Navigates to the specified item in the listbox. */
49
- focus: (item: OptionPattern<V>, opts?: {
51
+ readonly focus: (item: OptionPattern<V>, opts?: {
50
52
  focusElement?: boolean;
51
53
  }) => void;
52
54
  /** Navigates to the previous focusable item in the listbox. */
53
- getActiveItem: () => OptionPattern<V> | undefined;
55
+ readonly getActiveItem: () => OptionPattern<V> | undefined;
54
56
  /** Navigates to the next focusable item in the listbox. */
55
- next: () => void;
57
+ readonly next: () => void;
56
58
  /** Navigates to the previous focusable item in the listbox. */
57
- prev: () => void;
59
+ readonly prev: () => void;
58
60
  /** Navigates to the last focusable item in the listbox. */
59
- last: () => void;
61
+ readonly last: () => void;
60
62
  /** Navigates to the first focusable item in the listbox. */
61
- first: () => void;
63
+ readonly first: () => void;
62
64
  /** Unfocuses the currently focused item in the listbox. */
63
- unfocus: () => void;
65
+ readonly unfocus: () => void;
64
66
  /** Selects the specified item in the listbox. */
65
- select: (item?: OptionPattern<V>) => void;
67
+ readonly select: (item?: OptionPattern<V>) => void;
66
68
  /** Toggles the selection state of the given item in the listbox. */
67
- toggle: (item?: OptionPattern<V>) => void;
69
+ readonly toggle: (item?: OptionPattern<V>) => void;
68
70
  /** Clears the selection in the listbox. */
69
- clearSelection: () => void;
71
+ readonly clearSelection: () => void;
70
72
  /** Retrieves the OptionPattern associated with a pointer event. */
71
- getItem: (e: PointerEvent) => OptionPattern<V> | undefined;
73
+ readonly getItem: (e: PointerEvent) => OptionPattern<V> | undefined;
72
74
  /** Retrieves the currently selected items in the listbox. */
73
- getSelectedItems: () => OptionPattern<V>[];
75
+ readonly getSelectedItems: () => OptionPattern<V>[];
74
76
  /** Sets the value of the combobox listbox. */
75
- setValue: (value: V | undefined) => void;
77
+ readonly setValue: (value: V | undefined) => void;
76
78
  }
77
79
 
78
80
  type ComboboxTreeInputs<V> = TreeInputs<V> & {
@@ -82,61 +84,61 @@ type ComboboxTreeInputs<V> = TreeInputs<V> & {
82
84
  declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxTreeControls<TreeItemPattern<V>, V> {
83
85
  readonly inputs: ComboboxTreeInputs<V>;
84
86
  /** Toggles to expand or collapse a tree item. */
85
- toggleExpansion: (item?: TreeItemPattern<V>) => void;
87
+ readonly toggleExpansion: (item?: TreeItemPattern<V>) => void;
86
88
  /** Whether the currently focused item is collapsible. */
87
- isItemCollapsible: () => boolean;
89
+ readonly isItemCollapsible: () => boolean;
88
90
  /** The ARIA role for the tree. */
89
- role: () => "tree";
90
- activeId: SignalLike<string | undefined>;
91
+ readonly role: () => "tree";
92
+ readonly activeId: SignalLike<string | undefined>;
91
93
  /** Returns the currently active (focused) item in the tree. */
92
- getActiveItem: () => TreeItemPattern<V> | undefined;
94
+ readonly getActiveItem: () => TreeItemPattern<V> | undefined;
93
95
  /** The list of items in the tree. */
94
96
  items: SignalLike<TreeItemPattern<V>[]>;
95
97
  /** The tab index for the tree. Always -1 because the combobox handles focus. */
96
- tabIndex: SignalLike<-1 | 0>;
98
+ readonly tabIndex: SignalLike<-1 | 0>;
97
99
  constructor(inputs: ComboboxTreeInputs<V>);
98
100
  /** Noop. The combobox handles keydown events. */
99
101
  onKeydown(_: KeyboardEvent): void;
100
- /** Noop. The combobox handles pointerdown events. */
101
- onPointerdown(_: PointerEvent): void;
102
+ /** Noop. The combobox handles click events. */
103
+ onClick(_: PointerEvent): void;
102
104
  /** Noop. The combobox controls the open state. */
103
105
  setDefaultState(): void;
104
106
  /** Navigates to the specified item in the tree. */
105
- focus: (item: TreeItemPattern<V>) => void;
107
+ readonly focus: (item: TreeItemPattern<V>) => void;
106
108
  /** Navigates to the next focusable item in the tree. */
107
- next: () => void;
109
+ readonly next: () => void;
108
110
  /** Navigates to the previous focusable item in the tree. */
109
- prev: () => void;
111
+ readonly prev: () => void;
110
112
  /** Navigates to the last focusable item in the tree. */
111
- last: () => void;
113
+ readonly last: () => void;
112
114
  /** Navigates to the first focusable item in the tree. */
113
- first: () => void;
115
+ readonly first: () => void;
114
116
  /** Unfocuses the currently focused item in the tree. */
115
- unfocus: () => void;
117
+ readonly unfocus: () => void;
116
118
  /** Selects the specified item in the tree or the current active item if not provided. */
117
- select: (item?: TreeItemPattern<V>) => void;
119
+ readonly select: (item?: TreeItemPattern<V>) => void;
118
120
  /** Toggles the selection state of the given item in the tree or the current active item if not provided. */
119
- toggle: (item?: TreeItemPattern<V>) => void;
121
+ readonly toggle: (item?: TreeItemPattern<V>) => void;
120
122
  /** Clears the selection in the tree. */
121
- clearSelection: () => void;
123
+ readonly clearSelection: () => void;
122
124
  /** Retrieves the TreeItemPattern associated with a pointer event. */
123
- getItem: (e: PointerEvent) => TreeItemPattern<V> | undefined;
125
+ readonly getItem: (e: PointerEvent) => TreeItemPattern<V> | undefined;
124
126
  /** Retrieves the currently selected items in the tree */
125
- getSelectedItems: () => TreeItemPattern<V>[];
127
+ readonly getSelectedItems: () => TreeItemPattern<V>[];
126
128
  /** Sets the value of the combobox tree. */
127
- setValue: (value: V | undefined) => void;
129
+ readonly setValue: (value: V | undefined) => void;
128
130
  /** Expands the currently focused item if it is expandable, or navigates to the first child. */
129
- expandItem: () => void;
131
+ readonly expandItem: () => void;
130
132
  /** Collapses the currently focused item if it is expandable, or navigates to the parent. */
131
- collapseItem: () => void;
133
+ readonly collapseItem: () => void;
132
134
  /** Whether the specified item or the currently active item is expandable. */
133
135
  isItemExpandable(item?: TreeItemPattern<V> | undefined): boolean;
134
136
  /** Expands all of the tree items. */
135
- expandAll: () => void;
137
+ readonly expandAll: () => void;
136
138
  /** Collapses all of the tree items. */
137
- collapseAll: () => void;
139
+ readonly collapseAll: () => void;
138
140
  /** Whether the currently active item is selectable. */
139
- isItemSelectable: (item?: TreeItemPattern<V> | undefined) => boolean;
141
+ readonly isItemSelectable: (item?: TreeItemPattern<V> | undefined) => boolean;
140
142
  }
141
143
 
142
144
  export { ComboboxListboxControls, ComboboxListboxPattern, ComboboxPattern, ComboboxTreeControls, ComboboxTreePattern, ListboxInputs, ListboxPattern, OptionPattern, SignalLike, TreeInputs, TreeItemPattern, TreePattern };
@@ -0,0 +1,57 @@
1
+ import { BaseHarnessFilters, ContentContainerComponentHarness, HarnessPredicate, HarnessLoader, ComponentHarness } from '@angular/cdk/testing';
2
+
3
+ /** A set of criteria that can be used to filter a list of `TabsHarness` instances. */
4
+ interface TabsHarnessFilters extends BaseHarnessFilters {
5
+ }
6
+ /** A set of criteria that can be used to filter a list of `TabHarness` instances. */
7
+ interface TabHarnessFilters extends BaseHarnessFilters {
8
+ /** Only find instances whose title matches the given value. */
9
+ title?: string | RegExp;
10
+ /** Only find instances that are selected. */
11
+ selected?: boolean;
12
+ /** Only find instances that are disabled. */
13
+ disabled?: boolean;
14
+ }
15
+
16
+ /** Harness for interacting with an Aria tab in tests. */
17
+ declare class TabHarness extends ContentContainerComponentHarness {
18
+ static hostSelector: string;
19
+ /**
20
+ * Gets a `HarnessPredicate` that can be used to search for a `TabHarness`
21
+ * that meets certain criteria.
22
+ * @param options Options for filtering which tab instances are considered a match.
23
+ * @return a `HarnessPredicate` configured with the given options.
24
+ */
25
+ static with(options?: TabHarnessFilters): HarnessPredicate<TabHarness>;
26
+ /** Gets the tab's title text. */
27
+ getTitle(): Promise<string>;
28
+ /** Clicks the tab to select it. */
29
+ select(): Promise<void>;
30
+ /** Gets whether the tab is selected. */
31
+ isSelected(): Promise<boolean>;
32
+ /** Gets whether the tab is disabled. */
33
+ isDisabled(): Promise<boolean>;
34
+ /** Gets whether the tab is active. */
35
+ isActive(): Promise<boolean>;
36
+ protected getRootHarnessLoader(): Promise<HarnessLoader>;
37
+ }
38
+ /** Harness for interacting with an Aria tabs container in tests. */
39
+ declare class TabsHarness extends ComponentHarness {
40
+ static hostSelector: string;
41
+ /**
42
+ * Gets a `HarnessPredicate` that can be used to search for a `TabsHarness`
43
+ * that meets certain criteria.
44
+ * @param options Options for filtering which tabs instances are considered a match.
45
+ * @return a `HarnessPredicate` configured with the given options.
46
+ */
47
+ static with(options?: TabsHarnessFilters): HarnessPredicate<TabsHarness>;
48
+ /** Gets all tabs inside the tabs container. */
49
+ getTabs(filters?: TabHarnessFilters): Promise<TabHarness[]>;
50
+ /** Gets the currently selected tab. */
51
+ getSelectedTab(): Promise<TabHarness | null>;
52
+ /** Selects a tab matching the given filters. */
53
+ selectTab(filters?: TabHarnessFilters): Promise<void>;
54
+ }
55
+
56
+ export { TabHarness, TabsHarness };
57
+ export type { TabHarnessFilters, TabsHarnessFilters };
package/types/tabs.d.ts CHANGED
@@ -2,15 +2,13 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnDestroy } from '@angular/core';
3
3
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
4
  import { TabPattern, TabListPattern, TabPanelPattern } from './_tabs-chunk.js';
5
+ import { HasElement } from './_element-chunk.js';
5
6
  import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
6
7
  import './_keyboard-event-manager-chunk.js';
7
- import './_list-navigation-chunk.js';
8
+ import './_signal-like-chunk.js';
8
9
  import './_click-event-manager-chunk.js';
9
10
  import './_expansion-chunk.js';
10
-
11
- interface HasElement {
12
- element: HTMLElement;
13
- }
11
+ import './_list-navigation-chunk.js';
14
12
 
15
13
  /**
16
14
  * A selectable tab in a TabList.
@@ -0,0 +1,72 @@
1
+ import { BaseHarnessFilters, ContentContainerComponentHarness, HarnessPredicate, ComponentHarness } from '@angular/cdk/testing';
2
+
3
+ /** A set of criteria that can be used to filter a list of Aria toolbar instances. */
4
+ interface ToolbarHarnessFilters extends BaseHarnessFilters {
5
+ }
6
+ /** A set of criteria that can be used to filter a list of Aria toolbar widget group instances. */
7
+ interface ToolbarWidgetGroupHarnessFilters extends BaseHarnessFilters {
8
+ }
9
+ /** A set of criteria that can be used to filter a list of Aria toolbar widgets. */
10
+ interface ToolbarWidgetHarnessFilters extends BaseHarnessFilters {
11
+ /** Text that the widget should match. */
12
+ text?: string | RegExp;
13
+ /** Active state that the widget should match. */
14
+ active?: boolean;
15
+ }
16
+
17
+ /** Harness for interacting with an Aria toolbar widget in tests. */
18
+ declare class ToolbarWidgetHarness extends ContentContainerComponentHarness<string> {
19
+ static hostSelector: string;
20
+ /**
21
+ * Gets a `HarnessPredicate` that can be used to search for a `ToolbarWidgetHarness`
22
+ * that meets certain criteria.
23
+ * @param options Options for filtering which dialog instances are considered a match.
24
+ * @return a `HarnessPredicate` configured with the given options.
25
+ */
26
+ static with(options?: ToolbarWidgetHarnessFilters): HarnessPredicate<ToolbarWidgetHarness>;
27
+ /** Gets the widget's text. */
28
+ getText(): Promise<string>;
29
+ /** Clicks the widget. */
30
+ click(): Promise<void>;
31
+ /** Gets whether the widget is active. */
32
+ isActive(): Promise<boolean>;
33
+ /** Gets whether the widget is disabled. */
34
+ isDisabled(): Promise<boolean>;
35
+ }
36
+
37
+ /** Harness for interacting with an Aria toolbar widget group in tests. */
38
+ declare class ToolbarWidgetGroupHarness extends ComponentHarness {
39
+ static hostSelector: string;
40
+ /**
41
+ * Gets a `HarnessPredicate` that can be used to search for a `ToolbarWidgetGroupHarness`
42
+ * that meets certain criteria.
43
+ * @param options Options for filtering which dialog instances are considered a match.
44
+ * @return a `HarnessPredicate` configured with the given options.
45
+ */
46
+ static with(options?: ToolbarWidgetGroupHarnessFilters): HarnessPredicate<ToolbarWidgetGroupHarness>;
47
+ /** Gets all widgets in the group. */
48
+ getWidgets(filters?: ToolbarWidgetHarnessFilters): Promise<ToolbarWidgetHarness[]>;
49
+ }
50
+
51
+ /** Harness for interacting with an Aria toolbar in tests. */
52
+ declare class ToolbarHarness extends ComponentHarness {
53
+ static hostSelector: string;
54
+ /**
55
+ * Gets a `HarnessPredicate` that can be used to search for a `ToolbarHarness`
56
+ * that meets certain criteria.
57
+ * @param options Options for filtering which dialog instances are considered a match.
58
+ * @return a `HarnessPredicate` configured with the given options.
59
+ */
60
+ static with(options?: ToolbarHarnessFilters): HarnessPredicate<ToolbarHarness>;
61
+ /** Gets all widgets in the toolbar. */
62
+ getWidgets(filters?: ToolbarWidgetHarnessFilters): Promise<ToolbarWidgetHarness[]>;
63
+ /** Gets all widget groups in the toolbar. */
64
+ getWidgetGroups(filters?: ToolbarWidgetGroupHarnessFilters): Promise<ToolbarWidgetGroupHarness[]>;
65
+ /** Gets whether the toolbar is disabled. */
66
+ isDisabled(): Promise<boolean>;
67
+ /** Gets the orientation of the toolbar. */
68
+ getOrientation(): Promise<'vertical' | 'horizontal'>;
69
+ }
70
+
71
+ export { ToolbarHarness, ToolbarWidgetGroupHarness, ToolbarWidgetHarness };
72
+ export type { ToolbarHarnessFilters, ToolbarWidgetGroupHarnessFilters, ToolbarWidgetHarnessFilters };
@@ -2,8 +2,9 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnDestroy } from '@angular/core';
3
3
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
4
  import { ToolbarWidgetGroupPattern, ToolbarWidgetPattern, ToolbarPattern } from './_toolbar-chunk.js';
5
- import './_list-navigation-chunk.js';
5
+ import './_signal-like-chunk.js';
6
6
  import './_list-chunk.js';
7
+ import './_list-navigation-chunk.js';
7
8
 
8
9
  /**
9
10
  * A directive that groups toolbar widgets, used for more complex widgets like radio groups
@@ -124,7 +125,7 @@ declare class Toolbar<V> {
124
125
  * Whether to allow disabled items to receive focus. When `true`, disabled items are
125
126
  * focusable but not interactive. When `false`, disabled items are skipped during navigation.
126
127
  */
127
- softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
128
+ readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
128
129
  /** Whether the toolbar is disabled. */
129
130
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
130
131
  /** Whether focus should wrap when navigating. */