@ukic/web-components 3.2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-789082d4.js → helpers-fc4016d2.js} +21 -37
  3. package/dist/cjs/helpers-fc4016d2.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-accordion.cjs.entry.js +10 -8
  6. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +2 -2
  8. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-badge.cjs.entry.js +4 -4
  11. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +56 -76
  13. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb.cjs.entry.js +32 -51
  15. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-button_3.cjs.entry.js +110 -131
  17. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-card-vertical.cjs.entry.js +6 -6
  19. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-checkbox-group.cjs.entry.js +9 -10
  21. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-checkbox.cjs.entry.js +37 -41
  23. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-chip.cjs.entry.js +26 -38
  25. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
  27. package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
  28. package/dist/cjs/ic-dialog.cjs.entry.js +2 -2
  29. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-empty-state.cjs.entry.js +3 -3
  31. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
  33. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-hero.cjs.entry.js +7 -6
  35. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -6
  37. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +23 -22
  38. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-input-label_2.cjs.entry.js +8 -8
  40. package/dist/cjs/ic-link.cjs.entry.js +12 -4
  41. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  43. package/dist/cjs/ic-menu-item.cjs.entry.js +5 -5
  44. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -3
  46. package/dist/cjs/ic-navigation-group.cjs.entry.js +116 -164
  47. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-navigation-item.cjs.entry.js +65 -62
  49. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
  51. package/dist/cjs/ic-page-header.cjs.entry.js +7 -7
  52. package/dist/cjs/ic-pagination-item.cjs.entry.js +2 -2
  53. package/dist/cjs/ic-pagination.cjs.entry.js +5 -5
  54. package/dist/cjs/ic-popover-menu.cjs.entry.js +8 -7
  55. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-radio-group.cjs.entry.js +5 -5
  57. package/dist/cjs/ic-radio-option.cjs.entry.js +5 -5
  58. package/dist/cjs/ic-search-bar.cjs.entry.js +149 -154
  59. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  61. package/dist/cjs/ic-select.cjs.entry.js +142 -218
  62. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-side-navigation.cjs.entry.js +25 -6
  64. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  66. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  67. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  68. package/dist/cjs/ic-step.cjs.entry.js +14 -14
  69. package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
  70. package/dist/cjs/ic-switch.cjs.entry.js +6 -6
  71. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  74. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  75. package/dist/cjs/ic-tab.cjs.entry.js +3 -3
  76. package/dist/cjs/ic-text-field.cjs.entry.js +39 -31
  77. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-theme.cjs.entry.js +2 -2
  79. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  80. package/dist/cjs/ic-toast.cjs.entry.js +4 -4
  81. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +54 -68
  82. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-toggle-button.cjs.entry.js +62 -64
  84. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-top-navigation.cjs.entry.js +65 -63
  86. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-typography.cjs.entry.js +3 -3
  88. package/dist/cjs/loader.cjs.js +1 -1
  89. package/dist/collection/components/ic-accordion/ic-accordion.js +9 -7
  90. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  91. package/dist/collection/components/ic-accordion/ic-accordion.stories.js +1 -1
  92. package/dist/collection/components/ic-alert/ic-alert.css +4 -0
  93. package/dist/collection/components/ic-badge/ic-badge.css +1 -1
  94. package/dist/collection/components/ic-badge/ic-badge.js +2 -2
  95. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +40 -59
  96. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
  97. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +65 -86
  98. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
  99. package/dist/collection/components/ic-button/ic-button.css +105 -62
  100. package/dist/collection/components/ic-button/ic-button.js +141 -162
  101. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  102. package/dist/collection/components/ic-button/ic-button.stories.js +10 -2
  103. package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +3 -0
  104. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +4 -4
  105. package/dist/collection/components/ic-checkbox/ic-checkbox.css +9 -1
  106. package/dist/collection/components/ic-checkbox/ic-checkbox.js +73 -80
  107. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  108. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +24 -25
  109. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  110. package/dist/collection/components/ic-chip/ic-chip.css +9 -0
  111. package/dist/collection/components/ic-chip/ic-chip.js +66 -72
  112. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  113. package/dist/collection/components/ic-chip/ic-chip.stories.js +2 -1
  114. package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
  115. package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
  116. package/dist/collection/components/ic-dialog/ic-dialog.js +1 -1
  117. package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
  118. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
  119. package/dist/collection/components/ic-hero/ic-hero.css +13 -4
  120. package/dist/collection/components/ic-hero/ic-hero.js +5 -4
  121. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  122. package/dist/collection/components/ic-hero/ic-hero.stories.js +1 -0
  123. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
  124. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
  125. package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
  126. package/dist/collection/components/ic-input-label/ic-input-label.js +4 -4
  127. package/dist/collection/components/ic-input-validation/ic-input-validation.js +3 -3
  128. package/dist/collection/components/ic-link/ic-link.js +12 -4
  129. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  130. package/dist/collection/components/ic-link/ic-link.stories.js +28 -5
  131. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +3 -3
  132. package/dist/collection/components/ic-menu/ic-menu.js +41 -40
  133. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  134. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  135. package/dist/collection/components/ic-menu-item/ic-menu-item.css +0 -5
  136. package/dist/collection/components/ic-menu-item/ic-menu-item.js +3 -3
  137. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  138. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +2 -2
  139. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +119 -167
  140. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  141. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +7 -13
  142. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +80 -74
  143. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  144. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
  145. package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
  146. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  147. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
  148. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +3 -5
  149. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +6 -5
  150. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  151. package/dist/collection/components/ic-radio-group/ic-radio-group.js +4 -4
  152. package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
  153. package/dist/collection/components/ic-search-bar/ic-search-bar.js +208 -211
  154. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  155. package/dist/collection/components/ic-search-bar/ic-search-bar.stories.js +9 -8
  156. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  157. package/dist/collection/components/ic-select/ic-select.js +196 -271
  158. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  159. package/dist/collection/components/ic-select/ic-select_(single).stories.js +30 -21
  160. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +1 -1
  161. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +43 -4
  162. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  163. package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +247 -0
  164. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  165. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  166. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  167. package/dist/collection/components/ic-step/ic-step.js +13 -13
  168. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  169. package/dist/collection/components/ic-switch/ic-switch.js +5 -5
  170. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  171. package/dist/collection/components/ic-tab/ic-tab.js +2 -2
  172. package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -1
  173. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  174. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  175. package/dist/collection/components/ic-text-field/ic-text-field.js +124 -101
  176. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  177. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  178. package/dist/collection/components/ic-toast/ic-toast.js +3 -3
  179. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  180. package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +40 -7
  181. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +80 -82
  182. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  183. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +79 -88
  184. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
  185. package/dist/collection/components/ic-tooltip/ic-tooltip.js +2 -2
  186. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +81 -79
  187. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  188. package/dist/collection/components/ic-typography/ic-typography.js +2 -2
  189. package/dist/collection/utils/helpers.js +20 -36
  190. package/dist/collection/utils/helpers.js.map +1 -1
  191. package/dist/components/helpers.js +21 -37
  192. package/dist/components/helpers.js.map +1 -1
  193. package/dist/components/ic-accordion.js +9 -7
  194. package/dist/components/ic-accordion.js.map +1 -1
  195. package/dist/components/ic-alert.js +1 -1
  196. package/dist/components/ic-alert.js.map +1 -1
  197. package/dist/components/ic-badge.js +3 -3
  198. package/dist/components/ic-badge.js.map +1 -1
  199. package/dist/components/ic-breadcrumb-group.js +57 -78
  200. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  201. package/dist/components/ic-breadcrumb2.js +32 -51
  202. package/dist/components/ic-breadcrumb2.js.map +1 -1
  203. package/dist/components/ic-button2.js +105 -126
  204. package/dist/components/ic-button2.js.map +1 -1
  205. package/dist/components/ic-card-vertical.js +5 -5
  206. package/dist/components/ic-card-vertical.js.map +1 -1
  207. package/dist/components/ic-checkbox-group.js +8 -9
  208. package/dist/components/ic-checkbox-group.js.map +1 -1
  209. package/dist/components/ic-checkbox.js +39 -43
  210. package/dist/components/ic-checkbox.js.map +1 -1
  211. package/dist/components/ic-chip.js +28 -40
  212. package/dist/components/ic-chip.js.map +1 -1
  213. package/dist/components/ic-data-list.js +2 -2
  214. package/dist/components/ic-data-row.js +2 -2
  215. package/dist/components/ic-dialog.js +1 -1
  216. package/dist/components/ic-empty-state.js +2 -2
  217. package/dist/components/ic-footer-link.js +2 -2
  218. package/dist/components/ic-hero.js +6 -5
  219. package/dist/components/ic-hero.js.map +1 -1
  220. package/dist/components/ic-horizontal-scroll2.js +5 -5
  221. package/dist/components/ic-input-component-container2.js +3 -3
  222. package/dist/components/ic-input-container2.js +2 -2
  223. package/dist/components/ic-input-label2.js +4 -4
  224. package/dist/components/ic-input-validation2.js +3 -3
  225. package/dist/components/ic-link2.js +11 -3
  226. package/dist/components/ic-link2.js.map +1 -1
  227. package/dist/components/ic-loading-indicator2.js +3 -3
  228. package/dist/components/ic-menu-group.js +1 -1
  229. package/dist/components/ic-menu-item2.js +4 -4
  230. package/dist/components/ic-menu-item2.js.map +1 -1
  231. package/dist/components/ic-menu2.js +17 -16
  232. package/dist/components/ic-menu2.js.map +1 -1
  233. package/dist/components/ic-navigation-button.js +2 -2
  234. package/dist/components/ic-navigation-group.js +115 -163
  235. package/dist/components/ic-navigation-group.js.map +1 -1
  236. package/dist/components/ic-navigation-item.js +67 -62
  237. package/dist/components/ic-navigation-item.js.map +1 -1
  238. package/dist/components/ic-navigation-menu2.js +4 -4
  239. package/dist/components/ic-page-header.js +6 -6
  240. package/dist/components/ic-pagination-item2.js +1 -1
  241. package/dist/components/ic-pagination.js +4 -4
  242. package/dist/components/ic-popover-menu.js +7 -6
  243. package/dist/components/ic-popover-menu.js.map +1 -1
  244. package/dist/components/ic-radio-group.js +4 -4
  245. package/dist/components/ic-radio-group.js.map +1 -1
  246. package/dist/components/ic-radio-option.js +4 -4
  247. package/dist/components/ic-search-bar.js +150 -154
  248. package/dist/components/ic-search-bar.js.map +1 -1
  249. package/dist/components/ic-section-container2.js +2 -2
  250. package/dist/components/ic-select.js +141 -217
  251. package/dist/components/ic-select.js.map +1 -1
  252. package/dist/components/ic-side-navigation.js +25 -5
  253. package/dist/components/ic-side-navigation.js.map +1 -1
  254. package/dist/components/ic-skeleton.js +2 -2
  255. package/dist/components/ic-skip-link.js +2 -2
  256. package/dist/components/ic-status-tag.js +2 -2
  257. package/dist/components/ic-step.js +13 -13
  258. package/dist/components/ic-stepper.js +2 -2
  259. package/dist/components/ic-switch.js +5 -5
  260. package/dist/components/ic-switch.js.map +1 -1
  261. package/dist/components/ic-tab-context.js +1 -1
  262. package/dist/components/ic-tab-group.js +2 -2
  263. package/dist/components/ic-tab-panel.js +2 -2
  264. package/dist/components/ic-tab-panel.js.map +1 -1
  265. package/dist/components/ic-tab.js +2 -2
  266. package/dist/components/ic-text-field.js +40 -31
  267. package/dist/components/ic-text-field.js.map +1 -1
  268. package/dist/components/ic-theme.js +1 -1
  269. package/dist/components/ic-toast-region.js +1 -1
  270. package/dist/components/ic-toast.js +3 -3
  271. package/dist/components/ic-toggle-button-group.js +53 -67
  272. package/dist/components/ic-toggle-button-group.js.map +1 -1
  273. package/dist/components/ic-toggle-button.js +61 -63
  274. package/dist/components/ic-toggle-button.js.map +1 -1
  275. package/dist/components/ic-tooltip2.js +2 -2
  276. package/dist/components/ic-top-navigation.js +65 -63
  277. package/dist/components/ic-top-navigation.js.map +1 -1
  278. package/dist/components/ic-typography2.js +2 -2
  279. package/dist/core/core.css +159 -109
  280. package/dist/core/core.esm.js +1 -1
  281. package/dist/core/core.esm.js.map +1 -1
  282. package/dist/core/p-0fb68b4f.entry.js +2 -0
  283. package/dist/core/p-0fb68b4f.entry.js.map +1 -0
  284. package/dist/core/{p-bbe5596b.entry.js → p-15b7adaf.entry.js} +2 -2
  285. package/dist/core/{p-abaea607.entry.js → p-1d172032.entry.js} +2 -2
  286. package/dist/core/{p-fc50d582.entry.js → p-1d254b71.entry.js} +2 -2
  287. package/dist/core/p-1d254b71.entry.js.map +1 -0
  288. package/dist/core/{p-6de6b6b7.entry.js → p-23536595.entry.js} +2 -2
  289. package/dist/core/{p-81a12e36.entry.js → p-26dfc4db.entry.js} +2 -2
  290. package/dist/core/{p-81a12e36.entry.js.map → p-26dfc4db.entry.js.map} +1 -1
  291. package/dist/core/{p-f3c72ffb.entry.js → p-2c371198.entry.js} +2 -2
  292. package/dist/core/p-3676ac4e.entry.js +2 -0
  293. package/dist/core/p-3676ac4e.entry.js.map +1 -0
  294. package/dist/core/{p-f34eee68.entry.js → p-3cb4ecef.entry.js} +2 -2
  295. package/dist/core/{p-3eb7ef1d.entry.js → p-432aeae0.entry.js} +2 -2
  296. package/dist/core/p-4a2acb2e.entry.js +2 -0
  297. package/dist/core/p-4a2acb2e.entry.js.map +1 -0
  298. package/dist/core/p-4dc97b03.entry.js +2 -0
  299. package/dist/core/p-4dc97b03.entry.js.map +1 -0
  300. package/dist/core/p-4e48a671.entry.js +2 -0
  301. package/dist/core/p-4e48a671.entry.js.map +1 -0
  302. package/dist/core/p-513628ef.entry.js +2 -0
  303. package/dist/core/p-513628ef.entry.js.map +1 -0
  304. package/dist/core/{p-88924aef.entry.js → p-51b49429.entry.js} +2 -2
  305. package/dist/core/p-554845c4.entry.js +2 -0
  306. package/dist/core/p-554845c4.entry.js.map +1 -0
  307. package/dist/core/{p-7afc71d0.entry.js → p-56e0de32.entry.js} +2 -2
  308. package/dist/core/{p-7a0d238b.entry.js → p-56fb0298.entry.js} +2 -2
  309. package/dist/core/p-59b48450.entry.js +2 -0
  310. package/dist/core/p-59b48450.entry.js.map +1 -0
  311. package/dist/core/{p-fbde763c.entry.js → p-5aec3757.entry.js} +2 -2
  312. package/dist/core/{p-23d059ff.entry.js → p-5eb2ac90.entry.js} +2 -2
  313. package/dist/core/{p-c2ca6274.entry.js → p-60aad45d.entry.js} +2 -2
  314. package/dist/core/{p-33c86ba6.entry.js → p-628c32b8.entry.js} +2 -2
  315. package/dist/core/p-6cd0b010.entry.js +2 -0
  316. package/dist/core/p-6cd0b010.entry.js.map +1 -0
  317. package/dist/core/{p-7dfe0284.entry.js → p-6eea869b.entry.js} +2 -2
  318. package/dist/core/{p-0631c3ab.entry.js → p-7d2c07e2.entry.js} +2 -2
  319. package/dist/core/p-7d352865.entry.js +2 -0
  320. package/dist/core/p-7d352865.entry.js.map +1 -0
  321. package/dist/core/{p-959a9cdf.entry.js → p-7deaf128.entry.js} +2 -2
  322. package/dist/core/{p-959a9cdf.entry.js.map → p-7deaf128.entry.js.map} +1 -1
  323. package/dist/core/p-803f2eb8.entry.js +2 -0
  324. package/dist/core/p-803f2eb8.entry.js.map +1 -0
  325. package/dist/core/p-8242c24f.js +2 -0
  326. package/dist/core/p-8242c24f.js.map +1 -0
  327. package/dist/core/p-87fa5add.entry.js +2 -0
  328. package/dist/core/p-87fa5add.entry.js.map +1 -0
  329. package/dist/core/{p-3675c4b4.entry.js → p-887e00bb.entry.js} +2 -2
  330. package/dist/core/p-8958c60f.entry.js +2 -0
  331. package/dist/core/p-8958c60f.entry.js.map +1 -0
  332. package/dist/core/{p-45432bf5.entry.js → p-8c77dd65.entry.js} +2 -2
  333. package/dist/core/{p-e2f893f0.entry.js → p-9a6dc8b1.entry.js} +2 -2
  334. package/dist/core/p-9a6dc8b1.entry.js.map +1 -0
  335. package/dist/core/{p-acebb05c.entry.js → p-9c47521d.entry.js} +2 -2
  336. package/dist/core/p-a140bcaa.entry.js +2 -0
  337. package/dist/core/p-a17499ff.entry.js +2 -0
  338. package/dist/core/p-a17499ff.entry.js.map +1 -0
  339. package/dist/core/{p-005cd8a8.entry.js → p-aad10013.entry.js} +2 -2
  340. package/dist/core/p-aad2abbf.entry.js +2 -0
  341. package/dist/core/p-aad2abbf.entry.js.map +1 -0
  342. package/dist/core/p-bdcc79dd.entry.js +2 -0
  343. package/dist/core/p-bdcc79dd.entry.js.map +1 -0
  344. package/dist/core/{p-de43d375.entry.js → p-bf3b853e.entry.js} +2 -2
  345. package/dist/core/{p-e56d0db2.entry.js → p-c59fd23e.entry.js} +2 -2
  346. package/dist/core/{p-f815f8c9.entry.js → p-c5ffe2cf.entry.js} +2 -2
  347. package/dist/core/{p-5206a978.entry.js → p-c8cf1ad5.entry.js} +2 -2
  348. package/dist/core/p-cfa9ed7d.entry.js +2 -0
  349. package/dist/core/p-cfa9ed7d.entry.js.map +1 -0
  350. package/dist/core/{p-23ed8b99.entry.js → p-d4903dcd.entry.js} +2 -2
  351. package/dist/core/{p-1e4cdd2d.entry.js → p-d82b27df.entry.js} +2 -2
  352. package/dist/core/{p-7c0914e7.entry.js → p-d8ce39ac.entry.js} +2 -2
  353. package/dist/core/{p-70700c7a.entry.js → p-dcce0dfd.entry.js} +2 -2
  354. package/dist/core/{p-40f2f58e.entry.js → p-de1e04ac.entry.js} +2 -2
  355. package/dist/core/{p-4b601e06.entry.js → p-dee21f6d.entry.js} +2 -2
  356. package/dist/core/{p-4245a976.entry.js → p-dfc8cba6.entry.js} +2 -2
  357. package/dist/core/{p-b3ac38c5.entry.js → p-e2629bfe.entry.js} +2 -2
  358. package/dist/core/{p-3b5d3e24.entry.js → p-e38fddbb.entry.js} +2 -2
  359. package/dist/core/p-e38fddbb.entry.js.map +1 -0
  360. package/dist/core/p-eca6e215.entry.js +2 -0
  361. package/dist/core/p-eca6e215.entry.js.map +1 -0
  362. package/dist/core/{p-44e4e8c1.entry.js → p-ef36181d.entry.js} +2 -2
  363. package/dist/core/{p-ef09b450.entry.js → p-ef4b752c.entry.js} +2 -2
  364. package/dist/core/p-ef4b752c.entry.js.map +1 -0
  365. package/dist/core/{p-b3d6d5be.entry.js → p-fa38ad2e.entry.js} +2 -2
  366. package/dist/core/p-fc4f7180.entry.js +2 -0
  367. package/dist/core/p-fc4f7180.entry.js.map +1 -0
  368. package/dist/esm/core.js +1 -1
  369. package/dist/esm/{helpers-46a2d1fd.js → helpers-f2ffaa7c.js} +22 -38
  370. package/dist/esm/helpers-f2ffaa7c.js.map +1 -0
  371. package/dist/esm/ic-accordion-group.entry.js +1 -1
  372. package/dist/esm/ic-accordion.entry.js +10 -8
  373. package/dist/esm/ic-accordion.entry.js.map +1 -1
  374. package/dist/esm/ic-alert.entry.js +2 -2
  375. package/dist/esm/ic-alert.entry.js.map +1 -1
  376. package/dist/esm/ic-back-to-top.entry.js +1 -1
  377. package/dist/esm/ic-badge.entry.js +4 -4
  378. package/dist/esm/ic-badge.entry.js.map +1 -1
  379. package/dist/esm/ic-breadcrumb-group.entry.js +56 -76
  380. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  381. package/dist/esm/ic-breadcrumb.entry.js +32 -51
  382. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  383. package/dist/esm/ic-button_3.entry.js +111 -132
  384. package/dist/esm/ic-button_3.entry.js.map +1 -1
  385. package/dist/esm/ic-card-vertical.entry.js +6 -6
  386. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  387. package/dist/esm/ic-checkbox-group.entry.js +9 -10
  388. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  389. package/dist/esm/ic-checkbox.entry.js +37 -41
  390. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  391. package/dist/esm/ic-chip.entry.js +26 -38
  392. package/dist/esm/ic-chip.entry.js.map +1 -1
  393. package/dist/esm/ic-data-list.entry.js +2 -2
  394. package/dist/esm/ic-data-row.entry.js +3 -3
  395. package/dist/esm/ic-dialog.entry.js +2 -2
  396. package/dist/esm/ic-divider.entry.js +1 -1
  397. package/dist/esm/ic-empty-state.entry.js +3 -3
  398. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  399. package/dist/esm/ic-footer-link.entry.js +3 -3
  400. package/dist/esm/ic-footer.entry.js +1 -1
  401. package/dist/esm/ic-hero.entry.js +7 -6
  402. package/dist/esm/ic-hero.entry.js.map +1 -1
  403. package/dist/esm/ic-horizontal-scroll.entry.js +6 -6
  404. package/dist/esm/ic-input-component-container_3.entry.js +23 -22
  405. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  406. package/dist/esm/ic-input-label_2.entry.js +8 -8
  407. package/dist/esm/ic-link.entry.js +12 -4
  408. package/dist/esm/ic-link.entry.js.map +1 -1
  409. package/dist/esm/ic-menu-group.entry.js +2 -2
  410. package/dist/esm/ic-menu-item.entry.js +5 -5
  411. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  412. package/dist/esm/ic-navigation-button.entry.js +3 -3
  413. package/dist/esm/ic-navigation-group.entry.js +116 -164
  414. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  415. package/dist/esm/ic-navigation-item.entry.js +65 -62
  416. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  417. package/dist/esm/ic-navigation-menu.entry.js +5 -5
  418. package/dist/esm/ic-page-header.entry.js +7 -7
  419. package/dist/esm/ic-pagination-item.entry.js +2 -2
  420. package/dist/esm/ic-pagination.entry.js +5 -5
  421. package/dist/esm/ic-popover-menu.entry.js +8 -7
  422. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  423. package/dist/esm/ic-radio-group.entry.js +5 -5
  424. package/dist/esm/ic-radio-option.entry.js +5 -5
  425. package/dist/esm/ic-search-bar.entry.js +149 -154
  426. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  427. package/dist/esm/ic-section-container.entry.js +2 -2
  428. package/dist/esm/ic-select.entry.js +142 -218
  429. package/dist/esm/ic-select.entry.js.map +1 -1
  430. package/dist/esm/ic-side-navigation.entry.js +25 -6
  431. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  432. package/dist/esm/ic-skeleton.entry.js +2 -2
  433. package/dist/esm/ic-skip-link.entry.js +2 -2
  434. package/dist/esm/ic-status-tag.entry.js +3 -3
  435. package/dist/esm/ic-step.entry.js +14 -14
  436. package/dist/esm/ic-stepper.entry.js +3 -3
  437. package/dist/esm/ic-switch.entry.js +6 -6
  438. package/dist/esm/ic-switch.entry.js.map +1 -1
  439. package/dist/esm/ic-tab-context.entry.js +1 -1
  440. package/dist/esm/ic-tab-group.entry.js +3 -3
  441. package/dist/esm/ic-tab-panel.entry.js +2 -2
  442. package/dist/esm/ic-tab.entry.js +3 -3
  443. package/dist/esm/ic-text-field.entry.js +39 -31
  444. package/dist/esm/ic-text-field.entry.js.map +1 -1
  445. package/dist/esm/ic-theme.entry.js +2 -2
  446. package/dist/esm/ic-toast-region.entry.js +1 -1
  447. package/dist/esm/ic-toast.entry.js +4 -4
  448. package/dist/esm/ic-toggle-button-group.entry.js +54 -68
  449. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  450. package/dist/esm/ic-toggle-button.entry.js +62 -64
  451. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  452. package/dist/esm/ic-top-navigation.entry.js +66 -64
  453. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  454. package/dist/esm/ic-typography.entry.js +3 -3
  455. package/dist/esm/loader.js +1 -1
  456. package/dist/types/components/ic-breadcrumb/ic-breadcrumb.d.ts +4 -6
  457. package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +9 -15
  458. package/dist/types/components/ic-button/ic-button.d.ts +29 -22
  459. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +14 -13
  460. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +8 -9
  461. package/dist/types/components/ic-chip/ic-chip.d.ts +13 -15
  462. package/dist/types/components/ic-link/ic-link.d.ts +2 -1
  463. package/dist/types/components/ic-menu/ic-menu.d.ts +12 -12
  464. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +4 -18
  465. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +9 -7
  466. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +40 -40
  467. package/dist/types/components/ic-select/ic-select.d.ts +36 -38
  468. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +5 -0
  469. package/dist/types/components/ic-text-field/ic-text-field.d.ts +40 -34
  470. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +10 -11
  471. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +10 -12
  472. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +9 -8
  473. package/dist/types/components.d.ts +216 -203
  474. package/dist/types/utils/helpers.d.ts +8 -8
  475. package/hydrate/index.js +1158 -1350
  476. package/hydrate/index.mjs +1158 -1350
  477. package/package.json +2 -2
  478. package/vscode-data.json +172 -4
  479. package/dist/cjs/helpers-789082d4.js.map +0 -1
  480. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.types.js +0 -2
  481. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.types.js.map +0 -1
  482. package/dist/core/p-0a8b3967.entry.js +0 -2
  483. package/dist/core/p-0a8b3967.entry.js.map +0 -1
  484. package/dist/core/p-0b4350df.entry.js +0 -2
  485. package/dist/core/p-0b4350df.entry.js.map +0 -1
  486. package/dist/core/p-0e618fc5.entry.js +0 -2
  487. package/dist/core/p-0e618fc5.entry.js.map +0 -1
  488. package/dist/core/p-18ecba80.entry.js +0 -2
  489. package/dist/core/p-18ecba80.entry.js.map +0 -1
  490. package/dist/core/p-281ce313.js +0 -2
  491. package/dist/core/p-281ce313.js.map +0 -1
  492. package/dist/core/p-30abe545.entry.js +0 -2
  493. package/dist/core/p-30abe545.entry.js.map +0 -1
  494. package/dist/core/p-3132270d.entry.js +0 -2
  495. package/dist/core/p-3132270d.entry.js.map +0 -1
  496. package/dist/core/p-3b5d3e24.entry.js.map +0 -1
  497. package/dist/core/p-517d7afb.entry.js +0 -2
  498. package/dist/core/p-517d7afb.entry.js.map +0 -1
  499. package/dist/core/p-5d4b0480.entry.js +0 -2
  500. package/dist/core/p-5d4b0480.entry.js.map +0 -1
  501. package/dist/core/p-5e18b899.entry.js +0 -2
  502. package/dist/core/p-5e18b899.entry.js.map +0 -1
  503. package/dist/core/p-6337fe1f.entry.js +0 -2
  504. package/dist/core/p-6337fe1f.entry.js.map +0 -1
  505. package/dist/core/p-63fe83ad.entry.js +0 -2
  506. package/dist/core/p-63fe83ad.entry.js.map +0 -1
  507. package/dist/core/p-8ba129fc.entry.js +0 -2
  508. package/dist/core/p-8ba129fc.entry.js.map +0 -1
  509. package/dist/core/p-950db960.entry.js +0 -2
  510. package/dist/core/p-950db960.entry.js.map +0 -1
  511. package/dist/core/p-9ea9a4ce.entry.js +0 -2
  512. package/dist/core/p-9ea9a4ce.entry.js.map +0 -1
  513. package/dist/core/p-a9c96e3e.entry.js +0 -2
  514. package/dist/core/p-a9c96e3e.entry.js.map +0 -1
  515. package/dist/core/p-ac7db165.entry.js +0 -2
  516. package/dist/core/p-ac7db165.entry.js.map +0 -1
  517. package/dist/core/p-c04f36c5.entry.js +0 -2
  518. package/dist/core/p-c62318a8.entry.js +0 -2
  519. package/dist/core/p-c62318a8.entry.js.map +0 -1
  520. package/dist/core/p-e2f893f0.entry.js.map +0 -1
  521. package/dist/core/p-e586ae7b.entry.js +0 -2
  522. package/dist/core/p-e586ae7b.entry.js.map +0 -1
  523. package/dist/core/p-ef09b450.entry.js.map +0 -1
  524. package/dist/core/p-fc50d582.entry.js.map +0 -1
  525. package/dist/core/p-fe833509.entry.js +0 -2
  526. package/dist/core/p-fe833509.entry.js.map +0 -1
  527. package/dist/esm/helpers-46a2d1fd.js.map +0 -1
  528. package/dist/types/components/ic-breadcrumb/ic-breadcrumb.types.d.ts +0 -1
  529. /package/dist/core/{p-bbe5596b.entry.js.map → p-15b7adaf.entry.js.map} +0 -0
  530. /package/dist/core/{p-abaea607.entry.js.map → p-1d172032.entry.js.map} +0 -0
  531. /package/dist/core/{p-6de6b6b7.entry.js.map → p-23536595.entry.js.map} +0 -0
  532. /package/dist/core/{p-f3c72ffb.entry.js.map → p-2c371198.entry.js.map} +0 -0
  533. /package/dist/core/{p-f34eee68.entry.js.map → p-3cb4ecef.entry.js.map} +0 -0
  534. /package/dist/core/{p-3eb7ef1d.entry.js.map → p-432aeae0.entry.js.map} +0 -0
  535. /package/dist/core/{p-88924aef.entry.js.map → p-51b49429.entry.js.map} +0 -0
  536. /package/dist/core/{p-7afc71d0.entry.js.map → p-56e0de32.entry.js.map} +0 -0
  537. /package/dist/core/{p-7a0d238b.entry.js.map → p-56fb0298.entry.js.map} +0 -0
  538. /package/dist/core/{p-fbde763c.entry.js.map → p-5aec3757.entry.js.map} +0 -0
  539. /package/dist/core/{p-23d059ff.entry.js.map → p-5eb2ac90.entry.js.map} +0 -0
  540. /package/dist/core/{p-c2ca6274.entry.js.map → p-60aad45d.entry.js.map} +0 -0
  541. /package/dist/core/{p-33c86ba6.entry.js.map → p-628c32b8.entry.js.map} +0 -0
  542. /package/dist/core/{p-7dfe0284.entry.js.map → p-6eea869b.entry.js.map} +0 -0
  543. /package/dist/core/{p-0631c3ab.entry.js.map → p-7d2c07e2.entry.js.map} +0 -0
  544. /package/dist/core/{p-3675c4b4.entry.js.map → p-887e00bb.entry.js.map} +0 -0
  545. /package/dist/core/{p-45432bf5.entry.js.map → p-8c77dd65.entry.js.map} +0 -0
  546. /package/dist/core/{p-acebb05c.entry.js.map → p-9c47521d.entry.js.map} +0 -0
  547. /package/dist/core/{p-c04f36c5.entry.js.map → p-a140bcaa.entry.js.map} +0 -0
  548. /package/dist/core/{p-005cd8a8.entry.js.map → p-aad10013.entry.js.map} +0 -0
  549. /package/dist/core/{p-de43d375.entry.js.map → p-bf3b853e.entry.js.map} +0 -0
  550. /package/dist/core/{p-e56d0db2.entry.js.map → p-c59fd23e.entry.js.map} +0 -0
  551. /package/dist/core/{p-f815f8c9.entry.js.map → p-c5ffe2cf.entry.js.map} +0 -0
  552. /package/dist/core/{p-5206a978.entry.js.map → p-c8cf1ad5.entry.js.map} +0 -0
  553. /package/dist/core/{p-23ed8b99.entry.js.map → p-d4903dcd.entry.js.map} +0 -0
  554. /package/dist/core/{p-1e4cdd2d.entry.js.map → p-d82b27df.entry.js.map} +0 -0
  555. /package/dist/core/{p-7c0914e7.entry.js.map → p-d8ce39ac.entry.js.map} +0 -0
  556. /package/dist/core/{p-70700c7a.entry.js.map → p-dcce0dfd.entry.js.map} +0 -0
  557. /package/dist/core/{p-40f2f58e.entry.js.map → p-de1e04ac.entry.js.map} +0 -0
  558. /package/dist/core/{p-4b601e06.entry.js.map → p-dee21f6d.entry.js.map} +0 -0
  559. /package/dist/core/{p-4245a976.entry.js.map → p-dfc8cba6.entry.js.map} +0 -0
  560. /package/dist/core/{p-b3ac38c5.entry.js.map → p-e2629bfe.entry.js.map} +0 -0
  561. /package/dist/core/{p-44e4e8c1.entry.js.map → p-ef36181d.entry.js.map} +0 -0
  562. /package/dist/core/{p-b3d6d5be.entry.js.map → p-fa38ad2e.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"file":"helpers-f2ffaa7c.js","mappings":";;IAyBY;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7FjC;MACa,aAAa,GAAG;IAC3B,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,sBAAsB;KAClC;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,OAAO;KACnB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACr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B,QAA2B;IAE3B,MAAM,OAAO,GAAG,CAAC,QAAkB,KACjC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAC7B,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;UACnB,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,KAAM,IAAgB,CAAC,IAAI,KAAK,IAAI,CAAC;UACvD,IAAgB,CAAC,IAAI,KAAK,QAAQ,CACxC,CAAC;IACJ,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;AACtD,EAAE;MAEW,YAAY,GAAG,CAAC,EAAe,KAC1C,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE;AAEvD;;;;MAIa,gBAAgB,GAAG,CAAC,SAAsB,eACrD,OAAA,CAAA,MAAA,SAAS,CAAC,aAAa,0CAAE,OAAO,MAAK,GAAG,SAAS,CAAC,OAAO,QAAQ,CAAA,GAAC;AAE7D,MAAM,oBAAoB,GAAG,CAClC,YAA8B,EAC9B,SAA4B,KAE5B,YAAY,CAAC,IAAI,CACf,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,KACjC,IAAI,KAAK,WAAW;IACpB,yBAAyB,CAAC,UAAU,EAAE,YAAY,EAAE,SAAS,CAAC,CACjE,CAAC;MAES,uBAAuB,GAAG,CACrC,YAA8B,EAC9B,SAA4B,EAC5B,GAAQ;IAER,IAAI,oBAAoB,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE;QACjD,WAAW,CAAC,GAAG,CAAC,CAAC;KAClB;AACH;;;;","names":[],"sources":["src/utils/types.ts","src/utils/constants.ts","src/utils/helpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcBrandForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\n\nexport type IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement | null;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcRequiredPropsTypes =\n | string\n | boolean\n | number\n | HTMLElement\n | IcMenuOption[]\n | undefined;\n\nexport type IcPropObject = { prop: IcRequiredPropsTypes; propName: string };\n\nexport type IcRelatedTarget = EventTarget | undefined;\n\nexport type IcOrientation = \"horizontal\" | \"vertical\";\n\nexport type IcEmphasisType = \"filled\" | \"outlined\";\n\nexport interface IcValueEventDetail {\n value: string;\n keyPressed?: string;\n}\n\nexport interface IcMultiValueEventDetail {\n value: string | string[] | null;\n keyPressed?: string;\n}\n\nexport interface IcBlurEventDetail {\n relatedTarget: IcRelatedTarget | null;\n}\n\nexport type IcSelectTypes = \"single\" | \"multi\";\n\nexport type IcSelectMethodTypes = \"auto\" | \"manual\";\n\nexport type IcDeviceSizes = 0 | 576 | 768 | 992 | 1200;\n\ntype RGB = `rgb(${string})`;\ntype RGBA = `rgba(${string})`;\ntype HEX = `#${string}`;\n\nexport type IcColor = RGB | RGBA | HEX;\n\nexport type IcIconPlacementOptions = \"left\" | \"right\" | \"top\";\n\nexport type IcButtonTooltipPlacement = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport type IcThemeSettings = \"dark\" | \"light\" | \"system\";\n","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\", \"ic-button\"],\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\n// Keyboard characters that do not affect the content of an input control when pressed\nexport const IGNORED_KEYBOARD_CHARACTERS = [\n \"Alt\",\n \"AltGraph\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"AudioVolumeDown\",\n \"AudioVolumeMute\",\n \"AudioVolumeUp\",\n \"CapsLock\",\n \"ContextMenu\",\n \"Control\",\n \"Delete\",\n \"End\",\n \"Enter\",\n \"Escape\",\n \"F1\",\n \"F10\",\n \"F11\",\n \"F12\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"Home\",\n \"Insert\",\n \"Meta\",\n \"NumLock\",\n \"PageDown\",\n \"PageUp\",\n \"Shift\",\n \"Tab\",\n];\n","import { EventEmitter, forceUpdate } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n IcDeviceSizes,\n IcColor,\n IcBrandForegroundNoDefault,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcBrandForeground,\n IcBrandForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\nconst ANYWHERE_SEARCH_POSITION = \"anywhere\";\nconst icInput = \"ic-input\";\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 const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param container The element where the input will be added\n * @param value The value of the input\n * @param name The name of the input\n * @param disabled If true, the input is disabled\n * @param always Add a hidden input even if the container does not use Shadow\n */\nexport const renderHiddenInput = (\n container: HTMLElement,\n value?: string | Date | null,\n name?: string,\n disabled = false,\n always = true\n): void => {\n if (name && (always || hasShadowDom(container))) {\n let input = getHiddenInputElement(container);\n\n if (!input) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value instanceof Date ? value.toISOString() : value || \"\";\n }\n};\n\nconst getHiddenInputElement = (container: HTMLElement) =>\n Array.from(\n container.querySelectorAll<HTMLInputElement>(`input.${icInput}`)\n ).filter((el) => container === el.parentElement)[0];\n\n/**\n * This method is used to add a hidden file input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n * @param name The name of the input\n * @param value The value of the input\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n disabled: boolean,\n accept?: string,\n name?: string,\n value?: FileList\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n let input = getHiddenInputElement(container);\n\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.disabled = disabled;\n\n if (value) input.files = value;\n if (accept) input.accept = accept;\n\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n getHiddenInputElement(container)?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement | null | undefined): boolean =>\n !!el && !!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\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcBrandForeground depending on the context\n */\nexport const getBrandFromContext = (\n el: Element,\n brandFromEvent: IcBrandForeground | null = null\n): IcBrandForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement?.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcBrandForegroundEnum.Default;\n } else if (\n brandFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return brandFromEvent;\n } else if (\n blockColorParent.classList.contains(\n `${parentTag}-${IcBrandForegroundEnum.Dark}`\n ) ||\n blockColorParent.classList.contains(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n }\n\n return IcBrandForegroundEnum.Light;\n }\n\n return IcBrandForegroundEnum.Default;\n};\n\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n : false;\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n button.type && hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value?: string): boolean =>\n !value || value.trim().length === 0;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop?: string): string | undefined =>\n prop !== undefined ? prop : undefined;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions = ANYWHERE_SEARCH_POSITION,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === ANYWHERE_SEARCH_POSITION\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-brand-text-color\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getBrandColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-brand-color-primary-r\");\n const themeGreen = getCssProperty(\"--ic-brand-color-primary-g\");\n const themeBlue = getCssProperty(\"--ic-brand-color-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getBrandColorBrightness`\n */\nexport const getBrandForegroundAppearance = (\n brightness = getBrandColorBrightness()\n): IcBrandForegroundNoDefault =>\n brightness > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (\n element: HTMLElement | undefined,\n name: string\n): Element | null => element?.querySelector(`[slot=\"${name}\"]`) || null;\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n return slot ? getSlotElements(slot) : null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] | null => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent === null) return [slot];\n\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n};\n\nexport const getNavItemParentDetails = ({\n parentElement,\n}: HTMLElement): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n if (parentElement) {\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n }\n\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(\n getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 0\n S: Number(\n getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 576\n M: Number(\n getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 768\n L: Number(\n getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 992\n XL: Number(\n getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status?: IcInformationStatusOrEmpty,\n disabled?: boolean\n): boolean => !!status && !disabled;\n\nexport const isSlotUsed = (\n { children }: HTMLElement,\n slotName: string\n): boolean =>\n Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n props.forEach(({ prop, propName }) => {\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n });\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string =>\n kebabCase\n .toLowerCase()\n .split(\"-\")\n .map((word, index) =>\n index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`\n )\n .join(\"\");\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = (v: string) => parseInt(v, 16);\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\n\nexport const elementOverflowsX = ({\n scrollWidth,\n clientWidth,\n}: HTMLElement): boolean => scrollWidth > clientWidth;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.addEventListener(\"reset\", callbackFn);\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.removeEventListener(\"reset\", callbackFn);\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\n/**\n * Removes the disabled attribute from the provided element when its value is set to false.\n * This effectively makes it null, to not confuse screen readers that cannot interpret the false value\n */\nexport const removeDisabledFalse = (\n disabled: boolean | undefined,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean =>\n window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n\nexport const isNumeric = (value: string): boolean => /^-?\\d+$/.test(value);\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const convertToRGBA = (color: IcColor): IcColorRGBA | null => {\n const firstChar = color?.slice(0, 1).toLowerCase();\n\n if (firstChar !== \"#\" && firstChar !== \"r\") return null;\n return firstChar === \"#\" ? hexToRgba(color) : rgbaStrToObj(color);\n};\n\nexport const capitalize = (text: string): string =>\n text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string | string[]\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) =>\n Array.isArray(slotName)\n ? slotName.some((name) => (node as Element).slot === name)\n : (node as Element).slot === slotName\n );\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const isElInAGGrid = (el: HTMLElement): boolean =>\n !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n\n/**\n * Checks if the component is slotted in its relevant 'group' component\n * @param component - the component to check\n */\nexport const isSlottedInGroup = (component: HTMLElement): boolean =>\n component.parentElement?.tagName === `${component.tagName}-GROUP`;\n\nexport const hasDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[]\n): boolean =>\n mutationList.some(\n ({ type, addedNodes, removedNodes }) =>\n type === \"childList\" &&\n checkSlotInChildMutations(addedNodes, removedNodes, slotNames)\n );\n\nexport const renderDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[],\n ref: any\n): void => {\n if (hasDynamicChildSlots(mutationList, slotNames)) {\n forceUpdate(ref);\n }\n};\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-a7a720e7.js';
2
- import { i as isSlotUsed } from './helpers-46a2d1fd.js';
2
+ import { i as isSlotUsed } from './helpers-f2ffaa7c.js';
3
3
 
4
4
  const icAccordionGroupCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}.label-container{--ic-typography-color:var(--ic-accordion-group-title-text);color:var(--ic-accordion-group-title-text);padding:var(--ic-space-xs);display:flex;justify-content:space-between;align-items:center}:host(.ic-accordion-group-small) .label-container{padding:var(--ic-space-xxs) var(--ic-space-xs)}:host(.ic-accordion-group-large) .label-container{padding:var(--ic-space-sm) var(--ic-space-xs)}";
5
5
  const IcAccordionGroupStyle0 = icAccordionGroupCss;
@@ -1,11 +1,12 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7a720e7.js';
2
- import { r as removeDisabledFalse, i as isSlotUsed } from './helpers-46a2d1fd.js';
2
+ import { r as removeDisabledFalse, i as isSlotUsed } from './helpers-f2ffaa7c.js';
3
3
  import { C as Chevron } from './chevron-icon-589e3b46.js';
4
4
 
5
5
  const icAccordionCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;border-bottom:var(--ic-space-1px) solid var(--ic-accordion-divider)}:host .expand-chevron{color:var(--ic-accordion-chevron)}:host(.ic-accordion-disabled) .expand-chevron{color:var(--ic-accordion-chevron-disabled)}.section-button.small{padding:var(--ic-space-xxs) var(--ic-space-xs)}.section-button.large{padding:var(--ic-space-sm) var(--ic-space-xs)}:host(:first-of-type){border-top:var(--ic-space-1px) solid var(--ic-accordion-divider)}:focus{outline:none}.section-button{background-color:transparent;display:flex;align-items:center;width:100%;padding:var(--ic-space-xs);font-weight:var(--ic-font-weight-bold);border:none}.section-header{--ic-typography-color:var(--ic-accordion-heading-text);color:var(--ic-accordion-heading-text);text-align:left;flex:1 0}:host(.ic-accordion-disabled) .section-header{--ic-typography-color:var(--ic-accordion-heading-text-disabled);color:var(--ic-accordion-heading-text-disabled)}button:hover{background-color:var(--ic-accordion-background-hover);cursor:pointer}button:active{background-color:var(--ic-accordion-background-pressed)}button:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast)}button:disabled{pointer-events:none}.icon-container{margin:0 var(--ic-space-xs) 0 0;display:flex;align-items:center;width:var(--ic-space-lg);height:var(--ic-space-lg);color:var(--ic-accordion-icon)}:host(.ic-accordion-disabled) .icon-container{color:var(--ic-accordion-icon-disabled)}::slotted(svg){width:var(--ic-space-md);height:var(--ic-space-md)}.expand-chevron{width:var(--ic-space-lg);height:var(--ic-space-lg);margin-left:calc(var(--ic-space-xl) + var(--ic-space-xs));transform:rotate(90deg);justify-self:end}.content-expanded-chevron{transform:rotate(-90deg)}.expanded-content{--ic-typography-color:var(--ic-accordion-body-text);color:var(--ic-accordion-body-text);height:0;overflow:hidden;display:flex;flex-direction:column;visibility:var(--ic-expanded-content-visibility, hidden)}.expanded-content-inner{padding:var(--ic-space-xs)}.expanded-content-opened{overflow:visible}@media (forced-colors: active){button:focus{border:var(--ic-border-hc) !important}}";
