@siemens/ix 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (892) hide show
  1. package/components/a11y.js +1 -1
  2. package/components/a11y.js.map +1 -1
  3. package/components/application-header.js +51 -15
  4. package/components/application-header.js.map +1 -1
  5. package/components/avatar.js +1 -1
  6. package/components/avatar.js.map +1 -1
  7. package/components/card-accordion.js +1 -1
  8. package/components/card-accordion.js.map +1 -1
  9. package/components/card-content.js +1 -1
  10. package/components/card-title.js +1 -1
  11. package/components/card.js +3 -3
  12. package/components/card.js.map +1 -1
  13. package/components/col.js.map +1 -1
  14. package/components/context.js +1 -1
  15. package/components/context.js.map +1 -1
  16. package/components/divider.js +1 -1
  17. package/components/dropdown-controller.js +140 -0
  18. package/components/dropdown-controller.js.map +1 -0
  19. package/components/dropdown-item.js +4 -4
  20. package/components/dropdown-item.js.map +1 -1
  21. package/components/dropdown.js +13 -145
  22. package/components/dropdown.js.map +1 -1
  23. package/components/filter-chip.js +1 -1
  24. package/components/floating-ui.dom.esm.js +533 -60
  25. package/components/floating-ui.dom.esm.js.map +1 -1
  26. package/components/group-context-menu.js +1 -1
  27. package/components/group-context-menu.js.map +1 -1
  28. package/components/group-item.js +4 -8
  29. package/components/group-item.js.map +1 -1
  30. package/components/index.js +1 -0
  31. package/components/index.js.map +1 -1
  32. package/components/ix-action-card.js +1 -1
  33. package/components/ix-action-card.js.map +1 -1
  34. package/components/ix-application-sidebar.js +1 -1
  35. package/components/ix-application-switch-modal.js +1 -1
  36. package/components/ix-application.js +2 -2
  37. package/components/ix-application.js.map +1 -1
  38. package/components/ix-basic-navigation.js +18 -12
  39. package/components/ix-basic-navigation.js.map +1 -1
  40. package/components/ix-blind.js.map +1 -1
  41. package/components/ix-breadcrumb.js +2 -2
  42. package/components/ix-card-list.js +6 -6
  43. package/components/ix-card-list.js.map +1 -1
  44. package/components/ix-category-filter.js +8 -4
  45. package/components/ix-category-filter.js.map +1 -1
  46. package/components/ix-chip.js +4 -4
  47. package/components/ix-chip.js.map +1 -1
  48. package/components/ix-content.js +3 -3
  49. package/components/ix-css-grid-item.js +1 -1
  50. package/components/ix-drawer.js +2 -2
  51. package/components/ix-dropdown-header.js +1 -1
  52. package/components/ix-dropdown-quick-actions.js +1 -1
  53. package/components/ix-event-list-item.js +4 -4
  54. package/components/ix-event-list.js +2 -2
  55. package/components/ix-expanding-search.js +4 -4
  56. package/components/ix-flip-tile-content.js +1 -1
  57. package/components/ix-flip-tile.js +4 -4
  58. package/components/ix-form-field.js +1 -1
  59. package/components/ix-group.js +69 -44
  60. package/components/ix-group.js.map +1 -1
  61. package/components/ix-icon-toggle-button.js +1 -1
  62. package/components/ix-input-group.js +1 -1
  63. package/components/ix-key-value-list.js +1 -1
  64. package/components/ix-kpi.js +3 -3
  65. package/components/ix-kpi.js.map +1 -1
  66. package/components/ix-link-button.js +3 -3
  67. package/components/ix-map-navigation.js +21 -15
  68. package/components/ix-map-navigation.js.map +1 -1
  69. package/components/ix-menu-about-item.js +1 -1
  70. package/components/ix-menu-about-news.js +4 -4
  71. package/components/ix-menu-avatar.js +2 -2
  72. package/components/ix-menu-category.js +5 -5
  73. package/components/ix-menu-settings-item.js +1 -1
  74. package/components/ix-menu.js +12 -12
  75. package/components/ix-menu.js.map +1 -1
  76. package/components/ix-message-bar.js +1 -1
  77. package/components/ix-modal-example.js +1 -1
  78. package/components/ix-modal-footer.js +2 -2
  79. package/components/ix-modal-footer.js.map +1 -1
  80. package/components/ix-modal-loading.js +1 -1
  81. package/components/ix-modal.js +1 -1
  82. package/components/ix-modal.js.map +1 -1
  83. package/components/ix-pagination.js +3 -3
  84. package/components/ix-pagination.js.map +1 -1
  85. package/components/ix-pane-layout.js +1 -1
  86. package/components/ix-pane.js.map +1 -1
  87. package/components/ix-pill.js +4 -4
  88. package/components/ix-pill.js.map +1 -1
  89. package/components/ix-playground-internal.js +1 -1
  90. package/components/ix-playground-internal.js.map +1 -1
  91. package/components/ix-push-card.js +1 -1
  92. package/components/ix-push-card.js.map +1 -1
  93. package/components/ix-slider.js +20 -13
  94. package/components/ix-slider.js.map +1 -1
  95. package/components/ix-split-button-item.js +1 -1
  96. package/components/ix-tile.js +4 -4
  97. package/components/ix-tile.js.map +1 -1
  98. package/components/ix-toast-container.js.map +1 -1
  99. package/components/ix-toggle-button.js +2 -2
  100. package/components/ix-toggle.js +2 -2
  101. package/components/ix-tree.js +21 -7
  102. package/components/ix-tree.js.map +1 -1
  103. package/components/ix-upload.js +3 -3
  104. package/components/ix-upload.js.map +1 -1
  105. package/components/ix-validation-tooltip.js +2 -2
  106. package/components/ix-workflow-step.js +3 -3
  107. package/components/ix-workflow-step.js.map +1 -1
  108. package/components/ix-workflow-steps.js +1 -1
  109. package/components/ix-workflow-steps.js.map +1 -1
  110. package/components/layout-grid.js +2 -2
  111. package/components/layout-grid.js.map +1 -1
  112. package/components/listener.js +1 -1
  113. package/components/listener.js.map +1 -1
  114. package/components/logical-filter-operator.js +1 -1
  115. package/components/logical-filter-operator.js.map +1 -1
  116. package/components/map-navigation-overlay.js +2 -2
  117. package/components/menu-avatar-item.js +1 -1
  118. package/components/menu-expand-icon.js +1 -1
  119. package/components/menu-expand-icon.js.map +1 -1
  120. package/components/menu-item.js +14 -14
  121. package/components/menu-item.js.map +1 -1
  122. package/components/modal-content.js +1 -1
  123. package/components/modal-content.js.map +1 -1
  124. package/components/modal-header.js +1 -1
  125. package/components/modal-header.js.map +1 -1
  126. package/components/row.js +1 -1
  127. package/components/row.js.map +1 -1
  128. package/components/select-item.js +1 -1
  129. package/components/select.js +27 -30
  130. package/components/select.js.map +1 -1
  131. package/components/service.js +2 -2
  132. package/components/service.js.map +1 -1
  133. package/components/shadow-dom.js +1 -1
  134. package/components/shadow-dom.js.map +1 -1
  135. package/components/spinner.js +1 -1
  136. package/components/tab-item.js +3 -3
  137. package/components/tab-item.js.map +1 -1
  138. package/components/tabs.js +77 -43
  139. package/components/tabs.js.map +1 -1
  140. package/components/toast.js +2 -2
  141. package/components/toast.js.map +1 -1
  142. package/components/tooltip.js +24 -22
  143. package/components/tooltip.js.map +1 -1
  144. package/components/tree-item.js +8 -8
  145. package/components/tree-item.js.map +1 -1
  146. package/dist/cjs/{a11y-d3ce56d1.js → a11y-eba397e8.js} +2 -2
  147. package/dist/cjs/{a11y-d3ce56d1.js.map → a11y-eba397e8.js.map} +1 -1
  148. package/dist/cjs/{context-98f4a0b3.js → context-938f7470.js} +2 -2
  149. package/dist/cjs/{context-98f4a0b3.js.map → context-938f7470.js.map} +1 -1
  150. package/dist/cjs/dropdown-controller-5ef3d018.js +144 -0
  151. package/dist/cjs/dropdown-controller-5ef3d018.js.map +1 -0
  152. package/dist/cjs/{floating-ui.dom.esm-94b4d17c.js → floating-ui.dom.esm-9dde6cd6.js} +534 -60
  153. package/dist/cjs/floating-ui.dom.esm-9dde6cd6.js.map +1 -0
  154. package/dist/cjs/index.cjs.js +3 -2
  155. package/dist/cjs/index.cjs.js.map +1 -1
  156. package/dist/cjs/ix-action-card.cjs.entry.js +1 -1
  157. package/dist/cjs/ix-action-card.cjs.entry.js.map +1 -1
  158. package/dist/cjs/ix-application-header.cjs.entry.js +35 -9
  159. package/dist/cjs/ix-application-header.cjs.entry.js.map +1 -1
  160. package/dist/cjs/ix-application-sidebar.cjs.entry.js +1 -1
  161. package/dist/cjs/ix-application-switch-modal.cjs.entry.js +1 -1
  162. package/dist/cjs/ix-application.cjs.entry.js +5 -5
  163. package/dist/cjs/ix-application.cjs.entry.js.map +1 -1
  164. package/dist/cjs/ix-avatar_2.cjs.entry.js +3 -3
  165. package/dist/cjs/ix-avatar_2.cjs.entry.js.map +1 -1
  166. package/dist/cjs/ix-basic-navigation.cjs.entry.js +4 -4
  167. package/dist/cjs/ix-basic-navigation.cjs.entry.js.map +1 -1
  168. package/dist/cjs/ix-blind.cjs.entry.js +1 -1
  169. package/dist/cjs/ix-blind.cjs.entry.js.map +1 -1
  170. package/dist/cjs/ix-breadcrumb-item.cjs.entry.js +1 -1
  171. package/dist/cjs/ix-breadcrumb.cjs.entry.js +3 -3
  172. package/dist/cjs/ix-card-accordion_2.cjs.entry.js +2 -2
  173. package/dist/cjs/ix-card-accordion_2.cjs.entry.js.map +1 -1
  174. package/dist/cjs/ix-card-list.cjs.entry.js +6 -6
  175. package/dist/cjs/ix-card-list.cjs.entry.js.map +1 -1
  176. package/dist/cjs/ix-card_2.cjs.entry.js +4 -4
  177. package/dist/cjs/ix-card_2.cjs.entry.js.map +1 -1
  178. package/dist/cjs/ix-category-filter.cjs.entry.js +9 -5
  179. package/dist/cjs/ix-category-filter.cjs.entry.js.map +1 -1
  180. package/dist/cjs/ix-chip.cjs.entry.js +4 -4
  181. package/dist/cjs/ix-chip.cjs.entry.js.map +1 -1
  182. package/dist/cjs/ix-col_4.cjs.entry.js +4 -4
  183. package/dist/cjs/ix-col_4.cjs.entry.js.map +1 -1
  184. package/dist/cjs/ix-content.cjs.entry.js +4 -4
  185. package/dist/cjs/ix-css-grid-item.cjs.entry.js +1 -1
  186. package/dist/cjs/ix-divider.cjs.entry.js +1 -1
  187. package/dist/cjs/ix-drawer.cjs.entry.js +2 -2
  188. package/dist/cjs/ix-dropdown-header.cjs.entry.js +1 -1
  189. package/dist/cjs/ix-dropdown-item.cjs.entry.js +4 -4
  190. package/dist/cjs/ix-dropdown-item.cjs.entry.js.map +1 -1
  191. package/dist/cjs/ix-dropdown-quick-actions.cjs.entry.js +1 -1
  192. package/dist/cjs/ix-dropdown.cjs.entry.js +26 -158
  193. package/dist/cjs/ix-dropdown.cjs.entry.js.map +1 -1
  194. package/dist/cjs/ix-event-list-item.cjs.entry.js +5 -5
  195. package/dist/cjs/ix-event-list.cjs.entry.js +2 -2
  196. package/dist/cjs/ix-expanding-search.cjs.entry.js +4 -4
  197. package/dist/cjs/ix-filter-chip_2.cjs.entry.js +2 -2
  198. package/dist/cjs/ix-flip-tile-content.cjs.entry.js +1 -1
  199. package/dist/cjs/ix-flip-tile.cjs.entry.js +4 -4
  200. package/dist/cjs/ix-form-field.cjs.entry.js +1 -1
  201. package/dist/cjs/ix-group-context-menu_2.cjs.entry.js +6 -10
  202. package/dist/cjs/ix-group-context-menu_2.cjs.entry.js.map +1 -1
  203. package/dist/cjs/ix-group.cjs.entry.js +68 -44
  204. package/dist/cjs/ix-group.cjs.entry.js.map +1 -1
  205. package/dist/cjs/ix-icon-button_2.cjs.entry.js +2 -2
  206. package/dist/cjs/ix-icon-toggle-button.cjs.entry.js +2 -2
  207. package/dist/cjs/ix-input-group.cjs.entry.js +2 -2
  208. package/dist/cjs/ix-key-value-list.cjs.entry.js +1 -1
  209. package/dist/cjs/ix-kpi.cjs.entry.js +3 -3
  210. package/dist/cjs/ix-kpi.cjs.entry.js.map +1 -1
  211. package/dist/cjs/ix-link-button.cjs.entry.js +3 -3
  212. package/dist/cjs/ix-map-navigation-overlay.cjs.entry.js +2 -2
  213. package/dist/cjs/ix-map-navigation.cjs.entry.js +4 -4
  214. package/dist/cjs/ix-map-navigation.cjs.entry.js.map +1 -1
  215. package/dist/cjs/ix-menu-about-item.cjs.entry.js +1 -1
  216. package/dist/cjs/ix-menu-about-news.cjs.entry.js +4 -4
  217. package/dist/cjs/ix-menu-avatar.cjs.entry.js +3 -3
  218. package/dist/cjs/ix-menu-category.cjs.entry.js +6 -6
  219. package/dist/cjs/ix-menu-expand-icon.cjs.entry.js +2 -2
  220. package/dist/cjs/ix-menu-expand-icon.cjs.entry.js.map +1 -1
  221. package/dist/cjs/ix-menu-item.cjs.entry.js +13 -13
  222. package/dist/cjs/ix-menu-item.cjs.entry.js.map +1 -1
  223. package/dist/cjs/ix-menu-settings-item.cjs.entry.js +1 -1
  224. package/dist/cjs/ix-menu.cjs.entry.js +14 -14
  225. package/dist/cjs/ix-menu.cjs.entry.js.map +1 -1
  226. package/dist/cjs/ix-message-bar.cjs.entry.js +1 -1
  227. package/dist/cjs/ix-modal-content_2.cjs.entry.js +3 -3
  228. package/dist/cjs/ix-modal-content_2.cjs.entry.js.map +1 -1
  229. package/dist/cjs/ix-modal-example.cjs.entry.js +1 -1
  230. package/dist/cjs/ix-modal-footer.cjs.entry.js +2 -2
  231. package/dist/cjs/ix-modal-footer.cjs.entry.js.map +1 -1
  232. package/dist/cjs/ix-modal-loading.cjs.entry.js +1 -1
  233. package/dist/cjs/ix-modal.cjs.entry.js +3 -3
  234. package/dist/cjs/ix-modal.cjs.entry.js.map +1 -1
  235. package/dist/cjs/ix-pagination.cjs.entry.js +4 -4
  236. package/dist/cjs/ix-pagination.cjs.entry.js.map +1 -1
  237. package/dist/cjs/ix-pane-layout.cjs.entry.js +2 -2
  238. package/dist/cjs/ix-pane.cjs.entry.js +1 -1
  239. package/dist/cjs/ix-pane.cjs.entry.js.map +1 -1
  240. package/dist/cjs/ix-pill.cjs.entry.js +4 -4
  241. package/dist/cjs/ix-pill.cjs.entry.js.map +1 -1
  242. package/dist/cjs/ix-playground-internal.cjs.entry.js +1 -1
  243. package/dist/cjs/ix-playground-internal.cjs.entry.js.map +1 -1
  244. package/dist/cjs/ix-push-card.cjs.entry.js +1 -1
  245. package/dist/cjs/ix-push-card.cjs.entry.js.map +1 -1
  246. package/dist/cjs/ix-select.cjs.entry.js +28 -31
  247. package/dist/cjs/ix-select.cjs.entry.js.map +1 -1
  248. package/dist/cjs/ix-slider.cjs.entry.js +22 -15
  249. package/dist/cjs/ix-slider.cjs.entry.js.map +1 -1
  250. package/dist/cjs/ix-split-button-item.cjs.entry.js +1 -1
  251. package/dist/cjs/ix-tab-item_2.cjs.entry.js +74 -44
  252. package/dist/cjs/ix-tab-item_2.cjs.entry.js.map +1 -1
  253. package/dist/cjs/ix-tile.cjs.entry.js +4 -4
  254. package/dist/cjs/ix-tile.cjs.entry.js.map +1 -1
  255. package/dist/cjs/ix-toast-container.cjs.entry.js.map +1 -1
  256. package/dist/cjs/ix-toast.cjs.entry.js +2 -2
  257. package/dist/cjs/ix-toast.cjs.entry.js.map +1 -1
  258. package/dist/cjs/ix-toggle-button.cjs.entry.js +3 -3
  259. package/dist/cjs/ix-toggle.cjs.entry.js +3 -3
  260. package/dist/cjs/ix-tooltip.cjs.entry.js +25 -23
  261. package/dist/cjs/ix-tooltip.cjs.entry.js.map +1 -1
  262. package/dist/cjs/ix-tree-item.cjs.entry.js +8 -8
  263. package/dist/cjs/ix-tree-item.cjs.entry.js.map +1 -1
  264. package/dist/cjs/ix-tree.cjs.entry.js +21 -7
  265. package/dist/cjs/ix-tree.cjs.entry.js.map +1 -1
  266. package/dist/cjs/ix-upload.cjs.entry.js +3 -3
  267. package/dist/cjs/ix-upload.cjs.entry.js.map +1 -1
  268. package/dist/cjs/ix-validation-tooltip.cjs.entry.js +3 -3
  269. package/dist/cjs/ix-workflow-step.cjs.entry.js +3 -3
  270. package/dist/cjs/ix-workflow-step.cjs.entry.js.map +1 -1
  271. package/dist/cjs/ix-workflow-steps.cjs.entry.js +1 -1
  272. package/dist/cjs/ix-workflow-steps.cjs.entry.js.map +1 -1
  273. package/dist/cjs/{listener-bc3e7c0c.js → listener-a124ed49.js} +2 -2
  274. package/dist/cjs/{listener-bc3e7c0c.js.map → listener-a124ed49.js.map} +1 -1
  275. package/dist/cjs/loader.cjs.js +1 -1
  276. package/dist/cjs/{logical-filter-operator-5564322e.js → logical-filter-operator-4917393f.js} +2 -2
  277. package/dist/cjs/{logical-filter-operator-5564322e.js.map → logical-filter-operator-4917393f.js.map} +1 -1
  278. package/dist/cjs/{service-a42add5f.js → service-39a8e5fe.js} +3 -3
  279. package/dist/cjs/service-39a8e5fe.js.map +1 -0
  280. package/dist/cjs/{shadow-dom-73f9d553.js → shadow-dom-454acc38.js} +2 -2
  281. package/dist/cjs/{shadow-dom-73f9d553.js.map → shadow-dom-454acc38.js.map} +1 -1
  282. package/dist/cjs/siemens-ix.cjs.js +1 -1
  283. package/dist/collection/components/action-card/action-card.js +6 -3
  284. package/dist/collection/components/action-card/action-card.js.map +1 -1
  285. package/dist/collection/components/application/application.css +26 -6
  286. package/dist/collection/components/application/application.js +1 -1
  287. package/dist/collection/components/application/application.js.map +1 -1
  288. package/dist/collection/components/application-header/application-header.css +9 -7
  289. package/dist/collection/components/application-header/application-header.js +78 -6
  290. package/dist/collection/components/application-header/application-header.js.map +1 -1
  291. package/dist/collection/components/application-header/application-switch-modal/application-switch-modal.js +1 -1
  292. package/dist/collection/components/application-sidebar/application-sidebar.js +1 -1
  293. package/dist/collection/components/avatar/avatar.css +42 -0
  294. package/dist/collection/components/basic-navigation/basic-navigation.js +7 -4
  295. package/dist/collection/components/basic-navigation/basic-navigation.js.map +1 -1
  296. package/dist/collection/components/blind/blind.css +1 -1
  297. package/dist/collection/components/blind/blind.js +2 -2
  298. package/dist/collection/components/blind/blind.js.map +1 -1
  299. package/dist/collection/components/blind/test/blind.ct.js +1 -1
  300. package/dist/collection/components/blind/test/blind.ct.js.map +1 -1
  301. package/dist/collection/components/breadcrumb/breadcrumb.js +2 -2
  302. package/dist/collection/components/card/card.css +3 -3
  303. package/dist/collection/components/card/card.js +7 -4
  304. package/dist/collection/components/card/card.js.map +1 -1
  305. package/dist/collection/components/card-accordion/card-accordion.css +4 -4
  306. package/dist/collection/components/card-content/card-content.js +1 -1
  307. package/dist/collection/components/card-list/card-list.css +6 -0
  308. package/dist/collection/components/card-list/card-list.js +5 -5
  309. package/dist/collection/components/card-list/card-list.js.map +1 -1
  310. package/dist/collection/components/card-title/card-title.js +1 -1
  311. package/dist/collection/components/category-filter/category-filter.js +18 -13
  312. package/dist/collection/components/category-filter/category-filter.js.map +1 -1
  313. package/dist/collection/components/category-filter/logical-filter-operator.js +1 -1
  314. package/dist/collection/components/category-filter/logical-filter-operator.js.map +1 -1
  315. package/dist/collection/components/category-filter/test/category-filter.ct.js +52 -0
  316. package/dist/collection/components/category-filter/test/category-filter.ct.js.map +1 -0
  317. package/dist/collection/components/chip/chip.css +2 -2
  318. package/dist/collection/components/chip/chip.js +5 -5
  319. package/dist/collection/components/chip/chip.js.map +1 -1
  320. package/dist/collection/components/col/col.css +1 -1
  321. package/dist/collection/components/col/col.js +1 -1
  322. package/dist/collection/components/col/col.js.map +1 -1
  323. package/dist/collection/components/content/content.js +3 -3
  324. package/dist/collection/components/css-grid/css-grid-item.js +1 -1
  325. package/dist/collection/components/divider/divider.js +1 -1
  326. package/dist/collection/components/drawer/drawer.js +2 -2
  327. package/dist/collection/components/dropdown/dropdown.js +10 -6
  328. package/dist/collection/components/dropdown/dropdown.js.map +1 -1
  329. package/dist/collection/components/dropdown-header/dropdown-header.js +1 -1
  330. package/dist/collection/components/dropdown-item/dropdown-item.css +3 -3
  331. package/dist/collection/components/dropdown-item/dropdown-item.js +5 -5
  332. package/dist/collection/components/dropdown-item/dropdown-item.js.map +1 -1
  333. package/dist/collection/components/dropdown-quick-actions/dropdown-quick-actions.js +1 -1
  334. package/dist/collection/components/event-list/event-list.js +2 -2
  335. package/dist/collection/components/event-list-item/event-list-item.js +4 -4
  336. package/dist/collection/components/expanding-search/expanding-search.js +4 -4
  337. package/dist/collection/components/filter-chip/filter-chip.js +1 -1
  338. package/dist/collection/components/flip-tile/flip-tile.js +4 -4
  339. package/dist/collection/components/flip-tile-content/flip-tile-content.js +1 -1
  340. package/dist/collection/components/form-field/form-field.js +1 -1
  341. package/dist/collection/components/grid/layout-grid.css +1 -1
  342. package/dist/collection/components/grid/layout-grid.js +3 -3
  343. package/dist/collection/components/grid/layout-grid.js.map +1 -1
  344. package/dist/collection/components/group/group-context-menu.css +1 -1
  345. package/dist/collection/components/group/group-context-menu.js +2 -2
  346. package/dist/collection/components/group/group-context-menu.js.map +1 -1
  347. package/dist/collection/components/group/group.css +3 -2
  348. package/dist/collection/components/group/group.js +84 -48
  349. package/dist/collection/components/group/group.js.map +1 -1
  350. package/dist/collection/components/group/test/group.ct.js +70 -2
  351. package/dist/collection/components/group/test/group.ct.js.map +1 -1
  352. package/dist/collection/components/group-item/group-item.css +0 -4
  353. package/dist/collection/components/group-item/group-item.js +9 -12
  354. package/dist/collection/components/group-item/group-item.js.map +1 -1
  355. package/dist/collection/components/icon-toggle-button/icon-toggle-button.js +1 -1
  356. package/dist/collection/components/input-group/input-group.js +1 -1
  357. package/dist/collection/components/key-value-list/key-value-list.js +1 -1
  358. package/dist/collection/components/kpi/kpi.css +1 -1
  359. package/dist/collection/components/kpi/kpi.js +4 -4
  360. package/dist/collection/components/kpi/kpi.js.map +1 -1
  361. package/dist/collection/components/link-button/link-button.js +3 -3
  362. package/dist/collection/components/map-navigation/map-navigation.css +3 -3
  363. package/dist/collection/components/map-navigation/map-navigation.js +2 -2
  364. package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.js +2 -2
  365. package/dist/collection/components/menu/menu-expand-icon.css +1 -1
  366. package/dist/collection/components/menu/menu-expand-icon.js +3 -3
  367. package/dist/collection/components/menu/menu-expand-icon.js.map +1 -1
  368. package/dist/collection/components/menu/menu.css +4 -3
  369. package/dist/collection/components/menu/menu.js +12 -12
  370. package/dist/collection/components/menu/menu.js.map +1 -1
  371. package/dist/collection/components/menu/test/menu.ct.js +1 -1
  372. package/dist/collection/components/menu/test/menu.ct.js.map +1 -1
  373. package/dist/collection/components/menu-about-item/menu-about-item.js +1 -1
  374. package/dist/collection/components/menu-about-news/menu-about-news.js +4 -4
  375. package/dist/collection/components/menu-avatar/menu-avatar.js +2 -2
  376. package/dist/collection/components/menu-avatar-item/menu-avatar-item.js +1 -1
  377. package/dist/collection/components/menu-category/menu-category.js +5 -5
  378. package/dist/collection/components/menu-item/menu-item.js +24 -21
  379. package/dist/collection/components/menu-item/menu-item.js.map +1 -1
  380. package/dist/collection/components/menu-settings-item/menu-settings-item.js +1 -1
  381. package/dist/collection/components/message-bar/message-bar.js +1 -1
  382. package/dist/collection/components/modal/modal.css +18 -8
  383. package/dist/collection/components/modal/modal.js +1 -1
  384. package/dist/collection/components/modal/modal.js.map +1 -1
  385. package/dist/collection/components/modal/test/modal.ct.js +1 -1
  386. package/dist/collection/components/modal/test/modal.ct.js.map +1 -1
  387. package/dist/collection/components/modal-content/modal-content.css +1 -1
  388. package/dist/collection/components/modal-content/modal-content.js +1 -1
  389. package/dist/collection/components/modal-footer/modal-footer.css +1 -0
  390. package/dist/collection/components/modal-footer/modal-footer.js +1 -1
  391. package/dist/collection/components/modal-header/modal-header.js +2 -2
  392. package/dist/collection/components/modal-header/modal-header.js.map +1 -1
  393. package/dist/collection/components/modal-loading/modal-loading.js +1 -1
  394. package/dist/collection/components/pagination/pagination.js +5 -4
  395. package/dist/collection/components/pagination/pagination.js.map +1 -1
  396. package/dist/collection/components/pane/pane.css +1 -1
  397. package/dist/collection/components/pane/pane.js +1 -1
  398. package/dist/collection/components/pane/pane.js.map +1 -1
  399. package/dist/collection/components/pane/test/panes.ct.js +1 -1
  400. package/dist/collection/components/pane/test/panes.ct.js.map +1 -1
  401. package/dist/collection/components/pane-layout/pane-layout.js +1 -1
  402. package/dist/collection/components/pill/pill.css +2 -2
  403. package/dist/collection/components/pill/pill.js +5 -5
  404. package/dist/collection/components/pill/pill.js.map +1 -1
  405. package/dist/collection/components/playground/example-modal.js +1 -1
  406. package/dist/collection/components/playground/playground.js +2 -2
  407. package/dist/collection/components/playground/playground.js.map +1 -1
  408. package/dist/collection/components/push-card/push-card.js +9 -6
  409. package/dist/collection/components/push-card/push-card.js.map +1 -1
  410. package/dist/collection/components/row/row.css +1 -1
  411. package/dist/collection/components/row/row.js +2 -2
  412. package/dist/collection/components/row/row.js.map +1 -1
  413. package/dist/collection/components/select/select.js +27 -30
  414. package/dist/collection/components/select/select.js.map +1 -1
  415. package/dist/collection/components/select/test/select.ct.js +45 -1
  416. package/dist/collection/components/select/test/select.ct.js.map +1 -1
  417. package/dist/collection/components/select-item/select-item.js +1 -1
  418. package/dist/collection/components/slider/slider.css +1 -1
  419. package/dist/collection/components/slider/slider.js +23 -15
  420. package/dist/collection/components/slider/slider.js.map +1 -1
  421. package/dist/collection/components/slider/test/slider.ct.js +15 -6
  422. package/dist/collection/components/slider/test/slider.ct.js.map +1 -1
  423. package/dist/collection/components/spinner/spinner.js +1 -1
  424. package/dist/collection/components/split-button-item/split-button-item.js +1 -1
  425. package/dist/collection/components/tab-item/tab-item.js +4 -4
  426. package/dist/collection/components/tab-item/tab-item.js.map +1 -1
  427. package/dist/collection/components/tabs/tabs.css +1 -1
  428. package/dist/collection/components/tabs/tabs.js +78 -43
  429. package/dist/collection/components/tabs/tabs.js.map +1 -1
  430. package/dist/collection/components/tabs/test/tabs.ct.js +35 -9
  431. package/dist/collection/components/tabs/test/tabs.ct.js.map +1 -1
  432. package/dist/collection/components/tile/tile.css +1 -1
  433. package/dist/collection/components/tile/tile.js +5 -5
  434. package/dist/collection/components/tile/tile.js.map +1 -1
  435. package/dist/collection/components/toast/styles/toast-container.css +1 -1
  436. package/dist/collection/components/toast/toast-container.js +1 -1
  437. package/dist/collection/components/toast/toast-container.js.map +1 -1
  438. package/dist/collection/components/toast/toast-utils.js.map +1 -1
  439. package/dist/collection/components/toast/toast.css +1 -1
  440. package/dist/collection/components/toast/toast.js +3 -3
  441. package/dist/collection/components/toast/toast.js.map +1 -1
  442. package/dist/collection/components/toggle/toggle.js +2 -2
  443. package/dist/collection/components/toggle-button/toggle-button.js +2 -2
  444. package/dist/collection/components/tooltip/tooltip.css +15 -5
  445. package/dist/collection/components/tooltip/tooltip.js +33 -26
  446. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  447. package/dist/collection/components/tree/test/tree.ct.js +37 -1
  448. package/dist/collection/components/tree/test/tree.ct.js.map +1 -1
  449. package/dist/collection/components/tree/tree-model.js.map +1 -1
  450. package/dist/collection/components/tree/tree.css +1 -1
  451. package/dist/collection/components/tree/tree.js +26 -11
  452. package/dist/collection/components/tree/tree.js.map +1 -1
  453. package/dist/collection/components/tree-item/tree-item.css +9 -0
  454. package/dist/collection/components/tree-item/tree-item.js +13 -12
  455. package/dist/collection/components/tree-item/tree-item.js.map +1 -1
  456. package/dist/collection/components/upload/upload.js +4 -4
  457. package/dist/collection/components/upload/upload.js.map +1 -1
  458. package/dist/collection/components/utils/application-layout/service.js +2 -2
  459. package/dist/collection/components/utils/application-layout/service.js.map +1 -1
  460. package/dist/collection/components/utils/condition-checks.js +1 -1
  461. package/dist/collection/components/utils/condition-checks.js.map +1 -1
  462. package/dist/collection/components/utils/context.js +1 -1
  463. package/dist/collection/components/utils/context.js.map +1 -1
  464. package/dist/collection/components/utils/listener.js +1 -1
  465. package/dist/collection/components/utils/listener.js.map +1 -1
  466. package/dist/collection/components/utils/notification-color.js.map +1 -1
  467. package/dist/collection/components/utils/shadow-dom.js +1 -1
  468. package/dist/collection/components/utils/shadow-dom.js.map +1 -1
  469. package/dist/collection/components/validation-tooltip/validation-tooltip.js +2 -2
  470. package/dist/collection/components/workflow-step/workflow-step.css +1 -1
  471. package/dist/collection/components/workflow-step/workflow-step.js +4 -4
  472. package/dist/collection/components/workflow-step/workflow-step.js.map +1 -1
  473. package/dist/collection/components/workflow-steps/test/workflow-steps.ct.js +2 -2
  474. package/dist/collection/components/workflow-steps/test/workflow-steps.ct.js.map +1 -1
  475. package/dist/collection/components/workflow-steps/workflow-steps.css +1 -1
  476. package/dist/collection/components/workflow-steps/workflow-steps.js +2 -2
  477. package/dist/collection/components/workflow-steps/workflow-steps.js.map +1 -1
  478. package/dist/collection/index.js +1 -0
  479. package/dist/collection/index.js.map +1 -1
  480. package/dist/collection/tests/application-header/application-header.e2e.js +9 -0
  481. package/dist/collection/tests/application-header/application-header.e2e.js.map +1 -1
  482. package/dist/collection/tests/avatar/avatar.e2e.js +6 -0
  483. package/dist/collection/tests/avatar/avatar.e2e.js.map +1 -1
  484. package/dist/collection/tests/card-list/card-list.e2e.js +7 -1
  485. package/dist/collection/tests/card-list/card-list.e2e.js.map +1 -1
  486. package/dist/collection/tests/dropdown/dropdown.e2e.js +6 -0
  487. package/dist/collection/tests/dropdown/dropdown.e2e.js.map +1 -1
  488. package/dist/collection/tests/group/group.e2e.js +12 -3
  489. package/dist/collection/tests/group/group.e2e.js.map +1 -1
  490. package/dist/collection/tests/slider/slider.e2e.js +14 -0
  491. package/dist/collection/tests/slider/slider.e2e.js.map +1 -1
  492. package/dist/collection/tests/tabs/tabs.e2e.js +1 -1
  493. package/dist/collection/tests/tabs/tabs.e2e.js.map +1 -1
  494. package/dist/collection/tests/tooltip/tooltip.e2e.js +22 -0
  495. package/dist/collection/tests/tooltip/tooltip.e2e.js.map +1 -1
  496. package/dist/collection/tests/tree/tree.e2e.js +12 -0
  497. package/dist/collection/tests/tree/tree.e2e.js.map +1 -1
  498. package/dist/esm/{a11y-d5444a76.js → a11y-2e34777f.js} +2 -2
  499. package/dist/esm/{a11y-d5444a76.js.map → a11y-2e34777f.js.map} +1 -1
  500. package/dist/esm/{context-c9078420.js → context-82a1ccf8.js} +2 -2
  501. package/dist/esm/{context-c9078420.js.map → context-82a1ccf8.js.map} +1 -1
  502. package/dist/esm/dropdown-controller-95bd6750.js +140 -0
  503. package/dist/esm/dropdown-controller-95bd6750.js.map +1 -0
  504. package/dist/esm/{floating-ui.dom.esm-6e7c098f.js → floating-ui.dom.esm-d4ad786a.js} +534 -61
  505. package/dist/esm/floating-ui.dom.esm-d4ad786a.js.map +1 -0
  506. package/dist/esm/index.js +2 -2
  507. package/dist/esm/index.js.map +1 -1
  508. package/dist/esm/ix-action-card.entry.js +1 -1
  509. package/dist/esm/ix-action-card.entry.js.map +1 -1
  510. package/dist/esm/ix-application-header.entry.js +36 -10
  511. package/dist/esm/ix-application-header.entry.js.map +1 -1
  512. package/dist/esm/ix-application-sidebar.entry.js +1 -1
  513. package/dist/esm/ix-application-switch-modal.entry.js +1 -1
  514. package/dist/esm/ix-application.entry.js +5 -5
  515. package/dist/esm/ix-application.entry.js.map +1 -1
  516. package/dist/esm/ix-avatar_2.entry.js +3 -3
  517. package/dist/esm/ix-avatar_2.entry.js.map +1 -1
  518. package/dist/esm/ix-basic-navigation.entry.js +4 -4
  519. package/dist/esm/ix-basic-navigation.entry.js.map +1 -1
  520. package/dist/esm/ix-blind.entry.js +1 -1
  521. package/dist/esm/ix-blind.entry.js.map +1 -1
  522. package/dist/esm/ix-breadcrumb-item.entry.js +1 -1
  523. package/dist/esm/ix-breadcrumb.entry.js +3 -3
  524. package/dist/esm/ix-card-accordion_2.entry.js +2 -2
  525. package/dist/esm/ix-card-accordion_2.entry.js.map +1 -1
  526. package/dist/esm/ix-card-list.entry.js +6 -6
  527. package/dist/esm/ix-card-list.entry.js.map +1 -1
  528. package/dist/esm/ix-card_2.entry.js +4 -4
  529. package/dist/esm/ix-card_2.entry.js.map +1 -1
  530. package/dist/esm/ix-category-filter.entry.js +9 -5
  531. package/dist/esm/ix-category-filter.entry.js.map +1 -1
  532. package/dist/esm/ix-chip.entry.js +4 -4
  533. package/dist/esm/ix-chip.entry.js.map +1 -1
  534. package/dist/esm/ix-col_4.entry.js +4 -4
  535. package/dist/esm/ix-col_4.entry.js.map +1 -1
  536. package/dist/esm/ix-content.entry.js +4 -4
  537. package/dist/esm/ix-css-grid-item.entry.js +1 -1
  538. package/dist/esm/ix-divider.entry.js +1 -1
  539. package/dist/esm/ix-drawer.entry.js +2 -2
  540. package/dist/esm/ix-dropdown-header.entry.js +1 -1
  541. package/dist/esm/ix-dropdown-item.entry.js +4 -4
  542. package/dist/esm/ix-dropdown-item.entry.js.map +1 -1
  543. package/dist/esm/ix-dropdown-quick-actions.entry.js +1 -1
  544. package/dist/esm/ix-dropdown.entry.js +12 -144
  545. package/dist/esm/ix-dropdown.entry.js.map +1 -1
  546. package/dist/esm/ix-event-list-item.entry.js +5 -5
  547. package/dist/esm/ix-event-list.entry.js +2 -2
  548. package/dist/esm/ix-expanding-search.entry.js +4 -4
  549. package/dist/esm/ix-filter-chip_2.entry.js +2 -2
  550. package/dist/esm/ix-flip-tile-content.entry.js +1 -1
  551. package/dist/esm/ix-flip-tile.entry.js +4 -4
  552. package/dist/esm/ix-form-field.entry.js +1 -1
  553. package/dist/esm/ix-group-context-menu_2.entry.js +6 -10
  554. package/dist/esm/ix-group-context-menu_2.entry.js.map +1 -1
  555. package/dist/esm/ix-group.entry.js +68 -44
  556. package/dist/esm/ix-group.entry.js.map +1 -1
  557. package/dist/esm/ix-icon-button_2.entry.js +2 -2
  558. package/dist/esm/ix-icon-toggle-button.entry.js +2 -2
  559. package/dist/esm/ix-input-group.entry.js +2 -2
  560. package/dist/esm/ix-key-value-list.entry.js +1 -1
  561. package/dist/esm/ix-kpi.entry.js +3 -3
  562. package/dist/esm/ix-kpi.entry.js.map +1 -1
  563. package/dist/esm/ix-link-button.entry.js +3 -3
  564. package/dist/esm/ix-map-navigation-overlay.entry.js +2 -2
  565. package/dist/esm/ix-map-navigation.entry.js +4 -4
  566. package/dist/esm/ix-map-navigation.entry.js.map +1 -1
  567. package/dist/esm/ix-menu-about-item.entry.js +1 -1
  568. package/dist/esm/ix-menu-about-news.entry.js +4 -4
  569. package/dist/esm/ix-menu-avatar.entry.js +3 -3
  570. package/dist/esm/ix-menu-category.entry.js +6 -6
  571. package/dist/esm/ix-menu-expand-icon.entry.js +2 -2
  572. package/dist/esm/ix-menu-expand-icon.entry.js.map +1 -1
  573. package/dist/esm/ix-menu-item.entry.js +14 -14
  574. package/dist/esm/ix-menu-item.entry.js.map +1 -1
  575. package/dist/esm/ix-menu-settings-item.entry.js +1 -1
  576. package/dist/esm/ix-menu.entry.js +14 -14
  577. package/dist/esm/ix-menu.entry.js.map +1 -1
  578. package/dist/esm/ix-message-bar.entry.js +1 -1
  579. package/dist/esm/ix-modal-content_2.entry.js +3 -3
  580. package/dist/esm/ix-modal-content_2.entry.js.map +1 -1
  581. package/dist/esm/ix-modal-example.entry.js +1 -1
  582. package/dist/esm/ix-modal-footer.entry.js +2 -2
  583. package/dist/esm/ix-modal-footer.entry.js.map +1 -1
  584. package/dist/esm/ix-modal-loading.entry.js +1 -1
  585. package/dist/esm/ix-modal.entry.js +3 -3
  586. package/dist/esm/ix-modal.entry.js.map +1 -1
  587. package/dist/esm/ix-pagination.entry.js +4 -4
  588. package/dist/esm/ix-pagination.entry.js.map +1 -1
  589. package/dist/esm/ix-pane-layout.entry.js +2 -2
  590. package/dist/esm/ix-pane.entry.js +1 -1
  591. package/dist/esm/ix-pane.entry.js.map +1 -1
  592. package/dist/esm/ix-pill.entry.js +4 -4
  593. package/dist/esm/ix-pill.entry.js.map +1 -1
  594. package/dist/esm/ix-playground-internal.entry.js +1 -1
  595. package/dist/esm/ix-playground-internal.entry.js.map +1 -1
  596. package/dist/esm/ix-push-card.entry.js +1 -1
  597. package/dist/esm/ix-push-card.entry.js.map +1 -1
  598. package/dist/esm/ix-select.entry.js +28 -31
  599. package/dist/esm/ix-select.entry.js.map +1 -1
  600. package/dist/esm/ix-slider.entry.js +22 -15
  601. package/dist/esm/ix-slider.entry.js.map +1 -1
  602. package/dist/esm/ix-split-button-item.entry.js +1 -1
  603. package/dist/esm/ix-tab-item_2.entry.js +74 -44
  604. package/dist/esm/ix-tab-item_2.entry.js.map +1 -1
  605. package/dist/esm/ix-tile.entry.js +4 -4
  606. package/dist/esm/ix-tile.entry.js.map +1 -1
  607. package/dist/esm/ix-toast-container.entry.js.map +1 -1
  608. package/dist/esm/ix-toast.entry.js +2 -2
  609. package/dist/esm/ix-toast.entry.js.map +1 -1
  610. package/dist/esm/ix-toggle-button.entry.js +3 -3
  611. package/dist/esm/ix-toggle.entry.js +3 -3
  612. package/dist/esm/ix-tooltip.entry.js +25 -23
  613. package/dist/esm/ix-tooltip.entry.js.map +1 -1
  614. package/dist/esm/ix-tree-item.entry.js +8 -8
  615. package/dist/esm/ix-tree-item.entry.js.map +1 -1
  616. package/dist/esm/ix-tree.entry.js +21 -7
  617. package/dist/esm/ix-tree.entry.js.map +1 -1
  618. package/dist/esm/ix-upload.entry.js +3 -3
  619. package/dist/esm/ix-upload.entry.js.map +1 -1
  620. package/dist/esm/ix-validation-tooltip.entry.js +3 -3
  621. package/dist/esm/ix-workflow-step.entry.js +3 -3
  622. package/dist/esm/ix-workflow-step.entry.js.map +1 -1
  623. package/dist/esm/ix-workflow-steps.entry.js +1 -1
  624. package/dist/esm/ix-workflow-steps.entry.js.map +1 -1
  625. package/dist/esm/{listener-4f3baab5.js → listener-2c562054.js} +2 -2
  626. package/dist/esm/{listener-4f3baab5.js.map → listener-2c562054.js.map} +1 -1
  627. package/dist/esm/loader.js +1 -1
  628. package/dist/esm/{logical-filter-operator-f6701df5.js → logical-filter-operator-d793d1c3.js} +2 -2
  629. package/dist/esm/{logical-filter-operator-f6701df5.js.map → logical-filter-operator-d793d1c3.js.map} +1 -1
  630. package/dist/esm/{service-02cc9011.js → service-c7fc628b.js} +3 -3
  631. package/dist/esm/service-c7fc628b.js.map +1 -0
  632. package/dist/esm/{shadow-dom-60e9243d.js → shadow-dom-cc0bc152.js} +2 -2
  633. package/dist/esm/{shadow-dom-60e9243d.js.map → shadow-dom-cc0bc152.js.map} +1 -1
  634. package/dist/esm/siemens-ix.js +1 -1
  635. package/dist/siemens-ix/index.esm.js +1 -1
  636. package/dist/siemens-ix/index.esm.js.map +1 -1
  637. package/dist/siemens-ix/p-04af3853.entry.js +2 -0
  638. package/dist/siemens-ix/p-04ec538b.entry.js +2 -0
  639. package/dist/siemens-ix/p-04ec538b.entry.js.map +1 -0
  640. package/dist/siemens-ix/{p-68644ee1.entry.js → p-05dc6b2d.entry.js} +2 -2
  641. package/dist/siemens-ix/{p-68644ee1.entry.js.map → p-05dc6b2d.entry.js.map} +1 -1
  642. package/dist/siemens-ix/{p-af099ca4.entry.js → p-0632731e.entry.js} +2 -2
  643. package/dist/siemens-ix/{p-6af4415c.entry.js → p-085d5ec2.entry.js} +2 -2
  644. package/dist/siemens-ix/{p-6af4415c.entry.js.map → p-085d5ec2.entry.js.map} +1 -1
  645. package/dist/siemens-ix/{p-0d2a6886.entry.js → p-091b036d.entry.js} +2 -2
  646. package/dist/siemens-ix/{p-453fa360.entry.js → p-0ef97555.entry.js} +2 -2
  647. package/dist/siemens-ix/{p-453fa360.entry.js.map → p-0ef97555.entry.js.map} +1 -1
  648. package/dist/siemens-ix/{p-2946fd70.entry.js → p-0fafba48.entry.js} +2 -2
  649. package/dist/siemens-ix/{p-7076210b.entry.js → p-1483f65d.entry.js} +2 -2
  650. package/dist/siemens-ix/{p-4f8ac3bf.js → p-157b1b28.js} +1 -1
  651. package/dist/siemens-ix/{p-4f8ac3bf.js.map → p-157b1b28.js.map} +1 -1
  652. package/dist/siemens-ix/p-15f44099.entry.js +2 -0
  653. package/dist/siemens-ix/{p-87e692d9.entry.js.map → p-15f44099.entry.js.map} +1 -1
  654. package/dist/siemens-ix/{p-2908cacd.entry.js → p-17a8aab2.entry.js} +2 -2
  655. package/dist/siemens-ix/{p-2908cacd.entry.js.map → p-17a8aab2.entry.js.map} +1 -1
  656. package/dist/siemens-ix/{p-c1968b80.entry.js → p-1bd98772.entry.js} +2 -2
  657. package/dist/siemens-ix/p-1c3a0b1f.js +2 -0
  658. package/dist/siemens-ix/p-1c3a0b1f.js.map +1 -0
  659. package/dist/siemens-ix/{p-8629db91.entry.js → p-25f1749c.entry.js} +2 -2
  660. package/dist/siemens-ix/{p-5696bb62.entry.js → p-306269ae.entry.js} +2 -2
  661. package/dist/siemens-ix/{p-ae7a7af4.entry.js → p-33a7a26d.entry.js} +2 -2
  662. package/dist/siemens-ix/{p-ae7a7af4.entry.js.map → p-33a7a26d.entry.js.map} +1 -1
  663. package/dist/siemens-ix/{p-712e0ee0.js → p-345e1c73.js} +1 -1
  664. package/dist/siemens-ix/{p-712e0ee0.js.map → p-345e1c73.js.map} +1 -1
  665. package/dist/siemens-ix/p-35fff1e6.entry.js +2 -0
  666. package/dist/siemens-ix/{p-9ebc4fc3.entry.js → p-37229f30.entry.js} +2 -2
  667. package/dist/siemens-ix/{p-9ebc4fc3.entry.js.map → p-37229f30.entry.js.map} +1 -1
  668. package/dist/siemens-ix/p-3dc1294b.entry.js +2 -0
  669. package/dist/siemens-ix/{p-e9a3f58a.entry.js.map → p-3dc1294b.entry.js.map} +1 -1
  670. package/dist/siemens-ix/p-3f59a3c3.entry.js +2 -0
  671. package/dist/siemens-ix/p-3f59a3c3.entry.js.map +1 -0
  672. package/dist/siemens-ix/p-411f51c5.entry.js +2 -0
  673. package/dist/siemens-ix/{p-f78246bd.entry.js → p-44a27b29.entry.js} +2 -2
  674. package/dist/siemens-ix/{p-d03df401.entry.js → p-49d3fc15.entry.js} +2 -2
  675. package/dist/siemens-ix/{p-25ee1b62.js → p-4ac31849.js} +1 -1
  676. package/dist/siemens-ix/{p-25ee1b62.js.map → p-4ac31849.js.map} +1 -1
  677. package/dist/siemens-ix/{p-112069ca.entry.js → p-4e547dd3.entry.js} +2 -2
  678. package/dist/siemens-ix/p-4e547dd3.entry.js.map +1 -0
  679. package/dist/siemens-ix/p-5099c070.entry.js +2 -0
  680. package/dist/siemens-ix/p-5099c070.entry.js.map +1 -0
  681. package/dist/siemens-ix/{p-6b928634.entry.js → p-5351225b.entry.js} +2 -2
  682. package/dist/siemens-ix/p-5351225b.entry.js.map +1 -0
  683. package/dist/siemens-ix/p-5aa0b93c.entry.js.map +1 -1
  684. package/dist/siemens-ix/{p-113cc793.entry.js → p-5af99eaa.entry.js} +2 -2
  685. package/dist/siemens-ix/{p-e30ed20a.entry.js → p-62b089b6.entry.js} +2 -2
  686. package/dist/siemens-ix/{p-e30ed20a.entry.js.map → p-62b089b6.entry.js.map} +1 -1
  687. package/dist/siemens-ix/p-63f0755e.entry.js +2 -0
  688. package/dist/siemens-ix/{p-14a41c8c.entry.js → p-6618b2db.entry.js} +2 -2
  689. package/dist/siemens-ix/{p-0653a145.entry.js → p-67f44540.entry.js} +2 -2
  690. package/dist/siemens-ix/{p-15b3c17e.entry.js → p-6e4c9e3d.entry.js} +2 -2
  691. package/dist/siemens-ix/{p-15b3c17e.entry.js.map → p-6e4c9e3d.entry.js.map} +1 -1
  692. package/dist/siemens-ix/p-7402f42a.entry.js +2 -0
  693. package/dist/siemens-ix/p-7402f42a.entry.js.map +1 -0
  694. package/dist/siemens-ix/{p-53352bfb.entry.js → p-77273517.entry.js} +2 -2
  695. package/dist/siemens-ix/{p-882a0233.entry.js → p-78ac2ff1.entry.js} +2 -2
  696. package/dist/siemens-ix/p-7947ef3d.entry.js +2 -0
  697. package/dist/siemens-ix/{p-fb47546b.entry.js → p-7c2f34f0.entry.js} +2 -2
  698. package/dist/siemens-ix/p-82d33168.entry.js +2 -0
  699. package/dist/siemens-ix/p-82f9d976.entry.js +2 -0
  700. package/dist/siemens-ix/p-82f9d976.entry.js.map +1 -0
  701. package/dist/siemens-ix/{p-85423643.entry.js → p-86bbc005.entry.js} +2 -2
  702. package/dist/siemens-ix/p-86bbc005.entry.js.map +1 -0
  703. package/dist/siemens-ix/p-86fd5922.entry.js +2 -0
  704. package/dist/siemens-ix/p-86fd5922.entry.js.map +1 -0
  705. package/dist/siemens-ix/p-89e48bea.entry.js +2 -0
  706. package/dist/siemens-ix/p-89e48bea.entry.js.map +1 -0
  707. package/dist/siemens-ix/{p-052340f9.entry.js → p-8acc09aa.entry.js} +2 -2
  708. package/dist/siemens-ix/{p-6fd7ecd0.entry.js → p-9079f6c8.entry.js} +2 -2
  709. package/dist/siemens-ix/p-928209e1.entry.js +2 -0
  710. package/dist/siemens-ix/p-928209e1.entry.js.map +1 -0
  711. package/dist/siemens-ix/{p-e8d3cf35.entry.js → p-958c5970.entry.js} +2 -2
  712. package/dist/siemens-ix/{p-e8d3cf35.entry.js.map → p-958c5970.entry.js.map} +1 -1
  713. package/dist/siemens-ix/{p-16b923e9.entry.js → p-9bdda7ff.entry.js} +2 -2
  714. package/dist/siemens-ix/p-a08efce0.entry.js +2 -0
  715. package/dist/siemens-ix/p-a08efce0.entry.js.map +1 -0
  716. package/dist/siemens-ix/p-a4755205.entry.js +2 -0
  717. package/dist/siemens-ix/p-a4755205.entry.js.map +1 -0
  718. package/dist/siemens-ix/{p-2c4c03d4.entry.js → p-aa814811.entry.js} +2 -2
  719. package/dist/siemens-ix/{p-7c36d3fa.js → p-accec846.js} +1 -1
  720. package/dist/siemens-ix/{p-7c36d3fa.js.map → p-accec846.js.map} +1 -1
  721. package/dist/siemens-ix/{p-8d599677.entry.js → p-adee6045.entry.js} +2 -2
  722. package/dist/siemens-ix/{p-8d599677.entry.js.map → p-adee6045.entry.js.map} +1 -1
  723. package/dist/siemens-ix/{p-d95cbd1f.entry.js → p-ae31be0d.entry.js} +2 -2
  724. package/dist/siemens-ix/{p-d95cbd1f.entry.js.map → p-ae31be0d.entry.js.map} +1 -1
  725. package/dist/siemens-ix/{p-feac09bc.entry.js → p-ba24e694.entry.js} +2 -2
  726. package/dist/siemens-ix/p-ba6e955a.js +2 -0
  727. package/dist/siemens-ix/p-ba6e955a.js.map +1 -0
  728. package/dist/siemens-ix/p-c022d6cc.entry.js +2 -0
  729. package/dist/siemens-ix/{p-eb6268a6.entry.js.map → p-c022d6cc.entry.js.map} +1 -1
  730. package/dist/siemens-ix/p-c05a98c8.entry.js +2 -0
  731. package/dist/siemens-ix/{p-29df2e29.entry.js → p-c072ddb5.entry.js} +2 -2
  732. package/dist/siemens-ix/p-c072ddb5.entry.js.map +1 -0
  733. package/dist/siemens-ix/p-c1fe9f3d.entry.js +2 -0
  734. package/dist/siemens-ix/p-c1fe9f3d.entry.js.map +1 -0
  735. package/dist/siemens-ix/{p-c389de85.entry.js → p-c33cee36.entry.js} +2 -2
  736. package/dist/siemens-ix/{p-c389de85.entry.js.map → p-c33cee36.entry.js.map} +1 -1
  737. package/dist/siemens-ix/{p-0b4e398e.entry.js → p-c62966f8.entry.js} +2 -2
  738. package/dist/siemens-ix/{p-0b4e398e.entry.js.map → p-c62966f8.entry.js.map} +1 -1
  739. package/dist/siemens-ix/p-c7280736.entry.js +2 -0
  740. package/dist/siemens-ix/{p-0f7ef743.entry.js.map → p-c7280736.entry.js.map} +1 -1
  741. package/dist/siemens-ix/{p-8d0758c1.entry.js → p-c7e58e9e.entry.js} +2 -2
  742. package/dist/siemens-ix/{p-4430117a.entry.js → p-c81c4b9d.entry.js} +2 -2
  743. package/dist/siemens-ix/p-cc65617d.entry.js +2 -0
  744. package/dist/siemens-ix/p-cc65617d.entry.js.map +1 -0
  745. package/dist/siemens-ix/{p-1a122c76.entry.js → p-d300b332.entry.js} +2 -2
  746. package/dist/siemens-ix/p-d6fc0727.entry.js +2 -0
  747. package/dist/siemens-ix/p-d6fc0727.entry.js.map +1 -0
  748. package/dist/siemens-ix/p-df370362.entry.js +2 -0
  749. package/dist/siemens-ix/p-df370362.entry.js.map +1 -0
  750. package/dist/siemens-ix/{p-5f25e7fd.entry.js → p-e0d03d67.entry.js} +2 -2
  751. package/dist/siemens-ix/{p-5f25e7fd.entry.js.map → p-e0d03d67.entry.js.map} +1 -1
  752. package/dist/siemens-ix/{p-ff1ac5b3.entry.js → p-e14384df.entry.js} +2 -2
  753. package/dist/siemens-ix/{p-fb2b78f7.entry.js → p-e35805d0.entry.js} +2 -2
  754. package/dist/siemens-ix/p-e35805d0.entry.js.map +1 -0
  755. package/dist/siemens-ix/{p-0c8a98cd.js → p-e948bcb0.js} +1 -1
  756. package/dist/siemens-ix/{p-0c8a98cd.js.map → p-e948bcb0.js.map} +1 -1
  757. package/dist/siemens-ix/{p-96a3a750.entry.js → p-e95a5a97.entry.js} +2 -2
  758. package/dist/siemens-ix/p-e95a5a97.entry.js.map +1 -0
  759. package/dist/siemens-ix/p-ed7e76a3.entry.js +2 -0
  760. package/dist/siemens-ix/p-ed7e76a3.entry.js.map +1 -0
  761. package/dist/siemens-ix/{p-bea7c748.entry.js → p-ee96d1eb.entry.js} +2 -2
  762. package/dist/siemens-ix/p-f001ecc1.entry.js +2 -0
  763. package/dist/siemens-ix/p-f001ecc1.entry.js.map +1 -0
  764. package/dist/siemens-ix/p-f06b21f9.entry.js +2 -0
  765. package/dist/siemens-ix/p-f06b21f9.entry.js.map +1 -0
  766. package/dist/siemens-ix/{p-702f9349.js → p-fbe017b7.js} +2 -2
  767. package/dist/siemens-ix/p-fbe017b7.js.map +1 -0
  768. package/dist/siemens-ix/{p-7750e187.entry.js → p-fd5bee44.entry.js} +2 -2
  769. package/dist/siemens-ix/p-fefd5743.entry.js +2 -0
  770. package/dist/siemens-ix/p-fefd5743.entry.js.map +1 -0
  771. package/dist/siemens-ix/{p-dcb3e5be.entry.js → p-ffa856df.entry.js} +2 -2
  772. package/dist/siemens-ix/siemens-ix-core.css +1 -1
  773. package/dist/siemens-ix/siemens-ix.css +5 -1
  774. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  775. package/dist/siemens-ix/siemens-ix.esm.js.map +1 -1
  776. package/dist/types/components/action-card/action-card.d.ts +1 -0
  777. package/dist/types/components/application-header/application-header.d.ts +19 -1
  778. package/dist/types/components/basic-navigation/basic-navigation.d.ts +2 -1
  779. package/dist/types/components/card/card.d.ts +2 -1
  780. package/dist/types/components/category-filter/category-filter.d.ts +9 -9
  781. package/dist/types/components/category-filter/test/category-filter.ct.d.ts +1 -0
  782. package/dist/types/components/dropdown/dropdown.d.ts +1 -0
  783. package/dist/types/components/dropdown-item/dropdown-item.d.ts +2 -2
  784. package/dist/types/components/group/group.d.ts +7 -6
  785. package/dist/types/components/group-item/group-item.d.ts +4 -4
  786. package/dist/types/components/menu-item/menu-item.d.ts +6 -5
  787. package/dist/types/components/push-card/push-card.d.ts +4 -3
  788. package/dist/types/components/slider/slider.d.ts +3 -3
  789. package/dist/types/components/tab-item/tab-item.d.ts +1 -1
  790. package/dist/types/components/tabs/tabs.d.ts +7 -4
  791. package/dist/types/components/tooltip/tooltip.d.ts +9 -10
  792. package/dist/types/components/tree/tree.d.ts +1 -1
  793. package/dist/types/components/tree-item/tree-item.d.ts +3 -3
  794. package/dist/types/components.d.ts +83 -43
  795. package/dist/types/index.d.ts +1 -0
  796. package/hydrate/index.js +994 -416
  797. package/package.json +3 -2
  798. package/scss/_core.scss +5 -0
  799. package/dist/cjs/floating-ui.dom.esm-94b4d17c.js.map +0 -1
  800. package/dist/cjs/service-a42add5f.js.map +0 -1
  801. package/dist/esm/floating-ui.dom.esm-6e7c098f.js.map +0 -1
  802. package/dist/esm/service-02cc9011.js.map +0 -1
  803. package/dist/siemens-ix/p-0f7ef743.entry.js +0 -2
  804. package/dist/siemens-ix/p-112069ca.entry.js.map +0 -1
  805. package/dist/siemens-ix/p-1cff59db.entry.js +0 -2
  806. package/dist/siemens-ix/p-1cff59db.entry.js.map +0 -1
  807. package/dist/siemens-ix/p-1f4b8463.entry.js +0 -2
  808. package/dist/siemens-ix/p-1f4b8463.entry.js.map +0 -1
  809. package/dist/siemens-ix/p-29df2e29.entry.js.map +0 -1
  810. package/dist/siemens-ix/p-2ec7f841.entry.js +0 -2
  811. package/dist/siemens-ix/p-2ec7f841.entry.js.map +0 -1
  812. package/dist/siemens-ix/p-309ac3ad.entry.js +0 -2
  813. package/dist/siemens-ix/p-309ac3ad.entry.js.map +0 -1
  814. package/dist/siemens-ix/p-315f070d.entry.js +0 -2
  815. package/dist/siemens-ix/p-315f070d.entry.js.map +0 -1
  816. package/dist/siemens-ix/p-32375ddb.entry.js +0 -2
  817. package/dist/siemens-ix/p-427676f4.entry.js +0 -2
  818. package/dist/siemens-ix/p-427676f4.entry.js.map +0 -1
  819. package/dist/siemens-ix/p-4344ba99.entry.js +0 -2
  820. package/dist/siemens-ix/p-4344ba99.entry.js.map +0 -1
  821. package/dist/siemens-ix/p-44db3646.entry.js +0 -2
  822. package/dist/siemens-ix/p-4b3facea.entry.js +0 -2
  823. package/dist/siemens-ix/p-4b3facea.entry.js.map +0 -1
  824. package/dist/siemens-ix/p-52857629.entry.js +0 -2
  825. package/dist/siemens-ix/p-52857629.entry.js.map +0 -1
  826. package/dist/siemens-ix/p-60c16878.entry.js +0 -2
  827. package/dist/siemens-ix/p-60c16878.entry.js.map +0 -1
  828. package/dist/siemens-ix/p-6227e62b.entry.js +0 -2
  829. package/dist/siemens-ix/p-6227e62b.entry.js.map +0 -1
  830. package/dist/siemens-ix/p-6b928634.entry.js.map +0 -1
  831. package/dist/siemens-ix/p-702f9349.js.map +0 -1
  832. package/dist/siemens-ix/p-7bfd6cd2.entry.js +0 -2
  833. package/dist/siemens-ix/p-7bfd6cd2.entry.js.map +0 -1
  834. package/dist/siemens-ix/p-7faa148f.entry.js +0 -2
  835. package/dist/siemens-ix/p-85423643.entry.js.map +0 -1
  836. package/dist/siemens-ix/p-87e692d9.entry.js +0 -2
  837. package/dist/siemens-ix/p-92a18c10.entry.js +0 -2
  838. package/dist/siemens-ix/p-96a3a750.entry.js.map +0 -1
  839. package/dist/siemens-ix/p-a536adcb.entry.js +0 -2
  840. package/dist/siemens-ix/p-a536adcb.entry.js.map +0 -1
  841. package/dist/siemens-ix/p-b3b23af7.entry.js +0 -2
  842. package/dist/siemens-ix/p-b3f35666.js +0 -2
  843. package/dist/siemens-ix/p-b3f35666.js.map +0 -1
  844. package/dist/siemens-ix/p-c1222581.entry.js +0 -2
  845. package/dist/siemens-ix/p-c55db6c7.entry.js +0 -2
  846. package/dist/siemens-ix/p-c55db6c7.entry.js.map +0 -1
  847. package/dist/siemens-ix/p-d998415f.entry.js +0 -2
  848. package/dist/siemens-ix/p-d998415f.entry.js.map +0 -1
  849. package/dist/siemens-ix/p-e9a3f58a.entry.js +0 -2
  850. package/dist/siemens-ix/p-eb6268a6.entry.js +0 -2
  851. package/dist/siemens-ix/p-ebb277f0.entry.js +0 -2
  852. package/dist/siemens-ix/p-ebb277f0.entry.js.map +0 -1
  853. package/dist/siemens-ix/p-f07110c6.entry.js +0 -2
  854. package/dist/siemens-ix/p-f07110c6.entry.js.map +0 -1
  855. package/dist/siemens-ix/p-fa53933d.entry.js +0 -2
  856. package/dist/siemens-ix/p-fa53933d.entry.js.map +0 -1
  857. package/dist/siemens-ix/p-fb2b78f7.entry.js.map +0 -1
  858. package/dist/siemens-ix/p-fb4c79c6.entry.js +0 -2
  859. /package/dist/siemens-ix/{p-fb4c79c6.entry.js.map → p-04af3853.entry.js.map} +0 -0
  860. /package/dist/siemens-ix/{p-af099ca4.entry.js.map → p-0632731e.entry.js.map} +0 -0
  861. /package/dist/siemens-ix/{p-0d2a6886.entry.js.map → p-091b036d.entry.js.map} +0 -0
  862. /package/dist/siemens-ix/{p-2946fd70.entry.js.map → p-0fafba48.entry.js.map} +0 -0
  863. /package/dist/siemens-ix/{p-7076210b.entry.js.map → p-1483f65d.entry.js.map} +0 -0
  864. /package/dist/siemens-ix/{p-c1968b80.entry.js.map → p-1bd98772.entry.js.map} +0 -0
  865. /package/dist/siemens-ix/{p-8629db91.entry.js.map → p-25f1749c.entry.js.map} +0 -0
  866. /package/dist/siemens-ix/{p-5696bb62.entry.js.map → p-306269ae.entry.js.map} +0 -0
  867. /package/dist/siemens-ix/{p-b3b23af7.entry.js.map → p-35fff1e6.entry.js.map} +0 -0
  868. /package/dist/siemens-ix/{p-92a18c10.entry.js.map → p-411f51c5.entry.js.map} +0 -0
  869. /package/dist/siemens-ix/{p-f78246bd.entry.js.map → p-44a27b29.entry.js.map} +0 -0
  870. /package/dist/siemens-ix/{p-d03df401.entry.js.map → p-49d3fc15.entry.js.map} +0 -0
  871. /package/dist/siemens-ix/{p-113cc793.entry.js.map → p-5af99eaa.entry.js.map} +0 -0
  872. /package/dist/siemens-ix/{p-c1222581.entry.js.map → p-63f0755e.entry.js.map} +0 -0
  873. /package/dist/siemens-ix/{p-14a41c8c.entry.js.map → p-6618b2db.entry.js.map} +0 -0
  874. /package/dist/siemens-ix/{p-0653a145.entry.js.map → p-67f44540.entry.js.map} +0 -0
  875. /package/dist/siemens-ix/{p-53352bfb.entry.js.map → p-77273517.entry.js.map} +0 -0
  876. /package/dist/siemens-ix/{p-882a0233.entry.js.map → p-78ac2ff1.entry.js.map} +0 -0
  877. /package/dist/siemens-ix/{p-32375ddb.entry.js.map → p-7947ef3d.entry.js.map} +0 -0
  878. /package/dist/siemens-ix/{p-fb47546b.entry.js.map → p-7c2f34f0.entry.js.map} +0 -0
  879. /package/dist/siemens-ix/{p-7faa148f.entry.js.map → p-82d33168.entry.js.map} +0 -0
  880. /package/dist/siemens-ix/{p-052340f9.entry.js.map → p-8acc09aa.entry.js.map} +0 -0
  881. /package/dist/siemens-ix/{p-6fd7ecd0.entry.js.map → p-9079f6c8.entry.js.map} +0 -0
  882. /package/dist/siemens-ix/{p-16b923e9.entry.js.map → p-9bdda7ff.entry.js.map} +0 -0
  883. /package/dist/siemens-ix/{p-2c4c03d4.entry.js.map → p-aa814811.entry.js.map} +0 -0
  884. /package/dist/siemens-ix/{p-feac09bc.entry.js.map → p-ba24e694.entry.js.map} +0 -0
  885. /package/dist/siemens-ix/{p-44db3646.entry.js.map → p-c05a98c8.entry.js.map} +0 -0
  886. /package/dist/siemens-ix/{p-8d0758c1.entry.js.map → p-c7e58e9e.entry.js.map} +0 -0
  887. /package/dist/siemens-ix/{p-4430117a.entry.js.map → p-c81c4b9d.entry.js.map} +0 -0
  888. /package/dist/siemens-ix/{p-1a122c76.entry.js.map → p-d300b332.entry.js.map} +0 -0
  889. /package/dist/siemens-ix/{p-ff1ac5b3.entry.js.map → p-e14384df.entry.js.map} +0 -0
  890. /package/dist/siemens-ix/{p-bea7c748.entry.js.map → p-ee96d1eb.entry.js.map} +0 -0
  891. /package/dist/siemens-ix/{p-7750e187.entry.js.map → p-fd5bee44.entry.js.map} +0 -0
  892. /package/dist/siemens-ix/{p-dcb3e5be.entry.js.map → p-ffa856df.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { c as computePosition, s as shift, o as offset, b as arrow, f as flip, a as autoUpdate } from './floating-ui.dom.esm.js';
2
+ import { c as computePosition, s as shift, o as offset, b as arrow, f as flip, h as hide, a as autoUpdate } from './floating-ui.dom.esm.js';
3
3
  import { O as OnListener } from './listener.js';
4
4
  import { d as defineCustomElement$1 } from './typography.js';
5
5
 
@@ -47,7 +47,7 @@ class TooltipController extends OverlayController {
47
47
  }
48
48
  const tooltipController = new TooltipController();
49
49
 
50
- const tooltipCss = ":host{display:inline-block;position:fixed;left:0px;top:0px;z-index:var(--theme-z-index-tooltip);max-width:18.25rem;opacity:0;visibility:collapse !important;overflow-wrap:break-word;border-radius:0.25rem;background-color:var(--theme-tootlip--background);padding:0.375rem 0.75rem 0.375rem 0.875rem;box-shadow:var(--theme-shadow-4)}:host .tooltip-title{display:flex;align-items:center}:host .tooltip-title ::slotted(ix-icon){margin-right:0.35rem}:host(.visible){opacity:1;visibility:visible !important}:host(.visible) .arrow,:host(.visible) .arrow::before{position:absolute;width:12px;height:12px;background:inherit}:host(.visible) .arrow{visibility:hidden}:host(.visible) .arrow::before{visibility:visible;content:\"\";transform:rotate(45deg);background-color:var(--theme-tootlip--background)}";
50
+ const tooltipCss = ":host{display:inline-block;position:fixed;left:0;top:0;z-index:var(--theme-z-index-tooltip);max-width:18.25rem;width:-moz-max-content;width:max-content;opacity:0;visibility:collapse !important;overflow-wrap:break-word;border-radius:0.25rem}:host .tooltip-title{display:flex;align-items:center}:host .tooltip-title ::slotted(ix-icon){margin-right:0.35rem}:host .tooltip-container{display:block;position:relative;width:auto;height:100%;background:var(--theme-tootlip--background);color:var(--theme-color-std-text);padding:0.375rem 0.75rem 0.375rem 0.875rem;box-shadow:var(--theme-shadow-4);border-radius:inherit}:host(.visible){opacity:1;visibility:visible !important}:host(.visible) .arrow,:host(.visible) .arrow::before{position:absolute;width:12px;height:12px;background:inherit}:host(.visible) .arrow{visibility:hidden}:host(.visible) .arrow::before{visibility:visible;content:\"\";transform:rotate(45deg);background-color:var(--theme-tootlip--background)}";
51
51
  const IxTooltipStyle0 = tooltipCss;
52
52
 
53
53
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -108,33 +108,27 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLEleme
108
108
  }
