@ukic/web-components 2.1.0-beta.10 → 2.1.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/dist/cjs/chevron-icon-2bb3a907.js +10 -0
  2. package/dist/cjs/chevron-icon-2bb3a907.js.map +1 -0
  3. package/dist/cjs/core.cjs.js +1 -1
  4. package/dist/cjs/{helpers-6eb26e7a.js → helpers-2021e212.js} +3 -2
  5. package/dist/cjs/helpers-2021e212.js.map +1 -0
  6. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-breadcrumb.cjs.entry.js +4 -4
  10. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js +9 -4
  12. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +4 -4
  14. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  22. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +9 -3
  26. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +11 -7
  28. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-link.cjs.entry.js +3 -3
  31. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-menu-group.cjs.entry.js +24 -0
  33. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -0
  34. package/dist/cjs/ic-menu-item.cjs.entry.js +120 -0
  35. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -0
  36. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -3
  38. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-navigation-item.cjs.entry.js +3 -3
  40. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-popover-menu.cjs.entry.js +236 -0
  44. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -0
  45. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-search-bar.cjs.entry.js +4 -2
  48. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-select.cjs.entry.js +15 -13
  50. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-side-navigation.cjs.entry.js +4 -4
  52. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-toast.cjs.entry.js +2 -2
  60. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  62. package/dist/cjs/index-f79a4e53.js +12 -0
  63. package/dist/cjs/loader.cjs.js +1 -1
  64. package/dist/collection/collection-manifest.json +3 -0
  65. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +19 -4
  66. package/dist/collection/components/ic-button/ic-button.js +2 -1
  67. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  68. package/dist/collection/components/ic-card/ic-card.css +16 -2
  69. package/dist/collection/components/ic-footer-link/ic-footer-link.css +16 -3
  70. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +8 -2
  71. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
  72. package/dist/collection/components/ic-link/ic-link.css +16 -3
  73. package/dist/collection/components/ic-link/ic-link.js +6 -3
  74. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  75. package/dist/collection/components/ic-menu/ic-menu.js +10 -6
  76. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  77. package/dist/collection/components/ic-menu-group/ic-menu-group.css +465 -0
  78. package/dist/collection/components/ic-menu-group/ic-menu-group.js +45 -0
  79. package/dist/collection/components/ic-menu-group/ic-menu-group.js.map +1 -0
  80. package/dist/collection/components/ic-menu-item/ic-menu-item.css +633 -0
  81. package/dist/collection/components/ic-menu-item/ic-menu-item.js +392 -0
  82. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -0
  83. package/dist/collection/components/ic-menu-item/ic-menu-item.types.js +2 -0
  84. package/dist/collection/components/ic-menu-item/ic-menu-item.types.js.map +1 -0
  85. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +535 -0
  86. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +432 -0
  87. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -0
  88. package/dist/collection/components/ic-popover-menu/ic-popover-menu.test.a11y.js +13 -0
  89. package/dist/collection/components/ic-popover-menu/ic-popover-menu.test.a11y.js.map +1 -0
  90. package/dist/collection/components/ic-search-bar/ic-search-bar.js +3 -1
  91. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  92. package/dist/collection/components/ic-select/ic-select.css +13 -13
  93. package/dist/collection/components/ic-select/ic-select.js +18 -13
  94. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  95. package/dist/collection/components/ic-side-navigation/ic-side-navigation-test-examples.js +90 -0
  96. package/dist/collection/components/ic-side-navigation/ic-side-navigation-test-examples.js.map +1 -1
  97. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +1 -1
  98. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  99. package/dist/collection/components/ic-toast/ic-toast.css +5 -0
  100. package/dist/collection/components/ic-tooltip/ic-tooltip.js +6 -2
  101. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  102. package/dist/collection/utils/helpers.js +1 -1
  103. package/dist/collection/utils/helpers.js.map +1 -1
  104. package/dist/components/helpers.js +2 -2
  105. package/dist/components/helpers.js.map +1 -1
  106. package/dist/components/ic-breadcrumb2.js +1 -1
  107. package/dist/components/ic-breadcrumb2.js.map +1 -1
  108. package/dist/components/ic-button2.js +2 -1
  109. package/dist/components/ic-button2.js.map +1 -1
  110. package/dist/components/ic-card.js +1 -1
  111. package/dist/components/ic-card.js.map +1 -1
  112. package/dist/components/ic-footer-link.js +1 -1
  113. package/dist/components/ic-footer-link.js.map +1 -1
  114. package/dist/components/ic-horizontal-scroll2.js +9 -3
  115. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  116. package/dist/components/ic-link2.js +2 -2
  117. package/dist/components/ic-link2.js.map +1 -1
  118. package/dist/components/ic-menu-group.d.ts +11 -0
  119. package/dist/components/ic-menu-group.js +46 -0
  120. package/dist/components/ic-menu-group.js.map +1 -0
  121. package/dist/components/ic-menu-item.d.ts +11 -0
  122. package/dist/components/ic-menu-item.js +8 -0
  123. package/dist/components/ic-menu-item.js.map +1 -0
  124. package/dist/components/ic-menu-item2.js +167 -0
  125. package/dist/components/ic-menu-item2.js.map +1 -0
  126. package/dist/components/ic-menu2.js +11 -8
  127. package/dist/components/ic-menu2.js.map +1 -1
  128. package/dist/components/ic-navigation-menu2.js +1 -1
  129. package/dist/components/ic-popover-menu.d.ts +11 -0
  130. package/dist/components/ic-popover-menu.js +290 -0
  131. package/dist/components/ic-popover-menu.js.map +1 -0
  132. package/dist/components/ic-radio-option.js +1 -1
  133. package/dist/components/ic-search-bar.js +4 -2
  134. package/dist/components/ic-search-bar.js.map +1 -1
  135. package/dist/components/ic-select.js +15 -13
  136. package/dist/components/ic-select.js.map +1 -1
  137. package/dist/components/ic-side-navigation.js +2 -2
  138. package/dist/components/ic-side-navigation.js.map +1 -1
  139. package/dist/components/ic-stepper.js +1 -1
  140. package/dist/components/ic-text-field2.js +1 -1
  141. package/dist/components/ic-theme.js +1 -1
  142. package/dist/components/ic-toast.js +2 -2
  143. package/dist/components/ic-toast.js.map +1 -1
  144. package/dist/components/ic-tooltip2.js +6 -2
  145. package/dist/components/ic-tooltip2.js.map +1 -1
  146. package/dist/components/ic-top-navigation.js +1 -1
  147. package/dist/components/index.d.ts +3 -0
  148. package/dist/components/index.js +3 -0
  149. package/dist/components/index.js.map +1 -1
  150. package/dist/core/core.css +2 -2
  151. package/dist/core/core.esm.js +1 -1
  152. package/dist/core/core.esm.js.map +1 -1
  153. package/dist/core/{p-18bf3cb0.entry.js → p-037dfe9d.entry.js} +2 -2
  154. package/dist/core/{p-d86b0d0e.entry.js → p-05c5c6c4.entry.js} +2 -2
  155. package/dist/core/{p-24240e11.js → p-06321d19.js} +2 -2
  156. package/dist/core/{p-284970bc.entry.js → p-0a463a65.entry.js} +2 -2
  157. package/dist/core/{p-7a0bf893.entry.js → p-0faf328a.entry.js} +2 -2
  158. package/dist/core/{p-5b083ce5.entry.js → p-102281fd.entry.js} +2 -2
  159. package/dist/core/{p-18ae4b6d.entry.js → p-1549adc1.entry.js} +2 -2
  160. package/dist/core/{p-3dda76db.entry.js → p-25b208ae.entry.js} +2 -2
  161. package/dist/core/{p-ba8d6c23.entry.js → p-26c9e522.entry.js} +2 -2
  162. package/dist/core/{p-41e239cb.entry.js → p-33a0aabe.entry.js} +2 -2
  163. package/dist/core/p-3d84a743.entry.js +2 -0
  164. package/dist/core/p-3d84a743.entry.js.map +1 -0
  165. package/dist/core/{p-1724000c.js → p-3dea2867.js} +2 -2
  166. package/dist/core/p-3dea2867.js.map +1 -0
  167. package/dist/core/{p-a667e329.entry.js → p-3fd4f8eb.entry.js} +2 -2
  168. package/dist/core/{p-a10da430.entry.js → p-48a5c2a7.entry.js} +2 -2
  169. package/dist/core/p-48a5c2a7.entry.js.map +1 -0
  170. package/dist/core/p-4d8392fe.entry.js +2 -0
  171. package/dist/core/p-4d8392fe.entry.js.map +1 -0
  172. package/dist/core/p-4ee03271.entry.js +2 -0
  173. package/dist/core/p-4ee03271.entry.js.map +1 -0
  174. package/dist/core/p-58ff516f.entry.js +2 -0
  175. package/dist/core/p-58ff516f.entry.js.map +1 -0
  176. package/dist/core/{p-7818d958.entry.js → p-73fddc63.entry.js} +2 -2
  177. package/dist/core/p-73fddc63.entry.js.map +1 -0
  178. package/dist/core/{p-7a9bc7f2.entry.js → p-741b4ea3.entry.js} +2 -2
  179. package/dist/core/{p-cccbf2bf.entry.js → p-7dcb9104.entry.js} +2 -2
  180. package/dist/core/p-81652a98.entry.js +2 -0
  181. package/dist/core/p-81652a98.entry.js.map +1 -0
  182. package/dist/core/p-87c7ba3b.entry.js +2 -0
  183. package/dist/core/p-87c7ba3b.entry.js.map +1 -0
  184. package/dist/core/{p-c4a7c734.entry.js → p-8c9cc4d5.entry.js} +2 -2
  185. package/dist/core/{p-c7b86643.entry.js → p-a2c7dc6c.entry.js} +2 -2
  186. package/dist/core/p-a3742d40.entry.js +2 -0
  187. package/dist/core/p-a3742d40.entry.js.map +1 -0
  188. package/dist/core/p-a44a0500.entry.js +2 -0
  189. package/dist/core/p-a44a0500.entry.js.map +1 -0
  190. package/dist/core/p-a8e969ea.entry.js +2 -0
  191. package/dist/core/p-a8e969ea.entry.js.map +1 -0
  192. package/dist/core/{p-c72e4b75.entry.js → p-ac6ecdb6.entry.js} +2 -2
  193. package/dist/core/{p-eba373bf.entry.js → p-acb08809.entry.js} +2 -2
  194. package/dist/core/p-affb42c7.entry.js +2 -0
  195. package/dist/core/p-affb42c7.entry.js.map +1 -0
  196. package/dist/core/{p-b35ae170.entry.js → p-b7fc1f35.entry.js} +2 -2
  197. package/dist/core/{p-bd819f68.entry.js → p-b8b960a5.entry.js} +2 -2
  198. package/dist/core/{p-91a8db51.entry.js → p-b921bb19.entry.js} +2 -2
  199. package/dist/core/{p-c7c5d2c5.entry.js → p-c996810e.entry.js} +2 -2
  200. package/dist/core/{p-6a397882.entry.js → p-cc62d065.entry.js} +2 -2
  201. package/dist/core/p-cc62d065.entry.js.map +1 -0
  202. package/dist/core/{p-b40bd77c.entry.js → p-d28d7f24.entry.js} +2 -2
  203. package/dist/core/{p-35a03442.entry.js → p-dbfdfa8a.entry.js} +2 -2
  204. package/dist/core/{p-691ea0f2.entry.js → p-dd71a986.entry.js} +2 -2
  205. package/dist/core/{p-e0d88c31.entry.js → p-e4547265.entry.js} +2 -2
  206. package/dist/core/{p-c8f07be6.entry.js → p-ea0c4aca.entry.js} +2 -2
  207. package/dist/core/{p-521be4e2.entry.js → p-f6ddd32f.entry.js} +2 -2
  208. package/dist/core/p-f6ddd32f.entry.js.map +1 -0
  209. package/dist/core/{p-b4234318.entry.js → p-f777679c.entry.js} +2 -2
  210. package/dist/esm/chevron-icon-7927f709.js +8 -0
  211. package/dist/esm/chevron-icon-7927f709.js.map +1 -0
  212. package/dist/esm/core.js +1 -1
  213. package/dist/esm/{helpers-c332acf8.js → helpers-b2b47a7d.js} +3 -3
  214. package/dist/esm/helpers-b2b47a7d.js.map +1 -0
  215. package/dist/esm/ic-alert.entry.js +1 -1
  216. package/dist/esm/ic-back-to-top.entry.js +1 -1
  217. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  218. package/dist/esm/ic-breadcrumb.entry.js +4 -4
  219. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  220. package/dist/esm/ic-button_3.entry.js +9 -4
  221. package/dist/esm/ic-button_3.entry.js.map +1 -1
  222. package/dist/esm/ic-card.entry.js +4 -4
  223. package/dist/esm/ic-card.entry.js.map +1 -1
  224. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  225. package/dist/esm/ic-checkbox.entry.js +1 -1
  226. package/dist/esm/ic-chip.entry.js +1 -1
  227. package/dist/esm/ic-data-row.entry.js +1 -1
  228. package/dist/esm/ic-divider.entry.js +1 -1
  229. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  230. package/dist/esm/ic-footer-link.entry.js +2 -2
  231. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  232. package/dist/esm/ic-footer.entry.js +1 -1
  233. package/dist/esm/ic-hero.entry.js +1 -1
  234. package/dist/esm/ic-horizontal-scroll.entry.js +9 -3
  235. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  236. package/dist/esm/ic-input-component-container_3.entry.js +11 -7
  237. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  238. package/dist/esm/ic-input-label_2.entry.js +1 -1
  239. package/dist/esm/ic-link.entry.js +3 -3
  240. package/dist/esm/ic-link.entry.js.map +1 -1
  241. package/dist/esm/ic-menu-group.entry.js +20 -0
  242. package/dist/esm/ic-menu-group.entry.js.map +1 -0
  243. package/dist/esm/ic-menu-item.entry.js +116 -0
  244. package/dist/esm/ic-menu-item.entry.js.map +1 -0
  245. package/dist/esm/ic-navigation-button.entry.js +1 -1
  246. package/dist/esm/ic-navigation-group.entry.js +3 -3
  247. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  248. package/dist/esm/ic-navigation-item.entry.js +3 -3
  249. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  250. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  251. package/dist/esm/ic-page-header.entry.js +1 -1
  252. package/dist/esm/ic-popover-menu.entry.js +232 -0
  253. package/dist/esm/ic-popover-menu.entry.js.map +1 -0
  254. package/dist/esm/ic-radio-group.entry.js +1 -1
  255. package/dist/esm/ic-radio-option.entry.js +1 -1
  256. package/dist/esm/ic-search-bar.entry.js +4 -2
  257. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  258. package/dist/esm/ic-select.entry.js +15 -13
  259. package/dist/esm/ic-select.entry.js.map +1 -1
  260. package/dist/esm/ic-side-navigation.entry.js +4 -4
  261. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  262. package/dist/esm/ic-status-tag.entry.js +1 -1
  263. package/dist/esm/ic-stepper.entry.js +1 -1
  264. package/dist/esm/ic-switch.entry.js +1 -1
  265. package/dist/esm/ic-tab-group.entry.js +1 -1
  266. package/dist/esm/ic-text-field.entry.js +1 -1
  267. package/dist/esm/ic-theme.entry.js +1 -1
  268. package/dist/esm/ic-toast.entry.js +2 -2
  269. package/dist/esm/ic-toast.entry.js.map +1 -1
  270. package/dist/esm/ic-top-navigation.entry.js +1 -1
  271. package/dist/esm/index-90721b3c.js +12 -0
  272. package/dist/esm/loader.js +1 -1
  273. package/dist/types/components/ic-link/ic-link.d.ts +1 -1
  274. package/dist/types/components/ic-menu-group/ic-menu-group.d.ts +8 -0
  275. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +74 -0
  276. package/dist/types/components/ic-menu-item/ic-menu-item.types.d.ts +1 -0
  277. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +58 -0
  278. package/dist/types/components/ic-popover-menu/ic-popover-menu.test.a11y.d.ts +1 -0
  279. package/dist/types/components/ic-select/ic-select.d.ts +1 -1
  280. package/dist/types/components/ic-side-navigation/ic-side-navigation-test-examples.d.ts +1 -0
  281. package/dist/types/components.d.ts +173 -4
  282. package/hydrate/index.js +454 -33
  283. package/package.json +3 -3
  284. package/dist/cjs/chevron-icon-2645d6b0.js +0 -10
  285. package/dist/cjs/chevron-icon-2645d6b0.js.map +0 -1
  286. package/dist/cjs/helpers-6eb26e7a.js.map +0 -1
  287. package/dist/core/p-1724000c.js.map +0 -1
  288. package/dist/core/p-44c9612c.entry.js +0 -2
  289. package/dist/core/p-44c9612c.entry.js.map +0 -1
  290. package/dist/core/p-4a73728b.entry.js +0 -2
  291. package/dist/core/p-4a73728b.entry.js.map +0 -1
  292. package/dist/core/p-521be4e2.entry.js.map +0 -1
  293. package/dist/core/p-6a397882.entry.js.map +0 -1
  294. package/dist/core/p-7818d958.entry.js.map +0 -1
  295. package/dist/core/p-8f1176c6.entry.js +0 -2
  296. package/dist/core/p-8f1176c6.entry.js.map +0 -1
  297. package/dist/core/p-a09d853e.entry.js +0 -2
  298. package/dist/core/p-a09d853e.entry.js.map +0 -1
  299. package/dist/core/p-a10da430.entry.js.map +0 -1
  300. package/dist/core/p-d37b9695.entry.js +0 -2
  301. package/dist/core/p-d37b9695.entry.js.map +0 -1
  302. package/dist/core/p-dea3d5f0.entry.js +0 -2
  303. package/dist/core/p-dea3d5f0.entry.js.map +0 -1
  304. package/dist/core/p-e9202767.entry.js +0 -2
  305. package/dist/core/p-e9202767.entry.js.map +0 -1
  306. package/dist/esm/chevron-icon-98c98242.js +0 -8
  307. package/dist/esm/chevron-icon-98c98242.js.map +0 -1
  308. package/dist/esm/helpers-c332acf8.js.map +0 -1
  309. /package/dist/core/{p-18bf3cb0.entry.js.map → p-037dfe9d.entry.js.map} +0 -0
  310. /package/dist/core/{p-d86b0d0e.entry.js.map → p-05c5c6c4.entry.js.map} +0 -0
  311. /package/dist/core/{p-24240e11.js.map → p-06321d19.js.map} +0 -0
  312. /package/dist/core/{p-284970bc.entry.js.map → p-0a463a65.entry.js.map} +0 -0
  313. /package/dist/core/{p-7a0bf893.entry.js.map → p-0faf328a.entry.js.map} +0 -0
  314. /package/dist/core/{p-5b083ce5.entry.js.map → p-102281fd.entry.js.map} +0 -0
  315. /package/dist/core/{p-18ae4b6d.entry.js.map → p-1549adc1.entry.js.map} +0 -0
  316. /package/dist/core/{p-3dda76db.entry.js.map → p-25b208ae.entry.js.map} +0 -0
  317. /package/dist/core/{p-ba8d6c23.entry.js.map → p-26c9e522.entry.js.map} +0 -0
  318. /package/dist/core/{p-41e239cb.entry.js.map → p-33a0aabe.entry.js.map} +0 -0
  319. /package/dist/core/{p-a667e329.entry.js.map → p-3fd4f8eb.entry.js.map} +0 -0
  320. /package/dist/core/{p-7a9bc7f2.entry.js.map → p-741b4ea3.entry.js.map} +0 -0
  321. /package/dist/core/{p-cccbf2bf.entry.js.map → p-7dcb9104.entry.js.map} +0 -0
  322. /package/dist/core/{p-c4a7c734.entry.js.map → p-8c9cc4d5.entry.js.map} +0 -0
  323. /package/dist/core/{p-c7b86643.entry.js.map → p-a2c7dc6c.entry.js.map} +0 -0
  324. /package/dist/core/{p-c72e4b75.entry.js.map → p-ac6ecdb6.entry.js.map} +0 -0
  325. /package/dist/core/{p-eba373bf.entry.js.map → p-acb08809.entry.js.map} +0 -0
  326. /package/dist/core/{p-b35ae170.entry.js.map → p-b7fc1f35.entry.js.map} +0 -0
  327. /package/dist/core/{p-bd819f68.entry.js.map → p-b8b960a5.entry.js.map} +0 -0
  328. /package/dist/core/{p-91a8db51.entry.js.map → p-b921bb19.entry.js.map} +0 -0
  329. /package/dist/core/{p-c7c5d2c5.entry.js.map → p-c996810e.entry.js.map} +0 -0
  330. /package/dist/core/{p-b40bd77c.entry.js.map → p-d28d7f24.entry.js.map} +0 -0
  331. /package/dist/core/{p-35a03442.entry.js.map → p-dbfdfa8a.entry.js.map} +0 -0
  332. /package/dist/core/{p-691ea0f2.entry.js.map → p-dd71a986.entry.js.map} +0 -0
  333. /package/dist/core/{p-e0d88c31.entry.js.map → p-e4547265.entry.js.map} +0 -0
  334. /package/dist/core/{p-c8f07be6.entry.js.map → p-ea0c4aca.entry.js.map} +0 -0
  335. /package/dist/core/{p-b4234318.entry.js.map → p-f777679c.entry.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ukic/web-components",
3
- "version": "2.1.0-beta.10",
3
+ "version": "2.1.0-beta.11",
4
4
  "description": "A web component UI library compiled with StencilJS",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "./dist/index.js",
@@ -40,7 +40,7 @@
40
40
  "dependencies": {
41
41
  "@popperjs/core": "^2.11.2",
42
42
  "@stencil/core": "^2.16.1",
43
- "@ukic/fonts": "^2.1.0-beta.10"
43
+ "@ukic/fonts": "^2.1.0-beta.11"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@babel/core": "^7.16.0",
@@ -74,5 +74,5 @@
74
74
  "webpack": "^5.76.0"
75
75
  },
76
76
  "license": "MIT",
77
- "gitHead": "01c84104c34316987766adfa69944b8072cc702a"
77
+ "gitHead": "c2853b352452de9cf09157c2b704ec7466b34d4c"
78
78
  }
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- const chevronIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4
- <path d="M9.70687 6L8.29688 7.41L12.8769 12L8.29688 16.59L9.70687 18L15.7069 12L9.70687 6Z" fill="currentColor"/>
5
- </svg>
6
- `;
7
-
8
- exports.chevronIcon = chevronIcon;
9
-
10
- //# sourceMappingURL=chevron-icon-2645d6b0.js.map
@@ -1 +0,0 @@
1
- {"file":"chevron-icon-2645d6b0.js","mappings":";;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1 +0,0 @@
1
- {"file":"helpers-6eb26e7a.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;MACa,aAAa,GAAG;EAC3B,OAAO,EAAE;IACP,IAAI,EAAE,WAAW;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/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined) {\n if (always || hasShadowDom(container)) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean => {\n if (!value) {\n return true;\n }\n\n return value.trim().length === 0;\n};\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[]\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n return ungroupedOptions.find((option) => option.value === value)?.label;\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string => {\n return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n const themeColorBrightness =\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000;\n return themeColorBrightness;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (slot: Element) => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n};\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n if (document.querySelector(\"ic-classification-banner:not([inline='true'])\")) {\n return true;\n } else {\n return false;\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16) => {\n const tempPx = parseInt(px);\n return `${(1 / base) * tempPx}rem`;\n};\n"],"version":3}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/utils/constants.ts","src/utils/helpers.ts"],"names":["VARIANT_ICONS","neutral","icon","neutralIcon","ariaLabel","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","IC_INHERITED_ARIA","IC_DEVICE_SIZES","XS","S","M","L","XL","IC_BLOCK_COLOR_COMPONENTS","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","ic-alert","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","DARK_MODE_THRESHOLD","inheritAttributes","element","attributes","attributeObject","forEach","attr","hasAttribute","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","always","container","name","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","removeHiddenInput","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","trim","getThemeFromContext","themeFromEvent","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","_a","includes","IcThemeForegroundEnum","Default","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","handleHiddenFormButtonClick","form","button","hiddenFormButton","document","setAttribute","style","display","click","isEmptyString","length","getLabelFromValue","options","ungroupedOptions","map","option","children","push","find","label","getFilteredMenuOptions","includeDescriptions","searchString","position","rawFilteredOptions","description","startsWith","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getThemeColorBrightness","themeRed","themeGreen","themeBlue","themeColorBrightness","parseInt","getThemeForegroundColor","getSlot","querySelector","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","getParentElementType","getParentElement","Number","replace","hasValidationStatus","status","isSlotUsed","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","i","prop","propName","console","kebabToCamelCase","kebabCase","individualWords","split","camelCase","substring","toUpperCase","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","c","r","g","b","a","slice","rgbaStrToObj","rgbaStr","fourthChar","colorRGBA","rgba","rgb","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","getForm","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","tempPx"],"mappings":"y4DAOaA,EAAgB,CAC3BC,QAAS,CACPC,KAAMC,EACNC,UAAW,WAEbC,KAAM,CACJH,KAAMI,EACNF,UAAW,wBAEbG,QAAS,CACPL,KAAMM,EACNJ,UAAW,WAEbK,MAAO,CACLP,KAAMQ,EACNN,UAAW,SAEbO,QAAS,CACPT,KAAMU,EACNR,UAAW,kBAKFS,EAAoB,CAC/B,cACA,YACA,gBACA,e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AM,KACToB,EAAUR,EAAIlC,OAAO4C,EAAI,IACzBF,EAAUP,EAAInC,OAAO4C,EAAI,IACzBF,EAAUN,EAAIpC,OAAO4C,EAAI,IAG3B,OAAOF,SAGIG,EAAqB1L,GACzBA,EAAQ2L,YAAc3L,EAAQ4L,kBAO1BjD,EAAwBS,GACnCA,EAAM/G,cAAc4B,QAEf,MAAM2E,EAAoBQ,GAC/BA,EAAM/G,oBAEKwJ,EAA0B,KACrC,GAAI3G,SAAS4C,cAAc,iDAAkD,CAC3E,OAAO,SACF,CACL,OAAO,QAIJ,MAAMgE,GAAW1J,GACfA,EAAG0B,QAAQ,cAGPiI,GAAuB,CAClC3J,EACAoI,KAEA,MAAMzF,EAAO+G,GAAQ1J,GACrB,GAAI2C,IAAS,KAAM,CACjBA,EAAKiH,iBAAiB,QAASxB,WAItByB,GAA0B,CACrC7J,EACAoI,KAEA,MAAMzF,EAAO+G,GAAQ1J,GACrB,GAAI2C,IAAS,KAAM,CACjBA,EAAKmH,oBAAoB,QAAS1B,WAIzB2B,GAAU,CAACC,EAAYC,EAAO,MACzC,MAAMC,EAAS3E,SAASyE,GACxB,MAAO,GAAI,EAAIC,EAAQC","sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined) {\n if (always || hasShadowDom(container)) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean => {\n if (!value) {\n return true;\n }\n\n return value.trim().length === 0;\n};\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[]\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n return ungroupedOptions.find((option) => option.value === value)?.label;\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string => {\n return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n const themeColorBrightness =\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000;\n return themeColorBrightness;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (slot: Element) => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n};\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n if (document.querySelector(\"ic-classification-banner:not([inline='true'])\")) {\n return true;\n } else {\n return false;\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16) => {\n const tempPx = parseInt(px);\n return `${(1 / base) * tempPx}rem`;\n};\n"]}
@@ -1,2 +0,0 @@
1
- import{r as e,h as t,g as i}from"./p-5450cebf.js";import{b as a,a as o,i as r}from"./p-1724000c.js";import{I as n}from"./p-6f57b13c.js";import{c as s}from"./p-24240e11.js";const c='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:flex}a{text-decoration:none !important;color:var(--ic-architechtural-black) !important}button{border:none;background-color:transparent;outline:var(--ic-hc-focus-outline)}.card,.card.clickable{border:0.063rem solid var(--ic-architectural-300);border-radius:var(--ic-border-radius);box-sizing:border-box;padding:var(--ic-space-md);text-align:left;color:var(--ic-architechtural-black);transition:var(--ic-easing-transition-fast)}.dark.card,.dark.card.clickable{border:0.063rem solid var(--ic-architectural-700)}.card.clickable:hover{background-color:var(--ic-action-default-bg-hover);border-color:var(--ic-action-default-hover);cursor:pointer}.card.clickable:focus,.card.clickable.focussed{background-color:var(--ic-action-default-bg-hover);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}.card.clickable:active{background-color:var(--ic-action-default-bg-active);box-shadow:var(--ic-border-focus)}.card.disabled{border:var(--ic-border-disabled)}.card.fullwidth,:host([full-width="true"]){width:100%}.card-header{display:flex;align-items:center}.icon{display:flex;align-items:center;padding-right:var(--ic-space-xs)}.card.disabled ::slotted(svg){fill:var(--ic-color-tertiary-text)}.card.clickable .card-title{color:var(--ic-hyperlink);text-decoration:underline;text-decoration-thickness:0.063rem}.card.clickable:hover .card-title,.card.clickable:focus .card-title,.card.clickable.focussed .card-title{text-decoration-thickness:25%;text-underline-offset:25%}.card.clickable:active .card-title{text-decoration:none}.card.disabled .card-title{text-decoration:underline;text-decoration-thickness:0.063rem;text-decoration-color:var(--ic-color-tertiary-text);color:var(--ic-color-tertiary-text)}.subheading{margin-top:var(--ic-space-xxs)}.adornment{margin-top:var(--ic-space-xxs)}.card-message{margin-top:var(--ic-space-md);align-items:left}.card.disabled .card-message,.card.disabled .subheading{color:var(--ic-color-tertiary-text)}.interaction-button{margin-left:auto}.image-top{margin-bottom:var(--ic-space-md);display:flex;justify-content:center}.image-mid{margin-top:var(--ic-space-md);display:flex;justify-content:center}.interaction-controls{margin-top:var(--ic-space-md);display:flex;align-items:center}.toggle-button{margin-left:auto}.toggle-button-closed svg{transform:rotate(90deg)}.toggle-button-expanded svg{transform:rotate(-90deg)}.expanded-content{margin-top:var(--ic-space-md)}';const d=class{constructor(t){e(this,t);this.parentFocussed=()=>{this.isFocussed=true};this.parentBlurred=()=>{this.isFocussed=false};this.toggleExpanded=()=>{this.areaExpanded=!this.areaExpanded};this.clickable=false;this.href=undefined;this.hreflang="";this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined;this.heading=undefined;this.subheading=undefined;this.message="";this.disabled=false;this.fullWidth=false;this.expandable=false;this.parentIsAnchorTag=false;this.isFocussed=false;this.parentEl=null;this.appearance="default";this.areaExpanded=false}async setFocus(){if(this.el.shadowRoot.querySelector("a")){this.el.shadowRoot.querySelector("a").focus()}else if(this.el.shadowRoot.querySelector("button")){this.el.shadowRoot.querySelector("button").focus()}}handleHostClick(e){if(this.disabled){e.stopImmediatePropagation()}}themeChangeHandler(e){const t=e.detail;this.updateTheme(t.mode)}updateTheme(e=null){const t=a(this.el,e||null);if(t!==n.Default){this.appearance=t}}componentWillLoad(){this.parentEl=this.el.parentElement;if(this.parentEl.tagName==="A"){this.clickable=true;this.parentIsAnchorTag=true;this.parentEl.classList.add("ic-card-wrapper-link");this.parentEl.addEventListener("focus",this.parentFocussed);this.parentEl.addEventListener("blur",this.parentBlurred)}}disconnectedCallback(){if(this.parentIsAnchorTag){this.parentEl.removeEventListener("focus",this.parentFocussed);this.parentEl.removeEventListener("blur",this.parentBlurred)}}componentDidLoad(){o([{prop:this.heading,propName:"heading"}],"Card");this.updateTheme()}render(){const{clickable:e,disabled:i,expandable:a,heading:o,message:c,href:d,hreflang:l,referrerpolicy:b,rel:u,subheading:h,target:p,fullWidth:m,parentIsAnchorTag:g,isFocussed:f}=this;const v=g?"div":e?this.href===undefined?"button":"a":"div";const x=v=="a"&&{href:d,hrefLang:l,referrerPolicy:b,rel:u,target:p};return t(v,Object.assign({class:{["card"]:true,["clickable"]:e&&!i,["disabled"]:i,["fullwidth"]:m,["focussed"]:f,["dark"]:this.appearance===n.Dark},tabindex:e&&!g?0:null,"aria-disabled":i?"true":null,disabled:i?true:null},x),r(this.el,"image-top")&&t("div",{class:"image-top"},t("slot",{name:"image-top"})),t("div",{class:"card-header"},r(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("div",{class:"card-title"},t("slot",{name:"heading"},t("ic-typography",{variant:"h4"},t("p",null,o)))),r(this.el,"interaction-button")&&t("div",{class:"interaction-button"},t("slot",{name:"interaction-button"}))),(h||r(this.el,"subheading"))&&t("div",{class:"subheading"},t("slot",{name:"subheading"},t("ic-typography",{variant:"subtitle-small"},h))),r(this.el,"adornment")&&t("div",{class:"adornment"},t("slot",{name:"adornment"})),r(this.el,"image-mid")&&t("div",{class:"image-mid"},t("slot",{name:"image-mid"})),(c||r(this.el,"message"))&&t("div",{class:{["card-message"]:true}},t("slot",{name:"message"},t("ic-typography",{variant:"body"},c))),(r(this.el,"interaction-controls")||a)&&t("div",{class:"interaction-controls"},t("slot",{name:"interaction-controls"}),a&&t("ic-button",{class:{["toggle-button"]:true,["toggle-button-closed"]:!this.areaExpanded,["toggle-button-expanded"]:this.areaExpanded},variant:"icon",disableTooltip:true,"aria-label":"Toggle expandable area","aria-expanded":this.areaExpanded,"aria-controls":"expanded-content-area",onClick:this.toggleExpanded,innerHTML:s})),r(this.el,"expanded-content")&&this.areaExpanded&&t("div",{class:"expanded-content",id:"expanded-content-area"},t("slot",{name:"expanded-content"})))}get el(){return i(this)}};d.style=c;export{d as ic_card};
2
- //# sourceMappingURL=p-44c9612c.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/ic-card/ic-card.css?tag=ic-card&encapsulation=shadow","src/components/ic-card/ic-card.tsx"],"names":["icCardCss","Card","this","parentFocussed","isFocussed","parentBlurred","toggleExpanded","areaExpanded","[object Object]","el","shadowRoot","querySelector","focus","event","disabled","stopImmediatePropagation","ev","theme","detail","updateTheme","mode","newTheme","foregroundColor","getThemeFromContext","IcThemeForegroundEnum","Default","appearance","parentEl","parentElement","tagName","clickable","parentIsAnchorTag","classList","add","addEventListener","removeEventListener","onComponentRequiredPropUndefined","prop","heading","propName","expandable","message","href","hreflang","referrerpolicy","rel","subheading","target","fullWidth","Component","undefined","attrs","hrefLang","referrerPolicy","h","Object","assign","class","Dark","tabindex","aria-disabled","isSlotUsed","name","variant","disableTooltip","aria-label","aria-expanded","aria-controls","onClick","innerHTML","chevronIcon","id"],"mappings":"4KAAA,MAAMA,EAAY,8tJCsCLC,EAAI,+BAuFPC,KAAAC,eAAiB,KACvBD,KAAKE,WAAa,MAGZF,KAAAG,cAAgB,KACtBH,KAAKE,WAAa,OAWZF,KAAAI,eAAiB,KACvBJ,KAAKK,cAAgBL,KAAKK,6BAlGmB,wCAQnB,wIAwBD,iBAIE,qBAIC,sBAIC,6BAEO,sBAEP,oBAES,qBAEE,4BAET,MAMjCC,iBACE,GAAIN,KAAKO,GAAGC,WAAWC,cAAc,KAAM,CACzCT,KAAKO,GAAGC,WAAWC,cAAc,KAAKC,aACjC,GAAIV,KAAKO,GAAGC,WAAWC,cAAc,UAAW,CACrDT,KAAKO,GAAGC,WAAWC,cAAc,UAAUC,SAK/CJ,gBAAgBK,GACd,GAAIX,KAAKY,SAAU,CACjBD,EAAME,4BAKVP,mBAAmBQ,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BhB,KAAKiB,YAAYF,EAAMG,MAWjBZ,YAAYa,EAA8B,MA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AC,0BAA2BN,KAAKK,cAEnCwD,QAAQ,OACRC,eAAc,KAAAC,aACH,yBAAwBC,gBACpBhE,KAAKK,aAAY4D,gBAClB,wBACdC,QAASlE,KAAKI,eACd+D,UAAWC,KAKlBT,EAAW3D,KAAKO,GAAI,qBAAuBP,KAAKK,cAC/C+C,EAAA,MAAA,CAAKG,MAAM,mBAAmBc,GAAG,yBAC/BjB,EAAA,OAAA,CAAMQ,KAAK","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-architechtural-black) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card,\n.card.clickable {\n border: 0.063rem solid var(--ic-architectural-300);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-architechtural-black);\n transition: var(--ic-easing-transition-fast);\n}\n\n.dark.card,\n.dark.card.clickable {\n border: 0.063rem solid var(--ic-architectural-700);\n}\n\n.card.clickable:hover {\n background-color: var(--ic-action-default-bg-hover);\n border-color: var(--ic-action-default-hover);\n cursor: pointer;\n}\n\n.card.clickable:focus,\n.card.clickable.focussed {\n background-color: var(--ic-action-default-bg-hover);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n}\n\n.card.clickable:active {\n background-color: var(--ic-action-default-bg-active);\n box-shadow: var(--ic-border-focus);\n}\n\n.card.disabled {\n border: var(--ic-border-disabled);\n}\n\n.card.fullwidth,\n:host([full-width=\"true\"]) {\n width: 100%;\n}\n\n.card-header {\n display: flex;\n align-items: center;\n}\n\n.icon {\n display: flex;\n align-items: center;\n padding-right: var(--ic-space-xs);\n}\n\n.card.disabled ::slotted(svg) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.card.clickable .card-title {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n text-decoration-thickness: 0.063rem;\n}\n\n.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title {\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n.card.clickable:active .card-title {\n text-decoration: none;\n}\n\n.card.disabled .card-title {\n text-decoration: underline;\n text-decoration-thickness: 0.063rem;\n text-decoration-color: var(--ic-color-tertiary-text);\n color: var(--ic-color-tertiary-text);\n}\n\n.subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n.adornment {\n margin-top: var(--ic-space-xxs);\n}\n\n.card-message {\n margin-top: var(--ic-space-md);\n align-items: left;\n}\n\n.card.disabled .card-message,\n.card.disabled .subheading {\n color: var(--ic-color-tertiary-text);\n}\n\n.interaction-button {\n margin-left: auto;\n}\n\n.image-top {\n margin-bottom: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.image-mid {\n margin-top: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.interaction-controls {\n margin-top: var(--ic-space-md);\n display: flex;\n align-items: center;\n}\n\n.toggle-button {\n margin-left: auto;\n}\n\n.toggle-button-closed svg {\n transform: rotate(90deg);\n}\n\n.toggle-button-expanded svg {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n margin-top: var(--ic-space-md);\n}\n","import {\n Component,\n Element,\n Listen,\n Prop,\n State,\n h,\n Method,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getThemeFromContext,\n} from \"../../utils/helpers\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot heading - Content will be placed at the top of the card to the right of the icon.\n * @slot message - Content will be placed in the main body of the card.\n * @slot subheading - Content will be placed below the card heading.\n * @slot adornment - Content will be placed below the card subheading.\n * @slot image-top - Content will be placed at the top of the card above all other content.\n * @slot image-mid - Content will be placed below the card heading section.\n * @slot icon - Content will be placed to the left of the card heading.\n * @slot interaction-button - Content will be placed in the top right corner of the heading section.\n * @slot interaction-controls - Content will be placed below the card message.\n * @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.\n */\n@Component({\n tag: \"ic-card\",\n styleUrl: \"ic-card.css\",\n shadow: true,\n})\nexport class Card {\n @Element() el: HTMLIcCardElement;\n\n /**\n * If `true`, the card will be a clickable variant, instead of static.\n */\n @Prop({ mutable: true }) clickable?: boolean = false;\n /**\n * The URL that the clickable card link points to. If set, the clickable card will render as an \"a\" tag, otherwise it will render as a button.\n */\n @Prop() href?: string | undefined;\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n /**\n * The heading for the card.\n */\n @Prop() heading!: string;\n /**\n * The subheading for the card.\n */\n @Prop() subheading?: string;\n /**\n * The main body message of the card.\n */\n @Prop() message?: string = \"\";\n /**\n * If `true`, the card will be disabled if it is clickable.\n */\n @Prop() disabled?: boolean = false;\n /**\n * If `true`, the card will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n /**\n * If `true`, the card will have an expandable area and expansion toggle button.\n */\n @Prop() expandable?: boolean = false;\n\n @State() parentIsAnchorTag: boolean = false;\n\n @State() isFocussed: boolean = false;\n\n @State() parentEl: HTMLElement | null = null;\n\n @State() appearance?: IcThemeForeground = \"default\";\n\n @State() areaExpanded: boolean = false;\n\n /**\n * Sets focus on the card.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"a\")) {\n this.el.shadowRoot.querySelector(\"a\").focus();\n } else if (this.el.shadowRoot.querySelector(\"button\")) {\n this.el.shadowRoot.querySelector(\"button\").focus();\n }\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private parentFocussed = (): void => {\n this.isFocussed = true;\n };\n\n private parentBlurred = (): void => {\n this.isFocussed = false;\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private toggleExpanded = (): void => {\n this.areaExpanded = !this.areaExpanded;\n };\n\n componentWillLoad(): void {\n this.parentEl = this.el.parentElement;\n\n if (this.parentEl.tagName === \"A\") {\n this.clickable = true;\n this.parentIsAnchorTag = true;\n this.parentEl.classList.add(\"ic-card-wrapper-link\");\n this.parentEl.addEventListener(\"focus\", this.parentFocussed);\n this.parentEl.addEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n disconnectedCallback(): void {\n if (this.parentIsAnchorTag) {\n this.parentEl.removeEventListener(\"focus\", this.parentFocussed);\n this.parentEl.removeEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Card\"\n );\n this.updateTheme();\n }\n\n render() {\n const {\n clickable,\n disabled,\n expandable,\n heading,\n message,\n href,\n hreflang,\n referrerpolicy,\n rel,\n subheading,\n target,\n fullWidth,\n parentIsAnchorTag,\n isFocussed,\n } = this;\n\n const Component = parentIsAnchorTag\n ? \"div\"\n : clickable\n ? this.href === undefined\n ? \"button\"\n : \"a\"\n : \"div\";\n\n const attrs = Component == \"a\" && {\n href: href,\n hrefLang: hreflang,\n referrerPolicy: referrerpolicy,\n rel: rel,\n target: target,\n };\n\n return (\n <Component\n class={{\n [\"card\"]: true,\n [\"clickable\"]: clickable && !disabled,\n [\"disabled\"]: disabled,\n [\"fullwidth\"]: fullWidth,\n [\"focussed\"]: isFocussed,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n }}\n tabindex={clickable && !parentIsAnchorTag ? 0 : null}\n aria-disabled={disabled ? \"true\" : null}\n disabled={disabled ? true : null}\n {...attrs}\n >\n {isSlotUsed(this.el, \"image-top\") && (\n <div class=\"image-top\">\n <slot name=\"image-top\"></slot>\n </div>\n )}\n <div class=\"card-header\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <div class=\"card-title\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">\n <p>{heading}</p>\n </ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"interaction-button\") && (\n <div class=\"interaction-button\">\n <slot name=\"interaction-button\"></slot>\n </div>\n )}\n </div>\n {(subheading || isSlotUsed(this.el, \"subheading\")) && (\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">\n {subheading}\n </ic-typography>\n </slot>\n </div>\n )}\n {isSlotUsed(this.el, \"adornment\") && (\n <div class=\"adornment\">\n <slot name=\"adornment\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"image-mid\") && (\n <div class=\"image-mid\">\n <slot name=\"image-mid\"></slot>\n </div>\n )}\n {(message || isSlotUsed(this.el, \"message\")) && (\n <div\n class={{\n [\"card-message\"]: true,\n }}\n >\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n )}\n {(isSlotUsed(this.el, \"interaction-controls\") || expandable) && (\n <div class=\"interaction-controls\">\n <slot name=\"interaction-controls\"></slot>\n {expandable && (\n <ic-button\n class={{\n [\"toggle-button\"]: true,\n [\"toggle-button-closed\"]: !this.areaExpanded,\n [\"toggle-button-expanded\"]: this.areaExpanded,\n }}\n variant=\"icon\"\n disableTooltip\n aria-label=\"Toggle expandable area\"\n aria-expanded={this.areaExpanded}\n aria-controls=\"expanded-content-area\"\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></ic-button>\n )}\n </div>\n )}\n {isSlotUsed(this.el, \"expanded-content\") && this.areaExpanded && (\n <div class=\"expanded-content\" id=\"expanded-content-area\">\n <slot name=\"expanded-content\"></slot>\n </div>\n )}\n </Component>\n );\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as e,h as i,H as t,g as n}from"./p-5450cebf.js";import{O as o}from"./p-8d4f7027.js";import{b as r,m as a,n as l}from"./p-1724000c.js";import{I as s}from"./p-6f57b13c.js";const c='/*! 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(.link) .ic-link,:host(.link) ::slotted(a){color:var(--ic-hyperlink);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}:host(.link.dark) .ic-link.dark,:host(.link.dark) ::slotted(a){color:var(--ic-color-primary-text)}:host(.link.light) .ic-link.light,:host(.link.light) ::slotted(a){color:var(--ic-color-white-text)}:host(.link) .ic-link:visited,:host(.link) ::slotted(a:visited){color:var(--ic-hyperlink-visited)}:host(.link) .ic-link:hover,:host(.link) .ic-link:focus,:host(.link) ::slotted(a:hover),:host(.link) ::slotted(a:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;outline:none}:host(.link) .ic-link:active,:host(.link) .ic-link:focus:active,:host(.link) .ic-link:visited:active,:host(.link) ::slotted(a:active),:host(.link) ::slotted(a:focus:active),:host(.link) ::slotted(a:visited:active){text-decoration:none}.ic-link-open-in-new-icon{vertical-align:middle;margin-left:var(--ic-space-xxs)}.ic-link>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink)}.ic-link.dark>.ic-link-open-in-new-icon{fill:var(--ic-color-primary-text)}.ic-link.light>.ic-link-open-in-new-icon{fill:var(--ic-color-white-text)}.ic-link-open-in-new-icon>svg{width:var(--ic-space-md);height:var(--ic-space-md);fill:currentcolor}.ic-link:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-visited)}.ic-link.light:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-contrast-visited)}:host(.breadcrumb-link) .ic-link{display:var(--breadcrumb-link-display);align-items:var(--breadcrumb-link-align-items);gap:var(--breadcrumb-link-gap)}:host(.breadcrumb-link) .ic-link ::slotted(.back-icon){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.breadcrumb-link.current-page) a,:host(.breadcrumb-link.current-page) ::slotted(a){font-weight:normal;color:inherit;text-decoration:none;display:flex;align-items:center}:host(.breadcrumb-link.current-page) .ic-link,:host(.breadcrumb-link.current-page) ::slotted(a:focus){outline:var(--ic-hc-focus-outline);text-decoration:none}:host(.breadcrumb-link.current-page) .ic-link:visited{color:var(--ic-color-primary-text)}';const d=class{constructor(i){e(this,i);this.inheritedAttributes={};this.download=false;this.href=null;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined;this.showIcon=undefined;this.appearance="default"}themeChangeHandler(e){const i=e.detail;this.updateTheme(i.mode)}updateTheme(e=null){const i=r(this.el,e||null);switch(i){case s.Light:this.appearance=s.Light;break;case s.Dark:this.appearance=s.Dark;break}}async setFocus(){if(this.el.shadowRoot.querySelector("a")){this.el.shadowRoot.querySelector("a").focus()}}componentWillLoad(){this.inheritedAttributes=a(this.el,[...l,"aria-expanded"]);this.updateTheme()}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');if(this.routerSlot){this.routerSlot.ariaLabel=this.routerSlot.textContent}return!!this.routerSlot}render(){const{download:e,href:n,hreflang:r,referrerpolicy:a,rel:l,target:s,showIcon:c,appearance:d}=this;return i(t,{class:{["link"]:true,[`${d}`]:true}},this.hasRouterSlot()?i("slot",{name:"router-item"}):i("a",Object.assign({class:{["ic-link"]:n!==null,[`${d}`]:n!==null},download:e!==false?e:null,href:n,hrefLang:r,referrerPolicy:a,rel:l,target:s,tabindex:n!==null?"0":"-1"},this.inheritedAttributes),i("slot",null),c&&i("span",{class:"ic-link-open-in-new-icon",innerHTML:o})))}static get delegatesFocus(){return true}get el(){return n(this)}};d.style=c;export{d as ic_link};
2
- //# sourceMappingURL=p-4a73728b.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/ic-link/ic-link.css?tag=ic-link&encapsulation=shadow","src/components/ic-link/ic-link.tsx"],"names":["icLinkCss","Link","this","inheritedAttributes","[object Object]","ev","theme","detail","updateTheme","mode","newTheme","getThemeFromContext","el","IcThemeForegroundEnum","Light","appearance","Dark","shadowRoot","querySelector","focus","inheritAttributes","IC_INHERITED_ARIA","routerSlot","ariaLabel","textContent","download","href","hreflang","referrerpolicy","rel","target","showIcon","h","Host","class","hasRouterSlot","name","Object","assign","hrefLang","referrerPolicy","tabindex","innerHTML","OpenInNew"],"mappings":"mLAAA,MAAMA,EAAY,89IC8BLC,EAAI,+BACPC,KAAAC,oBAAgD,iBAQlB,gBAKd,4IA8BkC,UAG1DC,mBAAmBC,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BL,KAAKM,YAAYF,EAAMG,MAGjBL,YAAYM,EAA8B,MAChD,MAAMJ,EAAQK,EAAoBT,KAAKU,GAAIF,GAAY,MAEvD,OAAQJ,GACN,KAAKO,EAAsBC,MACzBZ,KAAKa,WAAaF,EAAsBC,MACxC,MACF,KAAKD,EAAsBG,KACzBd,KAAKa,WAAaF,EAAsBG,KACxC,OAQNZ,iBACE,GAAIF,KAAKU,GAAGK,WAAWC,cAAc,KAAM,CACzChB,KAAKU,GAAGK,WAAWC,cAAc,KAAKC,SAI1Cf,oBACEF,KAAKC,oBAAsBiB,EAAkBlB,KAAKU,GAAI,IACjDS,EACH,kBAGFnB,KAAKM,cAGCJ,gBACNF,KAAKoB,WAAapB,KAAKU,GAAGM,cAAc,wBACxC,GAAIhB,KAAKoB,WAAY,CACnBpB,KAAKoB,WAAWC,UAAYrB,KAAKoB,WAAWE,YAE9C,QAAStB,KAAKoB,WAGhBlB,SACE,MAAMqB,SACJA,EAAQC,KACRA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,IACdA,EAAGC,OACHA,EAAMC,SACNA,EAAQhB,WACRA,GACEb,KAEJ,OACE8B,EAACC,EAAI,CAACC,MAAO,CAAE9B,CAAC,QAAS,KAAMA,CAAC,GAAGW,KAAe,OAC/Cb,KAAKiC,gBACJH,EAAA,OAAA,CAAMI,KAAK,gBAEXJ,EAAA,IAAAK,OAAAC,OAAA,CACEJ,MAAO,CACL9B,CAAC,WAAYsB,IAAS,KACtBtB,CAAC,GAAGW,KAAeW,IAAS,MAE9BD,SAAUA,IAAa,MAAQA,EAAW,KAC1CC,KAAMA,EACNa,SAAUZ,EACVa,eAAgBZ,EAChBC,IAAKA,EACLC,OAAQA,EACRW,SAAUf,IAAS,KAAO,IAAM,MAC5BxB,KAAKC,qBAET6B,EAAA,OAAA,MACCD,GACCC,EAAA,OAAA,CAAME,MAAM,2BAA2BQ,UAAWC","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.link) .ic-link,\n:host(.link) ::slotted(a) {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.link.dark) .ic-link.dark,\n:host(.link.dark) ::slotted(a) {\n color: var(--ic-color-primary-text);\n}\n\n:host(.link.light) .ic-link.light,\n:host(.link.light) ::slotted(a) {\n color: var(--ic-color-white-text);\n}\n\n:host(.link) .ic-link:visited,\n:host(.link) ::slotted(a:visited) {\n color: var(--ic-hyperlink-visited);\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:hover),\n:host(.link) ::slotted(a:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n outline: none;\n}\n\n:host(.link) .ic-link:active,\n:host(.link) .ic-link:focus:active,\n:host(.link) .ic-link:visited:active,\n:host(.link) ::slotted(a:active),\n:host(.link) ::slotted(a:focus:active),\n:host(.link) ::slotted(a:visited:active) {\n text-decoration: none;\n}\n\n.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink);\n}\n\n.ic-link.dark > .ic-link-open-in-new-icon {\n fill: var(--ic-color-primary-text);\n}\n\n.ic-link.light > .ic-link-open-in-new-icon {\n fill: var(--ic-color-white-text);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: currentcolor;\n}\n\n.ic-link:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-visited);\n}\n\n.ic-link.light:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-contrast-visited);\n}\n\n:host(.breadcrumb-link) .ic-link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .ic-link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link:visited {\n color: var(--ic-color-primary-text);\n}\n","import {\n Component,\n Element,\n Prop,\n h,\n Host,\n Listen,\n Method,\n} from \"@stencil/core\";\n\nimport OpenInNew from \"../../assets/OpenInNew.svg\";\nimport { getThemeFromContext, inheritAttributes } from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\n/**\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n\n@Component({\n tag: \"ic-link\",\n styleUrl: \"ic-link.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Link {\n private inheritedAttributes: { [k: string]: unknown } = {};\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcLinkElement;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string = null;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * If `true`, the 'open in new tab/window' icon will be displayed.\n */\n @Prop() showIcon?: boolean;\n\n /**\n * The appearance of the link, e.g. dark, light, or default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const theme = getThemeFromContext(this.el, newTheme || null);\n\n switch (theme) {\n case IcThemeForegroundEnum.Light:\n this.appearance = IcThemeForegroundEnum.Light;\n break;\n case IcThemeForegroundEnum.Dark:\n this.appearance = IcThemeForegroundEnum.Dark;\n break;\n }\n }\n\n /**\n * Sets focus on the link.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"a\")) {\n this.el.shadowRoot.querySelector(\"a\").focus();\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n ]);\n\n this.updateTheme();\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n render() {\n const {\n download,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n showIcon,\n appearance,\n } = this;\n\n return (\n <Host class={{ [\"link\"]: true, [`${appearance}`]: true }}>\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <a\n class={{\n [\"ic-link\"]: href !== null,\n [`${appearance}`]: href !== null,\n }}\n download={download !== false ? download : null}\n href={href}\n hrefLang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n target={target}\n tabindex={href !== null ? \"0\" : \"-1\"}\n {...this.inheritedAttributes}\n >\n <slot />\n {showIcon && (\n <span class=\"ic-link-open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/ic-side-navigation/ic-side-navigation.css?tag=ic-side-navigation&encapsulation=shadow","src/components/ic-side-navigation/ic-side-navigation.tsx"],"names":["icSideNavigationCss","SideNavigation","this","ANIMATION_DURATION","parseInt","getCssProperty","emitSideNavigationExpanded","objDetails","event","CustomEvent","detail","sideNavExpanded","sideNavMobile","el","dispatchEvent","toggleMenu","menuOpen","setMobileMenuAriaAttributes","setToggleMenuFlyoutMenuVisibility","sideNav","shadowRoot","querySelector","sideNavInner","bottomWrapper","classList","add","setTimeout","remove","nativeButton","setAttribute","setAndRemoveNoWrapAfterMenuExpanded","appTitle","toggleMenuExpanded","menuExpanded","arrangeSlottedNavigationItem","displayTooltipWithExpandedLongLabel","collapsedIconLabels","animateCollapsedIconLabels","navItems","querySelectorAll","forEach","navItem","hasUsedSlot","isSlotUsed","navItemSlot","iconWrapper","document","createElement","icon","label","textContent","trim","icTypography","className","append","styleSlottedCollapsedIconLabels","styleSlottedIconLabels","style","marginTop","whiteSpace","overflow","textOverflow","opacity","visibility","transition","primaryNavigationWrapper","secondaryNavigationWrapper","addEventListener","paddingIconWidth","navItemLink","navItemSVG","navStyles","gap","window","getComputedStyle","iconWidth","width","paddingLeft","Object","values","reduce","prev","curr","timer","sideNavWidth","clientWidth","navigationItems","Array","from","paddingIconDelta","length","navigationItem","icTypographyScrollWidth","_a","scrollWidth","_b","clearTimeout","setMenuExpanded","expanded","setParentPaddingTop","value","parentElement","setProperty","setParentPaddingLeft","resizeObserver","resizeObserverCallback","currSize","deviceSize","DEVICE_SIZES","S","disableAutoParentStyling","topBarHeight","scrollHeight","inline","L","static","runResizeObserver","ResizeObserver","getCurrentDeviceSize","deviceSizeAppTitle","observe","body","box","setCollapsedIconLabels","styleSlottedCollapsedIconLabel","dynamicSlottedIcTypographyComps","contains","renderTopBar","isSDevice","foregroundColor","href","isAppNameSubtitleVariant","hasTitle","undefined","Component","attrs","h","class","top-bar","[object Object]","aria-labelledby","aria-hidden","aria-label","id","variant","size","full-width","appearance","onClick","aria-owns","aria-haspopup","aria-expanded","slot","innerHTML","closeIcon","menuIcon","assign","name","getThemeForegroundColor","XL","ev","theme","mode","hasSecondaryNavigation","checkResizeObserver","onComponentRequiredPropUndefined","prop","propName","disconnect","status","version","isMdDevice","M","isLgDevice","displayExpandBtn","topBarProps","Host","xs-menu-open","xs-menu-close","sm-collapsed","sm-expanded","IcThemeForegroundEnum","Dark","hasClassificationBanner","chevronIcon"],"mappings":"2fAAA,MAAMA,EAAsB,qkWC0CfC,EAAc,+BA+CjBC,KAAAC,mBACNC,SAASC,EAAe,mCAAqC,EAQvDH,KAAAI,2BAA8BC,IAIpC,MAAMC,EAAQ,IAAIC,YAAY,kBAAmB,CAC/CC,OAAQ,CACNC,gBAAiBJ,EAAWI,gBAC5BC,cAAeL,EAAWK,iBAG9BV,KAAKW,GAAGC,cAAcN,IAGhBN,KAAAa,WAAa,KACnBb,KAAKc,UAAYd,KAAKc,SACtBd,KAAKe,4BAA4Bf,KAAKc,UAEtCd,KAAKgB,kCAAkChB,KAAKc,UAE5Cd,KAAKI,2BAA2B,C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AAA,CAAAK,cACc,OACZJ,MAAM,4BACNM,GAAG,+BAA6B,WAIlCP,EAAA,KAAA,CAAIC,MAAM,mBACRD,EAAA,OAAA,CAAMqB,KAAK,0BAKnBrB,EAAA,MAAA,CACEC,MAAO,CACLE,CAAC,kBAAmB,KACpBA,CAAC,0BAA2B4C,MAG7B5I,EAAWzC,KAAKW,GAAI,yBACnB2H,EAAA,MAAA,CACEC,MAAM,uBAAsBG,kBACZ,iCAEhBJ,EAAA,OAAA,CAAAK,cACc,OACZJ,MAAM,4BACNM,GAAG,iCAA+B,aAIpCP,EAAA,KAAA,CAAIC,MAAM,mBACRD,EAAA,OAAA,CAAMqB,KAAK,2BAIjBrB,EAAA,MAAA,CAAKC,MAAM,mBACRvI,KAAKiK,wBAA0B3B,EAAA,aAAA,MAC/BsC,GACCtC,EAAA,SAAA,CACEC,MAAM,qBACNgB,UAAW+B,EACXpC,QAASlJ,KAAK8B,mBAAkB8G,aACpB,GACV7G,EAAe,WAAa,6BAIlCuG,EAAA,MAAA,CAAKC,MAAM,sBACRgC,IAAW,IACVjC,EAAA,MAAA,CACEC,MAAO,CACLE,CAAC,cAAe,OAGlBH,EAAA,gBAAA,CAAAM,aACa,UACXE,QAAQ,kBACRP,MAAM,mBAELgC,IAINC,IAAY,IACXlC,EAAA,gBAAA,CACEQ,QAAQ,QACRP,MAAM,cAAaK,aACR,eAEV4B","sourcesContent":["/**\n * @prop --ic-z-index-side-navigation: z-index of side navigation panel\n */\n\n:host {\n display: block;\n\n --side-navigation-position: fixed;\n --side-navigation-position-left: 0;\n --side-navigation-position-top: var(--ic-space-xxl);\n --side-navigation-height: var(--ic-space-xxl);\n --sm-side-navigation-top-bar-height: 3.5rem;\n --sm-side-navigation-collapsed-labels-width: 6rem;\n --sm-side-navigation-expand-transition-duration: var(\n --ic-transition-duration-slow\n );\n --side-navigation-width: 20rem;\n\n z-index: var(--ic-z-index-side-navigation);\n}\n\n:host > * {\n box-sizing: border-box;\n}\n\n.side-navigation {\n display: flex;\n flex-direction: column;\n width: var(--side-navigation-width);\n color: var(--ic-theme-text);\n position: var(--side-navigation-position);\n top: var(--side-navigation-position-top);\n left: calc(var(--side-navigation-width) * -1);\n bottom: 0;\n background-color: var(--ic-theme-primary);\n z-index: var(--ic-z-index-side-navigation);\n}\n\n:host(.inline) .side-navigation {\n position: absolute;\n height: 100%;\n}\n\n:host(.anchor-right) .side-navigation {\n right: calc(var(--side-navigation-width) * -1);\n}\n\n.classification-spacing {\n margin-bottom: var(--ic-space-lg);\n}\n\n.navigation-list {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.side-navigation-inner {\n background-color: var(--ic-theme-primary);\n display: flex;\n flex-direction: column;\n flex: 1 1 0;\n overflow: auto;\n visibility: hidden;\n}\n\n:host(.inline) .side-navigation-inner {\n flex: 1;\n}\n\n:host(.xs-menu-open) .side-navigation {\n transition: left var(--ic-easing-transition-slow);\n left: 0;\n}\n\n:host(.xs-menu-close) .side-navigation {\n left: calc(var(--side-navigation-width) * -1);\n transition: left var(--ic-easing-transition-slow);\n}\n\n:host(.anchor-right.xs-menu-open) .side-navigation {\n right: 0;\n left: auto;\n}\n\n:host(.anchor-right.xs-menu-close) .side-navigation {\n right: calc(var(--side-navigation-width) * -1);\n left: auto;\n transition: right var(--ic-easing-transition-slow);\n}\n\n.bottom-wrapper {\n border-top: var(--ic-keyline-lighten);\n position: sticky;\n bottom: 0;\n left: 0;\n z-index: 2;\n box-shadow: -0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%);\n background-color: var(--ic-theme-primary);\n display: flex;\n flex-direction: column;\n visibility: hidden;\n}\n\n:host(.dark) .bottom-wrapper {\n border-top: var(--ic-keyline-darken);\n}\n\n/* Mobile Top Bar */\n\n.top-bar {\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: var(--side-navigation-height);\n padding: var(--ic-space-xs);\n box-sizing: border-box;\n background-color: var(--ic-theme-primary);\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n border-bottom: var(--ic-keyline-darken);\n box-shadow: var(--ic-elevation-overlay);\n z-index: 2;\n overflow: hidden;\n visibility: visible;\n}\n\n:host(.inline) .top-bar {\n position: absolute;\n}\n\n.top-bar.dark a:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.top-bar.light {\n border-bottom: var(--ic-keyline-lighten);\n}\n\n.app-title-wrapper {\n display: flex;\n margin-left: var(--ic-space-xs);\n border-left: var(--ic-keyline-darken);\n padding-left: var(--ic-space-xxs);\n color: var(--ic-theme-text);\n align-items: center;\n}\n\n@media screen and (min-width: 340px) {\n .app-title-wrapper ic-typography {\n margin-left: var(--ic-space-xs);\n }\n}\n\n:host .title-link {\n display: flex;\n align-items: center;\n transition: box-shadow var(--ic-easing-transition-fast),\n background-color var(--ic-easing-transition-fast);\n text-decoration: none;\n padding: var(--ic-space-xxs);\n color: var(--ic-theme-text);\n}\n\n:host .title-link:visited,\n:host .title-link:active {\n color: var(--ic-theme-text);\n}\n\nslot[name=\"app-title\"]::slotted(a),\nslot[name=\"app-icon\"]::slotted(a) {\n color: var(--ic-theme-text);\n outline: none;\n text-decoration: none;\n}\n\n:host .title-link:hover {\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-theme-hover);\n}\n\n:host .title-link:active {\n background-color: var(--ic-theme-active);\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 background-color: transparent;\n}\n\n:host .title-link ic-typography {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.app-title-wrapper ::slotted(svg) {\n fill: var(--ic-theme-text);\n}\n\n.app-icon-container {\n display: none;\n}\n\n.button-label {\n display: flex;\n align-items: center;\n}\n\n.mobile-top-bar-menu-icon {\n display: flex;\n}\n\n.menu-button {\n width: 6.5rem;\n}\n\n.app-status-wrapper {\n position: absolute;\n right: var(--ic-space-md);\n top: 0;\n bottom: 0;\n width: auto;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n\n.app-status-wrapper .app-version {\n max-width: 6.25rem;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.app-status-wrapper .app-status {\n border-radius: 5rem;\n background-color: var(--ic-theme-text);\n color: var(--ic-color-primary-text);\n padding: var(--ic-space-xxs) var(--ic-space-lg);\n margin-right: var(--ic-space-xs);\n max-width: 6.25rem;\n}\n\n.app-status-wrapper .app-status-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 6rem;\n}\n\n:host(.dark) .app-status-wrapper .app-status {\n color: var(--ic-color-white-text);\n}\n\n.navigation-landmark-title {\n position: absolute;\n width: 0.063rem;\n height: 0.063rem;\n padding: 0;\n margin: -0.063rem;\n overflow: hidden;\n}\n\n/* Navigation Group */\n\n::slotted(ic-navigation-group) {\n --navigation-group-height: 2.75rem;\n --navigation-group-width: 100%;\n --navigation-group-justify-content: space-between;\n --navigation-group-hover: var(--ic-theme-hover);\n --navigation-group-text-hover: var(--ic-theme-text);\n --navigation-item-child-height: 3.5rem;\n --navigation-item-child-active: var(--ic-action-dark-bg-active);\n --navigation-item-child-color: var(--ic-theme-text);\n --navigation-group-expand-toggle-padding: 0.25rem;\n}\n\n/* Navigation Items */\n\n::slotted(ic-navigation-item),\n::slotted(ic-navigation-group) {\n --navigation-item-height: 3.5rem;\n --navigation-item-width: auto;\n --navigation-item-justify-content: flex-start;\n}\n\n/* Toggle Chevron */\n\n.bottom-side-nav {\n position: relative;\n align-content: flex-end;\n height: var(--sm-side-navigation-top-bar-height);\n}\n\n.primary-navigation {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n\n /* Hide scrollbar when required but keep functionality */\n scrollbar-width: none;\n}\n\n.primary-navigation::-webkit-scrollbar {\n display: none;\n}\n\n.primary-navigation,\n.secondary-navigation {\n overflow-x: hidden;\n}\n\n.bottom-side-nav .menu-expand-button {\n display: none;\n}\n\n.menu-visibility-visible {\n visibility: visible;\n}\n\n.menu-visibility-hidden {\n visibility: hidden;\n}\n\n/* Media Queries */\n\n@media screen and (min-width: 340px) {\n .app-icon-container {\n display: flex;\n }\n}\n\n@media screen and (min-width: 577px) {\n :host {\n display: flex;\n flex-direction: column;\n height: 100vh;\n position: var(--side-navigation-position);\n left: 0;\n top: 0;\n bottom: 0;\n }\n\n :host(.static) {\n position: relative;\n left: auto;\n top: auto;\n bottom: auto;\n }\n\n .app-icon-container {\n padding: var(--ic-space-xxs) 0;\n }\n\n .top-bar {\n --side-navigation-height: var(--sm-side-navigation-top-bar-height);\n\n position: relative;\n padding: 0;\n box-shadow: -0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%);\n }\n\n :host(.inline) .top-bar {\n position: sticky;\n }\n\n :host(.anchor-right) .top-bar {\n box-shadow: 0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%);\n }\n\n :host(.anchor-right) .bottom-wrapper {\n box-shadow: 0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%);\n }\n\n .side-navigation,\n .top-bar {\n width: var(--sm-side-navigation-top-bar-height);\n }\n\n :host(.sm-collapsed) {\n width: var(--sm-side-navigation-top-bar-height);\n transition: width var(--ic-easing-transition-slow);\n }\n\n :host(.sm-collapsed.collapsed-labels) {\n width: var(--sm-side-navigation-collapsed-labels-width);\n }\n\n :host(.sm-expanded) {\n width: var(--side-navigation-width);\n transition: width var(--ic-easing-transition-slow);\n box-shadow: var(--ic-elevation-overlay);\n }\n\n .side-navigation {\n --side-navigation-position-top: 0;\n\n flex: 1;\n position: relative;\n top: auto;\n left: auto;\n bottom: auto;\n }\n\n :host(.inline) .side-navigation {\n position: relative;\n }\n\n :host(.anchor-right) .side-navigation {\n left: auto;\n right: 0;\n }\n\n .side-navigation-inner {\n width: 100%;\n visibility: visible;\n }\n\n .bottom-wrapper {\n visibility: visible;\n }\n\n .app-title-wrapper {\n margin-left: 0;\n border-left: none;\n padding: var(--ic-space-sm);\n }\n\n .app-title-wrapper ::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n }\n\n .app-title-wrapper ic-typography {\n margin: calc(-1 * 0.281rem) 0 calc(-1 * 0.281rem) var(--ic-space-md);\n font-weight: var(--ic-font-weight-semibold);\n }\n\n :host(.sm-collapsed) .app-title-wrapper ic-typography {\n position: absolute;\n left: -9999px;\n opacity: 0;\n transition: opacity var(--ic-easing-transition-slow);\n }\n\n :host(.sm-expanded) ic-typography {\n position: relative;\n left: 0;\n }\n\n :host(.sm-expanded) :is(.side-navigation, .top-bar) {\n width: var(--side-navigation-width);\n transition: width var(--ic-easing-transition-slow);\n }\n\n :host(.sm-collapsed) :is(.side-navigation, .top-bar) {\n width: var(--sm-side-navigation-top-bar-height);\n transition: width var(--ic-easing-transition-slow);\n }\n\n :host(.anchor-right.sm-expanded) :is(.side-navigation, .top-bar) {\n left: auto;\n right: 0;\n }\n\n .app-status-wrapper,\n :host(.sm-collapsed) .app-status-wrapper {\n display: none;\n }\n\n :host(.sm-expanded) .app-status-wrapper {\n display: flex;\n }\n\n .bottom-side-nav {\n justify-items: flex-end;\n display: flex;\n flex-direction: column;\n }\n\n .bottom-side-nav .menu-expand-button {\n padding-left: var(--ic-space-md);\n height: var(--sm-side-navigation-top-bar-height);\n width: 100%;\n color: var(--ic-theme-text);\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n border: none;\n cursor: pointer;\n display: flex;\n transition: var(--ic-easing-transition-fast);\n }\n\n .bottom-side-nav .menu-expand-button svg {\n justify-items: flex-start;\n align-self: center;\n display: inline-block;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n }\n\n .bottom-side-nav .menu-expand-button:hover {\n background-color: var(--ic-theme-hover);\n }\n\n :host .bottom-side-nav {\n outline: none;\n }\n\n :host .bottom-side-nav .menu-expand-button:focus {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n background-color: transparent;\n }\n\n :host(.sm-collapsed) .bottom-side-nav .menu-expand-button svg {\n transform: scaleX(1);\n transition: transform var(--ic-easing-transition-slow);\n }\n\n :host(.sm-expanded) .bottom-side-nav .menu-expand-button svg {\n transform: scaleX(-1);\n transition: transform var(--ic-easing-transition-slow);\n }\n\n :host(.anchor-right.sm-collapsed) .bottom-side-nav .menu-expand-button svg {\n transform: scaleX(-1);\n }\n\n :host(.anchor-right.sm-expanded) .bottom-side-nav .menu-expand-button svg {\n transform: scaleX(1);\n }\n\n :host(.sm-collapsed) ::slotted(ic-navigation-item) {\n --navigation-item-label-opacity: 1;\n }\n\n :host(.sm-collapsed) ::slotted(ic-navigation-item),\n :host(.sm-collapsed) ::slotted(ic-navigation-group) {\n --navigation-item-label-opacity: 0;\n }\n\n :host(.sm-expanded) ::slotted(ic-navigation-item),\n :host(.sm-expanded) ::slotted(ic-navigation-group) {\n --navigation-item-label-opacity: 1;\n }\n\n :host(.sm-collapsed) ::slotted(ic-navigation-group) {\n --navigation-group-title-position: absolute;\n --navigation-group-title-position-left: -9999px;\n --navigation-group-title-opacity: none;\n }\n\n :host(.sm-expanded) ::slotted(ic-navigation-group) {\n --navigation-group-title-position: relative;\n --navigation-group-title-position-left: 0;\n --navigation-group-expand-toggle-padding: 0.25rem;\n --navigation-group-title-opacity: flex;\n }\n\n :host(.sm-collapsed.collapsed-labels) .side-navigation,\n :host(.sm-collapsed.collapsed-labels) .top-bar {\n width: var(--sm-side-navigation-collapsed-labels-width);\n }\n\n :host(.sm-collapsed.collapsed-labels) .menu-expand-button {\n padding: 0;\n }\n\n :host(.sm-collapsed.collapsed-labels) .app-title-wrapper {\n width: 100%;\n justify-content: center;\n }\n\n :host(.sm-collapsed.collapsed-labels) ::slotted(ic-navigation-group) {\n --navigation-group-justify-content: center;\n --navigation-item-label-opacity: 1;\n --navigation-group-item-min-width: 100%;\n --navigation-group-expand-toggle-padding: 1rem;\n }\n\n :host(.collapsed-labels) .bottom-side-nav .menu-expand-button {\n justify-content: center;\n }\n\n :host .collapsed-icon-labels-start {\n visibility: hidden;\n opacity: 0;\n }\n\n :host .collapsed-icon-labels-end {\n visibility: visible;\n opacity: 1;\n transition: visibility 0s, opacity var(--ic-easing-transition-slow);\n }\n}\n\n@media screen and (min-width: 993px) {\n :host {\n position: sticky;\n left: auto;\n top: 0;\n bottom: 0;\n }\n\n :host(.sm-expanded) {\n box-shadow: none;\n }\n}\n\n@media (forced-colors: active) {\n .side-navigation,\n .top-bar {\n border-right: var(--ic-hc-border);\n }\n\n slot[name=\"app-icon\"]::slotted(svg) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Listen,\n} from \"@stencil/core\";\n\nimport menuIcon from \"../../assets/hamburger-menu-icon.svg\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport {\n getCurrentDeviceSize,\n DEVICE_SIZES,\n checkResizeObserver,\n isSlotUsed,\n getThemeForegroundColor,\n getCssProperty,\n hasClassificationBanner,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { IcTopBar } from \"./ic-side-navigation.types\";\n\n/**\n * @slot app-icon - Content will be rendered adjacent to the app title at the very top of the side navigation.\n * @slot app-title - Handle routing by nesting a route in the app title.\n * @slot primary-navigation - Content will be rendered at the top of the side navigation.\n * @slot secondary-navigation - Content will be rendered at the bottom of the side navigation.\n */\n\n@Component({\n tag: \"ic-side-navigation\",\n styleUrl: \"ic-side-navigation.css\",\n shadow: true,\n})\nexport class SideNavigation {\n @Element() el: HTMLIcSideNavigationElement;\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 * The status of the app to be displayed.\n */\n @Prop() status: string;\n /**\n * The version of the app to be displayed.\n */\n @Prop() version: string;\n /**\n * If `true`, the side navigation will load in an expanded state.\n */\n @Prop() expanded: boolean = false;\n /**\n * The URL that the app title link points to.\n */\n @Prop() href: string = \"/\";\n /**\n * If `true`, the menu expand button will be removed (PLEASE NOTE: This takes effect on screen sizes 992px and above).\n */\n @Prop() static: boolean = false;\n /**\n * If `true`, the icon and label will appear when side navigation is collapsed.\n */\n @Prop() collapsedIconLabels: boolean = false;\n /**\n * @internal If `true`, side navigation will be contained by its parent element.\n */\n @Prop() inline: boolean = false;\n\n /**\n * If `true`, automatic parent wrapper styling will be disabled.\n */\n @Prop() disableAutoParentStyling: boolean = false;\n\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n @State() menuOpen: boolean = false;\n @State() menuExpanded: boolean = false;\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() deviceSizeAppTitle = DEVICE_SIZES.S;\n @State() hasSecondaryNavigation: boolean = false;\n\n private ANIMATION_DURATION =\n parseInt(getCssProperty(\"--ic-transition-duration-slow\")) || 0;\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 emitSideNavigationExpanded = (objDetails: {\n sideNavExpanded: boolean;\n sideNavMobile?: boolean;\n }): void => {\n const event = new CustomEvent(\"sideNavExpanded\", {\n detail: {\n sideNavExpanded: objDetails.sideNavExpanded,\n sideNavMobile: objDetails.sideNavMobile,\n },\n });\n this.el.dispatchEvent(event);\n };\n\n private toggleMenu = (): void => {\n this.menuOpen = !this.menuOpen;\n this.setMobileMenuAriaAttributes(this.menuOpen);\n\n this.setToggleMenuFlyoutMenuVisibility(this.menuOpen);\n\n this.emitSideNavigationExpanded({\n sideNavExpanded: this.menuOpen,\n sideNavMobile: true,\n });\n };\n\n private setToggleMenuFlyoutMenuVisibility = (menuOpen: boolean) => {\n const sideNav = this.el.shadowRoot.querySelector(\n \"#side-navigation\"\n ) as HTMLDivElement;\n const sideNavInner = sideNav.querySelector(\n \".side-navigation-inner\"\n ) as HTMLElement;\n const bottomWrapper = sideNav.querySelector(\n \".bottom-wrapper\"\n ) as HTMLElement;\n\n if (menuOpen) {\n bottomWrapper.classList.add(\"menu-visibility-visible\");\n sideNavInner.classList.add(\"menu-visibility-visible\");\n } else {\n setTimeout(() => {\n sideNavInner.classList.remove(\"menu-visibility-visible\");\n bottomWrapper.classList.remove(\"menu-visibility-visible\");\n }, this.ANIMATION_DURATION);\n }\n };\n\n private setMobileMenuAriaAttributes = (menuOpen: boolean) => {\n const nativeButton = this.el.shadowRoot\n .querySelector(\"#menu-button\")\n .shadowRoot.querySelector(\"button\");\n\n if (menuOpen) {\n nativeButton.setAttribute(\"aria-expanded\", \"true\");\n nativeButton.setAttribute(\"aria-label\", \"Close navigation menu\");\n } else {\n nativeButton.setAttribute(\"aria-expanded\", \"false\");\n nativeButton.setAttribute(\"aria-label\", \"Open navigation menu\");\n }\n };\n\n private setAndRemoveNoWrapAfterMenuExpanded = () => {\n const appTitle = this.el.shadowRoot.querySelector(\n \".title-link ic-typography\"\n );\n\n appTitle.classList.add(\"ic-typography-no-wrap\");\n\n setTimeout(() => {\n appTitle.classList.remove(\"ic-typography-no-wrap\");\n }, this.ANIMATION_DURATION);\n };\n\n private toggleMenuExpanded = (): void => {\n this.menuExpanded = !this.menuExpanded;\n\n if (this.menuExpanded) {\n this.setAndRemoveNoWrapAfterMenuExpanded();\n }\n\n this.arrangeSlottedNavigationItem(this.menuExpanded);\n\n this.displayTooltipWithExpandedLongLabel(this.menuExpanded);\n\n if (this.collapsedIconLabels) {\n this.animateCollapsedIconLabels();\n }\n\n this.emitSideNavigationExpanded({ sideNavExpanded: this.menuExpanded });\n };\n\n /**\n * In order to style nested slotted elements (e.g. using React Router components), this method\n * rearranges the a tag and labels and adds inline styling expand/collaped animations as external CSS classes are not\n * do not take affect.\n * @param menuExpanded boolean - true or false depending on seide navigation state\n */\n private arrangeSlottedNavigationItem = (menuExpanded?: boolean) => {\n const navItems = this.el.querySelectorAll(\"ic-navigation-item\");\n\n navItems.forEach((navItem) => {\n const hasUsedSlot = isSlotUsed(navItem, \"navigation-item\");\n\n if (hasUsedSlot) {\n const navItemSlot = navItem.querySelector(\"[slot='navigation-item']\");\n const iconWrapper = document.createElement(\"div\");\n const icon = navItemSlot.querySelector(\"svg\");\n const label = navItem.textContent.trim();\n const icTypography = document.createElement(\"ic-typography\");\n icTypography.classList.add(\n \"ic-typography-label\",\n \"hydrated\",\n \"navigation-item-side-nav-slotted-text\"\n );\n\n iconWrapper.className = \"icon-container\";\n iconWrapper.append(icon);\n\n navItemSlot.textContent = \"\";\n\n icTypography.textContent = label;\n\n navItemSlot.append(iconWrapper);\n navItemSlot.append(icTypography);\n\n if (this.collapsedIconLabels) {\n this.styleSlottedCollapsedIconLabels(menuExpanded, icTypography);\n } else {\n this.styleSlottedIconLabels(menuExpanded, icTypography);\n }\n }\n });\n };\n\n private styleSlottedCollapsedIconLabels = (\n menuExpanded: boolean,\n icTypography: HTMLIcTypographyElement\n ) => {\n if (menuExpanded) {\n icTypography.style.marginTop = \"0\";\n icTypography.style.whiteSpace = \"nowrap\";\n icTypography.style.overflow = \"hidden\";\n icTypography.style.textOverflow = \"ellipsis\";\n } else {\n icTypography.style.marginTop = \"10px\";\n icTypography.style.whiteSpace = \"nowrap\";\n icTypography.style.overflow = \"hidden\";\n icTypography.style.textOverflow = \"ellipsis\";\n }\n };\n\n private styleSlottedIconLabels = (\n menuExpanded: boolean,\n icTypography: HTMLSpanElement\n ) => {\n if (menuExpanded) {\n icTypography.style.opacity = \"1\";\n icTypography.style.visibility = \"visible\";\n icTypography.style.transition =\n \"visibility 0s, opacity var(--ic-easing-transition-slow)\";\n } else {\n icTypography.style.opacity = \"0\";\n icTypography.style.visibility = \"hidden\";\n icTypography.style.transition =\n \"visibility 0s, opacity var(--ic-easing-transition-slow)\";\n }\n };\n\n private animateCollapsedIconLabels = () => {\n const primaryNavigationWrapper = this.el.shadowRoot.querySelector(\n \".primary-navigation\"\n );\n const secondaryNavigationWrapper = this.el.shadowRoot.querySelector(\n \".bottom-wrapper > .secondary-navigation\"\n );\n\n if (primaryNavigationWrapper) {\n primaryNavigationWrapper.classList.remove(\"collapsed-icon-labels-end\");\n primaryNavigationWrapper.classList.add(\"collapsed-icon-labels-start\");\n }\n\n if (secondaryNavigationWrapper) {\n secondaryNavigationWrapper.classList.remove(\"collapsed-icon-labels-end\");\n secondaryNavigationWrapper.classList.add(\"collapsed-icon-labels-start\");\n }\n\n this.el.addEventListener(\"transitionend\", () => {\n if (primaryNavigationWrapper) {\n primaryNavigationWrapper.classList.remove(\n \"collapsed-icon-labels-start\"\n );\n primaryNavigationWrapper.classList.add(\"collapsed-icon-labels-end\");\n }\n\n if (secondaryNavigationWrapper) {\n secondaryNavigationWrapper.classList.remove(\n \"collapsed-icon-labels-start\"\n );\n secondaryNavigationWrapper.classList.add(\"collapsed-icon-labels-end\");\n }\n });\n };\n\n private paddingIconWidth = (\n navItems: HTMLIcNavigationItemElement[]\n ): number => {\n const navItemLink =\n (navItems[0].shadowRoot &&\n navItems[0].shadowRoot.querySelector(\"ic-tooltip a\")) ||\n navItems[0].querySelector(\"a\");\n const navItemSVG = navItems[0].querySelector(\"svg\");\n\n const navStyles = {\n gap: window.getComputedStyle(navItemLink).gap,\n iconWidth: window.getComputedStyle(navItemSVG).width,\n paddingLeft: window.getComputedStyle(navItemLink).paddingLeft,\n };\n\n return Object.values(navStyles).reduce((prev, curr) => {\n return (prev += parseInt(curr));\n }, 0);\n };\n\n private displayTooltipWithExpandedLongLabel = (menuExpanded: boolean) => {\n let timer;\n\n if (menuExpanded) {\n timer = setTimeout(() => {\n const sideNavWidth = this.el.clientWidth;\n\n const navigationItems: HTMLIcNavigationItemElement[] = Array.from(\n this.el.querySelectorAll(\"ic-navigation-item\")\n );\n\n const paddingIconDelta = navigationItems.length\n ? this.paddingIconWidth(navigationItems)\n : 0;\n\n navigationItems.forEach(\n (navigationItem: HTMLIcNavigationItemElement) => {\n const icTypographyScrollWidth =\n (\n navigationItem.shadowRoot &&\n navigationItem.shadowRoot.querySelector(\n \"ic-tooltip .link ic-typography.ic-typography-label\"\n )\n )?.scrollWidth ||\n navigationItem.querySelector(\"ic-typography.ic-typography-label\")\n ?.scrollWidth;\n\n if (icTypographyScrollWidth > sideNavWidth - paddingIconDelta) {\n navigationItem.setAttribute(\"display-navigation-tooltip\", \"true\");\n }\n }\n );\n }, this.ANIMATION_DURATION);\n } else {\n clearTimeout(timer);\n\n const navigationItems: HTMLIcNavigationItemElement[] = Array.from(\n this.el.querySelectorAll(\"ic-navigation-item\")\n );\n navigationItems.forEach((navigationItem: HTMLIcNavigationItemElement) => {\n navigationItem.setAttribute(\"display-navigation-tooltip\", \"false\");\n });\n }\n };\n\n private setMenuExpanded = (expanded: boolean): void => {\n this.menuExpanded = expanded;\n };\n\n /**\n * As the mobile top bar is fixed, a padding top is required\n * to push main content down the height of the mobile top bar\n * @param value - padding-top css value\n */\n private setParentPaddingTop = (value: string) => {\n this.el.parentElement.style.setProperty(\"padding-top\", value);\n };\n\n private setParentPaddingLeft = (value: string) => {\n this.el.parentElement.style.setProperty(\"padding-left\", value);\n };\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n\n if (currSize === DEVICE_SIZES.S) {\n if (!this.disableAutoParentStyling) {\n const topBarHeight =\n this.el.shadowRoot.querySelector(\".top-bar\").scrollHeight;\n this.setParentPaddingTop(`${topBarHeight}px`);\n this.setParentPaddingLeft(\"0\");\n\n if (this.inline) {\n this.el.parentElement.style.setProperty(\n \"height\",\n `calc(100% - ${topBarHeight}px)`\n );\n }\n }\n this.emitSideNavigationExpanded({\n sideNavExpanded: this.menuExpanded,\n sideNavMobile: true,\n });\n } else {\n if (!this.disableAutoParentStyling) {\n this.setParentPaddingTop(\"0\");\n this.el.parentElement.style.setProperty(\"height\", \"100%\");\n }\n this.emitSideNavigationExpanded({\n sideNavExpanded: this.menuExpanded,\n sideNavMobile: false,\n });\n }\n\n if (currSize > DEVICE_SIZES.L) {\n if (!this.disableAutoParentStyling) {\n this.setParentPaddingTop(\"0\");\n this.setParentPaddingLeft(\"0\");\n }\n } else if (\n currSize > DEVICE_SIZES.S &&\n currSize <= DEVICE_SIZES.L &&\n !this.static &&\n !this.disableAutoParentStyling\n ) {\n if (this.collapsedIconLabels) {\n this.setParentPaddingLeft(\"calc(var(--ic-space-xxl) * 2)\");\n } else {\n this.setParentPaddingLeft(\n \"calc(var(--ic-space-xxl) + var(--ic-space-xs))\"\n );\n }\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.deviceSizeAppTitle = currSize;\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(document.body, { box: \"content-box\" });\n };\n\n private setCollapsedIconLabels = () => {\n const navigationItems: HTMLIcNavigationItemElement[] = Array.from(\n this.el.querySelectorAll(\"ic-navigation-item\")\n );\n navigationItems.forEach((navigationItem: HTMLIcNavigationItemElement) => {\n navigationItem.setAttribute(\"collapsed-icon-label\", \"true\");\n });\n };\n\n private styleSlottedCollapsedIconLabel = () => {\n const dynamicSlottedIcTypographyComps: HTMLIcTypographyElement[] =\n Array.from(\n this.el.querySelectorAll(\".navigation-item-side-nav-slotted-text\")\n );\n\n dynamicSlottedIcTypographyComps.forEach((icTypography) => {\n if (\n icTypography?.parentElement?.parentElement?.classList.contains(\n \"navigation-item-side-nav-collapsed-with-label\"\n )\n ) {\n icTypography.style.whiteSpace = \"nowrap\";\n icTypography.style.overflow = \"hidden\";\n icTypography.style.textOverflow = \"ellipsis\";\n icTypography.style.marginTop = \"10px\";\n }\n });\n };\n\n private renderTopBar = ({\n isSDevice,\n foregroundColor,\n menuOpen,\n href,\n isAppNameSubtitleVariant,\n appTitle,\n }: IcTopBar) => {\n const hasTitle = this.appTitle !== \"\" && this.appTitle !== undefined;\n\n const Component = isSlotUsed(this.el, \"app-title\") ? \"div\" : \"a\";\n\n const attrs = Component == \"a\" && {\n href: href,\n };\n\n return (\n <div\n class={{\n \"top-bar\": true,\n [this.foregroundColor]: true,\n }}\n >\n {isSDevice && (\n <nav\n aria-labelledby=\"menu-navigation-toggle-button-landmark\"\n aria-hidden=\"false\"\n >\n <ic-button\n aria-label=\"Open navigation menu\"\n class=\"menu-button\"\n id=\"menu-button\"\n variant=\"secondary\"\n size=\"small\"\n full-width=\"true\"\n appearance={foregroundColor}\n onClick={this.toggleMenu}\n aria-owns=\"side-navigation\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <span\n class=\"mobile-top-bar-menu-icon\"\n slot=\"icon\"\n innerHTML={menuOpen ? closeIcon : menuIcon}\n ></span>\n {menuOpen ? \"Close\" : \"Menu\"}\n </ic-button>\n <span\n id=\"menu-navigation-toggle-button-landmark\"\n class=\"navigation-landmark-title\"\n aria-hidden=\"true\"\n >\n Navigation menu toggle button\n </span>\n </nav>\n )}\n <div class=\"app-title-wrapper\">\n {(hasTitle || isSlotUsed(this.el, \"app-title\")) && (\n <Component {...attrs} class=\"title-link\">\n <div class=\"app-icon-container\" aria-hidden=\"true\">\n <slot name=\"app-icon\"></slot>\n </div>\n <ic-typography\n variant={isAppNameSubtitleVariant ? \"subtitle-small\" : \"h3\"}\n >\n {isSlotUsed(this.el, \"app-title\") ? (\n <slot name=\"app-title\"></slot>\n ) : (\n appTitle\n )}\n </ic-typography>\n </Component>\n )}\n </div>\n </div>\n );\n };\n\n componentWillLoad(): void {\n if (this.expanded) {\n this.setMenuExpanded(true);\n } else {\n this.setMenuExpanded(false);\n }\n\n if (this.collapsedIconLabels) {\n this.setCollapsedIconLabels();\n }\n\n this.hasSecondaryNavigation = isSlotUsed(this.el, \"secondary-navigation\");\n }\n\n componentDidLoad(): void {\n this.emitSideNavigationExpanded({\n sideNavExpanded: this.menuExpanded,\n sideNavMobile: this.deviceSize === DEVICE_SIZES.S,\n });\n\n checkResizeObserver(this.runResizeObserver);\n this.arrangeSlottedNavigationItem();\n this.styleSlottedCollapsedIconLabel();\n this.displayTooltipWithExpandedLongLabel(this.menuExpanded);\n\n !isSlotUsed(this.el, \"app-title\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.appTitle, propName: \"app-title\" }],\n \"Side Navigation\"\n );\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n appTitle,\n menuOpen,\n foregroundColor,\n menuExpanded,\n href,\n status,\n version,\n collapsedIconLabels,\n inline,\n } = this;\n\n const isSDevice = this.deviceSize === DEVICE_SIZES.S;\n const isMdDevice = this.deviceSize === DEVICE_SIZES.M;\n const isLgDevice = this.deviceSize >= DEVICE_SIZES.L;\n const isAppNameSubtitleVariant = this.deviceSizeAppTitle === DEVICE_SIZES.S;\n const displayExpandBtn = isMdDevice || (isLgDevice && !this.static);\n\n const topBarProps: IcTopBar = {\n isSDevice,\n foregroundColor,\n menuOpen,\n href,\n isAppNameSubtitleVariant,\n appTitle,\n };\n\n return (\n <Host\n class={{\n \"xs-menu-open\": menuOpen && isSDevice,\n \"xs-menu-close\": !menuOpen && isSDevice,\n \"sm-collapsed\": !isSDevice && !menuExpanded,\n \"sm-expanded\": !isSDevice && menuExpanded,\n [IcThemeForegroundEnum.Dark]:\n foregroundColor === IcThemeForegroundEnum.Dark,\n [\"collapsed-labels\"]:\n !isSDevice && !menuExpanded && collapsedIconLabels,\n [\"static\"]: this.static,\n [\"inline\"]: inline,\n }}\n >\n {isSDevice && this.renderTopBar({ ...topBarProps })}\n <div class=\"side-navigation\" id=\"side-navigation\">\n {!isSDevice && this.renderTopBar({ ...topBarProps })}\n <div class=\"side-navigation-inner\">\n {isSlotUsed(this.el, \"primary-navigation\") && (\n <nav\n class=\"primary-navigation\"\n aria-labelledby=\"primary-navigation-landmark\"\n >\n <span\n aria-hidden=\"true\"\n class=\"navigation-landmark-title\"\n id=\"primary-navigation-landmark\"\n >\n Primary\n </span>\n <ul class=\"navigation-list\">\n <slot name=\"primary-navigation\"></slot>\n </ul>\n </nav>\n )}\n </div>\n <div\n class={{\n [\"bottom-wrapper\"]: true,\n [\"classification-spacing\"]: hasClassificationBanner(),\n }}\n >\n {isSlotUsed(this.el, \"secondary-navigation\") && (\n <nav\n class=\"secondary-navigation\"\n aria-labelledby=\"secondary-navigation-landmark\"\n >\n <span\n aria-hidden=\"true\"\n class=\"navigation-landmark-title\"\n id=\"secondary-navigation-landmark\"\n >\n Secondary\n </span>\n <ul class=\"navigation-list\">\n <slot name=\"secondary-navigation\"></slot>\n </ul>\n </nav>\n )}\n <div class=\"bottom-side-nav\">\n {this.hasSecondaryNavigation && <ic-divider></ic-divider>}\n {displayExpandBtn && (\n <button\n class=\"menu-expand-button\"\n innerHTML={chevronIcon}\n onClick={this.toggleMenuExpanded}\n aria-label={`${\n menuExpanded ? \"Collapse\" : \"Expand\"\n } side navigation`}\n ></button>\n )}\n <div class=\"app-status-wrapper\">\n {status !== \"\" && (\n <div\n class={{\n [\"app-status\"]: true,\n }}\n >\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 {version !== \"\" && (\n <ic-typography\n variant=\"label\"\n class=\"app-version\"\n aria-label=\"app version\"\n >\n {version}\n </ic-typography>\n )}\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/ic-footer-link/ic-footer-link.css?tag=ic-footer-link&encapsulation=shadow","src/components/ic-footer-link/ic-footer-link.tsx"],"names":["icFooterLinkCss","FooterLink","small","grouped","DEVICE_SIZES","XL","getThemeForegroundColor","[object Object]","e","parentElement","classList","contains","this","inferConfig","footerConfig","el","ev","theme","detail","foregroundColor","mode","href","hreflang","referrerpolicy","rel","target","download","h","Host","class","footer-link","referrerPolicy","innerHTML","OpenInNew"],"mappings":"gKAAA,MAAMA,EAAkB,qrLCuBXC,EAAU,yCAMG,kHAyBc,wBAEA,CAAEC,MAAO,MAAOC,QAAS,uBAEjCC,EAAaC,wBAEGC,IAEtCC,YAAYC,GAClB,GAAIA,EAAEC,gBAAkB,KAAM,CAC5B,GAAID,EAAEC,cAAcC,UAAUC,SAAS,UAAW,CAChD,MAAO,CACLT,MAAOM,EAAEC,cAAcC,UAAUC,SAAS,gBAC1CR,QAASK,EAAEC,cAAcC,UAAUC,SAAS,uBAEzC,CACL,OAAOC,KAAKC,YAAYL,EAAEC,oBAEvB,CACL,MAAO,CAAEP,MAAO,MAAOC,QAAS,QAKpCI,sBACEK,KAAKE,aAAeF,KAAKC,YAAYD,KAAKG,IAI5CR,yBAAyBS,GACvB,MAAMC,EAAiBD,EAAGE,OAC1BN,KAAKO,gBAAkBF,EAAMG,KAG/Bb,oBACEK,KAAKE,aAAeF,KAAKC,YAAYD,KAAKG,IAG5CR,SACE,MAAMO,aACJA,EAAYO,KACZA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,IACdA,EAAGC,OACHA,EAAMC,SACNA,GACEd,KACJ,MAAMV,MAAEA,EAAKC,QAAEA,GAAYW,EAE3B,OACEa,EAACC,EAAI,CACHC,MAAO,CACLC,cAAe,KACfvB,CAAC,eAAeJ,EAAU,UAAY,eACpCD,EAAQ,QAAU,YACf,KACLK,CAAC,eAAeK,KAAKO,mBAAoB,OAG3CQ,EAAA,IAAA,CACEN,KAAMA,EACNC,SAAUA,EACVS,eAAgBR,EAChBC,IAAKA,EACLE,SAAUA,IAAa,MAAQA,EAAW,KAC1CD,OAAQA,GAERE,EAAA,OAAA,MACCF,IAAW,UACVE,EAAA,OAAA,CAAME,MAAM,mBAAmBG,UAAWC","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.footer-link-ungrouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 2.5rem;\n --footer-link-margin-bottom: 0;\n}\n\n:host(.footer-link-ungrouped-small) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-grouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-grouped-small) {\n --footer-link-margin-left: var(--ic-space-md);\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link) {\n margin-left: var(--footer-link-margin-left);\n margin-right: var(--footer-link-margin-right);\n margin-bottom: var(--footer-link-margin-bottom);\n}\n\n/* Link styling */\n\n:host(.footer-link) a,\n:host(.footer-link) a ::slotted(a) {\n display: flex;\n align-items: flex-end;\n font-weight: var(--ic-font-weight-bold);\n color: inherit;\n width: fit-content;\n font-size: var(--ic-font-size-regular);\n}\n\n:host(.footer-link) a:link,\n:host(.footer-link) a ::slotted(a:link) {\n color: inherit;\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n}\n\n:host(.footer-link) a:link > ::slotted(svg),\n:host(.footer-link) a:link > ::slotted(img),\n:host(.footer-link) a ::slotted(a:link > ::slotted(svg)),\n:host(.footer-link) a ::slotted(a:link > ::slotted(img)) {\n padding: var(--ic-space-xxxs);\n pointer-events: none;\n transition: var(--ic-easing-transition-fast);\n}\n\n/*\nThere's an apparent defect in Chrome that means this isn't always re-rendered if changed.\nNot an issue in Safari. Line 73-79 implement the same function but less clean.\n\na:link > ::slotted(svg) ,\na:link:visited > ::slotted(svg) {\n fill: var(--ic-theme-text);\n}\n*/\n\n:host(.footer-link-light) ::slotted(svg) {\n fill: var(--ic-architectural-white);\n}\n\n:host(.footer-link-dark) ::slotted(svg) {\n fill: var(--ic-architectural-black);\n}\n\n:host(.footer-link) a:link:hover,\n:host(.footer-link) a:link:focus,\n:host(.footer-link) a ::slotted(a:link:hover),\n:host(.footer-link) a ::slotted(a:link:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n:host(.footer-link) a:link:hover,\n:host(.footer-link) a ::slotted(a:link:hover) {\n outline: none;\n}\n\n:host(.footer-link) a:link:focus,\n:host(.footer-link) a ::slotted(a:link:focus) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.footer-link) a:link:focus > ::slotted(svg),\n:host(.footer-link) a:link:focus > ::slotted(img),\n:host(.footer-link) a ::slotted(a:link:focus > ::slotted(svg)),\n:host(.footer-link) a ::slotted(a:link:focus > ::slotted(img)) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.footer-link) a:focus,\n:host(.footer-link) a ::slotted(a:focus) {\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n transition: var(--ic-transition-duration-fast);\n}\n\n:host(.footer-link) a:link:active,\n:host(.footer-link) a:link:focus:active,\n:host(.footer-link) a:link:visited:active,\n:host(.footer-link) a ::slotted(a:link:active),\n:host(.footer-link) a ::slotted(a:link:focus:active),\n:host(.footer-link) a ::slotted(a:link:visited:active) {\n color: inherit;\n text-decoration: none;\n}\n\n:host(.footer-link) a:hover,\n:host(.footer-link) a ::slotted(a:hover) {\n text-decoration: none;\n}\n\n.open-in-new-icon {\n padding-left: var(--ic-space-xxs);\n}\n\n.open-in-new-icon,\n.open-in-new-icon svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n:host(.footer-link-light) .open-in-new-icon svg {\n fill: var(--ic-architectural-white);\n}\n\n:host(.footer-link-dark) .open-in-new-icon svg {\n fill: var(--ic-architectural-black);\n}\n\n@media screen and (min-width: 769px) {\n :host(.footer-link.footer-link-ungrouped-sparse:last-of-type) {\n margin-right: 0;\n }\n}\n\n@media (forced-colors: active) {\n :host(.footer-link-light) ::slotted(svg),\n :host(.footer-link-dark) ::slotted(svg) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Listen,\n Prop,\n h,\n State,\n} from \"@stencil/core\";\nimport { DEVICE_SIZES, getThemeForegroundColor } from \"../../utils/helpers\";\nimport { IcTheme, IcThemeForeground } from \"../../utils/types\";\n\nimport OpenInNew from \"../../assets/OpenInNew.svg\";\n\ntype FooterConfig = { small: boolean; grouped: boolean };\n\n@Component({\n tag: \"ic-footer-link\",\n styleUrl: \"ic-footer-link.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class FooterLink {\n @Element() el: HTMLIcFooterLinkElement;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string = null;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n @State() footerConfig: FooterConfig = { small: false, grouped: false };\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n\n private inferConfig(e: HTMLElement): FooterConfig {\n if (e.parentElement !== null) {\n if (e.parentElement.classList.contains(\"footer\")) {\n return {\n small: e.parentElement.classList.contains(\"footer-small\"),\n grouped: e.parentElement.classList.contains(\"footer-grouped\"),\n };\n } else {\n return this.inferConfig(e.parentElement);\n }\n } else {\n return { small: false, grouped: false };\n }\n }\n\n @Listen(\"footerResized\", { target: \"document\" })\n footerResizeHandler(): void {\n this.footerConfig = this.inferConfig(this.el);\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n footerThemeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.foregroundColor = theme.mode;\n }\n\n componentWillLoad(): void {\n this.footerConfig = this.inferConfig(this.el);\n }\n\n render() {\n const {\n footerConfig,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n download,\n } = this;\n const { small, grouped } = footerConfig;\n\n return (\n <Host\n class={{\n \"footer-link\": true,\n [`footer-link-${grouped ? \"grouped\" : \"ungrouped\"}-${\n small ? \"small\" : \"sparse\"\n }`]: true,\n [`footer-link-${this.foregroundColor}`]: true,\n }}\n >\n <a\n href={href}\n hreflang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n download={download !== false ? download : null}\n target={target}\n >\n <slot />\n {target === \"_blank\" && (\n <span class=\"open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n </Host>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/ic-horizontal-scroll/ic-horizontal-scroll.css?tag=ic-horizontal-scroll&encapsulation=shadow","src/components/ic-horizontal-scroll/ic-horizontal-scroll.tsx"],"names":["icHorizontalScrollCss","SCROLL_DELAY_MS","HorizontalScroll","this","buttonStateSet","resizeObserverCallback","el","clientWidth","itemsContainerEl","scrollWidth","itemOverflow","elementOverflowsX","lastItemVisible","offsetWidth","scrollLeft","runResizeObserver","resizeObserver","ResizeObserver","observe","scrollItemIntoView","getCurrentLeftItem","scrollRight","longScrollRight","scrollDelay","window","setTimeout","longScrollLeft","leftArrowMouseDownHandler","e","preventDefault","rightArrowMouseDownHandler","arrowMouseUpHandler","clearTimeout","index","itemOffsets","findIndex","Math","round","scrollHandler","isScrolling","scrollStopped","firstItemVisible","[object Object]","itemPosition","newScrollPos","children","addEventListener","items","getSlotElements","Array","from","forEach","item","itemFocusHandler","indexOf","runningTotal","map","checkResizeObserver","scrollArrows","shadowRoot","querySelectorAll","event","arrow","disconnect","appearance","h","Host","class","IcThemeForegroundEnum","Dark","Light","aria-hidden","variant","aria-label","innerHTML","LeftArrow","disabled","tabindex","onClick","onMouseDown","RightArrow"],"mappings":"6jBAAA,MAAMA,EAAwB,g4HCiB9B,MAAMC,EAAkB,UAOXC,EAAgB,+BAkBnBC,KAAAC,eAA0B,MAuB1BD,KAAAE,uBAAyB,KAC/B,GAAIF,KAAKG,GAAGC,aAAeJ,KAAKK,iBAAiBC,YAAa,CAC5DN,KAAKO,aAAe,UACf,CACLP,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D,EAACC,EAAI,CACHC,MAAO,CACLzB,CAAC,WAAYhC,EACbgC,CAAC,QAASvC,KAAK6D,aAAeI,EAAsBC,KACpD3B,CAAC,SAAUvC,KAAK6D,aAAeI,EAAsBE,QAGvDL,EAAA,MAAA,CAAAM,cACc,OACZJ,MAAO,CACLzB,CAAC,yBAA0B,KAC3BA,CAAC,WAAYhC,EACbgC,CAAC,YAAaD,IAGhBwB,EAAA,YAAA,CACEE,MAAM,eACNK,QAAQ,OAAMC,aACH,cACXT,WAAYA,EACZU,UAAWC,EACXC,SAAUnC,EACVoC,SAAS,KACTC,QAAS3E,KAAKW,WACdiE,YAAa5E,KAAKwB,4BAEpBsC,EAAA,OAAA,CAAME,MAAM,0BAEdF,EAAA,OAAA,MACAA,EAAA,MAAA,CAAAM,cACc,OACZJ,MAAO,CACLzB,CAAC,0BAA2B,KAC5BA,CAAC,WAAYhC,EACbgC,CAAC,YAAa9B,IAGhBqD,EAAA,OAAA,CAAME,MAAM,0BACZF,EAAA,YAAA,CACEE,MAAM,eACNK,QAAQ,OAAMC,aACH,eACXT,WAAYA,EACZU,UAAWM,EACXJ,SAAUhE,EACViE,SAAS,KACTC,QAAS3E,KAAKkB,YACd0D,YAAa5E,KAAK2B","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --border-bottom-color: var(--ic-architectural-300);\n --splitter-color: var(--ic-architectural-100);\n\n display: flex;\n max-width: 100%;\n}\n\n:host(.light) {\n --splitter-color: var(--ic-keyline-lighten-rgb);\n}\n\n:host(.dark) {\n --splitter-color: var(--ic-keyline-darken-rgb);\n}\n\n:host([inline]) {\n margin-bottom: 0;\n}\n\n/* Slotted items container element */\n::slotted(*) {\n overflow-x: scroll;\n overflow-y: hidden;\n scroll-behavior: smooth;\n scrollbar-width: none;\n -ms-overflow-style: none;\n margin: calc(var(--ic-space-xs) * -1) !important;\n padding: var(--ic-space-xs) !important;\n}\n\n:host(.visible) ::slotted(*) {\n margin: calc(var(--ic-space-xs) * -1) 0 !important;\n padding: var(--ic-space-xs) !important;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n\n.scroll-container-left,\n.scroll-container-right {\n display: flex;\n}\n\n.scroll-container-left {\n margin-left: var(--ic-space-xxs);\n}\n\n.scroll-container-right {\n margin-right: var(--ic-space-xxs);\n}\n\n.hidden {\n display: none;\n}\n\n.scroll-arrow {\n margin: var(--ic-space-xxs) 0 var(--ic-space-xs) 0;\n}\n\n.disabled .ic-tooltip-container {\n display: none !important;\n}\n\n.scroll-splitter-left,\n.scroll-splitter-right {\n display: flex;\n height: var(--ic-space-lg);\n width: 0.063rem;\n margin-top: var(--ic-space-xs);\n border-radius: 0.063rem;\n background-color: var(--splitter-color);\n}\n\n.scroll-splitter-left {\n margin-left: calc(var(--ic-space-xxs) - 0.063rem);\n}\n\n.scroll-splitter-right {\n margin-right: calc(var(--ic-space-xxs) - 0.063rem);\n}\n\n.disabled .scroll-splitter-left,\n.disabled .scroll-splitter-right {\n background-color: transparent;\n}\n\n.disabled ic-button > svg {\n color: var(--ic-keyline-darken-rgb);\n}\n\n:host(.dark) .disabled ic-button > svg,\n:host(.light) .disabled ic-button > svg {\n color: var(--splitter-color) !important;\n}\n","import {\n Component,\n Element,\n h,\n Host,\n State,\n Method,\n Prop,\n} from \"@stencil/core\";\n\nimport LeftArrow from \"./assets/left-arrow.svg\";\nimport RightArrow from \"./assets/right-arrow.svg\";\nimport { getSlotElements } from \"../../utils/helpers\";\n\nimport { checkResizeObserver, elementOverflowsX } from \"../../utils/helpers\";\nimport { IcThemeForeground, IcThemeForegroundEnum } from \"../../utils/types\";\n\nconst SCROLL_DELAY_MS = 200;\n\n@Component({\n tag: \"ic-horizontal-scroll\",\n styleUrl: \"./ic-horizontal-scroll.css\",\n shadow: true,\n})\nexport class HorizontalScroll {\n @Element() el: HTMLIcHorizontalScrollElement;\n\n /**\n * The appearance of the horizontal scroll, e.g. dark, light or the default.\n */\n @Prop() appearance?: IcThemeForeground = \"default\";\n\n @State() firstItemVisible: boolean = true;\n @State() lastItemVisible: boolean = false;\n @State() itemOverflow: boolean = false;\n\n private itemOffsets: number[];\n private itemsContainerEl: HTMLElement;\n private items: HTMLElement[];\n private resizeObserver: ResizeObserver;\n private isScrolling: number;\n private scrollDelay: number;\n private buttonStateSet: boolean = false;\n\n /**\n * @internal if side scrolling enabled, scrolls the specified item into view.\n */\n @Method()\n async scrollItemIntoView(itemPosition: number): Promise<void> {\n this.firstItemVisible = itemPosition <= 0;\n const newScrollPos =\n itemPosition <= 0 ? 0 : this.itemOffsets[itemPosition - 1];\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + newScrollPos >=\n this.itemsContainerEl.scrollWidth;\n this.buttonStateSet = true;\n this.itemsContainerEl.scrollLeft = newScrollPos;\n }\n\n itemFocusHandler(itemPosition: number): void {\n if (this.itemOverflow) {\n this.scrollItemIntoView(itemPosition);\n }\n }\n\n private resizeObserverCallback = () => {\n if (this.el.clientWidth >= this.itemsContainerEl.scrollWidth) {\n this.itemOverflow = false;\n } else {\n this.itemOverflow = elementOverflowsX(this.itemsContainerEl);\n }\n\n if (this.itemOverflow) {\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + this.itemsContainerEl.scrollLeft >=\n this.itemsContainerEl.scrollWidth;\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.itemsContainerEl);\n };\n\n private scrollLeft = () => {\n this.scrollItemIntoView(this.getCurrentLeftItem() - 1);\n };\n\n private scrollRight = () => {\n this.scrollItemIntoView(this.getCurrentLeftItem() + 1);\n };\n\n private longScrollRight = () => {\n this.scrollRight();\n this.scrollDelay = window.setTimeout(this.longScrollRight, SCROLL_DELAY_MS);\n };\n\n private longScrollLeft = () => {\n this.scrollLeft();\n this.scrollDelay = window.setTimeout(this.longScrollLeft, SCROLL_DELAY_MS);\n };\n\n private leftArrowMouseDownHandler = (e: MouseEvent) => {\n e.preventDefault();\n this.scrollDelay = window.setTimeout(this.longScrollLeft, SCROLL_DELAY_MS);\n };\n\n private rightArrowMouseDownHandler = (e: MouseEvent) => {\n e.preventDefault();\n this.scrollDelay = window.setTimeout(this.longScrollRight, SCROLL_DELAY_MS);\n };\n\n private arrowMouseUpHandler = () => {\n window.clearTimeout(this.scrollDelay);\n };\n\n private getCurrentLeftItem = (): number => {\n const index = this.itemOffsets.findIndex(\n (el) => el > Math.round(this.itemsContainerEl.scrollLeft)\n );\n return index < 0 ? 0 : index;\n };\n\n private scrollHandler = () => {\n window.clearTimeout(this.isScrolling);\n // Set a timeout to run after scrolling ends\n this.isScrolling = window.setTimeout(this.scrollStopped, 50);\n };\n\n private scrollStopped = () => {\n // If scrollItemIntoView has been called, the button states will already be set\n // Can't just handle it here as it causes strange jumping behaviour in positioning\n const scrollLeft = Math.round(this.itemsContainerEl.scrollLeft);\n if (this.buttonStateSet === false) {\n this.firstItemVisible = scrollLeft === 0;\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + scrollLeft >=\n this.itemsContainerEl.scrollWidth;\n }\n this.buttonStateSet = false;\n };\n\n componentWillLoad(): void {\n this.itemsContainerEl = this.el.children[0] as HTMLElement;\n this.itemsContainerEl.addEventListener(\"scroll\", this.scrollHandler);\n\n this.items = (getSlotElements(this.itemsContainerEl) ||\n Array.from(this.itemsContainerEl.children)) as HTMLElement[];\n this.items.forEach((item) =>\n item.addEventListener(\"focus\", () =>\n this.itemFocusHandler(Array.from(this.items).indexOf(item))\n )\n );\n }\n\n componentDidLoad(): void {\n let runningTotal = 0;\n this.itemOffsets = this.items.map((item) => {\n runningTotal += item.offsetWidth;\n return runningTotal;\n });\n\n checkResizeObserver(this.runResizeObserver);\n\n // Add event listener to scroll containers as mouse events are not fired on disabled elements (ic-button's <button>)\n // 'mouseleave' needed in case the user moves their mouse while holding the arrow buttons\n // - 'mouseup' otherwise not detected and scrolling not stopped\n const scrollArrows = Array.from(\n this.el.shadowRoot.querySelectorAll(\"div\")\n ) as HTMLElement[];\n [\"mouseup\", \"mouseleave\"].forEach((event) => {\n scrollArrows.forEach((arrow) =>\n arrow.addEventListener(event, this.arrowMouseUpHandler)\n );\n });\n }\n\n disconnectedCallback(): void {\n this.resizeObserver.disconnect();\n }\n\n render() {\n const { appearance, firstItemVisible, lastItemVisible, itemOverflow } =\n this;\n\n return (\n <Host\n class={{\n [\"visible\"]: itemOverflow,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n }}\n >\n <div\n aria-hidden=\"true\"\n class={{\n [\"scroll-container-left\"]: true,\n [\"hidden\"]: !itemOverflow,\n [\"disabled\"]: firstItemVisible,\n }}\n >\n <ic-button\n class=\"scroll-arrow\"\n variant=\"icon\"\n aria-label=\"Scroll left\"\n appearance={appearance}\n innerHTML={LeftArrow}\n disabled={firstItemVisible}\n tabindex=\"-1\"\n onClick={this.scrollLeft}\n onMouseDown={this.leftArrowMouseDownHandler}\n ></ic-button>\n <span class=\"scroll-splitter-left\"></span>\n </div>\n <slot></slot>\n <div\n aria-hidden=\"true\"\n class={{\n [\"scroll-container-right\"]: true,\n [\"hidden\"]: !itemOverflow,\n [\"disabled\"]: lastItemVisible,\n }}\n >\n <span class=\"scroll-splitter-right\"></span>\n <ic-button\n class=\"scroll-arrow\"\n variant=\"icon\"\n aria-label=\"Scroll right\"\n appearance={appearance}\n innerHTML={RightArrow}\n disabled={lastItemVisible}\n tabindex=\"-1\"\n onClick={this.scrollRight}\n onMouseDown={this.rightArrowMouseDownHandler}\n ></ic-button>\n </div>\n </Host>\n );\n }\n}\n"]}