@angular/cdk-experimental 20.2.0-next.1 → 20.2.0-next.3

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 (72) hide show
  1. package/accordion/index.d.ts +3 -3
  2. package/{accordion.d-CC6dGMlv.d.ts → accordion.d.d.ts} +7 -5
  3. package/{expansion.d-Zkcf-XJU.d.ts → expansion.d.d.ts} +3 -3
  4. package/fesm2022/accordion.mjs +17 -17
  5. package/fesm2022/accordion.mjs.map +1 -1
  6. package/fesm2022/{accordion-D9JoxtzT.mjs → accordion2.mjs} +8 -6
  7. package/fesm2022/accordion2.mjs.map +1 -0
  8. package/fesm2022/cdk-experimental.mjs +1 -1
  9. package/fesm2022/cdk-experimental.mjs.map +1 -1
  10. package/fesm2022/column-resize.mjs +54 -54
  11. package/fesm2022/column-resize.mjs.map +1 -1
  12. package/fesm2022/combobox.mjs +10 -10
  13. package/fesm2022/combobox.mjs.map +1 -1
  14. package/fesm2022/deferred-content.mjs +6 -6
  15. package/fesm2022/deferred-content.mjs.map +1 -1
  16. package/fesm2022/{expansion-C9iQLHOG.mjs → expansion.mjs} +2 -2
  17. package/fesm2022/expansion.mjs.map +1 -0
  18. package/fesm2022/{list-focus-Czul8jzR.mjs → list-navigation.mjs} +63 -62
  19. package/fesm2022/list-navigation.mjs.map +1 -0
  20. package/fesm2022/list.mjs +355 -0
  21. package/fesm2022/list.mjs.map +1 -0
  22. package/fesm2022/listbox.mjs +12 -13
  23. package/fesm2022/listbox.mjs.map +1 -1
  24. package/fesm2022/option.mjs +231 -0
  25. package/fesm2022/option.mjs.map +1 -0
  26. package/fesm2022/{polyfill-CXksG4af.mjs → polyfill.mjs} +2 -2
  27. package/fesm2022/polyfill.mjs.map +1 -0
  28. package/fesm2022/popover-edit.mjs +44 -44
  29. package/fesm2022/popover-edit.mjs.map +1 -1
  30. package/fesm2022/{radio-button-92xc4w-A.mjs → radio-button.mjs} +33 -70
  31. package/fesm2022/radio-button.mjs.map +1 -0
  32. package/fesm2022/radio-group.mjs +10 -10
  33. package/fesm2022/radio-group.mjs.map +1 -1
  34. package/fesm2022/scrolling.mjs +7 -7
  35. package/fesm2022/scrolling.mjs.map +1 -1
  36. package/fesm2022/selection.mjs +19 -19
  37. package/fesm2022/selection.mjs.map +1 -1
  38. package/fesm2022/table-scroll-container.mjs +7 -7
  39. package/fesm2022/table-scroll-container.mjs.map +1 -1
  40. package/fesm2022/tabs.mjs +20 -20
  41. package/fesm2022/tabs.mjs.map +1 -1
  42. package/fesm2022/{tabs-hMdwtXv2.mjs → tabs2.mjs} +34 -70
  43. package/fesm2022/tabs2.mjs.map +1 -0
  44. package/fesm2022/tree.mjs +87 -159
  45. package/fesm2022/tree.mjs.map +1 -1
  46. package/fesm2022/ui-patterns.mjs +7 -8
  47. package/fesm2022/ui-patterns.mjs.map +1 -1
  48. package/list.d.d.ts +207 -0
  49. package/listbox/index.d.ts +5 -6
  50. package/{listbox.d-Ckp1is82.d.ts → listbox.d.d.ts} +9 -62
  51. package/package.json +2 -2
  52. package/{pointer-event-manager.d-BqSm9Jh5.d.ts → pointer-event-manager.d.d.ts} +12 -8
  53. package/radio-group/index.d.ts +4 -4
  54. package/{radio-group.d-CFC0aKQM.d.ts → radio-group.d.d.ts} +12 -31
  55. package/tabs/index.d.ts +4 -4
  56. package/{tabs.d-Db8oTrMB.d.ts → tabs.d.d.ts} +15 -30
  57. package/tree/index.d.ts +10 -39
  58. package/ui-patterns/index.d.ts +7 -8
  59. package/fesm2022/accordion-D9JoxtzT.mjs.map +0 -1
  60. package/fesm2022/expansion-C9iQLHOG.mjs.map +0 -1
  61. package/fesm2022/list-focus-Czul8jzR.mjs.map +0 -1
  62. package/fesm2022/list-selection-C41ApAbt.mjs +0 -136
  63. package/fesm2022/list-selection-C41ApAbt.mjs.map +0 -1
  64. package/fesm2022/list-typeahead-DIIbNJrP.mjs +0 -64
  65. package/fesm2022/list-typeahead-DIIbNJrP.mjs.map +0 -1
  66. package/fesm2022/option-CgeKz9_Q.mjs +0 -321
  67. package/fesm2022/option-CgeKz9_Q.mjs.map +0 -1
  68. package/fesm2022/polyfill-CXksG4af.mjs.map +0 -1
  69. package/fesm2022/radio-button-92xc4w-A.mjs.map +0 -1
  70. package/fesm2022/tabs-hMdwtXv2.mjs.map +0 -1
  71. package/list-selection.d-fbAPr_N_.d.ts +0 -69
  72. package/list-typeahead.d-ljh3nJ9y.d.ts +0 -48
@@ -1,19 +1,17 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { a as ListSelectionItem, L as ListSelection, b as ListSelectionInputs } from './list-selection.d-fbAPr_N_.js';
3
- import { a as ListTypeaheadItem, b as ListTypeaheadInputs, L as ListTypeahead } from './list-typeahead.d-ljh3nJ9y.js';
4
- 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 './pointer-event-manager.d-BqSm9Jh5.js';
2
+ import { SignalLike, KeyboardEventManager, PointerEventManager } from './pointer-event-manager.d.js';
3
+ import { ListItem, ListInputs, List } from './list.d.js';
5
4
 
6
5
  /**
7
6
  * Represents the properties exposed by a listbox that need to be accessed by an option.
8
7
  * This exists to avoid circular dependency errors between the listbox and option.
9
8
  */