6
6
  const IcAccordionStyle0 = icAccordionCss;
7
7
 
8
8
  let accordionIds = 0;
9
+ const EXPANDED_CONTENT_OPENED_CLASS = "expanded-content-opened";
9
10
  const Accordion = class {
10
11
  constructor(hostRef) {
11
12
  registerInstance(this, hostRef);
@@ -48,7 +49,7 @@ const Accordion = class {
48
49
  };
49
50
  this.setExpandedContentStyle = (ev, expandedContent) => {
50
51
  if (ev.propertyName === "height" && expandedContent.clientHeight > 0) {
51
- expandedContent.classList.add("expanded-content-opened");
52
+ expandedContent.classList.add(EXPANDED_CONTENT_OPENED_CLASS);
52
53
  expandedContent.style.height = "auto";
53
54
  }
54
55
  };
@@ -75,7 +76,7 @@ const Accordion = class {
75
76
  if (expandedContentEl.scrollHeight > 0 && !this.expanded) {
76
77
  expandedContentEl.style.height = "0";
77
78
  this.setAccordionAnimation(expandedContentEl, "300", "height", "ease-in");
78
- expandedContentEl.classList.remove("expanded-content-opened");
79
+ expandedContentEl.classList.remove(EXPANDED_CONTENT_OPENED_CLASS);
79
80
  }
80
81
  expandedContentEl.addEventListener("transitionend", (e) => {
81
82
  this.hideExpandedContent(e, expandedContentEl);
@@ -113,23 +114,24 @@ const Accordion = class {
113
114
  if (this.expanded && this.expandedContentEl) {
114
115
  this.expandedContentEl.style.height = "auto";
115
116
  this.expandedContentEl.style.setProperty(this.CONTENT_VISIBILITY_PROPERTY, "visible");
117
+ this.expandedContentEl.classList.add(EXPANDED_CONTENT_OPENED_CLASS);
116
118
  }
117
119
  }
118
120
  render() {
119
121
  const { size, disabled, expanded, theme } = this;
120
- return (h(Host, { key: '1af99baa1066daa75be1af7329ed0a79a6a7f3cf', id: this.accordionId, class: {
122
+ return (h(Host, { key: '9fff7c4dc37187f9a2d03ae477c48012ff17c870', id: this.accordionId, class: {
121
123
  ["ic-accordion-disabled"]: !!disabled,
122
124
  [`ic-theme-${theme}`]: theme !== "inherit",
123
- }, "aria-disabled": disabled ? "true" : "false" }, h("button", { key: '95695d5beebac9e84bc55159d8602182698ece75', ref: (el) => (this.accordionBtnHeading = el), id: `${this.accordionId}-button`, disabled: disabled, tabindex: disabled ? -1 : 0, class: {
125
+ }, "aria-disabled": disabled ? "true" : "false" }, h("button", { key: '0f83275fbfc435eb5b640bd76b9a9582fcb3dca0', ref: (el) => (this.accordionBtnHeading = el), id: `${this.accordionId}-button`, disabled: disabled, tabindex: disabled ? -1 : 0, class: {
124
126
  [`${size}`]: true,
125
127
  ["section-button"]: true,
126
128
  ["section-button-open"]: !!expanded && !disabled,
127
- }, "aria-expanded": `${expanded}`, "aria-controls": "expanded-content-area", onClick: this.toggleExpanded }, isSlotUsed(this.el, "icon") && (h("div", { key: '274fc2d72fefc6b7f52e4c11fb0dec81055aeb1e', class: "icon-container" }, h("slot", { key: 'b8fb45c64beba9a319776080ea7b764aa4a0b9db', name: "icon" }))), h("ic-typography", { key: 'c0ca1e3a7f4a8cb7b05a3892eec1db728162db91', variant: "subtitle-large", class: "section-header" }, isSlotUsed(this.el, "heading") ? (h("slot", { name: "heading" })) : (this.heading)), h("span", { key: 'c8a70311d3d99114ff1f75c63dbbbbf1077e59c7', class: {
129
+ }, "aria-expanded": `${expanded}`, "aria-controls": "expanded-content-area", onClick: this.toggleExpanded }, isSlotUsed(this.el, "icon") && (h("div", { key: '41c88884df97917d026fbecb500c35b393045c7d', class: "icon-container" }, h("slot", { key: 'ddc6894db8ab81e27c971350e261d99b51759756', name: "icon" }))), h("ic-typography", { key: 'e0ca73dbe5a2d46dbe2f893d4405e3d82fd2a862', variant: "subtitle-large", class: "section-header" }, isSlotUsed(this.el, "heading") ? (h("slot", { name: "heading" })) : (this.heading)), h("span", { key: 'a95fad35c3e3f38415da026a93112079f74de4d7', class: {
128
130
  ["expand-chevron"]: true,
129
131
  ["content-expanded-chevron"]: !!expanded && !disabled,
130
- }, "aria-hidden": "true", innerHTML: Chevron })), h("div", { key: '2bbae7f78c0a88f767c64fa0849c6c13bd998128', class: {
132
+ }, "aria-hidden": "true", innerHTML: Chevron })), h("div", { key: '65b6322d5dde677528891631ecd9b95189948771', class: {
131
133
  ["expanded-content"]: true,
132
- }, "aria-labelledby": `${this.accordionId}-button`, role: "region", "aria-hidden": `${!expanded}`, id: "expanded-content-area", ref: (el) => (this.expandedContentEl = el) }, h("div", { key: '49f53a7ceb1a9a13f50542e93445bacd7d9d9a1e', class: "expanded-content-inner" }, this.message ? (h("ic-typography", { variant: "body" }, this.message)) : (h("slot", null))))));
134
+ }, "aria-labelledby": `${this.accordionId}-button`, role: "region", "aria-hidden": `${!expanded}`, id: "expanded-content-area", ref: (el) => (this.expandedContentEl = el) }, h("div", { key: 'de9ec00d55757be20c097082817529b652200263', class: "expanded-content-inner" }, this.message ? (h("ic-typography", { variant: "body" }, this.message)) : (h("slot", null))))));
133
135
  }
134
136
  get el() { return getElement(this); }
135
137
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"ic-accordion.entry.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,0gJAA0gJ,CAAC;AACliJ,0BAAe,cAAc;;ACc7B,IAAI,YAAY,GAAG,CAAC,CAAC;MAYR,SAAS;IALtB;;;QAMU,gBAAW,GAAG,gBAAgB,YAAY,EAAE,EAAE,CAAC;QAG/C,gCAA2B,GAAG,kCAAkC,CAAC;;;;QAOjE,aAAQ,GAAa,KAAK,CAAC;;;;QASV,aAAQ,GAAa,KAAK,CAAC;;;;QAK5C,YAAO,GAAY,EAAE,CAAC;;;;QAKtB,YAAO,GAAY,EAAE,CAAC;;;;QAKtB,SAAI,GAAa,QAAQ,CAAC;;;;QAK1B,UAAK,GAAiB,SAAS,CAAC;QAoDhC,mBAAc,GAAG;YACvB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,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CAAC,gBAAgB,GAAG,IAAI;gBACxB,CAAC,qBAAqB,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,QAAQ;aACjD,mBACc,GAAG,QAAQ,EAAE,mBACd,uBAAuB,EACrC,OAAO,EAAE,IAAI,CAAC,cAAc,IAE3B,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,KAC1B,4DAAK,KAAK,EAAC,gBAAgB,IACzB,6DAAM,IAAI,EAAC,MAAM,GAAG,CAChB,CACP,EACD,sEAAe,OAAO,EAAC,gBAAgB,EAAC,KAAK,EAAC,gBAAgB,IAC3D,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,IAC7B,YAAM,IAAI,EAAC,SAAS,GAAG,KAEvB,IAAI,CAAC,OAAO,CACb,CACa,EAChB,6DACE,KAAK,EAAE;gBACL,CAAC,gBAAgB,GAAG,IAAI;gBACxB,CAAC,0BAA0B,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,QAAQ;aACtD,iBACW,MAAM,EAClB,SAAS,EAAEA,OAAW,GACtB,CACK,EACT,4DACE,KAAK,EAAE;gBACL,CAAC,kBAAkB,GAAG,IAAI;aAC3B,qBACgB,GAAG,IAAI,CAAC,WAAW,SAAS,EAC7C,IAAI,EAAC,QAAQ,iBACA,GAAG,CAAC,QAAQ,EAAE,EAC3B,EAAE,EAAC,uBAAuB,EAC1B,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,IAE1C,4DAAK,KAAK,EAAC,wBAAwB,IAChC,IAAI,CAAC,OAAO,IACX,qBAAe,OAAO,EAAC,MAAM,IAAE,IAAI,CAAC,OAAO,CAAiB,KAE5D,eAAQ,CACT,CACG,CACF,CACD,EACP;KACH;;;;;;;;;;;","names":["chevronIcon"],"sources":["src/components/ic-accordion/ic-accordion.css?tag=ic-accordion&encapsulation=shadow","src/components/ic-accordion/ic-accordion.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n border-bottom: var(--ic-space-1px) solid var(--ic-accordion-divider);\n}\n\n:host .expand-chevron {\n color: var(--ic-accordion-chevron);\n}\n\n:host(.ic-accordion-disabled) .expand-chevron {\n color: var(--ic-accordion-chevron-disabled);\n}\n\n.section-button.small {\n padding: var(--ic-space-xxs) var(--ic-space-xs);\n}\n\n.section-button.large {\n padding: var(--ic-space-sm) var(--ic-space-xs);\n}\n\n:host(:first-of-type) {\n border-top: var(--ic-space-1px) solid var(--ic-accordion-divider);\n}\n\n:focus {\n outline: none;\n}\n\n.section-button {\n background-color: transparent;\n display: flex;\n align-items: center;\n width: 100%;\n padding: var(--ic-space-xs);\n font-weight: var(--ic-font-weight-bold);\n border: none;\n}\n\n.section-header {\n --ic-typography-color: var(--ic-accordion-heading-text);\n\n color: var(--ic-accordion-heading-text);\n text-align: left;\n flex: 1 0;\n}\n\n:host(.ic-accordion-disabled) .section-header {\n --ic-typography-color: var(--ic-accordion-heading-text-disabled);\n\n color: var(--ic-accordion-heading-text-disabled);\n}\n\nbutton:hover {\n background-color: var(--ic-accordion-background-hover);\n cursor: pointer;\n}\n\nbutton:active {\n background-color: var(--ic-accordion-background-pressed);\n}\n\nbutton:focus {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n}\n\nbutton:disabled {\n pointer-events: none;\n}\n\n.icon-container {\n margin: 0 var(--ic-space-xs) 0 0;\n display: flex;\n align-items: center;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n color: var(--ic-accordion-icon);\n}\n\n:host(.ic-accordion-disabled) .icon-container {\n color: var(--ic-accordion-icon-disabled);\n}\n\n::slotted(svg) {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n.expand-chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n margin-left: calc(var(--ic-space-xl) + var(--ic-space-xs));\n transform: rotate(90deg);\n justify-self: end;\n}\n\n.content-expanded-chevron {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n --ic-typography-color: var(--ic-accordion-body-text);\n\n color: var(--ic-accordion-body-text);\n height: 0;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n visibility: var(--ic-expanded-content-visibility, hidden);\n}\n\n.expanded-content-inner {\n padding: var(--ic-space-xs);\n}\n\n.expanded-content-opened {\n overflow: visible;\n}\n\n@media (forced-colors: active) {\n button:focus {\n border: var(--ic-border-hc) !important;\n }\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Host,\n Watch,\n Method,\n} from \"@stencil/core\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport { IcSizes, IcThemeMode } from \"../../utils/types\";\n\nlet accordionIds = 0;\n\n/**\n * @slot heading - Content is placed as the accordion heading.\n * @slot icon - Content is placed to the left of the heading.\n */\n\n@Component({\n tag: \"ic-accordion\",\n styleUrl: \"ic-accordion.css\",\n shadow: true,\n})\nexport class Accordion {\n private accordionId = `ic-accordion-${accordionIds++}`;\n private expandedContentEl?: HTMLDivElement;\n private accordionBtnHeading?: HTMLButtonElement;\n private CONTENT_VISIBILITY_PROPERTY = \"--ic-expanded-content-visibility\";\n\n @Element() el: HTMLIcAccordionElement;\n\n /**\n * If `true`, the accordion will be disabled.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the accordion appears expanded.\n */\n @Prop({ mutable: true }) expanded?: boolean = false;\n\n /**\n * The section header outlining section content.\n */\n @Prop() heading?: string = \"\";\n\n /**\n * The main body message of the accordion.\n */\n @Prop() message?: string = \"\";\n\n /**\n * The size of the accordion.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * 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 @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * @internal Emitted when accordion is clicked.\n */\n @Event() accordionClicked: EventEmitter<{ id: string }>;\n\n // Every time expanded is set via toggleExpanded or accordionGroup, animate to open or close\n @Watch(\"expanded\")\n handleExpandedWatch(): void {\n this.animateExpandedContent();\n }\n\n /**\n * Sets focus on accordion heading.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.accordionBtnHeading?.focus();\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n disconnectedCallback(): void {\n const expandedContentEl = this.expandedContentEl;\n if (expandedContentEl) {\n expandedContentEl.removeEventListener(\n \"transitionend\",\n (e) => this.setExpandedContentStyle(e, expandedContentEl),\n true\n );\n expandedContentEl.removeEventListener(\n \"transitionend\",\n (e) => this.hideExpandedContent(e, expandedContentEl),\n true\n );\n }\n }\n\n componentDidLoad(): void {\n // So accordion opens by default if expanded set to true\n if (this.expanded && this.expandedContentEl) {\n this.expandedContentEl.style.height = \"auto\";\n this.expandedContentEl.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"visible\"\n );\n }\n }\n\n private toggleExpanded = (): void => {\n this.expanded = !this.expanded;\n this.accordionClicked.emit({ id: this.accordionId });\n };\n\n // Set accordion animation\n private setAccordionAnimation = (\n el: HTMLElement,\n duration: string,\n property: string,\n delay: string\n ) => {\n el.style.transitionDuration = `${duration}ms`;\n el.style.transitionProperty = property;\n el.style.transitionDelay = delay;\n };\n\n private setExpandedContentStyle = (\n ev: TransitionEvent,\n expandedContent: HTMLDivElement\n ) => {\n if (ev.propertyName === \"height\" && expandedContent.clientHeight > 0) {\n expandedContent.classList.add(\"expanded-content-opened\");\n expandedContent.style.height = \"auto\";\n }\n };\n\n private hideExpandedContent = (\n ev: TransitionEvent,\n expandedContent: HTMLDivElement\n ) => {\n if (ev.propertyName === \"height\" && expandedContent.clientHeight === 0) {\n expandedContent.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"hidden\"\n );\n }\n };\n\n private animateExpandedContent = () => {\n if (this.expandedContentEl) {\n const expandedContentEl = this.expandedContentEl;\n const elementHeight = expandedContentEl.scrollHeight;\n if (elementHeight > 0 && this.expanded) {\n expandedContentEl.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"visible\"\n );\n expandedContentEl.style.height = `${elementHeight}px`;\n this.setAccordionAnimation(\n expandedContentEl,\n \"300\",\n \"height\",\n \"ease-out\"\n );\n\n expandedContentEl.addEventListener(\n \"transitionend\",\n (e: TransitionEvent) => {\n this.setExpandedContentStyle(e, expandedContentEl);\n }\n );\n } else if (!this.expanded) {\n const expandedContentEl = this.expandedContentEl;\n expandedContentEl.style.height = `${expandedContentEl.scrollHeight}px`;\n if (expandedContentEl.scrollHeight > 0 && !this.expanded) {\n expandedContentEl.style.height = \"0\";\n this.setAccordionAnimation(\n expandedContentEl,\n \"300\",\n \"height\",\n \"ease-in\"\n );\n expandedContentEl.classList.remove(\"expanded-content-opened\");\n }\n expandedContentEl.addEventListener(\"transitionend\", (e) => {\n this.hideExpandedContent(e, expandedContentEl);\n });\n }\n }\n };\n\n render() {\n const { size, disabled, expanded, theme } = this;\n return (\n <Host\n id={this.accordionId}\n class={{\n [\"ic-accordion-disabled\"]: !!disabled,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n aria-disabled={disabled ? \"true\" : \"false\"}\n >\n <button\n ref={(el) => (this.accordionBtnHeading = el)}\n id={`${this.accordionId}-button`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n class={{\n [`${size}`]: true,\n [\"section-button\"]: true,\n [\"section-button-open\"]: !!expanded && !disabled,\n }}\n aria-expanded={`${expanded}`}\n aria-controls=\"expanded-content-area\"\n onClick={this.toggleExpanded}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography variant=\"subtitle-large\" class=\"section-header\">\n {isSlotUsed(this.el, \"heading\") ? (\n <slot name=\"heading\" />\n ) : (\n this.heading\n )}\n </ic-typography>\n <span\n class={{\n [\"expand-chevron\"]: true,\n [\"content-expanded-chevron\"]: !!expanded && !disabled,\n }}\n aria-hidden=\"true\"\n innerHTML={chevronIcon}\n />\n </button>\n <div\n class={{\n [\"expanded-content\"]: true,\n }}\n aria-labelledby={`${this.accordionId}-button`}\n role=\"region\"\n aria-hidden={`${!expanded}`}\n id=\"expanded-content-area\"\n ref={(el) => (this.expandedContentEl = el)}\n >\n <div class=\"expanded-content-inner\">\n {this.message ? (\n <ic-typography variant=\"body\">{this.message}</ic-typography>\n ) : (\n <slot />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-accordion.entry.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,0gJAA0gJ,CAAC;AACliJ,0BAAe,cAAc;;ACc7B,IAAI,YAAY,GAAG,CAAC,CAAC;AACrB,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;MAYnD,SAAS;IALtB;;;QAMU,gBAAW,GAAG,gBAAgB,YAAY,EAAE,EAAE,CAAC;QAG/C,gCAA2B,GAAG,kCAAkC,CAAC;;;;QAOjE,aAAQ,GAAa,KAAK,CAAC;;;;QASV,aAAQ,GAAa,KAAK,CAAC;;;;QAK5C,YAAO,GAAY,EAAE,CAAC;;;;QAKtB,YAAO,GAAY,EAAE,CAAC;;;;QAKtB,SAAI,GAAa,QAAQ,CAAC;;;;QAK1B,UAAK,GAAiB,SAAS,CAAC;QAqDhC,mBAAc,GAAG;YACvB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;SACtD,CAAC;;QAGM,0BAAqB,GAAG,CAC9B,EAAe,EACf,QAAgB,EAChB,QAAgB,EAChB,KAAa;YAEb,EAAE,CAAC,KAAK,CAAC,kBAAkB,GAAG,GAAG,QAAQ,IAAI,CA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,QAAQ,EAAE,mBACd,uBAAuB,EACrC,OAAO,EAAE,IAAI,CAAC,cAAc,IAE3B,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,KAC1B,4DAAK,KAAK,EAAC,gBAAgB,IACzB,6DAAM,IAAI,EAAC,MAAM,GAAG,CAChB,CACP,EACD,sEAAe,OAAO,EAAC,gBAAgB,EAAC,KAAK,EAAC,gBAAgB,IAC3D,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,IAC7B,YAAM,IAAI,EAAC,SAAS,GAAG,KAEvB,IAAI,CAAC,OAAO,CACb,CACa,EAChB,6DACE,KAAK,EAAE;gBACL,CAAC,gBAAgB,GAAG,IAAI;gBACxB,CAAC,0BAA0B,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,QAAQ;aACtD,iBACW,MAAM,EAClB,SAAS,EAAEA,OAAW,GACtB,CACK,EACT,4DACE,KAAK,EAAE;gBACL,CAAC,kBAAkB,GAAG,IAAI;aAC3B,qBACgB,GAAG,IAAI,CAAC,WAAW,SAAS,EAC7C,IAAI,EAAC,QAAQ,iBACA,GAAG,CAAC,QAAQ,EAAE,EAC3B,EAAE,EAAC,uBAAuB,EAC1B,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,IAE1C,4DAAK,KAAK,EAAC,wBAAwB,IAChC,IAAI,CAAC,OAAO,IACX,qBAAe,OAAO,EAAC,MAAM,IAAE,IAAI,CAAC,OAAO,CAAiB,KAE5D,eAAQ,CACT,CACG,CACF,CACD,EACP;KACH;;;;;;;;;;;","names":["chevronIcon"],"sources":["src/components/ic-accordion/ic-accordion.css?tag=ic-accordion&encapsulation=shadow","src/components/ic-accordion/ic-accordion.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n border-bottom: var(--ic-space-1px) solid var(--ic-accordion-divider);\n}\n\n:host .expand-chevron {\n color: var(--ic-accordion-chevron);\n}\n\n:host(.ic-accordion-disabled) .expand-chevron {\n color: var(--ic-accordion-chevron-disabled);\n}\n\n.section-button.small {\n padding: var(--ic-space-xxs) var(--ic-space-xs);\n}\n\n.section-button.large {\n padding: var(--ic-space-sm) var(--ic-space-xs);\n}\n\n:host(:first-of-type) {\n border-top: var(--ic-space-1px) solid var(--ic-accordion-divider);\n}\n\n:focus {\n outline: none;\n}\n\n.section-button {\n background-color: transparent;\n display: flex;\n align-items: center;\n width: 100%;\n padding: var(--ic-space-xs);\n font-weight: var(--ic-font-weight-bold);\n border: none;\n}\n\n.section-header {\n --ic-typography-color: var(--ic-accordion-heading-text);\n\n color: var(--ic-accordion-heading-text);\n text-align: left;\n flex: 1 0;\n}\n\n:host(.ic-accordion-disabled) .section-header {\n --ic-typography-color: var(--ic-accordion-heading-text-disabled);\n\n color: var(--ic-accordion-heading-text-disabled);\n}\n\nbutton:hover {\n background-color: var(--ic-accordion-background-hover);\n cursor: pointer;\n}\n\nbutton:active {\n background-color: var(--ic-accordion-background-pressed);\n}\n\nbutton:focus {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n}\n\nbutton:disabled {\n pointer-events: none;\n}\n\n.icon-container {\n margin: 0 var(--ic-space-xs) 0 0;\n display: flex;\n align-items: center;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n color: var(--ic-accordion-icon);\n}\n\n:host(.ic-accordion-disabled) .icon-container {\n color: var(--ic-accordion-icon-disabled);\n}\n\n::slotted(svg) {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n.expand-chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n margin-left: calc(var(--ic-space-xl) + var(--ic-space-xs));\n transform: rotate(90deg);\n justify-self: end;\n}\n\n.content-expanded-chevron {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n --ic-typography-color: var(--ic-accordion-body-text);\n\n color: var(--ic-accordion-body-text);\n height: 0;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n visibility: var(--ic-expanded-content-visibility, hidden);\n}\n\n.expanded-content-inner {\n padding: var(--ic-space-xs);\n}\n\n.expanded-content-opened {\n overflow: visible;\n}\n\n@media (forced-colors: active) {\n button:focus {\n border: var(--ic-border-hc) !important;\n }\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Host,\n Watch,\n Method,\n} from \"@stencil/core\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport { IcSizes, IcThemeMode } from \"../../utils/types\";\n\nlet accordionIds = 0;\nconst EXPANDED_CONTENT_OPENED_CLASS = \"expanded-content-opened\";\n\n/**\n * @slot heading - Content is placed as the accordion heading.\n * @slot icon - Content is placed to the left of the heading.\n */\n\n@Component({\n tag: \"ic-accordion\",\n styleUrl: \"ic-accordion.css\",\n shadow: true,\n})\nexport class Accordion {\n private accordionId = `ic-accordion-${accordionIds++}`;\n private expandedContentEl?: HTMLDivElement;\n private accordionBtnHeading?: HTMLButtonElement;\n private CONTENT_VISIBILITY_PROPERTY = \"--ic-expanded-content-visibility\";\n\n @Element() el: HTMLIcAccordionElement;\n\n /**\n * If `true`, the accordion will be disabled.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the accordion appears expanded.\n */\n @Prop({ mutable: true }) expanded?: boolean = false;\n\n /**\n * The section header outlining section content.\n */\n @Prop() heading?: string = \"\";\n\n /**\n * The main body message of the accordion.\n */\n @Prop() message?: string = \"\";\n\n /**\n * The size of the accordion.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * 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 @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * @internal Emitted when accordion is clicked.\n */\n @Event() accordionClicked: EventEmitter<{ id: string }>;\n\n // Every time expanded is set via toggleExpanded or accordionGroup, animate to open or close\n @Watch(\"expanded\")\n handleExpandedWatch(): void {\n this.animateExpandedContent();\n }\n\n /**\n * Sets focus on accordion heading.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.accordionBtnHeading?.focus();\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n disconnectedCallback(): void {\n const expandedContentEl = this.expandedContentEl;\n if (expandedContentEl) {\n expandedContentEl.removeEventListener(\n \"transitionend\",\n (e) => this.setExpandedContentStyle(e, expandedContentEl),\n true\n );\n expandedContentEl.removeEventListener(\n \"transitionend\",\n (e) => this.hideExpandedContent(e, expandedContentEl),\n true\n );\n }\n }\n\n componentDidLoad(): void {\n // So accordion opens by default if expanded set to true\n if (this.expanded && this.expandedContentEl) {\n this.expandedContentEl.style.height = \"auto\";\n this.expandedContentEl.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"visible\"\n );\n this.expandedContentEl.classList.add(EXPANDED_CONTENT_OPENED_CLASS);\n }\n }\n\n private toggleExpanded = (): void => {\n this.expanded = !this.expanded;\n this.accordionClicked.emit({ id: this.accordionId });\n };\n\n // Set accordion animation\n private setAccordionAnimation = (\n el: HTMLElement,\n duration: string,\n property: string,\n delay: string\n ) => {\n el.style.transitionDuration = `${duration}ms`;\n el.style.transitionProperty = property;\n el.style.transitionDelay = delay;\n };\n\n private setExpandedContentStyle = (\n ev: TransitionEvent,\n expandedContent: HTMLDivElement\n ) => {\n if (ev.propertyName === \"height\" && expandedContent.clientHeight > 0) {\n expandedContent.classList.add(EXPANDED_CONTENT_OPENED_CLASS);\n expandedContent.style.height = \"auto\";\n }\n };\n\n private hideExpandedContent = (\n ev: TransitionEvent,\n expandedContent: HTMLDivElement\n ) => {\n if (ev.propertyName === \"height\" && expandedContent.clientHeight === 0) {\n expandedContent.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"hidden\"\n );\n }\n };\n\n private animateExpandedContent = () => {\n if (this.expandedContentEl) {\n const expandedContentEl = this.expandedContentEl;\n const elementHeight = expandedContentEl.scrollHeight;\n if (elementHeight > 0 && this.expanded) {\n expandedContentEl.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"visible\"\n );\n expandedContentEl.style.height = `${elementHeight}px`;\n this.setAccordionAnimation(\n expandedContentEl,\n \"300\",\n \"height\",\n \"ease-out\"\n );\n\n expandedContentEl.addEventListener(\n \"transitionend\",\n (e: TransitionEvent) => {\n this.setExpandedContentStyle(e, expandedContentEl);\n }\n );\n } else if (!this.expanded) {\n const expandedContentEl = this.expandedContentEl;\n expandedContentEl.style.height = `${expandedContentEl.scrollHeight}px`;\n if (expandedContentEl.scrollHeight > 0 && !this.expanded) {\n expandedContentEl.style.height = \"0\";\n this.setAccordionAnimation(\n expandedContentEl,\n \"300\",\n \"height\",\n \"ease-in\"\n );\n expandedContentEl.classList.remove(EXPANDED_CONTENT_OPENED_CLASS);\n }\n expandedContentEl.addEventListener(\"transitionend\", (e) => {\n this.hideExpandedContent(e, expandedContentEl);\n });\n }\n }\n };\n\n render() {\n const { size, disabled, expanded, theme } = this;\n return (\n <Host\n id={this.accordionId}\n class={{\n [\"ic-accordion-disabled\"]: !!disabled,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n aria-disabled={disabled ? \"true\" : \"false\"}\n >\n <button\n ref={(el) => (this.accordionBtnHeading = el)}\n id={`${this.accordionId}-button`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n class={{\n [`${size}`]: true,\n [\"section-button\"]: true,\n [\"section-button-open\"]: !!expanded && !disabled,\n }}\n aria-expanded={`${expanded}`}\n aria-controls=\"expanded-content-area\"\n onClick={this.toggleExpanded}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography variant=\"subtitle-large\" class=\"section-header\">\n {isSlotUsed(this.el, \"heading\") ? (\n <slot name=\"heading\" />\n ) : (\n this.heading\n )}\n </ic-typography>\n <span\n class={{\n [\"expand-chevron\"]: true,\n [\"content-expanded-chevron\"]: !!expanded && !disabled,\n }}\n aria-hidden=\"true\"\n innerHTML={chevronIcon}\n />\n </button>\n <div\n class={{\n [\"expanded-content\"]: true,\n }}\n aria-labelledby={`${this.accordionId}-button`}\n role=\"region\"\n aria-hidden={`${!expanded}`}\n id=\"expanded-content-area\"\n ref={(el) => (this.expandedContentEl = el)}\n >\n <div class=\"expanded-content-inner\">\n {this.message ? (\n <ic-typography variant=\"body\">{this.message}</ic-typography>\n ) : (\n <slot />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7a720e7.js';
2
2
  import { c as closeIcon } from './close-icon-539ec8d1.js';
3
- import { a as renderDynamicChildSlots, i as isSlotUsed, p as pxToRem, V as VARIANT_ICONS } from './helpers-46a2d1fd.js';
3
+ import { a as renderDynamicChildSlots, i as isSlotUsed, p as pxToRem, V as VARIANT_ICONS } from './helpers-f2ffaa7c.js';
4
4
 
5
- const icAlertCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host ::slotted(ic-typography){--ic-typography-color:var(--ic-alert-description)}.container{min-height:var(--ic-alert-min-height);border-radius:var(--ic-space-xxs) var(--ic-space-xxxs) var(--ic-space-xxxs)\n var(--ic-space-xxs);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-alert-background-neutral);border:var(--ic-space-xxxs) solid var(--ic-alert-border-neutral)}.container-info{background-color:var(--ic-alert-background-info);border:var(--ic-space-xxxs) solid var(--ic-alert-border-info)}.container-warning{background-color:var(--ic-alert-background-warning);border:var(--ic-space-xxxs) solid var(--ic-alert-border-warning)}.container-error{background-color:var(--ic-alert-background-error);border:var(--ic-space-xxxs) solid var(--ic-alert-border-error)}.container-success{background-color:var(--ic-alert-background-success);border:var(--ic-space-xxxs) solid var(--ic-alert-border-success)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-alert-status-type-neutral)}.divider-info{background-color:var(--ic-alert-status-type-info)}.divider-warning{background-color:var(--ic-alert-status-type-warning)}.divider-error{background-color:var(--ic-alert-status-type-error)}.divider-success{background-color:var(--ic-alert-status-type-success)}.alert-icon{height:var(--ic-space-lg);width:1.375rem;margin-left:1.125rem}.icon-placeholder{margin-left:var(--ic-space-xs)}.alert-icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}:host([showdefaulticon=\"false\"]) .icon-neutral{visibility:hidden;width:0;margin-left:0.625rem}.icon-neutral>svg,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block;fill:var(--ic-alert-icon-neutral)}:host([variant=\"info\"]) .alert-icon svg{fill:var(--ic-alert-icon-info)}:host([variant=\"warning\"]) .alert-icon svg{fill:var(--ic-alert-icon-warning)}:host([variant=\"error\"]) .alert-icon svg{fill:var(--ic-alert-icon-error)}:host([variant=\"success\"]) .alert-icon svg{fill:var(--ic-alert-icon-success)}.alert-content{display:flex;align-items:center;margin-left:0.625rem;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1;--ic-typography-color:var(--ic-alert-description)}.alert-message-title-above{display:inline}.alert-title{margin-right:var(--ic-space-xs);--ic-typography-color:var(--ic-alert-title)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-0.375rem;padding:0.375rem;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon>svg{color:var(--ic-alert-icon-dismissible)}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start}.alert-title{white-space:normal}.alert-action-container{margin-bottom:var(--ic-space-xs)}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}";
5
+ const icAlertCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host ::slotted(ic-typography){--ic-typography-color:var(--ic-alert-description)}.container{min-height:var(--ic-alert-min-height);border-radius:var(--ic-space-xxs) var(--ic-space-xxxs) var(--ic-space-xxxs)\n var(--ic-space-xxs);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-alert-background-neutral);border:var(--ic-space-xxxs) solid var(--ic-alert-border-neutral)}.container-info{background-color:var(--ic-alert-background-info);border:var(--ic-space-xxxs) solid var(--ic-alert-border-info)}.container-warning{background-color:var(--ic-alert-background-warning);border:var(--ic-space-xxxs) solid var(--ic-alert-border-warning)}.container-error{background-color:var(--ic-alert-background-error);border:var(--ic-space-xxxs) solid var(--ic-alert-border-error)}.container-success{background-color:var(--ic-alert-background-success);border:var(--ic-space-xxxs) solid var(--ic-alert-border-success)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-alert-status-type-neutral)}.divider-info{background-color:var(--ic-alert-status-type-info)}.divider-warning{background-color:var(--ic-alert-status-type-warning)}.divider-error{background-color:var(--ic-alert-status-type-error)}.divider-success{background-color:var(--ic-alert-status-type-success)}.alert-icon{height:var(--ic-space-lg);width:1.375rem;margin-left:1.125rem}.icon-placeholder{margin-left:var(--ic-space-xs)}.alert-icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}:host([showdefaulticon=\"false\"]) .icon-neutral{visibility:hidden;width:0;margin-left:0.625rem}.icon-neutral>svg,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block;fill:var(--ic-alert-icon-neutral)}:host([variant=\"info\"]) .alert-icon svg{fill:var(--ic-alert-icon-info)}:host([variant=\"warning\"]) .alert-icon svg{fill:var(--ic-alert-icon-warning)}:host([variant=\"error\"]) .alert-icon svg{fill:var(--ic-alert-icon-error)}:host([variant=\"success\"]) .alert-icon svg{fill:var(--ic-alert-icon-success)}.alert-content{display:flex;align-items:center;margin-left:0.625rem;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1;--ic-typography-color:var(--ic-alert-description)}.alert-message-title-above{display:inline}.alert-title{margin-right:var(--ic-space-xs);--ic-typography-color:var(--ic-alert-title)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-0.375rem;padding:0.375rem;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon>svg{color:var(--ic-alert-icon-dismissible)}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start}.alert-title{white-space:normal}.alert-action-container{margin-bottom:var(--ic-space-xs)}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}.dismiss-icon>svg{color:var(--ic-architectural-white)}}";
6
6
  const IcAlertStyle0 = icAlertCss;
7
7
 
8
8
  const Alert = class {
@@ -1 +1 @@
1
- {"file":"ic-alert.entry.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,irLAAirL,CAAC;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IAAI,cAAc;aAC1D,EACD,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,IAEjC,OAAO,KACN,qBACE,KAAK,EAAE;gBACL,aAAa,EAAE,IAAI;gBACnB,mBAAmB,EAAE,UAAU,IAAI,cAAc;aAClD,EACD,OAAO,EAAC,gBAAgB,EACxB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAEhC,aAAI,OAAO,CAAK,CACF,CACjB,EACD,YAAM,IAAI,EAAC,SAAS,IAClB,qBAAe,OAAO,EAAC,MAAM,IAAE,OAAO,CAAiB,CAClD,CACH,EACL,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,KAC5B,WAAK,KAAK,EAAC,wBAAwB,IACjC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,EACN,WAAK,KAAK,EAAC,wBAAwB,IAChC,WAAW,KACV,iBACE,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,EACtD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,aAAa,EACtB,OAAO,EAAC,MAAM,EACd,KAAK,EAAC,MAAM,EACZ,KAAK,EAAC,SAAS,GACJ,CACd,CACG,CACF,CACD,CACR,EACD;KACH;;;;;;;;;;","names":[],"sources":["src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","src/components/ic-alert/ic-alert.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\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: var(--ic-alert-min-height);\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\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\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 {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n Watch,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport {\n isSlotUsed,\n pxToRem,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcStatusVariants,\n IcThemeMode,\n IcThemeSettings,\n} from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n\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 */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n private hostMutationObserver: MutationObserver | null = null;\n private systemThemeObserver: MediaQueryList | null = null;\n private darkMode: boolean = false;\n private messageEl?: HTMLDivElement;\n private titleEl?: HTMLIcTypographyElement;\n\n @Element() el: HTMLIcAlertElement;\n\n @State() alertTitleWrap: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced: boolean = true;\n\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible: boolean = false;\n\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading: string = \"\";\n\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n\n /**\n * If `true`, the default icon for the neutral variant will appear on the left of the alert.\n */\n @Prop() showDefaultIcon: boolean = true;\n\n /**\n * 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 @Prop() theme: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n themeChangeHandler(): void {\n if (this.theme !== \"inherit\") this.darkMode = this.theme === \"dark\";\n }\n\n /**\n * If `true`, the title and message will appear above and below instead of inline.\n */\n @Prop() titleAbove: boolean = false;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant: IcStatusVariants = \"neutral\";\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n this.systemThemeObserver?.removeEventListener(\n \"change\",\n this.darkModeChangeHandler\n );\n }\n\n componentWillLoad(): void {\n if (!this.el.closest(\"ic-theme\")) {\n this.systemThemeObserver = window.matchMedia(\n \"(prefers-color-scheme: dark)\"\n );\n this.systemThemeObserver.addEventListener(\n \"change\",\n this.darkModeChangeHandler\n );\n this.darkMode = this.systemThemeObserver.matches;\n }\n\n this.themeChangeHandler();\n }\n\n componentDidLoad(): void {\n if (Number(this.titleEl?.clientHeight) > 24) this.alertTitleWrap = true;\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"action\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n\n this.calculateMinHeight();\n }\n\n componentDidUpdate(): void {\n this.calculateMinHeight();\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n @Listen(\"icThemeChange\", { target: \"document\", capture: true })\n darkModeChangeHandler(\n ev: CustomEvent<IcThemeSettings> | MediaQueryListEvent\n ): void {\n this.darkMode = \"detail\" in ev ? ev.detail === \"dark\" : ev.matches;\n\n this.calculateMinHeight();\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private calculateMinHeight = (): void => {\n const contentHeight = Number(this.messageEl?.clientHeight);\n\n const minHeight = pxToRem(\n `${(contentHeight > 40 ? contentHeight : 52) + (this.darkMode ? 0 : 4)}`\n );\n\n if (this.el.style.getPropertyValue(\"--ic-alert-min-height\") !== minHeight)\n this.el.style.setProperty(\"--ic-alert-min-height\", minHeight);\n };\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n showDefaultIcon,\n theme,\n alertTitleWrap,\n dismissAction,\n } = this;\n\n const Icon = () => {\n const iconClass = {\n \"alert-icon\": true,\n \"svg-container\": true,\n [`icon-${variant}`]: true,\n };\n\n if (variant === \"neutral\") {\n if (isSlotUsed(this.el, \"neutral-icon\")) {\n return (\n <div class={iconClass}>\n <slot name=\"neutral-icon\"></slot>\n </div>\n );\n } else if (!showDefaultIcon) {\n return <div class=\"icon-placeholder\"></div>;\n }\n }\n\n return (\n <span class={iconClass} innerHTML={VARIANT_ICONS[variant].icon}></span>\n );\n };\n\n return (\n visible && (\n <Host\n role={announced ? \"alert\" : null}\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div class={{ container: true, [`container-${variant}`]: true }}>\n <div class=\"alert-icon-container\">\n <div\n class={{ divider: true, [`divider-${variant}`]: true }}\n ></div>\n <Icon />\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n \"alert-message\": true,\n \"alert-message-title-above\": titleAbove || alertTitleWrap,\n }}\n ref={(el) => (this.messageEl = el)}\n >\n {heading && (\n <ic-typography\n class={{\n \"alert-title\": true,\n \"alert-title-above\": titleAbove || alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n ref={(el) => (this.titleEl = el)}\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{ \"svg-container\": true, \"dismiss-icon\": true }}\n innerHTML={closeIcon}\n onClick={dismissAction}\n variant=\"icon\"\n theme=\"dark\"\n title=\"Dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-alert.entry.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,uuLAAuuL,CAAC;AAC3vL,sBAAe,UAAU;;MCkCZ,KAAK;IALlB;;;QAMU,yBAAoB,GAA4B,IAAI,CAAC;QACrD,wBAAmB,GAA0B,IAAI,CAAC;QAClD,aAAQ,GAAY,KAAK,CAAC;QAMzB,mBAAc,GAAY,KAAK,CAAC;QAChC,YAAO,GAAY,IAAI,CAAC;;;;QAKzB,cAAS,GAAY,IAAI,CAAC;;;;QAK1B,gBAAW,GAAY,KAAK,CAAC;;;;QAK7B,YAAO,GAAW,EAAE,CAAC;;;;QAUrB,oBAAe,GAAY,IAAI,CAAC;;;;QAKhC,UAAK,GAAgB,SAAS,CAAC;;;;QAS/B,eAAU,GAAY,KAAK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ClD,CACH,EACL,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,KAC5B,WAAK,KAAK,EAAC,wBAAwB,IACjC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,EACN,WAAK,KAAK,EAAC,wBAAwB,IAChC,WAAW,KACV,iBACE,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,EACtD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,aAAa,EACtB,OAAO,EAAC,MAAM,EACd,KAAK,EAAC,MAAM,EACZ,KAAK,EAAC,SAAS,GACJ,CACd,CACG,CACF,CACD,CACR,EACD;KACH;;;;;;;;;;","names":[],"sources":["src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","src/components/ic-alert/ic-alert.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\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: var(--ic-alert-min-height);\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\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\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 .dismiss-icon > svg {\n color: var(--ic-architectural-white);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n Watch,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport {\n isSlotUsed,\n pxToRem,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcStatusVariants,\n IcThemeMode,\n IcThemeSettings,\n} from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n\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 */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n private hostMutationObserver: MutationObserver | null = null;\n private systemThemeObserver: MediaQueryList | null = null;\n private darkMode: boolean = false;\n private messageEl?: HTMLDivElement;\n private titleEl?: HTMLIcTypographyElement;\n\n @Element() el: HTMLIcAlertElement;\n\n @State() alertTitleWrap: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced: boolean = true;\n\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible: boolean = false;\n\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading: string = \"\";\n\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n\n /**\n * If `true`, the default icon for the neutral variant will appear on the left of the alert.\n */\n @Prop() showDefaultIcon: boolean = true;\n\n /**\n * 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 @Prop() theme: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n themeChangeHandler(): void {\n if (this.theme !== \"inherit\") this.darkMode = this.theme === \"dark\";\n }\n\n /**\n * If `true`, the title and message will appear above and below instead of inline.\n */\n @Prop() titleAbove: boolean = false;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant: IcStatusVariants = \"neutral\";\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n this.systemThemeObserver?.removeEventListener(\n \"change\",\n this.darkModeChangeHandler\n );\n }\n\n componentWillLoad(): void {\n if (!this.el.closest(\"ic-theme\")) {\n this.systemThemeObserver = window.matchMedia(\n \"(prefers-color-scheme: dark)\"\n );\n this.systemThemeObserver.addEventListener(\n \"change\",\n this.darkModeChangeHandler\n );\n this.darkMode = this.systemThemeObserver.matches;\n }\n\n this.themeChangeHandler();\n }\n\n componentDidLoad(): void {\n if (Number(this.titleEl?.clientHeight) > 24) this.alertTitleWrap = true;\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"action\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n\n this.calculateMinHeight();\n }\n\n componentDidUpdate(): void {\n this.calculateMinHeight();\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n @Listen(\"icThemeChange\", { target: \"document\", capture: true })\n darkModeChangeHandler(\n ev: CustomEvent<IcThemeSettings> | MediaQueryListEvent\n ): void {\n this.darkMode = \"detail\" in ev ? ev.detail === \"dark\" : ev.matches;\n\n this.calculateMinHeight();\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private calculateMinHeight = (): void => {\n const contentHeight = Number(this.messageEl?.clientHeight);\n\n const minHeight = pxToRem(\n `${(contentHeight > 40 ? contentHeight : 52) + (this.darkMode ? 0 : 4)}`\n );\n\n if (this.el.style.getPropertyValue(\"--ic-alert-min-height\") !== minHeight)\n this.el.style.setProperty(\"--ic-alert-min-height\", minHeight);\n };\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n showDefaultIcon,\n theme,\n alertTitleWrap,\n dismissAction,\n } = this;\n\n const Icon = () => {\n const iconClass = {\n \"alert-icon\": true,\n \"svg-container\": true,\n [`icon-${variant}`]: true,\n };\n\n if (variant === \"neutral\") {\n if (isSlotUsed(this.el, \"neutral-icon\")) {\n return (\n <div class={iconClass}>\n <slot name=\"neutral-icon\"></slot>\n </div>\n );\n } else if (!showDefaultIcon) {\n return <div class=\"icon-placeholder\"></div>;\n }\n }\n\n return (\n <span class={iconClass} innerHTML={VARIANT_ICONS[variant].icon}></span>\n );\n };\n\n return (\n visible && (\n <Host\n role={announced ? \"alert\" : null}\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div class={{ container: true, [`container-${variant}`]: true }}>\n <div class=\"alert-icon-container\">\n <div\n class={{ divider: true, [`divider-${variant}`]: true }}\n ></div>\n <Icon />\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n \"alert-message\": true,\n \"alert-message-title-above\": titleAbove || alertTitleWrap,\n }}\n ref={(el) => (this.messageEl = el)}\n >\n {heading && (\n <ic-typography\n class={{\n \"alert-title\": true,\n \"alert-title-above\": titleAbove || alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n ref={(el) => (this.titleEl = el)}\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{ \"svg-container\": true, \"dismiss-icon\": true }}\n innerHTML={closeIcon}\n onClick={dismissAction}\n variant=\"icon\"\n theme=\"dark\"\n title=\"Dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-a7a720e7.js';
2
- import { o as onComponentPropUndefinedChange, b as onComponentRequiredPropUndefined } from './helpers-46a2d1fd.js';
2
+ import { o as onComponentPropUndefinedChange, b as onComponentRequiredPropUndefined } from './helpers-f2ffaa7c.js';
3
3
 
4
4
  const ArrowUpward = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" aria-hidden="true">
5
5
  <path d="M0 8L1.41 9.41L7 3.83V16H9V3.83L14.58 9.42L16 8L8 0L0 8Z"/>
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-a7a720e7.js';
2
- import { c as convertToRGBA, g as getBrandForegroundAppearance, d as isPropDefined, b as onComponentRequiredPropUndefined } from './helpers-46a2d1fd.js';
2
+ import { c as convertToRGBA, g as getBrandForegroundAppearance, d as isPropDefined, b as onComponentRequiredPropUndefined } from './helpers-f2ffaa7c.js';
3
3
 
4
- const icBadgeCss = "@media (prefers-reduced-motion: no-preference){:host(.ic-badge-show){animation:expand var(--ic-transition-duration-slow)}:host(.ic-badge-hide){animation:shrink var(--ic-transition-duration-slow)}}:host{display:flex;height:var(--ic-space-md);min-width:var(--ic-space-md);width:-moz-fit-content;width:fit-content;border-radius:calc(2 * var(--ic-space-xxl));position:absolute}:host ic-typography{--ic-typography-color:var(--ic-badge-text)}:host(.ic-badge-neutral){background-color:var(--ic-badge-dark) !important}:host(.ic-badge-light) ic-typography{--ic-typography-color:var(--ic-badge-text-monochrome)}:host(.ic-badge-light) ::slotted(*){fill:var(--ic-badge-icon-monochrome)}:host(.ic-badge-info){background-color:var(--ic-badge-info) !important}:host(.ic-badge-light){background-color:var(--ic-badge-light) !important}:host(.ic-badge-warning){background-color:var(--ic-badge-warning) !important}:host(.ic-badge-warning) ic-typography{--ic-typography-color:var(--ic-badge-warning-text)}:host(.ic-badge-warning) ::slotted(*){fill:var(--ic-badge-warning-icon)}:host(.ic-badge-error){background-color:var(--ic-badge-error) !important}:host(.ic-badge-success){background-color:var(--ic-badge-success) !important}:host(.ic-badge-small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.ic-badge-large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-medium){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.ic-badge-dot.ic-badge-small){height:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));min-width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs))}:host(.ic-badge-dot.ic-badge-large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host ::slotted(*){fill:var(--ic-badge-icon)}:host(.ic-badge-foreground-dark) ::slotted(*){fill:var(--ic-color-text-primary-light)}:host(.ic-badge-foreground-light) ::slotted(*){fill:white}:host(.ic-badge-foreground-dark) ic-typography{--ic-typography-color:var(--ic-color-text-primary-light)}:host(.ic-badge-foreground-light) ic-typography{--ic-typography-color:var(--ic-color-primary-text-dark)}:host(.ic-badge-text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-text.ic-badge-small) ic-typography{padding:0 0.2132rem}:host(.ic-badge-text.ic-badge-large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.ic-badge-icon.ic-badge-small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.ic-badge-icon.ic-badge-large) ::slotted(svg){width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));height:calc(var(--ic-space-sm) + var(--ic-space-xxxs));padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}:host(.ic-badge-far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.ic-badge-far.ic-badge-small),:host(.ic-badge-dot.ic-badge-far.ic-badge-large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-far),:host(.ic-badge-dot.ic-badge-far.ic-badge-small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.ic-badge-near){top:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));right:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)))}:host(.ic-badge-dot.ic-badge-near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.ic-badge-inline){position:static}:host(.ic-badge-hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}@keyframes expand{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes shrink{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}";
4
+ const icBadgeCss = "@media (prefers-reduced-motion: no-preference){:host(.ic-badge-show){animation:expand var(--ic-transition-duration-slow)}:host(.ic-badge-hide){animation:shrink var(--ic-transition-duration-slow)}}:host{display:flex;height:var(--ic-space-md);min-width:var(--ic-space-md);width:-moz-fit-content;width:fit-content;border-radius:calc(2 * var(--ic-space-xxl));position:absolute}:host ic-typography{--ic-typography-color:var(--ic-badge-text)}:host(.ic-badge-neutral){background-color:var(--ic-badge-dark) !important}:host(.ic-badge-light) ic-typography{--ic-typography-color:var(--ic-badge-text-monochrome)}:host(.ic-badge-light) ::slotted(*){fill:var(--ic-badge-icon-monochrome)}:host(.ic-badge-info){background-color:var(--ic-badge-info) !important}:host(.ic-badge-light){background-color:var(--ic-badge-light) !important}:host(.ic-badge-warning){background-color:var(--ic-badge-warning) !important}:host(.ic-badge-warning) ic-typography{--ic-typography-color:var(--ic-badge-warning-text)}:host(.ic-badge-warning) ::slotted(*){fill:var(--ic-badge-warning-icon)}:host(.ic-badge-error){background-color:var(--ic-badge-error) !important}:host(.ic-badge-success){background-color:var(--ic-badge-success) !important}:host(.ic-badge-small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.ic-badge-large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-medium){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.ic-badge-dot.ic-badge-small){height:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));min-width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs))}:host(.ic-badge-dot.ic-badge-large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host ::slotted(*){fill:var(--ic-badge-icon)}:host(.ic-badge-foreground-dark) ::slotted(*){fill:var(--ic-color-text-primary-light)}:host(.ic-badge-foreground-light) ::slotted(*){fill:white}:host(.ic-badge-foreground-dark) ic-typography{--ic-typography-color:var(--ic-color-text-primary-light)}:host(.ic-badge-foreground-light) ic-typography{--ic-typography-color:var(--ic-color-text-primary-dark)}:host(.ic-badge-text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-text.ic-badge-small) ic-typography{padding:0 0.2132rem}:host(.ic-badge-text.ic-badge-large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.ic-badge-icon.ic-badge-small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.ic-badge-icon.ic-badge-large) ::slotted(svg){width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));height:calc(var(--ic-space-sm) + var(--ic-space-xxxs));padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}:host(.ic-badge-far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.ic-badge-far.ic-badge-small),:host(.ic-badge-dot.ic-badge-far.ic-badge-large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-far),:host(.ic-badge-dot.ic-badge-far.ic-badge-small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.ic-badge-near){top:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));right:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)))}:host(.ic-badge-dot.ic-badge-near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.ic-badge-inline){position:static}:host(.ic-badge-hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}@keyframes expand{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes shrink{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}";
5
5
  const IcBadgeStyle0 = icBadgeCss;
6
6
 
7
7
  const TOP_NAVIGATION = "IC-TOP-NAVIGATION";
@@ -147,7 +147,7 @@ const Badge = class {
147
147
  }
148
148
  render() {
149
149
  const { ariaLabel, el, foregroundColour, getLabel, position, size, label, type, variant, visible, theme, } = this;
150
- return (h(Host, { key: 'c55c73aa83e0b1612a0545696091955c110f28b3', class: {
150
+ return (h(Host, { key: '720f5c35c4d16cc484ea53a0f277befdbb087883', class: {
151
151
  [`ic-badge-${position}`]: true,
152
152
  [`ic-badge-${size}`]: true,
153
153
  [`ic-badge-${variant}`]: true,
@@ -155,7 +155,7 @@ const Badge = class {
155
155
  [`ic-badge-foreground-${foregroundColour}`]: foregroundColour !== null && variant === "custom",
156
156
  [`${visible ? "ic-badge-show" : "ic-badge-hide"}`]: true,
157
157
  [`ic-theme-${theme}`]: theme !== "inherit",
158
- }, id: el.id || null, "aria-label": ariaLabel, role: "status" }, type === "icon" && h("slot", { key: '69638833e6ac739848e645fa22f2732326fe24fe', name: "badge-icon" }), type === "text" && label && (h("ic-typography", { key: '841ec60f30d95c32c30e29c533157fdf199bdb2d', variant: size === "small" ? "badge-small" : "badge" }, getLabel())), type === "dot" && h("span", { key: '9d1198260090039de3093bf0fa191ff09cfd0408', class: "sr-only" }, "badge")));
158
+ }, id: el.id || null, "aria-label": ariaLabel, role: "status" }, type === "icon" && h("slot", { key: '611a931cbdbfd72a7031adaec19d9cd5f83b097a', name: "badge-icon" }), type === "text" && label && (h("ic-typography", { key: '57620b02829df5547546474ad337f3cc23bb19c4', variant: size === "small" ? "badge-small" : "badge" }, getLabel())), type === "dot" && h("span", { key: '6f583cc04572a1818afc11e43cb5b41f95afe630', class: "sr-only" }, "badge")));
159
159
  }
160
160
  static get delegatesFocus() { return true; }
161
161
  get el() { return getElement(this); }
@@ -1 +1 @@
1
- {"file":"ic-badge.entry.js","mappings":";;;AAAA,MAAM,UAAU,GAAG,mgIAAmgI,CAAC;AACvhI,sBAAe,UAAU;;AC0BzB,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAA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,OAAO,EACP,OAAO,EACP,KAAK,GACN,GAAG,IAAI,CAAC;QAET,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,CAAC,YAAY,QAAQ,EAAE,GAAG,IAAI;gBAC9B,CAAC,YAAY,IAAI,EAAE,GAAG,IAAI;gBAC1B,CAAC,YAAY,OAAO,EAAE,GAAG,IAAI;gBAC7B,CAAC,YAAY,IAAI,EAAE,GAAG,IAAI;gBAC1B,CAAC,uBAAuB,gBAAgB,EAAE,GACxC,gBAAgB,KAAK,IAAI,IAAI,OAAO,KAAK,QAAQ;gBACnD,CAAC,GAAG,OAAO,GAAG,eAAe,GAAG,eAAe,EAAE,GAAG,IAAI;gBACxD,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;aAC3C,EACD,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,IAAI,gBACL,SAAS,EACrB,IAAI,EAAC,QAAQ,IAEZ,IAAI,KAAK,MAAM,IAAI,6DAAM,IAAI,EAAC,YAAY,GAAQ,EAClD,IAAI,KAAK,MAAM,IAAI,KAAK,KACvB,sEAAe,OAAO,EAAE,IAAI,KAAK,OAAO,GAAG,aAAa,GAAG,OAAO,IAC/D,QAAQ,EAAE,CACG,CACjB,EACA,IAAI,KAAK,KAAK,IAAI,6DAAM,KAAK,EAAC,SAAS,YAAa,CAChD,EACP;KACH;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","src/components/ic-badge/ic-badge.tsx"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.ic-badge-show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.ic-badge-hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host ic-typography {\n --ic-typography-color: var(--ic-badge-text);\n}\n\n:host(.ic-badge-neutral) {\n background-color: var(--ic-badge-dark) !important;\n}\n\n:host(.ic-badge-light) ic-typography {\n --ic-typography-color: var(--ic-badge-text-monochrome);\n}\n\n:host(.ic-badge-light) ::slotted(*) {\n fill: var(--ic-badge-icon-monochrome);\n}\n\n:host(.ic-badge-info) {\n background-color: var(--ic-badge-info) !important;\n}\n\n:host(.ic-badge-light) {\n background-color: var(--ic-badge-light) !important;\n}\n\n:host(.ic-badge-warning) {\n background-color: var(--ic-badge-warning) !important;\n}\n\n:host(.ic-badge-warning) ic-typography {\n --ic-typography-color: var(--ic-badge-warning-text);\n}\n\n:host(.ic-badge-warning) ::slotted(*) {\n fill: var(--ic-badge-warning-icon);\n}\n\n:host(.ic-badge-error) {\n background-color: var(--ic-badge-error) !important;\n}\n\n:host(.ic-badge-success) {\n background-color: var(--ic-badge-success) !important;\n}\n\n:host(.ic-badge-small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.ic-badge-large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-medium) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.ic-badge-dot.ic-badge-small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-dot.ic-badge-large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host ::slotted(*) {\n fill: var(--ic-badge-icon);\n}\n\n:host(.ic-badge-foreground-dark) ::slotted(*) {\n fill: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.ic-badge-foreground-dark) ic-typography {\n --ic-typography-color: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ic-typography {\n --ic-typography-color: var(--ic-color-primary-text-dark);\n}\n\n:host(.ic-badge-text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-text.ic-badge-small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.ic-badge-text.ic-badge-large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.ic-badge-icon.ic-badge-small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.ic-badge-icon.ic-badge-large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.ic-badge-far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.ic-badge-far.ic-badge-small),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-far),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.ic-badge-dot.ic-badge-near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-badge-inline) {\n position: static;\n}\n\n:host(.ic-badge-hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.sr-only:dir(rtl) {\n right: -9999px;\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n Watch,\n h,\n Listen,\n} from \"@stencil/core\";\nimport {\n IcBadgePositions,\n IcBadgeTypes,\n IcBadgeVariants,\n} from \"./ic-badge.types\";\nimport {\n IcSizes,\n IcBrandForeground,\n IcColor,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n convertToRGBA,\n getBrandForegroundAppearance,\n isPropDefined,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\n\nconst TOP_NAVIGATION = \"IC-TOP-NAVIGATION\";\nconst SIDE_NAVIGATION = \"IC-SIDE-NAVIGATION\";\n\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\n@Component({\n tag: \"ic-badge\",\n styleUrl: \"ic-badge.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Badge {\n private ariaLabel: string | null = null;\n private foregroundColour: IcBrandForeground;\n private parentAriaLabel: string;\n private initialPosition: IcBadgePositions = this.position ?? \"far\";\n\n @Element() el: HTMLIcBadgeElement;\n\n /**\n * The accessible label of the badge component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string;\n\n @Watch(\"accessibleLabel\")\n accessibleLabelHandler(): void {\n this.setAccessibleLabel();\n }\n\n /**\n * The custom badge colour. This will only style the badge component if variant=\"custom\".\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor;\n\n @Watch(\"customColor\")\n customColorHandler(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n }\n\n /**\n * The maximum number shown on the badge appended with a +.\n * This will only be displayed if type=\"text\" and label is not empty.\n */\n @Prop() maxNumber?: number;\n\n /**\n * The positioning of the badge in reference to the parent element.\n */\n @Prop({ mutable: true }) position?: IcBadgePositions = \"far\";\n\n /**\n * The size of the badge to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The text displayed in the badge. This will only be displayed if type=\"text\".\n */\n @Prop() label?: string;\n\n /**\n * 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 @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The type of badge to be displayed.\n */\n @Prop() type?: IcBadgeTypes = \"text\";\n\n /**\n * The variant of the badge to be displayed.\n */\n @Prop() variant?: IcBadgeVariants = \"neutral\";\n\n @Watch(\"variant\")\n variantHandler(): void {\n if (this.variant === \"custom\") {\n this.setBadgeColour();\n }\n }\n\n /**\n * If `true`, the badge will be displayed.\n */\n @Prop() visible?: boolean = true;\n\n @Watch(\"visible\")\n visibleHandler(): void {\n this.setAccessibleLabel();\n }\n\n componentWillLoad(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n\n const ariaLabel = this.el.parentElement?.ariaLabel;\n if (ariaLabel) this.parentAriaLabel = ariaLabel;\n this.setAccessibleLabel();\n }\n\n componentDidLoad(): void {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Badge\"\n );\n }\n\n componentWillRender(): void {\n this.isInTopNav() && this.setPositionInTopNavigation();\n this.isInSideNav() && this.setPositionInSideNavigation();\n }\n\n @Listen(\"icNavigationMenuOpened\", { target: \"document\" })\n navBarMenuOpenHandler(): void {\n this.isInTopNav() && (this.position = \"inline\");\n }\n\n @Listen(\"icNavigationMenuClosed\", { target: \"document\" })\n navBarMenuCloseHandler(): void {\n this.isInTopNav() && (this.position = this.initialPosition);\n }\n\n private setBadgeColour = () => {\n const colorRGBA = this.customColor ? convertToRGBA(this.customColor) : null;\n\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n this.el.style.backgroundColor = `rgba(${r}, ${g}, ${b}, ${a})`;\n this.foregroundColour = getBrandForegroundAppearance(\n (r * 299 + g * 587 + b * 114) / 1000\n );\n }\n };\n\n private getLabel = () =>\n this.maxNumber && Number(this.label) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.label;\n\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n private setAccessibleLabel = () => {\n const parentEl = this.el.parentElement;\n const defaultAriaLabel = this.isAccessibleLabelDefined()\n ? this.accessibleLabel\n : this.label || \"with badge being displayed\";\n\n if (parentEl) {\n const { tagName } = parentEl;\n if (\n tagName !== \"IC-CARD\" &&\n (tagName !== \"IC-TAB\" || (tagName === \"IC-TAB\" && this.parentAriaLabel))\n ) {\n const ariaLabelPrefix = this.parentAriaLabel\n ? `${this.parentAriaLabel} ,`\n : \"\";\n parentEl.ariaLabel = this.visible\n ? `${ariaLabelPrefix} ${defaultAriaLabel}`\n : null;\n } else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n\n private setPositionInTopNavigation = () => {\n this.position = this.isInMobileMode() ? \"inline\" : this.initialPosition;\n };\n\n private setPositionInSideNavigation = () => {\n this.position = \"near\";\n };\n\n private isInTopNav = (): boolean => {\n const parentEl = this.el.parentElement;\n if (!parentEl) return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl?.parentElement;\n return (\n grandparentEl?.tagName === TOP_NAVIGATION ||\n greatGrandparentEl?.tagName === TOP_NAVIGATION\n );\n };\n\n private isInSideNav = (): boolean => {\n const parentEl = this.el.parentElement;\n if (!parentEl) return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl?.parentElement;\n return (\n grandparentEl?.tagName === SIDE_NAVIGATION ||\n greatGrandparentEl?.tagName === SIDE_NAVIGATION\n );\n };\n\n private isInMobileMode = (): boolean => {\n const parentEl = this.el.parentElement;\n if (!parentEl) return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl?.parentElement;\n return (\n ((grandparentEl?.tagName === TOP_NAVIGATION ||\n grandparentEl?.tagName === SIDE_NAVIGATION) &&\n grandparentEl.classList.contains(\"mobile-mode\")) ||\n ((greatGrandparentEl?.tagName === TOP_NAVIGATION ||\n greatGrandparentEl?.tagName === SIDE_NAVIGATION) &&\n greatGrandparentEl.classList.contains(\"mobile-mode\"))\n );\n };\n\n private isAccessibleLabelDefined = () =>\n isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n\n render() {\n const {\n ariaLabel,\n el,\n foregroundColour,\n getLabel,\n position,\n size,\n label,\n type,\n variant,\n visible,\n theme,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-badge-${position}`]: true,\n [`ic-badge-${size}`]: true,\n [`ic-badge-${variant}`]: true,\n [`ic-badge-${type}`]: true,\n [`ic-badge-foreground-${foregroundColour}`]:\n foregroundColour !== null && variant === \"custom\",\n [`${visible ? \"ic-badge-show\" : \"ic-badge-hide\"}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n id={el.id || null}\n aria-label={ariaLabel}\n role=\"status\"\n >\n {type === \"icon\" && <slot name=\"badge-icon\"></slot>}\n {type === \"text\" && label && (\n <ic-typography variant={size === \"small\" ? \"badge-small\" : \"badge\"}>\n {getLabel()}\n </ic-typography>\n )}\n {type === \"dot\" && <span class=\"sr-only\">badge</span>}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-badge.entry.js","mappings":";;;AAAA,MAAM,UAAU,GAAG,mgIAAmgI,CAAC;AACvhI,sBAAe,UAAU;;AC0BzB,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,eAAe,GAAG,oBAAoB,CAAC;MAYhC,KAAK;IAPlB;;;Q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AET,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,CAAC,YAAY,QAAQ,EAAE,GAAG,IAAI;gBAC9B,CAAC,YAAY,IAAI,EAAE,GAAG,IAAI;gBAC1B,CAAC,YAAY,OAAO,EAAE,GAAG,IAAI;gBAC7B,CAAC,YAAY,IAAI,EAAE,GAAG,IAAI;gBAC1B,CAAC,uBAAuB,gBAAgB,EAAE,GACxC,gBAAgB,KAAK,IAAI,IAAI,OAAO,KAAK,QAAQ;gBACnD,CAAC,GAAG,OAAO,GAAG,eAAe,GAAG,eAAe,EAAE,GAAG,IAAI;gBACxD,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;aAC3C,EACD,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,IAAI,gBACL,SAAS,EACrB,IAAI,EAAC,QAAQ,IAEZ,IAAI,KAAK,MAAM,IAAI,6DAAM,IAAI,EAAC,YAAY,GAAQ,EAClD,IAAI,KAAK,MAAM,IAAI,KAAK,KACvB,sEAAe,OAAO,EAAE,IAAI,KAAK,OAAO,GAAG,aAAa,GAAG,OAAO,IAC/D,QAAQ,EAAE,CACG,CACjB,EACA,IAAI,KAAK,KAAK,IAAI,6DAAM,KAAK,EAAC,SAAS,YAAa,CAChD,EACP;KACH;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","src/components/ic-badge/ic-badge.tsx"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.ic-badge-show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.ic-badge-hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host ic-typography {\n --ic-typography-color: var(--ic-badge-text);\n}\n\n:host(.ic-badge-neutral) {\n background-color: var(--ic-badge-dark) !important;\n}\n\n:host(.ic-badge-light) ic-typography {\n --ic-typography-color: var(--ic-badge-text-monochrome);\n}\n\n:host(.ic-badge-light) ::slotted(*) {\n fill: var(--ic-badge-icon-monochrome);\n}\n\n:host(.ic-badge-info) {\n background-color: var(--ic-badge-info) !important;\n}\n\n:host(.ic-badge-light) {\n background-color: var(--ic-badge-light) !important;\n}\n\n:host(.ic-badge-warning) {\n background-color: var(--ic-badge-warning) !important;\n}\n\n:host(.ic-badge-warning) ic-typography {\n --ic-typography-color: var(--ic-badge-warning-text);\n}\n\n:host(.ic-badge-warning) ::slotted(*) {\n fill: var(--ic-badge-warning-icon);\n}\n\n:host(.ic-badge-error) {\n background-color: var(--ic-badge-error) !important;\n}\n\n:host(.ic-badge-success) {\n background-color: var(--ic-badge-success) !important;\n}\n\n:host(.ic-badge-small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.ic-badge-large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-medium) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.ic-badge-dot.ic-badge-small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-dot.ic-badge-large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host ::slotted(*) {\n fill: var(--ic-badge-icon);\n}\n\n:host(.ic-badge-foreground-dark) ::slotted(*) {\n fill: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.ic-badge-foreground-dark) ic-typography {\n --ic-typography-color: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ic-typography {\n --ic-typography-color: var(--ic-color-text-primary-dark);\n}\n\n:host(.ic-badge-text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-text.ic-badge-small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.ic-badge-text.ic-badge-large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.ic-badge-icon.ic-badge-small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.ic-badge-icon.ic-badge-large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.ic-badge-far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.ic-badge-far.ic-badge-small),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-far),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.ic-badge-dot.ic-badge-near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-badge-inline) {\n position: static;\n}\n\n:host(.ic-badge-hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.sr-only:dir(rtl) {\n right: -9999px;\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n Watch,\n h,\n Listen,\n} from \"@stencil/core\";\nimport {\n IcBadgePositions,\n IcBadgeTypes,\n IcBadgeVariants,\n} from \"./ic-badge.types\";\nimport {\n IcSizes,\n IcBrandForeground,\n IcColor,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n convertToRGBA,\n getBrandForegroundAppearance,\n isPropDefined,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\n\nconst TOP_NAVIGATION = \"IC-TOP-NAVIGATION\";\nconst SIDE_NAVIGATION = \"IC-SIDE-NAVIGATION\";\n\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\n@Component({\n tag: \"ic-badge\",\n styleUrl: \"ic-badge.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Badge {\n private ariaLabel: string | null = null;\n private foregroundColour: IcBrandForeground;\n private parentAriaLabel: string;\n private initialPosition: IcBadgePositions = this.position ?? \"far\";\n\n @Element() el: HTMLIcBadgeElement;\n\n /**\n * The accessible label of the badge component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string;\n\n @Watch(\"accessibleLabel\")\n accessibleLabelHandler(): void {\n this.setAccessibleLabel();\n }\n\n /**\n * The custom badge colour. This will only style the badge component if variant=\"custom\".\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor;\n\n @Watch(\"customColor\")\n customColorHandler(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n }\n\n /**\n * The maximum number shown on the badge appended with a +.\n * This will only be displayed if type=\"text\" and label is not empty.\n */\n @Prop() maxNumber?: number;\n\n /**\n * The positioning of the badge in reference to the parent element.\n */\n @Prop({ mutable: true }) position?: IcBadgePositions = \"far\";\n\n /**\n * The size of the badge to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The text displayed in the badge. This will only be displayed if type=\"text\".\n */\n @Prop() label?: string;\n\n /**\n * 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 @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The type of badge to be displayed.\n */\n @Prop() type?: IcBadgeTypes = \"text\";\n\n /**\n * The variant of the badge to be displayed.\n */\n @Prop() variant?: IcBadgeVariants = \"neutral\";\n\n @Watch(\"variant\")\n variantHandler(): void {\n if (this.variant === \"custom\") {\n this.setBadgeColour();\n }\n }\n\n /**\n * If `true`, the badge will be displayed.\n */\n @Prop() visible?: boolean = true;\n\n @Watch(\"visible\")\n visibleHandler(): void {\n this.setAccessibleLabel();\n }\n\n componentWillLoad(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n\n const ariaLabel = this.el.parentElement?.ariaLabel;\n if (ariaLabel) this.parentAriaLabel = ariaLabel;\n this.setAccessibleLabel();\n }\n\n componentDidLoad(): void {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Badge\"\n );\n }\n\n componentWillRender(): void {\n this.isInTopNav() && this.setPositionInTopNavigation();\n this.isInSideNav() && this.setPositionInSideNavigation();\n }\n\n @Listen(\"icNavigationMenuOpened\", { target: \"document\" })\n navBarMenuOpenHandler(): void {\n this.isInTopNav() && (this.position = \"inline\");\n }\n\n @Listen(\"icNavigationMenuClosed\", { target: \"document\" })\n navBarMenuCloseHandler(): void {\n this.isInTopNav() && (this.position = this.initialPosition);\n }\n\n private setBadgeColour = () => {\n const colorRGBA = this.customColor ? convertToRGBA(this.customColor) : null;\n\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n this.el.style.backgroundColor = `rgba(${r}, ${g}, ${b}, ${a})`;\n this.foregroundColour = getBrandForegroundAppearance(\n (r * 299 + g * 587 + b * 114) / 1000\n );\n }\n };\n\n private getLabel = () =>\n this.maxNumber && Number(this.label) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.label;\n\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n private setAccessibleLabel = () => {\n const parentEl = this.el.parentElement;\n const defaultAriaLabel = this.isAccessibleLabelDefined()\n ? this.accessibleLabel\n : this.label || \"with badge being displayed\";\n\n if (parentEl) {\n const { tagName } = parentEl;\n if (\n tagName !== \"IC-CARD\" &&\n (tagName !== \"IC-TAB\" || (tagName === \"IC-TAB\" && this.parentAriaLabel))\n ) {\n const ariaLabelPrefix = this.parentAriaLabel\n ? `${this.parentAriaLabel} ,`\n : \"\";\n parentEl.ariaLabel = this.visible\n ? `${ariaLabelPrefix} ${defaultAriaLabel}`\n : null;\n } else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n\n private setPositionInTopNavigation = () => {\n this.position = this.isInMobileMode() ? \"inline\" : this.initialPosition;\n };\n\n private setPositionInSideNavigation = () => {\n this.position = \"near\";\n };\n\n private isInTopNav = (): boolean => {\n const parentEl = this.el.parentElement;\n if (!parentEl) return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl?.parentElement;\n return (\n grandparentEl?.tagName === TOP_NAVIGATION ||\n greatGrandparentEl?.tagName === TOP_NAVIGATION\n );\n };\n\n private isInSideNav = (): boolean => {\n const parentEl = this.el.parentElement;\n if (!parentEl) return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl?.parentElement;\n return (\n grandparentEl?.tagName === SIDE_NAVIGATION ||\n greatGrandparentEl?.tagName === SIDE_NAVIGATION\n );\n };\n\n private isInMobileMode = (): boolean => {\n const parentEl = this.el.parentElement;\n if (!parentEl) return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl?.parentElement;\n return (\n ((grandparentEl?.tagName === TOP_NAVIGATION ||\n grandparentEl?.tagName === SIDE_NAVIGATION) &&\n grandparentEl.classList.contains(\"mobile-mode\")) ||\n ((greatGrandparentEl?.tagName === TOP_NAVIGATION ||\n greatGrandparentEl?.tagName === SIDE_NAVIGATION) &&\n greatGrandparentEl.classList.contains(\"mobile-mode\"))\n );\n };\n\n private isAccessibleLabelDefined = () =>\n isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n\n render() {\n const {\n ariaLabel,\n el,\n foregroundColour,\n getLabel,\n position,\n size,\n label,\n type,\n variant,\n visible,\n theme,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-badge-${position}`]: true,\n [`ic-badge-${size}`]: true,\n [`ic-badge-${variant}`]: true,\n [`ic-badge-${type}`]: true,\n [`ic-badge-foreground-${foregroundColour}`]:\n foregroundColour !== null && variant === \"custom\",\n [`${visible ? \"ic-badge-show\" : \"ic-badge-hide\"}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n id={el.id || null}\n aria-label={ariaLabel}\n role=\"status\"\n >\n {type === \"icon\" && <slot name=\"badge-icon\"></slot>}\n {type === \"text\" && label && (\n <ic-typography variant={size === \"small\" ? \"badge-small\" : \"badge\"}>\n {getLabel()}\n </ic-typography>\n )}\n {type === \"dot\" && <span class=\"sr-only\">badge</span>}\n </Host>\n );\n }\n}\n"],"version":3}