@angular/cdk-experimental 21.0.0-next.4 → 21.0.0-next.6

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 (89) hide show
  1. package/fesm2022/{accordion2.mjs → _accordion-chunk.mjs} +4 -3
  2. package/fesm2022/_accordion-chunk.mjs.map +1 -0
  3. package/fesm2022/_combobox-chunk.mjs +278 -0
  4. package/fesm2022/_combobox-chunk.mjs.map +1 -0
  5. package/fesm2022/{option.mjs → _combobox-listbox-chunk.mjs} +55 -8
  6. package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -0
  7. package/fesm2022/_combobox-tree-chunk.mjs +398 -0
  8. package/fesm2022/_combobox-tree-chunk.mjs.map +1 -0
  9. package/fesm2022/{expansion.mjs → _expansion-chunk.mjs} +2 -2
  10. package/fesm2022/_expansion-chunk.mjs.map +1 -0
  11. package/fesm2022/{list.mjs → _list-chunk.mjs} +9 -5
  12. package/fesm2022/_list-chunk.mjs.map +1 -0
  13. package/fesm2022/_list-navigation-chunk.mjs +131 -0
  14. package/fesm2022/_list-navigation-chunk.mjs.map +1 -0
  15. package/fesm2022/{list-navigation.mjs → _pointer-event-manager-chunk.mjs} +2 -118
  16. package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -0
  17. package/fesm2022/{polyfill.mjs → _polyfill-chunk.mjs} +1 -1
  18. package/fesm2022/_polyfill-chunk.mjs.map +1 -0
  19. package/fesm2022/{tabs2.mjs → _tabs-chunk.mjs} +4 -4
  20. package/fesm2022/_tabs-chunk.mjs.map +1 -0
  21. package/fesm2022/_toolbar-chunk.mjs +273 -0
  22. package/fesm2022/_toolbar-chunk.mjs.map +1 -0
  23. package/fesm2022/_toolbar-radio-group-chunk.mjs +222 -0
  24. package/fesm2022/_toolbar-radio-group-chunk.mjs.map +1 -0
  25. package/fesm2022/accordion.mjs +4 -3
  26. package/fesm2022/accordion.mjs.map +1 -1
  27. package/fesm2022/cdk-experimental.mjs +1 -1
  28. package/fesm2022/cdk-experimental.mjs.map +1 -1
  29. package/fesm2022/column-resize.mjs +1 -1
  30. package/fesm2022/combobox.mjs +99 -308
  31. package/fesm2022/combobox.mjs.map +1 -1
  32. package/fesm2022/deferred-content.mjs +6 -7
  33. package/fesm2022/deferred-content.mjs.map +1 -1
  34. package/fesm2022/listbox.mjs +53 -12
  35. package/fesm2022/listbox.mjs.map +1 -1
  36. package/fesm2022/popover-edit.mjs +1 -1
  37. package/fesm2022/radio-group.mjs +42 -47
  38. package/fesm2022/radio-group.mjs.map +1 -1
  39. package/fesm2022/tabs.mjs +5 -4
  40. package/fesm2022/tabs.mjs.map +1 -1
  41. package/fesm2022/toolbar.mjs +69 -19
  42. package/fesm2022/toolbar.mjs.map +1 -1
  43. package/fesm2022/tree.mjs +57 -344
  44. package/fesm2022/tree.mjs.map +1 -1
  45. package/fesm2022/ui-patterns.mjs +11 -8
  46. package/fesm2022/ui-patterns.mjs.map +1 -1
  47. package/package.json +18 -18
  48. package/{accordion.d.d.ts → types/_accordion-chunk.d.ts} +3 -2
  49. package/types/_combobox-chunk.d.ts +138 -0
  50. package/{expansion.d.d.ts → types/_expansion-chunk.d.ts} +2 -2
  51. package/{list.d.d.ts → types/_list-chunk.d.ts} +4 -2
  52. package/{pointer-event-manager.d.d.ts → types/_list-navigation-chunk.d.ts} +7 -96
  53. package/{listbox.d.d.ts → types/_listbox-chunk.d.ts} +8 -4
  54. package/types/_pointer-event-manager-chunk.d.ts +98 -0
  55. package/types/_radio-group-chunk.d.ts +92 -0
  56. package/{tabs.d.d.ts → types/_tabs-chunk.d.ts} +4 -3
  57. package/types/_toolbar-chunk.d.ts +150 -0
  58. package/types/_tree-chunk.d.ts +139 -0
  59. package/{accordion/index.d.ts → types/accordion.d.ts} +4 -3
  60. package/types/combobox.d.ts +54 -0
  61. package/{deferred-content/index.d.ts → types/deferred-content.d.ts} +3 -3
  62. package/{listbox/index.d.ts → types/listbox.d.ts} +15 -5
  63. package/{radio-group/index.d.ts → types/radio-group.d.ts} +21 -23
  64. package/{tabs/index.d.ts → types/tabs.d.ts} +5 -4
  65. package/types/toolbar.d.ts +115 -0
  66. package/{tree/index.d.ts → types/tree.d.ts} +17 -137
  67. package/types/ui-patterns.d.ts +157 -0
  68. package/combobox/index.d.ts +0 -94
  69. package/fesm2022/accordion2.mjs.map +0 -1
  70. package/fesm2022/expansion.mjs.map +0 -1
  71. package/fesm2022/list-navigation.mjs.map +0 -1
  72. package/fesm2022/list.mjs.map +0 -1
  73. package/fesm2022/option.mjs.map +0 -1
  74. package/fesm2022/polyfill.mjs.map +0 -1
  75. package/fesm2022/radio-group2.mjs +0 -143
  76. package/fesm2022/radio-group2.mjs.map +0 -1
  77. package/fesm2022/tabs2.mjs.map +0 -1
  78. package/fesm2022/toolbar2.mjs +0 -224
  79. package/fesm2022/toolbar2.mjs.map +0 -1
  80. package/radio-group.d.d.ts +0 -80
  81. package/toolbar/index.d.ts +0 -91
  82. package/toolbar.d.d.ts +0 -136
  83. package/ui-patterns/index.d.ts +0 -9
  84. /package/{index.d.ts → types/cdk-experimental.d.ts} +0 -0
  85. /package/{column-resize/index.d.ts → types/column-resize.d.ts} +0 -0
  86. /package/{popover-edit/index.d.ts → types/popover-edit.d.ts} +0 -0
  87. /package/{scrolling/index.d.ts → types/scrolling.d.ts} +0 -0
  88. /package/{selection/index.d.ts → types/selection.d.ts} +0 -0
  89. /package/{table-scroll-container/index.d.ts → types/table-scroll-container.d.ts} +0 -0