10
9
  interface ListboxPattern$1<V> {
11
- focusManager: ListFocus<OptionPattern<V>>;
12
- selection: ListSelection<OptionPattern<V>, V>;
13
- navigation: ListNavigation<OptionPattern<V>>;
10
+ inputs: ListInputs<OptionPattern<V>, V>;
11
+ listBehavior: List<OptionPattern<V>, V>;
14
12
  }
15
13
  /** Represents the required inputs for an option in a listbox. */
16
- interface OptionInputs<V> extends ListNavigationItem, ListSelectionItem<V>, ListTypeaheadItem, ListFocusItem {
14
+ interface OptionInputs<V> extends Omit<ListItem<V>, 'index'> {
17
15
  listbox: SignalLike<ListboxPattern$1<V> | undefined>;
18
16
  }
19
17
  /** Represents an option in a listbox. */
@@ -41,28 +39,14 @@ declare class OptionPattern<V> {
41
39
  constructor(args: OptionInputs<V>);
42
40
  }
43
41
 
44
- /** The selection operations that the listbox can perform. */
45
- interface SelectOptions {
46
- toggle?: boolean;
47
- selectOne?: boolean;
48
- selectRange?: boolean;
49
- anchor?: boolean;
50
- }
51
42
  /** Represents the required inputs for a listbox. */
52
- type ListboxInputs<V> = ListNavigationInputs<OptionPattern<V>> & ListSelectionInputs<OptionPattern<V>, V> & ListTypeaheadInputs<OptionPattern<V>> & ListFocusInputs<OptionPattern<V>> & {
43
+ type ListboxInputs<V> = ListInputs<OptionPattern<V>, V> & {
53
44
  readonly: SignalLike<boolean>;
54
45
  };
55
46
  /** Controls the state of a listbox. */
56
47
  declare class ListboxPattern<V> {
57
48
  readonly inputs: ListboxInputs<V>;
58
- /** Controls navigation for the listbox. */
59
- navigation: ListNavigation<OptionPattern<V>>;
60
- /** Controls selection for the listbox. */
61
- selection: ListSelection<OptionPattern<V>, V>;
62
- /** Controls typeahead for the listbox. */
63
- typeahead: ListTypeahead<OptionPattern<V>>;
64
- /** Controls focus for the listbox. */
65
- focusManager: ListFocus<OptionPattern<V>>;
49
+ listBehavior: List<OptionPattern<V>, V>;
66
50
  /** Whether the list is vertically or horizontally oriented. */
67
51
  orientation: SignalLike<'vertical' | 'horizontal'>;
68
52
  /** Whether the listbox is disabled. */
@@ -89,19 +73,6 @@ declare class ListboxPattern<V> {
89
73
  dynamicSpaceKey: _angular_core.Signal<"" | " ">;
90
74
  /** The regexp used to decide if a key should trigger typeahead. */
91
75
  typeaheadRegexp: RegExp;
92
- /**
93
- * The uncommitted index for selecting a range of options.
94
- *
95
- * NOTE: This is subtly distinct from the "rangeStartIndex" in the ListSelection behavior.
96
- * The anchorIndex does not necessarily represent the start of a range, but represents the most
97
- * recent index where the user showed intent to begin a range selection. Usually, this is wherever
98
- * the user most recently pressed the "Shift" key, but if the user presses shift + space to select
99
- * from the anchor, the user is not intending to start a new range from this index.
100
- *
101
- * In other words, "rangeStartIndex" is only set when a user commits to starting a range selection
102
- * while "anchorIndex" is set whenever a user indicates they may be starting a range selection.
103
- */
104
- anchorIndex: _angular_core.WritableSignal<number>;
105
76
  /** The keydown event manager for the listbox. */
106
77
  keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
107
78
  /** The pointerdown event manager for the listbox. */
@@ -112,18 +83,6 @@ declare class ListboxPattern<V> {
112
83
  /** Handles keydown events for the listbox. */
113
84
  onKeydown(event: KeyboardEvent): void;
114
85
  onPointerdown(event: PointerEvent): void;
115
- /** Navigates to the first option in the listbox. */
116
- first(opts?: SelectOptions): void;
117
- /** Navigates to the last option in the listbox. */
118
- last(opts?: SelectOptions): void;
119
- /** Navigates to the next option in the listbox. */
120
- next(opts?: SelectOptions): void;
121
- /** Navigates to the previous option in the listbox. */
122
- prev(opts?: SelectOptions): void;
123
- /** Navigates to the given item in the listbox. */
124
- goto(event: PointerEvent, opts?: SelectOptions): void;
125
- /** Handles typeahead search navigation for the listbox. */
126
- search(char: string, opts?: SelectOptions): void;
127
86
  /**
128
87
  * Sets the listbox to it's default initial state.
129
88
  *
@@ -135,20 +94,8 @@ declare class ListboxPattern<V> {
135
94
  * is called.
136
95
  */
137
96
  setDefaultState(): void;
138
- /**
139
- * Safely performs a navigation operation.
140
- *
141
- * Handles conditionally disabling wrapping for when a navigation
142
- * operation is occurring while the user is selecting a range of options.
143
- *
144
- * Handles boilerplate calling of focus & selection operations. Also ensures these
145
- * additional operations are only called if the navigation operation moved focus to a new option.
146
- */
147
- private _navigate;
148
- /** Handles updating selection for the listbox. */
149
- private _updateSelection;
150
97
  private _getItem;
151
98
  }
152
99
 
153
- export { ListboxPattern as a, OptionPattern as b };
154
- export type { ListboxInputs as L, OptionInputs as O };
100
+ export { ListboxPattern, OptionPattern };
101
+ export type { ListboxInputs, OptionInputs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cdk-experimental",
3
- "version": "20.2.0-next.1",
3
+ "version": "20.2.0-next.3",
4
4
  "description": "Experimental components for Angular CDK",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "homepage": "https://github.com/angular/components#readme",
14
14
  "peerDependencies": {
15
- "@angular/cdk": "20.2.0-next.1",
15
+ "@angular/cdk": "20.2.0-next.3",
16
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": {
@@ -16,6 +16,8 @@ interface ListFocusItem {
16
16
  element: SignalLike<HTMLElement>;
17
17
  /** Whether an item is disabled. */
18
18
  disabled: SignalLike<boolean>;
19
+ /** The index of the item in the list. */
20
+ index: SignalLike<number>;
19
21
  }
20
22
  /** Represents the required inputs for a collection that contains focusable items. */
21
23
  interface ListFocusInputs<T extends ListFocusItem> {
@@ -25,18 +27,20 @@ interface ListFocusInputs<T extends ListFocusItem> {
25
27
  disabled: SignalLike<boolean>;
26
28
  /** The items in the list. */
27
29
  items: SignalLike<T[]>;
28
- /** The index of the current active item. */
29
- activeIndex: WritableSignalLike<number>;
30
+ /** The active item. */
31
+ activeItem: WritableSignalLike<T | undefined>;
30
32
  /** Whether disabled items in the list should be skipped when navigating. */
31
33
  skipDisabled: SignalLike<boolean>;
32
34
  }
33
35
  /** Controls focus for a list of items. */
34
36
  declare class ListFocus<T extends ListFocusItem> {
35
37
  readonly inputs: ListFocusInputs<T>;
36
- /** The last index that was active. */
37
- prevActiveIndex: _angular_core.WritableSignal<number>;
38
- /** The current active item. */
39
- activeItem: _angular_core.Signal<T>;
38
+ /** The last item that was active. */
39
+ prevActiveItem: _angular_core.WritableSignal<T | undefined>;
40
+ /** The index of the last item that was active. */
41
+ prevActiveIndex: _angular_core.Signal<number>;
42
+ /** The current active index in the list. */
43
+ activeIndex: _angular_core.Signal<number>;
40
44
  constructor(inputs: ListFocusInputs<T>);
41
45
  /** Whether the list is in a disabled state. */
42
46
  isListDisabled(): boolean;
@@ -181,5 +185,5 @@ declare class PointerEventManager<T extends PointerEvent> extends EventManager<T
181
185
  _isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs): boolean;
182
186
  }
183
187
 
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 };
188
+ export { KeyboardEventManager, ListFocus, ListNavigation, PointerEventManager, convertGetterSetterToWritableSignalLike };
189
+ export type { ListFocusInputs, ListFocusItem, ListNavigationInputs, ListNavigationItem, SignalLike, WritableSignalLike };
@@ -1,9 +1,9 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { WritableSignal } from '@angular/core';
3
3
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
- import { c as RadioButtonPattern, a as RadioGroupPattern } from '../radio-group.d-CFC0aKQM.js';
5
- import '../pointer-event-manager.d-BqSm9Jh5.js';
6
- import '../list-selection.d-fbAPr_N_.js';
4
+ import { RadioButtonPattern, RadioGroupPattern } from '../radio-group.d.js';
5
+ import '../pointer-event-manager.d.js';
6
+ import '../list.d.js';
7
7
 
8
8
  /**
9
9
  * A radio button group container.
@@ -61,7 +61,7 @@ declare class CdkRadioButton<V> {
61
61
  /** A unique identifier for the radio button. */
62
62
  protected id: _angular_core.Signal<string>;
63
63
  /** The value associated with the radio button. */
64
- protected value: _angular_core.InputSignal<V>;
64
+ readonly value: _angular_core.InputSignal<V>;
65
65
  /** The parent RadioGroup UIPattern. */
66
66
  protected group: _angular_core.Signal<RadioGroupPattern<any>>;
67
67
  /** A reference to the radio button element to be focused on navigation. */
@@ -1,18 +1,17 @@
1
1
  import * as _angular_core 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 './pointer-event-manager.d-BqSm9Jh5.js';
3
- import { a as ListSelectionItem, L as ListSelection, b as ListSelectionInputs } from './list-selection.d-fbAPr_N_.js';
2
+ import { SignalLike, KeyboardEventManager, PointerEventManager } from './pointer-event-manager.d.js';
3
+ import { ListItem, List, ListInputs } from './list.d.js';
4
4
 
5
5
  /**
6
6
  * Represents the properties exposed by a radio group that need to be accessed by a radio button.
7
7
  * This exists to avoid circular dependency errors between the radio group and radio button.
8
8
  */
9
9
  interface RadioGroupLike<V> {
10
- focusManager: ListFocus<RadioButtonPattern<V>>;
11
- selection: ListSelection<RadioButtonPattern<V>, V>;
12
- navigation: ListNavigation<RadioButtonPattern<V>>;
10
+ /** The list behavior for the radio group. */
11
+ listBehavior: List<RadioButtonPattern<V>, V>;
13
12
  }
14
13
  /** Represents the required inputs for a radio button in a radio group. */
15
- interface RadioButtonInputs<V> extends ListNavigationItem, ListSelectionItem<V>, ListFocusItem {
14
+ interface RadioButtonInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index'> {
16
15
  /** A reference to the parent radio group. */
17
16
  group: SignalLike<RadioGroupLike<V> | undefined>;
18
17
  }
@@ -37,15 +36,13 @@ declare class RadioButtonPattern<V> {
37
36
  tabindex: _angular_core.Signal<0 | -1 | undefined>;
38
37
  /** The HTML element associated with the radio button. */
39
38
  element: SignalLike<HTMLElement>;
39
+ /** The search term for typeahead. */
40
+ readonly searchTerm: () => string;
40
41
  constructor(inputs: RadioButtonInputs<V>);
41
42
  }
42
43
 
43
- /** The selection operations that the radio group can perform. */
44
- interface SelectOptions {
45
- selectOne?: boolean;
46
- }
47
44
  /** 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>> & {
45
+ type RadioGroupInputs<V> = Omit<ListInputs<RadioButtonPattern<V>, V>, 'multi' | 'selectionMode' | 'wrap' | 'typeaheadDelay'> & {
49
46
  /** Whether the radio group is disabled. */
50
47
  disabled: SignalLike<boolean>;
51
48
  /** Whether the radio group is readonly. */
@@ -54,12 +51,8 @@ type RadioGroupInputs<V> = Omit<ListNavigationInputs<RadioButtonPattern<V>>, 'wr
54
51
  /** Controls the state of a radio group. */
55
52
  declare class RadioGroupPattern<V> {
56
53
  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>>;
54
+ /** The list behavior for the radio group. */
55
+ readonly listBehavior: List<RadioButtonPattern<V>, V>;
63
56
  /** Whether the radio group is vertically or horizontally oriented. */
64
57
  orientation: SignalLike<'vertical' | 'horizontal'>;
65
58
  /** Whether the radio group is disabled. */
@@ -85,16 +78,6 @@ declare class RadioGroupPattern<V> {
85
78
  onKeydown(event: KeyboardEvent): void;
86
79
  /** Handles pointerdown events for the radio group. */
87
80
  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
81
  /**
99
82
  * Sets the radio group to its default initial state.
100
83
  *
@@ -104,11 +87,9 @@ declare class RadioGroupPattern<V> {
104
87
  setDefaultState(): void;
105
88
  /** Validates the state of the radio group and returns a list of accessibility violations. */
106
89
  validate(): string[];
107
- /** Safely performs a navigation operation and updates selection if needed. */
108
- private _navigate;
109
90
  /** Finds the RadioButtonPattern associated with a pointer event target. */
110
91
  private _getItem;
111
92
  }
112
93
 
113
- export { RadioGroupPattern as a, RadioButtonPattern as c };
114
- export type { RadioGroupInputs as R, RadioButtonInputs as b };
94
+ export { RadioButtonPattern, RadioGroupPattern };
95
+ export type { RadioButtonInputs, RadioGroupInputs };
package/tabs/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Signal, OnInit, OnDestroy } from '@angular/core';
3
3
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
- import { a as TabPattern, c as TabPanelPattern, e as TabListPattern } from '../tabs.d-Db8oTrMB.js';
4
+ import { TabPattern, TabPanelPattern, TabListPattern } from '../tabs.d.js';
5
5
  import * as i1 from '@angular/cdk-experimental/deferred-content';
6
- import '../pointer-event-manager.d-BqSm9Jh5.js';
7
- import '../list-selection.d-fbAPr_N_.js';
8
- import '../expansion.d-Zkcf-XJU.js';
6
+ import '../pointer-event-manager.d.js';
7
+ import '../expansion.d.js';
8
+ import '../list.d.js';
9
9
 
10
10
  interface HasElement {
11
11
  element: Signal<HTMLElement>;
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { S as SignalLike, e as ListNavigationItem, f as ListFocusItem, L as ListNavigationInputs, a as ListFocusInputs, b as ListNavigation, d as ListFocus, K as KeyboardEventManager, P as PointerEventManager } from './pointer-event-manager.d-BqSm9Jh5.js';
3
- import { a as ListSelectionItem, b as ListSelectionInputs, L as ListSelection } from './list-selection.d-fbAPr_N_.js';
4
- import { E as ExpansionItem, b as ExpansionControl, L as ListExpansionInputs, a as ListExpansion } from './expansion.d-Zkcf-XJU.js';
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
5
 
6
6
  /** Represents the required inputs for the label control. */
7
7
  interface LabelControlInputs {
@@ -26,7 +26,7 @@ declare class LabelControl {
26
26
  }
27
27
 
28
28
  /** The required inputs to tabs. */
29
- interface TabInputs extends ListNavigationItem, ListSelectionItem<string>, ListFocusItem, Omit<ExpansionItem, 'expansionId' | 'expandable'> {
29
+ interface TabInputs extends Omit<ListItem<string>, 'searchTerm' | 'index'>, Omit<ExpansionItem, 'expansionId' | 'expandable'> {
30
30
  /** The parent tablist that controls the tab. */
31
31
  tablist: SignalLike<TabListPattern>;
32
32
  /** The remote tabpanel controlled by the tab. */
@@ -39,12 +39,16 @@ declare class TabPattern {
39
39
  readonly expansion: ExpansionControl;
40
40
  /** A global unique identifier for the tab. */
41
41
  readonly id: SignalLike<string>;
42
+ /** The index of the tab. */
43
+ readonly index: _angular_core.Signal<number>;
42
44
  /** A local unique identifier for the tab. */
43
45
  readonly value: SignalLike<string>;
44
46
  /** Whether the tab is disabled. */
45
47
  readonly disabled: SignalLike<boolean>;
46
48
  /** The html element that should receive focus. */
47
49
  readonly element: SignalLike<HTMLElement>;
50
+ /** The text used by the typeahead search. */
51
+ readonly searchTerm: () => string;
48
52
  /** Whether this tab has expandable content. */
49
53
  readonly expandable: _angular_core.Signal<boolean>;
50
54
  /** The unique identifier used by the expansion behavior. */
@@ -79,26 +83,18 @@ declare class TabPanelPattern {
79
83
  /** Whether the tabpanel is hidden. */
80
84
  readonly hidden: _angular_core.Signal<boolean>;
81
85
  /** The tabindex of this tabpanel. */
82
- readonly tabindex: _angular_core.Signal<-1 | 0>;
86
+ readonly tabindex: _angular_core.Signal<0 | -1>;
83
87
  /** The aria-labelledby value for this tabpanel. */
84
88
  readonly labelledBy: _angular_core.Signal<string | undefined>;
85
89
  constructor(inputs: TabPanelInputs);
86
90
  }
87
- /** The selection operations that the tablist can perform. */
88
- interface SelectOptions {
89
- select?: boolean;
90
- }
91
91
  /** The required inputs for the tablist. */
92
- type TabListInputs = ListNavigationInputs<TabPattern> & Omit<ListSelectionInputs<TabPattern, string>, 'multi'> & ListFocusInputs<TabPattern> & Omit<ListExpansionInputs, 'multiExpandable' | 'expandedIds' | 'items'>;
92
+ type TabListInputs = Omit<ListInputs<TabPattern, string>, 'multi' | 'typeaheadDelay'> & Omit<ListExpansionInputs, 'multiExpandable' | 'expandedIds' | 'items'>;
93
93
  /** Controls the state of a tablist. */
94
94
  declare class TabListPattern {
95
95
  readonly inputs: TabListInputs;
96
- /** Controls navigation for the tablist. */
97
- readonly navigation: ListNavigation<TabPattern>;
98
- /** Controls selection for the tablist. */
99
- readonly selection: ListSelection<TabPattern, string>;
100
- /** Controls focus for the tablist. */
101
- readonly focusManager: ListFocus<TabPattern>;
96
+ /** The list behavior for the tablist. */
97
+ readonly listBehavior: List<TabPattern, string>;
102
98
  /** Controls expansion for the tablist. */
103
99
  readonly expansionManager: ListExpansion;
104
100
  /** Whether the tablist is vertically or horizontally oriented. */
@@ -133,20 +129,9 @@ declare class TabListPattern {
133
129
  onKeydown(event: KeyboardEvent): void;
134
130
  /** The pointerdown event manager for the tablist. */
135
131
  onPointerdown(event: PointerEvent): void;
136
- /** Navigates to the first option in the tablist. */
137
- first(opts?: SelectOptions): void;
138
- /** Navigates to the last option in the tablist. */
139
- last(opts?: SelectOptions): void;
140
- /** Navigates to the next option in the tablist. */
141
- next(opts?: SelectOptions): void;
142
- /** Navigates to the previous option in the tablist. */
143
- prev(opts?: SelectOptions): void;
144
- /** Navigates to the given item in the tablist. */
145
- goto(event: PointerEvent, opts?: SelectOptions): void;
146
- /** Handles updating selection for the tablist. */
147
- private _select;
132
+ /** Returns the tab item associated with the given pointer event. */
148
133
  private _getItem;
149
134
  }
150
135
 
151
- export { TabPattern as a, TabPanelPattern as c, TabListPattern as e };
152
- export type { TabInputs as T, TabPanelInputs as b, TabListInputs as d };
136
+ export { TabListPattern, TabPanelPattern, TabPattern };
137
+ export type { TabInputs, TabListInputs, TabPanelInputs };
package/tree/index.d.ts CHANGED
@@ -1,14 +1,13 @@
1
1
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { OnInit, OnDestroy, Signal } from '@angular/core';
4
- import { S as SignalLike, d as ListFocus, b as ListNavigation, K as KeyboardEventManager, P as PointerEventManager, f as ListFocusItem, e as ListNavigationItem, a as ListFocusInputs, L as ListNavigationInputs } from '../pointer-event-manager.d-BqSm9Jh5.js';
5
- import { L as ListSelection, a as ListSelectionItem, b as ListSelectionInputs } from '../list-selection.d-fbAPr_N_.js';
6
- import { L as ListTypeahead, a as ListTypeaheadItem, b as ListTypeaheadInputs } from '../list-typeahead.d-ljh3nJ9y.js';
7
- import { E as ExpansionItem, a as ListExpansion, b as ExpansionControl } from '../expansion.d-Zkcf-XJU.js';
4
+ import { SignalLike, KeyboardEventManager, PointerEventManager } from '../pointer-event-manager.d.js';
5
+ import { List, ListItem, ListInputs } from '../list.d.js';
6
+ import { ExpansionItem, ListExpansion, ExpansionControl } from '../expansion.d.js';
8
7
  import * as i1 from '@angular/cdk-experimental/deferred-content';
9
8
 
10
9
  /** Represents the required inputs for a tree item. */
11
- interface TreeItemInputs<V> extends ListFocusItem, ListNavigationItem, ListSelectionItem<V>, ListTypeaheadItem {
10
+ interface TreeItemInputs<V> extends Omit<ListItem<V>, 'index'> {
12
11
  /** The parent item. */
13
12
  parent: SignalLike<TreeItemPattern<V> | TreePattern<V>>;
14
13
  /** Whether this item has children. Children can be lazily loaded. */
@@ -25,6 +24,8 @@ interface TreeItemPattern<V> extends TreeItemInputs<V> {
25
24
  */
26
25
  declare class TreeItemPattern<V> implements ExpansionItem {
27
26
  readonly inputs: TreeItemInputs<V>;
27
+ /** The position of this item among its siblings. */
28
+ readonly index: _angular_core.Signal<number>;
28
29
  /** The unique identifier used by the expansion behavior. */
29
30
  readonly expansionId: SignalLike<string>;
30
31
  /** Controls expansion for child items. */
@@ -61,7 +62,7 @@ interface SelectOptions {
61
62
  anchor?: boolean;
62
63
  }
63
64
  /** Represents the required inputs for a tree. */
64
- interface TreeInputs<V> extends Omit<ListFocusInputs<TreeItemPattern<V>> & ListNavigationInputs<TreeItemPattern<V>> & ListSelectionInputs<TreeItemPattern<V>, V> & ListTypeaheadInputs<TreeItemPattern<V>>, 'items'> {
65
+ interface TreeInputs<V> extends Omit<ListInputs<TreeItemPattern<V>, V>, 'items'> {
65
66
  /** All items in the tree, in document order (DFS-like, a flattened list). */
66
67
  allItems: SignalLike<TreeItemPattern<V>[]>;
67
68
  /** Whether the tree is in navigation mode. */
@@ -74,14 +75,8 @@ interface TreePattern<V> extends TreeInputs<V> {
74
75
  /** Controls the state and interactions of a tree view. */
75
76
  declare class TreePattern<V> {
76
77
  readonly inputs: TreeInputs<V>;
77
- /** Controls focus for the all visible tree items. */
78
- readonly focusManager: ListFocus<TreeItemPattern<V>>;
79
- /** Controls navigation for all visible tree items. */
80
- readonly navigationManager: ListNavigation<TreeItemPattern<V>>;
81
- /** Controls selection for all visible tree items. */
82
- readonly selectionManager: ListSelection<TreeItemPattern<V>, V>;
83
- /** Controls typeahead for all visible tree items. */
84
- readonly typeaheadManager: ListTypeahead<TreeItemPattern<V>>;
78
+ /** The list behavior for the tree. */
79
+ readonly listBehavior: List<TreeItemPattern<V>, V>;
85
80
  /** Controls expansion for direct children of the tree root (top-level items). */
86
81
  readonly expansionManager: ListExpansion;
87
82
  /** The root level is 0. */
@@ -92,8 +87,6 @@ declare class TreePattern<V> {
92
87
  readonly tabindex: _angular_core.Signal<0 | -1>;
93
88
  /** The id of the current active item. */
94
89
  readonly activedescendant: _angular_core.Signal<string | undefined>;
95
- /** Whether the tree is performing a range selection. */
96
- readonly inSelection: _angular_core.WritableSignal<boolean>;
97
90
  /** The direct children of the root (top-level tree items). */
98
91
  readonly children: _angular_core.Signal<TreeItemPattern<V>[]>;
99
92
  /** All currently visible tree items. An item is visible if their parent is expanded. */
@@ -112,14 +105,6 @@ declare class TreePattern<V> {
112
105
  readonly dynamicSpaceKey: _angular_core.Signal<"" | " ">;
113
106
  /** Regular expression to match characters for typeahead. */
114
107
  readonly typeaheadRegexp: RegExp;
115
- /** Uncommitted tree item for selecting a range of tree items. */
116
- readonly anchorItem: _angular_core.WritableSignal<TreeItemPattern<V> | undefined>;
117
- /**
118
- * Uncommitted tree item index for selecting a range of tree items.
119
- *
120
- * The index is computed in case the tree item position is changed caused by tree expansions.
121
- */
122
- readonly anchorIndex: _angular_core.Signal<number>;
123
108
  /** The keydown event manager for the tree. */
124
109
  readonly keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
125
110
  /** The pointerdown event manager for the tree. */
@@ -136,18 +121,8 @@ declare class TreePattern<V> {
136
121
  onKeydown(event: KeyboardEvent): void;
137
122
  /** Handles pointerdown events on the tree. */
138
123
  onPointerdown(event: PointerEvent): void;
139
- /** Navigates to the first visible tree item in the tree. */
140
- first(opts?: SelectOptions): void;
141
- /** Navigates to the last visible tree item in the tree. */
142
- last(opts?: SelectOptions): void;
143
- /** Navigates to the next visible tree item in the tree. */
144
- next(opts?: SelectOptions): void;
145
- /** Navigates to the previous visible tree item in the tree. */
146
- prev(opts?: SelectOptions): void;
147
124
  /** Navigates to the given tree item in the tree. */
148
- goto(event: PointerEvent, opts?: SelectOptions): void;
149
- /** Handles typeahead search navigation for the tree. */
150
- search(char: string, opts?: SelectOptions): void;
125
+ goto(e: PointerEvent, opts?: SelectOptions): void;
151
126
  /** Toggles to expand or collapse a tree item. */
152
127
  toggleExpansion(item?: TreeItemPattern<V>): void;
153
128
  /** Expands a tree item. */
@@ -156,10 +131,6 @@ declare class TreePattern<V> {
156
131
  expandSiblings(item?: TreeItemPattern<V>): void;
157
132
  /** Collapses a tree item. */
158
133
  collapse(item?: TreeItemPattern<V>): void;
159
- /** Safely performs a navigation operation. */
160
- private _navigate;
161
- /** Handles updating selection for the tree. */
162
- private _updateSelection;
163
134
  /** Retrieves the TreeItemPattern associated with a DOM event, if any. */
164
135
  private _getItem;
165
136
  }
@@ -1,9 +1,8 @@
1
- export { L as ListboxInputs, a as ListboxPattern, O as OptionInputs, b as OptionPattern } from '../listbox.d-Ckp1is82.js';
2
- export { b as RadioButtonInputs, c as RadioButtonPattern, R as RadioGroupInputs, a as RadioGroupPattern } from '../radio-group.d-CFC0aKQM.js';
3
- export { S as SignalLike, W as WritableSignalLike, c as convertGetterSetterToWritableSignalLike } from '../pointer-event-manager.d-BqSm9Jh5.js';
4
- export { T as TabInputs, d as TabListInputs, e as TabListPattern, b as TabPanelInputs, c as TabPanelPattern, a as TabPattern } from '../tabs.d-Db8oTrMB.js';
5
- export { A as AccordionGroupInputs, a as AccordionGroupPattern, d as AccordionPanelInputs, e as AccordionPanelPattern, b as AccordionTriggerInputs, c as AccordionTriggerPattern } from '../accordion.d-CC6dGMlv.js';
1
+ export { ListboxInputs, ListboxPattern, OptionInputs, OptionPattern } from '../listbox.d.js';
2
+ export { RadioButtonInputs, RadioButtonPattern, RadioGroupInputs, RadioGroupPattern } from '../radio-group.d.js';
3
+ export { SignalLike, WritableSignalLike, convertGetterSetterToWritableSignalLike } from '../pointer-event-manager.d.js';
4
+ export { TabInputs, TabListInputs, TabListPattern, TabPanelInputs, TabPanelPattern, TabPattern } from '../tabs.d.js';
5
+ export { AccordionGroupInputs, AccordionGroupPattern, AccordionPanelInputs, AccordionPanelPattern, AccordionTriggerInputs, AccordionTriggerPattern } from '../accordion.d.js';
6
6
  import '@angular/core';
7
- import '../list-selection.d-fbAPr_N_.js';
8
- import '../list-typeahead.d-ljh3nJ9y.js';
9
- import '../expansion.d-Zkcf-XJU.js';
7
+ import '../list.d.js';
8
+ import '../expansion.d.js';
@@ -1 +0,0 @@
1
- {"version":3,"file":"accordion-D9JoxtzT.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/ui-patterns/accordion/accordion.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\nimport {computed} from '@angular/core';\nimport {KeyboardEventManager, PointerEventManager} from '../behaviors/event-manager';\nimport {\n ExpansionItem,\n ExpansionControl,\n ListExpansion,\n ListExpansionInputs,\n} from '../behaviors/expansion/expansion';\nimport {ListFocus, ListFocusInputs, ListFocusItem} from '../behaviors/list-focus/list-focus';\nimport {\n ListNavigation,\n ListNavigationInputs,\n ListNavigationItem,\n} from '../behaviors/list-navigation/list-navigation';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\n\n/** Inputs of the AccordionGroupPattern. */\nexport type AccordionGroupInputs = Omit<\n ListNavigationInputs<AccordionTriggerPattern> &\n ListFocusInputs<AccordionTriggerPattern> &\n Omit<ListExpansionInputs, 'items'>,\n 'focusMode'\n>;\n\nconst focusMode = () => 'roving' as const;\n\nexport interface AccordionGroupPattern extends AccordionGroupInputs {}\n/** A pattern controls the nested Accordions. */\nexport class AccordionGroupPattern {\n /** Controls navigation for the group. */\n navigation: ListNavigation<AccordionTriggerPattern>;\n\n /** Controls focus for the group. */\n focusManager: ListFocus<AccordionTriggerPattern>;\n\n /** Controls expansion for the group. */\n expansionManager: ListExpansion;\n\n constructor(readonly inputs: AccordionGroupInputs) {\n this.wrap = inputs.wrap;\n this.orientation = inputs.orientation;\n this.textDirection = inputs.textDirection;\n this.activeIndex = inputs.activeIndex;\n this.disabled = inputs.disabled;\n this.multiExpandable = inputs.multiExpandable;\n this.items = inputs.items;\n this.expandedIds = inputs.expandedIds;\n this.skipDisabled = inputs.skipDisabled;\n this.focusManager = new ListFocus({\n ...inputs,\n focusMode,\n });\n this.navigation = new ListNavigation({\n ...inputs,\n focusMode,\n focusManager: this.focusManager,\n });\n this.expansionManager = new ListExpansion({\n ...inputs,\n });\n }\n}\n\n/** Inputs for the AccordionTriggerPattern. */\nexport type AccordionTriggerInputs = ListNavigationItem &\n ListFocusItem &\n Omit<ExpansionItem, 'expansionId' | 'expandable'> & {\n /** A local unique identifier for the trigger. */\n value: SignalLike<string>;\n\n /** The parent accordion group that controls this trigger. */\n accordionGroup: SignalLike<AccordionGroupPattern>;\n\n /** The accordion panel controlled by this trigger. */\n accordionPanel: SignalLike<AccordionPanelPattern | undefined>;\n };\n\nexport interface AccordionTriggerPattern extends AccordionTriggerInputs {}\n/** A pattern controls the expansion state of an accordion. */\nexport class AccordionTriggerPattern {\n /** Whether this tab has expandable content. */\n expandable: SignalLike<boolean>;\n\n /** The unique identifier used by the expansion behavior. */\n expansionId: SignalLike<string>;\n\n /** Whether an accordion is expanded. */\n expanded: SignalLike<boolean>;\n\n /** Controls the expansion state for the trigger. */\n expansionControl: ExpansionControl;\n\n /** Whether the trigger is active. */\n active = computed(() => this.inputs.accordionGroup().focusManager.activeItem() === this);\n\n /** Id of the accordion panel controlled by the trigger. */\n controls = computed(() => this.inputs.accordionPanel()?.id());\n\n /** The tabindex of the trigger. */\n tabindex = computed(() => (this.inputs.accordionGroup().focusManager.isFocusable(this) ? 0 : -1));\n\n /** Whether the trigger is disabled. Disabling an accordion group disables all the triggers. */\n disabled = computed(() => this.inputs.disabled() || this.inputs.accordionGroup().disabled());\n\n constructor(readonly inputs: AccordionTriggerInputs) {\n this.id = inputs.id;\n this.element = inputs.element;\n this.value = inputs.value;\n this.accordionGroup = inputs.accordionGroup;\n this.accordionPanel = inputs.accordionPanel;\n this.expansionControl = new ExpansionControl({\n ...inputs,\n expansionId: inputs.value,\n expandable: () => true,\n expansionManager: inputs.accordionGroup().expansionManager,\n });\n this.expandable = this.expansionControl.isExpandable;\n this.expansionId = this.expansionControl.expansionId;\n this.expanded = this.expansionControl.isExpanded;\n }\n\n /** The key used to navigate to the previous accordion trigger. */\n prevKey = computed(() => {\n if (this.inputs.accordionGroup().orientation() === 'vertical') {\n return 'ArrowUp';\n }\n return this.inputs.accordionGroup().textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** The key used to navigate to the next accordion trigger. */\n nextKey = computed(() => {\n if (this.inputs.accordionGroup().orientation() === 'vertical') {\n return 'ArrowDown';\n }\n return this.inputs.accordionGroup().textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The keydown event manager for the accordion trigger. */\n keydown = computed(() => {\n return new KeyboardEventManager()\n .on(this.prevKey, () => this.accordionGroup().navigation.prev())\n .on(this.nextKey, () => this.accordionGroup().navigation.next())\n .on('Home', () => this.accordionGroup().navigation.first())\n .on('End', () => this.accordionGroup().navigation.last())\n .on(' ', () => this.expansionControl.toggle())\n .on('Enter', () => this.expansionControl.toggle());\n });\n\n /** The pointerdown event manager for the accordion trigger. */\n pointerdown = computed(() => {\n return new PointerEventManager().on(e => {\n const item = this._getItem(e);\n\n if (item) {\n this.accordionGroup().navigation.goto(item);\n this.expansionControl.toggle();\n }\n });\n });\n\n /** Handles keydown events on the trigger, delegating to the group if not disabled. */\n onKeydown(event: KeyboardEvent): void {\n this.keydown().handle(event);\n }\n\n /** Handles pointerdown events on the trigger, delegating to the group if not disabled. */\n onPointerdown(event: PointerEvent): void {\n this.pointerdown().handle(event);\n }\n\n /** Handles focus events on the trigger. This ensures the tabbing changes the active index. */\n onFocus(event: FocusEvent): void {\n const item = this._getItem(event);\n\n if (item && this.inputs.accordionGroup().focusManager.isFocusable(item)) {\n this.accordionGroup().focusManager.focus(item);\n }\n }\n\n private _getItem(e: Event) {\n if (!(e.target instanceof HTMLElement)) {\n return;\n }\n\n const element = e.target.closest('[role=\"button\"]');\n return this.accordionGroup()\n .items()\n .find(i => i.element() === element);\n }\n}\n\n/** Represents the required inputs for the AccordionPanelPattern. */\nexport interface AccordionPanelInputs {\n /** A global unique identifier for the panel. */\n id: SignalLike<string>;\n\n /** A local unique identifier for the panel, matching its trigger's value. */\n value: SignalLike<string>;\n\n /** The parent accordion trigger that controls this panel. */\n accordionTrigger: SignalLike<AccordionTriggerPattern | undefined>;\n}\n\nexport interface AccordionPanelPattern extends AccordionPanelInputs {}\n/** Represents an accordion panel. */\nexport class AccordionPanelPattern {\n /** Whether the accordion panel is hidden. True if the associated trigger is not expanded. */\n hidden: SignalLike<boolean>;\n\n constructor(readonly inputs: AccordionPanelInputs) {\n this.id = inputs.id;\n this.value = inputs.value;\n this.accordionTrigger = inputs.accordionTrigger;\n this.hidden = computed(() => inputs.accordionTrigger()?.expanded() === false);\n }\n}\n"],"names":[],"mappings":";;;;AAgCA,MAAM,SAAS,GAAG,MAAM,QAAiB;AAGzC;MACa,qBAAqB,CAAA;AAUX,IAAA,MAAA;;AARrB,IAAA,UAAU;;AAGV,IAAA,YAAY;;AAGZ,IAAA,gBAAgB;AAEhB,IAAA,WAAA,CAAqB,MAA4B,EAAA;QAA5B,IAAM,CAAA,MAAA,GAAN,MAAM;AACzB,QAAA,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI;AACvB,QAAA,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW;AACrC,QAAA,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa;AACzC,QAAA,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW;AACrC,QAAA,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ;AAC/B,QAAA,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe;AAC7C,QAAA,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK;AACzB,QAAA,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW;AACrC,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY;AACvC,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,SAAS,CAAC;AAChC,YAAA,GAAG,MAAM;YACT,SAAS;AACV,SAAA,CAAC;AACF,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,cAAc,CAAC;AACnC,YAAA,GAAG,MAAM;YACT,SAAS;YACT,YAAY,EAAE,IAAI,CAAC,YAAY;AAChC,SAAA,CAAC;AACF,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,aAAa,CAAC;AACxC,YAAA,GAAG,MAAM;AACV,SAAA,CAAC;;AAEL;AAiBD;MACa,uBAAuB,CAAA;AAyBb,IAAA,MAAA;;AAvBrB,IAAA,UA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cAAc;AACvB,aAAA,KAAK;AACL,aAAA,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,OAAO,CAAC;;AAExC;AAeD;MACa,qBAAqB,CAAA;AAIX,IAAA,MAAA;;AAFrB,IAAA,MAAM;AAEN,IAAA,WAAA,CAAqB,MAA4B,EAAA;QAA5B,IAAM,CAAA,MAAA,GAAN,MAAM;AACzB,QAAA,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE;AACnB,QAAA,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK;AACzB,QAAA,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB;AAC/C,QAAA,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,KAAK,KAAK,CAAC;;AAEhF;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"expansion-C9iQLHOG.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/ui-patterns/behaviors/expansion/expansion.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 */\nimport {computed} from '@angular/core';\nimport {SignalLike, WritableSignalLike} from '../signal-like/signal-like';\n\n/** Represents an item that can be expanded or collapsed. */\nexport interface ExpansionItem {\n /** Whether the item is expandable. */\n expandable: SignalLike<boolean>;\n\n /** Used to uniquely identify an expansion item. */\n expansionId: SignalLike<string>;\n\n /** Whether the expansion is disabled. */\n disabled: SignalLike<boolean>;\n}\n\nexport interface ExpansionControl extends ExpansionItem {}\n/**\n * Controls a single item's expansion state and interactions,\n * delegating actual state changes to an Expansion manager.\n */\nexport class ExpansionControl {\n /** Whether this specific item is currently expanded. Derived from the Expansion manager. */\n readonly isExpanded = computed(() => this.inputs.expansionManager.isExpanded(this));\n\n /** Whether this item can be expanded. */\n readonly isExpandable = computed(() => this.inputs.expansionManager.isExpandable(this));\n\n constructor(readonly inputs: ExpansionItem & {expansionManager: ListExpansion}) {\n this.expansionId = inputs.expansionId;\n this.expandable = inputs.expandable;\n this.disabled = inputs.disabled;\n }\n\n /** Requests the Expansopn manager to open this item. */\n open() {\n this.inputs.expansionManager.open(this);\n }\n\n /** Requests the Expansion manager to close this item. */\n close() {\n this.inputs.expansionManager.close(this);\n }\n\n /** Requests the Expansion manager to toggle this item. */\n toggle() {\n this.inputs.expansionManager.toggle(this);\n }\n}\n\n/** Represents the required inputs for an expansion behavior. */\nexport interface ListExpansionInputs {\n /** Whether multiple items can be expanded at once. */\n multiExpandable: SignalLike<boolean>;\n\n /** An array of ids of the currently expanded items. */\n expandedIds: WritableSignalLike<string[]>;\n\n /** An array of expansion items. */\n items: SignalLike<ExpansionItem[]>;\n\n /** Whether all expansions are disabled. */\n disabled: SignalLike<boolean>;\n}\n\n/** Manages the expansion state of a list of items. */\nexport class ListExpansion {\n /** A signal holding an array of ids of the currently expanded items. */\n expandedIds: WritableSignalLike<string[]>;\n\n constructor(readonly inputs: ListExpansionInputs) {\n this.expandedIds = inputs.expandedIds;\n }\n\n /** Opens the specified item. */\n open(item: ExpansionItem) {\n if (!this.isExpandable(item)) return;\n if (this.isExpanded(item)) return;\n if (!this.inputs.multiExpandable()) {\n this.closeAll();\n }\n this.expandedIds.update(ids => ids.concat(item.expansionId()));\n }\n\n /** Closes the specified item. */\n close(item: ExpansionItem) {\n if (this.isExpandable(item)) {\n this.expandedIds.update(ids => ids.filter(id => id !== item.expansionId()));\n }\n }\n\n /** Toggles the expansion state of the specified item. */\n toggle(item: ExpansionItem) {\n this.expandedIds().includes(item.expansionId()) ? this.close(item) : this.open(item);\n }\n\n /** Opens all focusable items in the list. */\n openAll() {\n if (this.inputs.multiExpandable()) {\n for (const item of this.inputs.items()) {\n this.open(item);\n }\n }\n }\n\n /** Closes all focusable items in the list. */\n closeAll() {\n for (const item of this.inputs.items()) {\n this.close(item);\n }\n }\n\n /** Checks whether the specified item is expandable / collapsible. */\n isExpandable(item: ExpansionItem) {\n return !this.inputs.disabled() && !item.disabled() && item.expandable();\n }\n\n /** Checks whether the specified item is currently expanded. */\n isExpanded(item: ExpansionItem): boolean {\n return this.expandedIds().includes(item.expansionId());\n }\n}\n"],"names":[],"mappings":";;AAuBA;;;AAGG;MACU,gBAAgB,CAAA;AAON,IAAA,MAAA;;AALZ,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;;AAG1E,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AAEvF,IAAA,WAAA,CAAqB,MAAyD,EAAA;QAAzD,IAAM,CAAA,MAAA,GAAN,MAAM;AACzB,QAAA,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW;AACrC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU;AACnC,QAAA,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ;;;IAIjC,IAAI,GAAA;QACF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;;;IAIzC,KAAK,GAAA;QACH,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC;;;IAI1C,MAAM,GAAA;QACJ,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC;;AAE5C;AAiBD;MACa,aAAa,CAAA;AAIH,IAAA,MAAA;;AAFrB,IAAA,WAAW;AAEX,IAAA,WAAA,CAAqB,MAA2B,EAAA;QAA3B,IAAM,CAAA,MAAA,GAAN,MAAM;AACzB,QAAA,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW;;;AAIvC,IAAA,IAAI,CAAC,IA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