@angular/aria 22.0.0-next.7 → 22.0.0-next.8

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 (93) hide show
  1. package/fesm2022/_accordion-chunk.mjs +1 -1
  2. package/fesm2022/_click-event-manager-chunk.mjs +1 -1
  3. package/fesm2022/{_signal-like-chunk.mjs → _collection-chunk.mjs} +51 -2
  4. package/fesm2022/_collection-chunk.mjs.map +1 -0
  5. package/fesm2022/_deferred-content-chunk.mjs +6 -6
  6. package/fesm2022/_list-chunk.mjs +4 -1
  7. package/fesm2022/_list-chunk.mjs.map +1 -1
  8. package/fesm2022/_list-navigation-chunk.mjs +1 -1
  9. package/fesm2022/_list-typeahead-chunk.mjs +1 -1
  10. package/fesm2022/_menu-chunk.mjs +1 -1
  11. package/fesm2022/{_combobox-listbox-chunk.mjs → _option-chunk.mjs} +3 -50
  12. package/fesm2022/_option-chunk.mjs.map +1 -0
  13. package/fesm2022/_tabs-chunk.mjs +1 -1
  14. package/fesm2022/_toolbar-widget-group-chunk.mjs +1 -1
  15. package/fesm2022/_transforms-chunk.mjs +8 -0
  16. package/fesm2022/_transforms-chunk.mjs.map +1 -0
  17. package/fesm2022/{_combobox-tree-chunk.mjs → _tree-chunk.mjs} +3 -48
  18. package/fesm2022/_tree-chunk.mjs.map +1 -0
  19. package/fesm2022/_widget-chunk.mjs +36 -15
  20. package/fesm2022/_widget-chunk.mjs.map +1 -1
  21. package/fesm2022/accordion.mjs +28 -55
  22. package/fesm2022/accordion.mjs.map +1 -1
  23. package/fesm2022/aria.mjs +1 -1
  24. package/fesm2022/aria.mjs.map +1 -1
  25. package/fesm2022/combobox-testing.mjs +79 -0
  26. package/fesm2022/combobox-testing.mjs.map +1 -0
  27. package/fesm2022/combobox.mjs +273 -307
  28. package/fesm2022/combobox.mjs.map +1 -1
  29. package/fesm2022/grid-testing.mjs +8 -0
  30. package/fesm2022/grid-testing.mjs.map +1 -1
  31. package/fesm2022/grid.mjs +68 -87
  32. package/fesm2022/grid.mjs.map +1 -1
  33. package/fesm2022/listbox-testing.mjs +4 -0
  34. package/fesm2022/listbox-testing.mjs.map +1 -1
  35. package/fesm2022/listbox.mjs +184 -205
  36. package/fesm2022/listbox.mjs.map +1 -1
  37. package/fesm2022/menu-testing.mjs +11 -0
  38. package/fesm2022/menu-testing.mjs.map +1 -1
  39. package/fesm2022/menu.mjs +42 -66
  40. package/fesm2022/menu.mjs.map +1 -1
  41. package/fesm2022/private.mjs +19 -13
  42. package/fesm2022/private.mjs.map +1 -1
  43. package/fesm2022/tabs.mjs +78 -84
  44. package/fesm2022/tabs.mjs.map +1 -1
  45. package/fesm2022/toolbar-testing.mjs +5 -1
  46. package/fesm2022/toolbar-testing.mjs.map +1 -1
  47. package/fesm2022/toolbar.mjs +21 -31
  48. package/fesm2022/toolbar.mjs.map +1 -1
  49. package/fesm2022/tree-testing.mjs +12 -0
  50. package/fesm2022/tree-testing.mjs.map +1 -1
  51. package/fesm2022/tree.mjs +118 -146
  52. package/fesm2022/tree.mjs.map +1 -1
  53. package/package.json +6 -6
  54. package/types/_accordion-chunk.d.ts +2 -2
  55. package/types/_collection-chunk.d.ts +42 -0
  56. package/types/_expansion-chunk.d.ts +1 -1
  57. package/types/_grid-chunk.d.ts +9 -3
  58. package/types/_keyboard-event-manager-chunk.d.ts +1 -1
  59. package/types/_list-chunk.d.ts +1 -1
  60. package/types/_list-navigation-chunk.d.ts +1 -1
  61. package/types/_listbox-chunk.d.ts +1 -1
  62. package/types/_menu-chunk.d.ts +1 -1
  63. package/types/_tabs-chunk.d.ts +1 -1
  64. package/types/_toolbar-chunk.d.ts +1 -1
  65. package/types/_tree-chunk.d.ts +1 -1
  66. package/types/accordion.d.ts +7 -13
  67. package/types/combobox-testing.d.ts +63 -0
  68. package/types/combobox.d.ts +96 -193
  69. package/types/grid-testing.d.ts +4 -0
  70. package/types/grid.d.ts +101 -97
  71. package/types/listbox-testing.d.ts +25 -0
  72. package/types/listbox.d.ts +55 -60
  73. package/types/menu-testing.d.ts +6 -0
  74. package/types/menu.d.ts +17 -13
  75. package/types/private.d.ts +24 -138
  76. package/types/tabs.d.ts +69 -72
  77. package/types/toolbar-testing.d.ts +4 -0
  78. package/types/toolbar.d.ts +5 -6
  79. package/types/tree-testing.d.ts +8 -0
  80. package/types/tree.d.ts +7 -14
  81. package/fesm2022/_combobox-chunk.mjs +0 -478
  82. package/fesm2022/_combobox-chunk.mjs.map +0 -1
  83. package/fesm2022/_combobox-listbox-chunk.mjs.map +0 -1
  84. package/fesm2022/_combobox-tree-chunk.mjs.map +0 -1
  85. package/fesm2022/_element-chunk.mjs +0 -6
  86. package/fesm2022/_element-chunk.mjs.map +0 -1
  87. package/fesm2022/_signal-like-chunk.mjs.map +0 -1
  88. package/fesm2022/simple-combobox.mjs +0 -443
  89. package/fesm2022/simple-combobox.mjs.map +0 -1
  90. package/types/_combobox-chunk.d.ts +0 -224
  91. package/types/_element-chunk.d.ts +0 -10
  92. package/types/_signal-like-chunk.d.ts +0 -14
  93. package/types/simple-combobox.d.ts +0 -124
