@angular/aria 21.0.2 → 21.0.3
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.
- package/fesm2022/_combobox-chunk.mjs +425 -0
- package/fesm2022/_combobox-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-listbox-chunk.mjs +522 -0
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-popup-chunk.mjs +46 -0
- package/fesm2022/_combobox-popup-chunk.mjs.map +1 -0
- package/fesm2022/_list-navigation-chunk.mjs +116 -0
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -0
- package/fesm2022/_pointer-event-manager-chunk.mjs +134 -0
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -0
- package/fesm2022/_widget-chunk.mjs +4 -246
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +17 -4
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +96 -120
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +225 -201
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +173 -161
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +256 -238
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +7 -932
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +182 -168
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +15 -3
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +4 -2
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_combobox-chunk.d.ts +98 -0
- package/types/_combobox-chunk.d2.ts +193 -0
- package/types/_grid-chunk.d.ts +3 -210
- package/types/_list-chunk.d.ts +212 -0
- package/types/_list-navigation-chunk.d.ts +212 -0
- package/types/_listbox-chunk.d.ts +106 -0
- package/types/accordion.d.ts +52 -49
- package/types/combobox.d.ts +25 -111
- package/types/grid.d.ts +37 -32
- package/types/listbox.d.ts +8 -5
- package/types/menu.d.ts +113 -113
- package/types/private.d.ts +10 -498
- package/types/tabs.d.ts +89 -84
- package/types/toolbar.d.ts +69 -66
- package/types/tree.d.ts +106 -103
- package/_adev_assets/aria-accordion.json +0 -743
- package/_adev_assets/aria-combobox.json +0 -603
- package/_adev_assets/aria-grid.json +0 -893
- package/_adev_assets/aria-listbox.json +0 -540
- package/_adev_assets/aria-menu.json +0 -1049
- package/_adev_assets/aria-tabs.json +0 -880
- package/_adev_assets/aria-toolbar.json +0 -545
- package/_adev_assets/aria-tree.json +0 -853
package/types/private.d.ts
CHANGED
|
@@ -1,501 +1,13 @@
|
|
|
1
|
+
import { ComboboxPattern, ComboboxListboxControls, ComboboxTreeControls } from './_combobox-chunk.d2.ts';
|
|
2
|
+
export { ComboboxDialogPattern, ComboboxInputs } from './_combobox-chunk.d2.ts';
|
|
3
|
+
import { ListboxInputs, OptionPattern, ListboxPattern } from './_listbox-chunk.js';
|
|
4
|
+
export { OptionInputs } from './_listbox-chunk.js';
|
|
1
5
|
import * as _angular_core from '@angular/core';
|
|
2
6
|
import { Signal, WritableSignal, OnDestroy } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
interface ListSelectionItem<V> extends ListFocusItem {
|
|
8
|
-
/** The value of the item. */
|
|
9
|
-
value: SignalLike<V>;
|
|
10
|
-
/** Whether the item is selectable. */
|
|
11
|
-
selectable: SignalLike<boolean>;
|
|
12
|
-
}
|
|
13
|
-
/** Represents the required inputs for a collection that contains selectable items. */
|
|
14
|
-
interface ListSelectionInputs<T extends ListSelectionItem<V>, V> extends ListFocusInputs<T> {
|
|
15
|
-
/** Whether multiple items in the list can be selected at once. */
|
|
16
|
-
multi: SignalLike<boolean>;
|
|
17
|
-
/** The current value of the list selection. */
|
|
18
|
-
values: WritableSignalLike<V[]>;
|
|
19
|
-
/** The selection strategy used by the list. */
|
|
20
|
-
selectionMode: SignalLike<'follow' | 'explicit'>;
|
|
21
|
-
}
|
|
22
|
-
/** Controls selection for a list of items. */
|
|
23
|
-
declare class ListSelection<T extends ListSelectionItem<V>, V> {
|
|
24
|
-
readonly inputs: ListSelectionInputs<T, V> & {
|
|
25
|
-
focusManager: ListFocus<T>;
|
|
26
|
-
};
|
|
27
|
-
/** The start index to use for range selection. */
|
|
28
|
-
rangeStartIndex: _angular_core.WritableSignal<number>;
|
|
29
|
-
/** The end index to use for range selection. */
|
|
30
|
-
rangeEndIndex: _angular_core.WritableSignal<number>;
|
|
31
|
-
/** The currently selected items. */
|
|
32
|
-
selectedItems: _angular_core.Signal<T[]>;
|
|
33
|
-
constructor(inputs: ListSelectionInputs<T, V> & {
|
|
34
|
-
focusManager: ListFocus<T>;
|
|
35
|
-
});
|
|
36
|
-
/** Selects the item at the current active index. */
|
|
37
|
-
select(item?: ListSelectionItem<V>, opts?: {
|
|
38
|
-
anchor: boolean;
|
|
39
|
-
}): void;
|
|
40
|
-
/** Deselects the item at the current active index. */
|
|
41
|
-
deselect(item?: ListSelectionItem<V>): void;
|
|
42
|
-
/** Toggles the item at the current active index. */
|
|
43
|
-
toggle(item?: ListSelectionItem<V>): void;
|
|
44
|
-
/** Toggles only the item at the current active index. */
|
|
45
|
-
toggleOne(): void;
|
|
46
|
-
/** Selects all items in the list. */
|
|
47
|
-
selectAll(): void;
|
|
48
|
-
/** Deselects all items in the list. */
|
|
49
|
-
deselectAll(): void;
|
|
50
|
-
/**
|
|
51
|
-
* Selects all items in the list or deselects all
|
|
52
|
-
* items in the list if all items are already selected.
|
|
53
|
-
*/
|
|
54
|
-
toggleAll(): void;
|
|
55
|
-
/** Sets the selection to only the current active item. */
|
|
56
|
-
selectOne(): void;
|
|
57
|
-
/**
|
|
58
|
-
* Selects all items in the list up to the anchor item.
|
|
59
|
-
*
|
|
60
|
-
* Deselects all items that were previously within the
|
|
61
|
-
* selected range that are now outside of the selected range
|
|
62
|
-
*/
|
|
63
|
-
selectRange(opts?: {
|
|
64
|
-
anchor: boolean;
|
|
65
|
-
}): void;
|
|
66
|
-
/** Marks the given index as the start of a range selection. */
|
|
67
|
-
beginRangeSelection(index?: number): void;
|
|
68
|
-
/** Returns the items in the list starting from the given index. */
|
|
69
|
-
private _getItemsFromIndex;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Represents an item in a collection, such as a listbox option, than can be navigated to by
|
|
74
|
-
* typeahead.
|
|
75
|
-
*/
|
|
76
|
-
interface ListTypeaheadItem extends ListFocusItem {
|
|
77
|
-
/** The text used by the typeahead search. */
|
|
78
|
-
searchTerm: SignalLike<string>;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Represents the required inputs for a collection that contains items that can be navigated to by
|
|
82
|
-
* typeahead.
|
|
83
|
-
*/
|
|
84
|
-
interface ListTypeaheadInputs<T extends ListTypeaheadItem> extends ListFocusInputs<T> {
|
|
85
|
-
/** The amount of time before the typeahead search is reset. */
|
|
86
|
-
typeaheadDelay: SignalLike<number>;
|
|
87
|
-
}
|
|
88
|
-
/** Controls typeahead for a list of items. */
|
|
89
|
-
declare class ListTypeahead<T extends ListTypeaheadItem> {
|
|
90
|
-
readonly inputs: ListTypeaheadInputs<T> & {
|
|
91
|
-
focusManager: ListFocus<T>;
|
|
92
|
-
};
|
|
93
|
-
/** A reference to the timeout for resetting the typeahead search. */
|
|
94
|
-
timeout?: ReturnType<typeof setTimeout> | undefined;
|
|
95
|
-
/** The focus controller of the parent list. */
|
|
96
|
-
focusManager: ListFocus<T>;
|
|
97
|
-
/** Whether the user is actively typing a typeahead search query. */
|
|
98
|
-
isTyping: _angular_core.Signal<boolean>;
|
|
99
|
-
/** Keeps track of the characters that typeahead search is being called with. */
|
|
100
|
-
private _query;
|
|
101
|
-
/** The index where that the typeahead search was initiated from. */
|
|
102
|
-
private _startIndex;
|
|
103
|
-
constructor(inputs: ListTypeaheadInputs<T> & {
|
|
104
|
-
focusManager: ListFocus<T>;
|
|
105
|
-
});
|
|
106
|
-
/** Performs a typeahead search, appending the given character to the search string. */
|
|
107
|
-
search(char: string): boolean;
|
|
108
|
-
/**
|
|
109
|
-
* Returns the first item whose search term matches the
|
|
110
|
-
* current query starting from the the current anchor index.
|
|
111
|
-
*/
|
|
112
|
-
private _getItem;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/** The operations that the list can perform after navigation. */
|
|
116
|
-
interface NavOptions {
|
|
117
|
-
toggle?: boolean;
|
|
118
|
-
select?: boolean;
|
|
119
|
-
selectOne?: boolean;
|
|
120
|
-
selectRange?: boolean;
|
|
121
|
-
anchor?: boolean;
|
|
122
|
-
focusElement?: boolean;
|
|
123
|
-
}
|
|
124
|
-
/** Represents an item in the list. */
|
|
125
|
-
type ListItem<V> = ListTypeaheadItem & ListNavigationItem & ListSelectionItem<V> & ListFocusItem;
|
|
126
|
-
/** The necessary inputs for the list behavior. */
|
|
127
|
-
type ListInputs<T extends ListItem<V>, V> = ListFocusInputs<T> & ListNavigationInputs<T> & ListSelectionInputs<T, V> & ListTypeaheadInputs<T>;
|
|
128
|
-
/** Controls the state of a list. */
|
|
129
|
-
declare class List<T extends ListItem<V>, V> {
|
|
130
|
-
readonly inputs: ListInputs<T, V>;
|
|
131
|
-
/** Controls navigation for the list. */
|
|
132
|
-
navigationBehavior: ListNavigation<T>;
|
|
133
|
-
/** Controls selection for the list. */
|
|
134
|
-
selectionBehavior: ListSelection<T, V>;
|
|
135
|
-
/** Controls typeahead for the list. */
|
|
136
|
-
typeaheadBehavior: ListTypeahead<T>;
|
|
137
|
-
/** Controls focus for the list. */
|
|
138
|
-
focusBehavior: ListFocus<T>;
|
|
139
|
-
/** Whether the list is disabled. */
|
|
140
|
-
disabled: _angular_core.Signal<boolean>;
|
|
141
|
-
/** The id of the current active item. */
|
|
142
|
-
activeDescendant: _angular_core.Signal<string | undefined>;
|
|
143
|
-
/** The tab index of the list. */
|
|
144
|
-
tabIndex: _angular_core.Signal<0 | -1>;
|
|
145
|
-
/** The index of the currently active item in the list. */
|
|
146
|
-
activeIndex: _angular_core.Signal<number>;
|
|
147
|
-
/**
|
|
148
|
-
* The uncommitted index for selecting a range of options.
|
|
149
|
-
*
|
|
150
|
-
* NOTE: This is subtly distinct from the "rangeStartIndex" in the ListSelection behavior.
|
|
151
|
-
* The anchorIndex does not necessarily represent the start of a range, but represents the most
|
|
152
|
-
* recent index where the user showed intent to begin a range selection. Usually, this is wherever
|
|
153
|
-
* the user most recently pressed the "Shift" key, but if the user presses shift + space to select
|
|
154
|
-
* from the anchor, the user is not intending to start a new range from this index.
|
|
155
|
-
*
|
|
156
|
-
* In other words, "rangeStartIndex" is only set when a user commits to starting a range selection
|
|
157
|
-
* while "anchorIndex" is set whenever a user indicates they may be starting a range selection.
|
|
158
|
-
*/
|
|
159
|
-
private _anchorIndex;
|
|
160
|
-
/** Whether the list should wrap. Used to disable wrapping while range selecting. */
|
|
161
|
-
private _wrap;
|
|
162
|
-
constructor(inputs: ListInputs<T, V>);
|
|
163
|
-
/** Returns the tab index for the given item. */
|
|
164
|
-
getItemTabindex(item: T): 0 | -1;
|
|
165
|
-
/** Navigates to the first option in the list. */
|
|
166
|
-
first(opts?: NavOptions): void;
|
|
167
|
-
/** Navigates to the last option in the list. */
|
|
168
|
-
last(opts?: NavOptions): void;
|
|
169
|
-
/** Navigates to the next option in the list. */
|
|
170
|
-
next(opts?: NavOptions): void;
|
|
171
|
-
/** Navigates to the previous option in the list. */
|
|
172
|
-
prev(opts?: NavOptions): void;
|
|
173
|
-
/** Navigates to the given item in the list. */
|
|
174
|
-
goto(item: T, opts?: NavOptions): void;
|
|
175
|
-
/** Removes focus from the list. */
|
|
176
|
-
unfocus(): void;
|
|
177
|
-
/** Marks the given index as the potential start of a range selection. */
|
|
178
|
-
anchor(index: number): void;
|
|
179
|
-
/** Handles typeahead search navigation for the list. */
|
|
180
|
-
search(char: string, opts?: NavOptions): void;
|
|
181
|
-
/** Checks if the list is currently typing for typeahead search. */
|
|
182
|
-
isTyping(): boolean;
|
|
183
|
-
/** Selects the currently active item in the list. */
|
|
184
|
-
select(item?: T): void;
|
|
185
|
-
/** Sets the selection to only the current active item. */
|
|
186
|
-
selectOne(): void;
|
|
187
|
-
/** Deselects the currently active item in the list. */
|
|
188
|
-
deselect(item?: T): void;
|
|
189
|
-
/** Deselects all items in the list. */
|
|
190
|
-
deselectAll(): void;
|
|
191
|
-
/** Toggles the currently active item in the list. */
|
|
192
|
-
toggle(item?: T): void;
|
|
193
|
-
/** Toggles the currently active item in the list, deselecting all other items. */
|
|
194
|
-
toggleOne(): void;
|
|
195
|
-
/** Toggles the selection of all items in the list. */
|
|
196
|
-
toggleAll(): void;
|
|
197
|
-
/** Checks if the given item is able to receive focus. */
|
|
198
|
-
isFocusable(item: T): boolean;
|
|
199
|
-
/** Handles updating selection for the list. */
|
|
200
|
-
updateSelection(opts?: NavOptions): void;
|
|
201
|
-
/**
|
|
202
|
-
* Safely performs a navigation operation.
|
|
203
|
-
*
|
|
204
|
-
* Handles conditionally disabling wrapping for when a navigation
|
|
205
|
-
* operation is occurring while the user is selecting a range of options.
|
|
206
|
-
*
|
|
207
|
-
* Handles boilerplate calling of focus & selection operations. Also ensures these
|
|
208
|
-
* additional operations are only called if the navigation operation moved focus to a new option.
|
|
209
|
-
*/
|
|
210
|
-
private _navigate;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/** Represents the required inputs for a combobox. */
|
|
214
|
-
interface ComboboxInputs<T extends ListItem<V>, V> {
|
|
215
|
-
/** The controls for the popup associated with the combobox. */
|
|
216
|
-
popupControls: SignalLike<ComboboxListboxControls<T, V> | ComboboxTreeControls<T, V> | ComboboxDialogPattern | undefined>;
|
|
217
|
-
/** The HTML input element that serves as the combobox input. */
|
|
218
|
-
inputEl: SignalLike<HTMLInputElement | undefined>;
|
|
219
|
-
/** The HTML element that serves as the combobox container. */
|
|
220
|
-
containerEl: SignalLike<HTMLElement | undefined>;
|
|
221
|
-
/** The filtering mode for the combobox. */
|
|
222
|
-
filterMode: SignalLike<'manual' | 'auto-select' | 'highlight'>;
|
|
223
|
-
/** The current value of the combobox. */
|
|
224
|
-
inputValue?: WritableSignalLike<string>;
|
|
225
|
-
/** The value of the first matching item in the popup. */
|
|
226
|
-
firstMatch: SignalLike<V | undefined>;
|
|
227
|
-
/** Whether the combobox is disabled. */
|
|
228
|
-
disabled: SignalLike<boolean>;
|
|
229
|
-
/** Whether the combobox is read-only. */
|
|
230
|
-
readonly: SignalLike<boolean>;
|
|
231
|
-
/** Whether the combobox is in a right-to-left context. */
|
|
232
|
-
textDirection: SignalLike<'rtl' | 'ltr'>;
|
|
233
|
-
/** Whether the combobox is always expanded. */
|
|
234
|
-
alwaysExpanded: SignalLike<boolean>;
|
|
235
|
-
}
|
|
236
|
-
/** An interface that allows combobox popups to expose the necessary controls for the combobox. */
|
|
237
|
-
interface ComboboxListboxControls<T extends ListItem<V>, V> {
|
|
238
|
-
/** A unique identifier for the popup. */
|
|
239
|
-
id: () => string;
|
|
240
|
-
/** The ARIA role for the popup. */
|
|
241
|
-
role: SignalLike<'listbox' | 'tree' | 'grid'>;
|
|
242
|
-
/** Whether multiple items in the popup can be selected at once. */
|
|
243
|
-
multi: SignalLike<boolean>;
|
|
244
|
-
/** The ID of the active item in the popup. */
|
|
245
|
-
activeId: SignalLike<string | undefined>;
|
|
246
|
-
/** The list of items in the popup. */
|
|
247
|
-
items: SignalLike<T[]>;
|
|
248
|
-
/** Navigates to the given item in the popup. */
|
|
249
|
-
focus: (item: T, opts?: {
|
|
250
|
-
focusElement?: boolean;
|
|
251
|
-
}) => void;
|
|
252
|
-
/** Navigates to the next item in the popup. */
|
|
253
|
-
next: () => void;
|
|
254
|
-
/** Navigates to the previous item in the popup. */
|
|
255
|
-
prev: () => void;
|
|
256
|
-
/** Navigates to the first item in the popup. */
|
|
257
|
-
first: () => void;
|
|
258
|
-
/** Navigates to the last item in the popup. */
|
|
259
|
-
last: () => void;
|
|
260
|
-
/** Selects the current item in the popup. */
|
|
261
|
-
select: (item?: T) => void;
|
|
262
|
-
/** Toggles the selection state of the given item in the popup. */
|
|
263
|
-
toggle: (item?: T) => void;
|
|
264
|
-
/** Clears the selection state of the popup. */
|
|
265
|
-
clearSelection: () => void;
|
|
266
|
-
/** Removes focus from any item in the popup. */
|
|
267
|
-
unfocus: () => void;
|
|
268
|
-
/** Returns the item corresponding to the given event. */
|
|
269
|
-
getItem: (e: PointerEvent) => T | undefined;
|
|
270
|
-
/** Returns the currently active (focused) item in the popup. */
|
|
271
|
-
getActiveItem: () => T | undefined;
|
|
272
|
-
/** Returns the currently selected items in the popup. */
|
|
273
|
-
getSelectedItems: () => T[];
|
|
274
|
-
/** Sets the value of the combobox based on the selected item. */
|
|
275
|
-
setValue: (value: V | undefined) => void;
|
|
276
|
-
}
|
|
277
|
-
interface ComboboxTreeControls<T extends ListItem<V>, V> extends ComboboxListboxControls<T, V> {
|
|
278
|
-
/** Whether the currently active item in the popup is collapsible. */
|
|
279
|
-
isItemCollapsible: () => boolean;
|
|
280
|
-
/** Expands the currently active item in the popup. */
|
|
281
|
-
expandItem: () => void;
|
|
282
|
-
/** Collapses the currently active item in the popup. */
|
|
283
|
-
collapseItem: () => void;
|
|
284
|
-
/** Checks if the currently active item in the popup is expandable. */
|
|
285
|
-
isItemExpandable: (item?: T) => boolean;
|
|
286
|
-
/** Expands all nodes in the tree. */
|
|
287
|
-
expandAll: () => void;
|
|
288
|
-
/** Collapses all nodes in the tree. */
|
|
289
|
-
collapseAll: () => void;
|
|
290
|
-
/** Toggles the expansion state of the currently active item in the popup. */
|
|
291
|
-
toggleExpansion: (item?: T) => void;
|
|
292
|
-
/** Whether the current active item is selectable. */
|
|
293
|
-
isItemSelectable: (item?: T) => boolean;
|
|
294
|
-
}
|
|
295
|
-
/** Controls the state of a combobox. */
|
|
296
|
-
declare class ComboboxPattern<T extends ListItem<V>, V> {
|
|
297
|
-
readonly inputs: ComboboxInputs<T, V>;
|
|
298
|
-
/** Whether the combobox is expanded. */
|
|
299
|
-
expanded: _angular_core.WritableSignal<boolean>;
|
|
300
|
-
/** Whether the combobox is disabled. */
|
|
301
|
-
disabled: () => boolean;
|
|
302
|
-
/** The ID of the active item in the combobox. */
|
|
303
|
-
activeDescendant: _angular_core.Signal<string | null>;
|
|
304
|
-
/** The currently highlighted item in the combobox. */
|
|
305
|
-
highlightedItem: _angular_core.WritableSignal<T | undefined>;
|
|
306
|
-
/** Whether the most recent input event was a deletion. */
|
|
307
|
-
isDeleting: boolean;
|
|
308
|
-
/** Whether the combobox is focused. */
|
|
309
|
-
isFocused: _angular_core.WritableSignal<boolean>;
|
|
310
|
-
/** Whether the combobox has ever been focused. */
|
|
311
|
-
hasBeenFocused: _angular_core.WritableSignal<boolean>;
|
|
312
|
-
/** The key used to navigate to the previous item in the list. */
|
|
313
|
-
expandKey: _angular_core.Signal<"ArrowLeft" | "ArrowRight">;
|
|
314
|
-
/** The key used to navigate to the next item in the list. */
|
|
315
|
-
collapseKey: _angular_core.Signal<"ArrowLeft" | "ArrowRight">;
|
|
316
|
-
/** The ID of the popup associated with the combobox. */
|
|
317
|
-
popupId: _angular_core.Signal<string | null>;
|
|
318
|
-
/** The autocomplete behavior of the combobox. */
|
|
319
|
-
autocomplete: _angular_core.Signal<"both" | "list">;
|
|
320
|
-
/** The ARIA role of the popup associated with the combobox. */
|
|
321
|
-
hasPopup: _angular_core.Signal<"listbox" | "tree" | "grid" | "dialog" | null>;
|
|
322
|
-
/** Whether the combobox is read-only. */
|
|
323
|
-
readonly: _angular_core.Signal<true | null>;
|
|
324
|
-
/** Returns the listbox controls for the combobox. */
|
|
325
|
-
listControls: () => ComboboxListboxControls<T, V> | null | undefined;
|
|
326
|
-
/** Returns the tree controls for the combobox. */
|
|
327
|
-
treeControls: () => ComboboxTreeControls<T, V> | null;
|
|
328
|
-
/** The keydown event manager for the combobox. */
|
|
329
|
-
keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
330
|
-
/** The click event manager for the combobox. */
|
|
331
|
-
click: _angular_core.Signal<PointerEventManager<PointerEvent>>;
|
|
332
|
-
constructor(inputs: ComboboxInputs<T, V>);
|
|
333
|
-
/** Handles keydown events for the combobox. */
|
|
334
|
-
onKeydown(event: KeyboardEvent): void;
|
|
335
|
-
/** Handles click events for the combobox. */
|
|
336
|
-
onClick(event: MouseEvent): void;
|
|
337
|
-
/** Handles input events for the combobox. */
|
|
338
|
-
onInput(event: Event): void;
|
|
339
|
-
/** Handles focus in events for the combobox. */
|
|
340
|
-
onFocusIn(): void;
|
|
341
|
-
/** Handles focus out events for the combobox. */
|
|
342
|
-
onFocusOut(event: FocusEvent): void;
|
|
343
|
-
/** The first matching item in the combobox. */
|
|
344
|
-
firstMatch: _angular_core.Signal<T | undefined>;
|
|
345
|
-
/** Handles filtering logic for the combobox. */
|
|
346
|
-
onFilter(): void;
|
|
347
|
-
/** Highlights the currently selected item in the combobox. */
|
|
348
|
-
highlight(): void;
|
|
349
|
-
/** Closes the combobox. */
|
|
350
|
-
close(opts?: {
|
|
351
|
-
reset: boolean;
|
|
352
|
-
}): void;
|
|
353
|
-
/** Opens the combobox. */
|
|
354
|
-
open(nav?: {
|
|
355
|
-
first?: boolean;
|
|
356
|
-
last?: boolean;
|
|
357
|
-
selected?: boolean;
|
|
358
|
-
}): void;
|
|
359
|
-
/** Navigates to the next focusable item in the combobox popup. */
|
|
360
|
-
next(): void;
|
|
361
|
-
/** Navigates to the previous focusable item in the combobox popup. */
|
|
362
|
-
prev(): void;
|
|
363
|
-
/** Navigates to the first focusable item in the combobox popup. */
|
|
364
|
-
first(): void;
|
|
365
|
-
/** Navigates to the last focusable item in the combobox popup. */
|
|
366
|
-
last(): void;
|
|
367
|
-
/** Collapses the currently focused item in the combobox. */
|
|
368
|
-
collapseItem(): void;
|
|
369
|
-
/** Expands the currently focused item in the combobox. */
|
|
370
|
-
expandItem(): void;
|
|
371
|
-
/** Selects an item in the combobox popup. */
|
|
372
|
-
select(opts?: {
|
|
373
|
-
item?: T;
|
|
374
|
-
commit?: boolean;
|
|
375
|
-
close?: boolean;
|
|
376
|
-
}): void;
|
|
377
|
-
/** Updates the value of the input based on the currently selected item. */
|
|
378
|
-
commit(): void;
|
|
379
|
-
/** Navigates and handles additional actions based on filter mode. */
|
|
380
|
-
private _navigate;
|
|
381
|
-
}
|
|
382
|
-
declare class ComboboxDialogPattern {
|
|
383
|
-
readonly inputs: {
|
|
384
|
-
combobox: ComboboxPattern<any, any>;
|
|
385
|
-
element: SignalLike<HTMLDialogElement>;
|
|
386
|
-
id: SignalLike<string>;
|
|
387
|
-
};
|
|
388
|
-
id: () => string;
|
|
389
|
-
role: () => "dialog";
|
|
390
|
-
keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
391
|
-
constructor(inputs: {
|
|
392
|
-
combobox: ComboboxPattern<any, any>;
|
|
393
|
-
element: SignalLike<HTMLDialogElement>;
|
|
394
|
-
id: SignalLike<string>;
|
|
395
|
-
});
|
|
396
|
-
onKeydown(event: KeyboardEvent): void;
|
|
397
|
-
onClick(event: MouseEvent): void;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Represents the properties exposed by a listbox that need to be accessed by an option.
|
|
402
|
-
* This exists to avoid circular dependency errors between the listbox and option.
|
|
403
|
-
*/
|
|
404
|
-
interface ListboxPattern$1<V> {
|
|
405
|
-
inputs: ListInputs<OptionPattern<V>, V>;
|
|
406
|
-
listBehavior: List<OptionPattern<V>, V>;
|
|
407
|
-
}
|
|
408
|
-
/** Represents the required inputs for an option in a listbox. */
|
|
409
|
-
interface OptionInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
|
|
410
|
-
listbox: SignalLike<ListboxPattern$1<V> | undefined>;
|
|
411
|
-
}
|
|
412
|
-
/** Represents an option in a listbox. */
|
|
413
|
-
declare class OptionPattern<V> {
|
|
414
|
-
/** A unique identifier for the option. */
|
|
415
|
-
id: SignalLike<string>;
|
|
416
|
-
/** The value of the option. */
|
|
417
|
-
value: SignalLike<V>;
|
|
418
|
-
/** The position of the option in the list. */
|
|
419
|
-
index: _angular_core.Signal<number>;
|
|
420
|
-
/** Whether the option is active. */
|
|
421
|
-
active: _angular_core.Signal<boolean>;
|
|
422
|
-
/** Whether the option is selected. */
|
|
423
|
-
selected: _angular_core.Signal<boolean | undefined>;
|
|
424
|
-
/** Whether the option is selectable. */
|
|
425
|
-
selectable: () => boolean;
|
|
426
|
-
/** Whether the option is disabled. */
|
|
427
|
-
disabled: SignalLike<boolean>;
|
|
428
|
-
/** The text used by the typeahead search. */
|
|
429
|
-
searchTerm: SignalLike<string>;
|
|
430
|
-
/** A reference to the parent listbox. */
|
|
431
|
-
listbox: SignalLike<ListboxPattern$1<V> | undefined>;
|
|
432
|
-
/** The tab index of the option. */
|
|
433
|
-
tabIndex: _angular_core.Signal<0 | -1 | undefined>;
|
|
434
|
-
/** The html element that should receive focus. */
|
|
435
|
-
element: SignalLike<HTMLElement | undefined>;
|
|
436
|
-
constructor(args: OptionInputs<V>);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/** Represents the required inputs for a listbox. */
|
|
440
|
-
type ListboxInputs<V> = ListInputs<OptionPattern<V>, V> & {
|
|
441
|
-
/** A unique identifier for the listbox. */
|
|
442
|
-
id: SignalLike<string>;
|
|
443
|
-
/** Whether the listbox is readonly. */
|
|
444
|
-
readonly: SignalLike<boolean>;
|
|
445
|
-
};
|
|
446
|
-
/** Controls the state of a listbox. */
|
|
447
|
-
declare class ListboxPattern<V> {
|
|
448
|
-
readonly inputs: ListboxInputs<V>;
|
|
449
|
-
listBehavior: List<OptionPattern<V>, V>;
|
|
450
|
-
/** Whether the list is vertically or horizontally oriented. */
|
|
451
|
-
orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
452
|
-
/** Whether the listbox is disabled. */
|
|
453
|
-
disabled: _angular_core.Signal<boolean>;
|
|
454
|
-
/** Whether the listbox is readonly. */
|
|
455
|
-
readonly: SignalLike<boolean>;
|
|
456
|
-
/** The tab index of the listbox. */
|
|
457
|
-
tabIndex: SignalLike<-1 | 0>;
|
|
458
|
-
/** The id of the current active item. */
|
|
459
|
-
activeDescendant: _angular_core.Signal<string | undefined>;
|
|
460
|
-
/** Whether multiple items in the list can be selected at once. */
|
|
461
|
-
multi: SignalLike<boolean>;
|
|
462
|
-
/** The number of items in the listbox. */
|
|
463
|
-
setsize: _angular_core.Signal<number>;
|
|
464
|
-
/** Whether the listbox selection follows focus. */
|
|
465
|
-
followFocus: _angular_core.Signal<boolean>;
|
|
466
|
-
/** Whether the listbox should wrap. Used to disable wrapping while range selecting. */
|
|
467
|
-
wrap: _angular_core.WritableSignal<boolean>;
|
|
468
|
-
/** The key used to navigate to the previous item in the list. */
|
|
469
|
-
prevKey: _angular_core.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
|
|
470
|
-
/** The key used to navigate to the next item in the list. */
|
|
471
|
-
nextKey: _angular_core.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
|
|
472
|
-
/** Represents the space key. Does nothing when the user is actively using typeahead. */
|
|
473
|
-
dynamicSpaceKey: _angular_core.Signal<"" | " ">;
|
|
474
|
-
/** The regexp used to decide if a key should trigger typeahead. */
|
|
475
|
-
typeaheadRegexp: RegExp;
|
|
476
|
-
/** The keydown event manager for the listbox. */
|
|
477
|
-
keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
478
|
-
/** The pointerdown event manager for the listbox. */
|
|
479
|
-
pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
|
|
480
|
-
constructor(inputs: ListboxInputs<V>);
|
|
481
|
-
/** Returns a set of violations */
|
|
482
|
-
validate(): string[];
|
|
483
|
-
/** Handles keydown events for the listbox. */
|
|
484
|
-
onKeydown(event: KeyboardEvent): void;
|
|
485
|
-
onPointerdown(event: PointerEvent): void;
|
|
486
|
-
/**
|
|
487
|
-
* Sets the listbox to it's default initial state.
|
|
488
|
-
*
|
|
489
|
-
* Sets the active index of the listbox to the first focusable selected
|
|
490
|
-
* item if one exists. Otherwise, sets focus to the first focusable item.
|
|
491
|
-
*
|
|
492
|
-
* This method should be called once the listbox and it's options are properly initialized,
|
|
493
|
-
* meaning the ListboxPattern and OptionPatterns should have references to each other before this
|
|
494
|
-
* is called.
|
|
495
|
-
*/
|
|
496
|
-
setDefaultState(): void;
|
|
497
|
-
protected _getItem(e: PointerEvent): OptionPattern<V> | undefined;
|
|
498
|
-
}
|
|
7
|
+
import { SignalLike, KeyboardEventManager, WritableSignalLike, ListNavigationItem, ListNavigationInputs, ListFocus, ListNavigation, PointerEventManager, ListFocusInputs, ListFocusItem } from './_list-navigation-chunk.js';
|
|
8
|
+
export { convertGetterSetterToWritableSignalLike } from './_list-navigation-chunk.js';
|
|
9
|
+
import { ListInputs, ListItem, List } from './_list-chunk.js';
|
|
10
|
+
export { GridCellInputs, GridCellPattern, GridCellWidgetInputs, GridCellWidgetPattern, GridInputs, GridPattern, GridRowInputs, GridRowPattern } from './_grid-chunk.js';
|
|
499
11
|
|
|
500
12
|
type ComboboxListboxInputs<V> = ListboxInputs<V> & {
|
|
501
13
|
/** The combobox controlling the listbox. */
|
|
@@ -1484,5 +996,5 @@ declare class DeferredContent implements OnDestroy {
|
|
|
1484
996
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContent, never, never, {}, {}, never, never, true, never>;
|
|
1485
997
|
}
|
|
1486
998
|
|
|
1487
|
-
export { AccordionGroupPattern, AccordionPanelPattern, AccordionTriggerPattern,
|
|
1488
|
-
export type { AccordionGroupInputs, AccordionPanelInputs, AccordionTriggerInputs,
|
|
999
|
+
export { AccordionGroupPattern, AccordionPanelPattern, AccordionTriggerPattern, ComboboxListboxControls, ComboboxListboxPattern, ComboboxPattern, ComboboxTreeControls, ComboboxTreePattern, DeferredContent, DeferredContentAware, ListboxInputs, ListboxPattern, MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern, OptionPattern, SignalLike, TabListPattern, TabPanelPattern, TabPattern, ToolbarPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern, TreeItemPattern, TreePattern, WritableSignalLike };
|
|
1000
|
+
export type { AccordionGroupInputs, AccordionPanelInputs, AccordionTriggerInputs, ComboboxListboxInputs, ComboboxTreeInputs, MenuBarInputs, MenuInputs, MenuItemInputs, MenuTriggerInputs, TabInputs, TabListInputs, TabPanelInputs, ToolbarInputs, ToolbarWidgetGroupInputs, ToolbarWidgetInputs, TreeInputs, TreeItemInputs };
|