109
109
  computeArrowPosition({ placement, middlewareData, }) {
110
110
  let { x, y } = middlewareData.arrow;
111
+ const resetPosition = {
112
+ top: 'unset',
113
+ right: 'unset',
114
+ bottom: 'unset',
115
+ left: 'unset',
116
+ };
111
117
  if (placement.startsWith('top')) {
112
- return {
113
- left: numberToPixel(x),
114
- top: numberToPixel(y),
115
- };
118
+ return Object.assign(Object.assign({}, resetPosition), { left: numberToPixel(x), top: numberToPixel(y) });
116
119
  }
117
120
  if (placement.startsWith('right')) {
118
- return {
119
- left: numberToPixel(-6),
120
- top: numberToPixel(y),
121
- };
121
+ return Object.assign(Object.assign({}, resetPosition), { left: numberToPixel(-6), top: numberToPixel(y) });
122
122
  }
123
123
  if (placement.startsWith('bottom')) {
124
- return {
125
- left: numberToPixel(x),
126
- top: numberToPixel(-6),
127
- };
124
+ return Object.assign(Object.assign({}, resetPosition), { left: numberToPixel(x), top: numberToPixel(-6) });
128
125
  }
129
126
  if (placement.startsWith('left')) {
130
- return {
131
- right: numberToPixel(-6),
132
- top: numberToPixel(y),
133
- };
127
+ return Object.assign(Object.assign({}, resetPosition), { right: numberToPixel(-6), top: numberToPixel(y) });
134
128
  }
135
129
  }