@@ -1,6 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { SignalLike, KeyboardEventManager, PointerEventManager } from './pointer-event-manager.d.js';
3
- import { ListItem, ListInputs, List } from './list.d.js';
2
+ import { SignalLike } from './_list-navigation-chunk.js';
3
+ import { ListItem, ListInputs, List } from './_list-chunk.js';
4
+ import { KeyboardEventManager, PointerEventManager } from './_pointer-event-manager-chunk.js';
4
5
 
5
6
  /**
6
7
  * Represents the properties exposed by a listbox that need to be accessed by an option.
@@ -41,6 +42,9 @@ declare class OptionPattern<V> {
41
42
 
42
43
  /** Represents the required inputs for a listbox. */
43
44
  type ListboxInputs<V> = ListInputs<OptionPattern<V>, V> & {
45
+ /** A unique identifier for the listbox. */
46
+ id: SignalLike<string>;
47
+ /** Whether the listbox is readonly. */
44
48
  readonly: SignalLike<boolean>;
45
49
  };
46
50
  /** Controls the state of a listbox. */
@@ -54,7 +58,7 @@ declare class ListboxPattern<V> {
54
58
  /** Whether the listbox is readonly. */
55
59
  readonly: SignalLike<boolean>;
56
60
  /** The tabindex of the listbox. */
57
- tabindex: _angular_core.Signal<0 | -1>;
61
+ tabindex: SignalLike<-1 | 0>;
58
62
  /** The id of the current active item. */
59
63
  activedescendant: _angular_core.Signal<string | undefined>;
60
64
  /** Whether multiple items in the list can be selected at once. */
@@ -94,7 +98,7 @@ declare class ListboxPattern<V> {
94
98
  * is called.
95
99
  */
96
100
  setDefaultState(): void;
97
- private _getItem;
101
+ protected _getItem(e: PointerEvent): OptionPattern<V> | undefined;
98
102
  }
99
103
 
100
104
  export { ListboxPattern, OptionPattern };
@@ -0,0 +1,98 @@
1
+ import { SignalLike } from './_list-navigation-chunk.js';
2
+
3
+ /**
4
+ * Options that are applicable to all event handlers.
5
+ *
6
+ * This library has not yet had a need for stopPropagationImmediate.
7
+ */
8
+ interface EventHandlerOptions {
9
+ stopPropagation: boolean;
10
+ preventDefault: boolean;
11
+ }
12
+ /** A basic event handler. */
13
+ type EventHandler<T extends Event> = (event: T) => void;
14
+ /** A function that determines whether an event is to be handled. */
15
+ type EventMatcher<T extends Event> = (event: T) => boolean;
16
+ /** A config that specifies how to handle a particular event. */
17
+ interface EventHandlerConfig<T extends Event> extends EventHandlerOptions {
18
+ matcher: EventMatcher<T>;
19
+ handler: EventHandler<T>;
20
+ }
21
+ /** Bit flag representation of the possible modifier keys that can be present on an event. */
22
+ declare enum Modifier {
23
+ None = 0,
24
+ Ctrl = 1,
25
+ Shift = 2,
26
+ Alt = 4,
27
+ Meta = 8,
28
+ Any = "Any"
29
+ }
30
+ type ModifierInputs = Modifier | Modifier[];
31
+ /**
32
+ * Abstract base class for all event managers.
33
+ *
34
+ * Event managers are designed to normalize how event handlers are authored and create a safety net
35
+ * for common event handling gotchas like remembering to call preventDefault or stopPropagation.
36
+ */
37
+ declare abstract class EventManager<T extends Event> {
38
+ protected configs: EventHandlerConfig<T>[];
39
+ abstract options: EventHandlerOptions;
40
+ /** Runs the handlers that match with the given event. */
41
+ handle(event: T): void;
42
+ /** Configures the event manager to handle specific events. (See subclasses for more). */
43
+ abstract on(...args: [...unknown[]]): this;
44
+ }
45
+
46
+ /**
47
+ * Used to represent a keycode.
48
+ *
49
+ * This is used to match whether an events keycode should be handled. The ability to match using a
50
+ * string, SignalLike, or Regexp gives us more flexibility when authoring event handlers.
51
+ */
52
+ type KeyCode = string | SignalLike<string> | RegExp;
53
+ /**
54
+ * An event manager that is specialized for handling keyboard events. By default this manager stops
55
+ * propagation and prevents default on all events it handles.
56
+ */
57
+ declare class KeyboardEventManager<T extends KeyboardEvent> extends EventManager<T> {
58
+ options: EventHandlerOptions;
59
+ /** Configures this event manager to handle events with a specific key and no modifiers. */
60
+ on(key: KeyCode, handler: EventHandler<T>): this;
61
+ /** Configures this event manager to handle events with a specific modifer and key combination. */
62
+ on(modifiers: ModifierInputs, key: KeyCode, handler: EventHandler<T>): this;
63
+ private _normalizeInputs;
64
+ private _isMatch;
65
+ }
66
+
67
+ /**
68
+ * The different mouse buttons that may appear on a pointer event.
69
+ */
70
+ declare enum MouseButton {
71
+ Main = 0,
72
+ Auxiliary = 1,
73
+ Secondary = 2
74
+ }
75
+ /** An event manager that is specialized for handling pointer events. */
76
+ declare class PointerEventManager<T extends PointerEvent> extends EventManager<T> {
77
+ options: EventHandlerOptions;
78
+ /**
79
+ * Configures this event manager to handle events with a specific modifer and mouse button
80
+ * combination.
81
+ */
82
+ on(button: MouseButton, modifiers: ModifierInputs, handler: EventHandler<T>): this;
83
+ /**
84
+ * Configures this event manager to handle events with a specific mouse button and no modifiers.
85
+ */
86
+ on(modifiers: ModifierInputs, handler: EventHandler<T>): this;
87
+ /**
88
+ * Configures this event manager to handle events with the main mouse button and no modifiers.
89
+ *
90
+ * @param handler The handler function
91
+ * @param options Options for whether to stop propagation or prevent default.
92
+ */
93
+ on(handler: EventHandler<T>): this;
94
+ private _normalizeInputs;
95
+ _isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs): boolean;
96
+ }
97
+
98
+ export { KeyboardEventManager, PointerEventManager };
@@ -0,0 +1,92 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { KeyboardEventManager, PointerEventManager } from './_pointer-event-manager-chunk.js';
3
+ import { ListItem, ListInputs, List } from './_list-chunk.js';
4
+ import { SignalLike } from './_list-navigation-chunk.js';
5
+
6
+ /** Represents the required inputs for a radio button in a radio group. */
7
+ interface RadioButtonInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index'> {
8
+ /** A reference to the parent radio group. */
9
+ group: SignalLike<RadioGroupPattern<V> | undefined>;
10
+ }
11
+ /** Represents a radio button within a radio group. */
12
+ declare class RadioButtonPattern<V> {
13
+ readonly inputs: RadioButtonInputs<V>;
14
+ /** A unique identifier for the radio button. */
15
+ readonly id: SignalLike<string>;
16
+ /** The value associated with the radio button. */
17
+ readonly value: SignalLike<V>;
18
+ /** The position of the radio button within the group. */
19
+ readonly index: SignalLike<number>;
20
+ /** Whether the radio button is currently the active one (focused). */
21
+ readonly active: _angular_core.Signal<boolean>;
22
+ /** Whether the radio button is selected. */
23
+ readonly selected: SignalLike<boolean>;
24
+ /** Whether the radio button is disabled. */
25
+ readonly disabled: SignalLike<boolean>;
26
+ /** A reference to the parent radio group. */
27
+ readonly group: SignalLike<RadioGroupPattern<V> | undefined>;
28
+ /** The tabindex of the radio button. */
29
+ readonly tabindex: _angular_core.Signal<0 | -1 | undefined>;
30
+ /** The HTML element associated with the radio button. */
31
+ readonly element: SignalLike<HTMLElement>;
32
+ /** The search term for typeahead. */
33
+ readonly searchTerm: () => string;
34
+ constructor(inputs: RadioButtonInputs<V>);
35
+ }
36
+
37
+ /** Represents the required inputs for a radio group. */
38
+ type RadioGroupInputs<V> = Omit<ListInputs<RadioButtonPattern<V>, V>, 'multi' | 'selectionMode' | 'wrap' | 'typeaheadDelay'> & {
39
+ /** Whether the radio group is disabled. */
40
+ disabled: SignalLike<boolean>;
41
+ /** Whether the radio group is readonly. */
42
+ readonly: SignalLike<boolean>;
43
+ /** A function that returns the radio button associated with a given element. */
44
+ getItem: (e: PointerEvent) => RadioButtonPattern<V> | undefined;
45
+ };
46
+ /** Controls the state of a radio group. */
47
+ declare class RadioGroupPattern<V> {
48
+ readonly inputs: RadioGroupInputs<V>;
49
+ /** The list behavior for the radio group. */
50
+ readonly listBehavior: List<RadioButtonPattern<V>, V>;
51
+ /** Whether the radio group is vertically or horizontally oriented. */
52
+ readonly orientation: SignalLike<'vertical' | 'horizontal'>;
53
+ /** Whether focus should wrap when navigating. */
54
+ readonly wrap: _angular_core.WritableSignal<boolean>;
55
+ /** The selection strategy used by the radio group. */
56
+ readonly selectionMode: _angular_core.WritableSignal<"follow" | "explicit">;
57
+ /** Whether the radio group is disabled. */
58
+ readonly disabled: _angular_core.Signal<boolean>;
59
+ /** The currently selected radio button. */
60
+ readonly selectedItem: _angular_core.Signal<RadioButtonPattern<V>>;
61
+ /** Whether the radio group is readonly. */
62
+ readonly readonly: _angular_core.Signal<boolean>;
63
+ /** The tabindex of the radio group. */
64
+ readonly tabindex: _angular_core.Signal<0 | -1>;
65
+ /** The id of the current active radio button (if using activedescendant). */
66
+ readonly activedescendant: _angular_core.Signal<string | undefined>;
67
+ /** The key used to navigate to the previous radio button. */
68
+ private readonly _prevKey;
69
+ /** The key used to navigate to the next radio button. */
70
+ private readonly _nextKey;
71
+ /** The keydown event manager for the radio group. */
72
+ readonly keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
73
+ /** The pointerdown event manager for the radio group. */
74
+ readonly pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
75
+ constructor(inputs: RadioGroupInputs<V>);
76
+ /** Handles keydown events for the radio group. */
77
+ onKeydown(event: KeyboardEvent): void;
78
+ /** Handles pointerdown events for the radio group. */
79
+ onPointerdown(event: PointerEvent): void;
80
+ /**
81
+ * Sets the radio group to its default initial state.
82
+ *
83
+ * Sets the active index to the selected radio button if one exists and is focusable.
84
+ * Otherwise, sets the active index to the first focusable radio button.
85
+ */
86
+ setDefaultState(): void;
87
+ /** Validates the state of the radio group and returns a list of accessibility violations. */
88
+ validate(): string[];
89
+ }
90
+
91
+ export { RadioButtonPattern, RadioGroupPattern };
92
+ export type { RadioButtonInputs, RadioGroupInputs };
@@ -1,7 +1,8 @@
1
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';
2
+ import { KeyboardEventManager, PointerEventManager } from './_pointer-event-manager-chunk.js';
3
+ import { ExpansionItem, ExpansionControl, ListExpansionInputs, ListExpansion } from './_expansion-chunk.js';
4
+ import { SignalLike } from './_list-navigation-chunk.js';
5
+ import { ListItem, ListInputs, List } from './_list-chunk.js';
5
6
 
