@angular/cdk-experimental 21.0.0-next.5 → 21.0.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/fesm2022/{polyfill.mjs → _polyfill-chunk.mjs} +1 -1
  2. package/fesm2022/_polyfill-chunk.mjs.map +1 -0
  3. package/fesm2022/cdk-experimental.mjs +1 -1
  4. package/fesm2022/cdk-experimental.mjs.map +1 -1
  5. package/fesm2022/column-resize.mjs +1 -1
  6. package/fesm2022/popover-edit.mjs +1 -1
  7. package/package.json +10 -45
  8. package/{column-resize/index.d.ts → types/column-resize.d.ts} +37 -37
  9. package/{popover-edit/index.d.ts → types/popover-edit.d.ts} +30 -30
  10. package/{scrolling/index.d.ts → types/scrolling.d.ts} +6 -6
  11. package/{selection/index.d.ts → types/selection.d.ts} +14 -14
  12. package/{table-scroll-container/index.d.ts → types/table-scroll-container.d.ts} +6 -6
  13. package/accordion/index.d.ts +0 -94
  14. package/accordion.d.d.ts +0 -89
  15. package/combobox/index.d.ts +0 -94
  16. package/deferred-content/index.d.ts +0 -37
  17. package/expansion.d.d.ts +0 -71
  18. package/fesm2022/accordion.mjs +0 -194
  19. package/fesm2022/accordion.mjs.map +0 -1
  20. package/fesm2022/accordion2.mjs +0 -152
  21. package/fesm2022/accordion2.mjs.map +0 -1
  22. package/fesm2022/combobox.mjs +0 -340
  23. package/fesm2022/combobox.mjs.map +0 -1
  24. package/fesm2022/deferred-content.mjs +0 -59
  25. package/fesm2022/deferred-content.mjs.map +0 -1
  26. package/fesm2022/expansion.mjs +0 -87
  27. package/fesm2022/expansion.mjs.map +0 -1
  28. package/fesm2022/list-navigation.mjs +0 -261
  29. package/fesm2022/list-navigation.mjs.map +0 -1
  30. package/fesm2022/list.mjs +0 -370
  31. package/fesm2022/list.mjs.map +0 -1
  32. package/fesm2022/listbox.mjs +0 -163
  33. package/fesm2022/listbox.mjs.map +0 -1
  34. package/fesm2022/option.mjs +0 -231
  35. package/fesm2022/option.mjs.map +0 -1
  36. package/fesm2022/polyfill.mjs.map +0 -1
  37. package/fesm2022/radio-group.mjs +0 -205
  38. package/fesm2022/radio-group.mjs.map +0 -1
  39. package/fesm2022/radio-group2.mjs +0 -143
  40. package/fesm2022/radio-group2.mjs.map +0 -1
  41. package/fesm2022/tabs.mjs +0 -302
  42. package/fesm2022/tabs.mjs.map +0 -1
  43. package/fesm2022/tabs2.mjs +0 -211
  44. package/fesm2022/tabs2.mjs.map +0 -1
  45. package/fesm2022/toolbar.mjs +0 -171
  46. package/fesm2022/toolbar.mjs.map +0 -1
  47. package/fesm2022/toolbar2.mjs +0 -224
  48. package/fesm2022/toolbar2.mjs.map +0 -1
  49. package/fesm2022/tree.mjs +0 -620
  50. package/fesm2022/tree.mjs.map +0 -1
  51. package/fesm2022/ui-patterns.mjs +0 -21
  52. package/fesm2022/ui-patterns.mjs.map +0 -1
  53. package/list.d.d.ts +0 -207
  54. package/listbox/index.d.ts +0 -89
  55. package/listbox.d.d.ts +0 -101
  56. package/pointer-event-manager.d.d.ts +0 -190
  57. package/radio-group/index.d.ts +0 -87
  58. package/radio-group.d.d.ts +0 -80
  59. package/tabs/index.d.ts +0 -159
  60. package/tabs.d.d.ts +0 -137
  61. package/toolbar/index.d.ts +0 -91
  62. package/toolbar.d.d.ts +0 -136
  63. package/tree/index.d.ts +0 -275
  64. package/ui-patterns/index.d.ts +0 -9
  65. /package/{index.d.ts → types/cdk-experimental.d.ts} +0 -0
