@ukic/web-components 2.18.0 → 2.18.1

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/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-d52cddc1.js → helpers-3e526fb8.js} +15 -3
  3. package/dist/cjs/helpers-3e526fb8.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +11 -2
  5. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-badge.cjs.entry.js +16 -8
  10. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-button_3.cjs.entry.js +8 -2
  14. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-dialog.cjs.entry.js +14 -4
  21. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +4 -4
  30. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-navigation-group.cjs.entry.js +16 -13
  39. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-navigation-item.cjs.entry.js +29 -33
  41. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-pagination.cjs.entry.js +5 -5
  46. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-select.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -2
  53. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-tab-context.cjs.entry.js +18 -2
  59. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-tab-panel.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-text-field.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-top-navigation.cjs.entry.js +46 -60
  69. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-typography.cjs.entry.js +11 -35
  71. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  72. package/dist/cjs/loader.cjs.js +1 -1
  73. package/dist/cjs/types-dc22e301.js.map +1 -1
  74. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +32 -2
  75. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
  76. package/dist/collection/components/ic-badge/ic-badge.js +15 -7
  77. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  78. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +2 -2
  79. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
  80. package/dist/collection/components/ic-button/ic-button.css +2 -1
  81. package/dist/collection/components/ic-button/ic-button.js +9 -0
  82. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  83. package/dist/collection/components/ic-dialog/ic-dialog.js +13 -3
  84. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  85. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +50 -0
  86. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -1
  87. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +1 -1
  88. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  89. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +16 -3
  90. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  91. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  92. package/dist/collection/components/ic-menu/ic-menu.js +2 -2
  93. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  94. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  95. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -0
  96. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +14 -11
  97. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  98. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +1 -0
  99. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +28 -32
  100. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  101. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  102. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  103. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +26 -0
  104. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  105. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +2 -2
  106. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  107. package/dist/collection/components/ic-tab/ic-tab.types.js.map +1 -1
  108. package/dist/collection/components/ic-tab-context/ic-tab-context.js +18 -2
  109. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  110. package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.e2e.js +2 -0
  111. package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.e2e.js.map +1 -1
  112. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  113. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +21 -24
  114. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +68 -59
  115. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  116. package/dist/collection/components/ic-typography/ic-typography.css +1 -4
  117. package/dist/collection/components/ic-typography/ic-typography.js +10 -113
  118. package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
  119. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js +0 -25
  120. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js.map +1 -1
  121. package/dist/collection/utils/helpers.js +44 -2
  122. package/dist/collection/utils/helpers.js.map +1 -1
  123. package/dist/collection/utils/types.js.map +1 -1
  124. package/dist/components/helpers.js +15 -3
  125. package/dist/components/helpers.js.map +1 -1
  126. package/dist/components/ic-accordion-group.js +14 -4
  127. package/dist/components/ic-accordion-group.js.map +1 -1
  128. package/dist/components/ic-badge.js +16 -8
  129. package/dist/components/ic-badge.js.map +1 -1
  130. package/dist/components/ic-button2.js +11 -3
  131. package/dist/components/ic-button2.js.map +1 -1
  132. package/dist/components/ic-card.js +1 -1
  133. package/dist/components/ic-checkbox-group.js +1 -1
  134. package/dist/components/ic-checkbox.js +1 -1
  135. package/dist/components/ic-chip.js +1 -1
  136. package/dist/components/ic-dialog.js +13 -3
  137. package/dist/components/ic-dialog.js.map +1 -1
  138. package/dist/components/ic-input-component-container2.js +1 -1
  139. package/dist/components/ic-input-component-container2.js.map +1 -1
  140. package/dist/components/ic-link2.js +1 -1
  141. package/dist/components/ic-link2.js.map +1 -1
  142. package/dist/components/ic-menu-item2.js +1 -1
  143. package/dist/components/ic-menu2.js +2 -2
  144. package/dist/components/ic-menu2.js.map +1 -1
  145. package/dist/components/ic-navigation-button.js +1 -1
  146. package/dist/components/ic-navigation-button.js.map +1 -1
  147. package/dist/components/ic-navigation-group.js +15 -12
  148. package/dist/components/ic-navigation-group.js.map +1 -1
  149. package/dist/components/ic-navigation-item.js +29 -33
  150. package/dist/components/ic-navigation-item.js.map +1 -1
  151. package/dist/components/ic-pagination-item2.js +1 -1
  152. package/dist/components/ic-pagination.js +5 -5
  153. package/dist/components/ic-pagination.js.map +1 -1
  154. package/dist/components/ic-radio-group.js +1 -1
  155. package/dist/components/ic-radio-option.js +1 -1
  156. package/dist/components/ic-search-bar.js +1 -1
  157. package/dist/components/ic-select.js +1 -1
  158. package/dist/components/ic-side-navigation.js +1 -1
  159. package/dist/components/ic-side-navigation.js.map +1 -1
  160. package/dist/components/ic-switch.js +1 -1
  161. package/dist/components/ic-tab-context.js +18 -2
  162. package/dist/components/ic-tab-context.js.map +1 -1
  163. package/dist/components/ic-tab.js +1 -1
  164. package/dist/components/ic-text-field2.js +1 -1
  165. package/dist/components/ic-text-field2.js.map +1 -1
  166. package/dist/components/ic-toggle-button.js +1 -1
  167. package/dist/components/ic-top-navigation.js +47 -61
  168. package/dist/components/ic-top-navigation.js.map +1 -1
  169. package/dist/components/ic-typography2.js +12 -38
  170. package/dist/components/ic-typography2.js.map +1 -1
  171. package/dist/components/types.js.map +1 -1
  172. package/dist/core/core.css +1 -1
  173. package/dist/core/core.esm.js +1 -1
  174. package/dist/core/core.esm.js.map +1 -1
  175. package/dist/core/{p-fbcb77a3.entry.js → p-06dcdfff.entry.js} +2 -2
  176. package/dist/core/{p-b98ce745.entry.js → p-06df74da.entry.js} +2 -2
  177. package/dist/core/p-1e2a0991.entry.js +2 -0
  178. package/dist/core/p-1e2a0991.entry.js.map +1 -0
  179. package/dist/core/p-217cbca5.entry.js +2 -0
  180. package/dist/core/p-217cbca5.entry.js.map +1 -0
  181. package/dist/core/p-26b7b18f.js.map +1 -1
  182. package/dist/core/{p-d319ddce.entry.js → p-280077b1.entry.js} +2 -2
  183. package/dist/core/{p-5e729e99.entry.js → p-28dfe4a3.entry.js} +2 -2
  184. package/dist/core/{p-123b9306.entry.js → p-2b58ca8d.entry.js} +2 -2
  185. package/dist/core/{p-a9e1966f.entry.js → p-2bf36b00.entry.js} +2 -2
  186. package/dist/core/{p-4ce5abd7.entry.js → p-2c1d7440.entry.js} +2 -2
  187. package/dist/core/p-2c1d7440.entry.js.map +1 -0
  188. package/dist/core/{p-2680b736.entry.js → p-2d753f6e.entry.js} +2 -2
  189. package/dist/core/p-2ff18bd8.entry.js +2 -0
  190. package/dist/core/p-2ff18bd8.entry.js.map +1 -0
  191. package/dist/core/{p-210412e4.entry.js → p-4851e1a7.entry.js} +2 -2
  192. package/dist/core/{p-b781b691.entry.js → p-4de169ff.entry.js} +2 -2
  193. package/dist/core/{p-aa878a3c.entry.js → p-4ebf2e93.entry.js} +2 -2
  194. package/dist/core/{p-aa878a3c.entry.js.map → p-4ebf2e93.entry.js.map} +1 -1
  195. package/dist/core/{p-bc7f99b8.entry.js → p-56352316.entry.js} +2 -2
  196. package/dist/core/{p-22a682e8.entry.js → p-5e5a29a4.entry.js} +2 -2
  197. package/dist/core/p-5eb3d65a.entry.js +2 -0
  198. package/dist/core/p-5eb3d65a.entry.js.map +1 -0
  199. package/dist/core/p-6088297e.js +2 -0
  200. package/dist/core/p-6088297e.js.map +1 -0
  201. package/dist/core/{p-fea1d095.entry.js → p-653f38a3.entry.js} +2 -2
  202. package/dist/core/p-653f38a3.entry.js.map +1 -0
  203. package/dist/core/{p-c053230d.entry.js → p-6b88deb8.entry.js} +2 -2
  204. package/dist/core/{p-5603eec3.entry.js → p-6e3aa59a.entry.js} +2 -2
  205. package/dist/core/{p-1ce0d16e.entry.js → p-71756d3b.entry.js} +2 -2
  206. package/dist/core/{p-9c18f048.entry.js → p-739c0dc6.entry.js} +2 -2
  207. package/dist/core/{p-fce3e1aa.entry.js → p-7559d77c.entry.js} +2 -2
  208. package/dist/core/p-7599e6a9.entry.js +2 -0
  209. package/dist/core/p-7599e6a9.entry.js.map +1 -0
  210. package/dist/core/{p-a98f57cf.entry.js → p-8053ad3f.entry.js} +2 -2
  211. package/dist/core/{p-2f462ec5.entry.js → p-84355a36.entry.js} +2 -2
  212. package/dist/core/p-855ee8f9.entry.js +2 -0
  213. package/dist/core/{p-6a9ddb8a.entry.js.map → p-855ee8f9.entry.js.map} +1 -1
  214. package/dist/core/{p-916f4265.entry.js → p-8560228f.entry.js} +2 -2
  215. package/dist/core/{p-4641518f.entry.js → p-8846ae12.entry.js} +2 -2
  216. package/dist/core/{p-166861e8.entry.js → p-8bc2a670.entry.js} +2 -2
  217. package/dist/core/p-8bc2a670.entry.js.map +1 -0
  218. package/dist/core/{p-dbbea7fa.entry.js → p-8e0be26c.entry.js} +2 -2
  219. package/dist/core/{p-1d352487.entry.js → p-8f3f9566.entry.js} +2 -2
  220. package/dist/core/{p-a4e7d123.entry.js → p-924495ee.entry.js} +2 -2
  221. package/dist/core/{p-95d6f3ed.entry.js → p-9637066f.entry.js} +2 -2
  222. package/dist/core/p-97b805cb.entry.js +2 -0
  223. package/dist/core/p-97b805cb.entry.js.map +1 -0
  224. package/dist/core/{p-8aa9aa25.entry.js → p-9939eaf8.entry.js} +2 -2
  225. package/dist/core/{p-80c3424f.entry.js → p-9aa9af2c.entry.js} +2 -2
  226. package/dist/core/p-aa1d2c11.entry.js +2 -0
  227. package/dist/core/p-aa1d2c11.entry.js.map +1 -0
  228. package/dist/core/{p-35b8923f.entry.js → p-b12d380e.entry.js} +2 -2
  229. package/dist/core/{p-1183031f.entry.js → p-b602729a.entry.js} +2 -2
  230. package/dist/core/{p-296b7d74.entry.js → p-b6a6c89f.entry.js} +2 -2
  231. package/dist/core/p-b9c53ac1.entry.js +2 -0
  232. package/dist/core/p-b9c53ac1.entry.js.map +1 -0
  233. package/dist/core/{p-47a9dca9.entry.js → p-bb9d3d13.entry.js} +2 -2
  234. package/dist/core/p-bb9d3d13.entry.js.map +1 -0
  235. package/dist/core/p-c6ac1a01.entry.js +2 -0
  236. package/dist/core/p-c6ac1a01.entry.js.map +1 -0
  237. package/dist/core/p-ca7ca3b8.entry.js +2 -0
  238. package/dist/core/p-ca7ca3b8.entry.js.map +1 -0
  239. package/dist/core/{p-d5f721ca.entry.js → p-d34959e1.entry.js} +2 -2
  240. package/dist/core/{p-e4863c93.entry.js → p-d932577f.entry.js} +2 -2
  241. package/dist/core/{p-d9329191.entry.js → p-db78e715.entry.js} +2 -2
  242. package/dist/core/{p-c7c2aa3c.entry.js → p-e1239a95.entry.js} +2 -2
  243. package/dist/core/{p-04506779.entry.js → p-e16edd06.entry.js} +2 -2
  244. package/dist/core/p-e3a47979.entry.js +2 -0
  245. package/dist/core/{p-e68e31ec.entry.js.map → p-e3a47979.entry.js.map} +1 -1
  246. package/dist/core/{p-46ecc4c5.entry.js → p-e7c303c1.entry.js} +2 -2
  247. package/dist/core/{p-0038a8fd.entry.js → p-ec7bf9d3.entry.js} +2 -2
  248. package/dist/esm/core.js +1 -1
  249. package/dist/esm/{helpers-f1ca9908.js → helpers-b6bbde90.js} +16 -4
  250. package/dist/esm/helpers-b6bbde90.js.map +1 -0
  251. package/dist/esm/ic-accordion-group.entry.js +11 -2
  252. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  253. package/dist/esm/ic-accordion.entry.js +1 -1
  254. package/dist/esm/ic-alert.entry.js +1 -1
  255. package/dist/esm/ic-back-to-top.entry.js +1 -1
  256. package/dist/esm/ic-badge.entry.js +16 -8
  257. package/dist/esm/ic-badge.entry.js.map +1 -1
  258. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  259. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  260. package/dist/esm/ic-button_3.entry.js +8 -2
  261. package/dist/esm/ic-button_3.entry.js.map +1 -1
  262. package/dist/esm/ic-card.entry.js +1 -1
  263. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  264. package/dist/esm/ic-checkbox.entry.js +1 -1
  265. package/dist/esm/ic-chip.entry.js +1 -1
  266. package/dist/esm/ic-data-row.entry.js +1 -1
  267. package/dist/esm/ic-dialog.entry.js +14 -4
  268. package/dist/esm/ic-dialog.entry.js.map +1 -1
  269. package/dist/esm/ic-divider.entry.js +1 -1
  270. package/dist/esm/ic-empty-state.entry.js +1 -1
  271. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  272. package/dist/esm/ic-footer-link.entry.js +1 -1
  273. package/dist/esm/ic-footer.entry.js +1 -1
  274. package/dist/esm/ic-hero.entry.js +1 -1
  275. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  276. package/dist/esm/ic-input-component-container_3.entry.js +4 -4
  277. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  278. package/dist/esm/ic-input-label_2.entry.js +1 -1
  279. package/dist/esm/ic-link.entry.js +1 -1
  280. package/dist/esm/ic-link.entry.js.map +1 -1
  281. package/dist/esm/ic-menu-group.entry.js +1 -1
  282. package/dist/esm/ic-menu-item.entry.js +1 -1
  283. package/dist/esm/ic-navigation-button.entry.js +1 -1
  284. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  285. package/dist/esm/ic-navigation-group.entry.js +16 -13
  286. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  287. package/dist/esm/ic-navigation-item.entry.js +29 -33
  288. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  289. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  290. package/dist/esm/ic-page-header.entry.js +1 -1
  291. package/dist/esm/ic-pagination-item.entry.js +1 -1
  292. package/dist/esm/ic-pagination.entry.js +5 -5
  293. package/dist/esm/ic-pagination.entry.js.map +1 -1
  294. package/dist/esm/ic-popover-menu.entry.js +1 -1
  295. package/dist/esm/ic-radio-group.entry.js +1 -1
  296. package/dist/esm/ic-radio-option.entry.js +1 -1
  297. package/dist/esm/ic-search-bar.entry.js +1 -1
  298. package/dist/esm/ic-select.entry.js +1 -1
  299. package/dist/esm/ic-side-navigation.entry.js +2 -2
  300. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  301. package/dist/esm/ic-status-tag.entry.js +1 -1
  302. package/dist/esm/ic-step.entry.js +1 -1
  303. package/dist/esm/ic-stepper.entry.js +1 -1
  304. package/dist/esm/ic-switch.entry.js +1 -1
  305. package/dist/esm/ic-tab-context.entry.js +18 -2
  306. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  307. package/dist/esm/ic-tab-group.entry.js +1 -1
  308. package/dist/esm/ic-tab-panel.entry.js +1 -1
  309. package/dist/esm/ic-tab.entry.js +1 -1
  310. package/dist/esm/ic-text-field.entry.js +1 -1
  311. package/dist/esm/ic-text-field.entry.js.map +1 -1
  312. package/dist/esm/ic-theme.entry.js +1 -1
  313. package/dist/esm/ic-toast.entry.js +1 -1
  314. package/dist/esm/ic-toggle-button.entry.js +1 -1
  315. package/dist/esm/ic-top-navigation.entry.js +46 -60
  316. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  317. package/dist/esm/ic-typography.entry.js +12 -36
  318. package/dist/esm/ic-typography.entry.js.map +1 -1
  319. package/dist/esm/loader.js +1 -1
  320. package/dist/esm/polyfills/core-js.js +0 -0
  321. package/dist/esm/polyfills/dom.js +0 -0
  322. package/dist/esm/polyfills/es5-html-element.js +0 -0
  323. package/dist/esm/polyfills/index.js +0 -0
  324. package/dist/esm/polyfills/system.js +0 -0
  325. package/dist/esm/types-6f6b41a5.js.map +1 -1
  326. package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +6 -0
  327. package/dist/types/components/ic-badge/ic-badge.d.ts +1 -0
  328. package/dist/types/components/ic-button/ic-button.d.ts +1 -0
  329. package/dist/types/components/ic-dialog/ic-dialog.d.ts +1 -0
  330. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +2 -2
  331. package/dist/types/components/ic-tab/ic-tab.types.d.ts +1 -0
  332. package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -1
  333. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +10 -5
  334. package/dist/types/components/ic-typography/ic-typography.d.ts +1 -18
  335. package/dist/types/components.d.ts +14 -29
  336. package/dist/types/interface.d.ts +0 -1
  337. package/dist/types/utils/helpers.d.ts +17 -7
  338. package/dist/types/utils/types.d.ts +1 -0
  339. package/hydrate/index.js +189 -168
  340. package/package.json +3 -2
  341. package/vscode-data.json +4 -0
  342. package/dist/cjs/helpers-d52cddc1.js.map +0 -1
  343. package/dist/collection/components/ic-page-header/test/a11y/ic-page-header.test.a11y.js +0 -13
  344. package/dist/collection/components/ic-page-header/test/a11y/ic-page-header.test.a11y.js.map +0 -1
  345. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.e2e.js +0 -177
  346. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.e2e.js.map +0 -1
  347. package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js +0 -18
  348. package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js.map +0 -1
  349. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.e2e.js +0 -128
  350. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.e2e.js.map +0 -1
  351. package/dist/collection/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.js +0 -13
  352. package/dist/collection/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.js.map +0 -1
  353. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js +0 -33
  354. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js.map +0 -1
  355. package/dist/collection/components/ic-typography/ic-typography.types.js +0 -2
  356. package/dist/collection/components/ic-typography/ic-typography.types.js.map +0 -1
  357. package/dist/core/p-0e2628eb.entry.js +0 -2
  358. package/dist/core/p-0e2628eb.entry.js.map +0 -1
  359. package/dist/core/p-166861e8.entry.js.map +0 -1
  360. package/dist/core/p-477cf469.entry.js +0 -2
  361. package/dist/core/p-477cf469.entry.js.map +0 -1
  362. package/dist/core/p-47a9dca9.entry.js.map +0 -1
  363. package/dist/core/p-47d39ce7.entry.js +0 -2
  364. package/dist/core/p-47d39ce7.entry.js.map +0 -1
  365. package/dist/core/p-4ce5abd7.entry.js.map +0 -1
  366. package/dist/core/p-53f2fc84.js +0 -2
  367. package/dist/core/p-53f2fc84.js.map +0 -1
  368. package/dist/core/p-64705a03.entry.js +0 -2
  369. package/dist/core/p-64705a03.entry.js.map +0 -1
  370. package/dist/core/p-6a9ddb8a.entry.js +0 -2
  371. package/dist/core/p-76ee6107.entry.js +0 -2
  372. package/dist/core/p-76ee6107.entry.js.map +0 -1
  373. package/dist/core/p-7b0397ea.entry.js +0 -2
  374. package/dist/core/p-7b0397ea.entry.js.map +0 -1
  375. package/dist/core/p-91768ddf.entry.js +0 -2
  376. package/dist/core/p-91768ddf.entry.js.map +0 -1
  377. package/dist/core/p-aa777792.entry.js +0 -2
  378. package/dist/core/p-aa777792.entry.js.map +0 -1
  379. package/dist/core/p-cf798ea7.entry.js +0 -2
  380. package/dist/core/p-cf798ea7.entry.js.map +0 -1
  381. package/dist/core/p-df090fc1.entry.js +0 -2
  382. package/dist/core/p-df090fc1.entry.js.map +0 -1
  383. package/dist/core/p-e68e31ec.entry.js +0 -2
  384. package/dist/core/p-fea1d095.entry.js.map +0 -1
  385. package/dist/esm/helpers-f1ca9908.js.map +0 -1
  386. package/dist/types/components/ic-page-header/test/a11y/ic-page-header.test.a11y.d.ts +0 -1
  387. package/dist/types/components/ic-pagination/test/a11y/ic-pagination.test.a11y.d.ts +0 -1
  388. package/dist/types/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.d.ts +0 -1
  389. package/dist/types/components/ic-typography/ic-typography.types.d.ts +0 -4
  390. /package/dist/core/{p-fbcb77a3.entry.js.map → p-06dcdfff.entry.js.map} +0 -0
  391. /package/dist/core/{p-b98ce745.entry.js.map → p-06df74da.entry.js.map} +0 -0
  392. /package/dist/core/{p-d319ddce.entry.js.map → p-280077b1.entry.js.map} +0 -0
  393. /package/dist/core/{p-5e729e99.entry.js.map → p-28dfe4a3.entry.js.map} +0 -0
  394. /package/dist/core/{p-123b9306.entry.js.map → p-2b58ca8d.entry.js.map} +0 -0
  395. /package/dist/core/{p-a9e1966f.entry.js.map → p-2bf36b00.entry.js.map} +0 -0
  396. /package/dist/core/{p-2680b736.entry.js.map → p-2d753f6e.entry.js.map} +0 -0
  397. /package/dist/core/{p-210412e4.entry.js.map → p-4851e1a7.entry.js.map} +0 -0
  398. /package/dist/core/{p-b781b691.entry.js.map → p-4de169ff.entry.js.map} +0 -0
  399. /package/dist/core/{p-bc7f99b8.entry.js.map → p-56352316.entry.js.map} +0 -0
  400. /package/dist/core/{p-22a682e8.entry.js.map → p-5e5a29a4.entry.js.map} +0 -0
  401. /package/dist/core/{p-c053230d.entry.js.map → p-6b88deb8.entry.js.map} +0 -0
  402. /package/dist/core/{p-5603eec3.entry.js.map → p-6e3aa59a.entry.js.map} +0 -0
  403. /package/dist/core/{p-1ce0d16e.entry.js.map → p-71756d3b.entry.js.map} +0 -0
  404. /package/dist/core/{p-9c18f048.entry.js.map → p-739c0dc6.entry.js.map} +0 -0
  405. /package/dist/core/{p-fce3e1aa.entry.js.map → p-7559d77c.entry.js.map} +0 -0
  406. /package/dist/core/{p-a98f57cf.entry.js.map → p-8053ad3f.entry.js.map} +0 -0
  407. /package/dist/core/{p-2f462ec5.entry.js.map → p-84355a36.entry.js.map} +0 -0
  408. /package/dist/core/{p-916f4265.entry.js.map → p-8560228f.entry.js.map} +0 -0
  409. /package/dist/core/{p-4641518f.entry.js.map → p-8846ae12.entry.js.map} +0 -0
  410. /package/dist/core/{p-dbbea7fa.entry.js.map → p-8e0be26c.entry.js.map} +0 -0
  411. /package/dist/core/{p-1d352487.entry.js.map → p-8f3f9566.entry.js.map} +0 -0
  412. /package/dist/core/{p-a4e7d123.entry.js.map → p-924495ee.entry.js.map} +0 -0
  413. /package/dist/core/{p-95d6f3ed.entry.js.map → p-9637066f.entry.js.map} +0 -0
  414. /package/dist/core/{p-8aa9aa25.entry.js.map → p-9939eaf8.entry.js.map} +0 -0
  415. /package/dist/core/{p-80c3424f.entry.js.map → p-9aa9af2c.entry.js.map} +0 -0
  416. /package/dist/core/{p-35b8923f.entry.js.map → p-b12d380e.entry.js.map} +0 -0
  417. /package/dist/core/{p-1183031f.entry.js.map → p-b602729a.entry.js.map} +0 -0
  418. /package/dist/core/{p-296b7d74.entry.js.map → p-b6a6c89f.entry.js.map} +0 -0
  419. /package/dist/core/{p-d5f721ca.entry.js.map → p-d34959e1.entry.js.map} +0 -0
  420. /package/dist/core/{p-e4863c93.entry.js.map → p-d932577f.entry.js.map} +0 -0
  421. /package/dist/core/{p-d9329191.entry.js.map → p-db78e715.entry.js.map} +0 -0
  422. /package/dist/core/{p-c7c2aa3c.entry.js.map → p-e1239a95.entry.js.map} +0 -0
  423. /package/dist/core/{p-04506779.entry.js.map → p-e16edd06.entry.js.map} +0 -0
  424. /package/dist/core/{p-46ecc4c5.entry.js.map → p-e7c303c1.entry.js.map} +0 -0
  425. /package/dist/core/{p-0038a8fd.entry.js.map → p-ec7bf9d3.entry.js.map} +0 -0
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
6
  const types = require('./types-dc22e301.js');