6
7
  /** Represents the required inputs for the label control. */
7
8
  interface LabelControlInputs {
@@ -0,0 +1,150 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { SignalLike } from './_list-navigation-chunk.js';
3
+ import { ListItem, ListInputs, List } from './_list-chunk.js';
4
+
5
+ /** Represents the required inputs for a toolbar widget in a toolbar. */
6
+ interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'value' | 'index'> {
7
+ /** A reference to the parent toolbar. */
8
+ toolbar: SignalLike<ToolbarPattern<V>>;
9
+ }
10
+ declare class ToolbarWidgetPattern<V> implements ListItem<V> {
11
+ readonly inputs: ToolbarWidgetInputs<V>;
12
+ /** A unique identifier for the widget. */
13
+ readonly id: SignalLike<string>;
14
+ /** The html element that should receive focus. */
15
+ readonly element: SignalLike<HTMLElement>;
16
+ /** Whether the widget is disabled. */
17
+ readonly disabled: SignalLike<boolean>;
18
+ /** A reference to the parent toolbar. */
19
+ readonly toolbar: SignalLike<ToolbarPattern<V>>;
20
+ /** The tabindex of the widgdet. */
21
+ readonly tabindex: _angular_core.Signal<0 | -1>;
22
+ /** The text used by the typeahead search. */
23
+ readonly searchTerm: () => string;
24
+ /** The value associated with the widget. */
25
+ readonly value: () => V;
26
+ /** The position of the widget within the toolbar. */
27
+ readonly index: _angular_core.Signal<number>;
28
+ /** Whether the widget is currently the active one (focused). */
29
+ readonly active: _angular_core.Signal<boolean>;
30
+ constructor(inputs: ToolbarWidgetInputs<V>);
31
+ }
32
+
33
+ /** An interface that allows sub patterns to expose the necessary controls for the toolbar. */
34
+ interface ToolbarWidgetGroupControls {
35
+ /** Whether the widget group is currently on the first item. */
36
+ isOnFirstItem(): boolean;
37
+ /** Whether the widget group is currently on the last item. */
38
+ isOnLastItem(): boolean;
39
+ /** Navigates to the next widget in the group. */
40
+ next(wrap: boolean): void;
41
+ /** Navigates to the previous widget in the group. */
42
+ prev(wrap: boolean): void;
43
+ /** Navigates to the first widget in the group. */
44
+ first(): void;
45
+ /** Navigates to the last widget in the group. */
46
+ last(): void;
47
+ /** Removes focus from the widget group. */
48
+ unfocus(): void;
49
+ /** Triggers the action of the currently active widget in the group. */
50
+ trigger(): void;
51
+ /** Navigates to the widget targeted by a pointer event. */
52
+ goto(event: PointerEvent): void;
53
+ /** Sets the widget group to its default initial state. */
54
+ setDefaultState(): void;
55
+ }
56
+ /** Represents the required inputs for a toolbar widget group. */
57
+ interface ToolbarWidgetGroupInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'value' | 'index'> {
58
+ /** A reference to the parent toolbar. */
59
+ toolbar: SignalLike<ToolbarPattern<V> | undefined>;
60
+ /** The controls for the sub patterns associated with the toolbar. */
61
+ controls: SignalLike<ToolbarWidgetGroupControls | undefined>;
62
+ }
63
+ /** A group of widgets within a toolbar that provides nested navigation. */
64
+ declare class ToolbarWidgetGroupPattern<V> implements ListItem<V> {
65
+ readonly inputs: ToolbarWidgetGroupInputs<V>;
66
+ /** A unique identifier for the widget. */
67
+ readonly id: SignalLike<string>;
68
+ /** The html element that should receive focus. */
69
+ readonly element: SignalLike<HTMLElement>;
70
+ /** Whether the widget is disabled. */
71
+ readonly disabled: SignalLike<boolean>;
72
+ /** A reference to the parent toolbar. */
73
+ readonly toolbar: SignalLike<ToolbarPattern<V> | undefined>;
74
+ /** The text used by the typeahead search. */
75
+ readonly searchTerm: () => string;
76
+ /** The value associated with the widget. */
77
+ readonly value: () => V;
78
+ /** The position of the widget within the toolbar. */
79
+ readonly index: _angular_core.Signal<number>;
80
+ /** The actions that can be performed on the widget group. */
81
+ readonly controls: SignalLike<ToolbarWidgetGroupControls>;
82
+ /** Default toolbar widget group controls when no controls provided. */
83
+ private readonly _defaultControls;
84
+ constructor(inputs: ToolbarWidgetGroupInputs<V>);
85
+ }
86
+
87
+ /** Represents the required inputs for a toolbar. */
88
+ type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'value' | 'selectionMode' | 'focusMode'> & {
89
+ /** A function that returns the toolbar item associated with a given element. */
90
+ getItem: (e: Element) => ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V> | undefined;
91
+ };
92
+ /** Controls the state of a toolbar. */
93
+ declare class ToolbarPattern<V> {
94
+ readonly inputs: ToolbarInputs<V>;
95
+ /** The list behavior for the toolbar. */
96
+ readonly listBehavior: List<ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>, V>;
97
+ /** Whether the tablist is vertically or horizontally oriented. */
98
+ readonly orientation: SignalLike<'vertical' | 'horizontal'>;
99
+ /** Whether disabled items in the group should be skipped when navigating. */
100
+ readonly skipDisabled: SignalLike<boolean>;
101
+ /** Whether the toolbar is disabled. */
102
+ readonly disabled: _angular_core.Signal<boolean>;
103
+ /** The tabindex of the toolbar (if using activedescendant). */
104
+ readonly tabindex: _angular_core.Signal<0 | -1>;
105
+ /** The id of the current active widget (if using activedescendant). */
106
+ readonly activedescendant: _angular_core.Signal<string | undefined>;
107
+ /** The key used to navigate to the previous widget. */
108
+ private readonly _prevKey;
109
+ /** The key used to navigate to the next widget. */
110
+ private readonly _nextKey;
111
+ /** The alternate key used to navigate to the previous widget. */
112
+ private readonly _altPrevKey;
113
+ /** The alternate key used to navigate to the next widget. */
114
+ private readonly _altNextKey;
115
+ /** The keydown event manager for the toolbar. */
116
+ private readonly _keydown;
117
+ /** The pointerdown event manager for the toolbar. */
118
+ private readonly _pointerdown;
119
+ /** Navigates to the next widget in the toolbar. */
120
+ private _next;
121
+ /** Navigates to the previous widget in the toolbar. */
122
+ private _prev;
123
+ private _groupNext;
124
+ private _groupPrev;
125
+ /** Triggers the action of the currently active widget. */
126
+ private _trigger;
127
+ /** Navigates to the first widget in the toolbar. */
128
+ private _first;
129
+ /** Navigates to the last widget in the toolbar. */
130
+ private _last;
131
+ /** Navigates to the widget targeted by a pointer event. */
132
+ private _goto;
133
+ constructor(inputs: ToolbarInputs<V>);
134
+ /** Handles keydown events for the toolbar. */
135
+ onKeydown(event: KeyboardEvent): void;
136
+ /** Handles pointerdown events for the toolbar. */
137
+ onPointerdown(event: PointerEvent): void;
138
+ /**
139
+ * Sets the toolbar to its default initial state.
140
+ *
141
+ * Sets the active index to the selected widget if one exists and is focusable.
142
+ * Otherwise, sets the active index to the first focusable widget.
143
+ */
144
+ setDefaultState(): void;
145
+ /** Validates the state of the toolbar and returns a list of accessibility violations. */
146
+ validate(): string[];
147
+ }
148
+
149
+ export { ToolbarPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern };
150
+ export type { ToolbarInputs, ToolbarWidgetGroupControls, ToolbarWidgetGroupInputs, ToolbarWidgetInputs };
@@ -0,0 +1,139 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { SignalLike } from './_list-navigation-chunk.js';
3
+ import { ListItem, ListInputs, List } from './_list-chunk.js';
4
+ import { ExpansionItem, ListExpansion, ExpansionControl } from './_expansion-chunk.js';
5
+ import { KeyboardEventManager, PointerEventManager } from './_pointer-event-manager-chunk.js';
6
+
7
+ /** Represents the required inputs for a tree item. */
8
+ interface TreeItemInputs<V> extends Omit<ListItem<V>, 'index'> {
9
+ /** The parent item. */
10
+ parent: SignalLike<TreeItemPattern<V> | TreePattern<V>>;
11
+ /** Whether this item has children. Children can be lazily loaded. */
12
+ hasChildren: SignalLike<boolean>;
13
+ /** The children items. */
14
+ children: SignalLike<TreeItemPattern<V>[]>;
15
+ /** The tree pattern this item belongs to. */
16
+ tree: SignalLike<TreePattern<V>>;
17
+ }
18
+ interface TreeItemPattern<V> extends TreeItemInputs<V> {
19
+ }
20
+ /**
21
+ * Represents an item in a Tree.
22
+ */
23
+ declare class TreeItemPattern<V> implements ExpansionItem {
24
+ readonly inputs: TreeItemInputs<V>;
25
+ /** The position of this item among its siblings. */
26
+ readonly index: _angular_core.Signal<number>;
27
+ /** The unique identifier used by the expansion behavior. */
28
+ readonly expansionId: SignalLike<string>;
29
+ /** Controls expansion for child items. */
30
+ readonly expansionManager: ListExpansion;
31
+ /** Controls expansion for this item. */
32
+ readonly expansion: ExpansionControl;
33
+ /** Whether the item is expandable. It's expandable if children item exist. */
34
+ readonly expandable: SignalLike<boolean>;
35
+ /** The level of the current item in a tree. */
36
+ readonly level: SignalLike<number>;
37
+ /** Whether this item is currently expanded. */
38
+ readonly expanded: _angular_core.Signal<boolean>;
39
+ /** Whether this item is visible. */
40
+ readonly visible: _angular_core.Signal<boolean>;
41
+ /** The number of items under the same parent at the same level. */
42
+ readonly setsize: _angular_core.Signal<number>;
43
+ /** The position of this item among its siblings (1-based). */
44
+ readonly posinset: _angular_core.Signal<number>;
45
+ /** Whether the item is active. */
46
+ readonly active: _angular_core.Signal<boolean>;
47
+ /** The tabindex of the item. */
48
+ readonly tabindex: _angular_core.Signal<0 | -1>;
49
+ /** Whether the item is selected. */
50
+ readonly selected: _angular_core.Signal<boolean | undefined>;
51
+ /** The current type of this item. */
52
+ readonly current: _angular_core.Signal<"page" | "step" | "location" | "date" | "time" | "true" | "false" | undefined>;
53
+ constructor(inputs: TreeItemInputs<V>);
54
+ }
55
+ /** The selection operations that the tree can perform. */
56
+ interface SelectOptions {
57
+ toggle?: boolean;
58
+ selectOne?: boolean;
59
+ selectRange?: boolean;
60
+ anchor?: boolean;
61
+ }
62
+ /** Represents the required inputs for a tree. */
63
+ interface TreeInputs<V> extends Omit<ListInputs<TreeItemPattern<V>, V>, 'items'> {
64
+ /** A unique identifier for the tree. */
65
+ id: SignalLike<string>;
66
+ /** All items in the tree, in document order (DFS-like, a flattened list). */
67
+ allItems: SignalLike<TreeItemPattern<V>[]>;
68
+ /** Whether the tree is in navigation mode. */
69
+ nav: SignalLike<boolean>;
70
+ /** The aria-current type. */
71
+ currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;
72
+ }
73
+ interface TreePattern<V> extends TreeInputs<V> {
74
+ }
75
+ /** Controls the state and interactions of a tree view. */
76
+ declare class TreePattern<V> {
77
+ readonly inputs: TreeInputs<V>;
78
+ /** The list behavior for the tree. */
79
+ readonly listBehavior: List<TreeItemPattern<V>, V>;
80
+ /** Controls expansion for direct children of the tree root (top-level items). */
81
+ readonly expansionManager: ListExpansion;
82
+ /** The root level is 0. */
83
+ readonly level: () => number;
84
+ /** The root is always expanded. */
85
+ readonly expanded: () => boolean;
86
+ /** The tabindex of the tree. */
87
+ tabindex: SignalLike<-1 | 0>;
88
+ /** The id of the current active item. */
89
+ readonly activedescendant: _angular_core.Signal<string | undefined>;
90
+ /** The direct children of the root (top-level tree items). */
91
+ readonly children: _angular_core.Signal<TreeItemPattern<V>[]>;
92
+ /** All currently visible tree items. An item is visible if their parent is expanded. */
93
+ readonly visibleItems: _angular_core.Signal<TreeItemPattern<V>[]>;
94
+ /** Whether the tree selection follows focus. */
95
+ readonly followFocus: _angular_core.Signal<boolean>;
96
+ /** The key for navigating to the previous item. */
97
+ readonly prevKey: _angular_core.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
98
+ /** The key for navigating to the next item. */
99
+ readonly nextKey: _angular_core.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
100
+ /** The key for collapsing an item or moving to its parent. */
101
+ readonly collapseKey: _angular_core.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
102
+ /** The key for expanding an item or moving to its first child. */
103
+ readonly expandKey: _angular_core.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
104
+ /** Represents the space key. Does nothing when the user is actively using typeahead. */
105
+ readonly dynamicSpaceKey: _angular_core.Signal<"" | " ">;
106
+ /** Regular expression to match characters for typeahead. */
107
+ readonly typeaheadRegexp: RegExp;
108
+ /** The keydown event manager for the tree. */
109
+ readonly keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
110
+ /** The pointerdown event manager for the tree. */
111
+ pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
112
+ constructor(inputs: TreeInputs<V>);
113
+ /**
114
+ * Sets the tree to it's default initial state.
115
+ *
116
+ * Sets the active index of the tree to the first focusable selected tree item if one exists.
117
+ * Otherwise, sets focus to the first focusable tree item.
118
+ */
119
+ setDefaultState(): void;
120
+ /** Handles keydown events on the tree. */
121
+ onKeydown(event: KeyboardEvent): void;
122
+ /** Handles pointerdown events on the tree. */
123
+ onPointerdown(event: PointerEvent): void;
124
+ /** Navigates to the given tree item in the tree. */
125
+ goto(e: PointerEvent, opts?: SelectOptions): void;
126
+ /** Toggles to expand or collapse a tree item. */
127
+ toggleExpansion(item?: TreeItemPattern<V>): void;
128
+ /** Expands a tree item. */
129
+ expand(opts?: SelectOptions): void;
130
+ /** Expands all sibling tree items including itself. */
131
+ expandSiblings(item?: TreeItemPattern<V>): void;
132
+ /** Collapses a tree item. */
133
+ collapse(opts?: SelectOptions): void;
134
+ /** Retrieves the TreeItemPattern associated with a DOM event, if any. */
135
+ protected _getItem(event: Event): TreeItemPattern<V> | undefined;
136
+ }
137
+
138
+ export { TreeItemPattern, TreePattern };
139
+ export type { TreeInputs, TreeItemInputs };
@@ -1,10 +1,11 @@
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 { AccordionTriggerPattern, AccordionPanelPattern, AccordionGroupPattern } from '../accordion.d.js';
4
+ import { AccordionTriggerPattern, AccordionPanelPattern, AccordionGroupPattern } from './_accordion-chunk.js';
5
5
  import * as i1 from '@angular/cdk-experimental/deferred-content';
6
- import '../pointer-event-manager.d.js';
7
- import '../expansion.d.js';
6
+ import './_pointer-event-manager-chunk.js';
7
+ import './_list-navigation-chunk.js';
8
+ import './_expansion-chunk.js';
8
9
 
9
10
  /**
10
11
  * Represents the content panel of an accordion item. It is controlled by an
@@ -0,0 +1,54 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { WritableSignal } from '@angular/core';
3
+ import { ComboboxPattern, ComboboxListboxControls, ComboboxTreeControls } from './_combobox-chunk.js';
4
+ import * as i1 from '@angular/cdk-experimental/deferred-content';
5
+ import './_pointer-event-manager-chunk.js';
6
+ import './_list-navigation-chunk.js';
7
+ import './_list-chunk.js';
8
+
9
+ declare class CdkCombobox<V> {
10
+ /** The element that the combobox is attached to. */
11
+ private readonly _elementRef;
12
+ /** The DeferredContentAware host directive. */
13
+ private readonly _deferredContentAware;
14
+ /** The combobox popup. */
15
+ readonly popup: _angular_core.Signal<CdkComboboxPopup<V> | undefined>;
16
+ /** The filter mode for the combobox. */
17
+ filterMode: _angular_core.InputSignal<"manual" | "auto-select" | "highlight">;
18
+ /** Whether the combobox is focused. */
19
+ readonly isFocused: WritableSignal<boolean>;
20
+ /** The value of the first matching item in the popup. */
21
+ firstMatch: _angular_core.InputSignal<V | undefined>;
22
+ /** Whether the listbox has received focus yet. */
23
+ private _hasBeenFocused;
24
+ /** The combobox ui pattern. */
25
+ readonly pattern: ComboboxPattern<any, V>;
26
+ constructor();
27
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkCombobox<any>, never>;
28
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkCombobox<any>, "[cdkCombobox]", ["cdkCombobox"], { "filterMode": { "alias": "filterMode"; "required": false; "isSignal": true; }; "firstMatch": { "alias": "firstMatch"; "required": false; "isSignal": true; }; }, {}, ["popup"], never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
29
+ }
30
+ declare class CdkComboboxInput {
31
+ /** The element that the combobox is attached to. */
32
+ private readonly _elementRef;
33
+ /** The combobox that the input belongs to. */
34
+ readonly combobox: CdkCombobox<any>;
35
+ /** The value of the input. */
36
+ value: _angular_core.ModelSignal<string>;
37
+ constructor();
38
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkComboboxInput, never>;
39
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkComboboxInput, "input[cdkComboboxInput]", ["cdkComboboxInput"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
40
+ }
41
+ declare class CdkComboboxPopupContainer {
42
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkComboboxPopupContainer, never>;
43
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkComboboxPopupContainer, "ng-template[cdkComboboxPopupContainer]", ["cdkComboboxPopupContainer"], {}, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
44
+ }
45
+ declare class CdkComboboxPopup<V> {
46
+ /** The combobox that the popup belongs to. */
47
+ readonly combobox: CdkCombobox<V> | null;
48
+ /** The controls the popup exposes to the combobox. */
49
+ readonly controls: WritableSignal<ComboboxListboxControls<any, V> | ComboboxTreeControls<any, V> | undefined>;
50
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CdkComboboxPopup<any>, never>;
51
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CdkComboboxPopup<any>, "[cdkComboboxPopup]", ["cdkComboboxPopup"], {}, {}, never, never, true, never>;
52
+ }
53
+
54
+ export { CdkCombobox, CdkComboboxInput, CdkComboboxPopup, CdkComboboxPopupContainer };
@@ -4,10 +4,10 @@ import * as _angular_core from '@angular/core';
4
4
  * A container directive controls the visibility of its content.
5
5
  */
6
6
  declare class DeferredContentAware {
7
- contentVisible: _angular_core.WritableSignal<boolean>;
8
- readonly preserveContent: _angular_core.InputSignal<boolean>;
7
+ readonly contentVisible: _angular_core.WritableSignal<boolean>;
8
+ readonly preserveContent: _angular_core.ModelSignal<boolean>;
9
9
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContentAware, never>;
10
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContentAware, never, never, { "preserveContent": { "alias": "preserveContent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
10
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContentAware, never, never, { "preserveContent": { "alias": "preserveContent"; "required": false; "isSignal": true; }; }, { "preserveContent": "preserveContentChange"; }, never, never, true, never>;
11
11
  }
12
12
  /**
13
13
  * DeferredContent loads/unloads the content based on the visibility.