@ukic/canary-web-components 3.0.0-canary.6 → 3.0.0-canary.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (448) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/{helpers-e0da4ae1.js → helpers-02b23286.js} +25 -3
  4. package/dist/cjs/helpers-02b23286.js.map +1 -0
  5. package/dist/cjs/{helpers-0d86316e.js → helpers-ce248d54.js} +25 -2
  6. package/dist/cjs/helpers-ce248d54.js.map +1 -0
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-alert.cjs.entry.js +2 -9
  10. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-badge.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-breadcrumb.cjs.entry.js +47 -3
  15. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-card-horizontal.cjs.entry.js +2 -8
  19. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-card-vertical.cjs.entry.js +12 -19
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-data-table.cjs.entry.js +230 -49
  28. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-date-input.cjs.entry.js +2 -2
  30. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-dialog.cjs.entry.js +10 -4
  33. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-empty-state_2.cjs.entry.js +20 -14
  36. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-footer.cjs.entry.js +18 -7
  40. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-hero.cjs.entry.js +2 -9
  42. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +27 -21
  45. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -2
  53. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-pagination_4.cjs.entry.js +54 -40
  57. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-radio-group.cjs.entry.js +21 -18
  60. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-radio-option.cjs.entry.js +13 -6
  62. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-search-bar.cjs.entry.js +32 -28
  64. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-switch.cjs.entry.js +12 -14
  70. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  72. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  75. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  76. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +34 -11
  77. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-toggle-button.cjs.entry.js +53 -6
  79. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  81. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-tree-item.cjs.entry.js +2 -9
  83. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-tree-view.cjs.entry.js +2 -9
  85. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  87. package/dist/cjs/loader.cjs.js +1 -1
  88. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +3 -9
  89. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
  90. package/dist/collection/components/ic-data-table/ic-data-table.css +82 -2
  91. package/dist/collection/components/ic-data-table/ic-data-table.js +265 -51
  92. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  93. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  94. package/dist/collection/components/ic-data-table/story-data.js +214 -6
  95. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  96. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +64 -1
  97. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  98. package/dist/collection/components/ic-date-input/ic-date-input.css +5 -1
  99. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +36 -0
  100. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  101. package/dist/collection/components/ic-tree-item/ic-tree-item.js +3 -10
  102. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  103. package/dist/collection/components/ic-tree-view/ic-tree-view.js +3 -10
  104. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  105. package/dist/collection/utils/helpers.js +21 -1
  106. package/dist/collection/utils/helpers.js.map +1 -1
  107. package/dist/collection/utils/types.js.map +1 -1
  108. package/dist/components/helpers.js +23 -2
  109. package/dist/components/helpers.js.map +1 -1
  110. package/dist/components/helpers2.js +22 -2
  111. package/dist/components/helpers2.js.map +1 -1
  112. package/dist/components/ic-alert.js +3 -10
  113. package/dist/components/ic-alert.js.map +1 -1
  114. package/dist/components/ic-breadcrumb-group.js +1 -1
  115. package/dist/components/ic-breadcrumb2.js +49 -3
  116. package/dist/components/ic-breadcrumb2.js.map +1 -1
  117. package/dist/components/ic-button2.js.map +1 -1
  118. package/dist/components/ic-card-horizontal.js +3 -9
  119. package/dist/components/ic-card-horizontal.js.map +1 -1
  120. package/dist/components/ic-card-vertical.js +13 -20
  121. package/dist/components/ic-card-vertical.js.map +1 -1
  122. package/dist/components/ic-checkbox-group.js +1 -1
  123. package/dist/components/ic-checkbox.js +1 -1
  124. package/dist/components/ic-data-row.js +1 -1
  125. package/dist/components/ic-data-table.js +231 -49
  126. package/dist/components/ic-data-table.js.map +1 -1
  127. package/dist/components/ic-date-input2.js +2 -2
  128. package/dist/components/ic-date-input2.js.map +1 -1
  129. package/dist/components/ic-date-picker.js +1 -1
  130. package/dist/components/ic-dialog.js +9 -3
  131. package/dist/components/ic-dialog.js.map +1 -1
  132. package/dist/components/ic-divider2.js +1 -1
  133. package/dist/components/ic-empty-state2.js +3 -13
  134. package/dist/components/ic-empty-state2.js.map +1 -1
  135. package/dist/components/ic-footer.js +18 -7
  136. package/dist/components/ic-footer.js.map +1 -1
  137. package/dist/components/ic-hero.js +3 -10
  138. package/dist/components/ic-hero.js.map +1 -1
  139. package/dist/components/ic-horizontal-scroll2.js +1 -1
  140. package/dist/components/ic-input-component-container2.js +3 -10
  141. package/dist/components/ic-input-component-container2.js.map +1 -1
  142. package/dist/components/ic-input-label2.js +1 -1
  143. package/dist/components/ic-input-validation2.js +1 -1
  144. package/dist/components/ic-menu2.js +26 -13
  145. package/dist/components/ic-menu2.js.map +1 -1
  146. package/dist/components/ic-navigation-group.js +1 -1
  147. package/dist/components/ic-navigation-item.js +2 -2
  148. package/dist/components/ic-navigation-item.js.map +1 -1
  149. package/dist/components/ic-navigation-menu2.js +1 -1
  150. package/dist/components/ic-page-header.js +1 -1
  151. package/dist/components/ic-pagination-bar2.js +21 -3
  152. package/dist/components/ic-pagination-bar2.js.map +1 -1
  153. package/dist/components/ic-pagination-item2.js +1 -1
  154. package/dist/components/ic-popover-menu.js +1 -1
  155. package/dist/components/ic-radio-group.js +21 -18
  156. package/dist/components/ic-radio-group.js.map +1 -1
  157. package/dist/components/ic-radio-option.js +14 -7
  158. package/dist/components/ic-radio-option.js.map +1 -1
  159. package/dist/components/ic-search-bar.js +46 -53
  160. package/dist/components/ic-search-bar.js.map +1 -1
  161. package/dist/components/ic-select2.js +46 -34
  162. package/dist/components/ic-select2.js.map +1 -1
  163. package/dist/components/ic-side-navigation.js +1 -1
  164. package/dist/components/ic-stepper.js +1 -1
  165. package/dist/components/ic-switch.js +12 -15
  166. package/dist/components/ic-switch.js.map +1 -1
  167. package/dist/components/ic-text-field2.js +10 -8
  168. package/dist/components/ic-text-field2.js.map +1 -1
  169. package/dist/components/ic-theme.js +1 -1
  170. package/dist/components/ic-toast.js +1 -1
  171. package/dist/components/ic-toggle-button-group.js +40 -11
  172. package/dist/components/ic-toggle-button-group.js.map +1 -1
  173. package/dist/components/ic-toggle-button.js +61 -13
  174. package/dist/components/ic-toggle-button.js.map +1 -1
  175. package/dist/components/ic-top-navigation.js +2 -2
  176. package/dist/components/ic-top-navigation.js.map +1 -1
  177. package/dist/components/ic-tree-item.js +3 -10
  178. package/dist/components/ic-tree-item.js.map +1 -1
  179. package/dist/components/ic-tree-view.js +3 -10
  180. package/dist/components/ic-tree-view.js.map +1 -1
  181. package/dist/core/core.css +17 -5
  182. package/dist/core/core.esm.js +1 -1
  183. package/dist/core/core.esm.js.map +1 -1
  184. package/dist/core/{p-2664bfab.entry.js → p-0054bdc2.entry.js} +2 -2
  185. package/dist/core/p-01a23e24.entry.js +2 -0
  186. package/dist/core/p-01a23e24.entry.js.map +1 -0
  187. package/dist/core/p-063911a8.entry.js +2 -0
  188. package/dist/core/p-063911a8.entry.js.map +1 -0
  189. package/dist/core/{p-07881c14.entry.js → p-0c5d45e1.entry.js} +2 -2
  190. package/dist/core/{p-47f2f713.entry.js → p-15a5cce5.entry.js} +2 -2
  191. package/dist/core/{p-eb6e3878.entry.js → p-1658e577.entry.js} +2 -2
  192. package/dist/core/{p-b7e5b682.entry.js → p-1808381b.entry.js} +2 -2
  193. package/dist/core/p-2169e75b.entry.js +2 -0
  194. package/dist/core/{p-670c10af.entry.js.map → p-2169e75b.entry.js.map} +1 -1
  195. package/dist/core/{p-6a2ed698.entry.js → p-26aff39e.entry.js} +2 -2
  196. package/dist/core/{p-5284ccab.entry.js → p-27b1223d.entry.js} +2 -2
  197. package/dist/core/{p-35caddb3.entry.js → p-32726b89.entry.js} +2 -2
  198. package/dist/core/{p-1084a7f9.entry.js → p-33110185.entry.js} +2 -2
  199. package/dist/core/p-40e965de.entry.js +2 -0
  200. package/dist/core/p-40e965de.entry.js.map +1 -0
  201. package/dist/core/{p-3272931c.entry.js → p-41bfa3e5.entry.js} +2 -2
  202. package/dist/core/p-4347f05c.entry.js +2 -0
  203. package/dist/core/p-4347f05c.entry.js.map +1 -0
  204. package/dist/core/p-440c97ac.entry.js +2 -0
  205. package/dist/core/p-440c97ac.entry.js.map +1 -0
  206. package/dist/core/{p-7a9de1bb.entry.js → p-45177148.entry.js} +2 -2
  207. package/dist/core/{p-92398f47.entry.js → p-4f96bec1.entry.js} +2 -2
  208. package/dist/core/{p-a0dfd2cf.entry.js → p-51058719.entry.js} +2 -2
  209. package/dist/core/{p-7765a219.entry.js → p-5193184c.entry.js} +2 -2
  210. package/dist/core/{p-8e300091.entry.js → p-51faa4ba.entry.js} +2 -2
  211. package/dist/core/p-51faa4ba.entry.js.map +1 -0
  212. package/dist/core/p-6188f029.entry.js +2 -0
  213. package/dist/core/p-6188f029.entry.js.map +1 -0
  214. package/dist/core/{p-b047cd84.entry.js → p-6ac8e09b.entry.js} +2 -2
  215. package/dist/core/p-6ac8e09b.entry.js.map +1 -0
  216. package/dist/core/p-71496305.entry.js +2 -0
  217. package/dist/core/{p-29a86adf.entry.js.map → p-71496305.entry.js.map} +1 -1
  218. package/dist/core/p-77157922.entry.js +2 -0
  219. package/dist/core/p-77157922.entry.js.map +1 -0
  220. package/dist/core/{p-21f6619f.entry.js → p-794ff553.entry.js} +2 -2
  221. package/dist/core/p-82b408ad.entry.js +2 -0
  222. package/dist/core/p-82b408ad.entry.js.map +1 -0
  223. package/dist/core/p-8576281d.entry.js +2 -0
  224. package/dist/core/p-8576281d.entry.js.map +1 -0
  225. package/dist/core/p-88913402.entry.js +2 -0
  226. package/dist/core/p-88913402.entry.js.map +1 -0
  227. package/dist/core/p-897fac99.js +2 -0
  228. package/dist/core/p-897fac99.js.map +1 -0
  229. package/dist/core/{p-95d1c9e6.entry.js → p-8e56516a.entry.js} +2 -2
  230. package/dist/core/{p-3b84953c.entry.js → p-8ebd64ae.entry.js} +2 -2
  231. package/dist/core/{p-d5648fdc.entry.js → p-9462f294.entry.js} +2 -2
  232. package/dist/core/p-94efa0d2.entry.js +2 -0
  233. package/dist/core/p-94efa0d2.entry.js.map +1 -0
  234. package/dist/core/p-9a392c41.entry.js +2 -0
  235. package/dist/core/{p-b1c68968.entry.js.map → p-9a392c41.entry.js.map} +1 -1
  236. package/dist/core/p-a04712b9.js +2 -0
  237. package/dist/core/p-a04712b9.js.map +1 -0
  238. package/dist/core/{p-efd608ab.entry.js → p-a1d5fff2.entry.js} +2 -2
  239. package/dist/core/p-a69ef3eb.entry.js +2 -0
  240. package/dist/core/p-a69ef3eb.entry.js.map +1 -0
  241. package/dist/core/p-ace8126b.entry.js +2 -0
  242. package/dist/core/p-ace8126b.entry.js.map +1 -0
  243. package/dist/core/{p-26a41692.entry.js → p-ade5d1b6.entry.js} +2 -2
  244. package/dist/core/{p-2412ba0b.entry.js → p-b2a6f0dd.entry.js} +2 -2
  245. package/dist/core/{p-83f39782.entry.js → p-b5a5fe39.entry.js} +2 -2
  246. package/dist/core/{p-19f85b60.entry.js → p-b717ae40.entry.js} +2 -2
  247. package/dist/core/{p-5d749879.entry.js → p-b85466a7.entry.js} +2 -2
  248. package/dist/core/{p-3ae329ab.entry.js → p-bd87bf33.entry.js} +2 -2
  249. package/dist/core/{p-fafc157b.entry.js → p-be1ec9aa.entry.js} +2 -2
  250. package/dist/core/{p-38aca488.entry.js → p-be54a959.entry.js} +2 -2
  251. package/dist/core/p-be6d9ab9.entry.js +2 -0
  252. package/dist/core/p-be6d9ab9.entry.js.map +1 -0
  253. package/dist/core/{p-3bc4bc81.entry.js → p-c035d7b9.entry.js} +2 -2
  254. package/dist/core/p-c0733c84.entry.js +2 -0
  255. package/dist/core/p-c0733c84.entry.js.map +1 -0
  256. package/dist/core/p-c466bc73.entry.js +2 -0
  257. package/dist/core/p-c466bc73.entry.js.map +1 -0
  258. package/dist/core/{p-ca4bfffd.entry.js → p-cd6dbb1e.entry.js} +2 -2
  259. package/dist/core/{p-ca4bfffd.entry.js.map → p-cd6dbb1e.entry.js.map} +1 -1
  260. package/dist/core/{p-f02d5539.entry.js → p-d2b2b7df.entry.js} +2 -2
  261. package/dist/core/p-dda6a46d.entry.js +2 -0
  262. package/dist/core/p-dda6a46d.entry.js.map +1 -0
  263. package/dist/core/{p-1893f635.entry.js → p-e1df1b9a.entry.js} +2 -2
  264. package/dist/core/p-e1df1b9a.entry.js.map +1 -0
  265. package/dist/core/{p-e0b556b4.entry.js → p-e3c98750.entry.js} +2 -2
  266. package/dist/core/{p-39190da3.entry.js → p-f3d2af04.entry.js} +2 -2
  267. package/dist/core/{p-b9081a99.entry.js → p-f7d2f703.entry.js} +2 -2
  268. package/dist/core/p-fc155ae2.entry.js +2 -0
  269. package/dist/core/p-fc155ae2.entry.js.map +1 -0
  270. package/dist/esm/core.js +1 -1
  271. package/dist/esm/{helpers-759bbf51.js → helpers-0f42cb46.js} +23 -3
  272. package/dist/{cjs/helpers-e0da4ae1.js.map → esm/helpers-0f42cb46.js.map} +1 -1
  273. package/dist/esm/{helpers-fcc7a364.js → helpers-56c75bf4.js} +24 -3
  274. package/dist/esm/helpers-56c75bf4.js.map +1 -0
  275. package/dist/esm/ic-accordion-group.entry.js +1 -1
  276. package/dist/esm/ic-accordion.entry.js +1 -1
  277. package/dist/esm/ic-alert.entry.js +3 -10
  278. package/dist/esm/ic-alert.entry.js.map +1 -1
  279. package/dist/esm/ic-back-to-top.entry.js +1 -1
  280. package/dist/esm/ic-badge.entry.js +1 -1
  281. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  282. package/dist/esm/ic-breadcrumb.entry.js +47 -3
  283. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  284. package/dist/esm/ic-button_3.entry.js +1 -1
  285. package/dist/esm/ic-button_3.entry.js.map +1 -1
  286. package/dist/esm/ic-card-horizontal.entry.js +3 -9
  287. package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
  288. package/dist/esm/ic-card-vertical.entry.js +13 -20
  289. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  290. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  291. package/dist/esm/ic-checkbox.entry.js +1 -1
  292. package/dist/esm/ic-chip.entry.js +1 -1
  293. package/dist/esm/ic-data-row.entry.js +1 -1
  294. package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
  295. package/dist/esm/ic-data-table.entry.js +230 -49
  296. package/dist/esm/ic-data-table.entry.js.map +1 -1
  297. package/dist/esm/ic-date-input.entry.js +2 -2
  298. package/dist/esm/ic-date-input.entry.js.map +1 -1
  299. package/dist/esm/ic-date-picker.entry.js +1 -1
  300. package/dist/esm/ic-dialog.entry.js +10 -4
  301. package/dist/esm/ic-dialog.entry.js.map +1 -1
  302. package/dist/esm/ic-divider.entry.js +1 -1
  303. package/dist/esm/ic-empty-state_2.entry.js +21 -15
  304. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  305. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  306. package/dist/esm/ic-footer-link.entry.js +1 -1
  307. package/dist/esm/ic-footer.entry.js +18 -7
  308. package/dist/esm/ic-footer.entry.js.map +1 -1
  309. package/dist/esm/ic-hero.entry.js +3 -10
  310. package/dist/esm/ic-hero.entry.js.map +1 -1
  311. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  312. package/dist/esm/ic-input-component-container_3.entry.js +28 -22
  313. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  314. package/dist/esm/ic-input-label_2.entry.js +1 -1
  315. package/dist/esm/ic-link.entry.js +1 -1
  316. package/dist/esm/ic-menu-group.entry.js +1 -1
  317. package/dist/esm/ic-menu-item.entry.js +1 -1
  318. package/dist/esm/ic-navigation-button.entry.js +1 -1
  319. package/dist/esm/ic-navigation-group.entry.js +1 -1
  320. package/dist/esm/ic-navigation-item.entry.js +2 -2
  321. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  322. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  323. package/dist/esm/ic-page-header.entry.js +1 -1
  324. package/dist/esm/ic-pagination_4.entry.js +54 -40
  325. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  326. package/dist/esm/ic-popover-menu.entry.js +1 -1
  327. package/dist/esm/ic-radio-group.entry.js +21 -18
  328. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  329. package/dist/esm/ic-radio-option.entry.js +13 -6
  330. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  331. package/dist/esm/ic-search-bar.entry.js +32 -28
  332. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  333. package/dist/esm/ic-side-navigation.entry.js +1 -1
  334. package/dist/esm/ic-status-tag.entry.js +1 -1
  335. package/dist/esm/ic-step.entry.js +1 -1
  336. package/dist/esm/ic-stepper.entry.js +1 -1
  337. package/dist/esm/ic-switch.entry.js +12 -14
  338. package/dist/esm/ic-switch.entry.js.map +1 -1
  339. package/dist/esm/ic-tab-group.entry.js +1 -1
  340. package/dist/esm/ic-tab-panel.entry.js +1 -1
  341. package/dist/esm/ic-tab.entry.js +1 -1
  342. package/dist/esm/ic-theme.entry.js +1 -1
  343. package/dist/esm/ic-toast.entry.js +1 -1
  344. package/dist/esm/ic-toggle-button-group.entry.js +34 -11
  345. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  346. package/dist/esm/ic-toggle-button.entry.js +53 -6
  347. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  348. package/dist/esm/ic-top-navigation.entry.js +2 -2
  349. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  350. package/dist/esm/ic-tree-item.entry.js +3 -10
  351. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  352. package/dist/esm/ic-tree-view.entry.js +3 -10
  353. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  354. package/dist/esm/ic-typography.entry.js +1 -1
  355. package/dist/esm/loader.js +1 -1
  356. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +0 -1
  357. package/dist/types/components/ic-data-table/ic-data-table.d.ts +23 -0
  358. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +11 -0
  359. package/dist/types/components/ic-data-table/story-data.d.ts +107 -4
  360. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +6 -0
  361. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +0 -1
  362. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +0 -1
  363. package/dist/types/components.d.ts +23 -0
  364. package/dist/types/utils/helpers.d.ts +4 -1
  365. package/dist/types/utils/types.d.ts +1 -0
  366. package/hydrate/index.js +638 -277
  367. package/package.json +3 -10
  368. package/dist/cjs/helpers-0d86316e.js.map +0 -1
  369. package/dist/core/p-006d37d0.entry.js +0 -2
  370. package/dist/core/p-006d37d0.entry.js.map +0 -1
  371. package/dist/core/p-06cda732.entry.js +0 -2
  372. package/dist/core/p-06cda732.entry.js.map +0 -1
  373. package/dist/core/p-1893f635.entry.js.map +0 -1
  374. package/dist/core/p-29a86adf.entry.js +0 -2
  375. package/dist/core/p-2c38ff71.entry.js +0 -2
  376. package/dist/core/p-2c38ff71.entry.js.map +0 -1
  377. package/dist/core/p-324be8cf.entry.js +0 -2
  378. package/dist/core/p-324be8cf.entry.js.map +0 -1
  379. package/dist/core/p-34e57694.entry.js +0 -2
  380. package/dist/core/p-34e57694.entry.js.map +0 -1
  381. package/dist/core/p-4bcd86cf.js +0 -2
  382. package/dist/core/p-4bcd86cf.js.map +0 -1
  383. package/dist/core/p-670c10af.entry.js +0 -2
  384. package/dist/core/p-68eb216b.entry.js +0 -2
  385. package/dist/core/p-68eb216b.entry.js.map +0 -1
  386. package/dist/core/p-6aa0f42b.entry.js +0 -2
  387. package/dist/core/p-6aa0f42b.entry.js.map +0 -1
  388. package/dist/core/p-6d179eed.entry.js +0 -2
  389. package/dist/core/p-6d179eed.entry.js.map +0 -1
  390. package/dist/core/p-77a98aa2.entry.js +0 -2
  391. package/dist/core/p-77a98aa2.entry.js.map +0 -1
  392. package/dist/core/p-78f747ee.entry.js +0 -2
  393. package/dist/core/p-78f747ee.entry.js.map +0 -1
  394. package/dist/core/p-808715e2.js +0 -2
  395. package/dist/core/p-808715e2.js.map +0 -1
  396. package/dist/core/p-8e300091.entry.js.map +0 -1
  397. package/dist/core/p-9b600ef3.entry.js +0 -2
  398. package/dist/core/p-9b600ef3.entry.js.map +0 -1
  399. package/dist/core/p-a7cda2d6.entry.js +0 -2
  400. package/dist/core/p-a7cda2d6.entry.js.map +0 -1
  401. package/dist/core/p-aa876e5e.entry.js +0 -2
  402. package/dist/core/p-aa876e5e.entry.js.map +0 -1
  403. package/dist/core/p-b047cd84.entry.js.map +0 -1
  404. package/dist/core/p-b1c68968.entry.js +0 -2
  405. package/dist/core/p-c6bdbee1.entry.js +0 -2
  406. package/dist/core/p-c6bdbee1.entry.js.map +0 -1
  407. package/dist/core/p-ccd141a9.entry.js +0 -2
  408. package/dist/core/p-ccd141a9.entry.js.map +0 -1
  409. package/dist/core/p-d7bc2e7f.entry.js +0 -2
  410. package/dist/core/p-d7bc2e7f.entry.js.map +0 -1
  411. package/dist/core/p-d981ef7a.entry.js +0 -2
  412. package/dist/core/p-d981ef7a.entry.js.map +0 -1
  413. package/dist/core/p-f95e52d8.entry.js +0 -2
  414. package/dist/core/p-f95e52d8.entry.js.map +0 -1
  415. package/dist/esm/helpers-759bbf51.js.map +0 -1
  416. package/dist/esm/helpers-fcc7a364.js.map +0 -1
  417. /package/dist/core/{p-2664bfab.entry.js.map → p-0054bdc2.entry.js.map} +0 -0
  418. /package/dist/core/{p-07881c14.entry.js.map → p-0c5d45e1.entry.js.map} +0 -0
  419. /package/dist/core/{p-47f2f713.entry.js.map → p-15a5cce5.entry.js.map} +0 -0
  420. /package/dist/core/{p-eb6e3878.entry.js.map → p-1658e577.entry.js.map} +0 -0
  421. /package/dist/core/{p-b7e5b682.entry.js.map → p-1808381b.entry.js.map} +0 -0
  422. /package/dist/core/{p-6a2ed698.entry.js.map → p-26aff39e.entry.js.map} +0 -0
  423. /package/dist/core/{p-5284ccab.entry.js.map → p-27b1223d.entry.js.map} +0 -0
  424. /package/dist/core/{p-35caddb3.entry.js.map → p-32726b89.entry.js.map} +0 -0
  425. /package/dist/core/{p-1084a7f9.entry.js.map → p-33110185.entry.js.map} +0 -0
  426. /package/dist/core/{p-3272931c.entry.js.map → p-41bfa3e5.entry.js.map} +0 -0
  427. /package/dist/core/{p-7a9de1bb.entry.js.map → p-45177148.entry.js.map} +0 -0
  428. /package/dist/core/{p-92398f47.entry.js.map → p-4f96bec1.entry.js.map} +0 -0
  429. /package/dist/core/{p-a0dfd2cf.entry.js.map → p-51058719.entry.js.map} +0 -0
  430. /package/dist/core/{p-7765a219.entry.js.map → p-5193184c.entry.js.map} +0 -0
  431. /package/dist/core/{p-21f6619f.entry.js.map → p-794ff553.entry.js.map} +0 -0
  432. /package/dist/core/{p-95d1c9e6.entry.js.map → p-8e56516a.entry.js.map} +0 -0
  433. /package/dist/core/{p-3b84953c.entry.js.map → p-8ebd64ae.entry.js.map} +0 -0
  434. /package/dist/core/{p-d5648fdc.entry.js.map → p-9462f294.entry.js.map} +0 -0
  435. /package/dist/core/{p-efd608ab.entry.js.map → p-a1d5fff2.entry.js.map} +0 -0
  436. /package/dist/core/{p-26a41692.entry.js.map → p-ade5d1b6.entry.js.map} +0 -0
  437. /package/dist/core/{p-2412ba0b.entry.js.map → p-b2a6f0dd.entry.js.map} +0 -0
  438. /package/dist/core/{p-83f39782.entry.js.map → p-b5a5fe39.entry.js.map} +0 -0
  439. /package/dist/core/{p-19f85b60.entry.js.map → p-b717ae40.entry.js.map} +0 -0
  440. /package/dist/core/{p-5d749879.entry.js.map → p-b85466a7.entry.js.map} +0 -0
  441. /package/dist/core/{p-3ae329ab.entry.js.map → p-bd87bf33.entry.js.map} +0 -0
  442. /package/dist/core/{p-fafc157b.entry.js.map → p-be1ec9aa.entry.js.map} +0 -0
  443. /package/dist/core/{p-38aca488.entry.js.map → p-be54a959.entry.js.map} +0 -0
  444. /package/dist/core/{p-3bc4bc81.entry.js.map → p-c035d7b9.entry.js.map} +0 -0
  445. /package/dist/core/{p-f02d5539.entry.js.map → p-d2b2b7df.entry.js.map} +0 -0
  446. /package/dist/core/{p-e0b556b4.entry.js.map → p-e3c98750.entry.js.map} +0 -0
  447. /package/dist/core/{p-39190da3.entry.js.map → p-f3d2af04.entry.js.map} +0 -0
  448. /package/dist/core/{p-b9081a99.entry.js.map → p-f7d2f703.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"helpers2.js","mappings":"AAkEO,MAAM,yBAAyB,GAAG;IACvC,SAAS;IACT,mBAAmB;IACnB,WAAW;IACX,oBAAoB;IACpB,UAAU;CACX,CAAC;AAEK,MAAM,yBAAyB,GAAG,CAAC,UAAU,CAAC,CAAC;AAM/C,MAAM,yBAAyB,GAAsB;IAC1D,UAAU,EAAE,CAAC,SAAS,CAAC;CACxB;;ICpDW;AAAZ,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,0CAAmB,CAAA;AACrB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;IAsEW;AAAZ,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,sCAAa,CAAA;IACb,wCAAe,CAAA;AACjB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;IA6FW;AAAZ,WAAY,iBAAiB;IAC3B,+DAAS,CAAA;IACT,iEAAU,CAAA;IACV,2DAAO,CAAA;IACP,2DAAO,CAAA;IACP,uDAAK,CAAA;IACL,yDAAM,CAAA;IACN,yDAAM,CAAA;IACN,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,OAAO,OAAO,CAAC;AACjB;;;;","names":[],"sources":["src/utils/constants.ts","src/utils/types.ts","src/utils/helpers.ts"],"sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import {\n IcPaginationLabelTypes,\n IcPaginationTypes,\n IcPaginationAlignmentOptions,\n} from \"../components\";\n\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 IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\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;\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 interface IcPaginationBarOptions {\n itemsPerPageOptions?: { label: string; value: string }[];\n rangeLabelType?: IcPaginationLabelTypes;\n type?: IcPaginationTypes;\n showItemsPerPageControl?: boolean;\n showGoToPageControl?: boolean;\n alignment?: IcPaginationAlignmentOptions;\n itemLabel?: string;\n pageLabel?: string;\n hideRangeLabel?: boolean;\n hideAllFromItemsPerPage?: boolean;\n theme?: IcThemeMode;\n monochrome?: boolean;\n}\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcDateFormat = \"DD/MM/YYYY\" | \"MM/DD/YYYY\" | \"YYYY/MM/DD\";\n\nexport enum IcDateInputMonths {\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n}\n\nexport enum IcShortDayNames {\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n}\n\nexport enum IcDayNames {\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n}\n\nexport enum IcWeekDays {\n Sunday = 0,\n Monday = 1,\n Tuesday = 2,\n Wednesday = 3,\n Thursday = 4,\n Friday = 5,\n Saturday = 6,\n}\n\nexport interface IcValueEventDetail {\n value: string | string[];\n keyPressed?: string;\n}\n","/**\n * To investigate:\n * IcColorRGBA works via @ukic/web-components but IcBrandForeground does not even though they are exported\n * from @ukic/web-components in the same file. Why?\n */\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"@ukic/web-components\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\"; // Using @ukic/web-components/dist/types/utils/constants does not work so duplicated constants into canary package\nimport {\n IcMenuOption,\n IcBrandForeground,\n IcBrandForegroundEnum,\n} from \"./types\"; // Using @ukic/web-components/dist/types/utils/types does not work so duplicated constants into canary package\nimport { EventEmitter } from \"@stencil/core\";\nimport { IcDataTableDataType } from \"../interface\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\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\nexport const dynamicDebounce = (\n func: (...args: unknown[]) => void,\n getDelay: () => number\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n const delay = getDelay();\n clearTimeout(timer);\n timer = setTimeout(func, delay, ...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\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : null;\n } else {\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\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\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 !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return 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(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n }\n\n return IcBrandForegroundEnum.Light;\n }\n\n return IcBrandForegroundEnum.Default;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean =>\n value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\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 brand colour, calculated by using the brand 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 brand colour\n */\nexport const getBrandColorBrightness = (): number => {\n const r = getCssProperty(\"--ic-brand-color-primary-r\");\n const g = getCssProperty(\"--ic-brand-color-primary-g\");\n const b = getCssProperty(\"--ic-brand-color-primary-b\");\n return (parseInt(r) * 299 + parseInt(g) * 587 + parseInt(b) * 114) / 1000;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getBrandForegroundAppearance = (): IcBrandForeground =>\n getBrandColorBrightness() > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean =>\n Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean =>\n !!el.shadowRoot && !!el.attachShadow;\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\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator ? navigator.maxTouchPoints > 0 : false;\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,\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\"\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\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean =>\n element.scrollWidth > element.clientWidth;\n\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\nexport const isNumeric = (value: string): boolean => {\n return /^-?\\d+$/.test(value);\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement => el.closest(\"FORM\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean => {\n return window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n};\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 capitalize = (text: string): string => {\n return text.charAt(0).toUpperCase() + text.slice(1);\n};\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) => (node as Element).slot === slotName);\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const addDataToPosition = (\n dataObject: IcDataTableDataType,\n newKeys: { key: string; index: number }[],\n newValue: unknown\n): IcDataTableDataType => {\n const newData: IcDataTableDataType = {};\n const newIndexes = newKeys.map((key) => key.index);\n\n const keys = Object.keys(dataObject);\n const values = Object.values(dataObject);\n const numberOfKeys = keys.length + newIndexes.length;\n\n for (let i = 0, j = 0; i < numberOfKeys; i++) {\n if (newIndexes.includes(i)) {\n newData[newKeys[newIndexes.indexOf(i)].key] = newValue;\n continue;\n }\n newData[keys[j]] = values[j];\n j++;\n }\n return newData;\n};\n"],"version":3}