@@ -1,190 +0,0 @@
1
- import * as _angular_core from '@angular/core';
2
-
3
- type SignalLike<T> = () => T;
4
- interface WritableSignalLike<T> extends SignalLike<T> {
5
- set(value: T): void;
6
- update(updateFn: (value: T) => T): void;
7
- }
8
- /** Converts a getter setter style signal to a WritableSignalLike. */
9
- declare function convertGetterSetterToWritableSignalLike<T>(getter: () => T, setter: (v: T) => void): WritableSignalLike<T>;
10
-
11
- /** Represents an item in a collection, such as a listbox option, than may receive focus. */
12
- interface ListFocusItem {
13
- /** A unique identifier for the item. */
14
- id: SignalLike<string>;
15
- /** The html element that should receive focus. */
16
- element: SignalLike<HTMLElement>;
17
- /** Whether an item is disabled. */
18
- disabled: SignalLike<boolean>;
19
- /** The index of the item in the list. */
20
- index: SignalLike<number>;
21
- }
22
- /** Represents the required inputs for a collection that contains focusable items. */
23
- interface ListFocusInputs<T extends ListFocusItem> {
24
- /** The focus strategy used by the list. */
25
- focusMode: SignalLike<'roving' | 'activedescendant'>;
26
- /** Whether the list is disabled. */
27
- disabled: SignalLike<boolean>;
28
- /** The items in the list. */
29
- items: SignalLike<T[]>;
30
- /** The active item. */
31
- activeItem: WritableSignalLike<T | undefined>;
32
- /** Whether disabled items in the list should be skipped when navigating. */
33
- skipDisabled: SignalLike<boolean>;
34
- element: SignalLike<HTMLElement | undefined>;
35
- }
36
- /** Controls focus for a list of items. */
37
- declare class ListFocus<T extends ListFocusItem> {
38
- readonly inputs: ListFocusInputs<T>;
39
- /** The last item that was active. */
40
- prevActiveItem: _angular_core.WritableSignal<T | undefined>;
41
- /** The index of the last item that was active. */
42
- prevActiveIndex: _angular_core.Signal<number>;
43
- /** The current active index in the list. */
44
- activeIndex: _angular_core.Signal<number>;
45
- constructor(inputs: ListFocusInputs<T>);
46
- /** Whether the list is in a disabled state. */
47
- isListDisabled(): boolean;
48
- /** The id of the current active item. */
49
- getActiveDescendant(): string | undefined;
50
- /** The tabindex for the list. */
51
- getListTabindex(): -1 | 0;
52
- /** Returns the tabindex for the given item. */
53
- getItemTabindex(item: T): -1 | 0;
54
- /** Moves focus to the given item if it is focusable. */
55
- focus(item: T): boolean;
56
- /** Returns true if the given item can be navigated to. */
57
- isFocusable(item: T): boolean;
58
- }
59
-
60
- /** Represents an item in a collection, such as a listbox option, than can be navigated to. */
61
- interface ListNavigationItem extends ListFocusItem {
62
- }
63
- /** Represents the required inputs for a collection that has navigable items. */
64
- interface ListNavigationInputs<T extends ListNavigationItem> extends ListFocusInputs<T> {
65
- /** Whether focus should wrap when navigating. */
66
- wrap: SignalLike<boolean>;
67
- /** Whether the list is vertically or horizontally oriented. */
68
- orientation: SignalLike<'vertical' | 'horizontal'>;
69
- /** The direction that text is read based on the users locale. */
70
- textDirection: SignalLike<'rtl' | 'ltr'>;
71
- }
72
- /** Controls navigation for a list of items. */
73
- declare class ListNavigation<T extends ListNavigationItem> {
74
- readonly inputs: ListNavigationInputs<T> & {
75
- focusManager: ListFocus<T>;
76
- };
77
- constructor(inputs: ListNavigationInputs<T> & {
78
- focusManager: ListFocus<T>;
79
- });
80
- /** Navigates to the given item. */
81
- goto(item?: T): boolean;
82
- /** Navigates to the next item in the list. */
83
- next(): boolean;
84
- /** Navigates to the previous item in the list. */
85
- prev(): boolean;
86
- /** Navigates to the first item in the list. */
87
- first(): boolean;
88
- /** Navigates to the last item in the list. */
89
- last(): boolean;
90
- /** Advances to the next or previous focusable item in the list based on the given delta. */
91
- private _advance;
92
- }
93
-
94
- /**
95
- * Options that are applicable to all event handlers.
96
- *
97
- * This library has not yet had a need for stopPropagationImmediate.
98
- */
99
- interface EventHandlerOptions {
100
- stopPropagation: boolean;
101
- preventDefault: boolean;
102
- }
103
- /** A basic event handler. */
104
- type EventHandler<T extends Event> = (event: T) => void;
105
- /** A function that determines whether an event is to be handled. */
106
- type EventMatcher<T extends Event> = (event: T) => boolean;
107
- /** A config that specifies how to handle a particular event. */
108
- interface EventHandlerConfig<T extends Event> extends EventHandlerOptions {
109
- matcher: EventMatcher<T>;
110
- handler: EventHandler<T>;
111
- }
112
- /** Bit flag representation of the possible modifier keys that can be present on an event. */
113
- declare enum Modifier {
114
- None = 0,
115
- Ctrl = 1,
116
- Shift = 2,
117
- Alt = 4,
118
- Meta = 8,
119
- Any = "Any"
120
- }
121
- type ModifierInputs = Modifier | Modifier[];
122
- /**
123
- * Abstract base class for all event managers.
124
- *
125
- * Event managers are designed to normalize how event handlers are authored and create a safety net
126
- * for common event handling gotchas like remembering to call preventDefault or stopPropagation.
127
- */
128
- declare abstract class EventManager<T extends Event> {
129
- protected configs: EventHandlerConfig<T>[];
130
- abstract options: EventHandlerOptions;
131
- /** Runs the handlers that match with the given event. */
132
- handle(event: T): void;
133
- /** Configures the event manager to handle specific events. (See subclasses for more). */
134
- abstract on(...args: [...unknown[]]): this;
135
- }
136
-
137
- /**
138
- * Used to represent a keycode.
139
- *
140
- * This is used to match whether an events keycode should be handled. The ability to match using a
141
- * string, SignalLike, or Regexp gives us more flexibility when authoring event handlers.
142
- */
143
- type KeyCode = string | SignalLike<string> | RegExp;
144
- /**
145
- * An event manager that is specialized for handling keyboard events. By default this manager stops
146
- * propagation and prevents default on all events it handles.
147
- */
148
- declare class KeyboardEventManager<T extends KeyboardEvent> extends EventManager<T> {
149
- options: EventHandlerOptions;
150
- /** Configures this event manager to handle events with a specific key and no modifiers. */
151
- on(key: KeyCode, handler: EventHandler<T>): this;
152
- /** Configures this event manager to handle events with a specific modifer and key combination. */
153
- on(modifiers: ModifierInputs, key: KeyCode, handler: EventHandler<T>): this;
154
- private _normalizeInputs;
155
- private _isMatch;
156
- }
157
-
158
- /**
159
- * The different mouse buttons that may appear on a pointer event.
160
- */
161
- declare enum MouseButton {
162
- Main = 0,
163
- Auxiliary = 1,
164
- Secondary = 2
165
- }
166
- /** An event manager that is specialized for handling pointer events. */
167
- declare class PointerEventManager<T extends PointerEvent> extends EventManager<T> {
168
- options: EventHandlerOptions;
169
- /**
170
- * Configures this event manager to handle events with a specific modifer and mouse button
171
- * combination.
172
- */
173
- on(button: MouseButton, modifiers: ModifierInputs, handler: EventHandler<T>): this;
174
- /**
175
- * Configures this event manager to handle events with a specific mouse button and no modifiers.
176
- */
177
- on(modifiers: ModifierInputs, handler: EventHandler<T>): this;
178
- /**
179
- * Configures this event manager to handle events with the main mouse button and no modifiers.
180
- *
181
- * @param handler The handler function
182
- * @param options Options for whether to stop propagation or prevent default.
183
- */
184
- on(handler: EventHandler<T>): this;
185
- private _normalizeInputs;
186
- _isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs): boolean;
187
- }
188
-
189
- export { KeyboardEventManager, ListFocus, ListNavigation, PointerEventManager, convertGetterSetterToWritableSignalLike };
190
- export type { ListFocusInputs, ListFocusItem, ListNavigationInputs, ListNavigationItem, SignalLike, WritableSignalLike };
@@ -1,87 +0,0 @@
1
- import * as _angular_core from '@angular/core';
2
- import { WritableSignal, OnDestroy } from '@angular/core';
3
- import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
- import { RadioGroupPattern } from '../radio-group.d.js';
5
- import { RadioButtonPattern } from '../toolbar.d.js';
6
- import { CdkToolbar } from '../toolbar/index.js';
7
- import '../pointer-event-manager.d.js';
8
- import '../list.d.js';
9
-
10
- /**
11
- * A radio button group container.
12
- *
13
- * Radio groups are used to group multiple radio buttons or radio group labels so they function as
14
- * a single form control. The CdkRadioGroup is meant to be used in conjunction with CdkRadioButton
15
- * as follows:
16
- *
17
- * ```html
18
- * <div cdkRadioGroup>
19
- * <label cdkRadioButton value="1">Option 1</label>
20
- * <label cdkRadioButton value="2">Option 2</label>
21
- * <label cdkRadioButton value="3">Option 3</label>
22
- * </div>
23
- * ```
24
- */
25
- declare class CdkRadioGroup<V> {
26
- /** A reference to the radio group element. */
27
- private readonly _elementRef;
28
- /** The CdkRadioButtons nested inside of the CdkRadioGroup. */
29
- private readonly _cdkRadioButtons;
30
- /** A signal wrapper for directionality. */
31
- protected textDirection: WritableSignal<_angular_cdk_bidi.Direction>;
32
- /** A signal wrapper for toolbar. */
33
- toolbar: CdkToolbar<any> | null;
34
- /** Toolbar pattern if applicable */
35
- private readonly _toolbarPattern;
36
- /** The RadioButton UIPatterns of the child CdkRadioButtons. */
37
- protected items: _angular_core.Signal<RadioButtonPattern<any>[]>;
38
- /** Whether the radio group is vertically or horizontally oriented. */
39
- orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
40
- /** Whether disabled items in the group should be skipped when navigating. */
41
- skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
42
- /** The focus strategy used by the radio group. */
43
- focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
44
- /** Whether the radio group is disabled. */
45
- disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
46
- /** Whether the radio group is readonly. */
47
- readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
48
- /** The value of the currently selected radio button. */
49
- value: _angular_core.ModelSignal<V | null>;
50
- /** The internal selection state for the radio group. */
51
- private readonly _value;
52
- /** The RadioGroup UIPattern. */
53
- pattern: RadioGroupPattern<V>;
54
- /** Whether the radio group has received focus yet. */
55
- private _hasFocused;
56
- constructor();
57
- onFocus(): void;
58
- toolbarButtonUnregister(radio: CdkRadioButton<V>): void;
59
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkRadioGroup<any>, never>;
60
- static ɵdir: _angular_core.ɵɵ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>;
61
- }
62
- /** A selectable radio button in a CdkRadioGroup. */
63
- declare class CdkRadioButton<V> implements OnDestroy {
64
- /** A reference to the radio button element. */
65
- private readonly _elementRef;
66
- /** The parent CdkRadioGroup. */
67
- private readonly _cdkRadioGroup;
68
- /** A unique identifier for the radio button. */
69
- private readonly _generatedId;
70
- /** A unique identifier for the radio button. */
71
- protected id: _angular_core.Signal<string>;
72
- /** The value associated with the radio button. */
73
- readonly value: _angular_core.InputSignal<V>;
74
- /** The parent RadioGroup UIPattern. */
75
- protected group: _angular_core.Signal<RadioGroupPattern<any>>;
76
- /** A reference to the radio button element to be focused on navigation. */
77
- element: _angular_core.Signal<any>;
78
- /** Whether the radio button is disabled. */
79
- disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
80
- /** The RadioButton UIPattern. */
81
- pattern: RadioButtonPattern<V>;
82
- ngOnDestroy(): void;
83
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkRadioButton<any>, never>;
84
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkRadioButton<any>, "[cdkRadioButton]", ["cdkRadioButton"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
85
- }
86
-
87
- export { CdkRadioButton, CdkRadioGroup };
@@ -1,80 +0,0 @@
1
- import * as _angular_core from '@angular/core';
2
- import { SignalLike, KeyboardEventManager, PointerEventManager } from './pointer-event-manager.d.js';
3
- import { ListInputs, List } from './list.d.js';
4
- import { RadioButtonPattern } from './toolbar.d.js';
5
-
6
- /** Represents the required inputs for a radio group. */
7
- type RadioGroupInputs<V> = Omit<ListInputs<RadioButtonPattern<V>, V>, 'multi' | 'selectionMode' | 'wrap' | 'typeaheadDelay'> & {
8
- /** Whether the radio group is disabled. */
9
- disabled: SignalLike<boolean>;
10
- /** Whether the radio group is readonly. */
11
- readonly: SignalLike<boolean>;
12
- /** Parent toolbar of radio group */
13
- toolbar: SignalLike<ToolbarLike<V> | undefined>;
14
- };
15
- /**
16
- * Represents the properties exposed by a toolbar widget that need to be accessed by a radio group.
17
- * This exists to avoid circular dependency errors between the toolbar and radio button.
18
- */
19
- type ToolbarWidgetLike = {
20
- id: SignalLike<string>;
21
- index: SignalLike<number>;
22
- element: SignalLike<HTMLElement>;
23
- disabled: SignalLike<boolean>;
24
- searchTerm: SignalLike<any>;
25
- value: SignalLike<any>;
26
- };
27
- /**
28
- * Represents the properties exposed by a toolbar that need to be accessed by a radio group.
29
- * This exists to avoid circular dependency errors between the toolbar and radio button.
30
- */
31
- interface ToolbarLike<V> {
32
- listBehavior: List<RadioButtonPattern<V> | ToolbarWidgetLike, V>;
33
- orientation: SignalLike<'vertical' | 'horizontal'>;
34
- disabled: SignalLike<boolean>;
35
- }
36
- /** Controls the state of a radio group. */
37
- declare class RadioGroupPattern<V> {
38
- readonly inputs: RadioGroupInputs<V>;
39
- /** The list behavior for the radio group. */
40
- readonly listBehavior: List<RadioButtonPattern<V> | ToolbarWidgetLike, V>;
41
- /** Whether the radio group is vertically or horizontally oriented. */
42
- orientation: SignalLike<'vertical' | 'horizontal'>;
43
- /** Whether the radio group is disabled. */
44
- disabled: _angular_core.Signal<boolean>;
45
- /** The currently selected radio button. */
46
- selectedItem: _angular_core.Signal<ToolbarWidgetLike | RadioButtonPattern<V>>;
47
- /** Whether the radio group is readonly. */
48
- readonly: _angular_core.Signal<boolean>;
49
- /** The tabindex of the radio group. */
50
- tabindex: _angular_core.Signal<0 | -1>;
51
- /** The id of the current active radio button (if using activedescendant). */
52
- activedescendant: _angular_core.Signal<string | undefined>;
53
- /** The key used to navigate to the previous radio button. */
54
- prevKey: _angular_core.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
55
- /** The key used to navigate to the next radio button. */
56
- nextKey: _angular_core.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
57
- /** The keydown event manager for the radio group. */
58
- keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
59
- /** The pointerdown event manager for the radio group. */
60
- pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
61
- constructor(inputs: RadioGroupInputs<V>);
62
- /** Handles keydown events for the radio group. */
63
- onKeydown(event: KeyboardEvent): void;
64
- /** Handles pointerdown events for the radio group. */
65
- onPointerdown(event: PointerEvent): void;
66
- /**
67
- * Sets the radio group to its default initial state.
68
- *
69
- * Sets the active index to the selected radio button if one exists and is focusable.
70
- * Otherwise, sets the active index to the first focusable radio button.
71
- */
72
- setDefaultState(): void;
73
- /** Validates the state of the radio group and returns a list of accessibility violations. */
74
- validate(): string[];
75
- /** Finds the RadioButtonPattern associated with a pointer event target. */
76
- private _getItem;
77
- }
78
-
79
- export { RadioGroupPattern };
80
- export type { RadioGroupInputs, ToolbarLike };
package/tabs/index.d.ts DELETED
@@ -1,159 +0,0 @@
1
- import * as _angular_core from '@angular/core';
2
- import { Signal, OnInit, OnDestroy } from '@angular/core';
3
- import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
- import { TabPattern, TabPanelPattern, TabListPattern } from '../tabs.d.js';
5
- import * as i1 from '@angular/cdk-experimental/deferred-content';
6
- import '../pointer-event-manager.d.js';
7
- import '../expansion.d.js';
8
- import '../list.d.js';
9
-
10
- interface HasElement {
11
- element: Signal<HTMLElement>;
12
- }
13
- /**
14
- * A Tabs container.
15
- *
16
- * Represents a set of layered sections of content. The CdkTabs is a container meant to be used with
17
- * CdkTabList, CdkTab, and CdkTabPanel as follows:
18
- *
19
- * ```html
20
- * <div cdkTabs>
21
- * <ul cdkTabList>
22
- * <li cdkTab value="tab1">Tab 1</li>
23
- * <li cdkTab value="tab2">Tab 2</li>
24
- * <li cdkTab value="tab3">Tab 3</li>
25
- * </ul>
26
- *
27
- * <div cdkTabPanel value="tab1">
28
- * <ng-template cdkTabContent>Tab content 1</ng-template>
29
- * </div>
30
- * <div cdkTabPanel value="tab2">
31
- * <ng-template cdkTabContent>Tab content 2</ng-template>
32
- * </div>
33
- * <div cdkTabPanel value="tab3">
34
- * <ng-template cdkTabContent>Tab content 3</ng-template>
35
- * </div>
36
- * ```
37
- */
38
- declare class CdkTabs {
39
- /** The CdkTabList nested inside of the container. */
40
- private readonly _tablist;
41
- /** The CdkTabPanels nested inside of the container. */
42
- private readonly _unorderedPanels;
43
- /** The Tab UIPattern of the child Tabs. */
44
- tabs: Signal<TabPattern[] | undefined>;
45
- /** The TabPanel UIPattern of the child TabPanels. */
46
- unorderedTabpanels: Signal<TabPanelPattern[]>;
47
- register(child: CdkTabList | CdkTabPanel): void;
48
- deregister(child: CdkTabList | CdkTabPanel): void;
49
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkTabs, never>;
50
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkTabs, "[cdkTabs]", ["cdkTabs"], {}, {}, never, never, true, never>;
51
- }
52
- /**
53
- * A TabList container.
54
- *
55
- * Controls a list of CdkTab(s).
56
- */
57
- declare class CdkTabList implements OnInit, OnDestroy {
58
- /** A reference to the tab list element. */
59
- private readonly _elementRef;
60
- /** The parent CdkTabs. */
61
- private readonly _cdkTabs;
62
- /** The CdkTabs nested inside of the CdkTabList. */
63
- private readonly _unorderedTabs;
64
- /** The internal tab selection state. */
65
- private readonly _selection;
66
- /** Text direction. */
67
- readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
68
- /** The Tab UIPatterns of the child Tabs. */
69
- readonly tabs: Signal<TabPattern[]>;
70
- /** Whether the tablist is vertically or horizontally oriented. */
71
- readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
72
- /** Whether focus should wrap when navigating. */
73
- readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
74
- /** Whether disabled items in the list should be skipped when navigating. */
75
- readonly skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
76
- /** The focus strategy used by the tablist. */
77
- readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
78
- /** The selection strategy used by the tablist. */
79
- readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
80
- /** Whether the tablist is disabled. */
81
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
82
- /** The current selected tab. */
83
- readonly tab: _angular_core.ModelSignal<string | undefined>;
84
- /** The TabList UIPattern. */
85
- readonly pattern: TabListPattern;
86
- /** Whether the tree has received focus yet. */
87
- private _hasFocused;
88
- constructor();
89
- onFocus(): void;
90
- ngOnInit(): void;
91
- ngOnDestroy(): void;
92
- register(child: CdkTab): void;
93
- deregister(child: CdkTab): void;
94
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkTabList, never>;
95
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkTabList, "[cdkTabList]", ["cdkTabList"], { "orientation": { "alias": "orientation"; "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; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "tab": { "alias": "tab"; "required": false; "isSignal": true; }; }, { "tab": "tabChange"; }, never, never, true, never>;
96
- }
97
- /** A selectable tab in a TabList. */
98
- declare class CdkTab implements HasElement, OnInit, OnDestroy {
99
- /** A reference to the tab element. */
100
- private readonly _elementRef;
101
- /** The parent CdkTabs. */
102
- private readonly _cdkTabs;
103
- /** The parent CdkTabList. */
104
- private readonly _cdkTabList;
105
- /** A global unique identifier for the tab. */
106
- private readonly _id;
107
- /** The host native element. */
108
- readonly element: Signal<any>;
109
- /** The parent TabList UIPattern. */
110
- readonly tablist: Signal<TabListPattern>;
111
- /** The TabPanel UIPattern associated with the tab */
112
- readonly tabpanel: Signal<TabPanelPattern | undefined>;
113
- /** Whether a tab is disabled. */
114
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
115
- /** A local unique identifier for the tab. */
116
- readonly value: _angular_core.InputSignal<string>;
117
- /** The Tab UIPattern. */
118
- readonly pattern: TabPattern;
119
- ngOnInit(): void;
120
- ngOnDestroy(): void;
121
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkTab, never>;
122
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkTab, "[cdkTab]", ["cdkTab"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
123
- }
124
- /**
125
- * A TabPanel container for the resources of layered content associated with a tab.
126
- *
127
- * If a tabpanel is hidden due to its corresponding tab is not activated, the `inert` attribute
128
- * will be applied to the tabpanel element to remove it from the accessibility tree and stop
129
- * all the keyboard and pointer interactions. Note that this does not visually hide the tabpenl
130
- * and a proper styling is required.
131
- */
132
- declare class CdkTabPanel implements OnInit, OnDestroy {
133
- /** The DeferredContentAware host directive. */
134
- private readonly _deferredContentAware;
135
- /** The parent CdkTabs. */
136
- private readonly _cdkTabs;
137
- /** A global unique identifier for the tab. */
138
- private readonly _id;
139
- /** The Tab UIPattern associated with the tabpanel */
140
- readonly tab: Signal<TabPattern | undefined>;
141
- /** A local unique identifier for the tabpanel. */
142
- readonly value: _angular_core.InputSignal<string>;
143
- /** The TabPanel UIPattern. */
144
- readonly pattern: TabPanelPattern;
145
- constructor();
146
- ngOnInit(): void;
147
- ngOnDestroy(): void;
148
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkTabPanel, never>;
149
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkTabPanel, "[cdkTabPanel]", ["cdkTabPanel"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
150
- }
151
- /**
152
- * A TabContent container for the lazy-loaded content.
153
- */
154
- declare class CdkTabContent {
155
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkTabContent, never>;
156
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkTabContent, "ng-template[cdkTabContent]", ["cdTabContent"], {}, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
157
- }
158
-
159
- export { CdkTab, CdkTabContent, CdkTabList, CdkTabPanel, CdkTabs };
package/tabs.d.d.ts DELETED
@@ -1,137 +0,0 @@
1
- import * as _angular_core from '@angular/core';
2
- import { SignalLike, KeyboardEventManager, PointerEventManager } from './pointer-event-manager.d.js';
3
- import { ExpansionItem, ExpansionControl, ListExpansionInputs, ListExpansion } from './expansion.d.js';
4
- import { ListItem, ListInputs, List } from './list.d.js';
5
-
6
- /** Represents the required inputs for the label control. */
7
- interface LabelControlInputs {
8
- /** The default `aria-labelledby` ids. */
9
- defaultLabelledBy: SignalLike<string[]>;
10
- }
11
- /** Represents the optional inputs for the label control. */
12
- interface LabelControlOptionalInputs {
13
- /** The `aria-label`. */
14
- label?: SignalLike<string | undefined>;
15
- /** The user-provided `aria-labelledby` ids. */
16
- labelledBy?: SignalLike<string[]>;
17
- }
18
- /** Controls label and description of an element. */
19
- declare class LabelControl {
20
- readonly inputs: LabelControlInputs & LabelControlOptionalInputs;
21
- /** The `aria-label`. */
22
- readonly label: _angular_core.Signal<string | undefined>;
23
- /** The `aria-labelledby` ids. */
24
- readonly labelledBy: _angular_core.Signal<string[]>;
25
- constructor(inputs: LabelControlInputs & LabelControlOptionalInputs);
26
- }
27
-
28
- /** The required inputs to tabs. */
29
- interface TabInputs extends Omit<ListItem<string>, 'searchTerm' | 'index'>, Omit<ExpansionItem, 'expansionId' | 'expandable'> {
30
- /** The parent tablist that controls the tab. */
31
- tablist: SignalLike<TabListPattern>;
32
- /** The remote tabpanel controlled by the tab. */
33
- tabpanel: SignalLike<TabPanelPattern | undefined>;
34
- }
35
- /** A tab in a tablist. */
36
- declare class TabPattern {
37
- readonly inputs: TabInputs;
38
- /** Controls expansion for this tab. */
39
- readonly expansion: ExpansionControl;
40
- /** A global unique identifier for the tab. */
41
- readonly id: SignalLike<string>;
42
- /** The index of the tab. */
43
- readonly index: _angular_core.Signal<number>;
44
- /** A local unique identifier for the tab. */
45
- readonly value: SignalLike<string>;
46
- /** Whether the tab is disabled. */
47
- readonly disabled: SignalLike<boolean>;
48
- /** The html element that should receive focus. */
49
- readonly element: SignalLike<HTMLElement>;
50
- /** The text used by the typeahead search. */
51
- readonly searchTerm: () => string;
52
- /** Whether this tab has expandable content. */
53
- readonly expandable: _angular_core.Signal<boolean>;
54
- /** The unique identifier used by the expansion behavior. */
55
- readonly expansionId: _angular_core.Signal<string>;
56
- /** Whether the tab is expanded. */
57
- readonly expanded: _angular_core.Signal<boolean>;
58
- /** Whether the tab is active. */
59
- readonly active: _angular_core.Signal<boolean>;
60
- /** Whether the tab is selected. */
61
- readonly selected: _angular_core.Signal<boolean>;
62
- /** The tabindex of the tab. */
63
- readonly tabindex: _angular_core.Signal<0 | -1>;
64
- /** The id of the tabpanel associated with the tab. */
65
- readonly controls: _angular_core.Signal<string | undefined>;
66
- constructor(inputs: TabInputs);
67
- }
68
- /** The required inputs for the tabpanel. */
69
- interface TabPanelInputs extends LabelControlOptionalInputs {
70
- id: SignalLike<string>;
71
- tab: SignalLike<TabPattern | undefined>;
72
- value: SignalLike<string>;
73
- }
74
- /** A tabpanel associated with a tab. */
75
- declare class TabPanelPattern {
76
- readonly inputs: TabPanelInputs;
77
- /** A global unique identifier for the tabpanel. */
78
- readonly id: SignalLike<string>;
79
- /** A local unique identifier for the tabpanel. */
80
- readonly value: SignalLike<string>;
81
- /** Controls label for this tabpanel. */
82
- readonly labelManager: LabelControl;
83
- /** Whether the tabpanel is hidden. */
84
- readonly hidden: _angular_core.Signal<boolean>;
85
- /** The tabindex of this tabpanel. */
86
- readonly tabindex: _angular_core.Signal<0 | -1>;
87
- /** The aria-labelledby value for this tabpanel. */
88
- readonly labelledBy: _angular_core.Signal<string | undefined>;
89
- constructor(inputs: TabPanelInputs);
90
- }
91
- /** The required inputs for the tablist. */
92
- type TabListInputs = Omit<ListInputs<TabPattern, string>, 'multi' | 'typeaheadDelay'> & Omit<ListExpansionInputs, 'multiExpandable' | 'expandedIds' | 'items'>;
93
- /** Controls the state of a tablist. */
94
- declare class TabListPattern {
95
- readonly inputs: TabListInputs;
96
- /** The list behavior for the tablist. */
97
- readonly listBehavior: List<TabPattern, string>;
98
- /** Controls expansion for the tablist. */
99
- readonly expansionManager: ListExpansion;
100
- /** Whether the tablist is vertically or horizontally oriented. */
101
- readonly orientation: SignalLike<'vertical' | 'horizontal'>;
102
- /** Whether the tablist is disabled. */
103
- readonly disabled: SignalLike<boolean>;
104
- /** The tabindex of the tablist. */
105
- readonly tabindex: _angular_core.Signal<0 | -1>;
106
- /** The id of the current active tab. */
107
- readonly activedescendant: _angular_core.Signal<string | undefined>;
108
- /** Whether selection should follow focus. */
109
- readonly followFocus: _angular_core.Signal<boolean>;
110
- /** The key used to navigate to the previous tab in the tablist. */
111
- readonly prevKey: _angular_core.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
112
- /** The key used to navigate to the next item in the list. */
113
- readonly nextKey: _angular_core.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
114
- /** The keydown event manager for the tablist. */
115
- readonly keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
116
- /** The pointerdown event manager for the tablist. */
117
- readonly pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
118
- constructor(inputs: TabListInputs);
119
- /**
120
- * Sets the tablist to its default initial state.
121
- *
122
- * Sets the active index of the tablist to the first focusable selected
123
- * tab if one exists. Otherwise, sets focus to the first focusable tab.
124
- *
125
- * This method should be called once the tablist and its tabs are properly initialized.
126
- */
127
- setDefaultState(): void;
128
- /** Handles keydown events for the tablist. */
129
- onKeydown(event: KeyboardEvent): void;
130
- /** The pointerdown event manager for the tablist. */
131
- onPointerdown(event: PointerEvent): void;
132
- /** Returns the tab item associated with the given pointer event. */
133
- private _getItem;
134
- }
135
-
136
- export { TabListPattern, TabPanelPattern, TabPattern };
137
- export type { TabInputs, TabListInputs, TabPanelInputs };