7
- const helpers = require('./helpers-d52cddc1.js');
7
+ const helpers = require('./helpers-3e526fb8.js');
8
8
 
9
- const icTopNavigationCss = "/*! 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;color:var(--ic-theme-text);width:100%;position:relative}:host .top-navigation{background-color:var(--ic-theme-primary);height:-moz-max-content;height:max-content}:host(.fullwidth-searchbar) slot[name=\"search\"]::slotted(form){width:100%}:host .title-link{display:inline-flex;align-items:center;text-decoration:none;padding:var(--ic-space-xxs);transition:var(--ic-easing-transition-fast)}:host .title-link,:host .title-link:visited,:host .title-link:active,:host .title-link ::slotted(a),:host .title-link:visited ::slotted(a),:host .title-link:active ::slotted(a){color:var(--ic-theme-text);text-decoration:none;outline:none}:host .title-link:hover:not(:focus){background-color:var(--ic-theme-hover)}:host .title-link:active:not(:focus){background-color:var(--ic-theme-active)}:host .title-link:hover{border-radius:var(--ic-border-radius)}:host .title-link:focus,:host .title-link:focus-within{border-radius:var(--ic-border-radius);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}:host .title-link ic-typography{font-weight:600}:host .nav-panel-container{border-top:var(--ic-keyline-lighten);padding:0 var(--ic-space-lg);margin-left:calc(-1 * var(--section-container-margin));margin-right:calc(-1 * var(--section-container-margin));display:flex}:host(.dark) .nav-panel-container{border-top:var(--ic-keyline-darken)}.top-panel-container{display:flex;padding-top:0.5rem;padding-bottom:0.5rem}.navigation-tabs{margin-top:calc(-1 * var(--ic-space-1px))}.app-details-container{display:flex;align-items:center;flex:1 1 auto;margin-right:var(--ic-space-md)}.app-icon-container{display:flex;padding-right:var(--ic-space-xs)}.icon-buttons-container{display:flex;margin-left:var(--ic-space-md)}.icon-buttons-container ::slotted(nav){display:flex}.title-wrap{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}:host .app-status{border-radius:var(--ic-space-md);background-color:var(--ic-architectural-white);color:var(--ic-color-primary-text);padding:var(--ic-space-xxs) var(--ic-space-lg);margin-left:var(--ic-space-md);flex:1 1 0;max-width:-moz-fit-content;max-width:fit-content}:host(.dark) .app-status{background-color:var(--ic-theme-text);color:var(--ic-color-white-text)}:host .app-version{border-radius:var(--ic-space-md);background-color:var(--ic-theme-active);padding:var(--ic-space-xxs) var(--ic-space-sm);margin-left:var(--ic-space-xs);flex:1 1 0;max-width:-moz-fit-content;max-width:fit-content}slot[name=\"app-icon\"]::slotted(*){fill:var(--ic-theme-text);width:2em;height:2em}slot[name=\"toggle-icon\"] svg{fill:var(--ic-theme-text)}.search-menu-container{justify-content:right;display:flex;align-items:center}.menu-button-container{margin-left:var(--ic-space-md)}.menu-button-container .navigation-landmark-button-text{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.search-actions-container{display:flex}.menu-buttons-slot{display:flex;flex-direction:column}.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}.navigation-item-list{display:flex;list-style:none;height:2.75rem}.navigation-item-list::-webkit-scrollbar{display:none}:host ic-section-container{padding-bottom:0 !important;padding-top:0 !important}@media screen and (min-width: 993px){.app-details-container{margin-right:var(--ic-space-lg)}}@media screen and (max-width: 1200px){:host .nav-panel-container{padding:0 var(--ic-space-md)}}@media screen and (max-width: 992px){:host .nav-panel-container,:host .app-status,:host .app-version{display:none}:host .title-link{margin-right:var(--ic-space-xs)}.search-menu-container{max-width:10rem}.search-bar-container{display:flex;justify-content:center;align-items:center;border-top:var(--ic-keyline-darken);height:4rem;padding-left:var(--ic-space-md);padding-right:var(--ic-space-md);margin-left:calc(-1 * var(--section-container-margin));margin-right:calc(-1 * var(--section-container-margin))}}@media screen and (max-width: 576px){:host .title-link{margin-right:var(--ic-space-xxxs);word-break:break-word;-webkit-hyphens:none;hyphens:none}.top-panel-container{min-height:2.5rem}.search-bar-container{margin-top:0;height:3.5rem;padding-left:var(--ic-space-xs);padding-right:var(--ic-space-xs)}.menu-button-container{margin-left:var(--ic-space-sm)}slot[name=\"app-icon\"]::slotted(*){width:1.5em;height:1.5em}slot[name=\"toggle-icon\"] svg{width:1.5em;height:1.5em}}@media (forced-colors: active){:host .top-navigation{border-bottom:var(--ic-hc-border)}.app-status,.app-version{border:var(--ic-hc-border)}slot[name=\"app-icon\"]::slotted(*){fill:currentcolor}}";
9
+ const icTopNavigationCss = "/*! 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;color:var(--ic-theme-text);width:100%;position:relative}:host .top-navigation{background-color:var(--ic-theme-primary);height:-moz-max-content;height:max-content}:host(.fullwidth-searchbar) slot[name=\"search\"]::slotted(form){width:100%}:host .title-link{display:inline-flex;align-items:center;text-decoration:none;padding:var(--ic-space-xxs);transition:var(--ic-easing-transition-fast)}:host .title-link,:host .title-link:visited,:host .title-link:active,:host .title-link ::slotted(a),:host .title-link:visited ::slotted(a),:host .title-link:active ::slotted(a){color:var(--ic-theme-text);text-decoration:none;outline:none}:host .title-link:hover:not(:focus){background-color:var(--ic-theme-hover)}:host .title-link:active:not(:focus){background-color:var(--ic-theme-active)}:host .title-link:hover{border-radius:var(--ic-border-radius)}:host .title-link:focus,:host .title-link:focus-within{border-radius:var(--ic-border-radius);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}:host .title-link ic-typography{font-weight:600}:host .nav-panel-container{border-top:var(--ic-keyline-lighten);padding:0 var(--ic-space-lg);margin-left:calc(-1 * var(--section-container-margin));margin-right:calc(-1 * var(--section-container-margin));display:flex}:host(.dark) .nav-panel-container{border-top:var(--ic-keyline-darken)}.top-panel-container{display:flex;padding-top:0.5rem;padding-bottom:0.5rem}.navigation-tabs{margin-top:calc(-1 * var(--ic-space-1px))}.app-details-container{display:flex;align-items:center;flex:1 1 auto;margin-right:var(--ic-space-md)}.app-icon-container{display:flex;padding-right:var(--ic-space-xs)}.icon-buttons-container{display:flex;margin-left:var(--ic-space-md)}.icon-buttons-container ::slotted(nav){display:flex}.title-wrap{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}:host .app-status{border-radius:var(--ic-space-md);background-color:var(--ic-architectural-white);color:var(--ic-color-primary-text);padding:var(--ic-space-xxs) var(--ic-space-lg);margin-left:var(--ic-space-md);flex:1 1 0;max-width:-moz-fit-content;max-width:fit-content}:host(.dark) .app-status{background-color:var(--ic-theme-text);color:var(--ic-color-white-text)}:host .app-version{border-radius:var(--ic-space-md);background-color:var(--ic-theme-active);padding:var(--ic-space-xxs) var(--ic-space-sm);margin-left:var(--ic-space-xs);flex:1 1 0;max-width:-moz-fit-content;max-width:fit-content}slot[name=\"app-icon\"]::slotted(*){fill:var(--ic-theme-text);width:2em;height:2em}slot[name=\"toggle-icon\"] svg{fill:var(--ic-theme-text)}.search-menu-container{justify-content:right;display:flex;align-items:center}.menu-button-container{margin-left:var(--ic-space-md)}.menu-button-container .navigation-landmark-button-text{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.search-actions-container{display:flex}.menu-buttons-slot{display:flex;flex-direction:column}.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}.navigation-item-list{display:flex;list-style:none;height:2.75rem}.navigation-item-list::-webkit-scrollbar{display:none}:host ic-section-container{padding-bottom:0 !important;padding-top:0 !important}@media screen and (min-width: 993px){.app-details-container{margin-right:var(--ic-space-lg)}}@media screen and (max-width: 1200px){:host .nav-panel-container{padding:0 var(--ic-space-md)}}:host(.mobile-mode) .app-status,:host(.mobile-mode) .app-version{display:none}:host(.mobile-mode) .title-link{margin-right:var(--ic-space-xs)}:host(.mobile-mode) .search-menu-container{max-width:10rem}:host(.mobile-mode) .search-bar-container{display:flex;justify-content:center;align-items:center;border-top:var(--ic-keyline-darken);height:4rem;padding-left:var(--ic-space-md);padding-right:var(--ic-space-md);margin-left:calc(-1 * var(--section-container-margin));margin-right:calc(-1 * var(--section-container-margin))}@media screen and (max-width: 576px){:host .title-link{margin-right:var(--ic-space-xxxs);word-break:break-word;-webkit-hyphens:none;hyphens:none}.top-panel-container{min-height:2.5rem}.search-bar-container{margin-top:0;height:3.5rem;padding-left:var(--ic-space-xs);padding-right:var(--ic-space-xs)}.menu-button-container{margin-left:var(--ic-space-sm)}slot[name=\"app-icon\"]::slotted(*){width:1.5em;height:1.5em}slot[name=\"toggle-icon\"] svg{width:1.5em;height:1.5em}}@media (forced-colors: active){:host .top-navigation{border-bottom:var(--ic-hc-border)}.app-status,.app-version{border:var(--ic-hc-border)}slot[name=\"app-icon\"]::slotted(*){fill:currentcolor}}";
10
10
 