@@ -1,18 +1,13 @@
1
- import { ComboboxPattern, ComboboxListboxControls, ComboboxTreeControls } from './_combobox-chunk.js';
2
- export { ComboboxDialogPattern, ComboboxInputs } from './_combobox-chunk.js';
3
- import { ListboxInputs, OptionPattern, ListboxPattern } from './_listbox-chunk.js';
4
- export { OptionInputs } from './_listbox-chunk.js';
5
- import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
6
- export { computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal } from './_signal-like-chunk.js';
1
+ export { ListboxInputs, ListboxPattern, OptionInputs, OptionPattern } from './_listbox-chunk.js';
7
2
  export { MenuBarInputs, MenuBarPattern, MenuInputs, MenuItemInputs, MenuItemPattern, MenuPattern, MenuTriggerInputs, MenuTriggerPattern } from './_menu-chunk.js';
3
+ import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
4
+ export { HasElement, SortedCollection, computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal, sortDirectives } from './_collection-chunk.js';
8
5
  export { TabInputs, TabListInputs, TabListPattern, TabPanelInputs, TabPanelPattern, TabPattern } from './_tabs-chunk.js';
9
6
  export { ToolbarInputs, ToolbarPattern, ToolbarWidgetGroupInputs, ToolbarWidgetGroupPattern, ToolbarWidgetInputs, ToolbarWidgetPattern } from './_toolbar-chunk.js';
10
7
  export { AccordionGroupInputs, AccordionGroupPattern, AccordionTriggerInputs, AccordionTriggerPattern } from './_accordion-chunk.js';
11
- import { TreeInputs, TreeItemPattern, TreePattern } from './_tree-chunk.js';
12
- export { TreeItemInputs } from './_tree-chunk.js';
8
+ export { TreeInputs, TreeItemInputs, TreeItemPattern, TreePattern } from './_tree-chunk.js';
13
9
  export { ElementResolver, GridCellInputs, GridCellPattern, GridCellWidgetInputs, GridCellWidgetPattern, GridInputs, GridPattern, GridRowInputs, GridRowPattern, resolveElement } from './_grid-chunk.js';
14
10
  export { DeferredContent, DeferredContentAware } from './_deferred-content-chunk.js';
15
- export { HasElement, sortDirectives } from './_element-chunk.js';
16
11
  import * as _angular_core from '@angular/core';
17
12
  import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
18
13
  import { ClickEventManager } from './_click-event-manager-chunk.js';
@@ -21,127 +16,14 @@ export { untracked } from '@angular/core/primitives/signals';
21
16
  import './_list-chunk.js';
22
17
  import './_list-navigation-chunk.js';
23
18
 
