@koobiq/components 20.1.0 → 20.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 (249) hide show
  1. package/accordion/_accordion-theme.scss +6 -2
  2. package/accordion/accordion-tokens.scss +3 -0
  3. package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +10 -0
  4. package/accordion/accordion.scss +71 -0
  5. package/accordion/index.d.ts +264 -121
  6. package/actions-panel/index.d.ts +25 -13
  7. package/alert/_alert-theme.scss +14 -0
  8. package/alert/alert.component.scss +24 -13
  9. package/alert/index.d.ts +63 -29
  10. package/app-switcher/app-switcher-dropdown-app.scss +7 -5
  11. package/app-switcher/app-switcher-dropdown-site.scss +6 -4
  12. package/app-switcher/index.d.ts +41 -4
  13. package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
  14. package/autocomplete/autocomplete.scss +2 -1
  15. package/autocomplete/index.d.ts +58 -37
  16. package/badge/index.d.ts +2 -3
  17. package/breadcrumbs/index.d.ts +1 -1
  18. package/button/index.d.ts +2 -2
  19. package/button-toggle/button-toggle-tokens.scss +2 -0
  20. package/button-toggle/button-toggle.scss +9 -0
  21. package/button-toggle/index.d.ts +5 -0
  22. package/checkbox/index.d.ts +33 -29
  23. package/clamped-text/index.d.ts +3 -2
  24. package/code-block/index.d.ts +24 -19
  25. package/content-panel/index.d.ts +1 -1
  26. package/core/index.d.ts +1217 -186
  27. package/core/option/_action-container-mixins.scss +28 -0
  28. package/core/option/_option-theme.scss +24 -0
  29. package/core/option/action.scss +7 -0
  30. package/core/styles/_core.scss +2 -0
  31. package/core/styles/_koobiq-theme.scss +2 -0
  32. package/core/styles/_tokens.scss +1 -0
  33. package/core/styles/common/_animation.scss +31 -24
  34. package/core/styles/common/_connected-overlay.scss +39 -0
  35. package/core/styles/common/_select.scss +19 -2
  36. package/core/styles/common/_tokens.scss +0 -9
  37. package/core/styles/theming/_index.scss +0 -1
  38. package/core/styles/theming/_theming.scss +34 -5
  39. package/datepicker/index.d.ts +46 -15
  40. package/dl/dl.scss +26 -0
  41. package/dl/index.d.ts +8 -1
  42. package/dropdown/_dropdown-theme.scss +28 -2
  43. package/dropdown/dropdown-item.scss +29 -0
  44. package/dropdown/dropdown-tokens.scss +2 -1
  45. package/dropdown/dropdown.scss +16 -1
  46. package/dropdown/index.d.ts +331 -17
  47. package/dynamic-translation/index.d.ts +1 -1
  48. package/fesm2022/koobiq-components-accordion.mjs +480 -317
  49. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  50. package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
  51. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  52. package/fesm2022/koobiq-components-alert.mjs +98 -58
  53. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  54. package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
  55. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  56. package/fesm2022/koobiq-components-autocomplete.mjs +89 -52
  57. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  58. package/fesm2022/koobiq-components-badge.mjs +18 -17
  59. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  60. package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
  61. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  62. package/fesm2022/koobiq-components-button-toggle.mjs +17 -12
  63. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  64. package/fesm2022/koobiq-components-button.mjs +25 -25
  65. package/fesm2022/koobiq-components-checkbox.mjs +69 -92
  66. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  67. package/fesm2022/koobiq-components-clamped-text.mjs +18 -13
  68. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  69. package/fesm2022/koobiq-components-code-block.mjs +56 -69
  70. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  71. package/fesm2022/koobiq-components-content-panel.mjs +29 -29
  72. package/fesm2022/koobiq-components-core.mjs +2485 -735
  73. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-datepicker.mjs +168 -126
  75. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-divider.mjs +7 -7
  77. package/fesm2022/koobiq-components-dl.mjs +23 -15
  78. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  79. package/fesm2022/koobiq-components-dropdown.mjs +814 -136
  80. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  81. package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
  82. package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
  83. package/fesm2022/koobiq-components-empty-state.mjs +19 -19
  84. package/fesm2022/koobiq-components-file-upload.mjs +74 -42
  85. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-filter-bar.mjs +783 -199
  87. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-flag.mjs +7 -7
  89. package/fesm2022/koobiq-components-form-field.mjs +350 -162
  90. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-icon.mjs +52 -25
  92. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  93. package/fesm2022/koobiq-components-inline-edit.mjs +175 -28
  94. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  95. package/fesm2022/koobiq-components-input.mjs +41 -24
  96. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  97. package/fesm2022/koobiq-components-link.mjs +8 -8
  98. package/fesm2022/koobiq-components-list.mjs +657 -143
  99. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
  101. package/fesm2022/koobiq-components-markdown.mjs +14 -11
  102. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  103. package/fesm2022/koobiq-components-modal.mjs +59 -35
  104. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  105. package/fesm2022/koobiq-components-navbar.mjs +177 -67
  106. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-notification-center.mjs +40 -24
  108. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  109. package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
  110. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  111. package/fesm2022/koobiq-components-popover.mjs +31 -21
  112. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  113. package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
  114. package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
  115. package/fesm2022/koobiq-components-radio.mjs +10 -10
  116. package/fesm2022/koobiq-components-resizer.mjs +33 -14
  117. package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
  118. package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
  119. package/fesm2022/koobiq-components-search-expandable.mjs +49 -14
  120. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-select.mjs +450 -146
  122. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-sidebar.mjs +14 -14
  124. package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
  125. package/fesm2022/koobiq-components-skeleton.mjs +10 -10
  126. package/fesm2022/koobiq-components-split-button.mjs +10 -17
  127. package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
  128. package/fesm2022/koobiq-components-splitter.mjs +17 -17
  129. package/fesm2022/koobiq-components-table.mjs +15 -13
  130. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-tabs.mjs +80 -68
  132. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  133. package/fesm2022/koobiq-components-tags.mjs +283 -122
  134. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  135. package/fesm2022/koobiq-components-textarea.mjs +13 -8
  136. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  137. package/fesm2022/koobiq-components-time-range.mjs +29 -24
  138. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  139. package/fesm2022/koobiq-components-timepicker.mjs +61 -30
  140. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  141. package/fesm2022/koobiq-components-timezone.mjs +77 -42
  142. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  143. package/fesm2022/koobiq-components-title.mjs +7 -7
  144. package/fesm2022/koobiq-components-toast.mjs +51 -26
  145. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  146. package/fesm2022/koobiq-components-toggle.mjs +72 -64
  147. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  148. package/fesm2022/koobiq-components-tooltip.mjs +219 -28
  149. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  150. package/fesm2022/koobiq-components-top-bar.mjs +13 -13
  151. package/fesm2022/koobiq-components-tree-select.mjs +222 -80
  152. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  153. package/fesm2022/koobiq-components-tree.mjs +302 -81
  154. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  155. package/fesm2022/koobiq-components-username.mjs +27 -27
  156. package/file-upload/index.d.ts +25 -6
  157. package/file-upload/multiple-file-upload.component.scss +14 -0
  158. package/filter-bar/_filter-bar-theme.scss +0 -10
  159. package/filter-bar/filter-bar-tokens.scss +3 -0
  160. package/filter-bar/filters.scss +3 -2
  161. package/filter-bar/index.d.ts +281 -9
  162. package/filter-bar/pipes/base-pipe.scss +0 -11
  163. package/filter-bar/pipes/pipe-input.scss +10 -0
  164. package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
  165. package/filter-bar/pipes/pipe-multiselect.scss +0 -6
  166. package/filter-bar/pipes/pipe-tree-select.scss +0 -6
  167. package/form-field/_form-field-theme.scss +76 -20
  168. package/form-field/fieldset.scss +10 -0
  169. package/form-field/form-field-tokens.scss +15 -1
  170. package/form-field/form-field.scss +15 -19
  171. package/form-field/index.d.ts +147 -65
  172. package/icon/icon-button.scss +3 -1
  173. package/icon/index.d.ts +45 -7
  174. package/inline-edit/index.d.ts +57 -4
  175. package/inline-edit/inline-edit.scss +10 -0
  176. package/input/index.d.ts +17 -2
  177. package/list/_list-theme.scss +42 -10
  178. package/list/index.d.ts +326 -79
  179. package/list/list-tokens.scss +43 -8
  180. package/list/list.scss +186 -12
  181. package/markdown/index.d.ts +1 -1
  182. package/modal/index.d.ts +21 -4
  183. package/modal/modal-tokens.scss +1 -1
  184. package/navbar/_navbar-item_vertical.scss +7 -5
  185. package/navbar/index.d.ts +54 -5
  186. package/navbar/navbar-brand.scss +23 -7
  187. package/navbar/vertical-navbar.scss +6 -0
  188. package/notification-center/index.d.ts +2 -1
  189. package/notification-center/notification-item.scss +6 -0
  190. package/package.json +3 -6
  191. package/popover/index.d.ts +2 -2
  192. package/prebuilt-themes/dark-theme.css +1 -1
  193. package/prebuilt-themes/light-theme.css +1 -1
  194. package/prebuilt-themes/theme.css +1 -1
  195. package/resizer/index.d.ts +12 -0
  196. package/schematics/collection.json +10 -0
  197. package/schematics/migrations/alert-signals/README.md +64 -0
  198. package/schematics/migrations/alert-signals/data.js +70 -0
  199. package/schematics/migrations/alert-signals/index.js +350 -0
  200. package/schematics/migrations/alert-signals/schema.json +20 -0
  201. package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
  202. package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
  203. package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -0
  204. package/schematics/migrations/deprecated-icons/README.md +29 -4
  205. package/schematics/migrations/deprecated-icons/data.js +7 -0
  206. package/schematics/migrations/deprecated-icons/index.js +62 -35
  207. package/schematics/migrations/filter-bar-signals/README.md +1 -1
  208. package/schematics/migrations/new-icons-pack/README.md +37 -2
  209. package/schematics/migrations/new-icons-pack/data.js +8 -0
  210. package/schematics/migrations/new-icons-pack/index.js +144 -53
  211. package/schematics/migrations.json +11 -1
  212. package/schematics/ng-add/index.js +3 -3
  213. package/schematics/utils/angular-parsing.js +41 -14
  214. package/schematics/utils/ast.js +31 -0
  215. package/schematics/utils/icon-migration.js +530 -0
  216. package/schematics/utils/typescript.js +44 -0
  217. package/scrollbar/index.d.ts +1 -1
  218. package/search-expandable/index.d.ts +3 -0
  219. package/select/index.d.ts +212 -40
  220. package/select/select-tokens.scss +0 -1
  221. package/select/select.scss +0 -2
  222. package/splitter/index.d.ts +1 -1
  223. package/table/_table-theme.scss +4 -0
  224. package/table/index.d.ts +2 -1
  225. package/table/table.scss +8 -0
  226. package/tabs/_tabs-common.scss +60 -31
  227. package/tabs/_tabs-theme.scss +12 -0
  228. package/tabs/index.d.ts +2 -2
  229. package/tabs/tab-header.scss +14 -0
  230. package/tabs/tab-nav-bar.scss +4 -0
  231. package/tabs/tabs-tokens.scss +1 -0
  232. package/tags/index.d.ts +128 -29
  233. package/textarea/index.d.ts +5 -0
  234. package/time-range/index.d.ts +1 -1
  235. package/timepicker/index.d.ts +4 -0
  236. package/timezone/index.d.ts +10 -8
  237. package/toast/index.d.ts +26 -3
  238. package/toggle/index.d.ts +34 -14
  239. package/tooltip/index.d.ts +119 -7
  240. package/tree/_tree-theme.scss +25 -5
  241. package/tree/index.d.ts +71 -3
  242. package/tree/tree-option.scss +2 -8
  243. package/tree-select/_tree-select-theme.scss +22 -0
  244. package/tree-select/index.d.ts +127 -36
  245. package/accordion/accordion.component.scss +0 -50
  246. package/core/styles/_tokens.kbq.import.scss +0 -4
  247. package/core/styles/theming/_components-theming.scss +0 -1927
  248. package/filter-bar/pipes/pipe-select.scss +0 -5
  249. package/overflow-items/overflow-items.scss +0 -20
