@ukic/web-components 3.20.0 → 3.22.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 (642) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-3a796e7a.js → helpers-81cd6930.js} +3 -16
  3. package/dist/cjs/helpers-81cd6930.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 +17 -10
  6. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-action-chip.cjs.entry.js +7 -3
  8. package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -2
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-badge.cjs.entry.js +2 -2
  13. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -2
  15. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-button_3.cjs.entry.js +7 -7
  18. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-card-horizontal.cjs.entry.js +174 -0
  20. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -2
  22. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-checkbox-group.cjs.entry.js +3 -3
  24. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-checkbox.cjs.entry.js +6 -6
  26. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-chip.cjs.entry.js +7 -3
  28. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-classification-banner.cjs.entry.js +13 -5
  30. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
  32. package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
  33. package/dist/cjs/ic-dialog.cjs.entry.js +2 -2
  34. package/dist/cjs/ic-divider.cjs.entry.js +17 -8
  35. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-empty-state.cjs.entry.js +3 -3
  37. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-footer-link.cjs.entry.js +4 -4
  39. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-hero.cjs.entry.js +5 -5
  42. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +7 -7
  43. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +218 -86
  45. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-input-label_2.cjs.entry.js +17 -12
  47. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-layout-grid-item.cjs.entry.js +2 -2
  49. package/dist/cjs/ic-layout-grid.cjs.entry.js +2 -2
  50. package/dist/cjs/ic-link.cjs.entry.js +3 -3
  51. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  53. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -3
  56. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-navigation-item.cjs.entry.js +7 -5
  58. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
  60. package/dist/cjs/ic-page-header.cjs.entry.js +8 -8
  61. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-pagination-bar.cjs.entry.js +389 -0
  63. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -0
  64. package/dist/cjs/ic-pagination-item.cjs.entry.js +3 -3
  65. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-pagination_3.cjs.entry.js +1412 -0
  67. package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -0
  68. package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
  69. package/dist/cjs/ic-radio-group.cjs.entry.js +5 -5
  70. package/dist/cjs/ic-radio-option.cjs.entry.js +6 -6
  71. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-search-bar.cjs.entry.js +12 -12
  73. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  75. package/dist/cjs/ic-side-navigation.cjs.entry.js +30 -15
  76. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  78. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  79. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  80. package/dist/cjs/ic-step.cjs.entry.js +14 -14
  81. package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
  82. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-switch.cjs.entry.js +6 -6
  84. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -2
  86. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  88. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  89. package/dist/cjs/ic-tab.cjs.entry.js +2 -2
  90. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  91. package/dist/cjs/ic-theme.cjs.entry.js +2 -2
  92. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  93. package/dist/cjs/ic-toast.cjs.entry.js +8 -7
  94. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +4 -4
  96. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  97. package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -3
  98. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  99. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-typography.cjs.entry.js +2 -2
  101. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  102. package/dist/cjs/index-d337cd8a.js +16 -16
  103. package/dist/cjs/loader.cjs.js +1 -1
  104. package/dist/collection/collection-manifest.json +3 -1
  105. package/dist/collection/components/ic-accordion/ic-accordion.css +6 -0
  106. package/dist/collection/components/ic-accordion/ic-accordion.js +15 -8
  107. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  108. package/dist/collection/components/ic-action-chip/ic-action-chip.css +15 -2
  109. package/dist/collection/components/ic-action-chip/ic-action-chip.js +5 -1
  110. package/dist/collection/components/ic-action-chip/ic-action-chip.js.map +1 -1
  111. package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +7 -0
  112. package/dist/collection/components/ic-badge/ic-badge.css +6 -0
  113. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.css +8 -0
  114. package/dist/collection/components/ic-button/ic-button.css +7 -0
  115. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +728 -0
  116. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +512 -0
  117. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
  118. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js +876 -0
  119. package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +7 -0
  120. package/dist/collection/components/ic-card-vertical/ic-card-vertical.stories.js +1 -1
  121. package/dist/collection/components/ic-checkbox/ic-checkbox.css +7 -5
  122. package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -5
  123. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  124. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +3 -3
  125. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  126. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +35 -0
  127. package/dist/collection/components/ic-chip/ic-chip.css +15 -3
  128. package/dist/collection/components/ic-chip/ic-chip.js +5 -1
  129. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  130. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +33 -5
  131. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  132. package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +32 -0
  133. package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
  134. package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
  135. package/dist/collection/components/ic-dialog/ic-dialog.js +1 -1
  136. package/dist/collection/components/ic-divider/ic-divider.js +16 -7
  137. package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
  138. package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
  139. package/dist/collection/components/ic-footer-link/ic-footer-link.css +6 -0
  140. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
  141. package/dist/collection/components/ic-hero/ic-hero.js +4 -4
  142. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +6 -0
  143. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
  144. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +7 -0
  145. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
  146. package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
  147. package/dist/collection/components/ic-input-label/ic-input-label.js +16 -8
  148. package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
  149. package/dist/collection/components/ic-input-validation/ic-input-validation.js +3 -3
  150. package/dist/collection/components/ic-layout-grid/ic-layout-grid.js +2 -2
  151. package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.js +2 -2
  152. package/dist/collection/components/ic-link/ic-link.css +7 -0
  153. package/dist/collection/components/ic-link/ic-link.js +1 -1
  154. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +5 -5
  155. package/dist/collection/components/ic-menu/ic-menu.css +12 -1
  156. package/dist/collection/components/ic-menu/ic-menu.js +184 -53
  157. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  158. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  159. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +9 -0
  160. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
  161. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +41 -0
  162. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +5 -3
  163. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  164. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
  165. package/dist/collection/components/ic-page-header/ic-page-header.css +1 -2
  166. package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
  167. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  168. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +104 -0
  169. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +895 -0
  170. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -0
  171. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +215 -0
  172. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  173. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  174. package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +6 -0
  175. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
  176. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
  177. package/dist/collection/components/ic-radio-group/ic-radio-group.js +4 -4
  178. package/dist/collection/components/ic-radio-option/ic-radio-option.css +6 -0
  179. package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
  180. package/dist/collection/components/ic-search-bar/ic-search-bar.css +6 -0
  181. package/dist/collection/components/ic-search-bar/ic-search-bar.js +10 -11
  182. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  183. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  184. package/dist/collection/components/ic-select/ic-select.css +9 -2
  185. package/dist/collection/components/ic-select/ic-select.js +414 -589
  186. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  187. package/dist/collection/components/ic-select/ic-select.types.js +2 -0
  188. package/dist/collection/components/ic-select/ic-select.types.js.map +1 -0
  189. package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +26 -21
  190. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +46 -21
  191. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +29 -14
  192. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  193. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  194. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  195. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  196. package/dist/collection/components/ic-step/ic-step.js +13 -13
  197. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  198. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  199. package/dist/collection/components/ic-switch/ic-switch.css +7 -0
  200. package/dist/collection/components/ic-switch/ic-switch.js +4 -4
  201. package/dist/collection/components/ic-tab/ic-tab.css +6 -0
  202. package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -2
  203. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  204. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  205. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  206. package/dist/collection/components/ic-text-field/ic-text-field.js +5 -5
  207. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  208. package/dist/collection/components/ic-toast/ic-toast.js +7 -6
  209. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  210. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  211. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
  212. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +6 -0
  213. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
  214. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +8 -4
  215. package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +100 -0
  216. package/dist/collection/components/ic-typography/ic-typography.css +6 -0
  217. package/dist/collection/utils/helpers.js +2 -15
  218. package/dist/collection/utils/helpers.js.map +1 -1
  219. package/dist/collection/utils/types.js.map +1 -1
  220. package/dist/components/helpers.js +3 -16
  221. package/dist/components/helpers.js.map +1 -1
  222. package/dist/components/ic-accordion.js +16 -9
  223. package/dist/components/ic-accordion.js.map +1 -1
  224. package/dist/components/ic-action-chip.js +6 -2
  225. package/dist/components/ic-action-chip.js.map +1 -1
  226. package/dist/components/ic-back-to-top.js +1 -1
  227. package/dist/components/ic-back-to-top.js.map +1 -1
  228. package/dist/components/ic-badge.js +1 -1
  229. package/dist/components/ic-badge.js.map +1 -1
  230. package/dist/components/ic-breadcrumb-group.js +1 -1
  231. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  232. package/dist/components/ic-button2.js +1 -1
  233. package/dist/components/ic-button2.js.map +1 -1
  234. package/dist/components/ic-card-horizontal.d.ts +11 -0
  235. package/dist/components/ic-card-horizontal.js +214 -0
  236. package/dist/components/ic-card-horizontal.js.map +1 -0
  237. package/dist/components/ic-card-vertical.js +1 -1
  238. package/dist/components/ic-card-vertical.js.map +1 -1
  239. package/dist/components/ic-checkbox-group.js +2 -2
  240. package/dist/components/ic-checkbox-group.js.map +1 -1
  241. package/dist/components/ic-checkbox.js +5 -5
  242. package/dist/components/ic-checkbox.js.map +1 -1
  243. package/dist/components/ic-chip.js +6 -2
  244. package/dist/components/ic-chip.js.map +1 -1
  245. package/dist/components/ic-classification-banner.js +14 -5
  246. package/dist/components/ic-classification-banner.js.map +1 -1
  247. package/dist/components/ic-data-list.js +2 -2
  248. package/dist/components/ic-data-row.js +2 -2
  249. package/dist/components/ic-dialog.js +1 -1
  250. package/dist/components/ic-divider2.js +17 -8
  251. package/dist/components/ic-divider2.js.map +1 -1
  252. package/dist/components/ic-empty-state.js +2 -2
  253. package/dist/components/ic-footer-link.js +3 -3
  254. package/dist/components/ic-footer-link.js.map +1 -1
  255. package/dist/components/ic-hero.js +4 -4
  256. package/dist/components/ic-horizontal-scroll2.js +6 -6
  257. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  258. package/dist/components/ic-input-component-container2.js +4 -4
  259. package/dist/components/ic-input-component-container2.js.map +1 -1
  260. package/dist/components/ic-input-container2.js +2 -2
  261. package/dist/components/ic-input-label2.js +13 -8
  262. package/dist/components/ic-input-label2.js.map +1 -1
  263. package/dist/components/ic-input-validation2.js +3 -3
  264. package/dist/components/ic-layout-grid-item.js +2 -2
  265. package/dist/components/ic-layout-grid.js +2 -2
  266. package/dist/components/ic-link2.js +2 -2
  267. package/dist/components/ic-link2.js.map +1 -1
  268. package/dist/components/ic-loading-indicator2.js +5 -5
  269. package/dist/components/ic-menu-group.js +1 -1
  270. package/dist/components/ic-menu2.js +213 -79
  271. package/dist/components/ic-menu2.js.map +1 -1
  272. package/dist/components/ic-navigation-group.js +2 -2
  273. package/dist/components/ic-navigation-group.js.map +1 -1
  274. package/dist/components/ic-navigation-item.js +6 -4
  275. package/dist/components/ic-navigation-item.js.map +1 -1
  276. package/dist/components/ic-navigation-menu2.js +4 -4
  277. package/dist/components/ic-page-header.js +7 -7
  278. package/dist/components/ic-page-header.js.map +1 -1
  279. package/dist/components/ic-pagination-bar.d.ts +11 -0
  280. package/dist/components/ic-pagination-bar.js +523 -0
  281. package/dist/components/ic-pagination-bar.js.map +1 -0
  282. package/dist/components/ic-pagination-item2.js +2 -2
  283. package/dist/components/ic-pagination-item2.js.map +1 -1
  284. package/dist/components/ic-pagination.js +1 -375
  285. package/dist/components/ic-pagination.js.map +1 -1
  286. package/dist/{esm/ic-pagination.entry.js → components/ic-pagination2.js} +86 -15
  287. package/dist/components/ic-pagination2.js.map +1 -0
  288. package/dist/components/ic-popover-menu.js +4 -4
  289. package/dist/components/ic-popover-menu.js.map +1 -1
  290. package/dist/components/ic-radio-group.js +4 -4
  291. package/dist/components/ic-radio-option.js +5 -5
  292. package/dist/components/ic-radio-option.js.map +1 -1
  293. package/dist/components/ic-search-bar.js +12 -12
  294. package/dist/components/ic-search-bar.js.map +1 -1
  295. package/dist/components/ic-section-container2.js +2 -2
  296. package/dist/components/ic-select.js +1 -994
  297. package/dist/components/ic-select.js.map +1 -1
  298. package/dist/components/ic-select2.js +804 -0
  299. package/dist/components/ic-select2.js.map +1 -0
  300. package/dist/components/ic-side-navigation.js +30 -15
  301. package/dist/components/ic-side-navigation.js.map +1 -1
  302. package/dist/components/ic-skeleton.js +2 -2
  303. package/dist/components/ic-skip-link.js +2 -2
  304. package/dist/components/ic-status-tag.js +2 -2
  305. package/dist/components/ic-step.js +13 -13
  306. package/dist/components/ic-stepper.js +2 -2
  307. package/dist/components/ic-stepper.js.map +1 -1
  308. package/dist/components/ic-switch.js +5 -5
  309. package/dist/components/ic-switch.js.map +1 -1
  310. package/dist/components/ic-tab-context.js +1 -2
  311. package/dist/components/ic-tab-context.js.map +1 -1
  312. package/dist/components/ic-tab-group.js +2 -2
  313. package/dist/components/ic-tab-panel.js +2 -2
  314. package/dist/components/ic-tab-panel.js.map +1 -1
  315. package/dist/components/ic-tab.js +1 -1
  316. package/dist/components/ic-tab.js.map +1 -1
  317. package/dist/components/ic-text-field.js +1 -528
  318. package/dist/components/ic-text-field.js.map +1 -1
  319. package/dist/{esm/ic-text-field.entry.js → components/ic-text-field2.js} +119 -16
  320. package/dist/components/ic-text-field2.js.map +1 -0
  321. package/dist/components/ic-theme.js +1 -1
  322. package/dist/components/ic-toast-region.js +1 -1
  323. package/dist/components/ic-toast.js +7 -6
  324. package/dist/components/ic-toast.js.map +1 -1
  325. package/dist/components/ic-toggle-button-group.js +3 -3
  326. package/dist/components/ic-toggle-button-group.js.map +1 -1
  327. package/dist/components/ic-toggle-button.js +2 -2
  328. package/dist/components/ic-top-navigation.js +1 -1
  329. package/dist/components/ic-top-navigation.js.map +1 -1
  330. package/dist/components/ic-typography2.js +1 -1
  331. package/dist/components/ic-typography2.js.map +1 -1
  332. package/dist/core/core.esm.js +1 -1
  333. package/dist/core/core.esm.js.map +1 -1
  334. package/dist/core/p-05fd2707.entry.js +2 -0
  335. package/dist/core/p-05fd2707.entry.js.map +1 -0
  336. package/dist/core/{p-ba4abeac.entry.js → p-09505807.entry.js} +2 -2
  337. package/dist/core/{p-8f45f956.entry.js → p-09caf7ed.entry.js} +2 -2
  338. package/dist/core/p-09caf7ed.entry.js.map +1 -0
  339. package/dist/core/{p-8b1567c9.entry.js → p-0b728f50.entry.js} +2 -2
  340. package/dist/core/p-0b728f50.entry.js.map +1 -0
  341. package/dist/core/p-0fb7f915.entry.js +2 -0
  342. package/dist/core/p-0fb7f915.entry.js.map +1 -0
  343. package/dist/core/p-1b81ec88.entry.js +2 -0
  344. package/dist/core/p-1b81ec88.entry.js.map +1 -0
  345. package/dist/core/{p-3582c7df.entry.js → p-2691cc80.entry.js} +2 -2
  346. package/dist/core/p-2691cc80.entry.js.map +1 -0
  347. package/dist/core/{p-fe0153ec.entry.js → p-2a124daf.entry.js} +2 -2
  348. package/dist/core/{p-f5fd4a76.entry.js → p-2b87c592.entry.js} +2 -2
  349. package/dist/core/p-2b87c592.entry.js.map +1 -0
  350. package/dist/core/{p-c7f8547d.entry.js → p-2bd80913.entry.js} +2 -2
  351. package/dist/core/p-2bd80913.entry.js.map +1 -0
  352. package/dist/core/{p-aed1c7e7.entry.js → p-347cc084.entry.js} +2 -2
  353. package/dist/core/p-393af2bc.entry.js +2 -0
  354. package/dist/core/p-393af2bc.entry.js.map +1 -0
  355. package/dist/core/{p-b5e39585.entry.js → p-3aed13ba.entry.js} +2 -2
  356. package/dist/core/{p-276a6c8f.entry.js → p-46fd555f.entry.js} +2 -2
  357. package/dist/core/p-48a628f0.entry.js +2 -0
  358. package/dist/core/{p-23dc27a8.entry.js.map → p-48a628f0.entry.js.map} +1 -1
  359. package/dist/core/p-4f56acff.entry.js +2 -0
  360. package/dist/core/p-4f56acff.entry.js.map +1 -0
  361. package/dist/core/{p-86989873.entry.js → p-506d428a.entry.js} +2 -2
  362. package/dist/core/p-506d428a.entry.js.map +1 -0
  363. package/dist/core/p-50dca790.entry.js +2 -0
  364. package/dist/core/p-50dca790.entry.js.map +1 -0
  365. package/dist/core/p-53ab3c0f.entry.js +2 -0
  366. package/dist/core/p-53ab3c0f.entry.js.map +1 -0
  367. package/dist/core/{p-889bb8db.entry.js → p-56de4f4b.entry.js} +2 -2
  368. package/dist/core/p-5900cb65.entry.js +2 -0
  369. package/dist/core/p-5900cb65.entry.js.map +1 -0
  370. package/dist/core/{p-608b4912.entry.js → p-5976de6e.entry.js} +2 -2
  371. package/dist/core/{p-cf056074.entry.js → p-61d79fc6.entry.js} +2 -2
  372. package/dist/core/{p-cf056074.entry.js.map → p-61d79fc6.entry.js.map} +1 -1
  373. package/dist/core/{p-45076d7e.entry.js → p-659d048d.entry.js} +2 -2
  374. package/dist/core/{p-1edf2689.entry.js → p-67de1290.entry.js} +2 -2
  375. package/dist/core/p-6b4ec95f.entry.js +3 -0
  376. package/dist/core/p-6b4ec95f.entry.js.map +1 -0
  377. package/dist/core/{p-f700b759.entry.js → p-73043f57.entry.js} +2 -2
  378. package/dist/core/{p-7b8e5926.entry.js → p-735d3096.entry.js} +2 -2
  379. package/dist/core/{p-0301d1c8.entry.js → p-7b538fd1.entry.js} +2 -2
  380. package/dist/core/{p-cdbbcef4.entry.js → p-80d85403.entry.js} +2 -2
  381. package/dist/core/p-80d85403.entry.js.map +1 -0
  382. package/dist/core/{p-09c31ac6.entry.js → p-83578f1d.entry.js} +2 -2
  383. package/dist/core/{p-09c31ac6.entry.js.map → p-83578f1d.entry.js.map} +1 -1
  384. package/dist/core/{p-b8c0c142.entry.js → p-880f7548.entry.js} +2 -2
  385. package/dist/core/p-880f7548.entry.js.map +1 -0
  386. package/dist/core/{p-0d711c6a.entry.js → p-8a833e82.entry.js} +2 -2
  387. package/dist/core/{p-c16e982c.entry.js → p-90678e67.entry.js} +2 -2
  388. package/dist/core/{p-93e1ba0a.entry.js → p-9502fb86.entry.js} +2 -2
  389. package/dist/core/{p-6740c915.entry.js → p-99433296.entry.js} +2 -2
  390. package/dist/core/p-99433296.entry.js.map +1 -0
  391. package/dist/core/{p-76e8df31.entry.js → p-9c2b2cb9.entry.js} +2 -2
  392. package/dist/core/{p-949d08d3.entry.js → p-9cb83a2e.entry.js} +2 -2
  393. package/dist/core/{p-d2d17d6d.entry.js → p-a08d6b46.entry.js} +2 -2
  394. package/dist/core/p-a08d6b46.entry.js.map +1 -0
  395. package/dist/core/p-a321feee.entry.js +2 -0
  396. package/dist/core/p-a321feee.entry.js.map +1 -0
  397. package/dist/core/{p-45c553db.entry.js → p-a780a34b.entry.js} +2 -2
  398. package/dist/core/{p-90814d32.entry.js → p-aad03a3c.entry.js} +2 -2
  399. package/dist/core/{p-ec14c783.entry.js → p-aaf4e367.entry.js} +2 -2
  400. package/dist/core/{p-8c00614c.entry.js → p-b52c44eb.entry.js} +2 -2
  401. package/dist/core/{p-0722d7b6.entry.js → p-b777f0a1.entry.js} +2 -2
  402. package/dist/core/p-b777f0a1.entry.js.map +1 -0
  403. package/dist/core/p-b77b1e1f.js +2 -0
  404. package/dist/core/p-b77b1e1f.js.map +1 -0
  405. package/dist/core/p-b997ad5e.entry.js +2 -0
  406. package/dist/core/p-b997ad5e.entry.js.map +1 -0
  407. package/dist/core/{p-a0af1b0a.entry.js → p-bb7652cd.entry.js} +2 -2
  408. package/dist/core/{p-1d8559f0.entry.js → p-c156e6e9.entry.js} +2 -2
  409. package/dist/core/{p-e1814e7e.entry.js → p-cad23b7d.entry.js} +2 -2
  410. package/dist/core/{p-6aa8d3ce.entry.js → p-cbca04bb.entry.js} +2 -2
  411. package/dist/core/p-cbca04bb.entry.js.map +1 -0
  412. package/dist/core/{p-e176881a.entry.js → p-cc64e5ef.entry.js} +2 -2
  413. package/dist/core/{p-d478d13e.entry.js → p-cfbacca1.entry.js} +2 -2
  414. package/dist/core/p-cfbacca1.entry.js.map +1 -0
  415. package/dist/core/{p-ebc47282.entry.js → p-daec7e69.entry.js} +2 -2
  416. package/dist/core/{p-5ac3adb9.entry.js → p-e7767c0d.entry.js} +2 -2
  417. package/dist/core/p-e7767c0d.entry.js.map +1 -0
  418. package/dist/core/p-e938eb31.entry.js +2 -0
  419. package/dist/core/p-e938eb31.entry.js.map +1 -0
  420. package/dist/core/{p-81f60443.entry.js → p-ea7a3d30.entry.js} +2 -2
  421. package/dist/core/p-ea7a3d30.entry.js.map +1 -0
  422. package/dist/core/{p-ad5aca6f.entry.js → p-ea890d3d.entry.js} +2 -2
  423. package/dist/core/{p-880afd4b.entry.js → p-ebd688b9.entry.js} +2 -2
  424. package/dist/core/p-ebd688b9.entry.js.map +1 -0
  425. package/dist/core/p-ef70ea50.entry.js +2 -0
  426. package/dist/core/p-ef70ea50.entry.js.map +1 -0
  427. package/dist/core/{p-1fc4b88f.entry.js → p-f64996f1.entry.js} +2 -2
  428. package/dist/core/p-f64996f1.entry.js.map +1 -0
  429. package/dist/core/{p-0f998905.entry.js → p-f661ba76.entry.js} +2 -2
  430. package/dist/core/p-f661ba76.entry.js.map +1 -0
  431. package/dist/core/{p-4e43b272.entry.js → p-f84ac9c6.entry.js} +2 -2
  432. package/dist/core/{p-df029b1b.entry.js → p-fb9376f0.entry.js} +2 -2
  433. package/dist/core/p-fb9376f0.entry.js.map +1 -0
  434. package/dist/esm/core.js +1 -1
  435. package/dist/esm/{helpers-0f85537f.js → helpers-66681c73.js} +4 -17
  436. package/dist/esm/helpers-66681c73.js.map +1 -0
  437. package/dist/esm/ic-accordion-group.entry.js +1 -1
  438. package/dist/esm/ic-accordion.entry.js +17 -10
  439. package/dist/esm/ic-accordion.entry.js.map +1 -1
  440. package/dist/esm/ic-action-chip.entry.js +7 -3
  441. package/dist/esm/ic-action-chip.entry.js.map +1 -1
  442. package/dist/esm/ic-alert.entry.js +1 -1
  443. package/dist/esm/ic-back-to-top.entry.js +2 -2
  444. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  445. package/dist/esm/ic-badge.entry.js +2 -2
  446. package/dist/esm/ic-badge.entry.js.map +1 -1
  447. package/dist/esm/ic-breadcrumb-group.entry.js +2 -2
  448. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  449. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  450. package/dist/esm/ic-button_3.entry.js +7 -7
  451. package/dist/esm/ic-button_3.entry.js.map +1 -1
  452. package/dist/esm/ic-card-horizontal.entry.js +170 -0
  453. package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
  454. package/dist/esm/ic-card-vertical.entry.js +2 -2
  455. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  456. package/dist/esm/ic-checkbox-group.entry.js +3 -3
  457. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  458. package/dist/esm/ic-checkbox.entry.js +6 -6
  459. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  460. package/dist/esm/ic-chip.entry.js +7 -3
  461. package/dist/esm/ic-chip.entry.js.map +1 -1
  462. package/dist/esm/ic-classification-banner.entry.js +13 -5
  463. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  464. package/dist/esm/ic-data-list.entry.js +2 -2
  465. package/dist/esm/ic-data-row.entry.js +3 -3
  466. package/dist/esm/ic-dialog.entry.js +2 -2
  467. package/dist/esm/ic-divider.entry.js +17 -8
  468. package/dist/esm/ic-divider.entry.js.map +1 -1
  469. package/dist/esm/ic-empty-state.entry.js +3 -3
  470. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  471. package/dist/esm/ic-footer-link.entry.js +4 -4
  472. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  473. package/dist/esm/ic-footer.entry.js +1 -1
  474. package/dist/esm/ic-hero.entry.js +5 -5
  475. package/dist/esm/ic-horizontal-scroll.entry.js +7 -7
  476. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  477. package/dist/esm/ic-input-component-container_3.entry.js +218 -86
  478. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  479. package/dist/esm/ic-input-label_2.entry.js +17 -12
  480. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  481. package/dist/esm/ic-layout-grid-item.entry.js +2 -2
  482. package/dist/esm/ic-layout-grid.entry.js +2 -2
  483. package/dist/esm/ic-link.entry.js +3 -3
  484. package/dist/esm/ic-link.entry.js.map +1 -1
  485. package/dist/esm/ic-menu-group.entry.js +2 -2
  486. package/dist/esm/ic-menu-item.entry.js +1 -1
  487. package/dist/esm/ic-navigation-button.entry.js +1 -1
  488. package/dist/esm/ic-navigation-group.entry.js +3 -3
  489. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  490. package/dist/esm/ic-navigation-item.entry.js +7 -5
  491. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  492. package/dist/esm/ic-navigation-menu.entry.js +5 -5
  493. package/dist/esm/ic-page-header.entry.js +8 -8
  494. package/dist/esm/ic-page-header.entry.js.map +1 -1
  495. package/dist/esm/ic-pagination-bar.entry.js +385 -0
  496. package/dist/esm/ic-pagination-bar.entry.js.map +1 -0
  497. package/dist/esm/ic-pagination-item.entry.js +3 -3
  498. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  499. package/dist/esm/ic-pagination_3.entry.js +1406 -0
  500. package/dist/esm/ic-pagination_3.entry.js.map +1 -0
  501. package/dist/esm/ic-popover-menu.entry.js +5 -5
  502. package/dist/esm/ic-radio-group.entry.js +5 -5
  503. package/dist/esm/ic-radio-option.entry.js +6 -6
  504. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  505. package/dist/esm/ic-search-bar.entry.js +12 -12
  506. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  507. package/dist/esm/ic-section-container.entry.js +2 -2
  508. package/dist/esm/ic-side-navigation.entry.js +30 -15
  509. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  510. package/dist/esm/ic-skeleton.entry.js +2 -2
  511. package/dist/esm/ic-skip-link.entry.js +2 -2
  512. package/dist/esm/ic-status-tag.entry.js +3 -3
  513. package/dist/esm/ic-step.entry.js +14 -14
  514. package/dist/esm/ic-stepper.entry.js +3 -3
  515. package/dist/esm/ic-stepper.entry.js.map +1 -1
  516. package/dist/esm/ic-switch.entry.js +6 -6
  517. package/dist/esm/ic-switch.entry.js.map +1 -1
  518. package/dist/esm/ic-tab-context.entry.js +1 -2
  519. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  520. package/dist/esm/ic-tab-group.entry.js +3 -3
  521. package/dist/esm/ic-tab-panel.entry.js +2 -2
  522. package/dist/esm/ic-tab.entry.js +2 -2
  523. package/dist/esm/ic-tab.entry.js.map +1 -1
  524. package/dist/esm/ic-theme.entry.js +2 -2
  525. package/dist/esm/ic-toast-region.entry.js +1 -1
  526. package/dist/esm/ic-toast.entry.js +8 -7
  527. package/dist/esm/ic-toast.entry.js.map +1 -1
  528. package/dist/esm/ic-toggle-button-group.entry.js +4 -4
  529. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  530. package/dist/esm/ic-toggle-button.entry.js +3 -3
  531. package/dist/esm/ic-top-navigation.entry.js +2 -2
  532. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  533. package/dist/esm/ic-typography.entry.js +2 -2
  534. package/dist/esm/ic-typography.entry.js.map +1 -1
  535. package/dist/esm/index-a7a720e7.js +16 -16
  536. package/dist/esm/loader.js +1 -1
  537. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +89 -0
  538. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
  539. package/dist/types/components/ic-classification-banner/ic-classification-banner.d.ts +4 -0
  540. package/dist/types/components/ic-divider/ic-divider.d.ts +2 -0
  541. package/dist/types/components/ic-input-label/ic-input-label.d.ts +4 -1
  542. package/dist/types/components/ic-menu/ic-menu.d.ts +11 -1
  543. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +162 -0
  544. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +8 -0
  545. package/dist/types/components/ic-select/ic-select.d.ts +53 -80
  546. package/dist/types/components/ic-select/ic-select.types.d.ts +43 -0
  547. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +3 -2
  548. package/dist/types/components.d.ts +357 -7
  549. package/dist/types/utils/helpers.d.ts +2 -4
  550. package/dist/types/utils/types.d.ts +1 -0
  551. package/hydrate/index.js +1504 -900
  552. package/hydrate/index.mjs +1504 -900
  553. package/package.json +2 -2
  554. package/vscode-data.json +248 -0
  555. package/dist/cjs/helpers-3a796e7a.js.map +0 -1
  556. package/dist/cjs/ic-pagination.cjs.entry.js +0 -312
  557. package/dist/cjs/ic-pagination.cjs.entry.js.map +0 -1
  558. package/dist/cjs/ic-select.cjs.entry.js +0 -879
  559. package/dist/cjs/ic-select.cjs.entry.js.map +0 -1
  560. package/dist/cjs/ic-text-field.cjs.entry.js +0 -433
  561. package/dist/cjs/ic-text-field.cjs.entry.js.map +0 -1
  562. package/dist/core/p-0722d7b6.entry.js.map +0 -1
  563. package/dist/core/p-0f6fd5d3.entry.js +0 -2
  564. package/dist/core/p-0f6fd5d3.entry.js.map +0 -1
  565. package/dist/core/p-0f998905.entry.js.map +0 -1
  566. package/dist/core/p-107281c4.entry.js +0 -2
  567. package/dist/core/p-107281c4.entry.js.map +0 -1
  568. package/dist/core/p-1fc4b88f.entry.js.map +0 -1
  569. package/dist/core/p-23dc27a8.entry.js +0 -2
  570. package/dist/core/p-3582c7df.entry.js.map +0 -1
  571. package/dist/core/p-3c7e90a7.entry.js +0 -2
  572. package/dist/core/p-3c7e90a7.entry.js.map +0 -1
  573. package/dist/core/p-57ce68e5.entry.js +0 -2
  574. package/dist/core/p-57ce68e5.entry.js.map +0 -1
  575. package/dist/core/p-5ac3adb9.entry.js.map +0 -1
  576. package/dist/core/p-656a9127.entry.js +0 -2
  577. package/dist/core/p-656a9127.entry.js.map +0 -1
  578. package/dist/core/p-6740c915.entry.js.map +0 -1
  579. package/dist/core/p-6aa8d3ce.entry.js.map +0 -1
  580. package/dist/core/p-72344764.entry.js +0 -2
  581. package/dist/core/p-72344764.entry.js.map +0 -1
  582. package/dist/core/p-7c38dd1f.entry.js +0 -2
  583. package/dist/core/p-7c38dd1f.entry.js.map +0 -1
  584. package/dist/core/p-81f60443.entry.js.map +0 -1
  585. package/dist/core/p-840c647f.entry.js +0 -2
  586. package/dist/core/p-840c647f.entry.js.map +0 -1
  587. package/dist/core/p-86989873.entry.js.map +0 -1
  588. package/dist/core/p-880afd4b.entry.js.map +0 -1
  589. package/dist/core/p-8b1567c9.entry.js.map +0 -1
  590. package/dist/core/p-8f45f956.entry.js.map +0 -1
  591. package/dist/core/p-9b60ca02.entry.js +0 -2
  592. package/dist/core/p-9b60ca02.entry.js.map +0 -1
  593. package/dist/core/p-a16415e4.entry.js +0 -3
  594. package/dist/core/p-a16415e4.entry.js.map +0 -1
  595. package/dist/core/p-b22fc28d.entry.js +0 -2
  596. package/dist/core/p-b22fc28d.entry.js.map +0 -1
  597. package/dist/core/p-b8c0c142.entry.js.map +0 -1
  598. package/dist/core/p-c3f5907e.entry.js +0 -2
  599. package/dist/core/p-c3f5907e.entry.js.map +0 -1
  600. package/dist/core/p-c7f8547d.entry.js.map +0 -1
  601. package/dist/core/p-cdbbcef4.entry.js.map +0 -1
  602. package/dist/core/p-d2d17d6d.entry.js.map +0 -1
  603. package/dist/core/p-d478d13e.entry.js.map +0 -1
  604. package/dist/core/p-dbc8bf0c.js +0 -2
  605. package/dist/core/p-dbc8bf0c.js.map +0 -1
  606. package/dist/core/p-df029b1b.entry.js.map +0 -1
  607. package/dist/core/p-f5fd4a76.entry.js.map +0 -1
  608. package/dist/core/p-fdb587ab.entry.js +0 -2
  609. package/dist/core/p-fdb587ab.entry.js.map +0 -1
  610. package/dist/esm/helpers-0f85537f.js.map +0 -1
  611. package/dist/esm/ic-pagination.entry.js.map +0 -1
  612. package/dist/esm/ic-select.entry.js +0 -875
  613. package/dist/esm/ic-select.entry.js.map +0 -1
  614. package/dist/esm/ic-text-field.entry.js.map +0 -1
  615. /package/dist/core/{p-ba4abeac.entry.js.map → p-09505807.entry.js.map} +0 -0
  616. /package/dist/core/{p-fe0153ec.entry.js.map → p-2a124daf.entry.js.map} +0 -0
  617. /package/dist/core/{p-aed1c7e7.entry.js.map → p-347cc084.entry.js.map} +0 -0
  618. /package/dist/core/{p-b5e39585.entry.js.map → p-3aed13ba.entry.js.map} +0 -0
  619. /package/dist/core/{p-276a6c8f.entry.js.map → p-46fd555f.entry.js.map} +0 -0
  620. /package/dist/core/{p-889bb8db.entry.js.map → p-56de4f4b.entry.js.map} +0 -0
  621. /package/dist/core/{p-608b4912.entry.js.map → p-5976de6e.entry.js.map} +0 -0
  622. /package/dist/core/{p-45076d7e.entry.js.map → p-659d048d.entry.js.map} +0 -0
  623. /package/dist/core/{p-1edf2689.entry.js.map → p-67de1290.entry.js.map} +0 -0
  624. /package/dist/core/{p-f700b759.entry.js.map → p-73043f57.entry.js.map} +0 -0
  625. /package/dist/core/{p-7b8e5926.entry.js.map → p-735d3096.entry.js.map} +0 -0
  626. /package/dist/core/{p-0301d1c8.entry.js.map → p-7b538fd1.entry.js.map} +0 -0
  627. /package/dist/core/{p-0d711c6a.entry.js.map → p-8a833e82.entry.js.map} +0 -0
  628. /package/dist/core/{p-c16e982c.entry.js.map → p-90678e67.entry.js.map} +0 -0
  629. /package/dist/core/{p-93e1ba0a.entry.js.map → p-9502fb86.entry.js.map} +0 -0
  630. /package/dist/core/{p-76e8df31.entry.js.map → p-9c2b2cb9.entry.js.map} +0 -0
  631. /package/dist/core/{p-949d08d3.entry.js.map → p-9cb83a2e.entry.js.map} +0 -0
  632. /package/dist/core/{p-45c553db.entry.js.map → p-a780a34b.entry.js.map} +0 -0
  633. /package/dist/core/{p-90814d32.entry.js.map → p-aad03a3c.entry.js.map} +0 -0
  634. /package/dist/core/{p-ec14c783.entry.js.map → p-aaf4e367.entry.js.map} +0 -0
  635. /package/dist/core/{p-8c00614c.entry.js.map → p-b52c44eb.entry.js.map} +0 -0
  636. /package/dist/core/{p-a0af1b0a.entry.js.map → p-bb7652cd.entry.js.map} +0 -0
  637. /package/dist/core/{p-1d8559f0.entry.js.map → p-c156e6e9.entry.js.map} +0 -0
  638. /package/dist/core/{p-e1814e7e.entry.js.map → p-cad23b7d.entry.js.map} +0 -0
  639. /package/dist/core/{p-e176881a.entry.js.map → p-cc64e5ef.entry.js.map} +0 -0
  640. /package/dist/core/{p-ebc47282.entry.js.map → p-daec7e69.entry.js.map} +0 -0
  641. /package/dist/core/{p-ad5aca6f.entry.js.map → p-ea890d3d.entry.js.map} +0 -0
  642. /package/dist/core/{p-4e43b272.entry.js.map → p-f84ac9c6.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as i,h as a,H as t,g as c}from"./p-8e4e97b4.js";import{d as s,g as e,e as o,o as r}from"./p-dbc8bf0c.js";import"./p-6215e2ae.js";const d="@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-ai){background-color:var(--ic-badge-ai) !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)}}";const l=d;const n="IC-TOP-NAVIGATION";const h="IC-SIDE-NAVIGATION";const g=class{constructor(a){i(this,a);var t;this.ariaLabel=null;this.initialPosition=(t=this.position)!==null&&t!==void 0?t:"far";this.position="far";this.size="medium";this.theme="inherit";this.type="text";this.variant="neutral";this.visible=true;this.setBadgeColour=()=>{const i=this.customColor?s(this.customColor):null;if(i){const{r:a,g:t,b:c,a:s}=i;this.el.style.backgroundColor=`rgba(${a}, ${t}, ${c}, ${s})`;this.foregroundColour=e((a*299+t*587+c*114)/1e3)}};this.getLabel=()=>this.maxNumber&&Number(this.label)>this.maxNumber?`${this.maxNumber}+`:this.label;this.setAccessibleLabel=()=>{const i=this.el.parentElement;const a=this.isAccessibleLabelDefined()?this.accessibleLabel:this.label||"with badge being displayed";if(i){const{tagName:t}=i;if(t!=="IC-CARD"&&(t!=="IC-TAB"||t==="IC-TAB"&&this.parentAriaLabel)){const t=this.parentAriaLabel?`${this.parentAriaLabel} ,`:"";i.ariaLabel=this.visible?`${t} ${a}`:null}else{this.ariaLabel=`, ${a}`}}};this.setPositionInTopNavigation=()=>{this.position=this.isInMobileMode()||this.isInNavigationItem()?"inline":this.initialPosition};this.setPositionInSideNavigation=()=>{this.position="near"};this.isInTopNav=()=>{const i=this.el.parentElement;if(!i)return false;const a=i.parentElement;const t=a===null||a===void 0?void 0:a.parentElement;return(a===null||a===void 0?void 0:a.tagName)===n||(t===null||t===void 0?void 0:t.tagName)===n};this.isInSideNav=()=>{const i=this.el.parentElement;if(!i)return false;const a=i.parentElement;const t=a===null||a===void 0?void 0:a.parentElement;return(a===null||a===void 0?void 0:a.tagName)===h||(t===null||t===void 0?void 0:t.tagName)===h};this.isInMobileMode=()=>{const i=this.el.parentElement;if(!i)return false;const a=i.parentElement;const t=a===null||a===void 0?void 0:a.parentElement;return((a===null||a===void 0?void 0:a.tagName)===n||(a===null||a===void 0?void 0:a.tagName)===h)&&a.classList.contains("mobile-mode")||((t===null||t===void 0?void 0:t.tagName)===n||(t===null||t===void 0?void 0:t.tagName)===h)&&t.classList.contains("mobile-mode")};this.isInNavigationItem=()=>{const i=this.el.parentElement;if(!i)return false;return i.tagName==="IC-NAVIGATION-ITEM"};this.isAccessibleLabelDefined=()=>o(this.accessibleLabel)&&this.accessibleLabel!==null}accessibleLabelHandler(){this.setAccessibleLabel()}customColorHandler(){this.variant==="custom"&&this.setBadgeColour()}variantHandler(){if(this.variant==="custom"){this.setBadgeColour()}}visibleHandler(){this.setAccessibleLabel()}componentWillLoad(){var i;this.variant==="custom"&&this.setBadgeColour();const a=(i=this.el.parentElement)===null||i===void 0?void 0:i.ariaLabel;if(a)this.parentAriaLabel=a;this.setAccessibleLabel()}componentDidLoad(){this.type==="text"&&r([{prop:this.label,propName:"label"}],"Badge")}componentWillRender(){this.isInTopNav()&&this.setPositionInTopNavigation();this.isInSideNav()&&this.setPositionInSideNavigation()}navBarMenuOpenHandler(){this.isInTopNav()&&(this.position="inline")}navBarMenuCloseHandler(){this.isInTopNav()&&(this.position=this.initialPosition)}render(){const{ariaLabel:i,el:c,foregroundColour:s,getLabel:e,position:o,size:r,label:d,type:l,variant:n,visible:h,theme:g}=this;return a(t,{key:"80362128f0009037af8ecb10ddbe465ed847044b",class:{[`ic-badge-${o}`]:true,[`ic-badge-${r}`]:true,[`ic-badge-${n}`]:true,[`ic-badge-${l}`]:true,[`ic-badge-foreground-${s}`]:s!==null&&n==="custom",[`${h?"ic-badge-show":"ic-badge-hide"}`]:true,[`ic-theme-${g}`]:g!=="inherit"},id:c.id||null,"aria-label":i,role:"status"},l==="icon"&&a("slot",{key:"4df4a2ab27b18a2247bc047d940b16378451e8ae",name:"badge-icon"}),l==="text"&&d&&a("ic-typography",{key:"56b2205ae5e36f5af3e60f0b76866c696d06eb7a",variant:r==="small"?"badge-small":"badge"},e()),l==="dot"&&a("span",{key:"3a12c77ef89a454564358588908b31b69e04f500",class:"sr-only"},"badge"))}static get delegatesFocus(){return true}get el(){return c(this)}static get watchers(){return{accessibleLabel:["accessibleLabelHandler"],customColor:["customColorHandler"],variant:["variantHandler"],visible:["visibleHandler"]}}};g.style=l;export{g as ic_badge};
