forty-cdk 0.2.0 → 0.3.0

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 (220) hide show
  1. package/accordion/README.md +122 -0
  2. package/aspect-ratio/README.md +76 -0
  3. package/avatar/README.md +100 -0
  4. package/breadcrumbs/README.md +49 -0
  5. package/breakpoints/README.md +81 -0
  6. package/button/README.md +49 -0
  7. package/calendar/README.md +458 -0
  8. package/carousel/README.md +358 -0
  9. package/checkbox/README.md +146 -0
  10. package/combobox/README.md +535 -0
  11. package/context-menu/README.md +139 -0
  12. package/date-field/README.md +184 -0
  13. package/date-picker/README.md +338 -0
  14. package/dialog/README.md +388 -0
  15. package/disclosure/README.md +114 -0
  16. package/drag-drop/README.md +359 -0
  17. package/drawer/README.md +560 -0
  18. package/dropdown-menu/README.md +176 -0
  19. package/fesm2022/forty-cdk-accordion.mjs +348 -0
  20. package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
  21. package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
  22. package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
  23. package/fesm2022/forty-cdk-avatar.mjs +308 -0
  24. package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
  25. package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
  26. package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
  27. package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
  28. package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
  29. package/fesm2022/forty-cdk-button.mjs +134 -0
  30. package/fesm2022/forty-cdk-button.mjs.map +1 -0
  31. package/fesm2022/forty-cdk-calendar.mjs +2034 -0
  32. package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
  33. package/fesm2022/forty-cdk-carousel.mjs +968 -0
  34. package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
  35. package/fesm2022/forty-cdk-checkbox.mjs +226 -0
  36. package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
  37. package/fesm2022/forty-cdk-combobox.mjs +2596 -0
  38. package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
  39. package/fesm2022/forty-cdk-context-menu.mjs +413 -0
  40. package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
  41. package/fesm2022/forty-cdk-core.mjs +9022 -0
  42. package/fesm2022/forty-cdk-core.mjs.map +1 -0
  43. package/fesm2022/forty-cdk-date-field.mjs +744 -0
  44. package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
  45. package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
  46. package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
  47. package/fesm2022/forty-cdk-dialog.mjs +707 -0
  48. package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
  49. package/fesm2022/forty-cdk-disclosure.mjs +190 -0
  50. package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
  51. package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
  52. package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
  53. package/fesm2022/forty-cdk-drawer.mjs +1641 -0
  54. package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
  55. package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
  56. package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
  57. package/fesm2022/forty-cdk-field.mjs +425 -0
  58. package/fesm2022/forty-cdk-field.mjs.map +1 -0
  59. package/fesm2022/forty-cdk-fieldset.mjs +164 -0
  60. package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
  61. package/fesm2022/forty-cdk-file-upload.mjs +221 -0
  62. package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
  63. package/fesm2022/forty-cdk-hover-card.mjs +496 -0
  64. package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
  65. package/fesm2022/forty-cdk-input.mjs +274 -0
  66. package/fesm2022/forty-cdk-input.mjs.map +1 -0
  67. package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
  68. package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
  69. package/fesm2022/forty-cdk-listbox.mjs +1279 -0
  70. package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
  71. package/fesm2022/forty-cdk-menu.mjs +1439 -0
  72. package/fesm2022/forty-cdk-menu.mjs.map +1 -0
  73. package/fesm2022/forty-cdk-menubar.mjs +787 -0
  74. package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
  75. package/fesm2022/forty-cdk-meter.mjs +211 -0
  76. package/fesm2022/forty-cdk-meter.mjs.map +1 -0
  77. package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
  78. package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
  79. package/fesm2022/forty-cdk-number-input.mjs +559 -0
  80. package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
  81. package/fesm2022/forty-cdk-otp-input.mjs +527 -0
  82. package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
  83. package/fesm2022/forty-cdk-pagination.mjs +323 -0
  84. package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
  85. package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
  86. package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
  87. package/fesm2022/forty-cdk-popover.mjs +698 -0
  88. package/fesm2022/forty-cdk-popover.mjs.map +1 -0
  89. package/fesm2022/forty-cdk-progress.mjs +226 -0
  90. package/fesm2022/forty-cdk-progress.mjs.map +1 -0
  91. package/fesm2022/forty-cdk-radio-group.mjs +378 -0
  92. package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
  93. package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
  94. package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
  95. package/fesm2022/forty-cdk-search.mjs +205 -0
  96. package/fesm2022/forty-cdk-search.mjs.map +1 -0
  97. package/fesm2022/forty-cdk-select.mjs +1661 -0
  98. package/fesm2022/forty-cdk-select.mjs.map +1 -0
  99. package/fesm2022/forty-cdk-separator.mjs +82 -0
  100. package/fesm2022/forty-cdk-separator.mjs.map +1 -0
  101. package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
  102. package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
  103. package/fesm2022/forty-cdk-slider.mjs +803 -0
  104. package/fesm2022/forty-cdk-slider.mjs.map +1 -0
  105. package/fesm2022/forty-cdk-stepper.mjs +886 -0
  106. package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
  107. package/fesm2022/forty-cdk-switch.mjs +137 -0
  108. package/fesm2022/forty-cdk-switch.mjs.map +1 -0
  109. package/fesm2022/forty-cdk-table.mjs +1518 -0
  110. package/fesm2022/forty-cdk-table.mjs.map +1 -0
  111. package/fesm2022/forty-cdk-tabs.mjs +400 -0
  112. package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
  113. package/fesm2022/forty-cdk-time-field.mjs +593 -0
  114. package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
  115. package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
  116. package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
  117. package/fesm2022/forty-cdk-toast.mjs +1153 -0
  118. package/fesm2022/forty-cdk-toast.mjs.map +1 -0
  119. package/fesm2022/forty-cdk-toggle.mjs +516 -0
  120. package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
  121. package/fesm2022/forty-cdk-toolbar.mjs +374 -0
  122. package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
  123. package/fesm2022/forty-cdk-tooltip.mjs +672 -0
  124. package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
  125. package/fesm2022/forty-cdk-tree.mjs +2007 -0
  126. package/fesm2022/forty-cdk-tree.mjs.map +1 -0
  127. package/fesm2022/forty-cdk-virtualization.mjs +1 -1
  128. package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
  129. package/fesm2022/forty-cdk.mjs +0 -43310
  130. package/fesm2022/forty-cdk.mjs.map +1 -1
  131. package/field/README.md +97 -0
  132. package/fieldset/README.md +86 -0
  133. package/file-upload/README.md +73 -0
  134. package/hover-card/README.md +171 -0
  135. package/input/README.md +156 -0
  136. package/listbox/README.md +424 -0
  137. package/menu/README.md +181 -0
  138. package/menubar/README.md +140 -0
  139. package/meter/README.md +128 -0
  140. package/navigation-menu/README.md +253 -0
  141. package/number-input/README.md +171 -0
  142. package/otp-input/README.md +198 -0
  143. package/package.json +213 -1
  144. package/pagination/README.md +61 -0
  145. package/pane-resizer/README.md +136 -0
  146. package/popover/README.md +262 -0
  147. package/progress/README.md +115 -0
  148. package/radio-group/README.md +129 -0
  149. package/scroll-area/README.md +184 -0
  150. package/search/README.md +42 -0
  151. package/select/README.md +488 -0
  152. package/separator/README.md +84 -0
  153. package/signal-forms/README.md +72 -0
  154. package/slider/README.md +152 -0
  155. package/stepper/README.md +292 -0
  156. package/switch/README.md +116 -0
  157. package/table/README.md +769 -0
  158. package/tabs/README.md +130 -0
  159. package/time-field/README.md +157 -0
  160. package/time-picker/README.md +172 -0
  161. package/toast/README.md +398 -0
  162. package/toggle/README.md +224 -0
  163. package/toolbar/README.md +109 -0
  164. package/tooltip/README.md +274 -0
  165. package/tree/README.md +708 -0
  166. package/types/forty-cdk-accordion.d.ts +242 -0
  167. package/types/forty-cdk-aspect-ratio.d.ts +59 -0
  168. package/types/forty-cdk-avatar.d.ts +133 -0
  169. package/types/forty-cdk-breadcrumbs.d.ts +92 -0
  170. package/types/forty-cdk-breakpoints.d.ts +141 -0
  171. package/types/forty-cdk-button.d.ts +80 -0
  172. package/types/forty-cdk-calendar.d.ts +914 -0
  173. package/types/forty-cdk-carousel.d.ts +530 -0
  174. package/types/forty-cdk-checkbox.d.ts +141 -0
  175. package/types/forty-cdk-combobox.d.ts +1259 -0
  176. package/types/forty-cdk-context-menu.d.ts +313 -0
  177. package/types/forty-cdk-core.d.ts +5774 -0
  178. package/types/forty-cdk-date-field.d.ts +307 -0
  179. package/types/forty-cdk-date-picker.d.ts +622 -0
  180. package/types/forty-cdk-dialog.d.ts +546 -0
  181. package/types/forty-cdk-disclosure.d.ts +127 -0
  182. package/types/forty-cdk-drag-drop.d.ts +456 -0
  183. package/types/forty-cdk-drawer.d.ts +871 -0
  184. package/types/forty-cdk-dropdown-menu.d.ts +242 -0
  185. package/types/forty-cdk-field.d.ts +236 -0
  186. package/types/forty-cdk-fieldset.d.ts +119 -0
  187. package/types/forty-cdk-file-upload.d.ts +124 -0
  188. package/types/forty-cdk-hover-card.d.ts +320 -0
  189. package/types/forty-cdk-input.d.ts +169 -0
  190. package/types/forty-cdk-internationalized-date.d.ts +1 -1
  191. package/types/forty-cdk-listbox.d.ts +513 -0
  192. package/types/forty-cdk-menu.d.ts +629 -0
  193. package/types/forty-cdk-menubar.d.ts +451 -0
  194. package/types/forty-cdk-meter.d.ts +122 -0
  195. package/types/forty-cdk-navigation-menu.d.ts +514 -0
  196. package/types/forty-cdk-number-input.d.ts +319 -0
  197. package/types/forty-cdk-otp-input.d.ts +248 -0
  198. package/types/forty-cdk-pagination.d.ts +214 -0
  199. package/types/forty-cdk-pane-resizer.d.ts +145 -0
  200. package/types/forty-cdk-popover.d.ts +509 -0
  201. package/types/forty-cdk-progress.d.ts +143 -0
  202. package/types/forty-cdk-radio-group.d.ts +222 -0
  203. package/types/forty-cdk-scroll-area.d.ts +258 -0
  204. package/types/forty-cdk-search.d.ts +142 -0
  205. package/types/forty-cdk-select.d.ts +899 -0
  206. package/types/forty-cdk-separator.d.ts +59 -0
  207. package/types/forty-cdk-signal-forms.d.ts +58 -0
  208. package/types/forty-cdk-slider.d.ts +379 -0
  209. package/types/forty-cdk-stepper.d.ts +650 -0
  210. package/types/forty-cdk-switch.d.ts +87 -0
  211. package/types/forty-cdk-table.d.ts +723 -0
  212. package/types/forty-cdk-tabs.d.ts +235 -0
  213. package/types/forty-cdk-time-field.d.ts +307 -0
  214. package/types/forty-cdk-time-picker.d.ts +578 -0
  215. package/types/forty-cdk-toast.d.ts +598 -0
  216. package/types/forty-cdk-toggle.d.ts +310 -0
  217. package/types/forty-cdk-toolbar.d.ts +217 -0
  218. package/types/forty-cdk-tooltip.d.ts +436 -0
  219. package/types/forty-cdk-tree.d.ts +688 -0
  220. package/types/forty-cdk.d.ts +1 -19743