@@ -1 +1 @@
1
- {"version":3,"file":"koobiq-components-dropdown.mjs","sources":["../../../packages/components/dropdown/dropdown-animations.ts","../../../packages/components/dropdown/dropdown-content.directive.ts","../../../packages/components/dropdown/dropdown-errors.ts","../../../packages/components/dropdown/dropdown.types.ts","../../../packages/components/dropdown/dropdown-item.component.ts","../../../packages/components/dropdown/dropdown-item.html","../../../packages/components/dropdown/dropdown.component.ts","../../../packages/components/dropdown/dropdown.html","../../../packages/components/dropdown/dropdown-trigger.directive.ts","../../../packages/components/dropdown/dropdown.module.ts","../../../packages/components/dropdown/koobiq-components-dropdown.ts"],"sourcesContent":["import {\n animate,\n AnimationTriggerMetadata,\n group,\n query,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\n/**\n * Animations used by the kbq-dropdown component.\n * @docs-private\n */\nexport const kbqDropdownAnimations: {\n readonly transformDropdown: AnimationTriggerMetadata;\n readonly fadeInItems: AnimationTriggerMetadata;\n} = {\n /**\n * This animation controls the dropdown panel's entry and exit from the page.\n *\n * When the dropdown panel is added to the DOM, it scales in and fades in its border.\n *\n * When the dropdown panel is removed from the DOM, it simply fades out after a brief\n * delay to display the ripple.\n */\n transformDropdown: trigger('transformDropdown', [\n state(\n 'void',\n style({\n opacity: 0,\n transform: 'scale(0.8)'\n })\n ),\n transition(\n 'void => enter',\n group([\n query('.kbq-dropdown__content', animate('0ms linear', style({ opacity: 1 }))),\n animate('0ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' }))\n ])\n ),\n transition('* => void', animate('50ms 25ms linear', style({ opacity: 0 })))\n ]),\n\n /**\n * This animation fades in the background color and content of the dropdown panel\n * after its containing element is scaled in.\n */\n fadeInItems: trigger('fadeInItems', [\n // now. Remove next time we do breaking changes.\n state('showing', style({ opacity: 1 })),\n transition('void => *', [\n style({ opacity: 0 }),\n animate('0ms 0ms cubic-bezier(0.55, 0, 0.55, 0.2)')\n ])\n ])\n};\n\nexport const fadeInItems = kbqDropdownAnimations.fadeInItems;\n\nexport const transformDropdown = kbqDropdownAnimations.transformDropdown;\n","import { DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport { ApplicationRef, Directive, inject, Injector, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n/**\n * Dropdown content that will be rendered lazily once the dropdown is opened.\n */\n@Directive({\n selector: 'ng-template[kbqDropdownContent]'\n})\nexport class KbqDropdownContent implements OnDestroy {\n private template = inject<TemplateRef<any>>(TemplateRef);\n private appRef = inject(ApplicationRef);\n private injector = inject(Injector);\n private viewContainerRef = inject(ViewContainerRef);\n\n protected readonly document = inject<Document>(DOCUMENT);\n\n /** Emits when the dropdown content has been attached. */\n attached = new Subject<void>();\n private portal: TemplatePortal;\n private outlet: DomPortalOutlet;\n\n /**\n * Attaches the content with a particular context.\n * @docs-private\n */\n attach(context: any = {}) {\n if (!this.portal) {\n this.portal = new TemplatePortal(this.template, this.viewContainerRef);\n }\n\n this.detach();\n\n if (!this.outlet) {\n this.outlet = new DomPortalOutlet(this.document.createElement('div'), this.appRef, this.injector);\n }\n\n const element: HTMLElement = this.template.elementRef.nativeElement;\n\n // Because we support opening the same dropdown from different triggers (which in turn have their\n // own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we\n // risk it staying attached to a pane that's no longer in the DOM.\n element.parentNode!.insertBefore(this.outlet.outletElement, element);\n this.portal.attach(this.outlet, context);\n this.attached.next();\n }\n\n /**\n * Detaches the content.\n * @docs-private\n */\n detach() {\n if (this.portal?.isAttached) {\n this.portal.detach();\n }\n }\n\n ngOnDestroy() {\n this.outlet?.dispose();\n }\n}\n","/**\n * Throws an exception for the case when dropdown trigger doesn't have a valid kbq-dropdown instance\n * @docs-private\n */\nexport function throwKbqDropdownMissingError() {\n throw Error(`kbqDropdownTriggerFor: must pass in an kbq-dropdown instance.\n Example:\n <kbq-dropdown #dropdown=\"kbqDropdown\"></kbq-dropdown>\n <button [kbqDropdownTriggerFor]=\"dropdown\"></button>`);\n}\n\n/**\n * Throws an exception for the case when dropdown's x-position value isn't valid.\n * In other words, it doesn't match 'before' or 'after'.\n * @docs-private\n */\nexport function throwKbqDropdownInvalidPositionX() {\n throw Error(`xPosition value must be either 'before', 'after', or 'center'.\n Example: <kbq-dropdown [xPosition]=\"'center'\" #dropdown=\"kbqDropdown\"></kbq-dropdown>`);\n}\n\n/**\n * Throws an exception for the case when dropdown's y-position value isn't valid.\n * In other words, it doesn't match 'above' or 'below'.\n * @docs-private\n */\nexport function throwKbqDropdownInvalidPositionY() {\n throw Error(`yPosition value must be either 'above' or below'.\n Example: <kbq-dropdown [yPosition]=\"'above'\" #dropdown=\"kbqDropdown\"></kbq-dropdown>`);\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Direction } from '@angular/cdk/bidi';\nimport { EventEmitter, InjectionToken, QueryList, TemplateRef } from '@angular/core';\nimport { KbqDropdownContent } from './dropdown-content.directive';\nimport { KbqDropdownItem } from './dropdown-item.component';\n\n/** Position of the dropdown panel along the x-axis. */\nexport type KbqDropdownPositionX = 'before' | 'after' | 'center';\n/**\n * @deprecated Use `KbqDropdownPositionX` instead.\n * @docs-private\n */\nexport type DropdownPositionX = KbqDropdownPositionX;\n\n/** Position of the dropdown panel along the y-axis. */\nexport type KbqDropdownPositionY = 'above' | 'below';\n/**\n * @deprecated Use `KbqDropdownPositionY` instead.\n * @docs-private\n */\nexport type DropdownPositionY = KbqDropdownPositionY;\n\n/** Reason why the menu was closed. */\nexport type DropdownCloseReason = void | 'click' | 'keydown' | 'tab';\n\n/**\n * Interface for a custom dropdown panel that can be used with `kbqDropdownTriggerFor`.\n * @docs-private\n */\nexport interface KbqDropdownPanel {\n xPosition: KbqDropdownPositionX;\n yPosition: KbqDropdownPositionY;\n overlapTriggerX: boolean;\n overlapTriggerY: boolean;\n templateRef: TemplateRef<any>;\n closed: EventEmitter<DropdownCloseReason>;\n parent?: KbqDropdownPanel | undefined;\n triggerWidth?: string;\n direction?: Direction;\n lazyContent?: KbqDropdownContent;\n backdropClass?: string;\n hasBackdrop?: boolean;\n items: QueryList<KbqDropdownItem>;\n focusFirstItem(origin?: FocusOrigin): void;\n resetActiveItem(): void;\n setPositionClasses?(x: KbqDropdownPositionX, y: KbqDropdownPositionY): void;\n}\n\n/** Default `kbq-dropdown` options that can be overridden. */\nexport interface KbqDropdownDefaultOptions {\n /** The x-axis position of the dropdown. */\n xPosition: KbqDropdownPositionX;\n\n /** The y-axis position of the dropdown. */\n yPosition: KbqDropdownPositionY;\n\n /** Whether the dropdown should overlap the dropdown trigger horizontally. */\n overlapTriggerX: boolean;\n\n /** Whether the dropdown should overlap the dropdown trigger vertically. */\n overlapTriggerY: boolean;\n\n /** Class to be applied to the dropdown's backdrop. */\n backdropClass: string;\n\n /** Whether the dropdown has a backdrop. */\n hasBackdrop: boolean;\n}\n\n/**\n * Injection token used to provide the parent dropdown to dropdown-specific components.\n * @docs-private\n */\nexport const KBQ_DROPDOWN_PANEL = new InjectionToken<KbqDropdownPanel>('KBQ_DROPDOWN_PANEL');\n\n/** Injection token to be used to override the default options for `kbq-dropdown`. */\nexport const KBQ_DROPDOWN_DEFAULT_OPTIONS = new InjectionToken<KbqDropdownDefaultOptions>(\n 'kbq-dropdown-default-options',\n {\n providedIn: 'root',\n factory: KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY\n }\n);\n\n/** @docs-private */\nexport function KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY(): KbqDropdownDefaultOptions {\n return {\n overlapTriggerX: true,\n overlapTriggerY: false,\n xPosition: 'after',\n yPosition: 'below',\n backdropClass: 'cdk-overlay-transparent-backdrop',\n hasBackdrop: false\n };\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n inject,\n Input,\n OnDestroy,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { IFocusableOption, KBQ_TITLE_TEXT_REF, KbqComponentColors, KbqTitleTextRef } from '@koobiq/components/core';\nimport { KbqIcon } from '@koobiq/components/icon';\nimport { Subject } from 'rxjs';\nimport { KBQ_DROPDOWN_PANEL, KbqDropdownPanel } from './dropdown.types';\n\n/**\n * This directive is intended to be used inside an kbq-dropdown tag.\n * It exists mostly to set the role attribute.\n */\n@Component({\n selector: 'kbq-dropdown-item, [kbq-dropdown-item]',\n imports: [\n KbqIcon\n ],\n templateUrl: 'dropdown-item.html',\n styleUrls: ['dropdown-item.scss'],\n providers: [\n { provide: KBQ_TITLE_TEXT_REF, useExisting: KbqDropdownItem }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-dropdown-item',\n '[class.kbq-dropdown-item_with-icon]': 'icon',\n '[class.kbq-dropdown-item_highlighted]': 'highlighted',\n '[class.kbq-disabled]': 'disabled',\n\n '[attr.disabled]': 'disabled || null',\n '[attr.tabindex]': 'getTabIndex()',\n\n '(click)': 'checkDisabled($event)',\n '(mouseenter)': 'handleMouseEnter()'\n },\n exportAs: 'kbqDropdownItem'\n})\nexport class KbqDropdownItem implements KbqTitleTextRef, IFocusableOption, AfterViewInit, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private focusMonitor = inject(FocusMonitor);\n parentDropdownPanel? = inject<KbqDropdownPanel>(KBQ_DROPDOWN_PANEL, { optional: true });\n @ViewChild('kbqTitleText', { static: true }) textElement: ElementRef;\n\n @ContentChild(KbqIcon) icon: KbqIcon;\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: booleanAttribute })\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value: boolean) {\n if (value !== this.disabled) {\n this._disabled = value;\n }\n }\n\n private _disabled: boolean = false;\n\n /** Stream that emits when the dropdown item is hovered. */\n readonly hovered = new Subject<KbqDropdownItem>();\n\n /** Stream that emits when the menu item is focused. */\n readonly focused = new Subject<KbqDropdownItem>();\n\n /** Whether the dropdown item is highlighted. */\n highlighted: boolean = false;\n\n /** Whether the dropdown item acts as a trigger for a nested dropdown. */\n isNested: boolean = false;\n\n /** @docs-private */\n protected readonly componentColors = KbqComponentColors;\n\n ngAfterViewInit() {\n if (this.focusMonitor) {\n // Start monitoring the element so it gets the appropriate focused classes. We want\n // to show the focus style for menu items only when the focus was not caused by a\n // mouse or touch interaction.\n\n this.focusMonitor.monitor(this.elementRef, false);\n }\n }\n\n ngOnDestroy() {\n if (this.focusMonitor) {\n this.focusMonitor.stopMonitoring(this.elementRef);\n }\n\n this.hovered.complete();\n this.focused.complete();\n }\n\n resetStyles() {\n this.getHostElement().classList.remove('cdk-keyboard-focused');\n }\n\n /** Focuses the dropdown item. */\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\n if (this.disabled) return;\n\n if (this.focusMonitor && origin) {\n this.focusMonitor.focusVia(this.getHostElement(), origin, options);\n } else {\n this.getHostElement().focus(options);\n }\n\n this.focused.next(this);\n }\n\n /** Returns the host DOM element. */\n getHostElement(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n\n /** Used to set the `tabindex`. */\n getTabIndex(): string {\n return this.disabled ? '-1' : '0';\n }\n\n /** Prevents the default element actions if it is disabled. Bound via `host` metadata. */\n checkDisabled(event: Event): void {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /** Emits to the hover stream. Bound via `host` metadata. */\n handleMouseEnter() {\n this.hovered.next(this);\n this.focus('mouse');\n }\n\n /** Gets the label to be used when determining whether the option should be focused. */\n getLabel(): string {\n const clone = this.getHostElement().cloneNode(true) as HTMLElement;\n const icons = clone.querySelectorAll('[kbq-icon], .kbq-icon');\n\n // Strip away icons so they don't show up in the text.\n for (let i = 0; i < icons.length; i++) {\n const icon = icons[i];\n\n icon.parentNode?.removeChild(icon);\n }\n\n return clone.textContent?.trim() || '';\n }\n\n haltDisabledEvents(event: Event) {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n }\n }\n}\n","<ng-content select=\"[kbq-icon]\" />\n\n<div #kbqTitleText class=\"kbq-dropdown-item__text\">\n <ng-content />\n</div>\n\n@if (isNested) {\n <i kbq-icon=\"kbq-chevron-right-s_16\" class=\"kbq-dropdown-trigger__icon\" [color]=\"componentColors.ContrastFade\"></i>\n}\n\n<div class=\"kbq-dropdown-item-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n","import { AnimationEvent } from '@angular/animations';\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { Direction } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOWN_ARROW, UP_ARROW } from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n contentChild,\n inject,\n input\n} from '@angular/core';\nimport { ESCAPE, FocusKeyManager, LEFT_ARROW, RIGHT_ARROW } from '@koobiq/components/core';\nimport { KbqFormField } from '@koobiq/components/form-field';\nimport { Observable, Subject, Subscription, merge } from 'rxjs';\nimport { startWith, switchMap, take } from 'rxjs/operators';\nimport { kbqDropdownAnimations } from './dropdown-animations';\nimport { KbqDropdownContent } from './dropdown-content.directive';\nimport { throwKbqDropdownInvalidPositionX, throwKbqDropdownInvalidPositionY } from './dropdown-errors';\nimport { KbqDropdownItem } from './dropdown-item.component';\nimport {\n KBQ_DROPDOWN_DEFAULT_OPTIONS,\n KBQ_DROPDOWN_PANEL,\n KbqDropdownDefaultOptions,\n KbqDropdownPanel,\n KbqDropdownPositionX,\n KbqDropdownPositionY\n} from './dropdown.types';\n\n@Directive({\n selector: '[kbqDropdownStaticContent]'\n})\nexport class KbqDropdownStaticContent {}\n\n@Component({\n selector: 'kbq-dropdown',\n imports: [],\n templateUrl: 'dropdown.html',\n /* Component inherits styles from `list`, so `list` variables are imported as the single source of truth. */\n styleUrls: ['dropdown.scss', 'dropdown-tokens.scss'],\n providers: [\n { provide: KBQ_DROPDOWN_PANEL, useExisting: KbqDropdown }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [\n kbqDropdownAnimations.transformDropdown,\n kbqDropdownAnimations.fadeInItems\n ],\n exportAs: 'kbqDropdown'\n})\nexport class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private ngZone = inject(NgZone);\n private defaultOptions = inject<KbqDropdownDefaultOptions>(KBQ_DROPDOWN_DEFAULT_OPTIONS);\n\n private readonly search = contentChild(KbqFormField);\n\n readonly navigationWithWrap = input<boolean>(false);\n\n /** Position of the dropdown in the X axis. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get xPosition(): KbqDropdownPositionX {\n return this._xPosition;\n }\n\n set xPosition(value: KbqDropdownPositionX) {\n if (value !== 'before' && value !== 'after' && value !== 'center') {\n throwKbqDropdownInvalidPositionX();\n }\n\n this._xPosition = value;\n this.setPositionClasses();\n }\n\n /** Position of the dropdown in the Y axis. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get yPosition(): KbqDropdownPositionY {\n return this._yPosition;\n }\n\n set yPosition(value: KbqDropdownPositionY) {\n if (value !== 'above' && value !== 'below') {\n throwKbqDropdownInvalidPositionY();\n }\n\n this._yPosition = value;\n this.setPositionClasses();\n }\n\n /** Whether the dropdown should overlap its trigger vertically. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get overlapTriggerY(): boolean {\n return this._overlapTriggerY;\n }\n\n set overlapTriggerY(value: boolean) {\n this._overlapTriggerY = coerceBooleanProperty(value);\n }\n\n /** Whether the dropdown should overlap its trigger horizontally. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get overlapTriggerX(): boolean {\n return this._overlapTriggerX;\n }\n\n set overlapTriggerX(value: boolean) {\n this._overlapTriggerX = coerceBooleanProperty(value);\n }\n\n /** Whether the dropdown has a backdrop. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get hasBackdrop(): boolean {\n return this._hasBackdrop;\n }\n\n set hasBackdrop(value: boolean) {\n this._hasBackdrop = coerceBooleanProperty(value);\n }\n\n /**\n * This method takes classes set on the host kbq-dropdown element and applies them on the\n * dropdown template that displays in the overlay container. Otherwise, it's difficult\n * to style the containing dropdown from outside the component.\n * @param classes list of class names\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input('class')\n set panelClass(classes: string) {\n const previousPanelClass = this.previousPanelClass;\n const classList = { ...this.classList };\n\n if (previousPanelClass && previousPanelClass.length) {\n previousPanelClass.split(' ').forEach((className: string) => (classList[className] = false));\n }\n\n this.previousPanelClass = classes;\n\n if (classes?.length) {\n classes.split(' ').forEach((className: string) => (classList[className] = true));\n\n this.elementRef.nativeElement.className = '';\n }\n\n // Reassign a new object reference so the native `[class]` binding picks up the change.\n this.classList = classList;\n }\n\n private _xPosition: KbqDropdownPositionX = this.defaultOptions.xPosition;\n private _yPosition: KbqDropdownPositionY = this.defaultOptions.yPosition;\n private _overlapTriggerX: boolean = this.defaultOptions.overlapTriggerX;\n private _overlapTriggerY: boolean = this.defaultOptions.overlapTriggerY;\n private _hasBackdrop: boolean = this.defaultOptions.hasBackdrop;\n\n triggerWidth: string;\n /** Config object to be passed into the dropdown panel's `[class]` binding */\n classList: { [key: string]: boolean } = {};\n\n /** Current state of the panel animation. */\n panelAnimationState: 'void' | 'enter' = 'void';\n\n /** Emits whenever an animation on the dropdown completes. */\n animationDone = new Subject<AnimationEvent>();\n\n /** Whether the dropdown is animating. */\n isAnimating: boolean;\n\n /** Parent dropdown of the current dropdown panel. */\n parent: KbqDropdownPanel | undefined;\n\n /** Layout direction of the dropdown. */\n direction: Direction;\n\n /** Class to be added to the backdrop element. */\n // TODO: Skipped for migration because:\n // This input overrides a field from a superclass, while the superclass field\n // is not migrated.\n @Input() backdropClass: string = this.defaultOptions.backdropClass;\n\n /** @docs-private */\n @ViewChild(TemplateRef, { static: false }) templateRef: TemplateRef<any>;\n\n /**\n * List of the items inside of a dropdown.\n */\n @ContentChildren(KbqDropdownItem, { descendants: true }) items: QueryList<KbqDropdownItem>;\n\n /**\n * Dropdown content that will be rendered lazily.\n * @docs-private\n */\n @ContentChild(KbqDropdownContent, { static: false }) lazyContent: KbqDropdownContent;\n\n /** Event emitted when the dropdown is closed. */\n @Output() readonly closed = new EventEmitter<void | 'click' | 'keydown' | 'tab'>();\n\n private previousPanelClass: string;\n\n private keyManager: FocusKeyManager<KbqDropdownItem>;\n\n /** Only the direct descendant menu items. */\n private directDescendantItems = new QueryList<KbqDropdownItem>();\n\n /** Subscription to tab events on the dropdown panel */\n private tabSubscription = Subscription.EMPTY;\n\n ngOnInit() {\n this.setPositionClasses();\n }\n\n ngAfterContentInit() {\n this.updateDirectDescendants();\n\n this.keyManager = new FocusKeyManager<KbqDropdownItem>(this.directDescendantItems).withTypeAhead();\n\n if (this.navigationWithWrap()) {\n this.keyManager.withWrap();\n }\n\n this.tabSubscription = this.keyManager.tabOut.subscribe(() => this.closed.emit('tab'));\n\n // If a user manually (programmatically) focuses a menu item, we need to reflect that focus\n // change back to the key manager. Note that we don't need to unsubscribe here because focused\n // is internal and we know that it gets completed on destroy.\n this.directDescendantItems.changes\n .pipe(\n startWith(this.directDescendantItems),\n switchMap((items) => merge(...items.map((item: KbqDropdownItem) => item.focused)))\n )\n .subscribe((focusedItem) => this.keyManager.updateActiveItem(focusedItem as KbqDropdownItem));\n\n this.search()?.inOverlay.set(true);\n }\n\n ngOnDestroy() {\n this.directDescendantItems.destroy();\n this.tabSubscription.unsubscribe();\n this.closed.complete();\n }\n\n /** Stream that emits whenever the hovered dropdown item changes. */\n hovered(): Observable<KbqDropdownItem> {\n const itemChanges = this.directDescendantItems.changes as Observable<QueryList<KbqDropdownItem>>;\n\n return itemChanges.pipe(\n startWith(this.directDescendantItems),\n switchMap((items) => merge(...items.map((item: KbqDropdownItem) => item.hovered)))\n ) as Observable<KbqDropdownItem>;\n }\n\n /** Handle a keyboard event from the dropdown, delegating to the appropriate action. */\n handleKeydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n\n switch (keyCode) {\n case ESCAPE:\n this.closed.emit('keydown');\n break;\n case LEFT_ARROW:\n if (this.parent && this.direction === 'ltr') {\n this.closed.emit('keydown');\n }\n\n break;\n case RIGHT_ARROW:\n if (this.parent && this.direction === 'rtl') {\n this.closed.emit('keydown');\n }\n\n break;\n default:\n if (keyCode === UP_ARROW || keyCode === DOWN_ARROW) {\n this.keyManager.setFocusOrigin('keyboard');\n }\n\n this.keyManager.onKeydown(event);\n\n return;\n }\n\n // Don't allow the event to propagate if we've already handled it, or it may\n // end up reaching other overlays that were opened earlier.\n event.stopPropagation();\n }\n\n /**\n * Focus the first item in the dropdown.\n * @param origin Action from which the focus originated. Used to set the correct styling.\n */\n focusFirstItem(origin: FocusOrigin = 'program'): void {\n // When the content is rendered lazily, it takes a bit before the items are inside the DOM.\n if (this.lazyContent) {\n this.ngZone.onStable.pipe(take(1)).subscribe(() => this.applyInitialFocus(origin));\n } else {\n this.applyInitialFocus(origin);\n }\n }\n\n /**\n * Applies focus when the dropdown is opened. When opened by mouse or touch, the first item\n * should not be highlighted, so the panel itself is focused instead — keyboard events still\n * reach the panel and the first arrow key press will highlight the first item.\n */\n private applyInitialFocus(origin: FocusOrigin): void {\n // The origin should be set even when no item gets activated,\n // since `close` relies on it to emit the correct close reason.\n this.keyManager.setFocusOrigin(origin);\n\n if (origin === 'mouse' || origin === 'touch') {\n this.focusPanel();\n } else {\n this.keyManager.setFirstItemActive();\n }\n }\n\n /** Moves DOM focus onto the dropdown panel so that keydown events keep being handled. */\n private focusPanel(): void {\n // The panel is rendered into the overlay through a `TemplatePortal`, so it can't be\n // queried with a `ViewChild`. If there are no rendered items, focus stays on the trigger,\n // same as `setFirstItemActive` no-ops in that case.\n const panel = this.directDescendantItems.first?.getHostElement().closest<HTMLElement>('.kbq-dropdown__panel');\n\n panel?.focus();\n }\n\n /**\n * Resets the active item in the dropdown. This is used when the dropdown is opened, allowing\n * the user to start from the first option when pressing the down arrow.\n */\n resetActiveItem() {\n this.keyManager.activeItem?.resetStyles();\n this.keyManager.setActiveItem(-1);\n }\n\n /**\n * Adds classes to the dropdown panel based on its position. Can be used by\n * consumers to add specific styling based on the position.\n * @param posX Position of the dropdown along the x axis.\n * @param posY Position of the dropdown along the y axis.\n * @docs-private\n */\n setPositionClasses(posX: KbqDropdownPositionX = this.xPosition, posY: KbqDropdownPositionY = this.yPosition) {\n // Reassign a new object reference so the native `[class]` binding picks up the change.\n this.classList = {\n ...this.classList,\n 'kbq-dropdown-before': posX === 'before',\n 'kbq-dropdown-after': posX === 'after',\n 'kbq-dropdown-center': posX === 'center',\n 'kbq-dropdown-above': posY === 'above',\n 'kbq-dropdown-below': posY === 'below'\n };\n }\n\n /** Starts the enter animation. */\n startAnimation() {\n this.panelAnimationState = 'enter';\n }\n\n /** Resets the panel animation to its initial state. */\n resetAnimation() {\n this.panelAnimationState = 'void';\n }\n\n /** Callback that is invoked when the panel animation completes. */\n onAnimationDone(event: AnimationEvent) {\n this.animationDone.next(event);\n this.isAnimating = false;\n }\n\n onAnimationStart(event: AnimationEvent) {\n this.isAnimating = true;\n\n // Scroll the content element to the top as soon as the animation starts. This is necessary,\n // because we move focus to the first item while it's still being animated, which can throw\n // the browser off when it determines the scroll position. Alternatively we can move focus\n // when the animation is done, however moving focus asynchronously will interrupt screen\n // readers which are in the process of reading out the dropdown already. We take the `element`\n // from the `event` since we can't use a `ViewChild` to access the pane.\n if (event.toState === 'enter' && this.keyManager.activeItemIndex <= 0) {\n event.element.scrollTop = 0;\n }\n }\n\n close() {\n const focusOrigin = this.keyManager.getFocusOrigin() === 'keyboard' ? 'keydown' : 'click';\n\n this.closed.emit(focusOrigin);\n }\n\n /**\n * Sets up a stream that will keep track of any newly-added menu items and will update the list\n * of direct descendants. We collect the descendants this way, because `items` can include\n * items that are part of child menus, and using a custom way of registering items is unreliable\n * when it comes to maintaining the item order.\n */\n private updateDirectDescendants() {\n this.items.changes.pipe(startWith(this.items)).subscribe((items: QueryList<KbqDropdownItem>) => {\n this.directDescendantItems.reset(items.filter((item) => item.parentDropdownPanel === this));\n this.directDescendantItems.notifyOnChanges();\n });\n }\n}\n","<ng-template>\n <div\n tabindex=\"-1\"\n class=\"kbq-dropdown__panel\"\n [class.kbq-dropdown__panel_nested]=\"parent\"\n [class]=\"classList\"\n [@transformDropdown]=\"panelAnimationState\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (click)=\"close()\"\n (keydown)=\"handleKeydown($event)\"\n >\n <div class=\"kbq-dropdown__content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n\n<ng-content select=\"[kbqDropdownStaticContent]\" />\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { Direction, Directionality } from '@angular/cdk/bidi';\nimport {\n FlexibleConnectedPositionStrategy,\n HorizontalConnectionPos,\n Overlay,\n OverlayConfig,\n OverlayContainer,\n OverlayRef,\n ScrollStrategy,\n VerticalConnectionPos\n} from '@angular/cdk/overlay';\nimport { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n InjectionToken,\n Input,\n numberAttribute,\n OnDestroy,\n Output,\n output,\n Renderer2,\n ViewContainerRef\n} from '@angular/core';\nimport { defaultOffsetY, DOWN_ARROW, ENTER, KBQ_WINDOW, LEFT_ARROW, RIGHT_ARROW, SPACE } from '@koobiq/components/core';\nimport { asapScheduler, merge, Observable, of as observableOf, Subscription } from 'rxjs';\nimport { delay, filter, take, takeUntil } from 'rxjs/operators';\nimport { throwKbqDropdownMissingError } from './dropdown-errors';\nimport { KbqDropdownItem } from './dropdown-item.component';\nimport { KbqDropdown } from './dropdown.component';\nimport { DropdownCloseReason, KbqDropdownPanel, KbqDropdownPositionX, KbqDropdownPositionY } from './dropdown.types';\n\n/** Injection token that determines the scroll handling while the dropdown is open. */\nexport const KBQ_DROPDOWN_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>('kbq-dropdown-scroll-strategy');\n\n/** @docs-private */\nexport function KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: KBQ_DROPDOWN_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY\n};\n\n/**\n * Marker provided by host components that create their own stacking context at\n * the default overlay z-index (e.g. `KbqTopBar`, `KbqNavbar` use\n * `position: sticky` + `z-index: $overlay-z-index`). When this token is\n * available in the injector tree, `KbqDropdownTrigger` defaults `demoteOverlay`\n * to `false` so the dropdown overlay is not lowered below the host.\n *\n * An explicit `[demoteOverlay]` binding on the trigger still wins.\n */\nexport const KBQ_DROPDOWN_HOST = new InjectionToken<unknown>('kbq-dropdown-host');\n\n/** Default top padding of the nested dropdown panel. */\nexport const NESTED_PANEL_TOP_PADDING = 4;\nexport const NESTED_PANEL_LEFT_PADDING = 8;\n\n/** Options for binding a passive event listener. */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });\n\nconst positionMap = {\n /** Maps CDK overlay x-anchor back to a dropdown x-position label. */\n overlayXToPosX: {\n start: 'after',\n center: 'center',\n end: 'before'\n } as Record<HorizontalConnectionPos, KbqDropdownPositionX>,\n\n /** Primary (overlapping) X positions: [originX, originFallbackX, overlayX, overlayFallbackX]. */\n xPositions: {\n before: ['end', 'start', 'end', 'start'],\n center: ['center', 'start', 'center', 'end'],\n after: ['start', 'end', 'start', 'end']\n } as Record<\n KbqDropdownPositionX,\n [HorizontalConnectionPos, HorizontalConnectionPos, HorizontalConnectionPos, HorizontalConnectionPos]\n >,\n\n /** Non-overlapping X positions: [originX, originFallbackX, overlayX, overlayFallbackX]. */\n nonOverlapXPositions: {\n before: ['start', 'end', 'end', 'start'],\n center: ['center', 'start', 'center', 'end'],\n after: ['end', 'start', 'start', 'end']\n } as Record<\n KbqDropdownPositionX,\n [HorizontalConnectionPos, HorizontalConnectionPos, HorizontalConnectionPos, HorizontalConnectionPos]\n >\n};\n\n/**\n * This directive is intended to be used in conjunction with an kbq-dropdown tag. It is\n * responsible for toggling the display of the provided dropdown instance.\n */\n@Directive({\n selector: `[kbqDropdownTriggerFor]`,\n host: {\n class: 'kbq-dropdown-trigger',\n '[class.kbq-pressed]': 'opened',\n '(mousedown)': 'handleMousedown($event)',\n '(keydown)': 'handleKeydown($event)',\n '(click)': 'handleClick($event)'\n },\n exportAs: 'kbqDropdownTrigger'\n})\nexport class KbqDropdownTrigger implements AfterContentInit, OnDestroy {\n private overlay = inject(Overlay);\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private viewContainerRef = inject(ViewContainerRef);\n private scrollStrategy = inject(KBQ_DROPDOWN_SCROLL_STRATEGY);\n private parent = inject(KbqDropdown, { optional: true })!;\n private dropdownItemInstance = inject(KbqDropdownItem, { optional: true, self: true })!;\n private _dir = inject(Directionality, { optional: true });\n private changeDetectorRef = inject(ChangeDetectorRef);\n private focusMonitor = inject(FocusMonitor);\n\n private readonly overlayContainer = inject(OverlayContainer);\n private readonly renderer = inject(Renderer2);\n\n protected readonly isBrowser = inject(Platform).isBrowser;\n private readonly window = inject(KBQ_WINDOW);\n private readonly host = inject(KBQ_DROPDOWN_HOST, { optional: true });\n lastDestroyReason: DropdownCloseReason;\n\n /** Position offset of the dropdown in the X axis. */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input({ transform: numberAttribute }) offsetX: number;\n\n /** Position offset of the dropdown in the Y axis. */\n // TODO: Skipped for migration because:\n // Class of this input is referenced in the signature of another class.\n @Input({ transform: numberAttribute }) offsetY: number;\n\n /** Data to be passed along to any lazily-rendered content. */\n // TODO: Skipped for migration because:\n // Class of this input is referenced in the signature of another class.\n @Input('kbqDropdownTriggerData') data: any;\n\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input() openByArrowDown: boolean = true;\n\n /**\n * Whether to demote the overlay container z-index so that dropdown overlays\n * sit below sibling overlays (tooltips, modals, etc.). Set to `false` to\n * keep the dropdown overlay at the default overlay container z-index.\n */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input({ transform: booleanAttribute }) demoteOverlay: boolean = true;\n\n /**\n * Whether focus should be restored when the menu is closed.\n * Note that disabling this option can have accessibility implications\n * and it's up to you to manage focus, if you decide to turn it off.\n */\n // TODO: Skipped for migration because:\n // Class of this input is referenced in the signature of another class.\n @Input('kbqDropdownTriggerRestoreFocus') restoreFocus: boolean = true;\n\n /** References the dropdown instance that the trigger is associated with. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input('kbqDropdownTriggerFor')\n get dropdown() {\n return this._dropdown;\n }\n\n set dropdown(dropdown: KbqDropdownPanel) {\n if (dropdown === this._dropdown) {\n return;\n }\n\n this._dropdown = dropdown;\n this.closeSubscription.unsubscribe();\n\n if (dropdown) {\n this.closeSubscription = dropdown.closed.asObservable().subscribe((reason) => {\n this.destroy(reason);\n\n // If a click closed the dropdown, we should close the entire chain of nested dropdowns.\n if (['click', 'tab'].includes(reason as string) && this.parent) {\n this.parent.closed.emit(reason);\n }\n });\n }\n }\n\n private _dropdown: KbqDropdownPanel;\n\n /** Event emitted when the associated dropdown is opened. */\n readonly dropdownOpened = output<void>();\n\n /**\n * Event emitted when the associated dropdown is closed. Kept as an `@Output()` EventEmitter\n * (not `output()`): `KbqOptionActionComponent` subscribes to it via `.pipe()` through the\n * KBQ_OPTION_ACTION_PARENT contract, which an `OutputEmitterRef` does not support — see #DS-5079.\n */\n @Output() readonly dropdownClosed = new EventEmitter<void>();\n\n // Tracking input type is necessary so it's possible to only auto-focus\n // the first item of the list when the dropdown is opened via the keyboard\n openedBy: Exclude<FocusOrigin, 'program' | null> | undefined;\n\n /** The text direction of the containing app. */\n get dir(): Direction {\n return this._dir?.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Whether the dropdown is open. */\n get opened(): boolean {\n return this._opened;\n }\n\n private _opened: boolean = false;\n\n private portal: TemplatePortal;\n\n private overlayRef: OverlayRef | null = null;\n\n private closeSubscription = Subscription.EMPTY;\n\n private hoverSubscription = Subscription.EMPTY;\n\n private classAddedToOverlayContainer: boolean = false;\n\n constructor() {\n const elementRef = this.elementRef;\n const dropdownItemInstance = this.dropdownItemInstance;\n\n elementRef.nativeElement.addEventListener('touchstart', this.handleTouchStart, passiveEventListenerOptions);\n\n if (dropdownItemInstance) {\n dropdownItemInstance.isNested = this.isNested();\n }\n\n if (this.host) {\n this.demoteOverlay = false;\n }\n }\n\n ngAfterContentInit() {\n this.check();\n this.handleHover();\n }\n\n ngOnDestroy() {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n\n this.elementRef.nativeElement.removeEventListener(\n 'touchstart',\n this.handleTouchStart,\n passiveEventListenerOptions\n );\n\n this.cleanUpSubscriptions();\n }\n\n /** Whether the dropdown triggers a nested dropdown or a top-level one. */\n isNested(): boolean {\n return !!(this.dropdownItemInstance && this.parent);\n }\n\n /** Toggles the dropdown between the open and closed states. */\n toggle(): void {\n return this._opened ? this.close() : this.open();\n }\n\n /** Opens the dropdown. */\n open(): void {\n if (this._opened) {\n return;\n }\n\n this.check();\n\n const overlayRef = this.createOverlay();\n const overlayConfig = overlayRef.getConfig();\n\n this.setPosition(overlayConfig.positionStrategy as FlexibleConnectedPositionStrategy);\n\n overlayConfig.hasBackdrop = this.dropdown.hasBackdrop ? !this.isNested() : this.dropdown.hasBackdrop;\n\n overlayRef.attach(this.getPortal());\n\n if (this.dropdown.lazyContent) {\n this.dropdown.lazyContent.detach();\n\n this.dropdown.lazyContent.attach(this.data);\n }\n\n this.closeSubscription = this.closingActions().subscribe(() => this.close());\n\n this.init();\n\n if (this.dropdown instanceof KbqDropdown) {\n this.dropdown.startAnimation();\n }\n\n this.addClassToOverlayContainer();\n }\n\n /** Closes the dropdown. */\n close(): void {\n this.dropdown.closed.emit();\n\n this.removeClassFromOverlayContainer();\n }\n\n /**\n * Focuses the dropdown trigger.\n */\n focus(origin?: FocusOrigin, options?: FocusOptions) {\n if (this.focusMonitor && origin) {\n this.focusMonitor.focusVia(this.elementRef.nativeElement, origin, options);\n } else {\n this.elementRef.nativeElement.focus();\n }\n }\n\n /** Handles mouse presses on the trigger. */\n handleMousedown(event: MouseEvent): void {\n // Since right or middle button clicks won't trigger the `click` event,\n // we shouldn't consider the dropdown as opened by mouse in those cases.\n this.openedBy = event.button === 0 ? 'mouse' : undefined;\n\n // Since clicking on the trigger won't close the dropdown if it opens a nested dropdown,\n // we should prevent focus from moving onto it via click to avoid the\n // highlight from lingering on the dropdown item.\n if (this.isNested()) {\n event.preventDefault();\n }\n }\n\n /** Handles key presses on the trigger. */\n handleKeydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n\n if (keyCode === ENTER || keyCode === SPACE) {\n this.openedBy = 'keyboard';\n\n event.preventDefault();\n\n if (this.isNested()) {\n // Stop event propagation to avoid closing the parent dropdown.\n event.stopPropagation();\n\n this.open();\n } else {\n this.toggle();\n }\n }\n\n if (\n (this.isNested() &&\n ((keyCode === RIGHT_ARROW && this.dir === 'ltr') || (keyCode === LEFT_ARROW && this.dir === 'rtl'))) ||\n (!this.isNested() && keyCode === DOWN_ARROW && this.openByArrowDown)\n ) {\n event.preventDefault();\n\n this.openedBy = 'keyboard';\n this.open();\n }\n }\n\n /** Handles click events on the trigger. */\n handleClick(event: MouseEvent): void {\n if (this.isNested()) {\n // Stop event propagation to avoid closing the parent dropdown.\n event.stopPropagation();\n\n this.open();\n } else {\n this.toggle();\n }\n }\n\n /**\n * Handles touch start events on the trigger.\n * Needs to be an arrow function so we can easily use addEventListener and removeEventListener.\n */\n private handleTouchStart = () => (this.openedBy = 'touch');\n\n /** Closes the dropdown and does the necessary cleanup. */\n private destroy(reason: DropdownCloseReason) {\n if (!this.overlayRef || !this.opened) {\n return;\n }\n\n this.lastDestroyReason = reason;\n\n this.dropdown.resetActiveItem();\n\n this.closeSubscription.unsubscribe();\n this.overlayRef.detach();\n\n if (this.restoreFocus && (reason === 'keydown' || !this.openedBy || !this.isNested())) {\n this.focus(this.openedBy);\n }\n\n this.openedBy = undefined;\n\n if (this.dropdown instanceof KbqDropdown) {\n this.dropdown.resetAnimation();\n\n const animationSubscription = this.dropdown.animationDone.pipe(\n filter((event) => event.toState === 'void'),\n take(1)\n );\n\n if (this.dropdown.lazyContent) {\n // Wait for the exit animation to finish before detaching the content.\n animationSubscription\n .pipe(\n // Interrupt if the content got re-attached.\n takeUntil(this.dropdown.lazyContent.attached)\n )\n .subscribe({\n next: () => this.dropdown.lazyContent!.detach(),\n // No matter whether the content got re-attached, reset the this.dropdown.\n complete: () => this.setIsOpened(false)\n });\n } else {\n animationSubscription.subscribe(() => this.setIsOpened(false));\n }\n } else {\n this.setIsOpened(false);\n\n if (this.dropdown.lazyContent) {\n this.dropdown.lazyContent.detach();\n }\n }\n }\n\n /**\n * This method sets the dropdown state to open and focuses the first item if\n * the dropdown was opened via the keyboard.\n */\n private init(): void {\n this.dropdown.parent = this.isNested() ? this.parent : undefined;\n this.dropdown.direction = this.dir;\n\n // reset submenu items since they can be initialized as children of root menu\n if (this.parent && !this.dropdown.items.length) {\n this.dropdown.items.reset(Array.from(this.parent.items));\n this.dropdown.items.notifyOnChanges();\n }\n\n this.dropdown.focusFirstItem(this.openedBy || 'program');\n\n this.setIsOpened(true);\n }\n\n // set state rather than toggle to support triggers sharing a dropdown\n private setIsOpened(isOpen: boolean): void {\n if (isOpen !== this._opened) {\n this.changeDetectorRef.markForCheck();\n }\n\n this._opened = isOpen;\n\n if (this._opened) {\n // TODO: The 'emit' function requires a mandatory void argument\n this.dropdownOpened.emit();\n } else {\n // TODO: The 'emit' function requires a mandatory void argument\n this.dropdownClosed.emit();\n }\n\n if (this.isNested()) {\n this.dropdownItemInstance.highlighted = isOpen;\n }\n }\n\n /**\n * This method checks that a valid instance of KbqDropdown has been passed into\n * kbqDropdownTriggerFor. If not, an exception is thrown.\n */\n private check() {\n if (!this.dropdown) {\n throwKbqDropdownMissingError();\n }\n }\n\n /**\n * This method creates the overlay from the provided dropdown's template and saves its\n * OverlayRef so that it can be attached to the DOM when open is called.\n */\n private createOverlay(): OverlayRef {\n if (!this.overlayRef) {\n const config = this.getOverlayConfig();\n\n this.subscribeToPositions(config.positionStrategy as FlexibleConnectedPositionStrategy);\n this.overlayRef = this.overlay.create(config);\n\n // Consume the `keydownEvents` in order to prevent them from going to another overlay.\n // Ideally we'd also have our keyboard event logic in here, however doing so will\n // break anybody that may have implemented the `KbqDropdownPanel` themselves.\n this.overlayRef.keydownEvents().subscribe();\n }\n\n return this.overlayRef;\n }\n\n /**\n * This method builds the configuration object needed to create the overlay, the OverlayState.\n * @returns OverlayConfig\n */\n private getOverlayConfig(): OverlayConfig {\n const isVerticalTrigger = this.dropdown.overlapTriggerY && !this.dropdown.overlapTriggerX;\n\n return new OverlayConfig({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withTransformOriginOn('.kbq-dropdown__panel')\n .withPush(false),\n backdropClass: this.dropdown.backdropClass || 'cdk-overlay-transparent-backdrop',\n scrollStrategy: this.scrollStrategy(),\n direction: this.dir,\n ...(!this.isNested() && !isVerticalTrigger && { minWidth: this.getWidth() })\n });\n }\n\n /**\n * Listens to changes in the position of the overlay and sets the correct classes\n * on the dropdown based on the new position. This ensures the animation origin is always\n * correct, even if a fallback position is used for the overlay.\n */\n private subscribeToPositions(position: FlexibleConnectedPositionStrategy): void {\n if (this.dropdown.setPositionClasses) {\n position.positionChanges.subscribe((change) => {\n const posX = positionMap.overlayXToPosX[change.connectionPair.overlayX];\n const posY: KbqDropdownPositionY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';\n\n this.dropdown.setPositionClasses!(posX, posY);\n });\n }\n }\n\n /**\n * Sets the appropriate positions on a position strategy\n * so the overlay connects with the trigger correctly.\n * @param positionStrategy Strategy whose position to update.\n */\n private setPosition(positionStrategy: FlexibleConnectedPositionStrategy) {\n let [originX, originFallbackX, overlayX, overlayFallbackX] = positionMap.xPositions[this.dropdown.xPosition];\n\n // eslint-disable-next-line prefer-const\n let [overlayY, overlayFallbackY, originY, originFallbackY]: VerticalConnectionPos[] =\n this.dropdown.yPosition === 'above'\n ? ['bottom', 'top', 'bottom', 'top']\n : ['top', 'bottom', 'top', 'bottom'];\n\n let offsetY = 0;\n let offsetX = 0;\n\n if (this.isNested()) {\n // When the dropdown is nested, it should always align itself\n // to the edges of the trigger, instead of overlapping it,\n // so 'center' is not applicable for nested panels — falls back to 'after'.\n const xPosition = this.dropdown.xPosition === 'center' ? 'after' : this.dropdown.xPosition;\n\n [originX, originFallbackX, overlayX, overlayFallbackX] = positionMap.nonOverlapXPositions[xPosition];\n offsetY = overlayY === 'bottom' ? NESTED_PANEL_TOP_PADDING : -NESTED_PANEL_TOP_PADDING;\n offsetX = NESTED_PANEL_LEFT_PADDING;\n } else {\n if (!this.dropdown.overlapTriggerY) {\n offsetY = defaultOffsetY;\n originY = overlayY === 'top' ? 'bottom' : 'top';\n originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';\n }\n\n if (!this.dropdown.overlapTriggerX) {\n [originX, originFallbackX, overlayX, overlayFallbackX] =\n positionMap.nonOverlapXPositions[this.dropdown.xPosition];\n }\n }\n\n const resolvedOffsetY = this.offsetY ?? (overlayY === 'top' ? offsetY : -offsetY);\n const resolvedFallbackOffsetY = this.offsetY ?? (overlayFallbackY === 'top' ? offsetY : -offsetY);\n\n positionStrategy.withPositions([\n { originX, originY, overlayX, overlayY, offsetY: resolvedOffsetY, offsetX: this.offsetX ?? -offsetX },\n {\n originX: originFallbackX,\n originY,\n overlayX: overlayFallbackX,\n overlayY,\n offsetY: resolvedOffsetY,\n offsetX: this.offsetX ?? offsetX\n },\n {\n originX,\n originY: originFallbackY,\n overlayX,\n overlayY: overlayFallbackY,\n offsetY: resolvedFallbackOffsetY,\n offsetX: this.offsetX ?? -offsetX\n },\n {\n originX: originFallbackX,\n originY: originFallbackY,\n overlayX: overlayFallbackX,\n overlayY: overlayFallbackY,\n offsetY: resolvedFallbackOffsetY,\n offsetX: this.offsetX ?? -offsetX\n }\n ]);\n }\n\n /** Cleans up the active subscriptions. */\n private cleanUpSubscriptions(): void {\n this.closeSubscription.unsubscribe();\n this.hoverSubscription.unsubscribe();\n }\n\n /** Returns a stream that emits whenever an action that should close the dropdown occurs. */\n private closingActions() {\n const backdrop = this.overlayRef!.backdropClick();\n const outsidePointerEvents = this.overlayRef!.outsidePointerEvents();\n const detachments = this.overlayRef!.detachments();\n const parentClose = this.parent ? this.parent.closed : observableOf();\n const hover = this.parent\n ? this.parent.hovered().pipe(\n filter((active) => active !== this.dropdownItemInstance),\n filter(() => this._opened)\n )\n : observableOf();\n\n return merge(\n backdrop,\n outsidePointerEvents,\n parentClose as Observable<DropdownCloseReason>,\n hover,\n detachments\n );\n }\n\n /** Handles the cases where the user hovers over the trigger. */\n private handleHover() {\n // Subscribe to changes in the hovered item in order to toggle the panel.\n if (!this.isNested()) {\n return;\n }\n\n this.hoverSubscription = this.parent\n .hovered()\n // Since we might have multiple competing triggers for the same dropdown (e.g. a nested dropdown\n // with different data and triggers), we have to delay it by a tick to ensure that\n // it won't be closed immediately after it is opened.\n .pipe(\n filter((active) => active === this.dropdownItemInstance && !active.disabled),\n delay(0, asapScheduler)\n )\n .subscribe(() => {\n this.openedBy = 'mouse';\n\n // If the same dropdown is used between multiple triggers, it might still be animating\n // while the new trigger tries to re-open it. Wait for the animation to finish\n // before doing so. Also interrupt if the user moves to another item.\n if (this.dropdown instanceof KbqDropdown && this.dropdown.isAnimating) {\n // We need the `delay(0)` here in order to avoid\n // 'changed after checked' errors in some cases. See #12194.\n this.dropdown.animationDone\n .pipe(take(1), delay(0, asapScheduler), takeUntil(this.parent.hovered()))\n // eslint-disable-next-line rxjs-x/no-nested-subscribe\n .subscribe(() => this.open());\n } else {\n this.open();\n }\n });\n }\n\n /** Gets the portal that should be attached to the overlay. */\n private getPortal(): TemplatePortal {\n // Note that we can avoid this check by keeping the portal on the dropdown panel.\n // While it would be cleaner, we'd have to introduce another required method on\n // `KbqDropdownPanel`, making it harder to consume.\n if (!this.portal || this.portal.templateRef !== this.dropdown.templateRef) {\n this.portal = new TemplatePortal(this.dropdown.templateRef, this.viewContainerRef);\n }\n\n return this.portal;\n }\n\n private getWidth(): string {\n if (!this.isBrowser) return '';\n\n const nativeElement = this.elementRef.nativeElement;\n\n const { width, borderRightWidth, borderLeftWidth } = this.window.getComputedStyle(nativeElement);\n\n return `${parseInt(width) - parseInt(borderRightWidth) - parseInt(borderLeftWidth)}px`;\n }\n\n private addClassToOverlayContainer() {\n if (!this.demoteOverlay) return;\n\n const overlayContainer = this.overlayContainer?.getContainerElement();\n\n if (overlayContainer.childNodes.length === 1) {\n this.classAddedToOverlayContainer = true;\n\n this.renderer.addClass(overlayContainer, 'cdk-overlay-container_dropdown');\n }\n }\n\n private removeClassFromOverlayContainer() {\n if (this.classAddedToOverlayContainer) {\n this.renderer.removeClass(this.overlayContainer.getContainerElement(), 'cdk-overlay-container_dropdown');\n }\n }\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { NgModule } from '@angular/core';\nimport { KbqIconModule } from '@koobiq/components/icon';\nimport { KbqDropdownContent } from './dropdown-content.directive';\nimport { KbqDropdownItem } from './dropdown-item.component';\nimport { KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER, KbqDropdownTrigger } from './dropdown-trigger.directive';\nimport { KbqDropdown, KbqDropdownStaticContent } from './dropdown.component';\n\n@NgModule({\n imports: [\n OverlayModule,\n KbqIconModule,\n KbqDropdownStaticContent,\n KbqDropdown,\n KbqDropdownItem,\n KbqDropdownTrigger,\n KbqDropdownContent\n ],\n providers: [KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER],\n exports: [\n KbqDropdown,\n KbqDropdownItem,\n KbqDropdownTrigger,\n KbqDropdownContent,\n KbqDropdownStaticContent\n ]\n})\nexport class KbqDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["DOWN_ARROW","observableOf"],"mappings":";;;;;;;;;;;;;;;;;AAWA;;;AAGG;AACI,MAAM,qBAAqB,GAG9B;AACA;;;;;;;AAOG;AACH,IAAA,iBAAiB,EAAE,OAAO,CAAC,mBAAmB,EAAE;AAC5C,QAAA,KAAK,CACD,MAAM,EACN,KAAK,CAAC;AACF,YAAA,OAAO,EAAE,CAAC;AACV,YAAA,SAAS,EAAE;AACd,SAAA,CAAC,CACL;AACD,QAAA,UAAU,CACN,eAAe,EACf,KAAK,CAAC;AACF,YAAA,KAAK,CAAC,wBAAwB,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC7E,OAAO,CAAC,gCAAgC,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AAC7E,SAAA,CAAC,CACL;AACD,QAAA,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;KAC7E,CAAC;AAEF;;;AAGG;AACH,IAAA,WAAW,EAAE,OAAO,CAAC,aAAa,EAAE;;QAEhC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QACvC,UAAU,CAAC,WAAW,EAAE;AACpB,YAAA,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EA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S,EAAE,CAAC,6CAA6C,CAAC;AAC1D,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,eAAe;wBACf,kBAAkB;wBAClB,kBAAkB;wBAClB;AACH;AACJ,iBAAA;;;AC1BD;;AAEG;;;;"}
1
+ {"version":3,"file":"koobiq-components-dropdown.mjs","sources":["../../../packages/components/dropdown/dropdown-animations.ts","../../../packages/components/dropdown/dropdown-content.directive.ts","../../../packages/components/dropdown/dropdown-errors.ts","../../../packages/components/dropdown/dropdown-item-action.ts","../../../packages/components/dropdown/dropdown.types.ts","../../../packages/components/dropdown/dropdown-item.component.ts","../../../packages/components/dropdown/dropdown-item.html","../../../packages/components/dropdown/dropdown-search.ts","../../../packages/components/dropdown/dropdown.component.ts","../../../packages/components/dropdown/dropdown.html","../../../packages/components/dropdown/dropdown-trigger.directive.ts","../../../packages/components/dropdown/dropdown.module.ts","../../../packages/components/dropdown/koobiq-components-dropdown.ts"],"sourcesContent":["import {\n animate,\n AnimationTriggerMetadata,\n group,\n query,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\n/**\n * Animations used by the kbq-dropdown component.\n * @docs-private\n */\nexport const kbqDropdownAnimations: {\n readonly transformDropdown: AnimationTriggerMetadata;\n readonly fadeInItems: AnimationTriggerMetadata;\n} = {\n /**\n * This animation controls the dropdown panel's entry and exit from the page.\n *\n * When the dropdown panel is added to the DOM, it scales in and fades in its border.\n *\n * When the dropdown panel is removed from the DOM, it simply fades out after a brief\n * delay to display the ripple.\n */\n transformDropdown: trigger('transformDropdown', [\n state(\n 'void',\n style({\n opacity: 0,\n transform: 'scale(0.8)'\n })\n ),\n transition(\n 'void => enter',\n group([\n query('.kbq-dropdown__content', animate('0ms linear', style({ opacity: 1 }))),\n animate('0ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' }))\n ])\n ),\n transition('* => void', animate('50ms 25ms linear', style({ opacity: 0 })))\n ]),\n\n /**\n * This animation fades in the background color and content of the dropdown panel\n * after its containing element is scaled in.\n */\n fadeInItems: trigger('fadeInItems', [\n // now. Remove next time we do breaking changes.\n state('showing', style({ opacity: 1 })),\n transition('void => *', [\n style({ opacity: 0 }),\n animate('0ms 0ms cubic-bezier(0.55, 0, 0.55, 0.2)')\n ])\n ])\n};\n\nexport const fadeInItems = kbqDropdownAnimations.fadeInItems;\n\nexport const transformDropdown = kbqDropdownAnimations.transformDropdown;\n","import { DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport { ApplicationRef, Directive, inject, Injector, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n/**\n * Dropdown content that will be rendered lazily once the dropdown is opened.\n */\n@Directive({\n selector: 'ng-template[kbqDropdownContent]'\n})\nexport class KbqDropdownContent implements OnDestroy {\n private template = inject<TemplateRef<any>>(TemplateRef);\n private appRef = inject(ApplicationRef);\n private injector = inject(Injector);\n private viewContainerRef = inject(ViewContainerRef);\n\n protected readonly document = inject<Document>(DOCUMENT);\n\n /** Emits when the dropdown content has been attached. */\n attached = new Subject<void>();\n private portal: TemplatePortal;\n private outlet: DomPortalOutlet;\n\n /**\n * Attaches the content with a particular context.\n * @docs-private\n */\n attach(context: any = {}) {\n if (!this.portal) {\n this.portal = new TemplatePortal(this.template, this.viewContainerRef);\n }\n\n this.detach();\n\n if (!this.outlet) {\n this.outlet = new DomPortalOutlet(this.document.createElement('div'), this.appRef, this.injector);\n }\n\n const element: HTMLElement = this.template.elementRef.nativeElement;\n\n // Because we support opening the same dropdown from different triggers (which in turn have their\n // own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we\n // risk it staying attached to a pane that's no longer in the DOM.\n element.parentNode!.insertBefore(this.outlet.outletElement, element);\n this.portal.attach(this.outlet, context);\n this.attached.next();\n }\n\n /**\n * Detaches the content.\n * @docs-private\n */\n detach() {\n if (this.portal?.isAttached) {\n this.portal.detach();\n }\n }\n\n ngOnDestroy() {\n this.outlet?.dispose();\n }\n}\n","/**\n * Throws an exception for the case when dropdown trigger doesn't have a valid kbq-dropdown instance\n * @docs-private\n */\nexport function throwKbqDropdownMissingError() {\n throw Error(`kbqDropdownTriggerFor: must pass in an kbq-dropdown instance.\n Example:\n <kbq-dropdown #dropdown=\"kbqDropdown\"></kbq-dropdown>\n <button [kbqDropdownTriggerFor]=\"dropdown\"></button>`);\n}\n\n/**\n * Throws an exception for the case when dropdown's x-position value isn't valid.\n * In other words, it doesn't match 'before' or 'after'.\n * @docs-private\n */\nexport function throwKbqDropdownInvalidPositionX() {\n throw Error(`xPosition value must be either 'before', 'after', or 'center'.\n Example: <kbq-dropdown [xPosition]=\"'center'\" #dropdown=\"kbqDropdown\"></kbq-dropdown>`);\n}\n\n/**\n * Throws an exception for the case when dropdown's y-position value isn't valid.\n * In other words, it doesn't match 'above' or 'below'.\n * @docs-private\n */\nexport function throwKbqDropdownInvalidPositionY() {\n throw Error(`yPosition value must be either 'above' or below'.\n Example: <kbq-dropdown [yPosition]=\"'above'\" #dropdown=\"kbqDropdown\"></kbq-dropdown>`);\n}\n\n/**\n * Throws an exception for the case when `kbqDropdownSearch` is applied to a form field that doesn't\n * host a `kbqInput`.\n * @docs-private\n */\nexport function throwKbqDropdownSearchMissingInputError() {\n throw Error(`kbqDropdownSearch: must be applied to a kbq-form-field containing an input[kbqInput].\n Example:\n <kbq-form-field kbqDropdownSearch>\n <input kbqInput [formControl]=\"control\" />\n </kbq-form-field>`);\n}\n\n/**\n * Throws an exception for the case when `kbqDropdownSearch`'s input isn't bound to a form control, so\n * there is no query to react to.\n * @docs-private\n */\nexport function throwKbqDropdownSearchMissingNgControlError() {\n throw Error(`kbqDropdownSearch: the input must be bound to a form control.\n Example:\n <kbq-form-field kbqDropdownSearch>\n <input kbqInput [formControl]=\"control\" />\n </kbq-form-field>`);\n}\n","import { Directive, effect, ElementRef, inject, InjectionToken, Signal } from '@angular/core';\n\n/**\n * Narrow view of `KbqDropdownItem` that `KbqDropdownItemAction` needs. Read through\n * `KBQ_DROPDOWN_ITEM_ACTION_HOST` instead of importing `KbqDropdownItem` directly: the item\n * imports `KbqDropdownItemAction` for its `contentChild` query, so an import back from here would\n * form a circular dependency between the two files, which breaks the query at runtime (the\n * predicate ends up captured as `undefined`).\n * @docs-private\n */\nexport interface KbqDropdownItemActionHost {\n readonly disabled: boolean;\n readonly progress: Signal<boolean>;\n}\n\n/** @docs-private */\nexport const KBQ_DROPDOWN_ITEM_ACTION_HOST = new InjectionToken<KbqDropdownItemActionHost>(\n 'kbqDropdownItemAction-host'\n);\n\n/**\n * Marks a secondary, independently-focusable/clickable element (e.g. a settings link) projected\n * inside a `kbq-dropdown-item` alongside the item's own primary action. Requires the item's host\n * element to be non-interactive (e.g. `<div kbq-dropdown-item>`), since interactive content\n * cannot validly nest inside another interactive element.\n */\n@Directive({\n selector: '[kbqDropdownItemAction]',\n host: {\n class: 'kbq-dropdown-item__action',\n '[class.kbq-disabled]': 'isInactive()',\n '[attr.aria-disabled]': 'isInactive() || null',\n '(click)': 'onClick($event)'\n }\n})\nexport class KbqDropdownItemAction {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly dropdownItem = inject(KBQ_DROPDOWN_ITEM_ACTION_HOST);\n\n /**\n * The `tabindex` this element had before `isInactive()` first forced it to `-1`, so it can be\n * restored instead of left removed. Plain `[attr.tabindex]` can't do this: co-located host\n * bindings for the same attribute (e.g. `KbqIconButton`'s own `tabindex`) apply in directive\n * order and the last one always wins outright, so writing `null` here on the active branch\n * would strip whatever tabindex the host component set, not just leave it alone.\n */\n private originalTabindex: string | null = null;\n\n constructor() {\n effect(() => {\n const el = this.elementRef.nativeElement;\n\n if (this.isInactive()) {\n if (this.originalTabindex === null) this.originalTabindex = el.getAttribute('tabindex');\n\n el.setAttribute('tabindex', '-1');\n } else if (this.originalTabindex !== null) {\n el.setAttribute('tabindex', this.originalTabindex);\n this.originalTabindex = null;\n }\n });\n }\n\n /** Returns the host DOM element. */\n getHostElement(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n\n /** `progress` takes priority over the action, same as `disabled`. */\n protected isInactive(): boolean {\n return this.dropdownItem.disabled || this.dropdownItem.progress();\n }\n\n /**\n * Always stops the click from bubbling to the item's own primary click handler.\n * Additionally, blocks the action's own default behavior when the parent item is\n * disabled/loading — `<a>` has no native `disabled`.\n */\n protected onClick(event: MouseEvent): void {\n event.stopPropagation();\n\n if (this.isInactive()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Direction } from '@angular/cdk/bidi';\nimport { EventEmitter, InjectionToken, QueryList, Signal, TemplateRef } from '@angular/core';\nimport {\n KBQ_PANEL_DEFAULT_MIN_WIDTH,\n KbqPanelMaxWidth,\n KbqPanelMinWidth,\n KbqPanelWidth\n} from '@koobiq/components/core';\nimport { KbqDropdownContent } from './dropdown-content.directive';\nimport { KbqDropdownItem } from './dropdown-item.component';\n\n/** Position of the dropdown panel along the x-axis. */\nexport type KbqDropdownPositionX = 'before' | 'after' | 'center';\n/**\n * @deprecated Use `KbqDropdownPositionX` instead.\n * @docs-private\n */\nexport type DropdownPositionX = KbqDropdownPositionX;\n\n/** Position of the dropdown panel along the y-axis. */\nexport type KbqDropdownPositionY = 'above' | 'below';\n/**\n * @deprecated Use `KbqDropdownPositionY` instead.\n * @docs-private\n */\nexport type DropdownPositionY = KbqDropdownPositionY;\n\n/** Reason why the menu was closed. */\nexport type DropdownCloseReason = void | 'click' | 'keydown' | 'tab';\n\n/**\n * Interface for a custom dropdown panel that can be used with `kbqDropdownTriggerFor`.\n * @docs-private\n */\nexport interface KbqDropdownPanel {\n xPosition: KbqDropdownPositionX;\n yPosition: KbqDropdownPositionY;\n overlapTriggerX: boolean;\n overlapTriggerY: boolean;\n templateRef: TemplateRef<any>;\n closed: EventEmitter<DropdownCloseReason>;\n parent?: KbqDropdownPanel | undefined;\n /**\n * @deprecated Has no effect. Use `KbqDropdownTrigger.widthOrigin` to make the panel match\n * an element other than the trigger. Will be removed in v21.\n */\n triggerWidth?: string;\n panelWidth?: Signal<KbqPanelWidth>;\n panelMinWidth?: Signal<KbqPanelMinWidth>;\n panelMaxWidth?: Signal<KbqPanelMaxWidth>;\n direction?: Direction;\n lazyContent?: KbqDropdownContent;\n backdropClass?: string;\n hasBackdrop?: boolean;\n items: QueryList<KbqDropdownItem>;\n /** Whether the panel highlights the active item instead of focusing it, see `KbqDropdownSearch`. */\n readonly inSearchMode?: Signal<boolean>;\n focusFirstItem(origin?: FocusOrigin): void;\n resetActiveItem(): void;\n setPositionClasses?(x: KbqDropdownPositionX, y: KbqDropdownPositionY): void;\n}\n\n/** Default `kbq-dropdown` options that can be overridden. */\nexport interface KbqDropdownDefaultOptions {\n /** The x-axis position of the dropdown. */\n xPosition: KbqDropdownPositionX;\n\n /** The y-axis position of the dropdown. */\n yPosition: KbqDropdownPositionY;\n\n /** Whether the dropdown should overlap the dropdown trigger horizontally. */\n overlapTriggerX: boolean;\n\n /** Whether the dropdown should overlap the dropdown trigger vertically. */\n overlapTriggerY: boolean;\n\n /** Class to be applied to the dropdown's backdrop. */\n backdropClass: string;\n\n /** Whether the dropdown has a backdrop. */\n hasBackdrop: boolean;\n\n /**\n * Whether nested dropdowns opened from this dropdown's items use a \"safe area\": while the\n * pointer moves from a trigger toward its open submenu, sibling items it crosses over on the way\n * don't prematurely close the submenu.\n */\n safeArea?: boolean;\n\n /**\n * Width of the panel. If set to `auto`, the panel will match the trigger width.\n * If set to null, the panel will grow to match its content.\n */\n panelWidth?: KbqPanelWidth;\n\n /** Minimum width of the panel. If set to null, only the trigger width applies. */\n panelMinWidth?: KbqPanelMinWidth;\n\n /**\n * Maximum width of the panel. Caps growth by content only — it never overrides the trigger width or an\n * explicit `panelWidth`. If null, the `--kbq-dropdown-size-container-width-max` token applies.\n */\n panelMaxWidth?: KbqPanelMaxWidth;\n}\n\n/**\n * Injection token used to provide the parent dropdown to dropdown-specific components.\n * @docs-private\n */\nexport const KBQ_DROPDOWN_PANEL = new InjectionToken<KbqDropdownPanel>('KBQ_DROPDOWN_PANEL');\n\n/** Injection token to be used to override the default options for `kbq-dropdown`. */\nexport const KBQ_DROPDOWN_DEFAULT_OPTIONS = new InjectionToken<KbqDropdownDefaultOptions>(\n 'kbq-dropdown-default-options',\n {\n providedIn: 'root',\n factory: KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY\n }\n);\n\n/** @docs-private */\nexport function KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY(): KbqDropdownDefaultOptions {\n return {\n overlapTriggerX: true,\n overlapTriggerY: false,\n xPosition: 'after',\n yPosition: 'below',\n backdropClass: 'cdk-overlay-transparent-backdrop',\n hasBackdrop: false,\n safeArea: true,\n // Reproduces the pre-existing CSS-driven sizing: grow with content, never narrower than the\n // trigger or `--kbq-dropdown-size-container-width-min`, capped by the token.\n panelWidth: null,\n panelMinWidth: KBQ_PANEL_DEFAULT_MIN_WIDTH,\n panelMaxWidth: null\n };\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { TAB } from '@angular/cdk/keycodes';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n Input,\n OnDestroy,\n signal,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n Highlightable,\n IFocusableOption,\n KBQ_TITLE_TEXT_REF,\n KbqComponentColors,\n KbqTitleTextRef\n} from '@koobiq/components/core';\nimport { KbqIcon } from '@koobiq/components/icon';\nimport { Subject } from 'rxjs';\nimport {\n KBQ_DROPDOWN_ITEM_ACTION_HOST,\n KbqDropdownItemAction,\n KbqDropdownItemActionHost\n} from './dropdown-item-action';\nimport { KBQ_DROPDOWN_PANEL, KbqDropdownPanel } from './dropdown.types';\n\n/**\n * This directive is intended to be used inside an kbq-dropdown tag.\n * It exists mostly to set the role attribute.\n */\n@Component({\n selector: 'kbq-dropdown-item, [kbq-dropdown-item]',\n imports: [\n KbqIcon\n ],\n templateUrl: 'dropdown-item.html',\n styleUrls: ['dropdown-item.scss'],\n providers: [\n { provide: KBQ_TITLE_TEXT_REF, useExisting: KbqDropdownItem },\n { provide: KBQ_DROPDOWN_ITEM_ACTION_HOST, useExisting: KbqDropdownItem }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-dropdown-item',\n '[class.kbq-dropdown-item_with-icon]': 'icon',\n '[class.kbq-dropdown-item_highlighted]': 'highlighted',\n '[class.kbq-dropdown-item_active]': 'active()',\n '[class.kbq-disabled]': 'disabled',\n '[class.kbq-progress]': 'progress()',\n '[class.kbq-dropdown-item_has-action]': '!!itemAction()',\n\n '[attr.disabled]': 'disabled || null',\n '[attr.tabindex]': 'getTabIndex()',\n\n '(click)': 'checkDisabled($event)',\n '(mouseenter)': 'handleMouseEnter()',\n '(keydown)': 'handleActionKeydown($event)'\n },\n exportAs: 'kbqDropdownItem'\n})\nexport class KbqDropdownItem\n implements KbqTitleTextRef, KbqDropdownItemActionHost, IFocusableOption, Highlightable, OnDestroy\n{\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private focusMonitor = inject(FocusMonitor);\n parentDropdownPanel? = inject<KbqDropdownPanel>(KBQ_DROPDOWN_PANEL, { optional: true });\n @ViewChild('kbqTitleText') textElement: ElementRef;\n\n @ContentChild(KbqIcon) icon: KbqIcon;\n\n /** Secondary, independently-focusable icon action projected into the item (e.g. a settings link). */\n readonly itemAction = contentChild(KbqDropdownItemAction);\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: booleanAttribute })\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value: boolean) {\n if (value !== this.disabled) {\n this._disabled = value;\n }\n }\n\n private _disabled: boolean = false;\n\n /** Whether the dropdown item is in a loading state. */\n readonly progress = input(false, { transform: booleanAttribute });\n\n /** Stream that emits when the dropdown item is hovered. */\n readonly hovered = new Subject<KbqDropdownItem>();\n\n /** Stream that emits when the menu item is focused. */\n readonly focused = new Subject<KbqDropdownItem>();\n\n /** Whether the dropdown item is highlighted. */\n highlighted: boolean = false;\n\n /** Whether the item is the panel's active item while DOM focus is held elsewhere. */\n protected readonly active = signal(false);\n\n /** Whether the dropdown item acts as a trigger for a nested dropdown. */\n isNested: boolean = false;\n\n /** @docs-private */\n protected readonly componentColors = KbqComponentColors;\n\n constructor() {\n effect(() => {\n // Start monitoring the element so it gets the appropriate focused classes. We want to\n // show the focus style for menu items only when the focus was not caused by a mouse or\n // touch interaction. When `itemAction` is present, focus can land on it instead of the\n // host, so children must be checked too for the focused classes to still be applied to\n // the host. `monitor()` doesn't update `checkChildren` on an already-monitored element,\n // so this restarts monitoring whenever `itemAction()` changes to keep it in sync.\n this.focusMonitor.stopMonitoring(this.elementRef);\n this.focusMonitor.monitor(this.elementRef, !!this.itemAction());\n });\n }\n\n ngOnDestroy() {\n if (this.focusMonitor) {\n this.focusMonitor.stopMonitoring(this.elementRef);\n }\n\n this.hovered.complete();\n this.focused.complete();\n }\n\n resetStyles() {\n this.getHostElement().classList.remove('cdk-keyboard-focused');\n }\n\n /** Styles the item as active without focusing it. */\n setActiveStyles(): void {\n this.active.set(true);\n }\n\n /** Removes the styles applied by `setActiveStyles`. */\n setInactiveStyles(): void {\n this.active.set(false);\n }\n\n /**\n * Focuses the dropdown item and reveals it.\n *\n * The reveal is explicit because the one `focus()` performs implicitly is not portable: WebKit defers\n * it to a later rendering update, where it lands after — and undoes — any scrolling the reader did in\n * the meantime. `preventScroll` is therefore always forced on, overriding `options`.\n */\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\n if (this.disabled) return;\n\n const element = this.getHostElement();\n const focusOptions: FocusOptions = { ...options, preventScroll: true };\n\n if (this.focusMonitor && origin) {\n this.focusMonitor.focusVia(element, origin, focusOptions);\n } else {\n element.focus(focusOptions);\n }\n\n // With the pointer already on this item, revealing it would shift the list out from under it.\n if (origin !== 'mouse') {\n element.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });\n }\n\n this.focused.next(this);\n }\n\n /** Returns the host DOM element. */\n getHostElement(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n\n /** Used to set the `tabindex`. */\n getTabIndex(): string {\n return this.disabled ? '-1' : '0';\n }\n\n /** Prevents the default element actions if it is disabled. Bound via `host` metadata. */\n checkDisabled(event: Event): void {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /** Emits to the hover stream. Bound via `host` metadata. */\n handleMouseEnter() {\n this.hovered.next(this);\n\n // In search mode the panel makes the hovered item active instead, keeping the caret in the query.\n if (this.parentDropdownPanel?.inSearchMode?.()) return;\n\n this.focus('mouse');\n }\n\n /**\n * Lets Tab move focus between the host and `itemAction` without leaving the dropdown\n * (`stopPropagation` only — the browser's native focus move still happens). Any other Tab\n * press, i.e. actually leaving the item, is left untouched and still closes the dropdown via\n * the panel's `FocusKeyManager.tabOut`. Bound via `host` metadata.\n */\n protected handleActionKeydown(event: KeyboardEvent): void {\n const action = this.itemAction();\n\n if (!action || event.keyCode !== TAB || this.disabled || this.progress()) return;\n\n const target = event.target as HTMLElement;\n const hostEl = this.getHostElement();\n const actionEl = action.getHostElement();\n\n const movesToAction = !event.shiftKey && target === hostEl;\n const movesBackToHost = event.shiftKey && target === actionEl;\n\n if (movesToAction || movesBackToHost) {\n event.stopPropagation();\n }\n }\n\n /** Gets the label to be used when determining whether the option should be focused. */\n getLabel(): string {\n const clone = this.getHostElement().cloneNode(true) as HTMLElement;\n const stripped = clone.querySelectorAll('[kbq-icon], .kbq-icon, [kbqDropdownItemAction]');\n\n // Strip away icons and the action so they don't show up in the text.\n for (let i = 0; i < stripped.length; i++) {\n const node = stripped[i];\n\n node.parentNode?.removeChild(node);\n }\n\n return clone.textContent?.trim() || '';\n }\n\n haltDisabledEvents(event: Event) {\n if (this.disabled || this.progress()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n }\n }\n}\n","<ng-content select=\"[kbq-icon]\" />\n\n<div #kbqTitleText class=\"kbq-dropdown-item__text\">\n <ng-content />\n</div>\n\n<ng-content select=\"[kbqDropdownItemAction]\" />\n\n@if (isNested) {\n <i kbq-icon=\"kbq-chevron-right-s_16\" class=\"kbq-dropdown-trigger__icon\" [color]=\"componentColors.ContrastFade\"></i>\n}\n\n<div class=\"kbq-dropdown-item-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n","import { AfterContentInit, Directive, inject } from '@angular/core';\nimport { ESCAPE, LEFT_ARROW, RIGHT_ARROW } from '@koobiq/components/core';\nimport { KBQ_FORM_FIELD, KBQ_FORM_FIELD_DEFAULT_OPTIONS } from '@koobiq/components/form-field';\nimport {\n throwKbqDropdownSearchMissingInputError,\n throwKbqDropdownSearchMissingNgControlError\n} from './dropdown-errors';\nimport { KBQ_DROPDOWN_PANEL } from './dropdown.types';\n\n/**\n * Marks a `kbq-form-field` projected into a `kbq-dropdown` as the panel's search field.\n *\n * The panel keeps DOM focus in the field, so arrow keys move the highlighted item while the query\n * stays editable.\n */\n@Directive({\n selector: '[kbqDropdownSearch]',\n providers: [\n {\n // Merged, not replaced: the field still inherits whatever defaults the app configures.\n provide: KBQ_FORM_FIELD_DEFAULT_OPTIONS,\n useFactory: () => ({\n ...inject(KBQ_FORM_FIELD_DEFAULT_OPTIONS, { optional: true, skipSelf: true }),\n noBorders: true,\n inOverlay: true\n })\n }\n ],\n host: {\n '(click)': 'handleClick($event)',\n '(keydown)': 'handleKeydown($event)'\n },\n exportAs: 'kbqDropdownSearch'\n})\nexport class KbqDropdownSearch implements AfterContentInit {\n private readonly formField = inject(KBQ_FORM_FIELD);\n\n /**\n * Panel this field searches. A nested panel declared inside its parent's content shares the view with\n * it, so the parent has to be able to tell which of the projected fields is its own.\n * @docs-private\n */\n readonly panel = inject(KBQ_DROPDOWN_PANEL, { optional: true });\n\n /** The form control the query is bound to. */\n get ngControl() {\n return this.formField.control().ngControl;\n }\n\n ngAfterContentInit(): void {\n if (this.formField.control().controlType !== 'input') {\n throwKbqDropdownSearchMissingInputError();\n }\n\n if (!this.ngControl) {\n throwKbqDropdownSearchMissingNgControlError();\n }\n }\n\n /** Focuses the search field. */\n focus(): void {\n this.formField.focus();\n }\n\n /** Clears the search query. */\n reset(): void {\n this.ngControl?.reset();\n }\n\n /** The current search query. */\n value(): string {\n return this.formField.control().value;\n }\n\n /** @docs-private */\n protected handleClick(event: MouseEvent): void {\n event.stopPropagation();\n }\n\n /** @docs-private */\n protected handleKeydown(event: KeyboardEvent): void {\n // The panel owns ESCAPE: the first press clears the query, the second closes the dropdown. This\n // handler runs before the cleaner's own listener on the same element, so the field is already\n // empty by the time the cleaner looks at the key.\n if (event.keyCode === ESCAPE && this.value()) {\n this.reset();\n event.stopPropagation();\n\n return;\n }\n\n // A nested panel closes on the horizontal arrow that points back at its trigger, so the key is\n // only kept while the caret still has somewhere to go — the top-level panel ignores it anyway.\n if (this.movesCaret(event)) {\n event.stopPropagation();\n }\n }\n\n /** Whether the key still has caret to travel inside the field, rather than acting on the panel. */\n private movesCaret(event: KeyboardEvent): boolean {\n const { keyCode, target } = event;\n\n if (keyCode !== LEFT_ARROW && keyCode !== RIGHT_ARROW) return false;\n\n // The keydown starts on the input and bubbles to this host, so the target is the field itself.\n const { selectionStart, selectionEnd, value } = target as HTMLInputElement;\n\n if (selectionStart === null || selectionEnd === null) return true;\n\n const edge = keyCode === LEFT_ARROW ? 0 : value.length;\n\n return selectionStart !== edge || selectionEnd !== edge;\n }\n}\n","import { AnimationEvent } from '@angular/animations';\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { Direction } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOWN_ARROW, ENTER, UP_ARROW } from '@angular/cdk/keycodes';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Signal,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n contentChildren,\n effect,\n inject,\n input,\n numberAttribute,\n untracked\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n ActiveDescendantKeyManager,\n ESCAPE,\n FocusKeyManager,\n KBQ_PANEL_DEFAULT_MIN_WIDTH,\n KbqPanelMaxWidth,\n KbqPanelMinWidth,\n KbqPanelWidth,\n KbqPoint,\n KbqTriangle,\n LEFT_ARROW,\n ListKeyManager,\n RIGHT_ARROW,\n isPointInRect,\n isPointInTriangle\n} from '@koobiq/components/core';\nimport { KbqFormField } from '@koobiq/components/form-field';\nimport { Observable, Subject, Subscription, merge, timer } from 'rxjs';\nimport { delay, filter, map, startWith, switchMap, take, takeUntil } from 'rxjs/operators';\nimport { kbqDropdownAnimations } from './dropdown-animations';\nimport { KbqDropdownContent } from './dropdown-content.directive';\nimport { throwKbqDropdownInvalidPositionX, throwKbqDropdownInvalidPositionY } from './dropdown-errors';\nimport { KbqDropdownItem } from './dropdown-item.component';\nimport { KbqDropdownSearch } from './dropdown-search';\nimport {\n KBQ_DROPDOWN_DEFAULT_OPTIONS,\n KBQ_DROPDOWN_PANEL,\n KbqDropdownDefaultOptions,\n KbqDropdownPanel,\n KbqDropdownPositionX,\n KbqDropdownPositionY\n} from './dropdown.types';\n\n/** Options for binding a passive event listener. */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true }) as EventListenerOptions;\n\n/**\n * Grace period before switching to a different nested trigger hovered while a safe area is\n * protecting the currently open submenu. Without it, sweeping the pointer down a long list of\n * nested triggers on the way to the submenu would flicker each row's submenu open and closed.\n */\nexport const NESTED_HOVER_SWITCH_DELAY = 50;\n\n/** Class applied to the panel while its safe area is protecting an open submenu, see `activateSafeArea`. */\nconst SAFE_AREA_ACTIVE_CLASS = 'kbq-dropdown__panel_safe-area-active';\n\n@Directive({\n selector: '[kbqDropdownStaticContent]'\n})\nexport class KbqDropdownStaticContent {}\n\n/** Footer that is rendered below the dropdown options panel. */\n@Directive({\n selector: '[kbqDropdownFooter], kbq-dropdown-footer',\n host: { class: 'kbq-dropdown-footer' }\n})\nexport class KbqDropdownFooter {}\n\n@Component({\n selector: 'kbq-dropdown',\n imports: [],\n templateUrl: 'dropdown.html',\n /* Component inherits styles from `list`, so `list` variables are imported as the single source of truth. */\n styleUrls: ['dropdown.scss', 'dropdown-tokens.scss'],\n providers: [\n { provide: KBQ_DROPDOWN_PANEL, useExisting: KbqDropdown }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n // Remove the TemplatePortal host box from layout while keeping kbqDropdownStaticContent in the document flow.\n style: 'display: contents'\n },\n animations: [\n kbqDropdownAnimations.transformDropdown,\n kbqDropdownAnimations.fadeInItems\n ],\n exportAs: 'kbqDropdown'\n})\nexport class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private ngZone = inject(NgZone);\n private document = inject(DOCUMENT);\n private defaultOptions = inject<KbqDropdownDefaultOptions>(KBQ_DROPDOWN_DEFAULT_OPTIONS);\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly panelFormField = contentChild(KbqFormField);\n\n /**\n * Signal content queries carry `descendants: true`, and a nested panel declared inside this one's\n * content is part of the same view — so the match has to be narrowed to the fields this panel owns,\n * the way `updateDirectDescendants` narrows the items.\n */\n private readonly searches = contentChildren(KbqDropdownSearch, { descendants: true });\n\n private readonly search: Signal<KbqDropdownSearch | undefined> = computed(() =>\n this.searches().find((search) => search.panel === this)\n );\n\n /** Whether the dropdown projects a search form-field. @docs-private */\n readonly hasSearch = computed(() => !!this.panelFormField());\n\n /** Whether the panel highlights the active item instead of focusing it. @docs-private */\n readonly inSearchMode: Signal<boolean> = computed(() => !!this.search());\n\n readonly navigationWithWrap = input<boolean>(false);\n\n /** Position of the dropdown in the X axis. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get xPosition(): KbqDropdownPositionX {\n return this._xPosition;\n }\n\n set xPosition(value: KbqDropdownPositionX) {\n if (value !== 'before' && value !== 'after' && value !== 'center') {\n throwKbqDropdownInvalidPositionX();\n }\n\n this._xPosition = value;\n this.setPositionClasses();\n }\n\n /** Position of the dropdown in the Y axis. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get yPosition(): KbqDropdownPositionY {\n return this._yPosition;\n }\n\n set yPosition(value: KbqDropdownPositionY) {\n if (value !== 'above' && value !== 'below') {\n throwKbqDropdownInvalidPositionY();\n }\n\n this._yPosition = value;\n this.setPositionClasses();\n }\n\n /** Whether the dropdown should overlap its trigger vertically. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get overlapTriggerY(): boolean {\n return this._overlapTriggerY;\n }\n\n set overlapTriggerY(value: boolean) {\n this._overlapTriggerY = coerceBooleanProperty(value);\n }\n\n /** Whether the dropdown should overlap its trigger horizontally. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get overlapTriggerX(): boolean {\n return this._overlapTriggerX;\n }\n\n set overlapTriggerX(value: boolean) {\n this._overlapTriggerX = coerceBooleanProperty(value);\n }\n\n /** Whether the dropdown has a backdrop. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get hasBackdrop(): boolean {\n return this._hasBackdrop;\n }\n\n set hasBackdrop(value: boolean) {\n this._hasBackdrop = coerceBooleanProperty(value);\n }\n\n /**\n * This method takes classes set on the host kbq-dropdown element and applies them on the\n * dropdown template that displays in the overlay container. Otherwise, it's difficult\n * to style the containing dropdown from outside the component.\n * @param classes list of class names\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input('class')\n set panelClass(classes: string) {\n const previousPanelClass = this.previousPanelClass;\n const classList = { ...this.classList };\n\n if (previousPanelClass && previousPanelClass.length) {\n previousPanelClass.split(' ').forEach((className: string) => (classList[className] = false));\n }\n\n this.previousPanelClass = classes;\n\n if (classes?.length) {\n classes.split(' ').forEach((className: string) => (classList[className] = true));\n\n this.elementRef.nativeElement.className = '';\n }\n\n // Reassign a new object reference so the native `[class]` binding picks up the change.\n this.classList = classList;\n }\n\n private _xPosition: KbqDropdownPositionX = this.defaultOptions.xPosition;\n private _yPosition: KbqDropdownPositionY = this.defaultOptions.yPosition;\n private _overlapTriggerX: boolean = this.defaultOptions.overlapTriggerX;\n private _overlapTriggerY: boolean = this.defaultOptions.overlapTriggerY;\n private _hasBackdrop: boolean = this.defaultOptions.hasBackdrop;\n\n /**\n * @deprecated Has no effect. Use `KbqDropdownTrigger.widthOrigin` to make the panel match\n * an element other than the trigger. Will be removed in v21.\n */\n triggerWidth: string;\n /** Config object to be passed into the dropdown panel's `[class]` binding */\n classList: { [key: string]: boolean } = {};\n\n /** Current state of the panel animation. */\n panelAnimationState: 'void' | 'enter' = 'void';\n\n /** Emits whenever an animation on the dropdown completes. */\n animationDone = new Subject<AnimationEvent>();\n\n /** Whether the dropdown is animating. */\n isAnimating: boolean;\n\n /** Parent dropdown of the current dropdown panel. */\n parent: KbqDropdownPanel | undefined;\n\n /** Layout direction of the dropdown. */\n direction: Direction;\n\n /** Class to be added to the backdrop element. */\n // TODO: Skipped for migration because:\n // This input overrides a field from a superclass, while the superclass field\n // is not migrated.\n @Input() backdropClass: string = this.defaultOptions.backdropClass;\n\n /**\n * Width of the panel. If set to `auto`, the panel will match the trigger width, but will never be\n * narrower than `panelMinWidth`. If set to null, the panel will grow to match its content.\n * Any other value is used as an exact width, and `panelMinWidth` is not applied.\n */\n readonly panelWidth = input<KbqPanelWidth>(this.defaultOptions.panelWidth ?? null);\n\n /**\n * Minimum width of the panel in pixels. The panel is never narrower than this, nor than its trigger.\n */\n readonly panelMinWidth = input<KbqPanelMinWidth, unknown>(\n this.defaultOptions.panelMinWidth === undefined\n ? KBQ_PANEL_DEFAULT_MIN_WIDTH\n : this.defaultOptions.panelMinWidth,\n { transform: numberAttribute }\n );\n\n /**\n * Maximum width of the panel in pixels. Caps how far the panel grows with its content — it never makes\n * the panel narrower than the trigger, and never clamps an explicit `panelWidth`.\n * When null, the `--kbq-dropdown-size-container-width-max` token applies.\n */\n readonly panelMaxWidth = input<KbqPanelMaxWidth, unknown>(\n this.defaultOptions.panelMaxWidth === undefined ? null : this.defaultOptions.panelMaxWidth,\n { transform: numberAttribute }\n );\n\n /**\n * Whether nested dropdowns opened from this dropdown's items use a \"safe area\": while the\n * pointer moves from a trigger toward its open submenu, sibling items it crosses over on the way\n * don't prematurely close the submenu.\n */\n readonly safeArea = input(this.defaultOptions.safeArea ?? true, { transform: booleanAttribute });\n\n /**\n * `panelMinWidth` rendered as a CSS length for the `--kbq-dropdown-size-container-width-min`\n * token, so the panel's CSS `min-width` floor tracks the input — mirroring how `panelMaxWidth`\n * drives `max-width`. Non-finite input (e.g. `null`) leaves the token's static default in place.\n * @docs-private\n */\n protected readonly panelMinWidthToken = computed(() => {\n const minWidth = this.panelMinWidth();\n\n return Number.isFinite(minWidth) ? `${minWidth}px` : null;\n });\n\n /** @docs-private */\n @ViewChild(TemplateRef, { static: false }) templateRef: TemplateRef<any>;\n\n /**\n * List of the items inside of a dropdown.\n */\n @ContentChildren(KbqDropdownItem, { descendants: true }) items: QueryList<KbqDropdownItem>;\n\n /**\n * Dropdown content that will be rendered lazily.\n * @docs-private\n */\n @ContentChild(KbqDropdownContent, { static: false }) lazyContent: KbqDropdownContent;\n\n /** Event emitted when the dropdown is closed. */\n @Output() readonly closed = new EventEmitter<void | 'click' | 'keydown' | 'tab'>();\n\n private previousPanelClass: string;\n\n private keyManager: ListKeyManager<KbqDropdownItem>;\n\n private activeDescendantKeyManager?: ActiveDescendantKeyManager<KbqDropdownItem>;\n private focusKeyManager?: FocusKeyManager<KbqDropdownItem>;\n\n private focusOrigin: FocusOrigin = 'program';\n\n /** Only the direct descendant menu items. */\n private directDescendantItems = new QueryList<KbqDropdownItem>();\n\n /** Subscription to tab events on the dropdown panel */\n private tabSubscription = Subscription.EMPTY;\n\n /** Cleans up the safe-area `mousemove` listener. `null` when no safe area is being tracked. */\n private safeAreaCleanup: (() => void) | null = null;\n\n /** The nested trigger currently protected by the active safe area, if any. */\n private safeAreaOwner: KbqDropdownItem | null = null;\n\n /**\n * The most recently hovered item, tracked independently of the safe area so that leaving it\n * straight onto a sibling's nested trigger can switch to it immediately instead of waiting for a\n * `mouseenter` that already happened.\n */\n private currentHovered: KbqDropdownItem | null = null;\n\n /** Emits when the pointer reaches the panel the active safe area protects. */\n private readonly panelReached = new Subject<void>();\n\n /** Emits the sibling trigger that should open once a forced switch has closed the current one. */\n private readonly switchTarget = new Subject<KbqDropdownItem>();\n\n /** Watches for a forced switch to a sibling trigger while a safe area is active. */\n private switchTargetSubscription = Subscription.EMPTY;\n\n constructor() {\n // The search field can show up long after content init — rendered by `kbqDropdownContent` when\n // the panel first opens, or revealed by a structural directive — so the key manager follows the\n // mode instead of being decided once.\n effect(() => {\n const inSearchMode = this.inSearchMode();\n\n if (!this.keyManager || this.keyManagerInstalledForSearch() === inSearchMode) return;\n\n this.initKeyManager();\n\n // A flip while the panel is open leaves focus wherever the previous mode put it: on an item\n // the new manager will not track, or on an input that is being destroyed. Hand it over the\n // same way opening does, deferred so the write lands outside this change detection pass.\n if (this.panelAnimationState === 'enter') {\n this.ngZone.onStable.pipe(take(1)).subscribe(() => this.applyInitialFocus(this.focusOrigin));\n }\n });\n }\n\n ngOnInit() {\n this.setPositionClasses();\n }\n\n ngAfterContentInit() {\n this.updateDirectDescendants();\n\n this.initKeyManager();\n\n // If a user manually (programmatically) focuses a menu item, we need to reflect that focus\n // change back to the key manager. Note that we don't need to unsubscribe here because focused\n // is internal and we know that it gets completed on destroy.\n this.directDescendantItems.changes\n .pipe(\n startWith(this.directDescendantItems),\n switchMap((items) => merge(...items.map((item: KbqDropdownItem) => item.focused)))\n )\n .subscribe((focusedItem) => this.keyManager.updateActiveItem(focusedItem as KbqDropdownItem));\n\n this.panelFormField()?.inOverlay.set(true);\n\n // Driven by the item list rather than by the query, because consumers commonly debounce their\n // own filtering. `delay(0)` keeps the write out of the pass that reported the new items.\n this.directDescendantItems.changes\n .pipe(\n filter(() => !!this.search()),\n delay(0),\n filter(() => this.isActiveItemStale()),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => {\n // An item the highlight sat on is gone. With a query in the field the top result takes\n // over, so that ENTER picks it; with the field cleared nothing is highlighted — but the\n // stale instance still has to be dropped, or ENTER would replay a click on a detached\n // element and the arrows would resume from its index.\n if (this.search()?.value()) {\n this.keyManager.setFirstItemActive();\n } else {\n this.resetActiveItem();\n }\n });\n\n // Internal and completes with the items on destroy, so no explicit unsubscribe is needed.\n this.hovered().subscribe((item) => {\n this.currentHovered = item;\n\n // Hovering doesn't focus the item in search mode, so arrowing on has to resume from it.\n // Disabled items are skipped, the same way the key manager skips them for the arrows.\n if (this.inSearchMode() && !item.disabled) {\n this.keyManager.setActiveItem(item);\n }\n });\n }\n\n ngOnDestroy() {\n this.directDescendantItems.destroy();\n this.tabSubscription.unsubscribe();\n this.closed.complete();\n this.deactivateSafeArea();\n this.panelReached.complete();\n this.switchTarget.complete();\n }\n\n /** Stream that emits whenever the hovered dropdown item changes. */\n hovered(): Observable<KbqDropdownItem> {\n const itemChanges = this.directDescendantItems.changes as Observable<QueryList<KbqDropdownItem>>;\n\n return itemChanges.pipe(\n startWith(this.directDescendantItems),\n switchMap((items) => merge(...items.map((item: KbqDropdownItem) => item.hovered)))\n ) as Observable<KbqDropdownItem>;\n }\n\n /**\n * Tracks the pointer against `triangle` to protect `owner`'s open submenu, closing it via\n * `onExit` if the pointer leaves the triangle without first reaching `panelRect`. Meanwhile, if a\n * different nested trigger is hovered, `switchTarget()` emits it — immediately if it's outside\n * the triangle, otherwise after a grace period (see `NESTED_HOVER_SWITCH_DELAY`). Replaces any\n * safe area already being tracked.\n * @docs-private\n */\n activateSafeArea(owner: KbqDropdownItem, triangle: KbqTriangle, panelRect: DOMRect, onExit: () => void): void {\n this.deactivateSafeArea();\n this.safeAreaOwner = owner;\n this.classList = { ...this.classList, [SAFE_AREA_ACTIVE_CLASS]: true };\n\n this.safeAreaCleanup = this.ngZone.runOutsideAngular(() => {\n const listener = (event: MouseEvent) => {\n const point: KbqPoint = { x: event.clientX, y: event.clientY };\n\n if (isPointInRect(point, panelRect)) {\n this.panelReached.next();\n this.deactivateSafeArea();\n\n return;\n }\n\n if (!isPointInTriangle(point, triangle)) {\n const switchTo =\n this.currentHovered?.isNested && this.currentHovered !== owner && !this.currentHovered.disabled\n ? this.currentHovered\n : null;\n\n this.deactivateSafeArea();\n\n this.ngZone.run(() => {\n onExit();\n\n if (switchTo) {\n this.switchTarget.next(switchTo);\n }\n });\n }\n };\n\n this.document.addEventListener('mousemove', listener, passiveEventListenerOptions);\n\n return () => this.document.removeEventListener('mousemove', listener, passiveEventListenerOptions);\n });\n\n this.switchTargetSubscription = this.hovered()\n .pipe(\n filter((active) => active.isNested && active !== owner && !active.disabled),\n switchMap((active) =>\n timer(NESTED_HOVER_SWITCH_DELAY).pipe(\n map(() => active),\n takeUntil(this.panelReached)\n )\n )\n )\n .subscribe((active) => {\n this.deactivateSafeArea();\n onExit();\n this.switchTarget.next(active);\n });\n }\n\n /**\n * Stops tracking the current safe area, if any.\n * @docs-private\n */\n deactivateSafeArea(): void {\n this.safeAreaCleanup?.();\n this.safeAreaCleanup = null;\n this.safeAreaOwner = null;\n this.switchTargetSubscription.unsubscribe();\n this.switchTargetSubscription = Subscription.EMPTY;\n\n if (this.classList[SAFE_AREA_ACTIVE_CLASS]) {\n // The mousemove listener that can reach this runs outside the Angular zone, so re-enter it\n // to make sure the `classList` update is picked up by change detection.\n this.ngZone.run(() => {\n this.classList = { ...this.classList, [SAFE_AREA_ACTIVE_CLASS]: false };\n });\n }\n }\n\n /**\n * Whether a safe area is currently being tracked.\n * @docs-private\n */\n isSafeAreaActive(): boolean {\n return this.safeAreaCleanup !== null;\n }\n\n /**\n * Whether `item` is the nested trigger currently protected by an active safe area.\n * @docs-private\n */\n isSafeAreaOwner(item: KbqDropdownItem): boolean {\n return this.safeAreaOwner === item;\n }\n\n /**\n * Stream that emits when the pointer reaches the panel the active safe area protects (as opposed\n * to leaving the safe area, which closes the panel instead).\n * @docs-private\n */\n onPanelReached(): Observable<void> {\n return this.panelReached.asObservable();\n }\n\n /**\n * Stream that emits the sibling trigger that should open once a forced safe-area switch has\n * closed the trigger it was protecting.\n * @docs-private\n */\n onSwitchTarget(): Observable<KbqDropdownItem> {\n return this.switchTarget.asObservable();\n }\n\n /** Handle a keyboard event from the dropdown, delegating to the appropriate action. */\n handleKeydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n\n switch (keyCode) {\n case ESCAPE:\n this.closed.emit('keydown');\n break;\n case LEFT_ARROW:\n if (this.parent && this.direction === 'ltr') {\n this.closed.emit('keydown');\n }\n\n break;\n case RIGHT_ARROW:\n if (this.parent && this.direction === 'rtl') {\n this.closed.emit('keydown');\n }\n\n break;\n case ENTER:\n // The highlighted item never sees the key event itself, so replay it as a click and let\n // consumer handlers and nested triggers behave exactly as they do for the mouse.\n if (this.inSearchMode() && this.keyManager.activeItem) {\n event.preventDefault();\n // The click can close the dropdown synchronously, unregistering the overlay from the\n // CDK keyboard dispatcher before this keydown reaches `body` — where it would be\n // handed to whichever overlay was opened earlier.\n event.stopPropagation();\n this.keyManager.activeItem.getHostElement().click();\n }\n\n return;\n default:\n // Only the vertical arrows move the highlight in search mode; every other key that the\n // search field lets through would otherwise scroll the list back on each keystroke.\n if (keyCode === UP_ARROW || keyCode === DOWN_ARROW) {\n this.setFocusOrigin('keyboard');\n this.keyManager.onKeydown(event);\n this.revealActiveItem();\n } else {\n this.keyManager.onKeydown(event);\n }\n\n return;\n }\n\n // Don't allow the event to propagate if we've already handled it, or it may\n // end up reaching other overlays that were opened earlier.\n event.stopPropagation();\n }\n\n /**\n * Applies the panel's initial focus, see `applyInitialFocus`.\n * @param origin Action from which the focus originated. Used to set the correct styling.\n */\n focusFirstItem(origin: FocusOrigin = 'program'): void {\n // When the content is rendered lazily, it takes a bit before the items are inside the DOM.\n if (this.lazyContent) {\n this.ngZone.onStable.pipe(take(1)).subscribe(() => this.applyInitialFocus(origin));\n } else {\n this.applyInitialFocus(origin);\n }\n }\n\n /**\n * Applies focus when the dropdown is opened.\n *\n * A projected search field takes the caret for every origin and keeps it: the first arrow key press\n * only highlights an item. Without one, opening by mouse or touch focuses the panel rather than an\n * item, so that nothing is highlighted while keyboard events still reach the panel; any other origin\n * highlights the first item. A submenu of a search panel focuses nothing at all, so that hovering it\n * does not pull the caret out of the query.\n */\n private applyInitialFocus(origin: FocusOrigin): void {\n // The origin should be set even when no item gets activated,\n // since `close` relies on it to emit the correct close reason.\n this.setFocusOrigin(origin);\n\n const search = this.search();\n\n if (search) {\n search.focus();\n } else if (this.parent?.inSearchMode?.()) {\n return;\n } else if (origin === 'mouse' || origin === 'touch') {\n this.focusPanel();\n } else {\n this.keyManager.setFirstItemActive();\n }\n }\n\n /**\n * Moves focus back into the projected search field, reporting whether there was one. A nested panel\n * restores focus through this instead of onto its trigger item, which would strand the caret outside\n * the query.\n * @docs-private\n */\n restoreFocus(): boolean {\n const search = this.search();\n\n search?.focus();\n\n return !!search;\n }\n\n /** Moves DOM focus onto the dropdown panel so that keydown events keep being handled. */\n private focusPanel(): void {\n // The panel is rendered into the overlay through a `TemplatePortal`, so it can't be\n // queried with a `ViewChild`. If there are no rendered items, focus stays on the trigger,\n // same as `setFirstItemActive` no-ops in that case.\n const panel = this.directDescendantItems.first?.getHostElement().closest<HTMLElement>('.kbq-dropdown__panel');\n\n panel?.focus({ preventScroll: true });\n }\n\n /**\n * Resets the active item in the dropdown. This is used when the dropdown is opened, allowing\n * the user to start from the first option when pressing the down arrow.\n */\n resetActiveItem() {\n this.keyManager.activeItem?.resetStyles();\n this.keyManager.setActiveItem(-1);\n }\n\n /**\n * Adds classes to the dropdown panel based on its position. Can be used by\n * consumers to add specific styling based on the position.\n * @param posX Position of the dropdown along the x axis.\n * @param posY Position of the dropdown along the y axis.\n * @docs-private\n */\n setPositionClasses(posX: KbqDropdownPositionX = this.xPosition, posY: KbqDropdownPositionY = this.yPosition) {\n // Reassign a new object reference so the native `[class]` binding picks up the change.\n this.classList = {\n ...this.classList,\n 'kbq-dropdown-before': posX === 'before',\n 'kbq-dropdown-after': posX === 'after',\n 'kbq-dropdown-center': posX === 'center',\n 'kbq-dropdown-above': posY === 'above',\n 'kbq-dropdown-below': posY === 'below'\n };\n }\n\n /** Starts the enter animation. */\n startAnimation() {\n this.panelAnimationState = 'enter';\n }\n\n /** Resets the panel animation to its initial state. */\n resetAnimation() {\n this.panelAnimationState = 'void';\n }\n\n /** Callback that is invoked when the panel animation completes. */\n onAnimationDone(event: AnimationEvent) {\n this.animationDone.next(event);\n this.isAnimating = false;\n }\n\n onAnimationStart(event: AnimationEvent) {\n this.isAnimating = true;\n\n // Scroll the content element to the top as soon as the animation starts. This is necessary,\n // because we move focus to the first item while it's still being animated, which can throw\n // the browser off when it determines the scroll position. Alternatively we can move focus\n // when the animation is done, however moving focus asynchronously will interrupt screen\n // readers which are in the process of reading out the dropdown already. We take the `element`\n // from the `event` since we can't use a `ViewChild` to access the pane.\n if (event.toState === 'enter' && this.keyManager.activeItemIndex <= 0) {\n event.element.scrollTop = 0;\n }\n }\n\n close() {\n this.closed.emit(this.focusOrigin === 'keyboard' ? 'keydown' : 'click');\n }\n\n /**\n * With a search field the caret has to stay in the input, so the active item is only highlighted and\n * typeahead is left off — it would race the query the user is typing.\n */\n private initKeyManager(): void {\n // The forked `ListKeyManager` subscribes to the item list in its constructor and has no teardown,\n // so a manager is built once per mode and kept — rebuilding on every switch would strand the\n // previous one, twice per open/close cycle with lazy content. The outgoing manager's highlight\n // has to go with it: the incoming one will never call `setInactiveStyles` on an item it does not\n // know about.\n if (this.keyManager) {\n this.resetActiveItem();\n }\n\n if (this.inSearchMode()) {\n this.activeDescendantKeyManager ??= this.configureKeyManager(\n new ActiveDescendantKeyManager<KbqDropdownItem>(this.directDescendantItems)\n );\n this.keyManager = this.activeDescendantKeyManager;\n } else {\n this.focusKeyManager ??= this.configureKeyManager(\n new FocusKeyManager<KbqDropdownItem>(this.directDescendantItems).withTypeAhead()\n );\n this.keyManager = this.focusKeyManager;\n }\n\n this.tabSubscription.unsubscribe();\n this.tabSubscription = this.keyManager.tabOut.subscribe(() => this.closed.emit('tab'));\n }\n\n /** Which mode the installed key manager serves; the wanted one is `inSearchMode()`. */\n private keyManagerInstalledForSearch(): boolean {\n return this.keyManager === this.activeDescendantKeyManager;\n }\n\n private configureKeyManager<T extends ListKeyManager<KbqDropdownItem>>(keyManager: T): T {\n return untracked(this.navigationWithWrap) ? (keyManager.withWrap() as T) : keyManager;\n }\n\n private setFocusOrigin(origin: FocusOrigin): void {\n this.focusOrigin = origin;\n\n if (this.keyManager instanceof FocusKeyManager) {\n this.keyManager.setFocusOrigin(origin);\n }\n }\n\n private isActiveItemStale(): boolean {\n const activeItem = this.keyManager.activeItem;\n\n return !activeItem || !this.directDescendantItems.some((item) => item === activeItem);\n }\n\n /**\n * Reveals the highlighted item, which the browser only does on its own for real focus. Mirrors the\n * reveal `kbqFocusAndReveal` performs for focused elements.\n */\n private revealActiveItem(): void {\n if (!this.inSearchMode()) return;\n\n this.keyManager.activeItem?.getHostElement().scrollIntoView?.({ block: 'nearest', inline: 'nearest' });\n }\n\n /**\n * Sets up a stream that will keep track of any newly-added menu items and will update the list\n * of direct descendants. We collect the descendants this way, because `items` can include\n * items that are part of child menus, and using a custom way of registering items is unreliable\n * when it comes to maintaining the item order.\n */\n private updateDirectDescendants() {\n this.items.changes.pipe(startWith(this.items)).subscribe((items: QueryList<KbqDropdownItem>) => {\n this.directDescendantItems.reset(items.filter((item) => item.parentDropdownPanel === this));\n this.directDescendantItems.notifyOnChanges();\n });\n }\n}\n","<ng-template>\n <div\n tabindex=\"-1\"\n class=\"kbq-dropdown__panel\"\n [class.kbq-dropdown__panel_nested]=\"parent\"\n [class]=\"classList\"\n [style.max-width.px]=\"panelMaxWidth()\"\n [style.--kbq-dropdown-size-container-width-min]=\"panelMinWidthToken()\"\n [@transformDropdown]=\"panelAnimationState\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (click)=\"close()\"\n (keydown)=\"handleKeydown($event)\"\n >\n <div class=\"kbq-dropdown__content\">\n <ng-content />\n </div>\n <ng-content select=\"[kbqDropdownFooter], kbq-dropdown-footer\" />\n </div>\n</ng-template>\n\n<ng-content select=\"[kbqDropdownStaticContent]\" />\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { Direction, Directionality } from '@angular/cdk/bidi';\nimport {\n FlexibleConnectedPositionStrategy,\n HorizontalConnectionPos,\n Overlay,\n OverlayConfig,\n OverlayContainer,\n OverlayRef,\n ScrollStrategy,\n VerticalConnectionPos\n} from '@angular/cdk/overlay';\nimport { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n InjectionToken,\n Input,\n NgZone,\n numberAttribute,\n OnDestroy,\n Output,\n output,\n Renderer2,\n ViewContainerRef\n} from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport {\n defaultOffsetY,\n DOWN_ARROW,\n ENTER,\n getSafeTriangleVertices,\n kbqGetPanelWidthOrigin,\n KbqPanelWidthOrigin,\n KbqResolvedPanelWidth,\n kbqResolvePanelWidth,\n KbqSiblingPopup,\n kbqSiblingPopupProvider,\n LEFT_ARROW,\n RIGHT_ARROW,\n SPACE\n} from '@koobiq/components/core';\nimport { asapScheduler, merge, Observable, of as observableOf, Subscription } from 'rxjs';\nimport { delay, filter, map, take, takeUntil } from 'rxjs/operators';\nimport { throwKbqDropdownMissingError } from './dropdown-errors';\nimport { KbqDropdownItem } from './dropdown-item.component';\nimport { KbqDropdown } from './dropdown.component';\nimport { DropdownCloseReason, KbqDropdownPanel, KbqDropdownPositionX, KbqDropdownPositionY } from './dropdown.types';\n\n/**\n * Injection token that determines the scroll handling while the dropdown is open. The root default keeps the\n * trigger usable outside `KbqDropdownModule`'s injector; providing the token anywhere still wins over it.\n */\nexport const KBQ_DROPDOWN_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>('kbq-dropdown-scroll-strategy', {\n providedIn: 'root',\n factory: () => KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY(inject(Overlay))\n});\n\n/** @docs-private */\nexport function KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: KBQ_DROPDOWN_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY\n};\n\n/**\n * Marker provided by host components that create their own stacking context at\n * the default overlay z-index (e.g. `KbqTopBar`, `KbqNavbar` use\n * `position: sticky` + `z-index: $overlay-z-index`). When this token is\n * available in the injector tree, `KbqDropdownTrigger` defaults `demoteOverlay`\n * to `false` so the dropdown overlay is not lowered below the host.\n *\n * An explicit `[demoteOverlay]` binding on the trigger still wins.\n */\nexport const KBQ_DROPDOWN_HOST = new InjectionToken<unknown>('kbq-dropdown-host');\n\n/** Default top padding of the nested dropdown panel. */\nexport const NESTED_PANEL_TOP_PADDING = 4;\nexport const NESTED_PANEL_LEFT_PADDING = 8;\n\n/** Options for binding a passive event listener. */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });\n\nconst positionMap = {\n /** Maps CDK overlay x-anchor back to a dropdown x-position label. */\n overlayXToPosX: {\n start: 'after',\n center: 'center',\n end: 'before'\n } as Record<HorizontalConnectionPos, KbqDropdownPositionX>,\n\n /** Primary (overlapping) X positions: [originX, originFallbackX, overlayX, overlayFallbackX]. */\n xPositions: {\n before: ['end', 'start', 'end', 'start'],\n center: ['center', 'start', 'center', 'end'],\n after: ['start', 'end', 'start', 'end']\n } as Record<\n KbqDropdownPositionX,\n [HorizontalConnectionPos, HorizontalConnectionPos, HorizontalConnectionPos, HorizontalConnectionPos]\n >,\n\n /** Non-overlapping X positions: [originX, originFallbackX, overlayX, overlayFallbackX]. */\n nonOverlapXPositions: {\n before: ['start', 'end', 'end', 'start'],\n center: ['center', 'start', 'center', 'end'],\n after: ['end', 'start', 'start', 'end']\n } as Record<\n KbqDropdownPositionX,\n [HorizontalConnectionPos, HorizontalConnectionPos, HorizontalConnectionPos, HorizontalConnectionPos]\n >\n};\n\n/**\n * This directive is intended to be used in conjunction with an kbq-dropdown tag. It is\n * responsible for toggling the display of the provided dropdown instance.\n */\n@Directive({\n selector: `[kbqDropdownTriggerFor]`,\n providers: [kbqSiblingPopupProvider(KbqDropdownTrigger)],\n host: {\n class: 'kbq-dropdown-trigger',\n '[class.kbq-pressed]': 'opened',\n '(mousedown)': 'handleMousedown($event)',\n '(mouseleave)': 'handleMouseLeave($event)',\n '(keydown)': 'handleKeydown($event)',\n '(click)': 'handleClick($event)'\n },\n exportAs: 'kbqDropdownTrigger'\n})\nexport class KbqDropdownTrigger implements AfterContentInit, OnDestroy, KbqSiblingPopup {\n private overlay = inject(Overlay);\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private viewContainerRef = inject(ViewContainerRef);\n private scrollStrategy = inject(KBQ_DROPDOWN_SCROLL_STRATEGY);\n private parent = inject(KbqDropdown, { optional: true })!;\n private dropdownItemInstance = inject(KbqDropdownItem, { optional: true, self: true })!;\n private _dir = inject(Directionality, { optional: true });\n private changeDetectorRef = inject(ChangeDetectorRef);\n private focusMonitor = inject(FocusMonitor);\n\n private readonly overlayContainer = inject(OverlayContainer);\n private readonly renderer = inject(Renderer2);\n private readonly ngZone = inject(NgZone);\n\n protected readonly isBrowser = inject(Platform).isBrowser;\n private readonly host = inject(KBQ_DROPDOWN_HOST, { optional: true });\n lastDestroyReason: DropdownCloseReason;\n\n /**\n * Element whose width the panel should match. Defaults to the trigger itself.\n * Useful when the trigger is only a part of a larger control, e.g. `kbq-split-button`.\n * @docs-private\n */\n widthOrigin?: KbqPanelWidthOrigin;\n\n /** Position offset of the dropdown in the X axis. */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input({ transform: numberAttribute }) offsetX: number;\n\n /** Position offset of the dropdown in the Y axis. */\n // TODO: Skipped for migration because:\n // Class of this input is referenced in the signature of another class.\n @Input({ transform: numberAttribute }) offsetY: number;\n\n /** Data to be passed along to any lazily-rendered content. */\n // TODO: Skipped for migration because:\n // Class of this input is referenced in the signature of another class.\n @Input('kbqDropdownTriggerData') data: any;\n\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input() openByArrowDown: boolean = true;\n\n /**\n * Whether to demote the overlay container z-index so that dropdown overlays\n * sit below sibling overlays (tooltips, modals, etc.). Set to `false` to\n * keep the dropdown overlay at the default overlay container z-index.\n */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input({ transform: booleanAttribute }) demoteOverlay: boolean = true;\n\n /**\n * Whether focus should be restored when the menu is closed.\n * Note that disabling this option can have accessibility implications\n * and it's up to you to manage focus, if you decide to turn it off.\n */\n // TODO: Skipped for migration because:\n // Class of this input is referenced in the signature of another class.\n @Input('kbqDropdownTriggerRestoreFocus') restoreFocus: boolean = true;\n\n /** References the dropdown instance that the trigger is associated with. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input('kbqDropdownTriggerFor')\n get dropdown() {\n return this._dropdown;\n }\n\n set dropdown(dropdown: KbqDropdownPanel) {\n if (dropdown === this._dropdown) {\n return;\n }\n\n this._dropdown = dropdown;\n this.closeSubscription.unsubscribe();\n\n if (dropdown) {\n this.closeSubscription = dropdown.closed.asObservable().subscribe((reason) => {\n this.destroy(reason);\n\n // If a click closed the dropdown, we should close the entire chain of nested dropdowns.\n if (['click', 'tab'].includes(reason as string) && this.parent) {\n this.parent.closed.emit(reason);\n }\n });\n }\n }\n\n private _dropdown: KbqDropdownPanel;\n\n /** Event emitted when the associated dropdown is opened. */\n readonly dropdownOpened = output<void>();\n\n /**\n * Event emitted when the associated dropdown is closed. Kept as an `@Output()` EventEmitter\n * (not `output()`): `KbqOptionActionComponent` subscribes to it via `.pipe()` through the\n * KBQ_OPTION_ACTION_PARENT contract, which an `OutputEmitterRef` does not support — see #DS-5079.\n */\n @Output() readonly dropdownClosed = new EventEmitter<void>();\n\n /** Emits `true` when the dropdown opens and `false` when it closes. Part of the `KbqSiblingPopup` contract. */\n readonly openedChange: Observable<boolean> = merge(\n outputToObservable(this.dropdownOpened).pipe(map(() => true)),\n this.dropdownClosed.pipe(map(() => false))\n );\n\n // Tracking input type is necessary so it's possible to only auto-focus\n // the first item of the list when the dropdown is opened via the keyboard\n openedBy: Exclude<FocusOrigin, 'program' | null> | undefined;\n\n /** The text direction of the containing app. */\n get dir(): Direction {\n return this._dir?.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Whether the dropdown is open. */\n get opened(): boolean {\n return this._opened;\n }\n\n /**\n * Whether the dropdown overlay is currently attached. Part of the `KbqSiblingPopup` contract.\n *\n * `opened` is set synchronously right after the overlay is attached and, on close, only once the exit\n * animation is done — i.e. it stays `true` for the whole time the trigger is busy with its panel,\n * including the moment `destroy()` restores focus to the trigger.\n */\n get isAttached(): boolean {\n return this._opened;\n }\n\n private _opened: boolean = false;\n\n private portal: TemplatePortal;\n\n private overlayRef: OverlayRef | null = null;\n\n private closeSubscription = Subscription.EMPTY;\n\n private hoverSubscription = Subscription.EMPTY;\n\n private widthLockSubscription = Subscription.EMPTY;\n\n private classAddedToOverlayContainer: boolean = false;\n\n constructor() {\n const elementRef = this.elementRef;\n const dropdownItemInstance = this.dropdownItemInstance;\n\n elementRef.nativeElement.addEventListener('touchstart', this.handleTouchStart, passiveEventListenerOptions);\n\n if (dropdownItemInstance) {\n dropdownItemInstance.isNested = this.isNested();\n }\n\n if (this.host) {\n this.demoteOverlay = false;\n }\n }\n\n ngAfterContentInit() {\n this.check();\n this.handleHover();\n }\n\n ngOnDestroy() {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n\n this.elementRef.nativeElement.removeEventListener(\n 'touchstart',\n this.handleTouchStart,\n passiveEventListenerOptions\n );\n\n this.cleanUpSubscriptions();\n }\n\n /** Whether the dropdown triggers a nested dropdown or a top-level one. */\n isNested(): boolean {\n return !!(this.dropdownItemInstance && this.parent);\n }\n\n /** Toggles the dropdown between the open and closed states. */\n toggle(): void {\n return this._opened ? this.close() : this.open();\n }\n\n /** Opens the dropdown. */\n open(): void {\n if (this._opened) {\n return;\n }\n\n this.check();\n\n const overlayRef = this.createOverlay();\n const overlayConfig = overlayRef.getConfig();\n\n this.setPosition(overlayConfig.positionStrategy as FlexibleConnectedPositionStrategy);\n\n overlayConfig.hasBackdrop = this.dropdown.hasBackdrop ? !this.isNested() : this.dropdown.hasBackdrop;\n\n // The overlay is created once and reused, so the trigger has to be re-measured on every open\n // to keep up with layout changes between them.\n if (this.shouldMatchTriggerWidth) {\n overlayRef.updateSize(this.getOverlaySize());\n }\n\n overlayRef.attach(this.getPortal());\n\n if (this.dropdown.lazyContent) {\n this.dropdown.lazyContent.detach();\n\n this.dropdown.lazyContent.attach(this.data);\n }\n\n this.closeSubscription = this.closingActions().subscribe(() => this.close());\n\n this.init();\n\n if (this.dropdown instanceof KbqDropdown) {\n this.dropdown.startAnimation();\n }\n\n this.addClassToOverlayContainer();\n\n this.lockOverlayWidthForSearch();\n }\n\n /** Closes the dropdown. */\n close(): void {\n this.dropdown.closed.emit();\n\n this.removeClassFromOverlayContainer();\n }\n\n /**\n * Focuses the dropdown trigger.\n */\n focus(origin?: FocusOrigin, options?: FocusOptions) {\n // The trigger of a nested panel is an item of a search panel: the caret belongs to the query,\n // not to the item, so hand it back to the field instead of focusing this element.\n if (this.isNested() && this.parent.restoreFocus?.()) return;\n\n if (this.focusMonitor && origin) {\n this.focusMonitor.focusVia(this.elementRef.nativeElement, origin, options);\n } else {\n this.elementRef.nativeElement.focus();\n }\n }\n\n /** Handles mouse presses on the trigger. */\n handleMousedown(event: MouseEvent): void {\n // Since right or middle button clicks won't trigger the `click` event,\n // we shouldn't consider the dropdown as opened by mouse in those cases.\n this.openedBy = event.button === 0 ? 'mouse' : undefined;\n\n // Since clicking on the trigger won't close the dropdown if it opens a nested dropdown,\n // we should prevent focus from moving onto it via click to avoid the\n // highlight from lingering on the dropdown item.\n if (this.isNested()) {\n event.preventDefault();\n }\n }\n\n /**\n * Starts safe-area protection when the pointer leaves a trigger whose submenu is open, so a\n * sibling item crossed on the way to the submenu doesn't prematurely close it.\n */\n handleMouseLeave(event: MouseEvent): void {\n if (!this.isNested() || !this._opened || !this.isBrowser || !this.parent.safeArea() || !this.overlayRef) {\n return;\n }\n\n const panelRect = this.overlayRef.overlayElement.getBoundingClientRect();\n const triangle = getSafeTriangleVertices({ x: event.clientX, y: event.clientY }, panelRect);\n\n this.parent.activateSafeArea(this.dropdownItemInstance, triangle, panelRect, () => this.close());\n }\n\n /** Handles key presses on the trigger. */\n handleKeydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n\n if (keyCode === ENTER || keyCode === SPACE) {\n this.openedBy = 'keyboard';\n\n event.preventDefault();\n\n if (this.isNested()) {\n // Stop event propagation to avoid closing the parent dropdown.\n event.stopPropagation();\n\n this.open();\n } else {\n this.toggle();\n }\n }\n\n if (\n (this.isNested() &&\n ((keyCode === RIGHT_ARROW && this.dir === 'ltr') || (keyCode === LEFT_ARROW && this.dir === 'rtl'))) ||\n (!this.isNested() && keyCode === DOWN_ARROW && this.openByArrowDown)\n ) {\n event.preventDefault();\n\n this.openedBy = 'keyboard';\n this.open();\n }\n }\n\n /** Handles click events on the trigger. */\n handleClick(event: MouseEvent): void {\n if (this.isNested()) {\n // Stop event propagation to avoid closing the parent dropdown.\n event.stopPropagation();\n\n this.open();\n } else {\n this.toggle();\n }\n }\n\n /**\n * Handles touch start events on the trigger.\n * Needs to be an arrow function so we can easily use addEventListener and removeEventListener.\n */\n private handleTouchStart = () => (this.openedBy = 'touch');\n\n /** Closes the dropdown and does the necessary cleanup. */\n private destroy(reason: DropdownCloseReason) {\n if (!this.overlayRef || !this.opened) {\n return;\n }\n\n this.lastDestroyReason = reason;\n\n if (this.isNested()) {\n this.parent.deactivateSafeArea();\n }\n\n this.dropdown.resetActiveItem();\n\n this.closeSubscription.unsubscribe();\n this.widthLockSubscription.unsubscribe();\n this.overlayRef.detach();\n\n if (this.restoreFocus && (reason === 'keydown' || !this.openedBy || !this.isNested())) {\n this.focus(this.openedBy);\n }\n\n this.openedBy = undefined;\n\n if (this.dropdown instanceof KbqDropdown) {\n this.dropdown.resetAnimation();\n\n const animationSubscription = this.dropdown.animationDone.pipe(\n filter((event) => event.toState === 'void'),\n take(1)\n );\n\n if (this.dropdown.lazyContent) {\n // Wait for the exit animation to finish before detaching the content.\n animationSubscription\n .pipe(\n // Interrupt if the content got re-attached.\n takeUntil(this.dropdown.lazyContent.attached)\n )\n .subscribe({\n next: () => this.dropdown.lazyContent!.detach(),\n // No matter whether the content got re-attached, reset the this.dropdown.\n complete: () => this.setIsOpened(false)\n });\n } else {\n animationSubscription.subscribe(() => this.setIsOpened(false));\n }\n } else {\n this.setIsOpened(false);\n\n if (this.dropdown.lazyContent) {\n this.dropdown.lazyContent.detach();\n }\n }\n }\n\n /**\n * This method sets the dropdown state to open and focuses the first item if\n * the dropdown was opened via the keyboard.\n */\n private init(): void {\n this.dropdown.parent = this.isNested() ? this.parent : undefined;\n this.dropdown.direction = this.dir;\n\n // reset submenu items since they can be initialized as children of root menu\n if (this.parent && !this.dropdown.items.length) {\n this.dropdown.items.reset(Array.from(this.parent.items));\n this.dropdown.items.notifyOnChanges();\n }\n\n this.dropdown.focusFirstItem(this.openedBy || 'program');\n\n this.setIsOpened(true);\n }\n\n // set state rather than toggle to support triggers sharing a dropdown\n private setIsOpened(isOpen: boolean): void {\n if (isOpen !== this._opened) {\n this.changeDetectorRef.markForCheck();\n }\n\n this._opened = isOpen;\n\n if (this._opened) {\n // TODO: The 'emit' function requires a mandatory void argument\n this.dropdownOpened.emit();\n } else {\n // TODO: The 'emit' function requires a mandatory void argument\n this.dropdownClosed.emit();\n }\n\n if (this.isNested()) {\n this.dropdownItemInstance.highlighted = isOpen;\n }\n }\n\n /**\n * This method checks that a valid instance of KbqDropdown has been passed into\n * kbqDropdownTriggerFor. If not, an exception is thrown.\n */\n private check() {\n if (!this.dropdown) {\n throwKbqDropdownMissingError();\n }\n }\n\n /**\n * This method creates the overlay from the provided dropdown's template and saves its\n * OverlayRef so that it can be attached to the DOM when open is called.\n */\n private createOverlay(): OverlayRef {\n if (!this.overlayRef) {\n const config = this.getOverlayConfig();\n\n this.subscribeToPositions(config.positionStrategy as FlexibleConnectedPositionStrategy);\n this.overlayRef = this.overlay.create(config);\n\n // Consume the `keydownEvents` in order to prevent them from going to another overlay.\n // Ideally we'd also have our keyboard event logic in here, however doing so will\n // break anybody that may have implemented the `KbqDropdownPanel` themselves.\n this.overlayRef.keydownEvents().subscribe();\n }\n\n return this.overlayRef;\n }\n\n /** Whether the panel should be at least as wide as its trigger. */\n private get shouldMatchTriggerWidth(): boolean {\n const isVerticalTrigger = this.dropdown.overlapTriggerY && !this.dropdown.overlapTriggerX;\n\n return !this.isNested() && !isVerticalTrigger;\n }\n\n /**\n * This method builds the configuration object needed to create the overlay, the OverlayState.\n * @returns OverlayConfig\n */\n private getOverlayConfig(): OverlayConfig {\n return new OverlayConfig({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withTransformOriginOn('.kbq-dropdown__panel')\n .withPush(false),\n backdropClass: this.dropdown.backdropClass || 'cdk-overlay-transparent-backdrop',\n scrollStrategy: this.scrollStrategy(),\n direction: this.dir,\n ...(this.shouldMatchTriggerWidth && this.getOverlaySize())\n });\n }\n\n /**\n * Listens to changes in the position of the overlay and sets the correct classes\n * on the dropdown based on the new position. This ensures the animation origin is always\n * correct, even if a fallback position is used for the overlay.\n */\n private subscribeToPositions(position: FlexibleConnectedPositionStrategy): void {\n if (this.dropdown.setPositionClasses) {\n position.positionChanges.subscribe((change) => {\n const posX = positionMap.overlayXToPosX[change.connectionPair.overlayX];\n const posY: KbqDropdownPositionY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';\n\n this.dropdown.setPositionClasses!(posX, posY);\n });\n }\n }\n\n /**\n * Sets the appropriate positions on a position strategy\n * so the overlay connects with the trigger correctly.\n * @param positionStrategy Strategy whose position to update.\n */\n private setPosition(positionStrategy: FlexibleConnectedPositionStrategy) {\n let [originX, originFallbackX, overlayX, overlayFallbackX] = positionMap.xPositions[this.dropdown.xPosition];\n\n // eslint-disable-next-line prefer-const\n let [overlayY, overlayFallbackY, originY, originFallbackY]: VerticalConnectionPos[] =\n this.dropdown.yPosition === 'above'\n ? ['bottom', 'top', 'bottom', 'top']\n : ['top', 'bottom', 'top', 'bottom'];\n\n let offsetY = 0;\n let offsetX = 0;\n\n if (this.isNested()) {\n // When the dropdown is nested, it should always align itself\n // to the edges of the trigger, instead of overlapping it,\n // so 'center' is not applicable for nested panels — falls back to 'after'.\n const xPosition = this.dropdown.xPosition === 'center' ? 'after' : this.dropdown.xPosition;\n\n [originX, originFallbackX, overlayX, overlayFallbackX] = positionMap.nonOverlapXPositions[xPosition];\n offsetY = overlayY === 'bottom' ? NESTED_PANEL_TOP_PADDING : -NESTED_PANEL_TOP_PADDING;\n offsetX = NESTED_PANEL_LEFT_PADDING;\n } else {\n if (!this.dropdown.overlapTriggerY) {\n offsetY = defaultOffsetY;\n originY = overlayY === 'top' ? 'bottom' : 'top';\n originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';\n }\n\n if (!this.dropdown.overlapTriggerX) {\n [originX, originFallbackX, overlayX, overlayFallbackX] =\n positionMap.nonOverlapXPositions[this.dropdown.xPosition];\n }\n }\n\n const resolvedOffsetY = this.offsetY ?? (overlayY === 'top' ? offsetY : -offsetY);\n const resolvedFallbackOffsetY = this.offsetY ?? (overlayFallbackY === 'top' ? offsetY : -offsetY);\n\n positionStrategy.withPositions([\n { originX, originY, overlayX, overlayY, offsetY: resolvedOffsetY, offsetX: this.offsetX ?? -offsetX },\n {\n originX: originFallbackX,\n originY,\n overlayX: overlayFallbackX,\n overlayY,\n offsetY: resolvedOffsetY,\n offsetX: this.offsetX ?? offsetX\n },\n {\n originX,\n originY: originFallbackY,\n overlayX,\n overlayY: overlayFallbackY,\n offsetY: resolvedFallbackOffsetY,\n offsetX: this.offsetX ?? -offsetX\n },\n {\n originX: originFallbackX,\n originY: originFallbackY,\n overlayX: overlayFallbackX,\n overlayY: overlayFallbackY,\n offsetY: resolvedFallbackOffsetY,\n offsetX: this.offsetX ?? -offsetX\n }\n ]);\n }\n\n /** Cleans up the active subscriptions. */\n private cleanUpSubscriptions(): void {\n this.closeSubscription.unsubscribe();\n this.hoverSubscription.unsubscribe();\n this.widthLockSubscription.unsubscribe();\n }\n\n /** Returns a stream that emits whenever an action that should close the dropdown occurs. */\n private closingActions() {\n const backdrop = this.overlayRef!.backdropClick();\n const outsidePointerEvents = this.overlayRef!.outsidePointerEvents();\n const detachments = this.overlayRef!.detachments();\n const parentClose = this.parent ? this.parent.closed : observableOf();\n const hover = this.parent\n ? this.parent.hovered().pipe(\n filter((active) => active !== this.dropdownItemInstance),\n filter(() => this._opened),\n // While a safe area protects this dropdown, closing is driven by the safe area\n // itself instead: either it resolves on its own (see `handleMouseLeave()`), or a\n // forced switch to a different nested trigger closes this one via `onExit` — always\n // before the new trigger opens, so the two don't race over animation state shared by\n // triggers pointing at the same dropdown (see `KbqDropdown.activateSafeArea()`).\n filter(() => !this.parent.isSafeAreaActive())\n )\n : observableOf();\n\n return merge(\n backdrop,\n outsidePointerEvents,\n parentClose as Observable<DropdownCloseReason>,\n hover,\n detachments\n );\n }\n\n /** Handles the cases where the user hovers over the trigger. */\n private handleHover() {\n // Subscribe to changes in the hovered item in order to toggle the panel.\n if (!this.isNested()) {\n return;\n }\n\n this.hoverSubscription = merge(\n this.parent.hovered().pipe(\n filter((active) => active === this.dropdownItemInstance && !active.disabled),\n // While a *different* trigger's safe area is active, opening is deferred to\n // `onSwitchTarget()` below, which only fires once that trigger has actually closed.\n // Hovering the trigger that owns the active safe area (coming back to it) still\n // passes through immediately — `open()` is a no-op there, but it lets the safe area be\n // cancelled below.\n filter(() => !this.parent.isSafeAreaActive() || this.parent.isSafeAreaOwner(this.dropdownItemInstance))\n ),\n this.parent.onSwitchTarget().pipe(filter((active) => active === this.dropdownItemInstance))\n )\n // Since we might have multiple competing triggers for the same dropdown (e.g. a nested dropdown\n // with different data and triggers), we have to delay it by a tick to ensure that\n // it won't be closed immediately after it is opened.\n .pipe(delay(0, asapScheduler))\n .subscribe(() => {\n // Coming back to this trigger cancels any safe-area protection left over from a\n // previous `mouseleave`.\n this.parent.deactivateSafeArea();\n\n this.openedBy = 'mouse';\n\n // If the same dropdown is used between multiple triggers, it might still be animating\n // while the new trigger tries to re-open it. Wait for the animation to finish\n // before doing so. Also interrupt if the user moves to another item.\n if (this.dropdown instanceof KbqDropdown && this.dropdown.isAnimating) {\n // We need the `delay(0)` here in order to avoid\n // 'changed after checked' errors in some cases. See #12194.\n this.dropdown.animationDone\n .pipe(take(1), delay(0, asapScheduler), takeUntil(this.parent.hovered()))\n // eslint-disable-next-line rxjs-x/no-nested-subscribe\n .subscribe(() => this.open());\n } else {\n this.open();\n }\n });\n }\n\n /** Gets the portal that should be attached to the overlay. */\n private getPortal(): TemplatePortal {\n // Note that we can avoid this check by keeping the portal on the dropdown panel.\n // While it would be cleaner, we'd have to introduce another required method on\n // `KbqDropdownPanel`, making it harder to consume.\n if (!this.portal || this.portal.templateRef !== this.dropdown.templateRef) {\n this.portal = new TemplatePortal(this.dropdown.templateRef, this.viewContainerRef);\n }\n\n return this.portal;\n }\n\n private getOverlaySize(): KbqResolvedPanelWidth {\n return kbqResolvePanelWidth(\n this.dropdown.panelWidth?.(),\n this.dropdown.panelMinWidth?.(),\n this.isBrowser ? kbqGetPanelWidthOrigin(this.widthOrigin ?? this.elementRef) : 0\n );\n }\n\n /**\n * When the panel hosts a search field, its content-sized width would jump as the field's cleaner\n * appears or options are filtered. Freeze the width at the opened (empty) state so it stays stable\n * — mirrors `KbqAbstractSelect.lockOverlayWidthForSearch`.\n */\n private lockOverlayWidthForSearch(): void {\n if (\n !this.isBrowser ||\n !this.shouldMatchTriggerWidth ||\n !(this.dropdown instanceof KbqDropdown) ||\n !this.dropdown.hasSearch()\n ) {\n return;\n }\n\n this.widthLockSubscription = this.ngZone.onStable\n .asObservable()\n .pipe(take(1))\n .subscribe(() => this.pinOverlayWidth());\n }\n\n /** Freezes the overlay pane at its rendered width. */\n private pinOverlayWidth(): void {\n if (!this._opened || !this.overlayRef) return;\n\n // An explicit or `'auto'` panelWidth already fixes the pane; only pin content-sized panels.\n if (this.getOverlaySize().width !== '') return;\n\n // Measure the pane, not `.kbq-dropdown__panel`: the panel scales in via `@transformDropdown`,\n // so its `getBoundingClientRect()` can read a mid-animation (scaled) width. The pane is\n // transform-immune and the panel fills it.\n const width = this.overlayRef.overlayElement.getBoundingClientRect().width;\n\n if (width) {\n this.overlayRef.updateSize({ width });\n }\n }\n\n private addClassToOverlayContainer() {\n if (!this.demoteOverlay) return;\n\n const overlayContainer = this.overlayContainer?.getContainerElement();\n\n if (overlayContainer.childNodes.length === 1) {\n this.classAddedToOverlayContainer = true;\n\n this.renderer.addClass(overlayContainer, 'cdk-overlay-container_dropdown');\n }\n }\n\n private removeClassFromOverlayContainer() {\n if (this.classAddedToOverlayContainer) {\n this.renderer.removeClass(this.overlayContainer.getContainerElement(), 'cdk-overlay-container_dropdown');\n }\n }\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { NgModule } from '@angular/core';\nimport { KbqIconModule } from '@koobiq/components/icon';\nimport { KbqDropdownContent } from './dropdown-content.directive';\nimport { KbqDropdownItemAction } from './dropdown-item-action';\nimport { KbqDropdownItem } from './dropdown-item.component';\nimport { KbqDropdownSearch } from './dropdown-search';\nimport { KbqDropdownTrigger } from './dropdown-trigger.directive';\nimport { KbqDropdown, KbqDropdownFooter, KbqDropdownStaticContent } from './dropdown.component';\n\n@NgModule({\n imports: [\n OverlayModule,\n KbqIconModule,\n KbqDropdownStaticContent,\n KbqDropdown,\n KbqDropdownItem,\n KbqDropdownItemAction,\n KbqDropdownTrigger,\n KbqDropdownContent,\n KbqDropdownFooter,\n KbqDropdownSearch\n ],\n exports: [\n KbqDropdown,\n KbqDropdownItem,\n KbqDropdownItemAction,\n KbqDropdownTrigger,\n KbqDropdownContent,\n KbqDropdownStaticContent,\n KbqDropdownFooter,\n KbqDropdownSearch\n ]\n})\nexport class KbqDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["passiveEventListenerOptions","ENTER","DOWN_ARROW","observableOf"],"mappings":";;;;;;;;;;;;;;;;;;AAWA;;;AAGG;AACI,MAAM,qBAAqB,GAG9B;AACA;;;;;;;AAOG;AACH,IAAA,iBAAiB,EAAE,OAAO,CAAC,mBAAmB,EAAE;AAC5C,QAAA,KAAK,CACD,MAAM,EACN,KAAK,CAAC;AACF,YAAA,OAAO,EAAE,CAAC;AACV,YAAA,SAAS,EAAE;AACd,SAAA,CAAC,CACL;AACD,QAAA,UAAU,CACN,eAAe,EACf,KAAK,CAAC;AACF,YAAA,KAAK,CAAC,wBAAwB,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,O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