@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.
- package/_adev_assets/aria-accordion.json +443 -59
- package/_adev_assets/aria-combobox.json +345 -37
- package/_adev_assets/aria-grid.json +408 -71
- package/_adev_assets/aria-listbox.json +115 -35
- package/_adev_assets/aria-menu.json +492 -167
- package/_adev_assets/aria-tabs.json +272 -88
- package/_adev_assets/aria-toolbar.json +151 -133
- package/_adev_assets/aria-tree.json +182 -35
- package/fesm2022/_widget-chunk.mjs +643 -190
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +129 -77
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +140 -27
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +254 -68
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +54 -44
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +270 -108
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +752 -785
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +101 -71
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +87 -64
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +105 -60
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -10
- package/types/_grid-chunk.d.ts +326 -83
- package/types/accordion.d.ts +134 -35
- package/types/combobox.d.ts +146 -13
- package/types/grid.d.ts +159 -32
- package/types/listbox.d.ts +59 -28
- package/types/menu.d.ts +151 -55
- package/types/private.d.ts +449 -567
- package/types/tabs.d.ts +121 -41
- package/types/toolbar.d.ts +74 -51
- package/types/tree.d.ts +116 -45
- package/_adev_assets/aria-radio-group.json +0 -389
- package/fesm2022/deferred-content.mjs +0 -99
- package/fesm2022/deferred-content.mjs.map +0 -1
- package/fesm2022/radio-group.mjs +0 -338
- package/fesm2022/radio-group.mjs.map +0 -1
- package/types/deferred-content.d.ts +0 -38
- package/types/radio-group.d.ts +0 -84
package/types/accordion.d.ts
CHANGED
|
@@ -1,88 +1,187 @@
|
|
|
1
1
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { WritableSignal } from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/aria/private';
|
|
4
5
|
import { AccordionTriggerPattern, AccordionPanelPattern, AccordionGroupPattern } from '@angular/aria/private';
|
|
5
|
-
import * as i1 from '@angular/aria/deferred-content';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* The content panel of an accordion item that is conditionally visible.
|
|
9
|
+
*
|
|
10
|
+
* This directive is a container for the content that is shown or hidden. It requires
|
|
11
|
+
* a `panelId` that must match the `panelId` of its corresponding `ngAccordionTrigger`.
|
|
12
|
+
* The content within the panel should be provided using an `ng-template` with the
|
|
13
|
+
* `ngAccordionContent` directive so that the content is not rendered on the page until the trigger
|
|
14
|
+
* is expanded. It applies `role="region"` for accessibility and uses the `inert` attribute to hide
|
|
15
|
+
* its content from assistive technologies when not visible.
|
|
16
|
+
*
|
|
17
|
+
* ```html
|
|
18
|
+
* <div ngAccordionPanel panelId="unique-id-1">
|
|
19
|
+
* <ng-template ngAccordionContent>
|
|
20
|
+
* <p>This content is lazily rendered and will be shown when the panel is expanded.</p>
|
|
21
|
+
* </ng-template>
|
|
22
|
+
* </div>
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @developerPreview 21.0
|
|
10
26
|
*/
|
|
11
27
|
declare class AccordionPanel {
|
|
12
28
|
/** The DeferredContentAware host directive. */
|
|
13
29
|
private readonly _deferredContentAware;
|
|
14
30
|
/** A global unique identifier for the panel. */
|
|
15
|
-
|
|
16
|
-
/** A local unique identifier for the panel, used to match with its trigger's
|
|
17
|
-
|
|
31
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
32
|
+
/** A local unique identifier for the panel, used to match with its trigger's `panelId`. */
|
|
33
|
+
readonly panelId: _angular_core.InputSignal<string>;
|
|
34
|
+
/** Whether the accordion panel is visible. True if the associated trigger is expanded. */
|
|
35
|
+
readonly visible: _angular_core.Signal<boolean>;
|
|
18
36
|
/** The parent accordion trigger pattern that controls this panel. This is set by AccordionGroup. */
|
|
19
37
|
readonly accordionTrigger: WritableSignal<AccordionTriggerPattern | undefined>;
|
|
20
38
|
/** The UI pattern instance for this panel. */
|
|
21
39
|
readonly _pattern: AccordionPanelPattern;
|
|
22
40
|
constructor();
|
|
41
|
+
/** Expands this item. */
|
|
42
|
+
expand(): void;
|
|
43
|
+
/** Collapses this item. */
|
|
44
|
+
collapse(): void;
|
|
45
|
+
/** Toggles the expansion state of this item. */
|
|
46
|
+
toggle(): void;
|
|
23
47
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionPanel, never>;
|
|
24
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "
|
|
48
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "panelId": { "alias": "panelId"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
25
49
|
}
|
|
26
50
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
51
|
+
* The trigger that toggles the visibility of its associated `ngAccordionPanel`.
|
|
52
|
+
*
|
|
53
|
+
* This directive requires a `panelId` that must match the `panelId` of the `ngAccordionPanel` it
|
|
54
|
+
* controls. When clicked, it will expand or collapse the panel. It also handles keyboard
|
|
55
|
+
* interactions for navigation within the `ngAccordionGroup`. It applies `role="button"` and manages
|
|
56
|
+
* `aria-expanded`, `aria-controls`, and `aria-disabled` attributes for accessibility.
|
|
57
|
+
* The `disabled` input can be used to disable the trigger.
|
|
58
|
+
*
|
|
59
|
+
* ```html
|
|
60
|
+
* <button ngAccordionTrigger panelId="unique-id-1">
|
|
61
|
+
* Accordion Trigger Text
|
|
62
|
+
* </button>
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @developerPreview 21.0
|
|
29
66
|
*/
|
|
30
67
|
declare class AccordionTrigger {
|
|
31
|
-
/** A global unique identifier for the trigger. */
|
|
32
|
-
private readonly _id;
|
|
33
68
|
/** A reference to the trigger element. */
|
|
34
69
|
private readonly _elementRef;
|
|
70
|
+
/** A reference to the trigger element. */
|
|
71
|
+
readonly element: HTMLElement;
|
|
35
72
|
/** The parent AccordionGroup. */
|
|
36
73
|
private readonly _accordionGroup;
|
|
37
|
-
/** A
|
|
38
|
-
|
|
74
|
+
/** A unique identifier for the widget. */
|
|
75
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
76
|
+
/** A local unique identifier for the trigger, used to match with its panel's `panelId`. */
|
|
77
|
+
readonly panelId: _angular_core.InputSignal<string>;
|
|
39
78
|
/** Whether the trigger is disabled. */
|
|
40
|
-
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*/
|
|
46
|
-
readonly hardDisabled: _angular_core.Signal<boolean>;
|
|
79
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
80
|
+
/** Whether the corresponding panel is expanded. */
|
|
81
|
+
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
82
|
+
/** Whether the trigger is active. */
|
|
83
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
47
84
|
/** The accordion panel pattern controlled by this trigger. This is set by AccordionGroup. */
|
|
48
|
-
readonly
|
|
85
|
+
readonly _accordionPanel: WritableSignal<AccordionPanelPattern | undefined>;
|
|
49
86
|
/** The UI pattern instance for this trigger. */
|
|
50
87
|
readonly _pattern: AccordionTriggerPattern;
|
|
88
|
+
/** Expands this item. */
|
|
89
|
+
expand(): void;
|
|
90
|
+
/** Collapses this item. */
|
|
91
|
+
collapse(): void;
|
|
92
|
+
/** Toggles the expansion state of this item. */
|
|
93
|
+
toggle(): void;
|
|
51
94
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionTrigger, never>;
|
|
52
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "
|
|
95
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "panelId": { "alias": "panelId"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
|
|
53
96
|
}
|
|
54
97
|
/**
|
|
55
|
-
*
|
|
98
|
+
* A container for a group of accordion items. It manages the overall state and
|
|
56
99
|
* interactions of the accordion, such as keyboard navigation and expansion mode.
|
|
100
|
+
*
|
|
101
|
+
* The `ngAccordionGroup` serves as the root of a group of accordion triggers and panels,
|
|
102
|
+
* coordinating the behavior of the `ngAccordionTrigger` and `ngAccordionPanel` elements within it.
|
|
103
|
+
* It supports both single and multiple expansion modes.
|
|
104
|
+
*
|
|
105
|
+
* ```html
|
|
106
|
+
* <div ngAccordionGroup [multiExpandable]="true" [(expandedPanels)]="expandedItems">
|
|
107
|
+
* <div class="accordion-item">
|
|
108
|
+
* <h3>
|
|
109
|
+
* <button ngAccordionTrigger panelId="item-1">Item 1</button>
|
|
110
|
+
* </h3>
|
|
111
|
+
* <div ngAccordionPanel panelId="item-1">
|
|
112
|
+
* <ng-template ngAccordionContent>
|
|
113
|
+
* <p>Content for Item 1.</p>
|
|
114
|
+
* </ng-template>
|
|
115
|
+
* </div>
|
|
116
|
+
* </div>
|
|
117
|
+
* <div class="accordion-item">
|
|
118
|
+
* <h3>
|
|
119
|
+
* <button ngAccordionTrigger panelId="item-2">Item 2</button>
|
|
120
|
+
* </h3>
|
|
121
|
+
* <div ngAccordionPanel panelId="item-2">
|
|
122
|
+
* <ng-template ngAccordionContent>
|
|
123
|
+
* <p>Content for Item 2.</p>
|
|
124
|
+
* </ng-template>
|
|
125
|
+
* </div>
|
|
126
|
+
* </div>
|
|
127
|
+
* </div>
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* @developerPreview 21.0
|
|
57
131
|
*/
|
|
58
132
|
declare class AccordionGroup {
|
|
59
133
|
/** A reference to the group element. */
|
|
60
134
|
private readonly _elementRef;
|
|
135
|
+
/** A reference to the group element. */
|
|
136
|
+
readonly element: HTMLElement;
|
|
61
137
|
/** The AccordionTriggers nested inside this group. */
|
|
62
|
-
|
|
138
|
+
private readonly _triggers;
|
|
139
|
+
/** The AccordionTrigger patterns nested inside this group. */
|
|
140
|
+
private readonly _triggerPatterns;
|
|
63
141
|
/** The AccordionPanels nested inside this group. */
|
|
64
|
-
|
|
142
|
+
private readonly _panels;
|
|
65
143
|
/** The text direction (ltr or rtl). */
|
|
66
144
|
readonly textDirection: WritableSignal<_angular_cdk_bidi.Direction>;
|
|
67
145
|
/** Whether the entire accordion group is disabled. */
|
|
68
|
-
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
146
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
69
147
|
/** Whether multiple accordion items can be expanded simultaneously. */
|
|
70
|
-
multiExpandable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
71
|
-
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
148
|
+
readonly multiExpandable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
149
|
+
/**
|
|
150
|
+
* Whether to allow disabled items to receive focus. When `true`, disabled items are
|
|
151
|
+
* focusable but not interactive. When `false`, disabled items are skipped during navigation.
|
|
152
|
+
*/
|
|
153
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
75
154
|
/** Whether keyboard navigation should wrap around from the last item to the first, and vice-versa. */
|
|
76
|
-
wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
155
|
+
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
77
156
|
/** The UI pattern instance for this accordion group. */
|
|
78
157
|
readonly _pattern: AccordionGroupPattern;
|
|
79
158
|
constructor();
|
|
159
|
+
/** Expands all accordion panels if multi-expandable. */
|
|
160
|
+
expandAll(): void;
|
|
161
|
+
/** Collapses all accordion panels. */
|
|
162
|
+
collapseAll(): void;
|
|
163
|
+
/** Gets the trigger pattern for a given element. */
|
|
164
|
+
private _getItem;
|
|
80
165
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionGroup, never>;
|
|
81
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionGroup, "[ngAccordionGroup]", ["ngAccordionGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multiExpandable": { "alias": "multiExpandable"; "required": false; "isSignal": true; }; "
|
|
166
|
+
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; }; }, {}, ["_triggers", "_panels"], never, true, never>;
|
|
82
167
|
}
|
|
83
168
|
/**
|
|
84
|
-
* A structural directive that
|
|
85
|
-
*
|
|
169
|
+
* A structural directive that provides a mechanism for lazily rendering the content for an
|
|
170
|
+
* `ngAccordionPanel`.
|
|
171
|
+
*
|
|
172
|
+
* This directive should be applied to an `ng-template` inside an `ngAccordionPanel`.
|
|
173
|
+
* It allows the content of the panel to be lazily rendered, improving performance
|
|
174
|
+
* by only creating the content when the panel is first expanded.
|
|
175
|
+
*
|
|
176
|
+
* ```html
|
|
177
|
+
* <div ngAccordionPanel panelId="unique-id-1">
|
|
178
|
+
* <ng-template ngAccordionContent>
|
|
179
|
+
* <p>This is the content that will be displayed inside the panel.</p>
|
|
180
|
+
* </ng-template>
|
|
181
|
+
* </div>
|
|
182
|
+
* ```
|
|
183
|
+
*
|
|
184
|
+
* @developerPreview 21.0
|
|
86
185
|
*/
|
|
87
186
|
declare class AccordionContent {
|
|
88
187
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionContent, never>;
|
package/types/combobox.d.ts
CHANGED
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { WritableSignal } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import * as i1 from '@angular/aria/private';
|
|
5
|
+
import { ComboboxPattern, ComboboxDialogPattern, ComboboxListboxControls, ComboboxTreeControls } from '@angular/aria/private';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* The container element that wraps a combobox input and popup, and orchestrates its behavior.
|
|
9
|
+
*
|
|
10
|
+
* The `ngCombobox` directive is the main entry point for creating a combobox and customizing its
|
|
11
|
+
* behavior. It coordinates the interactions between the `ngComboboxInput` and the popup, which
|
|
12
|
+
* is defined by a `ng-template` with the `ngComboboxPopupContainer` directive. If using the
|
|
13
|
+
* `CdkOverlay`, the `cdkConnectedOverlay` directive takes the place of `ngComboboxPopupContainer`.
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <div ngCombobox filterMode="highlight">
|
|
17
|
+
* <input
|
|
18
|
+
* ngComboboxInput
|
|
19
|
+
* placeholder="Search for a state..."
|
|
20
|
+
* [(value)]="searchString"
|
|
21
|
+
* />
|
|
22
|
+
*
|
|
23
|
+
* <ng-template ngComboboxPopupContainer>
|
|
24
|
+
* <div ngListbox [(value)]="selectedValue">
|
|
25
|
+
* @for (option of filteredOptions(); track option) {
|
|
26
|
+
* <div ngOption [value]="option" [label]="option">
|
|
27
|
+
* <span>{{option}}</span>
|
|
28
|
+
* </div>
|
|
29
|
+
* }
|
|
30
|
+
* </div>
|
|
31
|
+
* </ng-template>
|
|
32
|
+
* </div>
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @developerPreview 21.0
|
|
36
|
+
*/
|
|
7
37
|
declare class Combobox<V> {
|
|
8
38
|
/** The directionality (LTR / RTL) context for the application (or a subtree of it). */
|
|
9
39
|
private readonly _directionality;
|
|
@@ -11,35 +41,68 @@ declare class Combobox<V> {
|
|
|
11
41
|
protected textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
|
|
12
42
|
/** The element that the combobox is attached to. */
|
|
13
43
|
private readonly _elementRef;
|
|
44
|
+
/** A reference to the combobox element. */
|
|
45
|
+
readonly element: HTMLElement;
|
|
14
46
|
/** The DeferredContentAware host directive. */
|
|
15
47
|
private readonly _deferredContentAware;
|
|
16
48
|
/** The combobox popup. */
|
|
17
49
|
readonly popup: _angular_core.Signal<ComboboxPopup<V> | undefined>;
|
|
18
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The filter mode for the combobox.
|
|
52
|
+
* - `manual`: The consumer is responsible for filtering the options.
|
|
53
|
+
* - `auto-select`: The combobox automatically selects the first matching option.
|
|
54
|
+
* - `highlight`: The combobox highlights matching text in the options without changing selection.
|
|
55
|
+
*/
|
|
19
56
|
filterMode: _angular_core.InputSignal<"manual" | "auto-select" | "highlight">;
|
|
20
|
-
/** Whether the combobox is focused. */
|
|
21
|
-
readonly isFocused: WritableSignal<boolean>;
|
|
22
|
-
/** Whether the listbox has received focus yet. */
|
|
23
|
-
private _hasBeenFocused;
|
|
24
57
|
/** Whether the combobox is disabled. */
|
|
25
|
-
readonly disabled: _angular_core.
|
|
58
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
26
59
|
/** Whether the combobox is read-only. */
|
|
27
|
-
readonly readonly: _angular_core.
|
|
60
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
28
61
|
/** The value of the first matching item in the popup. */
|
|
29
62
|
readonly firstMatch: _angular_core.InputSignal<V | undefined>;
|
|
30
63
|
/** Whether the combobox is expanded. */
|
|
31
64
|
readonly expanded: _angular_core.Signal<boolean>;
|
|
65
|
+
/** Whether the combobox popup should always be expanded, regardless of user interaction. */
|
|
66
|
+
readonly alwaysExpanded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
32
67
|
/** Input element connected to the combobox, if any. */
|
|
33
68
|
readonly inputElement: _angular_core.Signal<HTMLInputElement | undefined>;
|
|
34
69
|
/** The combobox ui pattern. */
|
|
35
70
|
readonly _pattern: ComboboxPattern<any, V>;
|
|
36
71
|
constructor();
|
|
72
|
+
/** Opens the combobox to the selected item. */
|
|
73
|
+
open(): void;
|
|
74
|
+
/** Closes the combobox. */
|
|
75
|
+
close(): void;
|
|
76
|
+
/** Expands the combobox popup. */
|
|
77
|
+
expand(): void;
|
|
78
|
+
/** Collapses the combobox popup. */
|
|
79
|
+
collapse(): void;
|
|
37
80
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Combobox<any>, never>;
|
|
38
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Combobox<any>, "[ngCombobox]", ["ngCombobox"], { "filterMode": { "alias": "filterMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "firstMatch": { "alias": "firstMatch"; "required": false; "isSignal": true; }; }, {}, ["popup"], never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
81
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Combobox<any>, "[ngCombobox]", ["ngCombobox"], { "filterMode": { "alias": "filterMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "firstMatch": { "alias": "firstMatch"; "required": false; "isSignal": true; }; "alwaysExpanded": { "alias": "alwaysExpanded"; "required": false; "isSignal": true; }; }, {}, ["popup"], never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
39
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* An input that is part of a combobox. It is responsible for displaying the
|
|
85
|
+
* current value and handling user input for filtering and selection.
|
|
86
|
+
*
|
|
87
|
+
* This directive should be applied to an `<input>` element within an `ngCombobox`
|
|
88
|
+
* container. It automatically handles keyboard interactions, such as opening the
|
|
89
|
+
* popup and navigating through the options.
|
|
90
|
+
*
|
|
91
|
+
* ```html
|
|
92
|
+
* <input
|
|
93
|
+
* ngComboboxInput
|
|
94
|
+
* placeholder="Search..."
|
|
95
|
+
* [(value)]="searchString"
|
|
96
|
+
* />
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @developerPreview 21.0
|
|
100
|
+
*/
|
|
40
101
|
declare class ComboboxInput {
|
|
41
102
|
/** The element that the combobox is attached to. */
|
|
42
103
|
private readonly _elementRef;
|
|
104
|
+
/** A reference to the input element. */
|
|
105
|
+
readonly element: HTMLElement;
|
|
43
106
|
/** The combobox that the input belongs to. */
|
|
44
107
|
readonly combobox: Combobox<any>;
|
|
45
108
|
/** The value of the input. */
|
|
@@ -48,17 +111,87 @@ declare class ComboboxInput {
|
|
|
48
111
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxInput, never>;
|
|
49
112
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxInput, "input[ngComboboxInput]", ["ngComboboxInput"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
50
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* A structural directive that marks the `ng-template` to be used as the popup
|
|
116
|
+
* for a combobox. This content is conditionally rendered.
|
|
117
|
+
*
|
|
118
|
+
* The content of the popup can be a `ngListbox`, `ngTree`, or `role="dialog"`, allowing for
|
|
119
|
+
* flexible and complex combobox implementations. The consumer is responsible for
|
|
120
|
+
* implementing the filtering logic based on the `ngComboboxInput`'s value.
|
|
121
|
+
*
|
|
122
|
+
* ```html
|
|
123
|
+
* <ng-template ngComboboxPopupContainer>
|
|
124
|
+
* <div ngListbox [(value)]="selectedValue">
|
|
125
|
+
* <!-- ... options ... -->
|
|
126
|
+
* </div>
|
|
127
|
+
* </ng-template>
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* When using CdkOverlay, this directive can be replaced by `cdkConnectedOverlay`.
|
|
131
|
+
*
|
|
132
|
+
* ```html
|
|
133
|
+
* <ng-template
|
|
134
|
+
* [cdkConnectedOverlay]="{origin: inputElement, usePopover: 'inline' matchWidth: true}"
|
|
135
|
+
* [cdkConnectedOverlayOpen]="combobox.expanded()">
|
|
136
|
+
* <div ngListbox [(value)]="selectedValue">
|
|
137
|
+
* <!-- ... options ... -->
|
|
138
|
+
* </div>
|
|
139
|
+
* </ng-template>
|
|
140
|
+
* ```
|
|
141
|
+
*
|
|
142
|
+
* @developerPreview 21.0
|
|
143
|
+
*/
|
|
51
144
|
declare class ComboboxPopupContainer {
|
|
52
145
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxPopupContainer, never>;
|
|
53
146
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxPopupContainer, "ng-template[ngComboboxPopupContainer]", ["ngComboboxPopupContainer"], {}, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
|
|
54
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Identifies an element as a popup for an `ngCombobox`.
|
|
150
|
+
*
|
|
151
|
+
* This directive acts as a bridge, allowing the `ngCombobox` to discover and interact
|
|
152
|
+
* with the underlying control (e.g., `ngListbox`, `ngTree`, or `ngComboboxDialog`) that
|
|
153
|
+
* manages the options. It's primarily used as a host directive and is responsible for
|
|
154
|
+
* exposing the popup's control pattern to the parent combobox.
|
|
155
|
+
*
|
|
156
|
+
* @developerPreview 21.0
|
|
157
|
+
*/
|
|
55
158
|
declare class ComboboxPopup<V> {
|
|
56
159
|
/** The combobox that the popup belongs to. */
|
|
57
160
|
readonly combobox: Combobox<V> | null;
|
|
58
|
-
/** The controls
|
|
59
|
-
readonly controls: WritableSignal<ComboboxListboxControls<any, V> | ComboboxTreeControls<any, V> | undefined>;
|
|
161
|
+
/** The popup controls exposed to the combobox. */
|
|
162
|
+
readonly controls: WritableSignal<ComboboxDialogPattern | ComboboxListboxControls<any, V> | ComboboxTreeControls<any, V> | undefined>;
|
|
60
163
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxPopup<any>, never>;
|
|
61
164
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxPopup<any>, "[ngComboboxPopup]", ["ngComboboxPopup"], {}, {}, never, never, true, never>;
|
|
62
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Integrates a native `<dialog>` element with the combobox, allowing for
|
|
168
|
+
* a modal or non-modal popup experience. It handles the opening and closing of the dialog
|
|
169
|
+
* based on the combobox's expanded state.
|
|
170
|
+
*
|
|
171
|
+
* ```html
|
|
172
|
+
* <ng-template ngComboboxPopupContainer>
|
|
173
|
+
* <dialog ngComboboxDialog class="example-dialog">
|
|
174
|
+
* <!-- ... dialog content ... -->
|
|
175
|
+
* </dialog>
|
|
176
|
+
* </ng-template>
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* @developerPreview 21.0
|
|
180
|
+
*/
|
|
181
|
+
declare class ComboboxDialog {
|
|
182
|
+
/** The dialog element. */
|
|
183
|
+
private readonly _elementRef;
|
|
184
|
+
/** A reference to the dialog element. */
|
|
185
|
+
readonly element: HTMLElement;
|
|
186
|
+
/** The combobox that the dialog belongs to. */
|
|
187
|
+
readonly combobox: Combobox<any>;
|
|
188
|
+
/** A reference to the parent combobox popup, if one exists. */
|
|
189
|
+
private readonly _popup;
|
|
190
|
+
_pattern: ComboboxDialogPattern;
|
|
191
|
+
constructor();
|
|
192
|
+
close(): void;
|
|
193
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxDialog, never>;
|
|
194
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxDialog, "dialog[ngComboboxDialog]", ["ngComboboxDialog"], {}, {}, never, never, true, [{ directive: typeof ComboboxPopup; inputs: {}; outputs: {}; }]>;
|
|
195
|
+
}
|
|
63
196
|
|
|
64
|
-
export { Combobox, ComboboxInput, ComboboxPopup, ComboboxPopupContainer };
|
|
197
|
+
export { Combobox, ComboboxDialog, ComboboxInput, ComboboxPopup, ComboboxPopupContainer };
|