@angular/aria 22.0.0-next.3 → 22.0.0-next.5
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/_accordion-chunk.mjs +5 -5
- package/fesm2022/_accordion-chunk.mjs.map +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs +45 -0
- package/fesm2022/_click-event-manager-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-chunk.mjs +8 -8
- package/fesm2022/_combobox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-listbox-chunk.mjs +17 -7
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-tree-chunk.mjs +16 -6
- package/fesm2022/_combobox-tree-chunk.mjs.map +1 -1
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_element-chunk.mjs +6 -0
- package/fesm2022/_element-chunk.mjs.map +1 -0
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs.map +1 -1
- package/fesm2022/_menu-chunk.mjs +33 -12
- package/fesm2022/_menu-chunk.mjs.map +1 -1
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -1
- package/fesm2022/_signal-like-chunk.mjs.map +1 -1
- package/fesm2022/_tabs-chunk.mjs +15 -5
- package/fesm2022/_tabs-chunk.mjs.map +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs +13 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
- package/fesm2022/_widget-chunk.mjs +17 -169
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion-testing.mjs +61 -0
- package/fesm2022/accordion-testing.mjs.map +1 -0
- package/fesm2022/accordion.mjs +217 -192
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +15 -15
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +26 -97
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs +55 -0
- package/fesm2022/listbox-testing.mjs.map +1 -0
- package/fesm2022/listbox.mjs +13 -20
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +75 -0
- package/fesm2022/menu-testing.mjs.map +1 -0
- package/fesm2022/menu.mjs +18 -22
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +2 -0
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs +57 -0
- package/fesm2022/tabs-testing.mjs.map +1 -0
- package/fesm2022/tabs.mjs +22 -32
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +56 -0
- package/fesm2022/toolbar-testing.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +20 -26
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +88 -0
- package/fesm2022/tree-testing.mjs.map +1 -0
- package/fesm2022/tree.mjs +16 -26
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +26 -2
- package/resources/code-examples.db +0 -0
- package/types/_accordion-chunk.d.ts +10 -9
- package/types/_click-event-manager-chunk.d.ts +27 -0
- package/types/_combobox-chunk.d.ts +23 -23
- package/types/_element-chunk.d.ts +10 -0
- package/types/_expansion-chunk.d.ts +1 -1
- package/types/_grid-chunk.d.ts +13 -51
- package/types/_keyboard-event-manager-chunk.d.ts +2 -2
- package/types/_list-chunk.d.ts +19 -18
- package/types/_list-navigation-chunk.d.ts +6 -16
- package/types/_listbox-chunk.d.ts +37 -30
- package/types/_menu-chunk.d.ts +60 -56
- package/types/_pointer-event-manager-chunk.d.ts +1 -1
- package/types/_signal-like-chunk.d.ts +14 -0
- package/types/_tabs-chunk.d.ts +13 -6
- package/types/_toolbar-chunk.d.ts +6 -1
- package/types/_tree-chunk.d.ts +24 -17
- package/types/accordion-testing.d.ts +63 -0
- package/types/accordion.d.ts +69 -55
- package/types/combobox.d.ts +6 -5
- package/types/grid.d.ts +8 -14
- package/types/listbox-testing.d.ts +39 -0
- package/types/listbox.d.ts +21 -22
- package/types/menu-testing.d.ts +50 -0
- package/types/menu.d.ts +4 -3
- package/types/private.d.ts +48 -45
- package/types/tabs-testing.d.ts +57 -0
- package/types/tabs.d.ts +4 -9
- package/types/toolbar-testing.d.ts +72 -0
- package/types/toolbar.d.ts +3 -5
- package/types/tree-testing.d.ts +75 -0
- package/types/tree.d.ts +5 -9
package/types/_tabs-chunk.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ClickEventManager } from './_click-event-manager-chunk.js';
|
|
3
3
|
import { ExpansionItem, ListExpansionInputs, ListExpansion } from './_expansion-chunk.js';
|
|
4
|
-
import { SignalLike,
|
|
4
|
+
import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
|
|
5
|
+
import { ListNavigationItem, ListNavigationInputs, ListFocus, ListNavigation } from './_list-navigation-chunk.js';
|
|
5
6
|
|
|
6
7
|
/** Represents the required inputs for the label control. */
|
|
7
8
|
interface LabelControlInputs {
|
|
@@ -103,6 +104,8 @@ declare class TabListPattern {
|
|
|
103
104
|
readonly navigationBehavior: ListNavigation<TabPattern>;
|
|
104
105
|
/** Controls expansion for the tablist. */
|
|
105
106
|
readonly expansionBehavior: ListExpansion;
|
|
107
|
+
/** Whether the tablist has been interacted with. */
|
|
108
|
+
readonly hasBeenInteracted: WritableSignalLike<boolean>;
|
|
106
109
|
/** The currently active tab. */
|
|
107
110
|
readonly activeTab: SignalLike<TabPattern | undefined>;
|
|
108
111
|
/** The currently selected tab. */
|
|
@@ -123,8 +126,8 @@ declare class TabListPattern {
|
|
|
123
126
|
readonly nextKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
|
|
124
127
|
/** The keydown event manager for the tablist. */
|
|
125
128
|
readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
|
|
126
|
-
/** The
|
|
127
|
-
readonly
|
|
129
|
+
/** The click event manager for the tablist. */
|
|
130
|
+
readonly clickManager: SignalLike<ClickEventManager<PointerEvent>>;
|
|
128
131
|
constructor(inputs: TabListInputs);
|
|
129
132
|
/**
|
|
130
133
|
* Sets the tablist to its default initial state.
|
|
@@ -135,10 +138,14 @@ declare class TabListPattern {
|
|
|
135
138
|
* This method should be called once the tablist and its tabs are properly initialized.
|
|
136
139
|
*/
|
|
137
140
|
setDefaultState(): void;
|
|
141
|
+
/** Sets the default active state of the tablist before receiving interaction for the first time. */
|
|
142
|
+
setDefaultStateEffect(): void;
|
|
138
143
|
/** Handles keydown events for the tablist. */
|
|
139
144
|
onKeydown(event: KeyboardEvent): void;
|
|
140
|
-
/** The
|
|
141
|
-
|
|
145
|
+
/** The click event manager for the tablist. */
|
|
146
|
+
onClick(event: PointerEvent): void;
|
|
147
|
+
/** Handles focusin events for the tablist. */
|
|
148
|
+
onFocusIn(): void;
|
|
142
149
|
/** Opens the tab by given value. */
|
|
143
150
|
open(value: string): boolean;
|
|
144
151
|
/** Opens the given tab or the current active tab. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignalLike } from './
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
|
|
2
2
|
import { ListItem, ListInputs, List } from './_list-chunk.js';
|
|
3
3
|
|
|
4
4
|
/** Represents the required inputs for a toolbar widget group. */
|
|
@@ -74,6 +74,8 @@ declare class ToolbarPattern<V> {
|
|
|
74
74
|
readonly inputs: ToolbarInputs<V>;
|
|
75
75
|
/** The list behavior for the toolbar. */
|
|
76
76
|
readonly listBehavior: List<ToolbarWidgetPattern<V>, V>;
|
|
77
|
+
/** Whether the toolbar has been interacted with. */
|
|
78
|
+
readonly hasBeenInteracted: WritableSignalLike<boolean>;
|
|
77
79
|
/** Whether the tablist is vertically or horizontally oriented. */
|
|
78
80
|
readonly orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
79
81
|
/** Whether disabled items in the group should be focusable. */
|
|
@@ -107,6 +109,7 @@ declare class ToolbarPattern<V> {
|
|
|
107
109
|
/** Handles keydown events for the toolbar. */
|
|
108
110
|
onKeydown(event: KeyboardEvent): void;
|
|
109
111
|
onPointerdown(event: PointerEvent): void;
|
|
112
|
+
onFocusIn(): void;
|
|
110
113
|
/** Handles click events for the toolbar. */
|
|
111
114
|
onClick(event: MouseEvent): void;
|
|
112
115
|
/**
|
|
@@ -116,6 +119,8 @@ declare class ToolbarPattern<V> {
|
|
|
116
119
|
* Otherwise, sets the active index to the first focusable widget.
|
|
117
120
|
*/
|
|
118
121
|
setDefaultState(): void;
|
|
122
|
+
/** Sets the default active state of the toolbar before receiving interaction for the first time. */
|
|
123
|
+
setDefaultStateEffect(): void;
|
|
119
124
|
}
|
|
120
125
|
|
|
121
126
|
export { ToolbarPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern };
|
package/types/_tree-chunk.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
|
|
2
2
|
import { ExpansionItem, ListExpansionInputs, ListExpansion } from './_expansion-chunk.js';
|
|
3
|
+
import { ListNavigationItem, ListFocusItem, ListFocusInputs, ListNavigationInputs, ListNavigation, ListFocus } from './_list-navigation-chunk.js';
|
|
3
4
|
import { ListTypeaheadItem, ListSelectionItem, ListSelectionInputs, ListTypeaheadInputs, ListSelection, ListTypeahead, NavOptions } from './_list-chunk.js';
|
|
4
5
|
import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
|
|
5
|
-
import {
|
|
6
|
+
import { ClickEventManager } from './_click-event-manager-chunk.js';
|
|
6
7
|
|
|
7
8
|
/** Represents an item in the tree. */
|
|
8
9
|
interface TreeItem<V, T extends TreeItem<V, T>> extends ListTypeaheadItem, ListNavigationItem, ListSelectionItem<V>, ListFocusItem, ExpansionItem {
|
|
@@ -19,27 +20,27 @@ type TreeInputs$1<T extends TreeItem<V, T>, V> = ListFocusInputs<T> & ListNaviga
|
|
|
19
20
|
declare class Tree<T extends TreeItem<V, T>, V> {
|
|
20
21
|
readonly inputs: TreeInputs$1<T, V>;
|
|
21
22
|
/** Controls navigation for the tree. */
|
|
22
|
-
navigationBehavior: ListNavigation<T>;
|
|
23
|
+
readonly navigationBehavior: ListNavigation<T>;
|
|
23
24
|
/** Controls selection for the tree. */
|
|
24
|
-
selectionBehavior: ListSelection<T, V>;
|
|
25
|
+
readonly selectionBehavior: ListSelection<T, V>;
|
|
25
26
|
/** Controls typeahead for the tree. */
|
|
26
|
-
typeaheadBehavior: ListTypeahead<T>;
|
|
27
|
+
readonly typeaheadBehavior: ListTypeahead<T>;
|
|
27
28
|
/** Controls focus for the tree. */
|
|
28
|
-
focusBehavior: ListFocus<T>;
|
|
29
|
+
readonly focusBehavior: ListFocus<T>;
|
|
29
30
|
/** Controls expansion for the tree. */
|
|
30
|
-
expansionBehavior: ListExpansion;
|
|
31
|
+
readonly expansionBehavior: ListExpansion;
|
|
31
32
|
/** Whether the tree is disabled. */
|
|
32
|
-
disabled: SignalLike<boolean>;
|
|
33
|
+
readonly disabled: SignalLike<boolean>;
|
|
33
34
|
/** The id of the current active item. */
|
|
34
|
-
activeDescendant: SignalLike<string | undefined>;
|
|
35
|
+
readonly activeDescendant: SignalLike<string | undefined>;
|
|
35
36
|
/** The tab index of the tree. */
|
|
36
|
-
tabIndex: SignalLike<0 | -1>;
|
|
37
|
+
readonly tabIndex: SignalLike<0 | -1>;
|
|
37
38
|
/** The index of the currently active item in the tree (within the flattened list). */
|
|
38
|
-
activeIndex: SignalLike<number>;
|
|
39
|
+
readonly activeIndex: SignalLike<number>;
|
|
39
40
|
/** The uncommitted index for selecting a range of options. */
|
|
40
|
-
private _anchorIndex;
|
|
41
|
+
private readonly _anchorIndex;
|
|
41
42
|
/** Whether the list should wrap. */
|
|
42
|
-
private _wrap;
|
|
43
|
+
private readonly _wrap;
|
|
43
44
|
constructor(inputs: TreeInputs$1<T, V>);
|
|
44
45
|
/** Returns the tab index for the given item. */
|
|
45
46
|
getItemTabindex(item: T): 0 | -1;
|
|
@@ -188,6 +189,8 @@ declare class TreePattern<V> implements TreeInputs<V> {
|
|
|
188
189
|
readonly inputs: TreeInputs<V>;
|
|
189
190
|
/** The tree behavior for the tree. */
|
|
190
191
|
readonly treeBehavior: Tree<TreeItemPattern<V>, V>;
|
|
192
|
+
/** Whether the tree has been interacted with. */
|
|
193
|
+
readonly hasBeenInteracted: WritableSignalLike<boolean>;
|
|
191
194
|
/** The root level is 0. */
|
|
192
195
|
readonly level: () => number;
|
|
193
196
|
/** The root is always expanded. */
|
|
@@ -218,8 +221,8 @@ declare class TreePattern<V> implements TreeInputs<V> {
|
|
|
218
221
|
readonly typeaheadRegexp: RegExp;
|
|
219
222
|
/** The keydown event manager for the tree. */
|
|
220
223
|
readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
|
|
221
|
-
/** The
|
|
222
|
-
|
|
224
|
+
/** The click event manager for the tree. */
|
|
225
|
+
readonly clickManager: SignalLike<ClickEventManager<PointerEvent>>;
|
|
223
226
|
/** A unique identifier for the tree. */
|
|
224
227
|
readonly id: SignalLike<string>;
|
|
225
228
|
/** The host native element. */
|
|
@@ -262,10 +265,14 @@ declare class TreePattern<V> implements TreeInputs<V> {
|
|
|
262
265
|
* Otherwise, sets focus to the first focusable tree item.
|
|
263
266
|
*/
|
|
264
267
|
setDefaultState(): void;
|
|
268
|
+
/** Sets the default active state of the tree before receiving interaction for the first time. */
|
|
269
|
+
setDefaultStateEffect(): void;
|
|
265
270
|
/** Handles keydown events on the tree. */
|
|
266
271
|
onKeydown(event: KeyboardEvent): void;
|
|
267
|
-
/** Handles
|
|
268
|
-
|
|
272
|
+
/** Handles click events on the tree. */
|
|
273
|
+
onClick(event: PointerEvent): void;
|
|
274
|
+
/** Handles focusin events on the tree. */
|
|
275
|
+
onFocusIn(): void;
|
|
269
276
|
/** Navigates to the given tree item in the tree. */
|
|
270
277
|
goto(e: PointerEvent, opts?: SelectOptions): void;
|
|
271
278
|
/** Expands the active item if possible, otherwise navigates to the first child. */
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as _angular_cdk_testing from '@angular/cdk/testing';
|
|
2
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate, ContentContainerComponentHarness } from '@angular/cdk/testing';
|
|
3
|
+
|
|
4
|
+
/** Filters for locating an `AccordionHarness`. */
|
|
5
|
+
interface AccordionHarnessFilters extends BaseHarnessFilters {
|
|
6
|
+
/** Only find instances whose title text matches the given value. */
|
|
7
|
+
title?: string | RegExp;
|
|
8
|
+
/** Only find instances whose expanded state matches the given value. */
|
|
9
|
+
expanded?: boolean;
|
|
10
|
+
/** Only find instances whose disabled state matches the given value. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Filters for locating an `AccordionGroupHarness`. */
|
|
14
|
+
interface AccordionGroupHarnessFilters extends BaseHarnessFilters {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Selectors for the sections that may contain user content. */
|
|
18
|
+
declare enum AccordionSection {
|
|
19
|
+
TRIGGER = "[ngAccordionTrigger]",
|
|
20
|
+
PANEL = "[ngAccordionPanel]"
|
|
21
|
+
}
|
|
22
|
+
/** Harness for interacting with a standard ngAccordion item in tests. */
|
|
23
|
+
declare class AccordionHarness extends ContentContainerComponentHarness<AccordionSection> {
|
|
24
|
+
static hostSelector: string;
|
|
25
|
+
/**
|
|
26
|
+
* Gets a `HarnessPredicate` that can be used to search for an accordion
|
|
27
|
+
* with specific attributes.
|
|
28
|
+
*/
|
|
29
|
+
static with(options?: AccordionHarnessFilters): HarnessPredicate<AccordionHarness>;
|
|
30
|
+
/** Overrides the internal loader to automatically resolve queries inside the associated panel. */
|
|
31
|
+
protected getRootHarnessLoader(): Promise<_angular_cdk_testing.HarnessLoader>;
|
|
32
|
+
/** Whether the accordion is expanded. */
|
|
33
|
+
isExpanded(): Promise<boolean>;
|
|
34
|
+
/** Whether the accordion is disabled. */
|
|
35
|
+
isDisabled(): Promise<boolean>;
|
|
36
|
+
/** Gets the title text of the accordion. */
|
|
37
|
+
getTitle(): Promise<string>;
|
|
38
|
+
/** Toggles the expanded state of the accordion by clicking on the trigger. */
|
|
39
|
+
toggle(): Promise<void>;
|
|
40
|
+
/** Expands the accordion if collapsed. */
|
|
41
|
+
expand(): Promise<void>;
|
|
42
|
+
/** Collapses the accordion if expanded. */
|
|
43
|
+
collapse(): Promise<void>;
|
|
44
|
+
/** Focuses the accordion trigger. */
|
|
45
|
+
focus(): Promise<void>;
|
|
46
|
+
/** Blurs the accordion trigger. */
|
|
47
|
+
blur(): Promise<void>;
|
|
48
|
+
/** Whether the accordion trigger is focused. */
|
|
49
|
+
isFocused(): Promise<boolean>;
|
|
50
|
+
}
|
|
51
|
+
/** Harness for interacting with an `ngAccordionGroup` in tests. */
|
|
52
|
+
declare class AccordionGroupHarness extends ComponentHarness {
|
|
53
|
+
static hostSelector: string;
|
|
54
|
+
/**
|
|
55
|
+
* Gets a `HarnessPredicate` that can be used to search for an accordion group with specific attributes.
|
|
56
|
+
*/
|
|
57
|
+
static with(options?: AccordionGroupHarnessFilters): HarnessPredicate<AccordionGroupHarness>;
|
|
58
|
+
/** Gets all accordions within this group. */
|
|
59
|
+
getAccordions(filters?: AccordionHarnessFilters): Promise<AccordionHarness[]>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { AccordionGroupHarness, AccordionHarness, AccordionSection };
|
|
63
|
+
export type { AccordionGroupHarnessFilters, AccordionHarnessFilters };
|
package/types/accordion.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit } from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import { AccordionTriggerPattern, AccordionGroupPattern } from './_accordion-chunk.js';
|
|
4
4
|
import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
|
|
5
5
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
6
6
|
import './_keyboard-event-manager-chunk.js';
|
|
7
|
-
import './
|
|
8
|
-
import './
|
|
7
|
+
import './_signal-like-chunk.js';
|
|
8
|
+
import './_click-event-manager-chunk.js';
|
|
9
9
|
import './_expansion-chunk.js';
|
|
10
|
+
import './_list-navigation-chunk.js';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* The content panel of an accordion item that is conditionally visible.
|
|
@@ -30,6 +31,10 @@ import './_expansion-chunk.js';
|
|
|
30
31
|
* @see [Accordion](guide/aria/accordion)
|
|
31
32
|
*/
|
|
32
33
|
declare class AccordionPanel {
|
|
34
|
+
/** A reference to the trigger element. */
|
|
35
|
+
private readonly _elementRef;
|
|
36
|
+
/** A reference to the trigger element. */
|
|
37
|
+
readonly element: HTMLElement;
|
|
33
38
|
/** The DeferredContentAware host directive. */
|
|
34
39
|
private readonly _deferredContentAware;
|
|
35
40
|
/** A global unique identifier for the panel. */
|
|
@@ -53,6 +58,59 @@ declare class AccordionPanel {
|
|
|
53
58
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
54
59
|
}
|
|
55
60
|
|
|
61
|
+
/**
|
|
62
|
+
* The trigger that toggles the visibility of its associated `ngAccordionPanel`.
|
|
63
|
+
*
|
|
64
|
+
* This directive requires the `panel` input be set to the template reference of the `ngAccordionPanel`
|
|
65
|
+
* it controls. When clicked, it will expand or collapse the panel. It also handles keyboard
|
|
66
|
+
* interactions for navigation within the `ngAccordionGroup`. It applies `role="button"` and manages
|
|
67
|
+
* `aria-expanded`, `aria-controls`, and `aria-disabled` attributes for accessibility.
|
|
68
|
+
* The `disabled` input can be used to disable the trigger.
|
|
69
|
+
*
|
|
70
|
+
* ```html
|
|
71
|
+
* <button ngAccordionTrigger [panel]="panel">
|
|
72
|
+
* Accordion Trigger Text
|
|
73
|
+
* </button>
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @developerPreview 21.0
|
|
77
|
+
* @see [Accordion](guide/aria/accordion)
|
|
78
|
+
*/
|
|
79
|
+
declare class AccordionTrigger implements OnInit, OnDestroy {
|
|
80
|
+
/** A reference to the trigger element. */
|
|
81
|
+
private readonly _elementRef;
|
|
82
|
+
/** A reference to the trigger element. */
|
|
83
|
+
readonly element: HTMLElement;
|
|
84
|
+
/** The parent AccordionGroup. */
|
|
85
|
+
private readonly _accordionGroup;
|
|
86
|
+
/** The associated AccordionPanel. */
|
|
87
|
+
readonly panel: _angular_core.InputSignal<AccordionPanel>;
|
|
88
|
+
/** The unique identifier for the trigger. */
|
|
89
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
90
|
+
/** The unique identifier for the corresponding trigger panel. */
|
|
91
|
+
readonly panelId: _angular_core.Signal<string>;
|
|
92
|
+
/** Whether the trigger is disabled. */
|
|
93
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
94
|
+
/** The index of the trigger within the accordion group. */
|
|
95
|
+
readonly index: _angular_core.InputSignal<number | undefined>;
|
|
96
|
+
/** Whether the corresponding panel is expanded. */
|
|
97
|
+
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
98
|
+
/** Whether the trigger is active. */
|
|
99
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
100
|
+
/** The UI pattern instance for this trigger. */
|
|
101
|
+
_pattern: AccordionTriggerPattern;
|
|
102
|
+
ngOnInit(): void;
|
|
103
|
+
ngOnDestroy(): void;
|
|
104
|
+
/** Expands this item. */
|
|
105
|
+
expand(): void;
|
|
106
|
+
/** Collapses this item. */
|
|
107
|
+
collapse(): void;
|
|
108
|
+
/** Toggles the expansion state of this item. */
|
|
109
|
+
toggle(): void;
|
|
110
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionTrigger, never>;
|
|
111
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "panel": { "alias": "panel"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
|
|
112
|
+
}
|
|
113
|
+
|
|
56
114
|
/**
|
|
57
115
|
* A container for a group of accordion items. It manages the overall state and
|
|
58
116
|
* interactions of the accordion, such as keyboard navigation and expansion mode.
|
|
@@ -96,6 +154,8 @@ declare class AccordionGroup {
|
|
|
96
154
|
readonly element: HTMLElement;
|
|
97
155
|
/** The AccordionTriggers nested inside this group. */
|
|
98
156
|
private readonly _triggers;
|
|
157
|
+
/** The AccordionTriggers nested inside this group. */
|
|
158
|
+
private readonly _sortedTriggers;
|
|
99
159
|
/** The corresponding patterns for the accordion triggers. */
|
|
100
160
|
private readonly _triggerPatterns;
|
|
101
161
|
/** The text direction (ltr or rtl). */
|
|
@@ -117,58 +177,12 @@ declare class AccordionGroup {
|
|
|
117
177
|
expandAll(): void;
|
|
118
178
|
/** Collapses all accordion panels. */
|
|
119
179
|
collapseAll(): void;
|
|
180
|
+
/** Internal method to register each trigger as we can not use contentChildren. */
|
|
181
|
+
_registerTrigger(trigger: AccordionTrigger): void;
|
|
182
|
+
/** Internal method to unregister each trigger as we can not use contentChildren. */
|
|
183
|
+
_unregisterTrigger(trigger: AccordionTrigger): void;
|
|
120
184
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionGroup, never>;
|
|
121
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionGroup, "[ngAccordionGroup]", ["ngAccordionGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multiExpandable": { "alias": "multiExpandable"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {},
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* The trigger that toggles the visibility of its associated `ngAccordionPanel`.
|
|
126
|
-
*
|
|
127
|
-
* This directive requires the `panel` input be set to the template reference of the `ngAccordionPanel`
|
|
128
|
-
* it controls. When clicked, it will expand or collapse the panel. It also handles keyboard
|
|
129
|
-
* interactions for navigation within the `ngAccordionGroup`. It applies `role="button"` and manages
|
|
130
|
-
* `aria-expanded`, `aria-controls`, and `aria-disabled` attributes for accessibility.
|
|
131
|
-
* The `disabled` input can be used to disable the trigger.
|
|
132
|
-
*
|
|
133
|
-
* ```html
|
|
134
|
-
* <button ngAccordionTrigger [panel]="panel">
|
|
135
|
-
* Accordion Trigger Text
|
|
136
|
-
* </button>
|
|
137
|
-
* ```
|
|
138
|
-
*
|
|
139
|
-
* @developerPreview 21.0
|
|
140
|
-
* @see [Accordion](guide/aria/accordion)
|
|
141
|
-
*/
|
|
142
|
-
declare class AccordionTrigger implements OnInit {
|
|
143
|
-
/** A reference to the trigger element. */
|
|
144
|
-
private readonly _elementRef;
|
|
145
|
-
/** A reference to the trigger element. */
|
|
146
|
-
readonly element: HTMLElement;
|
|
147
|
-
/** The parent AccordionGroup. */
|
|
148
|
-
private readonly _accordionGroup;
|
|
149
|
-
/** The associated AccordionPanel. */
|
|
150
|
-
readonly panel: _angular_core.InputSignal<AccordionPanel>;
|
|
151
|
-
/** The unique identifier for the trigger. */
|
|
152
|
-
readonly id: _angular_core.InputSignal<string>;
|
|
153
|
-
/** The unique identifier for the correspondingtrigger panel. */
|
|
154
|
-
readonly panelId: _angular_core.Signal<string>;
|
|
155
|
-
/** Whether the trigger is disabled. */
|
|
156
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
157
|
-
/** Whether the corresponding panel is expanded. */
|
|
158
|
-
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
159
|
-
/** Whether the trigger is active. */
|
|
160
|
-
readonly active: _angular_core.Signal<boolean>;
|
|
161
|
-
/** The UI pattern instance for this trigger. */
|
|
162
|
-
_pattern: AccordionTriggerPattern;
|
|
163
|
-
ngOnInit(): void;
|
|
164
|
-
/** Expands this item. */
|
|
165
|
-
expand(): void;
|
|
166
|
-
/** Collapses this item. */
|
|
167
|
-
collapse(): void;
|
|
168
|
-
/** Toggles the expansion state of this item. */
|
|
169
|
-
toggle(): void;
|
|
170
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionTrigger, never>;
|
|
171
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "panel": { "alias": "panel"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
|
|
185
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionGroup, "[ngAccordionGroup]", ["ngAccordionGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multiExpandable": { "alias": "multiExpandable"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
172
186
|
}
|
|
173
187
|
|
|
174
188
|
/**
|
|
@@ -180,7 +194,7 @@ declare class AccordionTrigger implements OnInit {
|
|
|
180
194
|
* by only creating the content when the panel is first expanded.
|
|
181
195
|
*
|
|
182
196
|
* ```html
|
|
183
|
-
* <div ngAccordionPanel
|
|
197
|
+
* <div ngAccordionPanel>
|
|
184
198
|
* <ng-template ngAccordionContent>
|
|
185
199
|
* <p>This is the content that will be displayed inside the panel.</p>
|
|
186
200
|
* </ng-template>
|
package/types/combobox.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
|
3
3
|
import { ComboboxListboxControls, ComboboxTreeControls, ComboboxDialogPattern, ComboboxPattern } from './_combobox-chunk.js';
|
|
4
4
|
import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
|
|
5
5
|
import './_keyboard-event-manager-chunk.js';
|
|
6
|
-
import './
|
|
6
|
+
import './_signal-like-chunk.js';
|
|
7
7
|
import './_pointer-event-manager-chunk.js';
|
|
8
8
|
import './_list-chunk.js';
|
|
9
|
+
import './_list-navigation-chunk.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Identifies an element as a popup for an `ngCombobox`.
|
|
@@ -68,7 +69,7 @@ declare class ComboboxPopup<V> {
|
|
|
68
69
|
*/
|
|
69
70
|
declare class Combobox<V> {
|
|
70
71
|
/** A signal wrapper for directionality. */
|
|
71
|
-
protected textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
|
|
72
|
+
protected readonly textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
|
|
72
73
|
/** The element that the combobox is attached to. */
|
|
73
74
|
private readonly _elementRef;
|
|
74
75
|
/** A reference to the combobox element. */
|
|
@@ -83,7 +84,7 @@ declare class Combobox<V> {
|
|
|
83
84
|
* - `auto-select`: The combobox automatically selects the first matching option.
|
|
84
85
|
* - `highlight`: The combobox highlights matching text in the options without changing selection.
|
|
85
86
|
*/
|
|
86
|
-
filterMode: _angular_core.InputSignal<"manual" | "auto-select" | "highlight">;
|
|
87
|
+
readonly filterMode: _angular_core.InputSignal<"manual" | "auto-select" | "highlight">;
|
|
87
88
|
/** Whether the combobox is disabled. */
|
|
88
89
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
89
90
|
/** Whether the combobox is read-only. */
|
|
@@ -136,7 +137,7 @@ declare class ComboboxDialog {
|
|
|
136
137
|
readonly combobox: Combobox<any>;
|
|
137
138
|
/** A reference to the parent combobox popup, if one exists. */
|
|
138
139
|
private readonly _popup;
|
|
139
|
-
_pattern: ComboboxDialogPattern;
|
|
140
|
+
readonly _pattern: ComboboxDialogPattern;
|
|
140
141
|
constructor();
|
|
141
142
|
close(): void;
|
|
142
143
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxDialog, never>;
|
|
@@ -174,7 +175,7 @@ declare class ComboboxInput {
|
|
|
174
175
|
/** The combobox that the input belongs to. */
|
|
175
176
|
readonly combobox: Combobox<any>;
|
|
176
177
|
/** The value of the input. */
|
|
177
|
-
value: _angular_core.ModelSignal<string>;
|
|
178
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
178
179
|
constructor();
|
|
179
180
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxInput, never>;
|
|
180
181
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxInput, "input[ngComboboxInput]", ["ngComboboxInput"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
package/types/grid.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { Signal, ElementRef } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
4
|
import { GridPattern, GridCellPattern, GridRowPattern, GridCellWidgetPattern } from './_grid-chunk.js';
|
|
5
|
-
import './
|
|
5
|
+
import './_signal-like-chunk.js';
|
|
6
6
|
import './_keyboard-event-manager-chunk.js';
|
|
7
7
|
import './_pointer-event-manager-chunk.js';
|
|
8
8
|
|
|
@@ -77,15 +77,13 @@ declare class Grid {
|
|
|
77
77
|
* - `explicit`: Cells are selected explicitly by the user (e.g., via click or spacebar).
|
|
78
78
|
*/
|
|
79
79
|
readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
|
|
80
|
-
/** Whether enable range selections (with modifier keys or dragging). */
|
|
81
|
-
readonly enableRangeSelection: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
82
80
|
/** The UI pattern for the grid. */
|
|
83
81
|
readonly _pattern: GridPattern;
|
|
84
82
|
constructor();
|
|
85
83
|
/** Gets the cell pattern for a given element. */
|
|
86
84
|
private _getCell;
|
|
87
85
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Grid, never>;
|
|
88
|
-
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; };
|
|
86
|
+
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; }; }, {}, ["_rows"], never, true, never>;
|
|
89
87
|
}
|
|
90
88
|
|
|
91
89
|
/**
|
|
@@ -110,10 +108,10 @@ declare class GridCell {
|
|
|
110
108
|
readonly element: HTMLElement;
|
|
111
109
|
/** Whether the cell is currently active (focused). */
|
|
112
110
|
readonly active: Signal<boolean>;
|
|
113
|
-
/** The
|
|
114
|
-
private readonly
|
|
111
|
+
/** The widget contained within this cell, if any. */
|
|
112
|
+
private readonly _widget;
|
|
115
113
|
/** The UI pattern for the widget in this cell. */
|
|
116
|
-
private readonly
|
|
114
|
+
private readonly _widgetPattern;
|
|
117
115
|
/** The parent row. */
|
|
118
116
|
private readonly _row;
|
|
119
117
|
/** Text direction. */
|
|
@@ -136,10 +134,6 @@ declare class GridCell {
|
|
|
136
134
|
readonly selected: _angular_core.ModelSignal<boolean>;
|
|
137
135
|
/** Whether the cell is selectable. */
|
|
138
136
|
readonly selectable: _angular_core.InputSignal<boolean>;
|
|
139
|
-
/** Orientation of the widgets in the cell. */
|
|
140
|
-
readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
141
|
-
/** Whether widgets navigation wraps. */
|
|
142
|
-
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
143
137
|
/** The tabindex override. */
|
|
144
138
|
readonly tabindex: _angular_core.InputSignal<number | undefined>;
|
|
145
139
|
/**
|
|
@@ -154,7 +148,7 @@ declare class GridCell {
|
|
|
154
148
|
/** Gets the cell widget pattern for a given element. */
|
|
155
149
|
private _getWidget;
|
|
156
150
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridCell, never>;
|
|
157
|
-
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; }; "
|
|
151
|
+
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; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["_widget"], never, true, never>;
|
|
158
152
|
}
|
|
159
153
|
|
|
160
154
|
/**
|
|
@@ -227,9 +221,9 @@ declare class GridCellWidget {
|
|
|
227
221
|
/** The target that will receive focus instead of the widget. */
|
|
228
222
|
readonly focusTarget: _angular_core.InputSignal<ElementRef<any> | HTMLElement | undefined>;
|
|
229
223
|
/** Emits when the widget is activated. */
|
|
230
|
-
readonly activated: _angular_core.OutputEmitterRef<
|
|
224
|
+
readonly activated: _angular_core.OutputEmitterRef<KeyboardEvent | FocusEvent | undefined>;
|
|
231
225
|
/** Emits when the widget is deactivated. */
|
|
232
|
-
readonly deactivated: _angular_core.OutputEmitterRef<
|
|
226
|
+
readonly deactivated: _angular_core.OutputEmitterRef<KeyboardEvent | FocusEvent | undefined>;
|
|
233
227
|
/** The tabindex override. */
|
|
234
228
|
readonly tabindex: _angular_core.InputSignal<number | undefined>;
|
|
235
229
|
/**
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
|
|
3
|
+
/** Filters for locating a `ListboxOptionHarness`. */
|
|
4
|
+
interface ListboxOptionHarnessFilters extends BaseHarnessFilters {
|
|
5
|
+
/** Only find instances whose text matches the given value. */
|
|
6
|
+
text?: string | RegExp;
|
|
7
|
+
/** Only find instances whose selected state matches the given value. */
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
/** Only find instances whose disabled state matches the given value. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Filters for locating a `ListboxHarness`. */
|
|
13
|
+
interface ListboxHarnessFilters extends BaseHarnessFilters {
|
|
14
|
+
/** Only find instances whose disabled state matches the given value. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class ListboxOptionHarness extends ComponentHarness {
|
|
19
|
+
static hostSelector: string;
|
|
20
|
+
static with(options?: ListboxOptionHarnessFilters): HarnessPredicate<ListboxOptionHarness>;
|
|
21
|
+
isSelected(): Promise<boolean>;
|
|
22
|
+
isDisabled(): Promise<boolean>;
|
|
23
|
+
getText(): Promise<string>;
|
|
24
|
+
click(): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
declare class ListboxHarness extends ComponentHarness {
|
|
27
|
+
static hostSelector: string;
|
|
28
|
+
static with(options?: ListboxHarnessFilters): HarnessPredicate<ListboxHarness>;
|
|
29
|
+
getOrientation(): Promise<'vertical' | 'horizontal'>;
|
|
30
|
+
isMulti(): Promise<boolean>;
|
|
31
|
+
isDisabled(): Promise<boolean>;
|
|
32
|
+
getOptions(filters?: ListboxOptionHarnessFilters): Promise<ListboxOptionHarness[]>;
|
|
33
|
+
focus(): Promise<void>;
|
|
34
|
+
/** Blurs the listbox container. */
|
|
35
|
+
blur(): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { ListboxHarness, ListboxOptionHarness };
|
|
39
|
+
export type { ListboxHarnessFilters, ListboxOptionHarnessFilters };
|