@angular/cdk-experimental 20.0.4 → 20.1.0-next.1
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/accordion/index.d.ts +86 -0
- package/accordion.d-LmKAOYNE.d.ts +87 -0
- package/expansion.d-DB4i_1Aa.d.ts +71 -0
- package/fesm2022/accordion-CN4PcmAh.mjs +150 -0
- package/fesm2022/accordion-CN4PcmAh.mjs.map +1 -0
- package/fesm2022/accordion.mjs +184 -0
- package/fesm2022/accordion.mjs.map +1 -0
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs.map +1 -1
- package/fesm2022/expansion-C9iQLHOG.mjs +87 -0
- package/fesm2022/expansion-C9iQLHOG.mjs.map +1 -0
- package/fesm2022/{list-focus-Di7m_z_6.mjs → list-focus-BXQdAA3i.mjs} +2 -126
- package/fesm2022/list-focus-BXQdAA3i.mjs.map +1 -0
- package/fesm2022/list-selection-BLV4Yy7T.mjs +130 -0
- package/fesm2022/list-selection-BLV4Yy7T.mjs.map +1 -0
- package/fesm2022/listbox.mjs +18 -14
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/{option-f_gNslw8.mjs → option-r2ojgVMH.mjs} +15 -2
- package/fesm2022/option-r2ojgVMH.mjs.map +1 -0
- package/fesm2022/polyfill-CXksG4af.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/radio-s5uO_tmJ.mjs +203 -0
- package/fesm2022/radio-s5uO_tmJ.mjs.map +1 -0
- package/fesm2022/radio.mjs +169 -0
- package/fesm2022/radio.mjs.map +1 -0
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/{tabs-DFP3Xs4J.mjs → tabs-CeifH1j2.mjs} +45 -80
- package/fesm2022/tabs-CeifH1j2.mjs.map +1 -0
- package/fesm2022/tabs.mjs +4 -2
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/ui-patterns.mjs +7 -3
- package/fesm2022/ui-patterns.mjs.map +1 -1
- package/{list-navigation.d-DfOSxsSp.d.ts → list-navigation.d-Br99p_2O.d.ts} +2 -64
- package/list-selection.d-BQWRFJI-.d.ts +69 -0
- package/listbox/index.d.ts +5 -10
- package/{listbox.d-QWPLmxRe.d.ts → listbox.d-C8oz9si7.d.ts} +4 -1
- package/package.json +11 -3
- package/radio/index.d.ts +77 -0
- package/radio-group.d-C3xIREax.d.ts +114 -0
- package/tabs/index.d.ts +4 -2
- package/{tabs.d-DooGD7Uk.d.ts → tabs.d-CBlJ33jz.d.ts} +17 -63
- package/ui-patterns/index.d.ts +7 -3
- package/fesm2022/list-focus-Di7m_z_6.mjs.map +0 -1
- package/fesm2022/option-f_gNslw8.mjs.map +0 -1
- package/fesm2022/tabs-DFP3Xs4J.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-patterns.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"ui-patterns.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/ui-patterns/behaviors/signal-like/signal-like.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport type SignalLike<T> = () => T;\n\nexport interface WritableSignalLike<T> extends SignalLike<T> {\n set(value: T): void;\n update(updateFn: (value: T) => T): void;\n}\n\n/** Converts a getter setter style signal to a WritableSignalLike. */\nexport function convertGetterSetterToWritableSignalLike<T>(\n getter: () => T,\n setter: (v: T) => void,\n): WritableSignalLike<T> {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: setter,\n update: (updateCallback: (v: T) => T) => setter(updateCallback(getter())),\n });\n}\n"],"names":[],"mappings":";;;;;;;;;AAeA;AACgB,SAAA,uCAAuC,CACrD,MAAe,EACf,MAAsB,EAAA;;AAGtB,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AAC3B,QAAA,GAAG,EAAE,MAAM;AACX,QAAA,MAAM,EAAE,CAAC,cAA2B,KAAK,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;AAC1E,KAAA,CAAC;AACJ;;;;"}
|
|
@@ -147,68 +147,6 @@ declare class ListFocus<T extends ListFocusItem> {
|
|
|
147
147
|
isFocusable(item: T): boolean;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
/** Represents an item in a collection, such as a listbox option, than can be selected. */
|
|
151
|
-
interface ListSelectionItem<V> extends ListFocusItem {
|
|
152
|
-
/** The value of the item. */
|
|
153
|
-
value: SignalLike<V>;
|
|
154
|
-
}
|
|
155
|
-
/** Represents the required inputs for a collection that contains selectable items. */
|
|
156
|
-
interface ListSelectionInputs<T extends ListSelectionItem<V>, V> extends ListFocusInputs<T> {
|
|
157
|
-
/** Whether multiple items in the list can be selected at once. */
|
|
158
|
-
multi: SignalLike<boolean>;
|
|
159
|
-
/** The current value of the list selection. */
|
|
160
|
-
value: WritableSignalLike<V[]>;
|
|
161
|
-
/** The selection strategy used by the list. */
|
|
162
|
-
selectionMode: SignalLike<'follow' | 'explicit'>;
|
|
163
|
-
}
|
|
164
|
-
/** Controls selection for a list of items. */
|
|
165
|
-
declare class ListSelection<T extends ListSelectionItem<V>, V> {
|
|
166
|
-
readonly inputs: ListSelectionInputs<T, V> & {
|
|
167
|
-
focusManager: ListFocus<T>;
|
|
168
|
-
};
|
|
169
|
-
/** The start index to use for range selection. */
|
|
170
|
-
rangeStartIndex: i0.WritableSignal<number>;
|
|
171
|
-
/** The end index to use for range selection. */
|
|
172
|
-
rangeEndIndex: i0.WritableSignal<number>;
|
|
173
|
-
constructor(inputs: ListSelectionInputs<T, V> & {
|
|
174
|
-
focusManager: ListFocus<T>;
|
|
175
|
-
});
|
|
176
|
-
/** Selects the item at the current active index. */
|
|
177
|
-
select(item?: ListSelectionItem<V>, opts?: {
|
|
178
|
-
anchor: boolean;
|
|
179
|
-
}): void;
|
|
180
|
-
/** Deselects the item at the current active index. */
|
|
181
|
-
deselect(item?: T): void;
|
|
182
|
-
/** Toggles the item at the current active index. */
|
|
183
|
-
toggle(): void;
|
|
184
|
-
/** Toggles only the item at the current active index. */
|
|
185
|
-
toggleOne(): void;
|
|
186
|
-
/** Selects all items in the list. */
|
|
187
|
-
selectAll(): void;
|
|
188
|
-
/** Deselects all items in the list. */
|
|
189
|
-
deselectAll(): void;
|
|
190
|
-
/**
|
|
191
|
-
* Selects all items in the list or deselects all
|
|
192
|
-
* items in the list if all items are already selected.
|
|
193
|
-
*/
|
|
194
|
-
toggleAll(): void;
|
|
195
|
-
/** Sets the selection to only the current active item. */
|
|
196
|
-
selectOne(): void;
|
|
197
|
-
/**
|
|
198
|
-
* Selects all items in the list up to the anchor item.
|
|
199
|
-
*
|
|
200
|
-
* Deselects all items that were previously within the
|
|
201
|
-
* selected range that are now outside of the selected range
|
|
202
|
-
*/
|
|
203
|
-
selectRange(opts?: {
|
|
204
|
-
anchor: boolean;
|
|
205
|
-
}): void;
|
|
206
|
-
/** Marks the given index as the start of a range selection. */
|
|
207
|
-
beginRangeSelection(index?: number): void;
|
|
208
|
-
/** Returns the items in the list starting from the given index. */
|
|
209
|
-
private _getItemsFromIndex;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
150
|
/** Represents an item in a collection, such as a listbox option, than can be navigated to. */
|
|
213
151
|
interface ListNavigationItem extends ListFocusItem {
|
|
214
152
|
}
|
|
@@ -243,5 +181,5 @@ declare class ListNavigation<T extends ListNavigationItem> {
|
|
|
243
181
|
private _advance;
|
|
244
182
|
}
|
|
245
183
|
|
|
246
|
-
export { KeyboardEventManager as K, PointerEventManager as P,
|
|
247
|
-
export type {
|
|
184
|
+
export { KeyboardEventManager as K, PointerEventManager as P, ListNavigation as b, convertGetterSetterToWritableSignalLike as c, ListFocus as d };
|
|
185
|
+
export type { ListNavigationInputs as L, SignalLike as S, WritableSignalLike as W, ListFocusInputs as a, ListNavigationItem as e, ListFocusItem as f };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { f as ListFocusItem, S as SignalLike, a as ListFocusInputs, W as WritableSignalLike, d as ListFocus } from './list-navigation.d-Br99p_2O.js';
|
|
3
|
+
|
|
4
|
+
/** Represents an item in a collection, such as a listbox option, than can be selected. */
|
|
5
|
+
interface ListSelectionItem<V> extends ListFocusItem {
|
|
6
|
+
/** The value of the item. */
|
|
7
|
+
value: SignalLike<V>;
|
|
8
|
+
}
|
|
9
|
+
/** Represents the required inputs for a collection that contains selectable items. */
|
|
10
|
+
interface ListSelectionInputs<T extends ListSelectionItem<V>, V> extends ListFocusInputs<T> {
|
|
11
|
+
/** Whether multiple items in the list can be selected at once. */
|
|
12
|
+
multi: SignalLike<boolean>;
|
|
13
|
+
/** The current value of the list selection. */
|
|
14
|
+
value: WritableSignalLike<V[]>;
|
|
15
|
+
/** The selection strategy used by the list. */
|
|
16
|
+
selectionMode: SignalLike<'follow' | 'explicit'>;
|
|
17
|
+
}
|
|
18
|
+
/** Controls selection for a list of items. */
|
|
19
|
+
declare class ListSelection<T extends ListSelectionItem<V>, V> {
|
|
20
|
+
readonly inputs: ListSelectionInputs<T, V> & {
|
|
21
|
+
focusManager: ListFocus<T>;
|
|
22
|
+
};
|
|
23
|
+
/** The start index to use for range selection. */
|
|
24
|
+
rangeStartIndex: i0.WritableSignal<number>;
|
|
25
|
+
/** The end index to use for range selection. */
|
|
26
|
+
rangeEndIndex: i0.WritableSignal<number>;
|
|
27
|
+
/** The currently selected items. */
|
|
28
|
+
selectedItems: i0.Signal<T[]>;
|
|
29
|
+
constructor(inputs: ListSelectionInputs<T, V> & {
|
|
30
|
+
focusManager: ListFocus<T>;
|
|
31
|
+
});
|
|
32
|
+
/** Selects the item at the current active index. */
|
|
33
|
+
select(item?: ListSelectionItem<V>, opts?: {
|
|
34
|
+
anchor: boolean;
|
|
35
|
+
}): void;
|
|
36
|
+
/** Deselects the item at the current active index. */
|
|
37
|
+
deselect(item?: T): void;
|
|
38
|
+
/** Toggles the item at the current active index. */
|
|
39
|
+
toggle(): void;
|
|
40
|
+
/** Toggles only the item at the current active index. */
|
|
41
|
+
toggleOne(): void;
|
|
42
|
+
/** Selects all items in the list. */
|
|
43
|
+
selectAll(): void;
|
|
44
|
+
/** Deselects all items in the list. */
|
|
45
|
+
deselectAll(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Selects all items in the list or deselects all
|
|
48
|
+
* items in the list if all items are already selected.
|
|
49
|
+
*/
|
|
50
|
+
toggleAll(): void;
|
|
51
|
+
/** Sets the selection to only the current active item. */
|
|
52
|
+
selectOne(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Selects all items in the list up to the anchor item.
|
|
55
|
+
*
|
|
56
|
+
* Deselects all items that were previously within the
|
|
57
|
+
* selected range that are now outside of the selected range
|
|
58
|
+
*/
|
|
59
|
+
selectRange(opts?: {
|
|
60
|
+
anchor: boolean;
|
|
61
|
+
}): void;
|
|
62
|
+
/** Marks the given index as the start of a range selection. */
|
|
63
|
+
beginRangeSelection(index?: number): void;
|
|
64
|
+
/** Returns the items in the list starting from the given index. */
|
|
65
|
+
private _getItemsFromIndex;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { ListSelection as b };
|
|
69
|
+
export type { ListSelectionItem as L, ListSelectionInputs as a };
|
package/listbox/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { AfterViewInit } from '@angular/core';
|
|
3
2
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
|
-
import { b as OptionPattern, a as ListboxPattern } from '../listbox.d-
|
|
5
|
-
import '../list-navigation.d-
|
|
3
|
+
import { b as OptionPattern, a as ListboxPattern } from '../listbox.d-C8oz9si7.js';
|
|
4
|
+
import '../list-navigation.d-Br99p_2O.js';
|
|
5
|
+
import '../list-selection.d-BQWRFJI-.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A listbox container.
|
|
@@ -18,7 +18,7 @@ import '../list-navigation.d-DfOSxsSp.js';
|
|
|
18
18
|
* </ul>
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
declare class CdkListbox<V>
|
|
21
|
+
declare class CdkListbox<V> {
|
|
22
22
|
/** The directionality (LTR / RTL) context for the application (or a subtree of it). */
|
|
23
23
|
private readonly _directionality;
|
|
24
24
|
/** The CdkOptions nested inside of the CdkListbox. */
|
|
@@ -47,19 +47,14 @@ declare class CdkListbox<V> implements AfterViewInit {
|
|
|
47
47
|
readonly: i0.InputSignalWithTransform<boolean, unknown>;
|
|
48
48
|
/** The values of the current selected items. */
|
|
49
49
|
value: i0.ModelSignal<V[]>;
|
|
50
|
-
/** The current index that has been navigated to. */
|
|
51
|
-
activeIndex: i0.ModelSignal<number>;
|
|
52
50
|
/** The Listbox UIPattern. */
|
|
53
51
|
pattern: ListboxPattern<V>;
|
|
54
52
|
/** Whether the listbox has received focus yet. */
|
|
55
53
|
private _hasFocused;
|
|
56
|
-
/** Whether the options in the listbox have been initialized. */
|
|
57
|
-
private _isViewInitialized;
|
|
58
54
|
constructor();
|
|
59
|
-
ngAfterViewInit(): void;
|
|
60
55
|
onFocus(): void;
|
|
61
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkListbox<any>, never>;
|
|
62
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkListbox<any>, "[cdkListbox]", ["cdkListbox"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; };
|
|
57
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkListbox<any>, "[cdkListbox]", ["cdkListbox"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["_cdkOptions"], never, true, never>;
|
|
63
58
|
}
|
|
64
59
|
/** A selectable option in a CdkListbox. */
|
|
65
60
|
declare class CdkOption<V> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { f as ListFocusItem, S as SignalLike, a as ListFocusInputs, d as ListFocus, e as ListNavigationItem, b as ListNavigation, L as ListNavigationInputs, K as KeyboardEventManager, P as PointerEventManager } from './list-navigation.d-Br99p_2O.js';
|
|
3
|
+
import { L as ListSelectionItem, b as ListSelection, a as ListSelectionInputs } from './list-selection.d-BQWRFJI-.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Represents an item in a collection, such as a listbox option, than can be navigated to by
|
|
@@ -148,6 +149,8 @@ declare class ListboxPattern<V> {
|
|
|
148
149
|
/** The pointerdown event manager for the listbox. */
|
|
149
150
|
pointerdown: i0.Signal<PointerEventManager<PointerEvent>>;
|
|
150
151
|
constructor(inputs: ListboxInputs<V>);
|
|
152
|
+
/** Returns a set of violations */
|
|
153
|
+
validate(): string[];
|
|
151
154
|
/** Handles keydown events for the listbox. */
|
|
152
155
|
onKeydown(event: KeyboardEvent): void;
|
|
153
156
|
onPointerdown(event: PointerEvent): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cdk-experimental",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.1.0-next.1",
|
|
4
4
|
"description": "Experimental components for Angular CDK",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://github.com/angular/components#readme",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@angular/cdk": "20.0.
|
|
16
|
-
"@angular/core": "^20.0.0 || ^21.0.0"
|
|
15
|
+
"@angular/cdk": "20.1.0-next.1",
|
|
16
|
+
"@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@angular/cdk": "workspace:*"
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"types": "./index.d.ts",
|
|
45
45
|
"default": "./fesm2022/cdk-experimental.mjs"
|
|
46
46
|
},
|
|
47
|
+
"./accordion": {
|
|
48
|
+
"types": "./accordion/index.d.ts",
|
|
49
|
+
"default": "./fesm2022/accordion.mjs"
|
|
50
|
+
},
|
|
47
51
|
"./column-resize": {
|
|
48
52
|
"types": "./column-resize/index.d.ts",
|
|
49
53
|
"default": "./fesm2022/column-resize.mjs"
|
|
@@ -64,6 +68,10 @@
|
|
|
64
68
|
"types": "./popover-edit/index.d.ts",
|
|
65
69
|
"default": "./fesm2022/popover-edit.mjs"
|
|
66
70
|
},
|
|
71
|
+
"./radio": {
|
|
72
|
+
"types": "./radio/index.d.ts",
|
|
73
|
+
"default": "./fesm2022/radio.mjs"
|
|
74
|
+
},
|
|
67
75
|
"./scrolling": {
|
|
68
76
|
"types": "./scrolling/index.d.ts",
|
|
69
77
|
"default": "./fesm2022/scrolling.mjs"
|
package/radio/index.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { WritableSignal } from '@angular/core';
|
|
3
|
+
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
|
+
import { c as RadioButtonPattern, a as RadioGroupPattern } from '../radio-group.d-C3xIREax.js';
|
|
5
|
+
import '../list-navigation.d-Br99p_2O.js';
|
|
6
|
+
import '../list-selection.d-BQWRFJI-.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A radio button group container.
|
|
10
|
+
*
|
|
11
|
+
* Radio groups are used to group multiple radio buttons or radio group labels so they function as
|
|
12
|
+
* a single form control. The CdkRadioGroup is meant to be used in conjunction with CdkRadioButton
|
|
13
|
+
* as follows:
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <div cdkRadioGroup>
|
|
17
|
+
* <label cdkRadioButton value="1">Option 1</label>
|
|
18
|
+
* <label cdkRadioButton value="2">Option 2</label>
|
|
19
|
+
* <label cdkRadioButton value="3">Option 3</label>
|
|
20
|
+
* </div>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare class CdkRadioGroup<V> {
|
|
24
|
+
/** The CdkRadioButtons nested inside of the CdkRadioGroup. */
|
|
25
|
+
private readonly _cdkRadioButtons;
|
|
26
|
+
/** A signal wrapper for directionality. */
|
|
27
|
+
protected textDirection: WritableSignal<_angular_cdk_bidi.Direction>;
|
|
28
|
+
/** The RadioButton UIPatterns of the child CdkRadioButtons. */
|
|
29
|
+
protected items: i0.Signal<RadioButtonPattern<any>[]>;
|
|
30
|
+
/** Whether the radio group is vertically or horizontally oriented. */
|
|
31
|
+
orientation: i0.InputSignal<"vertical" | "horizontal">;
|
|
32
|
+
/** Whether disabled items in the group should be skipped when navigating. */
|
|
33
|
+
skipDisabled: i0.InputSignalWithTransform<boolean, unknown>;
|
|
34
|
+
/** The focus strategy used by the radio group. */
|
|
35
|
+
focusMode: i0.InputSignal<"roving" | "activedescendant">;
|
|
36
|
+
/** Whether the radio group is disabled. */
|
|
37
|
+
disabled: i0.InputSignalWithTransform<boolean, unknown>;
|
|
38
|
+
/** Whether the radio group is readonly. */
|
|
39
|
+
readonly: i0.InputSignalWithTransform<boolean, unknown>;
|
|
40
|
+
/** The value of the currently selected radio button. */
|
|
41
|
+
value: i0.ModelSignal<V | null>;
|
|
42
|
+
/** The internal selection state for the radio group. */
|
|
43
|
+
private readonly _value;
|
|
44
|
+
/** The RadioGroup UIPattern. */
|
|
45
|
+
pattern: RadioGroupPattern<V>;
|
|
46
|
+
/** Whether the radio group has received focus yet. */
|
|
47
|
+
private _hasFocused;
|
|
48
|
+
constructor();
|
|
49
|
+
onFocus(): void;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkRadioGroup<any>, never>;
|
|
51
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkRadioGroup<any>, "[cdkRadioGroup]", ["cdkRadioGroup"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["_cdkRadioButtons"], never, true, never>;
|
|
52
|
+
}
|
|
53
|
+
/** A selectable radio button in a CdkRadioGroup. */
|
|
54
|
+
declare class CdkRadioButton<V> {
|
|
55
|
+
/** A reference to the radio button element. */
|
|
56
|
+
private readonly _elementRef;
|
|
57
|
+
/** The parent CdkRadioGroup. */
|
|
58
|
+
private readonly _cdkRadioGroup;
|
|
59
|
+
/** A unique identifier for the radio button. */
|
|
60
|
+
private readonly _generatedId;
|
|
61
|
+
/** A unique identifier for the radio button. */
|
|
62
|
+
protected id: i0.Signal<string>;
|
|
63
|
+
/** The value associated with the radio button. */
|
|
64
|
+
protected value: i0.InputSignal<V>;
|
|
65
|
+
/** The parent RadioGroup UIPattern. */
|
|
66
|
+
protected group: i0.Signal<RadioGroupPattern<any>>;
|
|
67
|
+
/** A reference to the radio button element to be focused on navigation. */
|
|
68
|
+
protected element: i0.Signal<any>;
|
|
69
|
+
/** Whether the radio button is disabled. */
|
|
70
|
+
disabled: i0.InputSignalWithTransform<boolean, unknown>;
|
|
71
|
+
/** The RadioButton UIPattern. */
|
|
72
|
+
pattern: RadioButtonPattern<V>;
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkRadioButton<any>, never>;
|
|
74
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkRadioButton<any>, "[cdkRadioButton]", ["cdkRadioButton"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { CdkRadioButton, CdkRadioGroup };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { e as ListNavigationItem, f as ListFocusItem, S as SignalLike, d as ListFocus, b as ListNavigation, L as ListNavigationInputs, a as ListFocusInputs, K as KeyboardEventManager, P as PointerEventManager } from './list-navigation.d-Br99p_2O.js';
|
|
3
|
+
import { L as ListSelectionItem, b as ListSelection, a as ListSelectionInputs } from './list-selection.d-BQWRFJI-.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represents the properties exposed by a radio group that need to be accessed by a radio button.
|
|
7
|
+
* This exists to avoid circular dependency errors between the radio group and radio button.
|
|
8
|
+
*/
|
|
9
|
+
interface RadioGroupLike<V> {
|
|
10
|
+
focusManager: ListFocus<RadioButtonPattern<V>>;
|
|
11
|
+
selection: ListSelection<RadioButtonPattern<V>, V>;
|
|
12
|
+
navigation: ListNavigation<RadioButtonPattern<V>>;
|
|
13
|
+
}
|
|
14
|
+
/** Represents the required inputs for a radio button in a radio group. */
|
|
15
|
+
interface RadioButtonInputs<V> extends ListNavigationItem, ListSelectionItem<V>, ListFocusItem {
|
|
16
|
+
/** A reference to the parent radio group. */
|
|
17
|
+
group: SignalLike<RadioGroupLike<V> | undefined>;
|
|
18
|
+
}
|
|
19
|
+
/** Represents a radio button within a radio group. */
|
|
20
|
+
declare class RadioButtonPattern<V> {
|
|
21
|
+
readonly inputs: RadioButtonInputs<V>;
|
|
22
|
+
/** A unique identifier for the radio button. */
|
|
23
|
+
id: SignalLike<string>;
|
|
24
|
+
/** The value associated with the radio button. */
|
|
25
|
+
value: SignalLike<V>;
|
|
26
|
+
/** The position of the radio button within the group. */
|
|
27
|
+
index: i0.Signal<number>;
|
|
28
|
+
/** Whether the radio button is currently the active one (focused). */
|
|
29
|
+
active: i0.Signal<boolean>;
|
|
30
|
+
/** Whether the radio button is selected. */
|
|
31
|
+
selected: SignalLike<boolean>;
|
|
32
|
+
/** Whether the radio button is disabled. */
|
|
33
|
+
disabled: SignalLike<boolean>;
|
|
34
|
+
/** A reference to the parent radio group. */
|
|
35
|
+
group: SignalLike<RadioGroupLike<V> | undefined>;
|
|
36
|
+
/** The tabindex of the radio button. */
|
|
37
|
+
tabindex: i0.Signal<0 | -1 | undefined>;
|
|
38
|
+
/** The HTML element associated with the radio button. */
|
|
39
|
+
element: SignalLike<HTMLElement>;
|
|
40
|
+
constructor(inputs: RadioButtonInputs<V>);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** The selection operations that the radio group can perform. */
|
|
44
|
+
interface SelectOptions {
|
|
45
|
+
selectOne?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** Represents the required inputs for a radio group. */
|
|
48
|
+
type RadioGroupInputs<V> = Omit<ListNavigationInputs<RadioButtonPattern<V>>, 'wrap'> & Omit<ListSelectionInputs<RadioButtonPattern<V>, V>, 'multi' | 'selectionMode'> & ListFocusInputs<RadioButtonPattern<V>> & {
|
|
49
|
+
/** Whether the radio group is disabled. */
|
|
50
|
+
disabled: SignalLike<boolean>;
|
|
51
|
+
/** Whether the radio group is readonly. */
|
|
52
|
+
readonly: SignalLike<boolean>;
|
|
53
|
+
};
|
|
54
|
+
/** Controls the state of a radio group. */
|
|
55
|
+
declare class RadioGroupPattern<V> {
|
|
56
|
+
readonly inputs: RadioGroupInputs<V>;
|
|
57
|
+
/** Controls navigation for the radio group. */
|
|
58
|
+
navigation: ListNavigation<RadioButtonPattern<V>>;
|
|
59
|
+
/** Controls selection for the radio group. */
|
|
60
|
+
selection: ListSelection<RadioButtonPattern<V>, V>;
|
|
61
|
+
/** Controls focus for the radio group. */
|
|
62
|
+
focusManager: ListFocus<RadioButtonPattern<V>>;
|
|
63
|
+
/** Whether the radio group is vertically or horizontally oriented. */
|
|
64
|
+
orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
65
|
+
/** Whether the radio group is disabled. */
|
|
66
|
+
disabled: i0.Signal<boolean>;
|
|
67
|
+
/** The currently selected radio button. */
|
|
68
|
+
selectedItem: i0.Signal<RadioButtonPattern<V>>;
|
|
69
|
+
/** Whether the radio group is readonly. */
|
|
70
|
+
readonly: i0.Signal<boolean>;
|
|
71
|
+
/** The tabindex of the radio group (if using activedescendant). */
|
|
72
|
+
tabindex: i0.Signal<0 | -1>;
|
|
73
|
+
/** The id of the current active radio button (if using activedescendant). */
|
|
74
|
+
activedescendant: i0.Signal<string | undefined>;
|
|
75
|
+
/** The key used to navigate to the previous radio button. */
|
|
76
|
+
prevKey: i0.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
|
|
77
|
+
/** The key used to navigate to the next radio button. */
|
|
78
|
+
nextKey: i0.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
|
|
79
|
+
/** The keydown event manager for the radio group. */
|
|
80
|
+
keydown: i0.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
81
|
+
/** The pointerdown event manager for the radio group. */
|
|
82
|
+
pointerdown: i0.Signal<PointerEventManager<PointerEvent>>;
|
|
83
|
+
constructor(inputs: RadioGroupInputs<V>);
|
|
84
|
+
/** Handles keydown events for the radio group. */
|
|
85
|
+
onKeydown(event: KeyboardEvent): void;
|
|
86
|
+
/** Handles pointerdown events for the radio group. */
|
|
87
|
+
onPointerdown(event: PointerEvent): void;
|
|
88
|
+
/** Navigates to the first enabled radio button in the group. */
|
|
89
|
+
first(opts?: SelectOptions): void;
|
|
90
|
+
/** Navigates to the last enabled radio button in the group. */
|
|
91
|
+
last(opts?: SelectOptions): void;
|
|
92
|
+
/** Navigates to the next enabled radio button in the group. */
|
|
93
|
+
next(opts?: SelectOptions): void;
|
|
94
|
+
/** Navigates to the previous enabled radio button in the group. */
|
|
95
|
+
prev(opts?: SelectOptions): void;
|
|
96
|
+
/** Navigates to the radio button associated with the given pointer event. */
|
|
97
|
+
goto(event: PointerEvent, opts?: SelectOptions): void;
|
|
98
|
+
/**
|
|
99
|
+
* Sets the radio group to its default initial state.
|
|
100
|
+
*
|
|
101
|
+
* Sets the active index to the selected radio button if one exists and is focusable.
|
|
102
|
+
* Otherwise, sets the active index to the first focusable radio button.
|
|
103
|
+
*/
|
|
104
|
+
setDefaultState(): void;
|
|
105
|
+
/** Validates the state of the radio group and returns a list of accessibility violations. */
|
|
106
|
+
validate(): string[];
|
|
107
|
+
/** Safely performs a navigation operation and updates selection if needed. */
|
|
108
|
+
private _navigate;
|
|
109
|
+
/** Finds the RadioButtonPattern associated with a pointer event target. */
|
|
110
|
+
private _getItem;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { RadioGroupPattern as a, RadioButtonPattern as c };
|
|
114
|
+
export type { RadioGroupInputs as R, RadioButtonInputs as b };
|
package/tabs/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { a as TabPattern, c as TabPanelPattern, e as TabListPattern } from '../tabs.d-
|
|
3
|
+
import { a as TabPattern, c as TabPanelPattern, e as TabListPattern } from '../tabs.d-CBlJ33jz.js';
|
|
4
4
|
import * as i1 from '@angular/cdk-experimental/deferred-content';
|
|
5
|
-
import '../list-navigation.d-
|
|
5
|
+
import '../list-navigation.d-Br99p_2O.js';
|
|
6
|
+
import '../list-selection.d-BQWRFJI-.js';
|
|
7
|
+
import '../expansion.d-DB4i_1Aa.js';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* A Tabs container.
|
|
@@ -1,56 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
interface ExpansionControlInputs {
|
|
6
|
-
/** Whether an Expansion is visible. */
|
|
7
|
-
visible: SignalLike<boolean>;
|
|
8
|
-
/** The controlled Expansion panel. */
|
|
9
|
-
expansionPanel: SignalLike<ExpansionPanel | undefined>;
|
|
10
|
-
}
|
|
11
|
-
/** Inputs for an Expansion panel. */
|
|
12
|
-
interface ExpansionPanelInputs {
|
|
13
|
-
/** A unique identifier for the panel. */
|
|
14
|
-
id: SignalLike<string>;
|
|
15
|
-
/** The Expansion control. */
|
|
16
|
-
expansionControl: SignalLike<ExpansionControl | undefined>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* An Expansion control.
|
|
20
|
-
*
|
|
21
|
-
* Use Expansion behavior if a pattern has a collapsible view that has two elements rely on the
|
|
22
|
-
* states from each other. For example
|
|
23
|
-
*
|
|
24
|
-
* ```html
|
|
25
|
-
* <button aria-controls="remote-content" aria-expanded="false">Toggle Content</button>
|
|
26
|
-
*
|
|
27
|
-
* ...
|
|
28
|
-
*
|
|
29
|
-
* <div id="remote-content" aria-hidden="true">
|
|
30
|
-
* Collapsible content
|
|
31
|
-
* </div>
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
declare class ExpansionControl {
|
|
35
|
-
readonly inputs: ExpansionControlInputs;
|
|
36
|
-
/** Whether an Expansion is visible. */
|
|
37
|
-
visible: SignalLike<boolean>;
|
|
38
|
-
/** The controllerd Expansion panel Id. */
|
|
39
|
-
controls: i0.Signal<string | undefined>;
|
|
40
|
-
constructor(inputs: ExpansionControlInputs);
|
|
41
|
-
}
|
|
42
|
-
/** A Expansion panel. */
|
|
43
|
-
declare class ExpansionPanel {
|
|
44
|
-
readonly inputs: ExpansionPanelInputs;
|
|
45
|
-
/** A unique identifier for the panel. */
|
|
46
|
-
id: SignalLike<string>;
|
|
47
|
-
/** Whether the panel is hidden. */
|
|
48
|
-
hidden: i0.Signal<boolean>;
|
|
49
|
-
constructor(inputs: ExpansionPanelInputs);
|
|
50
|
-
}
|
|
2
|
+
import { e as ListNavigationItem, f as ListFocusItem, S as SignalLike, L as ListNavigationInputs, a as ListFocusInputs, b as ListNavigation, d as ListFocus, K as KeyboardEventManager, P as PointerEventManager } from './list-navigation.d-Br99p_2O.js';
|
|
3
|
+
import { L as ListSelectionItem, a as ListSelectionInputs, b as ListSelection } from './list-selection.d-BQWRFJI-.js';
|
|
4
|
+
import { E as ExpansionItem, L as ListExpansionInputs, a as ListExpansion } from './expansion.d-DB4i_1Aa.js';
|
|
51
5
|
|
|
52
6
|
/** The required inputs to tabs. */
|
|
53
|
-
interface TabInputs extends ListNavigationItem, ListSelectionItem<string>, ListFocusItem {
|
|
7
|
+
interface TabInputs extends ListNavigationItem, ListSelectionItem<string>, ListFocusItem, Omit<ExpansionItem, 'expansionId' | 'expandable'> {
|
|
54
8
|
/** The parent tablist that controls the tab. */
|
|
55
9
|
tablist: SignalLike<TabListPattern>;
|
|
56
10
|
/** The remote tabpanel controlled by the tab. */
|
|
@@ -67,16 +21,20 @@ declare class TabPattern {
|
|
|
67
21
|
disabled: SignalLike<boolean>;
|
|
68
22
|
/** The html element that should receive focus. */
|
|
69
23
|
element: SignalLike<HTMLElement>;
|
|
70
|
-
/**
|
|
71
|
-
|
|
24
|
+
/** Whether this tab has expandable content. */
|
|
25
|
+
expandable: SignalLike<boolean>;
|
|
26
|
+
/** The unique identifier used by the expansion behavior. */
|
|
27
|
+
expansionId: SignalLike<string>;
|
|
28
|
+
/** Whether the tab is expanded. */
|
|
29
|
+
expanded: SignalLike<boolean>;
|
|
72
30
|
/** Whether the tab is active. */
|
|
73
31
|
active: i0.Signal<boolean>;
|
|
74
32
|
/** Whether the tab is selected. */
|
|
75
33
|
selected: i0.Signal<boolean>;
|
|
76
|
-
/** A tabpanel Id controlled by the tab. */
|
|
77
|
-
controls: i0.Signal<string | undefined>;
|
|
78
34
|
/** The tabindex of the tab. */
|
|
79
35
|
tabindex: i0.Signal<0 | -1>;
|
|
36
|
+
/** The id of the tabpanel associated with the tab. */
|
|
37
|
+
controls: i0.Signal<string | undefined>;
|
|
80
38
|
constructor(inputs: TabInputs);
|
|
81
39
|
}
|
|
82
40
|
/** The required inputs for the tabpanel. */
|
|
@@ -87,12 +45,11 @@ interface TabPanelInputs {
|
|
|
87
45
|
}
|
|
88
46
|
/** A tabpanel associated with a tab. */
|
|
89
47
|
declare class TabPanelPattern {
|
|
48
|
+
readonly inputs: TabPanelInputs;
|
|
90
49
|
/** A global unique identifier for the tabpanel. */
|
|
91
50
|
id: SignalLike<string>;
|
|
92
51
|
/** A local unique identifier for the tabpanel. */
|
|
93
52
|
value: SignalLike<string>;
|
|
94
|
-
/** Represents the expansion state for the tabpanel. */
|
|
95
|
-
expansionPanel: ExpansionPanel;
|
|
96
53
|
/** Whether the tabpanel is hidden. */
|
|
97
54
|
hidden: i0.Signal<boolean>;
|
|
98
55
|
constructor(inputs: TabPanelInputs);
|
|
@@ -100,14 +57,9 @@ declare class TabPanelPattern {
|
|
|
100
57
|
/** The selection operations that the tablist can perform. */
|
|
101
58
|
interface SelectOptions {
|
|
102
59
|
select?: boolean;
|
|
103
|
-
toggle?: boolean;
|
|
104
|
-
toggleOne?: boolean;
|
|
105
|
-
selectOne?: boolean;
|
|
106
60
|
}
|
|
107
61
|
/** The required inputs for the tablist. */
|
|
108
|
-
type TabListInputs = ListNavigationInputs<TabPattern> & Omit<ListSelectionInputs<TabPattern, string>, 'multi'> & ListFocusInputs<TabPattern> &
|
|
109
|
-
disabled: SignalLike<boolean>;
|
|
110
|
-
};
|
|
62
|
+
type TabListInputs = ListNavigationInputs<TabPattern> & Omit<ListSelectionInputs<TabPattern, string>, 'multi'> & ListFocusInputs<TabPattern> & Omit<ListExpansionInputs, 'multiExpandable' | 'expandedIds' | 'items'>;
|
|
111
63
|
/** Controls the state of a tablist. */
|
|
112
64
|
declare class TabListPattern {
|
|
113
65
|
readonly inputs: TabListInputs;
|
|
@@ -117,6 +69,8 @@ declare class TabListPattern {
|
|
|
117
69
|
selection: ListSelection<TabPattern, string>;
|
|
118
70
|
/** Controls focus for the tablist. */
|
|
119
71
|
focusManager: ListFocus<TabPattern>;
|
|
72
|
+
/** Controls expansion for the tablist. */
|
|
73
|
+
expansionManager: ListExpansion;
|
|
120
74
|
/** Whether the tablist is vertically or horizontally oriented. */
|
|
121
75
|
orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
122
76
|
/** Whether the tablist is disabled. */
|
|
@@ -151,7 +105,7 @@ declare class TabListPattern {
|
|
|
151
105
|
/** Navigates to the given item in the tablist. */
|
|
152
106
|
goto(event: PointerEvent, opts?: SelectOptions): void;
|
|
153
107
|
/** Handles updating selection for the tablist. */
|
|
154
|
-
private
|
|
108
|
+
private _select;
|
|
155
109
|
private _getItem;
|
|
156
110
|
}
|
|
157
111
|
|
package/ui-patterns/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export { L as ListboxInputs, a as ListboxPattern, O as OptionInputs, b as OptionPattern } from '../listbox.d-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { L as ListboxInputs, a as ListboxPattern, O as OptionInputs, b as OptionPattern } from '../listbox.d-C8oz9si7.js';
|
|
2
|
+
export { b as RadioButtonInputs, c as RadioButtonPattern, R as RadioGroupInputs, a as RadioGroupPattern } from '../radio-group.d-C3xIREax.js';
|
|
3
|
+
export { S as SignalLike, W as WritableSignalLike, c as convertGetterSetterToWritableSignalLike } from '../list-navigation.d-Br99p_2O.js';
|
|
4
|
+
export { T as TabInputs, d as TabListInputs, e as TabListPattern, b as TabPanelInputs, c as TabPanelPattern, a as TabPattern } from '../tabs.d-CBlJ33jz.js';
|
|
5
|
+
export { A as AccordionGroupInputs, a as AccordionGroupPattern, d as AccordionPanelInputs, e as AccordionPanelPattern, b as AccordionTriggerInputs, c as AccordionTriggerPattern } from '../accordion.d-LmKAOYNE.js';
|
|
4
6
|
import '@angular/core';
|
|
7
|
+
import '../list-selection.d-BQWRFJI-.js';
|
|
8
|
+
import '../expansion.d-DB4i_1Aa.js';
|