2
- //# sourceMappingURL=p-c3f5907e.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icBadgeCss","IcBadgeStyle0","TOP_NAVIGATION","SIDE_NAVIGATION","Badge","constructor","hostRef","this","ariaLabel","initialPosition","_a","position","size","theme","type","variant","visible","setBadgeColour","colorRGBA","customColor","convertToRGBA","r","g","b","a","el","style","backgroundColor","foregroundColour","getBrandForegroundAppearance","getLabel","maxNumber","Number","label","setAccessibleLabel","parentEl","parentElement","defaultAriaLabel","isAccessibleLabelDefined","accessibleLabel","tagName","parentAriaLabel","ariaLabelPrefix","setPositionInTopNavigation","isInMobileMode","isInNavigationItem","setPositionInSideNavigation","isInTopNav","grandparentEl","greatGrandparentEl","isInSideNav","classList","contains","isPropDefined","accessibleLabelHandler","customColorHandler","variantHandler","visibleHandler","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentWillRender","navBarMenuOpenHandler","navBarMenuCloseHandler","render","h","Host","key","class","id","role","name"],"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-ai) {\n background-color: var(--ic-badge-ai) !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 =\n this.isInMobileMode() || this.isInNavigationItem()\n ? \"inline\"\n : 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 isInNavigationItem = (): boolean => {\n const parentEl = this.el.parentElement;\n if (!parentEl) return false;\n return parentEl.tagName === \"IC-NAVIGATION-ITEM\";\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"],"mappings":"0IAAA,MAAMA,EAAa,ukIACnB,MAAAC,EAAeD,EC0Bf,MAAME,EAAiB,oBACvB,MAAMC,EAAkB,qB,MAYXC,EAAK,MAP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,KAAI,aACL/D,EACZgE,KAAK,UAEJ1D,IAAS,QAAUqD,EAAA,QAAAE,IAAA,2CAAMI,KAAK,eAC9B3D,IAAS,QAAUmB,GAClBkC,EAAA,iBAAAE,IAAA,2CAAetD,QAASH,IAAS,QAAU,cAAgB,SACxDkB,KAGJhB,IAAS,OAASqD,EAAA,QAAAE,IAAA,2CAAMC,MAAM,WAAS,S","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icAccordionCss","IcAccordionStyle0","accordionIds","EXPANDED_CONTENT_OPENED_CLASS","Accordion","constructor","hostRef","this","accordionId","CONTENT_VISIBILITY_PROPERTY","disabled","expanded","heading","message","size","theme","toggleExpanded","accordionClicked","emit","id","setAccordionAnimation","el","duration","property","delay","style","transitionDuration","transitionProperty","transitionDelay","setExpandedContentStyle","ev","expandedContent","propertyName","clientHeight","classList","add","height","hideExpandedContent","setProperty","animateExpandedContent","expandedContentEl","elementHeight","scrollHeight","addEventListener","e","remove","watchDisabledHandler","removeDisabledFalse","handleExpandedWatch","setFocus","_a","accordionBtnHeading","focus","componentWillLoad","disconnectedCallback","removeEventListener","componentDidLoad","render","h","Host","key","class","ref","tabindex","onClick","isSlotUsed","name","variant","innerHTML","chevronIcon","role"],"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"],"mappings":"uKAAA,MAAMA,EAAiB,6+IACvB,MAAAC,EAAeD,ECcf,IAAIE,EAAe,EACnB,MAAMC,EAAgC,0B,MAYzBC,EAAS,MALtB,WAAAC,CAAAC,G,6DAMUC,KAAAC,YAAc,gBAAgBN,MAG9BK,KAAAE,4BAA8B,mCAO9BF,KAAAG,SAAqB,MASJH,KAAAI,SAAqB,MAKtCJ,KAAAK,QAAmB,GAKnBL,KAAAM,QAAmB,GAKnBN,KAAAO,KAAiB,SAKjBP,KAAAQ,MAAsB,UAqDtBR,KAAAS,eAAiB,KACvBT,KAAKI,UAAYJ,KAAKI,SACtBJ,KAAKU,iBAAiBC,KAAK,CAAEC,GAAIZ,KAAKC,aAAc,EAI9CD,KAAAa,sBAAwB,CAC9BC,EACAC,EACAC,EACAC,KAEAH,EAAGI,MAAMC,mBAAqB,GAAGJ,MACjCD,EAAGI,MAAME,mBAAqBJ,EAC9BF,EAAGI,MAAMG,gBAAkBJ,CAAK,EAG1BjB,KAAAsB,wBAA0B,CAChCC,EACAC,KAEA,GAAID,EAAGE,eAAiB,UAAYD,EAAgBE,aAAe,EAAG,CACpEF,EAAgBG,UAAUC,IAAIhC,GAC9B4B,EAAgBN,MAAMW,OAAS,M,GAI3B7B,KAAA8B,oBAAsB,CAC5BP,EACAC,KAEA,GAAID,EAAGE,eAAiB,UAAYD,EAAgBE,eAAiB,EAAG,CACtEF,EAAgBN,MAAMa,YACpB/B,KAAKE,4BACL,S,GAKEF,KAAAgC,uBAAyB,KAC/B,GAAIhC,KAAKiC,kBAAmB,CAC1B,MAAMA,EAAoBjC,KAAKiC,kBAC/B,MAAMC,EAAgBD,EAAkBE,aACxC,GAAID,EAAgB,GAAKlC,KAAKI,SAAU,CACtC6B,EAA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ostMutationObserver","areaExpanded","isFocussed","monochrome","parentEl","parentIsAnchorTag","clickable","disabled","expandable","fullWidth","hreflang","message","theme","parentFocussed","parentBlurred","toggleExpanded","watchDisabledHandler","removeDisabledFalse","el","disconnectedCallback","removeEventListener","_a","disconnect","componentWillLoad","parentElement","tagName","classList","add","addEventListener","componentDidLoad","isSlotUsed","onComponentRequiredPropUndefined","prop","heading","propName","updateTheme","MutationObserver","mutationList","renderDynamicChildSlots","observe","childList","handleHostClick","event","stopImmediatePropagation","brandChangeHandler","ev","detail","mode","setFocus","shadowRoot","querySelector","focus","_b","foregroundColor","getBrandFromContext","IcBrandForegroundEnum","Default","Light","Dark","render","href","referrerpolicy","rel","subheading","target","Component","undefined","attrs","hrefLang","referrerPolicy","h","Host","key","class","Object","assign","card","fullwidth","focussed","tabindex","name","variant","id","label","silent","onClick","innerHTML","chevronIcon"],"sources":["src/components/ic-card-vertical/ic-card-vertical.css?tag=ic-card-vertical&encapsulation=shadow","src/components/ic-card-vertical/ic-card-vertical.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-card-text-primary) !important;\n}\n\na:visited {\n color: var(--ic-card-link-action-dark) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card {\n display: flex;\n flex-direction: column;\n border: var(--ic-space-1px) solid var(--ic-card-border-primary);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-card-text-primary);\n transition: var(--ic-easing-transition-fast);\n position: relative;\n width: inherit;\n min-width: fit-content;\n height: fit-content;\n min-height: 100%;\n\n ::slotted(svg) {\n fill: var(--ic-card-icon);\n }\n\n &.monochrome {\n border: var(--ic-border-width) solid var(--ic-card-border-monochrome);\n }\n\n &.fullwidth {\n width: 100%;\n }\n\n &.clickable {\n &:hover {\n background-color: var(--ic-card-background-hover);\n border: var(--ic-space-1px) solid var(--ic-card-hover-border-color);\n cursor: pointer;\n }\n\n &.focussed,\n &:focus {\n background-color: var(--ic-card-background-hover);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n border: var(--ic-space-1px) solid var(--ic-card-pressed-border-color);\n }\n\n &:active {\n background-color: var(--ic-card-background-pressed);\n box-shadow: var(--ic-border-focus);\n\n .card-title {\n text-decoration: none;\n }\n }\n\n .card-title {\n --ic-typography-color: var(--ic-card-clickable-text);\n\n color: var(--ic-card-clickable-text);\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n margin-bottom: var(--ic-space-xxs);\n }\n\n .interaction-button,\n .icon {\n margin-bottom: var(--ic-space-xxs);\n }\n }\n\n &.disabled {\n border: var(--ic-space-1px) dashed var(--ic-card-disabled-border-color);\n\n .card-message,\n .subheading,\n .card-title {\n --ic-typography-color: var(--ic-card-disabled-text);\n }\n\n .card-title {\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n text-decoration-color: var(--ic-card-disabled-text);\n color: var(--ic-card-disabled-text);\n }\n\n ::slotted(svg) {\n fill: var(--ic-card-icon-disabled);\n }\n }\n}\n\n.card-header {\n display: flex;\n align-items: center;\n}\n\n.icon {\n display: flex;\n align-items: center;\n padding-right: var(--ic-space-xs);\n}\n\n.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title {\n display: inline-block;\n border-bottom: 0.25rem solid !important;\n margin-bottom: 0 !important;\n text-decoration: none;\n}\n\n@supports (text-underline-offset: 25%) {\n .card.clickable:hover .card-title,\n .card.clickable:focus .card-title,\n .card.clickable.focussed .card-title {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0.25rem !important;\n }\n}\n\n.subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n.adornment {\n margin-top: var(--ic-space-xxs);\n}\n\n.card-message {\n margin-top: var(--ic-space-md);\n align-items: left;\n}\n\n.interaction-button {\n margin-left: auto;\n}\n\n.image-top {\n margin-bottom: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.image-mid {\n margin-top: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.interaction-area {\n display: flex;\n flex-grow: 1;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-md);\n align-items: flex-end;\n}\n\n.interaction-controls {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--ic-space-sm);\n}\n\n.toggle-button {\n width: 2.5rem;\n height: 2.5rem;\n padding: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n min-width: 0;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n\n &:hover {\n background-color: var(--ic-card-background-hover);\n }\n\n &:focus {\n box-shadow: var(--ic-border-focus);\n }\n\n &:active:not(:focus) {\n background-color: var(--ic-card-background-pressed);\n }\n\n svg {\n pointer-events: none;\n width: 100% !important;\n height: 100% !important;\n fill: currentcolor !important;\n }\n}\n\n#ic-tooltip-expand-button {\n margin-left: auto;\n position: relative;\n}\n\n.toggle-button-closed svg {\n transform: rotate(90deg);\n}\n\n.toggle-button-expanded svg {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n margin-top: var(--ic-space-md);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .card {\n ::slotted(svg) {\n fill: currentcolor;\n }\n\n &.disabled {\n border-color: GrayText !important;\n\n ::slotted(svg) {\n fill: GrayText !important;\n }\n\n .card-message,\n .subheading,\n .card-title {\n color: GrayText;\n\n --ic-typography-color: GrayText;\n }\n }\n }\n\n .toggle-button:focus,\n .toggle-button:hover {\n outline-color: Highlight;\n }\n}\n","import {\n Component,\n Element,\n Listen,\n Prop,\n State,\n h,\n Method,\n Host,\n Watch,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getBrandFromContext,\n removeDisabledFalse,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n} from \"../../utils/types\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot heading - Content will be placed at the top of the card to the right of the icon.\n * @slot message - Content will be placed in the main body of the card.\n * @slot subheading - Content will be placed below the card heading.\n * @slot adornment - Content will be placed below the card subheading.\n * @slot image-top - Content will be placed at the top of the card above all other content.\n * @slot image-mid - Content will be placed below the card heading section.\n * @slot icon - Content will be placed to the left of the card heading.\n * @slot interaction-button - Content will be placed in the top right corner of the heading section.\n * @slot interaction-controls - Content will be placed below the card message.\n * @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.\n * @slot badge - Badge component overlaying the top right of the card.\n */\n@Component({\n tag: \"ic-card-vertical\",\n styleUrl: \"ic-card-vertical.css\",\n shadow: true,\n})\nexport class CardVertical {\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcCardVerticalElement;\n\n @State() areaExpanded: boolean = false;\n @State() isFocussed: boolean = false;\n @State() monochrome: boolean = false;\n @State() parentEl: HTMLElement | null = null;\n @State() parentIsAnchorTag: boolean = false;\n\n /**\n * If `true`, the card will be a clickable variant, instead of static.\n */\n @Prop({ mutable: true }) clickable?: boolean = false;\n\n /**\n * If `true`, the card will be disabled if it is clickable.\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 card will have an expandable area and expansion toggle button.\n */\n @Prop() expandable?: boolean = false;\n\n /**\n * If `true`, the card will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The heading for the card. This is required, unless a slotted heading is used.\n */\n @Prop() heading?: string;\n\n /**\n * The URL that the clickable card link points to. If set, the clickable card will render as an \"a\" tag, otherwise it will render as a button.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n\n /**\n * The main body message of the card.\n */\n @Prop() message?: string = \"\";\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The subheading for the card.\n */\n @Prop() subheading?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * 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({ mutable: true }) theme?: IcThemeMode = \"inherit\";\n\n disconnectedCallback(): void {\n if (this.parentEl && this.parentIsAnchorTag) {\n this.parentEl.removeEventListener(\"focus\", this.parentFocussed);\n this.parentEl.removeEventListener(\"blur\", this.parentBlurred);\n }\n\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.parentEl = this.el.parentElement;\n\n if (this.parentEl?.tagName === \"A\") {\n this.clickable = true;\n this.parentIsAnchorTag = true;\n this.parentEl.classList.add(\"ic-card-wrapper-link\");\n this.parentEl.addEventListener(\"focus\", this.parentFocussed);\n this.parentEl.addEventListener(\"blur\", this.parentBlurred);\n }\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Card\"\n );\n this.updateTheme();\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(\n mutationList,\n [\n \"message\",\n \"adornment\",\n \"expanded-content\",\n \"image-top\",\n \"image-mid\",\n \"icon\",\n \"interaction-button\",\n \"badge\",\n \"interaction-controls\",\n ],\n this\n )\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler(ev: CustomEvent<IcBrand>): void {\n this.updateTheme(ev.detail.mode);\n }\n\n /**\n * Sets focus on the card.\n */\n @Method()\n async setFocus(): Promise<void> {\n const shadowRoot = this.el.shadowRoot;\n\n if (shadowRoot) {\n if (shadowRoot.querySelector(\"a\")) {\n shadowRoot.querySelector(\"a\")?.focus();\n } else if (shadowRoot.querySelector(\"button\")) {\n shadowRoot.querySelector(\"button\")?.focus();\n }\n }\n }\n\n private parentFocussed = (): void => {\n this.isFocussed = true;\n };\n\n private parentBlurred = (): void => {\n this.isFocussed = false;\n };\n\n private updateTheme(mode: IcBrandForeground | null = null): void {\n const foregroundColor = getBrandFromContext(this.el, mode);\n\n if (foregroundColor !== IcBrandForegroundEnum.Default) {\n this.monochrome = true;\n this.theme =\n foregroundColor === IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n }\n }\n\n private toggleExpanded = (): void => {\n this.areaExpanded = !this.areaExpanded;\n };\n\n render() {\n const {\n clickable,\n disabled,\n expandable,\n fullWidth,\n heading,\n isFocussed,\n message,\n monochrome,\n href,\n hreflang,\n parentIsAnchorTag,\n referrerpolicy,\n rel,\n subheading,\n target,\n theme,\n } = this;\n\n const Component =\n parentIsAnchorTag || !clickable\n ? \"div\"\n : href === undefined\n ? \"button\"\n : \"a\";\n\n const attrs = Component == \"a\" && {\n href: href,\n hrefLang: hreflang,\n referrerPolicy: referrerpolicy,\n rel: rel,\n target: target,\n };\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <Component\n class={{\n card: true,\n clickable: !!clickable && !disabled,\n disabled: !!disabled,\n fullwidth: !!fullWidth,\n focussed: isFocussed,\n monochrome: monochrome,\n }}\n tabindex={clickable && !parentIsAnchorTag ? 0 : undefined}\n aria-disabled={disabled ? \"true\" : null}\n disabled={disabled}\n {...attrs}\n >\n {isSlotUsed(this.el, \"image-top\") && (\n <div class=\"image-top\">\n <slot name=\"image-top\"></slot>\n </div>\n )}\n <div class=\"card-header\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <div class=\"card-title\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">\n <p>{heading}</p>\n </ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"interaction-button\") && (\n <div class=\"interaction-button\">\n <slot name=\"interaction-button\"></slot>\n </div>\n )}\n </div>\n {(subheading || isSlotUsed(this.el, \"subheading\")) && (\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">\n {subheading}\n </ic-typography>\n </slot>\n </div>\n )}\n {isSlotUsed(this.el, \"adornment\") && (\n <div class=\"adornment\">\n <slot name=\"adornment\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"image-mid\") && (\n <div class=\"image-mid\">\n <slot name=\"image-mid\"></slot>\n </div>\n )}\n {(message || isSlotUsed(this.el, \"message\")) && (\n <div class=\"card-message\">\n {message && (\n <ic-typography variant=\"body\">{message}</ic-typography>\n )}\n {isSlotUsed(this.el, \"message\") && <slot name=\"message\"></slot>}\n </div>\n )}\n {(isSlotUsed(this.el, \"interaction-controls\") || expandable) && (\n <div class=\"interaction-area\">\n <div class=\"interaction-controls\">\n <slot name=\"interaction-controls\"></slot>\n </div>\n {expandable && (\n <ic-tooltip\n id=\"ic-tooltip-expand-button\"\n label=\"Toggle expandable area\"\n silent\n >\n <button\n class={{\n \"toggle-button\": true,\n [`toggle-button-${\n this.areaExpanded ? \"expanded\" : \"closed\"\n }`]: true,\n }}\n aria-label=\"Toggle expandable area\"\n aria-expanded={`${this.areaExpanded}`}\n aria-controls={\n this.areaExpanded ? \"expanded-content-area\" : null\n }\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></button>\n </ic-tooltip>\n )}\n </div>\n )}\n {isSlotUsed(this.el, \"expanded-content\") && this.areaExpanded && (\n <div class=\"expanded-content\" id=\"expanded-content-area\">\n <slot name=\"expanded-content\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </Component>\n </Host>\n );\n }\n}\n"],"mappings":"4LAAA,MAAMA,EAAoB,qwZAC1B,MAAAC,EAAeD,E,MC2CFE,EAAY,MALzB,WAAAC,CAAAC,G,UAMUC,KAAAC,qBAAgD,KAI/CD,KAAAE,aAAwB,MACxBF,KAAAG,WAAsB,MACtBH,KAAAI,WAAsB,MACtBJ,KAAAK,SAA+B,KAC/BL,KAAAM,kBAA6B,MAKbN,KAAAO,UAAsB,MAKvCP,KAAAQ,SAAqB,MASrBR,KAAAS,WAAuB,MAKvBT,KAAAU,UAAsB,MAetBV,KAAAW,SAAoB,GAKpBX,KAAAY,QAAmB,GAyBFZ,KAAAa,MAAsB,UAkFvCb,KAAAc,eAAiB,KACvBd,KAAKG,WAAa,IAAI,EAGhBH,KAAAe,cAAgB,KACtBf,KAAKG,WAAa,KAAK,EAejBH,KAAAgB,eAAiB,KACvBhB,KAAKE,cAAgBF,KAAKE,YAAY,C,CAhKxC,oBAAAe,GACEC,EAAoBlB,KAAKQ,SAAUR,KAAKmB,G,CA0D1C,oBAAAC,G,MACE,GAAIpB,KAAKK,UAAYL,KAAKM,kBAAmB,CAC3CN,KAAKK,SAASgB,oBAAoB,QAASrB,KAAKc,gBAChDd,KAAKK,SAASgB,oBAAoB,OAAQrB,KAAKe,c,EAGjDO,EAAAtB,KAAKC,wBAAoB,MAAAqB,SAAA,SAAAA,EAAEC,Y,CAG7B,iBAAAC,G,MACExB,KAAKK,SAAWL,KAAKmB,GAAGM,cAExB,KAAIH,EAAAtB,KAAKK,YAAQ,MAAAiB,SAAA,SAAAA,EAAEI,WAAY,IAAK,CAClC1B,KAAKO,UAAY,KACjBP,KAAKM,kBAAoB,KACzBN,KAAKK,S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1 +0,0 @@
1
- {"version":3,"names":["icRadioOptionCss","IcRadioOptionStyle0","ADDITIONAL_FIELD","RadioOption","constructor","hostRef","this","defaultRadioValue","hasAdditionalField","skipFocus","additionalFieldDisplay","disabled","dynamicText","theme","selected","initiallySelected","handleClick","event","clickedAdditionalField","target","matches","radioElement","stopPropagation","_a","focus","value","_b","getAdditionalField","icCheck","emit","handleKeyDown","preventPropagationElements","document","activeElement","includes","nodeName","handleFormReset","watchDisabledHandler","removeDisabledFalse","el","watchSelectedHandler","icSelectedChange","handleCheck","ev","Array","from","querySelectorAll","disconnectedCallback","removeFormResetListener","componentWillLoad","isSlotUsed","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentWillRender","hasSlot","slotHasContent","componentDidRender","additionalField","setAttribute","removeAttribute","additionalFieldValueHandler","detail","stopImmediatePropagation","setFocus","setTabIndex","toString","querySelector","hiddenInput","render","form","groupLabel","label","name","id","isPropDefined","h","Host","key","onClick","onKeyDown","class","parentElement","tagName","className","tabindex","type","checked","ref","variant","htmlFor","hidden","role"],"sources":["src/components/ic-radio-option/ic-radio-option.css?tag=ic-radio-option&encapsulation=scoped","src/components/ic-radio-option/ic-radio-option.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n flex-direction: column;\n width: fit-content;\n}\n\n:host .additional-field-wrapper-static::slotted([slot=\"additional-field\"]) {\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-left: var(--ic-space-xl);\n}\n\n/* The label turns grey when disabled */\n:host(.ic-radio-option-disabled),\n:host(.ic-radio-option-disabled) .radio-label {\n --ic-typography-color: var(--ic-radio-button-text-option-disabled);\n}\n\n/* Focus states */\n:host .radio-option-container input:focus + span.checkmark,\n:host .radio-option-container:hover input:focus + span.checkmark,\n:host .radio-option-container:active input:focus + span.checkmark,\n:host(:focus) .radio-option-container input:checked + span.checkmark {\n box-shadow: var(--ic-border-focus);\n}\n\n/* The container */\n:host .radio-option-container {\n display: grid;\n grid-template-columns: min-content auto;\n position: relative;\n cursor: pointer;\n align-items: center;\n margin: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);\n}\n\n:host(.ic-radio-option-small) .radio-option-container {\n margin: 0 0 0 var(--ic-space-xxs);\n}\n\n:host .radio-option-container.disabled,\n:host .radio-option-container.disabled input:disabled {\n cursor: default;\n}\n\n/* Hide the browser's default radio button */\n:host .radio-option-container input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n display: inline-block;\n position: absolute;\n cursor: pointer;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n border-radius: 50%;\n border: none;\n}\n\n:host(.ic-radio-option-small) .radio-option-container input {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n/* Create a custom radio button */\n:host .checkmark {\n display: block;\n position: relative;\n top: 0;\n left: 0;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n background-color: var(--ic-radio-button-background-default);\n border: var(--ic-space-1px) solid var(--ic-radio-button-border-default);\n border-radius: 50%;\n transition: var(--ic-easing-transition-fast);\n box-sizing: border-box;\n}\n\n:host(.ic-radio-option-small) .checkmark {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n/* Show the indicator (dot/circle) when checked */\n:host .radio-option-container input:checked ~ .checkmark::after {\n display: inline-block;\n}\n\n/* On mouse-over, add a light blue background color */\n:host .radio-option-container:hover input ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-hover);\n border: var(--ic-border-width) solid var(--ic-radio-button-default-hover);\n}\n\n:host .radio-option-container:hover input:checked ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-hover);\n border: 0.125rem solid var(--ic-radio-button-default-hover);\n}\n\n:host\n .radio-option-container:hover:not(.disabled)\n input:checked\n ~ .checkmark::after {\n background-color: var(--ic-radio-button-default-hover);\n}\n\n/* When pressed, adds the active colours */\n:host .radio-option-container:active input ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-pressed);\n border: var(--ic-border-width) solid var(--ic-radio-button-default-pressed);\n}\n\n/* When pressed, adds the active colours */\n:host .radio-option-container:active input:checked ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-default-pressed);\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-pressed);\n}\n\n:host(.ic-radio-option-small)\n .radio-option-container\n input:checked\n ~ .checkmark {\n border-width: var(--ic-space-1px);\n}\n\n/* When pressed and selected, adds the active colours */\n:host .radio-option-container:active input:checked ~ .checkmark::after {\n background-color: var(--ic-radio-button-default-pressed);\n}\n\n/* When the radio button is checked */\n:host .radio-option-container input:checked ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-default-active);\n}\n\n/* When the radio button is checked and disabled */\n:host .radio-option-container input:checked:disabled ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-border-disabled);\n}\n\n/* When the radio button is disabled */\n:host .radio-option-container input:disabled ~ .checkmark {\n border: var(--ic-border-width) dashed var(--ic-radio-button-border-disabled);\n}\n\n/* When the radio button is disabled */\n:host .radio-option-container input:disabled ~ .checkmark::after {\n background: var(--ic-radio-button-disabled);\n}\n\n/* On mouse-over inactive */\n:host .radio-option-container:hover input:disabled ~ .checkmark {\n box-shadow: none;\n border: 0.125rem solid none;\n}\n\n:host .radio-option-container:active input:disabled ~ .checkmark::after {\n background-color: var(--ic-radio-button-disabled);\n}\n\n/* Style the indicator (dot/circle) */\n:host .radio-option-container .checkmark::after {\n content: \"\";\n position: absolute;\n display: none;\n top: calc(50% - var(--ic-space-xs));\n left: calc(50% - var(--ic-space-xs));\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n border-radius: 50%;\n background: var(--ic-radio-button-default-active);\n}\n\n:host(.ic-radio-option-small) .radio-option-container .checkmark::after {\n top: 50%;\n left: 50%;\n width: 0.625rem;\n height: 0.625rem;\n border-radius: 50%;\n background: var(--ic-radio-button-default-active);\n transform: translate(-50%, -50%);\n}\n\n:host .radio-label {\n margin-left: var(--ic-space-md);\n\n --ic-typography-color: var(--ic-radio-button-text-option);\n}\n\n:host(.ic-radio-option-small) .radio-label {\n margin-left: var(--ic-space-xs);\n}\n\n:host .additional-field-wrapper-static {\n margin-left: var(--ic-space-xs);\n}\n\n/* The line */\n:host .branch-corner {\n color: var(--ic-radio-button-required-bar);\n height: var(--ic-space-md);\n width: var(--ic-space-xl);\n border-radius: 0 0 0 0.188rem;\n border-bottom: 0.125rem solid var(--ic-radio-button-required-bar);\n border-left: 0.125rem solid var(--ic-radio-button-required-bar);\n margin-left: calc(-1 * var(--ic-space-1px));\n}\n\n/* The dynamic container */\n:host .dynamic-container {\n display: flex;\n position: relative;\n margin: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-md);\n gap: var(--ic-space-xs);\n}\n\n:host(.ic-radio-option-small) .dynamic-container {\n margin-left: 12px;\n}\n\n:host .dynamic-container.hidden {\n display: none;\n}\n\n:host .dynamic-text {\n color: var(--ic-radio-button-required-text);\n\n --ic-typography-color: var(--ic-radio-button-required-text);\n\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-bottom: var(--ic-space-xs);\n border-radius: 2%;\n}\n\n@media (max-width: 576px) {\n :host .additional-field-wrapper-dynamic::slotted(ic-text-field),\n :host .additional-field-wrapper-static::slotted(ic-text-field) {\n --input-width: 100%;\n }\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n\n :host .radio-option-container input:checked ~ .checkmark,\n :host .radio-option-container:active input:checked ~ .checkmark {\n border-color: Highlight;\n }\n\n :host .radio-option-container input:checked ~ .checkmark::after,\n :host .radio-option-container:active input:checked ~ .checkmark::after {\n background-color: Highlight;\n }\n\n :host .radio-option-container input:disabled ~ .checkmark,\n :host .radio-option-container input:checked:disabled ~ .checkmark {\n border-color: GrayText;\n }\n\n :host .radio-option-container input:disabled ~ .checkmark::after,\n :host .radio-option-container:active input:disabled ~ .checkmark::after {\n background-color: GrayText;\n }\n}\n\n/* Right to left */\n:host input[type=\"radio\"]:dir(rtl) {\n right: 0;\n}\n\n:host .radio-label:dir(rtl) {\n padding-right: var(--ic-space-sm);\n padding-left: 0;\n}\n\n:host .branch-corner:dir(rtl) {\n border-radius: 0 0 0.188rem;\n border-right: 0.125rem solid var(--ic-action-default);\n border-left: none;\n}\n\n:host .dynamic-container:dir(rtl) {\n margin: var(--ic-space-xxxs) var(--ic-space-sm) var(--ic-space-xxs) 0;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Listen,\n State,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcAdditionalFieldTypes,\n IcThemeMode,\n IcValueEventDetail,\n} from \"../../utils/types\";\nimport {\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n isPropDefined,\n isSlotUsed,\n slotHasContent,\n} from \"../../utils/helpers\";\n\nconst ADDITIONAL_FIELD = \"additional-field\";\n\n/**\n * @slot additional-field - Content to displayed alongside a radio option.\n */\n@Component({\n tag: \"ic-radio-option\",\n scoped: true,\n styleUrl: \"ic-radio-option.css\",\n})\nexport class RadioOption {\n private defaultRadioValue: string = \"\";\n private hasAdditionalField: boolean = false;\n private radioElement?: HTMLInputElement;\n private skipFocus = false;\n\n @Element() el: HTMLIcRadioOptionElement;\n\n /**\n * The style of additionalField that will be displayed if used.\n */\n @Prop({ reflect: true }) additionalFieldDisplay?: IcAdditionalFieldTypes =\n \"static\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The text to be displayed when dynamic.\n */\n @Prop() dynamicText?: string = \"This selection requires additional answers\";\n\n /**\n * The <form> element to associate the radio with.\n */\n @Prop() form?: string;\n\n /**\n * The group label for the radio option.\n */\n @Prop() groupLabel?: string;\n\n /**\n * The label for the radio option.\n */\n @Prop() label?: string;\n\n /**\n * The name for the radio option.\n */\n @Prop() name?: 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 value for the radio option.\n */\n @Prop({ mutable: true }) value!: string;\n\n /**\n * If `true`, the radio option will be displayed in a selected state.\n */\n @Prop({ reflect: true, mutable: true }) selected?: boolean = false;\n @State() initiallySelected = this.selected;\n\n @Watch(\"selected\")\n watchSelectedHandler(): void {\n this.icSelectedChange.emit();\n }\n\n /**\n * Emitted when the radio option is selected.\n */\n @Event() icCheck: EventEmitter<IcValueEventDetail>;\n @Listen(\"icCheck\")\n handleCheck(ev: CustomEvent<IcValueEventDetail>): void {\n if (\n this.additionalFieldDisplay === \"static\" &&\n Array.from(this.el.querySelectorAll(\"ic-radio-option\")).includes(\n ev.target as HTMLIcRadioOptionElement\n )\n )\n this.icCheck.emit({ value: this.value });\n }\n\n /**\n * Emitted when the radio option is selected or deselected.\n */\n @Event() icSelectedChange: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n if (isSlotUsed(this.el, ADDITIONAL_FIELD)) {\n this.hasAdditionalField = true;\n this.getAdditionalField();\n }\n\n this.defaultRadioValue = this.value;\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.value, propName: \"value\" }],\n \"Radio Option\"\n );\n }\n\n componentWillRender(): void {\n const hasSlot = slotHasContent(this.el, ADDITIONAL_FIELD);\n if (hasSlot && !this.hasAdditionalField) {\n this.hasAdditionalField = true;\n this.getAdditionalField();\n } else if (!hasSlot && this.hasAdditionalField) {\n this.hasAdditionalField = false;\n }\n }\n\n componentDidRender(): void {\n if (this.additionalFieldDisplay === \"static\") {\n const additionalField = this.getAdditionalField();\n if (!this.selected || this.disabled) {\n additionalField?.setAttribute(\"disabled\", \"\");\n } else {\n additionalField?.removeAttribute(\"disabled\");\n }\n }\n }\n\n @Listen(\"icChange\")\n additionalFieldValueHandler(event: CustomEvent<{ value: string }>): void {\n if (this.selected) {\n this.value = event.detail.value || this.defaultRadioValue;\n this.icCheck.emit({\n value: this.value,\n });\n }\n\n event.stopImmediatePropagation();\n }\n\n /**\n * Sets focus on the radio option.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.radioElement?.focus();\n }\n\n /**\n * @internal Sets the tabIndex of the radio option.\n */\n @Method()\n async setTabIndex(value: number): Promise<void> {\n this.radioElement?.setAttribute(\"tabIndex\", value.toString());\n }\n\n private getAdditionalField(): HTMLIcTextFieldElement {\n const additionalField = this.el.querySelector(\n 'ic-text-field[slot=\"additional-field\"]'\n ) as HTMLIcTextFieldElement;\n if (additionalField) additionalField.hiddenInput = false;\n return additionalField;\n }\n\n private handleClick = (event: MouseEvent) => {\n const clickedAdditionalField = (event.target as Element).matches(\n \".dynamic-container:not(ic-radio-option, .checkmark), .dynamic-container *:not(ic-radio-option, .checkmark)\"\n );\n\n if (\n !this.disabled &&\n (!clickedAdditionalField || event.target === this.radioElement)\n ) {\n event.stopPropagation();\n if (this.skipFocus === false) {\n this.radioElement?.focus();\n }\n this.skipFocus = false;\n\n if (this.hasAdditionalField) {\n this.value = this.getAdditionalField()?.value || this.defaultRadioValue;\n }\n\n this.icCheck.emit({\n value: this.value,\n });\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const preventPropagationElements = [\"IC-DATE-INPUT\", \"IC-DATE-PICKER\"];\n\n if (\n this.getAdditionalField() == document.activeElement &&\n preventPropagationElements.includes(this.getAdditionalField().nodeName)\n ) {\n event.stopPropagation();\n }\n };\n\n private handleFormReset = (): void => {\n this.skipFocus = true;\n this.selected = this.initiallySelected;\n };\n\n render() {\n const {\n additionalFieldDisplay,\n disabled,\n dynamicText,\n form,\n groupLabel,\n handleClick,\n handleKeyDown,\n hasAdditionalField,\n label,\n name,\n selected,\n value,\n theme,\n } = this;\n\n const id = `ic-radio-option-${isPropDefined(label) || value}-${groupLabel}`;\n\n return (\n <Host\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n class={{\n [\"ic-radio-option-disabled\"]: !!disabled,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-radio-option-small\"]:\n this.el.parentElement?.tagName === \"IC-RADIO-GROUP\" &&\n this.el.parentElement?.className.includes(\"ic-radio-group-small\"),\n }}\n >\n <div class={{ \"radio-option-container\": true, disabled: !!disabled }}>\n <div>\n <input\n tabindex={selected ? \"0\" : \"-1\"}\n type=\"radio\"\n name={name}\n id={id}\n value={value}\n disabled={disabled}\n checked={selected}\n ref={(el) => (this.radioElement = el)}\n form={form}\n ></input>\n <span class=\"checkmark\"></span>\n </div>\n <ic-typography class=\"radio-label\" variant=\"body\">\n <label htmlFor={id}>{label}</label>\n </ic-typography>\n </div>\n {hasAdditionalField && (\n <div\n class={{\n \"dynamic-container\": true,\n hidden: additionalFieldDisplay === \"dynamic\" && !selected,\n }}\n >\n {additionalFieldDisplay === \"dynamic\" && (\n <div class=\"branch-corner\"></div>\n )}\n <div>\n {additionalFieldDisplay === \"dynamic\" && (\n <ic-typography variant=\"caption\" role=\"alert\">\n <p class=\"dynamic-text\">{dynamicText}</p>\n </ic-typography>\n )}\n <div\n class={{\n [`additional-field-wrapper-${additionalFieldDisplay}`]: true,\n }}\n >\n <slot name={ADDITIONAL_FIELD}></slot>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"iKAAA,MAAMA,EAAmB,03bACzB,MAAAC,EAAeD,EC2Bf,MAAME,EAAmB,mB,MAUZC,EAAW,MALxB,WAAAC,CAAAC,G,8FAMUC,KAAAC,kBAA4B,GAC5BD,KAAAE,mBAA8B,MAE9BF,KAAAG,UAAY,MAOKH,KAAAI,uBACvB,SAKMJ,KAAAK,SAAqB,MASrBL,KAAAM,YAAuB,6CAyBvBN,KAAAO,MAAsB,UAUUP,KAAAQ,SA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O,CACL,CAAC,4BAA4BzE,KAA2B,OAG1DoE,EAAA,QAAAE,IAAA,2CAAML,KAAMzE,O","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icNavigationItemCss","IcNavigationItemStyle0","NavigationItem","constructor","hostRef","this","isInitialRender","hostMutationObserver","ANIMATION_DURATION","parseInt","getCssProperty","ARIA_LABEL_STRING","isInSideNav","deviceSize","DEVICE_SIZES","XL","focusStyle","getBrandForegroundAppearance","inTopNavSideMenu","isSideNavMobile","isTopNavChild","sideNavExpanded","ariaLabel","collapsedIconLabel","displayNavigationTooltip","download","expandable","href","selected","theme","displayDefaultNavigationItem","label","hreflang","target","rel","referrerpolicy","variant","ChevronIconComponent","h","class","svg","innerHTML","chevronIcon","slottedBadgeEl","el","querySelector","BadgeComponent","name","IconComponent","referrerPolicy","ref","itemEl","part","OpenInNew","tabindex","topNavResizedHandler","detail","size","_a","parentEl","customMobileBreakpoint","L","sideNavExpandHandler","sideNavMobile","sideNavToggleTooltip","handleBlur","relatedTarget","tagName","childBlur","emit","handleClick","navItemClicked","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","attribute","getAttribute","forceUpdate","generateTooltipLabel","navigationSlot","textContent","children","renderNavigationItemContent","showTooltip","tooltip","shadowRoot","collapsedClass","timer","displayTooltip","setTimeout","classList","add","clearTimeout","remove","navigationTypeChangeHandler","navigationType","disconnectedCallback","removeEventListener","_b","_c","disconnect","componentWillLoad","navType","parent","getNavItemParentDetails","getCurrentDeviceSize","contains","addEventListener","_d","_e","parentElement","_f","trim","hasAttribute","componentDidLoad","MutationObserver","observe","attributes","componentDidUpdate","brandChangeHandler","mode","setFocus","focus","render","isTopNavChildDesktop","Host","key","onBlur","onClick","role","placement"],"sources":["src/components/ic-navigation-item/ic-navigation-item.css?tag=ic-navigation-item&encapsulation=shadow","src/components/ic-navigation-item/ic-navigation-item.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-navigation-item: z-index of navigation item\n */\n\n:host {\n display: block;\n\n --navigation-link-colour: var(--ic-brand-text-color);\n}\n\n:host(:focus-within) {\n z-index: var(--ic-z-index-navigation-item);\n}\n\n/* chevron */\nsvg {\n width: var(--ic-space-xl);\n fill: var(--ic-brand-text-color);\n}\n\n.svg {\n margin-left: auto;\n}\n\n.chevron-container svg,\n.chevron-container .svg {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chevron-container {\n flex-grow: 1;\n}\n\n:host(.expandable.navigation-item) .link,\n:host(.expandable.navigation-item) ::slotted(a) {\n padding-right: 0;\n}\n\n:host(.navigation-item) .link,\n:host(.navigation-item) ::slotted(a) {\n height: calc(100% - var(--ic-space-xxs));\n width: fit-content;\n color: var(--navigation-link-colour);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 var(--ic-space-md) var(--ic-space-xxs);\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n white-space: nowrap;\n\n --ic-typography-color: var(--navigation-link-colour);\n}\n\n:host(.navigation-item) ::slotted(a) {\n height: 100%;\n font: var(--ic-font-label) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt025) !important;\n padding: 0 var(--ic-space-md) !important;\n}\n\n:host(.navigation-item-selected) .link::after,\n:host(.navigation-item-selected) ::slotted(a.active)::after,\n:host(.navigation-item-top-nav) ::slotted(a.active)::after {\n content: \"\";\n height: 0.25rem;\n width: 100%;\n position: absolute;\n bottom: 0;\n background-color: var(--ic-top-navigation-theme);\n}\n\n:host(.navigation-item-selected.navigation-item-page-header)\n ::slotted(a.active)::after,\n:host(.navigation-item-selected.navigation-item-page-header) .link::after,\n:host(.navigation-item.navigation-item-page-header) ::slotted(a.active)::after,\n:host(.navigation-item-top-nav-child) ::slotted(a.active)::after {\n content: none;\n}\n\n:host(.navigation-item-side-menu-selected) .link,\n:host(.navigation-item-side-menu) ::slotted(a.active),\n:host(.navigation-item-top-nav-child) ::slotted(a.active) {\n box-shadow: none;\n}\n\n:host(.navigation-item) .link:hover:not(:focus) {\n background-color: var(--ic-brand-hover);\n cursor: pointer;\n}\n\n:host(.navigation-item:not(.navigation-item-page-header, .navigation-item-side-menu, .navigation-item-top-nav-child))\n ::slotted(a:hover:not(:focus)),\n:host(.navigation-item-side-nav.navigation-item) .link:hover:not(:focus) {\n background-color: var(--ic-brand-hover) !important;\n}\n\n:host(.navigation-item:not(.navigation-item-top-nav-child, .navigation-item-side-menu, .navigation-item-top-nav-child-selected\n .navigation-item-side-menu-selected))\n .focus-indicator:focus-within {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.navigation-item) .link:focus,\n:host(.navigation-item) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n outline-offset: calc(-1 * (var(--ic-space-xxxs) + var(--ic-space-1px) / 2));\n}\n\n:host(.navigation-item-selected) .link:focus,\n:host(.navigation-item) ::slotted(a.active:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n outline-offset: calc(-1 * (var(--ic-space-xxxs) + var(--ic-space-1px) / 2));\n}\n\n:host(.navigation-item) .link:active:not(:focus),\n:host(.navigation-item) ::slotted(a:active:not(:focus)) {\n background-color: var(--ic-brand-active);\n}\n\n:host(.navigation-item-side-menu) .link,\n:host(.navigation-item-side-menu) ::slotted(a) {\n min-height: 2.5rem;\n height: auto;\n width: 100%;\n box-sizing: border-box;\n color: var(--ic-top-navigation-nav-item);\n\n --ic-typography-color: var(--ic-top-navigation-nav-item);\n\n display: flex;\n align-items: center;\n justify-content: flex-start;\n text-decoration: none;\n text-wrap: wrap;\n white-space: normal;\n transition: box-shadow var(--ic-transition-duration-fast),\n border-radius var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(svg),\n:host(.navigation-item-side-menu) ::slotted(svg),\n:host(.navigation-item-page-header) ::slotted(svg) {\n fill: var(--ic-color-text-primary);\n}\n\n:host(.navigation-item-side-menu) ::slotted(a) {\n font: var(--ic-font-body) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt005) !important;\n transition: box-shadow var(--ic-easing-transition-fast),\n background-color var(--ic-easing-transition-fast);\n}\n\n:host(.navigation-item-side-menu) .link:hover:not(:focus) {\n background-color: var(--ic-top-navigation-nav-item-hover);\n}\n\n:host(.navigation-item-side-menu) ::slotted(a:hover:not(:focus)) {\n background-color: var(--ic-top-navigation-nav-item-hover) !important;\n}\n\n:host(.navigation-item-side-menu) .focus-indicator:focus-within {\n box-shadow: none;\n}\n\n:host(.navigation-item-side-menu) .link:focus,\n:host(.navigation-item-side-menu) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-inset) !important;\n width: auto;\n border-radius: var(--ic-border-radius-inset) !important;\n}\n\n:host(.navigation-item-side-menu-selected) .link,\n:host(.navigation-item-side-menu-selected) ::slotted(a) {\n transition: box-shadow var(--ic-easing-transition-slow),\n background-color var(--ic-easing-transition-slow);\n}\n\n:host(.navigation-item-side-menu-selected) .link:focus,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus),\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus) {\n margin-left: var(--ic-space-xs) !important;\n padding-left: var(--ic-space-xs) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link,\n:host(.navigation-item-top-nav-child) ::slotted(a) {\n height: 2.5rem;\n width: calc(100% - var(--ic-space-xl));\n min-width: 9.063rem;\n color: var(--ic-top-navigation-nav-item);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding: 0 var(--ic-space-md) !important;\n text-decoration: none;\n position: relative;\n transition: box-shadow var(--ic-transition-duration-fast),\n border-radius var(--ic-transition-duration-slow);\n\n --ic-typography-color: var(--ic-color-text-primary);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a) {\n font: var(--ic-font-body) !important;\n letter-spacing: var(--ic-font-letter-spacing-0pt005) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link:hover:not(:focus),\n:host(.navigation-item-top-nav-child) ::slotted(a:hover:not(:focus)) {\n background-color: var(--ic-top-navigation-nav-item-hover) !important;\n}\n\n:host(.navigation-item-top-nav-child) .link:focus,\n:host(.navigation-item-top-nav-child) ::slotted(a:focus) {\n z-index: 1;\n outline: var(--ic-hc-focus-outline);\n border-radius: var(--ic-border-radius-inset);\n box-shadow: var(--ic-border-focus-inset);\n transition: border-radius 0s, box-shadow var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n}\n\n:host(.navigation-item-side-menu) .link:active:not(:focus) {\n background-color: var(--ic-top-navigation-nav-item-pressed);\n}\n\n:host(.navigation-item-top-nav-child) .link:active:not(:focus),\n:host(.navigation-item-top-nav-child) ::slotted(a:active:not(:focus)) {\n outline: var(--ic-hc-focus-outline);\n background-color: var(--ic-top-navigation-nav-item-pressed);\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a:active:not(:focus)),\n:host(.navigation-item-side-menu) ::slotted(a:active:not(:focus)) {\n background-color: var(--ic-top-navigation-nav-item-pressed) !important;\n}\n\n:host(.navigation-item-side-menu-selected) *,\n:host(.navigation-item-top-nav-child-selected) *,\n:host(.navigation-item-side-menu) ::slotted(a.active),\n:host(.navigation-item-top-nav-child) ::slotted(a.active) {\n font-weight: 700 !important;\n}\n\n:host(.navigation-item-top-nav-child) ::slotted(a.active)::before,\n:host(.navigation-item-top-nav-child-selected) .link::before,\n:host(.navigation-item-side-menu-selected) .link::before,\n:host(.navigation-item-side-menu) ::slotted(a.active)::before,\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before {\n content: \"\";\n position: absolute;\n left: 0;\n width: var(--ic-space-xs);\n height: inherit;\n min-height: 2.5rem;\n background-color: var(--ic-top-navigation-nav-item-banner);\n transition: left 0s;\n}\n\n:host(.navigation-item-side-menu-selected) .link::before,\n:host(.navigation-item-side-menu-selected) .link:focus::before {\n margin-top: var(--ic-space-xxs);\n}\n\n:host(.navigation-item-top-nav-child-selected) .link:focus {\n margin-left: var(--ic-space-xs);\n margin-right: calc(-1 * var(--ic-space-xs));\n padding-left: var(--ic-space-xs) !important;\n}\n\n:host(.navigation-item-top-nav-child-selected) .link:focus::before {\n left: calc(-1 * var(--ic-space-xs));\n z-index: 1;\n}\n\n:host(.navigation-item-side-menu-selected) .link::before,\n:host(.navigation-item-side-menu) ::slotted(a.active)::before,\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before {\n z-index: 1;\n}\n\n:host(.navigation-item-side-menu-selected) .link:focus::before,\n:host(.navigation-item-side-menu) ::slotted(a.active:focus)::before,\n:host(.navigation-item-top-nav-child) ::slotted(a.active:focus)::before {\n left: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.navigation-item-side-menu-selected) .link::after {\n display: none;\n}\n\n:host(.navigation-item-side-nav-collapsed) .link {\n height: 100%;\n}\n\n:host(.navigation-item-side-nav-collapsed) ::slotted(svg),\n:host(.navigation-item-side-nav-collapsed-with-label) ::slotted(svg) {\n margin: auto;\n pointer-events: none;\n}\n\n:host(.navigation-item-side-nav-collapsed) .icon,\n:host(.navigation-item-side-nav-collapsed-with-label) .icon,\n:host(.navigation-item-side-nav-collapsed-with-label) ic-typography {\n align-items: center;\n padding: 0;\n margin: auto 0;\n width: fit-content;\n pointer-events: none;\n}\n\n:host(.navigation-item-side-nav-collapsed-with-label) ic-typography {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n text-align: center;\n}\n\n:host(.navigation-item-side-nav-collapsed-with-label) .link,\n:host(.navigation-item-side-nav-collapsed-with-label) ::slotted(a) {\n display: flex;\n flex-direction: column;\n height: fit-content;\n padding: var(--ic-space-xs) !important;\n gap: var(--ic-space-xxs);\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link,\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n height: auto !important;\n gap: 0;\n width: auto;\n padding: var(--ic-space-xs) !important;\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n display: block;\n text-align: center;\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link\n ic-typography {\n opacity: 1;\n min-width: min-content;\n}\n\n:host(.navigation-item-side-nav-collapsed) svg,\n:host(.navigation-item-side-nav-collapsed-with-label) svg {\n display: none;\n}\n\n::slotted(svg) {\n fill: var(--ic-brand-text-color);\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n}\n\n.icon {\n height: 1.5rem;\n width: var(--ic-space-xxl);\n margin-left: calc(-1 * var(--ic-space-md));\n flex: 0 1 0%;\n position: relative;\n}\n\n.icon > ::slotted(*) {\n margin-left: var(--ic-space-md) !important;\n margin-right: var(--ic-space-xs);\n}\n\n.inline-badge {\n margin-left: var(--ic-space-xs);\n}\n\n.badge {\n margin-left: 0;\n}\n\n:host(.navigation-item-side-nav-collapsed) .icon > ::slotted(*) {\n margin: auto !important;\n}\n\n:host(.navigation-item-side-nav) .icon > ::slotted(*) {\n margin-right: 0;\n}\n\n:host(.navigation-item-side-nav) .link,\n:host(.navigation-item-side-nav) ::slotted(a) {\n height: var(--navigation-item-height, 4rem);\n min-height: var(--navigation-item-min-height);\n width: var(--navigation-item-width, auto);\n justify-content: var(--navigation-item-justify-content);\n display: flex;\n gap: var(--ic-space-xs);\n box-sizing: border-box;\n color: var(--navigation-item-child-color) !important;\n text-decoration: none !important;\n white-space: nowrap;\n padding: 0 var(--ic-space-md);\n text-wrap: wrap;\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) ::slotted(a) {\n height: var(--navigation-item-child-height);\n width: var(--navigation-group-width);\n color: var(--navigation-item-child-color) !important;\n display: flex;\n gap: 0.625rem;\n box-sizing: border-box;\n min-width: 0;\n transition: box-shadow var(--ic-easing-transition-fast);\n text-decoration: none !important;\n white-space: nowrap;\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link:focus,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-dark);\n}\n\n:host(.navigation-item-side-nav.navigation-item-side-menu) .link:active {\n background-color: var(--navigation-item-child-active);\n}\n\n:host(.navigation-item-side-nav.navigation-item-top-nav-child) .link:active,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n ::slotted(a:active) {\n background-color: var(--navigation-item-child-active);\n}\n\n:host(.navigation-item-side-nav) a.link ic-typography,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n a.link\n ic-typography,\n:host(.navigation-item-side-nav) div.link ic-typography,\n:host(.navigation-item-side-nav.navigation-item-top-nav-child)\n div.link\n ic-typography,\n.navigation-item-side-nav-slotted-text {\n opacity: var(--navigation-item-label-opacity);\n transition: opacity var(--ic-easing-transition-slow);\n white-space: wrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link,\n:host(.navigation-item-side-nav.navigation-item) ::slotted(a.active) {\n box-shadow: inset 0.313rem 0 0 var(--ic-brand-text-color);\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link::before,\n:host(.navigation-item-side-nav) ::slotted(a.active)::before {\n content: \"\";\n display: block;\n position: absolute;\n inset: 0 0 0 0.313rem;\n border-radius: 0.688rem !important;\n transition: var(--ic-easing-transition-slow);\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link:focus::before,\n:host(.navigation-item-side-nav) ::slotted(a.active:focus)::before {\n box-shadow: var(--ic-border-focus-inset);\n}\n\n:host(:not(.navigation-item-side-nav-collapsed).navigation-item-side-nav.navigation-item-side-nav-collapsed-with-label)\n .link {\n opacity: var(--navigation-item-label-opacity);\n height: auto;\n}\n\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n .link,\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n min-width: var(--navigation-group-item-min-width);\n padding: var(--ic-space-xs) !important;\n height: auto;\n gap: 0;\n}\n\n:host(.navigation-item-top-nav-child.navigation-item-side-nav-collapsed-with-label)\n ::slotted(a) {\n display: block;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link::after,\n:host(.navigation-item-side-nav) ::slotted(a.active)::after {\n display: none;\n}\n\n:host(.navigation-item-side-nav.navigation-item) .link:focus,\n:host(.navigation-item-side-nav.navigation-item) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n background-color: transparent;\n}\n\n:host(.navigation-item-side-nav.navigation-item-selected) .link:focus,\n:host(.navigation-item-side-nav) ::slotted(a.active:focus) {\n margin: 0 auto;\n box-shadow: inset 0.313rem 0 0 var(--ic-brand-text-color);\n border-radius: 0;\n}\n\n:host(.navigation-item-page-header).link,\n:host(.navigation-item-page-header) a,\n:host(.navigation-item-page-header) ::slotted(a) {\n height: 2.5rem !important;\n color: var(--ic-color-text-primary) !important;\n transition: all var(--ic-easing-transition-fast) !important;\n box-shadow: rgba(23 89 188 / 0%) !important;\n}\n\n:host(.navigation-item-page-header.navigation-item-selected) .link::after,\n:host(.navigation-item-page-header) ::slotted(a.active)::after {\n content: \" \" !important;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: var(--ic-space-xxs);\n background-color: var(--ic-action-default) !important;\n}\n\n:host(.navigation-item-page-header) .link:hover,\n:host(.navigation-item-page-header) ::slotted(.link:hover),\n:host(.navigation-item-page-header) ::slotted(a:hover),\n:host(.navigation-item-page-header) .link:hover:not(:focus) {\n background-color: var(--ic-action-default-bg-hover) !important;\n cursor: pointer;\n}\n\n:host(.navigation-item-page-header) .link:focus,\n:host(.navigation-item-page-header) ::slotted(a:focus) {\n box-shadow: var(--ic-border-focus);\n}\n\n:host(.navigation-item-page-header) .link:active,\n:host(.navigation-item-page-header) ::slotted(a:active) {\n background-color: var(--ic-action-default-bg-pressed) !important;\n}\n\n:host(.navigation-item-page-header.navigation-item-selected) .link:focus::after,\n:host(.navigation-item-page-header) ::slotted(a.active:focus)::after {\n border-bottom-left-radius: var(--ic-border-radius);\n border-bottom-right-radius: var(--ic-border-radius);\n}\n\n:host(.navigation-item-page-header.navigation-item-selected.with-transition)\n .link,\n:host(.navigation-item-page-header.navigation-item-selected.with-transition)\n ::slotted(a.active) {\n transition: all var(--ic-easing-transition-fast),\n border-color var(--ic-transition-duration-fast);\n}\n\n:host(.navigation-item-page-header) ::slotted(a.active)::before,\n:host(.navigation-item-page-header) ::slotted(a.active:focus)::before,\n:host(.navigation-item-page-header.navigation-item-selected)\n .link:focus::before {\n display: none;\n}\n\n.open-in-new-icon {\n flex: 1;\n}\n\n.open-in-new-icon svg {\n margin-top: var(--ic-space-xxs);\n padding-left: var(--ic-space-xs);\n}\n\n:host(.navigation-item-side-nav) .open-in-new-icon {\n margin-left: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.navigation-item-top-nav) .open-in-new-icon svg,\n:host(.navigation-item-page-header) .open-in-new-icon svg,\n:host(.navigation-item-side-nav) .open-in-new-icon svg {\n height: 0.875rem;\n width: 0.875rem;\n}\n\n:host(.navigation-item-side-menu) .open-in-new-icon svg,\n:host(.navigation-item-top-nav-child) .open-in-new-icon svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n:host(.navigation-item-page-header) .open-in-new-icon svg,\n:host(.navigation-item-top-nav-child) .open-in-new-icon svg,\n:host(.navigation-item-side-menu) .open-in-new-icon svg {\n fill: var(--ic-color-text-primary);\n}\n\n@media (forced-colors: active) {\n .open-in-new-icon svg {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n Listen,\n Method,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n DEVICE_SIZES,\n getCssProperty,\n getCurrentDeviceSize,\n getBrandForegroundAppearance,\n getNavItemParentDetails,\n} from \"../../utils/helpers\";\nimport {\n IcNavType,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundNoDefault,\n IcThemeMode,\n} from \"../../utils/types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\nimport OpenInNew from \"../../assets/OpenInNew.svg\";\nimport { IcExpandedDetail } from \"../ic-side-navigation/ic-side-navigation.types\";\n\n/**\n * @part link - The `<a>` within ic-navigation-item\n * @slot badge - Badge component overlaying the top right of the icon.\n * @slot icon - Content will be displayed to the left of the label for expanded navigation items, and in replacement of the label for collapsed navigation items.\n */\n\n@Component({\n tag: \"ic-navigation-item\",\n styleUrl: \"ic-navigation-item.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class NavigationItem {\n private navigationSlot: HTMLElement | null;\n private isInitialRender = true;\n private itemEl?: HTMLElement;\n private hostMutationObserver: MutationObserver | null = null;\n private ANIMATION_DURATION =\n parseInt(getCssProperty(\"--ic-transition-duration-slow\")) || 0;\n private ARIA_LABEL_STRING = \"aria-label\";\n private isInSideNav = false;\n\n @Element() el: HTMLIcNavigationItemElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() focusStyle: IcBrandForegroundNoDefault | IcBrandForeground =\n getBrandForegroundAppearance();\n @State() inTopNavSideMenu = false;\n @State() isSideNavMobile = false;\n @State() isTopNavChild = false;\n\n @State() navigationType: IcNavType | \"\";\n @Watch(\"navigationType\")\n navigationTypeChangeHandler(): void {\n this.isInSideNav = this.navigationType === \"side\";\n }\n\n @State() parentEl: HTMLElement | null;\n @State() sideNavExpanded = false;\n @State() ariaLabel = \"\";\n\n /**\n * @internal If `true`, the icon and label will be displayed when side navigation is collapsed.\n */\n @Prop() collapsedIconLabel = false;\n\n /**\n * @internal If `true`, the navigation item will be displayed within a tooltip.\n */\n @Prop() displayNavigationTooltip = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download: string | boolean = false;\n\n /**\n * @internal If `true`, the navigation item will be expandable.\n */\n @Prop() expandable = false;\n\n /**\n * The destination of the navigation item.\n */\n @Prop() href = \"\";\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * The label of the navigation item.\n */\n @Prop() label?: string;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * If `true`, the navigation item will be set in a selected state.\n */\n @Prop() selected = false;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * 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 item loses focus.\n */\n @Event() childBlur: EventEmitter<void>;\n\n /**\n * @internal - Emitted when navigation item clicked.\n */\n @Event() navItemClicked: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.isInSideNav) {\n this.parentEl?.removeEventListener(\n \"icSideNavExpanded\",\n this.sideNavExpandHandler as EventListener\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl?.removeEventListener(\n \"icTopNavResized\",\n this.topNavResizedHandler as EventListener\n );\n }\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n const { navType, parent } = getNavItemParentDetails(this.el);\n this.navigationType = navType;\n this.isInSideNav = this.navigationType === \"side\";\n this.parentEl = parent;\n this.deviceSize = getCurrentDeviceSize();\n\n this.sideNavExpanded =\n this.parentEl?.classList.contains(\"sm-expanded\") ||\n this.parentEl?.classList.contains(\"xs-menu-open\") ||\n false;\n\n if (this.isInSideNav) {\n this.parentEl?.addEventListener(\n \"icSideNavExpanded\",\n this.sideNavExpandHandler as EventListener\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl?.addEventListener(\n \"icTopNavResized\",\n this.topNavResizedHandler as EventListener\n );\n if (this.el.parentElement?.tagName === \"IC-NAVIGATION-GROUP\")\n this.isTopNavChild = true;\n if (\n this.deviceSize <=\n (this.parentEl as HTMLIcTopNavigationElement).customMobileBreakpoint\n )\n this.inTopNavSideMenu = true;\n }\n\n this.navigationSlot = this.el.querySelector('[slot=\"navigation-item\"]');\n if (this.navigationSlot) {\n this.navigationSlot.ariaLabel =\n this.navigationSlot.textContent?.trim() || null;\n }\n\n if (this.el.hasAttribute(this.ARIA_LABEL_STRING)) {\n this.ariaLabel = this.el.getAttribute(this.ARIA_LABEL_STRING) || \"\";\n }\n }\n\n componentDidLoad(): void {\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n\n componentDidUpdate(): void {\n this.isInitialRender = false;\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail }: CustomEvent<IcBrand>): void {\n this.focusStyle = detail.mode;\n }\n\n /**\n * Sets focus on the nav item.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.itemEl ? this.itemEl.focus() : this.el.querySelector(\"a\")?.focus();\n }\n\n private displayDefaultNavigationItem = (\n href: string,\n label: string,\n hreflang?: string,\n target?: string,\n rel?: string,\n referrerpolicy?: ReferrerPolicy,\n download?: string | boolean\n ) => {\n const variant =\n this.isTopNavChild || this.inTopNavSideMenu ? \"body\" : \"label\";\n const ChevronIconComponent = this.expandable && (\n <div class={{ svg: true }} innerHTML={chevronIcon}></div>\n );\n const slottedBadgeEl = this.el.querySelector('[slot=\"badge\"]');\n const BadgeComponent = slottedBadgeEl && (\n <div class=\"inline-badge\">\n <slot name=\"badge\"></slot>\n </div>\n );\n const IconComponent = this.el.querySelector('[slot=\"icon\"]') && (\n <div class=\"icon\">\n <slot name=\"icon\"></slot>\n {this.isInSideNav && BadgeComponent}\n </div>\n );\n\n return href !== \"\" ? (\n <a\n href={href}\n target={target}\n rel={rel}\n hreflang={hreflang}\n referrerPolicy={referrerpolicy}\n download={download !== false ? download : null}\n class=\"link\"\n ref={(el) => (this.itemEl = el)}\n part=\"link\"\n aria-label={this.ariaLabel ? this.ariaLabel : null}\n >\n {IconComponent}\n <ic-typography variant={variant}>{label}</ic-typography>\n {target === \"_blank\" && (\n <span class=\"open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n {BadgeComponent}\n <div class=\"chevron-container\">{ChevronIconComponent}</div>\n </a>\n ) : (\n <div tabindex=\"0\" class=\"link\" ref={(el) => (this.itemEl = el)}>\n {IconComponent}\n <ic-typography variant={variant}>{label}</ic-typography>\n {ChevronIconComponent}\n {BadgeComponent}\n </div>\n );\n };\n\n private topNavResizedHandler = ({\n detail,\n }: CustomEvent<{ size: number }>) => {\n const { size } = detail;\n if (size !== this.deviceSize) {\n this.deviceSize = size;\n this.inTopNavSideMenu =\n size <=\n ((this.parentEl as HTMLIcTopNavigationElement)\n ?.customMobileBreakpoint || DEVICE_SIZES.L);\n }\n };\n\n private sideNavExpandHandler = ({\n detail,\n }: CustomEvent<IcExpandedDetail>) => {\n const { sideNavExpanded, sideNavMobile } = detail;\n this.sideNavExpanded = sideNavExpanded;\n this.isSideNavMobile = sideNavMobile;\n this.sideNavToggleTooltip(!sideNavExpanded && !sideNavMobile);\n };\n\n private handleBlur = ({ relatedTarget }: FocusEvent) => {\n if (\n relatedTarget === null ||\n (relatedTarget as HTMLElement).tagName !== \"IC-NAVIGATION-ITEM\"\n ) {\n this.childBlur.emit();\n }\n };\n\n private handleClick = () => this.navItemClicked.emit();\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]) => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute && attributeName === this.ARIA_LABEL_STRING) {\n this.ariaLabel = attribute;\n forceComponentUpdate = true;\n }\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private generateTooltipLabel = () => {\n if (this.label) {\n return this.label;\n }\n\n if (this.navigationSlot) {\n return this.navigationSlot.textContent || \"\";\n }\n\n return this.el.children[0]?.textContent || \"\";\n };\n\n private renderNavigationItemContent = () => {\n if (!this.label && !this.navigationSlot) return <slot></slot>;\n\n return this.label ? (\n this.displayDefaultNavigationItem(\n this.href,\n this.label,\n this.hreflang,\n this.target,\n this.rel,\n this.referrerpolicy,\n this.download\n )\n ) : (\n <slot name=\"navigation-item\"></slot>\n );\n };\n\n // Displays tooltip only once the collapsing animation is finished\n private sideNavToggleTooltip = (showTooltip: boolean) => {\n const tooltip = this.el.shadowRoot?.querySelector(\"ic-tooltip\");\n const collapsedClass = \"tooltip-navigation-item-side-nav-collapsed\";\n let timer;\n\n if (!tooltip) return;\n\n if (showTooltip) {\n tooltip.displayTooltip(false); // Hides tooltip for when mouse is hovering over icon\n timer = setTimeout(() => {\n tooltip.classList.add(collapsedClass);\n }, this.ANIMATION_DURATION);\n } else {\n clearTimeout(timer);\n tooltip.classList.remove(collapsedClass);\n }\n };\n\n render() {\n const {\n inTopNavSideMenu,\n isTopNavChild,\n selected,\n navigationType,\n focusStyle,\n isInitialRender,\n sideNavExpanded,\n displayNavigationTooltip,\n collapsedIconLabel,\n isSideNavMobile,\n expandable,\n isInSideNav,\n theme,\n } = this;\n\n const isTopNavChildDesktop = isTopNavChild && !inTopNavSideMenu;\n\n return (\n <Host\n class={{\n \"navigation-item\": true,\n \"navigation-item-selected\": !isTopNavChild && selected,\n \"navigation-item-top-nav\":\n !inTopNavSideMenu && navigationType === \"top\",\n \"navigation-item-top-nav-child\": isTopNavChildDesktop,\n \"navigation-item-top-nav-child-selected\":\n isTopNavChildDesktop && selected,\n \"navigation-item-side-menu\": inTopNavSideMenu,\n \"navigation-item-side-menu-selected\": inTopNavSideMenu && selected,\n \"navigation-item-page-header\": navigationType === \"page-header\",\n \"navigation-item-side-nav\": isInSideNav,\n \"navigation-item-side-nav-collapsed\":\n (!sideNavExpanded || displayNavigationTooltip) && isInSideNav,\n \"navigation-item-side-nav-collapsed-with-label\":\n !sideNavExpanded &&\n isInSideNav &&\n collapsedIconLabel &&\n !isSideNavMobile,\n \"with-transition\": !isInitialRender,\n expandable,\n [focusStyle]: isTopNavChild ? isInSideNav : !inTopNavSideMenu,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n onBlur={isTopNavChildDesktop ? this.handleBlur : null}\n onClick={this.handleClick}\n aria-current={selected ? \"page\" : null}\n role=\"listitem\"\n >\n {/* Tooltip enabled by applying navigation-item-side-nav-collapsed class to host */}\n <ic-tooltip\n label={this.generateTooltipLabel()}\n target=\"navigation-item\"\n placement=\"right\"\n class={{\n \"tooltip-navigation-item\": true,\n \"tooltip-navigation-item-side-nav-collapsed\":\n displayNavigationTooltip && isInSideNav,\n \"tooltip-long-label-navigation-item-side-nav-expanded\":\n this.el.hasAttribute(\"[display-navigation-tooltip = 'true']\"),\n }}\n >\n {this.renderNavigationItemContent()}\n </ic-tooltip>\n </Host>\n );\n }\n}\n"],"mappings":"uOAAA,MAAMA,EAAsB,w5mBAC5B,MAAAC,EAAeD,E,MC+CFE,EAAc,MAP3B,WAAAC,CAAAC,G,8FASUC,KAAAC,gBAAkB,KAElBD,KAAAE,qBAAgD,KAChDF,KAAAG,mBACNC,SAASC,EAAe,mCAAqC,EACvDL,KAAAM,kBAAoB,aACpBN,KAAAO,YAAc,MAIbP,KAAAQ,WAAqBC,EAAaC,GAClCV,KAAAW,WACPC,IACOZ,KAAAa,iBAAmB,MACnBb,KAAAc,gBAAkB,MAClBd,KAAAe,cAAgB,MAShBf,KAAAgB,gBAAkB,MAClBhB,KAAAiB,UAAY,GAKbjB,KAAAkB,mBAAqB,MAKrBlB,KAAAmB,yBAA2B,MAK3BnB,KAAAoB,SAA6B,MAK7BpB,KAAAqB,WAAa,MAKbrB,KAAAsB,KAA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B+E,IAAmB,MAC1C,gCAAiC6B,EACjC,yCACEA,GAAwBlG,EAC1B,4BAA6BV,EAC7B,qCAAsCA,GAAoBU,EAC1D,8BAA+BqE,IAAmB,cAClD,2BAA4BrF,EAC5B,uCACIS,GAAmBG,IAA6BZ,EACpD,iDACGS,GACDT,GACAW,IACCJ,EACH,mBAAoBb,EACpBoB,aACAV,CAACA,GAAaI,EAAgBR,GAAeM,EAC7C,CAAC,YAAYW,KAAUA,IAAU,WAEnCoG,OAAQH,EAAuBzH,KAAK4D,WAAa,KACjDiE,QAAS7H,KAAKiE,YAAW,eACX1C,EAAW,OAAS,KAClCuG,KAAK,YAGL7F,EAAA,cAAA0F,IAAA,2CACEjG,MAAO1B,KAAK2E,uBACZ/C,OAAO,kBACPmG,UAAU,QACV7F,MAAO,CACL,0BAA2B,KAC3B,6CACEf,GAA4BZ,EAC9B,uDACEP,KAAKuC,GAAGuE,aAAa,2CAGxB9G,KAAK+E,+B","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{f as n}from"./p-8e4e97b4.js";import{b as t,d as e,c as o,l as i,k as s,j as r,i as a,h as c,g as l}from"./p-6215e2ae.js";var u;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(u||(u={}));var d;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(d||(d={}));const v=133.3505;const f="anywhere";const p="ic-input";const b=(n,t=[])=>{const e={};t.forEach((t=>{const o=n.getAttribute(t);if(o!==null){e[t]=o;n.removeAttribute(t)}}));return e};const m=(n,t)=>{const e=n._original||n;return{_original:n,emit:w(e.emit.bind(e),t)}};const w=(n,t=0)=>{let e;return(...o)=>{clearTimeout(e);e=setTimeout(n,t,...o)}};const h=(n,t,e,o=false,i=true)=>{if(e&&(i||A(n))){let i=g(n);if(!i){i=n.ownerDocument.createElement("input");i.type="hidden";i.classList.add(p);n.appendChild(i)}i.disabled=o;i.name=e;i.value=t instanceof Date?t.toISOString():t||""}};const g=n=>Array.from(n.querySelectorAll(`input.${p}`)).filter((t=>n===t.parentElement))[0];const x=(n,t,e,o,i,s,r)=>{if(s!==undefined&&A(t)){let a=g(t);if(a===null||a===undefined){a=t.ownerDocument.createElement("input");a.classList.add(p);t.appendChild(a)}a.type="file";a.hidden=true;a.multiple=e;a.name=s;a.disabled=o;if(r)a.files=r;if(i)a.accept=i;a.onchange=()=>{n.emit(a.files)};a.click()}};const y=n=>{var t;(t=g(n))===null||t===void 0?void 0:t.remove()};const A=n=>!!n&&!!n.shadowRoot&&!!n.attachShadow;const I=n=>n+"-helper-text";const k=n=>n+"-validation-text";const N=(n,t,e,o)=>`${H(n,"helper-text")||e?I(t):""} ${o?k(t):""}`.trim();const $=(n,i=null)=>{var s;const r=n.parentElement||n.getRootNode().host.parentElement;const a=r===null||r===void 0?void 0:r.closest(t);if(!a)return d.Default;const c=a.tagName.toLowerCase();if((s=e[c])===null||s===void 0?void 0:s.includes(n.tagName.toLowerCase())){return d.Default}else if(i!==null&&!o.includes(c)){return i}else if(a.classList.contains(`${c}-${d.Dark}`)||a.classList.contains(d.Dark)){return d.Dark}else{return d.Light}};const E=()=>"maxTouchPoints"in navigator&&"userAgent"in navigator?navigator.maxTouchPoints>0&&/iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent):false;const O=(n,t)=>{var e,o,i,s,r,a,c;const l=t.type==="submit"||t.type==="reset"?`hidden-form-${t.type}-button`:"hidden-form-button";const u=(e=document.querySelector(`#${l}`))!==null&&e!==void 0?e:document.createElement("button");u.setAttribute("type",(o=t.type)!==null&&o!==void 0?o:"button");u.id=l;u.style.display="none";u.formAction=(i=t.formaction)!==null&&i!==void 0?i:"";u.formEnctype=(s=t.formenctype)!==null&&s!==void 0?s:"";u.formMethod=(r=t.formmethod)!==null&&r!==void 0?r:"";u.formNoValidate=(a=t.formnovalidate)!==null&&a!==void 0?a:false;u.formTarget=(c=t.formtarget)!==null&&c!==void 0?c:"";n===null||n===void 0?void 0:n.appendChild(u);u.click()};const T=n=>!n||n.trim().length===0;const C=n=>n!==undefined?n:undefined;const F=(n,t,e="value",o="label")=>{const i=[];if(t.length>0&&t.map){t.map((n=>{if(n.children){n.children.map((n=>i.push(n)))}else{i.push(n)}}));const s=i.find((t=>t[e]===n));if(s!==undefined)return s[o]}return undefined};const M=(n,t,e,o=f,i="label")=>n.filter((n=>{var s;const r=n[i].toLowerCase();const a=(s=n.description)===null||s===void 0?void 0:s.toLowerCase();const c=e.toLowerCase();return o===f?t?r.includes(c)||(a===null||a===void 0?void 0:a.includes(c)):r.includes(c):t?r.startsWith(c)||(a===null||a===void 0?void 0:a.startsWith(c)):r.startsWith(c)}));const P=n=>{const t=[];if(n.length>0&&n.map){n.map((n=>{if(n.children){n.children.map((n=>t.push(n)))}else{t.push(n)}}))}return t.length};const D=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const S=()=>{if(D(X.S)){return X.S}if(D(X.M)){return X.M}if(D(X.L)){return X.L}if(D(X.XL)){return X.XL}return X.UNDEFINED};const G=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const R=()=>(parseInt(G("--ic-brand-color-primary-r"))*299+parseInt(G("--ic-brand-color-primary-g"))*587+parseInt(G("--ic-brand-color-primary-b"))*114)/1e3;const L=(n=R())=>n>v?d.Dark:d.Light;const j=(n,t)=>(n===null||n===void 0?void 0:n.querySelector(`[slot="${t}"]`))||null;const U=(n,t)=>j(n,t)!==null;const V=(n,t)=>{const e=j(n,t);return e?B(e):null};const B=n=>{const t=n.firstElementChild;if(t===null)return[n];const e=t.assignedElements?t.assignedElements():t.childNodes;return e.length?e:n.tagName?[n]:null};const W=({parentElement:n})=>{let t={navType:"",parent:null};if(n){switch(n.tagName){case"IC-NAVIGATION-GROUP":t=W(n);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:n};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:n};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}}return t};const X={XS:Number(G("--ic-breakpoint-xs").replace("px","")),S:Number(G("--ic-breakpoint-sm").replace("px","")),M:Number(G("--ic-breakpoint-md").replace("px","")),L:Number(G("--ic-breakpoint-lg").replace("px","")),XL:Number(G("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const q=(n,t)=>!!n&&!t;const H=({children:n},t)=>Array.from(n).some((n=>n.getAttribute("slot")===t));const z=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const J=(n,t)=>{n.forEach((({prop:n,propName:e})=>{if(n===null||n===undefined){console.error(`No ${e} specified for ${t} component - prop '${e}' (web components) / '${K(e)}' (react) required`)}}))};const K=n=>n.toLowerCase().split("-").map(((n,t)=>t===0?n:`${n.substring(0,1).toUpperCase()}${n.substring(1)}`)).join("");const Q=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const Y=n=>parseInt(n,16);const Z=n=>{const t=n.replace("#","").split("").map((n=>n.repeat(2)));return{r:Y(n.length===4?t[0]:n.slice(1,3)),g:Y(n.length===4?t[1]:n.slice(3,5)),b:Y(n.length===4?t[2]:n.slice(5)),a:1}};const _=n=>{const t=n.slice(3,4).toLowerCase()==="a";const e=n.substring(t?5:4,n.length-1).replace(/ /g,"").split(",").map(Number);return{r:e[0],g:e[1],b:e[2],a:t?e[3]:1}};const nn=({scrollWidth:n,clientWidth:t})=>n>t;const tn=()=>!!document.querySelector("ic-classification-banner:not([inline='true'])");const en=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.addEventListener("reset",t)};const on=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.removeEventListener("reset",t)};const sn=(n,t=16)=>`${1/t*parseInt(n)}rem`;const rn=(n,t)=>{if(!n){t.removeAttribute("disabled")}};const an=()=>window.navigator.userAgent.toUpperCase().indexOf("MAC")>=0;const cn=n=>{const t=n===null||n===void 0?void 0:n.slice(0,1).toLowerCase();if(t!=="#"&&t!=="r")return null;return t==="#"?Z(n):_(n)};const ln=n=>n.charAt(0).toUpperCase()+n.slice(1);const un=(n,t,e)=>{const o=n=>Array.from(n).some((n=>Array.isArray(e)?e.some((t=>n.slot===t)):n.slot===e));return o(n)||o(t)};const dn=n=>!!n.closest(".ag-cell")&&!!n.closest(".ag-root");const vn=n=>{var t;return((t=n.parentElement)===null||t===void 0?void 0:t.tagName)===`${n.tagName}-GROUP`};const fn=(n,t)=>n.some((({type:n,addedNodes:e,removedNodes:o})=>n==="childList"&&un(e,o,t)));const pn=(t,e,o)=>{if(fn(t,e)){n(o)}};const bn=n=>{var e,o,i,s,r;const a=(o=(e=n.parentElement)===null||e===void 0?void 0:e.closest(t))===null||o===void 0?void 0:o.theme;if(a&&a!=="inherit")return a;const c=(s=(i=n.parentElement)===null||i===void 0?void 0:i.closest("ic-theme"))===null||s===void 0?void 0:s.theme;if(c&&c!=="system")return c;return((r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"};const mn=/safari/i.test(window.navigator.userAgent)&&!/Edge/i.test(window.navigator.userAgent)&&!/chrome/i.test(window.navigator.userAgent);const wn=(n,t,e,o=false)=>{const u=e[t];if(!u){return}let d=n;if(d++>e.length){return}let v=t;if(In(u)){v=gn(v,o);v=xn(v,e);return wn(d,v,e,o)}else{switch(u.tagName){case l:case c:case a:case r:case s:case i:u.setFocus();break;default:u.focus()}return{newFocusAttemptCount:d,newFocusedElementIndex:v}}};const hn=(n,t)=>{var e;for(let o=0;o<t.length;o++){if(t[o]===(((e=n.shadowRoot)===null||e===void 0?void 0:e.activeElement)||document.activeElement)){return o}}return null};const gn=(n,t)=>t?n-=1:n+=1;const xn=(n,t)=>{if(n>t.length-1){return 0}else if(n<0){return t.length-1}return n};function yn(n,t,e,o,i){var s;let a=t;let c=hn(n,o)||e;if(((s=o[e])===null||s===void 0?void 0:s.tagName)===r){return{newFocusAttemptCount:a,newFocusedElementIndex:c,preventDefault:false}}c=gn(c,i);c=xn(c,o);a=0;const l=wn(a,c,o,i);if(l){c=l.newFocusedElementIndex;a=l.newFocusAttemptCount}return{newFocusAttemptCount:a,newFocusedElementIndex:c,preventDefault:true}}const An=(n,t)=>{var e;let o=null;let i=null;if(n){o=n.querySelector("slot");o===null||o===void 0?void 0:o.addEventListener("slotchange",t);i=new MutationObserver((()=>{t()}));(e=B(n))===null||e===void 0?void 0:e.forEach((n=>{i===null||i===void 0?void 0:i.observe(n,{childList:true,subtree:true})}))}return{contentAreaSlot:o,contentAreaMutationObserver:i}};const In=n=>{if(!n){return true}const t=getComputedStyle(n).visibility==="hidden"||n.offsetHeight===0||n.hasAttribute("disabled")||n.tagName===c&&n.hasAttribute("single-expansion");const e=n.closest("ic-radio-option");return t||n.getAttribute("type")==="radio"&&!!e&&!(e.hasAttribute("selected")||n.tabIndex===0)};const kn=n=>Array.from(n.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex="-1"]),\n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-context,\n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible="true"], ic-footer-link, ic-link, ic-navigation-button,\n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion, ic-date-input, ic-date-picker, ic-action-chip, ic-time-input`));export{bn as A,W as B,G as C,X as D,B as E,M as F,F as G,O as H,d as I,m as J,un as K,an as L,P as M,E as N,u as O,T as P,R as Q,j as R,vn as S,V as T,ln as U,nn as V,I as W,k as X,x as Y,mn as Z,pn as a,dn as b,z as c,cn as d,C as e,S as f,L as g,Q as h,H as i,$ as j,en as k,on as l,h as m,y as n,J as o,sn as p,N as q,rn as r,q as s,U as t,An as u,wn as v,kn as w,yn as x,tn as y,b as z};
2
- //# sourceMappingURL=p-dbc8bf0c.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["IcInformationStatus","IcBrandForegroundEnum","DARK_MODE_THRESHOLD","ANYWHERE_SEARCH_POSITION","icInput","inheritAttributes","element","attributes","attributeObject","forEach","attr","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","container","name","disabled","always","hasShadowDom","input","getHiddenInputElement","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","Array","from","querySelectorAll","filter","el","parentElement","renderFileHiddenInput","multiple","accept","undefined","hidden","files","onchange","click","removeHiddenInput","_a","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","isSlotUsed","trim","getBrandFromContext","brandFromEvent","getRootNode","host","blockColorParent","closest","IC_BLOCK_COLOR_COMPONENTS","Default","parentTag","tagName","toLowerCase","IC_BLOCK_COLOR_EXCEPTIONS","includes","IC_FIXED_COLOR_COMPONENTS","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","test","userAgent","handleHiddenFormButtonClick","form","button","hiddenFormButtonId","hiddenFormButton","document","querySelector","setAttribute","_b","style","display","formAction","_c","formaction","formEnctype","_d","formenctype","formMethod","_e","formmethod","formNoValidate","_f","formnovalidate","formTarget","_g","formtarget","isEmptyString","length","isPropDefined","prop","getLabelFromValue","options","valueField","labelField","ungroupedOptions","map","option","children","push","matchingValue","find","getFilteredMenuOptions","includeDescriptions","searchString","position","label","description","lowerSearchString","startsWith","getOptionsWithoutGroupTitlesCount","optionsWithoutGroupTitles","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","S","M","L","XL","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getBrandColorBrightness","parseInt","getBrandForegroundAppearance","brightness","getSlot","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","XS","Number","replace","hasValidationStatus","status","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","propName","console","error","kebabToCamelCase","kebabCase","split","word","index","substring","toUpperCase","join","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","hexChars","char","repeat","r","slice","g","b","a","rgbaStrToObj","rgbaStr","isRGBA","rgbValues","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","removeDisabledFalse","isMacDevice","indexOf","convertToRGBA","color","firstChar","capitalize","text","charAt","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","isArray","isElInAGGrid","isSlottedInGroup","hasDynamicChildSlots","mutationList","slotNames","renderDynamicChildSlots","ref","forceUpdate","getElementInheritedTheme","blockParentTheme","theme","wrapperTheme","call","isSafari","focusElement","focusAttemptCount","focusedElementIndex","interactiveElementList","shiftKey","newFocusAttemptCount","newFocusedElementIndex","shouldSkipElement","getFocusIndexBasedOnShiftKey","getLoopedNextFocusIndexIfLastElement","IC_ACCORDION","IC_ACCORDION_GROUP","IC_CHECKBOX","IC_SEARCH_BAR","IC_TAB_CONTEXT","IC_TEXT_FIELD","setFocus","focus","getFocusedElementIndex","i","activeElement","handleFocusTrapTabKeyPress","preventDefault","focusElementResult","refreshInteractiveElementsOnSlotChange","contentWrapper","getInteractiveElements","contentAreaSlot","contentAreaMutationObserver","MutationObserver","observe","childList","subtree","isHidden","visibility","offsetHeight","hasAttribute","radioEl","tabIndex","slottedInteractiveElements"],"sources":["src/utils/types.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 | \"ai\";\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 * Set \"label\" and \"value\" props to use as the option's label and value.\n * Alternatively, custom names for these props can be used e.g. by setting the \"labelField\" and \"valueField\" props on the relevant component.\n *\n * Any props supplied to the \"htmlProps\" object will be spread onto the option's underlying <li> element.\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 hideLabel?: boolean;\n htmlProps?: Record<string, 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\n// Matches HTML aria-live attribute options\nexport type IcAriaLive = \"polite\" | \"assertive\" | \"off\";\n\n// Includes 'default' option for when the aria-live value is handled within a component\nexport type IcValidationAriaLive = \"default\" | \"polite\" | \"assertive\" | \"off\";\n\nexport type IcPosition = \"top\" | \"right\" | \"bottom\" | \"left\";\n","import { EventEmitter, forceUpdate } from \"@stencil/core\";\nimport {\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcBrandForegroundNoDefault,\n IcCallbackFunctionNoReturn,\n IcFocusableComponents,\n IcInformationStatusOrEmpty,\n IcMenuOption,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n IcDeviceSizes,\n IcColor,\n IcThemeMode,\n} from \"./types\";\nimport {\n IC_ACCORDION,\n IC_ACCORDION_GROUP,\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_CHECKBOX,\n IC_FIXED_COLOR_COMPONENTS,\n IC_SEARCH_BAR,\n IC_TAB_CONTEXT,\n IC_TEXT_FIELD,\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 el: HTMLElement,\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${\n isSlotUsed(el, \"helper-text\") || helperText\n ? getInputHelperTextID(inputId)\n : \"\"\n } ${validationText ? getInputValidationTextID(inputId) : \"\"}`.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(IC_BLOCK_COLOR_COMPONENTS);\n\n if (!blockColorParent) return IcBrandForegroundEnum.Default;\n\n const parentTag = blockColorParent.tagName.toLowerCase();\n\n if (\n IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(el.tagName.toLowerCase())\n ) {\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 } else {\n return IcBrandForegroundEnum.Light;\n }\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 form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - form element to associate button with\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement | null,\n button: HTMLIcButtonElement\n): void => {\n const hiddenFormButtonId =\n button.type === \"submit\" || button.type === \"reset\"\n ? `hidden-form-${button.type}-button`\n : \"hidden-form-button\";\n\n const hiddenFormButton =\n document.querySelector<HTMLButtonElement>(`#${hiddenFormButtonId}`) ??\n document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type ?? \"button\");\n hiddenFormButton.id = hiddenFormButtonId;\n hiddenFormButton.style.display = \"none\";\n\n hiddenFormButton.formAction = button.formaction ?? \"\";\n hiddenFormButton.formEnctype = button.formenctype ?? \"\";\n hiddenFormButton.formMethod = button.formmethod ?? \"\";\n hiddenFormButton.formNoValidate = button.formnovalidate ?? false;\n hiddenFormButton.formTarget = button.formtarget ?? \"\";\n\n form?.appendChild(hiddenFormButton);\n hiddenFormButton.click();\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 (parseInt(getCssProperty(\"--ic-brand-color-primary-r\")) * 299 +\n parseInt(getCssProperty(\"--ic-brand-color-primary-g\")) * 587 +\n parseInt(getCssProperty(\"--ic-brand-color-primary-b\")) * 114) /\n 1000;\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\nexport const getElementInheritedTheme = (el: HTMLElement): IcThemeMode => {\n const blockParentTheme =\n el.parentElement?.closest<HTMLIcTopNavigationElement>(\n IC_BLOCK_COLOR_COMPONENTS\n )?.theme;\n\n if (blockParentTheme && blockParentTheme !== \"inherit\")\n return blockParentTheme;\n\n const wrapperTheme = el.parentElement?.closest(\"ic-theme\")?.theme;\n\n if (wrapperTheme && wrapperTheme !== \"system\") return wrapperTheme;\n\n return window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\";\n};\n\nexport const isSafari =\n /safari/i.test(window.navigator.userAgent) &&\n !/Edge/i.test(window.navigator.userAgent) &&\n !/chrome/i.test(window.navigator.userAgent);\n\n/**\n * Focuses the provided element, or the next focusable element if it should be skipped. Used for focus trapping.\n * @param focusAttemptCount - number of focus attempts that have been made\n * @param focusedElementIndex - current focused element index\n * @param interactiveElementList - list of interactive elements\n * @param shiftKey - whether the shift key is pressed\n */\nexport const focusElement = (\n focusAttemptCount: number,\n focusedElementIndex: number,\n interactiveElementList: HTMLElement[],\n shiftKey = false\n):\n | { newFocusAttemptCount: number; newFocusedElementIndex: number }\n | undefined => {\n const element = interactiveElementList[focusedElementIndex];\n\n if (!element) {\n return;\n }\n\n let newFocusAttemptCount = focusAttemptCount;\n\n if (newFocusAttemptCount++ > interactiveElementList.length) {\n return;\n }\n\n let newFocusedElementIndex = focusedElementIndex;\n\n if (shouldSkipElement(element)) {\n newFocusedElementIndex = getFocusIndexBasedOnShiftKey(\n newFocusedElementIndex,\n shiftKey\n );\n newFocusedElementIndex = getLoopedNextFocusIndexIfLastElement(\n newFocusedElementIndex,\n interactiveElementList\n );\n return focusElement(\n newFocusAttemptCount,\n newFocusedElementIndex,\n interactiveElementList,\n shiftKey\n );\n } else {\n switch (element.tagName) {\n case IC_ACCORDION:\n case IC_ACCORDION_GROUP:\n case IC_CHECKBOX:\n case IC_SEARCH_BAR:\n case IC_TAB_CONTEXT:\n case IC_TEXT_FIELD:\n (element as IcFocusableComponents).setFocus();\n break;\n default:\n element.focus();\n }\n return { newFocusAttemptCount, newFocusedElementIndex };\n }\n};\n\n/**\n * Gets the index of the currently focused element. Used for focus trapping.\n * @param el - host element of the component\n * @param interactiveElementList - list of interactive elements\n */\nexport const getFocusedElementIndex = (\n el: HTMLElement,\n interactiveElementList: HTMLElement[]\n) => {\n for (let i = 0; i < interactiveElementList.length; i++) {\n if (\n (interactiveElementList[i] as HTMLElement) ===\n (el.shadowRoot?.activeElement || document.activeElement)\n ) {\n return i;\n }\n }\n return null;\n};\n\n/**\n * Gets the next focusable element index based on whether the shift key is pressed. Used for focus trapping.\n * @param focusedElementIndex - current focused element index\n * @param shiftKey - whether the shift key is pressed\n */\nexport const getFocusIndexBasedOnShiftKey = (\n focusedElementIndex: number,\n shiftKey: boolean\n) => (shiftKey ? (focusedElementIndex -= 1) : (focusedElementIndex += 1));\n\n/**\n * Gets the next focusable element index, looping back to the start or end if necessary. Used for focus trapping.\n * @param focusedElementIndex - current focused element index\n * @param interactiveElementList - list of interactive elements\n */\nexport const getLoopedNextFocusIndexIfLastElement = (\n focusedElementIndex: number,\n interactiveElementList: HTMLElement[]\n): number => {\n if (focusedElementIndex > interactiveElementList.length - 1) {\n return 0;\n } else if (focusedElementIndex < 0) {\n return interactiveElementList.length - 1;\n }\n return focusedElementIndex;\n};\n\n/**\n * Handles tab key press for focus trapping.\n * @param el - host element of the component\n * @param focusAttemptCount - number of focus attempts that have been made\n * @param focusedElementIndex - current focused element index\n * @param interactiveElementList - list of interactive elements\n * @param shiftKey - whether the shift key is pressed\n */\nexport function handleFocusTrapTabKeyPress(\n el: HTMLElement,\n focusAttemptCount: number,\n focusedElementIndex: number,\n interactiveElementList: HTMLElement[],\n shiftKey: boolean\n): {\n newFocusAttemptCount: number;\n newFocusedElementIndex: number;\n preventDefault: boolean;\n} {\n let newFocusAttemptCount = focusAttemptCount;\n\n let newFocusedElementIndex =\n getFocusedElementIndex(el, interactiveElementList) || focusedElementIndex;\n\n if (interactiveElementList[focusedElementIndex]?.tagName === IC_SEARCH_BAR) {\n return {\n newFocusAttemptCount,\n newFocusedElementIndex,\n preventDefault: false,\n };\n }\n\n newFocusedElementIndex = getFocusIndexBasedOnShiftKey(\n newFocusedElementIndex,\n shiftKey\n );\n newFocusedElementIndex = getLoopedNextFocusIndexIfLastElement(\n newFocusedElementIndex,\n interactiveElementList\n );\n\n newFocusAttemptCount = 0;\n const focusElementResult = focusElement(\n newFocusAttemptCount,\n newFocusedElementIndex,\n interactiveElementList,\n shiftKey\n );\n if (focusElementResult) {\n newFocusedElementIndex = focusElementResult.newFocusedElementIndex;\n newFocusAttemptCount = focusElementResult.newFocusAttemptCount;\n }\n\n return { newFocusAttemptCount, newFocusedElementIndex, preventDefault: true };\n}\n\n/**\n * Sets up listener and mutation observer to refresh interactive elements on slot changes. Used for focus trapping.\n * @param contentWrapper - content wrapper element\n * @param getInteractiveElements - function to get interactive elements\n */\nexport const refreshInteractiveElementsOnSlotChange = (\n contentWrapper: HTMLElement | null,\n getInteractiveElements: () => void\n): {\n contentAreaSlot: HTMLSlotElement | null;\n contentAreaMutationObserver: MutationObserver | null;\n} => {\n let contentAreaSlot: HTMLSlotElement | null = null;\n let contentAreaMutationObserver: MutationObserver | null = null;\n\n if (contentWrapper) {\n contentAreaSlot = contentWrapper.querySelector(\"slot\");\n\n // Detect changes to slotted elements\n contentAreaSlot?.addEventListener(\"slotchange\", getInteractiveElements);\n\n contentAreaMutationObserver = new MutationObserver(() => {\n getInteractiveElements();\n });\n\n // Detect changes to children of slotted elements\n getSlotElements(contentWrapper)?.forEach((el) => {\n contentAreaMutationObserver?.observe(el, {\n childList: true,\n subtree: true,\n });\n });\n }\n\n return { contentAreaSlot, contentAreaMutationObserver };\n};\n\n/**\n * Removes listener and disconnects mutation observer for slot changes. Used for focus trapping.\n * @param contentAreaSlotMutationObserver - mutation observer for content area slot\n * @param contentAreaSlot - content area slot element\n * @param getInteractiveElements - function to get interactive elements\n */\nexport const removeInteractiveElementSlotChangeListener = (\n contentAreaSlot: HTMLSlotElement | null | undefined,\n contentAreaSlotMutationObserver: MutationObserver | null,\n getInteractiveElements: () => void\n) => {\n if (contentAreaSlot) {\n contentAreaSlot.removeEventListener(\"slotchange\", getInteractiveElements);\n contentAreaSlotMutationObserver?.disconnect();\n }\n};\n\n/**\n * Determines whether an element should be skipped when focusing interactive elements. Used for focus trapping.\n * @param element - element to check\n */\nexport const shouldSkipElement = (element: HTMLElement): boolean => {\n if (!element) {\n return true;\n }\n\n const isHidden =\n getComputedStyle(element).visibility === \"hidden\" ||\n element.offsetHeight === 0 ||\n element.hasAttribute(\"disabled\") ||\n (element.tagName === IC_ACCORDION_GROUP &&\n element.hasAttribute(\"single-expansion\"));\n\n const radioEl = element.closest(\"ic-radio-option\");\n\n return (\n isHidden ||\n (element.getAttribute(\"type\") === \"radio\" &&\n !!radioEl &&\n !(radioEl.hasAttribute(\"selected\") || element.tabIndex === 0))\n );\n};\n\n/**\n * Gets all interactive elements slotted within a component. Used for focus trapping.\n * @param el - host element of the component\n */\nexport const slottedInteractiveElements = (el: HTMLElement): HTMLElement[] =>\n Array.from(\n el.querySelectorAll(\n `a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex=\"-1\"]),\n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-context,\n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible=\"true\"], ic-footer-link, ic-link, ic-navigation-button,\n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion, ic-date-input, ic-date-picker, ic-action-chip, ic-time-input`\n )\n );\n"],"mappings":"oIA0BYA,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,iBACAA,EAAA,oBACD,EAJD,CAAYA,MAAmB,K,IA0EnBC,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,eACAA,EAAA,gBACD,EAJD,CAAYA,MAAqB,KCvEjC,MAAMC,EAAsB,SAC5B,MAAMC,EAA2B,WACjC,MAAMC,EA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gB,eAAgB,M,CAIpBhB,EAAyBE,GACvBF,EACAF,GAEFE,EAAyBG,GACvBH,EACAH,GAGFE,EAAuB,EACvB,MAAMkB,EAAqBvB,GACzBK,EACAC,EACAH,EACAC,GAEF,GAAImB,EAAoB,CACtBjB,EAAyBiB,EAAmBjB,uBAC5CD,EAAuBkB,EAAmBlB,oB,CAG5C,MAAO,CAAEA,uBAAsBC,yBAAwBgB,eAAgB,KACzE,C,MAOaE,GAAyC,CACpDC,EACAC,K,MAKA,IAAIC,EAA0C,KAC9C,IAAIC,EAAuD,KAE3D,GAAIH,EAAgB,CAClBE,EAAkBF,EAAe9L,cAAc,QAG/CgM,IAAe,MAAfA,SAAe,SAAfA,EAAiB/D,iBAAiB,aAAc8D,GAEhDE,EAA8B,IAAIC,kBAAiB,KACjDH,GAAwB,KAI1BxO,EAAA+G,EAAgBwH,MAAe,MAAAvO,SAAA,SAAAA,EAAEjD,SAASsC,IACxCqP,IAA2B,MAA3BA,SAA2B,SAA3BA,EAA6BE,QAAQvP,EAAI,CACvCwP,UAAW,KACXC,QAAS,MACT,G,CAIN,MAAO,CAAEL,kBAAiBC,8BAA6B,EAwBlD,MAAMrB,GAAqBzQ,IAChC,IAAKA,EAAS,CACZ,OAAO,I,CAGT,MAAMmS,EACJ3I,iBAAiBxJ,GAASoS,aAAe,UACzCpS,EAAQqS,eAAiB,GACzBrS,EAAQsS,aAAa,aACpBtS,EAAQ0E,UAAYmM,GACnB7Q,EAAQsS,aAAa,oBAEzB,MAAMC,EAAUvS,EAAQsE,QAAQ,mBAEhC,OACE6N,GACCnS,EAAQM,aAAa,UAAY,WAC9BiS,KACAA,EAAQD,aAAa,aAAetS,EAAQwS,WAAa,EAAG,E,MAQvDC,GAA8BhQ,GACzCJ,MAAMC,KACJG,EAAGF,iBACD,yc","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icBackToTopCss","IcBackToTopStyle0","backToTopLabel","BackToTop","constructor","hostRef","this","topObserver","bannerOffset","footerVisible","targetElVisible","position","theme","variant","getObservedEl","document","querySelector","setTargetElVisible","visible","setFooterVisible","checkForClassificationBanner","window","scrollY","targetElObserverCallback","entries","isIntersecting","footerObserverCallback","findTargetEl","target","targetElement","undefined","console","log","startsWith","createTopObserver","targetEl","objParent","observedEl","unobserve","remove","body","firstElementChild","isTargetElNull","parentNode","objBackToTopTargetEl","createElement","setAttribute","insertBefore","marginTop","getComputedStyle","IntersectionObserver","threshold","rootMargin","observe","handleClick","scrollTo","_a","scrollIntoView","focus","banners","querySelectorAll","length","watchPropHandler","newValue","oldValue","onComponentPropUndefinedChange","componentWillLoad","footers","footerEl","footerObserver","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","render","btnVariant","size","label","h","Host","key","class","onClick","innerHTML","ArrowUpward"],"sources":["src/components/ic-back-to-top/ic-back-to-top.css?tag=ic-back-to-top&encapsulation=shadow","src/components/ic-back-to-top/ic-back-to-top.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-back-to-top: z-index of back to top\n * @prop --margin-right: right y-position of back to top\n * @prop --margin-left: left y-position of back to top\n * @prop --footer-offset: offset of x-position from footer\n */\n\n:host {\n display: flex;\n flex: row;\n height: 0.1px;\n}\n\n:host(.ic-back-to-top-right) {\n justify-content: flex-end;\n}\n\n:host(.ic-back-to-top-right) ic-button {\n margin-right: var(--margin-right, 1rem);\n}\n\n:host(.ic-back-to-top-right) .ic-back-to-top-icon {\n padding-top: var(--ic-space-xxs);\n padding-right: var(--ic-space-xs);\n}\n\n:host(.ic-back-to-top-left) {\n justify-content: flex-start;\n}\n\n:host(.ic-back-to-top-left) ic-button {\n margin-left: var(--margin-left, 1rem);\n}\n\n:host(.ic-back-to-top-left) .ic-back-to-top-icon {\n padding-top: var(--ic-space-xxs);\n padding-right: var(--ic-space-xs);\n}\n\n:host(.ic-back-to-top-center) {\n justify-content: center;\n}\n\n:host(.ic-back-to-top-center) .ic-back-to-top-icon {\n padding-top: var(--ic-space-xxs);\n padding-right: var(--ic-space-xs);\n}\n\nic-button {\n height: 2.5rem;\n align-items: center;\n background-color: var(--ic-color-background-primary);\n border-radius: 5rem;\n box-shadow: var(--ic-elevation-overlay);\n visibility: hidden;\n position: fixed;\n bottom: var(--ic-space-md);\n opacity: 0;\n transition: visibility 0s linear var(--ic-transition-duration-slow),\n opacity var(--ic-transition-duration-slow);\n z-index: var(--ic-z-index-back-to-top);\n}\n\n:host(.ic-back-to-top-variant-icon) ic-button::part(button) {\n margin: 0;\n}\n\nic-button::part(button) {\n border-radius: 5rem;\n}\n\nic-button.show {\n visibility: visible;\n opacity: 1;\n transition: visibility 0s linear 0s,\n opacity var(--ic-transition-duration-slow),\n box-shadow var(--ic-easing-transition-fast);\n}\n\nic-button.offset-banner:not(.by-footer) {\n margin-bottom: var(--footer-offset, var(--ic-space-lg));\n}\n\n.ic-back-to-top-icon > svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n.icon-only {\n width: 2.5rem;\n}\n\n.icon-only .ic-back-to-top-icon > svg {\n padding-left: calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\nic-button.by-footer {\n position: relative;\n bottom: var(--footer-offset, 3.5rem);\n}\n\n@media (forced-colors: active) {\n .icon-only .ic-back-to-top-icon > svg {\n padding-left: calc(var(--ic-space-xs) - var(--ic-space-xxxs));\n }\n}\n","import { Component, h, Host, Element, Prop, State, Watch } from \"@stencil/core\";\nimport ArrowUpward from \"./assets/ArrowUpward.svg\";\nimport {\n onComponentPropUndefinedChange,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\nimport {\n IcBackToTopVariants,\n IcBackToTopPositions,\n} from \"./ic-back-to-top.types\";\n\nconst backToTopLabel = \"Back to top\";\n\n@Component({\n tag: \"ic-back-to-top\",\n styleUrl: \"ic-back-to-top.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BackToTop {\n private isTargetElNull: boolean;\n private targetEl: Element | null;\n private topObserver: IntersectionObserver | null = null;\n\n @Element() el: HTMLIcBackToTopElement;\n\n @State() bannerOffset: boolean = false;\n @State() footerVisible: boolean = false;\n @State() targetElVisible: boolean = true;\n\n /**\n * The horizontal position of the element.\n */\n @Prop() position?: IcBackToTopPositions = \"right\";\n\n /**\n * The ID of the element to jump back to when the link is clicked.\n */\n @Prop() target!: 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 variant of the button to render\n */\n @Prop() variant?: IcBackToTopVariants = \"default\";\n\n @Watch(\"target\")\n watchPropHandler(newValue: string, oldValue: string): void {\n //added for gatsby rehydration issue where prop is initially undefined but then changes to actual value\n onComponentPropUndefinedChange(oldValue, newValue, () => {\n this.createTopObserver(newValue);\n });\n }\n\n componentWillLoad(): void {\n this.createTopObserver(this.target);\n this.checkForClassificationBanner();\n\n //observer for when footer scrolls into view\n let footers = document.querySelectorAll(\n \"ic-footer\"\n ) as NodeListOf<HTMLElement>;\n if (footers.length === 0) {\n footers = document.querySelectorAll(\"footer\");\n }\n\n if (footers.length) {\n const footerEl = footers[footers.length - 1];\n const threshold = this.bannerOffset ? 0.15 : 0;\n const footerObserver = new IntersectionObserver(\n this.footerObserverCallback,\n { threshold: [threshold] }\n );\n footerObserver.observe(footerEl);\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.target, propName: \"target\" }],\n \"Back to Top\"\n );\n }\n\n private getObservedEl = () => {\n return document.querySelector(\"#ic-back-to-top-target\");\n };\n\n private setTargetElVisible = (visible: boolean) => {\n this.targetElVisible = visible;\n };\n\n private setFooterVisible = (visible: boolean) => {\n this.checkForClassificationBanner();\n this.footerVisible =\n typeof window !== \"undefined\" && window.scrollY === 0 ? false : visible;\n };\n\n private targetElObserverCallback = (entries: IntersectionObserverEntry[]) => {\n this.setTargetElVisible(entries[0].isIntersecting);\n };\n\n private footerObserverCallback = (entries: IntersectionObserverEntry[]) => {\n this.setFooterVisible(entries[0].isIntersecting);\n };\n\n private findTargetEl = (target: string): Element | null => {\n let targetElement = null;\n if (target === null || target === undefined) {\n console.log(\n \"Error: No target ID specified for back to top component - defaulting to top of page\"\n );\n } else {\n targetElement = document.querySelector(\n `${target.startsWith(\"#\") ? \"\" : \"#\"}${target}`\n );\n if (targetElement === null) {\n console.log(\n `Error: Back to top target element '${target}' not found - defaulting to top of page`\n );\n }\n }\n return targetElement;\n };\n\n private createTopObserver = (target: string) => {\n this.targetEl = this.findTargetEl(target);\n let objParent: HTMLElement;\n\n //remove old element & observer\n if (this.topObserver !== null) {\n const observedEl = this.getObservedEl();\n if (observedEl !== null) {\n this.topObserver.unobserve(observedEl);\n observedEl.remove();\n }\n }\n\n if (this.targetEl === null) {\n objParent = document.body;\n this.targetEl = objParent.firstElementChild;\n this.isTargetElNull = true;\n } else {\n objParent = this.targetEl.parentNode as HTMLElement;\n this.isTargetElNull = false;\n }\n\n //insert a new 0px height element before specified target that can be used to determine when page is scrolled\n const objBackToTopTargetEl = document.createElement(\"div\");\n objBackToTopTargetEl.setAttribute(\"id\", \"ic-back-to-top-target\");\n objBackToTopTargetEl.setAttribute(\"tabindex\", \"-1\"); // Needed for virtual cursor behaviour to work\n objParent.insertBefore(objBackToTopTargetEl, this.targetEl);\n\n // resize observer needs to factor in any top margin on the target el\n const marginTop = this.targetEl\n ? getComputedStyle(this.targetEl).marginTop\n : 0;\n this.topObserver = new IntersectionObserver(this.targetElObserverCallback, {\n threshold: [0],\n rootMargin: `${marginTop} 0px 0px 0px`,\n });\n this.topObserver.observe(objBackToTopTargetEl);\n };\n\n private handleClick = () => {\n if (this.isTargetElNull) {\n window.scrollTo(0, 0);\n } else {\n this.targetEl?.scrollIntoView();\n }\n // Get virtual cursor to move\n (this.getObservedEl() as HTMLElement).focus();\n };\n\n private checkForClassificationBanner = () => {\n //adjust position for classification banner at bottom\n const banners = document.querySelectorAll(\n \"ic-classification-banner:not([inline='true'])\"\n );\n this.bannerOffset = banners.length > 0;\n };\n\n render() {\n const { variant, bannerOffset, targetElVisible, footerVisible } = this;\n const btnVariant = variant === \"icon\" ? \"icon-secondary\" : \"secondary\";\n const size = variant === \"icon\" ? \"large\" : \"medium\";\n const label = variant === \"icon\" ? \"\" : backToTopLabel;\n\n return (\n <Host\n class={{\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n [`ic-back-to-top-${this.position}`]: true,\n [`ic-back-to-top-variant-icon`]: variant === \"icon\",\n }}\n >\n <ic-button\n aria-label={backToTopLabel}\n variant={btnVariant}\n size={size}\n onClick={this.handleClick}\n class={{\n [\"offset-banner\"]: bannerOffset,\n [\"show\"]: !targetElVisible,\n [\"by-footer\"]: footerVisible,\n [\"icon-only\"]: variant === \"icon\",\n }}\n theme={this.theme}\n >\n <span class=\"ic-back-to-top-icon\" innerHTML={ArrowUpward} />\n {label}\n </ic-button>\n </Host>\n );\n }\n}\n"],"mappings":"0SAAA,MAAMA,EAAiB,yqIACvB,MAAAC,EAAeD,ECWf,MAAME,EAAiB,c,MASVC,EAAS,MAPtB,WAAAC,CAAAC,G,UAUUC,KAAAC,YAA2C,KAI1CD,KAAAE,aAAwB,MACxBF,KAAAG,cAAyB,MACzBH,KAAAI,gBAA2B,KAK5BJ,KAAAK,SAAkC,QAUlCL,KAAAM,MAAsB,UAKtBN,KAAAO,QAAgC,UAwChCP,KAAAQ,cAAgB,IACfC,SAASC,cAAc,0BAGxBV,KAAAW,mBAAsBC,IAC5BZ,KAAKI,gBAAkBQ,CAAO,EAGxBZ,KAAAa,iBAAoBD,IAC1BZ,KAAKc,+BACLd,KAAKG,qBACIY,SAAW,aAAeA,OAAOC,UAAY,EAAI,MAAQJ,CAAO,EAGnEZ,KAAAiB,yBAA4BC,IAClClB,KAAKW,mBAAmBO,EAAQ,GAAGC,eAAe,EAG5CnB,KAAAoB,uBAA0BF,IAChClB,KAAKa,iBAAiBK,EAAQ,GAAGC,eAAe,EAG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AAKM,OAEZkE,EAAA,QAAAE,IAAA,2CAAMC,MAAM,sBAAsBE,UAAWC,IAC5CP,G","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icLinkCss","IcLinkStyle0","Link","constructor","hostRef","this","inheritedAttributes","hostMutationObserver","download","monochrome","theme","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","attribute","el","getAttribute","IC_INHERITED_ARIA","includes","forceUpdate","setDownloadAttribute","value","undefined","componentWillLoad","inheritAttributes","updateTheme","setAttribute","componentDidLoad","MutationObserver","observe","attributes","disconnectedCallback","_a","disconnect","brandChangeHandler","detail","mode","setFocus","_b","shadowRoot","querySelector","focus","getBrandFromContext","IcBrandForegroundEnum","Default","Light","Dark","hasRouterSlot","routerSlot","ariaLabel","textContent","render","href","hreflang","referrerpolicy","rel","target","h","Host","key","class","name","Object","assign","hrefLang","referrerPolicy","tabindex","part","innerHTML","OpenInNew"],"sources":["src/components/ic-link/ic-link.css?tag=ic-link&encapsulation=shadow","src/components/ic-link/ic-link.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.ic-link) .link,\n:host(.ic-link) ::slotted(a) {\n color: var(--ic-link-text);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.ic-link) .link:visited,\n:host(.ic-link) ::slotted(a:visited),\n:host(.ic-link) .link:visited:hover,\n:host(.ic-link) ::slotted(a:visited:hover),\n:host(.ic-link) .link:visited:active,\n:host(.ic-link) ::slotted(a:visited:active),\n:host(.ic-link) .link:visited:focus,\n:host(.ic-link) ::slotted(a:visited:focus) {\n color: var(--ic-link-text-visited);\n}\n\n:host(.ic-link) .link:hover {\n color: var(--ic-link-text-hover);\n}\n\n:host(.ic-link) .link:active {\n color: var(--ic-link-text-pressed);\n}\n\n:host(.ic-link) .link:focus {\n color: var(--ic-link-text-focused);\n}\n\n:host(.ic-link-monochrome) .link:hover {\n color: var(--ic-link-text-hover-monochrome);\n}\n\n:host(.ic-link-monochrome) .link:active {\n color: var(--ic-link-text-pressed-monochrome);\n}\n\n:host(.ic-link-monochrome) .link:focus {\n color: var(--ic-link-text-focused-monochrome);\n}\n\n:host(.ic-link) .link:hover,\n:host(.ic-link) .link:focus,\n:host(.ic-link) ::slotted(a:hover),\n:host(.ic-link) ::slotted(a:focus) {\n outline: none;\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n@supports (text-underline-offset: 10%) {\n :host(.ic-link) .link:hover,\n :host(.ic-link) .link:focus,\n :host(.ic-link) ::slotted(a:hover),\n :host(.ic-link) ::slotted(a:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 10%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n\n:host(.ic-link) .link:active,\n:host(.ic-link) .link:focus:active,\n:host(.ic-link) .link:visited:active,\n:host(.ic-link) ::slotted(a:active),\n:host(.ic-link) ::slotted(a:focus:active),\n:host(.ic-link) ::slotted(a:visited:active) {\n text-decoration: none;\n}\n\n.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: var(--ic-link-icon-launch);\n}\n\n.link:visited > .ic-link-open-in-new-icon > svg {\n fill: var(--ic-link-icon-launch-visited);\n}\n\n:host(.ic-link-monochrome) .link,\n:host(.ic-link-monochrome) ::slotted(a) {\n color: var(--ic-link-text-monochrome);\n}\n\n:host(.ic-link-monochrome) .link:visited,\n:host(.ic-link-monochrome) ::slotted(a:visited),\n:host(.ic-link-monochrome) .link:visited:hover,\n:host(.ic-link-monochrome) ::slotted(a:visited:hover),\n:host(.ic-link-monochrome) .link:visited:active,\n:host(.ic-link-monochrome) ::slotted(a:visited:active),\n:host(.ic-link-monochrome) .link:visited:focus,\n:host(.ic-link-monochrome) ::slotted(a:visited:focus) {\n color: var(--ic-link-text-visited-monochrome);\n}\n\n:host(.ic-link-monochrome) .link > .ic-link-open-in-new-icon > svg {\n fill: var(--ic-link-icon-launch-monochrome);\n}\n\n:host(.ic-link-monochrome) .link:visited > .ic-link-open-in-new-icon > svg {\n fill: var(--ic-link-icon-launch-visited-monochrome);\n}\n\n:host(.breadcrumb-link) .link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .link:visited {\n color: var(--ic-color-text-primary);\n}\n\n/* Footer link */\n\n:host(.footer-link) ::slotted(a) {\n color: var(--ic-footer-link) !important;\n}\n\n:host(.footer-link) .ic-link-open-in-new-icon > svg {\n fill: var(--ic-footer-icon) !important;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n :host(.ic-link) .ic-link-open-in-new-icon > svg {\n fill: currentcolor !important;\n }\n}\n","import {\n Component,\n Element,\n Prop,\n h,\n Host,\n Listen,\n Method,\n forceUpdate,\n} from \"@stencil/core\";\n\nimport OpenInNew from \"../../assets/OpenInNew.svg\";\nimport { getBrandFromContext, inheritAttributes } from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n} from \"../../utils/types\";\n\n/**\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n\n@Component({\n tag: \"ic-link\",\n styleUrl: \"ic-link.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Link {\n private inheritedAttributes: { [k: string]: string } = {};\n private routerSlot: HTMLElement | null;\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcLinkElement;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it. If the value is a string, it will be used as the filename for the download.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the link will display as black in the light theme, and white in the dark theme.\n */\n @Prop({ mutable: true }) monochrome?: boolean = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * 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({ mutable: true }) theme?: IcThemeMode = \"inherit\";\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, IC_INHERITED_ARIA);\n this.updateTheme();\n this.el.setAttribute(\"exportparts\", \"link\");\n }\n\n componentDidLoad(): void {\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail }: CustomEvent<IcBrand>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the link.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.el.shadowRoot?.querySelector(\"a\")?.focus();\n }\n\n private updateTheme(mode: IcBrandForeground | null = null): void {\n const theme = getBrandFromContext(this.el, mode);\n\n if (theme !== IcBrandForegroundEnum.Default) {\n this.monochrome = true;\n this.theme =\n theme === IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n }\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute && IC_INHERITED_ARIA.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setDownloadAttribute = (\n value: string | boolean | undefined\n ): string | undefined => {\n if (typeof value === \"boolean\") {\n return value ? \"\" : undefined;\n } else {\n return value === \"true\" ? \"\" : value === \"false\" ? undefined : value;\n }\n };\n\n render() {\n const {\n download,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n monochrome,\n theme,\n } = this;\n\n return (\n <Host\n class={{\n [\"ic-link\"]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-link-monochrome\"]: !!monochrome,\n }}\n >\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <a\n class={{\n [\"link\"]: !!href,\n }}\n download={this.setDownloadAttribute(download)}\n href={href}\n hrefLang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n target={target}\n tabindex={href ? \"0\" : \"-1\"}\n {...this.inheritedAttributes}\n part=\"link\"\n >\n <slot />\n {target === \"_blank\" && (\n <span class=\"ic-link-open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"0LAAA,MAAMA,EAAY,y/LAClB,MAAAC,EAAeD,E,MC+BFE,EAAI,MAPjB,WAAAC,CAAAC,G,UAQUC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