24
- type ComboboxListboxInputs<V> = ListboxInputs<V> & {
25
- /** The combobox controlling the listbox. */
26
- combobox: SignalLike<ComboboxPattern<OptionPattern<V>, V> | undefined>;
27
- };
28
- declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements ComboboxListboxControls<OptionPattern<V>, V> {
29
- readonly inputs: ComboboxListboxInputs<V>;
30
- /** A unique identifier for the popup. */
31
- readonly id: SignalLike<string>;
32
- /** The ARIA role for the listbox. */
33
- readonly role: SignalLike<"listbox">;
34
- /** The id of the active (focused) item in the listbox. */
35
- readonly activeId: SignalLike<string | undefined>;
36
- /** The list of options in the listbox. */
37
- readonly items: SignalLike<OptionPattern<V>[]>;
38
- /** The tab index for the listbox. Always -1 because the combobox handles focus. */
39
- tabIndex: SignalLike<-1 | 0>;
40
- /** Whether multiple items in the list can be selected at once. */
41
- multi: SignalLike<boolean>;
42
- constructor(inputs: ComboboxListboxInputs<V>);
43
- /** Noop. The combobox handles keydown events. */
44
- onKeydown(_: KeyboardEvent): void;
45
- /** Noop. The combobox handles pointerdown events. */
46
- onClick(_: PointerEvent): void;
47
- /** Noop. The combobox controls the open state. */
48
- setDefaultState(): void;
49
- /** Navigates to the specified item in the listbox. */
50
- readonly focus: (item: OptionPattern<V>, opts?: {
51
- focusElement?: boolean;
52
- }) => void;
53
- /** Navigates to the previous focusable item in the listbox. */
54
- readonly getActiveItem: () => OptionPattern<V> | undefined;
55
- /** Navigates to the next focusable item in the listbox. */
56
- readonly next: () => void;
57
- /** Navigates to the previous focusable item in the listbox. */
58
- readonly prev: () => void;
59
- /** Navigates to the last focusable item in the listbox. */
60
- readonly last: () => void;
61
- /** Navigates to the first focusable item in the listbox. */
62
- readonly first: () => void;
63
- /** Unfocuses the currently focused item in the listbox. */
64
- readonly unfocus: () => void;
65
- /** Selects the specified item in the listbox. */
66
- readonly select: (item?: OptionPattern<V>) => void;
67
- /** Toggles the selection state of the given item in the listbox. */
68
- readonly toggle: (item?: OptionPattern<V>) => void;
69
- /** Clears the selection in the listbox. */
70
- readonly clearSelection: () => void;
71
- /** Retrieves the OptionPattern associated with a pointer event. */
72
- readonly getItem: (e: PointerEvent) => OptionPattern<V> | undefined;
73
- /** Retrieves the currently selected items in the listbox. */
74
- readonly getSelectedItems: () => OptionPattern<V>[];
75
- /** Sets the value of the combobox listbox. */
76
- readonly setValue: (value: V | undefined) => void;
77
- }
78
-
79
- type ComboboxTreeInputs<V> = TreeInputs<V> & {
80
- /** The combobox controlling the tree. */
81
- combobox: SignalLike<ComboboxPattern<TreeItemPattern<V>, V> | undefined>;
82
- };
83
- declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxTreeControls<TreeItemPattern<V>, V> {
84
- readonly inputs: ComboboxTreeInputs<V>;
85
- /** Toggles to expand or collapse a tree item. */
86
- readonly toggleExpansion: (item?: TreeItemPattern<V>) => void;
87
- /** Whether the currently focused item is collapsible. */
88
- readonly isItemCollapsible: () => boolean;
89
- /** The ARIA role for the tree. */
90
- readonly role: () => "tree";
91
- readonly activeId: SignalLike<string | undefined>;
92
- /** Returns the currently active (focused) item in the tree. */
93
- readonly getActiveItem: () => TreeItemPattern<V> | undefined;
94
- /** The list of items in the tree. */
95
- items: SignalLike<TreeItemPattern<V>[]>;
96
- /** The tab index for the tree. Always -1 because the combobox handles focus. */
97
- readonly tabIndex: SignalLike<-1 | 0>;
98
- constructor(inputs: ComboboxTreeInputs<V>);
99
- /** Noop. The combobox handles keydown events. */
100
- onKeydown(_: KeyboardEvent): void;
101
- /** Noop. The combobox handles click events. */
102
- onClick(_: PointerEvent): void;
103
- /** Noop. The combobox controls the open state. */
104
- setDefaultState(): void;
105
- /** Navigates to the specified item in the tree. */
106
- readonly focus: (item: TreeItemPattern<V>) => void;
107
- /** Navigates to the next focusable item in the tree. */
108
- readonly next: () => void;
109
- /** Navigates to the previous focusable item in the tree. */
110
- readonly prev: () => void;
111
- /** Navigates to the last focusable item in the tree. */
112
- readonly last: () => void;
113
- /** Navigates to the first focusable item in the tree. */
114
- readonly first: () => void;
115
- /** Unfocuses the currently focused item in the tree. */
116
- readonly unfocus: () => void;
117
- /** Selects the specified item in the tree or the current active item if not provided. */
118
- readonly select: (item?: TreeItemPattern<V>) => void;
119
- /** Toggles the selection state of the given item in the tree or the current active item if not provided. */
120
- readonly toggle: (item?: TreeItemPattern<V>) => void;
121
- /** Clears the selection in the tree. */
122
- readonly clearSelection: () => void;
123
- /** Retrieves the TreeItemPattern associated with a pointer event. */
124
- readonly getItem: (e: PointerEvent) => TreeItemPattern<V> | undefined;
125
- /** Retrieves the currently selected items in the tree */
126
- readonly getSelectedItems: () => TreeItemPattern<V>[];
127
- /** Sets the value of the combobox tree. */
128
- readonly setValue: (value: V | undefined) => void;
129
- /** Expands the currently focused item if it is expandable, or navigates to the first child. */
130
- readonly expandItem: () => void;
131
- /** Collapses the currently focused item if it is expandable, or navigates to the parent. */
132
- readonly collapseItem: () => void;
133
- /** Whether the specified item or the currently active item is expandable. */
134
- isItemExpandable(item?: TreeItemPattern<V> | undefined): boolean;
135
- /** Expands all of the tree items. */
136
- readonly expandAll: () => void;
137
- /** Collapses all of the tree items. */
138
- readonly collapseAll: () => void;
139
- /** Whether the currently active item is selectable. */
140
- readonly isItemSelectable: (item?: TreeItemPattern<V> | undefined) => boolean;
141
- }
19
+ /**
20
+ * Transform function for tabIndex inputs.
21
+ * Returns undefined if the value is undefined, otherwise converts it to a number.
22
+ */
23
+ declare function tabIndexTransform(v: string | number | undefined): number | undefined;
142
24
 
