@angular/aria 22.2.0-next.2 → 22.2.0-next.4

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.
@@ -28,7 +28,7 @@ declare class TabPattern {
28
28
  /** Whether the tab is selected. */
29
29
  readonly selected: SignalLike<boolean>;
30
30
  /** The tab index of the tab. */
31
- readonly tabIndex: SignalLike<0 | -1>;
31
+ readonly tabIndex: SignalLike<-1 | 0>;
32
32
  /** The id of the tabpanel associated with the tab. */
33
33
  readonly controls: SignalLike<string | undefined>;
34
34
  constructor(inputs: TabInputs);
@@ -82,15 +82,15 @@ declare class TabListPattern {
82
82
  /** Whether the tablist is disabled. */
83
83
  readonly disabled: SignalLike<boolean>;
84
84
  /** The tab index of the tablist. */
85
- readonly tabIndex: SignalLike<0 | -1>;
85
+ readonly tabIndex: SignalLike<-1 | 0>;
86
86
  /** The id of the current active tab. */
87
87
  readonly activeDescendant: SignalLike<string | undefined>;
88
88
  /** Whether selection should follow focus. */
89
89
  readonly followFocus: SignalLike<boolean>;
90
90
  /** The key used to navigate to the previous tab in the tablist. */
91
- readonly prevKey: SignalLike<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
91
+ readonly prevKey: SignalLike<"ArrowLeft" | "ArrowRight" | "ArrowUp">;
92
92
  /** The key used to navigate to the next item in the list. */
93
- readonly nextKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
93
+ readonly nextKey: SignalLike<"ArrowDown" | "ArrowLeft" | "ArrowRight">;
94
94
  /** The keydown event manager for the tablist. */
95
95
  readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
96
96
  /** The click event manager for the tablist. */
@@ -1,42 +1,40 @@
1
1
  import { SignalLike, WritableSignalLike } from './_collection-chunk.js';
2
- import { ListItem, ListInputs, List } from './_list-chunk.js';
2
+ import { ListFocusItem, ListNavigationItem, ListFocus, ListNavigation } from './_list-navigation-chunk.js';
3
3
 
4
4
  /** Represents the required inputs for a toolbar widget group. */
5
- interface ToolbarWidgetGroupInputs<T extends ListItem<V>, V> {
5
+ interface ToolbarWidgetGroupInputs {
6
6
  /** A reference to the parent toolbar. */
7
- toolbar: SignalLike<ToolbarPattern<V> | undefined>;
7
+ toolbar: SignalLike<ToolbarPattern | undefined>;
8
8
  /** Whether the widget group is disabled. */
9
9
  disabled: SignalLike<boolean>;
10
10
  /** The list of items within the widget group. */
11
- items: SignalLike<T[]>;
12
- /** Whether the group allows multiple widgets to be selected. */
13
- multi: SignalLike<boolean>;
11
+ items: SignalLike<ToolbarWidgetPattern[]>;
14
12
  }
15
13
  /** A group of widgets within a toolbar that provides nested navigation. */
16
- declare class ToolbarWidgetGroupPattern<T extends ListItem<V>, V> {
17
- readonly inputs: ToolbarWidgetGroupInputs<T, V>;
14
+ declare class ToolbarWidgetGroupPattern {
15
+ readonly inputs: ToolbarWidgetGroupInputs;
18
16
  /** Whether the widget is disabled. */
19
17
  readonly disabled: () => boolean;
20
18
  /** A reference to the parent toolbar. */
21
- readonly toolbar: () => ToolbarPattern<V> | undefined;
22
- /** Whether the group allows multiple widgets to be selected. */
23
- readonly multi: () => boolean;
24
- readonly searchTerm: () => string;
25
- readonly value: () => V;
26
- readonly selectable: () => boolean;
27
- readonly element: () => undefined;
28
- constructor(inputs: ToolbarWidgetGroupInputs<T, V>);
19
+ readonly toolbar: () => ToolbarPattern | undefined;
20
+ constructor(inputs: ToolbarWidgetGroupInputs);
29
21
  }
30
22
 
31
23
  /** Represents the required inputs for a toolbar widget in a toolbar. */
32
- interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index' | 'selectable'> {
24
+ interface ToolbarWidgetInputs {
25
+ /** A unique identifier for the widget. */
26
+ id: SignalLike<string>;
27
+ /** The html element that should receive focus. */
28
+ element: SignalLike<HTMLElement | undefined>;
29
+ /** Whether the widget is disabled. */
30
+ disabled: SignalLike<boolean>;
33
31
  /** A reference to the parent toolbar. */
34
- toolbar: SignalLike<ToolbarPattern<V>>;
32
+ toolbar: SignalLike<ToolbarPattern>;
35
33
  /** A reference to the parent widget group. */
36
- group: SignalLike<ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined>;
34
+ group: SignalLike<ToolbarWidgetGroupPattern | undefined>;
37
35
  }
38
- declare class ToolbarWidgetPattern<V> implements ListItem<V> {
39
- readonly inputs: ToolbarWidgetInputs<V>;
36
+ declare class ToolbarWidgetPattern implements ListFocusItem, ListNavigationItem {
37
+ readonly inputs: ToolbarWidgetInputs;
40
38
  /** A unique identifier for the widget. */
41
39
  readonly id: () => string;
42
40
  /** The html element that should receive focus. */
@@ -44,50 +42,60 @@ declare class ToolbarWidgetPattern<V> implements ListItem<V> {
44
42
  /** Whether the widget is disabled. */
45
43
  readonly disabled: () => boolean;
46
44
  /** A reference to the parent toolbar. */
47
- readonly group: () => ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined;
45
+ readonly group: () => ToolbarWidgetGroupPattern | undefined;
48
46
  /** A reference to the toolbar containing the widget. */
49
- readonly toolbar: () => ToolbarPattern<V>;
47
+ readonly toolbar: () => ToolbarPattern;
50
48
  /** The tabindex of the widget. */
51
- readonly tabIndex: SignalLike<0 | -1>;
52
- /** The text used by the typeahead search. */
53
- readonly searchTerm: () => string;
54
- /** The value associated with the widget. */
55
- readonly value: () => V;
56
- /** Whether the widget is selectable. */
57
- readonly selectable: () => boolean;
49
+ readonly tabIndex: SignalLike<-1 | 0>;
58
50
  /** The position of the widget within the toolbar. */
59
51
  readonly index: SignalLike<number>;
60
- /** Whether the widget is selected (only relevant in a selection group). */
61
- readonly selected: SignalLike<boolean>;
62
52
  /** Whether the widget is currently the active one (focused). */
63
53
  readonly active: SignalLike<boolean>;
64
- constructor(inputs: ToolbarWidgetInputs<V>);
54
+ constructor(inputs: ToolbarWidgetInputs);
65
55
  }
66
56
 
67
57
  /** Represents the required inputs for a toolbar. */
68
- type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'selectionMode' | 'focusMode'> & {
58
+ type ToolbarInputs = {
59
+ /** The html element that should receive focus. */
60
+ element: SignalLike<HTMLElement | undefined>;
61
+ /** The active item. */
62
+ activeItem: WritableSignalLike<ToolbarWidgetPattern | undefined>;
63
+ /** The items in the toolbar. */
64
+ items: SignalLike<ToolbarWidgetPattern[]>;
65
+ /** Whether disabled items in the toolbar should be focusable. */
66
+ softDisabled: SignalLike<boolean>;
67
+ /** Whether the toolbar is disabled. */
68
+ disabled: SignalLike<boolean>;
69
+ /** Whether the toolbar is vertically or horizontally oriented. */
70
+ orientation: SignalLike<'vertical' | 'horizontal'>;
71
+ /** The direction that text is read based on the users locale. */
72
+ textDirection: SignalLike<'rtl' | 'ltr'>;
73
+ /** Whether focus should wrap when navigating. */
74
+ wrap: SignalLike<boolean>;
69
75
  /** A function that returns the toolbar item associated with a given element. */
70
- getItem: (e: Element) => ToolbarWidgetPattern<V> | undefined;
76
+ getItem: (e: Element) => ToolbarWidgetPattern | undefined;
71
77
  };
72
78
  /** Controls the state of a toolbar. */
73
- declare class ToolbarPattern<V> {
74
- readonly inputs: ToolbarInputs<V>;
75
- /** The list behavior for the toolbar. */
76
- readonly listBehavior: List<ToolbarWidgetPattern<V>, V>;
79
+ declare class ToolbarPattern {
80
+ readonly inputs: ToolbarInputs;
81
+ /** Controls focus for the toolbar. */
82
+ readonly focusManager: ListFocus<ToolbarWidgetPattern>;
83
+ /** Controls navigation for the toolbar. */
84
+ readonly navigationBehavior: ListNavigation<ToolbarWidgetPattern>;
77
85
  /** Whether the toolbar has been interacted with. */
78
86
  readonly hasBeenInteracted: WritableSignalLike<boolean>;
79
- /** Whether the tablist is vertically or horizontally oriented. */
87
+ /** Whether the toolbar is vertically or horizontally oriented. */
80
88
  readonly orientation: SignalLike<'vertical' | 'horizontal'>;
81
89
  /** Whether disabled items in the group should be focusable. */
82
90
  readonly softDisabled: SignalLike<boolean>;
83
91
  /** Whether the toolbar is disabled. */
84
92
  readonly disabled: SignalLike<boolean>;
85
- /** The tab index of the toolbar (if using activedescendant). */
86
- readonly tabIndex: SignalLike<0 | -1>;
87
- /** The id of the current active widget (if using activedescendant). */
93
+ /** The tab index of the toolbar. */
94
+ readonly tabIndex: SignalLike<-1 | 0>;
95
+ /** The id of the current active widget. */
88
96
  readonly activeDescendant: SignalLike<string | undefined>;
89
97
  /** The currently active item in the toolbar. */
90
- readonly activeItem: () => ToolbarWidgetPattern<V> | undefined;
98
+ readonly activeItem: () => ToolbarWidgetPattern | undefined;
91
99
  /** The key used to navigate to the previous widget. */
92
100
  private readonly _prevKey;
93
101
  /** The key used to navigate to the next widget. */
@@ -104,10 +112,7 @@ declare class ToolbarPattern<V> {
104
112
  private _groupPrev;
105
113
  /** Navigates to the widget targeted by a pointer event. */
106
114
  private _goto;
107
- select(): void;
108
- constructor(inputs: ToolbarInputs<V>);
109
- /** Returns a set of violations */
110
- validate(): string[];
115
+ constructor(inputs: ToolbarInputs);
111
116
  /** Handles keydown events for the toolbar. */
112
117
  onKeydown(event: KeyboardEvent): void;
113
118
  onPointerdown(event: PointerEvent): void;
@@ -117,8 +122,7 @@ declare class ToolbarPattern<V> {
117
122
  /**
118
123
  * Sets the toolbar to its default initial state.
119
124
  *
120
- * Sets the active index to the selected widget if one exists and is focusable.
121
- * Otherwise, sets the active index to the first focusable widget.
125
+ * Sets the active index to the first focusable widget.
122
126
  */
123
127
  setDefaultState(): void;
124
128
  /** Sets the default active state of the toolbar before receiving interaction for the first time. */
@@ -34,7 +34,7 @@ declare class Tree<T extends TreeItem<V, T>, V> {
34
34
  /** The id of the current active item. */
35
35
  readonly activeDescendant: SignalLike<string | undefined>;
36
36
  /** The tab index of the tree. */
37
- readonly tabIndex: SignalLike<0 | -1>;
37
+ readonly tabIndex: SignalLike<-1 | 0>;
38
38
  /** The index of the currently active item in the tree (within the flattened list). */
39
39
  readonly activeIndex: SignalLike<number>;
40
40
  /** The uncommitted index for selecting a range of options. */
@@ -43,7 +43,7 @@ declare class Tree<T extends TreeItem<V, T>, V> {
43
43
  private readonly _wrap;
44
44
  constructor(inputs: TreeInputs$1<T, V>);
45
45
  /** Returns the tab index for the given item. */
46
- getItemTabindex(item: T): 0 | -1;
46
+ getItemTabindex(item: T): -1 | 0;
47
47
  /** Navigates to the first option in the tree. */
48
48
  first(opts?: NavOptions<T>): void;
49
49
  /** Navigates to the last option in the tree. */
@@ -159,7 +159,7 @@ declare class TreeItemPattern<V> implements TreeItem<V, TreeItemPattern<V>> {
159
159
  /** Whether the item is active. */
160
160
  readonly active: SignalLike<boolean>;
161
161
  /** The tab index of the item. */
162
- readonly tabIndex: SignalLike<0 | -1>;
162
+ readonly tabIndex: SignalLike<-1 | 0>;
163
163
  /** Whether the item is selected. */
164
164
  readonly selected: SignalLike<boolean | undefined>;
165
165
  /** The current type of this item. */
@@ -208,13 +208,13 @@ declare class TreePattern<V> implements TreeInputs<V> {
208
208
  /** Whether the tree direction is RTL. */
209
209
  readonly isRtl: SignalLike<boolean>;
210
210
  /** The key for navigating to the previous item. */
211
- readonly prevKey: SignalLike<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
211
+ readonly prevKey: SignalLike<"ArrowLeft" | "ArrowRight" | "ArrowUp">;
212
212
  /** The key for navigating to the next item. */
213
- readonly nextKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
213
+ readonly nextKey: SignalLike<"ArrowDown" | "ArrowLeft" | "ArrowRight">;
214
214
  /** The key for collapsing an item or moving to its parent. */
215
- readonly collapseKey: SignalLike<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
215
+ readonly collapseKey: SignalLike<"ArrowLeft" | "ArrowRight" | "ArrowUp">;
216
216
  /** The key for expanding an item or moving to its first child. */
217
- readonly expandKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
217
+ readonly expandKey: SignalLike<"ArrowDown" | "ArrowLeft" | "ArrowRight">;
218
218
  /** Represents the space key. Does nothing when the user is actively using typeahead. */
219
219
  readonly dynamicSpaceKey: SignalLike<"" | " ">;
220
220
  /** Regular expression to match characters for typeahead. */
@@ -61,7 +61,7 @@ declare class ComboboxPopup implements OnInit, OnDestroy {
61
61
  /** The ID of the active descendant in the popup. */
62
62
  readonly activeDescendant: _angular_core.Signal<string | undefined>;
63
63
  /** The type of the popup (e.g., listbox, tree, grid, dialog). */
64
- readonly popupType: _angular_core.InputSignal<"listbox" | "tree" | "grid" | "dialog">;
64
+ readonly popupType: _angular_core.InputSignal<"dialog" | "grid" | "listbox" | "tree">;
65
65
  /** The popup pattern. */
66
66
  readonly _pattern: ComboboxPopupPattern;
67
67
  ngOnInit(): void;
package/types/grid.d.ts CHANGED
@@ -37,7 +37,7 @@ declare class GridCell implements OnInit, OnDestroy {
37
37
  /** A unique identifier for the cell. */
38
38
  readonly id: _angular_core.InputSignal<string>;
39
39
  /** The ARIA role for the cell. */
40
- readonly role: _angular_core.InputSignal<"gridcell" | "columnheader" | "rowheader">;
40
+ readonly role: _angular_core.InputSignal<"columnheader" | "gridcell" | "rowheader">;
41
41
  /** The number of rows the cell should span. */
42
42
  readonly rowSpan: _angular_core.InputSignal<number>;
43
43
  /** The number of columns the cell should span. */
@@ -152,7 +152,7 @@ declare class Grid implements OnDestroy {
152
152
  * - `roving`: Focus is moved to the active cell using `tabindex`.
153
153
  * - `activedescendant`: Focus remains on the grid container, and `aria-activedescendant` is used to indicate the active cell.
154
154
  */
155
- readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
155
+ readonly focusMode: _angular_core.InputSignal<"activedescendant" | "roving">;
156
156
  /**
157
157
  * The wrapping behavior for keyboard navigation along the row axis.
158
158
  * - `continuous`: Navigation wraps from the last row to the first, and vice-versa.
@@ -174,7 +174,7 @@ declare class Grid implements OnDestroy {
174
174
  * - `follow`: The focused cell is automatically selected.
175
175
  * - `explicit`: Cells are selected explicitly by the user (e.g., via click or spacebar).
176
176
  */
177
- readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
177
+ readonly selectionMode: _angular_core.InputSignal<"explicit" | "follow">;
178
178
  /** The tabindex of the grid. */
179
179
  readonly tabIndex: _angular_core.InputSignalWithTransform<number | undefined, string | number | undefined>;
180
180
  /** The UI pattern for the grid. */
@@ -219,15 +219,15 @@ declare class GridCellWidget {
219
219
  /** A unique identifier for the widget. */
220
220
  readonly id: _angular_core.InputSignal<string>;
221
221
  /** The type of widget, which determines how it is activated. */
222
- readonly widgetType: _angular_core.InputSignal<"simple" | "complex" | "editable">;
222
+ readonly widgetType: _angular_core.InputSignal<"complex" | "editable" | "simple">;
223
223
  /** Whether the widget is disabled. */
224
224
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
225
225
  /** The target that will receive focus instead of the widget. */
226
226
  readonly focusTarget: _angular_core.InputSignal<ElementResolver<HTMLElement>>;
227
227
  /** Emits when the widget is activated. */
228
- readonly activated: _angular_core.OutputEmitterRef<KeyboardEvent | FocusEvent | undefined>;
228
+ readonly activated: _angular_core.OutputEmitterRef<FocusEvent | KeyboardEvent | undefined>;
229
229
  /** Emits when the widget is deactivated. */
230
- readonly deactivated: _angular_core.OutputEmitterRef<KeyboardEvent | FocusEvent | undefined>;
230
+ readonly deactivated: _angular_core.OutputEmitterRef<FocusEvent | KeyboardEvent | undefined>;
231
231
  /** The tabindex override. */
232
232
  readonly tabindex: _angular_core.InputSignal<number | undefined>;
233
233
  /**
@@ -87,7 +87,7 @@ declare class Listbox<V> implements OnDestroy {
87
87
  /** A signal wrapper for directionality. */
88
88
  protected readonly textDirection: Signal<_angular_cdk_bidi.Direction>;
89
89
  /** Whether the list is vertically or horizontally oriented. */
90
- readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
90
+ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
91
91
  /** Whether multiple items in the list can be selected at once. */
92
92
  readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
93
93
  /** Whether focus should wrap when navigating. */
@@ -102,13 +102,13 @@ declare class Listbox<V> implements OnDestroy {
102
102
  * - `roving`: Focus is moved to the active item using `tabindex`.
103
103
  * - `activedescendant`: Focus remains on the listbox container, and `aria-activedescendant` is used to indicate the active item.
104
104
  */
105
- readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
105
+ readonly focusMode: _angular_core.InputSignal<"activedescendant" | "roving">;
106
106
  /**
107
107
  * The selection strategy used by the list.
108
108
  * - `follow`: The focused item is automatically selected.
109
109
  * - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).
110
110
  */
111
- readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
111
+ readonly selectionMode: _angular_core.InputSignal<"explicit" | "follow">;
112
112
  /** The amount of time before the typeahead search is reset. */
113
113
  readonly typeaheadDelay: _angular_core.InputSignal<number>;
114
114
  /** Whether the listbox is disabled. */
package/types/menu.d.ts CHANGED
@@ -60,7 +60,7 @@ declare class MenuBar<V> implements OnDestroy {
60
60
  /** The menu items as a writable signal. */
61
61
  private readonly _itemPatterns;
62
62
  /** A callback function triggered when a menu item is selected. */
63
- readonly itemSelected: _angular_core.OutputEmitterRef<V>;
63
+ readonly itemSelected: _angular_core.OutputEmitterRef<V | undefined>;
64
64
  constructor();
65
65
  ngOnDestroy(): void;
66
66
  /** Closes the menubar. */
@@ -93,13 +93,13 @@ declare class MenuItem<V> implements OnInit, OnDestroy {
93
93
  /** The unique ID of the menu item. */
94
94
  readonly id: _angular_core.InputSignal<string>;
95
95
  /** The value of the menu item. */
96
- readonly value: _angular_core.InputSignal<V>;
96
+ readonly value: _angular_core.InputSignal<V | undefined>;
97
97
  /** Whether the menu item is disabled. */
98
98
  readonly disabled: _angular_core.InputSignal<boolean>;
99
99
  /** The search term associated with the menu item. */
100
100
  readonly searchTerm: _angular_core.ModelSignal<string>;
101
101
  /** The role of the menu item. */
102
- readonly role: _angular_core.InputSignal<"menuitem" | "menuitemradio" | "menuitemcheckbox">;
102
+ readonly role: _angular_core.InputSignal<"menuitem" | "menuitemcheckbox" | "menuitemradio">;
103
103
  /** A reference to the parent menu or menubar. */
104
104
  readonly parent: Menu<V> | MenuBar<V> | null;
105
105
  /** The submenu associated with the menu item. */
@@ -120,7 +120,7 @@ declare class MenuItem<V> implements OnInit, OnDestroy {
120
120
  /** Closes the submenu. */
121
121
  close(): void;
122
122
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuItem<any>, never>;
123
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuItem<any>, "[ngMenuItem]", ["ngMenuItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "searchTerm": "searchTermChange"; }, never, never, true, never>;
123
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuItem<any>, "[ngMenuItem]", ["ngMenuItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "searchTerm": "searchTermChange"; }, never, never, true, never>;
124
124
  }
125
125
 
126
126
  /**
@@ -170,7 +170,7 @@ declare class Menu<V> implements OnDestroy {
170
170
  /** Whether the menu is disabled. */
171
171
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
172
172
  /** A reference to the parent menu item or menu trigger. */
173
- readonly parent: _angular_core.WritableSignal<MenuTrigger<V> | MenuItem<V> | undefined>;
173
+ readonly parent: _angular_core.WritableSignal<MenuItem<V> | MenuTrigger<V> | undefined>;
174
174
  /** Whether the menu is soft disabled. */
175
175
  readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
176
176
  /** The menu ui pattern instance. */
@@ -189,9 +189,9 @@ declare class Menu<V> implements OnDestroy {
189
189
  /** Whether the menu is visible. */
190
190
  readonly visible: Signal<boolean>;
191
191
  /** The tab index of the menu. */
192
- readonly tabIndex: Signal<0 | -1>;
192
+ readonly tabIndex: Signal<-1 | 0>;
193
193
  /** A callback function triggered when a menu item is selected. */
194
- readonly itemSelected: _angular_core.OutputEmitterRef<V>;
194
+ readonly itemSelected: _angular_core.OutputEmitterRef<V | undefined>;
195
195
  /** The delay in milliseconds before expanding sub-menus on hover. */
196
196
  readonly expansionDelay: _angular_core.InputSignal<number>;
197
197
  constructor();
@@ -66,9 +66,9 @@ declare class ComboboxPattern {
66
66
  /** The ID of the popup. */
67
67
  readonly popupId: _angular_core.Signal<string | undefined>;
68
68
  /** The type of the popup. */
69
- readonly popupType: _angular_core.Signal<"listbox" | "tree" | "grid" | "dialog" | undefined>;
69
+ readonly popupType: _angular_core.Signal<"dialog" | "grid" | "listbox" | "tree" | undefined>;
70
70
  /** The autocomplete behavior of the combobox. */
71
- readonly autocomplete: _angular_core.Signal<"none" | "inline" | "list" | "both">;
71
+ readonly autocomplete: _angular_core.Signal<"both" | "inline" | "list" | "none">;
72
72
  /** A relay for keyboard events to the popup. */
73
73
  readonly keyboardEventRelay: _angular_core.WritableSignal<KeyboardEvent | undefined>;
74
74
  /** Whether the combobox is focused. */
@@ -96,6 +96,8 @@ declare class ComboboxPattern {
96
96
  onFocusin(): void;
97
97
  /** Handles focus out events for the combobox. */
98
98
  onFocusout(): void;
99
+ /** Closes the popup once focus has left both the combobox and the popup. */
100
+ closePopupOnFocusout(): void;
99
101
  /** Handles input events for the combobox. */
100
102
  onInput(event: Event): void;
101
103
  /** Highlights the currently selected item in the combobox. */
@@ -113,18 +115,22 @@ interface ComboboxPopupInputs {
113
115
  activeDescendant: SignalLike<string | undefined>;
114
116
  /** The ID of the popup. */
115
117
  popupId: SignalLike<string | undefined>;
118
+ /** A reference to the parent combobox. */
119
+ combobox: SignalLike<ComboboxPattern | undefined>;
116
120
  }
117
121
  /** Controls the state of a simple combobox popup. */
118
122
  declare class ComboboxPopupPattern {
119
123
  readonly inputs: ComboboxPopupInputs;
120
124
  /** The type of the popup. */
121
- readonly popupType: () => "listbox" | "tree" | "grid" | "dialog";
125
+ readonly popupType: () => "dialog" | "grid" | "listbox" | "tree";
122
126
  /** The element that serves as the control target for the popup. */
123
127
  readonly controlTarget: () => HTMLElement | undefined;
124
128
  /** The ID of the active descendant in the popup. */
125
129
  readonly activeDescendant: () => string | undefined;
126
130
  /** The ID of the popup. */
127
131
  readonly popupId: () => string | undefined;
132
+ /** A reference to the parent combobox. */
133
+ readonly combobox: () => ComboboxPattern | undefined;
128
134
  /** Whether the popup is focused. */
129
135
  readonly isFocused: _angular_core.WritableSignal<boolean>;
130
136
  constructor(inputs: ComboboxPopupInputs);
package/types/tabs.d.ts CHANGED
@@ -81,7 +81,7 @@ declare class TabList implements OnInit, OnDestroy {
81
81
  /** The Tab UIPatterns of the child Tabs. */
82
82
  readonly _tabPatterns: _angular_core.Signal<TabPattern[]>;
83
83
  /** Whether the tablist is vertically or horizontally oriented. */
84
- readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
84
+ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
85
85
  /** Text direction. */
86
86
  readonly textDirection: WritableSignal<_angular_cdk_bidi.Direction>;
87
87
  /** Whether focus should wrap when navigating. */
@@ -96,13 +96,13 @@ declare class TabList implements OnInit, OnDestroy {
96
96
  * - `roving`: Focus is moved to the active tab using `tabindex`.
97
97
  * - `activedescendant`: Focus remains on the tablist container, and `aria-activedescendant` is used to indicate the active tab.
98
98
  */
99
- readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
99
+ readonly focusMode: _angular_core.InputSignal<"activedescendant" | "roving">;
100
100
  /**
101
101
  * The selection strategy used by the tablist.
102
102
  * - `follow`: The focused tab is automatically selected.
103
103
  * - `explicit`: Tabs are selected explicitly by the user (e.g., via click or spacebar).
104
104
  */
105
- readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
105
+ readonly selectionMode: _angular_core.InputSignal<"explicit" | "follow">;
106
106
  /** The current selected tab as a model input. */
107
107
  readonly selectedTab: _angular_core.ModelSignal<string | undefined>;
108
108
  /** The current selected Tab pattern, passed to the List pattern. */
@@ -1,9 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnDestroy, InjectionToken } from '@angular/core';
3
3
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
- import { ToolbarWidgetGroupPattern, ToolbarWidgetPattern, ToolbarPattern } from './private.js';
4
+ import { ToolbarWidgetGroupPattern, ToolbarPattern, ToolbarWidgetPattern } from './private.js';
5
5
  import { SortedCollection } from './private.js';
6
- import './_list-chunk.js';
7
6
  import './_list-navigation-chunk.js';
8
7
 
9
8
  /**
@@ -12,7 +11,7 @@ import './_list-navigation-chunk.js';
12
11
  *
13
12
  * @see [Toolbar](guide/aria/toolbar)
14
13
  */
15
- declare class ToolbarWidgetGroup<V> {
14
+ declare class ToolbarWidgetGroup {
16
15
  /** A reference to the host element. */
17
16
  private readonly _elementRef;
18
17
  /** A reference to the host element. */
@@ -27,13 +26,11 @@ declare class ToolbarWidgetGroup<V> {
27
26
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
28
27
  /** The list of toolbar items within the group. */
29
28
  private readonly _itemPatterns;
30
- /** Whether the group allows multiple widgets to be selected. */
31
- readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
32
29
  /** The ToolbarWidgetGroup UIPattern. */
33
- readonly _pattern: ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V>;
30
+ readonly _pattern: ToolbarWidgetGroupPattern;
34
31
  constructor();
35
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolbarWidgetGroup<any>, never>;
36
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToolbarWidgetGroup<any>, "[ngToolbarWidgetGroup]", ["ngToolbarWidgetGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; }, {}, ["_widgets"], never, true, never>;
32
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolbarWidgetGroup, never>;
33
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToolbarWidgetGroup, "[ngToolbarWidgetGroup]", ["ngToolbarWidgetGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, ["_widgets"], never, true, never>;
37
34
  }
38
35
 
39
36
  /**
@@ -41,17 +38,17 @@ declare class ToolbarWidgetGroup<V> {
41
38
  *
42
39
  * The `ngToolbarWidget` directive should be applied to any native HTML element that acts
43
40
  * as an interactive widget within an `ngToolbar` or `ngToolbarWidgetGroup`. It enables
44
- * keyboard navigation and selection within the toolbar.
41
+ * keyboard navigation within the toolbar.
45
42
  *
46
43
  * ```html
47
- * <button ngToolbarWidget value="action-id" [disabled]="isDisabled">
44
+ * <button ngToolbarWidget [disabled]="isDisabled">
48
45
  * Perform Action
49
46
  * </button>
50
47
  * ```
51
48
  *
52
49
  * @see [Toolbar](guide/aria/toolbar)
53
50
  */
54
- declare class ToolbarWidget<V> implements OnInit, OnDestroy {
51
+ declare class ToolbarWidget implements OnInit, OnDestroy {
55
52
  /** A reference to the host element. */
56
53
  private readonly _elementRef;
57
54
  /** A reference to the host element. */
@@ -61,26 +58,22 @@ declare class ToolbarWidget<V> implements OnInit, OnDestroy {
61
58
  /** A unique identifier for the widget. */
62
59
  readonly id: _angular_core.InputSignal<string>;
63
60
  /** The parent Toolbar UIPattern. */
64
- readonly _toolbarPattern: _angular_core.Signal<ToolbarPattern<V>>;
61
+ readonly _toolbarPattern: _angular_core.Signal<ToolbarPattern>;
65
62
  /** Whether the widget is disabled. */
66
63
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
67
64
  /** Whether the widget is 'hard' disabled, which is different from `aria-disabled`. A hard disabled widget cannot receive focus. */
68
65
  readonly hardDisabled: _angular_core.Signal<boolean>;
69
66
  /** The optional ToolbarWidgetGroup this widget belongs to. */
70
- readonly _group: ToolbarWidgetGroup<V> | null;
71
- /** The value associated with the widget. */
72
- readonly value: _angular_core.InputSignal<V>;
67
+ readonly _group: ToolbarWidgetGroup | null;
73
68
  /** Whether the widget is currently active (focused). */
74
69
  readonly active: _angular_core.Signal<boolean>;
75
- /** Whether the widget is selected (only relevant in a selection group). */
76
- readonly selected: () => boolean;
77
70
  private readonly _groupPattern;
78
71
  /** The ToolbarWidget UIPattern. */
79
- readonly _pattern: ToolbarWidgetPattern<V>;
72
+ readonly _pattern: ToolbarWidgetPattern;
80
73
  ngOnInit(): void;
81
74
  ngOnDestroy(): void;
82
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolbarWidget<any>, never>;
83
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToolbarWidget<any>, "[ngToolbarWidget]", ["ngToolbarWidget"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
75
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolbarWidget, never>;
76
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToolbarWidget, "[ngToolbarWidget]", ["ngToolbarWidget"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
84
77
  }
85
78
 
86
79
  /**
@@ -90,32 +83,32 @@ declare class ToolbarWidget<V> implements OnInit, OnDestroy {
90
83
  *
91
84
  * ```html
92
85
  * <div ngToolbar orientation="horizontal" [wrap]="true">
93
- * <button ngToolbarWidget value="save">Save</button>
94
- * <button ngToolbarWidget value="print">Print</button>
86
+ * <button ngToolbarWidget>Save</button>
87
+ * <button ngToolbarWidget>Print</button>
95
88
  *
96
- * <div ngToolbarWidgetGroup [(value)]="selectedAlignment">
97
- * <button ngToolbarWidget value="left">Left</button>
98
- * <button ngToolbarWidget value="center">Center</button>
99
- * <button ngToolbarWidget value="right">Right</button>
89
+ * <div ngToolbarWidgetGroup>
90
+ * <button ngToolbarWidget>Left</button>
91
+ * <button ngToolbarWidget>Center</button>
92
+ * <button ngToolbarWidget>Right</button>
100
93
  * </div>
101
94
  * </div>
102
95
  * ```
103
96
  *
104
97
  * @see [Toolbar](guide/aria/toolbar)
105
98
  */
106
- declare class Toolbar<V> implements OnDestroy {
99
+ declare class Toolbar implements OnDestroy {
107
100
  /** A reference to the host element. */
108
101
  private readonly _elementRef;
109
102
  /** A reference to the host element. */
110
103
  readonly element: HTMLElement;
111
104
  /** The collection of widgets in the toolbar. */
112
- readonly _collection: SortedCollection<ToolbarWidget<V>>;
105
+ readonly _collection: SortedCollection<ToolbarWidget>;
113
106
  /** Text direction. */
114
107
  readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
115
108
  /** Sorted UIPatterns of the child widgets */
116
- readonly _itemPatterns: _angular_core.Signal<ToolbarWidgetPattern<V>[]>;
109
+ readonly _itemPatterns: _angular_core.Signal<ToolbarWidgetPattern[]>;
117
110
  /** Whether the toolbar is vertically or horizontally oriented. */
118
- readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
111
+ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
119
112
  /**
120
113
  * Whether to allow disabled items to receive focus. When `true`, disabled items are
121
114
  * focusable but not interactive. When `false`, disabled items are skipped during navigation.
@@ -125,19 +118,17 @@ declare class Toolbar<V> implements OnDestroy {
125
118
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
126
119
  /** Whether focus should wrap when navigating. */
127
120
  readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
128
- /** The values of the selected widgets within the toolbar. */
129
- readonly value: _angular_core.ModelSignal<V[]>;
130
121
  /** The toolbar UIPattern. */
131
- readonly _pattern: ToolbarPattern<V>;
122
+ readonly _pattern: ToolbarPattern;
132
123
  constructor();
133
124
  ngOnDestroy(): void;
134
125
  /** Finds the toolbar item associated with a given element. */
135
126
  private _getItem;
136
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<Toolbar<any>, never>;
137
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Toolbar<any>, "[ngToolbar]", ["ngToolbar"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
127
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Toolbar, never>;
128
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Toolbar, "[ngToolbar]", ["ngToolbar"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
138
129
  }
139
130
 
140
131
  /** Token used to provide the `ToolbarWidgetGroup` directive. */
141
- declare const TOOLBAR_WIDGET_GROUP: InjectionToken<ToolbarWidgetGroup<unknown>>;
132
+ declare const TOOLBAR_WIDGET_GROUP: InjectionToken<ToolbarWidgetGroup>;
142
133
 
143
134
  export { TOOLBAR_WIDGET_GROUP, Toolbar, ToolbarWidget, ToolbarWidgetGroup };