@angular/aria 21.0.0-rc.0 → 21.0.0-rc.2

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 (48) hide show
  1. package/_adev_assets/aria-accordion.json +443 -59
  2. package/_adev_assets/aria-combobox.json +345 -37
  3. package/_adev_assets/aria-grid.json +408 -71
  4. package/_adev_assets/aria-listbox.json +115 -35
  5. package/_adev_assets/aria-menu.json +492 -167
  6. package/_adev_assets/aria-tabs.json +272 -88
  7. package/_adev_assets/aria-toolbar.json +151 -133
  8. package/_adev_assets/aria-tree.json +182 -35
  9. package/fesm2022/_widget-chunk.mjs +643 -190
  10. package/fesm2022/_widget-chunk.mjs.map +1 -1
  11. package/fesm2022/accordion.mjs +129 -77
  12. package/fesm2022/accordion.mjs.map +1 -1
  13. package/fesm2022/aria.mjs +1 -1
  14. package/fesm2022/aria.mjs.map +1 -1
  15. package/fesm2022/combobox.mjs +140 -27
  16. package/fesm2022/combobox.mjs.map +1 -1
  17. package/fesm2022/grid.mjs +254 -68
  18. package/fesm2022/grid.mjs.map +1 -1
  19. package/fesm2022/listbox.mjs +54 -44
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +270 -108
  22. package/fesm2022/menu.mjs.map +1 -1
  23. package/fesm2022/private.mjs +752 -785
  24. package/fesm2022/private.mjs.map +1 -1
  25. package/fesm2022/tabs.mjs +101 -71
  26. package/fesm2022/tabs.mjs.map +1 -1
  27. package/fesm2022/toolbar.mjs +87 -64
  28. package/fesm2022/toolbar.mjs.map +1 -1
  29. package/fesm2022/tree.mjs +105 -60
  30. package/fesm2022/tree.mjs.map +1 -1
  31. package/package.json +2 -10
  32. package/types/_grid-chunk.d.ts +326 -83
  33. package/types/accordion.d.ts +134 -35
  34. package/types/combobox.d.ts +146 -13
  35. package/types/grid.d.ts +159 -32
  36. package/types/listbox.d.ts +59 -28
  37. package/types/menu.d.ts +151 -55
  38. package/types/private.d.ts +449 -567
  39. package/types/tabs.d.ts +121 -41
  40. package/types/toolbar.d.ts +74 -51
  41. package/types/tree.d.ts +116 -45
  42. package/_adev_assets/aria-radio-group.json +0 -389
  43. package/fesm2022/deferred-content.mjs +0 -99
  44. package/fesm2022/deferred-content.mjs.map +0 -1
  45. package/fesm2022/radio-group.mjs +0 -338
  46. package/fesm2022/radio-group.mjs.map +0 -1
  47. package/types/deferred-content.d.ts +0 -38
  48. package/types/radio-group.d.ts +0 -84
package/types/grid.d.ts CHANGED
@@ -1,41 +1,103 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Signal } from '@angular/core';
2
+ import { Signal, ElementRef } from '@angular/core';
3
+ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
3
4
  import { GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern } from './_grid-chunk.js';
4
5
 
