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

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 (87) 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/_deferred-content-chunk.mjs.map +1 -1
  11. package/fesm2022/_element-chunk.mjs +6 -0
  12. package/fesm2022/_element-chunk.mjs.map +1 -0
  13. package/fesm2022/_expansion-chunk.mjs.map +1 -1
  14. package/fesm2022/_list-chunk.mjs.map +1 -1
  15. package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
  16. package/fesm2022/_list-typeahead-chunk.mjs.map +1 -1
  17. package/fesm2022/_menu-chunk.mjs.map +1 -1
  18. package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -1
  19. package/fesm2022/_signal-like-chunk.mjs.map +1 -1
  20. package/fesm2022/_tabs-chunk.mjs +1 -1
  21. package/fesm2022/_tabs-chunk.mjs.map +1 -1
  22. package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
  23. package/fesm2022/_widget-chunk.mjs +12 -166
  24. package/fesm2022/_widget-chunk.mjs.map +1 -1
  25. package/fesm2022/accordion-testing.mjs +61 -0
  26. package/fesm2022/accordion-testing.mjs.map +1 -0
  27. package/fesm2022/accordion.mjs +208 -183
  28. package/fesm2022/accordion.mjs.map +1 -1
  29. package/fesm2022/aria.mjs +1 -1
  30. package/fesm2022/aria.mjs.map +1 -1
  31. package/fesm2022/combobox.mjs.map +1 -1
  32. package/fesm2022/grid.mjs +14 -85
  33. package/fesm2022/grid.mjs.map +1 -1
  34. package/fesm2022/listbox-testing.mjs +55 -0
  35. package/fesm2022/listbox-testing.mjs.map +1 -0
  36. package/fesm2022/listbox.mjs +1 -1
  37. package/fesm2022/listbox.mjs.map +1 -1
  38. package/fesm2022/menu-testing.mjs +75 -0
  39. package/fesm2022/menu-testing.mjs.map +1 -0
  40. package/fesm2022/menu.mjs.map +1 -1
  41. package/fesm2022/private.mjs +2 -1
  42. package/fesm2022/private.mjs.map +1 -1
  43. package/fesm2022/tabs-testing.mjs +57 -0
  44. package/fesm2022/tabs-testing.mjs.map +1 -0
  45. package/fesm2022/tabs.mjs +3 -5
  46. package/fesm2022/tabs.mjs.map +1 -1
  47. package/fesm2022/toolbar-testing.mjs +56 -0
  48. package/fesm2022/toolbar-testing.mjs.map +1 -0
  49. package/fesm2022/toolbar.mjs +8 -6
  50. package/fesm2022/toolbar.mjs.map +1 -1
  51. package/fesm2022/tree-testing.mjs +88 -0
  52. package/fesm2022/tree-testing.mjs.map +1 -0
  53. package/fesm2022/tree.mjs +4 -6
  54. package/fesm2022/tree.mjs.map +1 -1
  55. package/package.json +26 -2
  56. package/resources/code-examples.db +0 -0
  57. package/types/_accordion-chunk.d.ts +10 -9
  58. package/types/_click-event-manager-chunk.d.ts +1 -1
  59. package/types/_combobox-chunk.d.ts +23 -23
  60. package/types/_element-chunk.d.ts +10 -0
  61. package/types/_expansion-chunk.d.ts +1 -1
  62. package/types/_grid-chunk.d.ts +11 -49
  63. package/types/_keyboard-event-manager-chunk.d.ts +2 -2
  64. package/types/_list-chunk.d.ts +19 -18
  65. package/types/_list-navigation-chunk.d.ts +6 -16
  66. package/types/_listbox-chunk.d.ts +27 -27
  67. package/types/_menu-chunk.d.ts +51 -51
  68. package/types/_pointer-event-manager-chunk.d.ts +1 -1
  69. package/types/_signal-like-chunk.d.ts +14 -0
  70. package/types/_tabs-chunk.d.ts +2 -1
  71. package/types/_toolbar-chunk.d.ts +1 -1
  72. package/types/_tree-chunk.d.ts +18 -17
  73. package/types/accordion-testing.d.ts +63 -0
  74. package/types/accordion.d.ts +69 -55
  75. package/types/combobox.d.ts +6 -5
  76. package/types/grid.d.ts +8 -14
  77. package/types/listbox-testing.d.ts +39 -0
  78. package/types/listbox.d.ts +19 -18
  79. package/types/menu-testing.d.ts +50 -0
  80. package/types/menu.d.ts +4 -3
  81. package/types/private.d.ts +46 -44
  82. package/types/tabs-testing.d.ts +57 -0
  83. package/types/tabs.d.ts +3 -5
  84. package/types/toolbar-testing.d.ts +72 -0
  85. package/types/toolbar.d.ts +3 -2
  86. package/types/tree-testing.d.ts +75 -0
  87. package/types/tree.d.ts +5 -6
