@hermes-ui/angular 0.1.4

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 (539) hide show
  1. package/README.md +52 -0
  2. package/accordion/_accordion.clarity.scss +81 -0
  3. package/accordion/_properties.accordion.scss +45 -0
  4. package/accordion/_variables.accordion.scss +91 -0
  5. package/addons/a11y/README.md +157 -0
  6. package/addons/a11y/forms/required-field-legend.component.scss +17 -0
  7. package/addons/card-container/card/appfx-card.component.scss +137 -0
  8. package/addons/card-container/container/appfx-card-container.component.scss +17 -0
  9. package/addons/card-container/settings/appfx-card-container-settings.component.scss +62 -0
  10. package/addons/certificate-viewer/certificate-viewer/certificate-viewer.component.scss +69 -0
  11. package/addons/certificate-viewer/certificate-viewer-details/certificate-viewer-details.component.scss +49 -0
  12. package/addons/certificate-viewer/certificate-viewer-general/certificate-viewer-general.component.scss +38 -0
  13. package/addons/datagrid/README.md +289 -0
  14. package/addons/datagrid/addons/action-bar/datagrid-action-bar.component.scss +81 -0
  15. package/addons/datagrid/addons/column-toggle/datagrid-column-toggle.component.scss +99 -0
  16. package/addons/datagrid/addons/export/export-datagrid.component.scss +9 -0
  17. package/addons/datagrid/datagrid.component.scss +339 -0
  18. package/addons/datagrid-filters/README.md +223 -0
  19. package/addons/datagrid-filters/advanced-filters/date-time-filter.component.scss +10 -0
  20. package/addons/datagrid-filters/advanced-filters/enum-filter.component.scss +40 -0
  21. package/addons/datagrid-filters/advanced-filters/users-filter.component.scss +11 -0
  22. package/addons/datagrid-filters/common-styles.scss +98 -0
  23. package/addons/datagrid-filters/composite-filters.component.scss +26 -0
  24. package/addons/datagrid-filters/datagrid-filters.component.scss +22 -0
  25. package/addons/datagrid-filters/manage-filters/manage-filter.component.scss +42 -0
  26. package/addons/dialog/README.md +112 -0
  27. package/addons/dialog/multi-page-dialog.a11y.scss +203 -0
  28. package/addons/dialog/multi-page-dialog.component.scss +102 -0
  29. package/addons/dialog/toggle-component/toggle.component.scss +15 -0
  30. package/addons/drag-and-drop/README.md +48 -0
  31. package/addons/menu/menu.component.scss +120 -0
  32. package/addons/property-view/components/property-view-category.component.scss +38 -0
  33. package/addons/property-view/components/property-view-message.component.scss +48 -0
  34. package/addons/property-view/components/property-view-property.component.scss +122 -0
  35. package/addons/property-view/components/property-view-section.component.scss +59 -0
  36. package/addons/property-view/components/property-view.component.scss +23 -0
  37. package/addons/stepper/stepper.component.scss +53 -0
  38. package/addons/tabs/tab-links/tab-links.component.scss +61 -0
  39. package/addons/tabs/tabs.a11y.scss +26 -0
  40. package/addons/tabs/tabs.component.scss +95 -0
  41. package/addons/theme-builder/README.md +70 -0
  42. package/addons/theme-builder/theme-builder.component.scss +194 -0
  43. package/addons/translate/README.md +124 -0
  44. package/addons/var/debug/workflow-model-monitor.component.scss +50 -0
  45. package/addons/var/error/error.component.scss +38 -0
  46. package/addons/var/spinner/spinner.component.scss +33 -0
  47. package/addons/wizard/summary/summary.component.scss +22 -0
  48. package/addons/wizard/wizard.component.scss +251 -0
  49. package/button/_buttons.clarity.scss +388 -0
  50. package/button/_mixins.buttons.scss +241 -0
  51. package/button/_properties.buttons.scss +387 -0
  52. package/button/_properties.toggles.scss +35 -0
  53. package/button/_variables.buttons.scss +905 -0
  54. package/button/_variables.toggles.scss +41 -0
  55. package/button/button-group/_button-group.clarity.scss +202 -0
  56. package/collapsible-panel/_mixins.collapsible-panel.scss +189 -0
  57. package/collapsible-panel/_properties.collapsible-panel.scss +42 -0
  58. package/collapsible-panel/_variables.collapsible-panel.scss +40 -0
  59. package/data/_mixins.tables.scss +114 -0
  60. package/data/_properties.tables.scss +77 -0
  61. package/data/_tables.clarity.scss +120 -0
  62. package/data/_variables.tables.scss +42 -0
  63. package/data/datagrid/_datagrid.clarity.scss +1871 -0
  64. package/data/datagrid/_mixins.datagrid.scss +102 -0
  65. package/data/datagrid/_properties.datagrid.scss +98 -0
  66. package/data/datagrid/_variables.datagrid.scss +98 -0
  67. package/data/stack-view/_properties.stack-view.scss +50 -0
  68. package/data/stack-view/_stack-view.clarity.scss +267 -0
  69. package/data/stack-view/_variables.stack-view.scss +32 -0
  70. package/data/tree-view/_properties.tree-view.scss +41 -0
  71. package/data/tree-view/_tree-view.clarity.scss +281 -0
  72. package/data/tree-view/_variables.tree-view.scss +51 -0
  73. package/emphasis/alert/_alert.clarity.scss +467 -0
  74. package/emphasis/alert/_mixins.alert.scss +96 -0
  75. package/emphasis/alert/_properties.alert.scss +183 -0
  76. package/emphasis/alert/_variables.alert.scss +502 -0
  77. package/emphasis/badge/_badges.clarity.scss +61 -0
  78. package/emphasis/badge/_mixins.bades.scss +34 -0
  79. package/emphasis/badge/_properties.badges.scss +82 -0
  80. package/emphasis/badge/_variables.badges.scss +160 -0
  81. package/emphasis/label/_labels.clarity.scss +179 -0
  82. package/emphasis/label/_mixins.label.scss +77 -0
  83. package/emphasis/label/_properties.label.scss +105 -0
  84. package/emphasis/label/_variables.label.scss +181 -0
  85. package/fesm2022/hermes-ui-angular-accordion.mjs +355 -0
  86. package/fesm2022/hermes-ui-angular-accordion.mjs.map +1 -0
  87. package/fesm2022/hermes-ui-angular-addons-a11y.mjs +544 -0
  88. package/fesm2022/hermes-ui-angular-addons-a11y.mjs.map +1 -0
  89. package/fesm2022/hermes-ui-angular-addons-card-container.mjs +1082 -0
  90. package/fesm2022/hermes-ui-angular-addons-card-container.mjs.map +1 -0
  91. package/fesm2022/hermes-ui-angular-addons-certificate-viewer.mjs +2520 -0
  92. package/fesm2022/hermes-ui-angular-addons-certificate-viewer.mjs.map +1 -0
  93. package/fesm2022/hermes-ui-angular-addons-datagrid-filters.mjs +2818 -0
  94. package/fesm2022/hermes-ui-angular-addons-datagrid-filters.mjs.map +1 -0
  95. package/fesm2022/hermes-ui-angular-addons-datagrid.mjs +3131 -0
  96. package/fesm2022/hermes-ui-angular-addons-datagrid.mjs.map +1 -0
  97. package/fesm2022/hermes-ui-angular-addons-dialog.mjs +386 -0
  98. package/fesm2022/hermes-ui-angular-addons-dialog.mjs.map +1 -0
  99. package/fesm2022/hermes-ui-angular-addons-drag-and-drop.mjs +78 -0
  100. package/fesm2022/hermes-ui-angular-addons-drag-and-drop.mjs.map +1 -0
  101. package/fesm2022/hermes-ui-angular-addons-menu.mjs +559 -0
  102. package/fesm2022/hermes-ui-angular-addons-menu.mjs.map +1 -0
  103. package/fesm2022/hermes-ui-angular-addons-property-view.mjs +1142 -0
  104. package/fesm2022/hermes-ui-angular-addons-property-view.mjs.map +1 -0
  105. package/fesm2022/hermes-ui-angular-addons-stepper.mjs +716 -0
  106. package/fesm2022/hermes-ui-angular-addons-stepper.mjs.map +1 -0
  107. package/fesm2022/hermes-ui-angular-addons-tabs.mjs +539 -0
  108. package/fesm2022/hermes-ui-angular-addons-tabs.mjs.map +1 -0
  109. package/fesm2022/hermes-ui-angular-addons-testing.mjs +2010 -0
  110. package/fesm2022/hermes-ui-angular-addons-testing.mjs.map +1 -0
  111. package/fesm2022/hermes-ui-angular-addons-theme-builder.mjs +922 -0
  112. package/fesm2022/hermes-ui-angular-addons-theme-builder.mjs.map +1 -0
  113. package/fesm2022/hermes-ui-angular-addons-translate.mjs +295 -0
  114. package/fesm2022/hermes-ui-angular-addons-translate.mjs.map +1 -0
  115. package/fesm2022/hermes-ui-angular-addons-var.mjs +2028 -0
  116. package/fesm2022/hermes-ui-angular-addons-var.mjs.map +1 -0
  117. package/fesm2022/hermes-ui-angular-addons-wizard.mjs +610 -0
  118. package/fesm2022/hermes-ui-angular-addons-wizard.mjs.map +1 -0
  119. package/fesm2022/hermes-ui-angular-addons-workflow-strings.mjs +121 -0
  120. package/fesm2022/hermes-ui-angular-addons-workflow-strings.mjs.map +1 -0
  121. package/fesm2022/hermes-ui-angular-addons-workflow.mjs +88 -0
  122. package/fesm2022/hermes-ui-angular-addons-workflow.mjs.map +1 -0
  123. package/fesm2022/hermes-ui-angular-button.mjs +719 -0
  124. package/fesm2022/hermes-ui-angular-button.mjs.map +1 -0
  125. package/fesm2022/hermes-ui-angular-collapsible-panel.mjs +201 -0
  126. package/fesm2022/hermes-ui-angular-collapsible-panel.mjs.map +1 -0
  127. package/fesm2022/hermes-ui-angular-data-datagrid.mjs +8045 -0
  128. package/fesm2022/hermes-ui-angular-data-datagrid.mjs.map +1 -0
  129. package/fesm2022/hermes-ui-angular-data-stack-view.mjs +442 -0
  130. package/fesm2022/hermes-ui-angular-data-stack-view.mjs.map +1 -0
  131. package/fesm2022/hermes-ui-angular-data-tree-view.mjs +1106 -0
  132. package/fesm2022/hermes-ui-angular-data-tree-view.mjs.map +1 -0
  133. package/fesm2022/hermes-ui-angular-data.mjs +40 -0
  134. package/fesm2022/hermes-ui-angular-data.mjs.map +1 -0
  135. package/fesm2022/hermes-ui-angular-emphasis-alert.mjs +624 -0
  136. package/fesm2022/hermes-ui-angular-emphasis-alert.mjs.map +1 -0
  137. package/fesm2022/hermes-ui-angular-emphasis-badge.mjs +69 -0
  138. package/fesm2022/hermes-ui-angular-emphasis-badge.mjs.map +1 -0
  139. package/fesm2022/hermes-ui-angular-emphasis-common.mjs +25 -0
  140. package/fesm2022/hermes-ui-angular-emphasis-common.mjs.map +1 -0
  141. package/fesm2022/hermes-ui-angular-emphasis-label.mjs +105 -0
  142. package/fesm2022/hermes-ui-angular-emphasis-label.mjs.map +1 -0
  143. package/fesm2022/hermes-ui-angular-emphasis.mjs +41 -0
  144. package/fesm2022/hermes-ui-angular-emphasis.mjs.map +1 -0
  145. package/fesm2022/hermes-ui-angular-forms-checkbox.mjs +279 -0
  146. package/fesm2022/hermes-ui-angular-forms-checkbox.mjs.map +1 -0
  147. package/fesm2022/hermes-ui-angular-forms-combobox.mjs +1775 -0
  148. package/fesm2022/hermes-ui-angular-forms-combobox.mjs.map +1 -0
  149. package/fesm2022/hermes-ui-angular-forms-common.mjs +1251 -0
  150. package/fesm2022/hermes-ui-angular-forms-common.mjs.map +1 -0
  151. package/fesm2022/hermes-ui-angular-forms-datalist.mjs +263 -0
  152. package/fesm2022/hermes-ui-angular-forms-datalist.mjs.map +1 -0
  153. package/fesm2022/hermes-ui-angular-forms-datepicker.mjs +3274 -0
  154. package/fesm2022/hermes-ui-angular-forms-datepicker.mjs.map +1 -0
  155. package/fesm2022/hermes-ui-angular-forms-file-input.mjs +826 -0
  156. package/fesm2022/hermes-ui-angular-forms-file-input.mjs.map +1 -0
  157. package/fesm2022/hermes-ui-angular-forms-input.mjs +153 -0
  158. package/fesm2022/hermes-ui-angular-forms-input.mjs.map +1 -0
  159. package/fesm2022/hermes-ui-angular-forms-native-select.mjs +153 -0
  160. package/fesm2022/hermes-ui-angular-forms-native-select.mjs.map +1 -0
  161. package/fesm2022/hermes-ui-angular-forms-number-input.mjs +236 -0
  162. package/fesm2022/hermes-ui-angular-forms-number-input.mjs.map +1 -0
  163. package/fesm2022/hermes-ui-angular-forms-password.mjs +233 -0
  164. package/fesm2022/hermes-ui-angular-forms-password.mjs.map +1 -0
  165. package/fesm2022/hermes-ui-angular-forms-radio.mjs +224 -0
  166. package/fesm2022/hermes-ui-angular-forms-radio.mjs.map +1 -0
  167. package/fesm2022/hermes-ui-angular-forms-range.mjs +186 -0
  168. package/fesm2022/hermes-ui-angular-forms-range.mjs.map +1 -0
  169. package/fesm2022/hermes-ui-angular-forms-select.mjs +606 -0
  170. package/fesm2022/hermes-ui-angular-forms-select.mjs.map +1 -0
  171. package/fesm2022/hermes-ui-angular-forms-textarea.mjs +136 -0
  172. package/fesm2022/hermes-ui-angular-forms-textarea.mjs.map +1 -0
  173. package/fesm2022/hermes-ui-angular-forms.mjs +105 -0
  174. package/fesm2022/hermes-ui-angular-forms.mjs.map +1 -0
  175. package/fesm2022/hermes-ui-angular-icon.mjs +7413 -0
  176. package/fesm2022/hermes-ui-angular-icon.mjs.map +1 -0
  177. package/fesm2022/hermes-ui-angular-layout-breadcrumbs.mjs +120 -0
  178. package/fesm2022/hermes-ui-angular-layout-breadcrumbs.mjs.map +1 -0
  179. package/fesm2022/hermes-ui-angular-layout-main-container.mjs +100 -0
  180. package/fesm2022/hermes-ui-angular-layout-main-container.mjs.map +1 -0
  181. package/fesm2022/hermes-ui-angular-layout-nav.mjs +582 -0
  182. package/fesm2022/hermes-ui-angular-layout-nav.mjs.map +1 -0
  183. package/fesm2022/hermes-ui-angular-layout-tabs.mjs +807 -0
  184. package/fesm2022/hermes-ui-angular-layout-tabs.mjs.map +1 -0
  185. package/fesm2022/hermes-ui-angular-layout-vertical-nav.mjs +507 -0
  186. package/fesm2022/hermes-ui-angular-layout-vertical-nav.mjs.map +1 -0
  187. package/fesm2022/hermes-ui-angular-layout.mjs +44 -0
  188. package/fesm2022/hermes-ui-angular-layout.mjs.map +1 -0
  189. package/fesm2022/hermes-ui-angular-modal.mjs +619 -0
  190. package/fesm2022/hermes-ui-angular-modal.mjs.map +1 -0
  191. package/fesm2022/hermes-ui-angular-popover-common.mjs +1371 -0
  192. package/fesm2022/hermes-ui-angular-popover-common.mjs.map +1 -0
  193. package/fesm2022/hermes-ui-angular-popover-dropdown.mjs +492 -0
  194. package/fesm2022/hermes-ui-angular-popover-dropdown.mjs.map +1 -0
  195. package/fesm2022/hermes-ui-angular-popover-signpost.mjs +494 -0
  196. package/fesm2022/hermes-ui-angular-popover-signpost.mjs.map +1 -0
  197. package/fesm2022/hermes-ui-angular-popover-tooltip.mjs +293 -0
  198. package/fesm2022/hermes-ui-angular-popover-tooltip.mjs.map +1 -0
  199. package/fesm2022/hermes-ui-angular-popover.mjs +41 -0
  200. package/fesm2022/hermes-ui-angular-popover.mjs.map +1 -0
  201. package/fesm2022/hermes-ui-angular-progress-progress-bars.mjs +217 -0
  202. package/fesm2022/hermes-ui-angular-progress-progress-bars.mjs.map +1 -0
  203. package/fesm2022/hermes-ui-angular-progress-spinner.mjs +132 -0
  204. package/fesm2022/hermes-ui-angular-progress-spinner.mjs.map +1 -0
  205. package/fesm2022/hermes-ui-angular-stepper.mjs +694 -0
  206. package/fesm2022/hermes-ui-angular-stepper.mjs.map +1 -0
  207. package/fesm2022/hermes-ui-angular-timeline.mjs +316 -0
  208. package/fesm2022/hermes-ui-angular-timeline.mjs.map +1 -0
  209. package/fesm2022/hermes-ui-angular-toast.mjs +373 -0
  210. package/fesm2022/hermes-ui-angular-toast.mjs.map +1 -0
  211. package/fesm2022/hermes-ui-angular-utils-conditional.mjs +351 -0
  212. package/fesm2022/hermes-ui-angular-utils-conditional.mjs.map +1 -0
  213. package/fesm2022/hermes-ui-angular-utils-loading.mjs +107 -0
  214. package/fesm2022/hermes-ui-angular-utils-loading.mjs.map +1 -0
  215. package/fesm2022/hermes-ui-angular-utils.mjs +2086 -0
  216. package/fesm2022/hermes-ui-angular-utils.mjs.map +1 -0
  217. package/fesm2022/hermes-ui-angular-wizard.mjs +3074 -0
  218. package/fesm2022/hermes-ui-angular-wizard.mjs.map +1 -0
  219. package/fesm2022/hermes-ui-angular.mjs +130 -0
  220. package/fesm2022/hermes-ui-angular.mjs.map +1 -0
  221. package/forms/combobox/_combobox.clarity.scss +330 -0
  222. package/forms/combobox/_properties.combobox.scss +46 -0
  223. package/forms/combobox/_variables.combobox.scss +32 -0
  224. package/forms/datepicker/_datepicker.clarity.scss +259 -0
  225. package/forms/datepicker/_mixins.datepicker.scss +89 -0
  226. package/forms/datepicker/_properties.datepicker.scss +46 -0
  227. package/forms/datepicker/_variables.datepicker.scss +74 -0
  228. package/forms/styles/_checkbox.clarity.scss +193 -0
  229. package/forms/styles/_containers.clarity.scss +230 -0
  230. package/forms/styles/_datalist.clarity.scss +47 -0
  231. package/forms/styles/_file-input.clarity.scss +134 -0
  232. package/forms/styles/_file.clarity.scss +52 -0
  233. package/forms/styles/_form.clarity.scss +87 -0
  234. package/forms/styles/_input-group.clarity.scss +126 -0
  235. package/forms/styles/_input.clarity.scss +83 -0
  236. package/forms/styles/_mixins.forms.scss +193 -0
  237. package/forms/styles/_native-select.clarity.scss +178 -0
  238. package/forms/styles/_number-input.clarity.scss +58 -0
  239. package/forms/styles/_password.clarity.scss +26 -0
  240. package/forms/styles/_properties.forms.scss +180 -0
  241. package/forms/styles/_radio.clarity.scss +120 -0
  242. package/forms/styles/_range.clarity.scss +124 -0
  243. package/forms/styles/_select.clarity.scss +158 -0
  244. package/forms/styles/_textarea.clarity.scss +71 -0
  245. package/forms/styles/_toggles.clarity.scss +209 -0
  246. package/forms/styles/_variables.forms.scss +156 -0
  247. package/hermes-ui.scss +7 -0
  248. package/icon/icon.component.scss +247 -0
  249. package/image/_icons.clarity.scss +101 -0
  250. package/image/_images.clarity.scss +42 -0
  251. package/image/_mixins.images.scss +11 -0
  252. package/layout/_card.clarity.scss +318 -0
  253. package/layout/_login.clarity.scss +240 -0
  254. package/layout/_properties.card.scss +39 -0
  255. package/layout/_properties.login.scss +32 -0
  256. package/layout/_variables.card.scss +24 -0
  257. package/layout/_variables.login.scss +22 -0
  258. package/layout/breadcrumbs/_breadcrumbs.clarity.scss +60 -0
  259. package/layout/breadcrumbs/_properties.breadcrumbs.scss +18 -0
  260. package/layout/breadcrumbs/_variables.breadcrumbs.scss +11 -0
  261. package/layout/grid/_grid.scss +23 -0
  262. package/layout/grid/grid/_grid.scss +39 -0
  263. package/layout/grid/mixins/_breakpoint.scss +83 -0
  264. package/layout/grid/mixins/_clearfix.scss +13 -0
  265. package/layout/grid/mixins/_grid-framework.scss +91 -0
  266. package/layout/grid/mixins/_grid.scss +39 -0
  267. package/layout/grid/utilities/_align.scss +30 -0
  268. package/layout/grid/utilities/_clearfix.scss +12 -0
  269. package/layout/grid/utilities/_display.scss +18 -0
  270. package/layout/grid/utilities/_flex.scss +222 -0
  271. package/layout/grid/utilities/_float.scss +26 -0
  272. package/layout/grid/utilities/_visibility.scss +60 -0
  273. package/layout/main-container/_layout.clarity.scss +87 -0
  274. package/layout/main-container/_properties.header.scss +55 -0
  275. package/layout/main-container/_variables.header.scss +32 -0
  276. package/layout/nav/_header.clarity.scss +40 -0
  277. package/layout/nav/_links.clarity.scss +84 -0
  278. package/layout/nav/_mixins.header.scss +332 -0
  279. package/layout/nav/_mixins.responsive-nav.scss +75 -0
  280. package/layout/nav/_nav.clarity.scss +100 -0
  281. package/layout/nav/_properties.nav.scss +27 -0
  282. package/layout/nav/_properties.responsive-nav.scss +23 -0
  283. package/layout/nav/_properties.subnav.scss +19 -0
  284. package/layout/nav/_responsive-nav.clarity.scss +490 -0
  285. package/layout/nav/_subnav.clarity.scss +48 -0
  286. package/layout/nav/_variables.nav.scss +13 -0
  287. package/layout/nav/_variables.responsive-nav.scss +28 -0
  288. package/layout/nav/_variables.subnav.scss +21 -0
  289. package/layout/tabs/_mixins.tabs.scss +41 -0
  290. package/layout/tabs/_properties.tabs.scss +25 -0
  291. package/layout/tabs/_tabs.clarity.scss +110 -0
  292. package/layout/tabs/_variables.tabs.scss +17 -0
  293. package/layout/vertical-nav/_mixins.vertical-nav.scss +52 -0
  294. package/layout/vertical-nav/_properties.vertical-nav.scss +73 -0
  295. package/layout/vertical-nav/_variables.vertical-nav.scss +52 -0
  296. package/layout/vertical-nav/_vertical-nav.clarity.scss +469 -0
  297. package/main.scss +14 -0
  298. package/modal/_modal.clarity.scss +379 -0
  299. package/modal/_properties.modal.scss +57 -0
  300. package/modal/_variables.modal.scss +41 -0
  301. package/package.json +325 -0
  302. package/popover/common/README.md +112 -0
  303. package/popover/common/_popover.clarity.scss +28 -0
  304. package/popover/dropdown/_dropdown.clarity.scss +326 -0
  305. package/popover/dropdown/_menu-mixins.clarity.scss +132 -0
  306. package/popover/dropdown/_properties.dropdown.scss +50 -0
  307. package/popover/dropdown/_variables.dropdown.scss +36 -0
  308. package/popover/signpost/_properties.signpost.scss +34 -0
  309. package/popover/signpost/_signposts.clarity.scss +414 -0
  310. package/popover/signpost/_variables.signpost.scss +21 -0
  311. package/popover/tooltip/_mixins.tooltip.scss +186 -0
  312. package/popover/tooltip/_properties.tooltip.scss +28 -0
  313. package/popover/tooltip/_tooltips.clarity.scss +122 -0
  314. package/popover/tooltip/_variables.tooltip.scss +20 -0
  315. package/progress/progress-bars/_progress-bars.clarity.scss +616 -0
  316. package/progress/progress-bars/_properties.progress-bars.scss +24 -0
  317. package/progress/progress-bars/_variables.progress-bars.scss +15 -0
  318. package/progress/progress-bars/utils/_mixins.clarity.scss +18 -0
  319. package/progress/spinner/_mixins.spinner.scss +30 -0
  320. package/progress/spinner/_properties.spinner.scss +37 -0
  321. package/progress/spinner/_spinner.clarity.scss +148 -0
  322. package/progress/spinner/_variables.spinner.scss +25 -0
  323. package/schematics/collection.json +14 -0
  324. package/stepper/_properties.stepper.scss +29 -0
  325. package/stepper/_stepper.clarity.scss +184 -0
  326. package/stepper/_variables.stepper.scss +13 -0
  327. package/styles/_a11y.scss +14 -0
  328. package/styles/_close.clarity.scss +60 -0
  329. package/styles/_components.clarity.scss +189 -0
  330. package/styles/_mixins.scss +460 -0
  331. package/styles/_normalize.scss +292 -0
  332. package/styles/_reboot.clarity.scss +374 -0
  333. package/styles/_variables.clarity.scss +139 -0
  334. package/styles/core/base/base.element.scss +97 -0
  335. package/styles/core/global.scss +12 -0
  336. package/styles/core/layout/_alignments.scss +18 -0
  337. package/styles/core/layout/_container.scss +29 -0
  338. package/styles/core/layout/_display.scss +58 -0
  339. package/styles/core/layout/_optimize.scss +60 -0
  340. package/styles/core/layout/_shadow-dom.scss +47 -0
  341. package/styles/core/layout/_spacing.scss +31 -0
  342. package/styles/core/layout/_type-grid.scss +66 -0
  343. package/styles/core/layout/_type-horizontal.scss +33 -0
  344. package/styles/core/layout/_type-vertical.scss +26 -0
  345. package/styles/core/layout/mixins/_mixins.alignment.scss +35 -0
  346. package/styles/core/layout/mixins/_mixins.display.scss +23 -0
  347. package/styles/core/layout/mixins/_mixins.grid.scss +105 -0
  348. package/styles/core/layout/mixins/_mixins.scss +106 -0
  349. package/styles/core/layout/mixins/_mixins.shadow-dom.scss +106 -0
  350. package/styles/core/layout/mixins/_mixins.type-horizontal.scss +113 -0
  351. package/styles/core/layout/mixins/_mixins.type-vertical.scss +108 -0
  352. package/styles/core/module.layout.scss +22 -0
  353. package/styles/core/module.reset.scss +48 -0
  354. package/styles/core/module.typography.scss +9 -0
  355. package/styles/core/theme.dark.scss +298 -0
  356. package/styles/core/theme.high-contrast.scss +42 -0
  357. package/styles/core/theme.low-motion.scss +20 -0
  358. package/styles/core/tokens/_alias-interaction.scss +74 -0
  359. package/styles/core/tokens/_alias-object-background.scss +29 -0
  360. package/styles/core/tokens/_alias-object-border.scss +21 -0
  361. package/styles/core/tokens/_alias-object-container.scss +20 -0
  362. package/styles/core/tokens/_alias-object-opacity.scss +15 -0
  363. package/styles/core/tokens/_alias-object-shadow.scss +17 -0
  364. package/styles/core/tokens/_alias-primary.scss +21 -0
  365. package/styles/core/tokens/_alias-status.scss +40 -0
  366. package/styles/core/tokens/_alias-typography.scss +107 -0
  367. package/styles/core/tokens/_alias-utility.scss +42 -0
  368. package/styles/core/tokens/_alias-viz-colors.scss +170 -0
  369. package/styles/core/tokens/_global-animation.scss +32 -0
  370. package/styles/core/tokens/_global-colors.scss +249 -0
  371. package/styles/core/tokens/_global-space.scss +52 -0
  372. package/styles/core/tokens/_internal-scale.scss +14 -0
  373. package/styles/core/tokens/_properties.tokens.scss +22 -0
  374. package/styles/core/tokens/_variables.tokens.scss +787 -0
  375. package/styles/core/typography/_legacy-typography.scss +328 -0
  376. package/styles/core/typography/_mixins.typography.scss +18 -0
  377. package/styles/core/typography/_typography.scss +328 -0
  378. package/styles/variables/_properties.density.scss +225 -0
  379. package/styles/variables/_properties.global.scss +51 -0
  380. package/styles/variables/_properties.layout.scss +21 -0
  381. package/styles/variables/_properties.scss +11 -0
  382. package/styles/variables/_properties.typography.scss +164 -0
  383. package/styles/variables/_variables.density.scss +116 -0
  384. package/styles/variables/_variables.global.scss +87 -0
  385. package/styles/variables/_variables.layout.scss +37 -0
  386. package/styles/variables/_variables.scss +11 -0
  387. package/styles/variables/_variables.typography.scss +156 -0
  388. package/timeline/_properties.timeline.scss +38 -0
  389. package/timeline/_timeline.clarity.scss +172 -0
  390. package/timeline/_variables.timeline.scss +29 -0
  391. package/toast/README.md +65 -0
  392. package/toast/_properties.toast.scss +56 -0
  393. package/toast/_toast.clarity.scss +190 -0
  394. package/toast/_variables.toast.scss +33 -0
  395. package/types/hermes-ui-angular-accordion.d.ts +101 -0
  396. package/types/hermes-ui-angular-accordion.d.ts.map +1 -0
  397. package/types/hermes-ui-angular-addons-a11y.d.ts +187 -0
  398. package/types/hermes-ui-angular-addons-a11y.d.ts.map +1 -0
  399. package/types/hermes-ui-angular-addons-card-container.d.ts +482 -0
  400. package/types/hermes-ui-angular-addons-card-container.d.ts.map +1 -0
  401. package/types/hermes-ui-angular-addons-certificate-viewer.d.ts +404 -0
  402. package/types/hermes-ui-angular-addons-certificate-viewer.d.ts.map +1 -0
  403. package/types/hermes-ui-angular-addons-datagrid-filters.d.ts +911 -0
  404. package/types/hermes-ui-angular-addons-datagrid-filters.d.ts.map +1 -0
  405. package/types/hermes-ui-angular-addons-datagrid.d.ts +1529 -0
  406. package/types/hermes-ui-angular-addons-datagrid.d.ts.map +1 -0
  407. package/types/hermes-ui-angular-addons-dialog.d.ts +233 -0
  408. package/types/hermes-ui-angular-addons-dialog.d.ts.map +1 -0
  409. package/types/hermes-ui-angular-addons-drag-and-drop.d.ts +35 -0
  410. package/types/hermes-ui-angular-addons-drag-and-drop.d.ts.map +1 -0
  411. package/types/hermes-ui-angular-addons-menu.d.ts +197 -0
  412. package/types/hermes-ui-angular-addons-menu.d.ts.map +1 -0
  413. package/types/hermes-ui-angular-addons-property-view.d.ts +387 -0
  414. package/types/hermes-ui-angular-addons-property-view.d.ts.map +1 -0
  415. package/types/hermes-ui-angular-addons-stepper.d.ts +298 -0
  416. package/types/hermes-ui-angular-addons-stepper.d.ts.map +1 -0
  417. package/types/hermes-ui-angular-addons-tabs.d.ts +173 -0
  418. package/types/hermes-ui-angular-addons-tabs.d.ts.map +1 -0
  419. package/types/hermes-ui-angular-addons-testing.d.ts +592 -0
  420. package/types/hermes-ui-angular-addons-testing.d.ts.map +1 -0
  421. package/types/hermes-ui-angular-addons-theme-builder.d.ts +200 -0
  422. package/types/hermes-ui-angular-addons-theme-builder.d.ts.map +1 -0
  423. package/types/hermes-ui-angular-addons-translate.d.ts +149 -0
  424. package/types/hermes-ui-angular-addons-translate.d.ts.map +1 -0
  425. package/types/hermes-ui-angular-addons-var.d.ts +923 -0
  426. package/types/hermes-ui-angular-addons-var.d.ts.map +1 -0
  427. package/types/hermes-ui-angular-addons-wizard.d.ts +241 -0
  428. package/types/hermes-ui-angular-addons-wizard.d.ts.map +1 -0
  429. package/types/hermes-ui-angular-addons-workflow-strings.d.ts +124 -0
  430. package/types/hermes-ui-angular-addons-workflow-strings.d.ts.map +1 -0
  431. package/types/hermes-ui-angular-addons-workflow.d.ts +15 -0
  432. package/types/hermes-ui-angular-addons-workflow.d.ts.map +1 -0
  433. package/types/hermes-ui-angular-button.d.ts +170 -0
  434. package/types/hermes-ui-angular-button.d.ts.map +1 -0
  435. package/types/hermes-ui-angular-collapsible-panel.d.ts +74 -0
  436. package/types/hermes-ui-angular-collapsible-panel.d.ts.map +1 -0
  437. package/types/hermes-ui-angular-data-datagrid.d.ts +1938 -0
  438. package/types/hermes-ui-angular-data-datagrid.d.ts.map +1 -0
  439. package/types/hermes-ui-angular-data-stack-view.d.ts +88 -0
  440. package/types/hermes-ui-angular-data-stack-view.d.ts.map +1 -0
  441. package/types/hermes-ui-angular-data-tree-view.d.ts +230 -0
  442. package/types/hermes-ui-angular-data-tree-view.d.ts.map +1 -0
  443. package/types/hermes-ui-angular-data.d.ts +16 -0
  444. package/types/hermes-ui-angular-data.d.ts.map +1 -0
  445. package/types/hermes-ui-angular-emphasis-alert.d.ts +176 -0
  446. package/types/hermes-ui-angular-emphasis-alert.d.ts.map +1 -0
  447. package/types/hermes-ui-angular-emphasis-badge.d.ts +26 -0
  448. package/types/hermes-ui-angular-emphasis-badge.d.ts.map +1 -0
  449. package/types/hermes-ui-angular-emphasis-common.d.ts +7 -0
  450. package/types/hermes-ui-angular-emphasis-common.d.ts.map +1 -0
  451. package/types/hermes-ui-angular-emphasis-label.d.ts +30 -0
  452. package/types/hermes-ui-angular-emphasis-label.d.ts.map +1 -0
  453. package/types/hermes-ui-angular-emphasis.d.ts +16 -0
  454. package/types/hermes-ui-angular-emphasis.d.ts.map +1 -0
  455. package/types/hermes-ui-angular-forms-checkbox.d.ts +73 -0
  456. package/types/hermes-ui-angular-forms-checkbox.d.ts.map +1 -0
  457. package/types/hermes-ui-angular-forms-combobox.d.ts +354 -0
  458. package/types/hermes-ui-angular-forms-combobox.d.ts.map +1 -0
  459. package/types/hermes-ui-angular-forms-common.d.ts +340 -0
  460. package/types/hermes-ui-angular-forms-common.d.ts.map +1 -0
  461. package/types/hermes-ui-angular-forms-datalist.d.ts +60 -0
  462. package/types/hermes-ui-angular-forms-datalist.d.ts.map +1 -0
  463. package/types/hermes-ui-angular-forms-datepicker.d.ts +987 -0
  464. package/types/hermes-ui-angular-forms-datepicker.d.ts.map +1 -0
  465. package/types/hermes-ui-angular-forms-file-input.d.ts +194 -0
  466. package/types/hermes-ui-angular-forms-file-input.d.ts.map +1 -0
  467. package/types/hermes-ui-angular-forms-input.d.ts +30 -0
  468. package/types/hermes-ui-angular-forms-input.d.ts.map +1 -0
  469. package/types/hermes-ui-angular-forms-native-select.d.ts +37 -0
  470. package/types/hermes-ui-angular-forms-native-select.d.ts.map +1 -0
  471. package/types/hermes-ui-angular-forms-number-input.d.ts +44 -0
  472. package/types/hermes-ui-angular-forms-number-input.d.ts.map +1 -0
  473. package/types/hermes-ui-angular-forms-password.d.ts +53 -0
  474. package/types/hermes-ui-angular-forms-password.d.ts.map +1 -0
  475. package/types/hermes-ui-angular-forms-radio.d.ts +50 -0
  476. package/types/hermes-ui-angular-forms-radio.d.ts.map +1 -0
  477. package/types/hermes-ui-angular-forms-range.d.ts +38 -0
  478. package/types/hermes-ui-angular-forms-range.d.ts.map +1 -0
  479. package/types/hermes-ui-angular-forms-select.d.ts +211 -0
  480. package/types/hermes-ui-angular-forms-select.d.ts.map +1 -0
  481. package/types/hermes-ui-angular-forms-textarea.d.ts +30 -0
  482. package/types/hermes-ui-angular-forms-textarea.d.ts.map +1 -0
  483. package/types/hermes-ui-angular-forms.d.ts +39 -0
  484. package/types/hermes-ui-angular-forms.d.ts.map +1 -0
  485. package/types/hermes-ui-angular-icon.d.ts +1504 -0
  486. package/types/hermes-ui-angular-icon.d.ts.map +1 -0
  487. package/types/hermes-ui-angular-layout-breadcrumbs.d.ts +46 -0
  488. package/types/hermes-ui-angular-layout-breadcrumbs.d.ts.map +1 -0
  489. package/types/hermes-ui-angular-layout-main-container.d.ts +29 -0
  490. package/types/hermes-ui-angular-layout-main-container.d.ts.map +1 -0
  491. package/types/hermes-ui-angular-layout-nav.d.ts +143 -0
  492. package/types/hermes-ui-angular-layout-nav.d.ts.map +1 -0
  493. package/types/hermes-ui-angular-layout-tabs.d.ts +159 -0
  494. package/types/hermes-ui-angular-layout-tabs.d.ts.map +1 -0
  495. package/types/hermes-ui-angular-layout-vertical-nav.d.ts +129 -0
  496. package/types/hermes-ui-angular-layout-vertical-nav.d.ts.map +1 -0
  497. package/types/hermes-ui-angular-layout.d.ts +20 -0
  498. package/types/hermes-ui-angular-layout.d.ts.map +1 -0
  499. package/types/hermes-ui-angular-modal.d.ts +161 -0
  500. package/types/hermes-ui-angular-modal.d.ts.map +1 -0
  501. package/types/hermes-ui-angular-popover-common.d.ts +317 -0
  502. package/types/hermes-ui-angular-popover-common.d.ts.map +1 -0
  503. package/types/hermes-ui-angular-popover-dropdown.d.ts +124 -0
  504. package/types/hermes-ui-angular-popover-dropdown.d.ts.map +1 -0
  505. package/types/hermes-ui-angular-popover-signpost.d.ts +158 -0
  506. package/types/hermes-ui-angular-popover-signpost.d.ts.map +1 -0
  507. package/types/hermes-ui-angular-popover-tooltip.d.ts +84 -0
  508. package/types/hermes-ui-angular-popover-tooltip.d.ts.map +1 -0
  509. package/types/hermes-ui-angular-popover.d.ts +17 -0
  510. package/types/hermes-ui-angular-popover.d.ts.map +1 -0
  511. package/types/hermes-ui-angular-progress-progress-bars.d.ts +58 -0
  512. package/types/hermes-ui-angular-progress-progress-bars.d.ts.map +1 -0
  513. package/types/hermes-ui-angular-progress-spinner.d.ts +45 -0
  514. package/types/hermes-ui-angular-progress-spinner.d.ts.map +1 -0
  515. package/types/hermes-ui-angular-stepper.d.ts +180 -0
  516. package/types/hermes-ui-angular-stepper.d.ts.map +1 -0
  517. package/types/hermes-ui-angular-timeline.d.ts +87 -0
  518. package/types/hermes-ui-angular-timeline.d.ts.map +1 -0
  519. package/types/hermes-ui-angular-toast.d.ts +131 -0
  520. package/types/hermes-ui-angular-toast.d.ts.map +1 -0
  521. package/types/hermes-ui-angular-utils-conditional.d.ts +133 -0
  522. package/types/hermes-ui-angular-utils-conditional.d.ts.map +1 -0
  523. package/types/hermes-ui-angular-utils-loading.d.ts +39 -0
  524. package/types/hermes-ui-angular-utils-loading.d.ts.map +1 -0
  525. package/types/hermes-ui-angular-utils.d.ts +914 -0
  526. package/types/hermes-ui-angular-utils.d.ts.map +1 -0
  527. package/types/hermes-ui-angular-wizard.d.ts +1509 -0
  528. package/types/hermes-ui-angular-wizard.d.ts.map +1 -0
  529. package/types/hermes-ui-angular.d.ts +44 -0
  530. package/types/hermes-ui-angular.d.ts.map +1 -0
  531. package/typography/_code.scss +36 -0
  532. package/typography/_font-metropolis.scss +45 -0
  533. package/typography/_lists.scss +81 -0
  534. package/typography/_typography.scss +322 -0
  535. package/utils/animations/_animations.clarity.scss +44 -0
  536. package/utils/animations/_mixins.animations.scss +33 -0
  537. package/wizard/_properties.wizard.scss +54 -0
  538. package/wizard/_variables.wizard.scss +59 -0
  539. package/wizard/_wizard.clarity.scss +692 -0