5
- /** A directive that provides grid-based navigation and selection behavior. */
6
+ /**
7
+ * The container for a grid. It provides keyboard navigation and focus management for the grid's
8
+ * rows and cells. It manages the overall behavior of the grid, including focus
9
+ * wrapping, selection, and disabled states.
10
+ *
11
+ * ```html
12
+ * <table ngGrid [multi]="true" [enableSelection]="true">
13
+ * @for (row of gridData; track row) {
14
+ * <tr ngGridRow>
15
+ * @for (cell of row; track cell) {
16
+ * <td ngGridCell [disabled]="cell.disabled">
17
+ * {{cell.value}}
18
+ * </td>
19
+ * }
20
+ * </tr>
21
+ * }
22
+ * </table>
23
+ * ```
24
+ *
25
+ * @developerPreview 21.0
26
+ */
6
27
  declare class Grid {
7
28
  /** A reference to the host element. */
8
29
  private readonly _elementRef;
30
+ /** A reference to the host element. */
31
+ readonly element: HTMLElement;
9
32
  /** The rows that make up the grid. */
10
33
  private readonly _rows;
11
34
  /** The UI patterns for the rows in the grid. */
12
35
  private readonly _rowPatterns;
13
- /** The host native element. */
14
- readonly element: Signal<any>;
36
+ /** Text direction. */
37
+ readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
15
38
  /** Whether selection is enabled for the grid. */
16
39
  readonly enableSelection: _angular_core.InputSignalWithTransform<boolean, unknown>;
17
40
  /** Whether the grid is disabled. */
18
41
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
19
- /** Whether to skip disabled items during navigation. */
20
- readonly skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
21
- /** The focus strategy used by the grid. */
42
+ /**
43
+ * Whether to allow disabled items to receive focus. When `true`, disabled items are
44
+ * focusable but not interactive. When `false`, disabled items are skipped during navigation.
45
+ */
46
+ readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
47
+ /**
48
+ * The focus strategy used by the grid.
49
+ * - `roving`: Focus is moved to the active cell using `tabindex`.
50
+ * - `activedescendant`: Focus remains on the grid container, and `aria-activedescendant` is used to indicate the active cell.
51
+ */
22
52
  readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
23
- /** The wrapping behavior for keyboard navigation along the row axis. */
53
+ /**
54
+ * The wrapping behavior for keyboard navigation along the row axis.
55
+ * - `continuous`: Navigation wraps from the last row to the first, and vice-versa.
56
+ * - `loop`: Navigation wraps within the current row.
57
+ * - `nowrap`: Navigation stops at the first/last item in the row.
58
+ */
24
59
  readonly rowWrap: _angular_core.InputSignal<"continuous" | "loop" | "nowrap">;
25
- /** The wrapping behavior for keyboard navigation along the column axis. */
60
+ /**
61
+ * The wrapping behavior for keyboard navigation along the column axis.
62
+ * - `continuous`: Navigation wraps from the last column to the first, and vice-versa.
63
+ * - `loop`: Navigation wraps within the current column.
64
+ * - `nowrap`: Navigation stops at the first/last item in the column.
65
+ */
26
66
  readonly colWrap: _angular_core.InputSignal<"continuous" | "loop" | "nowrap">;
67
+ /** Whether multiple cells in the grid can be selected. */
68
+ readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
69
+ /**
70
+ * The selection strategy used by the grid.
71
+ * - `follow`: The focused cell is automatically selected.
72
+ * - `explicit`: Cells are selected explicitly by the user (e.g., via click or spacebar).
73
+ */
74
+ readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
75
+ /** Whether enable range selections (with modifier keys or dragging). */
76
+ readonly enableRangeSelection: _angular_core.InputSignalWithTransform<boolean, unknown>;
27
77
  /** The UI pattern for the grid. */
28
78
  readonly _pattern: GridPattern;
29
79
  constructor();
30
80
  /** Gets the cell pattern for a given element. */
31
81
  private _getCell;
32
82
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Grid, never>;
33
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Grid, "[ngGrid]", ["ngGrid"], { "enableSelection": { "alias": "enableSelection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "rowWrap": { "alias": "rowWrap"; "required": false; "isSignal": true; }; "colWrap": { "alias": "colWrap"; "required": false; "isSignal": true; }; }, {}, ["_rows"], never, true, never>;
83
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Grid, "[ngGrid]", ["ngGrid"], { "enableSelection": { "alias": "enableSelection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "rowWrap": { "alias": "rowWrap"; "required": false; "isSignal": true; }; "colWrap": { "alias": "colWrap"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "enableRangeSelection": { "alias": "enableRangeSelection"; "required": false; "isSignal": true; }; }, {}, ["_rows"], never, true, never>;
34
84
  }
35
- /** A directive that represents a row in a grid. */
85
+ /**
86
+ * Represents a row within a grid. It is a container for `ngGridCell` directives.
87
+ *
88
+ * ```html
89
+ * <tr ngGridRow>
90
+ * <!-- ... cells ... -->
91
+ * </tr>
92
+ * ```
93
+ *
94
+ * @developerPreview 21.0
95
+ */
36
96
  declare class GridRow {
37
97
  /** A reference to the host element. */
38
98
  private readonly _elementRef;
99
+ /** A reference to the host element. */
100
+ readonly element: HTMLElement;
39
101
  /** The cells that make up this row. */
40
102
  private readonly _cells;
41
103
  /** The UI patterns for the cells in this row. */
@@ -44,33 +106,45 @@ declare class GridRow {
44
106
  private readonly _grid;
45
107
  /** The parent grid UI pattern. */
46
108
  readonly grid: Signal<GridPattern>;
47
- /** The host native element. */
48
- readonly element: Signal<any>;
49
- /** The ARIA role for the row. */
50
- readonly role: _angular_core.InputSignal<"row" | "rowheader">;
51
109
  /** The index of this row within the grid. */
52
110
  readonly rowIndex: _angular_core.InputSignal<number | undefined>;
53
111
  /** The UI pattern for the grid row. */
54
112
  readonly _pattern: GridRowPattern;
55
113
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridRow, never>;
56
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridRow, "[ngGridRow]", ["ngGridRow"], { "role": { "alias": "role"; "required": false; "isSignal": true; }; "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; }, {}, ["_cells"], never, true, never>;
114
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridRow, "[ngGridRow]", ["ngGridRow"], { "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; }, {}, ["_cells"], never, true, never>;
57
115
  }
58
- /** A directive that represents a cell in a grid. */
116
+ /**
117
+ * Represents a cell within a grid row. It is the primary focusable element
118
+ * within the grid. It can be disabled and can have its selection state managed
119
+ * through the `selected` input.
120
+ *
121
+ * ```html
122
+ * <td ngGridCell [disabled]="isDisabled" [(selected)]="isSelected">
123
+ * Cell Content
124
+ * </td>
125
+ * ```
126
+ *
127
+ * @developerPreview 21.0
128
+ */
59
129
  declare class GridCell {
60
130
  /** A reference to the host element. */
61
131
  private readonly _elementRef;
62
- /** The widget contained within this cell, if any. */
132
+ /** A reference to the host element. */
133
+ readonly element: HTMLElement;
134
+ /** Whether the cell is currently active (focused). */
135
+ readonly active: Signal<boolean>;
136
+ /** The widgets contained within this cell, if any. */
63
137
  private readonly _widgets;
64
138
  /** The UI pattern for the widget in this cell. */
65
- private readonly _widgetPattern;
139
+ private readonly _widgetPatterns;
66
140
  /** The parent row. */
67
141
  private readonly _row;
142
+ /** Text direction. */
143
+ readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
68
144
  /** A unique identifier for the cell. */
69
- private readonly _id;
70
- /** The host native element. */
71
- readonly element: Signal<any>;
145
+ readonly id: _angular_core.InputSignal<string>;
72
146
  /** The ARIA role for the cell. */
73
- readonly role: _angular_core.InputSignal<"gridcell" | "columnheader">;
147
+ readonly role: _angular_core.InputSignal<"gridcell" | "columnheader" | "rowheader">;
74
148
  /** The number of rows the cell should span. */
75
149
  readonly rowSpan: _angular_core.InputSignal<number>;
76
150
  /** The number of columns the cell should span. */
@@ -85,27 +159,80 @@ declare class GridCell {
85
159
  readonly selected: _angular_core.ModelSignal<boolean>;
86
160
  /** Whether the cell is selectable. */
87
161
  readonly selectable: _angular_core.InputSignal<boolean>;
162
+ /** Orientation of the widgets in the cell. */
163
+ readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
164
+ /** Whether widgets navigation wraps. */
165
+ readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
166
+ /** The tabindex override. */
167
+ readonly tabindex: _angular_core.InputSignal<number | undefined>;
168
+ /**
169
+ * The tabindex value set to the element.
170
+ * If a focus target exists then return -1. Unless an override.
171
+ */
172
+ protected readonly _tabIndex: Signal<number>;
88
173
  /** The UI pattern for the grid cell. */
89
174
  readonly _pattern: GridCellPattern;
175
+ constructor();
176
+ /** Gets the cell widget pattern for a given element. */
177
+ private _getWidget;
90
178
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridCell, never>;
91
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridCell, "[ngGridCell]", ["ngGridCell"], { "role": { "alias": "role"; "required": false; "isSignal": true; }; "rowSpan": { "alias": "rowSpan"; "required": false; "isSignal": true; }; "colSpan": { "alias": "colSpan"; "required": false; "isSignal": true; }; "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; "colIndex": { "alias": "colIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["_widgets"], never, true, never>;
179
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridCell, "[ngGridCell]", ["ngGridCell"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "rowSpan": { "alias": "rowSpan"; "required": false; "isSignal": true; }; "colSpan": { "alias": "colSpan"; "required": false; "isSignal": true; }; "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; "colIndex": { "alias": "colIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["_widgets"], never, true, never>;
92
180
  }
93
- /** A directive that represents a widget inside a grid cell. */
181
+ /**
182
+ * Represents an interactive element inside a `GridCell`. It allows for pausing grid navigation to
183
+ * interact with the widget.
184
+ *
185
+ * When the user interacts with the widget (e.g., by typing in an input or opening a menu), grid
186
+ * navigation is temporarily suspended to allow the widget to handle keyboard
187
+ * events.
188
+ *
189
+ * ```html
190
+ * <td ngGridCell>
191
+ * <button ngGridCellWidget>Click Me</button>
192
+ * </td>
193
+ * ```
194
+ *
195
+ * @developerPreview 21.0
196
+ */
94
197
  declare class GridCellWidget {
95
198
  /** A reference to the host element. */
96
199
  private readonly _elementRef;
200
+ /** A reference to the host element. */
201
+ readonly element: HTMLElement;
202
+ /** Whether the widget is currently active (focused). */
203
+ readonly active: Signal<boolean>;
97
204
  /** The parent cell. */
98
205
  private readonly _cell;
99
- /** The host native element. */
100
- readonly element: Signal<any>;
101
- /** Whether the widget is activated and the grid navigation should be paused. */
102
- readonly activate: _angular_core.ModelSignal<boolean>;
206
+ /** A unique identifier for the widget. */
207
+ readonly id: _angular_core.InputSignal<string>;
208
+ /** The type of widget, which determines how it is activated. */
209
+ readonly widgetType: _angular_core.InputSignal<"simple" | "complex" | "editable">;
210
+ /** Whether the widget is disabled. */
211
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
212
+ /** The target that will receive focus instead of the widget. */
213
+ readonly focusTarget: _angular_core.InputSignal<ElementRef<any> | HTMLElement | undefined>;
214
+ /** Emits when the widget is activated. */
215
+ readonly onActivate: _angular_core.OutputEmitterRef<KeyboardEvent | FocusEvent | undefined>;
216
+ /** Emits when the widget is deactivated. */
217
+ readonly onDeactivate: _angular_core.OutputEmitterRef<KeyboardEvent | FocusEvent | undefined>;
218
+ /** The tabindex override. */
219
+ readonly tabindex: _angular_core.InputSignal<number | undefined>;
220
+ /**
221
+ * The tabindex value set to the element.
222
+ * If a focus target exists then return -1. Unless an override.
223
+ */
224
+ protected readonly _tabIndex: Signal<number>;
103
225
  /** The UI pattern for the grid cell widget. */
104
226
  readonly _pattern: GridCellWidgetPattern;
105
- /** Focuses the widget. */
106
- focus(): void;
227
+ /** Whether the widget is activated. */
228
+ get isActivated(): Signal<boolean>;
229
+ constructor();
230
+ /** Activates the widget. */
231
+ activate(): void;
232
+ /** Deactivates the widget. */
233
+ deactivate(): void;
107
234
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridCellWidget, never>;
108
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridCellWidget, "[ngGridCellWidget]", ["ngGridCellWidget"], { "activate": { "alias": "activate"; "required": false; "isSignal": true; }; }, { "activate": "activateChange"; }, never, never, true, never>;
235
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridCellWidget, "[ngGridCellWidget]", ["ngGridCellWidget"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "widgetType": { "alias": "widgetType"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "focusTarget": { "alias": "focusTarget"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "onActivate": "onActivate"; "onDeactivate": "onDeactivate"; }, never, never, true, never>;
109
236
  }
110
237
 
111
238
  export { Grid, GridCell, GridCellWidget, GridRow };
@@ -2,31 +2,35 @@ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { OptionPattern, ListboxPattern } from '@angular/aria/private';
4
4
  import { ComboboxPopup } from './combobox.js';
5
- import '@angular/aria/deferred-content';
6
5
 
7
6
  /**
8
- * A listbox container.
7
+ * Represents a container used to display a list of items for a user to select from.
9
8
  *
10
- * Listboxes are used to display a list of items for a user to select from. The Listbox is meant
11
- * to be used in conjunction with Option as follows:
9
+ * The `ngListbox` is meant to be used in conjunction with `ngOption` directives to create a
10
+ * selectable list. It supports single and multiple selection modes, as well as various focus and
11
+ * orientation strategies.
12
12
  *
13
13
  * ```html
14
- * <ul ngListbox>
15
- * <li [value]="1" ngOption>Item 1</li>
16
- * <li [value]="2" ngOption>Item 2</li>
17
- * <li [value]="3" ngOption>Item 3</li>
14
+ * <ul ngListbox [(value)]="selectedItems" [multi]="true" orientation="vertical">
15
+ * @for (item of items; track item.id) {
16
+ * <li ngOption [value]="item.id" [label]="item.name" [disabled]="item.disabled">
17
+ * {{item.name}}
18
+ * </li>
19
+ * }
18
20
  * </ul>
19
21
  * ```
22
+ *
23
+ * @developerPreview 21.0
20
24
  */
21
25
  declare class Listbox<V> {
22
26
  /** A unique identifier for the listbox. */
23
- private readonly _generatedId;
24
- /** A unique identifier for the listbox. */
25
- protected id: _angular_core.Signal<string>;
27
+ readonly id: _angular_core.InputSignal<string>;
26
28
  /** A reference to the parent combobox popup, if one exists. */
27
29
  private readonly _popup;
28
- /** A reference to the listbox element. */
30
+ /** A reference to the host element. */
29
31
  private readonly _elementRef;
32
+ /** A reference to the host element. */
33
+ readonly element: HTMLElement;
30
34
  /** The directionality (LTR / RTL) context for the application (or a subtree of it). */
31
35
  private readonly _directionality;
32
36
  /** The Options nested inside of the Listbox. */
@@ -41,11 +45,22 @@ declare class Listbox<V> {
41
45
  multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
42
46
  /** Whether focus should wrap when navigating. */
43
47
  wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
44
- /** Whether disabled items in the list should be skipped when navigating. */
45
- skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
46
- /** The focus strategy used by the list. */
48
+ /**
49
+ * Whether to allow disabled items to receive focus. When `true`, disabled items are
50
+ * focusable but not interactive. When `false`, disabled items are skipped during navigation.
51
+ */
52
+ softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
53
+ /**
54
+ * The focus strategy used by the list.
55
+ * - `roving`: Focus is moved to the active item using `tabindex`.
56
+ * - `activedescendant`: Focus remains on the listbox container, and `aria-activedescendant` is used to indicate the active item.
57
+ */
47
58
  focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
48
- /** The selection strategy used by the list. */
59
+ /**
60
+ * The selection strategy used by the list.
61
+ * - `follow`: The focused item is automatically selected.
62
+ * - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).
63
+ */
49
64
  selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
50
65
  /** The amount of time before the typeahead search is reset. */
51
66
  typeaheadDelay: _angular_core.InputSignal<number>;
@@ -53,8 +68,8 @@ declare class Listbox<V> {
53
68
  disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
54
69
  /** Whether the listbox is readonly. */
55
70
  readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
56
- /** The values of the current selected items. */
57
- value: _angular_core.ModelSignal<V[]>;
71
+ /** The values of the currently selected items. */
72
+ values: _angular_core.ModelSignal<V[]>;
58
73
  /** The Listbox UIPattern. */
59
74
  readonly _pattern: ListboxPattern<V>;
60
75
  /** Whether the listbox has received focus yet. */
@@ -62,25 +77,41 @@ declare class Listbox<V> {
62
77
  constructor();
63
78
  onFocus(): void;
64
79
  scrollActiveItemIntoView(options?: ScrollIntoViewOptions): void;
80
+ /** Navigates to the first item in the listbox. */
81
+ gotoFirst(): void;
65
82
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Listbox<any>, never>;
66
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Listbox<any>, "[ngListbox]", ["ngListbox"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["_options"], never, true, [{ directive: typeof ComboboxPopup; inputs: {}; outputs: {}; }]>;
83
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Listbox<any>, "[ngListbox]", ["ngListbox"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "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; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; }, { "values": "valuesChange"; }, ["_options"], never, true, [{ directive: typeof ComboboxPopup; inputs: {}; outputs: {}; }]>;
67
84
  }
68
- /** A selectable option in a Listbox. */
85
+ /**
86
+ * A selectable option in an `ngListbox`.
87
+ *
88
+ * This directive should be applied to an element (e.g., `<li>`, `<div>`) within an
89
+ * `ngListbox`. The `value` input is used to identify the option, and the `label` input provides
90
+ * the accessible name for the option.
91
+ *
92
+ * ```html
93
+ * <li ngOption value="item-id" label="Item Name">
94
+ * Item Name
95
+ * </li>
96
+ * ```
97
+ *
98
+ * @developerPreview 21.0
99
+ */
69
100
  declare class Option<V> {
70
- /** A reference to the option element. */
101
+ /** A reference to the host element. */
71
102
  private readonly _elementRef;
103
+ /** A reference to the host element. */
104
+ readonly element: HTMLElement;
105
+ /** Whether the option is currently active (focused). */
106
+ active: _angular_core.Signal<boolean>;
72
107
  /** The parent Listbox. */
73
108
  private readonly _listbox;
74
109
  /** A unique identifier for the option. */
75
- private readonly _generatedId;
76
- /** A unique identifier for the option. */
77
- protected id: _angular_core.Signal<string>;
110
+ readonly id: _angular_core.InputSignal<string>;
78
111
  /** The text used by the typeahead search. */
79
- protected searchTerm: _angular_core.Signal<any>;
112
+ protected searchTerm: _angular_core.Signal<string>;
80
113
  /** The parent Listbox UIPattern. */
81
114
  protected listbox: _angular_core.Signal<ListboxPattern<any>>;
82
- /** A reference to the option element to be focused on navigation. */
83
- protected element: _angular_core.Signal<any>;
84
115
  /** The value of the option. */
85
116
  value: _angular_core.InputSignal<V>;
86
117
  /** Whether an item is disabled. */
@@ -92,7 +123,7 @@ declare class Option<V> {
92
123
  /** The Option UIPattern. */
93
124
  readonly _pattern: OptionPattern<V>;
94
125
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Option<any>, never>;
95
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Option<any>, "[ngOption]", ["ngOption"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
126
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Option<any>, "[ngOption]", ["ngOption"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
96
127
  }
97
128
 
98
129
  export { Listbox, Option };