@ukic/web-components 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (536) hide show
  1. package/README.md +28 -0
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/{helpers-a0a128bd.js → helpers-789082d4.js} +16 -37
  4. package/dist/cjs/helpers-789082d4.js.map +1 -0
  5. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-alert.cjs.entry.js +63 -36
  10. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js +4 -4
  12. package/dist/cjs/ic-badge.cjs.entry.js +40 -16
  13. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +3 -3
  15. package/dist/cjs/ic-breadcrumb.cjs.entry.js +3 -3
  16. package/dist/cjs/ic-button_3.cjs.entry.js +32 -7
  17. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-card-vertical.cjs.entry.js +6 -6
  19. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-checkbox-group.cjs.entry.js +4 -4
  21. package/dist/cjs/ic-checkbox.cjs.entry.js +6 -6
  22. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-chip.cjs.entry.js +4 -4
  24. package/dist/cjs/ic-classification-banner.cjs.entry.js +2 -2
  25. package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
  26. package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
  27. package/dist/cjs/ic-dialog.cjs.entry.js +3 -3
  28. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-divider.cjs.entry.js +2 -2
  30. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-empty-state.cjs.entry.js +3 -3
  32. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  33. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
  35. package/dist/cjs/ic-footer.cjs.entry.js +4 -4
  36. package/dist/cjs/ic-hero.cjs.entry.js +5 -5
  37. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -6
  38. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +9 -9
  39. package/dist/cjs/ic-input-label_2.cjs.entry.js +8 -8
  40. package/dist/cjs/ic-link.cjs.entry.js +2 -2
  41. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  42. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -3
  45. package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -3
  46. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-navigation-item.cjs.entry.js +12 -7
  48. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
  50. package/dist/cjs/ic-page-header.cjs.entry.js +7 -7
  51. package/dist/cjs/ic-pagination-item.cjs.entry.js +2 -2
  52. package/dist/cjs/ic-pagination.cjs.entry.js +5 -5
  53. package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
  54. package/dist/cjs/ic-radio-group.cjs.entry.js +5 -5
  55. package/dist/cjs/ic-radio-option.cjs.entry.js +6 -6
  56. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-search-bar.cjs.entry.js +10 -10
  58. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  59. package/dist/cjs/ic-select.cjs.entry.js +46 -49
  60. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-side-navigation.cjs.entry.js +5 -5
  62. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  64. package/dist/cjs/ic-skip-link.cjs.entry.js +10 -3
  65. package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  67. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-step.cjs.entry.js +15 -15
  69. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
  71. package/dist/cjs/ic-switch.cjs.entry.js +5 -5
  72. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  74. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  75. package/dist/cjs/ic-tab.cjs.entry.js +3 -3
  76. package/dist/cjs/ic-text-field.cjs.entry.js +7 -7
  77. package/dist/cjs/ic-theme.cjs.entry.js +4 -2
  78. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  80. package/dist/cjs/ic-toast.cjs.entry.js +4 -4
  81. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +3 -3
  82. package/dist/cjs/ic-toggle-button.cjs.entry.js +4 -4
  83. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-top-navigation.cjs.entry.js +5 -5
  85. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-typography.cjs.entry.js +4 -4
  87. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  88. package/dist/cjs/loader.cjs.js +1 -1
  89. package/dist/collection/components/ic-accordion/ic-accordion.css +3 -0
  90. package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +1 -0
  91. package/dist/collection/components/ic-alert/ic-alert.css +3 -1
  92. package/dist/collection/components/ic-alert/ic-alert.js +85 -50
  93. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  94. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +3 -3
  95. package/dist/collection/components/ic-badge/ic-badge.js +39 -15
  96. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  97. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +2 -2
  98. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +2 -2
  99. package/dist/collection/components/ic-button/ic-button.css +18 -5
  100. package/dist/collection/components/ic-button/ic-button.stories.js +29 -52
  101. package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +20 -4
  102. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +4 -4
  103. package/dist/collection/components/ic-checkbox/ic-checkbox.css +3 -1
  104. package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -4
  105. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +3 -3
  106. package/dist/collection/components/ic-chip/ic-chip.js +3 -3
  107. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +2 -2
  108. package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
  109. package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
  110. package/dist/collection/components/ic-dialog/ic-dialog.css +2 -1
  111. package/dist/collection/components/ic-dialog/ic-dialog.js +1 -1
  112. package/dist/collection/components/ic-divider/ic-divider.css +7 -4
  113. package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
  114. package/dist/collection/components/ic-footer/ic-footer.js +3 -3
  115. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
  116. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +0 -3
  117. package/dist/collection/components/ic-hero/ic-hero.js +4 -4
  118. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
  119. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
  120. package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
  121. package/dist/collection/components/ic-input-label/ic-input-label.js +4 -4
  122. package/dist/collection/components/ic-input-validation/ic-input-validation.js +3 -3
  123. package/dist/collection/components/ic-link/ic-link.js +1 -1
  124. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +3 -3
  125. package/dist/collection/components/ic-menu/ic-menu.js +3 -3
  126. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  127. package/dist/collection/components/ic-menu-item/ic-menu-item.css +2 -0
  128. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +2 -2
  129. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +0 -4
  130. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
  131. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +20 -1
  132. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +11 -6
  133. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  134. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
  135. package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
  136. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  137. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
  138. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
  139. package/dist/collection/components/ic-radio-group/ic-radio-group.js +4 -4
  140. package/dist/collection/components/ic-radio-option/ic-radio-option.css +2 -1
  141. package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
  142. package/dist/collection/components/ic-search-bar/ic-search-bar.js +9 -9
  143. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  144. package/dist/collection/components/ic-select/ic-select.js +45 -48
  145. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  146. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +2 -1
  147. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +4 -4
  148. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  149. package/dist/collection/components/ic-skip-link/ic-skip-link.js +31 -3
  150. package/dist/collection/components/ic-skip-link/ic-skip-link.js.map +1 -1
  151. package/dist/collection/components/ic-status-tag/ic-status-tag.css +6 -0
  152. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  153. package/dist/collection/components/ic-step/ic-step.css +0 -3
  154. package/dist/collection/components/ic-step/ic-step.js +13 -13
  155. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  156. package/dist/collection/components/ic-switch/ic-switch.js +4 -4
  157. package/dist/collection/components/ic-tab/ic-tab.js +2 -2
  158. package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -1
  159. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  160. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  161. package/dist/collection/components/ic-text-field/ic-text-field.js +6 -6
  162. package/dist/collection/components/ic-theme/ic-theme.js +31 -3
  163. package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
  164. package/dist/collection/components/ic-toast/ic-toast.js +3 -3
  165. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  166. package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +6 -8
  167. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
  168. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
  169. package/dist/collection/components/ic-tooltip/ic-tooltip.js +32 -2
  170. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  171. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +3 -1
  172. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +4 -4
  173. package/dist/collection/components/ic-typography/ic-typography.css +2 -2
  174. package/dist/collection/components/ic-typography/ic-typography.js +2 -2
  175. package/dist/collection/utils/helpers.js +15 -36
  176. package/dist/collection/utils/helpers.js.map +1 -1
  177. package/dist/collection/utils/types.js.map +1 -1
  178. package/dist/components/helpers.js +16 -37
  179. package/dist/components/helpers.js.map +1 -1
  180. package/dist/components/ic-accordion-group.js.map +1 -1
  181. package/dist/components/ic-accordion.js.map +1 -1
  182. package/dist/components/ic-alert.js +66 -37
  183. package/dist/components/ic-alert.js.map +1 -1
  184. package/dist/components/ic-back-to-top.js +3 -3
  185. package/dist/components/ic-badge.js +39 -15
  186. package/dist/components/ic-badge.js.map +1 -1
  187. package/dist/components/ic-breadcrumb-group.js +2 -2
  188. package/dist/components/ic-breadcrumb2.js +2 -2
  189. package/dist/components/ic-button2.js +1 -1
  190. package/dist/components/ic-button2.js.map +1 -1
  191. package/dist/components/ic-card-vertical.js +5 -5
  192. package/dist/components/ic-card-vertical.js.map +1 -1
  193. package/dist/components/ic-checkbox-group.js +4 -4
  194. package/dist/components/ic-checkbox.js +6 -6
  195. package/dist/components/ic-checkbox.js.map +1 -1
  196. package/dist/components/ic-chip.js +3 -3
  197. package/dist/components/ic-classification-banner.js +2 -2
  198. package/dist/components/ic-data-list.js +2 -2
  199. package/dist/components/ic-data-row.js +3 -3
  200. package/dist/components/ic-dialog.js +2 -2
  201. package/dist/components/ic-dialog.js.map +1 -1
  202. package/dist/components/ic-divider2.js +2 -2
  203. package/dist/components/ic-divider2.js.map +1 -1
  204. package/dist/components/ic-empty-state.js +2 -2
  205. package/dist/components/ic-footer-link-group.js +1 -1
  206. package/dist/components/ic-footer-link-group.js.map +1 -1
  207. package/dist/components/ic-footer-link.js +2 -2
  208. package/dist/components/ic-footer.js +4 -4
  209. package/dist/components/ic-hero.js +5 -5
  210. package/dist/components/ic-horizontal-scroll2.js +6 -6
  211. package/dist/components/ic-input-component-container2.js +4 -4
  212. package/dist/components/ic-input-container2.js +2 -2
  213. package/dist/components/ic-input-label2.js +5 -5
  214. package/dist/components/ic-input-validation2.js +4 -4
  215. package/dist/components/ic-link2.js +1 -1
  216. package/dist/components/ic-loading-indicator2.js +3 -3
  217. package/dist/components/ic-menu-group.js +1 -1
  218. package/dist/components/ic-menu-item2.js.map +1 -1
  219. package/dist/components/ic-menu2.js +4 -4
  220. package/dist/components/ic-navigation-button.js +2 -2
  221. package/dist/components/ic-navigation-group.js +3 -3
  222. package/dist/components/ic-navigation-group.js.map +1 -1
  223. package/dist/components/ic-navigation-item.js +12 -7
  224. package/dist/components/ic-navigation-item.js.map +1 -1
  225. package/dist/components/ic-navigation-menu2.js +5 -5
  226. package/dist/components/ic-page-header.js +6 -6
  227. package/dist/components/ic-pagination-item2.js +2 -2
  228. package/dist/components/ic-pagination.js +4 -4
  229. package/dist/components/ic-popover-menu.js +4 -4
  230. package/dist/components/ic-popover-menu.js.map +1 -1
  231. package/dist/components/ic-radio-group.js +5 -5
  232. package/dist/components/ic-radio-option.js +6 -6
  233. package/dist/components/ic-radio-option.js.map +1 -1
  234. package/dist/components/ic-search-bar.js +10 -10
  235. package/dist/components/ic-section-container2.js +2 -2
  236. package/dist/components/ic-select.js +46 -49
  237. package/dist/components/ic-select.js.map +1 -1
  238. package/dist/components/ic-side-navigation.js +5 -5
  239. package/dist/components/ic-side-navigation.js.map +1 -1
  240. package/dist/components/ic-skeleton.js +2 -2
  241. package/dist/components/ic-skip-link.js +12 -4
  242. package/dist/components/ic-skip-link.js.map +1 -1
  243. package/dist/components/ic-status-tag.js +2 -2
  244. package/dist/components/ic-status-tag.js.map +1 -1
  245. package/dist/components/ic-step.js +14 -14
  246. package/dist/components/ic-step.js.map +1 -1
  247. package/dist/components/ic-stepper.js +3 -3
  248. package/dist/components/ic-switch.js +5 -5
  249. package/dist/components/ic-tab-context.js +1 -1
  250. package/dist/components/ic-tab-group.js +2 -2
  251. package/dist/components/ic-tab-panel.js +2 -2
  252. package/dist/components/ic-tab-panel.js.map +1 -1
  253. package/dist/components/ic-tab.js +2 -2
  254. package/dist/components/ic-text-field.js +7 -7
  255. package/dist/components/ic-theme.js +3 -1
  256. package/dist/components/ic-theme.js.map +1 -1
  257. package/dist/components/ic-toast-region.js +1 -1
  258. package/dist/components/ic-toast.js +4 -4
  259. package/dist/components/ic-toggle-button-group.js +2 -2
  260. package/dist/components/ic-toggle-button.js +3 -3
  261. package/dist/components/ic-toggle-button.js.map +1 -1
  262. package/dist/components/ic-tooltip2.js +30 -2
  263. package/dist/components/ic-tooltip2.js.map +1 -1
  264. package/dist/components/ic-top-navigation.js +5 -5
  265. package/dist/components/ic-top-navigation.js.map +1 -1
  266. package/dist/components/ic-typography2.js +3 -3
  267. package/dist/components/ic-typography2.js.map +1 -1
  268. package/dist/core/core.css +1 -1
  269. package/dist/core/core.esm.js +1 -1
  270. package/dist/core/core.esm.js.map +1 -1
  271. package/dist/core/{p-c9726fbd.entry.js → p-005cd8a8.entry.js} +2 -2
  272. package/dist/core/p-005cd8a8.entry.js.map +1 -0
  273. package/dist/core/p-0631c3ab.entry.js +2 -0
  274. package/dist/core/p-0631c3ab.entry.js.map +1 -0
  275. package/dist/core/{p-5e1fd097.entry.js → p-0a8b3967.entry.js} +2 -2
  276. package/dist/core/{p-f43f411a.entry.js → p-0b4350df.entry.js} +2 -2
  277. package/dist/core/p-0e618fc5.entry.js +2 -0
  278. package/dist/core/{p-811d447b.entry.js.map → p-0e618fc5.entry.js.map} +1 -1
  279. package/dist/core/p-18ecba80.entry.js +2 -0
  280. package/dist/core/{p-a794b724.entry.js.map → p-18ecba80.entry.js.map} +1 -1
  281. package/dist/core/{p-f34efc17.entry.js → p-1e4cdd2d.entry.js} +2 -2
  282. package/dist/core/{p-a71055c9.entry.js → p-23d059ff.entry.js} +2 -2
  283. package/dist/core/{p-071f4748.entry.js → p-23ed8b99.entry.js} +2 -2
  284. package/dist/core/{p-ed8957da.js → p-281ce313.js} +2 -2
  285. package/dist/core/p-281ce313.js.map +1 -0
  286. package/dist/core/{p-49768069.entry.js → p-30abe545.entry.js} +2 -2
  287. package/dist/core/p-3132270d.entry.js +2 -0
  288. package/dist/core/p-3132270d.entry.js.map +1 -0
  289. package/dist/core/{p-1ac08e6d.entry.js → p-33c86ba6.entry.js} +2 -2
  290. package/dist/core/p-3675c4b4.entry.js +2 -0
  291. package/dist/core/p-3675c4b4.entry.js.map +1 -0
  292. package/dist/core/{p-a20a7cd3.entry.js → p-3b5d3e24.entry.js} +2 -2
  293. package/dist/core/{p-972671ea.entry.js → p-3eb7ef1d.entry.js} +2 -2
  294. package/dist/core/{p-110486f0.entry.js → p-40f2f58e.entry.js} +2 -2
  295. package/dist/core/p-4245a976.entry.js +2 -0
  296. package/dist/core/p-4245a976.entry.js.map +1 -0
  297. package/dist/core/{p-264ce7a0.entry.js → p-44e4e8c1.entry.js} +2 -2
  298. package/dist/core/p-44e4e8c1.entry.js.map +1 -0
  299. package/dist/core/{p-5c349c9d.entry.js → p-45432bf5.entry.js} +2 -2
  300. package/dist/core/p-45432bf5.entry.js.map +1 -0
  301. package/dist/core/p-4b601e06.entry.js +2 -0
  302. package/dist/core/p-4b601e06.entry.js.map +1 -0
  303. package/dist/core/{p-fa02a267.entry.js → p-4b6818d9.entry.js} +2 -2
  304. package/dist/core/p-517d7afb.entry.js +2 -0
  305. package/dist/core/p-517d7afb.entry.js.map +1 -0
  306. package/dist/core/{p-a103068b.entry.js → p-5206a978.entry.js} +2 -2
  307. package/dist/core/p-5d4b0480.entry.js +2 -0
  308. package/dist/core/p-5d4b0480.entry.js.map +1 -0
  309. package/dist/core/{p-1f455336.entry.js → p-5e18b899.entry.js} +2 -2
  310. package/dist/core/{p-0e96d4d8.entry.js → p-6337fe1f.entry.js} +2 -2
  311. package/dist/core/p-6337fe1f.entry.js.map +1 -0
  312. package/dist/core/p-63fe83ad.entry.js +2 -0
  313. package/dist/core/p-63fe83ad.entry.js.map +1 -0
  314. package/dist/core/{p-7e79bd0e.entry.js → p-6de6b6b7.entry.js} +2 -2
  315. package/dist/core/p-70700c7a.entry.js +2 -0
  316. package/dist/core/{p-20c4d90b.entry.js → p-7a0d238b.entry.js} +2 -2
  317. package/dist/core/{p-10cd26dc.entry.js → p-7afc71d0.entry.js} +2 -2
  318. package/dist/core/{p-10cd26dc.entry.js.map → p-7afc71d0.entry.js.map} +1 -1
  319. package/dist/core/{p-69e4daec.entry.js → p-7c0914e7.entry.js} +2 -2
  320. package/dist/core/{p-0d016565.entry.js → p-7dfe0284.entry.js} +2 -2
  321. package/dist/core/p-81a12e36.entry.js +2 -0
  322. package/dist/core/p-81a12e36.entry.js.map +1 -0
  323. package/dist/core/p-88924aef.entry.js +2 -0
  324. package/dist/core/p-88924aef.entry.js.map +1 -0
  325. package/dist/core/p-8ba129fc.entry.js +2 -0
  326. package/dist/core/p-8ba129fc.entry.js.map +1 -0
  327. package/dist/core/{p-85734ebf.entry.js → p-950db960.entry.js} +2 -2
  328. package/dist/core/p-950db960.entry.js.map +1 -0
  329. package/dist/core/{p-44e32417.entry.js → p-959a9cdf.entry.js} +2 -2
  330. package/dist/core/p-9ea9a4ce.entry.js +2 -0
  331. package/dist/core/p-9ea9a4ce.entry.js.map +1 -0
  332. package/dist/core/p-a9c96e3e.entry.js +2 -0
  333. package/dist/core/p-a9c96e3e.entry.js.map +1 -0
  334. package/dist/core/{p-74600ed8.entry.js → p-abaea607.entry.js} +2 -2
  335. package/dist/core/{p-85b7d931.entry.js → p-ac7db165.entry.js} +2 -2
  336. package/dist/core/p-ac7db165.entry.js.map +1 -0
  337. package/dist/core/p-acebb05c.entry.js +2 -0
  338. package/dist/core/p-acebb05c.entry.js.map +1 -0
  339. package/dist/core/{p-37df68fe.entry.js → p-b3ac38c5.entry.js} +2 -2
  340. package/dist/core/{p-17cf7b50.entry.js → p-b3d6d5be.entry.js} +2 -2
  341. package/dist/core/{p-729745d3.entry.js → p-bbe5596b.entry.js} +2 -2
  342. package/dist/core/p-c04f36c5.entry.js +2 -0
  343. package/dist/core/{p-4f2a1950.entry.js → p-c2ca6274.entry.js} +2 -2
  344. package/dist/core/p-c62318a8.entry.js +2 -0
  345. package/dist/core/{p-2537f33e.entry.js.map → p-c62318a8.entry.js.map} +1 -1
  346. package/dist/core/{p-701696aa.entry.js → p-de43d375.entry.js} +2 -2
  347. package/dist/core/{p-2b1a331b.entry.js → p-e2f893f0.entry.js} +2 -2
  348. package/dist/core/{p-d9aec0dd.entry.js → p-e56d0db2.entry.js} +2 -2
  349. package/dist/core/{p-33243fff.entry.js → p-e586ae7b.entry.js} +2 -2
  350. package/dist/core/{p-45595f98.entry.js → p-ef09b450.entry.js} +2 -2
  351. package/dist/core/p-ef09b450.entry.js.map +1 -0
  352. package/dist/core/{p-50f4d151.entry.js → p-f34eee68.entry.js} +2 -2
  353. package/dist/core/{p-8b268274.entry.js → p-f3c72ffb.entry.js} +2 -2
  354. package/dist/core/{p-8856dff4.entry.js → p-f815f8c9.entry.js} +2 -2
  355. package/dist/core/{p-a55e7988.entry.js → p-fbde763c.entry.js} +2 -2
  356. package/dist/core/p-fc50d582.entry.js +2 -0
  357. package/dist/core/p-fc50d582.entry.js.map +1 -0
  358. package/dist/core/{p-78e7a859.entry.js → p-fe833509.entry.js} +2 -2
  359. package/dist/esm/core.js +1 -1
  360. package/dist/esm/{helpers-dd035d0d.js → helpers-46a2d1fd.js} +17 -38
  361. package/dist/esm/helpers-46a2d1fd.js.map +1 -0
  362. package/dist/esm/ic-accordion-group.entry.js +1 -1
  363. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  364. package/dist/esm/ic-accordion.entry.js +1 -1
  365. package/dist/esm/ic-accordion.entry.js.map +1 -1
  366. package/dist/esm/ic-alert.entry.js +63 -36
  367. package/dist/esm/ic-alert.entry.js.map +1 -1
  368. package/dist/esm/ic-back-to-top.entry.js +4 -4
  369. package/dist/esm/ic-badge.entry.js +40 -16
  370. package/dist/esm/ic-badge.entry.js.map +1 -1
  371. package/dist/esm/ic-breadcrumb-group.entry.js +3 -3
  372. package/dist/esm/ic-breadcrumb.entry.js +3 -3
  373. package/dist/esm/ic-button_3.entry.js +32 -7
  374. package/dist/esm/ic-button_3.entry.js.map +1 -1
  375. package/dist/esm/ic-card-vertical.entry.js +6 -6
  376. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  377. package/dist/esm/ic-checkbox-group.entry.js +4 -4
  378. package/dist/esm/ic-checkbox.entry.js +6 -6
  379. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  380. package/dist/esm/ic-chip.entry.js +4 -4
  381. package/dist/esm/ic-classification-banner.entry.js +2 -2
  382. package/dist/esm/ic-data-list.entry.js +2 -2
  383. package/dist/esm/ic-data-row.entry.js +3 -3
  384. package/dist/esm/ic-dialog.entry.js +3 -3
  385. package/dist/esm/ic-dialog.entry.js.map +1 -1
  386. package/dist/esm/ic-divider.entry.js +2 -2
  387. package/dist/esm/ic-divider.entry.js.map +1 -1
  388. package/dist/esm/ic-empty-state.entry.js +3 -3
  389. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  390. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  391. package/dist/esm/ic-footer-link.entry.js +3 -3
  392. package/dist/esm/ic-footer.entry.js +4 -4
  393. package/dist/esm/ic-hero.entry.js +5 -5
  394. package/dist/esm/ic-horizontal-scroll.entry.js +6 -6
  395. package/dist/esm/ic-input-component-container_3.entry.js +9 -9
  396. package/dist/esm/ic-input-label_2.entry.js +8 -8
  397. package/dist/esm/ic-link.entry.js +2 -2
  398. package/dist/esm/ic-menu-group.entry.js +2 -2
  399. package/dist/esm/ic-menu-item.entry.js +1 -1
  400. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  401. package/dist/esm/ic-navigation-button.entry.js +3 -3
  402. package/dist/esm/ic-navigation-group.entry.js +3 -3
  403. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  404. package/dist/esm/ic-navigation-item.entry.js +12 -7
  405. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  406. package/dist/esm/ic-navigation-menu.entry.js +5 -5
  407. package/dist/esm/ic-page-header.entry.js +7 -7
  408. package/dist/esm/ic-pagination-item.entry.js +2 -2
  409. package/dist/esm/ic-pagination.entry.js +5 -5
  410. package/dist/esm/ic-popover-menu.entry.js +5 -5
  411. package/dist/esm/ic-radio-group.entry.js +5 -5
  412. package/dist/esm/ic-radio-option.entry.js +6 -6
  413. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  414. package/dist/esm/ic-search-bar.entry.js +10 -10
  415. package/dist/esm/ic-section-container.entry.js +2 -2
  416. package/dist/esm/ic-select.entry.js +46 -49
  417. package/dist/esm/ic-select.entry.js.map +1 -1
  418. package/dist/esm/ic-side-navigation.entry.js +5 -5
  419. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  420. package/dist/esm/ic-skeleton.entry.js +2 -2
  421. package/dist/esm/ic-skip-link.entry.js +10 -3
  422. package/dist/esm/ic-skip-link.entry.js.map +1 -1
  423. package/dist/esm/ic-status-tag.entry.js +3 -3
  424. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  425. package/dist/esm/ic-step.entry.js +15 -15
  426. package/dist/esm/ic-step.entry.js.map +1 -1
  427. package/dist/esm/ic-stepper.entry.js +3 -3
  428. package/dist/esm/ic-switch.entry.js +5 -5
  429. package/dist/esm/ic-tab-context.entry.js +1 -1
  430. package/dist/esm/ic-tab-group.entry.js +3 -3
  431. package/dist/esm/ic-tab-panel.entry.js +2 -2
  432. package/dist/esm/ic-tab.entry.js +3 -3
  433. package/dist/esm/ic-text-field.entry.js +7 -7
  434. package/dist/esm/ic-theme.entry.js +4 -2
  435. package/dist/esm/ic-theme.entry.js.map +1 -1
  436. package/dist/esm/ic-toast-region.entry.js +1 -1
  437. package/dist/esm/ic-toast.entry.js +4 -4
  438. package/dist/esm/ic-toggle-button-group.entry.js +3 -3
  439. package/dist/esm/ic-toggle-button.entry.js +4 -4
  440. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  441. package/dist/esm/ic-top-navigation.entry.js +5 -5
  442. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  443. package/dist/esm/ic-typography.entry.js +4 -4
  444. package/dist/esm/ic-typography.entry.js.map +1 -1
  445. package/dist/esm/loader.js +1 -1
  446. package/dist/types/components/ic-alert/ic-alert.d.ts +17 -9
  447. package/dist/types/components/ic-badge/ic-badge.d.ts +4 -0
  448. package/dist/types/components/ic-select/ic-select.d.ts +1 -0
  449. package/dist/types/components/ic-skip-link/ic-skip-link.d.ts +5 -0
  450. package/dist/types/components/ic-theme/ic-theme.d.ts +6 -2
  451. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +3 -0
  452. package/dist/types/components.d.ts +20 -11
  453. package/dist/types/utils/helpers.d.ts +5 -1
  454. package/dist/types/utils/types.d.ts +1 -0
  455. package/hydrate/index.js +385 -318
  456. package/hydrate/index.mjs +385 -318
  457. package/package.json +3 -3
  458. package/dist/cjs/helpers-a0a128bd.js.map +0 -1
  459. package/dist/core/p-06d97789.entry.js +0 -2
  460. package/dist/core/p-06d97789.entry.js.map +0 -1
  461. package/dist/core/p-09070f61.entry.js +0 -2
  462. package/dist/core/p-0c0ac69d.entry.js +0 -2
  463. package/dist/core/p-0c0ac69d.entry.js.map +0 -1
  464. package/dist/core/p-0e96d4d8.entry.js.map +0 -1
  465. package/dist/core/p-116ad73d.entry.js +0 -2
  466. package/dist/core/p-116ad73d.entry.js.map +0 -1
  467. package/dist/core/p-1171a945.entry.js +0 -2
  468. package/dist/core/p-1171a945.entry.js.map +0 -1
  469. package/dist/core/p-2537f33e.entry.js +0 -2
  470. package/dist/core/p-264ce7a0.entry.js.map +0 -1
  471. package/dist/core/p-28656111.entry.js +0 -2
  472. package/dist/core/p-28656111.entry.js.map +0 -1
  473. package/dist/core/p-45595f98.entry.js.map +0 -1
  474. package/dist/core/p-4c68494c.entry.js +0 -2
  475. package/dist/core/p-4c68494c.entry.js.map +0 -1
  476. package/dist/core/p-55a37101.entry.js +0 -2
  477. package/dist/core/p-55a37101.entry.js.map +0 -1
  478. package/dist/core/p-5c349c9d.entry.js.map +0 -1
  479. package/dist/core/p-73fc198f.entry.js +0 -2
  480. package/dist/core/p-73fc198f.entry.js.map +0 -1
  481. package/dist/core/p-7eaf8da8.entry.js +0 -2
  482. package/dist/core/p-811d447b.entry.js +0 -2
  483. package/dist/core/p-85734ebf.entry.js.map +0 -1
  484. package/dist/core/p-85b7d931.entry.js.map +0 -1
  485. package/dist/core/p-98328cb9.entry.js +0 -2
  486. package/dist/core/p-98328cb9.entry.js.map +0 -1
  487. package/dist/core/p-a22658fb.entry.js +0 -2
  488. package/dist/core/p-a22658fb.entry.js.map +0 -1
  489. package/dist/core/p-a794b724.entry.js +0 -2
  490. package/dist/core/p-b21b4fea.entry.js +0 -2
  491. package/dist/core/p-b21b4fea.entry.js.map +0 -1
  492. package/dist/core/p-b953b22f.entry.js +0 -2
  493. package/dist/core/p-b953b22f.entry.js.map +0 -1
  494. package/dist/core/p-c9726fbd.entry.js.map +0 -1
  495. package/dist/core/p-d981598e.entry.js +0 -2
  496. package/dist/core/p-d981598e.entry.js.map +0 -1
  497. package/dist/core/p-ed8957da.js.map +0 -1
  498. package/dist/core/p-f3315216.entry.js +0 -2
  499. package/dist/core/p-f3315216.entry.js.map +0 -1
  500. package/dist/core/p-ff995eb8.entry.js +0 -2
  501. package/dist/core/p-ff995eb8.entry.js.map +0 -1
  502. package/dist/esm/helpers-dd035d0d.js.map +0 -1
  503. /package/dist/core/{p-5e1fd097.entry.js.map → p-0a8b3967.entry.js.map} +0 -0
  504. /package/dist/core/{p-f43f411a.entry.js.map → p-0b4350df.entry.js.map} +0 -0
  505. /package/dist/core/{p-f34efc17.entry.js.map → p-1e4cdd2d.entry.js.map} +0 -0
  506. /package/dist/core/{p-a71055c9.entry.js.map → p-23d059ff.entry.js.map} +0 -0
  507. /package/dist/core/{p-071f4748.entry.js.map → p-23ed8b99.entry.js.map} +0 -0
  508. /package/dist/core/{p-49768069.entry.js.map → p-30abe545.entry.js.map} +0 -0
  509. /package/dist/core/{p-1ac08e6d.entry.js.map → p-33c86ba6.entry.js.map} +0 -0
  510. /package/dist/core/{p-a20a7cd3.entry.js.map → p-3b5d3e24.entry.js.map} +0 -0
  511. /package/dist/core/{p-972671ea.entry.js.map → p-3eb7ef1d.entry.js.map} +0 -0
  512. /package/dist/core/{p-110486f0.entry.js.map → p-40f2f58e.entry.js.map} +0 -0
  513. /package/dist/core/{p-fa02a267.entry.js.map → p-4b6818d9.entry.js.map} +0 -0
  514. /package/dist/core/{p-a103068b.entry.js.map → p-5206a978.entry.js.map} +0 -0
  515. /package/dist/core/{p-1f455336.entry.js.map → p-5e18b899.entry.js.map} +0 -0
  516. /package/dist/core/{p-7e79bd0e.entry.js.map → p-6de6b6b7.entry.js.map} +0 -0
  517. /package/dist/core/{p-09070f61.entry.js.map → p-70700c7a.entry.js.map} +0 -0
  518. /package/dist/core/{p-20c4d90b.entry.js.map → p-7a0d238b.entry.js.map} +0 -0
  519. /package/dist/core/{p-69e4daec.entry.js.map → p-7c0914e7.entry.js.map} +0 -0
  520. /package/dist/core/{p-0d016565.entry.js.map → p-7dfe0284.entry.js.map} +0 -0
  521. /package/dist/core/{p-44e32417.entry.js.map → p-959a9cdf.entry.js.map} +0 -0
  522. /package/dist/core/{p-74600ed8.entry.js.map → p-abaea607.entry.js.map} +0 -0
  523. /package/dist/core/{p-37df68fe.entry.js.map → p-b3ac38c5.entry.js.map} +0 -0
  524. /package/dist/core/{p-17cf7b50.entry.js.map → p-b3d6d5be.entry.js.map} +0 -0
  525. /package/dist/core/{p-729745d3.entry.js.map → p-bbe5596b.entry.js.map} +0 -0
  526. /package/dist/core/{p-7eaf8da8.entry.js.map → p-c04f36c5.entry.js.map} +0 -0
  527. /package/dist/core/{p-4f2a1950.entry.js.map → p-c2ca6274.entry.js.map} +0 -0
  528. /package/dist/core/{p-701696aa.entry.js.map → p-de43d375.entry.js.map} +0 -0
  529. /package/dist/core/{p-2b1a331b.entry.js.map → p-e2f893f0.entry.js.map} +0 -0
  530. /package/dist/core/{p-d9aec0dd.entry.js.map → p-e56d0db2.entry.js.map} +0 -0
  531. /package/dist/core/{p-33243fff.entry.js.map → p-e586ae7b.entry.js.map} +0 -0
  532. /package/dist/core/{p-50f4d151.entry.js.map → p-f34eee68.entry.js.map} +0 -0
  533. /package/dist/core/{p-8b268274.entry.js.map → p-f3c72ffb.entry.js.map} +0 -0
  534. /package/dist/core/{p-8856dff4.entry.js.map → p-f815f8c9.entry.js.map} +0 -0
  535. /package/dist/core/{p-a55e7988.entry.js.map → p-fbde763c.entry.js.map} +0 -0
  536. /package/dist/core/{p-78e7a859.entry.js.map → p-fe833509.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ic-tooltip.js","sourceRoot":"","sources":["../../../src/components/ic-tooltip/ic-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,MAAM,EACN,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAqB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAQvE,MAAM,OAAO,OAAO;IALpB;QAOU,sBAAiB,GAAG,CAAC,YAAY,CAAC,CAAC;QACnC,mBAAc,GAAG,KAAK,CAAC;QAEvB,sBAAiB,GAAG,CAAC,UAAU,CAAC,CAAC;QACjC,kBAAa,GAAY,KAAK,CAAC;QAC/B,mBAAc,GAAG,KAAK,CAAC;QAEvB,aAAQ,GAAY,KAAK,CAAC;QAC1B,eAAU,GAAG;YACnB,CAAC,IAAI,CAAC,YAAY,IAAI,YAAY;YAClC,CAAC,IAAI,CAAC,YAAY,IAAI,SAAS;YAC/B,CAAC,IAAI,CAAC,YAAY,IAAI,OAAO;SAC9B,CAAC;QAKF;;WAEG;QACK,iBAAY,GAAa,KAAK,CAAC;QAEvC;;WAEG;QACK,iBAAY,GAAa,KAAK,CAAC;QAOvC;;WAEG;QACsB,cAAS,GAAyB,QAAQ,CAAC;QAEpE;;WAEG;Q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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Host,\n Prop,\n h,\n Method,\n State,\n} from \"@stencil/core\";\nimport { Instance, Options, createPopper } from \"@popperjs/core\";\nimport { IcTooltipPlacements } from \"./ic-tooltip.types\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-tooltip\",\n styleUrl: \"ic-tooltip.css\",\n shadow: true,\n})\nexport class Tooltip {\n private arrow: HTMLDivElement;\n private delayedHideEvents = [\"mouseleave\"];\n private dialogOverflow = false;\n private icDialogEl: HTMLIcDialogElement | null;\n private instantHideEvents = [\"focusout\"];\n private mouseOverTool: boolean = false;\n private persistTooltip = false;\n private popperInstance: Instance;\n private onDialog: boolean = false;\n private showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n private toolTip: HTMLDivElement;\n\n @Element() el: HTMLIcTooltipElement;\n\n /**\n * If `true`, the tooltip will not be displayed on click, it will require hover or using the display method.\n */\n @Prop() disableClick?: boolean = false;\n\n /**\n * If `true`, the tooltip will not be displayed on hover, it will require a click.\n */\n @Prop() disableHover?: boolean = false;\n\n /**\n * The number of lines to display before truncating the text.\n */\n @Prop() maxLines?: number;\n\n /**\n * The position of the tooltip in relation to the parent element.\n */\n @Prop({ mutable: true }) placement?: IcTooltipPlacements = \"bottom\";\n\n /**\n * @internal Sets the tooltip to aria-hidden, when used as part of components that are already announced.\n */\n @Prop() silent?: boolean = false;\n\n /**\n * The ID of the element the tooltip is describing - for when aria-labelledby or aria-describedby is used.\n */\n @Prop({ reflect: true }) target?: string;\n\n /**\n * Sets the tooltip to the dark or light theme colors. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The text to display on the tooltip.\n */\n @Prop() label!: string;\n\n @State() popperProps: Partial<Options> = {};\n\n /**\n * @internal This method allows props to be added to the PopperJS createPopper instance outside of tooltip\n * @param props object - createPopper props set externally\n */\n @Method()\n async setExternalPopperProps<T extends Partial<Options>>(props: T) {\n this.popperProps = props;\n }\n\n disconnectedCallback(): void {\n this.manageEventListeners(\"remove\");\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n }\n\n componentDidLoad(): void {\n this.manageEventListeners(\"add\");\n\n this.icDialogEl = this.el.closest(\"ic-dialog\");\n this.dialogOverflow =\n this.icDialogEl?.getAttribute(\"data-overflow\") === \"true\";\n\n this.onDialog = this.icDialogEl !== null;\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tooltip\"\n );\n }\n\n componentDidRender(): void {\n const typographyEl = this.el.shadowRoot?.querySelector(\n \".ic-tooltip-container > ic-typography\"\n );\n this.maxLines &&\n this.maxLines > 0 &&\n typographyEl?.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.maxLines}`\n );\n }\n /**\n * Method to programmatically show/hide the tooltip without needing to interact with an anchor element\n * @param show Whether to show or hide the tooltip\n * @param persistTooltip Whether the tooltip should stay on the screen when actions are performed that would previously dismiss the tooltip, such as on hover\n */\n @Method()\n async displayTooltip(show: boolean, persistTooltip?: boolean): Promise<void> {\n this.persistTooltip = !!persistTooltip;\n show ? this.show() : this.hide();\n }\n\n /**\n * @internal Method to return if tooltip is currently visible.\n */\n @Method()\n async isTooltipVisible(): Promise<boolean> {\n return Promise.resolve(this.toolTip.hasAttribute(\"data-show\"));\n }\n\n private getTooltipTranslate = (dialogEl: DOMRect) => {\n const child = this.el.children[0].getBoundingClientRect();\n let tooltipX;\n let tooltipY;\n switch (this.placement) {\n case \"bottom\":\n tooltipX = child.left - dialogEl.left - 0.5 * child.width;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"bottom-start\":\n tooltipX = child.left - dialogEl.left;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"bottom-end\":\n tooltipX = child.right - dialogEl.right;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"top\":\n tooltipX = child.left - dialogEl.left - 0.5 * child.width;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"top-start\":\n tooltipX = child.left - dialogEl.left;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"top-end\":\n tooltipX = child.right - dialogEl.right;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"left\":\n case \"left-start\":\n tooltipX = child.right - dialogEl.right - child.width;\n tooltipY = child.bottom - dialogEl.top - child.height;\n break;\n case \"left-end\":\n tooltipX = child.right - dialogEl.right - child.width;\n tooltipY = child.top - dialogEl.bottom + child.height;\n break;\n case \"right\":\n case \"right-start\":\n tooltipX = child.left - dialogEl.left + child.width;\n tooltipY = child.bottom - dialogEl.top - child.height;\n break;\n case \"right-end\":\n tooltipX = child.left - dialogEl.left + child.width;\n tooltipY = child.top - dialogEl.bottom + child.height;\n break;\n }\n if (this.dialogOverflow && tooltipX && tooltipX < 0) {\n if (\n this.placement!.includes(\"top\") ||\n this.placement!.includes(\"bottom\")\n ) {\n this.toolTip.style.setProperty(\n \"--tooltip-arrow-translate\",\n `${tooltipX}px`\n );\n tooltipX = child.left - dialogEl.left;\n }\n if (this.placement!.includes(\"left\")) {\n this.placement = \"right\";\n tooltipX = child.left - dialogEl.left + child.width;\n }\n }\n\n this.toolTip.style.setProperty(\"--tooltip-translate-x\", `${tooltipX}px`);\n this.toolTip.style.setProperty(\"--tooltip-translate-y\", `${tooltipY}px`);\n };\n\n private show = () => {\n if (this.label) {\n this.toolTip.setAttribute(\"data-show\", \"\");\n\n if (this.onDialog) {\n this.el.classList.add(\"on-dialog\");\n const dialogEl = this.icDialogEl?.shadowRoot\n ?.querySelector(\"dialog\")\n ?.getBoundingClientRect();\n\n dialogEl && this.getTooltipTranslate(dialogEl);\n }\n\n this.popperInstance = createPopper(this.el, this.toolTip, {\n placement: this.placement,\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 10],\n },\n },\n {\n name: \"arrow\",\n options: {\n element: this.arrow,\n },\n },\n {\n name: \"eventListeners\",\n options: { scroll: false, resize: false },\n },\n ],\n ...this.popperProps,\n });\n } else {\n console.warn(`Tooltip can't display without prop 'label' set`);\n }\n };\n\n private hide = () => {\n this.toolTip.removeAttribute(\"data-show\");\n this.persistTooltip = false;\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n };\n\n private checkCloseTooltip = () => {\n setTimeout(() => {\n if (!this.mouseOverTool && !this.persistTooltip) {\n this.hide();\n }\n }, 100);\n };\n\n private mouseEnterTooltip = () => {\n this.mouseOverTool = true;\n };\n\n private mouseLeaveTooltip = () => {\n this.mouseOverTool = false;\n this.checkCloseTooltip();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\" && !this.persistTooltip) {\n this.hide();\n }\n };\n\n private manageEventListeners = (action: \"add\" | \"remove\") => {\n const method =\n action === \"add\" ? \"addEventListener\" : \"removeEventListener\";\n\n this.showEvents.forEach((event) => {\n if (event) {\n this.el[method](event, this.show);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseEnterTooltip);\n }\n }\n });\n\n if (!this.persistTooltip) {\n this.instantHideEvents.forEach((event) => {\n this.el[method](event, this.hide);\n });\n }\n\n this.delayedHideEvents.forEach((event) => {\n this.el[method](event, this.checkCloseTooltip);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseLeaveTooltip);\n }\n });\n\n document[method](\"keydown\", this.handleKeyDown as EventListener);\n };\n\n render() {\n const { label, maxLines, silent, theme } = this;\n return (\n <Host\n class={{\n \"ic-tooltip\": true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div\n ref={(el) => (this.toolTip = el as HTMLDivElement)}\n role=\"tooltip\"\n class=\"ic-tooltip-container\"\n aria-hidden={`${silent}`}\n >\n <ic-typography maxLines={maxLines} variant=\"caption\">\n {label}\n </ic-typography>\n <div\n ref={(el) => (this.arrow = el as HTMLDivElement)}\n class=\"ic-tooltip-arrow\"\n ></div>\n </div>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ic-tooltip.js","sourceRoot":"","sources":["../../../src/components/ic-tooltip/ic-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,MAAM,EACN,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAqB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAQvE,MAAM,OAAO,OAAO;IALpB;QAOU,sBAAiB,GAAG,CAAC,YAAY,CAAC,CAAC;QACnC,mBAAc,GAAG,KAAK,CAAC;QAEvB,sBAAiB,GAAG,CAAC,UAAU,CAAC,CAAC;QACjC,kBAAa,GAAY,KAAK,CAAC;QAC/B,mBAAc,GAAG,KAAK,CAAC;QAEvB,aAAQ,GAAY,KAAK,CAAC;QAC1B,eAAU,GAAG;YACnB,CAAC,IAAI,CAAC,YAAY,IAAI,YAAY;YAClC,CAAC,IAAI,CAAC,YAAY,IAAI,SAAS;YAC/B,CAAC,IAAI,CAAC,YAAY,IAAI,OAAO;SAC9B,CAAC;QAKF;;WAEG;QACK,iBAAY,GAAa,KAAK,CAAC;QAUvC;;WAEG;QACK,iBAAY,GAAa,KAAK,CAAC;QAevC;;WAEG;QACsB,cAAS,GAAyB,QAAQ,CAAC;QAEpE;;WAEG;QACK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AE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAChD,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,YAAY,EAAE,IAAI;gBAClB,CAAC,YAAY,KAAK,EAAE,CAAC,EAAE,KAAK,KAAK,SAAS;aAC3C;YAED,4DACE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,EAAoB,CAAC,EAClD,IAAI,EAAC,SAAS,EACd,KAAK,EAAC,sBAAsB,iBACf,GAAG,MAAM,EAAE;gBAExB,sEAAe,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAC,SAAS,IACjD,KAAK,CACQ;gBAChB,4DACE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAoB,CAAC,EAChD,KAAK,EAAC,kBAAkB,GACnB,CACH;YACN,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Host,\n Prop,\n h,\n Method,\n State,\n Watch,\n} from \"@stencil/core\";\nimport { Instance, Options, createPopper } from \"@popperjs/core\";\nimport { IcTooltipPlacements } from \"./ic-tooltip.types\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-tooltip\",\n styleUrl: \"ic-tooltip.css\",\n shadow: true,\n})\nexport class Tooltip {\n private arrow: HTMLDivElement;\n private delayedHideEvents = [\"mouseleave\"];\n private dialogOverflow = false;\n private icDialogEl: HTMLIcDialogElement | null;\n private instantHideEvents = [\"focusout\"];\n private mouseOverTool: boolean = false;\n private persistTooltip = false;\n private popperInstance: Instance;\n private onDialog: boolean = false;\n private showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n private toolTip: HTMLDivElement;\n\n @Element() el: HTMLIcTooltipElement;\n\n /**\n * If `true`, the tooltip will not be displayed on click, it will require hover or using the display method.\n */\n @Prop() disableClick?: boolean = false;\n\n @Watch(\"disableClick\")\n watchDisableClickHandler(): void {\n if (this.disableClick) {\n this.hide();\n }\n this.updateTooltipEvents();\n }\n\n /**\n * If `true`, the tooltip will not be displayed on hover, it will require a click.\n */\n @Prop() disableHover?: boolean = false;\n\n @Watch(\"disableHover\")\n watchDisableHoverHandler(): void {\n if (this.disableHover) {\n this.hide();\n }\n this.updateTooltipEvents();\n }\n\n /**\n * The number of lines to display before truncating the text.\n */\n @Prop() maxLines?: number;\n\n /**\n * The position of the tooltip in relation to the parent element.\n */\n @Prop({ mutable: true }) placement?: IcTooltipPlacements = \"bottom\";\n\n /**\n * @internal Sets the tooltip to aria-hidden, when used as part of components that are already announced.\n */\n @Prop() silent?: boolean = false;\n\n /**\n * The ID of the element the tooltip is describing - for when aria-labelledby or aria-describedby is used.\n */\n @Prop({ reflect: true }) target?: string;\n\n /**\n * Sets the tooltip to the dark or light theme colors. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The text to display on the tooltip.\n */\n @Prop() label!: string;\n\n @State() popperProps: Partial<Options> = {};\n\n /**\n * @internal This method allows props to be added to the PopperJS createPopper instance outside of tooltip\n * @param props object - createPopper props set externally\n */\n @Method()\n async setExternalPopperProps<T extends Partial<Options>>(props: T) {\n this.popperProps = props;\n }\n\n disconnectedCallback(): void {\n this.manageEventListeners(\"remove\");\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n }\n\n componentDidLoad(): void {\n this.manageEventListeners(\"add\");\n\n this.icDialogEl = this.el.closest(\"ic-dialog\");\n this.dialogOverflow =\n this.icDialogEl?.getAttribute(\"data-overflow\") === \"true\";\n\n this.onDialog = this.icDialogEl !== null;\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tooltip\"\n );\n }\n\n componentDidRender(): void {\n const typographyEl = this.el.shadowRoot?.querySelector(\n \".ic-tooltip-container > ic-typography\"\n );\n this.maxLines &&\n this.maxLines > 0 &&\n typographyEl?.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.maxLines}`\n );\n }\n /**\n * Method to programmatically show/hide the tooltip without needing to interact with an anchor element\n * @param show Whether to show or hide the tooltip\n * @param persistTooltip Whether the tooltip should stay on the screen when actions are performed that would previously dismiss the tooltip, such as on hover\n */\n @Method()\n async displayTooltip(show: boolean, persistTooltip?: boolean): Promise<void> {\n this.persistTooltip = !!persistTooltip;\n show ? this.show() : this.hide();\n }\n\n /**\n * @internal Method to return if tooltip is currently visible.\n */\n @Method()\n async isTooltipVisible(): Promise<boolean> {\n return Promise.resolve(this.toolTip.hasAttribute(\"data-show\"));\n }\n\n private getTooltipTranslate = (dialogEl: DOMRect) => {\n const child = this.el.children[0].getBoundingClientRect();\n let tooltipX;\n let tooltipY;\n switch (this.placement) {\n case \"bottom\":\n tooltipX = child.left - dialogEl.left - 0.5 * child.width;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"bottom-start\":\n tooltipX = child.left - dialogEl.left;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"bottom-end\":\n tooltipX = child.right - dialogEl.right;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"top\":\n tooltipX = child.left - dialogEl.left - 0.5 * child.width;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"top-start\":\n tooltipX = child.left - dialogEl.left;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"top-end\":\n tooltipX = child.right - dialogEl.right;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"left\":\n case \"left-start\":\n tooltipX = child.right - dialogEl.right - child.width;\n tooltipY = child.bottom - dialogEl.top - child.height;\n break;\n case \"left-end\":\n tooltipX = child.right - dialogEl.right - child.width;\n tooltipY = child.top - dialogEl.bottom + child.height;\n break;\n case \"right\":\n case \"right-start\":\n tooltipX = child.left - dialogEl.left + child.width;\n tooltipY = child.bottom - dialogEl.top - child.height;\n break;\n case \"right-end\":\n tooltipX = child.left - dialogEl.left + child.width;\n tooltipY = child.top - dialogEl.bottom + child.height;\n break;\n }\n if (this.dialogOverflow && tooltipX && tooltipX < 0) {\n if (\n this.placement!.includes(\"top\") ||\n this.placement!.includes(\"bottom\")\n ) {\n this.toolTip.style.setProperty(\n \"--tooltip-arrow-translate\",\n `${tooltipX}px`\n );\n tooltipX = child.left - dialogEl.left;\n }\n if (this.placement!.includes(\"left\")) {\n this.placement = \"right\";\n tooltipX = child.left - dialogEl.left + child.width;\n }\n }\n\n this.toolTip.style.setProperty(\"--tooltip-translate-x\", `${tooltipX}px`);\n this.toolTip.style.setProperty(\"--tooltip-translate-y\", `${tooltipY}px`);\n };\n\n private show = () => {\n if (this.label) {\n this.toolTip.setAttribute(\"data-show\", \"\");\n\n if (this.onDialog) {\n this.el.classList.add(\"on-dialog\");\n const dialogEl = this.icDialogEl?.shadowRoot\n ?.querySelector(\"dialog\")\n ?.getBoundingClientRect();\n\n dialogEl && this.getTooltipTranslate(dialogEl);\n }\n\n this.popperInstance = createPopper(this.el, this.toolTip, {\n placement: this.placement,\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 10],\n },\n },\n {\n name: \"arrow\",\n options: {\n element: this.arrow,\n },\n },\n {\n name: \"eventListeners\",\n options: { scroll: false, resize: false },\n },\n ],\n ...this.popperProps,\n });\n } else {\n console.warn(`Tooltip can't display without prop 'label' set`);\n }\n };\n\n private hide = () => {\n this.toolTip.removeAttribute(\"data-show\");\n this.persistTooltip = false;\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n };\n\n private checkCloseTooltip = () => {\n setTimeout(() => {\n if (!this.mouseOverTool && !this.persistTooltip) {\n this.hide();\n }\n }, 100);\n };\n\n private mouseEnterTooltip = () => {\n this.mouseOverTool = true;\n };\n\n private mouseLeaveTooltip = () => {\n this.mouseOverTool = false;\n this.checkCloseTooltip();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\" && !this.persistTooltip) {\n this.hide();\n }\n };\n\n private manageEventListeners = (action: \"add\" | \"remove\") => {\n const method =\n action === \"add\" ? \"addEventListener\" : \"removeEventListener\";\n\n this.showEvents.forEach((event) => {\n if (event) {\n this.el[method](event, this.show);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseEnterTooltip);\n }\n }\n });\n\n if (!this.persistTooltip) {\n this.instantHideEvents.forEach((event) => {\n this.el[method](event, this.hide);\n });\n }\n\n this.delayedHideEvents.forEach((event) => {\n this.el[method](event, this.checkCloseTooltip);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseLeaveTooltip);\n }\n });\n\n document[method](\"keydown\", this.handleKeyDown as EventListener);\n };\n\n private updateTooltipEvents = () => {\n this.manageEventListeners(\"remove\");\n this.showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n this.manageEventListeners(\"add\");\n };\n\n render() {\n const { label, maxLines, silent, theme } = this;\n return (\n <Host\n class={{\n \"ic-tooltip\": true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div\n ref={(el) => (this.toolTip = el as HTMLDivElement)}\n role=\"tooltip\"\n class=\"ic-tooltip-container\"\n aria-hidden={`${silent}`}\n >\n <ic-typography maxLines={maxLines} variant=\"caption\">\n {label}\n </ic-typography>\n <div\n ref={(el) => (this.arrow = el as HTMLDivElement)}\n class=\"ic-tooltip-arrow\"\n ></div>\n </div>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -448,7 +448,6 @@ video {
448
448
  position: relative;
449
449
 
450
450
  --ic-typography-color: var(--ic-top-navigation-text);
451
-
452
451
  --ic-button-secondary-text-monochrome: var(--ic-brand-text-color);
453
452
  --ic-button-secondary-border-monochrome: var(--ic-brand-text-color);
454
453
  --navigation-link-colour: var(--ic-top-navigation-text);
@@ -456,6 +455,7 @@ video {
456
455
 
457
456
  :host(.dark) {
458
457
  color: var(--ic-color-text-primary-light);
458
+
459
459
  --ic-typography-color: var(--ic-color-text-primary-light);
460
460
  --ic-top-navigation-logo: var(--ic-color-icon-neutral);
461
461
  --ic-top-navigation-icon: var(--ic-color-icon-neutral);
@@ -585,7 +585,9 @@ video {
585
585
  border-radius: var(--ic-space-md);
586
586
  background-color: var(--ic-top-navigation-status-tag);
587
587
  color: var(--ic-top-navigation-status-tag-text);
588
+
588
589
  --ic-typography-color: var(--ic-top-navigation-status-tag-text);
590
+
589
591
  padding: var(--ic-space-xxs) var(--ic-space-lg);
590
592
  margin-left: var(--ic-space-md);
591
593
  flex: 1 1 0;
@@ -203,16 +203,16 @@ export class TopNavigation {
203
203
  const attrs = Component == "a" && {
204
204
  href: href,
205
205
  };
206
- return (h(Host, { key: '5ca49354d8e2344b7d2cfa2089494ca2c4521b84', class: {
206
+ return (h(Host, { key: '5c5bfc3ad297f7bd59b148652ccc478b896b6008', class: {
207
207
  "fullwidth-searchbar": hasFullWidthSearchBar,
208
208
  "mobile-mode": overMobileBreakpoint,
209
209
  [IcBrandForegroundEnum.Dark]: foregroundColor === IcBrandForegroundEnum.Dark,
210
210
  [`ic-theme-${theme}`]: theme !== "inherit",
211
- } }, h("div", { key: '3447c99cc05b7203ea80d0651f1ac066122697e1', class: "top-navigation" }, h("ic-section-container", { key: '563a2b3fc3c7d456fee7261c2d5645948301e953', aligned: contentAligned, "full-height": true }, h("header", { key: '61d58c8a68ff59cfa1b5cf75daef6c62b2b4692a', role: "banner" }, h("div", { key: '17108bd26152301bf07afe95a061debb23184e8b', class: "top-panel-container" }, h("div", { key: '86fe01bd6227bc0a1e1633cab7d6cff654e2a808', class: "app-details-container" }, (hasTitle || hasAppTitleSlot) && (h(Component, Object.assign({ key: 'c6f2a1ed6ce7b7813f12352401c89852d6646327', class: "title-link" }, attrs), hasAppIcon && (h("div", { key: 'c5a2e2961b16b5f5dc6e918ba6f758e7bce09cd7', class: "app-icon-container" }, h("slot", { key: '9b6d5636aa1f474bac2add8948bcd598f3d5c231', name: "app-icon" }))), deviceSize <= DEVICE_SIZES.S &&
211
+ } }, h("div", { key: '7b20f493f5738050c11ad8447113b7322f46c3c4', class: "top-navigation" }, h("ic-section-container", { key: 'abce0c4c81da4ed68094058d623e8ed954224fa0', aligned: contentAligned, "full-height": true }, h("header", { key: '30860fda7f50065dd28399e6630836a6ca66f9fa', role: "banner" }, h("div", { key: '6341b2155fc652ae76ea2266612fa56add3b2a87', class: "top-panel-container" }, h("div", { key: '70b84e9110139cdc1bccdc5fc79c60983966e7e2', class: "app-details-container" }, (hasTitle || hasAppTitleSlot) && (h(Component, Object.assign({ key: 'b54b79365cfd322a778aa1de952eda4daee04520', class: "title-link" }, attrs), hasAppIcon && (h("div", { key: 'a390fa98b041b07a02a33cb787a0902ed369effa', class: "app-icon-container" }, h("slot", { key: 'c33e9295f6d196d8823b59f4def9779dbf8be3d9', name: "app-icon" }))), deviceSize <= DEVICE_SIZES.S &&
212
212
  (!isEmptyString(shortAppTitle) || shortAppTitleSlot) ? (h("ic-typography", { variant: "subtitle-small", "aria-label": (!hasAppTitleSlot || !shortAppTitleSlot) &&
213
- `${appTitle} (${shortAppTitle})` }, h("h1", null, shortAppTitleSlot ? (h("slot", { name: "short-app-title" })) : (shortAppTitle)))) : (h("ic-typography", { variant: appTitleVariant }, h("h1", { class: "title-wrap" }, hasAppTitleSlot ? (h("slot", { name: "app-title" })) : (appTitle)))))), hasStatus && (h("div", { key: 'f4365e21d3de5cc7c0f7c6f62a64c3fa0a7415bb', class: "app-status" }, h("ic-typography", { key: '9d03f72e0533c1d721142cba78ba216c9abf61c5', "aria-label": "app tag", variant: "label-uppercase", class: "app-status-text" }, status))), hasVersion && (h("div", { key: '318b6cf7cd4359429a6d698d40e3b99f46ac67e0', class: "app-version" }, h("ic-typography", { key: '67cc4163765fb967729ba4fa03e857c1b0cc96e3', variant: "label", class: "app-version-text", "aria-label": "app version" }, version)))), (hasSearchSlotContent || hasMenuContent) && (h("div", { key: '0f8ce1b2c3a0cf3f3bbbe2d0285324935e5b1676', class: "search-menu-container" }, h("div", { key: 'a4033e992457aa434c705d0e35d24c9efb291195', class: "search-actions-container" }, !overMobileBreakpoint && h("slot", { key: 'd9347964c2972b338c4e09833ab94f820d8b49c8', name: "search" }), hasSearchSlotContent && overMobileBreakpoint && (h("ic-button", { key: 'b980ecf6adf49457b2477865c98aac4e95ea4d8a', id: "search-toggle-button", ref: (el) => (this.mobileSearchButtonEl = el), onMouseDown: searchButtonMouseDownHandler, variant: "icon-tertiary", monochrome: true, size: searchButtonSize, "aria-label": mobileSearchButtonTitle, theme: foregroundColor, onClick: searchButtonClickHandler }, h("slot", { key: '1488d2319238d970a190b867db0ccc85c026a94f', name: "toggle-icon" }, h("svg", { key: '67e8c1448faf4b9a78098bb8809c8d75135e7671', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#ffffff" }, h("path", { key: '2f04deb0ec8098168de56fab593d0e1b9d37639a', d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { key: '797b58f8ad7489b4cd149ae46b32ecce0c9a85cf', d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" }))))), hasIconButtons && !overMobileBreakpoint && (h("div", { key: '173e7158dc1c4667be9442b7f64be140faebb102', class: "icon-buttons-container" }, h("slot", { key: 'afa131f570550779b8c52403c0f8abf90ba68369', name: "buttons" }))), hasMenuContent && overMobileBreakpoint && (h("div", { key: 'ca353958a7b441eeb82ecab62b3f0ba1de625fcc', class: "menu-button-container" }, h("span", { key: 'b13a1b5ba472b65d150a194bd7f2fb846d434b8b', id: "navigation-landmark-button-text", class: "navigation-landmark-button-text", "aria-hidden": "true" }, "Main navigation button"), h("nav", { key: '8c47f744b6aaa53afe14a09f78f8e231d7e5137b', "aria-labelledby": "navigation-landmark-button-text", "aria-hidden": `${navMenuVisible}` }, h("ic-button", { key: '4365bba111555335f4a04fb168d9e4659e0ca788', id: "menu-button", theme: foregroundColor, variant: "secondary", monochrome: true, "aria-expanded": "false", "aria-haspopup": "true", "aria-label": `Open ${hasNavigation ? "navigation" : "app"} menu`, size: menuSize, onClick: menuButtonClick }, "Menu", h("svg", { key: '05366f4016a367fd4ae143e044eb7401f2a23bbb', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#ffffff", slot: "left-icon" }, h("path", { key: '40f079a4c147f2adfb5bbfe1b8bfeef64e444abe', d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { key: '0419ea11aee74c5993643dde955ca7ccbd836ad6', d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" })))))))))), mobileSearchBarVisible && (h("div", { key: '160ea58b8338c6b09482bb5808afa93de039c2b4', class: "search-bar-container" }, h("slot", { key: 'a415f0c6a409b4dbea14697c8c63967ee4c05dcc', name: "search" }))), hasNavigation && !overMobileBreakpoint && (h("div", { key: 'db58d987843728204f3c08ffcc730bc9400c5f75', class: "navigation-tabs" }, h("span", { key: 'c27c1d0868d4acf6385e7b39060d42d04b617e28', id: "navigation-landmark-text", class: "navigation-landmark-text", "aria-hidden": "true" }, "Main pages"), h("nav", { key: 'a9d72cda63f8f15b2c5df447a6f544cf9637286a', "aria-labelledby": "navigation-landmark-text", class: "nav-panel-container" }, h("ic-horizontal-scroll", { key: '717a0f8855c98de7c688467b6e08acaf59a50f15', monochrome: true, appearance: foregroundColor }, h("ul", { key: '6e0a057b908929ceca9e5b6113590b7a596fe091', class: "navigation-item-list", tabindex: "-1" }, h("slot", { key: '401932642750d3d4cece6a886a1e6c4316c218c8', name: "navigation" }))))))))), navMenuVisible && (h("ic-navigation-menu", { key: '0816b74f63c67e9d6869cabeb7a45651ca0eb139', version: version, status: status, class: {
213
+ `${appTitle} (${shortAppTitle})` }, h("h1", null, shortAppTitleSlot ? (h("slot", { name: "short-app-title" })) : (shortAppTitle)))) : (h("ic-typography", { variant: appTitleVariant }, h("h1", { class: "title-wrap" }, hasAppTitleSlot ? (h("slot", { name: "app-title" })) : (appTitle)))))), hasStatus && (h("div", { key: 'f240cb39a4c6456695745f676d263fd5fc7c5b8c', class: "app-status" }, h("ic-typography", { key: 'f8ae131fb476805ec7e1cfe88c4fba9c7a436c10', "aria-label": "app tag", variant: "label-uppercase", class: "app-status-text" }, status))), hasVersion && (h("div", { key: '1cdf5652e0b56c70162a884f45e648fce2093ea5', class: "app-version" }, h("ic-typography", { key: '2444bbf26e72433f1bd1cd4c3986de8cadea85b6', variant: "label", class: "app-version-text", "aria-label": "app version" }, version)))), (hasSearchSlotContent || hasMenuContent) && (h("div", { key: '54fac6a943b3701376fc3f7a308f2b6c586aa636', class: "search-menu-container" }, h("div", { key: '5ef5f824b967f0b7f8802d2fdbd77056ae8f1129', class: "search-actions-container" }, !overMobileBreakpoint && h("slot", { key: '16551964dd909010294a0e6a59763f95a5d0f728', name: "search" }), hasSearchSlotContent && overMobileBreakpoint && (h("ic-button", { key: 'c8a339bdb6389bd43e973c20707a13f7fa0a4e1e', id: "search-toggle-button", ref: (el) => (this.mobileSearchButtonEl = el), onMouseDown: searchButtonMouseDownHandler, variant: "icon-tertiary", monochrome: true, size: searchButtonSize, "aria-label": mobileSearchButtonTitle, theme: foregroundColor, onClick: searchButtonClickHandler }, h("slot", { key: '66f8326868c0cb23cd989df5de784f2eb2630319', name: "toggle-icon" }, h("svg", { key: '2c4e0354d201371de737a0d3c72455e543b3205a', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#ffffff" }, h("path", { key: 'e1adbe066080455b1b801c711b025318dab908eb', d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { key: 'dadeb94826ed263b91566b46cc753748351db453', d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" }))))), hasIconButtons && !overMobileBreakpoint && (h("div", { key: '36eedc891ad8653ffa1a812306e60f76c8e82ed8', class: "icon-buttons-container" }, h("slot", { key: '1061472fc71131df7541a0654e4096ff39ad5e3d', name: "buttons" }))), hasMenuContent && overMobileBreakpoint && (h("div", { key: '1b7503905b2528ca36e3f57b58c9e08958e1ab60', class: "menu-button-container" }, h("span", { key: '93d4150b9660243082f5d1ebb40fe33450d7785b', id: "navigation-landmark-button-text", class: "navigation-landmark-button-text", "aria-hidden": "true" }, "Main navigation button"), h("nav", { key: 'a356ce42d0d4865dfce33a49d768c73dcd824e3c', "aria-labelledby": "navigation-landmark-button-text", "aria-hidden": `${navMenuVisible}` }, h("ic-button", { key: 'd2f0fe6637e181fcfd2dbb5c33de93cdd2a1fb32', id: "menu-button", theme: foregroundColor, variant: "secondary", monochrome: true, "aria-expanded": "false", "aria-haspopup": "true", "aria-label": `Open ${hasNavigation ? "navigation" : "app"} menu`, size: menuSize, onClick: menuButtonClick }, "Menu", h("svg", { key: 'cd8e405c4cd82075ec2f8b192f01a5f268ffd520', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#ffffff", slot: "left-icon" }, h("path", { key: '1a91d6099a80507845ae6165931b457dcc416d6a', d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { key: '87dc16c578d8c379a00766769dd0959a70855166', d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" })))))))))), mobileSearchBarVisible && (h("div", { key: '088982083ccb21a658b8ba378e532f280d6d563a', class: "search-bar-container" }, h("slot", { key: 'ad3e3c4c632d3e5431bcf6ebe954c45d3c7e6233', name: "search" }))), hasNavigation && !overMobileBreakpoint && (h("div", { key: '6aeb6f3e8bb5d1474c2c7ede10c49d44cec31545', class: "navigation-tabs" }, h("span", { key: '8a965acd6056d216c9da63173012250fa72be222', id: "navigation-landmark-text", class: "navigation-landmark-text", "aria-hidden": "true" }, "Main pages"), h("nav", { key: '7b36045fbc1efc8d0f471a67cb8bccb6cdb7ca62', "aria-labelledby": "navigation-landmark-text", class: "nav-panel-container" }, h("ic-horizontal-scroll", { key: 'ac328ac5ddd86614f3d727ddc236cbf6dee019b9', monochrome: true, appearance: foregroundColor }, h("ul", { key: '7324ed8f489a813b706e18e7db14d8f8201ee4fe', class: "navigation-item-list", tabindex: "-1" }, h("slot", { key: '7266abcda953294233cc4c4525ba5c47f61a95bb', name: "navigation" }))))))))), navMenuVisible && (h("ic-navigation-menu", { key: '0fff5404ab1ec895f011dc1643d0d2b51b5eac33', version: version, status: status, class: {
214
214
  ["inline"]: !!inline,
215
- } }, hasIconButtons && (h("div", { key: '2bf599f25216d608a72e9e3b8537983419ad6a27', class: "menu-buttons-slot", slot: "buttons" }, h("slot", { key: '3483da6f4815d9f37d25ee021622c00c5a64af79', name: "buttons" }))), h("ul", { key: '92b83221e6e974101b0f1186fcae040a070e248f', slot: "navigation" }, h("slot", { key: 'f3f64918abe306948d0709cfac63abde69a61eae', name: "navigation" }))))));
215
+ } }, hasIconButtons && (h("div", { key: 'a7b45891338fb80858cead62559e1de75505ec96', class: "menu-buttons-slot", slot: "buttons" }, h("slot", { key: '09d6e44a68a6368ae5388a6101aedd75fcbecb2a', name: "buttons" }))), h("ul", { key: 'ff2e7168dacb64ede053528ce21c1211de506fd7', slot: "navigation" }, h("slot", { key: '218681289b2170fd04553d1e4b8da7f1ae72b448', name: "navigation" }))))));
216
216
  }
217
217
  static get is() { return "ic-top-navigation"; }
218
218
  static get encapsulation() { return "shadow"; }
@@ -650,9 +650,9 @@ video {
650
650
  }
651
651
  }
652
652
 
653
- @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {
653
+ @media (prefers-color-scheme: dark) and (forced-colors: none) {
654
654
  :host,
655
- .trunc-btn::not(ic-tooltip) {
655
+ .trunc-btn:not(ic-tooltip) {
656
656
  color: var(--ic-typography-color);
657
657
  }
658
658
  }
@@ -163,7 +163,7 @@ export class Typography {
163
163
  render() {
164
164
  var _a, _b;
165
165
  const { variant, applyVerticalMargins, maxLines, truncated, expanded, strikethrough, underline, italic, bold, theme, } = this;
166
- return (h(Host, { key: 'ee6df08007125834627adfc7ed7324401aa47fe5', class: {
166
+ return (h(Host, { key: '0f64ad9e02b32790b2bc269df212468b2f9426f7', class: {
167
167
  [`ic-typography-${variant}`]: true,
168
168
  [`ic-typography-vertical-margins-${variant}`]: !!applyVerticalMargins,
169
169
  ["ic-typography-bold"]: !!bold,
@@ -176,7 +176,7 @@ export class Typography {
176
176
  ((_b = (_a = this.el.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.tagName) ===
177
177
  "IC-TOOLTIP") &&
178
178
  maxLines &&
179
- maxLines > 0 ? (h("div", { class: "trunc-wrapper", ref: (el) => (this.truncWrapperEl = el) }, h("slot", null))) : (h("slot", null)), variant === "body" && maxLines && maxLines > 0 && truncated && (h("button", { key: '486e675e7a7472d51c2d344575b7a603e2239a21', class: { "trunc-btn": true, focus: this.truncButtonFocussed }, onFocus: this.truncButtonFocus, onBlur: this.truncButtonBlur, onMouseDown: this.truncButtonFocusFromMouse, onClick: this.toggleExpanded }, expanded ? "See less" : "See more"))));
179
+ maxLines > 0 ? (h("div", { class: "trunc-wrapper", ref: (el) => (this.truncWrapperEl = el) }, h("slot", null))) : (h("slot", null)), variant === "body" && maxLines && maxLines > 0 && truncated && (h("button", { key: '3e5f7e8b549122986d1dc67fe35b5e270233eb71', class: { "trunc-btn": true, focus: this.truncButtonFocussed }, onFocus: this.truncButtonFocus, onBlur: this.truncButtonBlur, onMouseDown: this.truncButtonFocusFromMouse, onClick: this.toggleExpanded }, expanded ? "See less" : "See more"))));
180
180
  }
181
181
  static get is() { return "ic-typography"; }
182
182
  static get encapsulation() { return "shadow"; }
@@ -307,32 +307,20 @@ export const getBrandColorBrightness = () => {
307
307
  export const getBrandForegroundAppearance = (brightness = getBrandColorBrightness()) => brightness > DARK_MODE_THRESHOLD
308
308
  ? IcBrandForegroundEnum.Dark
309
309
  : IcBrandForegroundEnum.Light;
310
- export const getSlot = (element, name) => {
311
- if (element && element.querySelector) {
312
- return element.querySelector(`[slot="${name}"]`);
313
- }
314
- return null;
315
- };
310
+ export const getSlot = (element, name) => (element === null || element === void 0 ? void 0 : element.querySelector(`[slot="${name}"]`)) || null;
316
311
  export const slotHasContent = (element, name) => getSlot(element, name) !== null;
317
312
  export const getSlotContent = (element, name) => {
318
313
  const slot = getSlot(element, name);
319
- if (slot) {
320
- return getSlotElements(slot);
321
- }
322
- return null;
314
+ return slot ? getSlotElements(slot) : null;
323
315
  };
324
316
  export const getSlotElements = (slot) => {
325
317
  const slotContent = slot.firstElementChild;
326
- if (slotContent !== null) {
327
- const elements = slotContent.assignedElements
328
- ? slotContent.assignedElements()
329
- : slotContent.childNodes;
330
- return elements.length ? elements : slot.tagName ? [slot] : null;
331
- }
332
- else {
333
- //check for single element
334
- return slot === null ? null : [slot];
335
- }
318
+ if (slotContent === null)
319
+ return [slot];
320
+ const elements = slotContent.assignedElements
321
+ ? slotContent.assignedElements()
322
+ : slotContent.childNodes;
323
+ return elements.length ? elements : slot.tagName ? [slot] : null;
336
324
  };
337
325
  export const getNavItemParentDetails = ({ parentElement, }) => {
338
326
  let navType = { navType: "", parent: null };
@@ -456,11 +444,9 @@ export async function waitForHydration() {
456
444
  }
457
445
  export const convertToRGBA = (color) => {
458
446
  const firstChar = color === null || color === void 0 ? void 0 : color.slice(0, 1).toLowerCase();
459
- return firstChar === "#"
460
- ? hexToRgba(color)
461
- : firstChar === "r"
462
- ? rgbaStrToObj(color)
463
- : null;
447
+ if (firstChar !== "#" && firstChar !== "r")
448
+ return null;
449
+ return firstChar === "#" ? hexToRgba(color) : rgbaStrToObj(color);
464
450
  };
465
451
  export const capitalize = (text) => text.charAt(0).toUpperCase() + text.slice(1);
466
452
  export const checkSlotInChildMutations = (addedNodes, removedNodes, slotName) => {
@@ -470,20 +456,13 @@ export const checkSlotInChildMutations = (addedNodes, removedNodes, slotName) =>
470
456
  return hasSlot(addedNodes) || hasSlot(removedNodes);
471
457
  };
472
458
  export const isElInAGGrid = (el) => !!el.closest(".ag-cell") && !!el.closest(".ag-root");
473
- /*
459
+ /**
474
460
  * Checks if the component is slotted in its relevant 'group' component
475
461
  * @param component - the component to check
476
462
  */
477
- export const isSlottedInGroup = (component) => {
478
- var _a;
479
- const parent = (component === null || component === void 0 ? void 0 : component.tagName) + "-GROUP";
480
- return ((_a = component === null || component === void 0 ? void 0 : component.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) === parent;
481
- };
482
- export const hasDynamicChildSlots = (mutationList, slotNames) => {
483
- return mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
484
- ? checkSlotInChildMutations(addedNodes, removedNodes, slotNames)
485
- : false);
486
- };
463
+ export const isSlottedInGroup = (component) => { var _a; return ((_a = component.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) === `${component.tagName}-GROUP`; };
464
+ export const hasDynamicChildSlots = (mutationList, slotNames) => mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList" &&
465
+ checkSlotInChildMutations(addedNodes, removedNodes, slotNames));
487
466
  export const renderDynamicChildSlots = (mutationList, slotNames, ref) => {
488
467
  if (hasDynamicChildSlots(mutationList, slotNames)) {
489
468
  forceUpdate(ref);
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAa1D,OAAO,EAGL,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AAErB,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AACrC,MAAM,wBAAwB,GAAG,UAAU,CAAC;AAC5C,MAAM,OAAO,GAAG,UAAU,CAAC;AAC3B,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,OAAwC,EAC9B,EAAE;IACZ,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACrC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACvB,MAAM,GAAG,GAAG,GAAa,CAAC;YAC1B,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,OAAoB,EACpB,aAAuB,EAAE,EACE,EAAE;IAC7B,MAAM,eAAe,GAA8B,EAAE,CAAC;IAEtD,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1B,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;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,CAAC;IAC7C,OAAO,CAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,aAAa,0CAAE,OAAO,MAAK,MAAM,CAAC;AACtD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,YAA8B,EAC9B,SAA4B,EAC5B,EAAE;IACF,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,EAAE,CAC9D,IAAI,KAAK,WAAW;QAClB,CAAC,CAAC,yBAAyB,CAAC,UAAU,EAAE,YAAY,EAAE,SAAS,CAAC;QAChE,CAAC,CAAC,KAAK,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,YAA8B,EAC9B,SAA4B,EAC5B,GAAQ,EACF,EAAE;IACR,IAAI,oBAAoB,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE,CAAC;QAClD,WAAW,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { EventEmitter, forceUpdate } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n IcDeviceSizes,\n IcColor,\n IcBrandForegroundNoDefault,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcBrandForeground,\n IcBrandForegroundEnum,\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;\nconst ANYWHERE_SEARCH_POSITION = \"anywhere\";\nconst icInput = \"ic-input\";\nconst linkIcInput = \"input.ic-input\";\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\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]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\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 | Date | undefined | null,\n disabled: boolean | undefined\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(linkIcInput);\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(icInput);\n container.appendChild(input);\n }\n input.disabled = !!disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : \"\";\n } else {\n input.value = value || \"\";\n }\n }\n};\n\n/**\n * This method is used to add a hidden file 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 event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\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 * @param accept A string of the accepted files\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n name: string,\n value: FileList | undefined | null,\n disabled: boolean,\n accept: string | undefined | null\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n const inputs = container.querySelectorAll(linkIcInput);\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.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.disabled = disabled;\n\n if (value) input.files = value;\n if (accept) input.accept = accept;\n\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\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 | null | undefined): boolean =>\n el ? !!el.shadowRoot && !!el.attachShadow : false;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\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 IcBrandForeground depending on the context\n */\nexport const getBrandFromContext = (\n el: Element,\n brandFromEvent: IcBrandForeground | null = null\n): IcBrandForeground => {\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) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcBrandForegroundEnum.Default;\n } else if (\n brandFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return brandFromEvent;\n } else if (\n blockColorParent.classList.contains(\n `${parentTag}-${IcBrandForegroundEnum.Dark}`\n ) ||\n blockColorParent.classList.contains(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n }\n\n return IcBrandForegroundEnum.Light;\n }\n\n return IcBrandForegroundEnum.Default;\n};\n\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n : false;\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 button.type && 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 value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string | undefined): string | undefined =>\n prop !== undefined ? prop : undefined;\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 valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\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 const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\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 = ANYWHERE_SEARCH_POSITION,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === ANYWHERE_SEARCH_POSITION\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\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 getComputedStyle(document.documentElement).getPropertyValue(cssVar);\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-brand-text-color\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getBrandColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-brand-color-primary-r\");\n const themeGreen = getCssProperty(\"--ic-brand-color-primary-g\");\n const themeBlue = getCssProperty(\"--ic-brand-color-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getBrandColorBrightness`\n */\nexport const getBrandForegroundAppearance = (\n brightness = getBrandColorBrightness()\n): IcBrandForegroundNoDefault =>\n brightness > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (\n element: HTMLElement | undefined,\n name: string\n): 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 = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] | null => {\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 : slot.tagName ? [slot] : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = ({\n parentElement,\n}: HTMLElement): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n if (parentElement) {\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n }\n\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(\n getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 0\n S: Number(\n getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 576\n M: Number(\n getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 768\n L: Number(\n getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 992\n XL: Number(\n getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status?: IcInformationStatusOrEmpty,\n disabled?: boolean\n): boolean => !!status && !disabled;\n\nexport const isSlotUsed = (\n { children }: HTMLElement,\n slotName: string\n): boolean =>\n Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\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 props.forEach(({ prop, propName }) => {\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\n .toLowerCase()\n .split(\"-\")\n .map((word, index) =>\n index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`\n )\n .join(\"\");\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 = (v: string) => parseInt(v, 16);\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\n\nexport const elementOverflowsX = ({\n scrollWidth,\n clientWidth,\n}: HTMLElement): boolean => scrollWidth > clientWidth;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.addEventListener(\"reset\", callbackFn);\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.removeEventListener(\"reset\", callbackFn);\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\n/**\n * Removes the disabled attribute from the provided element when its value is set to false.\n * This effectively makes it null, to not confuse screen readers that cannot interpret the false value\n */\nexport const removeDisabledFalse = (\n disabled: boolean | undefined,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean =>\n window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n\nexport const isNumeric = (value: string): boolean => /^-?\\d+$/.test(value);\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const convertToRGBA = (color: IcColor): IcColorRGBA | null => {\n const firstChar = color?.slice(0, 1).toLowerCase();\n return firstChar === \"#\"\n ? hexToRgba(color)\n : firstChar === \"r\"\n ? rgbaStrToObj(color)\n : null;\n};\n\nexport const capitalize = (text: string): string =>\n text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string | string[]\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) =>\n Array.isArray(slotName)\n ? slotName.some((name) => (node as Element).slot === name)\n : (node as Element).slot === slotName\n );\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const isElInAGGrid = (el: HTMLElement): boolean =>\n !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n\n/*\n * Checks if the component is slotted in its relevant 'group' component\n * @param component - the component to check\n */\nexport const isSlottedInGroup = (component: any): boolean => {\n const parent = component?.tagName + \"-GROUP\";\n return component?.parentElement?.tagName === parent;\n};\n\nexport const hasDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[]\n) => {\n return mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, slotNames)\n : false\n );\n};\n\nexport const renderDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[],\n ref: any\n): void => {\n if (hasDynamicChildSlots(mutationList, slotNames)) {\n forceUpdate(ref);\n }\n};\n"]}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","s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Q,EACF,EAAE;IACR,IAAI,oBAAoB,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE,CAAC;QAClD,WAAW,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { EventEmitter, forceUpdate } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n IcDeviceSizes,\n IcColor,\n IcBrandForegroundNoDefault,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcBrandForeground,\n IcBrandForegroundEnum,\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;\nconst ANYWHERE_SEARCH_POSITION = \"anywhere\";\nconst icInput = \"ic-input\";\nconst linkIcInput = \"input.ic-input\";\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\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]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\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 | Date | undefined | null,\n disabled: boolean | undefined\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(linkIcInput);\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(icInput);\n container.appendChild(input);\n }\n input.disabled = !!disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : \"\";\n } else {\n input.value = value || \"\";\n }\n }\n};\n\n/**\n * This method is used to add a hidden file 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 event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\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 * @param accept A string of the accepted files\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n name: string,\n value: FileList | undefined | null,\n disabled: boolean,\n accept: string | undefined | null\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n const inputs = container.querySelectorAll(linkIcInput);\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.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.disabled = disabled;\n\n if (value) input.files = value;\n if (accept) input.accept = accept;\n\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\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 | null | undefined): boolean =>\n el ? !!el.shadowRoot && !!el.attachShadow : false;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\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 IcBrandForeground depending on the context\n */\nexport const getBrandFromContext = (\n el: Element,\n brandFromEvent: IcBrandForeground | null = null\n): IcBrandForeground => {\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) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcBrandForegroundEnum.Default;\n } else if (\n brandFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return brandFromEvent;\n } else if (\n blockColorParent.classList.contains(\n `${parentTag}-${IcBrandForegroundEnum.Dark}`\n ) ||\n blockColorParent.classList.contains(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n }\n\n return IcBrandForegroundEnum.Light;\n }\n\n return IcBrandForegroundEnum.Default;\n};\n\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n : false;\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 button.type && 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 value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string | undefined): string | undefined =>\n prop !== undefined ? prop : undefined;\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 valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\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 const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\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 = ANYWHERE_SEARCH_POSITION,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === ANYWHERE_SEARCH_POSITION\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\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 getComputedStyle(document.documentElement).getPropertyValue(cssVar);\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-brand-text-color\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getBrandColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-brand-color-primary-r\");\n const themeGreen = getCssProperty(\"--ic-brand-color-primary-g\");\n const themeBlue = getCssProperty(\"--ic-brand-color-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getBrandColorBrightness`\n */\nexport const getBrandForegroundAppearance = (\n brightness = getBrandColorBrightness()\n): IcBrandForegroundNoDefault =>\n brightness > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (\n element: HTMLElement | undefined,\n name: string\n): Element | null => element?.querySelector(`[slot=\"${name}\"]`) || null;\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 return slot ? getSlotElements(slot) : null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] | null => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent === null) return [slot];\n\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n};\n\nexport const getNavItemParentDetails = ({\n parentElement,\n}: HTMLElement): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n if (parentElement) {\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n }\n\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(\n getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 0\n S: Number(\n getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 576\n M: Number(\n getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 768\n L: Number(\n getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 992\n XL: Number(\n getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status?: IcInformationStatusOrEmpty,\n disabled?: boolean\n): boolean => !!status && !disabled;\n\nexport const isSlotUsed = (\n { children }: HTMLElement,\n slotName: string\n): boolean =>\n Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\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 props.forEach(({ prop, propName }) => {\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\n .toLowerCase()\n .split(\"-\")\n .map((word, index) =>\n index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`\n )\n .join(\"\");\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 = (v: string) => parseInt(v, 16);\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\n\nexport const elementOverflowsX = ({\n scrollWidth,\n clientWidth,\n}: HTMLElement): boolean => scrollWidth > clientWidth;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.addEventListener(\"reset\", callbackFn);\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.removeEventListener(\"reset\", callbackFn);\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\n/**\n * Removes the disabled attribute from the provided element when its value is set to false.\n * This effectively makes it null, to not confuse screen readers that cannot interpret the false value\n */\nexport const removeDisabledFalse = (\n disabled: boolean | undefined,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean =>\n window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n\nexport const isNumeric = (value: string): boolean => /^-?\\d+$/.test(value);\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const convertToRGBA = (color: IcColor): IcColorRGBA | null => {\n const firstChar = color?.slice(0, 1).toLowerCase();\n\n if (firstChar !== \"#\" && firstChar !== \"r\") return null;\n return firstChar === \"#\" ? hexToRgba(color) : rgbaStrToObj(color);\n};\n\nexport const capitalize = (text: string): string =>\n text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string | string[]\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) =>\n Array.isArray(slotName)\n ? slotName.some((name) => (node as Element).slot === name)\n : (node as Element).slot === slotName\n );\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const isElInAGGrid = (el: HTMLElement): boolean =>\n !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n\n/**\n * Checks if the component is slotted in its relevant 'group' component\n * @param component - the component to check\n */\nexport const isSlottedInGroup = (component: HTMLElement): boolean =>\n component.parentElement?.tagName === `${component.tagName}-GROUP`;\n\nexport const hasDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[]\n): boolean =>\n mutationList.some(\n ({ type, addedNodes, removedNodes }) =>\n type === \"childList\" &&\n checkSlotInChildMutations(addedNodes, removedNodes, slotNames)\n );\n\nexport const renderDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[],\n ref: any\n): void => {\n if (hasDynamicChildSlots(mutationList, slotNames)) {\n forceUpdate(ref);\n }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,0CAAmB,CAAA;AACrB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAsED,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,sCAAa,CAAA;IACb,wCAAe,CAAA;AACjB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcBrandForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\n\nexport type IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement | null;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcRequiredPropsTypes =\n | string\n | boolean\n | number\n | HTMLElement\n | IcMenuOption[]\n | undefined;\n\nexport type IcPropObject = { prop: IcRequiredPropsTypes; propName: string };\n\nexport type IcRelatedTarget = EventTarget | undefined;\n\nexport type IcOrientation = \"horizontal\" | \"vertical\";\n\nexport type IcEmphasisType = \"filled\" | \"outlined\";\n\nexport interface IcValueEventDetail {\n value: string;\n keyPressed?: string;\n}\n\nexport interface IcMultiValueEventDetail {\n value: string | string[] | null;\n keyPressed?: string;\n}\n\nexport interface IcBlurEventDetail {\n relatedTarget: IcRelatedTarget | null;\n}\n\nexport type IcSelectTypes = \"single\" | \"multi\";\n\nexport type IcSelectMethodTypes = \"auto\" | \"manual\";\n\nexport type IcDeviceSizes = 0 | 576 | 768 | 992 | 1200;\n\ntype RGB = `rgb(${string})`;\ntype RGBA = `rgba(${string})`;\ntype HEX = `#${string}`;\n\nexport type IcColor = RGB | RGBA | HEX;\n\nexport type IcIconPlacementOptions = \"left\" | \"right\" | \"top\";\n\nexport type IcButtonTooltipPlacement = \"top\" | \"right\" | \"bottom\" | \"left\";\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,0CAAmB,CAAA;AACrB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAsED,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,sCAAa,CAAA;IACb,wCAAe,CAAA;AACjB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcBrandForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\n\nexport type IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement | null;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcRequiredPropsTypes =\n | string\n | boolean\n | number\n | HTMLElement\n | IcMenuOption[]\n | undefined;\n\nexport type IcPropObject = { prop: IcRequiredPropsTypes; propName: string };\n\nexport type IcRelatedTarget = EventTarget | undefined;\n\nexport type IcOrientation = \"horizontal\" | \"vertical\";\n\nexport type IcEmphasisType = \"filled\" | \"outlined\";\n\nexport interface IcValueEventDetail {\n value: string;\n keyPressed?: string;\n}\n\nexport interface IcMultiValueEventDetail {\n value: string | string[] | null;\n keyPressed?: string;\n}\n\nexport interface IcBlurEventDetail {\n relatedTarget: IcRelatedTarget | null;\n}\n\nexport type IcSelectTypes = \"single\" | \"multi\";\n\nexport type IcSelectMethodTypes = \"auto\" | \"manual\";\n\nexport type IcDeviceSizes = 0 | 576 | 768 | 992 | 1200;\n\ntype RGB = `rgb(${string})`;\ntype RGBA = `rgba(${string})`;\ntype HEX = `#${string}`;\n\nexport type IcColor = RGB | RGBA | HEX;\n\nexport type IcIconPlacementOptions = \"left\" | \"right\" | \"top\";\n\nexport type IcButtonTooltipPlacement = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport type IcThemeSettings = \"dark\" | \"light\" | \"system\";\n"]}