@@ -1,4 +1,4 @@
1
- import { SignalLike, WritableSignalLike } from './_list-navigation-chunk.js';
1
+ import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
2
2
  import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
3
3
  import { ListInputs, ListItem, List } from './_list-chunk.js';
4
4
 
@@ -48,41 +48,41 @@ interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
48
48
  declare class MenuPattern<V> {
49
49
  readonly inputs: MenuInputs<V>;
50
50
  /** The unique ID of the menu. */
51
- id: SignalLike<string>;
51
+ readonly id: SignalLike<string>;
52
52
  /** The role of the menu. */
53
- role: () => string;
53
+ readonly role: () => string;
54
54
  /** Whether the menu is disabled. */
55
- disabled: () => boolean;
55
+ readonly disabled: () => boolean;
56
56
  /** Whether the menu is visible. */
57
- visible: SignalLike<boolean>;
57
+ readonly visible: SignalLike<boolean>;
58
58
  /** Controls list behavior for the menu items. */
59
- listBehavior: List<MenuItemPattern<V>, V>;
59
+ readonly listBehavior: List<MenuItemPattern<V>, V>;
60
60
  /** Whether the menu or any of its child elements are currently focused. */
61
- isFocused: WritableSignalLike<boolean>;
61
+ readonly isFocused: WritableSignalLike<boolean>;
62
62
  /** Whether the menu has received interaction. */
63
- hasBeenInteracted: WritableSignalLike<boolean>;
63
+ readonly hasBeenInteracted: WritableSignalLike<boolean>;
64
64
  /** Whether the menu trigger has been hovered. */
65
- hasBeenHovered: WritableSignalLike<boolean>;
65
+ readonly hasBeenHovered: WritableSignalLike<boolean>;
66
66
  /** Timeout used to open sub-menus on hover. */
67
67
  _openTimeout: any;
68
68
  /** Timeout used to close sub-menus on hover out. */
69
69
  _closeTimeout: any;
70
70
  /** The tab index of the menu. */
71
- tabIndex: () => 0 | -1;
71
+ readonly tabIndex: () => 0 | -1;
72
72
  /** Whether the menu should be focused on mouse over. */
73
- shouldFocus: SignalLike<boolean>;
73
+ readonly shouldFocus: SignalLike<boolean>;
74
74
  /** The key used to expand sub-menus. */
75
- private _expandKey;
75
+ private readonly _expandKey;
76
76
  /** The key used to collapse sub-menus. */
77
- private _collapseKey;
77
+ private readonly _collapseKey;
78
78
  /** Represents the space key. Does nothing when the user is actively using typeahead. */
79
- dynamicSpaceKey: SignalLike<"" | " ">;
79
+ readonly dynamicSpaceKey: SignalLike<"" | " ">;
80
80
  /** The regexp used to decide if a key should trigger typeahead. */
81
- typeaheadRegexp: RegExp;
81
+ readonly typeaheadRegexp: RegExp;
82
82
  /** The root of the menu. */
83
- root: SignalLike<MenuTriggerPattern<V> | MenuBarPattern<V> | MenuPattern<V> | undefined>;
83
+ readonly root: SignalLike<MenuTriggerPattern<V> | MenuBarPattern<V> | MenuPattern<V> | undefined>;
84
84
  /** Handles keyboard events for the menu. */
85
- keydownManager: SignalLike<KeyboardEventManager<KeyboardEvent>>;
85
+ readonly keydownManager: SignalLike<KeyboardEventManager<KeyboardEvent>>;
86
86
  constructor(inputs: MenuInputs<V>);
87
87
  /** Sets the default state for the menu. */
88
88
  setDefaultState(): void;
@@ -135,25 +135,25 @@ declare class MenuPattern<V> {
135
135
  declare class MenuBarPattern<V> {
136
136
  readonly inputs: MenuBarInputs<V>;
137
137
  /** Controls list behavior for the menu items. */
138
- listBehavior: List<MenuItemPattern<V>, V>;
138
+ readonly listBehavior: List<MenuItemPattern<V>, V>;
139
139
  /** The tab index of the menu. */
140
- tabIndex: () => 0 | -1;
140
+ readonly tabIndex: () => 0 | -1;
141
141
  /** The key used to navigate to the next item. */
142
- private _nextKey;
142
+ private readonly _nextKey;
143
143
  /** The key used to navigate to the previous item. */
144
- private _previousKey;
144
+ private readonly _previousKey;
145
145
  /** Represents the space key. Does nothing when the user is actively using typeahead. */
146
- dynamicSpaceKey: SignalLike<"" | " ">;
146
+ readonly dynamicSpaceKey: SignalLike<"" | " ">;
147
147
  /** The regexp used to decide if a key should trigger typeahead. */
148
- typeaheadRegexp: RegExp;
148
+ readonly typeaheadRegexp: RegExp;
149
149
  /** Whether the menubar or any of its children are currently focused. */
150
- isFocused: WritableSignalLike<boolean>;
150
+ readonly isFocused: WritableSignalLike<boolean>;
151
151
  /** Whether the menubar has been interacted with. */
152
- hasBeenInteracted: WritableSignalLike<boolean>;
152
+ readonly hasBeenInteracted: WritableSignalLike<boolean>;
153
153
  /** Whether the menubar is disabled. */
154
- disabled: () => boolean;
154
+ readonly disabled: () => boolean;
155
155
  /** Handles keyboard events for the menu. */
156
- keydownManager: SignalLike<KeyboardEventManager<KeyboardEvent>>;
156
+ readonly keydownManager: SignalLike<KeyboardEventManager<KeyboardEvent>>;
157
157
  constructor(inputs: MenuBarInputs<V>);
158
158
  /** Sets the default state for the menubar. */
159
159
  setDefaultState(): void;
@@ -184,21 +184,21 @@ declare class MenuBarPattern<V> {
184
184
  declare class MenuTriggerPattern<V> {
185
185
  readonly inputs: MenuTriggerInputs<V>;
186
186
  /** Whether the menu trigger is expanded. */
187
- expanded: WritableSignalLike<boolean>;
187
+ readonly expanded: WritableSignalLike<boolean>;
188
188
  /** Whether the menu trigger has received interaction. */
189
- hasBeenInteracted: WritableSignalLike<boolean>;
189
+ readonly hasBeenInteracted: WritableSignalLike<boolean>;
190
190
  /** The role of the menu trigger. */
191
- role: () => string;
191
+ readonly role: () => string;
192
192
  /** Whether the menu trigger has a popup. */
193
- hasPopup: () => boolean;
193
+ readonly hasPopup: () => boolean;
194
194
  /** The menu associated with the trigger. */
195
- menu: SignalLike<MenuPattern<V> | undefined>;
195
+ readonly menu: SignalLike<MenuPattern<V> | undefined>;
196
196
  /** The tab index of the menu trigger. */
197
- tabIndex: SignalLike<-1 | 0>;
197
+ readonly tabIndex: SignalLike<-1 | 0>;
198
198
  /** Whether the menu trigger is disabled. */
199
- disabled: () => boolean;
199
+ readonly disabled: () => boolean;
200
200
  /** Handles keyboard events for the menu trigger. */
201
- keydownManager: SignalLike<KeyboardEventManager<KeyboardEvent>>;
201
+ readonly keydownManager: SignalLike<KeyboardEventManager<KeyboardEvent>>;
202
202
  constructor(inputs: MenuTriggerInputs<V>);
203
203
  /** Handles keyboard events for the menu trigger. */
204
204
  onKeydown(event: KeyboardEvent): void;
@@ -222,37 +222,37 @@ declare class MenuTriggerPattern<V> {
222
222
  declare class MenuItemPattern<V> implements ListItem<V> {
223
223
  readonly inputs: MenuItemInputs<V>;
224
224
  /** The value of the menu item. */
225
- value: SignalLike<V>;
225
+ readonly value: SignalLike<V>;
226
226
  /** The unique ID of the menu item. */
227
- id: SignalLike<string>;
227
+ readonly id: SignalLike<string>;
228
228
  /** Whether the menu item is disabled. */
229
- disabled: () => boolean;
229
+ readonly disabled: () => boolean;
230
230
  /** The search term for the menu item. */
231
- searchTerm: SignalLike<string>;
231
+ readonly searchTerm: SignalLike<string>;
232
232
  /** The element of the menu item. */
233
- element: SignalLike<HTMLElement | undefined>;
233
+ readonly element: SignalLike<HTMLElement | undefined>;
234
234
  /** Whether the menu item is active. */
235
- active: SignalLike<boolean>;
235
+ readonly active: SignalLike<boolean>;
236
236
  /** Whether the menu item has received interaction. */
237
- hasBeenInteracted: WritableSignalLike<boolean>;
237
+ readonly hasBeenInteracted: WritableSignalLike<boolean>;
238
238
  /** The tab index of the menu item. */
239
- tabIndex: SignalLike<0 | -1>;
239
+ readonly tabIndex: SignalLike<0 | -1>;
240
240
  /** The position of the menu item in the menu. */
241
- index: SignalLike<number>;
241
+ readonly index: SignalLike<number>;
242
242
  /** Whether the menu item is expanded. */
243
- expanded: SignalLike<boolean | null>;
243
+ readonly expanded: SignalLike<boolean | null>;
244
244
  /** Whether the menu item is expanded. */
245
- _expanded: WritableSignalLike<boolean>;
245
+ readonly _expanded: WritableSignalLike<boolean>;
246
246
  /** The ID of the menu that the menu item controls. */
247
- controls: WritableSignalLike<string | undefined>;
247
+ readonly controls: WritableSignalLike<string | undefined>;
248
248
  /** The role of the menu item. */
249
- role: () => string;
249
+ readonly role: () => string;
250
250
  /** Whether the menu item has a popup. */
251
- hasPopup: SignalLike<boolean>;
251
+ readonly hasPopup: SignalLike<boolean>;
252
252
  /** The submenu associated with the menu item. */
253
- submenu: SignalLike<MenuPattern<V> | undefined>;
253
+ readonly submenu: SignalLike<MenuPattern<V> | undefined>;
254
254
  /** Whether the menu item is selectable. */
255
- selectable: SignalLike<boolean>;
255
+ readonly selectable: SignalLike<boolean>;
256
256
  constructor(inputs: MenuItemInputs<V>);
257
257
  /** Opens the submenu. */
258
258
  open(opts?: {
@@ -10,7 +10,7 @@ declare enum MouseButton {
10
10
  }
11
11
  /** An event manager that is specialized for handling pointer events. */
12
12
  declare class PointerEventManager<T extends PointerEvent> extends EventManager<T> {
13
- options: EventHandlerOptions;
13
+ readonly options: EventHandlerOptions;
14
14
  /**
15
15
  * Configures this event manager to handle events with a specific modifer and mouse button
16
16
  * combination.
@@ -0,0 +1,14 @@
1
+ type SignalLike<T> = () => T;
2
+ interface WritableSignalLike<T> extends SignalLike<T> {
3
+ set(value: T): void;
4
+ update(updateFn: (value: T) => T): void;
5
+ asReadonly(): SignalLike<T>;
6
+ }
7
+ /** Converts a getter setter style signal to a WritableSignalLike. */
8
+ declare function convertGetterSetterToWritableSignalLike<T>(getter: () => T, setter: (v: T) => void): WritableSignalLike<T>;
9
+ declare function computed<T>(computation: () => T): SignalLike<T>;
10
+ declare function signal<T>(initialValue: T): WritableSignalLike<T>;
11
+ declare function linkedSignal<T>(sourceFn: () => T): WritableSignalLike<T>;
12
+
13
+ export { computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal };
14
+ export type { SignalLike, WritableSignalLike };
@@ -1,7 +1,8 @@
1
1
  import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
2
2
  import { ClickEventManager } from './_click-event-manager-chunk.js';
3
3
  import { ExpansionItem, ListExpansionInputs, ListExpansion } from './_expansion-chunk.js';
4
- import { SignalLike, ListNavigationItem, ListNavigationInputs, WritableSignalLike, ListFocus, ListNavigation } from './_list-navigation-chunk.js';
4
+ import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
5
+ import { ListNavigationItem, ListNavigationInputs, ListFocus, ListNavigation } from './_list-navigation-chunk.js';
5
6
 
6
7
  /** Represents the required inputs for the label control. */
7
8
  interface LabelControlInputs {
@@ -1,4 +1,4 @@
1
- import { SignalLike, WritableSignalLike } from './_list-navigation-chunk.js';
1
+ import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
2
2
  import { ListItem, ListInputs, List } from './_list-chunk.js';
3
3
 
4
4
  /** Represents the required inputs for a toolbar widget group. */
@@ -1,8 +1,9 @@
1
- import { ListNavigationItem, ListFocusItem, SignalLike, ListFocusInputs, ListNavigationInputs, ListNavigation, ListFocus, WritableSignalLike } from './_list-navigation-chunk.js';
1
+ import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
2
2
  import { ExpansionItem, ListExpansionInputs, ListExpansion } from './_expansion-chunk.js';
3
+ import { ListNavigationItem, ListFocusItem, ListFocusInputs, ListNavigationInputs, ListNavigation, ListFocus } from './_list-navigation-chunk.js';
3
4
  import { ListTypeaheadItem, ListSelectionItem, ListSelectionInputs, ListTypeaheadInputs, ListSelection, ListTypeahead, NavOptions } from './_list-chunk.js';
4
5
  import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
5
- import { PointerEventManager } from './_pointer-event-manager-chunk.js';
6
+ import { ClickEventManager } from './_click-event-manager-chunk.js';
6
7
 
7
8
  /** Represents an item in the tree. */
8
9
  interface TreeItem<V, T extends TreeItem<V, T>> extends ListTypeaheadItem, ListNavigationItem, ListSelectionItem<V>, ListFocusItem, ExpansionItem {
@@ -19,27 +20,27 @@ type TreeInputs$1<T extends TreeItem<V, T>, V> = ListFocusInputs<T> & ListNaviga
19
20
  declare class Tree<T extends TreeItem<V, T>, V> {
20
21
  readonly inputs: TreeInputs$1<T, V>;
21
22
  /** Controls navigation for the tree. */
22
- navigationBehavior: ListNavigation<T>;
23
+ readonly navigationBehavior: ListNavigation<T>;
23
24
  /** Controls selection for the tree. */
24
- selectionBehavior: ListSelection<T, V>;
25
+ readonly selectionBehavior: ListSelection<T, V>;
25
26
  /** Controls typeahead for the tree. */
26
- typeaheadBehavior: ListTypeahead<T>;
27
+ readonly typeaheadBehavior: ListTypeahead<T>;
27
28
  /** Controls focus for the tree. */
28
- focusBehavior: ListFocus<T>;
29
+ readonly focusBehavior: ListFocus<T>;
29
30
  /** Controls expansion for the tree. */
30
- expansionBehavior: ListExpansion;
31
+ readonly expansionBehavior: ListExpansion;
31
32
  /** Whether the tree is disabled. */
32
- disabled: SignalLike<boolean>;
33
+ readonly disabled: SignalLike<boolean>;
33
34
  /** The id of the current active item. */
34
- activeDescendant: SignalLike<string | undefined>;
35
+ readonly activeDescendant: SignalLike<string | undefined>;
35
36
  /** The tab index of the tree. */
36
- tabIndex: SignalLike<0 | -1>;
37
+ readonly tabIndex: SignalLike<0 | -1>;
37
38
  /** The index of the currently active item in the tree (within the flattened list). */
38
- activeIndex: SignalLike<number>;
39
+ readonly activeIndex: SignalLike<number>;
39
40
  /** The uncommitted index for selecting a range of options. */
40
- private _anchorIndex;
41
+ private readonly _anchorIndex;
41
42
  /** Whether the list should wrap. */
42
- private _wrap;
43
+ private readonly _wrap;
43
44
  constructor(inputs: TreeInputs$1<T, V>);
44
45
  /** Returns the tab index for the given item. */
45
46
  getItemTabindex(item: T): 0 | -1;
@@ -220,8 +221,8 @@ declare class TreePattern<V> implements TreeInputs<V> {
220
221
  readonly typeaheadRegexp: RegExp;
221
222
  /** The keydown event manager for the tree. */
222
223
  readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
223
- /** The pointerdown event manager for the tree. */
224
- pointerdown: SignalLike<PointerEventManager<PointerEvent>>;
224
+ /** The click event manager for the tree. */
225
+ readonly clickManager: SignalLike<ClickEventManager<PointerEvent>>;
225
226
  /** A unique identifier for the tree. */
226
227
  readonly id: SignalLike<string>;
227
228
  /** The host native element. */
@@ -268,8 +269,8 @@ declare class TreePattern<V> implements TreeInputs<V> {
268
269
  setDefaultStateEffect(): void;
269
270
  /** Handles keydown events on the tree. */
270
271
  onKeydown(event: KeyboardEvent): void;
271
- /** Handles pointerdown events on the tree. */
272
- onPointerdown(event: PointerEvent): void;
272
+ /** Handles click events on the tree. */
273
+ onClick(event: PointerEvent): void;
273
274
  /** Handles focusin events on the tree. */
274
275
  onFocusIn(): void;
275
276
  /** Navigates to the given tree item in the tree. */
@@ -0,0 +1,63 @@
1
+ import * as _angular_cdk_testing from '@angular/cdk/testing';
2
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate, ContentContainerComponentHarness } from '@angular/cdk/testing';
3
+
4
+ /** Filters for locating an `AccordionHarness`. */
5
+ interface AccordionHarnessFilters extends BaseHarnessFilters {
6
+ /** Only find instances whose title text matches the given value. */
7
+ title?: string | RegExp;
8
+ /** Only find instances whose expanded state matches the given value. */
9
+ expanded?: boolean;
10
+ /** Only find instances whose disabled state matches the given value. */
11
+ disabled?: boolean;
12
+ }
13
+ /** Filters for locating an `AccordionGroupHarness`. */
14
+ interface AccordionGroupHarnessFilters extends BaseHarnessFilters {
15
+ }
16
+
17
+ /** Selectors for the sections that may contain user content. */
18
+ declare enum AccordionSection {
19
+ TRIGGER = "[ngAccordionTrigger]",
20
+ PANEL = "[ngAccordionPanel]"
21
+ }
22
+ /** Harness for interacting with a standard ngAccordion item in tests. */
23
+ declare class AccordionHarness extends ContentContainerComponentHarness<AccordionSection> {
24
+ static hostSelector: string;
25
+ /**
26
+ * Gets a `HarnessPredicate` that can be used to search for an accordion
27
+ * with specific attributes.
28
+ */
29
+ static with(options?: AccordionHarnessFilters): HarnessPredicate<AccordionHarness>;
30
+ /** Overrides the internal loader to automatically resolve queries inside the associated panel. */
31
+ protected getRootHarnessLoader(): Promise<_angular_cdk_testing.HarnessLoader>;
32
+ /** Whether the accordion is expanded. */
33
+ isExpanded(): Promise<boolean>;
34
+ /** Whether the accordion is disabled. */
35
+ isDisabled(): Promise<boolean>;
36
+ /** Gets the title text of the accordion. */
37
+ getTitle(): Promise<string>;
38
+ /** Toggles the expanded state of the accordion by clicking on the trigger. */
39
+ toggle(): Promise<void>;
40
+ /** Expands the accordion if collapsed. */
41
+ expand(): Promise<void>;
42
+ /** Collapses the accordion if expanded. */
43
+ collapse(): Promise<void>;
44
+ /** Focuses the accordion trigger. */
45
+ focus(): Promise<void>;
46
+ /** Blurs the accordion trigger. */
47
+ blur(): Promise<void>;
48
+ /** Whether the accordion trigger is focused. */
49
+ isFocused(): Promise<boolean>;
50
+ }
51
+ /** Harness for interacting with an `ngAccordionGroup` in tests. */
52
+ declare class AccordionGroupHarness extends ComponentHarness {
53
+ static hostSelector: string;
54
+ /**
55
+ * Gets a `HarnessPredicate` that can be used to search for an accordion group with specific attributes.
56
+ */
57
+ static with(options?: AccordionGroupHarnessFilters): HarnessPredicate<AccordionGroupHarness>;
58
+ /** Gets all accordions within this group. */
59
+ getAccordions(filters?: AccordionHarnessFilters): Promise<AccordionHarness[]>;
60
+ }
61
+
62
+ export { AccordionGroupHarness, AccordionHarness, AccordionSection };
63
+ export type { AccordionGroupHarnessFilters, AccordionHarnessFilters };
@@ -1,12 +1,13 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit } from '@angular/core';
2
+ import { OnInit, OnDestroy } from '@angular/core';
3
3
  import { AccordionTriggerPattern, AccordionGroupPattern } from './_accordion-chunk.js';
4
4
  import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
5
5
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
6
6
  import './_keyboard-event-manager-chunk.js';
7
- import './_list-navigation-chunk.js';
8
- import './_pointer-event-manager-chunk.js';
7
+ import './_signal-like-chunk.js';
8
+ import './_click-event-manager-chunk.js';
9
9
  import './_expansion-chunk.js';
10
+ import './_list-navigation-chunk.js';
10
11
 
11
12
  /**
12
13
  * The content panel of an accordion item that is conditionally visible.
@@ -30,6 +31,10 @@ import './_expansion-chunk.js';
30
31
  * @see [Accordion](guide/aria/accordion)
31
32
  */
32
33
  declare class AccordionPanel {
34
+ /** A reference to the trigger element. */
35
+ private readonly _elementRef;
36
+ /** A reference to the trigger element. */
37
+ readonly element: HTMLElement;
33
38
  /** The DeferredContentAware host directive. */
34
39
  private readonly _deferredContentAware;
35
40
  /** A global unique identifier for the panel. */
@@ -53,6 +58,59 @@ declare class AccordionPanel {
53
58
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
54
59
  }
55
60
 
61
+ /**
62
+ * The trigger that toggles the visibility of its associated `ngAccordionPanel`.
63
+ *
64
+ * This directive requires the `panel` input be set to the template reference of the `ngAccordionPanel`
65
+ * it controls. When clicked, it will expand or collapse the panel. It also handles keyboard
66
+ * interactions for navigation within the `ngAccordionGroup`. It applies `role="button"` and manages
67
+ * `aria-expanded`, `aria-controls`, and `aria-disabled` attributes for accessibility.
68
+ * The `disabled` input can be used to disable the trigger.
69
+ *
70
+ * ```html
71
+ * <button ngAccordionTrigger [panel]="panel">
72
+ * Accordion Trigger Text
73
+ * </button>
74
+ * ```
75
+ *
76
+ * @developerPreview 21.0
77
+ * @see [Accordion](guide/aria/accordion)
78
+ */
79
+ declare class AccordionTrigger implements OnInit, OnDestroy {
80
+ /** A reference to the trigger element. */
81
+ private readonly _elementRef;
82
+ /** A reference to the trigger element. */
83
+ readonly element: HTMLElement;
84
+ /** The parent AccordionGroup. */
85
+ private readonly _accordionGroup;
86
+ /** The associated AccordionPanel. */
87
+ readonly panel: _angular_core.InputSignal<AccordionPanel>;
88
+ /** The unique identifier for the trigger. */
89
+ readonly id: _angular_core.InputSignal<string>;
90
+ /** The unique identifier for the corresponding trigger panel. */
91
+ readonly panelId: _angular_core.Signal<string>;
92
+ /** Whether the trigger is disabled. */
93
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
94
+ /** The index of the trigger within the accordion group. */
95
+ readonly index: _angular_core.InputSignal<number | undefined>;
96
+ /** Whether the corresponding panel is expanded. */
97
+ readonly expanded: _angular_core.ModelSignal<boolean>;
98
+ /** Whether the trigger is active. */
99
+ readonly active: _angular_core.Signal<boolean>;
100
+ /** The UI pattern instance for this trigger. */
101
+ _pattern: AccordionTriggerPattern;
102
+ ngOnInit(): void;
103
+ ngOnDestroy(): void;
104
+ /** Expands this item. */
105
+ expand(): void;
106
+ /** Collapses this item. */
107
+ collapse(): void;
108
+ /** Toggles the expansion state of this item. */
109
+ toggle(): void;
110
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionTrigger, never>;
111
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "panel": { "alias": "panel"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
112
+ }
113
+
56
114
  /**
57
115
  * A container for a group of accordion items. It manages the overall state and
58
116
  * interactions of the accordion, such as keyboard navigation and expansion mode.
@@ -96,6 +154,8 @@ declare class AccordionGroup {
96
154
  readonly element: HTMLElement;
97
155
  /** The AccordionTriggers nested inside this group. */
98
156
  private readonly _triggers;
157
+ /** The AccordionTriggers nested inside this group. */
158
+ private readonly _sortedTriggers;
99
159
  /** The corresponding patterns for the accordion triggers. */
100
160
  private readonly _triggerPatterns;
101
161
  /** The text direction (ltr or rtl). */
@@ -117,58 +177,12 @@ declare class AccordionGroup {
117
177
  expandAll(): void;
118
178
  /** Collapses all accordion panels. */
119
179
  collapseAll(): void;
180
+ /** Internal method to register each trigger as we can not use contentChildren. */
181
+ _registerTrigger(trigger: AccordionTrigger): void;
182
+ /** Internal method to unregister each trigger as we can not use contentChildren. */
183
+ _unregisterTrigger(trigger: AccordionTrigger): void;
120
184
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionGroup, never>;
121
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionGroup, "[ngAccordionGroup]", ["ngAccordionGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multiExpandable": { "alias": "multiExpandable"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, ["_triggers"], never, true, never>;
122
- }
123
-
124
- /**
125
- * The trigger that toggles the visibility of its associated `ngAccordionPanel`.
126
- *
127
- * This directive requires the `panel` input be set to the template reference of the `ngAccordionPanel`
128
- * it controls. When clicked, it will expand or collapse the panel. It also handles keyboard
129
- * interactions for navigation within the `ngAccordionGroup`. It applies `role="button"` and manages
130
- * `aria-expanded`, `aria-controls`, and `aria-disabled` attributes for accessibility.
131
- * The `disabled` input can be used to disable the trigger.
132
- *
133
- * ```html
134
- * <button ngAccordionTrigger [panel]="panel">
135
- * Accordion Trigger Text
136
- * </button>
137
- * ```
138
- *
139
- * @developerPreview 21.0
140
- * @see [Accordion](guide/aria/accordion)
141
- */
142
- declare class AccordionTrigger implements OnInit {
143
- /** A reference to the trigger element. */
144
- private readonly _elementRef;
145
- /** A reference to the trigger element. */
146
- readonly element: HTMLElement;
147
- /** The parent AccordionGroup. */
148
- private readonly _accordionGroup;
149
- /** The associated AccordionPanel. */
150
- readonly panel: _angular_core.InputSignal<AccordionPanel>;
151
- /** The unique identifier for the trigger. */
152
- readonly id: _angular_core.InputSignal<string>;
153
- /** The unique identifier for the correspondingtrigger panel. */
154
- readonly panelId: _angular_core.Signal<string>;
155
- /** Whether the trigger is disabled. */
156
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
157
- /** Whether the corresponding panel is expanded. */
158
- readonly expanded: _angular_core.ModelSignal<boolean>;
159
- /** Whether the trigger is active. */
160
- readonly active: _angular_core.Signal<boolean>;
161
- /** The UI pattern instance for this trigger. */
162
- _pattern: AccordionTriggerPattern;
163
- ngOnInit(): void;
164
- /** Expands this item. */
165
- expand(): void;
166
- /** Collapses this item. */
167
- collapse(): void;
168
- /** Toggles the expansion state of this item. */
169
- toggle(): void;
170
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionTrigger, never>;
171
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "panel": { "alias": "panel"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
185
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionGroup, "[ngAccordionGroup]", ["ngAccordionGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multiExpandable": { "alias": "multiExpandable"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
172
186
  }
173
187
 
174
188
  /**
@@ -180,7 +194,7 @@ declare class AccordionTrigger implements OnInit {
180
194
  * by only creating the content when the panel is first expanded.
181
195
  *
182
196
  * ```html
183
- * <div ngAccordionPanel panelId="unique-id-1">
197
+ * <div ngAccordionPanel>
184
198
  * <ng-template ngAccordionContent>
185
199
  * <p>This is the content that will be displayed inside the panel.</p>
186
200
  * </ng-template>
@@ -3,9 +3,10 @@ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
3
3
  import { ComboboxListboxControls, ComboboxTreeControls, ComboboxDialogPattern, ComboboxPattern } from './_combobox-chunk.js';
4
4
  import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
5
5
  import './_keyboard-event-manager-chunk.js';
6
- import './_list-navigation-chunk.js';
6
+ import './_signal-like-chunk.js';
7
7
  import './_pointer-event-manager-chunk.js';
8
8
  import './_list-chunk.js';
9
+ import './_list-navigation-chunk.js';
9
10
 
10
11
  /**
11
12
  * Identifies an element as a popup for an `ngCombobox`.
@@ -68,7 +69,7 @@ declare class ComboboxPopup<V> {
68
69
  */
69
70
  declare class Combobox<V> {
70
71
  /** A signal wrapper for directionality. */
71
- protected textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
72
+ protected readonly textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
72
73
  /** The element that the combobox is attached to. */
73
74
  private readonly _elementRef;
74
75
  /** A reference to the combobox element. */
@@ -83,7 +84,7 @@ declare class Combobox<V> {
83
84
  * - `auto-select`: The combobox automatically selects the first matching option.
84
85
  * - `highlight`: The combobox highlights matching text in the options without changing selection.
85
86
  */
86
- filterMode: _angular_core.InputSignal<"manual" | "auto-select" | "highlight">;
87
+ readonly filterMode: _angular_core.InputSignal<"manual" | "auto-select" | "highlight">;
87
88
  /** Whether the combobox is disabled. */
88
89
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
89
90
  /** Whether the combobox is read-only. */
@@ -136,7 +137,7 @@ declare class ComboboxDialog {
136
137
  readonly combobox: Combobox<any>;
137
138
  /** A reference to the parent combobox popup, if one exists. */
138
139
  private readonly _popup;
139
- _pattern: ComboboxDialogPattern;
140
+ readonly _pattern: ComboboxDialogPattern;
140
141
  constructor();
141
142
  close(): void;
142
143
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxDialog, never>;
@@ -174,7 +175,7 @@ declare class ComboboxInput {
174
175
  /** The combobox that the input belongs to. */
175
176
  readonly combobox: Combobox<any>;
176
177
  /** The value of the input. */
177
- value: _angular_core.ModelSignal<string>;
178
+ readonly value: _angular_core.ModelSignal<string>;
178
179
  constructor();
179
180
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxInput, never>;
180
181
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxInput, "input[ngComboboxInput]", ["ngComboboxInput"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;