1
+ {"file":"helpers2.js","mappings":";;MA0Da,eAAe,GAAG;IAC7B,EAAE,EAAE,GAAG;IACP,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,IAAI;IACP,EAAE,EAAE,KAAK;EACT;AAEK,MAAM,yBAAyB,GAAG;IACvC,SAAS;IACT,mBAAmB;IACnB,WAAW;IACX,oBAAoB;IACpB,UAAU;CACX,CAAC;AAEK,MAAM,yBAAyB,GAAG,C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/constants.ts","src/utils/types.ts","src/utils/helpers.ts"],"sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import {\n IcPaginationLabelTypes,\n IcPaginationTypes,\n IcPaginationAlignmentOptions,\n} from \"../components\";\n\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 IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\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;\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 interface IcPaginationBarOptions {\n itemsPerPageOptions?: { label: string; value: string }[];\n rangeLabelType?: IcPaginationLabelTypes;\n type?: IcPaginationTypes;\n showItemsPerPageControl?: boolean;\n showGoToPageControl?: boolean;\n alignment?: IcPaginationAlignmentOptions;\n itemLabel?: string;\n pageLabel?: string;\n hideRangeLabel?: boolean;\n hideAllFromItemsPerPage?: boolean;\n theme?: IcThemeMode;\n monochrome?: boolean;\n setToFirstPageOnPaginationChange?: boolean;\n}\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcDateFormat = \"DD/MM/YYYY\" | \"MM/DD/YYYY\" | \"YYYY/MM/DD\";\n\nexport enum IcDateInputMonths {\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n}\n\nexport enum IcShortDayNames {\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n}\n\nexport enum IcDayNames {\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n}\n\nexport enum IcWeekDays {\n Sunday = 0,\n Monday = 1,\n Tuesday = 2,\n Wednesday = 3,\n Thursday = 4,\n Friday = 5,\n Saturday = 6,\n}\n\nexport interface IcValueEventDetail {\n value: string | string[];\n keyPressed?: string;\n}\n","/**\n * To investigate:\n * IcColorRGBA works via @ukic/web-components but IcBrandForeground does not even though they are exported\n * from @ukic/web-components in the same file. Why?\n */\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"@ukic/web-components\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\"; // Using @ukic/web-components/dist/types/utils/constants does not work so duplicated constants into canary package\nimport {\n IcMenuOption,\n IcBrandForeground,\n IcBrandForegroundEnum,\n} from \"./types\"; // Using @ukic/web-components/dist/types/utils/types does not work so duplicated constants into canary package\nimport { EventEmitter, forceUpdate } from \"@stencil/core\";\nimport { IcDataTableDataType } from \"../interface\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\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\nexport const dynamicDebounce = (\n func: (...args: unknown[]) => void,\n getDelay: () => number\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n const delay = getDelay();\n clearTimeout(timer);\n timer = setTimeout(func, delay, ...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\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : null;\n } else {\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\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\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 !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return 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(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n }\n\n return IcBrandForegroundEnum.Light;\n }\n\n return IcBrandForegroundEnum.Default;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean =>\n value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\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 brand colour, calculated by using the brand 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 brand colour\n */\nexport const getBrandColorBrightness = (): number => {\n const r = getCssProperty(\"--ic-brand-color-primary-r\");\n const g = getCssProperty(\"--ic-brand-color-primary-g\");\n const b = getCssProperty(\"--ic-brand-color-primary-b\");\n return (parseInt(r) * 299 + parseInt(g) * 587 + parseInt(b) * 114) / 1000;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getBrandForegroundAppearance = (): IcBrandForeground =>\n getBrandColorBrightness() > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean =>\n Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean =>\n !!el.shadowRoot && !!el.attachShadow;\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\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator ? navigator.maxTouchPoints > 0 : false;\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,\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\"\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\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean =>\n element.scrollWidth > element.clientWidth;\n\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\nexport const isNumeric = (value: string): boolean => {\n return /^-?\\d+$/.test(value);\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement => el.closest(\"FORM\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean => {\n return window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n};\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 capitalize = (text: string): string => {\n return text.charAt(0).toUpperCase() + text.slice(1);\n};\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 addDataToPosition = (\n dataObject: IcDataTableDataType,\n newKeys: { key: string; index: number }[],\n newValue: unknown\n): IcDataTableDataType => {\n const newData: IcDataTableDataType = {};\n const newIndexes = newKeys.map((key) => key.index);\n\n const keys = Object.keys(dataObject);\n const values = Object.values(dataObject);\n const numberOfKeys = keys.length + newIndexes.length;\n\n for (let i = 0, j = 0; i < numberOfKeys; i++) {\n if (newIndexes.includes(i)) {\n newData[newKeys[newIndexes.indexOf(i)].key] = newValue;\n continue;\n }\n newData[keys[j]] = values[j];\n j++;\n }\n return newData;\n};\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 mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, slotNames)\n : false\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"],"version":3}
@@ -1,6 +1,6 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as closeIcon } from './close-icon.js';
3
- import { f as checkSlotInChildMutations, e as IcBrandForegroundEnum, i as isSlotUsed, V as VARIANT_ICONS } from './helpers.js';
3
+ import { f as renderDynamicChildSlots, e as IcBrandForegroundEnum, i as isSlotUsed, V as VARIANT_ICONS } from './helpers.js';
4
4
  import { d as defineCustomElement$5 } from './ic-button2.js';