143
25
  /** Represents the required inputs for a simple combobox. */
144
- interface SimpleComboboxInputs extends ExpansionItem {
26
+ interface ComboboxInputs extends ExpansionItem {
145
27
  /** Whether the combobox should always remain expanded. */
146
28
  alwaysExpanded: SignalLike<boolean>;
147
29
  /** The value of the combobox. */
@@ -149,15 +31,17 @@ interface SimpleComboboxInputs extends ExpansionItem {
149
31
  /** The element that the combobox is attached to. */
150
32
  element: SignalLike<HTMLElement>;
151
33
  /** The popup associated with the combobox. */
152
- popup: SignalLike<SimpleComboboxPopupPattern | undefined>;
34
+ popup: SignalLike<ComboboxPopupPattern | undefined>;
153
35
  /** An inline suggestion to be displayed in the input. */
154
36
  inlineSuggestion: SignalLike<string | undefined>;
155
37
  /** Whether the combobox is disabled. */
156
38
  disabled: SignalLike<boolean>;
39
+ /** Whether the combobox is soft disabled. */
40
+ softDisabled?: SignalLike<boolean>;
157
41
  }
158
42
  /** Controls the state of a simple combobox. */
159
- declare class SimpleComboboxPattern {
160
- readonly inputs: SimpleComboboxInputs;
43
+ declare class ComboboxPattern {
44
+ readonly inputs: ComboboxInputs;
161
45
  /** The expanded state of the combobox. */
162
46
  readonly isExpanded: _angular_core.Signal<boolean>;
163
47
  /** The value of the combobox. */
@@ -166,6 +50,8 @@ declare class SimpleComboboxPattern {
166
50
  readonly element: () => HTMLElement;
167
51
  /** Whether the combobox is disabled. */
168
52
  readonly disabled: () => boolean;
53
+ /** Whether the combobox is soft disabled. */
54
+ readonly softDisabled: () => boolean;
169
55
  /** An inline suggestion to be displayed in the input. */
170
56
  readonly inlineSuggestion: () => string | undefined;
171
57
  /** The ID of the active descendant in the popup. */
@@ -188,7 +74,7 @@ declare class SimpleComboboxPattern {
188
74
  keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
189
75
  /** The click event manager for the combobox. */
190
76
  click: _angular_core.Signal<ClickEventManager<PointerEvent>>;
191
- constructor(inputs: SimpleComboboxInputs);
77
+ constructor(inputs: ComboboxInputs);
192
78
  /** Handles keydown events for the combobox. */
193
79
  onKeydown(event: KeyboardEvent): void;
194
80
  /** Handles click events for the combobox. */
@@ -207,7 +93,7 @@ declare class SimpleComboboxPattern {
207
93
  closePopupOnBlurEffect(): void;
208
94
  }
209
95
  /** Represents the required inputs for a simple combobox popup. */
210
- interface SimpleComboboxPopupInputs {
96
+ interface ComboboxPopupInputs {
211
97
  /** The type of the popup. */
212
98
  popupType: SignalLike<'listbox' | 'tree' | 'grid' | 'dialog'>;
213
99
  /** The element that serves as the control target for the popup. */
@@ -218,8 +104,8 @@ interface SimpleComboboxPopupInputs {
218
104
  popupId: SignalLike<string | undefined>;
219
105
  }
220
106
  /** Controls the state of a simple combobox popup. */
221
- declare class SimpleComboboxPopupPattern {
222
- readonly inputs: SimpleComboboxPopupInputs;
107
+ declare class ComboboxPopupPattern {
108
+ readonly inputs: ComboboxPopupInputs;
223
109
  /** The type of the popup. */
224
110
  readonly popupType: () => "listbox" | "tree" | "grid" | "dialog";
225
111
  /** The element that serves as the control target for the popup. */
@@ -230,12 +116,12 @@ declare class SimpleComboboxPopupPattern {
230
116
  readonly popupId: () => string | undefined;
231
117
  /** Whether the popup is focused. */
232
118
  readonly isFocused: _angular_core.WritableSignal<boolean>;
233
- constructor(inputs: SimpleComboboxPopupInputs);
119
+ constructor(inputs: ComboboxPopupInputs);
234
120
  /** Handles focus in events for the popup. */
235
121
  onFocusin(): void;
236
122
  /** Handles focus out events for the popup. */
237
123
  onFocusout(event: FocusEvent): void;
238
124
  }
239
125
 
240
- export { ComboboxListboxControls, ComboboxListboxPattern, ComboboxPattern, ComboboxTreeControls, ComboboxTreePattern, ListboxInputs, ListboxPattern, OptionPattern, SignalLike, SimpleComboboxPattern, SimpleComboboxPopupPattern, TreeInputs, TreeItemPattern, TreePattern, WritableSignalLike };
241
- export type { ComboboxListboxInputs, ComboboxTreeInputs, SimpleComboboxInputs, SimpleComboboxPopupInputs };
126
+ export { ComboboxPattern, ComboboxPopupPattern, SignalLike, WritableSignalLike, tabIndexTransform };
127
+ export type { ComboboxInputs, ComboboxPopupInputs };
package/types/tabs.d.ts CHANGED
@@ -1,60 +1,14 @@
1
- import * as _angular_cdk_bidi from '@angular/cdk/bidi';
2
1
  import * as _angular_core from '@angular/core';
3
2
  import { OnInit, OnDestroy, WritableSignal } from '@angular/core';
4
- import { TabPattern, TabPanelPattern, TabListPattern } from './_tabs-chunk.js';
3
+ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
+ import { TabPattern, TabListPattern, TabPanelPattern } from './_tabs-chunk.js';
5
+ import { HasElement, SortedCollection } from './_collection-chunk.js';
5
6
  import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
6
- import { HasElement } from './_element-chunk.js';
7
7
  import './_keyboard-event-manager-chunk.js';
8
- import './_signal-like-chunk.js';
9
8
  import './_click-event-manager-chunk.js';
10
9
  import './_expansion-chunk.js';
11
10
  import './_list-navigation-chunk.js';
12
11
 
13
- /**
14
- * A TabPanel container for the resources of layered content associated with a tab.
15
- *
16
- * The `ngTabPanel` directive holds the content for a specific tab. It is linked to an
17
- * `ngTab` by a matching `value`. If a tab panel is hidden, the `inert` attribute will be
18
- * applied to remove it from the accessibility tree. Proper styling is required for visual hiding.
19
- *
20
- * ```html
21
- * <div ngTabPanel value="myTabId">
22
- * <ng-template ngTabContent>
23
- * <!-- Content for the tab panel -->
24
- * </ng-template>
25
- * </div>
26
- * ```
27
- *
28
- * @developerPreview 21.0
29
- *
30
- * @see [Tabs](guide/aria/tabs)
31
- */
32
- declare class TabPanel implements OnInit, OnDestroy {
33
- /** A reference to the host element. */
34
- private readonly _elementRef;
35
- /** A reference to the host element. */
36
- readonly element: HTMLElement;
37
- /** The DeferredContentAware host directive. */
38
- private readonly _deferredContentAware;
39
- /** The parent Tabs. */
40
- private readonly _tabs;
41
- /** A global unique identifier for the tab. */
42
- readonly id: _angular_core.InputSignal<string>;
43
- /** The Tab UIPattern associated with the tabpanel */
44
- readonly _tabPattern: WritableSignal<TabPattern | undefined>;
45
- /** A local unique identifier for the tabpanel. */
46
- readonly value: _angular_core.InputSignal<string>;
47
- /** Whether the tab panel is visible. */
48
- readonly visible: _angular_core.Signal<boolean>;
49
- /** The TabPanel UIPattern. */
50
- readonly _pattern: TabPanelPattern;
51
- constructor();
52
- ngOnInit(): void;
53
- ngOnDestroy(): void;
54
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabPanel, never>;
55
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabPanel, "[ngTabPanel]", ["ngTabPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
56
- }
57
-
58
12
  /**
59
13
  * A selectable tab in a TabList.
60
14
  *
@@ -76,14 +30,12 @@ declare class Tab implements HasElement, OnInit, OnDestroy {
76
30
  private readonly _elementRef;
77
31
  /** A reference to the host element. */
78
32
  readonly element: HTMLElement;
79
- /** The parent Tabs wrapper. */
80
- private readonly _tabsWrapper;
81
33
  /** The parent TabList. */
82
34
  private readonly _tabList;
83
35
  /** A unique identifier for the widget. */
84
36
  readonly id: _angular_core.InputSignal<string>;
85
- /** The panel associated with this tab. */
86
- readonly panel: _angular_core.Signal<TabPanel | undefined>;
37
+ /** The TabPanel UIPattern associated with the tab */
38
+ private readonly _tabpanelPattern;
87
39
  /** Whether a tab is disabled. */
88
40
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
89
41
  /** The remote tabpanel unique identifier. */
@@ -126,13 +78,11 @@ declare class TabList implements OnInit, OnDestroy {
126
78
  /** A reference to the host element. */
127
79
  readonly element: HTMLElement;
128
80
  /** The parent Tabs container. */
129
- private readonly _tabsParent;
130
- /** The Tabs registered for this TabList. */
131
- private readonly _tabs;
132
- /** The Tabs registered for this TabList. */
133
- readonly _sortedTabs: _angular_core.Signal<Tab[]>;
81
+ readonly _tabsParent: Tabs;
82
+ /** The collection of Tabs. */
83
+ readonly _collection: SortedCollection<Tab>;
134
84
  /** The Tab UIPatterns of the child Tabs. */
135
- private readonly _tabPatterns;
85
+ readonly _tabPatterns: _angular_core.Signal<TabPattern[]>;
136
86
  /** Whether the tablist is vertically or horizontally oriented. */
137
87
  readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
138
88
  /** Text direction. */
@@ -167,8 +117,6 @@ declare class TabList implements OnInit, OnDestroy {
167
117
  constructor();
168
118
  ngOnInit(): void;
169
119
  ngOnDestroy(): void;
170
- _registerTab(child: Tab): void;
171
- _unregisterTab(child: Tab): void;
172
120
  /** Opens the tab panel with the specified value. */
173
121
  open(value: string): boolean;
174
122
  findTab(value?: string): Tab | undefined;
@@ -176,6 +124,51 @@ declare class TabList implements OnInit, OnDestroy {
176
124
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabList, "[ngTabList]", ["ngTabList"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectedTab": { "alias": "selectedTab"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "selectedTab": "selectedTabChange"; }, never, never, true, never>;
177
125
  }
178
126
 
127
+ /**
128
+ * A TabPanel container for the resources of layered content associated with a tab.
129
+ *
130
+ * The `ngTabPanel` directive holds the content for a specific tab. It is linked to an
131
+ * `ngTab` by a matching `value`. If a tab panel is hidden, the `inert` attribute will be
132
+ * applied to remove it from the accessibility tree. Proper styling is required for visual hiding.
133
+ *
134
+ * ```html
135
+ * <div ngTabPanel value="myTabId">
136
+ * <ng-template ngTabContent>
137
+ * <!-- Content for the tab panel -->
138
+ * </ng-template>
139
+ * </div>
140
+ * ```
141
+ *
142
+ * @developerPreview 21.0
143
+ *
144
+ * @see [Tabs](guide/aria/tabs)
145
+ */
146
+ declare class TabPanel implements OnInit, OnDestroy {
147
+ /** A reference to the host element. */
148
+ private readonly _elementRef;
149
+ /** A reference to the host element. */
150
+ readonly element: HTMLElement;
151
+ /** The DeferredContentAware host directive. */
152
+ private readonly _deferredContentAware;
153
+ /** The parent Tabs. */
154
+ private readonly _tabs;
155
+ /** A global unique identifier for the tab. */
156
+ readonly id: _angular_core.InputSignal<string>;
157
+ /** The Tab UIPattern associated with the tabpanel */
158
+ private readonly _tabPattern;
159
+ /** A local unique identifier for the tabpanel. */
160
+ readonly value: _angular_core.InputSignal<string>;
161
+ /** Whether the tab panel is visible. */
162
+ readonly visible: _angular_core.Signal<boolean>;
163
+ /** The TabPanel UIPattern. */
164
+ readonly _pattern: TabPanelPattern;
165
+ constructor();
166
+ ngOnInit(): void;
167
+ ngOnDestroy(): void;
168
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabPanel, never>;
169
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabPanel, "[ngTabPanel]", ["ngTabPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
170
+ }
171
+
179
172
  /**
180
173
  * A Tabs container.
181
174
  *
@@ -207,23 +200,27 @@ declare class TabList implements OnInit, OnDestroy {
207
200
  *
208
201
  * @see [Tabs](guide/aria/tabs)
209
202
  */
210
- declare class Tabs {
203
+ declare class Tabs implements OnDestroy {
211
204
  /** A reference to the host element. */
212
205
  private readonly _elementRef;
213
206
  /** A reference to the host element. */
214
207
  readonly element: HTMLElement;
215
208
  /** The TabList registered for this container. */
216
- private readonly _tabList;
217
- /** The TabPanels registered for this container. */
218
- private readonly _tabPanels;
219
- /** The TabPanels registered for this container. */
220
- private readonly _tabPanelsList;
209
+ readonly _tabList: _angular_core.WritableSignal<TabList | undefined>;
210
+ /** The collection of TabPanels. */
211
+ readonly _collection: SortedCollection<TabPanel>;
212
+ /** The Tab UIPattern of the child Tabs. */
213
+ readonly _tabPatterns: _angular_core.Signal<TabPattern[] | undefined>;
214
+ /** The TabPanel UIPattern of the child TabPanels. */
215
+ readonly _tabPanelPatterns: _angular_core.Signal<TabPanelPattern[]>;
216
+ /** A reactive map of tab values to their TabPanelPattern. */
217
+ readonly _panelMap: _angular_core.Signal<Map<string, TabPanelPattern>>;
218
+ /** A reactive map of tab values to their TabPattern. */
219
+ readonly _tabMap: _angular_core.Signal<Map<string, TabPattern>>;
221
220
  constructor();
222
- _registerList(list: TabList): void;
223
- _unregisterList(list: TabList): void;
224
- _registerPanel(panel: TabPanel): void;
225
- _unregisterPanel(panel: TabPanel): void;
226
- findTabPanel(value?: string): TabPanel | undefined;
221
+ ngOnDestroy(): void;
222
+ _register(child: TabList): void;
223
+ _unregister(): void;
227
224
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tabs, never>;
228
225
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tabs, "[ngTabs]", ["ngTabs"], {}, {}, never, never, true, never>;
229
226
  }
@@ -12,6 +12,8 @@ interface ToolbarWidgetHarnessFilters extends BaseHarnessFilters {
12
12
  text?: string | RegExp;
13
13
  /** Active state that the widget should match. */
14
14
  active?: boolean;
15
+ /** Selected state that the widget should match. */
16
+ selected?: boolean;
15
17
  }
16
18
 
17
19
  /** Harness for interacting with an Aria toolbar widget in tests. */
@@ -32,6 +34,8 @@ declare class ToolbarWidgetHarness extends ContentContainerComponentHarness<stri
32
34
  isActive(): Promise<boolean>;
33
35
  /** Gets whether the widget is disabled. */
34
36
  isDisabled(): Promise<boolean>;
37
+ /** Gets whether the widget is selected. */
38
+ isSelected(): Promise<boolean>;
35
39
  }
36
40
 
37
41
  /** Harness for interacting with an Aria toolbar widget group in tests. */
@@ -2,7 +2,7 @@ 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 './_signal-like-chunk.js';
5
+ import { SortedCollection } from './_collection-chunk.js';
6
6
  import './_list-chunk.js';
7
7
  import './_list-navigation-chunk.js';
8
8
 
@@ -108,13 +108,13 @@ declare class ToolbarWidget<V> implements OnInit, OnDestroy {
108
108
  *
109
109
  * @see [Toolbar](guide/aria/toolbar)
110
110
  */
111
- declare class Toolbar<V> {
111
+ declare class Toolbar<V> implements OnDestroy {
112
112
  /** A reference to the host element. */
113
113
  private readonly _elementRef;
114
114
  /** A reference to the host element. */
115
115
  readonly element: HTMLElement;
116
- /** The TabList nested inside of the container. */
117
- private readonly _widgets;
116
+ /** The collection of widgets in the toolbar. */
117
+ readonly _collection: SortedCollection<ToolbarWidget<V>>;
118
118
  /** Text direction. */
119
119
  readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
120
120
  /** Sorted UIPatterns of the child widgets */
@@ -135,8 +135,7 @@ declare class Toolbar<V> {
135
135
  /** The toolbar UIPattern. */
136
136
  readonly _pattern: ToolbarPattern<V>;
137
137
  constructor();
138
- _register(widget: ToolbarWidget<V>): void;
139
- _unregister(widget: ToolbarWidget<V>): void;
138
+ ngOnDestroy(): void;
140
139
  /** Finds the toolbar item associated with a given element. */
141
140
  private _getItem;
142
141
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Toolbar<any>, never>;
@@ -38,6 +38,14 @@ declare class TreeItemHarness extends ContentContainerComponentHarness<string> {
38
38
  getText(): Promise<string>;
39
39
  /** Clicks the tree item. */
40
40
  click(): Promise<void>;
41
+ /** Focuses the tree item. */
42
+ focus(): Promise<void>;
43
+ /** Blurs the tree item. */
44
+ blur(): Promise<void>;
45
+ /** Whether the tree item is active. */
46
+ isActive(): Promise<boolean>;
47
+ /** Whether the tree item has focus. */
48
+ isFocused(): Promise<boolean>;
41
49
  private _getHostAttribute;
42
50
  }
43
51
 
package/types/tree.d.ts CHANGED
@@ -2,17 +2,13 @@ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { OnInit, OnDestroy, Signal } from '@angular/core';
4
4
  import { TreeItemPattern, TreePattern } from './_tree-chunk.js';
5
+ import { HasElement, SortedCollection } from './_collection-chunk.js';
5
6
  import { DeferredContent, DeferredContentAware } from './_deferred-content-chunk.js';
6
- import { HasElement } from './_element-chunk.js';
7
- import { ComboboxPopup } from './combobox.js';
8
- export { Combobox as ɵɵCombobox, ComboboxDialog as ɵɵComboboxDialog, ComboboxInput as ɵɵComboboxInput, ComboboxPopupContainer as ɵɵComboboxPopupContainer } from './combobox.js';
9
- import './_signal-like-chunk.js';
10
7
  import './_expansion-chunk.js';
11
8
  import './_list-navigation-chunk.js';
12
9
  import './_list-chunk.js';
13
10
  import './_keyboard-event-manager-chunk.js';
14
11
  import './_click-event-manager-chunk.js';
15
- import './_combobox-chunk.js';
16
12
 
17
13
  /**
18
14
  * Group that contains children tree items.
@@ -154,15 +150,13 @@ declare class TreeItem<V> extends DeferredContentAware implements OnInit, OnDest
154
150
  *
155
151
  * @see [Tree](guide/aria/tree)
156
152
  */
157
- declare class Tree<V> {
153
+ declare class Tree<V> implements OnDestroy {
158
154
  /** A reference to the host element. */
159
155
  private readonly _elementRef;
160
156
  /** A reference to the host element. */
161
157
  readonly element: HTMLElement;
162
- /** A reference to the parent combobox popup, if one exists. */
163
- private readonly _popup;
164
- /** All TreeItem instances within this tree. */
165
- private readonly _unorderedItems;
158
+ /** The collection of tree items. */
159
+ readonly _collection: SortedCollection<TreeItem<V>>;
166
160
  /** A unique identifier for the tree. */
167
161
  readonly id: _angular_core.InputSignal<string>;
168
162
  /** Orientation of the tree. */
@@ -210,11 +204,10 @@ declare class Tree<V> {
210
204
  /** The ID of the active descendant in the tree. */
211
205
  readonly activeDescendant: Signal<string | undefined>;
212
206
  constructor();
213
- _register(child: TreeItem<V>): void;
214
- _unregister(child: TreeItem<V>): void;
207
+ ngOnDestroy(): void;
215
208
  scrollActiveItemIntoView(options?: ScrollIntoViewOptions): void;
216
209
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tree<any>, never>;
217
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tree<any>, "[ngTree]", ["ngTree"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "nav": { "alias": "nav"; "required": false; "isSignal": true; }; "currentType": { "alias": "currentType"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, [{ directive: typeof ComboboxPopup; inputs: {}; outputs: {}; }]>;
210
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tree<any>, "[ngTree]", ["ngTree"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "nav": { "alias": "nav"; "required": false; "isSignal": true; }; "currentType": { "alias": "currentType"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
218
211
  }
219
212
 
220
- export { Tree, TreeItem, TreeItemGroup, ComboboxPopup as ɵɵComboboxPopup, DeferredContent as ɵɵDeferredContent };
213
+ export { Tree, TreeItem, TreeItemGroup, DeferredContent as ɵɵDeferredContent };