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 @@
1
+ {"version":3,"file":"forty-cdk-select.mjs","sources":["../../../projects/forty-cdk/select/src/select-context.ts","../../../projects/forty-cdk/select/src/select-defaults.ts","../../../projects/forty-cdk/select/src/select-virtualized-navigator.ts","../../../projects/forty-cdk/select/src/select.ts","../../../projects/forty-cdk/select/src/select-anchor.ts","../../../projects/forty-cdk/select/src/select-trigger.ts","../../../projects/forty-cdk/select/src/select-value.ts","../../../projects/forty-cdk/select/src/select-content.ts","../../../projects/forty-cdk/select/src/select-option.ts","../../../projects/forty-cdk/select/src/select-indicator.ts","../../../projects/forty-cdk/select/src/select-group.ts","../../../projects/forty-cdk/select/src/select-group-label.ts","../../../projects/forty-cdk/select/src/select-separator.ts","../../../projects/forty-cdk/select/src/select-host-directive.ts","../../../projects/forty-cdk/select/src/forty-cdk-select.ts"],"sourcesContent":["import { computed, inject, InjectionToken, type ModelSignal, type Signal } from '@angular/core';\nimport type { ReferenceElement } from '@floating-ui/dom';\n\nimport {\n type CollectionHandle,\n type FloatingAlign,\n type FloatingSide,\n type ListNavigationAction,\n type WritingDirection,\n type VetoableNativeEvent,\n} from 'forty-cdk/core';\n\n/**\n * Why a select requested close. Mirrors the menu primitive vocabulary so\n * downstream code that switches on close reasons stays consistent.\n */\nexport type ForSelectCloseReason =\n | 'escape'\n | 'pointerDownOutside'\n | 'focusOutside'\n | 'select'\n | 'tab'\n | 'programmatic';\n\n/**\n * Where focus lands when the listbox opens. `'selected'` snaps to the first\n * currently-selected enabled option (matches native `<select>`); falls back\n * to `'first'` if no selection is enabled.\n */\nexport type ForSelectInitialFocus = 'first' | 'last' | 'selected';\n\n/**\n * Handle every `[forSelectOption]` registers with the root. The collection\n * orders entries by DOM document order so groups, separators, and `@for`\n * loops don't perturb keyboard navigation.\n *\n * Generic over the option value type `T` (default `unknown` at the contract\n * level; `string` at the public root). The handle carries the raw value so\n * the root can match it against `value()` via `isItemEqualToValue`.\n */\nexport interface ForSelectOptionHandle<T = unknown> extends CollectionHandle {\n readonly value: Signal<T>;\n /**\n * The option's resolved display label as a reactive `Signal<string>` — the\n * trimmed `textContent` of the host. The root folds it into a persisted\n * snapshot so `selectedLabels` and closed-state typeahead resolve labels\n * without peeking at `textContent` from inside a `computed`.\n */\n readonly label: Signal<string>;\n readonly disabled: Signal<boolean>;\n /** Stable host `id` — the activedescendant target in the virtualized path. */\n readonly id: Signal<string>;\n /**\n * Zero-based absolute position in the full source data. Required in the\n * virtualized path (drives the position snapshot + `aria-posinset`); `null`\n * outside it.\n */\n readonly posInSet: Signal<number | null>;\n}\n\n/**\n * Coordination contract owned by `[forSelect]`. Trigger, content, value,\n * options, groups and separators all inject this token to read state and\n * delegate behavior — they don't import the root class directly.\n *\n * Generic over the option value type `T` (default `string` at the public\n * root). When a consumer binds object items the directive infers `T` from\n * `[(value)]` and the per-piece signatures specialize accordingly. Items are\n * compared via the consumer-provided `isItemEqualToValue` and serialized for\n * the form's hidden inputs via `itemToFormValue`; option text labels are\n * still read from the rendered `textContent`.\n */\nexport interface ForSelectContext<T = unknown> {\n readonly value: ModelSignal<readonly T[]>;\n readonly open: ModelSignal<boolean>;\n readonly multiple: Signal<boolean>;\n\n /**\n * The select's effective disabled — its own `disabled` input OR'd with a\n * surrounding disabled `[forFieldset]`. Trigger and options read this so a\n * disabled select (or fieldset) is inert and exposes `aria-disabled`.\n */\n readonly effectiveDisabled: Signal<boolean>;\n readonly readonly: Signal<boolean>;\n readonly required: Signal<boolean>;\n readonly invalid: Signal<boolean>;\n readonly pending: Signal<boolean>;\n\n /**\n * When `true`, the listbox is a trapped / inert / scroll-locked modal\n * surface (routed through `_internal/modal-shell`) instead of the anchored\n * popover. Read once when `[forSelectContent]` mounts; all anchored-\n * positioning state below is a no-op while modal.\n */\n readonly modal: Signal<boolean>;\n readonly dismissible: Signal<boolean>;\n readonly returnFocus: Signal<boolean>;\n /**\n * Positioning algorithm. `'popper'` (default) is standard floating-ui\n * anchored placement; `'item-aligned'` overlays the listbox so the\n * selected option's center aligns with the trigger's center (macOS-style\n * native `<select>`). All `side`/`align`/`*Offset`/`sticky`/\n * `hideWhenDetached`/`clipUntilPositioned`/`avoidCollisions` inputs are no-ops in\n * `'item-aligned'` mode (only `collisionPadding` is honored).\n */\n readonly position: Signal<'popper' | 'item-aligned'>;\n readonly side: Signal<FloatingSide | undefined>;\n readonly align: Signal<FloatingAlign | undefined>;\n readonly sideOffset: Signal<number>;\n readonly alignOffset: Signal<number>;\n readonly avoidCollisions: Signal<boolean>;\n readonly collisionPadding: Signal<number>;\n readonly arrowPadding: Signal<number>;\n readonly sticky: Signal<'partial' | 'always' | false>;\n readonly hideWhenDetached: Signal<boolean>;\n readonly clipUntilPositioned: Signal<boolean>;\n readonly loop: Signal<boolean>;\n readonly orientation: Signal<'horizontal' | 'vertical'>;\n readonly dir: Signal<WritingDirection>;\n readonly selectionFollowsFocus: Signal<boolean>;\n readonly placeholder: Signal<string>;\n\n /** Where focus should land after the content mounts. Triggers set this before flipping `open`. */\n readonly initialFocus: Signal<ForSelectInitialFocus>;\n setInitialFocus(target: ForSelectInitialFocus): void;\n\n readonly triggerId: Signal<string>;\n readonly contentId: Signal<string>;\n readonly ariaLabel: Signal<string | null>;\n\n /** Compare two items for equality. Defaults to `===`; overridden for object values. */\n readonly isItemEqualToValue: Signal<(a: T, b: T) => boolean>;\n /** Serialize an item for the hidden input's `value` attribute. Defaults to `String(item)`. */\n readonly itemToFormValue: Signal<(item: T) => string>;\n\n /**\n * Element floating-ui anchors the listbox against. Prefers an optional\n * `[forSelectAnchor]` when registered, otherwise falls back to the trigger.\n * Decoupled from `trigger` so the trigger keeps driving `aria-controls`,\n * the click toggle, focus return, and its outside-pointer exemption\n * regardless of where the listbox paints.\n */\n readonly anchor: Signal<ReferenceElement | null>;\n /** The button trigger — exempt from outside-pointer checks and the focus-return target. */\n readonly trigger: Signal<HTMLElement | null>;\n registerTrigger(el: HTMLElement): void;\n unregisterTrigger(el: HTMLElement): void;\n\n /**\n * Register / unregister an optional `[forSelectAnchor]` positioning element.\n * At most one anchor per root; a second registration throws. Reference-based\n * unregister, so an anchor torn down inside `@if` restores the trigger\n * fallback cleanly.\n */\n registerAnchor(el: HTMLElement): void;\n unregisterAnchor(el: HTMLElement): void;\n\n /** The mounted `[forSelectContent]` element. */\n readonly content: Signal<HTMLElement | null>;\n registerContent(el: HTMLElement): void;\n unregisterContent(el: HTMLElement): void;\n\n registerOption(handle: ForSelectOptionHandle<T>): void;\n unregisterOption(handle: ForSelectOptionHandle<T>): void;\n\n /** All registered options in DOM order. */\n readonly options: Signal<readonly ForSelectOptionHandle<T>[]>;\n /** Resolved labels of the options whose value is in `value()`, in selection order. */\n readonly selectedLabels: Signal<readonly string[]>;\n /**\n * Host element of the first enabled, currently-selected option, or `null`\n * when no selection exists. Used by `position=\"item-aligned\"` to anchor\n * the listbox over the trigger; falls back to the first enabled option\n * inside the listbox when this is `null`.\n */\n readonly selectedOptionEl: Signal<HTMLElement | null>;\n\n isSelected(value: T): boolean;\n /** Toggle in multi-mode, replace + close in single-mode. No-op on disabled / readonly. */\n activate(value: T): void;\n /** Move focus inside the open listbox in response to an arrow / Home / End key. */\n navigate(currentOption: HTMLElement, action: ListNavigationAction): void;\n /** Open-state typeahead: focus the first enabled option whose text matches the buffered prefix. */\n handleTypeahead(event: KeyboardEvent): void;\n /**\n * Closed-state typeahead (single mode only). Selects the first matching\n * option directly without opening the listbox — mirrors native `<select>`\n * behavior. Returns `true` if the key was consumed by typeahead.\n */\n handleClosedTypeahead(event: KeyboardEvent): boolean;\n\n focusFirstEnabledOption(): boolean;\n focusLastEnabledOption(): boolean;\n /** Focus the first enabled option whose value is currently selected. Returns `false` if none. */\n focusSelectedOption(): boolean;\n\n toggle(initialFocus?: ForSelectInitialFocus): void;\n openMenu(initialFocus?: ForSelectInitialFocus): void;\n closeMenu(reason: ForSelectCloseReason): void;\n\n /**\n * Reason of the most recent close, or `null` while the listbox is open\n * (or before any close). Read by `[forSelectContent]` so `'tab'` closes\n * skip the return-focus step — Tab needs the browser to advance focus\n * from the trigger, and a re-focus would steal it back.\n */\n readonly lastCloseReason: Signal<ForSelectCloseReason | null>;\n\n /**\n * Commit the focused option's value (single mode) and close the listbox\n * with reason `'tab'`. Moves focus to the trigger synchronously so the\n * browser's Tab default action advances focus from there to the next\n * (or previous) focusable in tab order. Multi-mode skips the value-set\n * — selection toggles already happened via Space / Enter / click.\n */\n commitOnTab(value: T): void;\n\n // --- Shared dismiss pipeline. Escape is consumer-owned on the anchored path\n // (`emitEscapeKeyDown` emits `(escapeKeyDown)`, stops propagation, marks\n // touched, and closes with reason `'escape'`); on the modal path the\n // modal-shell builds the veto and owns the close, so it forwards the\n // emit-only `forwardEscapeKeyDown`. The outside channels are owned by the\n // shell in both paths, which builds + reuses one veto across the specific\n // and composite channels and hands it to these forwarders. Both paths\n // route the implicit close through the content's `requestClose`. ---\n emitEscapeKeyDown(event: KeyboardEvent): void;\n emitPointerDownOutside(veto: VetoableNativeEvent<PointerEvent>): void;\n emitFocusOutside(veto: VetoableNativeEvent<FocusEvent>): void;\n emitInteractOutside(veto: VetoableNativeEvent<PointerEvent | FocusEvent>): void;\n /** Implicit close requested by the shell after an un-vetoed outside interaction. */\n requestClose(reason: 'pointerDownOutside' | 'focusOutside'): void;\n /** Modal-path Escape forwarder: emit only; the modal shell builds the veto and owns the close. */\n forwardEscapeKeyDown(veto: VetoableNativeEvent<KeyboardEvent>): void;\n\n /**\n * Hooks into the auto-focus pipeline. Content fires these just before\n * its imperative `.focus()` (open) or the trigger return-focus (close);\n * `event.preventDefault()` skips the move. Returns `true` when the\n * consumer vetoed.\n */\n emitAutoFocusOnOpen(): boolean;\n emitAutoFocusOnClose(): boolean;\n\n /**\n * Full source length when virtualizing, `undefined` in the default\n * DOM-focus path. Drives each option's `aria-setsize` / `aria-posinset`\n * and the focus-model branch.\n */\n readonly totalCount: Signal<number | undefined>;\n /**\n * The active option's `id` in the virtualized activedescendant model,\n * `null` in the default path. The content surface reflects it as\n * `aria-activedescendant`; options read it for `data-highlighted`.\n */\n readonly activeDescendantId: Signal<string | null>;\n /**\n * Virtualized-path open hook. Called by `[forSelectContent]` after it\n * focuses its own surface on open: seeds `aria-activedescendant` to the\n * committed option (scrolling it into view via `(scrollToIndex)`), or the\n * first enabled option when nothing is selected.\n */\n seedVirtualizedInitialFocus(): void;\n /**\n * Virtualized-path keyboard handler. Called by `[forSelectContent]`'s host\n * keydown only when `totalCount()` is set: Arrow/Home/End navigation,\n * Enter/Space activation of the active descendant, single-mode Tab commit,\n * and typeahead — all in the activedescendant model.\n */\n handleVirtualizedKeydown(event: KeyboardEvent): void;\n /**\n * Called by an option on click in the virtualized path: moves\n * `aria-activedescendant` to that option and returns DOM focus to the\n * content surface. No-op in the default path.\n */\n notifyOptionClick(optionId: string): void;\n\n /** Flip the `touched` model. Called by trigger on blur-to-outside and on dismiss events. */\n markTouched(): void;\n}\n\nexport const FOR_SELECT_CONTEXT = new InjectionToken<ForSelectContext>('FOR_SELECT_CONTEXT');\n\nexport function injectSelectContext<T = unknown>(piece: string): ForSelectContext<T> {\n const ctx = inject(FOR_SELECT_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(\n `[forty-cdk/select] ${piece} must be used inside a [forSelect] element. ` +\n \"If it is declared inside an ng-template, DI resolves at the template's declaration site — \" +\n 'not where it is stamped (e.g. via ngTemplateOutlet) — so declare the template inside the ' +\n '[forSelect] root.',\n );\n }\n return ctx as unknown as ForSelectContext<T>;\n}\n\n/**\n * Resolves the trigger's root context: the explicit reference when the\n * `[forSelectTrigger]` input carries one, the injected `FOR_SELECT_CONTEXT`\n * otherwise. The orphan error only fires when neither resolves, on first read\n * of the returned signal. Must be called in an injection context.\n */\nexport function injectSelectTriggerContext<T = unknown>(\n explicitRoot: Signal<ForSelectContext<T> | ''>,\n): Signal<ForSelectContext<T>> {\n const injected = inject(FOR_SELECT_CONTEXT, { optional: true });\n return computed(() => {\n const explicit = explicitRoot();\n if (explicit !== '') {\n return explicit;\n }\n if (injected) {\n return injected as unknown as ForSelectContext<T>;\n }\n throw new Error(\n '[forty-cdk/select] ForSelectTrigger could not resolve its [forSelect] root: ' +\n 'no FOR_SELECT_CONTEXT provider is visible and no explicit root reference was passed. ' +\n \"If this trigger is declared inside an ng-template, DI resolves at the template's declaration \" +\n 'site — not where it is stamped — so either declare the template inside the root or pass the ' +\n 'root explicitly: [forSelectTrigger]=\"root\" with #root=\"forSelect\".',\n );\n });\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant selects in the surrounding injector\n * scope. Configure with `provideForSelectDefaults` either at the\n * application root or in any component's `providers` array; partial\n * overrides merge with the parent scope.\n */\nexport interface ForSelectDefaults {\n /**\n * Distance (px) between the select trigger and the floating content\n * along the resolved `side` axis.\n */\n sideOffset: number;\n /**\n * Padding (px) added to the viewport edges for collision-aware\n * positioning. Higher values keep the floating content further from\n * the edge when `flip` / `shift` runs.\n */\n collisionPadding: number;\n}\n\n/**\n * Library fallback for select defaults, read at the root injector when no\n * consumer has called `provideForSelectDefaults`. Exported for the shared defaults\n * contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_SELECT_FALLBACK_DEFAULTS: ForSelectDefaults = {\n sideOffset: 4,\n collisionPadding: 8,\n};\n\nconst { token, provideDefaults } = createDefaults<ForSelectDefaults>(\n 'FOR_SELECT_DEFAULTS',\n FOR_SELECT_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved select defaults for the current scope. */\nexport const FOR_SELECT_DEFAULTS = token;\n\n/**\n * Configures forty-cdk select defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForSelectDefaults(defaults: Partial<ForSelectDefaults> = {}): Provider[] {\n return provideDefaults(defaults);\n}\n","import { type Signal } from '@angular/core';\n\nimport { readEntryGuarded, VirtualizedNavigator } from 'forty-cdk/core';\nimport type { ForSelectOptionHandle } from './select-context';\n\ninterface PositionEntry<T> {\n readonly id: string;\n readonly value: T;\n readonly disabled: boolean;\n}\n\n/**\n * Dependencies for `SelectVirtualizedNavigator`. Wires the helper to the\n * root directive's signal graph and a small set of imperative callbacks.\n */\nexport interface SelectVirtualizedNavigatorDeps<T> {\n /** Live registered options. */\n readonly items: Signal<readonly ForSelectOptionHandle<T>[]>;\n /** Total option count for the virtualized path. */\n readonly totalCount: Signal<number | undefined>;\n /** Inclusive-exclusive range of currently rendered options when virtualizing. */\n readonly visibleRange: Signal<readonly [number, number] | undefined>;\n /** Whether keyboard navigation wraps at the ends. */\n readonly loop: Signal<boolean>;\n /** Read the root's current activedescendant id. */\n readonly getActiveId: () => string | null;\n /** Write the root's activedescendant id. */\n readonly setActiveId: (id: string | null) => void;\n /** Forward a `(scrollToIndex)` request to the consumer's virtualizer. */\n readonly emitScrollToIndex: (idx: number) => void;\n}\n\n/**\n * Virtualization navigation engine for `ForSelect`. A thin adapter over the\n * shared `_internal/virtualized-navigator` engine: it maps the select option\n * handle onto the engine's accessors (the option carries its raw `value` so the\n * root can resolve the committed option's index on open) and reads the option's\n * `value` through the single NG0950 read guard.\n *\n * Internal — not re-exported from `select/index.ts` or `public-api.ts`.\n */\nexport class SelectVirtualizedNavigator<T> {\n readonly #core: VirtualizedNavigator<ForSelectOptionHandle<T>, PositionEntry<T>>;\n\n constructor(deps: SelectVirtualizedNavigatorDeps<T>) {\n this.#core = new VirtualizedNavigator(\n { ...deps, loop: deps.loop },\n {\n posOf: (o) => o.posInSet(),\n idOf: (o) => o.id(),\n hostOf: (o) => o.host,\n readEntry: (o) =>\n readEntryGuarded(() => ({ id: o.id(), value: o.value(), disabled: o.disabled() })),\n },\n );\n }\n\n /** @see VirtualizedNavigator.prime */\n prime(): void {\n this.#core.prime();\n }\n\n /** @see VirtualizedNavigator.tryResolvePending */\n tryResolvePending(): boolean {\n return this.#core.tryResolvePending();\n }\n\n /** @see VirtualizedNavigator.navigate */\n navigate(direction: 'next' | 'prev' | 'first' | 'last'): void {\n this.#core.navigate(direction);\n }\n\n /**\n * Read-only position snapshot for the root's committed-index resolution.\n * Keyed by absolute `posInSet`; persists across close → reopen while\n * `totalCount` is unchanged.\n */\n snapshotByPos(): ReadonlyMap<number, PositionEntry<T>> {\n return this.#core.snapshotByPos();\n }\n\n /** @see VirtualizedNavigator.seedActive */\n seedActive(index: number): void {\n this.#core.seedActive(index);\n }\n\n /** @see VirtualizedNavigator.resetPending */\n resetPending(): void {\n this.#core.resetPending();\n }\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n inject,\n input,\n linkedSignal,\n model,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport {\n type FloatingAlign,\n type FloatingSide,\n FormUiControlBase,\n injectHiddenInput,\n IdGenerator,\n type ListNavigationAction,\n resolveListNavigation,\n type WritingDirection,\n ListboxOverlayController,\n defaultItemToFormValue,\n isInArray,\n singleSelected,\n toggleInArray,\n isRequiredInputUnset,\n injectTextDirection,\n findTypeaheadMatch,\n injectTypeahead,\n type VetoableEvent,\n type VetoableNativeEvent,\n} from 'forty-cdk/core';\nimport {\n FOR_SELECT_CONTEXT,\n type ForSelectCloseReason,\n type ForSelectContext,\n type ForSelectInitialFocus,\n type ForSelectOptionHandle,\n} from './select-context';\nimport { FOR_SELECT_DEFAULTS } from './select-defaults';\nimport { SelectVirtualizedNavigator } from './select-virtualized-navigator';\n\n/** Sentinel for an option handle whose `input.required` `[value]` is not yet written. */\nconst NO_VALUE = Symbol('forty-cdk/select:no-value');\n\n/**\n * Headless implementation of the [WAI-ARIA select-only combobox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/).\n * Implements `FormValueControl<readonly T[]>` from\n * `@angular/forms/signals` for `[formField]` auto-wiring.\n *\n * Generic over the option value type `T` (default `string`). When the\n * consumer binds object items the directive infers `T` from `[(value)]` and\n * `[forSelectOption][value]`; object identity is resolved by the\n * consumer-supplied `[isItemEqualToValue]` and the hidden inputs serialize\n * via `[itemToFormValue]`. Option display text is read from the rendered\n * `textContent`, so no separate label function is needed — supply the\n * optional `[itemToLabel]` only when a pre-set object value must render its\n * label before the listbox is ever opened (the documented `@if (open())`\n * pattern).\n *\n * Selection is always modeled as `readonly T[]`:\n * - In single mode (`multiple=false`, default), the array has 0 or 1 element\n * and option activation closes the listbox.\n * - In multi mode, option activation toggles and the listbox stays open.\n *\n * Typeahead has two modes mirroring native `<select>`:\n * - **Closed trigger** (single mode only): printable keys select the matching\n * option immediately without opening the listbox.\n * - **Open listbox**: printable keys move focus to the first matching option\n * (selection still requires Enter / Space / click).\n */\n@Directive({\n selector: '[forSelect]',\n exportAs: 'forSelect',\n host: {\n '[attr.data-state]': 'open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '[attr.dir]': 'dir()',\n },\n providers: [{ provide: FOR_SELECT_CONTEXT, useExisting: ForSelect }],\n})\nexport class ForSelect<T = string>\n extends FormUiControlBase\n implements FormValueControl<readonly T[]>, ForSelectContext<T>\n{\n readonly #idGen = inject(IdGenerator);\n readonly #typeahead = injectTypeahead();\n readonly #closedTypeahead = injectTypeahead();\n readonly #defaults = inject(FOR_SELECT_DEFAULTS);\n\n /**\n * Two-way bindable. Selected option values. Single-mode keeps 0 or 1\n * element. The `model()` change emitter (`(valueChange)`) fires only on\n * internal selection changes, never on consumer writes via `[(value)]`.\n */\n readonly value = model<readonly T[]>([]);\n\n /**\n * Compare two items for equality. Defaults to `===`, which is the\n * correct identity for primitive `T` (e.g. strings, numbers). Override\n * when binding object items so the directive can locate selected entries\n * by id (or any other stable key) instead of by reference:\n * `[isItemEqualToValue]=\"(a, b) => a.id === b.id\"`.\n */\n readonly isItemEqualToValue = input<(a: T, b: T) => boolean>((a, b) => a === b);\n\n /**\n * Serialize an item for the hidden input that participates in native\n * form submission. Defaults to identity for strings and to\n * `JSON.stringify` for non-string items so the primitive works out of\n * the box round-tripping objects. Override to emit a specific wire\n * format — typically a per-item id — when the backend expects that:\n * `[itemToFormValue]=\"(it) => it.id\"`.\n */\n readonly itemToFormValue = input<(item: T) => string>(defaultItemToFormValue);\n\n /**\n * Resolve the display label for an item without the listbox mounted.\n * When set, {@link selectedLabels} (and therefore `[forSelectValue]`)\n * renders this for any selected value, so a pre-set object value shows\n * its label on first paint — before the listbox has ever been opened, in\n * the documented `@if (forSelect.open())` pattern. Without it, object-value\n * labels resolve from the rendered option `textContent`, which is only\n * available once the content mounts; the serialized form value is shown as\n * a last-resort fallback in the meantime: `[itemToLabel]=\"(c) => c.name\"`.\n *\n * Defaults to `undefined` (string mode renders the value verbatim, so no\n * label function is needed).\n */\n readonly itemToLabel = input<((item: T) => string) | undefined>(undefined);\n\n /**\n * Read-only single-select convenience view of {@link value}. Returns the\n * sole value when exactly one is selected (regardless of `multiple`),\n * otherwise `null` (zero, or 2+ selected). Lets single-select consumers\n * read `selected()` instead of unwrapping `value()[0]`. The array-backed\n * `value` model remains the source of truth and the `FormValueControl`\n * contract; this is a derived accessor.\n */\n readonly selected = singleSelected(this.value);\n\n /**\n * Two-way bindable. Whether the listbox is currently shown. The `model()`\n * change emitter (`(openChange)`) fires only on internal transitions\n * (trigger toggle, Escape, outside dismissal, single-mode option select),\n * never on consumer writes via `[(open)]`.\n */\n readonly open = model<boolean>(false);\n\n readonly multiple = input(false, { transform: booleanAttribute });\n\n /**\n * Presentation mode. When `true`, `[forSelectContent]` mounts as a trapped /\n * inert / scroll-locked modal surface (routed through `_internal/modal-shell`)\n * instead of the default anchored popover — the batteries-included touch\n * presentation a consumer opts into with `[modal]=\"isCoarsePointer()\"`. The\n * form-value wiring (`[(value)]`, `name`) is unchanged.\n *\n * Read once when the content mounts (the two shells are structurally\n * different; switching at runtime would need a remount, and the surface\n * mounts lazily via `@if (open())` well after `modal` settles). Every\n * anchored-positioning input — `position`, `side`, `align`, `sideOffset`,\n * `alignOffset`, `sticky`, `hideWhenDetached`, `clipUntilPositioned`, `avoidCollisions`,\n * `collisionPadding`, `arrowPadding` — is a no-op in this mode. Default\n * `false` (non-breaking). The swipe / snap-point sheet is deliberately not\n * this mode — compose a `ForListbox` inside a `ForDrawer` for that.\n */\n readonly modal = input(false, { transform: booleanAttribute });\n\n /**\n * Positioning algorithm.\n *\n * - `'popper'` (default): standard floating-ui anchored placement using\n * `side` / `align` / `sideOffset` / `alignOffset`, with `flip` + `shift`\n * collision handling. Same path as Popover / DropdownMenu.\n * - `'item-aligned'`: the listbox overlays the trigger so the selected\n * option's vertical center aligns with the trigger's vertical center\n * — visually the menu \"snaps over\" the trigger when opened, mirroring\n * macOS native `<select>`. Falls back to the first enabled option when\n * nothing is selected. `side`, `align`, `sideOffset`, `alignOffset`,\n * `sticky`, `hideWhenDetached`, `clipUntilPositioned`, and `avoidCollisions` are ignored in\n * this mode; only `collisionPadding` is honored.\n */\n readonly position = input<'popper' | 'item-aligned'>('popper');\n\n /**\n * Side the listbox is anchored to. Defaults to `'bottom'`. Pair with\n * `align` for the full positioning API. Ignored when\n * `position=\"item-aligned\"`.\n */\n readonly side = input<FloatingSide | undefined>('bottom');\n\n /** Alignment along the chosen `side`. Defaults to `'start'`. */\n readonly align = input<FloatingAlign | undefined>('start');\n\n /**\n * Gap (px) between trigger and listbox along the main axis. Default `4`.\n * The default is read from\n * `provideForSelectDefaults` for the surrounding scope.\n */\n readonly sideOffset = input(this.#defaults.sideOffset, { transform: numberAttribute });\n\n /** Gap (px) along the cross axis. Default `0`. */\n readonly alignOffset = input(0, { transform: numberAttribute });\n\n /** When `true` (default), `flip` and `shift` keep the listbox inside the viewport. */\n readonly avoidCollisions = input(true, { transform: booleanAttribute });\n\n /**\n * Padding (px) applied uniformly to flip / shift / size. Default `8`.\n * The default is read from `provideForSelectDefaults` for the surrounding\n * scope.\n */\n readonly collisionPadding = input(this.#defaults.collisionPadding, {\n transform: numberAttribute,\n });\n\n /** Padding (px) for the `arrow` middleware. Default `0`. */\n readonly arrowPadding = input(0, { transform: numberAttribute });\n\n /** Stickiness behaviour for `shift`. Default `'partial'`. */\n readonly sticky = input<'partial' | 'always' | false>('partial');\n\n /** When `true`, sets `data-detached=\"\"` while the trigger is scrolled off-screen. */\n readonly hideWhenDetached = input(false, { transform: booleanAttribute });\n\n /**\n * When `true` (default), the content is clipped until floating-ui resolves\n * its first position, preventing a flash at the viewport corner. Set to\n * `false` so a dramatic `animate.enter` plays from its first frame (the\n * surface may flash briefly at the unresolved position while positioning\n * computes).\n */\n readonly clipUntilPositioned = input(true, { transform: booleanAttribute });\n\n readonly loop = input(true, { transform: booleanAttribute });\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /**\n * Total number of items in the source data. When set, switches the listbox\n * to the virtualized `aria-activedescendant` focus model and populates\n * `aria-setsize` on each rendered option. Leave unset (default) for the\n * standard DOM-focus model.\n */\n readonly totalCount = input(undefined, {\n transform: (v: unknown): number | undefined => (v == null ? undefined : numberAttribute(v)),\n });\n /**\n * Inclusive-exclusive `[start, end)` index range of the currently rendered\n * options, provided by `injectVirtualizer`. Used to decide whether a\n * navigation target is in the visible window.\n */\n readonly visibleRange = input<readonly [number, number] | undefined>(undefined);\n /**\n * Emitted when navigation (or open-time scroll-to-selected) reaches an\n * option outside the rendered window. Pass to `injectVirtualizer`'s\n * `scrollToIndex` so the correct option mounts.\n */\n readonly scrollToIndex = output<number>();\n\n /**\n * Writing direction. When unset (default `null`), the inherited ambient\n * direction is resolved from the nearest ancestor carrying a `dir` attribute\n * (or `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]` always wins.\n * The resolved value is reflected to the host `dir` attribute.\n */\n readonly _dirInput = input<WritingDirection | null>(null, { alias: 'dir' });\n readonly dir = injectTextDirection(this._dirInput);\n\n /**\n * Single-mode only. When true, arrow nav also selects the focused option\n * while the listbox is open. APG calls this optional and recommends\n * caution — leave off unless your UX truly benefits. Default `false`.\n */\n readonly selectionFollowsFocus = input(false, { transform: booleanAttribute });\n\n /** Placeholder shown by `[forSelectValue]` when no option is selected. */\n readonly placeholder = input<string>('');\n\n /** When true (default), Escape, pointer-down outside, and focus outside close the listbox. */\n readonly dismissible = input(true, { transform: booleanAttribute });\n\n /** When true (default), focus returns to the trigger on close. */\n readonly returnFocus = input(true, { transform: booleanAttribute });\n\n /** Manual `aria-label` on `[forSelectContent]` when the trigger isn't a meaningful name. */\n readonly ariaLabel = input<string | null>(null);\n\n readonly escapeKeyDown = output<VetoableNativeEvent<KeyboardEvent>>();\n readonly pointerDownOutside = output<VetoableNativeEvent<PointerEvent>>();\n readonly focusOutside = output<VetoableNativeEvent<FocusEvent>>();\n readonly interactOutside = output<VetoableNativeEvent<PointerEvent | FocusEvent>>();\n\n /**\n * Fires just before the listbox sends focus to the selected option\n * (or first / last enabled) on mount. Call `preventDefault()` on the\n * emitted veto to skip the imperative focus move.\n */\n readonly autoFocusOnOpen = output<VetoableEvent>();\n\n /**\n * Fires just before focus returns to the trigger on unmount. Call\n * `preventDefault()` on the veto to suppress the return-focus.\n */\n readonly autoFocusOnClose = output<VetoableEvent>();\n\n readonly #virtualized = computed(() => this.totalCount() !== undefined);\n readonly #activeId = signal<string | null>(null);\n\n /**\n * Shared overlay-listbox state machine: option collection, trigger / anchor /\n * content registries + ids, DOM-focus navigation, the open / close machine,\n * the initial-focus / close-reason state, and the dismiss / auto-focus emit\n * forwarders. The value-specific behaviour (`isSelected`, `activate`,\n * `focusSelectedOption`, typeahead, the virtualized activedescendant path,\n * `commitOnTab`'s value set) stays in this root; close-time virtualized\n * cleanup and the post-navigate scroll / `selectionFollowsFocus` move are\n * threaded through the controller's side-effect callbacks.\n */\n readonly #controller = new ListboxOverlayController<\n ForSelectOptionHandle<T>,\n ForSelectInitialFocus,\n ForSelectCloseReason\n >(this.#idGen, {\n idPrefix: 'for-select',\n multipleAnchorsError:\n '[forty-cdk/select] Multiple [forSelectAnchor] inside the same [forSelect]; only one is allowed.',\n defaultInitialFocus: 'selected',\n effectiveDisabled: this.effectiveDisabled,\n setOpen: (open) => this.open.set(open),\n isOpen: () => this.open(),\n emit: {\n escapeKeyDown: this.escapeKeyDown,\n pointerDownOutside: this.pointerDownOutside,\n focusOutside: this.focusOutside,\n interactOutside: this.interactOutside,\n autoFocusOnOpen: this.autoFocusOnOpen,\n autoFocusOnClose: this.autoFocusOnClose,\n },\n markTouched: () => this.markTouched(),\n onClose: () => {\n if (this.#virtualized()) {\n this.#activeId.set(null);\n this.#navigator?.resetPending();\n }\n },\n onNavigateFocus: (target) => {\n target.host.scrollIntoView?.({ block: 'nearest' });\n if (!this.multiple() && this.selectionFollowsFocus() && !this.readonly()) {\n this.#setSingle(target.value());\n }\n },\n onUnregisterOption: (handle) => {\n if (this.#virtualized() && this.#activeId() === handle.id()) {\n this.#activeId.set(null);\n }\n },\n });\n\n readonly triggerId = this.#controller.triggerId;\n readonly contentId = this.#controller.contentId;\n readonly initialFocus = this.#controller.initialFocus;\n readonly lastCloseReason = this.#controller.lastCloseReason;\n readonly trigger = this.#controller.trigger;\n\n /**\n * Element floating-ui anchors the listbox against. Prefers an optional\n * `[forSelectAnchor]` when registered, otherwise falls back to the trigger\n * so existing selects without an anchor keep their behavior. Decoupled from\n * `trigger` so the trigger keeps driving `aria-controls`, the click toggle,\n * focus return, and its dismissal exemption regardless of where the listbox\n * paints.\n */\n readonly anchor = this.#controller.anchor;\n\n readonly content = this.#controller.content;\n\n readonly options = this.#controller.options;\n\n /** The active option's `id` in the virtualized path, `null` in the default path. */\n readonly activeDescendantId = computed<string | null>(() =>\n this.#virtualized() ? this.#activeId() : null,\n );\n\n #navigator: SelectVirtualizedNavigator<T> | null = null;\n #requireNavigator(): SelectVirtualizedNavigator<T> {\n return (this.#navigator ??= new SelectVirtualizedNavigator<T>({\n items: this.options,\n totalCount: this.totalCount,\n visibleRange: this.visibleRange,\n loop: this.loop,\n getActiveId: () => this.#activeId(),\n setActiveId: (id) => this.#activeId.set(id),\n emitScrollToIndex: (idx) => this.scrollToIndex.emit(idx),\n }));\n }\n\n /**\n * Persisted snapshot of the registered options as `{ value, label }` tuples,\n * keyed internally by serialized form value. Drives closed-state typeahead\n * and `[forSelectValue]` label rendering — the live `options` registry is\n * empty whenever `[forSelectContent]` is unmounted, so the snapshot carries\n * the last non-empty option set across close → re-open cycles.\n *\n * A `linkedSignal` that folds the live option set on every `options()`\n * change: when the listbox unmounts (`items().length === 0`) it returns the\n * previous accumulator unchanged so labels stay resolvable while closed. Each\n * option's `label` is itself a `Signal<string>`, so this never reads\n * `textContent` from inside the fold — the canonical replacement for the\n * previous `afterEveryRender(() => signal.set(...))` snapshot (no\n * state-propagation inside an `effect`). A statically-rendered option that\n * registers before its `[value]` binding is written is skipped this fold and\n * folded in on the re-run the binding triggers (see {@link #readHandleValue}).\n */\n readonly #cachedOptions = linkedSignal<\n readonly ForSelectOptionHandle<T>[],\n readonly { value: T; label: string }[]\n >({\n source: () => this.options(),\n computation: (items, prev) => {\n if (items.length === 0) {\n return prev?.value ?? [];\n }\n const toFormValue = this.itemToFormValue();\n const merged = new Map<string, { value: T; label: string }>();\n for (const entry of prev?.value ?? []) {\n merged.set(toFormValue(entry.value), entry);\n }\n for (const item of items) {\n const value = this.#readHandleValue(item);\n if (value === NO_VALUE) {\n continue;\n }\n merged.set(toFormValue(value), { value, label: item.label() });\n }\n return [...merged.values()];\n },\n });\n\n /**\n * Trimmed display labels of the selected values, in selection order. Pure\n * derivation: when `[itemToLabel]` is supplied it is authoritative; otherwise\n * resolve from the persisted option snapshot, then the serialized form value\n * so non-string items still render meaningfully on a cold cache.\n *\n * The snapshot's labels come from each option's reactive `label` signal,\n * which reads the rendered `textContent`. `textContent` is not a signal, so a\n * label whose rendered text changes without a value change does not self-heal\n * here — supply `[itemToLabel]` for a pure signal derivation that observes\n * label changes directly.\n */\n readonly selectedLabels = computed<readonly string[]>(() => {\n const values = this.value();\n if (values.length === 0) {\n return [];\n }\n // When `[itemToLabel]` is supplied it is authoritative: the label resolves\n // without the listbox mounted, so a pre-set object value renders correctly\n // on first paint in the documented `@if (open())` pattern and never flickers\n // from a serialized id to the real label once the listbox is first opened.\n const itemToLabel = this.itemToLabel();\n if (itemToLabel) {\n return values.map(itemToLabel);\n }\n const cached = this.#cachedOptions();\n const toFormValue = this.itemToFormValue();\n const cachedByKey = new Map<string, { value: T; label: string }>();\n for (const o of cached) {\n cachedByKey.set(toFormValue(o.value), o);\n }\n const labels: string[] = [];\n for (const v of values) {\n const key = toFormValue(v);\n const opt = cachedByKey.get(key);\n labels.push(opt ? opt.label : typeof v === 'string' ? (v as string) : key);\n }\n return labels;\n });\n\n readonly selectedOptionEl = computed<HTMLElement | null>(() => {\n const values = this.value();\n if (values.length === 0) {\n return null;\n }\n const items = this.options();\n const toFormValue = this.itemToFormValue();\n const byKey = new Map<string, ForSelectOptionHandle<T>>();\n for (const o of items) {\n byKey.set(toFormValue(o.value()), o);\n }\n for (const v of values) {\n const opt = byKey.get(toFormValue(v));\n if (opt) {\n return opt.host;\n }\n }\n return null;\n });\n\n protected override fieldLabelledElement(): HTMLElement | null {\n return this.trigger();\n }\n\n protected override fieldLabelledElementId(): string {\n return this.triggerId();\n }\n\n /**\n * Read an option handle's `value()` inside the snapshot fold, tolerating the\n * NG0950 thrown while a statically-rendered option is between registering\n * (its constructor, during the content view's creation pass) and having its\n * `input.required` `[value]` binding written (that view's update pass). The\n * fold's prime read can run in that gap, so a static option above a `@for`\n * list would otherwise hard-crash on open. Returns {@link NO_VALUE} in that\n * window; the fold skips the option and folds it in on the re-run the binding\n * triggers (the required-input producer is accessed before the read throws,\n * so the dependency is still tracked). Any non-NG0950 error propagates.\n */\n #readHandleValue(item: ForSelectOptionHandle<T>): T | typeof NO_VALUE {\n try {\n return item.value();\n } catch (error) {\n if (isRequiredInputUnset(error)) {\n return NO_VALUE;\n }\n throw error;\n }\n }\n\n constructor() {\n super();\n injectHiddenInput<T>({\n name: this.name,\n values: this.value,\n serialize: (item) => this.itemToFormValue()(item),\n disabled: this.effectiveDisabled,\n });\n\n // Prime the snapshot fold while the listbox is open so its `linkedSignal`\n // `prev` slot is seeded with the live options before they unmount — closed-\n // state typeahead and `[forSelectValue]` then resolve labels even when no\n // `[forSelectValue]` pulls the cache during the open cycle. A read, not a\n // write: this is a legitimate side effect (forcing the lazy fold to run),\n // not state propagation inside an `effect`.\n effect(() => {\n if (this.open()) {\n this.#cachedOptions();\n }\n });\n\n effect(() => {\n this.options();\n if (!this.#virtualized()) {\n return;\n }\n const navigator = this.#requireNavigator();\n navigator.prime();\n navigator.tryResolvePending();\n });\n }\n\n setInitialFocus(target: ForSelectInitialFocus): void {\n this.#controller.setInitialFocus(target);\n }\n\n registerTrigger(el: HTMLElement): void {\n this.#controller.registerTrigger(el);\n }\n unregisterTrigger(el: HTMLElement): void {\n this.#controller.unregisterTrigger(el);\n }\n\n registerAnchor(el: HTMLElement): void {\n this.#controller.registerAnchor(el);\n }\n unregisterAnchor(el: HTMLElement): void {\n this.#controller.unregisterAnchor(el);\n }\n\n registerContent(el: HTMLElement): void {\n this.#controller.registerContent(el);\n }\n unregisterContent(el: HTMLElement): void {\n this.#controller.unregisterContent(el);\n }\n\n registerOption(handle: ForSelectOptionHandle<T>): void {\n this.#controller.registerOption(handle);\n }\n unregisterOption(handle: ForSelectOptionHandle<T>): void {\n this.#controller.unregisterOption(handle);\n }\n\n isSelected(v: T): boolean {\n return isInArray(this.value(), v, this.isItemEqualToValue());\n }\n\n #setSingle(v: T): void {\n if (this.value().length === 1 && this.isSelected(v)) {\n return;\n }\n this.value.set([v]);\n }\n\n activate(v: T): void {\n if (this.effectiveDisabled() || this.readonly()) {\n return;\n }\n if (this.multiple()) {\n this.value.set(toggleInArray(this.value(), v, this.isItemEqualToValue()));\n // Multi-select stays open — consumer closes via outside pointer / Escape / Tab.\n return;\n }\n // Single-mode: idempotent select + close. Skip the redundant set (and its\n // `valueChange` emission) when the same sole value is already selected.\n this.#setSingle(v);\n this.closeMenu('select');\n }\n\n navigate(currentOption: HTMLElement, action: ListNavigationAction): void {\n this.#controller.navigate(currentOption, action, this.loop());\n }\n\n handleTypeahead(event: KeyboardEvent): void {\n if (!this.#typeahead.handle(event)) {\n return;\n }\n const match = findTypeaheadMatch(\n this.options(),\n { buffer: this.#typeahead.buffer(), repeated: false, anchorIndex: -1 },\n (o) => o.host.textContent ?? '',\n (o) => o.disabled(),\n );\n match?.host.focus();\n }\n\n handleClosedTypeahead(event: KeyboardEvent): boolean {\n // Only single-mode replicates native <select>'s \"type-to-select\" behavior.\n // Multi-select is ambiguous (which one wins?) — caller falls back to opening.\n if (this.multiple() || this.effectiveDisabled() || this.readonly()) {\n return false;\n }\n if (!this.#closedTypeahead.handle(event)) {\n return false;\n }\n const buffer = this.#closedTypeahead.buffer().toLowerCase();\n if (!buffer) {\n return true;\n }\n // Closed-state lookup goes through the cached snapshot — `[forSelectContent]`\n // is unmounted, so the live `options` registry is empty here. The cache\n // populates the first time the listbox opens and renders options.\n const cached = this.#cachedOptions();\n const match = cached.find((o) => o.label.toLowerCase().startsWith(buffer));\n if (match) {\n this.value.set([match.value]);\n }\n return true;\n }\n\n focusFirstEnabledOption(): boolean {\n return this.#controller.focusFirstEnabledOption();\n }\n\n focusLastEnabledOption(): boolean {\n return this.#controller.focusLastEnabledOption();\n }\n\n focusSelectedOption(): boolean {\n const values = this.value();\n if (values.length === 0) {\n return false;\n }\n const equals = this.isItemEqualToValue();\n const items = this.options();\n for (const v of values) {\n const opt = items.find((o) => equals(o.value(), v) && !o.disabled());\n if (opt) {\n opt.host.focus();\n return true;\n }\n }\n return false;\n }\n\n toggle(initialFocus: ForSelectInitialFocus = 'selected'): void {\n this.#controller.toggle(initialFocus);\n }\n\n openMenu(initialFocus: ForSelectInitialFocus = 'selected'): void {\n this.#controller.openMenu(initialFocus);\n }\n\n closeMenu(reason: ForSelectCloseReason): void {\n this.#controller.closeMenu(reason);\n }\n\n commitOnTab(value: T): void {\n if (this.effectiveDisabled()) {\n return;\n }\n if (!this.multiple() && !this.readonly()) {\n this.#setSingle(value);\n }\n // Move focus to the trigger BEFORE the unmount + close so the browser's\n // Tab default action has a stable active element to advance from. The\n // content's `DestroyRef` reads `lastCloseReason() === 'tab'` and skips\n // its own re-focus — otherwise it would steal focus back from wherever\n // the browser advanced it.\n this.#controller.focusTrigger();\n this.closeMenu('tab');\n }\n\n emitEscapeKeyDown(event: KeyboardEvent): void {\n this.#controller.emitEscapeKeyDown(event, this.dismissible(), 'escape');\n }\n\n /**\n * Outside-interaction emit forwarders. The shared `#pendingOutsideVeto`\n * reuse between the specific outside channels and the composite\n * `interactOutside` lives in `injectOverlayShell`; these only fire the\n * matching output with the veto the shell built.\n */\n emitPointerDownOutside(veto: VetoableNativeEvent<PointerEvent>): void {\n this.#controller.emitPointerDownOutside(veto);\n }\n emitFocusOutside(veto: VetoableNativeEvent<FocusEvent>): void {\n this.#controller.emitFocusOutside(veto);\n }\n emitInteractOutside(veto: VetoableNativeEvent<PointerEvent | FocusEvent>): void {\n this.#controller.emitInteractOutside(veto);\n }\n\n /** Modal-path Escape forwarder: emit only; the modal shell owns the close. */\n forwardEscapeKeyDown(veto: VetoableNativeEvent<KeyboardEvent>): void {\n this.#controller.forwardEscapeKeyDown(veto);\n }\n\n /**\n * Implicit close requested by the shell after an un-vetoed outside\n * interaction. Marks the control touched (mirroring the trigger blur) and\n * closes with the channel's reason.\n */\n requestClose(reason: 'pointerDownOutside' | 'focusOutside'): void {\n this.#controller.requestClose(reason);\n }\n\n emitAutoFocusOnOpen(): boolean {\n return this.#controller.emitAutoFocusOnOpen();\n }\n\n emitAutoFocusOnClose(): boolean {\n return this.#controller.emitAutoFocusOnClose();\n }\n\n override markTouched(): void {\n super.markTouched();\n }\n\n seedVirtualizedInitialFocus(): void {\n if (!this.#virtualized()) {\n return;\n }\n const navigator = this.#requireNavigator();\n const committed = this.#committedIndex(navigator);\n if (committed !== null) {\n navigator.seedActive(committed);\n return;\n }\n navigator.navigate('first');\n }\n\n handleVirtualizedKeydown(event: KeyboardEvent): void {\n if (!this.#virtualized() || this.effectiveDisabled()) {\n return;\n }\n if (event.key === 'Tab') {\n if (this.modal()) {\n return;\n }\n this.#commitActiveDescendantOnTab();\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.#activateActiveDescendant();\n return;\n }\n const action = resolveListNavigation(event, {\n orientation: this.orientation(),\n dir: this.dir(),\n pageKeys: true,\n });\n if (action) {\n event.preventDefault();\n this.#requireNavigator().navigate(action);\n return;\n }\n this.#typeaheadVirtualized(event);\n }\n\n notifyOptionClick(optionId: string): void {\n if (!this.#virtualized()) {\n return;\n }\n this.#activeId.set(optionId);\n this.content()?.focus();\n }\n\n #committedIndex(navigator: SelectVirtualizedNavigator<T>): number | null {\n const values = this.value();\n if (values.length === 0) {\n return null;\n }\n const equals = this.isItemEqualToValue();\n const snapshot = navigator.snapshotByPos();\n for (const v of values) {\n for (const [pos, entry] of snapshot) {\n if (!entry.disabled && equals(entry.value, v)) {\n return pos;\n }\n }\n }\n return null;\n }\n\n #activateActiveDescendant(): void {\n const id = this.#activeId();\n if (id === null) {\n return;\n }\n const handle = this.options().find((o) => o.id() === id);\n if (!handle || handle.disabled()) {\n return;\n }\n this.activate(handle.value());\n }\n\n #commitActiveDescendantOnTab(): void {\n const id = this.#activeId();\n const handle = id === null ? undefined : this.options().find((o) => o.id() === id);\n if (handle && !handle.disabled()) {\n this.commitOnTab(handle.value());\n return;\n }\n this.closeMenu('tab');\n }\n\n #typeaheadVirtualized(event: KeyboardEvent): void {\n if (!this.#typeahead.handle(event)) {\n return;\n }\n const match = findTypeaheadMatch(\n this.options(),\n { buffer: this.#typeahead.buffer(), repeated: false, anchorIndex: -1 },\n (o) => o.host.textContent ?? '',\n (o) => o.disabled(),\n );\n if (match) {\n this.#activeId.set(match.id());\n match.host.scrollIntoView?.({ block: 'nearest' });\n }\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\nimport { registerHandle } from 'forty-cdk/core';\nimport { injectSelectContext } from './select-context';\n\n/**\n * Optional positioning anchor. When present, `[forSelectContent]` is\n * positioned against this element instead of `[forSelectTrigger]` — useful\n * when the trigger lives inside a decorated field box (padding, prefix icon,\n * clear / chevron buttons) and the listbox should match the visible field\n * rather than the inner button.\n *\n * Only positioning changes: the trigger still owns `aria-controls`,\n * `aria-expanded`, the click toggle, focus return on close, and its exemption\n * from outside-pointer dismissal. If no anchor is registered the listbox falls\n * back to anchoring against the trigger, so existing usages are unaffected.\n *\n * At most one `[forSelectAnchor]` may be registered per `[forSelect]`; a second\n * one throws.\n *\n * ```html\n * <div forSelect [(value)]=\"v\">\n * <div forSelectAnchor class=\"field-box\">\n * <icon />\n * <button forSelectTrigger>…</button>\n * <button class=\"clear\">×</button>\n * </div>\n * @if (open()) {\n * <div forSelectContent>…</div>\n * }\n * </div>\n * ```\n */\n@Directive({\n selector: '[forSelectAnchor]',\n exportAs: 'forSelectAnchor',\n})\nexport class ForSelectAnchor {\n readonly #ctx = injectSelectContext('ForSelectAnchor');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n registerHandle(\n this.#host.nativeElement,\n (el) => this.#ctx.registerAnchor(el),\n (el) => this.#ctx.unregisterAnchor(el),\n );\n }\n}\n","import { computed, Directive, effect, ElementRef, inject, input } from '@angular/core';\n\nimport { reflectDisabled } from 'forty-cdk/core';\nimport { type ForSelectContext, injectSelectTriggerContext } from './select-context';\n\n/**\n * Combobox button that opens the listbox. Apply on a `<button>` so\n * Space / Enter dispatch native click events that toggle via `(click)`.\n *\n * Wires APG select-only combobox attributes: `role=\"combobox\"`,\n * `aria-haspopup=\"listbox\"`, `aria-expanded`, and `aria-controls` pointing\n * to the listbox. The button is exempt from the listbox's dismissable\n * layer — clicks on it route through `(click)` instead of triggering an\n * outside-pointer dismissal race.\n *\n * The root is normally resolved via DI from the enclosing `[forSelect]`.\n * When the trigger is declared inside an `ng-template` stamped into the root\n * (e.g. via `ngTemplateOutlet`), DI resolves at the template's declaration\n * site and misses the root — pass it explicitly through the selector input,\n * `routerLink`-style: `[forSelectTrigger]=\"root\"` with `#root=\"forSelect\"`.\n *\n * Keyboard:\n * - **Click / Enter / Space** — toggle (open focuses the selected option, or first).\n * - **ArrowDown** — open + focus selected option (or first).\n * - **ArrowUp** — open + focus selected option (or last when none selected).\n * - **Typeahead** (single mode only) — printable keys select the matching\n * option immediately without opening the listbox, mirroring native\n * `<select>`. In multi mode the buffered key is ignored at the trigger;\n * open the listbox first to typeahead-focus.\n */\n@Directive({\n selector: '[forSelectTrigger]',\n exportAs: 'forSelectTrigger',\n host: {\n type: 'button',\n role: 'combobox',\n '[id]': 'ctx().triggerId()',\n '[attr.aria-haspopup]': '\"listbox\"',\n '[attr.aria-expanded]': 'ctx().open() ? \"true\" : \"false\"',\n '[attr.aria-controls]': 'ctx().open() ? ctx().contentId() : null',\n '[attr.aria-disabled]': 'ctx().effectiveDisabled() ? \"true\" : null',\n '[attr.aria-readonly]': 'ctx().readonly() ? \"true\" : null',\n '[attr.aria-required]': 'ctx().required() ? \"true\" : null',\n '[attr.aria-invalid]': 'ctx().invalid() ? \"true\" : null',\n '[attr.aria-busy]': 'ctx().pending() ? \"true\" : null',\n '[attr.data-state]': 'ctx().open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'ctx().effectiveDisabled() ? \"\" : null',\n '(click)': 'onClick()',\n '(keydown)': 'onKeyDown($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class ForSelectTrigger<T = unknown> {\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Optional explicit reference to the `[forSelect]` root, named after the\n * selector `routerLink`-style. The bare valueless attribute keeps resolving\n * the enclosing root via DI; pass the root explicitly\n * (`[forSelectTrigger]=\"root\"`, with `#root=\"forSelect\"`) when the trigger\n * is declared in an `ng-template` stamped inside the root — DI resolves at\n * the template's declaration site, so the enclosing root is invisible there.\n * The empty string (what the valueless attribute yields) is treated as unset.\n */\n readonly forSelectTrigger = input<ForSelectContext<T> | ''>('');\n\n protected readonly ctx = injectSelectTriggerContext<T>(this.forSelectTrigger);\n\n constructor() {\n const el = this.#host.nativeElement;\n // Registration is an imperative call into the resolved root's registry,\n // not state derivation — the effect only re-registers the element when the\n // resolved root changes (explicit reference swapped at runtime).\n effect((onCleanup) => {\n const ctx = this.ctx();\n ctx.registerTrigger(el);\n onCleanup(() => ctx.unregisterTrigger(el));\n });\n reflectDisabled(computed(() => this.ctx().effectiveDisabled()));\n }\n\n protected onClick(): void {\n this.ctx().toggle('selected');\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.ctx().effectiveDisabled()) {\n return;\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.ctx().openMenu('selected');\n return;\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n // ArrowUp lands on the selected option if any, else the last enabled.\n this.ctx().openMenu(this.ctx().value().length > 0 ? 'selected' : 'last');\n return;\n }\n // Closed-state typeahead — single-mode shortcut to match native <select>.\n // No-op (returns false) in multi mode or when the key isn't a printable\n // single char, so default browser behavior (e.g. nothing) takes over.\n this.ctx().handleClosedTypeahead(event);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as HTMLElement | null;\n if (next) {\n // Focus moving into the listbox content (we just opened it) — not a leave.\n const content = this.ctx().content();\n if (content && content.contains(next)) {\n return;\n }\n // Focus going to a sibling inside the [forSelect] wrapper — also not a leave.\n if (this.#host.nativeElement.contains(next)) {\n return;\n }\n }\n this.ctx().markTouched();\n }\n}\n","import { computed, Directive, input } from '@angular/core';\n\nimport { injectSelectContext } from './select-context';\n\n/**\n * Renders the currently-selected option's text — or the configured\n * placeholder when nothing is selected — into its host element via\n * `textContent`. Apply on a `<span>` (or any inline element) inside\n * `[forSelectTrigger]`:\n *\n * ```html\n * <button forSelectTrigger>\n * <span forSelectValue placeholder=\"Select fruit…\"></span>\n * </button>\n * ```\n *\n * In multi mode the labels are joined by `separator` (default `', '`). For\n * fully custom rendering, drop this directive and read\n * `forSelect.selectedLabels()` / `forSelect.value()` from your template.\n */\n@Directive({\n selector: '[forSelectValue]',\n exportAs: 'forSelectValue',\n host: {\n '[textContent]': 'displayText()',\n '[attr.data-placeholder]': 'isPlaceholder() ? \"\" : null',\n },\n})\nexport class ForSelectValue {\n readonly #ctx = injectSelectContext('ForSelectValue');\n\n /** Text shown when nothing is selected. Falls back to `[forSelect][placeholder]`. */\n readonly placeholder = input<string>('');\n\n /** Joiner for multi-mode label rendering. Default `', '`. */\n readonly separator = input<string>(', ');\n\n protected readonly isPlaceholder = computed(() => this.#ctx.value().length === 0);\n\n protected readonly displayText = computed(() => {\n const labels = this.#ctx.selectedLabels();\n if (labels.length === 0) {\n return this.placeholder() || this.#ctx.placeholder();\n }\n return labels.join(this.separator());\n });\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\nimport {\n registerHandle,\n injectModalShell,\n injectOverlayShell,\n type OverlayShellPositionerConfig,\n} from 'forty-cdk/core';\nimport { injectSelectContext } from './select-context';\n\n/**\n * The listbox surface. Carries `role=\"listbox\"`, is portaled to\n * `document.body`, and is positioned by `@floating-ui/dom` against the\n * trigger.\n *\n * Mount/unmount of the visible content is the consumer's responsibility —\n * wrap with `@if (open())` so `animate.enter` / `animate.leave` fire on the\n * natural mount cycle. While mounted, a `DismissableLayer` activates\n * (Escape, pointer-down outside, focus outside); the trigger element is\n * exempt from outside-pointer checks so trigger clicks toggle without\n * dismissal racing.\n *\n * Initial focus is sent to the selected option (`'selected'`), the first\n * enabled option (`'first'`), or the last enabled option (`'last'`)\n * according to the trigger's hint. On destroy, focus returns to the\n * trigger when `returnFocus` is true.\n *\n * The lifecycle is owned by one of the two shared shells, picked once on\n * construction from `[forSelect].modal`:\n *\n * - **non-modal (default)** — `injectOverlayShell` anchors the listbox to the\n * trigger and branches on `[forSelect].position`:\n * - `'popper'` (default) — standard `injectFloating` path with full\n * anchored placement (`side`, `align`, `sideOffset`,\n * `alignOffset`, `flip`, `shift`, `arrow`, `hideWhenDetached`).\n * - `'item-aligned'` — `injectItemAlignedPositioner` overlays the listbox so\n * the selected option's center aligns with the trigger's center. The\n * anchored-placement inputs are documented as no-ops in this mode.\n * - **modal** — `injectModalShell` traps focus, inerts the background, and\n * locks body scroll (a centered surface the consumer positions with CSS, not\n * trigger-anchored). The batteries-included touch presentation. Same Escape /\n * outside-pointer dismiss, `dismissible` / `returnFocus` / `ariaLabel`, and\n * `autoFocusOnOpen` / `autoFocusOnClose` veto hooks; every anchored-\n * positioning input is a no-op. `aria-modal=\"true\"` is reflected as a hint —\n * the real modality comes from the `inert` siblings the shell applies (the\n * surface keeps `role=\"listbox\"`, for which several screen readers ignore\n * `aria-modal`).\n *\n * Mount/unmount of the visible content is the consumer's responsibility —\n * wrap with `@if (open())` so `animate.enter` / `animate.leave` fire on the\n * natural mount cycle.\n */\n@Directive({\n selector: '[forSelectContent]',\n exportAs: 'forSelectContent',\n host: {\n role: 'listbox',\n '[attr.tabindex]': 'ctx.totalCount() !== undefined ? \"0\" : \"-1\"',\n '[attr.aria-activedescendant]': 'ctx.activeDescendantId()',\n '[id]': 'ctx.contentId()',\n '[attr.aria-labelledby]': 'ctx.ariaLabel() ? null : ctx.triggerId()',\n '[attr.aria-label]': 'ctx.ariaLabel()',\n '[attr.aria-modal]': 'ctx.modal() ? \"true\" : null',\n '[attr.aria-multiselectable]': 'ctx.multiple() ? \"true\" : null',\n '[attr.aria-orientation]': 'ctx.orientation()',\n '[attr.data-state]': 'ctx.open() ? \"open\" : \"closed\"',\n '[attr.data-orientation]': 'ctx.orientation()',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class ForSelectContent {\n protected readonly ctx = injectSelectContext('ForSelectContent');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n const ctx = this.ctx;\n registerHandle(\n this.#host.nativeElement,\n (el) => ctx.registerContent(el),\n (el) => ctx.unregisterContent(el),\n );\n\n // Primitive-owned initial-focus algorithm shared by both shells.\n // `'selected'` falls back to the first enabled option when nothing is\n // selected; returns `false` so the shell focuses the container on a miss.\n const focusInitial = (): boolean => {\n if (ctx.totalCount() !== undefined) {\n this.#host.nativeElement.focus();\n ctx.seedVirtualizedInitialFocus();\n return true;\n }\n const target = ctx.initialFocus();\n if (target === 'selected') {\n return ctx.focusSelectedOption() || ctx.focusFirstEnabledOption();\n }\n if (target === 'last') {\n return ctx.focusLastEnabledOption();\n }\n return ctx.focusFirstEnabledOption();\n };\n\n // Static branch — `modal` (and `position`) is read once on construction.\n // Switching modes at runtime would require re-creating the directive\n // (mount / unmount cycle), which is the expected pattern for primitives\n // whose surface is structurally different. The surface mounts lazily via\n // `@if (open())`, well after `modal` settles.\n if (ctx.modal()) {\n injectModalShell({\n modal: ctx.modal,\n returnFocus: ctx.returnFocus,\n // The trap owns Tab; the shell runs `focusInitial()` (selected →\n // first → last) instead of its own first-focusable move.\n initialFocus: {\n move: focusInitial,\n veto: () => ctx.emitAutoFocusOnOpen(),\n },\n autoFocusOnClose: () => (event) => {\n if (ctx.emitAutoFocusOnClose()) {\n event.preventDefault();\n }\n },\n dismiss: {\n dismissible: ctx.dismissible,\n // The shell builds the veto and calls this when not vetoed; mirror\n // the anchored path's touched-on-dismiss behaviour.\n requestClose: (reason) => {\n ctx.markTouched();\n ctx.closeMenu(reason);\n },\n emitEscapeKeyDown: (veto) => ctx.forwardEscapeKeyDown(veto),\n emitPointerDownOutside: (veto) => ctx.emitPointerDownOutside(veto),\n emitFocusOutside: (veto) => ctx.emitFocusOutside(veto),\n emitInteractOutside: (veto) => ctx.emitInteractOutside(veto),\n },\n });\n return;\n }\n\n const positioner: OverlayShellPositionerConfig =\n ctx.position() === 'item-aligned'\n ? {\n kind: 'item-aligned',\n reference: ctx.anchor,\n open: ctx.open,\n selectedOption: ctx.selectedOptionEl,\n collisionPadding: ctx.collisionPadding,\n }\n : {\n kind: 'floating',\n reference: ctx.anchor,\n open: ctx.open,\n side: ctx.side,\n align: ctx.align,\n sideOffset: ctx.sideOffset,\n alignOffset: ctx.alignOffset,\n avoidCollisions: ctx.avoidCollisions,\n collisionPadding: ctx.collisionPadding,\n arrowPadding: ctx.arrowPadding,\n sticky: ctx.sticky,\n hideWhenDetached: ctx.hideWhenDetached,\n clipUntilPositioned: ctx.clipUntilPositioned,\n };\n\n injectOverlayShell({\n positioner,\n dismiss: {\n dismissible: ctx.dismissible,\n // Mirror the modal path's touched-on-dismiss behaviour.\n requestClose: (reason) => {\n ctx.markTouched();\n ctx.closeMenu(reason);\n },\n emitEscapeKeyDown: (event) => ctx.emitEscapeKeyDown(event),\n emitPointerDownOutside: (veto) => ctx.emitPointerDownOutside(veto),\n emitFocusOutside: (veto) => ctx.emitFocusOutside(veto),\n emitInteractOutside: (veto) => ctx.emitInteractOutside(veto),\n // Trigger button is exempt — its own click handler toggles open/close;\n // without exemption pointer-down-outside would race and double-close.\n exemptElements: () => {\n const t = ctx.trigger();\n return t ? [t] : [];\n },\n },\n initialFocus: {\n move: focusInitial,\n veto: () => ctx.emitAutoFocusOnOpen(),\n },\n returnFocus: {\n enabled: ctx.returnFocus,\n target: () => ctx.trigger(),\n // `(autoFocusOnClose)` lets the consumer veto the return-focus.\n veto: () => ctx.emitAutoFocusOnClose(),\n // Skip on `'tab'` closes — Tab already moved focus to the trigger\n // and let the browser advance from there; re-focusing would steal\n // it back.\n skip: () => ctx.lastCloseReason() === 'tab',\n },\n });\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.ctx.totalCount() !== undefined) {\n this.ctx.handleVirtualizedKeydown(event);\n }\n }\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n InjectionToken,\n input,\n signal,\n} from '@angular/core';\n\nimport { registerHandle, hostId, resolveListNavigation } from 'forty-cdk/core';\nimport { injectSelectContext } from './select-context';\n\n/**\n * Injection key the `[forSelectIndicator]` uses to resolve its parent option,\n * decoupled from the concrete `ForSelectOption` class. `ForSelectOption`\n * provides itself under this token, so a design system wrapping the option by\n * subclassing re-points it at the subclass with a single provider\n * (`{ provide: FOR_SELECT_OPTION, useExisting: MtxSelectOption }`) and the\n * indicator keeps resolving — see `docs/wrapping-form-primitives.md`.\n */\nexport const FOR_SELECT_OPTION = new InjectionToken<ForSelectOption>('FOR_SELECT_OPTION');\n\n/**\n * One option inside a `[forSelectContent]`. Apply on a `<button type=\"button\">`\n * so Space / Enter activation come from native button behavior — printable\n * keys fall through to the listbox for typeahead matching.\n *\n * Generic over the option value type `T` (default `string`). Inferred from\n * the `[value]` binding so consumers can pass either primitive ids or full\n * objects (`[value]=\"city\"` infers `T = City`); the parent `[forSelect]`\n * must be parameterized over the same `T`. The parent's\n * `[isItemEqualToValue]` decides how options are matched against the\n * committed selection.\n *\n * Click activates: in single mode the value replaces `[(value)]` and the\n * listbox closes; in multi mode the value toggles in/out and the listbox\n * stays open.\n *\n * Keyboard while focused:\n * - **Enter / Space** — activate (via native button click).\n * - **ArrowDown / ArrowUp / Home / End** — move focus inside the listbox.\n * - **Tab / Shift+Tab** — commit the focused option (single mode) and let\n * the browser advance focus to the next / previous focusable, mirroring\n * the WAI-ARIA select-only combobox pattern and native `<select>`.\n * - **Escape** — close the listbox.\n * - **Typeahead** — printable keys match by text content.\n */\n@Directive({\n selector: '[forSelectOption]',\n exportAs: 'forSelectOption',\n providers: [{ provide: FOR_SELECT_OPTION, useExisting: ForSelectOption }],\n host: {\n role: 'option',\n type: 'button',\n tabindex: '-1',\n '[id]': 'id()',\n '[attr.aria-selected]': 'selected() ? \"true\" : \"false\"',\n '[attr.aria-disabled]': 'effectiveDisabled() ? \"true\" : null',\n '[attr.data-state]': 'selected() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '[attr.aria-setsize]': 'ariaSetSize()',\n '[attr.aria-posinset]': 'ariaPosInSet()',\n '[attr.data-highlighted]': 'highlighted() ? \"\" : null',\n '(click)': 'onClick()',\n '(keydown)': 'onKeyDown($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(pointerdown)': 'onPointerDown($event)',\n },\n})\nexport class ForSelectOption<T = string> {\n readonly #ctx = injectSelectContext<T>('ForSelectOption');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Stable identifier serialized into `[(value)]` and the hidden input.\n * Defaults to `string` for back-compat; bind an object to specialize the\n * parent `[forSelect]` over a richer `T`. The parent's\n * `[isItemEqualToValue]` decides how options are matched against the\n * committed selection.\n */\n readonly value = input.required<T>();\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Zero-based absolute position of this option in the full source data.\n * Required in the virtualized path — drives `aria-posinset` and the parent's\n * position snapshot. Leave unset (default `null`) outside it.\n */\n readonly posInSet = input<number | null>(null);\n\n readonly id = hostId('for-select-option');\n\n readonly selected = computed(() => this.#ctx.isSelected(this.value()));\n readonly effectiveDisabled = computed(() => this.disabled() || this.#ctx.effectiveDisabled());\n\n protected readonly ariaSetSize = computed<string | null>(() => {\n const total = this.#ctx.totalCount();\n return total === undefined ? null : String(total);\n });\n protected readonly ariaPosInSet = computed<string | null>(() => {\n if (this.#ctx.totalCount() === undefined) {\n return null;\n }\n const pos = this.posInSet();\n return pos === null ? null : String(pos + 1);\n });\n\n readonly #focused = signal(false);\n /**\n * True when this option is the active candidate — DOM-focused in the\n * default path, or `aria-activedescendant` in the virtualized path.\n * Reflected as `data-highlighted`.\n */\n readonly highlighted = computed(() => {\n const activeId = this.#ctx.activeDescendantId();\n if (activeId !== null) {\n return activeId === this.id();\n }\n return this.#focused();\n });\n\n /**\n * Reactive effective label exposed on the handle — the trimmed `textContent`\n * of the host. Mirrors `ForComboboxOption`'s `#effectiveLabel` so the root\n * can fold a per-option `Signal<string>` into its persisted snapshot instead\n * of reading `textContent` from inside a `computed`. `textContent` is not a\n * signal, so this still does not self-heal on a text-only change with no\n * value change — supply `[forSelect][itemToLabel]` for a pure signal\n * derivation when the label can change without the value.\n */\n readonly #effectiveLabel = computed(() => (this.#host.nativeElement.textContent ?? '').trim());\n\n constructor() {\n const handle = {\n host: this.#host.nativeElement,\n value: this.value,\n label: this.#effectiveLabel,\n disabled: this.effectiveDisabled,\n id: this.id,\n posInSet: this.posInSet,\n };\n registerHandle(\n handle,\n (h) => this.#ctx.registerOption(h),\n (h) => this.#ctx.unregisterOption(h),\n );\n }\n\n protected onClick(): void {\n if (this.effectiveDisabled() || this.#ctx.readonly()) {\n return;\n }\n this.#ctx.activate(this.value());\n this.#ctx.notifyOptionClick(this.id());\n }\n\n protected onFocus(): void {\n this.#focused.set(true);\n }\n\n protected onBlur(): void {\n this.#focused.set(false);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.effectiveDisabled()) {\n return;\n }\n\n if (event.key === 'Tab') {\n // In modal mode the focus trap owns Tab (it cycles focus inside the\n // surface in the capture phase); committing + closing here would defeat\n // the trap. Bail and let the trap's `preventDefault` keep focus inside.\n if (this.#ctx.modal()) {\n return;\n }\n // APG (combobox-select-only): Tab commits the focused option and lets\n // the browser advance focus to the next / previous focusable. Do NOT\n // preventDefault — the browser's Tab default uses the focus we just\n // moved to the trigger as the starting point.\n this.#ctx.commitOnTab(this.value());\n return;\n }\n\n const action = resolveListNavigation(event, {\n orientation: this.#ctx.orientation(),\n dir: this.#ctx.dir(),\n pageKeys: true,\n });\n if (action) {\n event.preventDefault();\n this.#ctx.navigate(this.#host.nativeElement, action);\n return;\n }\n\n this.#ctx.handleTypeahead(event);\n }\n\n protected onPointerDown(event: PointerEvent): void {\n if (this.#ctx.totalCount() === undefined) {\n return;\n }\n event.preventDefault();\n }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { FOR_SELECT_OPTION, type ForSelectOption } from './select-option';\n\n/**\n * Visibility helper inside a `[forSelectOption]`. The directive flips a\n * `[hidden]` host binding so the consumer can keep the checkmark / icon\n * inline without extra `@if` glue:\n *\n * ```html\n * <button forSelectOption value=\"apple\">\n * <span forSelectIndicator>✓</span>\n * Apple\n * </button>\n * ```\n *\n * Reflects the parent option's `data-state` (`\"checked\" | \"unchecked\"`) so\n * the consumer can also style it from CSS. Visibility while unselected is\n * enforced with an inline `display: none` (which beats any author `display`\n * rule a consumer applies via a class) in addition to the `hidden` attribute\n * that removes it from the a11y tree.\n */\n@Directive({\n selector: '[forSelectIndicator]',\n exportAs: 'forSelectIndicator',\n host: {\n 'aria-hidden': 'true',\n '[attr.data-state]': 'option.selected() ? \"checked\" : \"unchecked\"',\n '[hidden]': '!option.selected()',\n '[style.display]': 'option.selected() ? null : \"none\"',\n },\n})\nexport class ForSelectIndicator {\n protected readonly option = injectParentOption();\n}\n\nfunction injectParentOption(): ForSelectOption {\n const option = inject(FOR_SELECT_OPTION, { optional: true });\n if (!option) {\n throw new Error(\n '[forty-cdk/select] ForSelectIndicator must be used inside a [forSelectOption] element.',\n );\n }\n return option;\n}\n","import { Directive, signal } from '@angular/core';\n\n/**\n * Optional grouping wrapper inside a `[forSelectContent]`. Renders\n * `role=\"group\"` and references the descendant `[forSelectGroupLabel]`\n * (if any) via `aria-labelledby`. Options inside a group still register\n * with the root listbox normally, so keyboard navigation traverses across\n * groups in DOM order without special handling.\n */\n@Directive({\n selector: '[forSelectGroup]',\n exportAs: 'forSelectGroup',\n host: {\n role: 'group',\n '[attr.aria-labelledby]': 'labelId() || null',\n },\n})\nexport class ForSelectGroup {\n readonly #labelId = signal<string | null>(null);\n\n /** The id of the registered group label (or `null` if none). */\n readonly labelId = this.#labelId.asReadonly();\n\n /** Called by `ForSelectGroupLabel` on mount. */\n registerLabel(id: string): void {\n this.#labelId.set(id);\n }\n\n /** Called by `ForSelectGroupLabel` on destroy. Idempotent. */\n unregisterLabel(id: string): void {\n if (this.#labelId() === id) {\n this.#labelId.set(null);\n }\n }\n}\n","import { Directive, inject, type Signal } from '@angular/core';\n\nimport { registerA11yName } from 'forty-cdk/core';\nimport { ForSelectGroup } from './select-group';\n\n/**\n * Visible label for a `[forSelectGroup]`. Generates a stable id and\n * registers with its parent group so the group's `aria-labelledby` points\n * at this element. Apply on whatever heading element fits the design\n * (often `<div>` styled as a small caption).\n */\n@Directive({\n selector: '[forSelectGroupLabel]',\n exportAs: 'forSelectGroupLabel',\n host: {\n '[id]': 'id()',\n },\n})\nexport class ForSelectGroupLabel {\n /** Stable host id used by the parent group's `aria-labelledby`. */\n readonly id: Signal<string>;\n\n constructor() {\n const group = inject(ForSelectGroup, { optional: true });\n if (!group) {\n throw new Error(\n '[forty-cdk/select] ForSelectGroupLabel must be used inside a [forSelectGroup] element.',\n );\n }\n this.id = registerA11yName(group, 'for-select-group-label');\n }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Decorative separator between options or groups inside a\n * `[forSelectContent]`. Carries `role=\"separator\"` and is intentionally not\n * registered with the listbox's option collection, so keyboard navigation\n * and typeahead skip it automatically.\n */\n@Directive({\n selector: '[forSelectSeparator]',\n exportAs: 'forSelectSeparator',\n host: {\n role: 'separator',\n 'aria-orientation': 'horizontal',\n },\n})\nexport class ForSelectSeparator {}\n","/**\n * Exact public names of every `ForSelect` input, its models included. Spread it into the\n * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the\n * primitive's full surface — the Signal Forms members `[formField]` binds among them —\n * without hand-maintaining the list. Always spread into an inline object literal as shown\n * below: the literal is what keeps the entry statically analyzable for consumers compiling\n * against the published package. An anti-drift spec fails when this list no longer matches\n * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported\n * wrapping patterns.\n *\n * @example\n * ```ts\n * @Component({\n * selector: 'div[mySelect]',\n * template: '',\n * hostDirectives: [\n * {\n * directive: ForSelect,\n * inputs: [...FOR_SELECT_HOST_DIRECTIVE_INPUTS],\n * outputs: [...FOR_SELECT_HOST_DIRECTIVE_OUTPUTS],\n * },\n * ],\n * })\n * export class MySelect {}\n * ```\n */\nexport const FOR_SELECT_HOST_DIRECTIVE_INPUTS = [\n 'value',\n 'open',\n 'align',\n 'alignOffset',\n 'ariaLabel',\n 'arrowPadding',\n 'avoidCollisions',\n 'clipUntilPositioned',\n 'collisionPadding',\n 'dir',\n 'dirty',\n 'disabled',\n 'dismissible',\n 'errors',\n 'hideWhenDetached',\n 'invalid',\n 'isItemEqualToValue',\n 'itemToFormValue',\n 'itemToLabel',\n 'loop',\n 'modal',\n 'multiple',\n 'name',\n 'orientation',\n 'pending',\n 'placeholder',\n 'position',\n 'readonly',\n 'required',\n 'returnFocus',\n 'selectionFollowsFocus',\n 'side',\n 'sideOffset',\n 'sticky',\n 'totalCount',\n 'touched',\n 'visibleRange',\n] as const;\n\n/**\n * Exact public names of every `ForSelect` output, the Signal Forms `touch` output\n * included. Spread it into the `outputs` array of the same `hostDirectives` entry as\n * {@link FOR_SELECT_HOST_DIRECTIVE_INPUTS}.\n */\nexport const FOR_SELECT_HOST_DIRECTIVE_OUTPUTS = [\n 'valueChange',\n 'openChange',\n 'escapeKeyDown',\n 'pointerDownOutside',\n 'focusOutside',\n 'interactOutside',\n 'autoFocusOnOpen',\n 'autoFocusOnClose',\n 'scrollToIndex',\n 'touchedChange',\n 'touch',\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAwRa,kBAAkB,GAAG,IAAI,cAAc,CAAmB,oBAAoB;AAErF,SAAU,mBAAmB,CAAc,KAAa,EAAA;AAC5D,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1D,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,MAAM,IAAI,KAAK,CACb,CAAA,mBAAA,EAAsB,KAAK,CAAA,4CAAA,CAA8C;YACvE,4FAA4F;YAC5F,2FAA2F;AAC3F,YAAA,mBAAmB,CACtB;IACH;AACA,IAAA,OAAO,GAAqC;AAC9C;AAEA;;;;;AAKG;AACG,SAAU,0BAA0B,CACxC,YAA8C,EAAA;AAE9C,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,kBAAkB,EAA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Y;IACZ,SAAS;IACT,cAAc;;AAGhB;;;;AAIG;AACI,MAAM,iCAAiC,GAAG;IAC/C,aAAa;IACb,YAAY;IACZ,eAAe;IACf,oBAAoB;IACpB,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,eAAe;IACf,OAAO;;;AClFT;;AAEG;;;;"}
@@ -0,0 +1,82 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, Directive } from '@angular/core';
3
+ import { createDefaults } from 'forty-cdk/core';
4
+
5
+ /**
6
+ * Headless static separator implementing the
7
+ * [WAI-ARIA Separator pattern](https://www.w3.org/WAI/ARIA/apg/patterns/separator/):
8
+ * a non-focusable, semantic-only line that divides groups of content visually
9
+ * and semantically. Set `decorative` so screen readers skip the line when the
10
+ * surrounding layout already conveys the split.
11
+ *
12
+ * The focusable divider that resizes two panes is a separate primitive —
13
+ * `[forPaneResizer]` — so a plain visual divider never pulls the drag /
14
+ * keyboard-resize code in.
15
+ *
16
+ * @example
17
+ * ```html
18
+ * <hr forSeparator />
19
+ * <div forSeparator orientation="vertical"></div>
20
+ * <span forSeparator decorative></span>
21
+ * ```
22
+ */
23
+ class ForSeparator {
24
+ /**
25
+ * Axis the separator divides along. `horizontal` splits content stacked
26
+ * vertically; `vertical` splits content arranged horizontally. Defaults to
27
+ * `horizontal`, matching the `<hr>` element.
28
+ */
29
+ orientation = input('horizontal', /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
31
+ /**
32
+ * When true, the separator is purely visual: it gets `role="none"` and no
33
+ * ARIA, so assistive tech treats surrounding content as a single flow. Use
34
+ * when the line is redundant with adjacent semantics.
35
+ */
36
+ decorative = input(false, { ...(ngDevMode ? { debugName: "decorative" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
37
+ roleAttr() {
38
+ return this.decorative() ? 'none' : 'separator';
39
+ }
40
+ ariaOrientationAttr() {
41
+ if (this.decorative()) {
42
+ return null;
43
+ }
44
+ // Omit the attribute for `horizontal` (the ARIA default) to keep the
45
+ // semantic separator minimal.
46
+ return this.orientation() === 'vertical' ? 'vertical' : null;
47
+ }
48
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
49
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForSeparator, isStandalone: true, selector: "[forSeparator]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "roleAttr()", "attr.aria-orientation": "ariaOrientationAttr()", "attr.data-orientation": "orientation()" } }, exportAs: ["forSeparator"], ngImport: i0 });
50
+ }
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForSeparator, decorators: [{
52
+ type: Directive,
53
+ args: [{
54
+ selector: '[forSeparator]',
55
+ exportAs: 'forSeparator',
56
+ host: {
57
+ '[attr.role]': 'roleAttr()',
58
+ '[attr.aria-orientation]': 'ariaOrientationAttr()',
59
+ '[attr.data-orientation]': 'orientation()',
60
+ },
61
+ }]
62
+ }], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }] } });
63
+
64
+ const FALLBACK = {};
65
+ const { token, provideDefaults } = createDefaults('FOR_SEPARATOR_DEFAULTS', FALLBACK);
66
+ /** Token holding the resolved separator defaults for the current scope. */
67
+ const FOR_SEPARATOR_DEFAULTS = token;
68
+ /**
69
+ * Configures forty-cdk separator defaults for this injector scope. Partial
70
+ * overrides inherit unspecified keys from the parent scope (or library
71
+ * defaults at the root).
72
+ */
73
+ function provideForSeparatorDefaults(defaults = {}) {
74
+ return provideDefaults(defaults);
75
+ }
76
+
77
+ /**
78
+ * Generated bundle index. Do not edit.
79
+ */
80
+
81
+ export { FOR_SEPARATOR_DEFAULTS, ForSeparator, provideForSeparatorDefaults };
82
+ //# sourceMappingURL=forty-cdk-separator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forty-cdk-separator.mjs","sources":["../../../projects/forty-cdk/separator/src/separator.ts","../../../projects/forty-cdk/separator/src/separator-defaults.ts","../../../projects/forty-cdk/separator/src/forty-cdk-separator.ts"],"sourcesContent":["import { booleanAttribute, Directive, input } from '@angular/core';\n\n/**\n * Headless static separator implementing the\n * [WAI-ARIA Separator pattern](https://www.w3.org/WAI/ARIA/apg/patterns/separator/):\n * a non-focusable, semantic-only line that divides groups of content visually\n * and semantically. Set `decorative` so screen readers skip the line when the\n * surrounding layout already conveys the split.\n *\n * The focusable divider that resizes two panes is a separate primitive —\n * `[forPaneResizer]` — so a plain visual divider never pulls the drag /\n * keyboard-resize code in.\n *\n * @example\n * ```html\n * <hr forSeparator />\n * <div forSeparator orientation=\"vertical\"></div>\n * <span forSeparator decorative></span>\n * ```\n */\n@Directive({\n selector: '[forSeparator]',\n exportAs: 'forSeparator',\n host: {\n '[attr.role]': 'roleAttr()',\n '[attr.aria-orientation]': 'ariaOrientationAttr()',\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class ForSeparator {\n /**\n * Axis the separator divides along. `horizontal` splits content stacked\n * vertically; `vertical` splits content arranged horizontally. Defaults to\n * `horizontal`, matching the `<hr>` element.\n */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /**\n * When true, the separator is purely visual: it gets `role=\"none\"` and no\n * ARIA, so assistive tech treats surrounding content as a single flow. Use\n * when the line is redundant with adjacent semantics.\n */\n readonly decorative = input(false, { transform: booleanAttribute });\n\n protected roleAttr(): 'separator' | 'none' {\n return this.decorative() ? 'none' : 'separator';\n }\n\n protected ariaOrientationAttr(): 'horizontal' | 'vertical' | null {\n if (this.decorative()) {\n return null;\n }\n // Omit the attribute for `horizontal` (the ARIA default) to keep the\n // semantic separator minimal.\n return this.orientation() === 'vertical' ? 'vertical' : null;\n }\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant separators in the surrounding injector\n * scope. Configure with `provideForSeparatorDefaults`. The shape is a stub\n * today — present so future per-scope tuning can land without churning the\n * public surface.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface ForSeparatorDefaults {}\n\nconst FALLBACK: ForSeparatorDefaults = {};\n\nconst { token, provideDefaults } = createDefaults<ForSeparatorDefaults>(\n 'FOR_SEPARATOR_DEFAULTS',\n FALLBACK,\n);\n\n/** Token holding the resolved separator defaults for the current scope. */\nexport const FOR_SEPARATOR_DEFAULTS = token;\n\n/**\n * Configures forty-cdk separator defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForSeparatorDefaults(\n defaults: Partial<ForSeparatorDefaults> = {},\n): Provider[] {\n return provideDefaults(defaults);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;;;;;;;;;AAiBG;MAUU,YAAY,CAAA;AACvB;;;;AAIG;IACM,WAAW,GAAG,KAAK,CAA4B,YAAY;oFAAC;AAErE;;;;AAIG;IACM,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAEzD,QAAQ,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,UAAU,EAAE,GAAG,MAAM,GAAG,WAAW;IACjD;IAEU,mBAAmB,GAAA;AAC3B,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;AACrB,YAAA,OAAO,IAAI;QACb;;;AAGA,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE,KAAK,UAAU,GAAG,UAAU,GAAG,IAAI;IAC9D;uGA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AQ,CAAC;AAClC;;AChCA;;AAEG;;;;"}
@@ -0,0 +1,97 @@
1
+ import { computed } from '@angular/core';
2
+
3
+ /**
4
+ * Bridges a single-valued `FieldTree<T | null>` to the array-backed selection
5
+ * primitives (`ForSelect`, `ForListbox`, `ForCombobox`), which implement
6
+ * `FormValueControl<readonly T[]>` per the library's selection value-type
7
+ * contract. It returns a `FieldTree<readonly T[]>` view that the standard
8
+ * `[formField]` directive binds unchanged — no hand-rolled `T | null` ⇄
9
+ * `readonly T[]` mapping, and no re-plumbing of `disabled` / `invalid` /
10
+ * `errors` / `touched` / `required` between the field and the control.
11
+ *
12
+ * The returned tree is a thin, derived view over the original field:
13
+ * - **Value** maps both directions. The field's `T | null` reads as a
14
+ * `readonly T[]` of length 0 (when `null`) or 1; a write of `[]` clears the
15
+ * field to `null`, and a write of `[v]` sets it to `v`. In single mode the
16
+ * array never exceeds one element; should a longer array arrive, the last
17
+ * entry wins (the most recently selected value).
18
+ * - **Everything else** (`disabled`, `readonly`, `required`, `invalid`,
19
+ * `errors`, `touched`, `dirty`, `pending`, `name`, validation, touch
20
+ * tracking, focus) delegates to the original field state, so `[formField]`
21
+ * pushes the same UI state into the control it would for any other field.
22
+ *
23
+ * Single source of truth: the value view is `computed` from the original
24
+ * field, never mirrored into a separate signal — there is no second copy of
25
+ * the value to drift.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * import { Component, signal } from '@angular/core';
30
+ * import { form } from '@angular/forms/signals';
31
+ * import { ForSelect, ForSelectTrigger } from 'forty-cdk/select';
32
+ * import { forSingleValueField } from 'forty-cdk/signal-forms';
33
+ *
34
+ * @Component({
35
+ * imports: [ForSelect, ForSelectTrigger, FormField],
36
+ * template: `
37
+ * <div forSelect [formField]="country">
38
+ * <button forSelectTrigger>…</button>
39
+ * …
40
+ * </div>
41
+ * `,
42
+ * })
43
+ * export class CountryPicker {
44
+ * private readonly model = signal({ country: null as string | null });
45
+ * private readonly profile = form(this.model);
46
+ *
47
+ * // Bind the single-valued field to the array-backed control.
48
+ * protected readonly country = forSingleValueField(this.profile.country);
49
+ * }
50
+ * ```
51
+ *
52
+ * @param field The single-valued field tree to adapt, modeled as `T | null`.
53
+ * @returns A `FieldTree<readonly T[]>` view that binds to the selection
54
+ * primitives through `[formField]`.
55
+ */
56
+ function forSingleValueField(field) {
57
+ const empty = [];
58
+ const arrayView = (source) => {
59
+ const read = computed(() => {
60
+ const value = source()();
61
+ return value == null ? empty : [value];
62
+ }, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "read" }] : /* istanbul ignore next */ []));
64
+ const view = read;
65
+ view.set = (next) => {
66
+ source().set(next.length > 0 ? next[next.length - 1] : null);
67
+ };
68
+ view.update = (updater) => view.set(updater(read()));
69
+ view.asReadonly = () => read;
70
+ return view;
71
+ };
72
+ const controlValue = arrayView(() => field().controlValue);
73
+ const value = arrayView(() => field().value);
74
+ const state = new Proxy({}, {
75
+ get(_target, property) {
76
+ if (property === 'controlValue') {
77
+ return controlValue;
78
+ }
79
+ if (property === 'value') {
80
+ return value;
81
+ }
82
+ const real = field();
83
+ const member = real[property];
84
+ return typeof member === 'function'
85
+ ? member.bind(real)
86
+ : member;
87
+ },
88
+ });
89
+ return (() => state);
90
+ }
91
+
92
+ /**
93
+ * Generated bundle index. Do not edit.
94
+ */
95
+
96
+ export { forSingleValueField };
97
+ //# sourceMappingURL=forty-cdk-signal-forms.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forty-cdk-signal-forms.mjs","sources":["../../../projects/forty-cdk/signal-forms/src/single-value-field.ts","../../../projects/forty-cdk/signal-forms/src/forty-cdk-signal-forms.ts"],"sourcesContent":["import { computed, type WritableSignal } from '@angular/core';\nimport type { FieldState, FieldTree } from '@angular/forms/signals';\n\n/**\n * Bridges a single-valued `FieldTree<T | null>` to the array-backed selection\n * primitives (`ForSelect`, `ForListbox`, `ForCombobox`), which implement\n * `FormValueControl<readonly T[]>` per the library's selection value-type\n * contract. It returns a `FieldTree<readonly T[]>` view that the standard\n * `[formField]` directive binds unchanged — no hand-rolled `T | null` ⇄\n * `readonly T[]` mapping, and no re-plumbing of `disabled` / `invalid` /\n * `errors` / `touched` / `required` between the field and the control.\n *\n * The returned tree is a thin, derived view over the original field:\n * - **Value** maps both directions. The field's `T | null` reads as a\n * `readonly T[]` of length 0 (when `null`) or 1; a write of `[]` clears the\n * field to `null`, and a write of `[v]` sets it to `v`. In single mode the\n * array never exceeds one element; should a longer array arrive, the last\n * entry wins (the most recently selected value).\n * - **Everything else** (`disabled`, `readonly`, `required`, `invalid`,\n * `errors`, `touched`, `dirty`, `pending`, `name`, validation, touch\n * tracking, focus) delegates to the original field state, so `[formField]`\n * pushes the same UI state into the control it would for any other field.\n *\n * Single source of truth: the value view is `computed` from the original\n * field, never mirrored into a separate signal — there is no second copy of\n * the value to drift.\n *\n * @example\n * ```ts\n * import { Component, signal } from '@angular/core';\n * import { form } from '@angular/forms/signals';\n * import { ForSelect, ForSelectTrigger } from 'forty-cdk/select';\n * import { forSingleValueField } from 'forty-cdk/signal-forms';\n *\n * @Component({\n * imports: [ForSelect, ForSelectTrigger, FormField],\n * template: `\n * <div forSelect [formField]=\"country\">\n * <button forSelectTrigger>…</button>\n * …\n * </div>\n * `,\n * })\n * export class CountryPicker {\n * private readonly model = signal({ country: null as string | null });\n * private readonly profile = form(this.model);\n *\n * // Bind the single-valued field to the array-backed control.\n * protected readonly country = forSingleValueField(this.profile.country);\n * }\n * ```\n *\n * @param field The single-valued field tree to adapt, modeled as `T | null`.\n * @returns A `FieldTree<readonly T[]>` view that binds to the selection\n * primitives through `[formField]`.\n */\nexport function forSingleValueField<T>(field: FieldTree<T | null>): FieldTree<readonly T[]> {\n const empty: readonly T[] = [];\n\n const arrayView = (source: () => WritableSignal<T | null>): WritableSignal<readonly T[]> => {\n const read = computed<readonly T[]>(() => {\n const value = source()();\n return value == null ? empty : [value];\n });\n const view = read as unknown as WritableSignal<readonly T[]>;\n view.set = (next: readonly T[]): void => {\n source().set(next.length > 0 ? next[next.length - 1]! : null);\n };\n view.update = (updater: (prev: readonly T[]) => readonly T[]): void =>\n view.set(updater(read()));\n view.asReadonly = () => read;\n return view;\n };\n\n const controlValue = arrayView(() => field().controlValue);\n const value = arrayView(() => field().value);\n\n const state = new Proxy({} as FieldState<readonly T[]>, {\n get(_target, property) {\n if (property === 'controlValue') {\n return controlValue;\n }\n if (property === 'value') {\n return value;\n }\n const real = field() as unknown as Record<string | symbol, unknown>;\n const member = real[property];\n return typeof member === 'function'\n ? (member as (...args: unknown[]) => unknown).bind(real)\n : member;\n },\n });\n\n return (() => state) as unknown as FieldTree<readonly T[]>;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDG;AACG,SAAU,mBAAmB,CAAI,KAA0B,EAAA;IAC/D,MAAM,KAAK,GAAiB,EAAE;AAE9B,IAAA,MAAM,SAAS,GAAG,CAAC,MAAsC,KAAkC;AACzF,QAAA,MAAM,IAAI,GAAG,QAAQ,CAAe,MAAK;AACvC,YAAA,MAAM,KAAK,GAAG,MAAM,EAAE,EAAE;AACxB,YAAA,OAAO,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC;QACxC,CAAC;iFAAC;QACF,MAAM,IAAI,GAAG,IAA+C;AAC5D,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC,IAAkB,KAAU;YACtC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAE,GAAG,IAAI,CAAC;AAC/D,QAAA,CAAC;AACD,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,OAA6C,KAC1D,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAC3B,QAAA,IAAI,CAAC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