@ukic/web-components 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (425) hide show
  1. package/dist/cjs/{close-icon-8ccb0163.js → close-icon-04be4880.js} +2 -2
  2. package/dist/cjs/close-icon-04be4880.js.map +1 -0
  3. package/dist/cjs/core.cjs.js +1 -1
  4. package/dist/cjs/{helpers-eb53c416.js → helpers-3811d14b.js} +17 -12
  5. package/dist/cjs/helpers-3811d14b.js.map +1 -0
  6. package/dist/cjs/ic-alert.cjs.entry.js +3 -3
  7. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js +128 -38
  12. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-checkbox-group.cjs.entry.js +3 -2
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-checkbox.cjs.entry.js +9 -3
  17. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-dialog.cjs.entry.js +3 -3
  22. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-empty-state.cjs.entry.js +37 -0
  25. package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -0
  26. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-footer.cjs.entry.js +5 -2
  29. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-input-label_2.cjs.entry.js +2 -2
  34. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -3
  38. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-navigation-group.cjs.entry.js +30 -12
  40. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-navigation-item.cjs.entry.js +4 -5
  42. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-pagination.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-popover-menu.cjs.entry.js +65 -13
  48. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-search-bar.cjs.entry.js +4 -3
  52. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-select.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-side-navigation.cjs.entry.js +15 -6
  55. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
  57. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-switch.cjs.entry.js +2 -2
  60. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-toast.cjs.entry.js +3 -3
  66. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  68. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-typography.cjs.entry.js +11 -3
  70. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  71. package/dist/cjs/index-2a0c6769.js +4 -0
  72. package/dist/cjs/loader.cjs.js +1 -1
  73. package/dist/cjs/types-3eb02246.js.map +1 -1
  74. package/dist/collection/assets/close-icon.svg +1 -1
  75. package/dist/collection/assets/error-icon.svg +3 -2
  76. package/dist/collection/assets/hamburger-menu-icon.svg +1 -1
  77. package/dist/collection/assets/info-icon.svg +3 -2
  78. package/dist/collection/assets/neutral-icon.svg +4 -3
  79. package/dist/collection/assets/success-icon.svg +3 -2
  80. package/dist/collection/assets/warning-icon.svg +3 -2
  81. package/dist/collection/collection-manifest.json +1 -0
  82. package/dist/collection/components/ic-alert/ic-alert.css +9 -9
  83. package/dist/collection/components/ic-alert/ic-alert.js +1 -1
  84. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  85. package/dist/collection/components/ic-button/ic-button.css +19 -3
  86. package/dist/collection/components/ic-button/ic-button.js +25 -8
  87. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  88. package/dist/collection/components/ic-button/ic-button.types.js.map +1 -1
  89. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +17 -2
  90. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -1
  91. package/dist/collection/components/ic-checkbox/ic-checkbox.css +34 -0
  92. package/dist/collection/components/ic-checkbox/ic-checkbox.js +34 -3
  93. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  94. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +30 -3
  95. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  96. package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js +28 -0
  97. package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js.map +1 -1
  98. package/dist/collection/components/ic-chip/ic-chip.js +3 -3
  99. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  100. package/dist/collection/components/ic-chip/ic-chip.types.js.map +1 -1
  101. package/dist/collection/components/ic-dialog/ic-dialog.js +1 -1
  102. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  103. package/dist/collection/components/ic-empty-state/ic-empty-state.css +49 -0
  104. package/dist/collection/components/ic-empty-state/ic-empty-state.js +158 -0
  105. package/dist/collection/components/ic-empty-state/ic-empty-state.js.map +1 -0
  106. package/dist/collection/components/ic-empty-state/ic-empty-state.types.js +2 -0
  107. package/dist/collection/components/ic-empty-state/ic-empty-state.types.js.map +1 -0
  108. package/dist/collection/components/ic-empty-state/test/a11y/ic-empty-state.test.a11y.js +38 -0
  109. package/dist/collection/components/ic-empty-state/test/a11y/ic-empty-state.test.a11y.js.map +1 -0
  110. package/dist/collection/components/ic-empty-state/test/basic/ic-empty-state.spec.js +86 -0
  111. package/dist/collection/components/ic-empty-state/test/basic/ic-empty-state.spec.js.map +1 -0
  112. package/dist/collection/components/ic-footer/ic-footer.js +4 -1
  113. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  114. package/dist/collection/components/ic-input-validation/ic-input-validation.css +1 -1
  115. package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +1 -0
  116. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +1 -1
  117. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  118. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +1 -1
  119. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +1 -1
  120. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +6 -2
  121. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +28 -10
  122. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  123. package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js +3 -3
  124. package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js.map +1 -1
  125. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +4 -1
  126. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +2 -3
  127. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  128. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +12 -0
  129. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +63 -11
  130. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  131. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.spec.js +14 -0
  132. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.spec.js.map +1 -1
  133. package/dist/collection/components/ic-search-bar/ic-search-bar.js +3 -2
  134. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  135. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js +19 -0
  136. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js.map +1 -1
  137. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +4 -0
  138. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +30 -3
  139. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  140. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.e2e.js +20 -0
  141. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.e2e.js.map +1 -1
  142. package/dist/collection/components/ic-status-tag/ic-status-tag.css +4 -4
  143. package/dist/collection/components/ic-switch/ic-switch.css +1 -1
  144. package/dist/collection/components/ic-toast/ic-toast.css +2 -2
  145. package/dist/collection/components/ic-tooltip/ic-tooltip.css +9 -0
  146. package/dist/collection/components/ic-tooltip/ic-tooltip.js +108 -33
  147. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  148. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js +2 -0
  149. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js.map +1 -1
  150. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.spec.js +160 -1
  151. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.spec.js.map +1 -1
  152. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +1 -1
  153. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  154. package/dist/collection/components/ic-typography/ic-typography.css +21 -1
  155. package/dist/collection/components/ic-typography/ic-typography.js +81 -1
  156. package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
  157. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js +28 -0
  158. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js.map +1 -1
  159. package/dist/collection/utils/types.js.map +1 -1
  160. package/dist/components/close-icon.js +1 -1
  161. package/dist/components/helpers.js +16 -11
  162. package/dist/components/helpers.js.map +1 -1
  163. package/dist/components/ic-alert2.js +1 -1
  164. package/dist/components/ic-alert2.js.map +1 -1
  165. package/dist/components/ic-button2.js +20 -5
  166. package/dist/components/ic-button2.js.map +1 -1
  167. package/dist/components/ic-checkbox-group.js +3 -1
  168. package/dist/components/ic-checkbox-group.js.map +1 -1
  169. package/dist/components/ic-checkbox.js +9 -2
  170. package/dist/components/ic-checkbox.js.map +1 -1
  171. package/dist/components/ic-chip.js.map +1 -1
  172. package/dist/components/ic-dialog.js +1 -1
  173. package/dist/components/ic-dialog.js.map +1 -1
  174. package/dist/components/ic-empty-state.d.ts +11 -0
  175. package/dist/components/ic-empty-state.js +63 -0
  176. package/dist/components/ic-empty-state.js.map +1 -0
  177. package/dist/components/ic-footer.js +4 -1
  178. package/dist/components/ic-footer.js.map +1 -1
  179. package/dist/components/ic-input-validation2.js +1 -1
  180. package/dist/components/ic-input-validation2.js.map +1 -1
  181. package/dist/components/ic-navigation-button.js +2 -2
  182. package/dist/components/ic-navigation-button.js.map +1 -1
  183. package/dist/components/ic-navigation-group.js +29 -11
  184. package/dist/components/ic-navigation-group.js.map +1 -1
  185. package/dist/components/ic-navigation-item.js +3 -4
  186. package/dist/components/ic-navigation-item.js.map +1 -1
  187. package/dist/components/ic-popover-menu.js +64 -12
  188. package/dist/components/ic-popover-menu.js.map +1 -1
  189. package/dist/components/ic-search-bar.js +3 -2
  190. package/dist/components/ic-search-bar.js.map +1 -1
  191. package/dist/components/ic-side-navigation.js +15 -5
  192. package/dist/components/ic-side-navigation.js.map +1 -1
  193. package/dist/components/ic-status-tag.js +1 -1
  194. package/dist/components/ic-status-tag.js.map +1 -1
  195. package/dist/components/ic-switch.js +1 -1
  196. package/dist/components/ic-switch.js.map +1 -1
  197. package/dist/components/ic-toast.js +1 -1
  198. package/dist/components/ic-toast.js.map +1 -1
  199. package/dist/components/ic-tooltip2.js +109 -34
  200. package/dist/components/ic-tooltip2.js.map +1 -1
  201. package/dist/components/ic-top-navigation.js +1 -1
  202. package/dist/components/ic-top-navigation.js.map +1 -1
  203. package/dist/components/ic-typography2.js +14 -2
  204. package/dist/components/ic-typography2.js.map +1 -1
  205. package/dist/components/types.js.map +1 -1
  206. package/dist/core/core.css +26 -26
  207. package/dist/core/core.esm.js +1 -1
  208. package/dist/core/core.esm.js.map +1 -1
  209. package/dist/core/{p-b698b8ad.entry.js → p-07601b81.entry.js} +2 -2
  210. package/dist/core/{p-5c9c940f.entry.js → p-07877eb8.entry.js} +2 -2
  211. package/dist/core/p-103c761f.entry.js +2 -0
  212. package/dist/core/p-103c761f.entry.js.map +1 -0
  213. package/dist/core/{p-f923d11b.entry.js → p-14bea6c0.entry.js} +2 -2
  214. package/dist/core/p-14bea6c0.entry.js.map +1 -0
  215. package/dist/core/{p-f7695299.entry.js → p-1ac44a4e.entry.js} +2 -2
  216. package/dist/core/{p-ca6d834e.entry.js → p-1b1dbb53.entry.js} +2 -2
  217. package/dist/core/{p-1b9b8355.entry.js → p-20fafec4.entry.js} +2 -2
  218. package/dist/core/{p-5c846d0a.entry.js → p-24b88371.entry.js} +2 -2
  219. package/dist/core/{p-ce791694.entry.js → p-2f5a9d91.entry.js} +2 -2
  220. package/dist/core/{p-ce791694.entry.js.map → p-2f5a9d91.entry.js.map} +1 -1
  221. package/dist/core/{p-8991f656.entry.js → p-389c3913.entry.js} +2 -2
  222. package/dist/core/{p-9e551fe9.entry.js → p-43b529a5.entry.js} +2 -2
  223. package/dist/core/{p-9e551fe9.entry.js.map → p-43b529a5.entry.js.map} +1 -1
  224. package/dist/core/p-4dc6a83d.entry.js +2 -0
  225. package/dist/core/p-4dc6a83d.entry.js.map +1 -0
  226. package/dist/core/{p-adceb0cf.entry.js → p-4fa9c6eb.entry.js} +2 -2
  227. package/dist/core/p-4fa9c6eb.entry.js.map +1 -0
  228. package/dist/core/{p-a8b94619.entry.js → p-50019c47.entry.js} +2 -2
  229. package/dist/core/{p-d2215b72.entry.js → p-516fd246.entry.js} +2 -2
  230. package/dist/core/p-5e3a09d7.entry.js +2 -0
  231. package/dist/core/p-5e3a09d7.entry.js.map +1 -0
  232. package/dist/core/{p-cef93d12.entry.js → p-5e685037.entry.js} +2 -2
  233. package/dist/core/{p-0330cb21.entry.js → p-69c1f172.entry.js} +2 -2
  234. package/dist/core/p-6f57b13c.js.map +1 -1
  235. package/dist/core/{p-e0ee714a.entry.js → p-736489c6.entry.js} +2 -2
  236. package/dist/core/p-736489c6.entry.js.map +1 -0
  237. package/dist/core/{p-8c45ab61.entry.js → p-75ac2fbf.entry.js} +2 -2
  238. package/dist/core/{p-f665242d.entry.js → p-8acd7207.entry.js} +2 -2
  239. package/dist/core/{p-429e4d24.entry.js → p-919059e8.entry.js} +2 -2
  240. package/dist/core/{p-332690f0.entry.js → p-92868735.entry.js} +2 -2
  241. package/dist/core/{p-ee11e185.entry.js → p-93ee130d.entry.js} +2 -2
  242. package/dist/core/{p-ee11e185.entry.js.map → p-93ee130d.entry.js.map} +1 -1
  243. package/dist/core/{p-a588886f.entry.js → p-98d488aa.entry.js} +2 -2
  244. package/dist/core/{p-5144e840.entry.js → p-9bde930d.entry.js} +2 -2
  245. package/dist/core/{p-c5716cbc.entry.js → p-9e896463.entry.js} +2 -2
  246. package/dist/core/{p-7536dd31.entry.js → p-ab4919d6.entry.js} +2 -2
  247. package/dist/core/{p-83d5bcae.entry.js → p-adf65f4a.entry.js} +2 -2
  248. package/dist/core/p-adf65f4a.entry.js.map +1 -0
  249. package/dist/core/p-b5d084c2.entry.js +2 -0
  250. package/dist/core/p-b5d084c2.entry.js.map +1 -0
  251. package/dist/core/{p-26d5fd0f.entry.js → p-bbdd9770.entry.js} +2 -2
  252. package/dist/core/p-bbdd9770.entry.js.map +1 -0
  253. package/dist/core/p-c2fc2b77.entry.js +2 -0
  254. package/dist/core/p-c2fc2b77.entry.js.map +1 -0
  255. package/dist/core/{p-65750560.entry.js → p-c3da58eb.entry.js} +2 -2
  256. package/dist/core/p-c3da58eb.entry.js.map +1 -0
  257. package/dist/core/p-c4b81d32.entry.js +2 -0
  258. package/dist/core/p-c4b81d32.entry.js.map +1 -0
  259. package/dist/core/p-cfb87422.entry.js +2 -0
  260. package/dist/core/p-cfb87422.entry.js.map +1 -0
  261. package/dist/core/{p-cbbf4b05.entry.js → p-d2994a71.entry.js} +2 -2
  262. package/dist/core/p-d592006b.entry.js +2 -0
  263. package/dist/core/p-d592006b.entry.js.map +1 -0
  264. package/dist/core/{p-90d3a41b.entry.js → p-da3bd896.entry.js} +2 -2
  265. package/dist/core/{p-892d9d9f.entry.js → p-da5fc036.entry.js} +2 -2
  266. package/dist/core/p-da5fc036.entry.js.map +1 -0
  267. package/dist/core/p-dd980be4.js +2 -0
  268. package/dist/core/{p-5dd0b02e.js.map → p-dd980be4.js.map} +1 -1
  269. package/dist/core/{p-27d42378.entry.js → p-e14bc195.entry.js} +2 -2
  270. package/dist/core/p-e2fdb944.entry.js +2 -0
  271. package/dist/core/p-e2fdb944.entry.js.map +1 -0
  272. package/dist/core/{p-1959ec8d.entry.js → p-e328bd2d.entry.js} +2 -2
  273. package/dist/core/{p-c012b867.entry.js → p-e9c864ac.entry.js} +2 -2
  274. package/dist/core/p-f2c6a143.js +2 -0
  275. package/dist/core/{p-6840589f.entry.js → p-fb86da80.entry.js} +2 -2
  276. package/dist/core/{p-7ae091ef.entry.js → p-fbd3c432.entry.js} +2 -2
  277. package/dist/core/p-fbd3c432.entry.js.map +1 -0
  278. package/dist/esm/{close-icon-2f02b42a.js → close-icon-2ce5d375.js} +2 -2
  279. package/dist/esm/close-icon-2ce5d375.js.map +1 -0
  280. package/dist/esm/core.js +1 -1
  281. package/dist/esm/{helpers-85903813.js → helpers-d7d5bd08.js} +18 -13
  282. package/dist/esm/helpers-d7d5bd08.js.map +1 -0
  283. package/dist/esm/ic-alert.entry.js +3 -3
  284. package/dist/esm/ic-alert.entry.js.map +1 -1
  285. package/dist/esm/ic-back-to-top.entry.js +1 -1
  286. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  287. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  288. package/dist/esm/ic-button_3.entry.js +128 -38
  289. package/dist/esm/ic-button_3.entry.js.map +1 -1
  290. package/dist/esm/ic-card.entry.js +1 -1
  291. package/dist/esm/ic-checkbox-group.entry.js +3 -2
  292. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  293. package/dist/esm/ic-checkbox.entry.js +9 -3
  294. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  295. package/dist/esm/ic-chip.entry.js +1 -1
  296. package/dist/esm/ic-chip.entry.js.map +1 -1
  297. package/dist/esm/ic-data-row.entry.js +1 -1
  298. package/dist/esm/ic-dialog.entry.js +3 -3
  299. package/dist/esm/ic-dialog.entry.js.map +1 -1
  300. package/dist/esm/ic-divider.entry.js +1 -1
  301. package/dist/esm/ic-empty-state.entry.js +33 -0
  302. package/dist/esm/ic-empty-state.entry.js.map +1 -0
  303. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  304. package/dist/esm/ic-footer-link.entry.js +1 -1
  305. package/dist/esm/ic-footer.entry.js +5 -2
  306. package/dist/esm/ic-footer.entry.js.map +1 -1
  307. package/dist/esm/ic-hero.entry.js +1 -1
  308. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  309. package/dist/esm/ic-input-component-container_3.entry.js +1 -1
  310. package/dist/esm/ic-input-label_2.entry.js +2 -2
  311. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  312. package/dist/esm/ic-link.entry.js +1 -1
  313. package/dist/esm/ic-menu-item.entry.js +1 -1
  314. package/dist/esm/ic-navigation-button.entry.js +3 -3
  315. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  316. package/dist/esm/ic-navigation-group.entry.js +30 -12
  317. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  318. package/dist/esm/ic-navigation-item.entry.js +4 -5
  319. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  320. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  321. package/dist/esm/ic-page-header.entry.js +1 -1
  322. package/dist/esm/ic-pagination-item.entry.js +1 -1
  323. package/dist/esm/ic-pagination.entry.js +1 -1
  324. package/dist/esm/ic-popover-menu.entry.js +65 -13
  325. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  326. package/dist/esm/ic-radio-group.entry.js +1 -1
  327. package/dist/esm/ic-radio-option.entry.js +1 -1
  328. package/dist/esm/ic-search-bar.entry.js +4 -3
  329. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  330. package/dist/esm/ic-select.entry.js +1 -1
  331. package/dist/esm/ic-side-navigation.entry.js +15 -6
  332. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  333. package/dist/esm/ic-status-tag.entry.js +2 -2
  334. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  335. package/dist/esm/ic-stepper.entry.js +1 -1
  336. package/dist/esm/ic-switch.entry.js +2 -2
  337. package/dist/esm/ic-switch.entry.js.map +1 -1
  338. package/dist/esm/ic-tab-group.entry.js +1 -1
  339. package/dist/esm/ic-tab.entry.js +1 -1
  340. package/dist/esm/ic-text-field.entry.js +1 -1
  341. package/dist/esm/ic-theme.entry.js +1 -1
  342. package/dist/esm/ic-toast.entry.js +3 -3
  343. package/dist/esm/ic-toast.entry.js.map +1 -1
  344. package/dist/esm/ic-top-navigation.entry.js +2 -2
  345. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  346. package/dist/esm/ic-typography.entry.js +11 -3
  347. package/dist/esm/ic-typography.entry.js.map +1 -1
  348. package/dist/esm/index-fd30b77e.js +4 -0
  349. package/dist/esm/loader.js +1 -1
  350. package/dist/esm/types-dd515332.js.map +1 -1
  351. package/dist/types/components/ic-alert/ic-alert.d.ts +1 -1
  352. package/dist/types/components/ic-button/ic-button.d.ts +8 -4
  353. package/dist/types/components/ic-button/ic-button.types.d.ts +0 -1
  354. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +6 -2
  355. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +6 -2
  356. package/dist/types/components/ic-chip/ic-chip.d.ts +3 -2
  357. package/dist/types/components/ic-chip/ic-chip.types.d.ts +0 -1
  358. package/dist/types/components/ic-empty-state/ic-empty-state.d.ts +35 -0
  359. package/dist/types/components/ic-empty-state/ic-empty-state.types.d.ts +1 -0
  360. package/dist/types/components/ic-empty-state/test/a11y/ic-empty-state.test.a11y.d.ts +1 -0
  361. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +4 -0
  362. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +3 -0
  363. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +5 -0
  364. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +5 -0
  365. package/dist/types/components/ic-typography/ic-typography.d.ts +17 -0
  366. package/dist/types/components.d.ts +135 -16
  367. package/dist/types/utils/types.d.ts +1 -0
  368. package/hydrate/index.js +346 -99
  369. package/package.json +4 -5
  370. package/dist/cjs/close-icon-8ccb0163.js.map +0 -1
  371. package/dist/cjs/helpers-eb53c416.js.map +0 -1
  372. package/dist/core/p-03d1a4a1.entry.js +0 -2
  373. package/dist/core/p-03d1a4a1.entry.js.map +0 -1
  374. package/dist/core/p-26d5fd0f.entry.js.map +0 -1
  375. package/dist/core/p-39adc795.entry.js +0 -2
  376. package/dist/core/p-39adc795.entry.js.map +0 -1
  377. package/dist/core/p-44512ebe.js +0 -2
  378. package/dist/core/p-48301eff.entry.js +0 -2
  379. package/dist/core/p-48301eff.entry.js.map +0 -1
  380. package/dist/core/p-5dd0b02e.js +0 -2
  381. package/dist/core/p-65750560.entry.js.map +0 -1
  382. package/dist/core/p-7ae091ef.entry.js.map +0 -1
  383. package/dist/core/p-7c46caf2.entry.js +0 -2
  384. package/dist/core/p-7c46caf2.entry.js.map +0 -1
  385. package/dist/core/p-83d5bcae.entry.js.map +0 -1
  386. package/dist/core/p-892d9d9f.entry.js.map +0 -1
  387. package/dist/core/p-96b71172.entry.js +0 -2
  388. package/dist/core/p-96b71172.entry.js.map +0 -1
  389. package/dist/core/p-adceb0cf.entry.js.map +0 -1
  390. package/dist/core/p-b6c538ea.entry.js +0 -2
  391. package/dist/core/p-b6c538ea.entry.js.map +0 -1
  392. package/dist/core/p-e0ee714a.entry.js.map +0 -1
  393. package/dist/core/p-e6370b7e.entry.js +0 -2
  394. package/dist/core/p-e6370b7e.entry.js.map +0 -1
  395. package/dist/core/p-f24814b8.entry.js +0 -2
  396. package/dist/core/p-f24814b8.entry.js.map +0 -1
  397. package/dist/core/p-f923d11b.entry.js.map +0 -1
  398. package/dist/esm/close-icon-2f02b42a.js.map +0 -1
  399. package/dist/esm/helpers-85903813.js.map +0 -1
  400. /package/dist/core/{p-b698b8ad.entry.js.map → p-07601b81.entry.js.map} +0 -0
  401. /package/dist/core/{p-5c9c940f.entry.js.map → p-07877eb8.entry.js.map} +0 -0
  402. /package/dist/core/{p-f7695299.entry.js.map → p-1ac44a4e.entry.js.map} +0 -0
  403. /package/dist/core/{p-ca6d834e.entry.js.map → p-1b1dbb53.entry.js.map} +0 -0
  404. /package/dist/core/{p-1b9b8355.entry.js.map → p-20fafec4.entry.js.map} +0 -0
  405. /package/dist/core/{p-5c846d0a.entry.js.map → p-24b88371.entry.js.map} +0 -0
  406. /package/dist/core/{p-8991f656.entry.js.map → p-389c3913.entry.js.map} +0 -0
  407. /package/dist/core/{p-a8b94619.entry.js.map → p-50019c47.entry.js.map} +0 -0
  408. /package/dist/core/{p-d2215b72.entry.js.map → p-516fd246.entry.js.map} +0 -0
  409. /package/dist/core/{p-cef93d12.entry.js.map → p-5e685037.entry.js.map} +0 -0
  410. /package/dist/core/{p-0330cb21.entry.js.map → p-69c1f172.entry.js.map} +0 -0
  411. /package/dist/core/{p-8c45ab61.entry.js.map → p-75ac2fbf.entry.js.map} +0 -0
  412. /package/dist/core/{p-f665242d.entry.js.map → p-8acd7207.entry.js.map} +0 -0
  413. /package/dist/core/{p-429e4d24.entry.js.map → p-919059e8.entry.js.map} +0 -0
  414. /package/dist/core/{p-332690f0.entry.js.map → p-92868735.entry.js.map} +0 -0
  415. /package/dist/core/{p-a588886f.entry.js.map → p-98d488aa.entry.js.map} +0 -0
  416. /package/dist/core/{p-5144e840.entry.js.map → p-9bde930d.entry.js.map} +0 -0
  417. /package/dist/core/{p-c5716cbc.entry.js.map → p-9e896463.entry.js.map} +0 -0
  418. /package/dist/core/{p-7536dd31.entry.js.map → p-ab4919d6.entry.js.map} +0 -0
  419. /package/dist/core/{p-cbbf4b05.entry.js.map → p-d2994a71.entry.js.map} +0 -0
  420. /package/dist/core/{p-90d3a41b.entry.js.map → p-da3bd896.entry.js.map} +0 -0
  421. /package/dist/core/{p-27d42378.entry.js.map → p-e14bc195.entry.js.map} +0 -0
  422. /package/dist/core/{p-1959ec8d.entry.js.map → p-e328bd2d.entry.js.map} +0 -0
  423. /package/dist/core/{p-c012b867.entry.js.map → p-e9c864ac.entry.js.map} +0 -0
  424. /package/dist/core/{p-44512ebe.js.map → p-f2c6a143.js.map} +0 -0
  425. /package/dist/core/{p-6840589f.entry.js.map → p-fb86da80.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"ic-navigation-item.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,w3kBAAw3kB;;MCqCv4kB,cAAc;;;;;IAEjB,oBAAe,GAAY,IAAI,CAAC;IAoJhC,iCAA4B,GAAG,CACrC,IAAY,EACZ,QAAgB,EAChB,MAAc,EACd,GAAW,EACX,cAA8B,EAC9B,QAA0B,EAC1B,KAAa;MAEb,MAAM,OAAO,GACX,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;MACjE,MAAM,SAAS,GAAG,4BAA4B,CAAC;MAC/C,MAAM,oBAAoB,GAAG,IAAI,CAAC,UAAU,KAC1CA,iBAAK,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,SAAS,EAAEC,mBAAW,GAAQ,CAC1D,CAAC;MACF,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,KAC1DD,iBAAK,KAAK,EAAC,MAAM,IACd,GAAG,EACJA,kBAAM,IAAI,EAAC,MAAM,GAAQ,EAAC,GAAG,CACzB,CACP,CAAC;MAEF,IAAI,IAAI,KAAK,EAAE,EAAE;QACf,QACEA,eACE,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAA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I,CAAC,eAAe,IAAI,IAAI,CAAC,wBAAwB;UACvD,IAAI,CAAC,cAAc,KAAK,MAAM;QAChC,CAAC,sDAAsD,GACrD,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,uCAAuC,CAAC;OAChE,IAEA,cAAc,IACbA,kBAAM,IAAI,EAAC,iBAAiB,GAAQ,KAEpC,IAAI,CAAC,4BAA4B,CAC/B,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,GAAG,EACH,cAAc,EACd,QAAQ,EACR,KAAK,CACN,CACF,CACU,CACR,EACP;GACH;;;;;;;;","names":["h","chevronIcon","OpenInNew","DEVICE_SIZES","getThemeForegroundColor","getNavItemParentDetails","getParentElementType","getCurrentDeviceSize","Host"],"sources":["./src/components/ic-navigation-item/ic-navigation-item.css?tag=ic-navigation-item&encapsulation=shadow","./src/components/ic-navigation-item/ic-navigation-item.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-navigation-item: z-index of navigation item\n */\n\n:host {\n display: block;\n}\n\n:host(:focus-within) {\n z-index: var(--ic-z-index-navigation-item);\n}\n\n/* chevron */\nsvg {\n width: var(--ic-space-xl);\n fill: var(--ic-theme-text);\n}\n\n.svg {\n margin-left: auto;\n}\n\n:host(.expandable.navigation-item) .link,\n:host(.expandable.navigation-item) ::slotted(a) {\n padding-right: 0;\n}\n\n:host(.navigation-item) .link,\n:host(.navigation-item) ::slotted(a) {\n height: calc(100% - var(--ic-space-xxs));\n width: fit-content;\n color: var(--ic-theme-text);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 var(--ic-space-md) var(--ic-space-xxs);\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n white-space: nowrap;\n}\n\n:host(.navigation-item) ::slotted(a) {\n height: 100%;\n font: var(--ic-font-label) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt025) !important;\n padding: 0 var(--ic-space-md) !important;\n}\n\n:host(.navigation-item-selected) .link::after,\n:host(.navigation-item-selected) ::slotted(a.active)::after,\n:host(.navigation-item-top-nav) ::slotted(a.active)::after {\n content: \"\";\n height: 0.25rem;\n width: 100%;\n position: absolute;\n bottom: 0;\n background-color: var(--ic-theme-text);\n}\n\n:host(.navigation-item-selected.navigation-item-page-header)\n ::slotted(a.active)::after,\n:host(.navigation-item-selected.navigation-item-page-header) .link::after,\n:host(.navigation-item.navigation-item-page-header) ::slotted(a.active)::after,\n:host(.navigation-item-top-nav-child) ::slotted(a.active)::after {\n content: none;\n}\n\n:host(.navigation-item-side-menu-selected) .link,\n:host(.navigation-item-side-menu) ::slotted(a.active),\n:host(.navigation-item-top-nav-child) ::slotted(a.active) {\n box-shadow: none;\n}\n\n:host(.navigation-item) .link:hover:not(:focus) {\n background-color: var(--ic-theme-hover);\n cursor: pointer;\n}\n\n:host(.navigation-item:not(.navigation-item-page-header, .navigation-item-side-menu))\n ::slotted(a:hover:not(:focus)) {\n background-color: var(--ic-theme-hover) !important;\n}\n\n:host(.navigation-item:not(.navigation-item-top-nav-child, .navigation-item-side-menu, .navigation-item-top-nav-child-selected\n .navigation-item-side-menu-selected))\n .focus-indicator:focus-within {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.navigation-item) .link:focus,\n:host(.navigation-item) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.navigation-item-selected) .link:focus,\n:host(.navigation-item) ::slotted(a.active:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.navigation-item-selected.dark) .link:focus,\n:host(.navigation-item.dark) ::slotted(a.active:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.navigation-item) .link:active:not(:focus),\n:host(.navigation-item) ::slotted(a:active:not(:focus)) {\n background-color: var(--ic-theme-active);\n}\n\n:host(.navigation-item-side-menu) .link,\n:host(.navigation-item-side-menu) ::slotted(a) {\n height: 2.5rem;\n width: 100%;\n box-sizing: border-box;\n color: var(--ic-color-primary-text);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n text-decoration: none;\n transition: box-shadow var(--ic-transition-duration-fast),\n border-radius var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-side-menu) ::slotted(a) {\n font: var(--ic-font-body) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt005) !important;\n transition: box-shadow var(--ic-easing-transition-fast),\n background-color var(--ic-easing-transition-fast);\n}\n\n:host(.navigation-item-side-menu) .link:hover:not(:focus) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n:host(.navigation-item-side-menu) ::slotted(a:hover:not(:focus)) {\n background-color: var(--ic-action-dark-bg-hover) !important;\n}\n\n:host(.navigation-item-side-menu) .focus-indicator:focus-within {\n box-shadow: none;\n}\n\n:host(.navigation-item-side-menu) .link:focus,\n:host(.navigation-item-side-menu) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-inset) !important;\n padding-right: var(--ic-space-lg);\n width: auto;\n border-radius: var(--ic-border-radius-inset) !important;\n}\n\n:host(.navigation-item-side-menu-selected) .link,\n:host(.navigation-item-side-menu-selected) ::slotted(a) {\n transition: box-shadow var(--ic-easing-transition-slow),\n background-color var(--ic-easing-transition-slow);\n}\n\n:host(.navigation-item-side-menu-selected) .link:focus,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus),\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus) {\n margin-left: var(--ic-space-xs) !important;\n padding-left: var(--ic-space-xs) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link,\n:host(.navigation-item-top-nav-child) ::slotted(a) {\n height: 2.5rem;\n width: fit-content;\n min-width: 9.063rem;\n color: var(--ic-color-primary-text);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding: 0 var(--ic-space-md) !important;\n text-decoration: none;\n position: relative;\n transition: box-shadow var(--ic-transition-duration-fast),\n border-radius var(--ic-transition-duration-slow);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a) {\n font: var(--ic-font-body) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt005) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link:hover:not(:focus) {\n background-color: var(--ic-action-dark-bg-hover) !important;\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a:hover):not(:focus) {\n background-color: var(--ic-action-dark-bg-hover) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link:focus,\n:host(.navigation-item-top-nav-child) ::slotted(a:focus) {\n z-index: 1;\n outline: var(--ic-hc-focus-outline);\n border-radius: var(--ic-border-radius-inset);\n box-shadow: var(--ic-border-focus-inset);\n transition: border-radius 0s, box-shadow var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n}\n\n:host(.navigation-item-side-menu) .link:active:not(:focus) {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.navigation-item-top-nav-child) .link:active:not(:focus),\n:host(.navigation-item-top-nav-child) ::slotted(a:active):not(:focus) {\n outline: var(--ic-hc-focus-outline);\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a:active):not(:focus),\n:host(.navigation-item-side-menu) ::slotted(a:active):not(:focus) {\n background-color: var(--ic-action-dark-bg-active) !important;\n}\n\n:host(.navigation-item-side-menu-selected) *,\n:host(.navigation-item-top-nav-child-selected) *,\n:host(.navigation-item-side-menu) ::slotted(a.active),\n:host(.navigation-item-top-nav-child) ::slotted(a.active) {\n font-weight: 700 !important;\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a.active)::before,\n:host(.navigation-item-top-nav-child-selected) .link::before,\n:host(.navigation-item-side-menu-selected) .link::before,\n:host(.navigation-item-side-menu) ::slotted(a.active)::before,\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before {\n content: \"\";\n position: absolute;\n left: 0;\n width: var(--ic-space-xs);\n height: 2.5rem;\n margin-top: 0.25rem;\n margin-right: 0.313rem;\n background-color: var(--ic-action-default);\n transition: left 0s;\n}\n\n:host(.navigation-item-top-nav-child-selected) .link:focus {\n margin-left: var(--ic-space-xs);\n margin-right: calc(-1 * var(--ic-space-xs));\n padding-left: var(--ic-space-xs) !important;\n}\n\n:host(.navigation-item-top-nav-child-selected) .link:focus::before {\n left: calc(-1 * var(--ic-space-xs));\n z-index: 1;\n}\n\n:host(.navigation-item-side-menu-selected) .link::before,\n:host(.navigation-item-side-menu) ::slotted(a.active)::before,\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before {\n z-index: 1;\n}\n\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before,\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus)::before {\n left: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.navigation-item-side-menu-selected) .link::after {\n display: none;\n}\n\n:host(.navigation-item-side-nav-collapsed) .link {\n height: 100%;\n}\n\n:host(.navigation-item-side-nav-collapsed) ::slotted(svg),\n:host(.navigation-item-side-nav-collapsed-with-label) ::slotted(svg) {\n margin: auto;\n pointer-events: none;\n}\n\n:host(.navigation-item-side-nav-collapsed) .icon,\n:host(.navigation-item-side-nav-collapsed-with-label) .icon,\n:host(.navigation-item-side-nav-collapsed-with-label) ic-typography {\n align-items: center;\n padding: 0;\n margin: auto 0;\n width: fit-content;\n pointer-events: none;\n}\n\n:host(.navigation-item-side-nav-collapsed-with-label) ic-typography {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n text-align: center;\n}\n\n:host(.navigation-item-side-nav-collapsed-with-label) .link,\n:host(.navigation-item-side-nav-collapsed-with-label) ::slotted(a) {\n display: flex;\n flex-direction: column;\n height: fit-content;\n padding: var(--ic-space-xs) !important;\n gap: var(--ic-space-xxs);\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link,\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n height: auto !important;\n gap: 0;\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n display: block;\n text-align: center;\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link\n ic-typography {\n opacity: 1;\n}\n\n:host(.navigation-item-side-nav-collapsed) svg,\n:host(.navigation-item-side-nav-collapsed-with-label) svg {\n display: none;\n}\n\n::slotted(svg) {\n fill: var(--ic-theme-text);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n}\n\n.icon {\n height: var(--ic-space-lg);\n width: var(--ic-space-xxl);\n margin-left: calc(-1 * var(--ic-space-md));\n flex: 0 1 0%;\n}\n\n.icon > ::slotted(*) {\n margin-left: var(--ic-space-md) !important;\n}\n\n:host(.navigation-item-side-nav-collapsed) .icon > ::slotted(*) {\n margin: auto !important;\n}\n\n:host(.navigation-item-side-nav) .link,\n:host(.navigation-item-side-nav) ::slotted(a) {\n height: var(--navigation-item-height);\n width: var(--navigation-item-width);\n justify-content: var(--navigation-item-justify-content);\n display: flex;\n gap: var(--ic-space-xs);\n box-sizing: border-box;\n color: var(--navigation-item-child-color) !important;\n text-decoration: none !important;\n white-space: nowrap;\n padding: 0 var(--ic-space-md);\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) ::slotted(a) {\n height: var(--navigation-item-child-height);\n width: var(--navigation-group-width);\n color: var(--navigation-item-child-color) !important;\n display: flex;\n gap: 0.625rem;\n box-sizing: border-box;\n min-width: 0;\n transition: box-shadow var(--ic-easing-transition-fast);\n text-decoration: none !important;\n white-space: nowrap;\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link:focus,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-dark);\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-menu) .link:active {\n background-color: var(--navigation-item-child-active);\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link:active,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n ::slotted(a:active) {\n background-color: var(--navigation-item-child-active);\n}\n\n:host(.navigation-item-side-nav) a.link ic-typography,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n a.link\n ic-typography,\n:host(.navigation-item-side-nav) div.link ic-typography,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n div.link\n ic-typography,\n.navigation-item-side-nav-slotted-text {\n opacity: var(--navigation-item-label-opacity);\n transition: opacity var(--ic-easing-transition-slow);\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link,\n:host(.navigation-item-side-nav.navigation-item) ::slotted(a.active) {\n box-shadow: inset 0.313rem 0 0 var(--ic-theme-text);\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link::before,\n:host(.navigation-item-side-nav) ::slotted(a.active)::before {\n content: \"\";\n display: block;\n position: absolute;\n inset: 0 0 0 0.313rem;\n border-radius: 0.688rem !important;\n transition: var(--ic-easing-transition-slow);\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link:focus::before,\n:host(.navigation-item-side-nav) ::slotted(a.active:focus)::before {\n box-shadow: var(--ic-border-focus-inset);\n}\n\n:host(:not(.navigation-item-side-nav-collapsed).navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link {\n opacity: var(--navigation-item-label-opacity);\n height: auto;\n}\n\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n .link,\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n min-width: var(--navigation-group-item-min-width);\n padding: var(--ic-space-xs) !important;\n height: auto;\n gap: 0;\n}\n\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n display: block;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link::after,\n:host(.navigation-item-side-nav) ::slotted(a.active)::after {\n display: none;\n}\n\n:host(.navigation-item-side-nav.navigation-item) .link:focus,\n:host(.navigation-item-side-nav.navigation-item) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n background-color: transparent;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link:focus,\n:host(.navigation-item-side-nav) ::slotted(a.active:focus) {\n margin: 0 auto;\n box-shadow: inset 0.313rem 0 0 var(--ic-theme-text);\n border-radius: 0;\n}\n\n:host(.navigation-item-side-nav.navigation-item) .link:hover:not(:focus) {\n background-color: var(--ic-theme-hover) !important;\n}\n\n:host(.navigation-item-page-header).link,\n:host(.navigation-item-page-header) a,\n:host(.navigation-item-page-header) ::slotted(a) {\n height: 2.5rem !important;\n color: var(--ic-color-primary-text) !important;\n transition: all var(--ic-easing-transition-fast) !important;\n box-shadow: rgba(23 89 188 / 0%) !important;\n}\n\n:host(.navigation-item-page-header.navigation-item-selected) .link::after,\n:host(.navigation-item-page-header) ::slotted(a.active)::after {\n content: \" \" !important;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: var(--ic-space-xxs);\n background-color: var(--ic-action-default) !important;\n}\n\n:host(.navigation-item-page-header) .link:hover,\n:host(.navigation-item-page-header) ::slotted(.link:hover),\n:host(.navigation-item-page-header) ::slotted(a:hover),\n:host(.navigation-item-page-header) .link:hover:not(:focus) {\n background-color: var(--ic-action-default-bg-hover) !important;\n cursor: pointer;\n}\n\n:host(.navigation-item-page-header) .link:focus,\n:host(.navigation-item-page-header) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus);\n}\n\n:host(.navigation-item-page-header) .link:active,\n:host(.navigation-item-page-header) ::slotted(a:active) {\n background-color: var(--ic-action-default-bg-active) !important;\n}\n\n:host(.navigation-item-page-header.navigation-item-selected) .link:focus::after,\n:host(.navigation-item-page-header) ::slotted(a.active:focus)::after {\n border-bottom-left-radius: var(--ic-border-radius);\n border-bottom-right-radius: var(--ic-border-radius);\n}\n\n:host(.navigation-item-page-header.navigation-item-selected.with-transition)\n .link,\n:host(.navigation-item-page-header.navigation-item-selected.with-transition)\n ::slotted(a.active) {\n transition: all var(--ic-easing-transition-fast),\n border-color var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-page-header) ::slotted(a.active)::before,\n:host(.navigation-item-page-header) ::slotted(a.active:focus)::before,\n:host(.navigation-item-page-header.navigation-item-selected)\n .link:focus::before {\n display: none;\n}\n\n.open-in-new-icon {\n flex: 1;\n}\n\n.open-in-new-icon svg {\n margin-top: var(--ic-space-xxs);\n padding-left: var(--ic-space-xxs);\n}\n\n:host(.navigation-item-side-nav) .open-in-new-icon {\n margin-left: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.navigation-item-top-nav) .open-in-new-icon svg,\n:host(.navigation-item-page-header) .open-in-new-icon svg,\n:host(.navigation-item-side-nav) .open-in-new-icon svg {\n height: 0.875rem;\n width: 0.875rem;\n}\n\n:host(.navigation-item-side-menu) .open-in-new-icon svg,\n:host(.navigation-item-top-nav-child) .open-in-new-icon svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n:host(.navigation-item-page-header) .open-in-new-icon svg,\n:host(.navigation-item-top-nav-child) .open-in-new-icon svg,\n:host(.navigation-item-side-menu) .open-in-new-icon svg {\n fill: var(--ic-color-primary-text);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n h,\n Host,\n Prop,\n State,\n} from \"@stencil/core\";\n\nimport {\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getThemeForegroundColor,\n getParentElementType,\n getNavItemParentDetails,\n} from \"../../utils/helpers\";\nimport { IcNavType, IcTheme } from \"../../utils/types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\nimport OpenInNew from \"../../assets/OpenInNew.svg\";\n\n/**\n * @part link - The `<a>` within ic-navigation-item\n */\n\n@Component({\n tag: \"ic-navigation-item\",\n styleUrl: \"ic-navigation-item.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class NavigationItem {\n private navigationSlot: HTMLElement;\n private isInitialRender: boolean = true;\n private itemEl: HTMLElement;\n\n @Element() el: HTMLIcNavigationItemElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() focusStyle = getThemeForegroundColor();\n @State() inTopNavSideMenu: boolean = false;\n @State() isSideNavMobile: boolean = false;\n @State() isTopNavChild: boolean = false;\n @State() navigationType: IcNavType | \"\";\n @State() parentEl: HTMLElement;\n @State() sideNavExpanded: boolean = false;\n\n /**\n * @internal If `true`, the icon and label will be displayed when side navigation is collapsed.\n */\n @Prop() collapsedIconLabel: boolean = false;\n\n /**\n * @internal If `true`, the navigation item will be displayed within a tooltip.\n */\n @Prop() displayNavigationTooltip: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * @internal If `true`, the navigation item will be expandable.\n */\n @Prop() expandable: boolean = false;\n\n /**\n * The destination of the navigation item.\n */\n @Prop() href: string = \"\";\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * The label of the navigation item.\n */\n @Prop() label: string;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * If `true`, the navigation item will be set in a selected state.\n */\n @Prop() selected: boolean = false;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * @internal - Emitted when item loses focus.\n */\n @Event() childBlur: EventEmitter<void>;\n\n /**\n * @internal - Emitted when navigation item clicked.\n */\n @Event() navItemClicked: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.navigationType === \"side\") {\n this.parentEl.removeEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.removeEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n }\n\n componentWillLoad(): void {\n const navParentDetails = getNavItemParentDetails(this.el);\n this.navigationType = navParentDetails.navType;\n this.parentEl = navParentDetails.parent;\n\n if (this.navigationType === \"side\") {\n this.parentEl.addEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.addEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n\n if (\n getParentElementType(this.el) === \"IC-NAVIGATION-GROUP\" &&\n this.navigationType === \"top\"\n ) {\n this.isTopNavChild = true;\n }\n\n this.deviceSize = getCurrentDeviceSize();\n if (this.deviceSize <= DEVICE_SIZES.L && this.navigationType === \"top\") {\n this.inTopNavSideMenu = true;\n }\n\n this.navigationSlot = this.el.querySelector('[slot=\"navigation-item\"]');\n if (this.navigationSlot) {\n this.navigationSlot.ariaLabel = this.navigationSlot.textContent.trim();\n }\n }\n\n componentDidUpdate(): void {\n this.isInitialRender = false;\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.focusStyle = theme.mode;\n }\n\n /**\n * Sets focus on the nav item.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.itemEl) {\n this.itemEl.focus();\n }\n }\n\n private displayDefaultNavigationItem = (\n href: string,\n hreflang: string,\n target: string,\n rel: string,\n referrerpolicy: ReferrerPolicy,\n download: string | boolean,\n label: string\n ): HTMLElement => {\n const variant =\n this.isTopNavChild || this.inTopNavSideMenu ? \"body\" : \"label\";\n const tooltipId = \"ic-tooltip-navigation-item\";\n const ChevronIconComponent = this.expandable && (\n <div class={{ svg: true }} innerHTML={chevronIcon}></div>\n );\n const IconComponent = this.el.querySelector('[slot=\"icon\"]') && (\n <div class=\"icon\">\n {\" \"}\n <slot name=\"icon\"></slot>{\" \"}\n </div>\n );\n\n if (href !== \"\") {\n return (\n <a\n href={href}\n target={target}\n rel={rel}\n hreflang={hreflang}\n referrerPolicy={referrerpolicy}\n download={download !== false ? download : null}\n class=\"link\"\n ref={(el) => (this.itemEl = el)}\n part=\"link\"\n aria-labelledby={tooltipId}\n >\n {IconComponent}\n\n <ic-typography variant={variant}>{label}</ic-typography>\n {ChevronIconComponent}\n {target === \"_blank\" && (\n <span class=\"open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n );\n }\n\n return (\n <div\n tabindex=\"0\"\n class=\"link\"\n ref={(el) => (this.itemEl = el)}\n aria-labelledby={tooltipId}\n >\n {IconComponent}\n <ic-typography variant={variant}>{label}</ic-typography>\n {ChevronIconComponent}\n </div>\n );\n };\n\n private topNavResizedHandler = (ev: CustomEvent): void => {\n const newSize = ev.detail.size;\n if (newSize !== this.deviceSize) {\n this.deviceSize = newSize;\n this.inTopNavSideMenu = newSize <= DEVICE_SIZES.L;\n }\n };\n\n private sideNavExpandHandler = (ev: CustomEvent): void => {\n const { sideNavExpanded, sideNavMobile } = ev.detail;\n this.sideNavExpanded = sideNavExpanded;\n this.isSideNavMobile = sideNavMobile;\n };\n\n private handleBlur = (ev: FocusEvent) => {\n if (ev.relatedTarget !== null) {\n const target = ev.relatedTarget as HTMLElement;\n if (target.tagName === \"IC-NAVIGATION-ITEM\") {\n return;\n }\n }\n this.childBlur.emit();\n };\n\n private handleClick = () => {\n this.navItemClicked.emit();\n };\n\n render() {\n const {\n href,\n hreflang,\n target,\n rel,\n referrerpolicy,\n download,\n label,\n inTopNavSideMenu,\n isTopNavChild,\n selected,\n navigationSlot,\n } = this;\n\n return (\n <Host\n class={{\n [\"navigation-item\"]: true,\n [\"navigation-item-top-nav\"]:\n !inTopNavSideMenu && this.navigationType === \"top\",\n [\"navigation-item-top-nav-child-selected\"]:\n isTopNavChild && !inTopNavSideMenu && selected,\n [this.focusStyle]:\n (!inTopNavSideMenu && !isTopNavChild) ||\n (this.navigationType === \"side\" && isTopNavChild),\n [\"navigation-item-selected\"]: !isTopNavChild && selected,\n [\"navigation-item-side-menu\"]: inTopNavSideMenu,\n [\"navigation-item-side-menu-selected\"]: inTopNavSideMenu && selected,\n [\"navigation-item-top-nav-child\"]: isTopNavChild && !inTopNavSideMenu,\n [\"navigation-item-page-header\"]:\n this.navigationType === \"page-header\",\n [\"with-transition\"]: !this.isInitialRender,\n [\"navigation-item-side-nav\"]: this.navigationType === \"side\",\n [\"navigation-item-side-nav-collapsed\"]:\n (!this.sideNavExpanded || this.displayNavigationTooltip) &&\n this.navigationType === \"side\",\n [\"navigation-item-side-nav-collapsed-with-label\"]:\n !this.sideNavExpanded &&\n this.navigationType === \"side\" &&\n this.collapsedIconLabel &&\n !this.isSideNavMobile,\n [\"expandable\"]: this.expandable,\n }}\n onBlur={isTopNavChild && !inTopNavSideMenu ? this.handleBlur : null}\n onClick={this.handleClick}\n aria-current={selected ? \"page\" : null}\n role=\"listitem\"\n >\n {/* Tooltip enabled by applying navigation-item-side-nav-collapsed class to host */}\n <ic-tooltip\n label={label || navigationSlot.textContent}\n target=\"navigation-item\"\n placement=\"right\"\n class={{\n [\"tooltip-navigation-item\"]: true,\n [\"tooltip-navigation-item-side-nav-collapsed\"]:\n (!this.sideNavExpanded || this.displayNavigationTooltip) &&\n this.navigationType === \"side\",\n [\"tooltip-long-label-navigation-item-side-nav-expanded\"]:\n this.el.hasAttribute(\"[display-navigation-tooltip = 'true']\"),\n }}\n >\n {navigationSlot ? (\n <slot name=\"navigation-item\"></slot>\n ) : (\n this.displayDefaultNavigationItem(\n href,\n hreflang,\n target,\n rel,\n referrerpolicy,\n download,\n label\n )\n )}\n </ic-tooltip>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":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Details","getParentElementType","getCurrentDeviceSize","Host"],"sources":["./src/components/ic-navigation-item/ic-navigation-item.css?tag=ic-navigation-item&encapsulation=shadow","./src/components/ic-navigation-item/ic-navigation-item.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-navigation-item: z-index of navigation item\n */\n\n:host {\n display: block;\n}\n\n:host(:focus-within) {\n z-index: var(--ic-z-index-navigation-item);\n}\n\n/* chevron */\nsvg {\n width: var(--ic-space-xl);\n fill: var(--ic-theme-text);\n}\n\n.svg {\n margin-left: auto;\n}\n\n:host(.expandable.navigation-item) .link,\n:host(.expandable.navigation-item) ::slotted(a) {\n padding-right: 0;\n}\n\n:host(.navigation-item) .link,\n:host(.navigation-item) ::slotted(a) {\n height: calc(100% - var(--ic-space-xxs));\n width: fit-content;\n color: var(--ic-theme-text);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 var(--ic-space-md) var(--ic-space-xxs);\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n white-space: nowrap;\n}\n\n:host(.navigation-item) ::slotted(a) {\n height: 100%;\n font: var(--ic-font-label) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt025) !important;\n padding: 0 var(--ic-space-md) !important;\n}\n\n:host(.navigation-item-selected) .link::after,\n:host(.navigation-item-selected) ::slotted(a.active)::after,\n:host(.navigation-item-top-nav) ::slotted(a.active)::after {\n content: \"\";\n height: 0.25rem;\n width: 100%;\n position: absolute;\n bottom: 0;\n background-color: var(--ic-theme-text);\n}\n\n:host(.navigation-item-selected.navigation-item-page-header)\n ::slotted(a.active)::after,\n:host(.navigation-item-selected.navigation-item-page-header) .link::after,\n:host(.navigation-item.navigation-item-page-header) ::slotted(a.active)::after,\n:host(.navigation-item-top-nav-child) ::slotted(a.active)::after {\n content: none;\n}\n\n:host(.navigation-item-side-menu-selected) .link,\n:host(.navigation-item-side-menu) ::slotted(a.active),\n:host(.navigation-item-top-nav-child) ::slotted(a.active) {\n box-shadow: none;\n}\n\n:host(.navigation-item) .link:hover:not(:focus) {\n background-color: var(--ic-theme-hover);\n cursor: pointer;\n}\n\n:host(.navigation-item:not(.navigation-item-page-header, .navigation-item-side-menu))\n ::slotted(a:hover:not(:focus)) {\n background-color: var(--ic-theme-hover) !important;\n}\n\n:host(.navigation-item:not(.navigation-item-top-nav-child, .navigation-item-side-menu, .navigation-item-top-nav-child-selected\n .navigation-item-side-menu-selected))\n .focus-indicator:focus-within {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.navigation-item) .link:focus,\n:host(.navigation-item) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.navigation-item-selected) .link:focus,\n:host(.navigation-item) ::slotted(a.active:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.navigation-item-selected.dark) .link:focus,\n:host(.navigation-item.dark) ::slotted(a.active:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.navigation-item) .link:active:not(:focus),\n:host(.navigation-item) ::slotted(a:active:not(:focus)) {\n background-color: var(--ic-theme-active);\n}\n\n:host(.navigation-item-side-menu) .link,\n:host(.navigation-item-side-menu) ::slotted(a) {\n height: 2.5rem;\n width: 100%;\n box-sizing: border-box;\n color: var(--ic-color-primary-text);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n text-decoration: none;\n transition: box-shadow var(--ic-transition-duration-fast),\n border-radius var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-side-menu) ::slotted(a) {\n font: var(--ic-font-body) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt005) !important;\n transition: box-shadow var(--ic-easing-transition-fast),\n background-color var(--ic-easing-transition-fast);\n}\n\n:host(.navigation-item-side-menu) .link:hover:not(:focus) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n:host(.navigation-item-side-menu) ::slotted(a:hover:not(:focus)) {\n background-color: var(--ic-action-dark-bg-hover) !important;\n}\n\n:host(.navigation-item-side-menu) .focus-indicator:focus-within {\n box-shadow: none;\n}\n\n:host(.navigation-item-side-menu) .link:focus,\n:host(.navigation-item-side-menu) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-inset) !important;\n padding-right: var(--ic-space-lg);\n width: auto;\n border-radius: var(--ic-border-radius-inset) !important;\n}\n\n:host(.navigation-item-side-menu-selected) .link,\n:host(.navigation-item-side-menu-selected) ::slotted(a) {\n transition: box-shadow var(--ic-easing-transition-slow),\n background-color var(--ic-easing-transition-slow);\n}\n\n:host(.navigation-item-side-menu-selected) .link:focus,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus),\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus) {\n margin-left: var(--ic-space-xs) !important;\n padding-left: var(--ic-space-xs) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link,\n:host(.navigation-item-top-nav-child) ::slotted(a) {\n height: 2.5rem;\n width: fit-content;\n min-width: 9.063rem;\n color: var(--ic-color-primary-text);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding: 0 var(--ic-space-md) !important;\n text-decoration: none;\n position: relative;\n transition: box-shadow var(--ic-transition-duration-fast),\n border-radius var(--ic-transition-duration-slow);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a) {\n font: var(--ic-font-body) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt005) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link:hover:not(:focus) {\n background-color: var(--ic-action-dark-bg-hover) !important;\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a:hover):not(:focus) {\n background-color: var(--ic-action-dark-bg-hover) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link:focus,\n:host(.navigation-item-top-nav-child) ::slotted(a:focus) {\n z-index: 1;\n outline: var(--ic-hc-focus-outline);\n border-radius: var(--ic-border-radius-inset);\n box-shadow: var(--ic-border-focus-inset);\n transition: border-radius 0s, box-shadow var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n}\n\n:host(.navigation-item-side-menu) .link:active:not(:focus) {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.navigation-item-top-nav-child) .link:active:not(:focus),\n:host(.navigation-item-top-nav-child) ::slotted(a:active):not(:focus) {\n outline: var(--ic-hc-focus-outline);\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a:active):not(:focus),\n:host(.navigation-item-side-menu) ::slotted(a:active):not(:focus) {\n background-color: var(--ic-action-dark-bg-active) !important;\n}\n\n:host(.navigation-item-side-menu-selected) *,\n:host(.navigation-item-top-nav-child-selected) *,\n:host(.navigation-item-side-menu) ::slotted(a.active),\n:host(.navigation-item-top-nav-child) ::slotted(a.active) {\n font-weight: 700 !important;\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a.active)::before,\n:host(.navigation-item-top-nav-child-selected) .link::before,\n:host(.navigation-item-side-menu-selected) .link::before,\n:host(.navigation-item-side-menu) ::slotted(a.active)::before,\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before {\n content: \"\";\n position: absolute;\n left: 0;\n width: var(--ic-space-xs);\n height: 2.5rem;\n margin-top: 0.25rem;\n margin-right: 0.313rem;\n background-color: var(--ic-action-default);\n transition: left 0s;\n}\n\n:host(.navigation-item-top-nav-child-selected) .link:focus {\n margin-left: var(--ic-space-xs);\n margin-right: calc(-1 * var(--ic-space-xs));\n padding-left: var(--ic-space-xs) !important;\n}\n\n:host(.navigation-item-top-nav-child-selected) .link:focus::before {\n left: calc(-1 * var(--ic-space-xs));\n z-index: 1;\n}\n\n:host(.navigation-item-side-menu-selected) .link::before,\n:host(.navigation-item-side-menu) ::slotted(a.active)::before,\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before {\n z-index: 1;\n}\n\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before,\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus)::before {\n left: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.navigation-item-side-menu-selected) .link::after {\n display: none;\n}\n\n:host(.navigation-item-side-nav-collapsed) .link {\n height: 100%;\n}\n\n:host(.navigation-item-side-nav-collapsed) ::slotted(svg),\n:host(.navigation-item-side-nav-collapsed-with-label) ::slotted(svg) {\n margin: auto;\n pointer-events: none;\n}\n\n:host(.navigation-item-side-nav-collapsed) .icon,\n:host(.navigation-item-side-nav-collapsed-with-label) .icon,\n:host(.navigation-item-side-nav-collapsed-with-label) ic-typography {\n align-items: center;\n padding: 0;\n margin: auto 0;\n width: fit-content;\n pointer-events: none;\n}\n\n:host(.navigation-item-side-nav-collapsed-with-label) ic-typography {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n text-align: center;\n}\n\n:host(.navigation-item-side-nav-collapsed-with-label) .link,\n:host(.navigation-item-side-nav-collapsed-with-label) ::slotted(a) {\n display: flex;\n flex-direction: column;\n height: fit-content;\n padding: var(--ic-space-xs) !important;\n gap: var(--ic-space-xxs);\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link,\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n height: auto !important;\n gap: 0;\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n display: block;\n text-align: center;\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link\n ic-typography {\n opacity: 1;\n min-width: min-content;\n}\n\n:host(.navigation-item-side-nav-collapsed) svg,\n:host(.navigation-item-side-nav-collapsed-with-label) svg {\n display: none;\n}\n\n::slotted(svg) {\n fill: var(--ic-theme-text);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n}\n\n.icon {\n height: var(--ic-space-lg);\n width: var(--ic-space-xxl);\n margin-left: calc(-1 * var(--ic-space-md));\n flex: 0 1 0%;\n}\n\n.icon > ::slotted(*) {\n margin-left: var(--ic-space-md) !important;\n}\n\n:host(.navigation-item-side-nav-collapsed) .icon > ::slotted(*) {\n margin: auto !important;\n}\n\n:host(.navigation-item-side-nav) .link,\n:host(.navigation-item-side-nav) ::slotted(a) {\n height: var(--navigation-item-height);\n width: var(--navigation-item-width);\n justify-content: var(--navigation-item-justify-content);\n display: flex;\n gap: var(--ic-space-xs);\n box-sizing: border-box;\n color: var(--navigation-item-child-color) !important;\n text-decoration: none !important;\n white-space: nowrap;\n padding: 0 var(--ic-space-md);\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) ::slotted(a) {\n height: var(--navigation-item-child-height);\n width: var(--navigation-group-width);\n color: var(--navigation-item-child-color) !important;\n display: flex;\n gap: 0.625rem;\n box-sizing: border-box;\n min-width: 0;\n transition: box-shadow var(--ic-easing-transition-fast);\n text-decoration: none !important;\n white-space: nowrap;\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link:focus,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-dark);\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-menu) .link:active {\n background-color: var(--navigation-item-child-active);\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link:active,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n ::slotted(a:active) {\n background-color: var(--navigation-item-child-active);\n}\n\n:host(.navigation-item-side-nav) a.link ic-typography,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n a.link\n ic-typography,\n:host(.navigation-item-side-nav) div.link ic-typography,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n div.link\n ic-typography,\n.navigation-item-side-nav-slotted-text {\n opacity: var(--navigation-item-label-opacity);\n transition: opacity var(--ic-easing-transition-slow);\n white-space: wrap;\n text-overflow: ellipsis;\n overflow: hidden;\n min-width: 256px;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link,\n:host(.navigation-item-side-nav.navigation-item) ::slotted(a.active) {\n box-shadow: inset 0.313rem 0 0 var(--ic-theme-text);\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link::before,\n:host(.navigation-item-side-nav) ::slotted(a.active)::before {\n content: \"\";\n display: block;\n position: absolute;\n inset: 0 0 0 0.313rem;\n border-radius: 0.688rem !important;\n transition: var(--ic-easing-transition-slow);\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link:focus::before,\n:host(.navigation-item-side-nav) ::slotted(a.active:focus)::before {\n box-shadow: var(--ic-border-focus-inset);\n}\n\n:host(:not(.navigation-item-side-nav-collapsed).navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link {\n opacity: var(--navigation-item-label-opacity);\n height: auto;\n}\n\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n .link,\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n min-width: var(--navigation-group-item-min-width);\n padding: var(--ic-space-xs) !important;\n height: auto;\n gap: 0;\n}\n\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n display: block;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link::after,\n:host(.navigation-item-side-nav) ::slotted(a.active)::after {\n display: none;\n}\n\n:host(.navigation-item-side-nav.navigation-item) .link:focus,\n:host(.navigation-item-side-nav.navigation-item) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n background-color: transparent;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link:focus,\n:host(.navigation-item-side-nav) ::slotted(a.active:focus) {\n margin: 0 auto;\n box-shadow: inset 0.313rem 0 0 var(--ic-theme-text);\n border-radius: 0;\n}\n\n:host(.navigation-item-side-nav.navigation-item) .link:hover:not(:focus) {\n background-color: var(--ic-theme-hover) !important;\n}\n\n:host(.navigation-item-page-header).link,\n:host(.navigation-item-page-header) a,\n:host(.navigation-item-page-header) ::slotted(a) {\n height: 2.5rem !important;\n color: var(--ic-color-primary-text) !important;\n transition: all var(--ic-easing-transition-fast) !important;\n box-shadow: rgba(23 89 188 / 0%) !important;\n}\n\n:host(.navigation-item-page-header.navigation-item-selected) .link::after,\n:host(.navigation-item-page-header) ::slotted(a.active)::after {\n content: \" \" !important;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: var(--ic-space-xxs);\n background-color: var(--ic-action-default) !important;\n}\n\n:host(.navigation-item-page-header) .link:hover,\n:host(.navigation-item-page-header) ::slotted(.link:hover),\n:host(.navigation-item-page-header) ::slotted(a:hover),\n:host(.navigation-item-page-header) .link:hover:not(:focus) {\n background-color: var(--ic-action-default-bg-hover) !important;\n cursor: pointer;\n}\n\n:host(.navigation-item-page-header) .link:focus,\n:host(.navigation-item-page-header) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus);\n}\n\n:host(.navigation-item-page-header) .link:active,\n:host(.navigation-item-page-header) ::slotted(a:active) {\n background-color: var(--ic-action-default-bg-active) !important;\n}\n\n:host(.navigation-item-page-header.navigation-item-selected) .link:focus::after,\n:host(.navigation-item-page-header) ::slotted(a.active:focus)::after {\n border-bottom-left-radius: var(--ic-border-radius);\n border-bottom-right-radius: var(--ic-border-radius);\n}\n\n:host(.navigation-item-page-header.navigation-item-selected.with-transition)\n .link,\n:host(.navigation-item-page-header.navigation-item-selected.with-transition)\n ::slotted(a.active) {\n transition: all var(--ic-easing-transition-fast),\n border-color var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-page-header) ::slotted(a.active)::before,\n:host(.navigation-item-page-header) ::slotted(a.active:focus)::before,\n:host(.navigation-item-page-header.navigation-item-selected)\n .link:focus::before {\n display: none;\n}\n\n.open-in-new-icon {\n flex: 1;\n}\n\n.open-in-new-icon svg {\n margin-top: var(--ic-space-xxs);\n padding-left: var(--ic-space-xxs);\n}\n\n:host(.navigation-item-side-nav) .open-in-new-icon {\n margin-left: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.navigation-item-top-nav) .open-in-new-icon svg,\n:host(.navigation-item-page-header) .open-in-new-icon svg,\n:host(.navigation-item-side-nav) .open-in-new-icon svg {\n height: 0.875rem;\n width: 0.875rem;\n}\n\n:host(.navigation-item-side-menu) .open-in-new-icon svg,\n:host(.navigation-item-top-nav-child) .open-in-new-icon svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n:host(.navigation-item-page-header) .open-in-new-icon svg,\n:host(.navigation-item-top-nav-child) .open-in-new-icon svg,\n:host(.navigation-item-side-menu) .open-in-new-icon svg {\n fill: var(--ic-color-primary-text);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n h,\n Host,\n Prop,\n State,\n} from \"@stencil/core\";\n\nimport {\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getThemeForegroundColor,\n getParentElementType,\n getNavItemParentDetails,\n} from \"../../utils/helpers\";\nimport { IcNavType, IcTheme } from \"../../utils/types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\nimport OpenInNew from \"../../assets/OpenInNew.svg\";\n\n/**\n * @part link - The `<a>` within ic-navigation-item\n */\n\n@Component({\n tag: \"ic-navigation-item\",\n styleUrl: \"ic-navigation-item.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class NavigationItem {\n private navigationSlot: HTMLElement;\n private isInitialRender: boolean = true;\n private itemEl: HTMLElement;\n\n @Element() el: HTMLIcNavigationItemElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() focusStyle = getThemeForegroundColor();\n @State() inTopNavSideMenu: boolean = false;\n @State() isSideNavMobile: boolean = false;\n @State() isTopNavChild: boolean = false;\n @State() navigationType: IcNavType | \"\";\n @State() parentEl: HTMLElement;\n @State() sideNavExpanded: boolean = false;\n\n /**\n * @internal If `true`, the icon and label will be displayed when side navigation is collapsed.\n */\n @Prop() collapsedIconLabel: boolean = false;\n\n /**\n * @internal If `true`, the navigation item will be displayed within a tooltip.\n */\n @Prop() displayNavigationTooltip: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * @internal If `true`, the navigation item will be expandable.\n */\n @Prop() expandable: boolean = false;\n\n /**\n * The destination of the navigation item.\n */\n @Prop() href: string = \"\";\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * The label of the navigation item.\n */\n @Prop() label: string;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * If `true`, the navigation item will be set in a selected state.\n */\n @Prop() selected: boolean = false;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * @internal - Emitted when item loses focus.\n */\n @Event() childBlur: EventEmitter<void>;\n\n /**\n * @internal - Emitted when navigation item clicked.\n */\n @Event() navItemClicked: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.navigationType === \"side\") {\n this.parentEl.removeEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.removeEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n }\n\n componentWillLoad(): void {\n const navParentDetails = getNavItemParentDetails(this.el);\n this.navigationType = navParentDetails.navType;\n this.parentEl = navParentDetails.parent;\n\n if (this.navigationType === \"side\") {\n this.parentEl.addEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.addEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n\n if (\n getParentElementType(this.el) === \"IC-NAVIGATION-GROUP\" &&\n this.navigationType === \"top\"\n ) {\n this.isTopNavChild = true;\n }\n\n this.deviceSize = getCurrentDeviceSize();\n if (this.deviceSize <= DEVICE_SIZES.L && this.navigationType === \"top\") {\n this.inTopNavSideMenu = true;\n }\n\n this.navigationSlot = this.el.querySelector('[slot=\"navigation-item\"]');\n if (this.navigationSlot) {\n this.navigationSlot.ariaLabel = this.navigationSlot.textContent.trim();\n }\n }\n\n componentDidUpdate(): void {\n this.isInitialRender = false;\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.focusStyle = theme.mode;\n }\n\n /**\n * Sets focus on the nav item.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.itemEl) {\n this.itemEl.focus();\n }\n }\n\n private displayDefaultNavigationItem = (\n href: string,\n hreflang: string,\n target: string,\n rel: string,\n referrerpolicy: ReferrerPolicy,\n download: string | boolean,\n label: string\n ): HTMLElement => {\n const variant =\n this.isTopNavChild || this.inTopNavSideMenu ? \"body\" : \"label\";\n const ChevronIconComponent = this.expandable && (\n <div class={{ svg: true }} innerHTML={chevronIcon}></div>\n );\n const IconComponent = this.el.querySelector('[slot=\"icon\"]') && (\n <div class=\"icon\">\n {\" \"}\n <slot name=\"icon\"></slot>{\" \"}\n </div>\n );\n\n if (href !== \"\") {\n return (\n <a\n href={href}\n target={target}\n rel={rel}\n hreflang={hreflang}\n referrerPolicy={referrerpolicy}\n download={download !== false ? download : null}\n class=\"link\"\n ref={(el) => (this.itemEl = el)}\n part=\"link\"\n >\n {IconComponent}\n\n <ic-typography variant={variant}>{label}</ic-typography>\n {ChevronIconComponent}\n {target === \"_blank\" && (\n <span class=\"open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n );\n }\n\n return (\n <div tabindex=\"0\" class=\"link\" ref={(el) => (this.itemEl = el)}>\n {IconComponent}\n <ic-typography variant={variant}>{label}</ic-typography>\n {ChevronIconComponent}\n </div>\n );\n };\n\n private topNavResizedHandler = (ev: CustomEvent): void => {\n const newSize = ev.detail.size;\n if (newSize !== this.deviceSize) {\n this.deviceSize = newSize;\n this.inTopNavSideMenu = newSize <= DEVICE_SIZES.L;\n }\n };\n\n private sideNavExpandHandler = (ev: CustomEvent): void => {\n const { sideNavExpanded, sideNavMobile } = ev.detail;\n this.sideNavExpanded = sideNavExpanded;\n this.isSideNavMobile = sideNavMobile;\n };\n\n private handleBlur = (ev: FocusEvent) => {\n if (ev.relatedTarget !== null) {\n const target = ev.relatedTarget as HTMLElement;\n if (target.tagName === \"IC-NAVIGATION-ITEM\") {\n return;\n }\n }\n this.childBlur.emit();\n };\n\n private handleClick = () => {\n this.navItemClicked.emit();\n };\n\n render() {\n const {\n href,\n hreflang,\n target,\n rel,\n referrerpolicy,\n download,\n label,\n inTopNavSideMenu,\n isTopNavChild,\n selected,\n navigationSlot,\n } = this;\n\n return (\n <Host\n class={{\n [\"navigation-item\"]: true,\n [\"navigation-item-top-nav\"]:\n !inTopNavSideMenu && this.navigationType === \"top\",\n [\"navigation-item-top-nav-child-selected\"]:\n isTopNavChild && !inTopNavSideMenu && selected,\n [this.focusStyle]:\n (!inTopNavSideMenu && !isTopNavChild) ||\n (this.navigationType === \"side\" && isTopNavChild),\n [\"navigation-item-selected\"]: !isTopNavChild && selected,\n [\"navigation-item-side-menu\"]: inTopNavSideMenu,\n [\"navigation-item-side-menu-selected\"]: inTopNavSideMenu && selected,\n [\"navigation-item-top-nav-child\"]: isTopNavChild && !inTopNavSideMenu,\n [\"navigation-item-page-header\"]:\n this.navigationType === \"page-header\",\n [\"with-transition\"]: !this.isInitialRender,\n [\"navigation-item-side-nav\"]: this.navigationType === \"side\",\n [\"navigation-item-side-nav-collapsed\"]:\n (!this.sideNavExpanded || this.displayNavigationTooltip) &&\n this.navigationType === \"side\",\n [\"navigation-item-side-nav-collapsed-with-label\"]:\n !this.sideNavExpanded &&\n this.navigationType === \"side\" &&\n this.collapsedIconLabel &&\n !this.isSideNavMobile,\n [\"expandable\"]: this.expandable,\n }}\n onBlur={isTopNavChild && !inTopNavSideMenu ? this.handleBlur : null}\n onClick={this.handleClick}\n aria-current={selected ? \"page\" : null}\n role=\"listitem\"\n >\n {/* Tooltip enabled by applying navigation-item-side-nav-collapsed class to host */}\n <ic-tooltip\n label={label || navigationSlot.textContent}\n target=\"navigation-item\"\n placement=\"right\"\n class={{\n [\"tooltip-navigation-item\"]: true,\n [\"tooltip-navigation-item-side-nav-collapsed\"]:\n (!this.sideNavExpanded || this.displayNavigationTooltip) &&\n this.navigationType === \"side\",\n [\"tooltip-long-label-navigation-item-side-nav-expanded\"]:\n this.el.hasAttribute(\"[display-navigation-tooltip = 'true']\"),\n }}\n >\n {navigationSlot ? (\n <slot name=\"navigation-item\"></slot>\n ) : (\n this.displayDefaultNavigationItem(\n href,\n hreflang,\n target,\n rel,\n referrerpolicy,\n download,\n label\n )\n )}\n </ic-tooltip>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2a0c6769.js');
6
- const helpers = require('./helpers-eb53c416.js');
6
+ const helpers = require('./helpers-3811d14b.js');
7
7
  require('./types-3eb02246.js');
8
8
 
9
9
  const icNavigationMenuCss = ":host{display:block;position:fixed;top:0;left:0;width:100%;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-navigation-menu)}.popout-modal{position:absolute;inset:0}.popout-menu{position:fixed;top:0;right:0;width:16rem;bottom:0;background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);box-shadow:var(--ic-elevation-overlay);overflow-y:auto;overflow-x:hidden}:host(.inline) .popout-menu{position:absolute}.menu-close-button-container{position:relative;left:11.875rem;padding:var(--ic-space-md) 0}.nav-group-first{padding-bottom:0}.menu-buttons-container{padding:var(--ic-space-sm) 0;border-bottom:var(--ic-space-1px) solid var(--ic-architectural-200)}.menu-buttons-container-nav-item-above{margin-top:var(--ic-space-md);border-top:var(--ic-space-1px) solid var(--ic-architectural-200)}.menu-status-version-container{display:flex;flex-wrap:wrap;gap:var(--ic-space-xs);margin:var(--ic-space-md) var(--ic-space-md) var(--ic-space-xl)}.menu-status{background-color:var(--ic-architectural-500);color:var(--ic-color-white-text);border-radius:var(--ic-space-md);width:-moz-fit-content;width:fit-content;padding:var(--ic-space-xxs) var(--ic-space-sm)}.menu-version{border-radius:var(--ic-space-md);background-color:var(--ic-architectural-100);padding:var(--ic-space-xxs) var(--ic-space-sm)}.menu-status-text,.menu-version-text{overflow-wrap:break-word}.navigation-landmark-text{position:absolute;width:var(--ic-space-1px);height:var(--ic-space-1px);padding:0;margin:calc(-1 * var(--ic-space-1px));overflow:hidden}";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2a0c6769.js');
6
- const helpers = require('./helpers-eb53c416.js');
6
+ const helpers = require('./helpers-3811d14b.js');
7
7
  require('./types-3eb02246.js');
8
8
 
9
9
  const icPageHeaderCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;z-index:var(--ic-z-index-page-header)}:host(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay);z-index:var(--ic-z-index-sticky-page-header)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:var(--ic-border-default)}header.tabs{padding-top:var(--ic-space-md)}.breadcrumb-area{margin-bottom:var(--ic-space-md)}.main-content{display:grid;grid-template-columns:auto 1fr;grid-template-areas:\"title-area action-area\"\n \"input-area action-area\";-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md);justify-content:space-between;width:100%}.title-area{display:flex;flex-direction:column;flex:1;min-width:19rem;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;row-gap:var(--ic-space-xs);-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md)}.heading{display:inline-block;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.subheading.small{margin-top:var(--ic-space-xs)}.action-area{display:flex;gap:var(--ic-space-md);flex-flow:row wrap;justify-self:end;justify-content:flex-end;height:-moz-fit-content;height:fit-content;grid-area:action-area}.input-area,.navigation-area{margin-top:var(--ic-space-md);width:100%}.tabs-slot{display:flex;overflow-x:auto;padding:0.5rem;margin:-0.5rem}.tabs-slot::-webkit-scrollbar{display:none}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:20rem}.main-content{grid-template-areas:\"title-area\"\n \"action-area\"\n \"input-area\";justify-content:flex-start}.title-area{min-width:0}.action-area{min-width:100%;margin-top:var(--ic-space-md);justify-content:start}}@media screen and (min-width: 992px){:host(.sticky-desktop){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay);z-index:var(--ic-z-index-sticky-page-header)}}";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2a0c6769.js');
6
- const helpers = require('./helpers-eb53c416.js');
6
+ const helpers = require('./helpers-3811d14b.js');
7
7
  require('./types-3eb02246.js');
8
8
 
9
9
  const icPaginationItemCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}a{text-align:center}.item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--ic-space-xl) + var(--ic-space-sm));height:var(--ic-space-xl);margin:var(--ic-space-xxs) var(--ic-space-xxxs);cursor:pointer;text-decoration:none}button{background:none;border:none;outline:inherit;position:relative}.ellipsis{pointer-events:none;color:var(--ic-color-secondary-text)}.item-container:focus{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.page{color:var(--ic-action-default)}.simple-current{width:calc(var(--ic-space-xxl) + var(--ic-space-md));height:var(--ic-space-lg);cursor:default}.item-container.page:hover:not(.selected):not(:focus){border-radius:var(--ic-border-radius);background-color:var(--ic-action-default-bg-hover)}.item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-action-default-bg-active)}.selected{pointer-events:none;outline:none}.selected::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-default)}.page-selected{color:var(--ic-color-primary-text)}.item-container.page.light:hover:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-hover)}.item-container.page.light:active:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-active)}ic-typography.light{color:var(--ic-color-white-text)}.selected.light::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-light)}.item-container.page.dark:hover:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-hover)}.item-container.page.dark:active:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-active)}ic-typography.dark{color:var(--ic-color-primary-text)}.selected.dark::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-dark)}.disabled{color:var(--ic-architectural-200);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (forced-colors: active){.selected::after{background-color:Highlight}.selected.light::after{background-color:Highlight}.selected.dark::after{background-color:Highlight}}";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2a0c6769.js');
6
- const helpers = require('./helpers-eb53c416.js');
6
+ const helpers = require('./helpers-3811d14b.js');
7
7
  require('./types-3eb02246.js');
8
8
 
9
9
  const paginationNextPrevious = `<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -3,16 +3,17 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2a0c6769.js');
6
- const helpers = require('./helpers-eb53c416.js');
6
+ const helpers = require('./helpers-3811d14b.js');
7
7
  const popper = require('./popper-d7adcfc6.js');
8
8
  require('./types-3eb02246.js');
9
9
 
10
- const icPopoverMenuCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host .opening-from-parent{animation:slide-in var(--ic-transition-duration-slow) ease-in-out}:host .opening-from-child{animation:slide-out var(--ic-transition-duration-slow) ease-in-out}}:host{border-radius:var(--ic-border-radius);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}.menu{border:var(--ic-border-default);border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;height:0}.button{text-decoration:none;list-style-type:none}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.open){display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host(.open) .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{color:var(--ic-color-tertiary-text);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}";
10
+ const icPopoverMenuCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host .opening-from-parent{animation:slide-in var(--ic-transition-duration-slow) ease-in-out}:host .opening-from-child{animation:slide-out var(--ic-transition-duration-slow) ease-in-out}}:host{border-radius:var(--ic-border-radius);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}:host(.on-dialog){inset:auto !important}:host(.on-dialog-fix-translate){transform:translate(0, var(--ic-space-xs)) !important}:host(.on-dialog-translate-y){transform:translate(0, calc(-1 * var(--translate-y))) !important}.menu{border:var(--ic-border-default);border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;height:0}.button{text-decoration:none;list-style-type:none}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.open){display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host(.open) .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{color:var(--ic-color-tertiary-text);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}";
11
11
 
12
12
  const PopoverMenu = class {
13
13
  constructor(hostRef) {
14
14
  index.registerInstance(this, hostRef);
15
15
  this.ARIA_LABEL = "aria-label";
16
+ this.firstRender = true;
16
17
  this.popoverMenuEls = [];
17
18
  this.setButtonFocus = () => {
18
19
  var _a;
@@ -106,6 +107,11 @@ const PopoverMenu = class {
106
107
  setTimeout(this.setButtonFocus, 50);
107
108
  }
108
109
  }
110
+ disconnectedCallback() {
111
+ if (this.popperInstance !== undefined) {
112
+ this.popperInstance.destroy();
113
+ }
114
+ }
109
115
  componentDidLoad() {
110
116
  const slotWrapper = this.host.shadowRoot.querySelector("ul.button");
111
117
  const popoverMenuElements = helpers.getSlotElements(slotWrapper);
@@ -121,18 +127,64 @@ const PopoverMenu = class {
121
127
  this.anchorEl = this.findAnchorEl(this.anchor);
122
128
  }
123
129
  componentDidRender() {
124
- if (this.open) {
125
- popper.createPopper(this.anchorEl, this.host, {
126
- placement: "bottom-start",
127
- modifiers: [
128
- {
129
- name: "offset",
130
- options: {
131
- offset: [0, 4],
130
+ if (this.firstRender && this.open) {
131
+ this.firstRender = false;
132
+ let adjust = false;
133
+ const dialogEl = this.host.closest("ic-dialog");
134
+ const onDialog = dialogEl !== null;
135
+ if (onDialog) {
136
+ this.host.classList.add("on-dialog");
137
+ const menu = this.host.getBoundingClientRect();
138
+ const dialogBottom = dialogEl.getBoundingClientRect().bottom;
139
+ const anchorHeight = this.anchorEl.getBoundingClientRect().height;
140
+ let offset;
141
+ if (dialogEl.getAttribute("data-overflow") === "false") {
142
+ if (dialogBottom - menu.top < menu.height) {
143
+ adjust = true;
144
+ offset = menu.height + anchorHeight + 8;
145
+ }
146
+ }
147
+ else {
148
+ adjust = true;
149
+ // 100 added here as that's the offset when data-overflow is true
150
+ offset = menu.height + anchorHeight + 8 + 100;
151
+ }
152
+ if (adjust === false) {
153
+ this.host.classList.add("on-dialog-fix-translate");
154
+ }
155
+ else {
156
+ this.host.style.setProperty("--translate-y", `${offset}px`, "important");
157
+ this.host.classList.add("on-dialog-translate-y");
158
+ }
159
+ }
160
+ if (adjust) {
161
+ this.popperInstance = popper.createPopper(this.anchorEl, this.host, {
162
+ placement: "top",
163
+ });
164
+ }
165
+ else {
166
+ this.popperInstance = popper.createPopper(this.anchorEl, this.host, {
167
+ placement: "bottom-start",
168
+ modifiers: [
169
+ {
170
+ name: "offset",
171
+ options: {
172
+ offset: [0, 4],
173
+ },
132
174
  },
133
- },
134
- ],
135
- });
175
+ {
176
+ name: "flip",
177
+ options: {
178
+ fallbackPlacements: ["top-start", "top-end", "bottom-end"],
179
+ rootBoundary: "viewport",
180
+ },
181
+ },
182
+ ],
183
+ });
184
+ }
185
+ }
186
+ else if (this.open) {
187
+ this.popperInstance.update();
136
188
  }
137
189
  }
138
190
  handleMenuItemClick(ev) {
@@ -1 +1 @@
1
- {"file":"ic-popover-menu.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,mxHAAmxH;;MCqB/xH,WAAW;;;IAEd,eAAU,GAAW,YAAY,CAAC;IAGlC,mBAAc,GAA4B,EAAE,CAAC;IAuL7C,mBAAc,GAAG;;MACvB,MAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,0CAAE,KAAK,EAAE,CAAC;KACjD,CAAC;;IAGM,iBAAY,GAAG,CAAC,MAAc;MACpC,IAAI,aAAa,GAAgB,IAAI,CAAC;MACtC,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE;QAC3C,IAAI,CAAC,SAAS,KAAK,SAAS;UAC1B,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;OAC9D;WAAM;QACL,aAAa,GAAG,QAAQ,CAAC,aAAa,CACpC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,CAClD,CAAC;QACF,IAAI,aAAa,KAAK,IAAI,EAAE;UAC1B,OAAO,CAAC,KAAK,CAAC,2BAA2B,MAAM,aAAa,CAAC,CAAC;SA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X,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,mBAAmB,IAEzBA,kBACE,CAAC,EAAC,mEAAmE,EACrE,IAAI,EAAC,cAAc,GACnB,CACE,CACO,EACfA,2BAAe,OAAO,EAAC,gBAAgB,EAAC,KAAK,EAAC,cAAc,IACzD,IAAI,CAAC,WAAW,CACH,CACZ,CACP,EACDA,gBACE,KAAK,EAAC,QAAQ,gBACF,IAAI,CAAC,gBAAgB,EAAE,EACnC,IAAI,EAAC,MAAM,eAET,IAAI,CAAC,SAAS,KAAK,SAAS;UACxB,kCAAkC,IAAI,CAAC,YAAY,EAAE;UACrD,KAAK,mBAGT,IAAI,CAAC,SAAS,KAAK,SAAS;UACxB,kCAAkC,IAAI,CAAC,YAAY,EAAE;UACrD,KAAK,IAGXA,qBAAa,CACV,CACD,CACF,CACD,EACP;GACH;;;;;;;;;;;","names":["getSlotElements","createPopper","h","Host"],"sources":["./src/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","./src/components/ic-popover-menu/ic-popover-menu.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n height: 0;\n}\n\n.button {\n text-decoration: none;\n list-style-type: none;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.open) .menu {\n visibility: visible;\n height: fit-content;\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n color: var(--ic-color-tertiary-text);\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Method,\n} from \"@stencil/core\";\nimport { getSlotElements } from \"../../utils/helpers\";\nimport { createPopper } from \"@popperjs/core\";\n\n@Component({\n tag: \"ic-popover-menu\",\n styleUrl: \"ic-popover-menu.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PopoverMenu {\n private anchorEl: HTMLElement;\n private ARIA_LABEL: string = \"aria-label\";\n private backButton: HTMLIcMenuItemElement;\n private currentFocus: number;\n private popoverMenuEls: HTMLIcMenuItemElement[] = [];\n\n @Element() host: HTMLIcPopoverMenuElement;\n\n @State() openingFromChild: boolean = false;\n @State() openingFromParent: boolean = false;\n\n /**\n * The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\n */\n @Prop() anchor: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentLabel?: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentPopover?: HTMLIcPopoverMenuElement;\n\n /**\n * The unique identifier for a popover submenu.\n */\n @Prop() submenuId?: string;\n\n /**\n * @internal The level of menu being displayed.\n */\n @Prop() submenuLevel: number = 1;\n\n /**\n * If `true`, the popover menu will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open: boolean = undefined;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n if (this.open) {\n if (\n this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)\n ) {\n this.popoverMenuEls.unshift(this.backButton);\n }\n\n this.currentFocus = this.submenuId !== undefined ? 1 : 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n }\n }\n\n componentDidLoad(): void {\n const slotWrapper = this.host.shadowRoot.querySelector(\"ul.button\");\n const popoverMenuElements = getSlotElements(slotWrapper);\n\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n\n if (\n this.submenuId === undefined &&\n this.host.getAttribute(this.ARIA_LABEL) === null\n ) {\n console.error(\n `No aria-label specified for popover menu component - aria-label required`\n );\n }\n }\n\n componentWillRender(): void {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n\n componentDidRender(): void {\n if (this.open) {\n createPopper(this.anchorEl, this.host, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n ],\n });\n }\n }\n\n @Listen(\"handleMenuItemClick\")\n handleMenuItemClick(ev: CustomEvent): void {\n if (!ev.detail.hasSubMenu && ev.detail.label !== \"Back\") {\n this.closeMenu();\n }\n }\n\n // This is listening for the event emitted when a menu item is acting as a trigger button\n @Listen(\"triggerPopoverMenuInstance\", { capture: true })\n handleSubmenuChange(ev: Event): void {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target as HTMLIcMenuItemElement;\n this.open = false;\n\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(\n `ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`\n ) as HTMLIcPopoverMenuElement;\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.host;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.host.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleClick(ev: Event): void {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n\n // Manages the keyboard navigation in the popover menu\n @Listen(\"keydown\", { target: \"document\" })\n handleKeyDown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case \"ArrowDown\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, true);\n this.setButtonFocus();\n break;\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, false);\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n if (this.open) {\n this.closeMenu();\n this.host.blur();\n }\n break;\n }\n }\n\n /**\n * @internal Opens the menu from the child menu.\n */\n @Method()\n async openFromChild(): Promise<void> {\n this.open = true;\n this.openingFromChild = true;\n\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n\n /**\n * @internal Opens the menu from the parent menu.\n */\n @Method()\n async openFromParent(): Promise<void> {\n this.open = true;\n this.openingFromParent = true;\n\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n\n private setButtonFocus = () => {\n this.popoverMenuEls[this.currentFocus]?.focus();\n };\n\n // Checks that the popover menu has an anchor\n private findAnchorEl = (anchor: string): HTMLElement => {\n let anchorElement: HTMLElement = null;\n if (anchor === null || anchor === undefined) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n } else {\n anchorElement = document.querySelector(\n anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor\n );\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n\n private isNotPopoverMenuEl = (ev: Event) => {\n const target = ev.target as HTMLElement;\n return (\n target.id !== this.anchor &&\n target.tagName !== \"IC-MENU-ITEM\" &&\n target.tagName !== \"IC-MENU-GROUP\" &&\n target.tagName !== \"IC-POPOVER-MENU\"\n );\n };\n\n private closeMenu = () => {\n this.open = false;\n this.anchorEl?.focus();\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numButtons = this.popoverMenuEls.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n } else if (nextItem > numButtons) {\n nextItem = 0;\n }\n\n return nextItem;\n };\n\n private addMenuItems = (elements: Element[] | NodeListOf<ChildNode>) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i] as HTMLIcMenuItemElement;\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n } else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot.querySelector(\"ul\");\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n\n this.addMenuItems(menuGroupElements);\n }\n }\n };\n\n private getMenuAriaLabel = (): string => {\n const ariaLabel = this.host.getAttribute(this.ARIA_LABEL);\n\n if (this.submenuId !== undefined) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n } else {\n return ariaLabel;\n }\n };\n\n private handleBackButtonClick = (): void => {\n this.parentPopover.openFromChild();\n this.open = false;\n };\n\n render() {\n return (\n <Host class={{ open: this.open }}>\n <div\n id={\n this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\"\n }\n class={{\n menu: true,\n }}\n tabindex={open ? \"0\" : \"-1\"}\n >\n <div\n class={{\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n }}\n >\n {this.submenuId !== undefined && (\n <div>\n <ic-menu-item\n class=\"ic-popover-submenu-back-button\"\n ref={(el) => (this.backButton = el)}\n label=\"Back\"\n onClick={this.handleBackButtonClick}\n id={`ic-popover-submenu-back-button-${this.submenuLevel}`}\n >\n <svg\n slot=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"submenu-back-icon\"\n >\n <path\n d=\"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-menu-item>\n <ic-typography variant=\"subtitle-small\" class=\"parent-label\">\n {this.parentLabel}\n </ic-typography>\n </div>\n )}\n <ul\n class=\"button\"\n aria-label={this.getMenuAriaLabel()}\n role=\"menu\"\n aria-owns={\n this.submenuId !== undefined\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false\n }\n aria-controls={\n this.submenuId !== undefined\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false\n }\n >\n <slot></slot>\n </ul>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-popover-menu.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,g/HAAg/H;;MCqB5/H,WAAW;;;IAEd,eAAU,GAAW,YAAY,CAAC;IAGlC,gBAAW,GAAY,IAAI,CAAC;IAC5B,mBAAc,GAA4B,EAAE,CAAC;IA+O7C,mBAAc,GAAG;;MACvB,MAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,0CAAE,KAAK,EAAE,CAAC;KACjD,CAAC;;IAGM,iBAAY,GAAG,CAAC,MAAc;MACpC,IAAI,aAAa,GAAgB,IAAI,CAAC;MACtC,IAAI,MA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,CACP,EACDA,gBACE,KAAK,EAAC,QAAQ,gBACF,IAAI,CAAC,gBAAgB,EAAE,EACnC,IAAI,EAAC,MAAM,eAET,IAAI,CAAC,SAAS,KAAK,SAAS;UACxB,kCAAkC,IAAI,CAAC,YAAY,EAAE;UACrD,KAAK,mBAGT,IAAI,CAAC,SAAS,KAAK,SAAS;UACxB,kCAAkC,IAAI,CAAC,YAAY,EAAE;UACrD,KAAK,IAGXA,qBAAa,CACV,CACD,CACF,CACD,EACP;GACH;;;;;;;;;;;","names":["getSlotElements","createPopper","h","Host"],"sources":["./src/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","./src/components/ic-popover-menu/ic-popover-menu.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n height: 0;\n}\n\n.button {\n text-decoration: none;\n list-style-type: none;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.open) .menu {\n visibility: visible;\n height: fit-content;\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n color: var(--ic-color-tertiary-text);\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Method,\n} from \"@stencil/core\";\nimport { getSlotElements } from \"../../utils/helpers\";\nimport { createPopper, Instance as PopperInstance } from \"@popperjs/core\";\n\n@Component({\n tag: \"ic-popover-menu\",\n styleUrl: \"ic-popover-menu.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PopoverMenu {\n private anchorEl: HTMLElement;\n private ARIA_LABEL: string = \"aria-label\";\n private backButton: HTMLIcMenuItemElement;\n private currentFocus: number;\n private firstRender: boolean = true;\n private popoverMenuEls: HTMLIcMenuItemElement[] = [];\n private popperInstance: PopperInstance;\n\n @Element() host: HTMLIcPopoverMenuElement;\n\n @State() openingFromChild: boolean = false;\n @State() openingFromParent: boolean = false;\n\n /**\n * The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\n */\n @Prop() anchor: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentLabel?: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentPopover?: HTMLIcPopoverMenuElement;\n\n /**\n * The unique identifier for a popover submenu.\n */\n @Prop() submenuId?: string;\n\n /**\n * @internal The level of menu being displayed.\n */\n @Prop() submenuLevel: number = 1;\n\n /**\n * If `true`, the popover menu will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open: boolean = undefined;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n if (this.open) {\n if (\n this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)\n ) {\n this.popoverMenuEls.unshift(this.backButton);\n }\n\n this.currentFocus = this.submenuId !== undefined ? 1 : 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n }\n }\n\n disconnectedCallback(): void {\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n }\n\n componentDidLoad(): void {\n const slotWrapper = this.host.shadowRoot.querySelector(\"ul.button\");\n const popoverMenuElements = getSlotElements(slotWrapper);\n\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n\n if (\n this.submenuId === undefined &&\n this.host.getAttribute(this.ARIA_LABEL) === null\n ) {\n console.error(\n `No aria-label specified for popover menu component - aria-label required`\n );\n }\n }\n\n componentWillRender(): void {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n\n componentDidRender(): void {\n if (this.firstRender && this.open) {\n this.firstRender = false;\n let adjust = false;\n\n const dialogEl = this.host.closest(\"ic-dialog\");\n const onDialog = dialogEl !== null;\n\n if (onDialog) {\n this.host.classList.add(\"on-dialog\");\n const menu = this.host.getBoundingClientRect();\n const dialogBottom = dialogEl.getBoundingClientRect().bottom;\n const anchorHeight = this.anchorEl.getBoundingClientRect().height;\n let offset;\n if (dialogEl.getAttribute(\"data-overflow\") === \"false\") {\n if (dialogBottom - menu.top < menu.height) {\n adjust = true;\n offset = menu.height + anchorHeight + 8;\n }\n } else {\n adjust = true;\n // 100 added here as that's the offset when data-overflow is true\n offset = menu.height + anchorHeight + 8 + 100;\n }\n if (adjust === false) {\n this.host.classList.add(\"on-dialog-fix-translate\");\n } else {\n this.host.style.setProperty(\n \"--translate-y\",\n `${offset}px`,\n \"important\"\n );\n this.host.classList.add(\"on-dialog-translate-y\");\n }\n }\n\n if (adjust) {\n this.popperInstance = createPopper(this.anchorEl, this.host, {\n placement: \"top\",\n });\n } else {\n this.popperInstance = createPopper(this.anchorEl, this.host, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n }\n } else if (this.open) {\n this.popperInstance.update();\n }\n }\n\n @Listen(\"handleMenuItemClick\")\n handleMenuItemClick(ev: CustomEvent): void {\n if (!ev.detail.hasSubMenu && ev.detail.label !== \"Back\") {\n this.closeMenu();\n }\n }\n\n // This is listening for the event emitted when a menu item is acting as a trigger button\n @Listen(\"triggerPopoverMenuInstance\", { capture: true })\n handleSubmenuChange(ev: Event): void {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target as HTMLIcMenuItemElement;\n this.open = false;\n\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(\n `ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`\n ) as HTMLIcPopoverMenuElement;\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.host;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.host.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleClick(ev: Event): void {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n\n // Manages the keyboard navigation in the popover menu\n @Listen(\"keydown\", { target: \"document\" })\n handleKeyDown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case \"ArrowDown\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, true);\n this.setButtonFocus();\n break;\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, false);\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n if (this.open) {\n this.closeMenu();\n this.host.blur();\n }\n break;\n }\n }\n\n /**\n * @internal Opens the menu from the child menu.\n */\n @Method()\n async openFromChild(): Promise<void> {\n this.open = true;\n this.openingFromChild = true;\n\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n\n /**\n * @internal Opens the menu from the parent menu.\n */\n @Method()\n async openFromParent(): Promise<void> {\n this.open = true;\n this.openingFromParent = true;\n\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n\n private setButtonFocus = () => {\n this.popoverMenuEls[this.currentFocus]?.focus();\n };\n\n // Checks that the popover menu has an anchor\n private findAnchorEl = (anchor: string): HTMLElement => {\n let anchorElement: HTMLElement = null;\n if (anchor === null || anchor === undefined) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n } else {\n anchorElement = document.querySelector(\n anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor\n );\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n\n private isNotPopoverMenuEl = (ev: Event) => {\n const target = ev.target as HTMLElement;\n return (\n target.id !== this.anchor &&\n target.tagName !== \"IC-MENU-ITEM\" &&\n target.tagName !== \"IC-MENU-GROUP\" &&\n target.tagName !== \"IC-POPOVER-MENU\"\n );\n };\n\n private closeMenu = () => {\n this.open = false;\n this.anchorEl?.focus();\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numButtons = this.popoverMenuEls.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n } else if (nextItem > numButtons) {\n nextItem = 0;\n }\n\n return nextItem;\n };\n\n private addMenuItems = (elements: Element[] | NodeListOf<ChildNode>) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i] as HTMLIcMenuItemElement;\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n } else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot.querySelector(\"ul\");\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n\n this.addMenuItems(menuGroupElements);\n }\n }\n };\n\n private getMenuAriaLabel = (): string => {\n const ariaLabel = this.host.getAttribute(this.ARIA_LABEL);\n\n if (this.submenuId !== undefined) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n } else {\n return ariaLabel;\n }\n };\n\n private handleBackButtonClick = (): void => {\n this.parentPopover.openFromChild();\n this.open = false;\n };\n\n render() {\n return (\n <Host class={{ open: this.open }}>\n <div\n id={\n this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\"\n }\n class={{\n menu: true,\n }}\n tabindex={open ? \"0\" : \"-1\"}\n >\n <div\n class={{\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n }}\n >\n {this.submenuId !== undefined && (\n <div>\n <ic-menu-item\n class=\"ic-popover-submenu-back-button\"\n ref={(el) => (this.backButton = el)}\n label=\"Back\"\n onClick={this.handleBackButtonClick}\n id={`ic-popover-submenu-back-button-${this.submenuLevel}`}\n >\n <svg\n slot=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"submenu-back-icon\"\n >\n <path\n d=\"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-menu-item>\n <ic-typography variant=\"subtitle-small\" class=\"parent-label\">\n {this.parentLabel}\n </ic-typography>\n </div>\n )}\n <ul\n class=\"button\"\n aria-label={this.getMenuAriaLabel()}\n role=\"menu\"\n aria-owns={\n this.submenuId !== undefined\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false\n }\n aria-controls={\n this.submenuId !== undefined\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false\n }\n >\n <slot></slot>\n </ul>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2a0c6769.js');
6
- const helpers = require('./helpers-eb53c416.js');
6
+ const helpers = require('./helpers-3811d14b.js');
7
7
  require('./types-3eb02246.js');
8
8
 
9
9
  const icRadioGroupCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}ic-input-label.error{color:var(--ic-status-error)}ic-input-validation{margin-top:var(--ic-space-sm)}:host(.small) ic-input-validation{margin-top:calc(var(--ic-space-sm) / 2)}ic-input-label ic-typography{margin-bottom:var(--ic-space-sm)}:host(.small) ic-input-label ic-typography{margin-bottom:calc(var(--ic-space-sm) / 2)}.radio-buttons-container{display:flex;flex-direction:column;gap:var(--ic-space-xxs)}:host(.small) .radio-buttons-container{gap:var(--ic-space-xxxs)}:host([orientation=\"horizontal\"]) .radio-buttons-container{display:flex;flex-direction:row;gap:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.small[orientation=\"horizontal\"]) .radio-buttons-container{gap:var(--ic-space-xl)}";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2a0c6769.js');
6
- const helpers = require('./helpers-eb53c416.js');
6
+ const helpers = require('./helpers-3811d14b.js');
7
7
  require('./types-3eb02246.js');
8
8
 
9
9
  const icRadioOptionCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:flex;flex-direction:column;width:-moz-fit-content;width:fit-content}:host([additional-field-display=\"static\"]) ::slotted(ic-text-field){margin-top:calc(var(--ic-space-sm) / 2);margin-left:var(--ic-space-xl)}:host(.disabled){color:var(--ic-architectural-200)}.container input:focus+span.checkmark,:host(:focus) .container input:checked+span.checkmark{box-shadow:var(--ic-border-focus)}.container{display:grid;grid-template-columns:min-content auto;position:relative;cursor:pointer;align-items:center;margin:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs)}.container.disabled,.container.disabled input:disabled{cursor:default}.container input{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;position:absolute;cursor:pointer;height:var(--ic-space-lg);width:var(--ic-space-lg);border-radius:50%;border:none}.checkmark{display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:transparent;border:var(--ic-border-default);border-radius:50%;transition:var(--ic-easing-transition-fast);box-sizing:border-box}.container input:checked~.checkmark::after{display:inline-block}.container:hover input~.checkmark{background-color:var(--ic-action-default-bg-hover);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-hover);border:var(--ic-space-1px) solid var(--ic-action-default)}.container:active input~.checkmark{background-color:var(--ic-action-default-bg-active);border:var(--ic-space-1px) solid var(--ic-action-default-active);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active)}.container:active input:checked~.checkmark{background-color:var(--ic-action-default-bg-active);border:0.125rem solid var(--ic-action-default-active);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active)}.container:active input:checked~.checkmark::after{background-color:var(--ic-action-default-active)}.container input:checked~.checkmark{border:0.125rem solid var(--ic-action-default)}.container input:checked:disabled~.checkmark{background-color:transparent;border:0.125rem solid var(--ic-architectural-200)}.container input:disabled~.checkmark{border:var(--ic-space-1px) dashed var(--ic-architectural-200)}.container input:disabled~.checkmark::after{background:var(--ic-architectural-200)}.container:hover input:disabled~.checkmark{background-color:transparent;box-shadow:none;border:0.125rem solid none}.container:active input:disabled~.checkmark::after{background-color:var(--ic-architectural-200)}.container .checkmark::after{content:\"\";position:absolute;display:none;top:calc(50% - var(--ic-space-xs));left:calc(50% - var(--ic-space-xs));width:var(--ic-space-md);height:var(--ic-space-md);border-radius:50%;background:var(--ic-action-default)}.radio-label{margin-left:var(--ic-space-md)}.additional-field-wrapper{margin-left:var(--ic-space-xs)}.branch-corner{color:var(--ic-action-default);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-action-default);border-left:0.125rem solid var(--ic-action-default);margin-left:calc(-1 * var(--ic-space-1px))}.dynamic-container{display:flex;position:relative;margin:var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);gap:var(--ic-space-xs)}.dynamic-container.hidden{display:none}.dynamic-text{color:var(--ic-action-default);margin-top:calc(var(--ic-space-sm) / 2);margin-bottom:var(--ic-space-xs);border-radius:2%}@media (max-width: 576px){::slotted(ic-text-field){--input-width:100%}}@media (forced-colors: active){.container input:checked~.checkmark,.container:active input:checked~.checkmark{border-color:Highlight}.container input:checked~.checkmark::after,.container:active input:checked~.checkmark::after{background-color:Highlight}.container input:disabled~.checkmark,.container input:checked:disabled~.checkmark{border-color:GrayText}.container input:disabled~.checkmark::after,.container:active input:disabled~.checkmark::after{background-color:GrayText}}";
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2a0c6769.js');
6
6
  const types = require('./types-3eb02246.js');
7
- const helpers = require('./helpers-eb53c416.js');
7
+ const helpers = require('./helpers-3811d14b.js');
8
8
 
9
9
  const clearIcon = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
10
10
  <path d="M15.8327 5.34199L14.6577 4.16699L9.99935 8.82533L5.34102 4.16699L4.16602 5.34199L8.82435 10.0003L4.16602 14.6587L5.34102 15.8337L9.99935 11.1753L14.6577 15.8337L15.8327 14.6587L11.1743 10.0003L15.8327 5.34199Z" fill="currentColor"/>
@@ -433,6 +433,7 @@ const SearchBar = class {
433
433
  const disabledText = disabledMode && !readonly;
434
434
  const hasSuggestedSearch = value && this.hasOptionsOrFilterDisabled();
435
435
  const menuOpen = hasSuggestedSearch && open && filteredOptions.length > 0;
436
+ const menuRendered = menuOpen && value.length >= this.charactersUntilSuggestion;
436
437
  const isOrHasLoaded = this.filteredOptions.length === 1 &&
437
438
  (this.filteredOptions[0].label === this.loadingLabel ||
438
439
  filteredOptions[0].label === this.loadingErrorLabel);
@@ -456,7 +457,7 @@ const SearchBar = class {
456
457
  ["small"]: small,
457
458
  }, onFocus: this.handleHostFocus, onBlur: this.handleHostBlur }, index.h("ic-text-field", { ref: (el) => (this.inputEl = el), inputId: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly, small: small, hideLabel: hideLabel, fullWidth: fullWidth, name: name, truncateValue: truncateValue, value: options && !!helpers.getLabelFromValue(value, options)
458
459
  ? helpers.getLabelFromValue(value, options)
459
- : value, placeholder: placeholder, onInput: this.onInput, onBlur: this.onInputBlur, onFocus: this.onInputFocus, "aria-label": hideLabel ? label : "", "aria-describedby": describedById, "aria-owns": hasSuggestedSearch ? menuId : undefined, "aria-haspopup": options.length > 0 ? "listbox" : undefined, ariaExpanded: expanded, ariaActiveDescendant: ariaActiveDescendant, "aria-autocomplete": hasSuggestedSearch ? "list" : undefined, role: hasSuggestedSearch ? "combobox" : undefined, autocomplete: autocomplete, autocapitalize: autocapitalize, autoFocus: autofocus, spellcheck: spellcheck, inputmode: "search", debounce: this.debounce }, index.h("div", { class: {
460
+ : value, placeholder: placeholder, onInput: this.onInput, onBlur: this.onInputBlur, onFocus: this.onInputFocus, "aria-label": hideLabel ? label : "", "aria-describedby": describedById, "aria-owns": menuRendered ? menuId : undefined, "aria-haspopup": options.length > 0 ? "listbox" : undefined, ariaExpanded: expanded, ariaActiveDescendant: ariaActiveDescendant, "aria-autocomplete": hasSuggestedSearch ? "list" : undefined, role: hasSuggestedSearch ? "combobox" : undefined, autocomplete: autocomplete, autocapitalize: autocapitalize, autoFocus: autofocus, spellcheck: spellcheck, inputmode: "search", debounce: this.debounce }, index.h("div", { class: {
460
461
  "clear-button-container": true,
461
462
  "clear-button-visible": value && !disabledMode && this.showClearButton,
462
463
  }, slot: "clear-button" }, index.h("ic-button", { id: "clear-button", class: "clear-button", "aria-label": "Clear", innerHTML: clearIcon, onClick: this.handleClear, onMouseDown: this.handleMouseDown, size: small ? "small" : "default", onFocus: this.handleFocusClearButton, onBlur: this.handleClearBlur, onKeyDown: this.handleClear, type: "submit", variant: "icon", appearance: this.clearButtonFocused
@@ -472,7 +473,7 @@ const SearchBar = class {
472
473
  : types.IcThemeForegroundEnum.Default })), index.h("div", { class: {
473
474
  "menu-container": true,
474
475
  fullwidth: fullWidth,
475
- }, slot: "menu" }, menuOpen && value.length >= this.charactersUntilSuggestion && (index.h("ic-menu", { class: {
476
+ }, slot: "menu" }, menuRendered && (index.h("ic-menu", { class: {
476
477
  "no-results": this.hadNoOptions() || isOrHasLoaded,
477
478
  }, activationType: "manual", anchorEl: this.anchorEl, autoFocusOnSelected: false, searchMode: this.searchMode, inputEl: this.inputEl, inputLabel: label, ref: (el) => (this.menu = el), small: small, fullWidth: fullWidth, menuId: menuId, open: true, options: filteredOptions, onMenuOptionSelect: this.handleOptionSelect, onMenuStateChange: this.handleMenuChange, onMenuOptionId: this.handleMenuOptionHighlight, onRetryButtonClicked: this.handleRetry, parentEl: this.el, value: value })))), index.h("div", { "aria-live": "polite", role: "status", class: "search-results-status" })));
478
479
  }