11
11
  const TopNavigation = class {
12
12
  constructor(hostRef) {
@@ -23,10 +23,10 @@ const TopNavigation = class {
23
23
  this.initialiseSearchBar = () => {
24
24
  if (this.hasSearchSlotContent) {
25
25
  const slot = helpers.getSlot(this.el, "search");
26
- if (slot && slot.tagName === "IC-SEARCH-BAR") {
26
+ if ((slot === null || slot === void 0 ? void 0 : slot.tagName) === "IC-SEARCH-BAR") {
27
27
  this.searchBar = slot;
28
28
  }
29
- else if (slot && slot.tagName === "FORM") {
29
+ else if ((slot === null || slot === void 0 ? void 0 : slot.tagName) === "FORM") {
30
30
  this.searchBar = slot.querySelector("ic-search-bar");
31
31
  }
32
32
  if (this.searchBar !== null) {
@@ -45,9 +45,10 @@ const TopNavigation = class {
45
45
  this.searchButtonClick = false;
46
46
  };
47
47
  this.resizeObserverCallback = (currSize) => {
48
+ var _a;
48
49
  if (currSize !== this.deviceSize) {
49
50
  this.deviceSize = currSize;
50
- if (currSize > helpers.DEVICE_SIZES.L) {
51
+ if (currSize > this.customMobileBreakpoint) {
51
52
  this.showNavMenu(false);
52
53
  if (this.mobileSearchBarVisible) {
53
54
  this.toggleSearchBar();
@@ -56,9 +57,7 @@ const TopNavigation = class {
56
57
  this.topNavResized.emit({
57
58
  size: currSize,
58
59
  });
59
- if (document.activeElement !== null &&
60
- document.activeElement !== undefined &&
61
- document.activeElement.tagName === "IC-SEARCH-BAR") {
60
+ if (((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName) === "IC-SEARCH-BAR") {
62
61
  this.searchBar.setAttribute("hidden", "true");
63
62
  //remove attribute again as this trigger a redraw & applies css
64
63
  this.searchBar.removeAttribute("hidden");
@@ -70,21 +69,20 @@ const TopNavigation = class {
70
69
  };
71
70
  this.runResizeObserver = () => {
72
71
  this.resizeObserver = new ResizeObserver(() => {
73
- const currSize = helpers.getCurrentDeviceSize();
74
- this.resizeObserverCallback(currSize);
72
+ this.resizeObserverCallback(helpers.getCurrentDeviceSize());
75
73
  });
76
74
  this.resizeObserver.observe(this.el);
77
75
  };
78
76
  this.deviceSize = helpers.DEVICE_SIZES.XL;
79
77
  this.foregroundColor = helpers.getThemeForegroundColor();
80
78
  this.hasFullWidthSearchBar = false;
81
- this.menuOpen = false;
82
79
  this.mobileSearchBarVisible = false;
83
80
  this.mobileSearchHiddenOnBlur = false;
84
81
  this.navMenuVisible = false;
85
82
  this.searchButtonClick = false;
86
83
  this.searchValue = "";
87
84
  this.contentAligned = "full-width";
85
+ this.customMobileBreakpoint = helpers.DEVICE_SIZES.L;
88
86
  this.href = "/";
89
87
  this.inline = false;
90
88
  this.shortAppTitle = "";
@@ -123,41 +121,34 @@ const TopNavigation = class {
123
121
  }
124
122
  navBarMenuCloseHandler() {
125
123
  this.showNavMenu(false);
126
- const menuBtn = this.el.shadowRoot.querySelector("#menu-button");
127
- menuBtn.focus();
124
+ this.el.shadowRoot.querySelector("#menu-button").focus();
128
125
  }
129
- searchInputBlurHandler(ev) {
130
- if (ev.detail !== null) {
126
+ searchInputBlurHandler({ detail, }) {
127
+ if (detail !== null) {
131
128
  if (this.mobileSearchBarVisible && !this.searchButtonClick) {
132
129
  //don't hide if blur was triggered by click on search button - let the click handler toggle the state
133
130
  this.toggleSearchBar();
134
131
  }
135
- this.searchValue = ev.detail.value;
132
+ this.searchValue = detail.value;
136
133
  }
137
134
  }
138
- searchValueChangeHandler(ev) {
139
- this.searchValue = ev.detail.value;
135
+ searchValueChangeHandler({ detail }) {
136
+ this.searchValue = detail.value;
140
137
  }
141
- themeChangeHandler(ev) {
142
- const theme = ev.detail;
143
- this.foregroundColor = theme.mode;
138
+ themeChangeHandler({ detail }) {
139
+ this.foregroundColor = detail.mode;
144
140
  }
145
141
  toggleSearchBar() {
146
142
  this.mobileSearchBarVisible = !this.mobileSearchBarVisible;
147
143
  if (this.searchBar !== null) {
144
+ this.mobileSearchButtonEl.setAttribute("aria-label", `${this.mobileSearchBarVisible ? "Hide" : "Show"} search`);
145
+ this.hasFullWidthSearchBar = this.mobileSearchBarVisible;
146
+ this.searchBar.fullWidth = this.mobileSearchBarVisible;
148
147
  if (this.mobileSearchBarVisible) {
149
- this.mobileSearchButtonEl.setAttribute("aria-label", "Hide search");
150
- this.hasFullWidthSearchBar = true;
151
- this.searchBar.fullWidth = true;
152
148
  setTimeout(() => {
153
149
  this.searchBar.focus();
154
150
  }, 100);
155
151
  }
156
- else {
157
- this.mobileSearchButtonEl.setAttribute("aria-label", "Show search");
158
- this.hasFullWidthSearchBar = false;
159
- this.searchBar.fullWidth = false;
160
- }
161
152
  }
162
153
  }
163
154
  showNavMenu(show) {
@@ -174,40 +165,35 @@ const TopNavigation = class {
174
165
  }
175
166
  }
176
167
  render() {
177
- const hasMenuContent = this.hasNavigation ||
178
- this.hasIconButtons ||
179
- this.status !== "" ||
180
- this.version !== "";
181
- const searchButtonSize = this.deviceSize <= helpers.DEVICE_SIZES.S ? "default" : "large";
182
- let appTitleVariant = "h3";
183
- const hasTitle = this.appTitle !== "" && helpers.isPropDefined(this.appTitle);
184
- if (this.deviceSize <= helpers.DEVICE_SIZES.L) {
185
- appTitleVariant = "h4";
186
- if (this.deviceSize <= helpers.DEVICE_SIZES.S) {
187
- appTitleVariant = "subtitle-small";
188
- }
189
- }
190
- const mobileSearchButtonTitle = this.mobileSearchBarVisible
191
- ? "Hide search"
192
- : "Show search";
193
- const menuSize = this.deviceSize <= helpers.DEVICE_SIZES.S ? "small" : "default";
194
- const Component = helpers.isSlotUsed(this.el, "app-title") ? "div" : "a";
168
+ const { appTitle, contentAligned, customMobileBreakpoint, deviceSize, el, foregroundColor, hasAppIcon, hasFullWidthSearchBar, hasIconButtons, hasNavigation, hasSearchSlotContent, href, inline, menuButtonClick, mobileSearchBarVisible, navMenuVisible, searchButtonClickHandler, searchButtonMouseDownHandler, shortAppTitle, status, version, } = this;
169
+ const hasStatus = status !== "";
170
+ const hasVersion = version !== "";
171
+ const hasMenuContent = hasNavigation || hasIconButtons || hasStatus || hasVersion;
172
+ const searchButtonSize = deviceSize <= helpers.DEVICE_SIZES.S ? "default" : "large";
173
+ const hasTitle = appTitle !== "" && helpers.isPropDefined(appTitle);
174
+ const overMobileBreakpoint = deviceSize <= customMobileBreakpoint;
175
+ const appTitleVariant = overMobileBreakpoint
176
+ ? deviceSize <= helpers.DEVICE_SIZES.S
177
+ ? "subtitle-small"
178
+ : "h4"
179
+ : "h3";
180
+ const mobileSearchButtonTitle = `${mobileSearchBarVisible ? "Hide" : "Show"} search`;
181
+ const menuSize = deviceSize <= helpers.DEVICE_SIZES.S ? "small" : "default";
182
+ const shortAppTitleSlot = helpers.isSlotUsed(el, "short-app-title");
183
+ const hasAppTitleSlot = helpers.isSlotUsed(el, "app-title");
184
+ const Component = hasAppTitleSlot ? "div" : "a";
195
185
  const attrs = Component == "a" && {
196
- href: this.href,
186
+ href: href,
197
187
  };
198
- const shortAppTitleSlot = helpers.isSlotUsed(this.el, "short-app-title");
199
188
  return (index.h(index.Host, { class: {
200
- ["fullwidth-searchbar"]: this.hasFullWidthSearchBar,
201
- [types.IcThemeForegroundEnum.Dark]: this.foregroundColor === types.IcThemeForegroundEnum.Dark,
202
- } }, index.h("div", { class: "top-navigation" }, index.h("ic-section-container", { aligned: this.contentAligned, "full-height": true }, index.h("header", { role: "banner" }, index.h("div", { class: "top-panel-container" }, index.h("div", { class: "app-details-container" }, (hasTitle || helpers.isSlotUsed(this.el, "app-title")) && (index.h(Component, Object.assign({ class: "title-link" }, attrs), this.hasAppIcon && (index.h("div", { class: "app-icon-container" }, index.h("slot", { name: "app-icon" }))), this.deviceSize <= helpers.DEVICE_SIZES.S &&
203
- (!helpers.isEmptyString(this.shortAppTitle) ||
204
- shortAppTitleSlot) ? (index.h("ic-typography", { variant: "subtitle-small", "aria-label": (!helpers.isSlotUsed(this.el, "app-title") ||
205
- !shortAppTitleSlot) &&
206
- `${this.appTitle} (${this.shortAppTitle})` }, index.h("h1", null, shortAppTitleSlot ? (index.h("slot", { name: "short-app-title" })) : (this.shortAppTitle)))) : (index.h("ic-typography", { variant: appTitleVariant }, index.h("h1", { class: "title-wrap" }, helpers.isSlotUsed(this.el, "app-title") ? (index.h("slot", { name: "app-title" })) : (this.appTitle)))))), this.status !== "" && (index.h("div", { class: "app-status" }, index.h("ic-typography", { "aria-label": "app tag", variant: "label-uppercase", class: "app-status-text" }, this.status))), this.version !== "" && (index.h("div", { class: "app-version" }, index.h("ic-typography", { variant: "label", class: "app-version-text", "aria-label": "app version" }, this.version)))), (this.hasSearchSlotContent || hasMenuContent) && (index.h("div", { class: "search-menu-container" }, index.h("div", { class: "search-actions-container" }, this.deviceSize > helpers.DEVICE_SIZES.L && (index.h("slot", { name: "search" })), this.hasSearchSlotContent &&
207
- this.deviceSize <= helpers.DEVICE_SIZES.L && (index.h("ic-button", { id: "search-toggle-button", ref: (el) => (this.mobileSearchButtonEl = el), onMouseDown: this.searchButtonMouseDownHandler, variant: "icon", size: searchButtonSize, "aria-label": mobileSearchButtonTitle, appearance: this.foregroundColor, onClick: this.searchButtonClickHandler }, index.h("slot", { name: "toggle-icon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#ffffff" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" }))))), this.hasIconButtons &&
208
- this.deviceSize > helpers.DEVICE_SIZES.L && (index.h("div", { class: "icon-buttons-container" }, index.h("slot", { name: "buttons" }))), hasMenuContent && this.deviceSize <= helpers.DEVICE_SIZES.L && (index.h("div", { class: "menu-button-container" }, index.h("span", { id: "navigation-landmark-button-text", class: "navigation-landmark-button-text", "aria-hidden": "true" }, "Main navigation button"), index.h("nav", { "aria-labelledby": "navigation-landmark-button-text", "aria-hidden": this.navMenuVisible ? "true" : "false" }, index.h("ic-button", { id: "menu-button", appearance: this.foregroundColor, variant: "secondary", "aria-expanded": this.menuOpen ? "true" : "false", "aria-haspopup": "true", "aria-label": `Open ${this.hasNavigation ? "navigation" : "app"} menu`, size: menuSize, onClick: this.menuButtonClick }, "Menu", index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#ffffff", slot: "icon" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" })))))))))), this.mobileSearchBarVisible && (index.h("div", { class: "search-bar-container" }, index.h("slot", { name: "search" }))), this.hasNavigation && this.deviceSize > helpers.DEVICE_SIZES.L && (index.h("div", { class: "navigation-tabs" }, index.h("span", { id: "navigation-landmark-text", class: "navigation-landmark-text", "aria-hidden": "true" }, "Main pages"), index.h("nav", { "aria-labelledby": "navigation-landmark-text", class: "nav-panel-container" }, index.h("ic-horizontal-scroll", { appearance: this.foregroundColor }, index.h("ul", { class: "navigation-item-list", tabindex: "-1" }, index.h("slot", { name: "navigation" }))))))))), this.navMenuVisible && (index.h("ic-navigation-menu", { version: this.version, status: this.status, class: {
209
- ["inline"]: this.inline,
210
- } }, this.hasIconButtons && (index.h("div", { class: "menu-buttons-slot", slot: "buttons" }, index.h("slot", { name: "buttons" }))), index.h("ul", { slot: "navigation" }, index.h("slot", { name: "navigation" }))))));
189
+ "fullwidth-searchbar": hasFullWidthSearchBar,
190
+ "mobile-mode": overMobileBreakpoint,
191
+ [types.IcThemeForegroundEnum.Dark]: foregroundColor === types.IcThemeForegroundEnum.Dark,
192
+ } }, index.h("div", { class: "top-navigation" }, index.h("ic-section-container", { aligned: contentAligned, "full-height": true }, index.h("header", { role: "banner" }, index.h("div", { class: "top-panel-container" }, index.h("div", { class: "app-details-container" }, (hasTitle || hasAppTitleSlot) && (index.h(Component, Object.assign({ class: "title-link" }, attrs), hasAppIcon && (index.h("div", { class: "app-icon-container" }, index.h("slot", { name: "app-icon" }))), deviceSize <= helpers.DEVICE_SIZES.S &&
193
+ (!helpers.isEmptyString(shortAppTitle) || shortAppTitleSlot) ? (index.h("ic-typography", { variant: "subtitle-small", "aria-label": (!hasAppTitleSlot || !shortAppTitleSlot) &&
194
+ `${appTitle} (${shortAppTitle})` }, index.h("h1", null, shortAppTitleSlot ? (index.h("slot", { name: "short-app-title" })) : (shortAppTitle)))) : (index.h("ic-typography", { variant: appTitleVariant }, index.h("h1", { class: "title-wrap" }, hasAppTitleSlot ? (index.h("slot", { name: "app-title" })) : (appTitle)))))), hasStatus && (index.h("div", { class: "app-status" }, index.h("ic-typography", { "aria-label": "app tag", variant: "label-uppercase", class: "app-status-text" }, status))), hasVersion && (index.h("div", { class: "app-version" }, index.h("ic-typography", { variant: "label", class: "app-version-text", "aria-label": "app version" }, version)))), (hasSearchSlotContent || hasMenuContent) && (index.h("div", { class: "search-menu-container" }, index.h("div", { class: "search-actions-container" }, !overMobileBreakpoint && index.h("slot", { name: "search" }), hasSearchSlotContent && overMobileBreakpoint && (index.h("ic-button", { id: "search-toggle-button", ref: (el) => (this.mobileSearchButtonEl = el), onMouseDown: searchButtonMouseDownHandler, variant: "icon", size: searchButtonSize, "aria-label": mobileSearchButtonTitle, appearance: foregroundColor, onClick: searchButtonClickHandler }, index.h("slot", { name: "toggle-icon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#ffffff" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" }))))), hasIconButtons && !overMobileBreakpoint && (index.h("div", { class: "icon-buttons-container" }, index.h("slot", { name: "buttons" }))), hasMenuContent && overMobileBreakpoint && (index.h("div", { class: "menu-button-container" }, index.h("span", { id: "navigation-landmark-button-text", class: "navigation-landmark-button-text", "aria-hidden": "true" }, "Main navigation button"), index.h("nav", { "aria-labelledby": "navigation-landmark-button-text", "aria-hidden": `${navMenuVisible}` }, index.h("ic-button", { id: "menu-button", appearance: foregroundColor, variant: "secondary", "aria-expanded": "false", "aria-haspopup": "true", "aria-label": `Open ${hasNavigation ? "navigation" : "app"} menu`, size: menuSize, onClick: menuButtonClick }, "Menu", index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#ffffff", slot: "icon" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" })))))))))), mobileSearchBarVisible && (index.h("div", { class: "search-bar-container" }, index.h("slot", { name: "search" }))), hasNavigation && !overMobileBreakpoint && (index.h("div", { class: "navigation-tabs" }, index.h("span", { id: "navigation-landmark-text", class: "navigation-landmark-text", "aria-hidden": "true" }, "Main pages"), index.h("nav", { "aria-labelledby": "navigation-landmark-text", class: "nav-panel-container" }, index.h("ic-horizontal-scroll", { appearance: foregroundColor }, index.h("ul", { class: "navigation-item-list", tabindex: "-1" }, index.h("slot", { name: "navigation" }))))))))), navMenuVisible && (index.h("ic-navigation-menu", { version: version, status: status, class: {
195
+ ["inline"]: inline,
196
+ } }, hasIconButtons && (index.h("div", { class: "menu-buttons-slot", slot: "buttons" }, index.h("slot", { name: "buttons" }))), index.h("ul", { slot: "navigation" }, index.h("slot", { name: "navigation" }))))));
211
197
  }
212
198
  get el() { return index.getElement(this); }
213
199
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"ic-top-navigation.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,kBAA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I,EAAC,MAAM,IAEXA,kBAAM,CAAC,EAAC,iBAAiB,EAAC,IAAI,EAAC,MAAM,GAAG,EACxCA,kBAAM,CAAC,EAAC,+CAA+C,GAAG,CACtD,CACI,CACR,CACF,CACP,CACG,CACF,CACP,CACG,EAEL,IAAI,CAAC,sBAAsB,KAC1BA,iBAAK,KAAK,EAAC,sBAAsB,IAC/BA,kBAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACP,EAEA,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,GAAGR,oBAAY,CAAC,CAAC,KACrDQ,iBAAK,KAAK,EAAC,iBAAiB,IAC1BA,kBACE,EAAE,EAAC,0BAA0B,EAC7B,KAAK,EAAC,0BAA0B,iBACpB,MAAM,iBAGb,EACPA,oCACkB,0BAA0B,EAC1C,KAAK,EAAC,qBAAqB,IAE3BA,kCAAsB,UAAU,EAAE,IAAI,CAAC,eAAe,IACpDA,gBAAI,KAAK,EAAC,sBAAsB,EAAC,QAAQ,EAAC,IAAI,IAC5CA,kBAAM,IAAI,EAAC,YAAY,GAAQ,CAC5B,CACgB,CACnB,CACF,CACP,CACM,CACY,CACnB,EACL,IAAI,CAAC,cAAc,KAClBA,gCACE,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE;gBACL,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM;aACxB,IAEA,IAAI,CAAC,cAAc,KAClBA,iBAAK,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,SAAS,IAC3CA,kBAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACP,EACDA,gBAAI,IAAI,EAAC,YAAY,IACnBA,kBAAM,IAAI,EAAC,YAAY,GAAQ,CAC5B,CACc,CACtB,CACI,EACP;KACH;;;;;;;;;;","names":["getSlot","DEVICE_SIZES","getCurrentDeviceSize","getThemeForegroundColor","onComponentPropUndefinedChange","isSlotUsed","checkResizeObserver","onComponentRequiredPropUndefined","isPropDefined","h","Host","IcThemeForegroundEnum","isEmptyString"],"sources":["src/components/ic-top-navigation/ic-top-navigation.css?tag=ic-top-navigation&encapsulation=shadow","src/components/ic-top-navigation/ic-top-navigation.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n color: var(--ic-theme-text);\n width: 100%;\n position: relative;\n}\n\n:host .top-navigation {\n background-color: var(--ic-theme-primary);\n height: max-content;\n}\n\n:host(.fullwidth-searchbar) slot[name=\"search\"]::slotted(form) {\n width: 100%;\n}\n\n:host .title-link {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n padding: var(--ic-space-xxs);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host .title-link,\n:host .title-link:visited,\n:host .title-link:active,\n:host .title-link ::slotted(a),\n:host .title-link:visited ::slotted(a),\n:host .title-link:active ::slotted(a) {\n color: var(--ic-theme-text);\n text-decoration: none;\n outline: none;\n}\n\n:host .title-link:hover:not(:focus) {\n background-color: var(--ic-theme-hover);\n}\n\n:host .title-link:active:not(:focus) {\n background-color: var(--ic-theme-active);\n}\n\n:host .title-link:hover {\n border-radius: var(--ic-border-radius);\n}\n\n:host .title-link:focus,\n:host .title-link:focus-within {\n border-radius: var(--ic-border-radius);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host .title-link ic-typography {\n font-weight: 600;\n}\n\n:host .nav-panel-container {\n border-top: var(--ic-keyline-lighten);\n padding: 0 var(--ic-space-lg);\n margin-left: calc(-1 * var(--section-container-margin));\n margin-right: calc(-1 * var(--section-container-margin));\n display: flex;\n}\n\n:host(.dark) .nav-panel-container {\n border-top: var(--ic-keyline-darken);\n}\n\n.top-panel-container {\n display: flex;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.navigation-tabs {\n margin-top: calc(-1 * var(--ic-space-1px));\n}\n\n.app-details-container {\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n margin-right: var(--ic-space-md);\n}\n\n.app-icon-container {\n display: flex;\n padding-right: var(--ic-space-xs);\n}\n\n.icon-buttons-container {\n display: flex;\n margin-left: var(--ic-space-md);\n}\n\n.icon-buttons-container ::slotted(nav) {\n display: flex;\n}\n\n.title-wrap {\n overflow-wrap: break-word;\n word-wrap: break-word;\n -ms-word-break: break-all;\n word-break: break-word;\n hyphens: auto;\n}\n\n:host .app-status {\n border-radius: var(--ic-space-md);\n background-color: var(--ic-architectural-white);\n color: var(--ic-color-primary-text);\n padding: var(--ic-space-xxs) var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n flex: 1 1 0;\n max-width: fit-content;\n}\n\n:host(.dark) .app-status {\n background-color: var(--ic-theme-text);\n color: var(--ic-color-white-text);\n}\n\n:host .app-version {\n border-radius: var(--ic-space-md);\n background-color: var(--ic-theme-active);\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n margin-left: var(--ic-space-xs);\n flex: 1 1 0;\n max-width: fit-content;\n}\n\nslot[name=\"app-icon\"]::slotted(*) {\n fill: var(--ic-theme-text);\n width: 2em;\n height: 2em;\n}\n\nslot[name=\"toggle-icon\"] svg {\n fill: var(--ic-theme-text);\n}\n\n.search-menu-container {\n justify-content: right;\n display: flex;\n align-items: center;\n}\n\n.menu-button-container {\n margin-left: var(--ic-space-md);\n}\n\n.menu-button-container .navigation-landmark-button-text {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n.search-actions-container {\n display: flex;\n}\n\n.menu-buttons-slot {\n display: flex;\n flex-direction: column;\n}\n\n.navigation-landmark-text {\n position: absolute;\n width: var(--ic-space-1px);\n height: var(--ic-space-1px);\n padding: 0;\n margin: calc(-1 * var(--ic-space-1px));\n overflow: hidden;\n}\n\n.navigation-item-list {\n display: flex;\n list-style: none;\n height: 2.75rem;\n}\n\n.navigation-item-list::-webkit-scrollbar {\n display: none;\n}\n\n:host ic-section-container {\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n\n@media screen and (min-width: 993px) {\n .app-details-container {\n margin-right: var(--ic-space-lg);\n }\n}\n\n/* large */\n@media screen and (max-width: 1200px) {\n :host .nav-panel-container {\n padding: 0 var(--ic-space-md);\n }\n}\n\n/* medium */\n@media screen and (max-width: 992px) {\n :host .nav-panel-container,\n :host .app-status,\n :host .app-version {\n display: none;\n }\n\n :host .title-link {\n margin-right: var(--ic-space-xs);\n }\n\n .search-menu-container {\n max-width: 10rem;\n }\n\n .search-bar-container {\n display: flex;\n justify-content: center;\n align-items: center;\n border-top: var(--ic-keyline-darken);\n height: 4rem;\n padding-left: var(--ic-space-md);\n padding-right: var(--ic-space-md);\n margin-left: calc(-1 * var(--section-container-margin));\n margin-right: calc(-1 * var(--section-container-margin));\n }\n}\n\n/* x small */\n@media screen and (max-width: 576px) {\n :host .title-link {\n margin-right: var(--ic-space-xxxs);\n word-break: break-word;\n hyphens: none;\n }\n\n .top-panel-container {\n min-height: 2.5rem;\n }\n\n .search-bar-container {\n margin-top: 0;\n height: 3.5rem;\n padding-left: var(--ic-space-xs);\n padding-right: var(--ic-space-xs);\n }\n\n .menu-button-container {\n margin-left: var(--ic-space-sm);\n }\n\n slot[name=\"app-icon\"]::slotted(*) {\n width: 1.5em;\n height: 1.5em;\n }\n\n slot[name=\"toggle-icon\"] svg {\n width: 1.5em;\n height: 1.5em;\n }\n}\n\n@media (forced-colors: active) {\n :host .top-navigation {\n border-bottom: var(--ic-hc-border);\n }\n\n .app-status,\n .app-version {\n border: var(--ic-hc-border);\n }\n\n slot[name=\"app-icon\"]::slotted(*) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n IcTypographyVariants,\n IcAlignment,\n IcThemeForeground,\n IcThemeForegroundEnum,\n IcTheme,\n} from \"../../utils/types\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getThemeForegroundColor,\n getSlot,\n onComponentPropUndefinedChange,\n onComponentRequiredPropUndefined,\n isSlotUsed,\n isEmptyString,\n isPropDefined,\n} from \"../../utils/helpers\";\n\n/**\n * @slot app-icon - Content will be rendered to left of app title.\n * @slot app-title - Handle routing by nesting a route in the app title.\n * @slot short-app-title - Handle routing by nesting a route in the short app title (to be displayed in place of app title on small screen sizes).\n * @slot search - Content will be rendered in search area to left of buttons.\n * @slot toggle-icon - Icon to be displayed on the button to toggle search slot content on smaller devices\n * @slot navigation - Content will be rendered in navigation panel.\n * @slot buttons - Content will be rendered to right of search bar.\n */\n@Component({\n tag: \"ic-top-navigation\",\n styleUrl: \"ic-top-navigation.css\",\n shadow: true,\n})\nexport class TopNavigation {\n private hasAppIcon: boolean = false;\n private hasIconButtons: boolean = false;\n private hasNavigation: boolean = false;\n private hasSearchSlotContent: boolean = false;\n private mobileSearchButtonEl: HTMLIcButtonElement;\n private resizeObserver: ResizeObserver = null;\n private searchBar: HTMLIcSearchBarElement = null;\n\n @Element() el: HTMLIcTopNavigationElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n @State() hasFullWidthSearchBar: boolean = false;\n @State() menuOpen: boolean = false;\n @State() mobileSearchBarVisible: boolean = false;\n @State() mobileSearchHiddenOnBlur: boolean = false;\n @State() navMenuVisible: boolean = false;\n @State() searchButtonClick: boolean = false;\n @State() searchValue: string = \"\";\n\n /**\n * The alignment of the top navigation content.\n */\n @Prop() contentAligned: IcAlignment = \"full-width\";\n /**\n * The URL to navigate to when the app title is clicked.\n */\n @Prop() href: string = \"/\";\n\n /**\n * If `true`, the flyout navigation menu on small devices will be contained by the parent element.\n */\n @Prop() inline: boolean = false;\n\n /**\n * The short title of the app to be displayed at small screen sizes in place of the app title.\n */\n @Prop() shortAppTitle: string = \"\";\n\n /**\n * The status info to be displayed.\n */\n @Prop() status: string = \"\";\n\n /**\n * The version info to be displayed.\n */\n @Prop() version: string = \"\";\n\n /**\n * The app title to be displayed. This is required, unless a slotted app title link is used.\n */\n @Prop() appTitle: string;\n @Watch(\"appTitle\")\n watchPropHandler(newValue: string, oldValue: string): void {\n //added for gatsby rehydration issue where prop is initially undefined but then changes to actual value\n //this watch can be removed once gatbsy hydration issue is resolved\n onComponentPropUndefinedChange(\n oldValue,\n newValue,\n this.initialiseSearchBar\n );\n }\n\n /**\n * @internal - Emitted when the menu is closed.\n */\n @Event() icNavigationMenuClosed: EventEmitter<void>;\n\n /**\n * @internal - Emitted when the menu is opened.\n */\n @Event() icNavigationMenuOpened: EventEmitter<void>;\n\n /**\n * Emitted when the top navigation is resized.\n */\n @Event() topNavResized: EventEmitter<{ size: number }>;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.hasAppIcon = isSlotUsed(this.el, \"app-icon\");\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasIconButtons = isSlotUsed(this.el, \"buttons\");\n this.hasSearchSlotContent = isSlotUsed(this.el, \"search\");\n this.deviceSize = getCurrentDeviceSize();\n this.initialiseSearchBar();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n !isSlotUsed(this.el, \"app-title\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.appTitle, propName: \"app-title\" }],\n \"Top Navigation\"\n );\n }\n\n componentWillRender(): void {\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasSearchSlotContent = isSlotUsed(this.el, \"search\");\n this.hasIconButtons = isSlotUsed(this.el, \"buttons\");\n this.hasAppIcon = isSlotUsed(this.el, \"app-icon\");\n }\n\n @Listen(\"icNavigationMenuClose\", {})\n navBarMenuCloseHandler(): void {\n this.showNavMenu(false);\n const menuBtn = this.el.shadowRoot.querySelector(\n \"#menu-button\"\n ) as HTMLElement;\n menuBtn.focus();\n }\n\n @Listen(\"icSearchBarBlur\", {})\n searchInputBlurHandler(ev: CustomEvent): void {\n if (ev.detail !== null) {\n if (this.mobileSearchBarVisible && !this.searchButtonClick) {\n //don't hide if blur was triggered by click on search button - let the click handler toggle the state\n this.toggleSearchBar();\n }\n this.searchValue = ev.detail.value;\n }\n }\n\n @Listen(\"icChange\", {})\n searchValueChangeHandler(ev: CustomEvent): void {\n this.searchValue = ev.detail.value;\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.foregroundColor = theme.mode;\n }\n\n private initialiseSearchBar = () => {\n if (this.hasSearchSlotContent) {\n const slot = getSlot(this.el, \"search\");\n if (slot && slot.tagName === \"IC-SEARCH-BAR\") {\n this.searchBar = slot as HTMLIcSearchBarElement;\n } else if (slot && slot.tagName === \"FORM\") {\n this.searchBar = slot.querySelector(\n \"ic-search-bar\"\n ) as HTMLIcSearchBarElement;\n }\n\n if (this.searchBar !== null) {\n this.searchBar.hideLabel = true;\n }\n }\n };\n\n private toggleSearchBar(): void {\n this.mobileSearchBarVisible = !this.mobileSearchBarVisible;\n\n if (this.searchBar !== null) {\n if (this.mobileSearchBarVisible) {\n this.mobileSearchButtonEl.setAttribute(\"aria-label\", \"Hide search\");\n this.hasFullWidthSearchBar = true;\n this.searchBar.fullWidth = true;\n setTimeout(() => {\n this.searchBar.focus();\n }, 100);\n } else {\n this.mobileSearchButtonEl.setAttribute(\"aria-label\", \"Show search\");\n this.hasFullWidthSearchBar = false;\n this.searchBar.fullWidth = false;\n }\n }\n }\n\n private menuButtonClick = () => {\n this.showNavMenu(true);\n };\n\n private showNavMenu(show: boolean): void {\n this.navMenuVisible = show;\n if (show) {\n this.icNavigationMenuOpened.emit();\n document.body.style.height = \"100%\";\n document.body.style.overflow = \"hidden\";\n } else {\n this.icNavigationMenuClosed.emit();\n document.body.style.height = \"auto\";\n document.body.style.overflow = \"auto\";\n }\n }\n\n private searchButtonMouseDownHandler = () => {\n this.searchButtonClick = true;\n };\n\n private searchButtonClickHandler = () => {\n this.toggleSearchBar();\n this.searchButtonClick = false;\n };\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n if (currSize > DEVICE_SIZES.L) {\n this.showNavMenu(false);\n if (this.mobileSearchBarVisible) {\n this.toggleSearchBar();\n }\n }\n this.topNavResized.emit({\n size: currSize,\n });\n if (\n document.activeElement !== null &&\n document.activeElement !== undefined &&\n document.activeElement.tagName === \"IC-SEARCH-BAR\"\n ) {\n this.searchBar.setAttribute(\"hidden\", \"true\");\n //remove attribute again as this trigger a redraw & applies css\n this.searchBar.removeAttribute(\"hidden\");\n setTimeout(() => {\n this.searchBar.focus();\n }, 100);\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n const hasMenuContent =\n this.hasNavigation ||\n this.hasIconButtons ||\n this.status !== \"\" ||\n this.version !== \"\";\n\n const searchButtonSize =\n this.deviceSize <= DEVICE_SIZES.S ? \"default\" : \"large\";\n\n let appTitleVariant: IcTypographyVariants = \"h3\";\n\n const hasTitle = this.appTitle !== \"\" && isPropDefined(this.appTitle);\n\n if (this.deviceSize <= DEVICE_SIZES.L) {\n appTitleVariant = \"h4\";\n if (this.deviceSize <= DEVICE_SIZES.S) {\n appTitleVariant = \"subtitle-small\";\n }\n }\n\n const mobileSearchButtonTitle = this.mobileSearchBarVisible\n ? \"Hide search\"\n : \"Show search\";\n const menuSize = this.deviceSize <= DEVICE_SIZES.S ? \"small\" : \"default\";\n\n const Component = isSlotUsed(this.el, \"app-title\") ? \"div\" : \"a\";\n\n const attrs = Component == \"a\" && {\n href: this.href,\n };\n\n const shortAppTitleSlot = isSlotUsed(this.el, \"short-app-title\");\n\n return (\n <Host\n class={{\n [\"fullwidth-searchbar\"]: this.hasFullWidthSearchBar,\n [IcThemeForegroundEnum.Dark]:\n this.foregroundColor === IcThemeForegroundEnum.Dark,\n }}\n >\n <div class=\"top-navigation\">\n <ic-section-container aligned={this.contentAligned} full-height>\n <header role=\"banner\">\n <div class=\"top-panel-container\">\n <div class=\"app-details-container\">\n {(hasTitle || isSlotUsed(this.el, \"app-title\")) && (\n <Component class=\"title-link\" {...attrs}>\n {this.hasAppIcon && (\n <div class=\"app-icon-container\">\n <slot name=\"app-icon\" />\n </div>\n )}\n {this.deviceSize <= DEVICE_SIZES.S &&\n (!isEmptyString(this.shortAppTitle) ||\n shortAppTitleSlot) ? (\n <ic-typography\n variant=\"subtitle-small\"\n aria-label={\n (!isSlotUsed(this.el, \"app-title\") ||\n !shortAppTitleSlot) &&\n `${this.appTitle} (${this.shortAppTitle})`\n }\n >\n <h1>\n {shortAppTitleSlot ? (\n <slot name=\"short-app-title\"></slot>\n ) : (\n this.shortAppTitle\n )}\n </h1>\n </ic-typography>\n ) : (\n <ic-typography variant={appTitleVariant}>\n <h1 class=\"title-wrap\">\n {isSlotUsed(this.el, \"app-title\") ? (\n <slot name=\"app-title\"></slot>\n ) : (\n this.appTitle\n )}\n </h1>\n </ic-typography>\n )}\n </Component>\n )}\n {this.status !== \"\" && (\n <div class=\"app-status\">\n <ic-typography\n aria-label=\"app tag\"\n variant=\"label-uppercase\"\n class=\"app-status-text\"\n >\n {this.status}\n </ic-typography>\n </div>\n )}\n {this.version !== \"\" && (\n <div class=\"app-version\">\n <ic-typography\n variant=\"label\"\n class=\"app-version-text\"\n aria-label=\"app version\"\n >\n {this.version}\n </ic-typography>\n </div>\n )}\n </div>\n\n {(this.hasSearchSlotContent || hasMenuContent) && (\n <div class=\"search-menu-container\">\n <div class=\"search-actions-container\">\n {this.deviceSize > DEVICE_SIZES.L && (\n <slot name=\"search\"></slot>\n )}\n\n {this.hasSearchSlotContent &&\n this.deviceSize <= DEVICE_SIZES.L && (\n <ic-button\n id=\"search-toggle-button\"\n ref={(el) => (this.mobileSearchButtonEl = el)}\n onMouseDown={this.searchButtonMouseDownHandler}\n variant=\"icon\"\n size={searchButtonSize}\n aria-label={mobileSearchButtonTitle}\n appearance={this.foregroundColor}\n onClick={this.searchButtonClickHandler}\n >\n <slot name=\"toggle-icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"#ffffff\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" />\n </svg>\n </slot>\n </ic-button>\n )}\n\n {this.hasIconButtons &&\n this.deviceSize > DEVICE_SIZES.L && (\n <div class=\"icon-buttons-container\">\n <slot name=\"buttons\"></slot>\n </div>\n )}\n {hasMenuContent && this.deviceSize <= DEVICE_SIZES.L && (\n <div class=\"menu-button-container\">\n <span\n id=\"navigation-landmark-button-text\"\n class=\"navigation-landmark-button-text\"\n aria-hidden=\"true\"\n >\n Main navigation button\n </span>\n <nav\n aria-labelledby=\"navigation-landmark-button-text\"\n aria-hidden={this.navMenuVisible ? \"true\" : \"false\"}\n >\n <ic-button\n id=\"menu-button\"\n appearance={this.foregroundColor}\n variant=\"secondary\"\n aria-expanded={this.menuOpen ? \"true\" : \"false\"}\n aria-haspopup=\"true\"\n aria-label={`Open ${\n this.hasNavigation ? \"navigation\" : \"app\"\n } menu`}\n size={menuSize}\n onClick={this.menuButtonClick}\n >\n Menu\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n fill=\"#ffffff\"\n slot=\"icon\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\" />\n </svg>\n </ic-button>\n </nav>\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n\n {this.mobileSearchBarVisible && (\n <div class=\"search-bar-container\">\n <slot name=\"search\"></slot>\n </div>\n )}\n\n {this.hasNavigation && this.deviceSize > DEVICE_SIZES.L && (\n <div class=\"navigation-tabs\">\n <span\n id=\"navigation-landmark-text\"\n class=\"navigation-landmark-text\"\n aria-hidden=\"true\"\n >\n Main pages\n </span>\n <nav\n aria-labelledby=\"navigation-landmark-text\"\n class=\"nav-panel-container\"\n >\n <ic-horizontal-scroll appearance={this.foregroundColor}>\n <ul class=\"navigation-item-list\" tabindex=\"-1\">\n <slot name=\"navigation\"></slot>\n </ul>\n </ic-horizontal-scroll>\n </nav>\n </div>\n )}\n </header>\n </ic-section-container>\n </div>\n {this.navMenuVisible && (\n <ic-navigation-menu\n version={this.version}\n status={this.status}\n class={{\n [\"inline\"]: this.inline,\n }}\n >\n {this.hasIconButtons && (\n <div class=\"menu-buttons-slot\" slot=\"buttons\">\n <slot name=\"buttons\"></slot>\n </div>\n )}\n <ul slot=\"navigation\">\n <slot name=\"navigation\"></slot>\n </ul>\n </ic-navigation-menu>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-top-navigation.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,kBAAkB,GAAG,4gOAA4gO;;MCkD1hO,aAAa;;;;;;QAChB,eAAU,GAAY,KAAK,CAAC;QAC5B,mBAAc,GAAY,KAAK,CAAC;QAChC,kBAAa,GAAY,KAAK,CAAC;QAC/B,yBAAoB,GAAY,KAAK,CAAC;QAEtC,mBAAc,GAAmB,IAAI,CAAC;QACtC,cAAS,GAA2B,IAAI,CAAC;QA0IzC,wBAAmB,GAAG;YAC5B,IAAI,IAAI,CAAC,oBAAoB,EAAE;gBAC7B,MAAM,IAAI,GAAGA,eAAO,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;gBACxC,IAAI,CAAA,IAAI,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AO,EAAE,eAAe,YAGxBA,iBACE,KAAK,EAAC,4BAA4B,EAClC,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,MAAM,EACZ,IAAI,EAAC,SAAS,EACd,IAAI,EAAC,MAAM,IAEXA,kBAAM,CAAC,EAAC,iBAAiB,EAAC,IAAI,EAAC,MAAM,GAAG,EACxCA,kBAAM,CAAC,EAAC,+CAA+C,GAAG,CACtD,CACI,CACR,CACF,CACP,CACG,CACF,CACP,CACG,EAEL,sBAAsB,KACrBA,iBAAK,KAAK,EAAC,sBAAsB,IAC/BA,kBAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACP,EAEA,aAAa,IAAI,CAAC,oBAAoB,KACrCA,iBAAK,KAAK,EAAC,iBAAiB,IAC1BA,kBACE,EAAE,EAAC,0BAA0B,EAC7B,KAAK,EAAC,0BAA0B,iBACpB,MAAM,iBAGb,EACPA,oCACkB,0BAA0B,EAC1C,KAAK,EAAC,qBAAqB,IAE3BA,kCAAsB,UAAU,EAAE,eAAe,IAC/CA,gBAAI,KAAK,EAAC,sBAAsB,EAAC,QAAQ,EAAC,IAAI,IAC5CA,kBAAM,IAAI,EAAC,YAAY,GAAQ,CAC5B,CACgB,CACnB,CACF,CACP,CACM,CACY,CACnB,EACL,cAAc,KACbA,gCACE,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;gBACL,CAAC,QAAQ,GAAG,MAAM;aACnB,IAEA,cAAc,KACbA,iBAAK,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,SAAS,IAC3CA,kBAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACP,EACDA,gBAAI,IAAI,EAAC,YAAY,IACnBA,kBAAM,IAAI,EAAC,YAAY,GAAQ,CAC5B,CACc,CACtB,CACI,EACP;KACH;;;;;;;;;;","names":["getSlot","getCurrentDeviceSize","DEVICE_SIZES","getThemeForegroundColor","onComponentPropUndefinedChange","isSlotUsed","checkResizeObserver","onComponentRequiredPropUndefined","isPropDefined","h","Host","IcThemeForegroundEnum","isEmptyString"],"sources":["src/components/ic-top-navigation/ic-top-navigation.css?tag=ic-top-navigation&encapsulation=shadow","src/components/ic-top-navigation/ic-top-navigation.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n color: var(--ic-theme-text);\n width: 100%;\n position: relative;\n}\n\n:host .top-navigation {\n background-color: var(--ic-theme-primary);\n height: max-content;\n}\n\n:host(.fullwidth-searchbar) slot[name=\"search\"]::slotted(form) {\n width: 100%;\n}\n\n:host .title-link {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n padding: var(--ic-space-xxs);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host .title-link,\n:host .title-link:visited,\n:host .title-link:active,\n:host .title-link ::slotted(a),\n:host .title-link:visited ::slotted(a),\n:host .title-link:active ::slotted(a) {\n color: var(--ic-theme-text);\n text-decoration: none;\n outline: none;\n}\n\n:host .title-link:hover:not(:focus) {\n background-color: var(--ic-theme-hover);\n}\n\n:host .title-link:active:not(:focus) {\n background-color: var(--ic-theme-active);\n}\n\n:host .title-link:hover {\n border-radius: var(--ic-border-radius);\n}\n\n:host .title-link:focus,\n:host .title-link:focus-within {\n border-radius: var(--ic-border-radius);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host .title-link ic-typography {\n font-weight: 600;\n}\n\n:host .nav-panel-container {\n border-top: var(--ic-keyline-lighten);\n padding: 0 var(--ic-space-lg);\n margin-left: calc(-1 * var(--section-container-margin));\n margin-right: calc(-1 * var(--section-container-margin));\n display: flex;\n}\n\n:host(.dark) .nav-panel-container {\n border-top: var(--ic-keyline-darken);\n}\n\n.top-panel-container {\n display: flex;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.navigation-tabs {\n margin-top: calc(-1 * var(--ic-space-1px));\n}\n\n.app-details-container {\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n margin-right: var(--ic-space-md);\n}\n\n.app-icon-container {\n display: flex;\n padding-right: var(--ic-space-xs);\n}\n\n.icon-buttons-container {\n display: flex;\n margin-left: var(--ic-space-md);\n}\n\n.icon-buttons-container ::slotted(nav) {\n display: flex;\n}\n\n.title-wrap {\n overflow-wrap: break-word;\n word-wrap: break-word;\n -ms-word-break: break-all;\n word-break: break-word;\n hyphens: auto;\n}\n\n:host .app-status {\n border-radius: var(--ic-space-md);\n background-color: var(--ic-architectural-white);\n color: var(--ic-color-primary-text);\n padding: var(--ic-space-xxs) var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n flex: 1 1 0;\n max-width: fit-content;\n}\n\n:host(.dark) .app-status {\n background-color: var(--ic-theme-text);\n color: var(--ic-color-white-text);\n}\n\n:host .app-version {\n border-radius: var(--ic-space-md);\n background-color: var(--ic-theme-active);\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n margin-left: var(--ic-space-xs);\n flex: 1 1 0;\n max-width: fit-content;\n}\n\nslot[name=\"app-icon\"]::slotted(*) {\n fill: var(--ic-theme-text);\n width: 2em;\n height: 2em;\n}\n\nslot[name=\"toggle-icon\"] svg {\n fill: var(--ic-theme-text);\n}\n\n.search-menu-container {\n justify-content: right;\n display: flex;\n align-items: center;\n}\n\n.menu-button-container {\n margin-left: var(--ic-space-md);\n}\n\n.menu-button-container .navigation-landmark-button-text {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n.search-actions-container {\n display: flex;\n}\n\n.menu-buttons-slot {\n display: flex;\n flex-direction: column;\n}\n\n.navigation-landmark-text {\n position: absolute;\n width: var(--ic-space-1px);\n height: var(--ic-space-1px);\n padding: 0;\n margin: calc(-1 * var(--ic-space-1px));\n overflow: hidden;\n}\n\n.navigation-item-list {\n display: flex;\n list-style: none;\n height: 2.75rem;\n}\n\n.navigation-item-list::-webkit-scrollbar {\n display: none;\n}\n\n:host ic-section-container {\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n\n@media screen and (min-width: 993px) {\n .app-details-container {\n margin-right: var(--ic-space-lg);\n }\n}\n\n/* large */\n@media screen and (max-width: 1200px) {\n :host .nav-panel-container {\n padding: 0 var(--ic-space-md);\n }\n}\n\n/** Mobile styling **/\n:host(.mobile-mode) .app-status,\n:host(.mobile-mode) .app-version {\n display: none;\n}\n\n:host(.mobile-mode) .title-link {\n margin-right: var(--ic-space-xs);\n}\n\n:host(.mobile-mode) .search-menu-container {\n max-width: 10rem;\n}\n\n:host(.mobile-mode) .search-bar-container {\n display: flex;\n justify-content: center;\n align-items: center;\n border-top: var(--ic-keyline-darken);\n height: 4rem;\n padding-left: var(--ic-space-md);\n padding-right: var(--ic-space-md);\n margin-left: calc(-1 * var(--section-container-margin));\n margin-right: calc(-1 * var(--section-container-margin));\n}\n\n/* x small */\n@media screen and (max-width: 576px) {\n :host .title-link {\n margin-right: var(--ic-space-xxxs);\n word-break: break-word;\n hyphens: none;\n }\n\n .top-panel-container {\n min-height: 2.5rem;\n }\n\n .search-bar-container {\n margin-top: 0;\n height: 3.5rem;\n padding-left: var(--ic-space-xs);\n padding-right: var(--ic-space-xs);\n }\n\n .menu-button-container {\n margin-left: var(--ic-space-sm);\n }\n\n slot[name=\"app-icon\"]::slotted(*) {\n width: 1.5em;\n height: 1.5em;\n }\n\n slot[name=\"toggle-icon\"] svg {\n width: 1.5em;\n height: 1.5em;\n }\n}\n\n@media (forced-colors: active) {\n :host .top-navigation {\n border-bottom: var(--ic-hc-border);\n }\n\n .app-status,\n .app-version {\n border: var(--ic-hc-border);\n }\n\n slot[name=\"app-icon\"]::slotted(*) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n IcTypographyVariants,\n IcAlignment,\n IcThemeForeground,\n IcThemeForegroundEnum,\n IcTheme,\n IcDeviceSizes,\n IcValueEventDetail,\n} from \"../../utils/types\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getThemeForegroundColor,\n getSlot,\n onComponentPropUndefinedChange,\n onComponentRequiredPropUndefined,\n isSlotUsed,\n isEmptyString,\n isPropDefined,\n} from \"../../utils/helpers\";\nimport { IcSearchBarBlurEventDetail } from \"../ic-search-bar/ic-search-bar.types\";\n\n/**\n * @slot app-icon - Content will be rendered to left of app title.\n * @slot app-title - Handle routing by nesting a route in the app title.\n * @slot short-app-title - Handle routing by nesting a route in the short app title (to be displayed in place of app title on small screen sizes).\n * @slot search - Content will be rendered in search area to left of buttons.\n * @slot toggle-icon - Icon to be displayed on the button to toggle search slot content on smaller devices\n * @slot navigation - Content will be rendered in navigation panel.\n * @slot buttons - Content will be rendered to right of search bar.\n */\n@Component({\n tag: \"ic-top-navigation\",\n styleUrl: \"ic-top-navigation.css\",\n shadow: true,\n})\nexport class TopNavigation {\n private hasAppIcon: boolean = false;\n private hasIconButtons: boolean = false;\n private hasNavigation: boolean = false;\n private hasSearchSlotContent: boolean = false;\n private mobileSearchButtonEl: HTMLIcButtonElement;\n private resizeObserver: ResizeObserver = null;\n private searchBar: HTMLIcSearchBarElement = null;\n\n @Element() el: HTMLIcTopNavigationElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n @State() hasFullWidthSearchBar: boolean = false;\n @State() mobileSearchBarVisible: boolean = false;\n @State() mobileSearchHiddenOnBlur: boolean = false;\n @State() navMenuVisible: boolean = false;\n @State() searchButtonClick: boolean = false;\n @State() searchValue: string = \"\";\n\n /**\n * The alignment of the top navigation content.\n */\n @Prop() contentAligned: IcAlignment = \"full-width\";\n /**\n * Can set a custom breakpoint for the top navigation to switch to mobile mode.\n * Must be one of our specified breakpoints in px: `0`, `576`, `768`, `992`, `1200`.\n */\n @Prop() customMobileBreakpoint: IcDeviceSizes = DEVICE_SIZES.L;\n /**\n * The URL to navigate to when the app title is clicked.\n */\n @Prop() href: string = \"/\";\n\n /**\n * If `true`, the flyout navigation menu on small devices will be contained by the parent element.\n */\n @Prop() inline: boolean = false;\n\n /**\n * The short title of the app to be displayed at small screen sizes in place of the app title.\n */\n @Prop() shortAppTitle: string = \"\";\n\n /**\n * The status info to be displayed.\n */\n @Prop() status: string = \"\";\n\n /**\n * The version info to be displayed.\n */\n @Prop() version: string = \"\";\n\n /**\n * The app title to be displayed. This is required, unless a slotted app title link is used.\n */\n @Prop() appTitle: string;\n\n @Watch(\"appTitle\")\n watchPropHandler(newValue: string, oldValue: string): void {\n //added for gatsby rehydration issue where prop is initially undefined but then changes to actual value\n //this watch can be removed once gatbsy hydration issue is resolved\n onComponentPropUndefinedChange(\n oldValue,\n newValue,\n this.initialiseSearchBar\n );\n }\n\n /**\n * @internal - Emitted when the menu is closed.\n */\n @Event() icNavigationMenuClosed: EventEmitter<void>;\n\n /**\n * @internal - Emitted when the menu is opened.\n */\n @Event() icNavigationMenuOpened: EventEmitter<void>;\n\n /**\n * Emitted when the top navigation is resized.\n */\n @Event() topNavResized: EventEmitter<{ size: number }>;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.hasAppIcon = isSlotUsed(this.el, \"app-icon\");\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasIconButtons = isSlotUsed(this.el, \"buttons\");\n this.hasSearchSlotContent = isSlotUsed(this.el, \"search\");\n this.deviceSize = getCurrentDeviceSize();\n this.initialiseSearchBar();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n !isSlotUsed(this.el, \"app-title\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.appTitle, propName: \"app-title\" }],\n \"Top Navigation\"\n );\n }\n\n componentWillRender(): void {\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasSearchSlotContent = isSlotUsed(this.el, \"search\");\n this.hasIconButtons = isSlotUsed(this.el, \"buttons\");\n this.hasAppIcon = isSlotUsed(this.el, \"app-icon\");\n }\n\n @Listen(\"icNavigationMenuClose\", {})\n navBarMenuCloseHandler(): void {\n this.showNavMenu(false);\n this.el.shadowRoot.querySelector<HTMLElement>(\"#menu-button\").focus();\n }\n\n @Listen(\"icSearchBarBlur\", {})\n searchInputBlurHandler({\n detail,\n }: CustomEvent<IcSearchBarBlurEventDetail>): void {\n if (detail !== null) {\n if (this.mobileSearchBarVisible && !this.searchButtonClick) {\n //don't hide if blur was triggered by click on search button - let the click handler toggle the state\n this.toggleSearchBar();\n }\n this.searchValue = detail.value;\n }\n }\n\n @Listen(\"icChange\", {})\n searchValueChangeHandler({ detail }: CustomEvent<IcValueEventDetail>): void {\n this.searchValue = detail.value;\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler({ detail }: CustomEvent<IcTheme>): void {\n this.foregroundColor = detail.mode;\n }\n\n private initialiseSearchBar = () => {\n if (this.hasSearchSlotContent) {\n const slot = getSlot(this.el, \"search\");\n if (slot?.tagName === \"IC-SEARCH-BAR\") {\n this.searchBar = slot as HTMLIcSearchBarElement;\n } else if (slot?.tagName === \"FORM\") {\n this.searchBar = slot.querySelector(\"ic-search-bar\");\n }\n\n if (this.searchBar !== null) {\n this.searchBar.hideLabel = true;\n }\n }\n };\n\n private toggleSearchBar(): void {\n this.mobileSearchBarVisible = !this.mobileSearchBarVisible;\n\n if (this.searchBar !== null) {\n this.mobileSearchButtonEl.setAttribute(\n \"aria-label\",\n `${this.mobileSearchBarVisible ? \"Hide\" : \"Show\"} search`\n );\n this.hasFullWidthSearchBar = this.mobileSearchBarVisible;\n this.searchBar.fullWidth = this.mobileSearchBarVisible;\n if (this.mobileSearchBarVisible) {\n setTimeout(() => {\n this.searchBar.focus();\n }, 100);\n }\n }\n }\n\n private menuButtonClick = () => {\n this.showNavMenu(true);\n };\n\n private showNavMenu(show: boolean): void {\n this.navMenuVisible = show;\n if (show) {\n this.icNavigationMenuOpened.emit();\n document.body.style.height = \"100%\";\n document.body.style.overflow = \"hidden\";\n } else {\n this.icNavigationMenuClosed.emit();\n document.body.style.height = \"auto\";\n document.body.style.overflow = \"auto\";\n }\n }\n\n private searchButtonMouseDownHandler = () => {\n this.searchButtonClick = true;\n };\n\n private searchButtonClickHandler = () => {\n this.toggleSearchBar();\n this.searchButtonClick = false;\n };\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n if (currSize > this.customMobileBreakpoint) {\n this.showNavMenu(false);\n if (this.mobileSearchBarVisible) {\n this.toggleSearchBar();\n }\n }\n this.topNavResized.emit({\n size: currSize,\n });\n if (document.activeElement?.tagName === \"IC-SEARCH-BAR\") {\n this.searchBar.setAttribute(\"hidden\", \"true\");\n //remove attribute again as this trigger a redraw & applies css\n this.searchBar.removeAttribute(\"hidden\");\n setTimeout(() => {\n this.searchBar.focus();\n }, 100);\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback(getCurrentDeviceSize());\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n const {\n appTitle,\n contentAligned,\n customMobileBreakpoint,\n deviceSize,\n el,\n foregroundColor,\n hasAppIcon,\n hasFullWidthSearchBar,\n hasIconButtons,\n hasNavigation,\n hasSearchSlotContent,\n href,\n inline,\n menuButtonClick,\n mobileSearchBarVisible,\n navMenuVisible,\n searchButtonClickHandler,\n searchButtonMouseDownHandler,\n shortAppTitle,\n status,\n version,\n } = this;\n\n const hasStatus = status !== \"\";\n const hasVersion = version !== \"\";\n const hasMenuContent =\n hasNavigation || hasIconButtons || hasStatus || hasVersion;\n\n const searchButtonSize = deviceSize <= DEVICE_SIZES.S ? \"default\" : \"large\";\n const hasTitle = appTitle !== \"\" && isPropDefined(appTitle);\n const overMobileBreakpoint = deviceSize <= customMobileBreakpoint;\n\n const appTitleVariant: IcTypographyVariants = overMobileBreakpoint\n ? deviceSize <= DEVICE_SIZES.S\n ? \"subtitle-small\"\n : \"h4\"\n : \"h3\";\n\n const mobileSearchButtonTitle = `${\n mobileSearchBarVisible ? \"Hide\" : \"Show\"\n } search`;\n const menuSize = deviceSize <= DEVICE_SIZES.S ? \"small\" : \"default\";\n\n const shortAppTitleSlot = isSlotUsed(el, \"short-app-title\");\n const hasAppTitleSlot = isSlotUsed(el, \"app-title\");\n const Component = hasAppTitleSlot ? \"div\" : \"a\";\n const attrs = Component == \"a\" && {\n href: href,\n };\n\n return (\n <Host\n class={{\n \"fullwidth-searchbar\": hasFullWidthSearchBar,\n \"mobile-mode\": overMobileBreakpoint,\n [IcThemeForegroundEnum.Dark]:\n foregroundColor === IcThemeForegroundEnum.Dark,\n }}\n >\n <div class=\"top-navigation\">\n <ic-section-container aligned={contentAligned} full-height>\n <header role=\"banner\">\n <div class=\"top-panel-container\">\n <div class=\"app-details-container\">\n {(hasTitle || hasAppTitleSlot) && (\n <Component class=\"title-link\" {...attrs}>\n {hasAppIcon && (\n <div class=\"app-icon-container\">\n <slot name=\"app-icon\" />\n </div>\n )}\n {deviceSize <= DEVICE_SIZES.S &&\n (!isEmptyString(shortAppTitle) || shortAppTitleSlot) ? (\n <ic-typography\n variant=\"subtitle-small\"\n aria-label={\n (!hasAppTitleSlot || !shortAppTitleSlot) &&\n `${appTitle} (${shortAppTitle})`\n }\n >\n <h1>\n {shortAppTitleSlot ? (\n <slot name=\"short-app-title\"></slot>\n ) : (\n shortAppTitle\n )}\n </h1>\n </ic-typography>\n ) : (\n <ic-typography variant={appTitleVariant}>\n <h1 class=\"title-wrap\">\n {hasAppTitleSlot ? (\n <slot name=\"app-title\"></slot>\n ) : (\n appTitle\n )}\n </h1>\n </ic-typography>\n )}\n </Component>\n )}\n {hasStatus && (\n <div class=\"app-status\">\n <ic-typography\n aria-label=\"app tag\"\n variant=\"label-uppercase\"\n class=\"app-status-text\"\n >\n {status}\n </ic-typography>\n </div>\n )}\n {hasVersion && (\n <div class=\"app-version\">\n <ic-typography\n variant=\"label\"\n class=\"app-version-text\"\n aria-label=\"app version\"\n >\n {version}\n </ic-typography>\n </div>\n )}\n </div>\n\n {(hasSearchSlotContent || hasMenuContent) && (\n <div class=\"search-menu-container\">\n <div class=\"search-actions-container\">\n {!overMobileBreakpoint && <slot name=\"search\"></slot>}\n\n {hasSearchSlotContent && overMobileBreakpoint && (\n <ic-button\n id=\"search-toggle-button\"\n ref={(el) => (this.mobileSearchButtonEl = el)}\n onMouseDown={searchButtonMouseDownHandler}\n variant=\"icon\"\n size={searchButtonSize}\n aria-label={mobileSearchButtonTitle}\n appearance={foregroundColor}\n onClick={searchButtonClickHandler}\n >\n <slot name=\"toggle-icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"#ffffff\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" />\n </svg>\n </slot>\n </ic-button>\n )}\n\n {hasIconButtons && !overMobileBreakpoint && (\n <div class=\"icon-buttons-container\">\n <slot name=\"buttons\"></slot>\n </div>\n )}\n {hasMenuContent && overMobileBreakpoint && (\n <div class=\"menu-button-container\">\n <span\n id=\"navigation-landmark-button-text\"\n class=\"navigation-landmark-button-text\"\n aria-hidden=\"true\"\n >\n Main navigation button\n </span>\n <nav\n aria-labelledby=\"navigation-landmark-button-text\"\n aria-hidden={`${navMenuVisible}`}\n >\n <ic-button\n id=\"menu-button\"\n appearance={foregroundColor}\n variant=\"secondary\"\n aria-expanded=\"false\"\n aria-haspopup=\"true\"\n aria-label={`Open ${\n hasNavigation ? \"navigation\" : \"app\"\n } menu`}\n size={menuSize}\n onClick={menuButtonClick}\n >\n Menu\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n fill=\"#ffffff\"\n slot=\"icon\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\" />\n </svg>\n </ic-button>\n </nav>\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n\n {mobileSearchBarVisible && (\n <div class=\"search-bar-container\">\n <slot name=\"search\"></slot>\n </div>\n )}\n\n {hasNavigation && !overMobileBreakpoint && (\n <div class=\"navigation-tabs\">\n <span\n id=\"navigation-landmark-text\"\n class=\"navigation-landmark-text\"\n aria-hidden=\"true\"\n >\n Main pages\n </span>\n <nav\n aria-labelledby=\"navigation-landmark-text\"\n class=\"nav-panel-container\"\n >\n <ic-horizontal-scroll appearance={foregroundColor}>\n <ul class=\"navigation-item-list\" tabindex=\"-1\">\n <slot name=\"navigation\"></slot>\n </ul>\n </ic-horizontal-scroll>\n </nav>\n </div>\n )}\n </header>\n </ic-section-container>\n </div>\n {navMenuVisible && (\n <ic-navigation-menu\n version={version}\n status={status}\n class={{\n [\"inline\"]: inline,\n }}\n >\n {hasIconButtons && (\n <div class=\"menu-buttons-slot\" slot=\"buttons\">\n <slot name=\"buttons\"></slot>\n </div>\n )}\n <ul slot=\"navigation\">\n <slot name=\"navigation\"></slot>\n </ul>\n </ic-navigation-menu>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3,15 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
- const helpers = require('./helpers-d52cddc1.js');
6
+ const helpers = require('./helpers-3e526fb8.js');
7
7
  require('./types-dc22e301.js');
8
8
 
9
- const icTypographyCss = "/*! 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;position:relative}:host(.ic-typography-vertical-margins-h1){margin:0 0 var(--ic-space-xl)}:host(.ic-typography-vertical-margins-h2){margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}:host(.ic-typography-vertical-margins-h3){margin:var(--ic-space-xl) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-h4){margin:var(--ic-space-lg) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-subtitle-large),:host(.ic-typography-vertical-margins-subtitle-small),:host(.ic-typography-vertical-margins-body),:host(.ic-typography-vertical-margins-code-large),:host(.ic-typography-vertical-margins-code-small),:host(.ic-typography-vertical-margins-code-extra-small){margin:0 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-caption),:host(.ic-typography-vertical-margins-caption-uppercase){margin:0 0 var(--ic-space-xs)}:host(.ic-typography-vertical-margins-h2:first-child),:host(.ic-typography-vertical-margins-h3:first-child),:host(.ic-typography-vertical-margins-h4:first-child){margin-top:0}:host(.ic-typography-h1){font:var(--ic-font-h1) !important}:host(.ic-typography-h2){font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-h3){font:var(--ic-font-h3)}:host(.ic-typography-h4){font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-large){font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-small){font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-body){font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-caption){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-caption-uppercase){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}:host(.ic-typography-label){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-label-uppercase){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}:host(.ic-typography-code-large){font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-code-small){font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-code-extra-small){font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-badge){font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-badge-small){font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-no-wrap){white-space:nowrap}:host ::slotted(h1),:host ::slotted(h2),:host ::slotted(h3),:host ::slotted(h4),:host ::slotted(h5),:host ::slotted(h6),:host ::slotted(p),:host ::slotted(label){font:inherit;letter-spacing:inherit}.trunc-wrapper{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);-webkit-clip-path:border-box;clip-path:border-box}.trunc-btn{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast);text-align:start}.trunc-btn:hover,.trunc-btn.focus{outline:none;border-bottom:var(--ic-space-xxs) solid !important;margin-bottom:calc(-1 * var(--ic-space-xxs)) !important;text-decoration:none;cursor:pointer}:host(.strikethrough){text-decoration:line-through}:host(.underline){text-decoration:underline}:host(.underline.strikethrough){text-decoration:line-through underline}:host(.italic){font-style:italic !important}:host(.bold){font-weight:var(--ic-font-weight-bold)}@supports (text-decoration-thickness: 25%){.trunc-btn:hover,.trunc-btn.focus{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
9
+ const icTypographyCss = "/*! 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;position:relative}:host(.ic-typography-vertical-margins-h1){margin:0 0 var(--ic-space-xl)}:host(.ic-typography-vertical-margins-h2){margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}:host(.ic-typography-vertical-margins-h3){margin:var(--ic-space-xl) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-h4){margin:var(--ic-space-lg) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-subtitle-large),:host(.ic-typography-vertical-margins-subtitle-small),:host(.ic-typography-vertical-margins-body),:host(.ic-typography-vertical-margins-code-large),:host(.ic-typography-vertical-margins-code-small),:host(.ic-typography-vertical-margins-code-extra-small){margin:0 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-caption),:host(.ic-typography-vertical-margins-caption-uppercase){margin:0 0 var(--ic-space-xs)}:host(.ic-typography-vertical-margins-h2:first-child),:host(.ic-typography-vertical-margins-h3:first-child),:host(.ic-typography-vertical-margins-h4:first-child){margin-top:0}:host(.ic-typography-h1){font:var(--ic-font-h1) !important}:host(.ic-typography-h2){font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-h3){font:var(--ic-font-h3)}:host(.ic-typography-h4){font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-large){font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-small){font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-body){font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-caption){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-caption-uppercase){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}:host(.ic-typography-label){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-label-uppercase){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}:host(.ic-typography-code-large){font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-code-small){font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-code-extra-small){font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-badge){font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-badge-small){font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-no-wrap){white-space:nowrap}:host ::slotted(h1),:host ::slotted(h2),:host ::slotted(h3),:host ::slotted(h4),:host ::slotted(h5),:host ::slotted(h6),:host ::slotted(p),:host ::slotted(label){font:inherit;letter-spacing:inherit}.trunc-wrapper{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden}.trunc-btn{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}.trunc-btn:hover,.trunc-btn.focus{outline:none;border-bottom:var(--ic-space-xxs) solid !important;margin-bottom:calc(-1 * var(--ic-space-xxs)) !important;text-decoration:none;cursor:pointer}:host(.strikethrough){text-decoration:line-through}:host(.underline){text-decoration:underline}:host(.underline.strikethrough){text-decoration:line-through underline}:host(.italic){font-style:italic !important}:host(.bold){font-weight:var(--ic-font-weight-bold)}@supports (text-decoration-thickness: 25%){.trunc-btn:hover,.trunc-btn.focus{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
10
10
 
11
11
  const Typography = class {
12
12
  constructor(hostRef) {
13
13
  index.registerInstance(this, hostRef);
14
- this.icExpand = index.createEvent(this, "icExpand", 7);
15
14
  this.focusBtnFromKeyboard = true;
16
15
  this.lastMarkerTop = 0;
17
16
  this.lastWidth = 0;
@@ -19,7 +18,15 @@ const Typography = class {
19
18
  this.truncatedHeight = 0;
20
19
  this.toggleExpanded = () => {
21
20
  this.expanded = !this.expanded;
22
- this.icExpand.emit({ el: this.el, expanded: this.expanded });
21
+ };
22
+ this.checkMaxLines = (height) => {
23
+ //24 is the height of a single line
24
+ const numLines = Math.floor(height / 24);
25
+ if (numLines > this.maxLines) {
26
+ this.el.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`);
27
+ this.truncatedHeight = this.el.clientHeight;
28
+ this.truncated = true;
29
+ }
23
30
  };
24
31
  this.checkMarkerPosition = (elTop, markerTop) => {
25
32
  if (markerTop - elTop < this.truncatedHeight) {
@@ -102,37 +109,6 @@ const Typography = class {
102
109
  helpers.checkResizeObserver(this.runResizeObserver);
103
110
  }
104
111
  }
105
- /**
106
- * Truncate the text in ic-typography by adding a line-clamp css property.
107
- * @param height Used to calculate whether the element has exceeded the maximum number of lines.
108
- *
109
- */
110
- async checkMaxLines(height) {
111
- // 24 is the height of a single line
112
- const numLines = Math.floor(height / 24);
113
- if (numLines > this.maxLines) {
114
- this.el.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`);
115
- this.truncatedHeight = this.el.clientHeight;
116
- this.truncated = true;
117
- }
118
- }
119
- /**
120
- * @internal Truncate the text in ic-typography by adding a line-clamp css property. This method is specific to ic-data-table.
121
- * height - used to calculate whether the element has exceeded the maximum number of lines.
122
- * typographyHeight - the scroll height of the typography element. Used as another way to calculate whether the element has exceeded the maximum number of lines.
123
- */
124
- async checkCellTextMaxLines(height, typographyHeight) {
125
- // 24 is the height of a single line
126
- const typographyNumLines = Math.floor(typographyHeight / 24);
127
- const numLines = Math.floor(height / 24);
128
- if ((!!typographyHeight && typographyNumLines > numLines) ||
129
- numLines > this.maxLines) {
130
- this.el.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`);
131
- this.truncatedHeight = this.el.clientHeight;
132
- this.truncated = true;
133
- this.expanded = false;
134
- }
135
- }
136
112
  render() {
137
113
  var _a, _b;
138
114
  const { variant, applyVerticalMargins, maxLines, truncated, expanded, strikethrough, underline, italic, bold, } = this;
@@ -1 +1 @@
1
- {"file":"ic-typography.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,45MAA45M;;MCsBv6M,UAAU;;;;QACb,yBAAoB,GAAY,IAAI,CAAC;QACrC,kBAAa,GAAW,CAAC,CAAC;QAC1B,cAAS,GAAW,CAAC,CAAC;QAGtB,mBAAc,GAAmB,IAAI,CAAC;QACtC,oBAAe,GAAW,CAAC,CAAC;QA0H5B,mBAAc,GAAG;YACvB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC9D,CAAC;QAEM,wBAAmB,GAAG,CAAC,KAAa,EAAE,SAAiB;YAC7D,IAAI,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE;gBAC5C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;gBACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;aACvB;iBAAM;gBACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;aACvB;SACF,CAAC;QAEM,kBAAa,GAAG,CAAC,EAAe;YACtC,OAAO,EAAE,CAAC,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,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B,CAAC,eAAe,GAAG,aAAa;gBAChC,CAAC,WAAW,GAAG,SAAS;aACzB,IAEA,CAAC,OAAO,KAAK,MAAM;YAClB,CAAA,MAAA,MAAC,IAAI,CAAC,EAAE,CAAC,WAAW,EAAiB,0CAAE,IAAI,0CAAE,OAAO;gBAClD,YAAY;YAChB,QAAQ,GAAG,CAAC,IACVD,iBAAK,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,IAChEA,qBAAQ,CACJ,KAENA,qBAAQ,CACT,EACA,OAAO,KAAK,MAAM,IAAI,QAAQ,GAAG,CAAC,IAAI,SAAS,KAC9CA,oBACE,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,EAC7D,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,MAAM,EAAE,IAAI,CAAC,eAAe,EAC5B,WAAW,EAAE,IAAI,CAAC,yBAAyB,EAC3C,OAAO,EAAE,IAAI,CAAC,cAAc,iBAChB,MAAM,IAEjB,QAAQ,GAAG,UAAU,GAAG,UAAU,CAC5B,CACV,CACI,EACP;KACH;;;;;;;;;;","names":["checkResizeObserver","h","Host"],"sources":["src/components/ic-typography/ic-typography.css?tag=ic-typography&encapsulation=shadow","src/components/ic-typography/ic-typography.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n position: relative;\n}\n\n:host(.ic-typography-vertical-margins-h1) {\n margin: 0 0 var(--ic-space-xl);\n}\n\n:host(.ic-typography-vertical-margins-h2) {\n margin: var(--ic-space-xxl) 0 var(--ic-space-lg);\n}\n\n:host(.ic-typography-vertical-margins-h3) {\n margin: var(--ic-space-xl) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-h4) {\n margin: var(--ic-space-lg) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small) {\n margin: 0 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase) {\n margin: 0 0 var(--ic-space-xs);\n}\n\n:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child) {\n margin-top: 0;\n}\n\n:host(.ic-typography-h1) {\n font: var(--ic-font-h1) !important;\n}\n\n:host(.ic-typography-h2) {\n font: var(--ic-font-h2);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-h3) {\n font: var(--ic-font-h3);\n}\n\n:host(.ic-typography-h4) {\n font: var(--ic-font-h4);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-large) {\n font: var(--ic-font-subtitle-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-small) {\n font: var(--ic-font-subtitle-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-body) {\n font: var(--ic-font-body);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-caption) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-caption-uppercase) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-label) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-label-uppercase) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-code-large) {\n font: var(--ic-font-code-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-code-small) {\n font: var(--ic-font-code-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-code-extra-small) {\n font: var(--ic-font-code-extra-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-badge) {\n font: var(--ic-font-badge);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-badge-small) {\n font: var(--ic-font-badge-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-no-wrap) {\n white-space: nowrap;\n}\n\n:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label) {\n font: inherit;\n letter-spacing: inherit;\n}\n\n.trunc-wrapper {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n line-clamp: var(--truncation-max-lines, initial);\n -webkit-line-clamp: var(--truncation-max-lines, initial);\n /* overflow: hidden; */\n clip-path: border-box;\n}\n\n.trunc-btn {\n border: none;\n background: none;\n padding: 0;\n color: var(--ic-color-primary-text);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n text-align: start;\n}\n\n.trunc-btn:hover,\n.trunc-btn.focus {\n outline: none;\n border-bottom: var(--ic-space-xxs) solid !important;\n margin-bottom: calc(-1 * var(--ic-space-xxs)) !important;\n text-decoration: none;\n cursor: pointer;\n}\n\n:host(.strikethrough) {\n text-decoration: line-through;\n}\n\n:host(.underline) {\n text-decoration: underline;\n}\n\n:host(.underline.strikethrough) {\n text-decoration: line-through underline;\n}\n\n:host(.italic) {\n font-style: italic !important;\n}\n\n:host(.bold) {\n font-weight: var(--ic-font-weight-bold);\n}\n\n@supports (text-decoration-thickness: 25%) {\n .trunc-btn:hover,\n .trunc-btn.focus {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import {\n Component,\n Prop,\n h,\n Element,\n Host,\n State,\n Watch,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\n\nimport { IcTypographyVariants } from \"../../utils/types\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\nimport { IcExpandEventDetail } from \"./ic-typography.types\";\n\n@Component({\n styleUrl: \"ic-typography.css\",\n tag: \"ic-typography\",\n shadow: true,\n})\nexport class Typography {\n private focusBtnFromKeyboard: boolean = true;\n private lastMarkerTop: number = 0;\n private lastWidth: number = 0;\n private marker: HTMLElement;\n private resizeInterval: number;\n private resizeObserver: ResizeObserver = null;\n private truncatedHeight: number = 0;\n private truncWrapperEl: Element;\n\n @Element() el: HTMLIcTypographyElement;\n\n @State() truncated: boolean = false;\n @State() truncButtonFocussed: boolean = false;\n\n /**\n * If `true`, appropriate top and bottom margins will be applied to the typography.\n */\n @Prop() applyVerticalMargins?: boolean = false;\n\n /**\n * If `true`, the typography will have a bold font weight.\n * Note: This will have no impact on variants that already use an equivalent or higher font weight (h1, h2, and subtitle-large).\n */\n @Prop() bold?: boolean = false;\n\n /**\n * If `true`, the typography will have an italic font style.\n */\n @Prop() italic?: boolean = false;\n\n /**\n * The number of lines to display before truncating the text, only used for the 'body' variant.\n */\n @Prop() maxLines?: number;\n\n /**\n * If `true`, the typography will have a line through it.\n */\n @Prop() strikethrough?: boolean = false;\n\n /**\n * If `true`, the typography will have a line under it.\n */\n @Prop() underline?: boolean = false;\n\n /**\n * The ICDS typography style to use.\n */\n @Prop() variant?: IcTypographyVariants = \"body\";\n\n @State() expanded: boolean = false;\n\n /**\n * Emitted when the See More/See Less button is clicked.\n */\n @Event() icExpand?: EventEmitter<IcExpandEventDetail>;\n\n @Watch(\"expanded\")\n watchExpandedHandler(): void {\n this.el.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.expanded ? \"initial\" : this.maxLines}`\n );\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentDidLoad(): void {\n if (\n (this.variant === \"body\" ||\n (this.el.getRootNode() as ShadowRoot)?.host?.tagName ===\n \"IC-TOOLTIP\") &&\n this.maxLines > 0\n ) {\n const marker = document.createElement(\"span\");\n marker.style.visibility = \"hidden\";\n this.el.appendChild(marker);\n this.marker = marker;\n this.lastWidth = this.el.clientWidth;\n this.checkMaxLines(this.el.clientHeight);\n checkResizeObserver(this.runResizeObserver);\n }\n }\n\n /**\n * Truncate the text in ic-typography by adding a line-clamp css property.\n * @param height Used to calculate whether the element has exceeded the maximum number of lines.\n *\n */\n @Method()\n async checkMaxLines(height: number): Promise<void> {\n // 24 is the height of a single line\n const numLines = Math.floor(height / 24);\n if (numLines > this.maxLines) {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.maxLines}`);\n this.truncatedHeight = this.el.clientHeight;\n this.truncated = true;\n }\n }\n\n /**\n * @internal Truncate the text in ic-typography by adding a line-clamp css property. This method is specific to ic-data-table.\n * height - used to calculate whether the element has exceeded the maximum number of lines.\n * typographyHeight - the scroll height of the typography element. Used as another way to calculate whether the element has exceeded the maximum number of lines.\n */\n @Method()\n async checkCellTextMaxLines(\n height: number,\n typographyHeight?: number\n ): Promise<void> {\n // 24 is the height of a single line\n const typographyNumLines = Math.floor(typographyHeight / 24);\n const numLines = Math.floor(height / 24);\n if (\n (!!typographyHeight && typographyNumLines > numLines) ||\n numLines > this.maxLines\n ) {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.maxLines}`);\n this.truncatedHeight = this.el.clientHeight;\n this.truncated = true;\n this.expanded = false;\n }\n }\n\n private toggleExpanded = () => {\n this.expanded = !this.expanded;\n this.icExpand.emit({ el: this.el, expanded: this.expanded });\n };\n\n private checkMarkerPosition = (elTop: number, markerTop: number) => {\n if (markerTop - elTop < this.truncatedHeight) {\n this.truncated = false;\n this.expanded = false;\n } else {\n this.truncated = true;\n }\n };\n\n private getElementTop = (el: HTMLElement) => {\n return el.getClientRects ? el.getClientRects()[0].top : 0;\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeInterval);\n this.resizeInterval = window.setTimeout(this.resizeObserverCallback, 50);\n });\n this.resizeObserver.observe(this.truncWrapperEl);\n };\n\n private resizeObserverCallback = () => {\n if (this.lastWidth === this.el.clientWidth) {\n return;\n }\n\n if (this.truncatedHeight === 0) {\n this.checkMaxLines(this.el.clientHeight);\n return;\n }\n\n const markerTop = this.getElementTop(this.marker);\n if (markerTop === this.lastMarkerTop) {\n return;\n }\n\n this.checkMarkerPosition(this.getElementTop(this.el), markerTop);\n this.lastMarkerTop = markerTop;\n this.lastWidth = this.el.clientWidth;\n };\n\n private truncButtonFocus = (): void => {\n if (this.focusBtnFromKeyboard) {\n this.truncButtonFocussed = true;\n }\n };\n\n private truncButtonBlur = (): void => {\n this.focusBtnFromKeyboard = true;\n this.truncButtonFocussed = false;\n };\n\n private truncButtonFocusFromMouse = (): void => {\n this.focusBtnFromKeyboard = false;\n };\n\n render() {\n const {\n variant,\n applyVerticalMargins,\n maxLines,\n truncated,\n expanded,\n strikethrough,\n underline,\n italic,\n bold,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-typography-${variant}`]: true,\n [`ic-typography-vertical-margins-${variant}`]: applyVerticalMargins,\n [\"bold\"]: bold,\n [\"italic\"]: italic,\n [\"strikethrough\"]: strikethrough,\n [\"underline\"]: underline,\n }}\n >\n {(variant === \"body\" ||\n (this.el.getRootNode() as ShadowRoot)?.host?.tagName ===\n \"IC-TOOLTIP\") &&\n maxLines > 0 ? (\n <div class=\"trunc-wrapper\" ref={(el) => (this.truncWrapperEl = el)}>\n <slot />\n </div>\n ) : (\n <slot />\n )}\n {variant === \"body\" && maxLines > 0 && truncated && (\n <button\n class={{ \"trunc-btn\": true, focus: this.truncButtonFocussed }}\n onFocus={this.truncButtonFocus}\n onBlur={this.truncButtonBlur}\n onMouseDown={this.truncButtonFocusFromMouse}\n onClick={this.toggleExpanded}\n aria-hidden=\"true\"\n >\n {expanded ? \"See less\" : \"See more\"}\n </button>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-typography.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,y2MAAy2M;;MCUp3M,UAAU;;;QACb,yBAAoB,GAAY,IAAI,CAAC;QACrC,kBAAa,GAAW,CAAC,CAAC;QAC1B,cAAS,GAAW,CAAC,CAAC;QAGtB,mBAAc,GAAmB,IAAI,CAAC;QACtC,oBAAe,GAAW,CAAC,CAAC;QA6E5B,mBAAc,GAAG;YACvB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;SAChC,CAAC;QAEM,kBAAa,GAAG,CAAC,MAAc;;YAErC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;YACzC,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;gBAC5B,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,2BAA2B,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC1E,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC;gBAC5C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;aACvB;SACF,CAAC;QAEM,wBAAmB,GAAG,CAAC,KAAa,EAAE,SAAiB;YAC7D,IAAI,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE;gBAC5C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;gBACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;aACvB;iBAAM;gBACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;aACvB;SACF,CAAC;QAEM,kBAAa,GAAG,CAAC,E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ACP,oBAAoB,EACpB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,EACb,SAAS,EACT,MAAM,EACN,IAAI,GACL,GAAG,IAAI,CAAC;QAET,QACEC,QAACC,UAAI,IACH,KAAK,EAAE;gBACL,CAAC,iBAAiB,OAAO,EAAE,GAAG,IAAI;gBAClC,CAAC,kCAAkC,OAAO,EAAE,GAAG,oBAAoB;gBACnE,CAAC,MAAM,GAAG,IAAI;gBACd,CAAC,QAAQ,GAAG,MAAM;gBAClB,CAAC,eAAe,GAAG,aAAa;gBAChC,CAAC,WAAW,GAAG,SAAS;aACzB,IAEA,CAAC,OAAO,KAAK,MAAM;YAClB,CAAA,MAAA,MAAC,IAAI,CAAC,EAAE,CAAC,WAAW,EAAiB,0CAAE,IAAI,0CAAE,OAAO;gBAClD,YAAY;YAChB,QAAQ,GAAG,CAAC,IACVD,iBAAK,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,IAChEA,qBAAQ,CACJ,KAENA,qBAAQ,CACT,EACA,OAAO,KAAK,MAAM,IAAI,QAAQ,GAAG,CAAC,IAAI,SAAS,KAC9CA,oBACE,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,EAC7D,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,MAAM,EAAE,IAAI,CAAC,eAAe,EAC5B,WAAW,EAAE,IAAI,CAAC,yBAAyB,EAC3C,OAAO,EAAE,IAAI,CAAC,cAAc,iBAChB,MAAM,IAEjB,QAAQ,GAAG,UAAU,GAAG,UAAU,CAC5B,CACV,CACI,EACP;KACH;;;;;;;;;;","names":["checkResizeObserver","h","Host"],"sources":["src/components/ic-typography/ic-typography.css?tag=ic-typography&encapsulation=shadow","src/components/ic-typography/ic-typography.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n position: relative;\n}\n\n:host(.ic-typography-vertical-margins-h1) {\n margin: 0 0 var(--ic-space-xl);\n}\n\n:host(.ic-typography-vertical-margins-h2) {\n margin: var(--ic-space-xxl) 0 var(--ic-space-lg);\n}\n\n:host(.ic-typography-vertical-margins-h3) {\n margin: var(--ic-space-xl) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-h4) {\n margin: var(--ic-space-lg) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small) {\n margin: 0 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase) {\n margin: 0 0 var(--ic-space-xs);\n}\n\n:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child) {\n margin-top: 0;\n}\n\n:host(.ic-typography-h1) {\n font: var(--ic-font-h1) !important;\n}\n\n:host(.ic-typography-h2) {\n font: var(--ic-font-h2);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-h3) {\n font: var(--ic-font-h3);\n}\n\n:host(.ic-typography-h4) {\n font: var(--ic-font-h4);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-large) {\n font: var(--ic-font-subtitle-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-small) {\n font: var(--ic-font-subtitle-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-body) {\n font: var(--ic-font-body);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-caption) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-caption-uppercase) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-label) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-label-uppercase) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-code-large) {\n font: var(--ic-font-code-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-code-small) {\n font: var(--ic-font-code-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-code-extra-small) {\n font: var(--ic-font-code-extra-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-badge) {\n font: var(--ic-font-badge);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-badge-small) {\n font: var(--ic-font-badge-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-no-wrap) {\n white-space: nowrap;\n}\n\n:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label) {\n font: inherit;\n letter-spacing: inherit;\n}\n\n.trunc-wrapper {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n line-clamp: var(--truncation-max-lines, initial);\n -webkit-line-clamp: var(--truncation-max-lines, initial);\n overflow: hidden;\n}\n\n.trunc-btn {\n border: none;\n background: none;\n padding: 0;\n color: var(--ic-color-primary-text);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n.trunc-btn:hover,\n.trunc-btn.focus {\n outline: none;\n border-bottom: var(--ic-space-xxs) solid !important;\n margin-bottom: calc(-1 * var(--ic-space-xxs)) !important;\n text-decoration: none;\n cursor: pointer;\n}\n\n:host(.strikethrough) {\n text-decoration: line-through;\n}\n\n:host(.underline) {\n text-decoration: underline;\n}\n\n:host(.underline.strikethrough) {\n text-decoration: line-through underline;\n}\n\n:host(.italic) {\n font-style: italic !important;\n}\n\n:host(.bold) {\n font-weight: var(--ic-font-weight-bold);\n}\n\n@supports (text-decoration-thickness: 25%) {\n .trunc-btn:hover,\n .trunc-btn.focus {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import { Component, Prop, h, Element, Host, State, Watch } from \"@stencil/core\";\n\nimport { IcTypographyVariants } from \"../../utils/types\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\n\n@Component({\n styleUrl: \"ic-typography.css\",\n tag: \"ic-typography\",\n shadow: true,\n})\nexport class Typography {\n private focusBtnFromKeyboard: boolean = true;\n private lastMarkerTop: number = 0;\n private lastWidth: number = 0;\n private marker: HTMLElement;\n private resizeInterval: number;\n private resizeObserver: ResizeObserver = null;\n private truncatedHeight: number = 0;\n private truncWrapperEl: Element;\n\n @Element() el: HTMLIcTypographyElement;\n\n @State() truncated: boolean = false;\n @State() truncButtonFocussed: boolean = false;\n\n /**\n * If `true`, appropriate top and bottom margins will be applied to the typography.\n */\n @Prop() applyVerticalMargins?: boolean = false;\n\n /**\n * If `true`, the typography will have a bold font weight.\n * Note: This will have no impact on variants that already use an equivalent or higher font weight (h1, h2, and subtitle-large).\n */\n @Prop() bold?: boolean = false;\n\n /**\n * If `true`, the typography will have an italic font style.\n */\n @Prop() italic?: boolean = false;\n\n /**\n * The number of lines to display before truncating the text, only used for the 'body' variant.\n */\n @Prop() maxLines?: number;\n\n /**\n * If `true`, the typography will have a line through it.\n */\n @Prop() strikethrough?: boolean = false;\n\n /**\n * If `true`, the typography will have a line under it.\n */\n @Prop() underline?: boolean = false;\n\n /**\n * The ICDS typography style to use.\n */\n @Prop() variant?: IcTypographyVariants = \"body\";\n\n @State() expanded: boolean = false;\n\n @Watch(\"expanded\")\n watchExpandedHandler(): void {\n this.el.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.expanded ? \"initial\" : this.maxLines}`\n );\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentDidLoad(): void {\n if (\n (this.variant === \"body\" ||\n (this.el.getRootNode() as ShadowRoot)?.host?.tagName ===\n \"IC-TOOLTIP\") &&\n this.maxLines > 0\n ) {\n const marker = document.createElement(\"span\");\n marker.style.visibility = \"hidden\";\n this.el.appendChild(marker);\n this.marker = marker;\n this.lastWidth = this.el.clientWidth;\n this.checkMaxLines(this.el.clientHeight);\n checkResizeObserver(this.runResizeObserver);\n }\n }\n\n private toggleExpanded = () => {\n this.expanded = !this.expanded;\n };\n\n private checkMaxLines = (height: number) => {\n //24 is the height of a single line\n const numLines = Math.floor(height / 24);\n if (numLines > this.maxLines) {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.maxLines}`);\n this.truncatedHeight = this.el.clientHeight;\n this.truncated = true;\n }\n };\n\n private checkMarkerPosition = (elTop: number, markerTop: number) => {\n if (markerTop - elTop < this.truncatedHeight) {\n this.truncated = false;\n this.expanded = false;\n } else {\n this.truncated = true;\n }\n };\n\n private getElementTop = (el: HTMLElement) => {\n return el.getClientRects ? el.getClientRects()[0].top : 0;\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeInterval);\n this.resizeInterval = window.setTimeout(this.resizeObserverCallback, 50);\n });\n this.resizeObserver.observe(this.truncWrapperEl);\n };\n\n private resizeObserverCallback = () => {\n if (this.lastWidth === this.el.clientWidth) {\n return;\n }\n\n if (this.truncatedHeight === 0) {\n this.checkMaxLines(this.el.clientHeight);\n return;\n }\n\n const markerTop = this.getElementTop(this.marker);\n if (markerTop === this.lastMarkerTop) {\n return;\n }\n\n this.checkMarkerPosition(this.getElementTop(this.el), markerTop);\n this.lastMarkerTop = markerTop;\n this.lastWidth = this.el.clientWidth;\n };\n\n private truncButtonFocus = (): void => {\n if (this.focusBtnFromKeyboard) {\n this.truncButtonFocussed = true;\n }\n };\n\n private truncButtonBlur = (): void => {\n this.focusBtnFromKeyboard = true;\n this.truncButtonFocussed = false;\n };\n\n private truncButtonFocusFromMouse = (): void => {\n this.focusBtnFromKeyboard = false;\n };\n\n render() {\n const {\n variant,\n applyVerticalMargins,\n maxLines,\n truncated,\n expanded,\n strikethrough,\n underline,\n italic,\n bold,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-typography-${variant}`]: true,\n [`ic-typography-vertical-margins-${variant}`]: applyVerticalMargins,\n [\"bold\"]: bold,\n [\"italic\"]: italic,\n [\"strikethrough\"]: strikethrough,\n [\"underline\"]: underline,\n }}\n >\n {(variant === \"body\" ||\n (this.el.getRootNode() as ShadowRoot)?.host?.tagName ===\n \"IC-TOOLTIP\") &&\n maxLines > 0 ? (\n <div class=\"trunc-wrapper\" ref={(el) => (this.truncWrapperEl = el)}>\n <slot />\n </div>\n ) : (\n <slot />\n )}\n {variant === \"body\" && maxLines > 0 && truncated && (\n <button\n class={{ \"trunc-btn\": true, focus: this.truncButtonFocussed }}\n onFocus={this.truncButtonFocus}\n onBlur={this.truncButtonBlur}\n onMouseDown={this.truncButtonFocusFromMouse}\n onClick={this.toggleExpanded}\n aria-hidden=\"true\"\n >\n {expanded ? \"See less\" : \"See more\"}\n </button>\n )}\n </Host>\n );\n }\n}\n"],"version":3}