@@ -0,0 +1,1371 @@
1
+ import { hasModifierKey } from '@angular/cdk/keycodes';
2
+ import * as i1 from '@angular/cdk/overlay';
3
+ import { OverlayConfig } from '@angular/cdk/overlay';
4
+ import { DomPortal } from '@angular/cdk/portal';
5
+ import { isPlatformBrowser } from '@angular/common';
6
+ import * as i0 from '@angular/core';
7
+ import { ElementRef, Injectable, PLATFORM_ID, Input, Optional, SkipSelf, Inject, Directive, InjectionToken, HostListener, EventEmitter, Output, NgModule } from '@angular/core';
8
+ import { preventArrowKeyScroll, HermesPosition, Keys } from '@hermes-ui/angular/utils';
9
+ import { Subject, merge, timer, switchMap, fromEvent } from 'rxjs';
10
+ import { filter } from 'rxjs/operators';
11
+
12
+ class HermesPopoverService {
13
+ constructor() {
14
+ this.panelClass = [];
15
+ this._open = false;
16
+ this._openChange = new Subject();
17
+ this._openEventChange = new Subject();
18
+ this._positionChange = new Subject();
19
+ this._resetPositions = new Subject();
20
+ this._updatePosition = new Subject();
21
+ this._popoverVisible = new Subject();
22
+ }
23
+ get originElement() {
24
+ return this.origin instanceof ElementRef ? this.origin : null;
25
+ }
26
+ get originPoint() {
27
+ return this.origin && 'x' in this.origin && 'y' in this.origin ? this.origin : null;
28
+ }
29
+ get openChange() {
30
+ return this._openChange.asObservable();
31
+ }
32
+ get popoverVisible() {
33
+ return this._popoverVisible.asObservable();
34
+ }
35
+ get openEvent() {
36
+ return this._openEvent;
37
+ }
38
+ set openEvent(event) {
39
+ this._openEvent = event;
40
+ this._openEventChange.next(event);
41
+ }
42
+ get open() {
43
+ return this._open;
44
+ }
45
+ set open(value) {
46
+ value = !!value;
47
+ if (this._open !== value) {
48
+ this._open = value;
49
+ this._openChange.next(value);
50
+ }
51
+ }
52
+ get resetPositionsChange() {
53
+ return this._resetPositions.asObservable();
54
+ }
55
+ positionChange(position) {
56
+ this._positionChange.next(position);
57
+ }
58
+ updatePositionChange() {
59
+ return this._updatePosition.asObservable();
60
+ }
61
+ getPositionChange() {
62
+ return this._positionChange.asObservable();
63
+ }
64
+ getEventChange() {
65
+ return this._openEventChange.asObservable();
66
+ }
67
+ /**
68
+ * Sometimes, we need to remember the event that triggered the toggling to avoid loops.
69
+ * This is for instance the case of components that open on a click, but close on a click outside.
70
+ */
71
+ toggleWithEvent(event) {
72
+ preventArrowKeyScroll(event);
73
+ this.openEvent = event;
74
+ this.open = !this.open;
75
+ }
76
+ /**
77
+ * Opens the popover at a specific screen coordinate.
78
+ * Useful for context menus where the popover should appear at the cursor position.
79
+ */
80
+ openAtPoint(point, targetElement) {
81
+ if (this._open) {
82
+ this._open = false;
83
+ this._openChange.next(false);
84
+ }
85
+ this.origin = point;
86
+ this.pointTargetElement = targetElement;
87
+ this.open = true;
88
+ }
89
+ popoverVisibleEmit(visible) {
90
+ this._popoverVisible.next(visible);
91
+ }
92
+ resetPositions() {
93
+ this._resetPositions.next();
94
+ }
95
+ updatePosition() {
96
+ this._updatePosition.next();
97
+ }
98
+ focusCloseButton() {
99
+ this.closeButtonRef.nativeElement?.focus();
100
+ }
101
+ focusOrigin() {
102
+ this.originElement?.nativeElement?.focus({ preventScroll: true });
103
+ }
104
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
105
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverService }); }
106
+ }
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverService, decorators: [{
108
+ type: Injectable
109
+ }] });
110
+
111
+ /*
112
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
113
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
114
+ * This software is released under MIT license.
115
+ * The full license information can be found in LICENSE in the root directory of this project.
116
+ */
117
+ // Realm-independent shape checks for getScrollableParents(): `instanceof` fails for
118
+ // nodes created by a different window's constructors (e.g. an iframe's own Element,
119
+ // ShadowRoot, or HTMLHtmlElement classes), so these duck-type via nodeType/tagName
120
+ // instead, which works the same regardless of which window created the node.
121
+ function isElementOrShadowRoot(node) {
122
+ return node.nodeType === Node.ELEMENT_NODE || isShadowRoot(node);
123
+ }
124
+ function isShadowRoot(node) {
125
+ return node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && 'host' in node;
126
+ }
127
+ function isHtmlElement(node) {
128
+ return node.nodeType === Node.ELEMENT_NODE && node.tagName === 'HTML';
129
+ }
130
+ // Same-origin-safe: returns null (rather than throwing) if `frameElement` can't be
131
+ // read, which happens when `win` is embedded in a cross-origin parent window.
132
+ function getFrameElement(win) {
133
+ try {
134
+ return win.frameElement;
135
+ }
136
+ catch {
137
+ return null;
138
+ }
139
+ }
140
+
141
+ /*
142
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
143
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
144
+ * This software is released under MIT license.
145
+ * The full license information can be found in LICENSE in the root directory of this project.
146
+ */
147
+ /**
148
+ * Resolves an origin to its element and owning window, but only when that window differs
149
+ * from this one - i.e. the origin lives inside an iframe. Returns null for same-window
150
+ * origins and for non-element (point) origins, so a single check lets callers skip all
151
+ * cross-window handling for the overwhelming majority of popovers.
152
+ *
153
+ * Cheap: a few property reads, no layout access.
154
+ */
155
+ function getCrossWindowOriginContext(origin) {
156
+ const element = getOriginElement(origin);
157
+ const elementWindow = element?.ownerDocument?.defaultView;
158
+ return element && elementWindow && elementWindow !== window ? { element, elementWindow } : null;
159
+ }
160
+ /**
161
+ * CDK's FlexibleConnectedPositionStrategy anchors the overlay by reading
162
+ * origin.getBoundingClientRect() (for an Element/ElementRef origin) directly off the
163
+ * origin, relative to the origin's own window. That only matches the overlay panel's
164
+ * window (always the one this code runs in) when the origin lives in the same document.
165
+ * When the origin sits inside an iframe (e.g. a micro-frontend mounting its trigger in a
166
+ * nested document, possibly combined with a ShadowRoot), the raw rect is relative to the
167
+ * wrong viewport and the overlay is mispositioned.
168
+ *
169
+ * If the origin is same-window (or not an Element/ElementRef at all), this returns it
170
+ * unchanged. Otherwise it returns a Point-based origin (the other shape
171
+ * FlexibleConnectedPositionStrategy natively supports) whose x/y/width/height are live
172
+ * getters that recompute the element's rect plus the cumulative offset of every ancestor
173
+ * iframe between the origin's window and this one, so the overlay still anchors
174
+ * correctly across repositions (scroll, resize). This has no effect on anything besides
175
+ * overlay positioning math - it never replaces the origin ElementRef consumers rely on
176
+ * elsewhere (e.g. scroll listeners), since it only wraps a local copy used for
177
+ * positioning.
178
+ *
179
+ * If the ancestor iframe chain can't be safely resolved (e.g. a cross-origin frame
180
+ * boundary this code can't introspect), the getters fall back to the element's own
181
+ * un-translated rect - the exact numbers CDK would compute if given the raw
182
+ * Element/ElementRef directly, so behavior for that case is unchanged.
183
+ */
184
+ function resolveCrossWindowOrigin(origin) {
185
+ const crossWindowOrigin = getCrossWindowOriginContext(origin);
186
+ // Same-window origins (and point origins) are handed back untouched - no wrapping, no
187
+ // translation, no behavior change from a popover that never crosses a window boundary.
188
+ if (!crossWindowOrigin) {
189
+ return origin;
190
+ }
191
+ const { element, elementWindow } = crossWindowOrigin;
192
+ let cached = null;
193
+ // CDK's position strategy reads x/y/width/height several times per apply() (it builds
194
+ // a rect from a Point origin as {top: y, bottom: y + height, left: x, right: x + width}).
195
+ // Memoizing per microtask collapses that into a single rect/offset computation instead
196
+ // of one forced layout read per property access, while still recomputing fresh on the
197
+ // next reposition (scroll, resize), since the cache clears before the next microtask.
198
+ const read = () => {
199
+ if (!cached) {
200
+ const rect = element.getBoundingClientRect();
201
+ const offset = getCumulativeFrameOffset(elementWindow) ?? { x: 0, y: 0 };
202
+ cached = { x: rect.left + offset.x, y: rect.top + offset.y, width: rect.width, height: rect.height };
203
+ queueMicrotask(() => (cached = null));
204
+ }
205
+ return cached;
206
+ };
207
+ return {
208
+ get x() {
209
+ return read().x;
210
+ },
211
+ get y() {
212
+ return read().y;
213
+ },
214
+ get width() {
215
+ return read().width;
216
+ },
217
+ get height() {
218
+ return read().height;
219
+ },
220
+ };
221
+ }
222
+ function getOriginElement(origin) {
223
+ if (origin instanceof ElementRef) {
224
+ return origin.nativeElement;
225
+ }
226
+ // `instanceof Element` is realm-sensitive and misses raw elements belonging to
227
+ // another window - exactly the population this util targets - so duck-type instead.
228
+ if (origin?.nodeType === Node.ELEMENT_NODE) {
229
+ return origin;
230
+ }
231
+ return null;
232
+ }
233
+ /**
234
+ * Walks the chain of window.frameElement references from `originWindow` up to this
235
+ * code's own window, summing each ancestor iframe's position. Returns null if the
236
+ * chain can't be fully resolved (cross-origin boundary, or `originWindow` isn't
237
+ * actually embedded within this window).
238
+ */
239
+ function getCumulativeFrameOffset(originWindow) {
240
+ let offsetX = 0;
241
+ let offsetY = 0;
242
+ let currentWindow = originWindow;
243
+ while (currentWindow && currentWindow !== window) {
244
+ const frameElement = getFrameElement(currentWindow);
245
+ if (!frameElement) {
246
+ return null;
247
+ }
248
+ const frameRect = frameElement.getBoundingClientRect();
249
+ // clientLeft/clientTop only cover the frame's border, not any CSS padding, which
250
+ // would otherwise skew the anchor - read computed style through the frame's own
251
+ // window for realm-safety.
252
+ const frameWindow = frameElement.ownerDocument?.defaultView ?? window;
253
+ const { borderLeftWidth, borderTopWidth, paddingLeft, paddingTop } = frameWindow.getComputedStyle(frameElement);
254
+ offsetX += frameRect.left + (parseFloat(borderLeftWidth) || 0) + (parseFloat(paddingLeft) || 0);
255
+ offsetY += frameRect.top + (parseFloat(borderTopWidth) || 0) + (parseFloat(paddingTop) || 0);
256
+ currentWindow = frameElement.ownerDocument?.defaultView ?? null;
257
+ }
258
+ return currentWindow === window ? { x: offsetX, y: offsetY } : null;
259
+ }
260
+
261
+ /*
262
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
263
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
264
+ * This software is released under MIT license.
265
+ * The full license information can be found in LICENSE in the root directory of this project.
266
+ */
267
+ var HermesPopoverType;
268
+ (function (HermesPopoverType) {
269
+ HermesPopoverType[HermesPopoverType["SIGNPOST"] = 0] = "SIGNPOST";
270
+ HermesPopoverType[HermesPopoverType["TOOLTIP"] = 1] = "TOOLTIP";
271
+ HermesPopoverType[HermesPopoverType["DROPDOWN"] = 2] = "DROPDOWN";
272
+ HermesPopoverType[HermesPopoverType["DEFAULT"] = 3] = "DEFAULT";
273
+ })(HermesPopoverType || (HermesPopoverType = {}));
274
+ var HermesPopoverPosition;
275
+ (function (HermesPopoverPosition) {
276
+ HermesPopoverPosition["TOP_RIGHT"] = "top-right";
277
+ HermesPopoverPosition["TOP_MIDDLE"] = "top-middle";
278
+ HermesPopoverPosition["TOP_LEFT"] = "top-left";
279
+ HermesPopoverPosition["RIGHT"] = "right";
280
+ HermesPopoverPosition["RIGHT_TOP"] = "right-top";
281
+ HermesPopoverPosition["RIGHT_MIDDLE"] = "right-middle";
282
+ HermesPopoverPosition["RIGHT_BOTTOM"] = "right-bottom";
283
+ HermesPopoverPosition["LEFT"] = "left";
284
+ HermesPopoverPosition["LEFT_TOP"] = "left-top";
285
+ HermesPopoverPosition["LEFT_MIDDLE"] = "left-middle";
286
+ HermesPopoverPosition["LEFT_BOTTOM"] = "left-bottom";
287
+ HermesPopoverPosition["BOTTOM_RIGHT"] = "bottom-right";
288
+ HermesPopoverPosition["BOTTOM_MIDDLE"] = "bottom-middle";
289
+ HermesPopoverPosition["BOTTOM_LEFT"] = "bottom-left";
290
+ })(HermesPopoverPosition || (HermesPopoverPosition = {}));
291
+ const TOOLTIP_POSITIONS = [
292
+ HermesPopoverPosition.RIGHT, // default. must be at index 0
293
+ HermesPopoverPosition.LEFT,
294
+ HermesPopoverPosition.BOTTOM_RIGHT,
295
+ HermesPopoverPosition.BOTTOM_LEFT,
296
+ HermesPopoverPosition.TOP_RIGHT,
297
+ HermesPopoverPosition.TOP_LEFT,
298
+ ];
299
+ const DROPDOWN_POSITIONS = [
300
+ HermesPopoverPosition.BOTTOM_LEFT, // default. must be at index 0
301
+ HermesPopoverPosition.BOTTOM_RIGHT,
302
+ HermesPopoverPosition.TOP_LEFT,
303
+ HermesPopoverPosition.TOP_RIGHT,
304
+ HermesPopoverPosition.RIGHT_TOP,
305
+ HermesPopoverPosition.RIGHT_BOTTOM,
306
+ HermesPopoverPosition.LEFT_TOP,
307
+ HermesPopoverPosition.LEFT_BOTTOM,
308
+ ];
309
+ const SIGNPOST_POSITIONS = [
310
+ HermesPopoverPosition.RIGHT_MIDDLE, // default. must be at index 0
311
+ HermesPopoverPosition.RIGHT_TOP,
312
+ HermesPopoverPosition.RIGHT_BOTTOM,
313
+ HermesPopoverPosition.TOP_RIGHT,
314
+ HermesPopoverPosition.TOP_LEFT,
315
+ HermesPopoverPosition.TOP_MIDDLE,
316
+ HermesPopoverPosition.BOTTOM_RIGHT,
317
+ HermesPopoverPosition.BOTTOM_MIDDLE,
318
+ HermesPopoverPosition.BOTTOM_LEFT,
319
+ HermesPopoverPosition.LEFT_BOTTOM,
320
+ HermesPopoverPosition.LEFT_MIDDLE,
321
+ HermesPopoverPosition.LEFT_TOP,
322
+ ];
323
+ function getPositionsArray(type) {
324
+ switch (type) {
325
+ case HermesPopoverType.TOOLTIP:
326
+ return TOOLTIP_POSITIONS;
327
+ case HermesPopoverType.DROPDOWN:
328
+ return DROPDOWN_POSITIONS;
329
+ case HermesPopoverType.SIGNPOST:
330
+ case HermesPopoverType.DEFAULT:
331
+ default:
332
+ return SIGNPOST_POSITIONS;
333
+ }
334
+ }
335
+ function getConnectedPositions(type) {
336
+ const result = [];
337
+ getPositionsArray(type).forEach(position => {
338
+ result.push(mapPopoverKeyToPosition(position, type));
339
+ });
340
+ return result;
341
+ }
342
+ const POPOVER_OFFSETS = {
343
+ [HermesPopoverType.SIGNPOST]: 16,
344
+ [HermesPopoverType.TOOLTIP]: 21,
345
+ [HermesPopoverType.DROPDOWN]: 2,
346
+ [HermesPopoverType.DEFAULT]: 0,
347
+ };
348
+ function getOffset(key, type) {
349
+ const offset = POPOVER_OFFSETS[type] || 0;
350
+ switch (key) {
351
+ // TOP
352
+ case HermesPopoverPosition.TOP_LEFT:
353
+ case HermesPopoverPosition.TOP_MIDDLE:
354
+ case HermesPopoverPosition.TOP_RIGHT:
355
+ return {
356
+ offsetY: -offset,
357
+ offsetX: 0,
358
+ };
359
+ // LEFT
360
+ case HermesPopoverPosition.LEFT_TOP:
361
+ case HermesPopoverPosition.LEFT_MIDDLE:
362
+ case HermesPopoverPosition.LEFT:
363
+ case HermesPopoverPosition.LEFT_BOTTOM:
364
+ return {
365
+ offsetY: 0,
366
+ offsetX: -offset,
367
+ };
368
+ // RIGHT
369
+ case HermesPopoverPosition.RIGHT_TOP:
370
+ case HermesPopoverPosition.RIGHT_MIDDLE:
371
+ case HermesPopoverPosition.RIGHT:
372
+ case HermesPopoverPosition.RIGHT_BOTTOM:
373
+ return {
374
+ offsetY: 0,
375
+ offsetX: offset,
376
+ };
377
+ // BOTTOM and DEFAULT
378
+ case HermesPopoverPosition.BOTTOM_RIGHT:
379
+ case HermesPopoverPosition.BOTTOM_MIDDLE:
380
+ case HermesPopoverPosition.BOTTOM_LEFT:
381
+ default:
382
+ return {
383
+ offsetY: offset,
384
+ offsetX: 0,
385
+ };
386
+ }
387
+ }
388
+ const STANDARD_ORIGINS = {
389
+ // TOP
390
+ [HermesPopoverPosition.TOP_RIGHT]: { origin: HermesPosition.TOP_CENTER, content: HermesPosition.BOTTOM_LEFT },
391
+ [HermesPopoverPosition.TOP_MIDDLE]: { origin: HermesPosition.TOP_CENTER, content: HermesPosition.BOTTOM_CENTER },
392
+ [HermesPopoverPosition.TOP_LEFT]: { origin: HermesPosition.TOP_CENTER, content: HermesPosition.BOTTOM_RIGHT },
393
+ // LEFT
394
+ [HermesPopoverPosition.LEFT]: { origin: HermesPosition.LEFT_CENTER, content: HermesPosition.RIGHT_TOP },
395
+ [HermesPopoverPosition.LEFT_TOP]: { origin: HermesPosition.LEFT_CENTER, content: HermesPosition.RIGHT_BOTTOM },
396
+ [HermesPopoverPosition.LEFT_MIDDLE]: { origin: HermesPosition.LEFT_CENTER, content: HermesPosition.RIGHT_CENTER },
397
+ [HermesPopoverPosition.LEFT_BOTTOM]: { origin: HermesPosition.LEFT_CENTER, content: HermesPosition.RIGHT_TOP },
398
+ // RIGHT
399
+ [HermesPopoverPosition.RIGHT]: { origin: HermesPosition.RIGHT_CENTER, content: HermesPosition.LEFT_TOP },
400
+ [HermesPopoverPosition.RIGHT_TOP]: { origin: HermesPosition.RIGHT_CENTER, content: HermesPosition.LEFT_BOTTOM },
401
+ [HermesPopoverPosition.RIGHT_MIDDLE]: { origin: HermesPosition.RIGHT_CENTER, content: HermesPosition.LEFT_CENTER },
402
+ [HermesPopoverPosition.RIGHT_BOTTOM]: { origin: HermesPosition.RIGHT_CENTER, content: HermesPosition.LEFT_TOP },
403
+ // BOTTOM
404
+ [HermesPopoverPosition.BOTTOM_RIGHT]: { origin: HermesPosition.BOTTOM_CENTER, content: HermesPosition.TOP_LEFT },
405
+ [HermesPopoverPosition.BOTTOM_MIDDLE]: { origin: HermesPosition.BOTTOM_CENTER, content: HermesPosition.TOP_CENTER },
406
+ [HermesPopoverPosition.BOTTOM_LEFT]: { origin: HermesPosition.BOTTOM_CENTER, content: HermesPosition.TOP_RIGHT },
407
+ };
408
+ const DROPDOWN_ORIGINS = {
409
+ // TOP
410
+ [HermesPopoverPosition.TOP_RIGHT]: { origin: HermesPosition.TOP_RIGHT, content: HermesPosition.BOTTOM_RIGHT },
411
+ [HermesPopoverPosition.TOP_LEFT]: { origin: HermesPosition.TOP_LEFT, content: HermesPosition.BOTTOM_LEFT },
412
+ // LEFT
413
+ [HermesPopoverPosition.LEFT_TOP]: { origin: HermesPosition.LEFT_TOP, content: HermesPosition.TOP_RIGHT },
414
+ [HermesPopoverPosition.LEFT_BOTTOM]: { origin: HermesPosition.LEFT_BOTTOM, content: HermesPosition.BOTTOM_RIGHT },
415
+ // RIGHT
416
+ [HermesPopoverPosition.RIGHT_TOP]: { origin: HermesPosition.RIGHT_TOP, content: HermesPosition.LEFT_TOP },
417
+ [HermesPopoverPosition.RIGHT_BOTTOM]: { origin: HermesPosition.RIGHT_BOTTOM, content: HermesPosition.LEFT_BOTTOM },
418
+ // BOTTOM
419
+ [HermesPopoverPosition.BOTTOM_RIGHT]: { origin: HermesPosition.BOTTOM_LEFT, content: HermesPosition.TOP_RIGHT },
420
+ [HermesPopoverPosition.BOTTOM_LEFT]: { origin: HermesPosition.BOTTOM_RIGHT, content: HermesPosition.TOP_LEFT },
421
+ };
422
+ function mapPopoverKeyToPosition(key, type) {
423
+ let offset = getOffset(key, type);
424
+ const defaultPosition = { origin: HermesPosition.BOTTOM_LEFT, content: HermesPosition.TOP_LEFT };
425
+ const { origin, content } = (type === HermesPopoverType.DROPDOWN ? DROPDOWN_ORIGINS[key] : STANDARD_ORIGINS[key]) ?? defaultPosition;
426
+ return {
427
+ ...getOriginPosition(origin),
428
+ ...getContentPosition(content),
429
+ ...offset,
430
+ panelClass: key,
431
+ };
432
+ }
433
+ function getOriginPosition(key) {
434
+ switch (key) {
435
+ // TOP Positions
436
+ case HermesPosition.TOP_LEFT:
437
+ return {
438
+ originX: 'start',
439
+ originY: 'top',
440
+ };
441
+ case HermesPosition.TOP_CENTER:
442
+ return {
443
+ originX: 'center',
444
+ originY: 'top',
445
+ };
446
+ case HermesPosition.TOP_RIGHT:
447
+ return {
448
+ originX: 'end',
449
+ originY: 'top',
450
+ };
451
+ // LEFT Positions
452
+ case HermesPosition.LEFT_TOP:
453
+ return {
454
+ originX: 'start',
455
+ originY: 'top',
456
+ };
457
+ case HermesPosition.LEFT_CENTER:
458
+ return {
459
+ originX: 'start',
460
+ originY: 'center',
461
+ };
462
+ case HermesPosition.LEFT_BOTTOM:
463
+ return {
464
+ originX: 'start',
465
+ originY: 'bottom',
466
+ };
467
+ // RIGHT Positions
468
+ case HermesPosition.RIGHT_TOP:
469
+ return {
470
+ originX: 'end',
471
+ originY: 'top',
472
+ };
473
+ case HermesPosition.RIGHT_CENTER:
474
+ return {
475
+ originX: 'end',
476
+ originY: 'center',
477
+ };
478
+ case HermesPosition.RIGHT_BOTTOM:
479
+ return {
480
+ originX: 'end',
481
+ originY: 'bottom',
482
+ };
483
+ // BOTTOM positions and default
484
+ case HermesPosition.BOTTOM_LEFT:
485
+ return {
486
+ originX: 'end',
487
+ originY: 'bottom',
488
+ };
489
+ case HermesPosition.BOTTOM_CENTER:
490
+ return {
491
+ originX: 'center',
492
+ originY: 'bottom',
493
+ };
494
+ case HermesPosition.BOTTOM_RIGHT:
495
+ default:
496
+ return {
497
+ originX: 'start',
498
+ originY: 'bottom',
499
+ };
500
+ }
501
+ }
502
+ function getContentPosition(key) {
503
+ switch (key) {
504
+ // TOP Positions
505
+ case HermesPosition.TOP_LEFT:
506
+ return {
507
+ overlayX: 'start',
508
+ overlayY: 'top',
509
+ };
510
+ case HermesPosition.TOP_CENTER:
511
+ return {
512
+ overlayX: 'center',
513
+ overlayY: 'top',
514
+ };
515
+ case HermesPosition.TOP_RIGHT:
516
+ return {
517
+ overlayX: 'end',
518
+ overlayY: 'top',
519
+ };
520
+ // LEFT Positions
521
+ case HermesPosition.LEFT_TOP:
522
+ return {
523
+ overlayX: 'start',
524
+ overlayY: 'top',
525
+ };
526
+ case HermesPosition.LEFT_CENTER:
527
+ return {
528
+ overlayX: 'start',
529
+ overlayY: 'center',
530
+ };
531
+ case HermesPosition.LEFT_BOTTOM:
532
+ return {
533
+ overlayX: 'start',
534
+ overlayY: 'bottom',
535
+ };
536
+ // RIGHT Positions
537
+ case HermesPosition.RIGHT_TOP:
538
+ return {
539
+ overlayX: 'end',
540
+ overlayY: 'top',
541
+ };
542
+ case HermesPosition.RIGHT_CENTER:
543
+ return {
544
+ overlayX: 'end',
545
+ overlayY: 'center',
546
+ };
547
+ case HermesPosition.RIGHT_BOTTOM:
548
+ return {
549
+ overlayX: 'end',
550
+ overlayY: 'bottom',
551
+ };
552
+ // BOTTOM positions and default
553
+ case HermesPosition.BOTTOM_LEFT:
554
+ return {
555
+ overlayX: 'start',
556
+ overlayY: 'bottom',
557
+ };
558
+ case HermesPosition.BOTTOM_CENTER:
559
+ return {
560
+ overlayX: 'center',
561
+ overlayY: 'bottom',
562
+ };
563
+ case HermesPosition.BOTTOM_RIGHT:
564
+ default:
565
+ return {
566
+ overlayX: 'end',
567
+ overlayY: 'bottom',
568
+ };
569
+ }
570
+ }
571
+
572
+ /*
573
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
574
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
575
+ * This software is released under MIT license.
576
+ * The full license information can be found in LICENSE in the root directory of this project.
577
+ */
578
+ /** @dynamic */
579
+ class HermesPopoverContent {
580
+ constructor(element, container, template, overlayContainer, parent, overlay, popoverService, zone, platformId) {
581
+ this.container = container;
582
+ this.template = template;
583
+ this.parent = parent;
584
+ this.overlay = overlay;
585
+ this.popoverService = popoverService;
586
+ this.zone = zone;
587
+ this.platformId = platformId;
588
+ this._outsideClickClose = true;
589
+ this._scrollToClose = false;
590
+ this.popoverType = HermesPopoverType.DEFAULT;
591
+ this._availablePositions = [];
592
+ this._position = HermesPopoverPosition.BOTTOM_LEFT;
593
+ this.subscriptions = [];
594
+ this.preferredPositionIsSet = false;
595
+ this.availablePositionsAreSet = false;
596
+ this._preferredPosition = {
597
+ originX: 'start',
598
+ originY: 'top',
599
+ overlayX: 'end',
600
+ overlayY: 'top',
601
+ panelClass: HermesPopoverPosition.LEFT_TOP,
602
+ };
603
+ popoverService.panelClass.push('hermes-popover-content');
604
+ overlayContainer.getContainerElement().classList.add('hermes-overlay-container');
605
+ if (!template) {
606
+ this.elementRef = element;
607
+ }
608
+ }
609
+ set open(value) {
610
+ this.popoverService.open = !!value;
611
+ }
612
+ get contentAt() {
613
+ return this.preferredPositionIsSet ? this._preferredPosition : this._position;
614
+ }
615
+ set contentAt(position) {
616
+ if (typeof position === 'string') {
617
+ if (!position || Object.values(HermesPopoverPosition).indexOf(position) === -1) {
618
+ return;
619
+ }
620
+ // set the popover values based on menu position
621
+ this._position = position;
622
+ this.popoverService.positionChange(this._position);
623
+ }
624
+ else {
625
+ this.preferredPositionIsSet = true;
626
+ this._preferredPosition = position;
627
+ }
628
+ }
629
+ set availablePositions(positions) {
630
+ this.availablePositionsAreSet = true;
631
+ this._availablePositions = positions;
632
+ }
633
+ set contentType(type) {
634
+ this.popoverType = type;
635
+ if (!this.availablePositionsAreSet) {
636
+ this._availablePositions = getConnectedPositions(type);
637
+ }
638
+ }
639
+ get outsideClickClose() {
640
+ return this._outsideClickClose;
641
+ }
642
+ set outsideClickClose(clickToClose) {
643
+ this._outsideClickClose = !!clickToClose;
644
+ }
645
+ get scrollToClose() {
646
+ return this._scrollToClose;
647
+ }
648
+ set scrollToClose(scrollToClose) {
649
+ this._scrollToClose = !!scrollToClose;
650
+ }
651
+ set contentOrigin(origin) {
652
+ // `instanceof Element` is realm-sensitive and misses a raw element belonging to
653
+ // another window, so a consumer passing one here would bypass the ElementRef wrap
654
+ // resolveCrossWindowOrigin() relies on to detect a cross-window origin.
655
+ if (origin?.nodeType === Node.ELEMENT_NODE) {
656
+ this.popoverService.origin = new ElementRef(origin);
657
+ }
658
+ else {
659
+ this.popoverService.origin = origin;
660
+ }
661
+ }
662
+ get positionStrategy() {
663
+ const origin = resolveCrossWindowOrigin(this.popoverService.origin);
664
+ return this.overlay
665
+ .position()
666
+ .flexibleConnectedTo(origin)
667
+ .setOrigin(origin)
668
+ .withPush(true)
669
+ .withPositions([this.preferredPosition, ...this._availablePositions])
670
+ .withFlexibleDimensions(true);
671
+ }
672
+ get preferredPosition() {
673
+ if (this.preferredPositionIsSet) {
674
+ return this._preferredPosition;
675
+ }
676
+ // Default position is "bottom-left"
677
+ return mapPopoverKeyToPosition(this._position, this.popoverType);
678
+ }
679
+ ngAfterViewInit() {
680
+ if (this.popoverService.open) {
681
+ this.showOverlay();
682
+ }
683
+ this.openCloseSubscription = this.popoverService.openChange.subscribe(change => {
684
+ if (change) {
685
+ this.showOverlay();
686
+ }
687
+ else {
688
+ this.closePopover();
689
+ }
690
+ });
691
+ }
692
+ ngOnDestroy() {
693
+ this.removeOverlay();
694
+ this.openCloseSubscription?.unsubscribe();
695
+ }
696
+ _createOverlayRef() {
697
+ this.overlayRef = this.overlay.create(new OverlayConfig({
698
+ // This is where we can pass externally facing inputs into the angular overlay API, and essentially proxy behaviors our users want directly to the CDK if they have them.
699
+ positionStrategy: this.positionStrategy,
700
+ // the scrolling behaviour is controlled by this popover content directive
701
+ scrollStrategy: this.overlay.scrollStrategies.noop(),
702
+ panelClass: this.popoverService.panelClass,
703
+ hasBackdrop: false,
704
+ }));
705
+ this.subscriptions.push(merge(this.popoverService.resetPositionsChange, this.popoverService.getPositionChange()).subscribe(() => {
706
+ this.resetPosition();
707
+ }), this.popoverService.updatePositionChange().subscribe(() => {
708
+ this.overlayRef?.updatePosition();
709
+ }), this.createEscapeSubscription(), this.popoverService.originPoint
710
+ ? this.createPointBasedOutsideClickSubscription()
711
+ : this.createElementBasedOutsideClickSubscription());
712
+ }
713
+ /**
714
+ * Point-based origins (context menus) delay the subscription to avoid the
715
+ * mouseup from the same right-click that opened the popover.
716
+ */
717
+ createPointBasedOutsideClickSubscription() {
718
+ const subscription = timer(500)
719
+ .pipe(switchMap(() => this.overlayRef.outsidePointerEvents()))
720
+ .subscribe(event => this.handlePointOutsideClick(event));
721
+ const crossWindowSubscription = this.createCrossWindowPointOutsideClickSubscription();
722
+ if (crossWindowSubscription) {
723
+ subscription.add(crossWindowSubscription);
724
+ }
725
+ return subscription;
726
+ }
727
+ handlePointOutsideClick(event) {
728
+ if (this.elementRef?.nativeElement?.contains(event.target)) {
729
+ return;
730
+ }
731
+ if (this._outsideClickClose) {
732
+ this.closePopover();
733
+ }
734
+ }
735
+ /**
736
+ * Mirrors createCrossWindowOutsideClickSubscription for point-based origins (context
737
+ * menus): pointTargetElement - the element the point was derived from, e.g. the
738
+ * right-clicked element - can itself live inside a foreign iframe document, and CDK's
739
+ * outsidePointerEvents() only listens on this window's document, so a click elsewhere
740
+ * in that foreign document would otherwise never dismiss the menu. Delayed by the same
741
+ * 500ms as the same-window stream, for the same reason: avoid the click that opened the
742
+ * menu immediately closing it again.
743
+ */
744
+ createCrossWindowPointOutsideClickSubscription() {
745
+ const pointTargetElement = this.popoverService.pointTargetElement;
746
+ const crossWindowOrigin = pointTargetElement ? getCrossWindowOriginContext(pointTargetElement) : null;
747
+ if (!crossWindowOrigin) {
748
+ return null;
749
+ }
750
+ const originWindow = crossWindowOrigin.elementWindow;
751
+ return timer(500)
752
+ .pipe(switchMap(() => this.zone.runOutsideAngular(() => merge(fromEvent(originWindow.document, 'click', { capture: true }), fromEvent(originWindow.document, 'auxclick', { capture: true })))))
753
+ .subscribe(event => this.zone.run(() => this.handlePointOutsideClick(event)));
754
+ }
755
+ /**
756
+ * Element-based origins close on outside clicks and suppress toggle-button
757
+ * re-clicks so the popover doesn't immediately reopen.
758
+ */
759
+ createElementBasedOutsideClickSubscription() {
760
+ const subscription = this.overlayRef.outsidePointerEvents().subscribe(event => this.handleOutsideClick(event));
761
+ const crossWindowSubscription = this.createCrossWindowOutsideClickSubscription();
762
+ if (crossWindowSubscription) {
763
+ subscription.add(crossWindowSubscription);
764
+ }
765
+ return subscription;
766
+ }
767
+ handleOutsideClick(event) {
768
+ // The very click that opened this popover must never be treated as an outside click.
769
+ // CDK's OverlayOutsideClickDispatcher listens in the capture phase on this window's
770
+ // document.body, so it normally runs *before* the trigger's own click handler has
771
+ // attached the overlay, and the opening click is therefore never delivered here.
772
+ // That ordering does not hold everywhere: when the trigger lives in a ShadowRoot
773
+ // owned by a separately bootstrapped Angular application (an ESM micro-frontend
774
+ // plugin with its own CDK instance), the overlay can already be attached by the time
775
+ // the dispatcher sees the click, which delivers the opening click straight back as an
776
+ // "outside" click and tears the popover down microseconds after it opened.
777
+ // Comparing against the stored open event is exact - CDK re-emits the same Event
778
+ // object - and it leaves toggle-to-close untouched, since a later click on the
779
+ // trigger is always a different Event instance.
780
+ if (event === this.popoverService.openEvent) {
781
+ return;
782
+ }
783
+ // web components (hermes-icon) register as outside pointer events, so if the event target is inside the content panel return early
784
+ if (this.elementRef?.nativeElement?.contains(event.target)) {
785
+ return;
786
+ }
787
+ // Check if the same element that opened the popover is the same element triggering the outside pointer events (toggle button)
788
+ // openEvent.target can itself be null (e.g. the original toggle button was removed
789
+ // from the DOM before this handler runs), so every access below is optional - an
790
+ // unguarded `.contains()` call here throws and aborts the whole handler, which is
791
+ // exactly what stops closePopover() from ever running.
792
+ const openEventTarget = this.popoverService.openEvent?.target;
793
+ const isToggleButton = !!openEventTarget &&
794
+ (openEventTarget.contains(event.target) ||
795
+ openEventTarget.parentElement?.contains(event.target) ||
796
+ openEventTarget === event.target);
797
+ if (isToggleButton) {
798
+ event.stopPropagation();
799
+ }
800
+ if (this._outsideClickClose || isToggleButton) {
801
+ this.closePopover();
802
+ }
803
+ }
804
+ /**
805
+ * CDK's outsidePointerEvents() only listens on the document that owns the overlay
806
+ * (this window's), so clicks inside a cross-window origin's own document (e.g. a
807
+ * ShadowRoot hosted in an iframe) are invisible to it - see resolveCrossWindowOrigin
808
+ * for the same cross-window scenario affecting positioning instead. Any pointer event
809
+ * dispatched in that foreign document is guaranteed to be outside the overlay panel,
810
+ * since the panel always renders in this window's document, so this only needs the
811
+ * toggle-button exclusion handleOutsideClick already does, not the content-panel
812
+ * containment check (which can never be true across documents).
813
+ *
814
+ * Listens on capture-phase click/auxclick, mirroring CDK's own OverlayOutsideClickDispatcher.
815
+ * Capture phase matters: for a toggle re-click, this listener must run and
816
+ * stopPropagation() BEFORE the trigger's own bubble-phase click handler
817
+ * (HermesDropdownTrigger's toggleWithEvent) gets a chance to fire, otherwise the popover
818
+ * closes here and immediately reopens there. A bubble-phase or pointerdown-based
819
+ * listener can't suppress that handler at all, since pointerdown and click are separate
820
+ * events and stopping one doesn't affect the other.
821
+ *
822
+ * The foreign document's own addEventListener isn't zone-patched (zone.js only patches
823
+ * the window it's loaded into), so the listener is registered directly and the handler
824
+ * is explicitly run back inside NgZone.
825
+ */
826
+ createCrossWindowOutsideClickSubscription() {
827
+ // Same-window origins bail out here, so a popover that never crosses a window
828
+ // boundary registers no extra listeners at all.
829
+ const crossWindowOrigin = getCrossWindowOriginContext(this.popoverService.origin);
830
+ if (!crossWindowOrigin) {
831
+ return null;
832
+ }
833
+ const originWindow = crossWindowOrigin.elementWindow;
834
+ return this.zone.runOutsideAngular(() => merge(fromEvent(originWindow.document, 'click', { capture: true }), fromEvent(originWindow.document, 'auxclick', { capture: true })).subscribe(event => this.zone.run(() => this.handleOutsideClick(event))));
835
+ }
836
+ /**
837
+ * CDK's OverlayKeyboardDispatcher (the source behind `overlayRef.keydownEvents()`)
838
+ * attaches a single keydown listener on this window's document.body once, at app
839
+ * bootstrap - see its `add()`/`_keydownListener`. A keydown fired while focus sits
840
+ * inside a cross-window origin's own document (e.g. a ShadowRoot hosted in an iframe)
841
+ * never bubbles there, since events don't cross document boundaries, so Escape silently
842
+ * does nothing once the trigger (and focus) has moved into that foreign document. This
843
+ * mirrors createCrossWindowOutsideClickSubscription's rationale for outside clicks -
844
+ * merged into a single stream/handler here since both ultimately just detect Escape and
845
+ * close.
846
+ */
847
+ createEscapeSubscription() {
848
+ const crossWindowOrigin = getCrossWindowOriginContext(this.popoverService.origin);
849
+ const keydownEvents = crossWindowOrigin
850
+ ? merge(this.overlayRef.keydownEvents(), this.zone.runOutsideAngular(() => fromEvent(crossWindowOrigin.elementWindow.document, 'keydown')))
851
+ : this.overlayRef.keydownEvents();
852
+ return keydownEvents.subscribe(event => {
853
+ if (isEscapeKey(event)) {
854
+ this.zone.run(() => {
855
+ event.preventDefault();
856
+ this.closePopover();
857
+ });
858
+ }
859
+ });
860
+ }
861
+ resetPosition() {
862
+ if (this.overlayRef) {
863
+ this.overlayRef.updatePositionStrategy(this.positionStrategy);
864
+ this.overlayRef.updatePosition();
865
+ }
866
+ }
867
+ closePopover() {
868
+ if (!this.overlayRef) {
869
+ return;
870
+ }
871
+ this.removeOverlay();
872
+ this.popoverService.popoverVisibleEmit(false);
873
+ this.popoverService.open = false;
874
+ if (this.popoverService.originElement) {
875
+ const shouldFocusTrigger = this.popoverType !== HermesPopoverType.TOOLTIP &&
876
+ (document.activeElement === document.body ||
877
+ document.activeElement === this.popoverService.originElement.nativeElement);
878
+ if (shouldFocusTrigger) {
879
+ this.popoverService.focusOrigin();
880
+ }
881
+ }
882
+ }
883
+ showOverlay() {
884
+ if (!this.overlayRef) {
885
+ this._createOverlayRef();
886
+ }
887
+ if (!this.view && this.template) {
888
+ this.view = this.container.createEmbeddedView(this.template);
889
+ if (!this.elementRef) {
890
+ const [rootNode] = this.view.rootNodes;
891
+ this.elementRef = new ElementRef(rootNode); // So we know where/what to set close focus on
892
+ }
893
+ }
894
+ if (!this.domPortal) {
895
+ this.domPortal = new DomPortal(this.elementRef);
896
+ this.overlayRef.attach(this.domPortal);
897
+ }
898
+ if (this.popoverService.originElement) {
899
+ this.popoverService.originElement.nativeElement.scrollIntoView({
900
+ behavior: 'instant',
901
+ block: 'nearest',
902
+ inline: 'nearest',
903
+ });
904
+ this.setupIntersectionObserver();
905
+ }
906
+ setTimeout(() => {
907
+ // Get Scrollable Parents
908
+ this.listenToScrollEvents();
909
+ this.popoverService.popoverVisibleEmit(true);
910
+ if (this.elementRef?.nativeElement?.focus) {
911
+ this.elementRef.nativeElement.focus();
912
+ }
913
+ });
914
+ }
915
+ removeOverlay() {
916
+ this.subscriptions.forEach(s => s.unsubscribe());
917
+ this.subscriptions = [];
918
+ if (this.overlayRef?.hasAttached()) {
919
+ this.overlayRef.detach();
920
+ this.overlayRef.dispose();
921
+ }
922
+ if (this.domPortal?.isAttached) {
923
+ this.domPortal.detach();
924
+ }
925
+ if (this.view) {
926
+ this.view.destroy();
927
+ }
928
+ this.overlayRef = null;
929
+ this.domPortal = null;
930
+ if (this.template) {
931
+ this.elementRef = null;
932
+ }
933
+ this.view = null;
934
+ this.intersectionObserver?.disconnect();
935
+ this.intersectionObserver = null;
936
+ }
937
+ /**
938
+ * Walks ancestors looking for scrollable containers, following the node up through
939
+ * ShadowRoots and, when the node's own ancestry crosses into an iframe (a different
940
+ * window realm - e.g. a ShadowRoot hosted in a micro-frontend iframe), continuing the
941
+ * walk into the parent window via window.frameElement, all the way up to the true
942
+ * top-level document. Every embedded document passed through this way is added as its
943
+ * own scrollable parent, so page-level scrolling inside an iframe is tracked too.
944
+ *
945
+ * `instanceof` checks are realm-sensitive (they fail for nodes created by a different
946
+ * window's constructors), so this deliberately uses realm-independent shape checks
947
+ * (nodeType, tagName, duck-typing ShadowRoot via `host`) instead, and always resolves
948
+ * computed style through the node's own window rather than this one. This is what lets
949
+ * the walk safely continue across a same-origin realm boundary instead of just
950
+ * stopping at it.
951
+ */
952
+ getScrollableParents(node) {
953
+ const overflowScrollKeys = ['auto', 'scroll', 'clip'];
954
+ const scrollableParents = [window.document];
955
+ let parent = node;
956
+ while (parent && isElementOrShadowRoot(parent)) {
957
+ if (isShadowRoot(parent)) {
958
+ parent = parent.host;
959
+ continue;
960
+ }
961
+ const element = parent;
962
+ const elementWindow = element.ownerDocument?.defaultView;
963
+ if (isHtmlElement(element)) {
964
+ const frameElement = elementWindow && elementWindow !== window ? getFrameElement(elementWindow) : null;
965
+ if (!frameElement) {
966
+ break;
967
+ }
968
+ // Leaving this document for its parent window - track its own page-level scroll too.
969
+ scrollableParents.push(element.ownerDocument);
970
+ parent = frameElement;
971
+ continue;
972
+ }
973
+ const { overflowY, overflowX } = (elementWindow ?? window).getComputedStyle(element);
974
+ if (overflowScrollKeys.includes(overflowY) || overflowScrollKeys.includes(overflowX)) {
975
+ scrollableParents.push(element);
976
+ }
977
+ parent = element.parentNode;
978
+ }
979
+ return scrollableParents;
980
+ }
981
+ /**
982
+ * Uses IntersectionObserver to detect when the origin element leaves the screen.
983
+ * This handles the "Close on Scroll" logic much cheaper than getBoundingClientRect.
984
+ */
985
+ setupIntersectionObserver() {
986
+ if (!this.popoverService.originElement || this.intersectionObserver) {
987
+ return;
988
+ }
989
+ this.intersectionObserver = new IntersectionObserver(entries => {
990
+ entries.forEach(entry => {
991
+ // If the origin is no longer visible (scrolled out of view)
992
+ if (!entry.isIntersecting && this.popoverService.open) {
993
+ this.zone.run(() => this.closePopover());
994
+ }
995
+ });
996
+ }, { root: null, threshold: 0.8 });
997
+ this.intersectionObserver.observe(this.popoverService.originElement.nativeElement);
998
+ }
999
+ listenToScrollEvents() {
1000
+ if (!isPlatformBrowser(this.platformId)) {
1001
+ return;
1002
+ }
1003
+ const originEl = this.popoverService.originPoint
1004
+ ? this.popoverService.pointTargetElement
1005
+ : this.getRootPopover(this)?.popoverService?.originElement?.nativeElement;
1006
+ this.listenToScrollForElementOrigin(originEl);
1007
+ }
1008
+ // Element origins track ancestor scroll containers to reposition or close.
1009
+ listenToScrollForElementOrigin(originEl) {
1010
+ const scrollableParents = this.getScrollableParents(originEl);
1011
+ this.zone.runOutsideAngular(() => {
1012
+ this.subscriptions.push(merge(...scrollableParents.map(parent => fromEvent(parent, 'scroll', { passive: true }))).subscribe(() => {
1013
+ if (this._scrollToClose) {
1014
+ this.zone.run(() => this.closePopover());
1015
+ return;
1016
+ }
1017
+ this.overlayRef?.updatePosition();
1018
+ }));
1019
+ });
1020
+ }
1021
+ getRootPopover(popover) {
1022
+ if (popover && popover.parent) {
1023
+ return this.getRootPopover(popover.parent);
1024
+ }
1025
+ return popover;
1026
+ }
1027
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverContent, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef, optional: true }, { token: i1.OverlayContainer }, { token: HermesPopoverContent, optional: true, skipSelf: true }, { token: i1.Overlay }, { token: HermesPopoverService }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive }); }
1028
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HermesPopoverContent, isStandalone: true, selector: "[hermesPopoverContent]", inputs: { open: ["hermesPopoverContent", "open"], contentAt: ["hermesPopoverContentAt", "contentAt"], availablePositions: ["hermesPopoverContentAvailablePositions", "availablePositions"], contentType: ["hermesPopoverContentType", "contentType"], outsideClickClose: ["hermesPopoverContentOutsideClickToClose", "outsideClickClose"], scrollToClose: ["hermesPopoverContentScrollToClose", "scrollToClose"], contentOrigin: ["hermesPopoverContentOrigin", "contentOrigin"] }, ngImport: i0 }); }
1029
+ }
1030
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverContent, decorators: [{
1031
+ type: Directive,
1032
+ args: [{
1033
+ selector: '[hermesPopoverContent]',
1034
+ }]
1035
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef, decorators: [{
1036
+ type: Optional
1037
+ }] }, { type: i1.OverlayContainer }, { type: HermesPopoverContent, decorators: [{
1038
+ type: Optional
1039
+ }, {
1040
+ type: SkipSelf
1041
+ }] }, { type: i1.Overlay }, { type: HermesPopoverService, decorators: [{
1042
+ type: Inject,
1043
+ args: [HermesPopoverService]
1044
+ }] }, { type: i0.NgZone }, { type: undefined, decorators: [{
1045
+ type: Inject,
1046
+ args: [PLATFORM_ID]
1047
+ }] }], propDecorators: { open: [{
1048
+ type: Input,
1049
+ args: ['hermesPopoverContent']
1050
+ }], contentAt: [{
1051
+ type: Input,
1052
+ args: ['hermesPopoverContentAt']
1053
+ }], availablePositions: [{
1054
+ type: Input,
1055
+ args: ['hermesPopoverContentAvailablePositions']
1056
+ }], contentType: [{
1057
+ type: Input,
1058
+ args: ['hermesPopoverContentType']
1059
+ }], outsideClickClose: [{
1060
+ type: Input,
1061
+ args: ['hermesPopoverContentOutsideClickToClose']
1062
+ }], scrollToClose: [{
1063
+ type: Input,
1064
+ args: ['hermesPopoverContentScrollToClose']
1065
+ }], contentOrigin: [{
1066
+ type: Input,
1067
+ args: ['hermesPopoverContentOrigin']
1068
+ }] } });
1069
+ function isEscapeKey(event) {
1070
+ return !!event && event.key === Keys.Escape && !hasModifierKey(event);
1071
+ }
1072
+
1073
+ /*
1074
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1075
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1076
+ * This software is released under MIT license.
1077
+ * The full license information can be found in LICENSE in the root directory of this project.
1078
+ */
1079
+ class HermesPopoverOrigin {
1080
+ constructor(popoverService, element) {
1081
+ popoverService.origin = element;
1082
+ }
1083
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverOrigin, deps: [{ token: HermesPopoverService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1084
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HermesPopoverOrigin, isStandalone: false, selector: "[hermesPopoverOrigin]", host: { properties: { "class.hermes-popover-origin": "true" } }, ngImport: i0 }); }
1085
+ }
1086
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverOrigin, decorators: [{
1087
+ type: Directive,
1088
+ args: [{
1089
+ selector: '[hermesPopoverOrigin]',
1090
+ host: {
1091
+ '[class.hermes-popover-origin]': 'true',
1092
+ },
1093
+ standalone: false,
1094
+ }]
1095
+ }], ctorParameters: () => [{ type: HermesPopoverService }, { type: i0.ElementRef }] });
1096
+
1097
+ /*
1098
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1099
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1100
+ * This software is released under MIT license.
1101
+ * The full license information can be found in LICENSE in the root directory of this project.
1102
+ */
1103
+ const POPOVER_HOST_ORIGIN = new InjectionToken('POPOVER_HOST_ORIGIN');
1104
+
1105
+ /*
1106
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1107
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1108
+ * This software is released under MIT license.
1109
+ * The full license information can be found in LICENSE in the root directory of this project.
1110
+ */
1111
+ class HermesStopEscapePropagationDirective {
1112
+ constructor(popoverService) {
1113
+ this.popoverService = popoverService;
1114
+ this.lastOpenChange = null;
1115
+ }
1116
+ ngOnInit() {
1117
+ this.subscription = this.popoverService.openChange.subscribe(open => {
1118
+ this.lastOpenChange = open;
1119
+ });
1120
+ }
1121
+ ngOnDestroy() {
1122
+ this.subscription?.unsubscribe();
1123
+ }
1124
+ onEscapeKey(event) {
1125
+ if (this.lastOpenChange !== null) {
1126
+ if (this.lastOpenChange === false) {
1127
+ event.stopPropagation();
1128
+ }
1129
+ this.lastOpenChange = null;
1130
+ }
1131
+ }
1132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesStopEscapePropagationDirective, deps: [{ token: HermesPopoverService }], target: i0.ɵɵFactoryTarget.Directive }); }
1133
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HermesStopEscapePropagationDirective, isStandalone: true, host: { listeners: { "keyup.escape": "onEscapeKey($event)" } }, ngImport: i0 }); }
1134
+ }
1135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesStopEscapePropagationDirective, decorators: [{
1136
+ type: Directive,
1137
+ args: [{
1138
+ standalone: true,
1139
+ }]
1140
+ }], ctorParameters: () => [{ type: HermesPopoverService }], propDecorators: { onEscapeKey: [{
1141
+ type: HostListener,
1142
+ args: ['keyup.escape', ['$event']]
1143
+ }] } });
1144
+
1145
+ /*
1146
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1147
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1148
+ * This software is released under MIT license.
1149
+ * The full license information can be found in LICENSE in the root directory of this project.
1150
+ */
1151
+ class HermesPopoverHostDirective {
1152
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverHostDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1153
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HermesPopoverHostDirective, isStandalone: true, providers: [HermesPopoverService, { provide: POPOVER_HOST_ORIGIN, useExisting: ElementRef }], hostDirectives: [{ directive: HermesStopEscapePropagationDirective }], ngImport: i0 }); }
1154
+ }
1155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverHostDirective, decorators: [{
1156
+ type: Directive,
1157
+ args: [{
1158
+ standalone: true,
1159
+ providers: [HermesPopoverService, { provide: POPOVER_HOST_ORIGIN, useExisting: ElementRef }],
1160
+ hostDirectives: [HermesStopEscapePropagationDirective],
1161
+ }]
1162
+ }] });
1163
+
1164
+ /*
1165
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1166
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1167
+ * This software is released under MIT license.
1168
+ * The full license information can be found in LICENSE in the root directory of this project.
1169
+ */
1170
+ /**********
1171
+ *
1172
+ * @class HermesIfOpen
1173
+ *
1174
+ * @description
1175
+ * A structural directive that controls whether or not the associated TemplateRef is instantiated or not.
1176
+ * It makes use of a Component instance level service: HermesPopoverService to maintain state between itself and the component
1177
+ * using it in the component template.
1178
+ *
1179
+ */
1180
+ class HermesIfOpen {
1181
+ constructor(popoverService, template, container) {
1182
+ this.popoverService = popoverService;
1183
+ this.template = template;
1184
+ this.container = container;
1185
+ /**********
1186
+ * @property openChange
1187
+ *
1188
+ * @description
1189
+ * An event emitter that emits when the open property is set to allow for 2way binding when the directive is
1190
+ * used with de-structured / de-sugared syntax.
1191
+ */
1192
+ this.openChange = new EventEmitter(false);
1193
+ this.subscriptions = [];
1194
+ this.subscriptions.push(popoverService.openChange.subscribe(change => {
1195
+ // OPEN before overlay is built
1196
+ if (change) {
1197
+ container.createEmbeddedView(template);
1198
+ this.openChange.emit(change);
1199
+ }
1200
+ }), popoverService.popoverVisible.subscribe(change => {
1201
+ // CLOSE after overlay is destroyed
1202
+ if (!change) {
1203
+ container.clear();
1204
+ this.openChange.emit(change);
1205
+ }
1206
+ }));
1207
+ }
1208
+ /**
1209
+ * @description
1210
+ * A property that gets/sets HermesPopoverService.open with value.
1211
+ */
1212
+ get open() {
1213
+ return this.popoverService.open;
1214
+ }
1215
+ set open(value) {
1216
+ this.popoverService.open = value;
1217
+ }
1218
+ ngOnDestroy() {
1219
+ this.subscriptions.forEach(sub => sub.unsubscribe());
1220
+ }
1221
+ /**
1222
+ * @description
1223
+ * Function that takes a boolean value and either created an embedded view for the associated ViewContainerRef or,
1224
+ * Clears all views from the ViewContainerRef
1225
+ *
1226
+ * @param value
1227
+ */
1228
+ updateView(value) {
1229
+ if (value) {
1230
+ this.container.createEmbeddedView(this.template);
1231
+ }
1232
+ else {
1233
+ this.container.clear();
1234
+ }
1235
+ }
1236
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesIfOpen, deps: [{ token: HermesPopoverService }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1237
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HermesIfOpen, isStandalone: true, selector: "[hermesIfOpen]", inputs: { open: ["hermesIfOpen", "open"] }, outputs: { openChange: "hermesIfOpenChange" }, ngImport: i0 }); }
1238
+ }
1239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesIfOpen, decorators: [{
1240
+ type: Directive,
1241
+ args: [{
1242
+ selector: '[hermesIfOpen]',
1243
+ }]
1244
+ }], ctorParameters: () => [{ type: HermesPopoverService }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }], propDecorators: { openChange: [{
1245
+ type: Output,
1246
+ args: ['hermesIfOpenChange']
1247
+ }], open: [{
1248
+ type: Input,
1249
+ args: ['hermesIfOpen']
1250
+ }] } });
1251
+
1252
+ /*
1253
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1254
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1255
+ * This software is released under MIT license.
1256
+ * The full license information can be found in LICENSE in the root directory of this project.
1257
+ */
1258
+ class HermesPopoverCloseButton {
1259
+ constructor(elementRef, popoverService) {
1260
+ this.elementRef = elementRef;
1261
+ this.popoverService = popoverService;
1262
+ this.closeChange = new EventEmitter();
1263
+ this.subscriptions = [];
1264
+ this.subscriptions.push(popoverService.openChange.pipe(filter(value => !value)).subscribe(() => {
1265
+ this.closeChange.emit();
1266
+ }));
1267
+ }
1268
+ handleClick(event) {
1269
+ this.popoverService.toggleWithEvent(event);
1270
+ this.popoverService.focusOrigin();
1271
+ }
1272
+ ngAfterViewInit() {
1273
+ this.popoverService.closeButtonRef = this.elementRef;
1274
+ }
1275
+ ngOnDestroy() {
1276
+ this.subscriptions.forEach(sub => sub.unsubscribe());
1277
+ }
1278
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverCloseButton, deps: [{ token: i0.ElementRef }, { token: HermesPopoverService }], target: i0.ɵɵFactoryTarget.Directive }); }
1279
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HermesPopoverCloseButton, isStandalone: false, selector: "[hermesPopoverCloseButton]", outputs: { closeChange: "hermesPopoverOnCloseChange" }, host: { listeners: { "click": "handleClick($event)" }, properties: { "class.hermes-smart-close-button": "true" } }, ngImport: i0 }); }
1280
+ }
1281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverCloseButton, decorators: [{
1282
+ type: Directive,
1283
+ args: [{
1284
+ selector: '[hermesPopoverCloseButton]',
1285
+ host: {
1286
+ '[class.hermes-smart-close-button]': 'true',
1287
+ },
1288
+ standalone: false,
1289
+ }]
1290
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: HermesPopoverService }], propDecorators: { closeChange: [{
1291
+ type: Output,
1292
+ args: ['hermesPopoverOnCloseChange']
1293
+ }], handleClick: [{
1294
+ type: HostListener,
1295
+ args: ['click', ['$event']]
1296
+ }] } });
1297
+
1298
+ /*
1299
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1300
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1301
+ * This software is released under MIT license.
1302
+ * The full license information can be found in LICENSE in the root directory of this project.
1303
+ */
1304
+ class HermesPopoverOpenCloseButton {
1305
+ constructor(popoverService) {
1306
+ this.popoverService = popoverService;
1307
+ this.openCloseChange = new EventEmitter();
1308
+ this.subscriptions = [];
1309
+ this.subscriptions.push(popoverService.openChange.subscribe(change => {
1310
+ this.openCloseChange.emit(change);
1311
+ }));
1312
+ }
1313
+ handleClick(event) {
1314
+ this.popoverService.toggleWithEvent(event);
1315
+ }
1316
+ ngOnDestroy() {
1317
+ this.subscriptions.forEach(sub => sub.unsubscribe());
1318
+ }
1319
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverOpenCloseButton, deps: [{ token: HermesPopoverService }], target: i0.ɵɵFactoryTarget.Directive }); }
1320
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HermesPopoverOpenCloseButton, isStandalone: false, selector: "[hermesPopoverOpenCloseButton]", outputs: { openCloseChange: "hermesPopoverOpenCloseChange" }, host: { listeners: { "click": "handleClick($event)" }, properties: { "class.hermes-smart-open-close": "true" } }, ngImport: i0 }); }
1321
+ }
1322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverOpenCloseButton, decorators: [{
1323
+ type: Directive,
1324
+ args: [{
1325
+ selector: '[hermesPopoverOpenCloseButton]',
1326
+ host: {
1327
+ '[class.hermes-smart-open-close]': 'true',
1328
+ },
1329
+ standalone: false,
1330
+ }]
1331
+ }], ctorParameters: () => [{ type: HermesPopoverService }], propDecorators: { openCloseChange: [{
1332
+ type: Output,
1333
+ args: ['hermesPopoverOpenCloseChange']
1334
+ }], handleClick: [{
1335
+ type: HostListener,
1336
+ args: ['click', ['$event']]
1337
+ }] } });
1338
+
1339
+ /*
1340
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1341
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1342
+ * This software is released under MIT license.
1343
+ * The full license information can be found in LICENSE in the root directory of this project.
1344
+ */
1345
+ class HermesPopoverModuleNext {
1346
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverModuleNext, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1347
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverModuleNext, declarations: [HermesPopoverOrigin, HermesPopoverCloseButton, HermesPopoverOpenCloseButton], imports: [HermesPopoverContent, HermesIfOpen], exports: [HermesPopoverOrigin, HermesPopoverCloseButton, HermesPopoverOpenCloseButton, HermesPopoverContent, HermesIfOpen] }); }
1348
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverModuleNext }); }
1349
+ }
1350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HermesPopoverModuleNext, decorators: [{
1351
+ type: NgModule,
1352
+ args: [{
1353
+ imports: [HermesPopoverContent, HermesIfOpen],
1354
+ declarations: [HermesPopoverOrigin, HermesPopoverCloseButton, HermesPopoverOpenCloseButton],
1355
+ exports: [HermesPopoverOrigin, HermesPopoverCloseButton, HermesPopoverOpenCloseButton, HermesPopoverContent, HermesIfOpen],
1356
+ }]
1357
+ }] });
1358
+
1359
+ /*
1360
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1361
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1362
+ * This software is released under MIT license.
1363
+ * The full license information can be found in LICENSE in the root directory of this project.
1364
+ */
1365
+
1366
+ /**
1367
+ * Generated bundle index. Do not edit.
1368
+ */
1369
+
1370
+ export { DROPDOWN_POSITIONS, HermesIfOpen, HermesPopoverCloseButton, HermesPopoverContent, HermesPopoverHostDirective, HermesPopoverModuleNext, HermesPopoverOpenCloseButton, HermesPopoverOrigin, HermesPopoverPosition, HermesPopoverService, HermesPopoverType, HermesStopEscapePropagationDirective, POPOVER_HOST_ORIGIN, SIGNPOST_POSITIONS, TOOLTIP_POSITIONS, getConnectedPositions, getContentPosition, getOriginPosition, getPositionsArray, mapPopoverKeyToPosition };
1371
+ //# sourceMappingURL=hermes-ui-angular-popover-common.mjs.map