5
5
  import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
6
6
  import { d as defineCustomElement$3 } from './ic-tooltip2.js';
@@ -18,13 +18,6 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
18
18
  this.dismissAction = () => {
19
19
  this.icDismiss.emit();
20
20
  };
21
- this.hostMutationCallback = (mutationList) => {
22
- if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
23
- ? checkSlotInChildMutations(addedNodes, removedNodes, "action")
24
- : false)) {
25
- forceUpdate(this);
26
- }
27
- };
28
21
  this.alertTitleWrap = false;
29
22
  this.visible = true;
30
23
  this.announced = true;
@@ -42,7 +35,7 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
42
35
  }
43
36
  componentDidLoad() {
44
37
  this.alertTitleShouldWrap();
45
- this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
38
+ this.hostMutationObserver = new MutationObserver((mutationList) => renderDynamicChildSlots(mutationList, "action", this));
46
39
  this.hostMutationObserver.observe(this.el, {
47
40
  childList: true,
48
41
  });
@@ -1 +1 @@
1
- {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EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,WAAW,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE;gBAChV,CAAC,eAAe,GAAG,IAAI;gBACvB,CAAC,cAAc,GAAG,IAAI;aACzB,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;KACvH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","../web-components/dist/collection/components/ic-alert/ic-alert.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: block;\n}\n\n:host ::slotted(ic-typography) {\n --ic-typography-color: var(--ic-alert-description);\n}\n\n.container {\n min-height: 3.5rem;\n border-radius: var(--ic-space-xxs) var(--ic-space-xxxs) var(--ic-space-xxxs)\n var(--ic-space-xxs);\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.container-neutral {\n background-color: var(--ic-alert-background-neutral);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-neutral);\n}\n\n.container-info {\n background-color: var(--ic-alert-background-info);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-info);\n}\n\n.container-warning {\n background-color: var(--ic-alert-background-warning);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-warning);\n}\n\n.container-error {\n background-color: var(--ic-alert-background-error);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-error);\n}\n\n.container-success {\n background-color: var(--ic-alert-background-success);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-success);\n}\n\n.alert-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n position: absolute;\n}\n\n.divider-neutral {\n background-color: var(--ic-alert-status-type-neutral);\n}\n\n.divider-info {\n background-color: var(--ic-alert-status-type-info);\n}\n\n.divider-warning {\n background-color: var(--ic-alert-status-type-warning);\n}\n\n.divider-error {\n background-color: var(--ic-alert-status-type-error);\n}\n\n.divider-success {\n background-color: var(--ic-alert-status-type-success);\n}\n\n.alert-icon {\n height: var(--ic-space-lg);\n width: 1.375rem;\n margin-left: 1.125rem;\n}\n\n.icon-placeholder {\n margin-left: var(--ic-space-xs);\n}\n\n.alert-icon > svg {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n}\n\n/* required for Gatsby as prop does not seem to work when set to false */\n:host([showdefaulticon=\"false\"]) .icon-neutral {\n visibility: hidden;\n width: 0;\n margin-left: 0.625rem;\n}\n\n.icon-neutral > svg,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n fill: var(--ic-alert-icon-neutral);\n}\n\n:host([variant=\"info\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-info);\n}\n\n:host([variant=\"warning\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-warning);\n}\n\n:host([variant=\"error\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-error);\n}\n\n:host([variant=\"success\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-success);\n}\n\n.alert-content {\n display: flex;\n align-items: center;\n margin-left: 0.625rem;\n width: 100%;\n}\n\n.alert-message {\n display: flex;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n flex: 1;\n --ic-typography-color: var(--ic-alert-description);\n}\n\n.alert-message-title-above {\n display: inline;\n}\n\n.alert-title {\n margin-right: var(--ic-space-xs);\n --ic-typography-color: var(--ic-alert-title);\n}\n\n.alert-title-above {\n white-space: normal;\n}\n\n.alert-action-container {\n margin-right: var(--ic-space-xs);\n display: flex;\n align-items: center;\n}\n\n.dismiss-icon {\n margin-right: var(--ic-space-xxxs);\n margin-left: -0.375rem;\n padding: 0.375rem;\n border: none;\n border-radius: 50%;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dismiss-icon > svg {\n color: var(--ic-alert-icon-dismissible);\n}\n\n.dismiss-icon:hover {\n cursor: pointer;\n}\n\n@media (max-width: 628px) {\n .alert-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-message {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-title {\n white-space: normal;\n }\n\n .alert-action-container {\n margin-bottom: var(--ic-space-xs);\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-border-hc);\n }\n}\n","import { Host, h, forceUpdate, } from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { isSlotUsed, checkSlotInChildMutations } from \"../../utils/helpers\";\nimport { IcBrandForegroundEnum, } from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n * @slot neutral-icon - A custom neutral icon is placed to the left of the title. This will override the default icon if used.\n */\nexport class Alert {\n constructor() {\n this.hostMutationObserver = null;\n this.dismissAction = () => {\n this.icDismiss.emit();\n };\n this.hostMutationCallback = (mutationList) => {\n if (mutationList.some(({ type, addedNodes, removedNodes }) => type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"action\")\n : false)) {\n forceUpdate(this);\n }\n };\n this.alertTitleWrap = false;\n this.visible = true;\n this.announced = true;\n this.dismissible = false;\n this.heading = \"\";\n this.message = undefined;\n this.showDefaultIcon = true;\n this.theme = \"inherit\";\n this.titleAbove = false;\n this.variant = \"neutral\";\n }\n disconnectedCallback() {\n var _a;\n (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n componentDidLoad() {\n this.alertTitleShouldWrap();\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n handleClick() {\n this.visible = !this.visible;\n }\n alertTitleShouldWrap() {\n var _a;\n const titleHeight = (_a = this.el.shadowRoot.querySelector(\".alert-title\")) === null || _a === void 0 ? void 0 : _a.clientHeight;\n if (titleHeight > 24)\n this.alertTitleWrap = true;\n }\n render() {\n const { variant, heading, message, titleAbove, dismissible, announced, visible, showDefaultIcon, theme, } = this;\n return (visible && (h(Host, { role: announced ? \"alert\" : null, class: {\n [IcBrandForegroundEnum.Dark]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n } }, h(\"div\", { class: {\n [\"container\"]: true,\n [`container-${variant}`]: true,\n } }, h(\"div\", { class: \"alert-icon-container\" }, h(\"div\", { class: {\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n } }), variant === \"neutral\" ? (isSlotUsed(this.el, \"neutral-icon\") ? (h(\"div\", { class: \"alert-icon svg-container icon-neutral\" }, h(\"slot\", { name: \"neutral-icon\" }))) : showDefaultIcon ? (h(\"span\", { class: {\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }, innerHTML: VARIANT_ICONS[variant].icon })) : (h(\"div\", { class: \"icon-placeholder\" }))) : (h(\"span\", { class: {\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }, innerHTML: VARIANT_ICONS[variant].icon }))), h(\"div\", { class: \"alert-content\" }, h(\"div\", { class: {\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]: titleAbove || this.alertTitleWrap,\n } }, heading && (h(\"ic-typography\", { class: {\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }, variant: \"subtitle-large\" }, h(\"p\", null, heading))), h(\"slot\", { name: \"message\" }, h(\"ic-typography\", { variant: \"body\" }, message))), isSlotUsed(this.el, \"action\") && (h(\"div\", { class: \"alert-action-container\" }, h(\"slot\", { name: \"action\" })))), h(\"div\", { class: \"dismiss-icon-container\" }, dismissible && (h(\"ic-button\", { class: {\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }, innerHTML: closeIcon, onClick: this.dismissAction, variant: \"icon\", theme: \"dark\", title: \"Dismiss\" })))))));\n }\n static get is() { return \"ic-alert\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-alert.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-alert.css\"]\n };\n }\n static get properties() {\n return {\n \"announced\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\"\n },\n \"attribute\": \"announced\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"dismissible\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the alert will have a close icon at the end to dismiss it.\"\n },\n \"attribute\": \"dismissible\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"heading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The optional title to display at the start of the alert.\"\n },\n \"attribute\": \"heading\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"message\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The main body message of the alert.\"\n },\n \"attribute\": \"message\",\n \"reflect\": false\n },\n \"showDefaultIcon\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the default icon for the neutral variant will appear on the left of the alert.\"\n },\n \"attribute\": \"show-default-icon\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"titleAbove\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the title and message will appear above and below instead of inline.\"\n },\n \"attribute\": \"title-above\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcStatusVariants\",\n \"resolved\": \"\\\"error\\\" | \\\"info\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcStatusVariants\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcStatusVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the alert which will be rendered.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"neutral\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"alertTitleWrap\": {},\n \"visible\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icDismiss\",\n \"name\": \"icDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Is emitted when the user dismisses the alert.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"icDismiss\",\n \"method\": \"handleClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-alert.js.map\n"],"version":3}
1
+ {"file":"ic-alert.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,6pLAA6pL;;MCUnqL,KAAK;IACd;;;;;QACI,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG;YACjB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;SACzB,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;KAC5B;IACD,oBAAoB;QAChB,IAAI,EAAE,CAAC;QACP,CAAC,EAAE,GAAG,IAAI,CAAC,oBAAoB,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC;KACzF;IACD,gBAAgB;QACZ,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,oBAAoB,GAAG,IAAI,gB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AO,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,WAAW,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE;gBAChV,CAAC,eAAe,GAAG,IAAI;gBACvB,CAAC,cAAc,GAAG,IAAI;aACzB,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;KACvH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","../web-components/dist/collection/components/ic-alert/ic-alert.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: block;\n}\n\n:host ::slotted(ic-typography) {\n --ic-typography-color: var(--ic-alert-description);\n}\n\n.container {\n min-height: 3.5rem;\n border-radius: var(--ic-space-xxs) var(--ic-space-xxxs) var(--ic-space-xxxs)\n var(--ic-space-xxs);\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.container-neutral {\n background-color: var(--ic-alert-background-neutral);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-neutral);\n}\n\n.container-info {\n background-color: var(--ic-alert-background-info);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-info);\n}\n\n.container-warning {\n background-color: var(--ic-alert-background-warning);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-warning);\n}\n\n.container-error {\n background-color: var(--ic-alert-background-error);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-error);\n}\n\n.container-success {\n background-color: var(--ic-alert-background-success);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-success);\n}\n\n.alert-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n position: absolute;\n}\n\n.divider-neutral {\n background-color: var(--ic-alert-status-type-neutral);\n}\n\n.divider-info {\n background-color: var(--ic-alert-status-type-info);\n}\n\n.divider-warning {\n background-color: var(--ic-alert-status-type-warning);\n}\n\n.divider-error {\n background-color: var(--ic-alert-status-type-error);\n}\n\n.divider-success {\n background-color: var(--ic-alert-status-type-success);\n}\n\n.alert-icon {\n height: var(--ic-space-lg);\n width: 1.375rem;\n margin-left: 1.125rem;\n}\n\n.icon-placeholder {\n margin-left: var(--ic-space-xs);\n}\n\n.alert-icon > svg {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n}\n\n/* required for Gatsby as prop does not seem to work when set to false */\n:host([showdefaulticon=\"false\"]) .icon-neutral {\n visibility: hidden;\n width: 0;\n margin-left: 0.625rem;\n}\n\n.icon-neutral > svg,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n fill: var(--ic-alert-icon-neutral);\n}\n\n:host([variant=\"info\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-info);\n}\n\n:host([variant=\"warning\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-warning);\n}\n\n:host([variant=\"error\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-error);\n}\n\n:host([variant=\"success\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-success);\n}\n\n.alert-content {\n display: flex;\n align-items: center;\n margin-left: 0.625rem;\n width: 100%;\n}\n\n.alert-message {\n display: flex;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n flex: 1;\n --ic-typography-color: var(--ic-alert-description);\n}\n\n.alert-message-title-above {\n display: inline;\n}\n\n.alert-title {\n margin-right: var(--ic-space-xs);\n --ic-typography-color: var(--ic-alert-title);\n}\n\n.alert-title-above {\n white-space: normal;\n}\n\n.alert-action-container {\n margin-right: var(--ic-space-xs);\n display: flex;\n align-items: center;\n}\n\n.dismiss-icon {\n margin-right: var(--ic-space-xxxs);\n margin-left: -0.375rem;\n padding: 0.375rem;\n border: none;\n border-radius: 50%;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dismiss-icon > svg {\n color: var(--ic-alert-icon-dismissible);\n}\n\n.dismiss-icon:hover {\n cursor: pointer;\n}\n\n@media (max-width: 628px) {\n .alert-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-message {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-title {\n white-space: normal;\n }\n\n .alert-action-container {\n margin-bottom: var(--ic-space-xs);\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-border-hc);\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { isSlotUsed, renderDynamicChildSlots } from \"../../utils/helpers\";\nimport { IcBrandForegroundEnum, } from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n * @slot neutral-icon - A custom neutral icon is placed to the left of the title. This will override the default icon if used.\n */\nexport class Alert {\n constructor() {\n this.hostMutationObserver = null;\n this.dismissAction = () => {\n this.icDismiss.emit();\n };\n this.alertTitleWrap = false;\n this.visible = true;\n this.announced = true;\n this.dismissible = false;\n this.heading = \"\";\n this.message = undefined;\n this.showDefaultIcon = true;\n this.theme = \"inherit\";\n this.titleAbove = false;\n this.variant = \"neutral\";\n }\n disconnectedCallback() {\n var _a;\n (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n componentDidLoad() {\n this.alertTitleShouldWrap();\n this.hostMutationObserver = new MutationObserver((mutationList) => renderDynamicChildSlots(mutationList, \"action\", this));\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n handleClick() {\n this.visible = !this.visible;\n }\n alertTitleShouldWrap() {\n var _a;\n const titleHeight = (_a = this.el.shadowRoot.querySelector(\".alert-title\")) === null || _a === void 0 ? void 0 : _a.clientHeight;\n if (titleHeight > 24)\n this.alertTitleWrap = true;\n }\n render() {\n const { variant, heading, message, titleAbove, dismissible, announced, visible, showDefaultIcon, theme, } = this;\n return (visible && (h(Host, { role: announced ? \"alert\" : null, class: {\n [IcBrandForegroundEnum.Dark]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n } }, h(\"div\", { class: {\n [\"container\"]: true,\n [`container-${variant}`]: true,\n } }, h(\"div\", { class: \"alert-icon-container\" }, h(\"div\", { class: {\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n } }), variant === \"neutral\" ? (isSlotUsed(this.el, \"neutral-icon\") ? (h(\"div\", { class: \"alert-icon svg-container icon-neutral\" }, h(\"slot\", { name: \"neutral-icon\" }))) : showDefaultIcon ? (h(\"span\", { class: {\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }, innerHTML: VARIANT_ICONS[variant].icon })) : (h(\"div\", { class: \"icon-placeholder\" }))) : (h(\"span\", { class: {\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }, innerHTML: VARIANT_ICONS[variant].icon }))), h(\"div\", { class: \"alert-content\" }, h(\"div\", { class: {\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]: titleAbove || this.alertTitleWrap,\n } }, heading && (h(\"ic-typography\", { class: {\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }, variant: \"subtitle-large\" }, h(\"p\", null, heading))), h(\"slot\", { name: \"message\" }, h(\"ic-typography\", { variant: \"body\" }, message))), isSlotUsed(this.el, \"action\") && (h(\"div\", { class: \"alert-action-container\" }, h(\"slot\", { name: \"action\" })))), h(\"div\", { class: \"dismiss-icon-container\" }, dismissible && (h(\"ic-button\", { class: {\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }, innerHTML: closeIcon, onClick: this.dismissAction, variant: \"icon\", theme: \"dark\", title: \"Dismiss\" })))))));\n }\n static get is() { return \"ic-alert\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-alert.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-alert.css\"]\n };\n }\n static get properties() {\n return {\n \"announced\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\"\n },\n \"attribute\": \"announced\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"dismissible\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the alert will have a close icon at the end to dismiss it.\"\n },\n \"attribute\": \"dismissible\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"heading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The optional title to display at the start of the alert.\"\n },\n \"attribute\": \"heading\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"message\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The main body message of the alert.\"\n },\n \"attribute\": \"message\",\n \"reflect\": false\n },\n \"showDefaultIcon\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the default icon for the neutral variant will appear on the left of the alert.\"\n },\n \"attribute\": \"show-default-icon\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"titleAbove\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the title and message will appear above and below instead of inline.\"\n },\n \"attribute\": \"title-above\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcStatusVariants\",\n \"resolved\": \"\\\"error\\\" | \\\"info\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcStatusVariants\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcStatusVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the alert which will be rendered.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"neutral\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"alertTitleWrap\": {},\n \"visible\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icDismiss\",\n \"name\": \"icDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Is emitted when the user dismisses the alert.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"icDismiss\",\n \"method\": \"handleClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-alert.js.map\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { D as DEVICE_SIZES, m as getCurrentDeviceSize, c as checkResizeObserver } from './helpers.js';
2
+ import { D as DEVICE_SIZES, n as getCurrentDeviceSize, c as checkResizeObserver } from './helpers.js';
3
3
  import { d as defineCustomElement$3 } from './ic-breadcrumb2.js';
4
4
  import { d as defineCustomElement$2 } from './ic-link2.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as chevronIcon } from './chevron-icon.js';
3
- import { i as isSlotUsed, l as isPropDefined } from './helpers.js';
3
+ import { i as isSlotUsed, m as getSlotElements, l as isPropDefined } from './helpers.js';
4
4
  import { d as defineCustomElement$1 } from './ic-link2.js';
5
5
 
6
6
  const backIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -8,13 +8,40 @@ const backIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/
8
8
  </svg>
9
9
  `;
10
10
 
11
- const icBreadcrumbCss = ":host{display:block;margin:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}:host .breadcrumb{display:flex;align-items:center;white-space:nowrap;gap:var(--ic-space-xs);min-height:var(--ic-space-lg)}:host .chevron{width:var(--ic-space-lg);height:var(--ic-space-lg)}:host .chevron svg,:host(.ic-breadcrumb-monochrome) .chevron svg{color:var(--ic-breadcrumb-icon-chevron)}:host(:first-child) .chevron{display:none}.back-icon svg{color:var(--ic-breadcrumb-icon)}:host(.ic-breadcrumb-monochrome) .back-icon svg{color:var(--ic-breadcrumb-icon-monochrome)}:host(.ic-breadcrumb-back){display:flex;align-items:center}:host(.ic-breadcrumb-back) .chevron{display:none}ic-link{--breadcrumb-link-display:inline-flex;--breadcrumb-link-align-items:center;--breadcrumb-link-gap:var(--ic-space-xs)}:host([aria-current=\"page\"]) .current-page-container{display:flex;align-items:center;gap:var(--ic-space-xs);color:var(--ic-breadcrumb-text)}:host([aria-current=\"page\"].ic-breadcrumb-monochrome) .current-page-container{color:var(--ic-breadcrumb-text-monochrome)}:host(.collapsed-breadcrumb-wrapper){margin-right:var(--ic-space-xs) !important;display:flex;align-items:center;gap:var(--ic-space-xs)}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb){border:none;background-color:transparent;color:var(--ic-color-hyperlink-default);text-decoration:underline;font-weight:var(--ic-font-weight-bold);cursor:pointer}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus){outline:var(--ic-hc-focus-outline);border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}.hide,:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide){display:none}@media (forced-colors: active){.back-icon svg{color:currentcolor}}@supports (text-underline-offset: 25%){ic-link{--breadcrumb-link-display:flex}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
11
+ const icBreadcrumbCss = ":host{display:block;margin:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}:host .breadcrumb{display:flex;align-items:center;white-space:nowrap;gap:var(--ic-space-xs);min-height:var(--ic-space-lg)}:host .chevron{width:var(--ic-space-lg);height:var(--ic-space-lg)}:host .chevron svg,:host(.ic-breadcrumb-monochrome) .chevron svg{color:var(--ic-breadcrumb-icon-chevron)}:host(:first-child) .chevron{display:none}.back-icon svg{color:var(--ic-breadcrumb-icon)}:host(.ic-breadcrumb-monochrome) .back-icon svg{color:var(--ic-breadcrumb-icon-monochrome)}:host(.ic-breadcrumb-back){display:flex;align-items:center}:host(.ic-breadcrumb-back) .chevron{display:none}ic-link{--breadcrumb-link-display:inline-flex;--breadcrumb-link-align-items:center;--breadcrumb-link-gap:var(--ic-space-xs)}:host([aria-current=\"page\"]){cursor:text}:host([aria-current=\"page\"]) .current-page-container{display:flex;align-items:center;gap:var(--ic-space-xs);color:var(--ic-breadcrumb-text)}:host([aria-current=\"page\"].ic-breadcrumb-monochrome) .current-page-container{color:var(--ic-breadcrumb-text-monochrome)}:host([aria-current=\"page\"]) slot{pointer-events:none}:host(.collapsed-breadcrumb-wrapper){margin-right:var(--ic-space-xs) !important;display:flex;align-items:center;gap:var(--ic-space-xs)}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb){border:none;background-color:transparent;color:var(--ic-color-hyperlink-default);text-decoration:underline;font-weight:var(--ic-font-weight-bold);cursor:pointer}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus){outline:var(--ic-hc-focus-outline);border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}.hide,:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide){display:none}@media (forced-colors: active){.back-icon svg{color:currentcolor}}@supports (text-underline-offset: 25%){ic-link{--breadcrumb-link-display:flex}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
12
12
 
13
13
  const Breadcrumb = /*@__PURE__*/ proxyCustomElement(class Breadcrumb extends HTMLElement {
14
14
  constructor() {
15
15
  super();
16
16
  this.__registerHost();
17
17
  this.__attachShadow();
18
+ this.HREF_ATTR = "href";
19
+ // Prevent focus on breadcrumb if current page and contains slotted link
20
+ this.updatedSlottedLinkFocus = () => {
21
+ // Sets tabindex on wrong element in unit test snapshots
22
+ // - related to known Jest issue: https://github.com/ionic-team/stencil/issues/2830
23
+ if (this.linkSlotContent) {
24
+ this.linkSlotContent.tabIndex = this.current ? -1 : 0; // Prevent focus
25
+ }
26
+ if (this.slottedLinkEl) {
27
+ if (this.current) {
28
+ this.slottedLinkEl.removeAttribute(this.HREF_ATTR); // Prevent screen reader announcing breadcrumb as a link
29
+ }
30
+ else {
31
+ this.slottedLinkEl.setAttribute(this.HREF_ATTR, this.slottedLinkHref);
32
+ }
33
+ }
34
+ };
35
+ this.getSlottedLinkEl = () => {
36
+ const link = this.linkSlotContent;
37
+ if (link) {
38
+ const elWithHref = link.hasAttribute(this.HREF_ATTR)
39
+ ? link
40
+ : link.querySelector("[href]");
41
+ return elWithHref;
42
+ }
43
+ return null;
44
+ };
18
45
  this.renderDefaultBreadcrumb = (current, pageTitle, describedById, href) => {
19
46
  const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== "";
20
47
  if (current && hasPageTitle) {
@@ -44,6 +71,20 @@ const Breadcrumb = /*@__PURE__*/ proxyCustomElement(class Breadcrumb extends HTM
44
71
  this.showBackIcon = false;
45
72
  this.theme = "inherit";
46
73
  }
74
+ watchCurrentHandler() {
75
+ this.updatedSlottedLinkFocus();
76
+ this.el.ariaCurrent = this.current ? "page" : null;
77
+ }
78
+ componentDidLoad() {
79
+ var _a;
80
+ const slottedLinkWrapper = this.el.shadowRoot.querySelector(".link-wrapper");
81
+ if (slottedLinkWrapper) {
82
+ this.linkSlotContent = getSlotElements(slottedLinkWrapper)[0];
83
+ this.slottedLinkEl = this.getSlottedLinkEl();
84
+ this.slottedLinkHref = (_a = this.slottedLinkEl) === null || _a === void 0 ? void 0 : _a.getAttribute("href");
85
+ this.updatedSlottedLinkFocus();
86
+ }
87
+ }
47
88
  componentWillRender() {
48
89
  this.setSlottedCurrentPageClass();
49
90
  }
@@ -64,10 +105,13 @@ const Breadcrumb = /*@__PURE__*/ proxyCustomElement(class Breadcrumb extends HTM
64
105
  "ic-breadcrumb-back": this.showBackIcon,
65
106
  [`ic-theme-${this.theme}`]: this.theme !== "inherit",
66
107
  "ic-breadcrumb-monochrome": this.monochrome,
67
- }, "aria-current": current && "page", role: "listitem" }, h("div", { class: "breadcrumb" }, h("span", { innerHTML: chevronIcon, class: "chevron", "aria-hidden": "true" }), this.showBackIcon && describedById && (h("span", { id: describedById, class: "hide" }, `Back to ${pageTitle}`)), hasPageTitle && hasHref ? (this.renderDefaultBreadcrumb(current, pageTitle, describedById, href)) : (h("slot", null)))));
108
+ }, "aria-current": current && "page", role: "listitem" }, h("div", { class: "breadcrumb" }, h("span", { innerHTML: chevronIcon, class: "chevron", "aria-hidden": "true" }), this.showBackIcon && describedById && (h("span", { id: describedById, class: "hide" }, `Back to ${pageTitle}`)), hasPageTitle && hasHref ? (this.renderDefaultBreadcrumb(current, pageTitle, describedById, href)) : (h("span", { class: "link-wrapper" }, h("slot", null))))));
68
109
  }
69
110
  static get delegatesFocus() { return true; }
70
111
  get el() { return this; }
112
+ static get watchers() { return {
113
+ "current": ["watchCurrentHandler"]
114
+ }; }
71
115
  static get style() { return icBreadcrumbCss; }
72
116
  }, [17, "ic-breadcrumb", {
73
117
  "current": [4],
@@ -77,6 +121,8 @@ const Breadcrumb = /*@__PURE__*/ proxyCustomElement(class Breadcrumb extends HTM
77
121
  "showBackIcon": [516, "show-back-icon"],
78
122
  "theme": [1],
79
123
  "setFocus": [64]
124
+ }, undefined, {
125
+ "current": ["watchCurrentHandler"]
80
126
  }]);
81
127
  function defineCustomElement() {
82
128
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"ic-breadcrumb2.js","mappings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;QACpE,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;gBACjB,oBAAoB,EAAE,IAAI,CAAC,YAAY;gBACvC,CAAC,YAAY,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS;gBACpD,0BAA0B,EAAE,IAAI,CAAC,UAAU;aAC9C,EAAE,cAAc,EAAE,OAAO,IAAI,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,YAAY,IAAI,aAAa,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,SAAS,EAAE,CAAC,CAAC,EAAE,YAAY,IAAI,OAAO,IAAI,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;KAC7Z;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js"],"sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg,\n:host(.ic-breadcrumb-monochrome) .chevron svg {\n color: var(--ic-breadcrumb-icon-chevron);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: var(--ic-breadcrumb-icon);\n}\n\n:host(.ic-breadcrumb-monochrome) .back-icon svg {\n color: var(--ic-breadcrumb-icon-monochrome);\n}\n\n:host(.ic-breadcrumb-back) {\n display: flex;\n align-items: center;\n}\n\n:host(.ic-breadcrumb-back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: inline-flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n color: var(--ic-breadcrumb-text);\n}\n\n:host([aria-current=\"page\"].ic-breadcrumb-monochrome) .current-page-container {\n color: var(--ic-breadcrumb-text-monochrome);\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-color-hyperlink-default);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n\n@supports (text-underline-offset: 25%) {\n ic-link {\n --breadcrumb-link-display: flex;\n }\n\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import { Host, h } from \"@stencil/core\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { isPropDefined, isSlotUsed } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\nexport class Breadcrumb {\n constructor() {\n this.renderDefaultBreadcrumb = (current, pageTitle, describedById, href) => {\n const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== \"\";\n if (current && hasPageTitle) {\n return (h(\"span\", { class: {\n \"current-page-container\": current,\n } }, isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle));\n }\n return (h(\"ic-link\", { theme: this.theme, monochrome: this.monochrome, href: href, class: \"breadcrumb-link\", \"aria-describedby\": this.showBackIcon && describedById && describedById }, this.showBackIcon && (h(\"div\", { class: \"back-icon\", innerHTML: backIcon })), isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle));\n };\n this.setSlottedCurrentPageClass = () => {\n const icLink = this.el.querySelector(\"ic-link\");\n const currentPage = \"current-page\";\n if (icLink) {\n icLink.classList.remove(currentPage);\n if (this.current) {\n const hasCurrentPageClass = icLink.classList.contains(currentPage);\n if (!hasCurrentPageClass) {\n icLink.classList.add(\"breadcrumb-link\", currentPage);\n }\n }\n }\n };\n this.current = false;\n this.href = undefined;\n this.monochrome = false;\n this.pageTitle = undefined;\n this.showBackIcon = false;\n this.theme = \"inherit\";\n }\n componentWillRender() {\n this.setSlottedCurrentPageClass();\n }\n /**\n * Sets focus on the breadcrumb.\n */\n async setFocus() {\n if (this.el.shadowRoot.querySelector(\"ic-link\")) {\n this.el.shadowRoot.querySelector(\"ic-link\").focus();\n }\n }\n render() {\n const { current, href, pageTitle } = this;\n const describedById = `${pageTitle && pageTitle.toLowerCase().replace(\" \", \"-\")}-describedby`;\n const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== \"\";\n const hasHref = href !== null && isPropDefined(href) && href !== \"\";\n return (h(Host, { class: {\n \"ic-breadcrumb-back\": this.showBackIcon,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n \"ic-breadcrumb-monochrome\": this.monochrome,\n }, \"aria-current\": current && \"page\", role: \"listitem\" }, h(\"div\", { class: \"breadcrumb\" }, h(\"span\", { innerHTML: chevronIcon, class: \"chevron\", \"aria-hidden\": \"true\" }), this.showBackIcon && describedById && (h(\"span\", { id: describedById, class: \"hide\" }, `Back to ${pageTitle}`)), hasPageTitle && hasHref ? (this.renderDefaultBreadcrumb(current, pageTitle, describedById, href)) : (h(\"slot\", null)))));\n }\n static get is() { return \"ic-breadcrumb\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get properties() {\n return {\n \"current\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, aria-current will be set on the breadcrumb.\"\n },\n \"attribute\": \"current\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The URL that the breadcrumb link points to.\"\n },\n \"attribute\": \"href\",\n \"reflect\": false\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, the breadcrumb will display as black in the light theme, and white in the dark theme.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"pageTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title of the breadcrumb.\"\n },\n \"attribute\": \"page-title\",\n \"reflect\": false\n },\n \"showBackIcon\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, back icon will be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"show-back-icon\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n }\n };\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the breadcrumb.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-breadcrumb.js.map\n"],"version":3}
1
+ {"file":"ic-breadcrumb2.js","mappings":";;;;;;;;;;AAAA,MAAM,eAAe,GAAG,2wEAA2wE;;MCOtxE,UAAU;IACnB;;;;QACI,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC;;QAExB,IAAI,CAAC,uBAAuB,GAAG;;;YAG3B,IAAI,IAAI,CAAC,eAAe,EAAE;gBACtB,IAAI,CAAC,eAAe,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;aACzD;YACD,IAAI,IAAI,CAAC,aAAa,EAAE;gBACpB,IAAI,IAAI,CAAC,OAAO,EAAE;oBACd,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACtD;qBACI;oBACD,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;iBACzE;aACJ;SACJ,CAAC;QACF,IAAI,CAAC,gBAAgB,GAAG;YACpB,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC;YAClC,IAAI,IAAI,EAAE;gBACN,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;sBAC9C,IAAI;sBACJ,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;gBACnC,OAAO,UAAU,CAAC;aACrB;YACD,OAAO,IAAI,CAAC;SACf,CAAC;QACF,IAAI,CAAC,uBAAuB,GAAG,CAAC,OA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,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;KACnc;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js"],"sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg,\n:host(.ic-breadcrumb-monochrome) .chevron svg {\n color: var(--ic-breadcrumb-icon-chevron);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: var(--ic-breadcrumb-icon);\n}\n\n:host(.ic-breadcrumb-monochrome) .back-icon svg {\n color: var(--ic-breadcrumb-icon-monochrome);\n}\n\n:host(.ic-breadcrumb-back) {\n display: flex;\n align-items: center;\n}\n\n:host(.ic-breadcrumb-back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: inline-flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) {\n cursor: text;\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n color: var(--ic-breadcrumb-text);\n}\n\n:host([aria-current=\"page\"].ic-breadcrumb-monochrome) .current-page-container {\n color: var(--ic-breadcrumb-text-monochrome);\n}\n\n:host([aria-current=\"page\"]) slot {\n pointer-events: none;\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-color-hyperlink-default);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n\n@supports (text-underline-offset: 25%) {\n ic-link {\n --breadcrumb-link-display: flex;\n }\n\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { getSlotElements, isPropDefined, isSlotUsed, } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\nexport class Breadcrumb {\n constructor() {\n this.HREF_ATTR = \"href\";\n // Prevent focus on breadcrumb if current page and contains slotted link\n this.updatedSlottedLinkFocus = () => {\n // Sets tabindex on wrong element in unit test snapshots\n // - related to known Jest issue: https://github.com/ionic-team/stencil/issues/2830\n if (this.linkSlotContent) {\n this.linkSlotContent.tabIndex = this.current ? -1 : 0; // Prevent focus\n }\n if (this.slottedLinkEl) {\n if (this.current) {\n this.slottedLinkEl.removeAttribute(this.HREF_ATTR); // Prevent screen reader announcing breadcrumb as a link\n }\n else {\n this.slottedLinkEl.setAttribute(this.HREF_ATTR, this.slottedLinkHref);\n }\n }\n };\n this.getSlottedLinkEl = () => {\n const link = this.linkSlotContent;\n if (link) {\n const elWithHref = link.hasAttribute(this.HREF_ATTR)\n ? link\n : link.querySelector(\"[href]\");\n return elWithHref;\n }\n return null;\n };\n this.renderDefaultBreadcrumb = (current, pageTitle, describedById, href) => {\n const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== \"\";\n if (current && hasPageTitle) {\n return (h(\"span\", { class: {\n \"current-page-container\": current,\n } }, isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle));\n }\n return (h(\"ic-link\", { theme: this.theme, monochrome: this.monochrome, href: href, class: \"breadcrumb-link\", \"aria-describedby\": this.showBackIcon && describedById && describedById }, this.showBackIcon && (h(\"div\", { class: \"back-icon\", innerHTML: backIcon })), isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle));\n };\n this.setSlottedCurrentPageClass = () => {\n const icLink = this.el.querySelector(\"ic-link\");\n const currentPage = \"current-page\";\n if (icLink) {\n icLink.classList.remove(currentPage);\n if (this.current) {\n const hasCurrentPageClass = icLink.classList.contains(currentPage);\n if (!hasCurrentPageClass) {\n icLink.classList.add(\"breadcrumb-link\", currentPage);\n }\n }\n }\n };\n this.current = false;\n this.href = undefined;\n this.monochrome = false;\n this.pageTitle = undefined;\n this.showBackIcon = false;\n this.theme = \"inherit\";\n }\n watchCurrentHandler() {\n this.updatedSlottedLinkFocus();\n this.el.ariaCurrent = this.current ? \"page\" : null;\n }\n componentDidLoad() {\n var _a;\n const slottedLinkWrapper = this.el.shadowRoot.querySelector(\".link-wrapper\");\n if (slottedLinkWrapper) {\n this.linkSlotContent = getSlotElements(slottedLinkWrapper)[0];\n this.slottedLinkEl = this.getSlottedLinkEl();\n this.slottedLinkHref = (_a = this.slottedLinkEl) === null || _a === void 0 ? void 0 : _a.getAttribute(\"href\");\n this.updatedSlottedLinkFocus();\n }\n }\n componentWillRender() {\n this.setSlottedCurrentPageClass();\n }\n /**\n * Sets focus on the breadcrumb.\n */\n async setFocus() {\n if (this.el.shadowRoot.querySelector(\"ic-link\")) {\n this.el.shadowRoot.querySelector(\"ic-link\").focus();\n }\n }\n render() {\n const { current, href, pageTitle } = this;\n const describedById = `${pageTitle && pageTitle.toLowerCase().replace(\" \", \"-\")}-describedby`;\n const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== \"\";\n const hasHref = href !== null && isPropDefined(href) && href !== \"\";\n return (h(Host, { class: {\n \"ic-breadcrumb-back\": this.showBackIcon,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n \"ic-breadcrumb-monochrome\": this.monochrome,\n }, \"aria-current\": current && \"page\", role: \"listitem\" }, h(\"div\", { class: \"breadcrumb\" }, h(\"span\", { innerHTML: chevronIcon, class: \"chevron\", \"aria-hidden\": \"true\" }), this.showBackIcon && describedById && (h(\"span\", { id: describedById, class: \"hide\" }, `Back to ${pageTitle}`)), hasPageTitle && hasHref ? (this.renderDefaultBreadcrumb(current, pageTitle, describedById, href)) : (h(\"span\", { class: \"link-wrapper\" }, h(\"slot\", null))))));\n }\n static get is() { return \"ic-breadcrumb\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get properties() {\n return {\n \"current\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, aria-current will be set on the breadcrumb.\"\n },\n \"attribute\": \"current\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The URL that the breadcrumb link points to.\"\n },\n \"attribute\": \"href\",\n \"reflect\": false\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, the breadcrumb will display as black in the light theme, and white in the dark theme.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"pageTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title of the breadcrumb.\"\n },\n \"attribute\": \"page-title\",\n \"reflect\": false\n },\n \"showBackIcon\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, back icon will be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"show-back-icon\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n }\n };\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the breadcrumb.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"current\",\n \"methodName\": \"watchCurrentHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-breadcrumb.js.map\n"],"version":3}