136
130
  async computeTooltipPosition(target) {
137
- const computeResponse = await computePosition(target, this.hostElement, {
131
+ return computePosition(target, this.hostElement, {
138
132
  strategy: 'fixed',
139
133
  placement: this.placement,
140
134
  middleware: [
@@ -145,11 +139,12 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLEleme
145
139
  }),
146
140
  flip({
147
141
  fallbackStrategy: 'initialPlacement',
142
+ fallbackAxisSideDirection: 'end',
148
143
  padding: 10,
149
144
  }),
145
+ hide(),
150
146
  ],
151
147
  });
152
- return computeResponse;
153
148
  }
154
149
  applyTooltipArrowPosition(computeResponse) {
155
150
  const arrowPosition = this.computeArrowPosition(computeResponse);
@@ -160,9 +155,16 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLEleme
160
155
  return;
161
156
  }
162
157
  return new Promise((resolve) => {
158
+ this.destroyAutoUpdate();
163
159
  this.disposeAutoUpdate = autoUpdate(target, this.hostElement, async () => {
164
160
  setTimeout(async () => {
161
+ var _a;
165
162
  const computeResponse = await this.computeTooltipPosition(target);
163
+ const isHidden = (_a = computeResponse.middlewareData.hide) === null || _a === void 0 ? void 0 : _a.referenceHidden;
164
+ if (isHidden) {
165
+ setTimeout(() => this.hideTooltip());
166
+ resolve(computeResponse);
167
+ }
166
168
  if (computeResponse.middlewareData.arrow) {
167
169
  this.applyTooltipArrowPosition(computeResponse);
168
170
  }
@@ -280,9 +282,9 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLEleme
280
282
  this.visible = false;
281
283
  }
282
284
  render() {
283
- return (h(Host, { key: '990726c5c0bfdbdb0d5d1678ec54b5902d41d1cd', class: {
285
+ return (h(Host, { key: '5e39b9dbc226e6a61c11a737a6aebb318827edc3', class: {
284
286
  visible: this.visible,
285
- }, role: "tooltip" }, h("div", { key: 'ecab668bf3f4010329c611b3d44a8103080d185e', class: 'tooltip-title' }, h("slot", { key: '016c833df9a38916cbd805756c48098d491f5846', name: "title-icon" }), h("ix-typography", { key: 'fe0a3fe4e2c9735207e22befc6006700859df2fc', variant: "default-title" }, this.titleContent, h("slot", { key: '6fcb3c9a2534922477aeb8b833f4e806d4010b84', name: "title-content" }))), h("div", { key: 'fcc689886a4d9651b0f7f23fb71e7d738558fde7', class: 'tooltip-content' }, h("slot", { key: '610c6bc179044892c550fbfa71313a1d27ee917a' })), h("div", { key: 'faf7c2a5d6b6347bd5c4ce9de377680c1ad4f06c', class: "arrow" })));
287
+ }, role: "tooltip" }, h("div", { key: '4b9be3a9990c9b81425f2dbef9539054d01aa872', class: "tooltip-container" }, h("div", { key: 'c80f161df92379d45627338c1a11458948756ca5', class: 'tooltip-title' }, h("slot", { key: '9b63297978bd65ecd277eda2205b0639a41c2949', name: "title-icon" }), h("ix-typography", { key: 'ff0813c9f2532be81c5248230e057067cd196ae8', variant: "default-title" }, this.titleContent, h("slot", { key: 'f25947dac855dfcea0f41d39bbae53a593cfa8b0', name: "title-content" }))), h("div", { key: '7b8dd9351fbea202b9bb36bbd187683a4f2d8753', class: 'tooltip-content' }, h("slot", { key: '2b930dcd326294583931e945c1e9de83b17d3953' })), h("div", { key: 'd831b2851ec71fee69250d583387ddcac45cdf8e', class: "arrow" }))));
286
288
  }
287
289
  get hostElement() { return this; }
288
290
  static get style() { return IxTooltipStyle0; }
@@ -1 +1 @@
1
- {"file":"tooltip.js","mappings":";;;;;MAoBa,iBAAiB;IAA9B;QACE,aAAQ,GAA4B,IAAI,GAAG,EAAE,CAAC;KAgC/C;IA9BC,SAAS,CAAC,QAA4B;QACpC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,YAAY,CAAC,QAA4B;QACvC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;KAChC;IAED,OAAO,CAAC,QAA4B;QAClC,IAAI,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE;YACnD,OAAO;SACR;QACD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC7B,QAAQ,CAAC,OAAO,EAAE,CAAC;KACpB;IAED,OAAO,CAAC,QAA4B;QAClC,IAAI,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE;YACnD,OAAO;SACR;QACD,QAAQ,CAAC,OAAO,EAAE,CAAC;KACpB;IAEO,aAAa,CAAC,QAA4B;QAChD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO;YAC5B,IAAI,OAAO,KAAK,QAAQ,EAAE;gBACxB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;aACvB;SACF,CAAC,CAAC;KACJ;;;ACpDH;;;;;;;;AAWA,MAAM,iBAAkB,SAAQ,iBAAiB;CAAG;AAE7C,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE;;ACbxD,MAAM,UAAU,GAAG,yxBAAyxB,CAAC;AAC7yB,wBAAe,UAAU;;;;;;;;;;;;ACmCzB,MAAM,aAAa,GAAG,CAAC,KAAa,MAAM,KAAK,IAAI,IAAI,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pC,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,uBAAuB,EAAE,CAAC;KAChC;IAED,iBAAiB;QACf,iBAAiB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KACnC;IAED,oBAAoB;;QAClB,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,EAAE,CAAC;QAC5B,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,iBAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;KACtC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IAED,OAAO;QACL,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACrB;IAED,OAAO;QACL,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,EACD,IAAI,EAAC,SAAS,IAEd,4DAAK,KAAK,EAAE,eAAe,IACzB,6DAAM,IAAI,EAAC,YAAY,GAAQ,EAC/B,sEAAe,OAAO,EAAC,eAAe,IACnC,IAAI,CAAC,YAAY,EAClB,6DAAM,IAAI,EAAC,eAAe,GAAQ,CACpB,CACZ,EACN,4DAAK,KAAK,EAAE,iBAAiB,IAC3B,8DAAa,CACT,EACN,4DAAK,KAAK,EAAC,OAAO,GAAO,CACpB,EACP;KACH;;;;;;;;;;;;;;;AApEK;IADL,UAAU,CAAU,SAAS,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC;wCAKtD;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/utils/overlay.ts","src/components/tooltip/tooltip-controller.ts","src/components/tooltip/tooltip.scss?tag=ix-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { IxComponent } from '../utils/internal';\n\nexport interface IxOverlayComponent extends IxComponent {\n isPresent(): boolean;\n\n willPresent?(): boolean;\n willDismiss?(): boolean;\n\n present(): void;\n dismiss(): void;\n}\n\nexport class OverlayController {\n overlays: Set<IxOverlayComponent> = new Set();\n\n connected(instance: IxOverlayComponent): void {\n this.overlays.add(instance);\n }\n\n disconnected(instance: IxOverlayComponent): void {\n this.overlays.delete(instance);\n }\n\n present(instance: IxOverlayComponent): void {\n if (instance.willPresent && !instance.willPresent()) {\n return;\n }\n this.dismissOthers(instance);\n instance.present();\n }\n\n dismiss(instance: IxOverlayComponent): void {\n if (instance.willDismiss && !instance.willDismiss()) {\n return;\n }\n instance.dismiss();\n }\n\n private dismissOthers(instance: IxOverlayComponent): void {\n this.overlays.forEach((overlay) => {\n if (overlay !== instance) {\n this.dismiss(overlay);\n }\n });\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { OverlayController } from '../utils/overlay';\n\nclass TooltipController extends OverlayController {}\n\nexport const tooltipController = new TooltipController();\n",":host {\n display: inline-block;\n position: fixed;\n left: 0px;\n top: 0px;\n z-index: var(--theme-z-index-tooltip);\n\n max-width: 18.25rem;\n\n opacity: 0;\n visibility: collapse !important;\n overflow-wrap: break-word;\n\n border-radius: 0.25rem;\n background-color: var(--theme-tootlip--background);\n padding: 0.375rem 0.75rem 0.375rem 0.875rem;\n\n box-shadow: var(--theme-shadow-4);\n\n .tooltip-title {\n display: flex;\n align-items: center;\n\n ::slotted(ix-icon) {\n margin-right: 0.35rem;\n }\n }\n}\n\n:host(.visible) {\n opacity: 1;\n visibility: visible !important;\n}\n\n:host(.visible) {\n .arrow,\n .arrow::before {\n position: absolute;\n width: 12px;\n height: 12px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n background-color: var(--theme-tootlip--background);\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport {\n arrow,\n autoUpdate,\n computePosition,\n ComputePositionReturn,\n flip,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport { OnListener } from '../utils/listener';\nimport { tooltipController } from './tooltip-controller';\nimport { IxOverlayComponent } from '../utils/overlay';\n\ntype ArrowPosition = {\n top?: string;\n left?: string;\n right?: string;\n};\n\nconst numberToPixel = (value: number) => (value != null ? `${value}px` : '');\n\n/**\n * @slot title-icon - Icon of tooltip title\n * @slot title-content - Content of tooltip title\n *\n * @since 1.4.0\n */\n@Component({\n tag: 'ix-tooltip',\n styleUrl: 'tooltip.scss',\n shadow: true,\n})\nexport class Tooltip implements IxOverlayComponent {\n /**\n * CSS selector for hover trigger element e.g. `for=\"[data-my-custom-select]\"`\n */\n @Prop() for: string | HTMLElement | Promise<HTMLElement>;\n\n /**\n * Title of the tooltip\n */\n @Prop() titleContent: string;\n\n /**\n * Define if the user can access the tooltip via mouse.\n */\n @Prop() interactive = false;\n\n /**\n * Initial placement of the tooltip. If the placement don\"t have enough space,\n * the tooltip will placed on another location.\n *\n * @since 1.5.0\n */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'top';\n\n /** @internal */\n @Prop() showDelay = 0;\n\n /** @internal */\n @Prop() hideDelay = 50;\n\n /** @internal */\n @Prop() animationFrame = false;\n\n @State() visible = false;\n\n @Element() hostElement: HTMLIxTooltipElement;\n\n private observer: MutationObserver;\n private hideTooltipTimeout: NodeJS.Timeout;\n private showTooltipTimeout: NodeJS.Timeout;\n private disposeAutoUpdate?: () => void;\n private disposeListener: () => void;\n\n private get arrowElement(): HTMLElement {\n return this.hostElement.shadowRoot.querySelector('.arrow');\n }\n\n private destroyAutoUpdate() {\n if (this.disposeAutoUpdate !== undefined) {\n this.disposeAutoUpdate();\n }\n }\n\n /** @internal */\n @Method()\n async showTooltip(anchorElement: any) {\n clearTimeout(this.hideTooltipTimeout);\n await this.applyTooltipPosition(anchorElement);\n\n this.showTooltipTimeout = setTimeout(() => {\n tooltipController.present(this);\n // Need to compute and apply tooltip position after initial render,\n // because arrow has no valid bounding rect before that\n this.applyTooltipPosition(anchorElement);\n }, this.showDelay);\n }\n\n /** @internal */\n @Method()\n async hideTooltip() {\n clearTimeout(this.showTooltipTimeout);\n let hideDelay = 50;\n\n if (this.interactive && this.hideDelay === hideDelay) {\n hideDelay = 150;\n }\n\n this.hideTooltipTimeout = setTimeout(() => {\n tooltipController.dismiss(this);\n }, hideDelay);\n this.destroyAutoUpdate();\n }\n\n private computeArrowPosition({\n placement,\n middlewareData,\n }: ComputePositionReturn): ArrowPosition {\n let { x, y } = middlewareData.arrow;\n\n if (placement.startsWith('top')) {\n return {\n left: numberToPixel(x),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('right')) {\n return {\n left: numberToPixel(-6),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('bottom')) {\n return {\n left: numberToPixel(x),\n top: numberToPixel(-6),\n };\n }\n\n if (placement.startsWith('left')) {\n return {\n right: numberToPixel(-6),\n top: numberToPixel(y),\n };\n }\n }\n\n private async computeTooltipPosition(target: Element) {\n const computeResponse = await computePosition(target, this.hostElement, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [\n shift(),\n offset(12),\n arrow({\n element: this.arrowElement,\n }),\n flip({\n fallbackStrategy: 'initialPlacement',\n padding: 10,\n }),\n ],\n });\n return computeResponse;\n }\n\n private applyTooltipArrowPosition(computeResponse: ComputePositionReturn) {\n const arrowPosition = this.computeArrowPosition(computeResponse);\n Object.assign(this.arrowElement.style, arrowPosition);\n }\n\n private async applyTooltipPosition(target: Element) {\n if (!target) {\n return;\n }\n\n return new Promise<ComputePositionReturn>((resolve) => {\n this.disposeAutoUpdate = autoUpdate(\n target,\n this.hostElement,\n async () => {\n setTimeout(async () => {\n const computeResponse = await this.computeTooltipPosition(target);\n\n if (computeResponse.middlewareData.arrow) {\n this.applyTooltipArrowPosition(computeResponse);\n }\n\n const { x, y } = computeResponse;\n Object.assign(this.hostElement.style, {\n left: x !== null ? `${x}px` : '',\n top: y !== null ? `${y}px` : '',\n });\n\n resolve(computeResponse);\n });\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n animationFrame: this.animationFrame,\n }\n );\n });\n }\n\n private clearHideTimeout() {\n if (this.interactive) {\n clearTimeout(this.hideTooltipTimeout);\n }\n }\n\n private async queryAnchorElements(): Promise<Array<HTMLElement> | undefined> {\n if (typeof this.for === 'string') {\n return Promise.resolve(Array.from(document.querySelectorAll(this.for)));\n }\n\n if (this.for instanceof HTMLElement) {\n return Promise.resolve([this.for]);\n }\n\n if (this.for instanceof Promise) {\n const element = await this.for;\n return [element];\n }\n }\n\n private async registerTriggerListener() {\n const triggerElementList = await this.queryAnchorElements();\n\n if (this.disposeListener) {\n this.disposeListener();\n }\n\n if (!triggerElementList) {\n return;\n }\n\n triggerElementList.forEach((element) => {\n const onMouseEnter = () => {\n this.showTooltip(element);\n };\n\n const onMouseLeave = () => {\n this.hideTooltip();\n };\n\n const onFocusIn = () => {\n if (this.showTooltipTimeout !== undefined) {\n clearTimeout(this.showTooltipTimeout);\n }\n\n onMouseEnter();\n };\n\n const onFocusOut = () => {\n this.hideTooltip();\n };\n\n element.addEventListener('mouseenter', onMouseEnter);\n element.addEventListener('mouseleave', onMouseLeave);\n element.addEventListener('focusin', onFocusIn);\n element.addEventListener('focusout', onFocusOut);\n\n this.disposeListener = () => {\n element.removeEventListener('mouseenter', onMouseEnter);\n element.removeEventListener('mouseleave', onMouseLeave);\n element.removeEventListener('focusin', onFocusIn);\n element.removeEventListener('focusout', onFocusOut);\n };\n });\n }\n\n private registerTooltipListener() {\n const { hostElement } = this;\n hostElement.addEventListener('mouseenter', () => this.clearHideTimeout());\n hostElement.addEventListener('focusin', () => this.clearHideTimeout());\n\n hostElement.addEventListener('mouseleave', () => this.hideTooltip());\n hostElement.addEventListener('focusout', () => this.hideTooltip());\n }\n\n @OnListener<Tooltip>('keydown', (self) => self.visible)\n async onKeydown(event: KeyboardEvent) {\n if (event.code === 'Escape') {\n this.hideTooltip();\n }\n }\n\n componentWillLoad() {\n this.registerTriggerListener();\n }\n\n componentDidLoad() {\n this.observer = new MutationObserver(() => {\n this.registerTriggerListener();\n });\n\n this.observer.observe(document.body, {\n attributes: true,\n attributeFilter: ['data-ix-tooltip'],\n childList: true,\n subtree: true,\n });\n\n this.registerTooltipListener();\n }\n\n connectedCallback() {\n tooltipController.connected(this);\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n this.destroyAutoUpdate();\n tooltipController.disconnected(this);\n }\n\n isPresent(): boolean {\n return this.visible;\n }\n\n present(): void {\n this.visible = true;\n }\n\n dismiss(): void {\n this.visible = false;\n }\n\n render() {\n return (\n <Host\n class={{\n visible: this.visible,\n }}\n role=\"tooltip\"\n >\n <div class={'tooltip-title'}>\n <slot name=\"title-icon\"></slot>\n <ix-typography variant=\"default-title\">\n {this.titleContent}\n <slot name=\"title-content\"></slot>\n </ix-typography>\n </div>\n <div class={'tooltip-content'}>\n <slot></slot>\n </div>\n <div class=\"arrow\"></div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"tooltip.js","mappings":";;;;;MAoBa,iBAAiB;IAA9B;QACE,aAAQ,GAA4B,IAAI,GAAG,EAAE,CAAC;KAgC/C;IA9BC,SAAS,CAAC,QAA4B;QACpC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,YAAY,CAAC,QAA4B;QACvC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAA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f,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,uBAAuB,EAAE,CAAC;KAChC;IAED,iBAAiB;QACf,iBAAiB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KACnC;IAED,oBAAoB;;QAClB,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,EAAE,CAAC;QAC5B,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,iBAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;KACtC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IAED,OAAO;QACL,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACrB;IAED,OAAO;QACL,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,EACD,IAAI,EAAC,SAAS,IAEd,4DAAK,KAAK,EAAC,mBAAmB,IAC5B,4DAAK,KAAK,EAAE,eAAe,IACzB,6DAAM,IAAI,EAAC,YAAY,GAAQ,EAC/B,sEAAe,OAAO,EAAC,eAAe,IACnC,IAAI,CAAC,YAAY,EAClB,6DAAM,IAAI,EAAC,eAAe,GAAQ,CACpB,CACZ,EACN,4DAAK,KAAK,EAAE,iBAAiB,IAC3B,8DAAa,CACT,EACN,4DAAK,KAAK,EAAC,OAAO,GAAO,CACrB,CACD,EACP;KACH;;;;;;;;;;;;;;;AAtEK;IADL,UAAU,CAAU,SAAS,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC;wCAKtD;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/utils/overlay.ts","src/components/tooltip/tooltip-controller.ts","src/components/tooltip/tooltip.scss?tag=ix-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { IxComponent } from '../utils/internal';\n\nexport interface IxOverlayComponent extends IxComponent {\n isPresent(): boolean;\n\n willPresent?(): boolean;\n willDismiss?(): boolean;\n\n present(): void;\n dismiss(): void;\n}\n\nexport class OverlayController {\n overlays: Set<IxOverlayComponent> = new Set();\n\n connected(instance: IxOverlayComponent): void {\n this.overlays.add(instance);\n }\n\n disconnected(instance: IxOverlayComponent): void {\n this.overlays.delete(instance);\n }\n\n present(instance: IxOverlayComponent): void {\n if (instance.willPresent && !instance.willPresent()) {\n return;\n }\n this.dismissOthers(instance);\n instance.present();\n }\n\n dismiss(instance: IxOverlayComponent): void {\n if (instance.willDismiss && !instance.willDismiss()) {\n return;\n }\n instance.dismiss();\n }\n\n private dismissOthers(instance: IxOverlayComponent): void {\n this.overlays.forEach((overlay) => {\n if (overlay !== instance) {\n this.dismiss(overlay);\n }\n });\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { OverlayController } from '../utils/overlay';\n\nclass TooltipController extends OverlayController {}\n\nexport const tooltipController = new TooltipController();\n",":host {\n display: inline-block;\n position: fixed;\n left: 0;\n top: 0;\n z-index: var(--theme-z-index-tooltip);\n\n max-width: 18.25rem;\n width: max-content;\n\n opacity: 0;\n visibility: collapse !important;\n overflow-wrap: break-word;\n\n border-radius: 0.25rem;\n\n .tooltip-title {\n display: flex;\n align-items: center;\n\n ::slotted(ix-icon) {\n margin-right: 0.35rem;\n }\n }\n\n .tooltip-container {\n display: block;\n position: relative;\n width: auto;\n height: 100%;\n background: var(--theme-tootlip--background);\n color: var(--theme-color-std-text);\n padding: 0.375rem 0.75rem 0.375rem 0.875rem;\n\n box-shadow: var(--theme-shadow-4);\n border-radius: inherit;\n }\n}\n\n:host(.visible) {\n opacity: 1;\n visibility: visible !important;\n}\n\n:host(.visible) {\n .arrow,\n .arrow::before {\n position: absolute;\n width: 12px;\n height: 12px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n background-color: var(--theme-tootlip--background);\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport {\n arrow,\n autoUpdate,\n computePosition,\n ComputePositionReturn,\n flip,\n hide,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport { OnListener } from '../utils/listener';\nimport { tooltipController } from './tooltip-controller';\nimport { IxOverlayComponent } from '../utils/overlay';\n\ntype ArrowPosition = {\n top?: string;\n left?: string;\n right?: string;\n};\n\nconst numberToPixel = (value: number) => (value != null ? `${value}px` : '');\n\n/**\n * @slot title-icon - Icon of tooltip title\n * @slot title-content - Content of tooltip title\n *\n * @since 1.4.0\n */\n@Component({\n tag: 'ix-tooltip',\n styleUrl: 'tooltip.scss',\n shadow: true,\n})\nexport class Tooltip implements IxOverlayComponent {\n /**\n * CSS selector for hover trigger element e.g. `for=\"[data-my-custom-select]\"`\n */\n @Prop() for?: string | HTMLElement | Promise<HTMLElement>;\n\n /**\n * Title of the tooltip\n */\n @Prop() titleContent?: string;\n\n /**\n * Define if the user can access the tooltip via mouse.\n */\n @Prop() interactive = false;\n\n /**\n * Initial placement of the tooltip.\n * If the selected placement doesn't have enough space, the tooltip will be repositioned to another location.\n * @since 1.5.0\n */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'top';\n\n /** @internal */\n @Prop() showDelay = 0;\n\n /** @internal */\n @Prop() hideDelay = 50;\n\n /** @internal */\n @Prop() animationFrame = false;\n\n @State() visible = false;\n\n @Element() hostElement!: HTMLIxTooltipElement;\n\n private observer?: MutationObserver;\n private hideTooltipTimeout?: NodeJS.Timeout;\n private showTooltipTimeout?: NodeJS.Timeout;\n private disposeAutoUpdate?: () => void;\n private disposeListener?: () => void;\n\n private get arrowElement(): HTMLElement {\n return this.hostElement.shadowRoot.querySelector('.arrow');\n }\n\n private destroyAutoUpdate() {\n if (this.disposeAutoUpdate !== undefined) {\n this.disposeAutoUpdate();\n }\n }\n\n /** @internal */\n @Method()\n async showTooltip(anchorElement: Element) {\n clearTimeout(this.hideTooltipTimeout);\n await this.applyTooltipPosition(anchorElement);\n\n this.showTooltipTimeout = setTimeout(() => {\n tooltipController.present(this);\n // Need to compute and apply tooltip position after initial render,\n // because arrow has no valid bounding rect before that\n this.applyTooltipPosition(anchorElement);\n }, this.showDelay);\n }\n\n /** @internal */\n @Method()\n async hideTooltip() {\n clearTimeout(this.showTooltipTimeout);\n let hideDelay = 50;\n\n if (this.interactive && this.hideDelay === hideDelay) {\n hideDelay = 150;\n }\n\n this.hideTooltipTimeout = setTimeout(() => {\n tooltipController.dismiss(this);\n }, hideDelay);\n this.destroyAutoUpdate();\n }\n\n private computeArrowPosition({\n placement,\n middlewareData,\n }: ComputePositionReturn): ArrowPosition {\n let { x, y } = middlewareData.arrow;\n const resetPosition = {\n top: 'unset',\n right: 'unset',\n bottom: 'unset',\n left: 'unset',\n };\n\n if (placement.startsWith('top')) {\n return {\n ...resetPosition,\n left: numberToPixel(x),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('right')) {\n return {\n ...resetPosition,\n left: numberToPixel(-6),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('bottom')) {\n return {\n ...resetPosition,\n left: numberToPixel(x),\n top: numberToPixel(-6),\n };\n }\n\n if (placement.startsWith('left')) {\n return {\n ...resetPosition,\n right: numberToPixel(-6),\n top: numberToPixel(y),\n };\n }\n }\n\n private async computeTooltipPosition(target: Element) {\n return computePosition(target, this.hostElement, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [\n shift(),\n offset(12),\n arrow({\n element: this.arrowElement,\n }),\n flip({\n fallbackStrategy: 'initialPlacement',\n fallbackAxisSideDirection: 'end',\n padding: 10,\n }),\n hide(),\n ],\n });\n }\n\n private applyTooltipArrowPosition(computeResponse: ComputePositionReturn) {\n const arrowPosition = this.computeArrowPosition(computeResponse);\n Object.assign(this.arrowElement.style, arrowPosition);\n }\n\n private async applyTooltipPosition(target: Element) {\n if (!target) {\n return;\n }\n\n return new Promise<ComputePositionReturn>((resolve) => {\n this.destroyAutoUpdate();\n this.disposeAutoUpdate = autoUpdate(\n target,\n this.hostElement,\n async () => {\n setTimeout(async () => {\n const computeResponse = await this.computeTooltipPosition(target);\n\n const isHidden =\n computeResponse.middlewareData.hide?.referenceHidden;\n\n if (isHidden) {\n setTimeout(() => this.hideTooltip());\n resolve(computeResponse);\n }\n\n if (computeResponse.middlewareData.arrow) {\n this.applyTooltipArrowPosition(computeResponse);\n }\n\n const { x, y } = computeResponse;\n Object.assign(this.hostElement.style, {\n left: x !== null ? `${x}px` : '',\n top: y !== null ? `${y}px` : '',\n });\n\n resolve(computeResponse);\n });\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n animationFrame: this.animationFrame,\n }\n );\n });\n }\n\n private clearHideTimeout() {\n if (this.interactive) {\n clearTimeout(this.hideTooltipTimeout);\n }\n }\n\n private async queryAnchorElements(): Promise<Array<HTMLElement> | undefined> {\n if (typeof this.for === 'string') {\n return Promise.resolve(Array.from(document.querySelectorAll(this.for)));\n }\n\n if (this.for instanceof HTMLElement) {\n return Promise.resolve([this.for]);\n }\n\n if (this.for instanceof Promise) {\n const element = await this.for;\n return [element];\n }\n }\n\n private async registerTriggerListener() {\n const triggerElementList = await this.queryAnchorElements();\n\n if (this.disposeListener) {\n this.disposeListener();\n }\n\n if (!triggerElementList) {\n return;\n }\n\n triggerElementList.forEach((element) => {\n const onMouseEnter = () => {\n this.showTooltip(element);\n };\n\n const onMouseLeave = () => {\n this.hideTooltip();\n };\n\n const onFocusIn = () => {\n if (this.showTooltipTimeout !== undefined) {\n clearTimeout(this.showTooltipTimeout);\n }\n\n onMouseEnter();\n };\n\n const onFocusOut = () => {\n this.hideTooltip();\n };\n\n element.addEventListener('mouseenter', onMouseEnter);\n element.addEventListener('mouseleave', onMouseLeave);\n element.addEventListener('focusin', onFocusIn);\n element.addEventListener('focusout', onFocusOut);\n\n this.disposeListener = () => {\n element.removeEventListener('mouseenter', onMouseEnter);\n element.removeEventListener('mouseleave', onMouseLeave);\n element.removeEventListener('focusin', onFocusIn);\n element.removeEventListener('focusout', onFocusOut);\n };\n });\n }\n\n private registerTooltipListener() {\n const { hostElement } = this;\n hostElement.addEventListener('mouseenter', () => this.clearHideTimeout());\n hostElement.addEventListener('focusin', () => this.clearHideTimeout());\n\n hostElement.addEventListener('mouseleave', () => this.hideTooltip());\n hostElement.addEventListener('focusout', () => this.hideTooltip());\n }\n\n @OnListener<Tooltip>('keydown', (self) => self.visible)\n async onKeydown(event: KeyboardEvent) {\n if (event.code === 'Escape') {\n this.hideTooltip();\n }\n }\n\n componentWillLoad() {\n this.registerTriggerListener();\n }\n\n componentDidLoad() {\n this.observer = new MutationObserver(() => {\n this.registerTriggerListener();\n });\n\n this.observer.observe(document.body, {\n attributes: true,\n attributeFilter: ['data-ix-tooltip'],\n childList: true,\n subtree: true,\n });\n\n this.registerTooltipListener();\n }\n\n connectedCallback() {\n tooltipController.connected(this);\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n this.destroyAutoUpdate();\n tooltipController.disconnected(this);\n }\n\n isPresent(): boolean {\n return this.visible;\n }\n\n present(): void {\n this.visible = true;\n }\n\n dismiss(): void {\n this.visible = false;\n }\n\n render() {\n return (\n <Host\n class={{\n visible: this.visible,\n }}\n role=\"tooltip\"\n >\n <div class=\"tooltip-container\">\n <div class={'tooltip-title'}>\n <slot name=\"title-icon\"></slot>\n <ix-typography variant=\"default-title\">\n {this.titleContent}\n <slot name=\"title-content\"></slot>\n </ix-typography>\n </div>\n <div class={'tooltip-content'}>\n <slot></slot>\n </div>\n <div class=\"arrow\"></div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const treeItemCss = ":host{display:flex;align-items:center;height:32px;width:100%;cursor:pointer}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .tree-node-container{display:flex;align-items:center;height:2rem;flex-grow:1;align-items:center}:host .icon-toggle-container{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem}:host .icon-toggle-container ix-icon{transition:transform var(--theme-default-time) ease-in-out}:host .icon-toggle-container ix-icon.icon-toggle-down{transform:rotate(90deg)}:host(:not(.disabled):not(:disabled):not(.selected).hover),:host(:not(.disabled):not(:disabled):not(.selected):hover){background-color:var(--theme-tree-item--background--hover)}:host(:not(.disabled):not(:disabled):not(.selected).active),:host(:not(.disabled):not(:disabled):not(.selected):active){background-color:var(--theme-tree-item--background--active)}:host(.selected){background-color:var(--theme-tree-item--background--selected)}:host(.selected.hover),:host(.selected:hover){background-color:var(--theme-tree-item--background--selected-hover)}:host(.selected.active),:host(.selected:active){background-color:var(--theme-tree-item--background--selected-active)}";
3
+ const treeItemCss = ":host{display:flex;align-items:center;height:32px;width:100%;cursor:pointer}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .tree-node-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;height:2rem;flex-grow:1;align-items:center}:host .tree-node-container .tree-node-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .icon-toggle-container{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;min-width:2rem}:host .icon-toggle-container ix-icon{transition:transform var(--theme-default-time) ease-in-out}:host .icon-toggle-container ix-icon.icon-toggle-down{transform:rotate(90deg)}:host(:not(.disabled):not(:disabled):not(.selected).hover),:host(:not(.disabled):not(:disabled):not(.selected):hover){background-color:var(--theme-tree-item--background--hover)}:host(:not(.disabled):not(:disabled):not(.selected).active),:host(:not(.disabled):not(:disabled):not(.selected):active){background-color:var(--theme-tree-item--background--active)}:host(.selected){background-color:var(--theme-tree-item--background--selected)}:host(.selected.hover),:host(.selected:hover){background-color:var(--theme-tree-item--background--selected-hover)}:host(.selected.active),:host(.selected:active){background-color:var(--theme-tree-item--background--selected-active)}";
4
4
  const IxTreeItemStyle0 = treeItemCss;
5
5
 
6
6
  const TreeItem = /*@__PURE__*/ proxyCustomElement(class TreeItem extends HTMLElement {
@@ -11,21 +11,21 @@ const TreeItem = /*@__PURE__*/ proxyCustomElement(class TreeItem extends HTMLEle
11
11
  this.toggle = createEvent(this, "toggle", 7);
12
12
  this.itemClick = createEvent(this, "itemClick", 7);
13
13
  this.text = undefined;
14
- this.hasChildren = undefined;
14
+ this.hasChildren = false;
15
15
  this.context = undefined;
16
16
  }
17
17
  render() {
18
18
  var _a, _b, _c;
19
- return (h(Host, { key: '5f5481c56072db6ae30c67a9c9ed8a709679d55b', class: {
20
- selected: (_a = this.context) === null || _a === void 0 ? void 0 : _a.isSelected,
21
- } }, h("div", { key: '1d36c65d8c44ce04347888c1a43532717b9f7e54', class: "icon-toggle-container", onClick: (e) => {
19
+ return (h(Host, { key: '29f49c27b0e62c71cb8776a2147de561aa5ed0f2', class: {
20
+ selected: !!((_a = this.context) === null || _a === void 0 ? void 0 : _a.isSelected),
21
+ } }, h("div", { key: '4fd6fab088cea8c06e5671c0389f84563e6a33ef', class: "icon-toggle-container", onClick: (e) => {
22
22
  e.preventDefault();
23
23
  this.toggle.emit();
24
24
  } }, this.hasChildren ? (h("ix-icon", { name: 'chevron-right', size: "16", class: {
25
- ['icon-toggle-down']: (_b = this.context) === null || _b === void 0 ? void 0 : _b.isExpanded,
26
- }, color: `color-${((_c = this.context) === null || _c === void 0 ? void 0 : _c.isExpanded) ? 'primary' : 'std-text'}` })) : null), h("div", { key: '43f5718e1c18f5a755f01580692349195dbe2e7e', class: "tree-node-container", onClick: () => {
25
+ ['icon-toggle-down']: !!((_b = this.context) === null || _b === void 0 ? void 0 : _b.isExpanded),
26
+ }, color: `color-${((_c = this.context) === null || _c === void 0 ? void 0 : _c.isExpanded) ? 'primary' : 'std-text'}` })) : null), h("div", { key: '4cb3c4699ee016895e68c21466e42aa3a10e3ed4', class: "tree-node-container", onClick: () => {
27
27
  this.itemClick.emit();
28
- } }, this.text, h("slot", { key: '4f0556708349c484f97f3f687ab1f0974c4ef35e' }))));
28
+ } }, h("div", { key: '48ae93475e742e15f6f6acd065fe47c8dd97559b', class: "tree-node-text" }, this.text), h("slot", { key: '2e27a586182c5ca31e924190801bbff825d7f25d' }))));
29
29
  }
30
30
  static get style() { return IxTreeItemStyle0; }
31
31
  }, [1, "ix-tree-item", {
@@ -1 +1 @@
1
- {"file":"tree-item.js","mappings":";;AAAA,MAAM,WAAW,GAAG,g2DAAg2D,CAAC;AACr3D,yBAAe,WAAW;;MCgBb,QAAQ;;;;;;;;;;;IA0BnB,MAAM;;QACJ,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,QAAQ,EAAE,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU;aACnC,IAED,4DACE,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAE,CAAC,CAAC;gBACT,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;aACpB,IAEA,IAAI,CAAC,WAAW,IACf,eACE,IAAI,EAAE,eAAe,EACrB,IAAI,EAAC,IAAI,EACT,KAAK,EAAE;gBACL,CAAC,kBAAkB,GAAG,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU;aAC/C,EACD,KAAK,EAAE,SACL,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU,IAAG,SAAS,GAAG,UACzC,EAAE,GACF,IACA,IAAI,CACJ,EACN,4DACE,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE;gBACP,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;aACvB,IAEA,IAAI,CAAC,IAAI,EACV,8DAAa,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/tree-item/tree-item.scss?tag=ix-tree-item&encapsulation=shadow","src/components/tree-item/tree-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: flex;\n align-items: center;\n\n height: 32px;\n width: 100%;\n\n cursor: pointer;\n\n .tree-node-container {\n display: flex;\n align-items: center;\n height: $x-large-space;\n flex-grow: 1;\n align-items: center;\n }\n\n .icon-toggle-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n\n ix-icon {\n transition: transform var(--theme-default-time) ease-in-out;\n\n &.icon-toggle-down {\n transform: rotate(90deg);\n }\n }\n }\n}\n\n:host(:not(.disabled):not(:disabled):not(.selected).hover),\n:host(:not(.disabled):not(:disabled):not(.selected):hover) {\n background-color: var(--theme-tree-item--background--hover);\n}\n\n:host(:not(.disabled):not(:disabled):not(.selected).active),\n:host(:not(.disabled):not(:disabled):not(.selected):active) {\n background-color: var(--theme-tree-item--background--active);\n}\n\n:host(.selected) {\n background-color: var(--theme-tree-item--background--selected);\n}\n\n:host(.selected.hover),\n:host(.selected:hover) {\n background-color: var(--theme-tree-item--background--selected-hover);\n}\n\n:host(.selected.active),\n:host(.selected:active) {\n background-color: var(--theme-tree-item--background--selected-active);\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { TreeItemContext } from '../tree/tree-model';\n\n@Component({\n tag: 'ix-tree-item',\n styleUrl: 'tree-item.scss',\n shadow: true,\n})\nexport class TreeItem {\n /**\n * Text\n */\n @Prop() text: string;\n\n /**\n * Has tree item children\n */\n @Prop() hasChildren: boolean;\n\n /**\n * Context\n */\n @Prop() context: TreeItemContext;\n\n /**\n * Expand/Collapsed toggled\n */\n @Event() toggle: EventEmitter<void>;\n\n /**\n * Clicked\n */\n @Event() itemClick: EventEmitter<void>;\n\n render() {\n return (\n <Host\n class={{\n selected: this.context?.isSelected,\n }}\n >\n <div\n class=\"icon-toggle-container\"\n onClick={(e) => {\n e.preventDefault();\n this.toggle.emit();\n }}\n >\n {this.hasChildren ? (\n <ix-icon\n name={'chevron-right'}\n size=\"16\"\n class={{\n ['icon-toggle-down']: this.context?.isExpanded,\n }}\n color={`color-${\n this.context?.isExpanded ? 'primary' : 'std-text'\n }`}\n />\n ) : null}\n </div>\n <div\n class=\"tree-node-container\"\n onClick={() => {\n this.itemClick.emit();\n }}\n >\n {this.text}\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"tree-item.js","mappings":";;AAAA,MAAM,WAAW,GAAG,8gEAA8gE,CAAC;AACniE,yBAAe,WAAW;;MCgBb,QAAQ;;;;;;;;2BASG,KAAK;;;IAiB3B,MAAM;;QACJ,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,QAAQ,EAAE,CAAC,EAAC,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU,CAAA;aACrC,IAED,4DACE,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAE,CAAC,CAAC;gBACT,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;aACpB,IAEA,IAAI,CAAC,WAAW,IACf,eACE,IAAI,EAAE,eAAe,EACrB,IAAI,EAAC,IAAI,EACT,KAAK,EAAE;gBACL,CAAC,kBAAkB,GAAG,CAAC,EAAC,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU,CAAA;aACjD,EACD,KAAK,EAAE,SACL,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU,IAAG,SAAS,GAAG,UACzC,EAAE,GACF,IACA,IAAI,CACJ,EACN,4DACE,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE;gBACP,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;aACvB,IAED,4DAAK,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,IAAI,CAAO,EAC7C,8DAAa,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/tree-item/tree-item.scss?tag=ix-tree-item&encapsulation=shadow","src/components/tree-item/tree-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: flex;\n align-items: center;\n\n height: 32px;\n width: 100%;\n\n cursor: pointer;\n\n .tree-node-container {\n @include ellipsis;\n display: flex;\n align-items: center;\n height: $x-large-space;\n flex-grow: 1;\n align-items: center;\n\n .tree-node-text {\n @include ellipsis;\n }\n }\n\n .icon-toggle-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n min-width: 2rem;\n\n ix-icon {\n transition: transform var(--theme-default-time) ease-in-out;\n\n &.icon-toggle-down {\n transform: rotate(90deg);\n }\n }\n }\n}\n\n:host(:not(.disabled):not(:disabled):not(.selected).hover),\n:host(:not(.disabled):not(:disabled):not(.selected):hover) {\n background-color: var(--theme-tree-item--background--hover);\n}\n\n:host(:not(.disabled):not(:disabled):not(.selected).active),\n:host(:not(.disabled):not(:disabled):not(.selected):active) {\n background-color: var(--theme-tree-item--background--active);\n}\n\n:host(.selected) {\n background-color: var(--theme-tree-item--background--selected);\n}\n\n:host(.selected.hover),\n:host(.selected:hover) {\n background-color: var(--theme-tree-item--background--selected-hover);\n}\n\n:host(.selected.active),\n:host(.selected:active) {\n background-color: var(--theme-tree-item--background--selected-active);\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { TreeItemContext } from '../tree/tree-model';\n\n@Component({\n tag: 'ix-tree-item',\n styleUrl: 'tree-item.scss',\n shadow: true,\n})\nexport class TreeItem {\n /**\n * Text\n */\n @Prop() text?: string;\n\n /**\n * Has tree item children\n */\n @Prop() hasChildren = false;\n\n /**\n * Context\n */\n @Prop() context?: TreeItemContext;\n\n /**\n * Expand/Collapsed toggled\n */\n @Event() toggle!: EventEmitter<void>;\n\n /**\n * Click on item not on the expand/collapse icon\n */\n @Event() itemClick!: EventEmitter<void>;\n\n render() {\n return (\n <Host\n class={{\n selected: !!this.context?.isSelected,\n }}\n >\n <div\n class=\"icon-toggle-container\"\n onClick={(e) => {\n e.preventDefault();\n this.toggle.emit();\n }}\n >\n {this.hasChildren ? (\n <ix-icon\n name={'chevron-right'}\n size=\"16\"\n class={{\n ['icon-toggle-down']: !!this.context?.isExpanded,\n }}\n color={`color-${\n this.context?.isExpanded ? 'primary' : 'std-text'\n }`}\n />\n ) : null}\n </div>\n <div\n class=\"tree-node-container\"\n onClick={() => {\n this.itemClick.emit();\n }}\n >\n <div class=\"tree-node-text\">{this.text}</div>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  /*
4
- * SPDX-FileCopyrightText: 2023 Siemens AG
4
+ * SPDX-FileCopyrightText: 2024 Siemens AG
5
5
  *
6
6
  * SPDX-License-Identifier: MIT
7
7
  *
@@ -143,4 +143,4 @@ exports.a11yBoolean = a11yBoolean;
143
143
  exports.a11yHostAttributes = a11yHostAttributes;
144
144
  exports.getFallbackLabelFromIconName = getFallbackLabelFromIconName;
145
145
 
146
- //# sourceMappingURL=a11y-d3ce56d1.js.map
146
+ //# sourceMappingURL=a11y-eba397e8.js.map
@@ -1 +1 @@
1
- {"file":"a11y-d3ce56d1.js","mappings":";;AAAA;;;;;;;;AAQO,MAAM,SAAS,GAAG,CAAC,IAAY;IACpC,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,KAAK,CAAC;KACd;IAED,IAAI,GAAQ,CAAC;IAEb,IAAI;QACF,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CA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Aa;IACb,cAAc;IACd,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,sBAAsB;IACtB,kBAAkB;IAClB,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,eAAe;IACf,eAAe;IACf,sBAAsB;IACtB,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,WAAW;IACX,eAAe;IACf,eAAe;IACf,eAAe;IACf,gBAAgB;CACjB;;;;;;","names":[],"sources":["src/components/utils/condition-checks.ts","src/components/utils/a11y.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport const isHttpUrl = (link: string) => {\n if (!link) {\n return false;\n }\n\n let url: URL;\n\n try {\n url = new URL(link);\n } catch (e) {\n return false;\n }\n\n return url.protocol === 'http:' || url.protocol === 'https:';\n};\n\nexport const isSvgDataUrl = (url: string) => {\n if (!url) {\n return false;\n }\n\n if (typeof url !== 'string') {\n return false;\n }\n\n return url.startsWith('data:image/svg+xml');\n};\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { isHttpUrl, isSvgDataUrl } from './condition-checks';\n\nexport const a11yBoolean = (value: boolean) => (value ? 'true' : 'false');\n\nconst kebabCaseToUpperCaseSentence = (kebabCase: string) => {\n const withoutFilledSuffix = kebabCase.replace('-filled', '');\n const words = withoutFilledSuffix.split('-');\n const sentence = words\n .map((word) => {\n const trimWord = word.trim();\n const digitLessWord = trimWord.replace(/\\d+/g, '');\n\n if (digitLessWord.length === 0) {\n return trimWord;\n }\n\n return digitLessWord;\n })\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n\n return sentence;\n};\n\nexport const getFallbackLabelFromIconName = (iconName: string) => {\n if (!iconName) {\n return 'Unknown';\n }\n\n if (isHttpUrl(iconName)) {\n return 'Unknown';\n }\n\n if (isSvgDataUrl(iconName)) {\n return 'Unknown';\n }\n\n const label = kebabCaseToUpperCaseSentence(iconName);\n\n if (label.length === 0) {\n return 'Unknown';\n }\n\n return label;\n};\n\nexport const a11yHostAttributes = (\n hostElement: HTMLElement,\n ignoreAttributes: A11yAttributeName[] = []\n): Record<A11yAttributeName, any> => {\n const attributeObject: Record<string, any> = {};\n a11yAttributes.forEach((attr) => {\n if (hostElement.hasAttribute(attr)) {\n const value = hostElement.getAttribute(attr);\n if (value !== null && !ignoreAttributes.includes(attr)) {\n attributeObject[attr] = hostElement.getAttribute(attr);\n hostElement.removeAttribute(attr);\n }\n }\n });\n\n return attributeObject;\n};\n\ntype PartialRecord<K extends keyof any, T> = {\n [P in K]?: T;\n};\nexport type A11yAttributes = PartialRecord<A11yAttributeName, any>;\n\nexport type A11yAttributeName =\n | 'role'\n | 'aria-activedescendant'\n | 'aria-atomic'\n | 'aria-autocomplete'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-busy'\n | 'aria-checked'\n | 'aria-colcount'\n | 'aria-colindex'\n | 'aria-colindextext'\n | 'aria-colspan'\n | 'aria-controls'\n | 'aria-current'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-disabled'\n | 'aria-errormessage'\n | 'aria-expanded'\n | 'aria-flowto'\n | 'aria-haspopup'\n | 'aria-hidden'\n | 'aria-invalid'\n | 'aria-keyshortcuts'\n | 'aria-label'\n | 'aria-labelledby'\n | 'aria-level'\n | 'aria-live'\n | 'aria-multiline'\n | 'aria-multiselectable'\n | 'aria-orientation'\n | 'aria-owns'\n | 'aria-placeholder'\n | 'aria-posinset'\n | 'aria-pressed'\n | 'aria-readonly'\n | 'aria-relevant'\n | 'aria-required'\n | 'aria-roledescription'\n | 'aria-rowcount'\n | 'aria-rowindex'\n | 'aria-rowindextext'\n | 'aria-rowspan'\n | 'aria-selected'\n | 'aria-setsize'\n | 'aria-sort'\n | 'aria-valuemax'\n | 'aria-valuemin'\n | 'aria-valuenow'\n | 'aria-valuetext';\n\nconst a11yAttributes: A11yAttributeName[] = [\n 'role',\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n];\n"],"version":3}
1
+ {"file":"a11y-eba397e8.js","mappings":";;AAAA;;;;;;;;AAQO,MAAM,SAAS,GAAG,CAAC,IAAY;IACpC,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,KAAK,CAAC;KACd;IAED,IAAI,GAAQ,CAAC;IAEb,IAAI;QACF,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;KACrB;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;IAED,OAAO,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC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IAClB,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,eAAe;IACf,eAAe;IACf,sBAAsB;IACtB,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,WAAW;IACX,eAAe;IACf,eAAe;IACf,eAAe;IACf,gBAAgB;CACjB;;;;;;","names":[],"sources":["src/components/utils/condition-checks.ts","src/components/utils/a11y.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport const isHttpUrl = (link: string) => {\n if (!link) {\n return false;\n }\n\n let url: URL;\n\n try {\n url = new URL(link);\n } catch (e) {\n return false;\n }\n\n return url.protocol === 'http:' || url.protocol === 'https:';\n};\n\nexport const isSvgDataUrl = (url: string) => {\n if (!url) {\n return false;\n }\n\n if (typeof url !== 'string') {\n return false;\n }\n\n return url.startsWith('data:image/svg+xml');\n};\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { isHttpUrl, isSvgDataUrl } from './condition-checks';\n\nexport const a11yBoolean = (value: boolean) => (value ? 'true' : 'false');\n\nconst kebabCaseToUpperCaseSentence = (kebabCase: string) => {\n const withoutFilledSuffix = kebabCase.replace('-filled', '');\n const words = withoutFilledSuffix.split('-');\n const sentence = words\n .map((word) => {\n const trimWord = word.trim();\n const digitLessWord = trimWord.replace(/\\d+/g, '');\n\n if (digitLessWord.length === 0) {\n return trimWord;\n }\n\n return digitLessWord;\n })\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n\n return sentence;\n};\n\nexport const getFallbackLabelFromIconName = (iconName: string) => {\n if (!iconName) {\n return 'Unknown';\n }\n\n if (isHttpUrl(iconName)) {\n return 'Unknown';\n }\n\n if (isSvgDataUrl(iconName)) {\n return 'Unknown';\n }\n\n const label = kebabCaseToUpperCaseSentence(iconName);\n\n if (label.length === 0) {\n return 'Unknown';\n }\n\n return label;\n};\n\nexport const a11yHostAttributes = (\n hostElement: HTMLElement,\n ignoreAttributes: A11yAttributeName[] = []\n): Record<A11yAttributeName, any> => {\n const attributeObject: Record<string, any> = {};\n a11yAttributes.forEach((attr) => {\n if (hostElement.hasAttribute(attr)) {\n const value = hostElement.getAttribute(attr);\n if (value !== null && !ignoreAttributes.includes(attr)) {\n attributeObject[attr] = hostElement.getAttribute(attr);\n hostElement.removeAttribute(attr);\n }\n }\n });\n\n return attributeObject;\n};\n\ntype PartialRecord<K extends keyof any, T> = {\n [P in K]?: T;\n};\nexport type A11yAttributes = PartialRecord<A11yAttributeName, any>;\n\nexport type A11yAttributeName =\n | 'role'\n | 'aria-activedescendant'\n | 'aria-atomic'\n | 'aria-autocomplete'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-busy'\n | 'aria-checked'\n | 'aria-colcount'\n | 'aria-colindex'\n | 'aria-colindextext'\n | 'aria-colspan'\n | 'aria-controls'\n | 'aria-current'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-disabled'\n | 'aria-errormessage'\n | 'aria-expanded'\n | 'aria-flowto'\n | 'aria-haspopup'\n | 'aria-hidden'\n | 'aria-invalid'\n | 'aria-keyshortcuts'\n | 'aria-label'\n | 'aria-labelledby'\n | 'aria-level'\n | 'aria-live'\n | 'aria-multiline'\n | 'aria-multiselectable'\n | 'aria-orientation'\n | 'aria-owns'\n | 'aria-placeholder'\n | 'aria-posinset'\n | 'aria-pressed'\n | 'aria-readonly'\n | 'aria-relevant'\n | 'aria-required'\n | 'aria-roledescription'\n | 'aria-rowcount'\n | 'aria-rowindex'\n | 'aria-rowindextext'\n | 'aria-rowspan'\n | 'aria-selected'\n | 'aria-setsize'\n | 'aria-sort'\n | 'aria-valuemax'\n | 'aria-valuemin'\n | 'aria-valuenow'\n | 'aria-valuetext';\n\nconst a11yAttributes: A11yAttributeName[] = [\n 'role',\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n];\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  const typedEvent = require('./typed-event-8032c0c0.js');
4
4
 
5
5
  /*
6
- * SPDX-FileCopyrightText: 2023 Siemens AG
6
+ * SPDX-FileCopyrightText: 2024 Siemens AG
7
7
  *
8
8
  * SPDX-License-Identifier: MIT
9
9
  *
@@ -103,4 +103,4 @@ exports.closestIxMenu = closestIxMenu;
103
103
  exports.useContextConsumer = useContextConsumer;
104
104
  exports.useContextProvider = useContextProvider;
105
105
 
106
- //# sourceMappingURL=context-98f4a0b3.js.map
106
+ //# sourceMappingURL=context-938f7470.js.map
@@ -1 +1 @@
1
- {"file":"context-98f4a0b3.js","mappings":";;;;AAAA;;;;;;;;AA+BA;;;SAGgB,aAAa,CAC3B,IAAY,EACZ,YA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AC,mBAAmB,CAAC,CAAC;SACnC;QACD,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAEzC,IAAI,cAAc,EAAE;YAClB,mBAAmB,CAAC,QAAQ,CAAC,cAAc,EAAE;gBAC3C,QAAQ,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;aACtC,CAAC,CAAC;SACJ;KACF,CACF,CAAC;IAEF,aAAa,CAAC,EAAE,CAAC,CAAC,OAAuB;QACvC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KACjB,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE;YAClB,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SACpB,CAAC,CACH,CAAC;KACH,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,CAAC,OAAuB;YAC5B,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC7B;KACF,CAAC;AACJ;;AC1KA;;;;;;;;MAWa,aAAa,GAAG,CAAC,OAAgB;IAC5C,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/C,OAAO,WAAW,CAAC;AACrB,EAAE;MAuBW,wBAAwB,GAAG,aAAa,CAKlD,4BAA4B,EAAE;IAC/B,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,KAAK;CACf;;;;;;;","names":["TypedEvent"],"sources":["src/components/utils/context.ts","src/components/utils/application-layout/context.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { TypedEvent } from './typed-event';\n\n/**\n * A Context object defines an optional initial value for a Context, as well as a name identifier for debugging purposes.\n */\nexport type Context<T> = {\n name: string;\n initialValue?: T;\n};\n\n/**\n * An unknown context type\n */\nexport type UnknownContext = Context<unknown>;\n\n/**\n * A helper type which can extract a Context value type from a Context type\n */\nexport type ContextType<T extends UnknownContext> = T extends Context<infer Y>\n ? Y\n : never;\n\n/**\n * A function which creates a Context value object\n */\nexport function createContext<T>(\n name: string,\n initialValue?: T\n): Readonly<Context<T>> {\n return {\n name,\n initialValue,\n };\n}\n\n/**\n * A callback which is provided by a context requester and is called with the value satisfying the request.\n * This callback can be called multiple times by context providers as the requested value is changed.\n */\nexport type ContextCallback<ValueType> = (\n value: ValueType,\n unsubscribe?: () => void\n) => void;\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n */\nexport class ContextEvent<T extends UnknownContext> extends Event {\n public constructor(\n public readonly context: T,\n public readonly callback: ContextCallback<ContextType<T>>,\n public readonly subscribe?: boolean\n ) {\n super('context-request', { bubbles: true, composed: true });\n }\n}\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-request' event can be emitted by any element which desires\n * a context value to be injected by an external provider.\n */\n 'context-request': ContextEvent<UnknownContext>;\n }\n}\n\nexport type ContextConsumerSubscription = {\n unsubscribe: () => void;\n};\n\nexport function useContextConsumer<\n T extends HTMLElement,\n C extends UnknownContext,\n>(\n hostElement: T,\n context: C,\n onContextReceived: (\n context: ContextType<C>,\n unsubscribe?: () => void\n ) => void,\n subscribe?: boolean\n): ContextConsumerSubscription {\n let _unsubscribe: () => void;\n hostElement.dispatchEvent(\n new ContextEvent(\n context,\n (ctx, unSub) => {\n onContextReceived(ctx, unSub);\n _unsubscribe = unSub;\n },\n subscribe\n )\n );\n\n return {\n unsubscribe: () => {\n _unsubscribe();\n },\n };\n}\nexport type ContextProvider<C extends Context<{}> = Context<any>> = {\n emit: (context: ContextType<C>) => void;\n};\n\nexport function useContextProvider<\n X extends {},\n C extends Context<X>,\n T extends HTMLElement = HTMLElement,\n>(\n hostElement: T,\n context: C,\n contextPayload?: ContextType<C>\n): ContextProvider<C> {\n const requestContext = new TypedEvent<ContextEvent<C>>();\n const updateContext = new TypedEvent<ContextType<C>>();\n\n const requests = new Set<ContextEvent<UnknownContext>>();\n\n hostElement.addEventListener(\n 'context-request',\n (requestContextEvent: ContextEvent<C>) => {\n if (requestContextEvent?.context.name !== context.name) {\n return;\n }\n\n requestContextEvent.stopPropagation();\n\n if (requestContextEvent.subscribe) {\n requests.add(requestContextEvent);\n }\n requestContext.emit(requestContextEvent);\n\n if (contextPayload) {\n requestContextEvent.callback(contextPayload, () => {\n requests.delete(requestContextEvent);\n });\n }\n }\n );\n\n updateContext.on((context: ContextType<C>) => {\n requests.forEach((r) =>\n r.callback(context, () => {\n requests.delete(r);\n })\n );\n });\n\n return {\n emit: (context: ContextType<C>) => {\n updateContext.emit(context);\n },\n };\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createContext } from '../context';\n\nexport const closestIxMenu = (element: Element) => {\n const menuElement = element.closest('ix-menu');\n return menuElement;\n};\n\nexport type AppSwitchConfigurationTarget =\n | '_self'\n | '_blank'\n | '_parent'\n | '_top'\n | (string & {});\n\nexport type AppSwitchConfiguration = {\n currentAppId: string;\n apps: {\n id: string;\n name: string;\n description: string;\n url: string;\n target: AppSwitchConfigurationTarget;\n iconSrc: string;\n }[];\n i18nAppSwitch?: string;\n i18nLoadingApps?: string;\n};\n\nexport const ApplicationLayoutContext = createContext<{\n hideHeader: boolean;\n host: 'basic-navigation' | 'map-navigation' | null;\n appSwitchConfig?: AppSwitchConfiguration;\n sidebar?: boolean;\n}>('application-layout-context', {\n hideHeader: false,\n host: null,\n sidebar: false,\n});\n"],"version":3}
1
+ {"file":"context-938f7470.js","mappings":";;;;AAAA;;;;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mB,CAAC,SAAS,EAAE;YACjC,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;SACnC;QACD,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAEzC,IAAI,cAAc,EAAE;YAClB,mBAAmB,CAAC,QAAQ,CAAC,cAAc,EAAE;gBAC3C,QAAQ,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;aACtC,CAAC,CAAC;SACJ;KACF,CACF,CAAC;IAEF,aAAa,CAAC,EAAE,CAAC,CAAC,OAAuB;QACvC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KACjB,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE;YAClB,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SACpB,CAAC,CACH,CAAC;KACH,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,CAAC,OAAuB;YAC5B,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC7B;KACF,CAAC;AACJ;;AC1KA;;;;;;;;MAWa,aAAa,GAAG,CAAC,OAAgB;IAC5C,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/C,OAAO,WAAW,CAAC;AACrB,EAAE;MAuBW,wBAAwB,GAAG,aAAa,CAKlD,4BAA4B,EAAE;IAC/B,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,KAAK;CACf;;;;;;;","names":["TypedEvent"],"sources":["src/components/utils/context.ts","src/components/utils/application-layout/context.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { TypedEvent } from './typed-event';\n\n/**\n * A Context object defines an optional initial value for a Context, as well as a name identifier for debugging purposes.\n */\nexport type Context<T> = {\n name: string;\n initialValue?: T;\n};\n\n/**\n * An unknown context type\n */\nexport type UnknownContext = Context<unknown>;\n\n/**\n * A helper type which can extract a Context value type from a Context type\n */\nexport type ContextType<T extends UnknownContext> = T extends Context<infer Y>\n ? Y\n : never;\n\n/**\n * A function which creates a Context value object\n */\nexport function createContext<T>(\n name: string,\n initialValue?: T\n): Readonly<Context<T>> {\n return {\n name,\n initialValue,\n };\n}\n\n/**\n * A callback which is provided by a context requester and is called with the value satisfying the request.\n * This callback can be called multiple times by context providers as the requested value is changed.\n */\nexport type ContextCallback<ValueType> = (\n value: ValueType,\n unsubscribe?: () => void\n) => void;\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n */\nexport class ContextEvent<T extends UnknownContext> extends Event {\n public constructor(\n public readonly context: T,\n public readonly callback: ContextCallback<ContextType<T>>,\n public readonly subscribe?: boolean\n ) {\n super('context-request', { bubbles: true, composed: true });\n }\n}\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-request' event can be emitted by any element which desires\n * a context value to be injected by an external provider.\n */\n 'context-request': ContextEvent<UnknownContext>;\n }\n}\n\nexport type ContextConsumerSubscription = {\n unsubscribe: () => void;\n};\n\nexport function useContextConsumer<\n T extends HTMLElement,\n C extends UnknownContext,\n>(\n hostElement: T,\n context: C,\n onContextReceived: (\n context: ContextType<C>,\n unsubscribe?: () => void\n ) => void,\n subscribe?: boolean\n): ContextConsumerSubscription {\n let _unsubscribe: () => void;\n hostElement.dispatchEvent(\n new ContextEvent(\n context,\n (ctx, unSub) => {\n onContextReceived(ctx, unSub);\n _unsubscribe = unSub;\n },\n subscribe\n )\n );\n\n return {\n unsubscribe: () => {\n _unsubscribe();\n },\n };\n}\nexport type ContextProvider<C extends Context<{}> = Context<any>> = {\n emit: (context: ContextType<C>) => void;\n};\n\nexport function useContextProvider<\n X extends {},\n C extends Context<X>,\n T extends HTMLElement = HTMLElement,\n>(\n hostElement: T,\n context: C,\n contextPayload?: ContextType<C>\n): ContextProvider<C> {\n const requestContext = new TypedEvent<ContextEvent<C>>();\n const updateContext = new TypedEvent<ContextType<C>>();\n\n const requests = new Set<ContextEvent<UnknownContext>>();\n\n hostElement.addEventListener(\n 'context-request',\n (requestContextEvent: ContextEvent<C>) => {\n if (requestContextEvent?.context.name !== context.name) {\n return;\n }\n\n requestContextEvent.stopPropagation();\n\n if (requestContextEvent.subscribe) {\n requests.add(requestContextEvent);\n }\n requestContext.emit(requestContextEvent);\n\n if (contextPayload) {\n requestContextEvent.callback(contextPayload, () => {\n requests.delete(requestContextEvent);\n });\n }\n }\n );\n\n updateContext.on((context: ContextType<C>) => {\n requests.forEach((r) =>\n r.callback(context, () => {\n requests.delete(r);\n })\n );\n });\n\n return {\n emit: (context: ContextType<C>) => {\n updateContext.emit(context);\n },\n };\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createContext } from '../context';\n\nexport const closestIxMenu = (element: Element) => {\n const menuElement = element.closest('ix-menu');\n return menuElement;\n};\n\nexport type AppSwitchConfigurationTarget =\n | '_self'\n | '_blank'\n | '_parent'\n | '_top'\n | (string & {});\n\nexport type AppSwitchConfiguration = {\n currentAppId: string;\n apps: {\n id: string;\n name: string;\n description: string;\n url: string;\n target: AppSwitchConfigurationTarget;\n iconSrc: string;\n }[];\n i18nAppSwitch?: string;\n i18nLoadingApps?: string;\n};\n\nexport const ApplicationLayoutContext = createContext<{\n hideHeader: boolean;\n host: 'basic-navigation' | 'map-navigation' | null;\n appSwitchConfig?: AppSwitchConfiguration;\n sidebar?: boolean;\n}>('application-layout-context', {\n hideHeader: false,\n host: null,\n sidebar: false,\n});\n"],"version":3}
@@ -0,0 +1,144 @@
1
+ 'use strict';
2
+
3
+ /*
4
+ * SPDX-FileCopyrightText: 2024 Siemens AG
5
+ *
6
+ * SPDX-License-Identifier: MIT
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */
11
+ function hasDropdownItemWrapperImplemented(item) {
12
+ return (item &&
13
+ item.getDropdownItemElement !== undefined &&
14
+ typeof item.getDropdownItemElement === 'function');
15
+ }
16
+ class DropdownController {
17
+ constructor() {
18
+ this.dropdowns = new Map();
19
+ this.submenuIds = {};
20
+ this.isWindowListenerActive = false;
21
+ }
22
+ connected(dropdown) {
23
+ if (!this.isWindowListenerActive) {
24
+ this.addOverlayListeners();
25
+ }
26
+ this.dropdowns.set(dropdown.getId(), dropdown);
27
+ if (dropdown.discoverAllSubmenus) {
28
+ this.discoverSubmenus();
29
+ }
30
+ }
31
+ disconnected(dropdown) {
32
+ this.dropdowns.delete(dropdown.getId());
33
+ }
34
+ discoverSubmenus() {
35
+ this.dropdowns.forEach((dropdown) => {
36
+ dropdown.discoverSubmenu();
37
+ });
38
+ }
39
+ present(dropdown) {
40
+ if (!dropdown.isPresent() && dropdown.willPresent()) {
41
+ this.submenuIds[dropdown.getId()] = dropdown.getAssignedSubmenuIds();
42
+ dropdown.present();
43
+ }
44
+ }
45
+ dismissChildren(uid) {
46
+ const childIds = this.submenuIds[uid] || [];
47
+ for (const id of childIds) {
48
+ this.dismiss(this.dropdowns.get(id));
49
+ }
50
+ }
51
+ dismiss(dropdown) {
52
+ if (dropdown.isPresent() && dropdown.willDismiss()) {
53
+ this.dismissChildren(dropdown.getId());
54
+ dropdown.dismiss();
55
+ delete this.submenuIds[dropdown.getId()];
56
+ }
57
+ }
58
+ dismissAll(ignoreBehaviorForIds = [], ignoreRelatedDropdowns = false) {
59
+ this.dropdowns.forEach((dropdown) => {
60
+ const preventClosing = dropdown.closeBehavior === 'inside' || dropdown.closeBehavior === false;
61
+ const shouldIgnore = ignoreBehaviorForIds.includes(dropdown.getId());
62
+ const path = this.buildComposedPath(dropdown.getId(), new Set());
63
+ if (ignoreBehaviorForIds.length > 0 && ignoreRelatedDropdowns) {
64
+ let skipRelatedDropdown = false;
65
+ ignoreBehaviorForIds.forEach((id) => {
66
+ if (path.has(id)) {
67
+ skipRelatedDropdown = true;
68
+ return;
69
+ }
70
+ });
71
+ if (!skipRelatedDropdown) {
72
+ return;
73
+ }
74
+ }
75
+ if (!shouldIgnore && preventClosing) {
76
+ return;
77
+ }
78
+ this.dismiss(dropdown);
79
+ });
80
+ }
81
+ dismissOthers(uid) {
82
+ let path = this.buildComposedPath(uid, new Set());
83
+ path.add(uid);
84
+ this.dropdowns.forEach((dropdown) => {
85
+ if (dropdown.closeBehavior !== 'inside' &&
86
+ dropdown.closeBehavior !== false &&
87
+ !path.has(dropdown.getId())) {
88
+ this.dismiss(dropdown);
89
+ }
90
+ });
91
+ }
92
+ pathIncludesTrigger(eventTargets) {
93
+ for (let eventTarget of eventTargets) {
94
+ if (eventTarget instanceof HTMLElement) {
95
+ if (eventTarget.hasAttribute('data-ix-dropdown-trigger')) {
96
+ return eventTarget;
97
+ }
98
+ }
99
+ }
100
+ return;
101
+ }
102
+ pathIncludesDropdown(eventTargets) {
103
+ return !!eventTargets.find((element) => element.tagName === 'IX-DROPDOWN');
104
+ }
105
+ buildComposedPath(id, path) {
106
+ if (this.submenuIds[id]) {
107
+ path.add(id);
108
+ }
109
+ for (const ruleKey of Object.keys(this.submenuIds)) {
110
+ if (this.submenuIds[ruleKey].includes(id)) {
111
+ this.buildComposedPath(ruleKey, path).forEach((key) => path.add(key));
112
+ }
113
+ }
114
+ return path;
115
+ }
116
+ addOverlayListeners() {
117
+ this.isWindowListenerActive = true;
118
+ window.addEventListener('click', (event) => {
119
+ const hasTrigger = this.pathIncludesTrigger(event.composedPath());
120
+ const hasDropdown = this.pathIncludesDropdown(event.composedPath());
121
+ if (!hasTrigger && !hasDropdown) {
122
+ this.dismissAll();
123
+ }
124
+ });
125
+ window.addEventListener('keydown', (event) => {
126
+ if (event.key === 'Escape') {
127
+ this.dismissAll([...this.dropdowns.keys()]);
128
+ }
129
+ });
130
+ }
131
+ }
132
+ const addDisposableEventListener = (element, eventType, callback) => {
133
+ element.addEventListener(eventType, callback);
134
+ return () => {
135
+ element.removeEventListener(eventType, callback);
136
+ };
137
+ };
138
+ const dropdownController = new DropdownController();
139
+
140
+ exports.addDisposableEventListener = addDisposableEventListener;
141
+ exports.dropdownController = dropdownController;
142
+ exports.hasDropdownItemWrapperImplemented = hasDropdownItemWrapperImplemented;
143
+
144
+ //# sourceMappingURL=dropdown-controller-5ef3d018.js.map
@@ -0,0 +1 @@
1
+ {"file":"dropdown-controller-5ef3d018.js","mappings":";;AAAA;;;;;;;;SA8BgB,iCAAiC,CAC/C,IAAa;IAEb,QACE,IAAI;QACH,IAA4B,CAAC,sBAAsB,KAAK,SAAS;QAClE,OAAQ,IAA4B,CAAC,sBAAsB,KAAK,UAAU,EAC1E;AACJ,CAAC;AAQD,MAAM,kBAAkB;IAAxB;QACU,cAAS,GAAmC,IAAI,GAAG,EAGxD,CAAC;QACI,eAAU,GAAe,EAAE,CAAC;QAE5B,2BAAsB,GAAG,KAAK,CAAC;KAgJxC;IA9IC,SAAS,CAAC,QAA2B;QACnC,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAChC,IAAI,CAAC,mBAAmB,EAAE,CAAC;SAC5B;QACD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAC;QAE/C,IAAI,QAAQ,CAAC,mBAAmB,EAAE;YAChC,IAAI,CAAC,gBAAgB,EAAE,CAAC;SACzB;KACF;IAED,YAAY,CAAC,QAA2B;QACtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;KACzC;IAED,gBAAgB;QACd,IAAI,CAAC,SAAS,CAAC,OAAO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ACF,CAAC,CAAC;KACJ;CACF;MAEY,0BAA0B,GAAG,CACxC,OAAoC,EACpC,SAAiB,EACjB,QAA4C;IAE5C,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE9C,OAAO;QACL,OAAO,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;KAClD,CAAC;AACJ,EAAE;MAgBW,kBAAkB,GAAG,IAAI,kBAAkB;;;;;;","names":[],"sources":["src/components/dropdown/dropdown-controller.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { IxComponent } from '../utils/internal';\nexport type CloseBehavior = 'inside' | 'outside' | 'both' | boolean;\n\nexport interface DropdownInterface extends IxComponent {\n closeBehavior: CloseBehavior;\n discoverAllSubmenus: boolean;\n\n getAssignedSubmenuIds(): string[];\n getId(): string;\n\n discoverSubmenu(): void;\n\n isPresent(): boolean;\n\n willPresent?(): boolean;\n willDismiss?(): boolean;\n\n present(): void;\n dismiss(): void;\n}\n\nexport function hasDropdownItemWrapperImplemented(\n item: unknown\n): item is DropdownItemWrapper {\n return (\n item &&\n (item as DropdownItemWrapper).getDropdownItemElement !== undefined &&\n typeof (item as DropdownItemWrapper).getDropdownItemElement === 'function'\n );\n}\n\nexport interface DropdownItemWrapper {\n getDropdownItemElement(): Promise<HTMLIxDropdownItemElement>;\n}\n\ntype SubmenuIds = Record<string, string[]>;\n\nclass DropdownController {\n private dropdowns: Map<string, DropdownInterface> = new Map<\n string,\n DropdownInterface\n >();\n private submenuIds: SubmenuIds = {};\n\n private isWindowListenerActive = false;\n\n connected(dropdown: DropdownInterface) {\n if (!this.isWindowListenerActive) {\n this.addOverlayListeners();\n }\n this.dropdowns.set(dropdown.getId(), dropdown);\n\n if (dropdown.discoverAllSubmenus) {\n this.discoverSubmenus();\n }\n }\n\n disconnected(dropdown: DropdownInterface) {\n this.dropdowns.delete(dropdown.getId());\n }\n\n discoverSubmenus() {\n this.dropdowns.forEach((dropdown) => {\n dropdown.discoverSubmenu();\n });\n }\n\n present(dropdown: DropdownInterface) {\n if (!dropdown.isPresent() && dropdown.willPresent()) {\n this.submenuIds[dropdown.getId()] = dropdown.getAssignedSubmenuIds();\n dropdown.present();\n }\n }\n\n dismissChildren(uid: string) {\n const childIds = this.submenuIds[uid] || [];\n for (const id of childIds) {\n this.dismiss(this.dropdowns.get(id));\n }\n }\n\n dismiss(dropdown: DropdownInterface) {\n if (dropdown.isPresent() && dropdown.willDismiss()) {\n this.dismissChildren(dropdown.getId());\n dropdown.dismiss();\n delete this.submenuIds[dropdown.getId()];\n }\n }\n\n dismissAll(\n ignoreBehaviorForIds: string[] = [],\n ignoreRelatedDropdowns = false\n ) {\n this.dropdowns.forEach((dropdown) => {\n const preventClosing =\n dropdown.closeBehavior === 'inside' || dropdown.closeBehavior === false;\n\n const shouldIgnore = ignoreBehaviorForIds.includes(dropdown.getId());\n const path = this.buildComposedPath(dropdown.getId(), new Set<string>());\n\n if (ignoreBehaviorForIds.length > 0 && ignoreRelatedDropdowns) {\n let skipRelatedDropdown = false;\n\n ignoreBehaviorForIds.forEach((id) => {\n if (path.has(id)) {\n skipRelatedDropdown = true;\n return;\n }\n });\n\n if (!skipRelatedDropdown) {\n return;\n }\n }\n\n if (!shouldIgnore && preventClosing) {\n return;\n }\n\n this.dismiss(dropdown);\n });\n }\n\n dismissOthers(uid: string) {\n let path = this.buildComposedPath(uid, new Set<string>());\n path.add(uid);\n\n this.dropdowns.forEach((dropdown) => {\n if (\n dropdown.closeBehavior !== 'inside' &&\n dropdown.closeBehavior !== false &&\n !path.has(dropdown.getId())\n ) {\n this.dismiss(dropdown);\n }\n });\n }\n\n pathIncludesTrigger(eventTargets: EventTarget[]) {\n for (let eventTarget of eventTargets) {\n if (eventTarget instanceof HTMLElement) {\n if (eventTarget.hasAttribute('data-ix-dropdown-trigger')) {\n return eventTarget;\n }\n }\n }\n\n return;\n }\n\n private pathIncludesDropdown(eventTargets: EventTarget[]) {\n return !!eventTargets.find(\n (element: HTMLElement) => element.tagName === 'IX-DROPDOWN'\n );\n }\n\n private buildComposedPath(id: string, path: Set<string>): Set<string> {\n if (this.submenuIds[id]) {\n path.add(id);\n }\n\n for (const ruleKey of Object.keys(this.submenuIds)) {\n if (this.submenuIds[ruleKey].includes(id)) {\n this.buildComposedPath(ruleKey, path).forEach((key) => path.add(key));\n }\n }\n\n return path;\n }\n\n private addOverlayListeners() {\n this.isWindowListenerActive = true;\n\n window.addEventListener('click', (event: PointerEvent) => {\n const hasTrigger = this.pathIncludesTrigger(event.composedPath());\n const hasDropdown = this.pathIncludesDropdown(event.composedPath());\n\n if (!hasTrigger && !hasDropdown) {\n this.dismissAll();\n }\n });\n\n window.addEventListener('keydown', (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.dismissAll([...this.dropdowns.keys()]);\n }\n });\n }\n}\n\nexport const addDisposableEventListener = (\n element: Element | Window | Document,\n eventType: string,\n callback: EventListenerOrEventListenerObject\n) => {\n element.addEventListener(eventType, callback);\n\n return () => {\n element.removeEventListener(eventType, callback);\n };\n};\n\nexport const addDisposableEventListenerAsArray = (\n listener: {\n element: Element | Window | Document;\n eventType: string;\n callback: EventListenerOrEventListenerObject;\n }[]\n) => {\n const disposables = listener.map(({ callback, element, eventType }) =>\n addDisposableEventListener(element, eventType, callback)\n );\n\n return () => disposables.forEach((dispose) => dispose());\n};\n\nexport const dropdownController = new DropdownController();\n"],"version":3}