@@ -0,0 +1,1259 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, ModelSignal, Signal, Provider } from '@angular/core';
3
+ import { ReferenceElement } from '@floating-ui/dom';
4
+ import { FormValueControl } from '@angular/forms/signals';
5
+ import { WritingDirection, FloatingSide, FloatingAlign, CollectionHandle, VetoableNativeEvent, FormUiControlBase, VetoableEvent } from 'forty-cdk/core';
6
+ import * as forty_cdk_combobox from 'forty-cdk/combobox';
7
+
8
+ /**
9
+ * Why the combobox closed. Mirrors the menu / select vocabulary so consumers
10
+ * can switch on the reason regardless of overlay flavor.
11
+ */
12
+ type ForComboboxCloseReason = 'escape' | 'pointerDownOutside' | 'focusOutside' | 'select' | 'tab' | 'programmatic';
13
+ /**
14
+ * Autocomplete mode applied to the input. Mirrors the
15
+ * [WAI-ARIA combobox autocomplete property](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/#wai-ariaroles,states,andproperties).
16
+ *
17
+ * - `'none'`: input acts as a free-text query; no completion is performed.
18
+ * - `'list'`: the listbox shows filtered options; the input value reflects
19
+ * the user's typed query verbatim.
20
+ * - `'inline'`: the rest of the first matching option is auto-completed
21
+ * into the input as selected text; the listbox does not auto-open.
22
+ * - `'both'`: combines `'list'` and `'inline'` — listbox opens with the
23
+ * filtered options *and* the first match auto-completes inline.
24
+ */
25
+ type ForComboboxAutocomplete = 'none' | 'list' | 'inline' | 'both';
26
+ /**
27
+ * Where the auto-highlight seed lands when the listbox opens. `'first'` / `'last'`
28
+ * bias to the natural extreme (e.g. ArrowDown / ArrowUp on the trigger). `'selected'`
29
+ * — used by the picker trigger's plain open — seeds the committed selection, falling
30
+ * back to the first enabled option when there is no selection or it is filtered out.
31
+ */
32
+ type ForComboboxInitialFocus = 'first' | 'last' | 'selected';
33
+ interface ForComboboxOptionHandle<T = unknown> extends CollectionHandle {
34
+ readonly id: Signal<string>;
35
+ readonly value: Signal<T>;
36
+ readonly label: Signal<string>;
37
+ readonly disabled: Signal<boolean>;
38
+ /**
39
+ * Index in the consumer's source array. Required when virtualizing so the
40
+ * directive can fold off-screen options into the snapshot keyed by
41
+ * absolute position. Optional otherwise — when absent the snapshot falls
42
+ * back to DOM order.
43
+ */
44
+ readonly posInSet?: Signal<number | null>;
45
+ }
46
+ interface ForComboboxChipHandle<T = unknown> extends CollectionHandle {
47
+ readonly value: Signal<T>;
48
+ }
49
+ /**
50
+ * Coordination contract owned by `[forCombobox]`. Input, content, options,
51
+ * groups, separators, the empty-state directive, the clear button, and the
52
+ * multi-mode chip pieces all inject this token to read state and delegate
53
+ * behavior.
54
+ *
55
+ * The value model is always an array — single mode (`multiple=false`,
56
+ * default) keeps 0 or 1 element, multi mode keeps any number. This mirrors
57
+ * `[forListbox]` / `[forSelect]` so consumers learn one selection contract
58
+ * across the whole library.
59
+ *
60
+ * Generic over the option value type `T` (default `string`). When a
61
+ * consumer binds object items the directive infers `T` from `[(value)]` and
62
+ * the per-piece signatures specialize accordingly. Items are compared via
63
+ * the consumer-provided `isItemEqualToValue` and rendered as labels via
64
+ * `itemToStringLabel`; the form's hidden inputs serialize via
65
+ * `itemToFormValue`.
66
+ */
67
+ interface ForComboboxContext<T = unknown> {
68
+ readonly query: ModelSignal<string>;
69
+ readonly value: ModelSignal<readonly T[]>;
70
+ readonly open: ModelSignal<boolean>;
71
+ readonly multiple: Signal<boolean>;
72
+ /**
73
+ * The combobox's effective disabled — its own `disabled` input OR'd with a
74
+ * surrounding disabled `[forFieldset]`. Input, options, clear, and chip pieces
75
+ * read this so a disabled combobox (or fieldset) is inert and exposes
76
+ * `aria-disabled`.
77
+ */
78
+ readonly effectiveDisabled: Signal<boolean>;
79
+ readonly readonly: Signal<boolean>;
80
+ readonly required: Signal<boolean>;
81
+ readonly invalid: Signal<boolean>;
82
+ readonly pending: Signal<boolean>;
83
+ readonly dir: Signal<WritingDirection>;
84
+ readonly autocompleteMode: Signal<ForComboboxAutocomplete>;
85
+ readonly openOnFocus: Signal<boolean>;
86
+ readonly openOnQuery: Signal<boolean>;
87
+ readonly commitOnSelect: Signal<boolean>;
88
+ readonly clearOnQueryChange: Signal<boolean>;
89
+ readonly dismissible: Signal<boolean>;
90
+ /**
91
+ * Whether focus returns to the `[forComboboxTrigger]` on close (picker
92
+ * anatomy). Ignored in the editable anatomy, where focus never left the
93
+ * input. Default `true`.
94
+ */
95
+ readonly returnFocus: Signal<boolean>;
96
+ readonly side: Signal<FloatingSide | undefined>;
97
+ readonly align: Signal<FloatingAlign>;
98
+ readonly sideOffset: Signal<number>;
99
+ readonly alignOffset: Signal<number>;
100
+ readonly avoidCollisions: Signal<boolean>;
101
+ readonly collisionPadding: Signal<number>;
102
+ readonly arrowPadding: Signal<number>;
103
+ readonly sticky: Signal<'partial' | 'always' | false>;
104
+ readonly hideWhenDetached: Signal<boolean>;
105
+ readonly clipUntilPositioned: Signal<boolean>;
106
+ readonly loop: Signal<boolean>;
107
+ readonly inputId: Signal<string>;
108
+ readonly contentId: Signal<string>;
109
+ /**
110
+ * Id of the `[forComboboxList]` listbox surface (picker anatomy). The input's
111
+ * `aria-controls` points here when a list is registered; without one it falls
112
+ * back to {@link contentId} (the editable anatomy where content itself is the
113
+ * listbox).
114
+ */
115
+ readonly listId: Signal<string>;
116
+ /**
117
+ * Id of the element carrying `role="listbox"` — {@link listId} when a
118
+ * `[forComboboxList]` is registered, otherwise {@link contentId}. The input
119
+ * targets this with `aria-controls`.
120
+ */
121
+ readonly listboxId: Signal<string>;
122
+ readonly ariaLabel: Signal<string | null>;
123
+ /**
124
+ * Element floating-ui anchors the listbox against. Prefers an optional
125
+ * `[forComboboxAnchor]` when registered, otherwise falls back to the input.
126
+ * Decoupled from `input` so the input keeps driving `aria-controls`,
127
+ * `aria-activedescendant`, keyboard interaction, and its outside-pointer
128
+ * exemption regardless of where the listbox paints.
129
+ */
130
+ readonly anchor: Signal<ReferenceElement | null>;
131
+ readonly input: Signal<HTMLInputElement | null>;
132
+ registerInput(el: HTMLInputElement): void;
133
+ unregisterInput(el: HTMLInputElement): void;
134
+ /**
135
+ * Register / unregister an optional `[forComboboxAnchor]` positioning
136
+ * element. At most one anchor per root; a second registration throws.
137
+ * Reference-based unregister, so an anchor torn down inside `@if` restores
138
+ * the input fallback cleanly.
139
+ */
140
+ registerAnchor(el: HTMLElement): void;
141
+ unregisterAnchor(el: HTMLElement): void;
142
+ /**
143
+ * The optional `[forComboboxTrigger]` button (picker anatomy). When present
144
+ * it is the default positioning anchor (after an explicit `[forComboboxAnchor]`)
145
+ * and the element focus returns to on close. `null` in the editable anatomy.
146
+ */
147
+ readonly trigger: Signal<HTMLElement | null>;
148
+ registerTrigger(el: HTMLElement): void;
149
+ unregisterTrigger(el: HTMLElement): void;
150
+ readonly content: Signal<HTMLElement | null>;
151
+ registerContent(el: HTMLElement): void;
152
+ unregisterContent(el: HTMLElement): void;
153
+ /**
154
+ * The optional `[forComboboxList]` listbox surface (picker anatomy). When
155
+ * registered, `[forComboboxContent]` drops its `role="listbox"` semantics and
156
+ * becomes a neutral popup surface; the list carries the listbox role and owns
157
+ * the options. `null` in the editable anatomy.
158
+ */
159
+ readonly list: Signal<HTMLElement | null>;
160
+ /** True when a `[forComboboxList]` is registered (picker anatomy). */
161
+ readonly hasList: Signal<boolean>;
162
+ registerList(el: HTMLElement): void;
163
+ unregisterList(el: HTMLElement): void;
164
+ registerOption(handle: ForComboboxOptionHandle<T>): void;
165
+ unregisterOption(handle: ForComboboxOptionHandle<T>): void;
166
+ readonly options: Signal<readonly ForComboboxOptionHandle<T>[]>;
167
+ /** Multi-mode chip collection. Order follows DOM (= `value()` order in practice). */
168
+ registerChip(handle: ForComboboxChipHandle<T>): void;
169
+ unregisterChip(handle: ForComboboxChipHandle<T>): void;
170
+ readonly chips: Signal<readonly ForComboboxChipHandle<T>[]>;
171
+ /**
172
+ * Selected entries paired with their resolved label (from the option
173
+ * cache) — convenient for rendering chips with `@for`. Falls back to
174
+ * `itemToStringLabel(value)` when no matching option is registered (and
175
+ * to the raw string when `T` is `string`).
176
+ */
177
+ readonly selected: Signal<readonly {
178
+ value: T;
179
+ label: string;
180
+ }[]>;
181
+ /** Compare two items for equality. Defaults to `===`; overridden for object values. */
182
+ readonly isItemEqualToValue: Signal<(a: T, b: T) => boolean>;
183
+ /** Render an item as a string label. Drives chip labels and `commitOnSelect` writes into the input. */
184
+ readonly itemToStringLabel: Signal<(item: T) => string>;
185
+ /** Serialize an item for the hidden input's `value` attribute. */
186
+ readonly itemToFormValue: Signal<(item: T) => string>;
187
+ /** Id of the currently active option (drives `aria-activedescendant` on the input). */
188
+ readonly activeId: Signal<string | null>;
189
+ /** Set the activedescendant directly. Used by options on pointer-move and by the input on inline-completion seed. */
190
+ setActiveId(id: string | null): void;
191
+ /** Read-only access to the cached snapshot consumed by inline-autocomplete in the input directive. */
192
+ cachedOptions(): readonly {
193
+ id: string;
194
+ value: T;
195
+ label: string;
196
+ }[];
197
+ /**
198
+ * Total number of options in the consumer's source array. Used for
199
+ * `aria-setsize` and for navigation past the visible window when
200
+ * virtualizing. Falls back to `options().length` when undefined.
201
+ */
202
+ readonly totalCount: Signal<number | undefined>;
203
+ /** Inclusive-exclusive [start, end) range of options currently rendered when virtualizing. */
204
+ readonly visibleRange: Signal<readonly [number, number] | undefined>;
205
+ /** True when `value` includes `v` per the active equality function. */
206
+ isSelected(value: T): boolean;
207
+ /** True when `id` is the activedescendant. */
208
+ isActive(id: string): boolean;
209
+ /**
210
+ * Whether a pointer-suppression window is currently open. Opened whenever the
211
+ * directive scrolls the active option into view during keyboard navigation,
212
+ * so a synthetic `pointermove` fired because the scroll slid a different
213
+ * option under a stationary cursor does not hijack the activedescendant.
214
+ * Options consult this from their hover handler and skip the move while it
215
+ * returns `true`.
216
+ */
217
+ isPointerSuppressed(): boolean;
218
+ /**
219
+ * Activate by handle. Single mode replaces + closes + commits label. Multi
220
+ * mode toggles in/out + stays open + (when `commitOnSelect`) clears the
221
+ * query so the user can search the next item. No-op on disabled / readonly.
222
+ */
223
+ activate(handle: ForComboboxOptionHandle<T>): void;
224
+ /** Remove a value from `value()`. Used by chip-remove and Backspace heuristics. */
225
+ removeValue(value: T): void;
226
+ /** Move the activedescendant to the first / last / next / prev enabled option. */
227
+ navigate(direction: 'next' | 'prev' | 'first' | 'last'): void;
228
+ /** Activate the option currently marked as activedescendant (Enter from the input). */
229
+ activateActive(): boolean;
230
+ /** Set the typed query. Emits inline completion / openOnQuery side-effects via the input directive. */
231
+ setQueryFromInput(query: string): void;
232
+ /**
233
+ * Clear value and (optionally) query. Used by `[forComboboxClear]` and
234
+ * by the Backspace-on-empty-input heuristic. The query is reset only
235
+ * when `clearQuery` is true.
236
+ */
237
+ clear(clearQuery?: boolean): void;
238
+ /** Where focus should land after the listbox opens. The input directive sets this before flipping `open`. */
239
+ readonly initialFocus: Signal<ForComboboxInitialFocus>;
240
+ setInitialFocus(target: ForComboboxInitialFocus): void;
241
+ toggle(): void;
242
+ openMenu(initialFocus?: ForComboboxInitialFocus): void;
243
+ closeMenu(reason: ForComboboxCloseReason): void;
244
+ /**
245
+ * The reason of the most recent close (or `null` before any close / after a
246
+ * fresh open). `[forComboboxContent]` reads this so a `'tab'` close skips the
247
+ * return-focus move — Tab has already advanced focus and re-focusing the
248
+ * trigger would steal it back. Only meaningful in the picker anatomy.
249
+ */
250
+ readonly lastCloseReason: Signal<ForComboboxCloseReason | null>;
251
+ /**
252
+ * Fires the `(autoFocusOnOpen)` output and returns whether the consumer
253
+ * vetoed (called `preventDefault()`). The picker anatomy moves focus into the
254
+ * input on open; a veto skips that imperative move. Editable anatomy never
255
+ * calls this (focus never moves).
256
+ */
257
+ emitAutoFocusOnOpen(): boolean;
258
+ /**
259
+ * Fires the `(autoFocusOnClose)` output and returns whether the consumer
260
+ * vetoed. The picker anatomy returns focus to the trigger on close; a veto
261
+ * skips it.
262
+ */
263
+ emitAutoFocusOnClose(): boolean;
264
+ /**
265
+ * Escape is consumer-owned and routed through the input directive (focus
266
+ * stays in the input), so it is invoked directly with the raw
267
+ * `KeyboardEvent` rather than through the dismissable layer.
268
+ */
269
+ emitEscapeKeyDown(event: KeyboardEvent): void;
270
+ /**
271
+ * Outside-interaction emit forwarders. `injectOverlayShell` builds and
272
+ * reuses one `VetoableNativeEvent` across the specific and composite
273
+ * channels, then hands it to these forwarders to fire the matching output
274
+ * and calls `requestClose` when un-vetoed.
275
+ */
276
+ emitPointerDownOutside(veto: VetoableNativeEvent<PointerEvent>): void;
277
+ emitFocusOutside(veto: VetoableNativeEvent<FocusEvent>): void;
278
+ emitInteractOutside(veto: VetoableNativeEvent<PointerEvent | FocusEvent>): void;
279
+ /** Implicit close requested by the shell after an un-vetoed outside interaction. */
280
+ requestClose(reason: 'pointerDownOutside' | 'focusOutside'): void;
281
+ /** Flip the `touched` model. Called by input on blur-to-outside and by dismiss events. */
282
+ markTouched(): void;
283
+ }
284
+ /**
285
+ * `ForCombobox<T>`'s generic does NOT flow to this token: an `InjectionToken`
286
+ * is a single runtime instance, so it is published at `ForComboboxContext<unknown>`.
287
+ * `injectComboboxContext<T>()` re-applies `T` with an `as unknown as` cast, and
288
+ * each piece (input, option, chip) relies on consumer discipline — the
289
+ * `[forComboboxOption][value]` and the root `[(value)]` must be the same `T`.
290
+ * There is no clean fix without abandoning the token pattern; the contract is
291
+ * the consumer's to honor. Object identity is reconciled at runtime via
292
+ * `isItemEqualToValue`, which bounds the practical blast radius of a mismatch.
293
+ */
294
+ declare const FOR_COMBOBOX_CONTEXT: InjectionToken<ForComboboxContext<unknown>>;
295
+
296
+ /**
297
+ * Headless implementation of the [WAI-ARIA combobox with listbox popup pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/).
298
+ * Implements `FormValueControl<readonly T[]>` from `@angular/forms/signals`
299
+ * for `[formField]` auto-wiring.
300
+ *
301
+ * Generic over the option value type `T` (default `string`). When the
302
+ * consumer binds object items the directive infers `T` from `[(value)]`
303
+ * and per-piece signatures (`[forComboboxOption][value]`,
304
+ * `[forComboboxChip][value]`) specialize accordingly. Object identity is
305
+ * resolved by the consumer-supplied `[isItemEqualToValue]` and labels by
306
+ * `[itemToStringLabel]`; the hidden inputs serialize via
307
+ * `[itemToFormValue]` (defaults to `JSON.stringify` for non-strings).
308
+ *
309
+ * Selection is always modeled as `readonly T[]`:
310
+ * - In single mode (`multiple=false`, default), the array has 0 or 1
311
+ * element and option activation closes the listbox.
312
+ * - In multi mode, option activation toggles in/out and the listbox stays
313
+ * open. Selected entries are typically rendered as chips inside
314
+ * `[forComboboxChips]` next to the input.
315
+ *
316
+ * The visible input ("query") and the form value are separate two-way
317
+ * bindable models — the consumer keeps them in sync via filtering /
318
+ * display logic, and the primitive only commits to `value` when an option
319
+ * is explicitly activated.
320
+ *
321
+ * Filtering is **always** the consumer's responsibility — the primitive is
322
+ * headless and doesn't filter the registered options. Render the filtered
323
+ * subset with `@for` and the registry tracks them automatically.
324
+ */
325
+ declare class ForCombobox<T = string> extends FormUiControlBase implements FormValueControl<readonly T[]>, ForComboboxContext<T> {
326
+ #private;
327
+ /**
328
+ * Two-way bindable. Visible input text. The `model()` change emitter
329
+ * (`(queryChange)`) fires only on internal mutations (option activation
330
+ * commit, `clear()`, multi-mode select reset, picker-anatomy reset on
331
+ * close), never on consumer writes via `[(query)]`.
332
+ */
333
+ readonly query: _angular_core.ModelSignal<string>;
334
+ /**
335
+ * Two-way bindable. Selected option values. Single mode (`multiple=false`)
336
+ * keeps 0 or 1 element; multi mode keeps any number. The `model()` change
337
+ * emitter (`(valueChange)`) fires only on internal selection changes,
338
+ * never on consumer writes via `[(value)]`.
339
+ */
340
+ readonly value: _angular_core.ModelSignal<readonly T[]>;
341
+ /**
342
+ * Compare two items for equality. Defaults to `===`, which is the
343
+ * correct identity for primitive `T` (e.g. strings, numbers). Override
344
+ * when binding object items so the directive can locate selected /
345
+ * removed entries by id (or any other stable key) instead of by
346
+ * reference: `[isItemEqualToValue]="(a, b) => a.id === b.id"`.
347
+ */
348
+ readonly isItemEqualToValue: _angular_core.InputSignal<(a: T, b: T) => boolean>;
349
+ /**
350
+ * Render an item as a string label. Defaults to `String(item)`, which is
351
+ * identity for strings. Drives the visible input text after activation
352
+ * (when `commitOnSelect`) and the chip label fallback in multi mode.
353
+ * Override when binding object items so the directive can fall back to
354
+ * a meaningful label without relying on the option cache being warm:
355
+ * `[itemToStringLabel]="(it) => it.name"`.
356
+ */
357
+ readonly itemToStringLabel: _angular_core.InputSignal<(item: T) => string>;
358
+ /**
359
+ * Serialize an item for the hidden input that participates in native
360
+ * form submission. Defaults to identity for strings and to
361
+ * `JSON.stringify` for non-string items so the primitive works out of
362
+ * the box round-tripping objects. Override to emit a specific wire
363
+ * format — typically a per-item id — when the backend expects that:
364
+ * `[itemToFormValue]="(it) => it.id"`.
365
+ */
366
+ readonly itemToFormValue: _angular_core.InputSignal<(item: T) => string>;
367
+ /**
368
+ * Two-way bindable. Whether the listbox is currently shown. Internal
369
+ * transitions: input typing (when `openOnQuery`), focus (when
370
+ * `openOnFocus`), ArrowDown / ArrowUp, Escape, outside dismissal,
371
+ * single-mode option activation.
372
+ */
373
+ readonly open: _angular_core.ModelSignal<boolean>;
374
+ readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
375
+ /**
376
+ * Autocomplete mode applied to the input. Mirrors the
377
+ * [WAI-ARIA `aria-autocomplete` property](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/#wai-ariaroles,states,andproperties)
378
+ * and drives whether the listbox auto-opens on query and whether the
379
+ * input gets inline-completed with the first match. Renamed from
380
+ * `autocomplete` so consumers don't conflate it with the native HTML
381
+ * `autocomplete` attribute (which the directive forces to `"off"`).
382
+ */
383
+ readonly autocompleteMode: _angular_core.InputSignal<ForComboboxAutocomplete>;
384
+ /** Open the listbox when the input gains focus. Off by default — opening on query / arrow keys is the standard ecosystem behavior. */
385
+ readonly openOnFocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
386
+ /** Open the listbox when the user starts typing. On by default. Only honored when `autocompleteMode` includes a listbox (`'list'` or `'both'`). */
387
+ readonly openOnQuery: _angular_core.InputSignalWithTransform<boolean, unknown>;
388
+ /**
389
+ * In single mode, copy the activated option's label into `query`. In
390
+ * multi mode, instead **clear** the query so the user can search the
391
+ * next item. On by default in both. Set `false` to leave `query`
392
+ * untouched on activation in either mode.
393
+ *
394
+ * Governs the **editable anatomy** only. In the picker anatomy (a
395
+ * `[forComboboxTrigger]` is registered) the in-panel input is a transient
396
+ * filter, not the value display: the single-mode label copy is always
397
+ * skipped and `query` resets to `''` on close regardless of this flag.
398
+ */
399
+ readonly commitOnSelect: _angular_core.InputSignalWithTransform<boolean, unknown>;
400
+ /** When the user edits the query, automatically clear the committed `value`. Off by default — most apps want the value preserved across query edits. Single-mode only. */
401
+ readonly clearOnQueryChange: _angular_core.InputSignalWithTransform<boolean, unknown>;
402
+ /**
403
+ * Auto-highlight the first enabled option whenever the listbox is open
404
+ * and no activedescendant is set (e.g. after the consumer's filter
405
+ * removed the previously-active option). On by default. Set `false` for
406
+ * "user must arrow before anything is highlighted" behavior.
407
+ */
408
+ readonly autoHighlight: _angular_core.InputSignalWithTransform<boolean, unknown>;
409
+ /**
410
+ * Writing direction. Drives chip-cluster keyboard navigation (ArrowLeft /
411
+ * ArrowRight semantics swap in RTL so they follow the visual order, not DOM
412
+ * order) and the default `align` of the listbox (anchors to the right edge
413
+ * of the input in RTL). When unset (default `null`), the inherited ambient
414
+ * direction is resolved from the nearest ancestor carrying a `dir` attribute
415
+ * (or `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]` always wins
416
+ * and the resolved value is reflected to the host `dir` attribute.
417
+ */
418
+ readonly _dirInput: _angular_core.InputSignal<WritingDirection | null>;
419
+ readonly dir: _angular_core.Signal<WritingDirection>;
420
+ /**
421
+ * Side the listbox is anchored to. Defaults to `'bottom'`. Pair with
422
+ * `align` for the full positioning API.
423
+ */
424
+ readonly side: _angular_core.InputSignal<FloatingSide | undefined>;
425
+ /**
426
+ * Alignment along the chosen `side`. When unset, defaults to `'start'`
427
+ * in LTR and `'end'` in RTL (per `dir`). Set explicitly to pin an
428
+ * alignment regardless of writing direction.
429
+ *
430
+ * The input is aliased to `align`; consumers bind `[align]="..."` and
431
+ * read the effective value via the public `align` computed below.
432
+ */
433
+ readonly _alignInput: _angular_core.InputSignal<FloatingAlign | undefined>;
434
+ readonly align: _angular_core.Signal<FloatingAlign>;
435
+ /** Gap (px) between input and listbox along the main axis. Default `4`. */
436
+ readonly sideOffset: _angular_core.InputSignalWithTransform<number, unknown>;
437
+ /** Gap (px) along the cross axis. Default `0`. */
438
+ readonly alignOffset: _angular_core.InputSignalWithTransform<number, unknown>;
439
+ /** When `true` (default), `flip` and `shift` keep the listbox inside the viewport. */
440
+ readonly avoidCollisions: _angular_core.InputSignalWithTransform<boolean, unknown>;
441
+ /** Padding (px) applied uniformly to flip / shift / size. Default `8`. */
442
+ readonly collisionPadding: _angular_core.InputSignalWithTransform<number, unknown>;
443
+ /** Padding (px) for the `arrow` middleware. Default `0`. */
444
+ readonly arrowPadding: _angular_core.InputSignalWithTransform<number, unknown>;
445
+ /** Stickiness behaviour for `shift`. Default `'partial'`. */
446
+ readonly sticky: _angular_core.InputSignal<false | "partial" | "always">;
447
+ /** When `true`, sets `data-detached=""` while the input is scrolled off-screen. */
448
+ readonly hideWhenDetached: _angular_core.InputSignalWithTransform<boolean, unknown>;
449
+ /**
450
+ * When `true` (default), the content is clipped until floating-ui resolves
451
+ * its first position, preventing a flash at the viewport corner. Set to
452
+ * `false` so a dramatic `animate.enter` plays from its first frame (the
453
+ * surface may flash briefly at the unresolved position while positioning
454
+ * computes).
455
+ */
456
+ readonly clipUntilPositioned: _angular_core.InputSignalWithTransform<boolean, unknown>;
457
+ readonly loop: _angular_core.InputSignalWithTransform<boolean, unknown>;
458
+ /** When true (default), Escape, pointer-down outside, and focus outside close the listbox. */
459
+ readonly dismissible: _angular_core.InputSignalWithTransform<boolean, unknown>;
460
+ /**
461
+ * When true (default), focus returns to the `[forComboboxTrigger]` on close.
462
+ * Only relevant in the picker anatomy (a trigger is registered) — in the
463
+ * editable anatomy focus never leaves the input, so there is nothing to
464
+ * return.
465
+ */
466
+ readonly returnFocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
467
+ /** Manual `aria-label` on the listbox (`[forComboboxList]`, or `[forComboboxContent]` in the editable anatomy) when the input isn't a meaningful name. */
468
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
469
+ /**
470
+ * Total number of options in the consumer's source array. Set when wiring
471
+ * up a virtualized listbox (only the visible window is rendered) so the
472
+ * directive can reflect `aria-setsize` and walk the snapshot for
473
+ * navigation past the rendered range. Defaults to `undefined`, in which
474
+ * case the directive falls back to `options().length` (the live registry).
475
+ */
476
+ readonly totalCount: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
477
+ /**
478
+ * Inclusive-exclusive `[start, end)` range of options currently rendered
479
+ * in the DOM. Used by `navigate()` to translate "move to absolute
480
+ * position N" into either an in-window highlight update or a request to
481
+ * the consumer to scroll N into view (`(scrollToIndex)`). When
482
+ * `undefined` (default), navigation assumes every option in the snapshot
483
+ * is rendered — appropriate for non-virtualized lists.
484
+ */
485
+ readonly visibleRange: _angular_core.InputSignal<readonly [number, number] | undefined>;
486
+ /**
487
+ * Emitted when keyboard navigation needs to land on an option whose
488
+ * absolute index falls outside `visibleRange()`. Wire this to the
489
+ * consumer's virtualizer (`scrollToIndex(idx)` on `@tanstack/virtual`,
490
+ * `virtua`, etc.); once the option mounts, the directive seeds
491
+ * `aria-activedescendant` automatically.
492
+ */
493
+ readonly scrollToIndex: _angular_core.OutputEmitterRef<number>;
494
+ readonly escapeKeyDown: _angular_core.OutputEmitterRef<VetoableNativeEvent<KeyboardEvent>>;
495
+ readonly pointerDownOutside: _angular_core.OutputEmitterRef<VetoableNativeEvent<PointerEvent>>;
496
+ readonly focusOutside: _angular_core.OutputEmitterRef<VetoableNativeEvent<FocusEvent>>;
497
+ readonly interactOutside: _angular_core.OutputEmitterRef<VetoableNativeEvent<PointerEvent | FocusEvent>>;
498
+ /**
499
+ * _(picker anatomy only)_ Fires just before focus moves into the input on
500
+ * open. Call `preventDefault()` on the emitted veto to skip the imperative
501
+ * focus move. Only emitted when a `[forComboboxTrigger]` is registered — the
502
+ * editable anatomy keeps focus in the input the whole time and has no move to
503
+ * veto.
504
+ */
505
+ readonly autoFocusOnOpen: _angular_core.OutputEmitterRef<VetoableEvent>;
506
+ /**
507
+ * _(picker anatomy only)_ Fires just before focus returns to the trigger on
508
+ * close. Call `preventDefault()` on the veto to suppress the return-focus.
509
+ */
510
+ readonly autoFocusOnClose: _angular_core.OutputEmitterRef<VetoableEvent>;
511
+ readonly inputId: _angular_core.WritableSignal<string>;
512
+ readonly contentId: _angular_core.WritableSignal<string>;
513
+ readonly listId: _angular_core.WritableSignal<string>;
514
+ readonly input: _angular_core.Signal<HTMLInputElement | null>;
515
+ readonly trigger: _angular_core.Signal<HTMLElement | null>;
516
+ /**
517
+ * Element floating-ui anchors the listbox against. Resolution order:
518
+ * explicit `[forComboboxAnchor]` → `[forComboboxTrigger]` (picker anatomy) →
519
+ * the input (editable anatomy fallback, so existing comboboxes keep their
520
+ * behavior). Decoupled from `input` so the input keeps driving
521
+ * `aria-controls`, `aria-activedescendant`, keyboard interaction, and its
522
+ * dismissal exemption regardless of where the listbox paints.
523
+ */
524
+ readonly anchor: _angular_core.Signal<ReferenceElement | null>;
525
+ readonly content: _angular_core.Signal<HTMLElement | null>;
526
+ readonly list: _angular_core.Signal<HTMLElement | null>;
527
+ /** True once a `[forComboboxList]` has registered (picker anatomy). */
528
+ readonly hasList: _angular_core.Signal<boolean>;
529
+ /**
530
+ * Id of the element carrying `role="listbox"`: the list when one is
531
+ * registered (picker anatomy), otherwise the content surface (editable
532
+ * anatomy). The input targets this with `aria-controls`.
533
+ */
534
+ readonly listboxId: _angular_core.Signal<string>;
535
+ readonly options: _angular_core.Signal<readonly ForComboboxOptionHandle<T>[]>;
536
+ readonly chips: _angular_core.Signal<readonly ForComboboxChipHandle<T>[]>;
537
+ readonly initialFocus: _angular_core.Signal<ForComboboxInitialFocus>;
538
+ readonly lastCloseReason: _angular_core.Signal<ForComboboxCloseReason | null>;
539
+ readonly activeId: _angular_core.Signal<string | null>;
540
+ readonly selected: _angular_core.Signal<readonly {
541
+ value: T;
542
+ label: string;
543
+ }[]>;
544
+ /**
545
+ * Read-only single-select convenience view of {@link value}. Returns the
546
+ * sole selected item when exactly one is selected, otherwise `null` (empty
547
+ * selection, or multiple selections in `multiple` mode). Lets single-select
548
+ * consumers read `selectedItem()` instead of unwrapping `value()[0]`. The
549
+ * array-backed `value` model remains the source of truth and the
550
+ * `FormValueControl` contract; this is a derived accessor. Distinct from
551
+ * {@link selected}, which pairs every selected value with its resolved
552
+ * label for chip rendering.
553
+ */
554
+ readonly selectedItem: _angular_core.Signal<T | null>;
555
+ protected fieldLabelledElement(): HTMLElement | null;
556
+ protected fieldLabelledElementId(): string;
557
+ constructor();
558
+ registerInput(el: HTMLInputElement): void;
559
+ unregisterInput(el: HTMLInputElement): void;
560
+ registerAnchor(el: HTMLElement): void;
561
+ unregisterAnchor(el: HTMLElement): void;
562
+ registerTrigger(el: HTMLElement): void;
563
+ unregisterTrigger(el: HTMLElement): void;
564
+ registerContent(el: HTMLElement): void;
565
+ unregisterContent(el: HTMLElement): void;
566
+ registerList(el: HTMLElement): void;
567
+ unregisterList(el: HTMLElement): void;
568
+ registerOption(handle: ForComboboxOptionHandle<T>): void;
569
+ unregisterOption(handle: ForComboboxOptionHandle<T>): void;
570
+ registerChip(handle: ForComboboxChipHandle<T>): void;
571
+ unregisterChip(handle: ForComboboxChipHandle<T>): void;
572
+ isSelected(v: T): boolean;
573
+ isActive(id: string): boolean;
574
+ isPointerSuppressed(): boolean;
575
+ activate(handle: ForComboboxOptionHandle<T>): void;
576
+ removeValue(v: T): void;
577
+ activateActive(): boolean;
578
+ navigate(direction: 'next' | 'prev' | 'first' | 'last'): void;
579
+ setQueryFromInput(query: string): void;
580
+ setActiveId(id: string | null): void;
581
+ cachedOptions(): readonly {
582
+ id: string;
583
+ value: T;
584
+ label: string;
585
+ }[];
586
+ clear(clearQuery?: boolean): void;
587
+ setInitialFocus(target: ForComboboxInitialFocus): void;
588
+ toggle(): void;
589
+ openMenu(initialFocus?: ForComboboxInitialFocus): void;
590
+ closeMenu(reason: ForComboboxCloseReason): void;
591
+ /** Fire `(autoFocusOnOpen)` and report whether the consumer vetoed the focus move. */
592
+ emitAutoFocusOnOpen(): boolean;
593
+ /** Fire `(autoFocusOnClose)` and report whether the consumer vetoed the return-focus. */
594
+ emitAutoFocusOnClose(): boolean;
595
+ emitEscapeKeyDown(event: KeyboardEvent): void;
596
+ /**
597
+ * Outside-interaction emit forwarders. The shared `#pendingOutsideVeto`
598
+ * reuse between the specific outside channels and the composite
599
+ * `interactOutside` lives in `injectOverlayShell`; these only fire the
600
+ * matching output with the veto the shell built.
601
+ */
602
+ emitPointerDownOutside(veto: VetoableNativeEvent<PointerEvent>): void;
603
+ emitFocusOutside(veto: VetoableNativeEvent<FocusEvent>): void;
604
+ emitInteractOutside(veto: VetoableNativeEvent<PointerEvent | FocusEvent>): void;
605
+ /**
606
+ * Implicit close requested by the shell after an un-vetoed outside
607
+ * interaction. Marks the control touched and closes with the channel's
608
+ * reason.
609
+ */
610
+ requestClose(reason: 'pointerDownOutside' | 'focusOutside'): void;
611
+ markTouched(): void;
612
+ protected onFocusOut(event: FocusEvent): void;
613
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForCombobox<any>, never>;
614
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForCombobox<any>, "[forCombobox]", ["forCombobox"], { "query": { "alias": "query"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "isItemEqualToValue": { "alias": "isItemEqualToValue"; "required": false; "isSignal": true; }; "itemToStringLabel": { "alias": "itemToStringLabel"; "required": false; "isSignal": true; }; "itemToFormValue": { "alias": "itemToFormValue"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "autocompleteMode": { "alias": "autocompleteMode"; "required": false; "isSignal": true; }; "openOnFocus": { "alias": "openOnFocus"; "required": false; "isSignal": true; }; "openOnQuery": { "alias": "openOnQuery"; "required": false; "isSignal": true; }; "commitOnSelect": { "alias": "commitOnSelect"; "required": false; "isSignal": true; }; "clearOnQueryChange": { "alias": "clearOnQueryChange"; "required": false; "isSignal": true; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "_dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "_alignInput": { "alias": "align"; "required": false; "isSignal": true; }; "sideOffset": { "alias": "sideOffset"; "required": false; "isSignal": true; }; "alignOffset": { "alias": "alignOffset"; "required": false; "isSignal": true; }; "avoidCollisions": { "alias": "avoidCollisions"; "required": false; "isSignal": true; }; "collisionPadding": { "alias": "collisionPadding"; "required": false; "isSignal": true; }; "arrowPadding": { "alias": "arrowPadding"; "required": false; "isSignal": true; }; "sticky": { "alias": "sticky"; "required": false; "isSignal": true; }; "hideWhenDetached": { "alias": "hideWhenDetached"; "required": false; "isSignal": true; }; "clipUntilPositioned": { "alias": "clipUntilPositioned"; "required": false; "isSignal": true; }; "loop": { "alias": "loop"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "returnFocus": { "alias": "returnFocus"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "totalCount": { "alias": "totalCount"; "required": false; "isSignal": true; }; "visibleRange": { "alias": "visibleRange"; "required": false; "isSignal": true; }; }, { "query": "queryChange"; "value": "valueChange"; "open": "openChange"; "scrollToIndex": "scrollToIndex"; "escapeKeyDown": "escapeKeyDown"; "pointerDownOutside": "pointerDownOutside"; "focusOutside": "focusOutside"; "interactOutside": "interactOutside"; "autoFocusOnOpen": "autoFocusOnOpen"; "autoFocusOnClose": "autoFocusOnClose"; }, never, never, true, never>;
615
+ }
616
+
617
+ /**
618
+ * Optional positioning anchor. When present, `[forComboboxContent]` is
619
+ * positioned against this element instead of `[forComboboxInput]` — useful
620
+ * when the input lives inside a decorated field box (padding, prefix icon,
621
+ * clear button, chip cluster) and the listbox should match the visible field
622
+ * rather than the inner `<input>`.
623
+ *
624
+ * Only positioning changes: the input still owns `aria-controls`,
625
+ * `aria-expanded`, `aria-activedescendant`, keyboard interaction, and its
626
+ * exemption from outside-pointer dismissal. If no anchor is registered the
627
+ * listbox falls back to anchoring against the input, so existing usages are
628
+ * unaffected.
629
+ *
630
+ * At most one `[forComboboxAnchor]` may be registered per `[forCombobox]`; a
631
+ * second one throws.
632
+ *
633
+ * ```html
634
+ * <div forCombobox [(value)]="v" [(query)]="q">
635
+ * <div forComboboxAnchor class="field-box">
636
+ * <icon />
637
+ * <input forComboboxInput />
638
+ * <button class="clear">×</button>
639
+ * </div>
640
+ * @if (open()) {
641
+ * <div forComboboxContent>…</div>
642
+ * }
643
+ * </div>
644
+ * ```
645
+ */
646
+ declare class ForComboboxAnchor {
647
+ #private;
648
+ constructor();
649
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxAnchor, never>;
650
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxAnchor, "[forComboboxAnchor]", ["forComboboxAnchor"], {}, {}, never, never, true, never>;
651
+ }
652
+
653
+ /**
654
+ * Button that opens the listbox and keeps showing the committed selection
655
+ * (label + icon) while the search input lives **inside** the panel — the
656
+ * "combobox with trigger" / picker anatomy. Apply on
657
+ * a real `<button>` so Space / Enter dispatch native click events that toggle
658
+ * via `(click)`.
659
+ *
660
+ * Registering a trigger switches the combobox into the picker anatomy: it
661
+ * becomes the default positioning anchor (after an explicit
662
+ * `[forComboboxAnchor]`), focus moves into `[forComboboxInput]` on open and
663
+ * returns to the trigger on close (the standard `(autoFocusOnOpen)` /
664
+ * `(autoFocusOnClose)` vetoable hooks now fire), and `[forComboboxContent]`
665
+ * expects an inner `[forComboboxList]` to carry the listbox role.
666
+ *
667
+ * Wires `aria-haspopup="listbox"`, `aria-expanded`, and `aria-controls`
668
+ * (pointing to the popup surface while open). Native `disabled` reflects
669
+ * `effectiveDisabled` (single-purpose trigger). The trigger is exempt from the
670
+ * popup's dismissable layer — clicks on it route through `(click)` instead of
671
+ * racing an outside-pointer dismissal.
672
+ *
673
+ * The root is normally resolved via DI from the enclosing `[forCombobox]`.
674
+ * When the trigger is declared inside an `ng-template` stamped into the root
675
+ * (e.g. via `ngTemplateOutlet`), DI resolves at the template's declaration
676
+ * site and misses the root — pass it explicitly through the selector input,
677
+ * `routerLink`-style: `[forComboboxTrigger]="root"` with `#root="forCombobox"`.
678
+ *
679
+ * Keyboard:
680
+ * - **Click / Enter / Space** — toggle (open moves focus into the input).
681
+ * - **ArrowDown** — open with the first enabled option highlighted.
682
+ * - **ArrowUp** — open with the last enabled option highlighted.
683
+ */
684
+ declare class ForComboboxTrigger<T = unknown> {
685
+ #private;
686
+ /**
687
+ * Optional explicit reference to the `[forCombobox]` root, named after the
688
+ * selector `routerLink`-style. The bare valueless attribute keeps resolving
689
+ * the enclosing root via DI; pass the root explicitly
690
+ * (`[forComboboxTrigger]="root"`, with `#root="forCombobox"`) when the
691
+ * trigger is declared in an `ng-template` stamped inside the root — DI
692
+ * resolves at the template's declaration site, so the enclosing root is
693
+ * invisible there. The empty string (what the valueless attribute yields) is
694
+ * treated as unset.
695
+ */
696
+ readonly forComboboxTrigger: _angular_core.InputSignal<"" | ForComboboxContext<T>>;
697
+ protected readonly ctx: _angular_core.Signal<ForComboboxContext<T>>;
698
+ constructor();
699
+ protected onClick(): void;
700
+ protected onKeyDown(event: KeyboardEvent): void;
701
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxTrigger<any>, never>;
702
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxTrigger<any>, "[forComboboxTrigger]", ["forComboboxTrigger"], { "forComboboxTrigger": { "alias": "forComboboxTrigger"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
703
+ }
704
+
705
+ /**
706
+ * The combobox `<input role="combobox">`. Owns the visible text and all
707
+ * keyboard interaction. Apply on a real `<input>` so the browser's native
708
+ * caret / selection semantics drive inline-autocomplete and so the form
709
+ * still behaves like a text field for screen readers.
710
+ *
711
+ * Wires `aria-haspopup="listbox"`, `aria-expanded`, `aria-controls`,
712
+ * `aria-autocomplete`, and `aria-activedescendant` (per APG combobox).
713
+ * Focus stays on the input — arrow keys move the listbox's *active
714
+ * descendant* via id reference, never moving DOM focus into the listbox.
715
+ *
716
+ * Keyboard:
717
+ * - **ArrowDown / ArrowUp** — open + move activedescendant.
718
+ * - **Home / End** (when open) — first / last enabled option.
719
+ * - **PageUp / PageDown** (when open) — first / last enabled option.
720
+ * - **Enter** (when open) — activate the activedescendant; no-op otherwise.
721
+ * - **Escape** (when open) — close (focus stays in input). On the
722
+ * open→closed transition the input value is re-synced to `query()` even
723
+ * while focused, so a consumer restoring the committed label from an
724
+ * `(openChange)` handler renders without reaching for the DOM.
725
+ * - **Tab** (when open) — close and let Tab flow to the next focusable.
726
+ * - Printable keys: update `query` and (if `autocompleteMode` includes `'inline'`)
727
+ * complete the rest of the first match in the input as selected text.
728
+ */
729
+ declare class ForComboboxInput {
730
+ #private;
731
+ protected readonly ctx: forty_cdk_combobox.ForComboboxContext<unknown>;
732
+ protected readonly ariaAutocomplete: _angular_core.Signal<forty_cdk_combobox.ForComboboxAutocomplete>;
733
+ constructor();
734
+ protected onCompositionStart(): void;
735
+ protected onCompositionEnd(): void;
736
+ protected onInput(event: Event): void;
737
+ protected onKeyDown(event: KeyboardEvent): void;
738
+ protected onFocus(): void;
739
+ protected onClick(): void;
740
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxInput, never>;
741
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxInput, "[forComboboxInput]", ["forComboboxInput"], {}, {}, never, never, true, never>;
742
+ }
743
+
744
+ /**
745
+ * The floating surface, portaled to `document.body` and positioned by
746
+ * `@floating-ui/dom` against the anchor (explicit `[forComboboxAnchor]` →
747
+ * `[forComboboxTrigger]` → input).
748
+ *
749
+ * Two anatomies, picked by whether an inner `[forComboboxList]` is present:
750
+ *
751
+ * - **Editable (no list)** — content itself carries `role="listbox"`,
752
+ * `tabindex="-1"`, `aria-multiselectable`, `aria-setsize`, and the labelled
753
+ * role (`aria-label` / `aria-labelledby`). The input's `aria-controls` points
754
+ * here. This is the original combobox; nothing about it changes.
755
+ * - **Picker (list present)** — content drops the listbox semantics and becomes
756
+ * a neutral popup surface; `[forComboboxList]` takes over the listbox role and
757
+ * owns the options, the input lives inside the panel, and the input's
758
+ * `aria-controls` points to the list. Keeps `data-state` and the positioner +
759
+ * dismissable layer unchanged.
760
+ *
761
+ * Mount/unmount of the visible content is the consumer's responsibility —
762
+ * wrap with `@if (open())` so `animate.enter` / `animate.leave` fire on the
763
+ * natural mount cycle. While mounted, a `DismissableLayer` activates for
764
+ * pointer-down outside / focus outside; the input and (picker anatomy) the
765
+ * trigger are exempt from outside checks.
766
+ *
767
+ * Focus:
768
+ * - **Editable anatomy** — focus stays in the input across the whole open
769
+ * lifecycle; the directive never moves DOM focus and exposes no focus hooks.
770
+ * Active-option highlighting is `aria-activedescendant`-driven.
771
+ * - **Picker anatomy** — on open, focus moves into the input (the search field
772
+ * inside the panel); on close it returns to the trigger. Both moves are
773
+ * vetoable via `(autoFocusOnOpen)` / `(autoFocusOnClose)` on `[forCombobox]`,
774
+ * and the return is gated by `[returnFocus]`. Escape stays owned by the input.
775
+ *
776
+ * The lifecycle (positioner + dismissable layer, plus the picker anatomy's
777
+ * focus bundles) is owned by the shared `injectOverlayShell` helper.
778
+ */
779
+ declare class ForComboboxContent {
780
+ #private;
781
+ protected readonly ctx: forty_cdk_combobox.ForComboboxContext<unknown>;
782
+ /** When a `[forComboboxList]` is registered the listbox semantics live there, not here. */
783
+ protected readonly hasList: _angular_core.Signal<boolean>;
784
+ /**
785
+ * Reflects `aria-setsize` when the consumer wires up `[totalCount]` for
786
+ * virtualization (editable anatomy only — the picker anatomy's list owns it).
787
+ * Falls back to `null` (omitted) otherwise — leaving the default
788
+ * option-count semantics screen readers already infer.
789
+ */
790
+ protected readonly ariaSetSize: _angular_core.Signal<string | null>;
791
+ constructor();
792
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxContent, never>;
793
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxContent, "[forComboboxContent]", ["forComboboxContent"], {}, {}, never, never, true, never>;
794
+ }
795
+
796
+ /**
797
+ * The `role="listbox"` element of the picker anatomy. Nest it inside
798
+ * `[forComboboxContent]` next to `[forComboboxInput]` so the popup surface can
799
+ * hold a search field without violating `aria-required-owned-elements` (a
800
+ * `listbox` may only own `option` / `group` children). The list owns the
801
+ * options; `[forComboboxContent]` becomes a neutral popup surface.
802
+ *
803
+ * ```html
804
+ * <div forComboboxContent>
805
+ * <input forComboboxInput />
806
+ * <div forComboboxList>
807
+ * @for (item of filtered(); track item.id) {
808
+ * <div forComboboxOption [value]="item">{{ item.label }}</div>
809
+ * }
810
+ * </div>
811
+ * </div>
812
+ * ```
813
+ *
814
+ * Carries `role="listbox"`, `tabindex="-1"` (focus stays in the input,
815
+ * activedescendant-driven), `aria-multiselectable` in multi mode,
816
+ * `aria-setsize` when virtualizing, and the labelled-role `aria-label` /
817
+ * `aria-labelledby`. Its id is what the input's `aria-controls` references in
818
+ * the picker anatomy.
819
+ *
820
+ * When no `[forComboboxList]` is present, `[forComboboxContent]` itself carries
821
+ * the listbox semantics (the editable anatomy) — this part is additive and
822
+ * non-breaking.
823
+ */
824
+ declare class ForComboboxList {
825
+ #private;
826
+ protected readonly ctx: forty_cdk_combobox.ForComboboxContext<unknown>;
827
+ /**
828
+ * Reflects `aria-setsize` when the consumer wires up `[totalCount]` for
829
+ * virtualization. Falls back to `null` (omitted) otherwise.
830
+ */
831
+ protected readonly ariaSetSize: _angular_core.Signal<string | null>;
832
+ constructor();
833
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxList, never>;
834
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxList, "[forComboboxList]", ["forComboboxList"], {}, {}, never, never, true, never>;
835
+ }
836
+
837
+ /**
838
+ * Injection key the `[forComboboxIndicator]` uses to resolve its parent
839
+ * option, decoupled from the concrete `ForComboboxOption` class.
840
+ * `ForComboboxOption` provides itself under this token, so a design system
841
+ * wrapping the option by subclassing re-points it at the subclass with a
842
+ * single provider (`{ provide: FOR_COMBOBOX_OPTION, useExisting: MtxComboboxOption }`)
843
+ * and the indicator keeps resolving — see `docs/wrapping-form-primitives.md`.
844
+ */
845
+ declare const FOR_COMBOBOX_OPTION: InjectionToken<ForComboboxOption<string>>;
846
+ /**
847
+ * One option inside a `[forComboboxContent]`. Apply on whatever element
848
+ * fits the design — typically a `<div>` or `<li>`. Click activates:
849
+ * single mode replaces `[(value)]` and closes the listbox; multi mode
850
+ * toggles the value in/out and keeps the listbox open.
851
+ *
852
+ * Generic over the option value type `T` (default `string`). Inferred from
853
+ * the `[value]` binding so consumers can pass either primitive ids or
854
+ * full objects (`[value]="city"` infers `T = City`); the parent
855
+ * `[forCombobox]` must be parameterized over the same `T`.
856
+ *
857
+ * `aria-selected` reflects different things in single vs. multi:
858
+ * - **Single mode**: the option that's the current activedescendant
859
+ * (Enter would activate it). Matches APG select-only-combobox.
860
+ * - **Multi mode**: every option currently in `value()` carries
861
+ * `aria-selected="true"` (multiple "selected" entries simultaneously).
862
+ * Matches APG multi-select combobox.
863
+ *
864
+ * `data-state="checked" | "unchecked"` always reflects membership in
865
+ * `value()` regardless of mode, so consumers can paint a checkmark with
866
+ * pure CSS in either mode. `data-highlighted` marks the option that is
867
+ * the current activedescendant — shared across the
868
+ * library's roving / activedescendant primitives.
869
+ *
870
+ * Hovering an option also makes it the activedescendant, mirroring native
871
+ * menu / select behavior so mouse and keyboard intent stay synchronized.
872
+ */
873
+ declare class ForComboboxOption<T = string> {
874
+ #private;
875
+ /**
876
+ * Stable identifier serialized into `[(value)]` and the hidden input.
877
+ * Defaults to `string` for back-compat; bind an object to specialize
878
+ * the parent `[forCombobox]` over a richer `T`. The parent's
879
+ * `[isItemEqualToValue]` decides how options are matched against the
880
+ * committed selection.
881
+ */
882
+ readonly value: _angular_core.InputSignal<T>;
883
+ /**
884
+ * Visible label used by `[forComboboxInput]` for inline autocomplete
885
+ * matching, by `commitOnSelect` to populate the input on selection,
886
+ * and by typeahead / display utilities. When omitted: for string
887
+ * `value` falls back to the trimmed `textContent` of the host element;
888
+ * for object `value` falls back to the parent's `itemToStringLabel(value)`.
889
+ */
890
+ readonly label: _angular_core.InputSignal<string | null>;
891
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
892
+ /**
893
+ * Absolute index of this option in the consumer's source array. Required
894
+ * when wiring up a virtualized listbox so navigation past the rendered
895
+ * window can resolve indices to options (and emit `(scrollToIndex)` when
896
+ * needed). Leave `null` for non-virtualized lists — the directive then
897
+ * falls back to DOM order.
898
+ */
899
+ readonly posInSet: _angular_core.InputSignal<number | null>;
900
+ readonly id: _angular_core.Signal<string>;
901
+ readonly selected: _angular_core.Signal<boolean>;
902
+ /** True when this option is the current activedescendant. Reflected as `data-highlighted`. */
903
+ readonly highlighted: _angular_core.Signal<boolean>;
904
+ readonly effectiveDisabled: _angular_core.Signal<boolean>;
905
+ protected readonly ariaSelected: _angular_core.Signal<"true" | "false">;
906
+ /** Reflects `aria-posinset` (1-based) when virtualizing. Falls back to DOM order otherwise. */
907
+ protected readonly ariaPosInSet: _angular_core.Signal<string | null>;
908
+ /** Reflects `aria-setsize` when the consumer wires up `[totalCount]`. */
909
+ protected readonly ariaSetSize: _angular_core.Signal<string | null>;
910
+ constructor();
911
+ protected onClick(): void;
912
+ protected onPointerMove(): void;
913
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxOption<any>, never>;
914
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxOption<any>, "[forComboboxOption]", ["forComboboxOption"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "posInSet": { "alias": "posInSet"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
915
+ }
916
+
917
+ /**
918
+ * Visibility helper inside a `[forComboboxOption]`. The directive flips a
919
+ * `[hidden]` host binding so the consumer can keep the checkmark / icon
920
+ * inline without extra `@if` glue:
921
+ *
922
+ * ```html
923
+ * <div forComboboxOption value="apple">
924
+ * <span forComboboxIndicator>✓</span>
925
+ * Apple
926
+ * </div>
927
+ * ```
928
+ *
929
+ * Reflects the parent option's `data-state` (`"checked" | "unchecked"`) so
930
+ * the consumer can also style it from CSS. Visibility while unselected is
931
+ * enforced with an inline `display: none` (which beats any author `display`
932
+ * rule a consumer applies via a class) in addition to the `hidden` attribute
933
+ * that removes it from the a11y tree.
934
+ *
935
+ * In multi mode the indicator follows membership in `value()`, matching the
936
+ * option's own `data-state` semantics (a checkmark per selected option).
937
+ */
938
+ declare class ForComboboxIndicator {
939
+ protected readonly option: ForComboboxOption<string>;
940
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxIndicator, never>;
941
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxIndicator, "[forComboboxIndicator]", ["forComboboxIndicator"], {}, {}, never, never, true, never>;
942
+ }
943
+
944
+ /**
945
+ * Empty-state slot, shown when the listbox has no registered options.
946
+ * The directive hides the message when options exist so the consumer can
947
+ * keep it inline in the template — no `@if` needed. Visibility is enforced
948
+ * with an inline `display: none` (which beats any author `display` rule a
949
+ * consumer applies via a class) in addition to the `hidden` attribute that
950
+ * removes it from the a11y tree:
951
+ *
952
+ * ```html
953
+ * <div forComboboxContent>
954
+ * @for (option of filtered(); track option.id) {
955
+ * <div forComboboxOption [value]="option.id">{{ option.label }}</div>
956
+ * }
957
+ * <div forComboboxEmpty>No matches.</div>
958
+ * </div>
959
+ * ```
960
+ *
961
+ * Carries `role="status"` and `aria-live="polite"` so screen readers
962
+ * announce the message when it appears.
963
+ */
964
+ declare class ForComboboxEmpty {
965
+ #private;
966
+ protected readonly shouldShow: _angular_core.Signal<boolean>;
967
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxEmpty, never>;
968
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxEmpty, "[forComboboxEmpty]", ["forComboboxEmpty"], {}, {}, never, never, true, never>;
969
+ }
970
+
971
+ /**
972
+ * Live-region slot for async-filtering feedback (loading, result count,
973
+ * "no matches", error messages). Apply on a `<div>` inside the listbox or
974
+ * next to the input. The directive sets `role="status"` and
975
+ * `aria-live="polite"` so messages projected as content are announced to
976
+ * screen readers when they change.
977
+ *
978
+ * The directive is **content-driven** — it does not pick or render a
979
+ * message. Project whatever the consumer wants and use the exposed
980
+ * `count` signal (or `forComboboxStatus` template ref) to interpolate
981
+ * the option count when relevant.
982
+ *
983
+ * ```html
984
+ * <div forCombobox [(query)]="query" [(value)]="value" [(open)]="open">
985
+ * <input forComboboxInput placeholder="Search…" />
986
+ * @if (open()) {
987
+ * <div forComboboxContent>
988
+ * <div forComboboxStatus #status="forComboboxStatus">
989
+ * @if (loading()) {
990
+ * Searching…
991
+ * } @else if (status.count() === 0) {
992
+ * No matches.
993
+ * } @else {
994
+ * {{ status.count() }} results.
995
+ * }
996
+ * </div>
997
+ * @for (it of filtered(); track it.id) {
998
+ * <div forComboboxOption [value]="it.id">{{ it.label }}</div>
999
+ * }
1000
+ * </div>
1001
+ * }
1002
+ * </div>
1003
+ * ```
1004
+ *
1005
+ * For an empty-only slot that auto-hides when there are options, use
1006
+ * `[forComboboxEmpty]`. `[forComboboxStatus]` stays mounted regardless
1007
+ * so transitions like "loading → 5 results" are announced as a single
1008
+ * change to the same live region.
1009
+ */
1010
+ declare class ForComboboxStatus {
1011
+ #private;
1012
+ /**
1013
+ * Number of currently registered options. Reflects the live size of the
1014
+ * filtered listbox so the consumer can interpolate `{{ status.count() }}`
1015
+ * inside the live region.
1016
+ */
1017
+ readonly count: _angular_core.Signal<number>;
1018
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxStatus, never>;
1019
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxStatus, "[forComboboxStatus]", ["forComboboxStatus"], {}, {}, never, never, true, never>;
1020
+ }
1021
+
1022
+ /**
1023
+ * Optional clear button. Apply on a `<button type="button">` so Space /
1024
+ * Enter dispatch a native click. Clicking calls `clear()` on the root,
1025
+ * which resets `[(value)]` and `[(query)]` and the activedescendant.
1026
+ *
1027
+ * The directive hides the button when there's nothing to clear (no value,
1028
+ * empty query) so the consumer can leave it inline in the template without
1029
+ * an extra `@if`. Visibility is enforced with an inline `display: none`
1030
+ * (which beats any author `display` rule a consumer applies via a class) in
1031
+ * addition to the `hidden` attribute that removes it from the a11y tree.
1032
+ */
1033
+ declare class ForComboboxClear {
1034
+ protected readonly ctx: forty_cdk_combobox.ForComboboxContext<unknown>;
1035
+ protected readonly hasContent: _angular_core.Signal<boolean>;
1036
+ /** Disabled when the combobox is disabled or read-only — the clear action is unavailable. */
1037
+ protected readonly isDisabled: _angular_core.Signal<boolean>;
1038
+ constructor();
1039
+ protected onClick(): void;
1040
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxClear, never>;
1041
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxClear, "[forComboboxClear]", ["forComboboxClear"], {}, {}, never, never, true, never>;
1042
+ }
1043
+
1044
+ /**
1045
+ * Multi-mode chips area. Wrap the chips and the `<input>` together so the
1046
+ * combobox visually presents a single editable region:
1047
+ *
1048
+ * ```html
1049
+ * <div forCombobox multiple [(value)]="tags" [(query)]="query" [(open)]="open">
1050
+ * <div forComboboxChips>
1051
+ * @for (chip of selected(); track chip.value) {
1052
+ * <span forComboboxChip [value]="chip.value">
1053
+ * {{ chip.label }}
1054
+ * <button forComboboxChipRemove></button>
1055
+ * </span>
1056
+ * }
1057
+ * <input forComboboxInput />
1058
+ * </div>
1059
+ * …
1060
+ * </div>
1061
+ * ```
1062
+ *
1063
+ * Carries `role="group"` with `aria-label="Selected items"` (override via
1064
+ * `[ariaLabel]`) so screen readers announce the chip cluster as a single
1065
+ * unit. The directive itself doesn't manage focus or selection — the
1066
+ * chips and the input own that — but its presence groups them for
1067
+ * assistive tech.
1068
+ */
1069
+ declare class ForComboboxChips {
1070
+ protected readonly ctx: forty_cdk_combobox.ForComboboxContext<unknown>;
1071
+ /**
1072
+ * Accessible name for the chip cluster, exposed as `role="group"`'s
1073
+ * `aria-label` so screen readers announce the selected chips as a single
1074
+ * unit. Defaults to `'Selected items'`; set `[ariaLabel]` to localize or
1075
+ * override it.
1076
+ */
1077
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
1078
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxChips, never>;
1079
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxChips, "[forComboboxChips]", ["forComboboxChips"], { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1080
+ }
1081
+
1082
+ /**
1083
+ * One chip representing a selected value in multi mode. Apply on a
1084
+ * `<span>` (or any inline-block element) inside `[forComboboxChips]`.
1085
+ * The chip is **out of the Tab cycle** (`tabindex="-1"`) by design:
1086
+ * the user reaches it via the input's Backspace heuristic (Backspace on
1087
+ * an empty input focuses the last chip), then navigates between chips
1088
+ * with ArrowLeft / ArrowRight or removes them with Backspace / Delete.
1089
+ *
1090
+ * Keyboard while the chip has focus (LTR; the ArrowLeft/Right roles swap
1091
+ * in RTL so they always follow visual order):
1092
+ * - **ArrowLeft** — focus the previous chip; bounces if first.
1093
+ * - **ArrowRight** — focus the next chip; if at the last, focus the input.
1094
+ * - **Backspace / Delete** — remove this chip + focus the previous chip,
1095
+ * or the next chip when there is no previous one (so removing the first
1096
+ * chip lands on the new first chip), falling back to the input only when
1097
+ * the removed chip was the last one standing.
1098
+ * - **Escape** — return focus to the input.
1099
+ *
1100
+ * Click on the chip body (excluding the remove button) just focuses the
1101
+ * chip — useful as an alternative to the Backspace path.
1102
+ */
1103
+ declare class ForComboboxChip<T = string> {
1104
+ #private;
1105
+ protected readonly ctx: forty_cdk_combobox.ForComboboxContext<T>;
1106
+ /**
1107
+ * The value this chip represents — must match an entry in
1108
+ * `[forCombobox][(value)]` per the parent's `[isItemEqualToValue]`.
1109
+ * Generic over `T` (default `string`); inferred from the binding
1110
+ * (`[value]="someObject"` specializes `T`).
1111
+ */
1112
+ readonly value: _angular_core.InputSignal<T>;
1113
+ /**
1114
+ * `data-value` reflection — for string `T` this is the value verbatim
1115
+ * (unchanged from the pre-generic behaviour); for object `T` it uses
1116
+ * the parent's `itemToFormValue` so the attribute carries the same
1117
+ * wire format as the hidden inputs (typically JSON or a per-item id).
1118
+ */
1119
+ protected readonly dataValue: _angular_core.Signal<string>;
1120
+ /** Resolved label of the underlying option, used by `[forComboboxChipRemove]` for its `aria-label`. */
1121
+ readonly label: _angular_core.Signal<string>;
1122
+ constructor();
1123
+ protected onKeyDown(event: KeyboardEvent): void;
1124
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxChip<any>, never>;
1125
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxChip<any>, "[forComboboxChip]", ["forComboboxChip"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
1126
+ }
1127
+
1128
+ /**
1129
+ * Remove button inside a `[forComboboxChip]`. Apply on a
1130
+ * `<button type="button">` so click and Space / Enter (when focused) all
1131
+ * trigger the same removal flow. The button is out of the Tab cycle
1132
+ * (`tabindex="-1"`) so the user navigates the chip cluster via the chip's
1133
+ * own ArrowLeft/Right + Backspace/Delete keys; this button exists for
1134
+ * mouse / touch users.
1135
+ *
1136
+ * The host carries a generated `aria-label` ("Remove `<chip label>`")
1137
+ * derived from the parent chip's resolved option label.
1138
+ */
1139
+ declare class ForComboboxChipRemove {
1140
+ #private;
1141
+ protected readonly ctx: forty_cdk_combobox.ForComboboxContext<unknown>;
1142
+ /** Disabled when the combobox is disabled or read-only — chip removal is unavailable. */
1143
+ protected readonly isDisabled: _angular_core.Signal<boolean>;
1144
+ constructor();
1145
+ protected readonly ariaLabel: _angular_core.Signal<string>;
1146
+ protected onClick(event: MouseEvent): void;
1147
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxChipRemove, never>;
1148
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxChipRemove, "[forComboboxChipRemove]", ["forComboboxChipRemove"], {}, {}, never, never, true, never>;
1149
+ }
1150
+
1151
+ /**
1152
+ * Optional grouping wrapper inside a `[forComboboxContent]`. Renders
1153
+ * `role="group"` and references the descendant `[forComboboxGroupLabel]`
1154
+ * (if any) via `aria-labelledby`. Options inside a group still register
1155
+ * with the root listbox normally, so keyboard navigation traverses across
1156
+ * groups in DOM order without special handling.
1157
+ */
1158
+ declare class ForComboboxGroup {
1159
+ #private;
1160
+ /** The id of the registered group label (or `null` if none). */
1161
+ readonly labelId: _angular_core.Signal<string | null>;
1162
+ /** Called by `ForComboboxGroupLabel` on mount. */
1163
+ registerLabel(id: string): void;
1164
+ /** Called by `ForComboboxGroupLabel` on destroy. Idempotent. */
1165
+ unregisterLabel(id: string): void;
1166
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxGroup, never>;
1167
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxGroup, "[forComboboxGroup]", ["forComboboxGroup"], {}, {}, never, never, true, never>;
1168
+ }
1169
+
1170
+ /**
1171
+ * Visible label for a `[forComboboxGroup]`. Generates a stable id and
1172
+ * registers with its parent group so the group's `aria-labelledby` points
1173
+ * at this element.
1174
+ */
1175
+ declare class ForComboboxGroupLabel {
1176
+ /** Stable host id used by the parent group's `aria-labelledby`. */
1177
+ readonly id: Signal<string>;
1178
+ constructor();
1179
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxGroupLabel, never>;
1180
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxGroupLabel, "[forComboboxGroupLabel]", ["forComboboxGroupLabel"], {}, {}, never, never, true, never>;
1181
+ }
1182
+
1183
+ /**
1184
+ * Decorative separator between options or groups inside a
1185
+ * `[forComboboxContent]`. Carries `role="separator"` and is intentionally
1186
+ * not registered with the listbox's option collection, so keyboard
1187
+ * navigation skips it automatically.
1188
+ */
1189
+ declare class ForComboboxSeparator {
1190
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForComboboxSeparator, never>;
1191
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForComboboxSeparator, "[forComboboxSeparator]", ["forComboboxSeparator"], {}, {}, never, never, true, never>;
1192
+ }
1193
+
1194
+ /**
1195
+ * Defaults inherited by descendant comboboxes in the surrounding injector
1196
+ * scope. Configure with `provideForComboboxDefaults` either at the
1197
+ * application root or in any component's `providers` array; partial
1198
+ * overrides merge with the parent scope.
1199
+ */
1200
+ interface ForComboboxDefaults {
1201
+ /**
1202
+ * Distance (px) between the combobox input/trigger and the floating
1203
+ * content along the resolved `side` axis, for comboboxes that don't
1204
+ * override `sideOffset` locally.
1205
+ */
1206
+ sideOffset: number;
1207
+ /**
1208
+ * Padding (px) added to the viewport edges for collision-aware
1209
+ * positioning, for comboboxes that don't override `collisionPadding`
1210
+ * locally. Higher values keep the floating content further from the edge
1211
+ * when `flip` / `shift` runs.
1212
+ */
1213
+ collisionPadding: number;
1214
+ }
1215
+ /** Token holding the resolved combobox defaults for the current scope. */
1216
+ declare const FOR_COMBOBOX_DEFAULTS: _angular_core.InjectionToken<ForComboboxDefaults>;
1217
+ /**
1218
+ * Configures forty-cdk combobox defaults for this injector scope. Partial
1219
+ * overrides inherit unspecified keys from the parent scope (or library
1220
+ * defaults at the root).
1221
+ */
1222
+ declare function provideForComboboxDefaults(defaults?: Partial<ForComboboxDefaults>): Provider[];
1223
+
1224
+ /**
1225
+ * Exact public names of every `ForCombobox` input, its models included. Spread it into the
1226
+ * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the
1227
+ * primitive's full surface — the Signal Forms members `[formField]` binds among them —
1228
+ * without hand-maintaining the list. Always spread into an inline object literal as shown
1229
+ * below: the literal is what keeps the entry statically analyzable for consumers compiling
1230
+ * against the published package. An anti-drift spec fails when this list no longer matches
1231
+ * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported
1232
+ * wrapping patterns.
1233
+ *
1234
+ * @example
1235
+ * ```ts
1236
+ * @Component({
1237
+ * selector: 'div[myCombobox]',
1238
+ * template: '',
1239
+ * hostDirectives: [
1240
+ * {
1241
+ * directive: ForCombobox,
1242
+ * inputs: [...FOR_COMBOBOX_HOST_DIRECTIVE_INPUTS],
1243
+ * outputs: [...FOR_COMBOBOX_HOST_DIRECTIVE_OUTPUTS],
1244
+ * },
1245
+ * ],
1246
+ * })
1247
+ * export class MyCombobox {}
1248
+ * ```
1249
+ */
1250
+ declare const FOR_COMBOBOX_HOST_DIRECTIVE_INPUTS: readonly ["query", "value", "open", "align", "alignOffset", "ariaLabel", "arrowPadding", "autoHighlight", "autocompleteMode", "avoidCollisions", "clearOnQueryChange", "clipUntilPositioned", "collisionPadding", "commitOnSelect", "dir", "dirty", "disabled", "dismissible", "errors", "hideWhenDetached", "invalid", "isItemEqualToValue", "itemToFormValue", "itemToStringLabel", "loop", "multiple", "name", "openOnFocus", "openOnQuery", "pending", "readonly", "required", "returnFocus", "side", "sideOffset", "sticky", "totalCount", "visibleRange", "touched"];
1251
+ /**
1252
+ * Exact public names of every `ForCombobox` output, the Signal Forms `touch` output
1253
+ * included. Spread it into the `outputs` array of the same `hostDirectives` entry as
1254
+ * {@link FOR_COMBOBOX_HOST_DIRECTIVE_INPUTS}.
1255
+ */
1256
+ declare const FOR_COMBOBOX_HOST_DIRECTIVE_OUTPUTS: readonly ["queryChange", "valueChange", "openChange", "scrollToIndex", "escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "autoFocusOnOpen", "autoFocusOnClose", "touchedChange", "touch"];
1257
+
1258
+ export { FOR_COMBOBOX_CONTEXT, FOR_COMBOBOX_DEFAULTS, FOR_COMBOBOX_HOST_DIRECTIVE_INPUTS, FOR_COMBOBOX_HOST_DIRECTIVE_OUTPUTS, FOR_COMBOBOX_OPTION, ForCombobox, ForComboboxAnchor, ForComboboxChip, ForComboboxChipRemove, ForComboboxChips, ForComboboxClear, ForComboboxContent, ForComboboxEmpty, ForComboboxGroup, ForComboboxGroupLabel, ForComboboxIndicator, ForComboboxInput, ForComboboxList, ForComboboxOption, ForComboboxSeparator, ForComboboxStatus, ForComboboxTrigger, provideForComboboxDefaults };
1259
+ export type { ForComboboxAutocomplete, ForComboboxChipHandle, ForComboboxCloseReason, ForComboboxContext, ForComboboxDefaults, ForComboboxInitialFocus, ForComboboxOptionHandle };