@ukic/web-components 2.1.0-beta.3 → 2.1.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (329) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/{helpers-8bc3b6d2.js → helpers-81484ceb.js} +2 -2
  4. package/dist/cjs/helpers-81484ceb.js.map +1 -0
  5. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +17 -4
  14. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +9 -4
  36. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-radio-option.cjs.entry.js +2 -2
  52. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-search-bar.cjs.entry.js +15 -18
  54. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-select.cjs.entry.js +2 -2
  57. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-status-tag.cjs.entry.js +4 -3
  61. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-text-field.cjs.entry.js +2 -2
  68. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-top-navigation.cjs.entry.js +3 -3
  71. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  73. package/dist/cjs/loader.cjs.js +1 -1
  74. package/dist/collection/components/ic-card/ic-card.css +58 -14
  75. package/dist/collection/components/ic-card/ic-card.js +62 -6
  76. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  77. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +1 -1
  78. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  79. package/dist/collection/components/ic-menu/ic-menu.js +8 -3
  80. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  81. package/dist/collection/components/ic-radio-option/ic-radio-option.css +7 -8
  82. package/dist/collection/components/ic-search-bar/ic-search-bar.js +16 -21
  83. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  84. package/dist/collection/components/ic-select/ic-select.css +4 -0
  85. package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
  86. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  87. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js +1 -1
  88. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js.map +1 -1
  89. package/dist/collection/components/ic-text-field/ic-text-field.css +1 -0
  90. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +7 -2
  91. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +1 -1
  92. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  93. package/dist/collection/normalize.css +440 -0
  94. package/dist/collection/utils/helpers.js +1 -1
  95. package/dist/collection/utils/helpers.js.map +1 -1
  96. package/dist/components/helpers.js +2 -2
  97. package/dist/components/helpers.js.map +1 -1
  98. package/dist/components/ic-alert.js.map +1 -1
  99. package/dist/components/ic-back-to-top.js.map +1 -1
  100. package/dist/components/ic-button2.js.map +1 -1
  101. package/dist/components/ic-card.js +39 -5
  102. package/dist/components/ic-card.js.map +1 -1
  103. package/dist/components/ic-checkbox-group.js.map +1 -1
  104. package/dist/components/ic-checkbox.js.map +1 -1
  105. package/dist/components/ic-chip.js.map +1 -1
  106. package/dist/components/ic-classification-banner.js +1 -1
  107. package/dist/components/ic-classification-banner.js.map +1 -1
  108. package/dist/components/ic-data-entity.js.map +1 -1
  109. package/dist/components/ic-data-row.js.map +1 -1
  110. package/dist/components/ic-footer-link-group.js.map +1 -1
  111. package/dist/components/ic-footer-link.js.map +1 -1
  112. package/dist/components/ic-footer.js.map +1 -1
  113. package/dist/components/ic-hero.js.map +1 -1
  114. package/dist/components/ic-input-label2.js +1 -1
  115. package/dist/components/ic-input-validation2.js +1 -1
  116. package/dist/components/ic-link2.js.map +1 -1
  117. package/dist/components/ic-loading-indicator2.js.map +1 -1
  118. package/dist/components/ic-menu2.js +8 -3
  119. package/dist/components/ic-menu2.js.map +1 -1
  120. package/dist/components/ic-navigation-button.js.map +1 -1
  121. package/dist/components/ic-navigation-group.js.map +1 -1
  122. package/dist/components/ic-navigation-item.js.map +1 -1
  123. package/dist/components/ic-navigation-menu2.js +1 -1
  124. package/dist/components/ic-page-header.js.map +1 -1
  125. package/dist/components/ic-radio-group.js.map +1 -1
  126. package/dist/components/ic-radio-option.js +1 -1
  127. package/dist/components/ic-radio-option.js.map +1 -1
  128. package/dist/components/ic-search-bar.js +16 -19
  129. package/dist/components/ic-search-bar.js.map +1 -1
  130. package/dist/components/ic-section-container2.js.map +1 -1
  131. package/dist/components/ic-select.js +2 -2
  132. package/dist/components/ic-select.js.map +1 -1
  133. package/dist/components/ic-side-navigation.js +1 -1
  134. package/dist/components/ic-skeleton.js.map +1 -1
  135. package/dist/components/ic-status-tag.js +5 -3
  136. package/dist/components/ic-status-tag.js.map +1 -1
  137. package/dist/components/ic-switch.js.map +1 -1
  138. package/dist/components/ic-tab-group.js +1 -1
  139. package/dist/components/ic-tab.js.map +1 -1
  140. package/dist/components/ic-text-field2.js +2 -2
  141. package/dist/components/ic-text-field2.js.map +1 -1
  142. package/dist/components/ic-theme.js +1 -1
  143. package/dist/components/ic-tooltip2.js.map +1 -1
  144. package/dist/components/ic-top-navigation.js +3 -3
  145. package/dist/components/ic-top-navigation.js.map +1 -1
  146. package/dist/components/ic-typography2.js.map +1 -1
  147. package/dist/core/core.css +1 -1
  148. package/dist/core/core.esm.js +1 -1
  149. package/dist/core/core.esm.js.map +1 -1
  150. package/dist/core/normalize.css +440 -0
  151. package/dist/core/{p-5831bb8e.entry.js → p-050e1e7b.entry.js} +2 -2
  152. package/dist/core/{p-5831bb8e.entry.js.map → p-050e1e7b.entry.js.map} +1 -1
  153. package/dist/core/{p-31a8595f.entry.js → p-09592918.entry.js} +2 -2
  154. package/dist/core/{p-31a8595f.entry.js.map → p-09592918.entry.js.map} +0 -0
  155. package/dist/core/{p-bf89bcd3.entry.js → p-0b00f848.entry.js} +2 -2
  156. package/dist/core/{p-bf89bcd3.entry.js.map → p-0b00f848.entry.js.map} +1 -1
  157. package/dist/core/p-16698d3e.entry.js +2 -0
  158. package/dist/core/p-16698d3e.entry.js.map +1 -0
  159. package/dist/core/p-18a9beea.entry.js +2 -0
  160. package/dist/core/p-18a9beea.entry.js.map +1 -0
  161. package/dist/core/{p-3a068a45.entry.js → p-1da1f2f3.entry.js} +2 -2
  162. package/dist/core/{p-3a068a45.entry.js.map → p-1da1f2f3.entry.js.map} +1 -1
  163. package/dist/core/p-204f6315.entry.js +2 -0
  164. package/dist/core/p-204f6315.entry.js.map +1 -0
  165. package/dist/core/{p-2f114521.entry.js → p-217fa7de.entry.js} +2 -2
  166. package/dist/core/{p-2f114521.entry.js.map → p-217fa7de.entry.js.map} +1 -1
  167. package/dist/core/{p-cc83692e.entry.js → p-23bf0b7a.entry.js} +2 -2
  168. package/dist/core/{p-cc83692e.entry.js.map → p-23bf0b7a.entry.js.map} +1 -1
  169. package/dist/core/{p-7881b94e.entry.js → p-27554319.entry.js} +2 -2
  170. package/dist/core/{p-7881b94e.entry.js.map → p-27554319.entry.js.map} +1 -1
  171. package/dist/core/{p-fbde8a26.entry.js → p-2ca96f69.entry.js} +2 -2
  172. package/dist/core/{p-fbde8a26.entry.js.map → p-2ca96f69.entry.js.map} +1 -1
  173. package/dist/core/p-3efa7f8b.entry.js +2 -0
  174. package/dist/core/p-3efa7f8b.entry.js.map +1 -0
  175. package/dist/core/{p-dd3c3e3c.entry.js → p-3f4d632c.entry.js} +2 -2
  176. package/dist/core/{p-dd3c3e3c.entry.js.map → p-3f4d632c.entry.js.map} +0 -0
  177. package/dist/core/p-3f9cdcdd.entry.js +2 -0
  178. package/dist/core/{p-c4d3c18c.entry.js.map → p-3f9cdcdd.entry.js.map} +1 -1
  179. package/dist/core/{p-c8ce6147.entry.js → p-4f1a7195.entry.js} +2 -2
  180. package/dist/core/{p-c8ce6147.entry.js.map → p-4f1a7195.entry.js.map} +0 -0
  181. package/dist/core/p-5616cfb8.entry.js +2 -0
  182. package/dist/core/p-5616cfb8.entry.js.map +1 -0
  183. package/dist/core/p-66cad84e.entry.js +2 -0
  184. package/dist/core/p-66cad84e.entry.js.map +1 -0
  185. package/dist/core/p-6be5e06b.entry.js.map +1 -1
  186. package/dist/core/p-6d0eaaeb.entry.js.map +1 -1
  187. package/dist/core/{p-5d76bbad.entry.js → p-6f442942.entry.js} +2 -2
  188. package/dist/core/{p-5d76bbad.entry.js.map → p-6f442942.entry.js.map} +0 -0
  189. package/dist/core/{p-4c72f3a9.entry.js → p-7ba184da.entry.js} +2 -2
  190. package/dist/core/{p-4c72f3a9.entry.js.map → p-7ba184da.entry.js.map} +0 -0
  191. package/dist/core/{p-2b5c9143.entry.js → p-8470c255.entry.js} +2 -2
  192. package/dist/core/{p-2b5c9143.entry.js.map → p-8470c255.entry.js.map} +0 -0
  193. package/dist/core/{p-b24145f7.entry.js → p-89a925f8.entry.js} +2 -2
  194. package/dist/core/{p-b24145f7.entry.js.map → p-89a925f8.entry.js.map} +1 -1
  195. package/dist/core/{p-ecfb2e6b.entry.js → p-930cd4cc.entry.js} +2 -2
  196. package/dist/core/{p-ecfb2e6b.entry.js.map → p-930cd4cc.entry.js.map} +1 -1
  197. package/dist/core/{p-0118400b.entry.js → p-9b4022d7.entry.js} +2 -2
  198. package/dist/core/p-9b4022d7.entry.js.map +1 -0
  199. package/dist/core/{p-5e261268.entry.js → p-9fbceeb2.entry.js} +2 -2
  200. package/dist/core/{p-5e261268.entry.js.map → p-9fbceeb2.entry.js.map} +0 -0
  201. package/dist/core/p-a2d3e955.entry.js.map +1 -1
  202. package/dist/core/{p-9cd04875.entry.js → p-a5948fc3.entry.js} +2 -2
  203. package/dist/core/{p-9cd04875.entry.js.map → p-a5948fc3.entry.js.map} +1 -1
  204. package/dist/core/{p-23831891.js → p-a8ac8f72.js} +2 -2
  205. package/dist/core/p-a8ac8f72.js.map +1 -0
  206. package/dist/core/{p-6b34d98f.entry.js → p-ae02b008.entry.js} +2 -2
  207. package/dist/core/{p-6b34d98f.entry.js.map → p-ae02b008.entry.js.map} +1 -1
  208. package/dist/core/p-bb106092.entry.js +2 -0
  209. package/dist/core/p-bb106092.entry.js.map +1 -0
  210. package/dist/core/{p-6fba90ee.entry.js → p-bbe00cb1.entry.js} +2 -2
  211. package/dist/core/{p-6fba90ee.entry.js.map → p-bbe00cb1.entry.js.map} +1 -1
  212. package/dist/core/{p-b3dec76d.entry.js → p-c1d78a64.entry.js} +2 -2
  213. package/dist/core/{p-b3dec76d.entry.js.map → p-c1d78a64.entry.js.map} +1 -1
  214. package/dist/core/{p-0b125f26.entry.js → p-c320fa70.entry.js} +2 -2
  215. package/dist/core/{p-0b125f26.entry.js.map → p-c320fa70.entry.js.map} +0 -0
  216. package/dist/core/p-cadb531f.entry.js.map +1 -1
  217. package/dist/core/p-d599cf4f.entry.js +2 -0
  218. package/dist/core/p-d599cf4f.entry.js.map +1 -0
  219. package/dist/core/{p-6f6bd657.entry.js → p-e192e25d.entry.js} +2 -2
  220. package/dist/core/{p-6f6bd657.entry.js.map → p-e192e25d.entry.js.map} +1 -1
  221. package/dist/core/{p-7f04e382.entry.js → p-e810f48c.entry.js} +2 -2
  222. package/dist/core/{p-7f04e382.entry.js.map → p-e810f48c.entry.js.map} +1 -1
  223. package/dist/core/p-e93e9aa3.entry.js.map +1 -1
  224. package/dist/core/{p-c85689e3.entry.js → p-eaea567e.entry.js} +2 -2
  225. package/dist/core/{p-c85689e3.entry.js.map → p-eaea567e.entry.js.map} +1 -1
  226. package/dist/core/{p-10da19d2.entry.js → p-f760198e.entry.js} +2 -2
  227. package/dist/core/{p-10da19d2.entry.js.map → p-f760198e.entry.js.map} +0 -0
  228. package/dist/core/{p-66f3f02b.entry.js → p-fd0c6039.entry.js} +2 -2
  229. package/dist/core/{p-66f3f02b.entry.js.map → p-fd0c6039.entry.js.map} +1 -1
  230. package/dist/esm/core.js +1 -1
  231. package/dist/esm/{helpers-3d41833c.js → helpers-46e5291b.js} +3 -3
  232. package/dist/esm/helpers-46e5291b.js.map +1 -0
  233. package/dist/esm/ic-alert.entry.js +1 -1
  234. package/dist/esm/ic-alert.entry.js.map +1 -1
  235. package/dist/esm/ic-back-to-top.entry.js +1 -1
  236. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  237. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  238. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  239. package/dist/esm/ic-button_3.entry.js +1 -1
  240. package/dist/esm/ic-button_3.entry.js.map +1 -1
  241. package/dist/esm/ic-card.entry.js +17 -4
  242. package/dist/esm/ic-card.entry.js.map +1 -1
  243. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  244. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  245. package/dist/esm/ic-checkbox.entry.js +1 -1
  246. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  247. package/dist/esm/ic-chip.entry.js +1 -1
  248. package/dist/esm/ic-chip.entry.js.map +1 -1
  249. package/dist/esm/ic-classification-banner.entry.js +1 -1
  250. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  251. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  252. package/dist/esm/ic-data-row.entry.js +1 -1
  253. package/dist/esm/ic-data-row.entry.js.map +1 -1
  254. package/dist/esm/ic-divider.entry.js +1 -1
  255. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  256. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  257. package/dist/esm/ic-footer-link.entry.js +1 -1
  258. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  259. package/dist/esm/ic-footer.entry.js +1 -1
  260. package/dist/esm/ic-footer.entry.js.map +1 -1
  261. package/dist/esm/ic-hero.entry.js +1 -1
  262. package/dist/esm/ic-hero.entry.js.map +1 -1
  263. package/dist/esm/ic-input-component-container_3.entry.js +9 -4
  264. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  265. package/dist/esm/ic-input-label_2.entry.js +1 -1
  266. package/dist/esm/ic-link.entry.js +1 -1
  267. package/dist/esm/ic-link.entry.js.map +1 -1
  268. package/dist/esm/ic-navigation-button.entry.js +1 -1
  269. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  270. package/dist/esm/ic-navigation-group.entry.js +1 -1
  271. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  272. package/dist/esm/ic-navigation-item.entry.js +1 -1
  273. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  274. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  275. package/dist/esm/ic-page-header.entry.js +1 -1
  276. package/dist/esm/ic-page-header.entry.js.map +1 -1
  277. package/dist/esm/ic-radio-group.entry.js +1 -1
  278. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  279. package/dist/esm/ic-radio-option.entry.js +2 -2
  280. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  281. package/dist/esm/ic-search-bar.entry.js +15 -18
  282. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  283. package/dist/esm/ic-section-container.entry.js.map +1 -1
  284. package/dist/esm/ic-select.entry.js +2 -2
  285. package/dist/esm/ic-select.entry.js.map +1 -1
  286. package/dist/esm/ic-side-navigation.entry.js +1 -1
  287. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  288. package/dist/esm/ic-status-tag.entry.js +4 -3
  289. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  290. package/dist/esm/ic-stepper.entry.js +1 -1
  291. package/dist/esm/ic-switch.entry.js +1 -1
  292. package/dist/esm/ic-switch.entry.js.map +1 -1
  293. package/dist/esm/ic-tab-group.entry.js +1 -1
  294. package/dist/esm/ic-tab.entry.js.map +1 -1
  295. package/dist/esm/ic-text-field.entry.js +2 -2
  296. package/dist/esm/ic-text-field.entry.js.map +1 -1
  297. package/dist/esm/ic-theme.entry.js +1 -1
  298. package/dist/esm/ic-top-navigation.entry.js +3 -3
  299. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  300. package/dist/esm/ic-typography.entry.js.map +1 -1
  301. package/dist/esm/loader.js +1 -1
  302. package/dist/types/components/ic-card/ic-card.d.ts +20 -3
  303. package/dist/types/components/ic-menu/ic-menu.d.ts +1 -0
  304. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -2
  305. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
  306. package/dist/types/components.d.ts +27 -3
  307. package/hydrate/index.js +62 -36
  308. package/package.json +3 -3
  309. package/dist/cjs/helpers-8bc3b6d2.js.map +0 -1
  310. package/dist/core/p-0118400b.entry.js.map +0 -1
  311. package/dist/core/p-07cd789d.entry.js +0 -2
  312. package/dist/core/p-07cd789d.entry.js.map +0 -1
  313. package/dist/core/p-0d77bd0c.entry.js +0 -2
  314. package/dist/core/p-0d77bd0c.entry.js.map +0 -1
  315. package/dist/core/p-23831891.js.map +0 -1
  316. package/dist/core/p-60ffb73e.entry.js +0 -2
  317. package/dist/core/p-60ffb73e.entry.js.map +0 -1
  318. package/dist/core/p-6308f1f2.entry.js +0 -2
  319. package/dist/core/p-6308f1f2.entry.js.map +0 -1
  320. package/dist/core/p-69650186.entry.js +0 -2
  321. package/dist/core/p-69650186.entry.js.map +0 -1
  322. package/dist/core/p-7f632414.entry.js +0 -2
  323. package/dist/core/p-7f632414.entry.js.map +0 -1
  324. package/dist/core/p-8144e941.entry.js +0 -2
  325. package/dist/core/p-8144e941.entry.js.map +0 -1
  326. package/dist/core/p-c4d3c18c.entry.js +0 -2
  327. package/dist/core/p-fa7bc907.entry.js +0 -2
  328. package/dist/core/p-fa7bc907.entry.js.map +0 -1
  329. package/dist/esm/helpers-3d41833c.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","src/components/ic-switch/ic-switch.tsx"],"names":["icSwitchCss","inputIds","Switch","this","inputId","handleChange","checkedState","icChange","emit","checked","value","onFocus","icFocus","onBlur","icBlur","handleFormReset","initiallyChecked","[object Object]","addFormResetListener","el","onComponentRequiredPropUndefined","prop","label","propName","removeFormResetListener","small","disabled","name","showState","hideLabel","helperText","renderHiddenInput","describedBy","getInputDescribedByText","h","Host","class","htmlFor","for","readonly","aria-label","aria-checked","aria-describedby","role","type","id","onChange","aria-hidden","focusable","viewBox","xmlns","x1","y1","x2","y2","fill","cx","c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K,EAAA,OAAA,CAAME,MAAM,yBAC3BF,EAAA,QAAA,CACEzB,QAASH,EACToB,SAAUA,EAAQc,aACNlB,EAAKmB,eACHnC,EAAe,OAAS,QAAOoC,mBAC3BV,EAClBW,KAAK,SACLP,MAAM,kBACNQ,KAAK,WACLjB,KAAK,SACLkB,GAAIzC,EACJO,QAASR,KAAKQ,QACdE,OAAQV,KAAKU,OACbiC,SAAU3C,KAAKE,eAEjB6B,EAAA,OAAA,CAAME,MAAM,oBACVF,EAAA,MAAA,CACEE,MAAM,iBAAgBW,cACV,OACZC,UAAU,QACVC,QAAQ,YACRC,MAAM,8BAENhB,EAAA,OAAA,CACEE,MAAM,sBACNe,GAAG,IACHC,GAAI3B,EAAQ,IAAM,IAClB4B,GAAG,IACHC,GAAI7B,EAAQ,IAAM,OAGtBS,EAAA,MAAA,CACEE,MAAM,iBAAgBW,cACV,OACZC,UAAU,QACVC,QAAQ,YACRC,MAAM,8BAENhB,EAAA,SAAA,CACEE,MAAM,wBACNmB,KAAK,OACLC,GAAG,IACHC,GAAG,IACHC,EAAGjC,EAAQ,QAAU,YAI3BS,EAAA,OAAA,CAAMP,KAAK,oBACVC,GACCM,EAAA,gBAAA,CAAAa,cACc,OACZY,QAAQ,QACRvB,MAAM,4BAEL9B,EAAe,KAAO","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 10px;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 64px;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-architectural-200);\n border: 1px solid var(--ic-architectural-700);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 21.33px;\n height: 21.33px;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 5.33px;\n transform: translate(0, -50%);\n background-color: var(--ic-architectural-700);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 10px;\n height: 10px;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-architectural-700);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-architectural-white);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-action-default);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 12px var(--ic-action-dark-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 12px var(--ic-action-dark-bg-active);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 12px var(--ic-action-default-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 12px var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: 0 0 0 1px var(--ic-architectural-white),\n 0 0 0 3px var(--ic-action-default),\n 0 0 0 8px var(--ic-action-default-active-alpha);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-architectural-300);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-architectural-80);\n border: 1px dashed var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-status-info-background);\n border: 1px dashed #98c9f5;\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 6px;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-hc-border);\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 2px), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: true,\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n /**\n * The aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n /**\n * If `true`, the small styling will be applied to the switch.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n /**\n * If `true`, the switch will render the On/Off state text.\n */\n @Prop() showState?: boolean = false;\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked;\n };\n\n componentWillLoad(): void {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n render() {\n const {\n label,\n checkedState,\n small,\n disabled,\n name,\n showState,\n value,\n hideLabel,\n helperText,\n inputId,\n } = this;\n\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n false\n );\n\n return (\n <Host>\n <label\n class={{\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: small,\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={true}\n disabled={disabled}\n class={{\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: small,\n }}\n ></ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={describedBy}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={small ? \"2\" : \"1\"}\n x2=\"9\"\n y2={small ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={small ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n {showState && (\n <ic-typography\n aria-hidden=\"true\"\n variant=\"label\"\n class=\"ic-switch-checked-status\"\n >\n {checkedState ? \"On\" : \"Off\"}\n </ic-typography>\n )}\n </label>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","src/components/ic-switch/ic-switch.tsx"],"names":["icSwitchCss","inputIds","Switch","this","inputId","handleChange","checkedState","icChange","emit","checked","value","onFocus","icFocus","onBlur","icBlur","handleFormReset","initiallyChecked","[object Object]","addFormResetListener","el","onComponentRequiredPropUndefined","prop","label","propName","removeFormResetListener","small","disabled","name","showState","hideLabel","helperText","renderHiddenInput","describedBy","getInputDescribedByText","h","Host","class","htmlFor","for","readonly","aria-label","aria-checked","aria-describedby","role","type","id","onChange","aria-hidden","focusable","viewBox","xmlns","x1","y1","x2","y2","fill","cx","cy","r","variant"],"mappings":"mJAAA,MAAMA,EAAc,o7MCmBpB,IAAIC,EAAW,QAUFC,EAAM,kIACTC,KAAAC,QAAU,mBAAmBH,MAiE7BE,KAAAE,aAAe,KACrBF,KAAKG,cAAgBH,KAAKG,aAC1BH,KAAKI,SAASC,KAAK,CACjBC,QAASN,KAAKG,aACdI,MAAOP,KAAKO,SAIRP,KAAAQ,QAA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ACbiC,SAAU3C,KAAKE,eAEjB6B,EAAA,OAAA,CAAME,MAAM,oBACVF,EAAA,MAAA,CACEE,MAAM,iBAAgBW,cACV,OACZC,UAAU,QACVC,QAAQ,YACRC,MAAM,8BAENhB,EAAA,OAAA,CACEE,MAAM,sBACNe,GAAG,IACHC,GAAI3B,EAAQ,IAAM,IAClB4B,GAAG,IACHC,GAAI7B,EAAQ,IAAM,OAGtBS,EAAA,MAAA,CACEE,MAAM,iBAAgBW,cACV,OACZC,UAAU,QACVC,QAAQ,YACRC,MAAM,8BAENhB,EAAA,SAAA,CACEE,MAAM,wBACNmB,KAAK,OACLC,GAAG,IACHC,GAAG,IACHC,EAAGjC,EAAQ,QAAU,YAI3BS,EAAA,OAAA,CAAMP,KAAK,oBACVC,GACCM,EAAA,gBAAA,CAAAa,cACc,OACZY,QAAQ,QACRvB,MAAM,4BAEL9B,EAAe,KAAO","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 10px;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 64px;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-architectural-200);\n border: 1px solid var(--ic-architectural-700);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 21.33px;\n height: 21.33px;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 5.33px;\n transform: translate(0, -50%);\n background-color: var(--ic-architectural-700);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 10px;\n height: 10px;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-architectural-700);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-architectural-white);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-action-default);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 12px var(--ic-action-dark-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 12px var(--ic-action-dark-bg-active);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 12px var(--ic-action-default-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 12px var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: 0 0 0 1px var(--ic-architectural-white),\n 0 0 0 3px var(--ic-action-default),\n 0 0 0 8px var(--ic-action-default-active-alpha);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-architectural-300);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-architectural-80);\n border: 1px dashed var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-status-info-background);\n border: 1px dashed #98c9f5;\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 6px;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-hc-border);\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 2px), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: true,\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n /**\n * The aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n /**\n * If `true`, the small styling will be applied to the switch.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n /**\n * If `true`, the switch will render the On/Off state text.\n */\n @Prop() showState?: boolean = false;\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked;\n };\n\n componentWillLoad(): void {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n render() {\n const {\n label,\n checkedState,\n small,\n disabled,\n name,\n showState,\n value,\n hideLabel,\n helperText,\n inputId,\n } = this;\n\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n false\n );\n\n return (\n <Host>\n <label\n class={{\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: small,\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={true}\n disabled={disabled}\n class={{\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: small,\n }}\n ></ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={describedBy}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={small ? \"2\" : \"1\"}\n x2=\"9\"\n y2={small ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={small ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n {showState && (\n <ic-typography\n aria-hidden=\"true\"\n variant=\"label\"\n class=\"ic-switch-checked-status\"\n >\n {checkedState ? \"On\" : \"Off\"}\n </ic-typography>\n )}\n </label>\n </Host>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-data-entity/ic-data-entity.css?tag=ic-data-entity&encapsulation=shadow","src/components/ic-data-entity/ic-data-entity.tsx"],"names":["icDataEntityCss","DataEntity","[object Object]","heading","small","this","children","el","i","length","setAttribute","h","Host","class","id","name","variant","aria-labelledby"],"mappings":"yDAAA,MAAMA,EAAkB,owFCOXC,EAAU,iEAWI,MAEzBC,SACE,MAAMC,QAAEA,EAAOC,MAAEA,GAAUC,KAE3B,MAAMC,EAAWD,KAAKE,GAAGD,SAEzB,GAAIF,EAAO,CACT,IAAK,IAAII,EAAI,EAAGA,EAAIF,EAASG,OAAQD,IAAK,CACxCF,EAASE,GAAGE,aAAa,QAAS,SAItC,OACEC,EAACC,EAAI,CAACC,MAAO,CAAEX,CAAC,SAAUE,IACxBO,EAAA,MAAA,CAAKE,MAAM,UAAUC,GAAG,uBACtBH,EAAA,OAAA,CAAMI,KAAK,WACTJ,EAAA,gBAAA,CAAeK,QAAQ,MAAMb,KAGjCQ,EAAA,MAAA,CAAKE,MAAM,YACXF,EAAA,KAAA,CAAAM,kBAAoB,sBAAsBJ,MAAM,QAC9CF,EAAA,OAAA","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n}\n\n.rows {\n display: flex;\n flex-direction: column;\n gap: var(--ic-space-md);\n}\n\n:host(.small) .rows {\n gap: var(--ic-space-xs);\n}\n\n.divider {\n margin-top: var(--ic-space-lg);\n margin-bottom: var(--ic-space-md);\n height: 1px;\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-sm);\n margin-bottom: var(--ic-space-xs);\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, h, Prop } from \"@stencil/core\";\n\n@Component({\n tag: \"ic-data-entity\",\n styleUrl: \"ic-data-entity.css\",\n shadow: true,\n})\nexport class DataEntity {\n @Element() el: HTMLIcDataEntityElement;\n\n /**\n * The title for the data entity.\n */\n @Prop() heading: string;\n\n /**\n * If `true`, the small styling will be applied to the data heading and all child data rows.\n */\n @Prop() small: boolean = false;\n\n render() {\n const { heading, small } = this;\n\n const children = this.el.children;\n\n if (small) {\n for (let i = 0; i < children.length; i++) {\n children[i].setAttribute(\"small\", \"true\");\n }\n }\n\n return (\n <Host class={{ [\"small\"]: small }}>\n <div class=\"heading\" id=\"data-entity-heading\">\n <slot name=\"heading\">\n <ic-typography variant=\"h3\">{heading}</ic-typography>\n </slot>\n </div>\n <div class=\"divider\" />\n <ul aria-labelledby=\"data-entity-heading\" class=\"rows\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-data-entity/ic-data-entity.css?tag=ic-data-entity&encapsulation=shadow","src/components/ic-data-entity/ic-data-entity.tsx"],"names":["icDataEntityCss","DataEntity","[object Object]","heading","small","this","children","el","i","length","setAttribute","h","Host","class","id","name","variant","aria-labelledby"],"mappings":"yDAAA,MAAMA,EAAkB,owFCOXC,EAAU,iEAWI,MAEzBC,SACE,MAAMC,QAAEA,EAAOC,MAAEA,GAAUC,KAE3B,MAAMC,EAAWD,KAAKE,GAAGD,SAEzB,GAAIF,EAAO,CACT,IAAK,IAAII,EAAI,EAAGA,EAAIF,EAASG,OAAQD,IAAK,CACxCF,EAASE,GAAGE,aAAa,QAAS,SAItC,OACEC,EAACC,EAAI,CAACC,MAAO,CAAEX,CAAC,SAAUE,IACxBO,EAAA,MAAA,CAAKE,MAAM,UAAUC,GAAG,uBACtBH,EAAA,OAAA,CAAMI,KAAK,WACTJ,EAAA,gBAAA,CAAeK,QAAQ,MAAMb,KAGjCQ,EAAA,MAAA,CAAKE,MAAM,YACXF,EAAA,KAAA,CAAAM,kBAAoB,sBAAsBJ,MAAM,QAC9CF,EAAA,OAAA","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n.rows {\n display: flex;\n flex-direction: column;\n gap: var(--ic-space-md);\n}\n\n:host(.small) .rows {\n gap: var(--ic-space-xs);\n}\n\n.divider {\n margin-top: var(--ic-space-lg);\n margin-bottom: var(--ic-space-md);\n height: 1px;\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-sm);\n margin-bottom: var(--ic-space-xs);\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, h, Prop } from \"@stencil/core\";\n\n@Component({\n tag: \"ic-data-entity\",\n styleUrl: \"ic-data-entity.css\",\n shadow: true,\n})\nexport class DataEntity {\n @Element() el: HTMLIcDataEntityElement;\n\n /**\n * The title for the data entity.\n */\n @Prop() heading: string;\n\n /**\n * If `true`, the small styling will be applied to the data heading and all child data rows.\n */\n @Prop() small: boolean = false;\n\n render() {\n const { heading, small } = this;\n\n const children = this.el.children;\n\n if (small) {\n for (let i = 0; i < children.length; i++) {\n children[i].setAttribute(\"small\", \"true\");\n }\n }\n\n return (\n <Host class={{ [\"small\"]: small }}>\n <div class=\"heading\" id=\"data-entity-heading\">\n <slot name=\"heading\">\n <ic-typography variant=\"h3\">{heading}</ic-typography>\n </slot>\n </div>\n <div class=\"divider\" />\n <ul aria-labelledby=\"data-entity-heading\" class=\"rows\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,H as i,g as o}from"./p-f9370be6.js";import{D as a,g as n,s,c as l}from"./p-23831891.js";import"./p-6f57b13c.js";const r='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:relative;display:block}.data{display:flex;align-items:center}.text-cells{display:flex;flex-grow:1;min-width:0}.label{width:200px;min-width:200px;margin-right:var(--ic-space-md);color:var(--ic-color-tertiary-text)}.value{flex-grow:1}slot[name="value"]::slotted(ic-text-field[readonly][hide-label]){margin-top:calc(var(--ic-space-xs) * -1)}slot[name="value"]::slotted(ic-text-field[small][readonly][hide-label]){margin-top:calc(var(--ic-space-xxs) * -1)}slot[name="value"]::slotted(ic-text-field[readonly][hide-label][rows]){margin-top:calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs))}.end-component{width:-moz-fit-content;width:fit-content;margin-left:56px}.divider{margin-top:var(--ic-space-md);height:1px;background-color:var(--ic-architectural-300)}:host(.small) .divider{margin-top:var(--ic-space-xs)}:host(.breakpoint-medium) .label{width:160px;min-width:160px}:host(.breakpoint-xs) .text-cells{flex-direction:column}:host(.breakpoint-xs) .label{width:128px;margin-bottom:var(--ic-space-xs)}:host(.breakpoint-xs) .value{max-width:95%}:host(.breakpoint-xs) .end-component{margin-left:0}@media (forced-colors: active){.divider{background-color:canvastext}}';const d=class{constructor(t){e(this,t);this.resizeObserver=null;this.hasEndComponent=false;this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.checkLabelAbove()}));this.resizeObserver.observe(this.el)};this.label=undefined;this.value=undefined;this.small=false;this.deviceSize=a.XL;this.entitySize=undefined}checkLabelAbove(){var e;const t=(e=this.el.shadowRoot.querySelector(".data"))===null||e===void 0?void 0:e.clientWidth;if(t+46<a.S){this.entitySize="xs"}else if(t+46<a.M){this.entitySize="m"}else{this.entitySize="xl"}}labelEndComponent(){const e=this.el.shadowRoot.querySelectorAll("slot[name=end-component]");e.forEach((e=>e.setAttribute("aria-label","for "+this.label+" row")))}componentWillLoad(){this.deviceSize=n();this.hasEndComponent=s(this.el,"end-component")}componentDidLoad(){l(this.runResizeObserver);this.checkLabelAbove();if(this.hasEndComponent){this.labelEndComponent()}}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}render(){const{label:e,value:o,small:a}=this;return t(i,{class:{["small"]:a,["breakpoint-medium"]:this.entitySize==="m",["breakpoint-xs"]:this.entitySize==="xs"},role:"listitem"},t("div",{class:"data"},t("div",{class:"text-cells"},t("div",{class:"label"},t("slot",{name:"label"},t("ic-typography",{variant:this.entitySize==="xs"?"label":"subtitle-large"},e))),t("div",{class:"value"},t("slot",{name:"value"},t("ic-typography",{variant:"body"},o)))),this.hasEndComponent&&t("div",{class:"end-component"},t("div",{role:"cell"},t("slot",{name:"end-component"})))),t("div",{class:"divider"}))}get el(){return o(this)}};d.style=r;export{d as ic_data_row};
2
- //# sourceMappingURL=p-c85689e3.entry.js.map
1
+ import{r as e,h as t,H as i,g as o}from"./p-f9370be6.js";import{D as a,g as n,s,c as l}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const r='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:relative;display:block}.data{display:flex;align-items:center}.text-cells{display:flex;flex-grow:1;min-width:0}.label{width:200px;min-width:200px;margin-right:var(--ic-space-md);color:var(--ic-color-tertiary-text)}.value{flex-grow:1}slot[name="value"]::slotted(ic-text-field[readonly][hide-label]){margin-top:calc(var(--ic-space-xs) * -1)}slot[name="value"]::slotted(ic-text-field[small][readonly][hide-label]){margin-top:calc(var(--ic-space-xxs) * -1)}slot[name="value"]::slotted(ic-text-field[readonly][hide-label][rows]){margin-top:calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs))}.end-component{width:-moz-fit-content;width:fit-content;margin-left:56px}.divider{margin-top:var(--ic-space-md);height:1px;background-color:var(--ic-architectural-300)}:host(.small) .divider{margin-top:var(--ic-space-xs)}:host(.breakpoint-medium) .label{width:160px;min-width:160px}:host(.breakpoint-xs) .text-cells{flex-direction:column}:host(.breakpoint-xs) .label{width:128px;margin-bottom:var(--ic-space-xs)}:host(.breakpoint-xs) .value{max-width:95%}:host(.breakpoint-xs) .end-component{margin-left:0}@media (forced-colors: active){.divider{background-color:canvastext}}';const d=class{constructor(t){e(this,t);this.resizeObserver=null;this.hasEndComponent=false;this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.checkLabelAbove()}));this.resizeObserver.observe(this.el)};this.label=undefined;this.value=undefined;this.small=false;this.deviceSize=a.XL;this.entitySize=undefined}checkLabelAbove(){var e;const t=(e=this.el.shadowRoot.querySelector(".data"))===null||e===void 0?void 0:e.clientWidth;if(t+46<a.S){this.entitySize="xs"}else if(t+46<a.M){this.entitySize="m"}else{this.entitySize="xl"}}labelEndComponent(){const e=this.el.shadowRoot.querySelectorAll("slot[name=end-component]");e.forEach((e=>e.setAttribute("aria-label","for "+this.label+" row")))}componentWillLoad(){this.deviceSize=n();this.hasEndComponent=s(this.el,"end-component")}componentDidLoad(){l(this.runResizeObserver);this.checkLabelAbove();if(this.hasEndComponent){this.labelEndComponent()}}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}render(){const{label:e,value:o,small:a}=this;return t(i,{class:{["small"]:a,["breakpoint-medium"]:this.entitySize==="m",["breakpoint-xs"]:this.entitySize==="xs"},role:"listitem"},t("div",{class:"data"},t("div",{class:"text-cells"},t("div",{class:"label"},t("slot",{name:"label"},t("ic-typography",{variant:this.entitySize==="xs"?"label":"subtitle-large"},e))),t("div",{class:"value"},t("slot",{name:"value"},t("ic-typography",{variant:"body"},o)))),this.hasEndComponent&&t("div",{class:"end-component"},t("div",{role:"cell"},t("slot",{name:"end-component"})))),t("div",{class:"divider"}))}get el(){return o(this)}};d.style=r;export{d as ic_data_row};
2
+ //# sourceMappingURL=p-eaea567e.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-data-row/ic-data-row.css?tag=ic-data-row&encapsulation=shadow","src/components/ic-data-row/ic-data-row.tsx"],"names":["icDataRowCss","DataRow","this","resizeObserver","hasEndComponent","runResizeObserver","ResizeObserver","checkLabelAbove","observe","el","DEVICE_SIZES","XL","[object Object]","rowSize","_a","shadowRoot","querySelector","clientWidth","S","entitySize","M","component","querySelectorAll","forEach","child","setAttribute","label","deviceSize","getCurrentDeviceSize","slotHasContent","checkResizeObserver","labelEndComponent","disconnect","value","small","h","Host","class","role","name","variant"],"mappings":"qIAAA,MAAMA,EAAe,ogHCkBRC,EAAO,+BAsBVC,KAAAC,eAAiC,KAEjCD,KAAAE,gBAA2B,MAE3BF,KAAAG,kBAAoB,KAC1BH,KAAKC,eAAiB,IAAIG,gBAAe,KACvCJ,KAAKK,qBAGPL,KAAKC,eAAeK,QAAQN,KAAKO,0DAfV,sBAEKC,EAAaC,6BAgBnCC,wBACN,MAAMC,GAAUC,EAAAZ,KAAKO,GAAGM,WAAWC,cAAc,YAAQ,MAAAF,SAAA,OAAA,EAAAA,EAAEG,YAC3D,GAAIJ,EAAU,GAAKH,EAAaQ,EAAG,CACjChB,KAAKiB,WAAa,UACb,GAAIN,EAAU,GAAKH,EAAaU,EAAG,CACxClB,KAAKiB,WAAa,QACb,CACLjB,KAAKiB,WAAa,MAIdP,oBACN,MAAMS,EAAYnB,KAAKO,GAAGM,WAAWO,iBACnC,4BAGFD,EAAUE,SAASC,GACjBA,EAAMC,aAAa,aAAc,OAASvB,KAAKwB,MAAQ,UAI3Dd,oBACEV,KAAKyB,WAAaC,IAClB1B,KAAKE,gBAAkByB,EAAe3B,KAAKO,GAAI,iBAGjDG,mBACEkB,EAAoB5B,KAAKG,mBACzBH,KAAKK,kBACL,GAAIL,KAAKE,gBAAiB,CACxBF,KAAK6B,qBAITnB,uBACE,GAAIV,KAAKC,iBAAmB,KAAM,CAChCD,KAAKC,eAAe6B,cAIxBpB,SACE,MAAMc,MAAEA,EAAKO,MAAEA,EAAKC,MAAEA,GAAUhC,KAEhC,OACEiC,EAACC,EAAI,CACHC,MAAO,CACLzB,CAAC,SAAUsB,EACXtB,CAAC,qBAAsBV,KAAKiB,aAAe,IAC3CP,CAAC,iBAAkBV,KAAKiB,aAAe,MAEzCmB,KAAK,YAELH,EAAA,MAAA,CAAKE,MAAM,QACTF,EAAA,MAAA,CAAKE,MAAM,cACTF,EAAA,MAAA,CAAKE,MAAM,SACTF,EAAA,OAAA,CAAMI,KAAK,SACTJ,EAAA,gBAAA,CACEK,QACEtC,KAAKiB,aAAe,KAAO,QAAU,kBAGtCO,KAIPS,EAAA,MAAA,CAAKE,MAAM,SACTF,EAAA,OAAA,CAAMI,KAAK,SACTJ,EAAA,gBAAA,CAAeK,QAAQ,QAAQP,MAIpC/B,KAAKE,iBACJ+B,EAAA,MAAA,CAAKE,MAAM,iBACTF,EAAA,MAAA,CAAKG,KAAK,QACRH,EAAA,OAAA,CAAMI,KAAK,qBAKnBJ,EAAA,MAAA,CAAKE,MAAM","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n position: relative;\n display: block;\n}\n\n.data {\n display: flex;\n align-items: center;\n}\n\n.text-cells {\n display: flex;\n flex-grow: 1;\n min-width: 0;\n}\n\n.label {\n width: 200px;\n min-width: 200px;\n margin-right: var(--ic-space-md);\n color: var(--ic-color-tertiary-text);\n}\n\n.value {\n flex-grow: 1;\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xxs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]) {\n margin-top: calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs));\n}\n\n.end-component {\n width: fit-content;\n margin-left: 56px;\n}\n\n.divider {\n margin-top: var(--ic-space-md);\n height: 1px;\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-xs);\n}\n\n:host(.breakpoint-medium) .label {\n width: 160px;\n min-width: 160px;\n}\n\n:host(.breakpoint-xs) .text-cells {\n flex-direction: column;\n}\n\n:host(.breakpoint-xs) .label {\n width: 128px;\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.breakpoint-xs) .value {\n max-width: 95%;\n}\n\n:host(.breakpoint-xs) .end-component {\n margin-left: 0;\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n slotHasContent,\n} from \"../../utils/helpers\";\n\n/**\n * @slot label - Content will be rendered in the leftmost cell.\n * @slot value - Content will be rendered to the right of the label.\n * @slot end-component - Content will be displayed in the rightmost cell.\n */\n@Component({\n tag: \"ic-data-row\",\n styleUrl: \"ic-data-row.css\",\n shadow: true,\n})\nexport class DataRow {\n @Element() el: HTMLIcDataRowElement;\n\n /**\n * The label in the leftmost cell of the row.\n */\n @Prop() label: string;\n\n /**\n * The value of the middle (right if no end-component supplied) cell of the row.\n */\n @Prop() value: string;\n\n /**\n * If `true`, the small styling will be applied to the row. This is automatically applied if small is set on the parent data heading.\n */\n @Prop() small: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() entitySize: \"xl\" | \"m\" | \"xs\";\n\n private resizeObserver: ResizeObserver = null;\n\n private hasEndComponent: boolean = false;\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkLabelAbove();\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n private checkLabelAbove() {\n const rowSize = this.el.shadowRoot.querySelector(\".data\")?.clientWidth;\n if (rowSize + 46 < DEVICE_SIZES.S) {\n this.entitySize = \"xs\";\n } else if (rowSize + 46 < DEVICE_SIZES.M) {\n this.entitySize = \"m\";\n } else {\n this.entitySize = \"xl\";\n }\n }\n\n private labelEndComponent(): void {\n const component = this.el.shadowRoot.querySelectorAll(\n \"slot[name=end-component]\"\n );\n\n component.forEach((child: HTMLElement) =>\n child.setAttribute(\"aria-label\", \"for \" + this.label + \" row\")\n );\n }\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n this.hasEndComponent = slotHasContent(this.el, \"end-component\");\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n this.checkLabelAbove();\n if (this.hasEndComponent) {\n this.labelEndComponent();\n }\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const { label, value, small } = this;\n\n return (\n <Host\n class={{\n [\"small\"]: small,\n [\"breakpoint-medium\"]: this.entitySize === \"m\",\n [\"breakpoint-xs\"]: this.entitySize === \"xs\",\n }}\n role=\"listitem\"\n >\n <div class=\"data\">\n <div class=\"text-cells\">\n <div class=\"label\">\n <slot name=\"label\">\n <ic-typography\n variant={\n this.entitySize === \"xs\" ? \"label\" : \"subtitle-large\"\n }\n >\n {label}\n </ic-typography>\n </slot>\n </div>\n <div class=\"value\">\n <slot name=\"value\">\n <ic-typography variant=\"body\">{value}</ic-typography>\n </slot>\n </div>\n </div>\n {this.hasEndComponent && (\n <div class=\"end-component\">\n <div role=\"cell\">\n <slot name=\"end-component\"></slot>\n </div>\n </div>\n )}\n </div>\n <div class=\"divider\" />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-data-row/ic-data-row.css?tag=ic-data-row&encapsulation=shadow","src/components/ic-data-row/ic-data-row.tsx"],"names":["icDataRowCss","DataRow","this","resizeObserver","hasEndComponent","runResizeObserver","ResizeObserver","checkLabelAbove","observe","el","DEVICE_SIZES","XL","[object Object]","rowSize","_a","shadowRoot","querySelector","clientWidth","S","entitySize","M","component","querySelectorAll","forEach","child","setAttribute","label","deviceSize","getCurrentDeviceSize","slotHasContent","checkResizeObserver","labelEndComponent","disconnect","value","small","h","Host","class","role","name","variant"],"mappings":"qIAAA,MAAMA,EAAe,ogHCkBRC,EAAO,+BAsBVC,KAAAC,eAAiC,KAEjCD,KAAAE,gBAA2B,MAE3BF,KAAAG,kBAAoB,KAC1BH,KAAKC,eAAiB,IAAIG,gBAAe,KACvCJ,KAAKK,qBAGPL,KAAKC,eAAeK,QAAQN,KAAKO,0DAfV,sBAEKC,EAAaC,6BAgBnCC,wBACN,MAAMC,GAAUC,EAAAZ,KAAKO,GAAGM,WAAWC,cAAc,YAAQ,MAAAF,SAAA,OAAA,EAAAA,EAAEG,YAC3D,GAAIJ,EAAU,GAAKH,EAAaQ,EAAG,CACjChB,KAAKiB,WAAa,UACb,GAAIN,EAAU,GAAKH,EAAaU,EAAG,CACxClB,KAAKiB,WAAa,QACb,CACLjB,KAAKiB,WAAa,MAIdP,oBACN,MAAMS,EAAYnB,KAAKO,GAAGM,WAAWO,iBACnC,4BAGFD,EAAUE,SAASC,GACjBA,EAAMC,aAAa,aAAc,OAASvB,KAAKwB,MAAQ,UAI3Dd,oBACEV,KAAKyB,WAAaC,IAClB1B,KAAKE,gBAAkByB,EAAe3B,KAAKO,GAAI,iBAGjDG,mBACEkB,EAAoB5B,KAAKG,mBACzBH,KAAKK,kBACL,GAAIL,KAAKE,gBAAiB,CACxBF,KAAK6B,qBAITnB,uBACE,GAAIV,KAAKC,iBAAmB,KAAM,CAChCD,KAAKC,eAAe6B,cAIxBpB,SACE,MAAMc,MAAEA,EAAKO,MAAEA,EAAKC,MAAEA,GAAUhC,KAEhC,OACEiC,EAACC,EAAI,CACHC,MAAO,CACLzB,CAAC,SAAUsB,EACXtB,CAAC,qBAAsBV,KAAKiB,aAAe,IAC3CP,CAAC,iBAAkBV,KAAKiB,aAAe,MAEzCmB,KAAK,YAELH,EAAA,MAAA,CAAKE,MAAM,QACTF,EAAA,MAAA,CAAKE,MAAM,cACTF,EAAA,MAAA,CAAKE,MAAM,SACTF,EAAA,OAAA,CAAMI,KAAK,SACTJ,EAAA,gBAAA,CACEK,QACEtC,KAAKiB,aAAe,KAAO,QAAU,kBAGtCO,KAIPS,EAAA,MAAA,CAAKE,MAAM,SACTF,EAAA,OAAA,CAAMI,KAAK,SACTJ,EAAA,gBAAA,CAAeK,QAAQ,QAAQP,MAIpC/B,KAAKE,iBACJ+B,EAAA,MAAA,CAAKE,MAAM,iBACTF,EAAA,MAAA,CAAKG,KAAK,QACRH,EAAA,OAAA,CAAMI,KAAK,qBAKnBJ,EAAA,MAAA,CAAKE,MAAM","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n position: relative;\n display: block;\n}\n\n.data {\n display: flex;\n align-items: center;\n}\n\n.text-cells {\n display: flex;\n flex-grow: 1;\n min-width: 0;\n}\n\n.label {\n width: 200px;\n min-width: 200px;\n margin-right: var(--ic-space-md);\n color: var(--ic-color-tertiary-text);\n}\n\n.value {\n flex-grow: 1;\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xxs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]) {\n margin-top: calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs));\n}\n\n.end-component {\n width: fit-content;\n margin-left: 56px;\n}\n\n.divider {\n margin-top: var(--ic-space-md);\n height: 1px;\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-xs);\n}\n\n:host(.breakpoint-medium) .label {\n width: 160px;\n min-width: 160px;\n}\n\n:host(.breakpoint-xs) .text-cells {\n flex-direction: column;\n}\n\n:host(.breakpoint-xs) .label {\n width: 128px;\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.breakpoint-xs) .value {\n max-width: 95%;\n}\n\n:host(.breakpoint-xs) .end-component {\n margin-left: 0;\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n slotHasContent,\n} from \"../../utils/helpers\";\n\n/**\n * @slot label - Content will be rendered in the leftmost cell.\n * @slot value - Content will be rendered to the right of the label.\n * @slot end-component - Content will be displayed in the rightmost cell.\n */\n@Component({\n tag: \"ic-data-row\",\n styleUrl: \"ic-data-row.css\",\n shadow: true,\n})\nexport class DataRow {\n @Element() el: HTMLIcDataRowElement;\n\n /**\n * The label in the leftmost cell of the row.\n */\n @Prop() label: string;\n\n /**\n * The value of the middle (right if no end-component supplied) cell of the row.\n */\n @Prop() value: string;\n\n /**\n * If `true`, the small styling will be applied to the row. This is automatically applied if small is set on the parent data heading.\n */\n @Prop() small: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() entitySize: \"xl\" | \"m\" | \"xs\";\n\n private resizeObserver: ResizeObserver = null;\n\n private hasEndComponent: boolean = false;\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkLabelAbove();\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n private checkLabelAbove() {\n const rowSize = this.el.shadowRoot.querySelector(\".data\")?.clientWidth;\n if (rowSize + 46 < DEVICE_SIZES.S) {\n this.entitySize = \"xs\";\n } else if (rowSize + 46 < DEVICE_SIZES.M) {\n this.entitySize = \"m\";\n } else {\n this.entitySize = \"xl\";\n }\n }\n\n private labelEndComponent(): void {\n const component = this.el.shadowRoot.querySelectorAll(\n \"slot[name=end-component]\"\n );\n\n component.forEach((child: HTMLElement) =>\n child.setAttribute(\"aria-label\", \"for \" + this.label + \" row\")\n );\n }\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n this.hasEndComponent = slotHasContent(this.el, \"end-component\");\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n this.checkLabelAbove();\n if (this.hasEndComponent) {\n this.labelEndComponent();\n }\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const { label, value, small } = this;\n\n return (\n <Host\n class={{\n [\"small\"]: small,\n [\"breakpoint-medium\"]: this.entitySize === \"m\",\n [\"breakpoint-xs\"]: this.entitySize === \"xs\",\n }}\n role=\"listitem\"\n >\n <div class=\"data\">\n <div class=\"text-cells\">\n <div class=\"label\">\n <slot name=\"label\">\n <ic-typography\n variant={\n this.entitySize === \"xs\" ? \"label\" : \"subtitle-large\"\n }\n >\n {label}\n </ic-typography>\n </slot>\n </div>\n <div class=\"value\">\n <slot name=\"value\">\n <ic-typography variant=\"body\">{value}</ic-typography>\n </slot>\n </div>\n </div>\n {this.hasEndComponent && (\n <div class=\"end-component\">\n <div role=\"cell\">\n <slot name=\"end-component\"></slot>\n </div>\n </div>\n )}\n </div>\n <div class=\"divider\" />\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as s,h as i,H as t,g as e}from"./p-f9370be6.js";import{D as l,g as a,c as h}from"./p-23831891.js";import"./p-6f57b13c.js";const c=":host{display:block}:host ol{display:flex;list-style-type:none;align-items:center;flex-wrap:wrap;padding:0;margin:0}:host(.back) ol ::slotted(ic-breadcrumb){display:none}:host(.back) ol ::slotted(ic-breadcrumb.show){display:flex}:host(.collapsed) ol ::slotted(ic-breadcrumb.hide){display:none;opacity:0;visibility:hidden}:host(.collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden){display:block;opacity:0;transition:all var(--ic-easing-transition-slow)}:host(.collapsed) ol ::slotted(ic-breadcrumb.fade){opacity:1}";const o=class{constructor(i){s(this,i);this.ADD_CLASS_DELAY=50;this.setBackBreadcrumb=()=>{if(this.backBreadcrumbOnly){this.setBackBreadcrumbAttr()}};this.setBackBreadcrumbAttr=()=>{const s=this.getLastParentBreadcrumb();if(s){s.classList.add("show");s.setAttribute("show-back-icon","true")}};this.getLastParentBreadcrumb=()=>{const s=Array.from(this.el.querySelectorAll("ic-breadcrumb"));if(s.length===1){return null}this.breadcrumbs=s.filter((s=>!s.getAttribute("current")));this.breadcrumb=this.breadcrumbs[this.breadcrumbs.length-1];return this.breadcrumb};this.setDefaultBreadcrumbs=()=>{const s=Array.from(this.el.querySelectorAll("ic-breadcrumb"));s.forEach((s=>{s.setAttribute("show-back-icon","false")}))};this.setCollapsed=()=>{if(this.collapsed){const s=Array.from(this.el.querySelectorAll("ic-breadcrumb"));this.collapsedBreadcrumbs=s.splice(1,s.length-2).filter((s=>!s.classList.contains("collapsed-breadcrumb-wrapper")));this.collapsedBreadcrumbs.forEach((s=>s.classList.add("hide")));const i=s[0];if(i){i.insertAdjacentElement("afterend",this.collapsedBreadcrumbWrapper)}}};this.renderCollapsedBreadcrumb=()=>{this.collapsedBreadcrumbWrapper=document.createElement("ic-breadcrumb");this.collapsedBreadcrumbWrapper.classList.add("collapsed-breadcrumb-wrapper");const s=document.createElement("button");const i=document.createElement("span");i.id="collapsed-button-label";i.innerText="Collapsed breadcrumbs";i.className="hide";s.setAttribute("aria-labelledby","collapsed-button-label");const t=document.createElement("span");t.id="collapsed-button-described";t.innerText="Select to view collapsed breadcrumbs";t.className="hide";s.setAttribute("aria-describedby","collapsed-button-described");s.id="collapsed-ellipsis";s.innerText="...";s.classList.add("collapsed-breadcrumb");s.addEventListener("click",(()=>{this.handleHiddenCollapsedBreadcrumbs(this.collapsedBreadcrumbWrapper)}));this.collapsedBreadcrumbWrapper.append(t);this.collapsedBreadcrumbWrapper.append(i);this.collapsedBreadcrumbWrapper.append(s);return this.collapsedBreadcrumbWrapper};this.handleHiddenCollapsedBreadcrumbs=s=>{s.remove();this.collapsedBreadcrumbs.forEach((s=>{s.classList.add("visuallyhidden");s.classList.remove("hide");setTimeout((()=>{s.classList.add("fade")}),this.ADD_CLASS_DELAY);this.removeVisuallyHiddenClass(s)}));this.expandedBreadcrumbs=true};this.removeVisuallyHiddenClass=s=>{s.addEventListener("transitionend",(i=>{if(i.propertyName==="opacity"){s.classList.remove("visuallyhidden")}}))};this.setLastParentCollapsedBackBreadcrumb=()=>{const s=this.getLastParentBreadcrumb();this.setBackBreadcrumbAttr();s.classList.remove("hide")};this.revertLastParentCollapsedBreadcrumb=()=>{const s=this.getLastParentBreadcrumb();s.setAttribute("show-back-icon","false")};this.resizeObserver=null;this.resizeObserverCallback=s=>{if(s!==this.deviceSize){this.deviceSize=s;if(this.deviceSize<=l.S){this.el.setAttribute("back-breadcrumb-only","true");if(this.collapsed){this.setLastParentCollapsedBackBreadcrumb()}else{this.setBackBreadcrumb()}}else{this.el.setAttribute("back-breadcrumb-only","false");if(this.collapsed&&this.breadcrumbs&&this.breadcrumbs.length>2){this.revertLastParentCollapsedBreadcrumb();if(this.expandedBreadcrumbs){this.setDefaultBreadcrumbs()}else{this.setCollapsed()}}else{this.setDefaultBreadcrumbs()}}}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const s=a();this.resizeObserverCallback(s)}));this.resizeObserver.observe(this.el)};this.backBreadcrumbOnly=false;this.collapsed=false;this.deviceSize=l.XL;this.expandedBreadcrumbs=false}componentWillLoad(){const s=Array.from(this.el.querySelectorAll("ic-breadcrumb"));if(this.backBreadcrumbOnly){this.setBackBreadcrumb()}else{h(this.runResizeObserver)}if(this.collapsed){this.collapsedBreadcrumbWrapper=this.renderCollapsedBreadcrumb();if(s.length>2){if(a()===l.S){this.setLastParentCollapsedBackBreadcrumb()}else{this.setCollapsed()}}}}render(){return i(t,{class:{back:this.backBreadcrumbOnly,collapsed:this.collapsed}},i("nav",{"aria-label":"breadcrumbs"},i("ol",null,i("slot",null))))}get el(){return e(this)}};o.style=c;export{o as ic_breadcrumb_group};
2
- //# sourceMappingURL=p-10da19d2.entry.js.map
1
+ import{r as s,h as i,H as t,g as e}from"./p-f9370be6.js";import{D as a,g as l,c as h}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const c=":host{display:block}:host ol{display:flex;list-style-type:none;align-items:center;flex-wrap:wrap;padding:0;margin:0}:host(.back) ol ::slotted(ic-breadcrumb){display:none}:host(.back) ol ::slotted(ic-breadcrumb.show){display:flex}:host(.collapsed) ol ::slotted(ic-breadcrumb.hide){display:none;opacity:0;visibility:hidden}:host(.collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden){display:block;opacity:0;transition:all var(--ic-easing-transition-slow)}:host(.collapsed) ol ::slotted(ic-breadcrumb.fade){opacity:1}";const o=class{constructor(i){s(this,i);this.ADD_CLASS_DELAY=50;this.setBackBreadcrumb=()=>{if(this.backBreadcrumbOnly){this.setBackBreadcrumbAttr()}};this.setBackBreadcrumbAttr=()=>{const s=this.getLastParentBreadcrumb();if(s){s.classList.add("show");s.setAttribute("show-back-icon","true")}};this.getLastParentBreadcrumb=()=>{const s=Array.from(this.el.querySelectorAll("ic-breadcrumb"));if(s.length===1){return null}this.breadcrumbs=s.filter((s=>!s.getAttribute("current")));this.breadcrumb=this.breadcrumbs[this.breadcrumbs.length-1];return this.breadcrumb};this.setDefaultBreadcrumbs=()=>{const s=Array.from(this.el.querySelectorAll("ic-breadcrumb"));s.forEach((s=>{s.setAttribute("show-back-icon","false")}))};this.setCollapsed=()=>{if(this.collapsed){const s=Array.from(this.el.querySelectorAll("ic-breadcrumb"));this.collapsedBreadcrumbs=s.splice(1,s.length-2).filter((s=>!s.classList.contains("collapsed-breadcrumb-wrapper")));this.collapsedBreadcrumbs.forEach((s=>s.classList.add("hide")));const i=s[0];if(i){i.insertAdjacentElement("afterend",this.collapsedBreadcrumbWrapper)}}};this.renderCollapsedBreadcrumb=()=>{this.collapsedBreadcrumbWrapper=document.createElement("ic-breadcrumb");this.collapsedBreadcrumbWrapper.classList.add("collapsed-breadcrumb-wrapper");const s=document.createElement("button");const i=document.createElement("span");i.id="collapsed-button-label";i.innerText="Collapsed breadcrumbs";i.className="hide";s.setAttribute("aria-labelledby","collapsed-button-label");const t=document.createElement("span");t.id="collapsed-button-described";t.innerText="Select to view collapsed breadcrumbs";t.className="hide";s.setAttribute("aria-describedby","collapsed-button-described");s.id="collapsed-ellipsis";s.innerText="...";s.classList.add("collapsed-breadcrumb");s.addEventListener("click",(()=>{this.handleHiddenCollapsedBreadcrumbs(this.collapsedBreadcrumbWrapper)}));this.collapsedBreadcrumbWrapper.append(t);this.collapsedBreadcrumbWrapper.append(i);this.collapsedBreadcrumbWrapper.append(s);return this.collapsedBreadcrumbWrapper};this.handleHiddenCollapsedBreadcrumbs=s=>{s.remove();this.collapsedBreadcrumbs.forEach((s=>{s.classList.add("visuallyhidden");s.classList.remove("hide");setTimeout((()=>{s.classList.add("fade")}),this.ADD_CLASS_DELAY);this.removeVisuallyHiddenClass(s)}));this.expandedBreadcrumbs=true};this.removeVisuallyHiddenClass=s=>{s.addEventListener("transitionend",(i=>{if(i.propertyName==="opacity"){s.classList.remove("visuallyhidden")}}))};this.setLastParentCollapsedBackBreadcrumb=()=>{const s=this.getLastParentBreadcrumb();this.setBackBreadcrumbAttr();s.classList.remove("hide")};this.revertLastParentCollapsedBreadcrumb=()=>{const s=this.getLastParentBreadcrumb();s.setAttribute("show-back-icon","false")};this.resizeObserver=null;this.resizeObserverCallback=s=>{if(s!==this.deviceSize){this.deviceSize=s;if(this.deviceSize<=a.S){this.el.setAttribute("back-breadcrumb-only","true");if(this.collapsed){this.setLastParentCollapsedBackBreadcrumb()}else{this.setBackBreadcrumb()}}else{this.el.setAttribute("back-breadcrumb-only","false");if(this.collapsed&&this.breadcrumbs&&this.breadcrumbs.length>2){this.revertLastParentCollapsedBreadcrumb();if(this.expandedBreadcrumbs){this.setDefaultBreadcrumbs()}else{this.setCollapsed()}}else{this.setDefaultBreadcrumbs()}}}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const s=l();this.resizeObserverCallback(s)}));this.resizeObserver.observe(this.el)};this.backBreadcrumbOnly=false;this.collapsed=false;this.deviceSize=a.XL;this.expandedBreadcrumbs=false}componentWillLoad(){const s=Array.from(this.el.querySelectorAll("ic-breadcrumb"));if(this.backBreadcrumbOnly){this.setBackBreadcrumb()}else{h(this.runResizeObserver)}if(this.collapsed){this.collapsedBreadcrumbWrapper=this.renderCollapsedBreadcrumb();if(s.length>2){if(l()===a.S){this.setLastParentCollapsedBackBreadcrumb()}else{this.setCollapsed()}}}}render(){return i(t,{class:{back:this.backBreadcrumbOnly,collapsed:this.collapsed}},i("nav",{"aria-label":"breadcrumbs"},i("ol",null,i("slot",null))))}get el(){return e(this)}};o.style=c;export{o as ic_breadcrumb_group};
2
+ //# sourceMappingURL=p-f760198e.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as o,H as i,g as r}from"./p-f9370be6.js";import{g as n,I as a,k as s,c as l,l as c}from"./p-23831891.js";import{I as d}from"./p-6f57b13c.js";const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.footer-sparse){--footer-links-padding:24px 0;--footer-compliance-padding:24px 0 8px 0;--footer-logo-margin-bottom:var(--ic-space-lg);--footer-link-inner-flex-direction:row}:host(.footer-small){--footer-links-padding:0 0;--footer-compliance-padding:16px 0 8px;--footer-logo-margin-bottom:var(--ic-space-md);--footer-link-inner-flex-direction:column}:host(.footer-light){--footer-theme-secondary:var(--ic-theme-secondary);--footer-theme-tertiary:var(--ic-theme-tertiary);--footer-keyline:var(--ic-keyline-lighten)}:host(.footer-dark){--footer-theme-secondary:var(--ic-theme-secondary-light);--footer-theme-tertiary:var(--ic-theme-tertiary-light);--footer-keyline:var(--ic-keyline-darken)}:host(.footer-small.footer-ungrouped){--footer-links-padding:var(--ic-space-md) 0 0 0}footer{display:flex;flex-direction:column;width:100%}.footer-description{background-color:var(--footer-theme-secondary);color:var(--ic-theme-text);border-bottom:var(--footer-keyline)}.footer-description-inner{padding:16px 0}.footer-links{padding:var(--footer-links-padding);background-color:var(--footer-theme-secondary);color:var(--ic-theme-text)}.footer-links-inner{display:flex;flex-direction:var(--footer-link-inner-flex-direction)}.footer-compliance{background-color:var(--footer-theme-tertiary);color:var(--ic-theme-text)}.footer-compliance-inner{padding:var(--footer-compliance-padding)}.footer-logo{margin-bottom:var(--footer-logo-margin-bottom);display:flex;gap:var(--ic-space-xxl)}.footer-logo>::slotted(){margin-right:var(--ic-space-md)}.footer-caption{margin-bottom:var(--ic-space-md)}.classification-spacing{margin-bottom:var(--ic-space-lg)}@media (forced-colors: active){footer{border-top:var(--ic-hc-border)}}';const m=class{constructor(o){e(this,o);this.footerResized=t(this,"footerResized",7);this.resizeObserverCallback=e=>{if(e!==this.deviceSize){this.deviceSize=e}this.footerResized.emit()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const e=n();this.resizeObserverCallback(e)}));this.resizeObserver.observe(this.footerEl)};this.description=undefined;this.aligned="left";this.breakpoint="medium";this.groupLinks=false;this.caption=undefined;this.copyright=true;this.deviceSize=a.XL;this.foregroundColor=s()}isSmall(){const e=this.breakpoint;return e==="extra small"?this.deviceSize<a.XS:e==="small"?this.deviceSize<a.S:e==="medium"?this.deviceSize<a.M:e==="large"?this.deviceSize<a.L:e==="extra large"?this.deviceSize<a.XL:false}themeChangeHandler(e){const t=e.detail;this.foregroundColor=t.mode}componentWillLoad(){this.deviceSize=n()}componentDidLoad(){l(this.runResizeObserver)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){const{aligned:e,caption:t,copyright:r,description:n,groupLinks:s,foregroundColor:l}=this;const p=this.isSmall();return o(i,{class:{footer:true,[`footer-${p?"small":"sparse"}`]:true,[`footer-${s?"grouped":"ungrouped"}`]:true,[`footer-${l}`]:true,[d.Dark]:l===d.Dark,[d.Light]:l===d.Light}},o("footer",{ref:e=>this.footerEl=e},o("div",{class:"footer-description"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-description-inner"},o("ic-typography",{variant:"body"},o("slot",{name:"description"},n))))),o("div",{class:"footer-links"},s&&p?o("div",{class:"footer-links-inner"},o("slot",{name:"link"})):o("ic-section-container",{fullHeight:true,aligned:e},o("div",{class:"footer-links-inner"},o("slot",{name:"link"})))),o("div",{class:"footer-compliance"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-compliance-inner"},o("div",{class:"footer-logo"},o("slot",{name:"logo"})),o("div",{class:"footer-caption"},o("ic-typography",{variant:this.deviceSize<=a.M?"caption":"body"},o("slot",{name:"caption"},t))),r&&o("div",{class:{["footer-copyright"]:true,["classification-spacing"]:c()}},o("ic-typography",{variant:this.deviceSize<=a.M?"caption-uppercase":"label-uppercase"},"© Crown Copyright")))))))}get el(){return r(this)}};m.style=p;export{m as ic_footer};
2
- //# sourceMappingURL=p-66f3f02b.entry.js.map
1
+ import{r as e,c as t,h as o,H as i,g as r}from"./p-f9370be6.js";import{g as n,I as a,k as s,c as l,l as c}from"./p-a8ac8f72.js";import{I as d}from"./p-6f57b13c.js";const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.footer-sparse){--footer-links-padding:24px 0;--footer-compliance-padding:24px 0 8px 0;--footer-logo-margin-bottom:var(--ic-space-lg);--footer-link-inner-flex-direction:row}:host(.footer-small){--footer-links-padding:0 0;--footer-compliance-padding:16px 0 8px;--footer-logo-margin-bottom:var(--ic-space-md);--footer-link-inner-flex-direction:column}:host(.footer-light){--footer-theme-secondary:var(--ic-theme-secondary);--footer-theme-tertiary:var(--ic-theme-tertiary);--footer-keyline:var(--ic-keyline-lighten)}:host(.footer-dark){--footer-theme-secondary:var(--ic-theme-secondary-light);--footer-theme-tertiary:var(--ic-theme-tertiary-light);--footer-keyline:var(--ic-keyline-darken)}:host(.footer-small.footer-ungrouped){--footer-links-padding:var(--ic-space-md) 0 0 0}footer{display:flex;flex-direction:column;width:100%}.footer-description{background-color:var(--footer-theme-secondary);color:var(--ic-theme-text);border-bottom:var(--footer-keyline)}.footer-description-inner{padding:16px 0}.footer-links{padding:var(--footer-links-padding);background-color:var(--footer-theme-secondary);color:var(--ic-theme-text)}.footer-links-inner{display:flex;flex-direction:var(--footer-link-inner-flex-direction)}.footer-compliance{background-color:var(--footer-theme-tertiary);color:var(--ic-theme-text)}.footer-compliance-inner{padding:var(--footer-compliance-padding)}.footer-logo{margin-bottom:var(--footer-logo-margin-bottom);display:flex;gap:var(--ic-space-xxl)}.footer-logo>::slotted(){margin-right:var(--ic-space-md)}.footer-caption{margin-bottom:var(--ic-space-md)}.classification-spacing{margin-bottom:var(--ic-space-lg)}@media (forced-colors: active){footer{border-top:var(--ic-hc-border)}}';const m=class{constructor(o){e(this,o);this.footerResized=t(this,"footerResized",7);this.resizeObserverCallback=e=>{if(e!==this.deviceSize){this.deviceSize=e}this.footerResized.emit()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const e=n();this.resizeObserverCallback(e)}));this.resizeObserver.observe(this.footerEl)};this.description=undefined;this.aligned="left";this.breakpoint="medium";this.groupLinks=false;this.caption=undefined;this.copyright=true;this.deviceSize=a.XL;this.foregroundColor=s()}isSmall(){const e=this.breakpoint;return e==="extra small"?this.deviceSize<a.XS:e==="small"?this.deviceSize<a.S:e==="medium"?this.deviceSize<a.M:e==="large"?this.deviceSize<a.L:e==="extra large"?this.deviceSize<a.XL:false}themeChangeHandler(e){const t=e.detail;this.foregroundColor=t.mode}componentWillLoad(){this.deviceSize=n()}componentDidLoad(){l(this.runResizeObserver)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){const{aligned:e,caption:t,copyright:r,description:n,groupLinks:s,foregroundColor:l}=this;const p=this.isSmall();return o(i,{class:{footer:true,[`footer-${p?"small":"sparse"}`]:true,[`footer-${s?"grouped":"ungrouped"}`]:true,[`footer-${l}`]:true,[d.Dark]:l===d.Dark,[d.Light]:l===d.Light}},o("footer",{ref:e=>this.footerEl=e},o("div",{class:"footer-description"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-description-inner"},o("ic-typography",{variant:"body"},o("slot",{name:"description"},n))))),o("div",{class:"footer-links"},s&&p?o("div",{class:"footer-links-inner"},o("slot",{name:"link"})):o("ic-section-container",{fullHeight:true,aligned:e},o("div",{class:"footer-links-inner"},o("slot",{name:"link"})))),o("div",{class:"footer-compliance"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-compliance-inner"},o("div",{class:"footer-logo"},o("slot",{name:"logo"})),o("div",{class:"footer-caption"},o("ic-typography",{variant:this.deviceSize<=a.M?"caption":"body"},o("slot",{name:"caption"},t))),r&&o("div",{class:{["footer-copyright"]:true,["classification-spacing"]:c()}},o("ic-typography",{variant:this.deviceSize<=a.M?"caption-uppercase":"label-uppercase"},"© Crown Copyright")))))))}get el(){return r(this)}};m.style=p;export{m as ic_footer};
2
+ //# sourceMappingURL=p-fd0c6039.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-footer/ic-footer.css?tag=ic-footer&encapsulation=shadow","src/components/ic-footer/ic-footer.tsx"],"names":["icFooterCss","Footer","this","resizeObserverCallback","currSize","deviceSize","footerResized","emit","runResizeObserver","resizeObserver","ResizeObserver","getCurrentDeviceSize","observe","footerEl","IC_DEVICE_SIZES","XL","getThemeForegroundColor","[object Object]","bp","breakpoint","XS","S","M","L","ev","theme","detail","foregroundColor","mode","checkResizeObserver","disconnect","aligned","caption","copyright","description","groupLinks","small","isSmall","h","Host","class","footer","IcThemeForegroundEnum","Dark","Light","ref","fullHeight","variant","name","hasClassificationBanner"],"mappings":"oKAAA,MAAMA,EAAc,qiICsCPC,EAAM,4EAmETC,KAAAC,uBAA0BC,IAChC,GAAIA,IAAaF,KAAKG,WAAY,CAChCH,KAAKG,WAAaD,EAEpBF,KAAKI,cAAcC,QAGbL,KAAAM,kBAAoB,KAC1BN,KAAKO,eAAiB,IAAIC,gBAAe,KACvC,MAAMN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AAKE,MAAM,gBACRL,GAAcC,EACbE,EAAA,MAAA,CAAKE,MAAM,sBACTF,EAAA,OAAA,CAAMU,KAAK,UAGbV,EAAA,uBAAA,CAAsBQ,WAAU,KAACf,QAASA,GACxCO,EAAA,MAAA,CAAKE,MAAM,sBACTF,EAAA,OAAA,CAAMU,KAAK,YAOnBV,EAAA,MAAA,CAAKE,MAAM,qBACTF,EAAA,uBAAA,CAAsBP,QAASA,EAASe,WAAY,MAClDR,EAAA,MAAA,CAAKE,MAAM,2BACTF,EAAA,MAAA,CAAKE,MAAM,eAETF,EAAA,OAAA,CAAMU,KAAK,UAEbV,EAAA,MAAA,CAAKE,MAAM,kBACTF,EAAA,gBAAA,CACES,QACE7C,KAAKG,YAAcS,EAAgBQ,EAAI,UAAY,QAGrDgB,EAAA,OAAA,CAAMU,KAAK,WAAWhB,KAGzBC,GACCK,EAAA,MAAA,CACEE,MAAO,CACLvB,CAAC,oBAAqB,KACtBA,CAAC,0BAA2BgC,MAG9BX,EAAA,gBAAA,CACES,QACE7C,KAAKG,YAAcS,EAAgBQ,EAC/B,oBACA,mBAAiB","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n}\n\n:host(.footer-sparse) {\n --footer-links-padding: 24px 0;\n --footer-compliance-padding: 24px 0 8px 0;\n --footer-logo-margin-bottom: var(--ic-space-lg);\n --footer-link-inner-flex-direction: row;\n}\n\n:host(.footer-small) {\n --footer-links-padding: 0 0;\n --footer-compliance-padding: 16px 0 8px;\n --footer-logo-margin-bottom: var(--ic-space-md);\n --footer-link-inner-flex-direction: column;\n}\n\n:host(.footer-light) {\n --footer-theme-secondary: var(--ic-theme-secondary);\n --footer-theme-tertiary: var(--ic-theme-tertiary);\n --footer-keyline: var(--ic-keyline-lighten);\n}\n\n:host(.footer-dark) {\n --footer-theme-secondary: var(--ic-theme-secondary-light);\n --footer-theme-tertiary: var(--ic-theme-tertiary-light);\n --footer-keyline: var(--ic-keyline-darken);\n}\n\n:host(.footer-small.footer-ungrouped) {\n --footer-links-padding: var(--ic-space-md) 0 0 0;\n}\n\n/* Main inner footer element */\nfooter {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n/* Description */\n\n.footer-description {\n background-color: var(--footer-theme-secondary);\n color: var(--ic-theme-text);\n border-bottom: var(--footer-keyline);\n}\n\n.footer-description-inner {\n padding: 16px 0;\n}\n\n/* Links */\n\n.footer-links {\n padding: var(--footer-links-padding);\n background-color: var(--footer-theme-secondary);\n color: var(--ic-theme-text);\n}\n\n.footer-links-inner {\n display: flex;\n flex-direction: var(--footer-link-inner-flex-direction);\n}\n\n/* Compliance */\n\n.footer-compliance {\n background-color: var(--footer-theme-tertiary);\n color: var(--ic-theme-text);\n}\n\n.footer-compliance-inner {\n padding: var(--footer-compliance-padding);\n}\n\n.footer-logo {\n margin-bottom: var(--footer-logo-margin-bottom);\n display: flex;\n gap: var(--ic-space-xxl);\n}\n\n.footer-logo > ::slotted() {\n margin-right: var(--ic-space-md);\n}\n\n.footer-caption {\n margin-bottom: var(--ic-space-md);\n}\n\n.classification-spacing {\n margin-bottom: var(--ic-space-lg);\n}\n\n@media (forced-colors: active) {\n footer {\n border-top: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Prop,\n State,\n h,\n Host,\n Listen,\n} from \"@stencil/core\";\nimport { IC_DEVICE_SIZES } from \"../../utils/constants\";\nimport {\n getCurrentDeviceSize,\n getThemeForegroundColor,\n checkResizeObserver,\n hasClassificationBanner,\n} from \"../../utils/helpers\";\nimport {\n IcAlignment,\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { IcFooterBreakpoints } from \"./ic-footer.types\";\n\n/**\n * @slot description - Content will be rendered at the top of the footer.\n * @slot link - Content will be rendered between description and logos.\n * @slot logo - Content will be rendered underneath footer links.\n * @slot caption - Content will be rendered above Crown Copyright.\n */\n\n@Component({\n tag: \"ic-footer\",\n styleUrl: \"ic-footer.css\",\n shadow: true,\n})\nexport class Footer {\n @Element() el: HTMLIcFooterElement;\n\n /**\n * @internal Triggers on page resize and triggers style changes in footer links and link groups\n */\n @Event() footerResized: EventEmitter<void>;\n\n /**\n * The description displayed at the top of the footer.\n */\n @Prop() description: string;\n\n /**\n * The alignment of the section containers used within the footer.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n\n /**\n * The screen size breakpoint at which to switch to the small layout.\n */\n @Prop() breakpoint?: IcFooterBreakpoints = \"medium\";\n\n /**\n * If `true`, the footer will be set up to handle link groups instead of standalone links.\n */\n @Prop() groupLinks?: boolean = false;\n\n /**\n * The caption displayed at the bottom of the footer.\n */\n @Prop() caption: string;\n\n /**\n * If `true`, the footer will display the crown copyright at the bottom.\n */\n @Prop() copyright: boolean = true;\n\n @State() deviceSize: number = IC_DEVICE_SIZES.XL;\n\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n\n private isSmall() {\n const bp = this.breakpoint;\n\n return bp === \"extra small\"\n ? this.deviceSize < IC_DEVICE_SIZES.XS\n : bp === \"small\"\n ? this.deviceSize < IC_DEVICE_SIZES.S\n : bp === \"medium\"\n ? this.deviceSize < IC_DEVICE_SIZES.M\n : bp === \"large\"\n ? this.deviceSize < IC_DEVICE_SIZES.L\n : bp === \"extra large\"\n ? this.deviceSize < IC_DEVICE_SIZES.XL\n : false;\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.foregroundColor = theme.mode;\n }\n\n private resizeObserver: ResizeObserver;\n private footerEl: HTMLElement;\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n this.footerResized.emit();\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.footerEl);\n };\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n this.resizeObserver.disconnect();\n }\n\n render() {\n const {\n aligned,\n caption,\n copyright,\n description,\n groupLinks,\n foregroundColor,\n } = this;\n const small = this.isSmall();\n\n return (\n <Host\n class={{\n footer: true,\n [`footer-${small ? \"small\" : \"sparse\"}`]: true,\n [`footer-${groupLinks ? \"grouped\" : \"ungrouped\"}`]: true,\n [`footer-${foregroundColor}`]: true,\n // Slots will be able to infer their own color\n [IcThemeForegroundEnum.Dark]:\n foregroundColor === IcThemeForegroundEnum.Dark,\n [IcThemeForegroundEnum.Light]:\n foregroundColor === IcThemeForegroundEnum.Light,\n }}\n >\n <footer ref={(footerEl) => (this.footerEl = footerEl)}>\n {/* Description */}\n <div class=\"footer-description\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-description-inner\">\n <ic-typography variant=\"body\">\n <slot name=\"description\">{description}</slot>\n </ic-typography>\n </div>\n </ic-section-container>\n </div>\n\n {/* Links */}\n <div class=\"footer-links\">\n {groupLinks && small ? (\n <div class=\"footer-links-inner\">\n <slot name=\"link\" />\n </div>\n ) : (\n <ic-section-container fullHeight aligned={aligned}>\n <div class=\"footer-links-inner\">\n <slot name=\"link\" />\n </div>\n </ic-section-container>\n )}\n </div>\n\n {/* Compliance (logo, caption, copyright) */}\n <div class=\"footer-compliance\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-compliance-inner\">\n <div class=\"footer-logo\">\n {/* Logo */}\n <slot name=\"logo\" />\n </div>\n <div class=\"footer-caption\">\n <ic-typography\n variant={\n this.deviceSize <= IC_DEVICE_SIZES.M ? \"caption\" : \"body\"\n }\n >\n <slot name=\"caption\">{caption}</slot>\n </ic-typography>\n </div>\n {copyright && (\n <div\n class={{\n [\"footer-copyright\"]: true,\n [\"classification-spacing\"]: hasClassificationBanner(),\n }}\n >\n <ic-typography\n variant={\n this.deviceSize <= IC_DEVICE_SIZES.M\n ? \"caption-uppercase\"\n : \"label-uppercase\"\n }\n >\n &copy; Crown Copyright\n </ic-typography>\n </div>\n )}\n </div>\n </ic-section-container>\n </div>\n </footer>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-footer/ic-footer.css?tag=ic-footer&encapsulation=shadow","src/components/ic-footer/ic-footer.tsx"],"names":["icFooterCss","Footer","this","resizeObserverCallback","currSize","deviceSize","footerResized","emit","runResizeObserver","resizeObserver","ResizeObserver","getCurrentDeviceSize","observe","footerEl","IC_DEVICE_SIZES","XL","getThemeForegroundColor","[object Object]","bp","breakpoint","XS","S","M","L","ev","theme","detail","foregroundColor","mode","checkResizeObserver","disconnect","aligned","caption","copyright","description","groupLinks","small","isSmall","h","Host","class","footer","IcThemeForegroundEnum","Dark","Light","ref","fullHeight","variant","name","hasClassificationBanner"],"mappings":"oKAAA,MAAMA,EAAc,qiICsCPC,EAAM,4EAmETC,KAAAC,uBAA0BC,IAChC,GAAIA,IAAaF,KAAKG,WAAY,CAChCH,KAAKG,WAAaD,EAEpBF,KAAKI,cAAcC,QAGbL,KAAAM,kBAAoB,KAC1BN,KAAKO,eAAiB,IAAIC,gBAAe,KACvC,MAAMN,EAAWO,IACjBT,KAAKC,uBAAuBC,MAG9BF,KAAKO,eAAeG,QAAQV,KAAKW,mDAhEH,uBAKW,yBAKZ,4CAUF,qBAECC,EAAgBC,wBAEAC,IAEtCC,UACN,MAAMC,EAAKhB,KAAKiB,WAEhB,OAAOD,IAAO,cACVhB,KAAKG,WAAaS,EAAgBM,GAClCF,IAAO,QACPhB,KAAKG,WAAaS,EAAgBO,EAClCH,IAAO,SACPhB,KAAKG,WAAaS,EAAgBQ,EAClCJ,IAAO,QACPhB,KAAKG,WAAaS,EAAgBS,EAClCL,IAAO,cACPhB,KAAKG,WAAaS,EAAgBC,GAClC,MAINE,mBAAmBO,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BxB,KAAKyB,gBAAkBF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Q,EAAI,UAAY,QAGrDgB,EAAA,OAAA,CAAMU,KAAK,WAAWhB,KAGzBC,GACCK,EAAA,MAAA,CACEE,MAAO,CACLvB,CAAC,oBAAqB,KACtBA,CAAC,0BAA2BgC,MAG9BX,EAAA,gBAAA,CACES,QACE7C,KAAKG,YAAcS,EAAgBQ,EAC/B,oBACA,mBAAiB","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n:host(.footer-sparse) {\n --footer-links-padding: 24px 0;\n --footer-compliance-padding: 24px 0 8px 0;\n --footer-logo-margin-bottom: var(--ic-space-lg);\n --footer-link-inner-flex-direction: row;\n}\n\n:host(.footer-small) {\n --footer-links-padding: 0 0;\n --footer-compliance-padding: 16px 0 8px;\n --footer-logo-margin-bottom: var(--ic-space-md);\n --footer-link-inner-flex-direction: column;\n}\n\n:host(.footer-light) {\n --footer-theme-secondary: var(--ic-theme-secondary);\n --footer-theme-tertiary: var(--ic-theme-tertiary);\n --footer-keyline: var(--ic-keyline-lighten);\n}\n\n:host(.footer-dark) {\n --footer-theme-secondary: var(--ic-theme-secondary-light);\n --footer-theme-tertiary: var(--ic-theme-tertiary-light);\n --footer-keyline: var(--ic-keyline-darken);\n}\n\n:host(.footer-small.footer-ungrouped) {\n --footer-links-padding: var(--ic-space-md) 0 0 0;\n}\n\n/* Main inner footer element */\nfooter {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n/* Description */\n\n.footer-description {\n background-color: var(--footer-theme-secondary);\n color: var(--ic-theme-text);\n border-bottom: var(--footer-keyline);\n}\n\n.footer-description-inner {\n padding: 16px 0;\n}\n\n/* Links */\n\n.footer-links {\n padding: var(--footer-links-padding);\n background-color: var(--footer-theme-secondary);\n color: var(--ic-theme-text);\n}\n\n.footer-links-inner {\n display: flex;\n flex-direction: var(--footer-link-inner-flex-direction);\n}\n\n/* Compliance */\n\n.footer-compliance {\n background-color: var(--footer-theme-tertiary);\n color: var(--ic-theme-text);\n}\n\n.footer-compliance-inner {\n padding: var(--footer-compliance-padding);\n}\n\n.footer-logo {\n margin-bottom: var(--footer-logo-margin-bottom);\n display: flex;\n gap: var(--ic-space-xxl);\n}\n\n.footer-logo > ::slotted() {\n margin-right: var(--ic-space-md);\n}\n\n.footer-caption {\n margin-bottom: var(--ic-space-md);\n}\n\n.classification-spacing {\n margin-bottom: var(--ic-space-lg);\n}\n\n@media (forced-colors: active) {\n footer {\n border-top: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Prop,\n State,\n h,\n Host,\n Listen,\n} from \"@stencil/core\";\nimport { IC_DEVICE_SIZES } from \"../../utils/constants\";\nimport {\n getCurrentDeviceSize,\n getThemeForegroundColor,\n checkResizeObserver,\n hasClassificationBanner,\n} from \"../../utils/helpers\";\nimport {\n IcAlignment,\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { IcFooterBreakpoints } from \"./ic-footer.types\";\n\n/**\n * @slot description - Content will be rendered at the top of the footer.\n * @slot link - Content will be rendered between description and logos.\n * @slot logo - Content will be rendered underneath footer links.\n * @slot caption - Content will be rendered above Crown Copyright.\n */\n\n@Component({\n tag: \"ic-footer\",\n styleUrl: \"ic-footer.css\",\n shadow: true,\n})\nexport class Footer {\n @Element() el: HTMLIcFooterElement;\n\n /**\n * @internal Triggers on page resize and triggers style changes in footer links and link groups\n */\n @Event() footerResized: EventEmitter<void>;\n\n /**\n * The description displayed at the top of the footer.\n */\n @Prop() description: string;\n\n /**\n * The alignment of the section containers used within the footer.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n\n /**\n * The screen size breakpoint at which to switch to the small layout.\n */\n @Prop() breakpoint?: IcFooterBreakpoints = \"medium\";\n\n /**\n * If `true`, the footer will be set up to handle link groups instead of standalone links.\n */\n @Prop() groupLinks?: boolean = false;\n\n /**\n * The caption displayed at the bottom of the footer.\n */\n @Prop() caption: string;\n\n /**\n * If `true`, the footer will display the crown copyright at the bottom.\n */\n @Prop() copyright: boolean = true;\n\n @State() deviceSize: number = IC_DEVICE_SIZES.XL;\n\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n\n private isSmall() {\n const bp = this.breakpoint;\n\n return bp === \"extra small\"\n ? this.deviceSize < IC_DEVICE_SIZES.XS\n : bp === \"small\"\n ? this.deviceSize < IC_DEVICE_SIZES.S\n : bp === \"medium\"\n ? this.deviceSize < IC_DEVICE_SIZES.M\n : bp === \"large\"\n ? this.deviceSize < IC_DEVICE_SIZES.L\n : bp === \"extra large\"\n ? this.deviceSize < IC_DEVICE_SIZES.XL\n : false;\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.foregroundColor = theme.mode;\n }\n\n private resizeObserver: ResizeObserver;\n private footerEl: HTMLElement;\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n this.footerResized.emit();\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.footerEl);\n };\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n this.resizeObserver.disconnect();\n }\n\n render() {\n const {\n aligned,\n caption,\n copyright,\n description,\n groupLinks,\n foregroundColor,\n } = this;\n const small = this.isSmall();\n\n return (\n <Host\n class={{\n footer: true,\n [`footer-${small ? \"small\" : \"sparse\"}`]: true,\n [`footer-${groupLinks ? \"grouped\" : \"ungrouped\"}`]: true,\n [`footer-${foregroundColor}`]: true,\n // Slots will be able to infer their own color\n [IcThemeForegroundEnum.Dark]:\n foregroundColor === IcThemeForegroundEnum.Dark,\n [IcThemeForegroundEnum.Light]:\n foregroundColor === IcThemeForegroundEnum.Light,\n }}\n >\n <footer ref={(footerEl) => (this.footerEl = footerEl)}>\n {/* Description */}\n <div class=\"footer-description\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-description-inner\">\n <ic-typography variant=\"body\">\n <slot name=\"description\">{description}</slot>\n </ic-typography>\n </div>\n </ic-section-container>\n </div>\n\n {/* Links */}\n <div class=\"footer-links\">\n {groupLinks && small ? (\n <div class=\"footer-links-inner\">\n <slot name=\"link\" />\n </div>\n ) : (\n <ic-section-container fullHeight aligned={aligned}>\n <div class=\"footer-links-inner\">\n <slot name=\"link\" />\n </div>\n </ic-section-container>\n )}\n </div>\n\n {/* Compliance (logo, caption, copyright) */}\n <div class=\"footer-compliance\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-compliance-inner\">\n <div class=\"footer-logo\">\n {/* Logo */}\n <slot name=\"logo\" />\n </div>\n <div class=\"footer-caption\">\n <ic-typography\n variant={\n this.deviceSize <= IC_DEVICE_SIZES.M ? \"caption\" : \"body\"\n }\n >\n <slot name=\"caption\">{caption}</slot>\n </ic-typography>\n </div>\n {copyright && (\n <div\n class={{\n [\"footer-copyright\"]: true,\n [\"classification-spacing\"]: hasClassificationBanner(),\n }}\n >\n <ic-typography\n variant={\n this.deviceSize <= IC_DEVICE_SIZES.M\n ? \"caption-uppercase\"\n : \"label-uppercase\"\n }\n >\n &copy; Crown Copyright\n </ic-typography>\n </div>\n )}\n </div>\n </ic-section-container>\n </div>\n </footer>\n </Host>\n );\n }\n}\n"]}
package/dist/esm/core.js CHANGED
@@ -13,7 +13,7 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy(JSON.parse("[[\"ic-typography\",[[1,\"ic-typography\",{\"variant\":[1],\"applyVerticalMargins\":[4,\"apply-vertical-margins\"]}]]],[\"ic-search-bar\",[[1,\"ic-search-bar\",{\"label\":[1],\"required\":[4],\"disabled\":[4],\"readonly\":[4],\"placeholder\":[1],\"fullWidth\":[4,\"full-width\"],\"disableFilter\":[4,\"disable-filter\"],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"value\":[1537],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"debounce\":[1026],\"name\":[1],\"spellcheck\":[4],\"options\":[16],\"focusOnLoad\":[4,\"focus-on-load\"],\"hintText\":[1,\"hint-text\"],\"emptyOptionListText\":[1,\"empty-option-list-text\"],\"charactersUntilSuggestion\":[2,\"characters-until-suggestion\"],\"open\":[32],\"filteredOptions\":[32],\"ariaActiveDescendant\":[32],\"showClearButton\":[32],\"clearButtonFocused\":[32],\"searchSubmitFocused\":[32],\"prevNoOption\":[32],\"highlightedValue\":[32],\"setFocus\":[64]},[[0,\"icKeydown\",\"handleKeyDown\"],[0,\"keyup\",\"handleKeyUp\"],[0,\"icMenuStateChange\",\"onMenuClose\"],[0,\"menuOptionId\",\"onMenuOptionHighlighted\"]]]]],[\"ic-select\",[[1,\"ic-select\",{\"label\":[1],\"options\":[16],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[516],\"readonly\":[4],\"placeholder\":[1],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"fullWidth\":[4,\"full-width\"],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"value\":[1025],\"name\":[1],\"showClearButton\":[4,\"show-clear-button\"],\"searchable\":[4],\"includeDescriptionsInSearch\":[4,\"include-descriptions-in-search\"],\"includeGroupTitlesInSearch\":[4,\"include-group-titles-in-search\"],\"searchMatchPosition\":[1,\"search-match-position\"],\"charactersUntilSuggestions\":[2,\"characters-until-suggestions\"],\"emptyOptionListText\":[1,\"empty-option-list-text\"],\"open\":[32],\"clearButtonFocused\":[32],\"searchableSelectInputValue\":[32],\"filteredOptions\":[32],\"ariaActiveDescendant\":[32],\"noOptions\":[32],\"initialValue\":[32],\"setFocus\":[64]}]]],[\"ic-top-navigation\",[[1,\"ic-top-navigation\",{\"appTitle\":[1,\"app-title\"],\"href\":[1],\"version\":[1],\"status\":[1],\"contentAligned\":[1,\"content-aligned\"],\"inline\":[4],\"menuOpen\":[32],\"deviceSize\":[32],\"mobileSearchBarVisible\":[32],\"navMenuVisible\":[32],\"searchValue\":[32],\"mobileSearchHiddenOnBlur\":[32],\"searchButtonClick\":[32],\"foregroundColor\":[32],\"hasFullWidthSearchBar\":[32]},[[0,\"icNavigationMenuClose\",\"navBarMenuCloseHandler\"],[0,\"icSearchBarBlur\",\"searchInputBlurHandler\"],[0,\"icChange\",\"searchValueChangeHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-side-navigation\",[[1,\"ic-side-navigation\",{\"appTitle\":[1,\"app-title\"],\"status\":[1],\"version\":[1],\"expanded\":[4],\"href\":[1],\"static\":[4],\"collapsedIconLabels\":[4,\"collapsed-icon-labels\"],\"inline\":[4],\"disableAutoParentStyling\":[4,\"disable-auto-parent-styling\"],\"foregroundColor\":[32],\"menuOpen\":[32],\"menuExpanded\":[32],\"deviceSize\":[32],\"deviceSizeAppTitle\":[32],\"hasSecondaryNavigation\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-alert\",[[1,\"ic-alert\",{\"variant\":[1],\"heading\":[1],\"message\":[1],\"titleAbove\":[4,\"title-above\"],\"dismissible\":[4],\"announced\":[4],\"visible\":[32],\"alertTitleWrap\":[32]},[[2,\"icDismiss\",\"handleClick\"]]]]],[\"ic-navigation-button\",[[1,\"ic-navigation-button\",{\"label\":[1],\"href\":[1],\"target\":[1],\"rel\":[1],\"download\":[8],\"hreflang\":[1],\"referrerpolicy\":[1],\"mode\":[32],\"initialAppearance\":[32],\"setFocus\":[64]},[[4,\"icNavigationMenuOpened\",\"navBarMenuOpenHandler\"],[4,\"icNavigationMenuClosed\",\"navBarMenuCloseHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-checkbox-group\",[[1,\"ic-checkbox-group\",{\"label\":[1],\"name\":[1],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[4],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"checkedOptions\":[32]},[[0,\"icCheck\",\"selectHandler\"]]]]],[\"ic-radio-group\",[[1,\"ic-radio-group\",{\"label\":[1],\"name\":[1],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[4],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"checkedValue\":[32],\"selectedChild\":[32]},[[0,\"icCheck\",\"selectHandler\"]]]]],[\"ic-breadcrumb-group\",[[1,\"ic-breadcrumb-group\",{\"backBreadcrumbOnly\":[4,\"back-breadcrumb-only\"],\"collapsed\":[4],\"deviceSize\":[32],\"expandedBreadcrumbs\":[32]}]]],[\"ic-chip\",[[1,\"ic-chip\",{\"label\":[1],\"appearance\":[1],\"size\":[1],\"dismissible\":[4],\"disabled\":[4],\"visible\":[32],\"isHovered\":[32]},[[2,\"dismiss\",\"handleClick\"]]]]],[\"ic-footer\",[[1,\"ic-footer\",{\"description\":[1],\"aligned\":[1],\"breakpoint\":[1],\"groupLinks\":[4,\"group-links\"],\"caption\":[1],\"copyright\":[4],\"deviceSize\":[32],\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-footer-link-group\",[[1,\"ic-footer-link-group\",{\"groupTitle\":[1,\"group-title\"],\"small\":[32],\"expanded\":[32],\"dropdownIconStyle\":[32],\"deviceSize\":[32]},[[4,\"footerResized\",\"footerResizeHandler\"],[4,\"themeChange\",\"footerThemeChangeHandler\"]]]]],[\"ic-hero\",[[1,\"ic-hero\",{\"heading\":[1],\"subheading\":[1],\"secondaryHeading\":[1,\"secondary-heading\"],\"secondarySubheading\":[1,\"secondary-subheading\"],\"backgroundImage\":[1,\"background-image\"],\"disableBackgroundParallax\":[4,\"disable-background-parallax\"],\"aligned\":[1],\"contentAligned\":[1,\"content-aligned\"],\"small\":[4],\"rightContent\":[32],\"scrollFactor\":[32],\"leftContentFullWidth\":[32],\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"],[5,\"scroll\",\"doScroll\"]]]]],[\"ic-navigation-item\",[[1,\"ic-navigation-item\",{\"label\":[1],\"href\":[1],\"selected\":[4],\"expandable\":[4],\"displayNavigationTooltip\":[4,\"display-navigation-tooltip\"],\"collapsedIconLabel\":[4,\"collapsed-icon-label\"],\"isTopNavChild\":[32],\"inTopNavSideMenu\":[32],\"deviceSize\":[32],\"focusStyle\":[32],\"navigationType\":[32],\"parentEl\":[32],\"sideNavExpanded\":[32],\"isSideNavMobile\":[32],\"setFocus\":[64]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-page-header\",[[1,\"ic-page-header\",{\"heading\":[1],\"subheading\":[1],\"aligned\":[1],\"small\":[4],\"border\":[4],\"sticky\":[4],\"stickyDesktopOnly\":[4,\"sticky-desktop-only\"],\"reverseOrder\":[4,\"reverse-order\"],\"deviceSize\":[32],\"areButtonsReversed\":[32],\"actionContent\":[32]}]]],[\"ic-step\",[[1,\"ic-step\",{\"variant\":[1],\"stepTitle\":[1,\"step-title\"],\"stepSubtitle\":[1,\"step-subtitle\"],\"stepStatus\":[1,\"step-status\"],\"stepType\":[1,\"step-type\"],\"current\":[1028],\"compactStepStyling\":[1,\"compact-step-styling\"],\"stepNum\":[2,\"step-num\"],\"lastStep\":[4,\"last-step\"],\"lastStepNum\":[2,\"last-step-num\"],\"nextStepTitle\":[1,\"next-step-title\"],\"progress\":[2]}]]],[\"ic-switch\",[[1,\"ic-switch\",{\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"checked\":[4],\"small\":[4],\"disabled\":[4],\"name\":[1],\"showState\":[4,\"show-state\"],\"value\":[1],\"checkedState\":[32],\"initiallyChecked\":[32]}]]],[\"ic-tab-group\",[[1,\"ic-tab-group\",{\"contextId\":[513,\"context-id\"],\"inline\":[516],\"label\":[1],\"appearance\":[1],\"firstTabVisible\":[32],\"lastTabVisible\":[32],\"tabOverflow\":[32],\"scrollTabIntoView\":[64]},[[0,\"tabFocus\",\"tabFocusHandler\"]]]]],[\"ic-back-to-top\",[[1,\"ic-back-to-top\",{\"target\":[1],\"bannerOffset\":[32],\"targetElVisible\":[32],\"footerVisible\":[32]}]]],[\"ic-card\",[[1,\"ic-card\",{\"clickable\":[1028],\"href\":[1],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"target\":[1],\"heading\":[1],\"message\":[1],\"disabled\":[4],\"fullWidth\":[4,\"full-width\"],\"parentIsAnchorTag\":[32],\"isFocussed\":[32],\"parentEl\":[32],\"appearance\":[32]},[[2,\"click\",\"handleHostClick\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-checkbox\",[[1,\"ic-checkbox\",{\"checked\":[1540],\"disabled\":[4],\"label\":[1],\"value\":[1],\"name\":[1],\"groupLabel\":[1,\"group-label\"],\"dynamicText\":[1,\"dynamic-text\"],\"additionalFieldDisplay\":[513,\"additional-field-display\"],\"indeterminate\":[4],\"initiallyChecked\":[32]}]]],[\"ic-classification-banner\",[[1,\"ic-classification-banner\",{\"additionalSelectors\":[1,\"additional-selectors\"],\"classification\":[1],\"country\":[1],\"inline\":[4],\"upTo\":[4,\"up-to\"]}]]],[\"ic-data-entity\",[[1,\"ic-data-entity\",{\"heading\":[1],\"small\":[4]}]]],[\"ic-data-row\",[[1,\"ic-data-row\",{\"label\":[1],\"value\":[1],\"small\":[4],\"deviceSize\":[32],\"entitySize\":[32]}]]],[\"ic-navigation-group\",[[1,\"ic-navigation-group\",{\"label\":[1],\"expandable\":[4],\"dropdownOpen\":[32],\"inTopNavSideMenu\":[32],\"deviceSize\":[32],\"focusStyle\":[32],\"navigationType\":[32],\"parentEl\":[32],\"expanded\":[32],\"setFocus\":[64]},[[0,\"childBlur\",\"childBlurHandler\"],[0,\"navItemClicked\",\"navItemClickHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-radio-option\",[[1,\"ic-radio-option\",{\"selected\":[1540],\"disabled\":[4],\"label\":[1],\"value\":[1025],\"name\":[1],\"groupLabel\":[1,\"group-label\"],\"dynamicText\":[1,\"dynamic-text\"],\"additionalFieldDisplay\":[513,\"additional-field-display\"],\"initiallySelected\":[32]},[[0,\"icChange\",\"textfieldValueHandler\"]]]]],[\"ic-status-tag\",[[1,\"ic-status-tag\",{\"label\":[1],\"status\":[1],\"appearance\":[1],\"small\":[4]}]]],[\"ic-tab\",[[1,\"ic-tab\",{\"contextId\":[513,\"context-id\"],\"disabled\":[4],\"selected\":[516],\"tabId\":[513,\"tab-id\"],\"tabPosition\":[2,\"tab-position\"],\"appearance\":[1]}]]],[\"ic-footer-link\",[[1,\"ic-footer-link\",{\"href\":[1],\"footerConfig\":[32],\"deviceSize\":[32],\"foregroundColor\":[32]},[[4,\"footerResized\",\"footerResizeHandler\"],[4,\"themeChange\",\"footerThemeChangeHandler\"]]]]],[\"ic-skeleton\",[[1,\"ic-skeleton\",{\"variant\":[1],\"light\":[4],\"hasChild\":[32],\"default\":[32],\"heightOnly\":[32],\"widthOnly\":[32]}]]],[\"ic-stepper\",[[1,\"ic-stepper\",{\"aligned\":[1],\"variant\":[1025],\"connectorWidth\":[2,\"connector-width\"],\"hideStepInfo\":[4,\"hide-step-info\"],\"stepperWidth\":[32],\"lastStepWidth\":[32],\"stepTypes\":[32],\"alignedFullWidth\":[32],\"autoSetStepTitles\":[32],\"variantOverride\":[32],\"noOfResizes\":[32]}]]],[\"ic-tab-context\",[[4,\"ic-tab-context\",{\"contextId\":[513,\"context-id\"],\"activationType\":[1,\"activation-type\"],\"selectedTabIndex\":[2,\"selected-tab-index\"],\"appearance\":[1],\"selectedTab\":[32]},[[0,\"tabClick\",\"tabClickHandler\"]]]]],[\"ic-tab-panel\",[[1,\"ic-tab-panel\",{\"contextId\":[513,\"context-id\"],\"tabPosition\":[514,\"tab-position\"],\"panelId\":[513,\"panel-id\"],\"selectedTab\":[1,\"selected-tab\"],\"appearance\":[1]}]]],[\"ic-theme\",[[1,\"ic-theme\",{\"color\":[1]}]]],[\"ic-input-component-container_3\",[[1,\"ic-menu\",{\"open\":[516],\"options\":[16],\"small\":[516],\"menuId\":[1,\"menu-id\"],\"value\":[1],\"activationType\":[1,\"activation-type\"],\"inputEl\":[16],\"parentEl\":[16],\"inputLabel\":[1,\"input-label\"],\"anchorEl\":[16],\"fullWidth\":[4,\"full-width\"],\"autoFocusOnSelected\":[4,\"auto-focus-on-selected\"],\"keyboardNav\":[32],\"optionHighlighted\":[32],\"focusFromSearchKeypress\":[32],\"initialOptionsListRender\":[32],\"preventIncorrectTabOrder\":[32],\"handleClickOpen\":[64],\"handleKeyboardOpen\":[64],\"handleSetFirstOption\":[64]},[[4,\"icClear\",\"handleClearListener\"],[4,\"icSubmitSearch\",\"handleSubmitSearch\"]]],[4,\"ic-input-component-container\",{\"disabled\":[4],\"readonly\":[4],\"validationStatus\":[1,\"validation-status\"],\"small\":[4],\"multiLine\":[4,\"multi-line\"],\"validationInline\":[4,\"validation-inline\"],\"dark\":[4],\"fullWidth\":[4,\"full-width\"]}],[4,\"ic-input-container\",{\"disabled\":[4],\"readonly\":[4]}]]],[\"ic-input-label_2\",[[4,\"ic-input-validation\",{\"message\":[1],\"for\":[1],\"status\":[1],\"fullWidth\":[4,\"full-width\"],\"ariaLiveMode\":[1,\"aria-live-mode\"]}],[0,\"ic-input-label\",{\"for\":[1],\"required\":[4],\"helperText\":[1,\"helper-text\"],\"label\":[1],\"disabled\":[4],\"readonly\":[4],\"error\":[4],\"dark\":[4]}]]],[\"ic-text-field\",[[1,\"ic-text-field\",{\"inputId\":[1,\"input-id\"],\"label\":[1],\"required\":[4],\"disabled\":[4],\"readonly\":[516],\"placeholder\":[1],\"fullWidth\":[4,\"full-width\"],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"rows\":[2],\"resize\":[4],\"small\":[516],\"value\":[1537],\"maxLength\":[2,\"max-length\"],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"validationInline\":[4,\"validation-inline\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autoFocus\":[4,\"auto-focus\"],\"debounce\":[2],\"type\":[1],\"inputmode\":[1],\"name\":[1],\"spellcheck\":[4],\"ariaActiveDescendant\":[1,\"aria-active-descendant\"],\"truncateValue\":[4,\"truncate-value\"],\"ariaExpanded\":[1,\"aria-expanded\"],\"ariaOwns\":[1,\"aria-owns\"],\"ariaAutocomplete\":[1,\"aria-autocomplete\"],\"role\":[1],\"hiddenInput\":[4,\"hidden-input\"],\"numChars\":[32],\"maxLengthExceeded\":[32],\"initialValue\":[32],\"setFocus\":[64]},[[0,\"keydown\",\"handleKeyDown\"]]]]],[\"ic-button_3\",[[1,\"ic-button\",{\"disabled\":[4],\"loading\":[4],\"type\":[1],\"href\":[1],\"target\":[1],\"rel\":[1],\"download\":[8],\"hreflang\":[1],\"referrerpolicy\":[1],\"variant\":[1],\"size\":[1],\"fullWidth\":[4,\"full-width\"],\"disableTooltip\":[4,\"disable-tooltip\"],\"tooltipPlacement\":[1,\"tooltip-placement\"],\"appearance\":[1025],\"setFocus\":[64],\"updateAriaLabel\":[64]},[[2,\"click\",\"handleHostClick\"],[4,\"themeChange\",\"themeChangeHandler\"]]],[1,\"ic-loading-indicator\",{\"progress\":[2],\"min\":[2],\"max\":[2],\"label\":[1],\"description\":[1],\"innerLabel\":[2,\"inner-label\"],\"labelDuration\":[2,\"label-duration\"],\"size\":[513],\"type\":[513],\"fullWidth\":[516,\"full-width\"],\"appearance\":[1],\"indicatorLabel\":[32],\"indeterminate\":[32],\"showSecond\":[32],\"circularLineWidth\":[32],\"compactStepCircularLineWidth\":[32],\"circularDiameter\":[32]}],[1,\"ic-tooltip\",{\"target\":[513],\"placement\":[1],\"label\":[1],\"disableHover\":[4,\"disable-hover\"]}]]],[\"ic-navigation-menu\",[[1,\"ic-navigation-menu\",{\"version\":[1],\"status\":[1]},[[0,\"navItemClicked\",\"navItemClickHandler\"],[4,\"keydown\",\"handleKeyDown\"]]]]],[\"ic-link\",[[1,\"ic-link\",{\"download\":[8],\"href\":[1],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"target\":[1],\"showIcon\":[4,\"show-icon\"],\"appearance\":[1025]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-breadcrumb\",[[1,\"ic-breadcrumb\",{\"pageTitle\":[1,\"page-title\"],\"href\":[1],\"current\":[4],\"showBackIcon\":[516,\"show-back-icon\"]}]]],[\"ic-divider\",[[2,\"ic-divider\",{\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-section-container\",[[1,\"ic-section-container\",{\"aligned\":[1],\"fullHeight\":[4,\"full-height\"]}]]]]"), options);
16
+ return bootstrapLazy(JSON.parse("[[\"ic-typography\",[[1,\"ic-typography\",{\"variant\":[1],\"applyVerticalMargins\":[4,\"apply-vertical-margins\"]}]]],[\"ic-search-bar\",[[1,\"ic-search-bar\",{\"label\":[1],\"required\":[4],\"disabled\":[4],\"readonly\":[4],\"placeholder\":[1],\"fullWidth\":[4,\"full-width\"],\"disableFilter\":[4,\"disable-filter\"],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"value\":[1537],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"debounce\":[2],\"name\":[1],\"spellcheck\":[4],\"options\":[16],\"focusOnLoad\":[4,\"focus-on-load\"],\"hintText\":[1,\"hint-text\"],\"emptyOptionListText\":[1,\"empty-option-list-text\"],\"charactersUntilSuggestion\":[2,\"characters-until-suggestion\"],\"open\":[32],\"filteredOptions\":[32],\"ariaActiveDescendant\":[32],\"showClearButton\":[32],\"clearButtonFocused\":[32],\"searchSubmitFocused\":[32],\"prevNoOption\":[32],\"highlightedValue\":[32],\"setFocus\":[64]},[[0,\"icKeydown\",\"handleKeyDown\"],[0,\"keyup\",\"handleKeyUp\"],[0,\"icMenuStateChange\",\"onMenuClose\"],[0,\"menuOptionId\",\"onMenuOptionHighlighted\"]]]]],[\"ic-select\",[[1,\"ic-select\",{\"label\":[1],\"options\":[16],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[516],\"readonly\":[4],\"placeholder\":[1],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"fullWidth\":[4,\"full-width\"],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"value\":[1025],\"name\":[1],\"showClearButton\":[4,\"show-clear-button\"],\"searchable\":[4],\"includeDescriptionsInSearch\":[4,\"include-descriptions-in-search\"],\"includeGroupTitlesInSearch\":[4,\"include-group-titles-in-search\"],\"searchMatchPosition\":[1,\"search-match-position\"],\"charactersUntilSuggestions\":[2,\"characters-until-suggestions\"],\"emptyOptionListText\":[1,\"empty-option-list-text\"],\"open\":[32],\"clearButtonFocused\":[32],\"searchableSelectInputValue\":[32],\"filteredOptions\":[32],\"ariaActiveDescendant\":[32],\"noOptions\":[32],\"initialValue\":[32],\"setFocus\":[64]}]]],[\"ic-top-navigation\",[[1,\"ic-top-navigation\",{\"appTitle\":[1,\"app-title\"],\"href\":[1],\"version\":[1],\"status\":[1],\"contentAligned\":[1,\"content-aligned\"],\"inline\":[4],\"menuOpen\":[32],\"deviceSize\":[32],\"mobileSearchBarVisible\":[32],\"navMenuVisible\":[32],\"searchValue\":[32],\"mobileSearchHiddenOnBlur\":[32],\"searchButtonClick\":[32],\"foregroundColor\":[32],\"hasFullWidthSearchBar\":[32]},[[0,\"icNavigationMenuClose\",\"navBarMenuCloseHandler\"],[0,\"icSearchBarBlur\",\"searchInputBlurHandler\"],[0,\"icChange\",\"searchValueChangeHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-side-navigation\",[[1,\"ic-side-navigation\",{\"appTitle\":[1,\"app-title\"],\"status\":[1],\"version\":[1],\"expanded\":[4],\"href\":[1],\"static\":[4],\"collapsedIconLabels\":[4,\"collapsed-icon-labels\"],\"inline\":[4],\"disableAutoParentStyling\":[4,\"disable-auto-parent-styling\"],\"foregroundColor\":[32],\"menuOpen\":[32],\"menuExpanded\":[32],\"deviceSize\":[32],\"deviceSizeAppTitle\":[32],\"hasSecondaryNavigation\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-alert\",[[1,\"ic-alert\",{\"variant\":[1],\"heading\":[1],\"message\":[1],\"titleAbove\":[4,\"title-above\"],\"dismissible\":[4],\"announced\":[4],\"visible\":[32],\"alertTitleWrap\":[32]},[[2,\"icDismiss\",\"handleClick\"]]]]],[\"ic-card\",[[1,\"ic-card\",{\"clickable\":[1028],\"href\":[1],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"target\":[1],\"heading\":[1],\"subheading\":[1],\"message\":[1],\"disabled\":[4],\"fullWidth\":[4,\"full-width\"],\"expandable\":[4],\"parentIsAnchorTag\":[32],\"isFocussed\":[32],\"parentEl\":[32],\"appearance\":[32],\"areaExpanded\":[32]},[[2,\"click\",\"handleHostClick\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-navigation-button\",[[1,\"ic-navigation-button\",{\"label\":[1],\"href\":[1],\"target\":[1],\"rel\":[1],\"download\":[8],\"hreflang\":[1],\"referrerpolicy\":[1],\"mode\":[32],\"initialAppearance\":[32],\"setFocus\":[64]},[[4,\"icNavigationMenuOpened\",\"navBarMenuOpenHandler\"],[4,\"icNavigationMenuClosed\",\"navBarMenuCloseHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-checkbox-group\",[[1,\"ic-checkbox-group\",{\"label\":[1],\"name\":[1],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[4],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"checkedOptions\":[32]},[[0,\"icCheck\",\"selectHandler\"]]]]],[\"ic-radio-group\",[[1,\"ic-radio-group\",{\"label\":[1],\"name\":[1],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[4],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"checkedValue\":[32],\"selectedChild\":[32]},[[0,\"icCheck\",\"selectHandler\"]]]]],[\"ic-breadcrumb-group\",[[1,\"ic-breadcrumb-group\",{\"backBreadcrumbOnly\":[4,\"back-breadcrumb-only\"],\"collapsed\":[4],\"deviceSize\":[32],\"expandedBreadcrumbs\":[32]}]]],[\"ic-chip\",[[1,\"ic-chip\",{\"label\":[1],\"appearance\":[1],\"size\":[1],\"dismissible\":[4],\"disabled\":[4],\"visible\":[32],\"isHovered\":[32]},[[2,\"dismiss\",\"handleClick\"]]]]],[\"ic-footer\",[[1,\"ic-footer\",{\"description\":[1],\"aligned\":[1],\"breakpoint\":[1],\"groupLinks\":[4,\"group-links\"],\"caption\":[1],\"copyright\":[4],\"deviceSize\":[32],\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-footer-link-group\",[[1,\"ic-footer-link-group\",{\"groupTitle\":[1,\"group-title\"],\"small\":[32],\"expanded\":[32],\"dropdownIconStyle\":[32],\"deviceSize\":[32]},[[4,\"footerResized\",\"footerResizeHandler\"],[4,\"themeChange\",\"footerThemeChangeHandler\"]]]]],[\"ic-hero\",[[1,\"ic-hero\",{\"heading\":[1],\"subheading\":[1],\"secondaryHeading\":[1,\"secondary-heading\"],\"secondarySubheading\":[1,\"secondary-subheading\"],\"backgroundImage\":[1,\"background-image\"],\"disableBackgroundParallax\":[4,\"disable-background-parallax\"],\"aligned\":[1],\"contentAligned\":[1,\"content-aligned\"],\"small\":[4],\"rightContent\":[32],\"scrollFactor\":[32],\"leftContentFullWidth\":[32],\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"],[5,\"scroll\",\"doScroll\"]]]]],[\"ic-navigation-item\",[[1,\"ic-navigation-item\",{\"label\":[1],\"href\":[1],\"selected\":[4],\"expandable\":[4],\"displayNavigationTooltip\":[4,\"display-navigation-tooltip\"],\"collapsedIconLabel\":[4,\"collapsed-icon-label\"],\"isTopNavChild\":[32],\"inTopNavSideMenu\":[32],\"deviceSize\":[32],\"focusStyle\":[32],\"navigationType\":[32],\"parentEl\":[32],\"sideNavExpanded\":[32],\"isSideNavMobile\":[32],\"setFocus\":[64]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-page-header\",[[1,\"ic-page-header\",{\"heading\":[1],\"subheading\":[1],\"aligned\":[1],\"small\":[4],\"border\":[4],\"sticky\":[4],\"stickyDesktopOnly\":[4,\"sticky-desktop-only\"],\"reverseOrder\":[4,\"reverse-order\"],\"deviceSize\":[32],\"areButtonsReversed\":[32],\"actionContent\":[32]}]]],[\"ic-step\",[[1,\"ic-step\",{\"variant\":[1],\"stepTitle\":[1,\"step-title\"],\"stepSubtitle\":[1,\"step-subtitle\"],\"stepStatus\":[1,\"step-status\"],\"stepType\":[1,\"step-type\"],\"current\":[1028],\"compactStepStyling\":[1,\"compact-step-styling\"],\"stepNum\":[2,\"step-num\"],\"lastStep\":[4,\"last-step\"],\"lastStepNum\":[2,\"last-step-num\"],\"nextStepTitle\":[1,\"next-step-title\"],\"progress\":[2]}]]],[\"ic-switch\",[[1,\"ic-switch\",{\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"checked\":[4],\"small\":[4],\"disabled\":[4],\"name\":[1],\"showState\":[4,\"show-state\"],\"value\":[1],\"checkedState\":[32],\"initiallyChecked\":[32]}]]],[\"ic-tab-group\",[[1,\"ic-tab-group\",{\"contextId\":[513,\"context-id\"],\"inline\":[516],\"label\":[1],\"appearance\":[1],\"firstTabVisible\":[32],\"lastTabVisible\":[32],\"tabOverflow\":[32],\"scrollTabIntoView\":[64]},[[0,\"tabFocus\",\"tabFocusHandler\"]]]]],[\"ic-back-to-top\",[[1,\"ic-back-to-top\",{\"target\":[1],\"bannerOffset\":[32],\"targetElVisible\":[32],\"footerVisible\":[32]}]]],[\"ic-checkbox\",[[1,\"ic-checkbox\",{\"checked\":[1540],\"disabled\":[4],\"label\":[1],\"value\":[1],\"name\":[1],\"groupLabel\":[1,\"group-label\"],\"dynamicText\":[1,\"dynamic-text\"],\"additionalFieldDisplay\":[513,\"additional-field-display\"],\"indeterminate\":[4],\"initiallyChecked\":[32]}]]],[\"ic-classification-banner\",[[1,\"ic-classification-banner\",{\"additionalSelectors\":[1,\"additional-selectors\"],\"classification\":[1],\"country\":[1],\"inline\":[4],\"upTo\":[4,\"up-to\"]}]]],[\"ic-data-entity\",[[1,\"ic-data-entity\",{\"heading\":[1],\"small\":[4]}]]],[\"ic-data-row\",[[1,\"ic-data-row\",{\"label\":[1],\"value\":[1],\"small\":[4],\"deviceSize\":[32],\"entitySize\":[32]}]]],[\"ic-navigation-group\",[[1,\"ic-navigation-group\",{\"label\":[1],\"expandable\":[4],\"dropdownOpen\":[32],\"inTopNavSideMenu\":[32],\"deviceSize\":[32],\"focusStyle\":[32],\"navigationType\":[32],\"parentEl\":[32],\"expanded\":[32],\"setFocus\":[64]},[[0,\"childBlur\",\"childBlurHandler\"],[0,\"navItemClicked\",\"navItemClickHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-radio-option\",[[1,\"ic-radio-option\",{\"selected\":[1540],\"disabled\":[4],\"label\":[1],\"value\":[1025],\"name\":[1],\"groupLabel\":[1,\"group-label\"],\"dynamicText\":[1,\"dynamic-text\"],\"additionalFieldDisplay\":[513,\"additional-field-display\"],\"initiallySelected\":[32]},[[0,\"icChange\",\"textfieldValueHandler\"]]]]],[\"ic-status-tag\",[[1,\"ic-status-tag\",{\"label\":[1],\"status\":[1],\"appearance\":[1],\"small\":[4],\"announced\":[4]}]]],[\"ic-tab\",[[1,\"ic-tab\",{\"contextId\":[513,\"context-id\"],\"disabled\":[4],\"selected\":[516],\"tabId\":[513,\"tab-id\"],\"tabPosition\":[2,\"tab-position\"],\"appearance\":[1]}]]],[\"ic-footer-link\",[[1,\"ic-footer-link\",{\"href\":[1],\"footerConfig\":[32],\"deviceSize\":[32],\"foregroundColor\":[32]},[[4,\"footerResized\",\"footerResizeHandler\"],[4,\"themeChange\",\"footerThemeChangeHandler\"]]]]],[\"ic-skeleton\",[[1,\"ic-skeleton\",{\"variant\":[1],\"light\":[4],\"hasChild\":[32],\"default\":[32],\"heightOnly\":[32],\"widthOnly\":[32]}]]],[\"ic-stepper\",[[1,\"ic-stepper\",{\"aligned\":[1],\"variant\":[1025],\"connectorWidth\":[2,\"connector-width\"],\"hideStepInfo\":[4,\"hide-step-info\"],\"stepperWidth\":[32],\"lastStepWidth\":[32],\"stepTypes\":[32],\"alignedFullWidth\":[32],\"autoSetStepTitles\":[32],\"variantOverride\":[32],\"noOfResizes\":[32]}]]],[\"ic-tab-context\",[[4,\"ic-tab-context\",{\"contextId\":[513,\"context-id\"],\"activationType\":[1,\"activation-type\"],\"selectedTabIndex\":[2,\"selected-tab-index\"],\"appearance\":[1],\"selectedTab\":[32]},[[0,\"tabClick\",\"tabClickHandler\"]]]]],[\"ic-tab-panel\",[[1,\"ic-tab-panel\",{\"contextId\":[513,\"context-id\"],\"tabPosition\":[514,\"tab-position\"],\"panelId\":[513,\"panel-id\"],\"selectedTab\":[1,\"selected-tab\"],\"appearance\":[1]}]]],[\"ic-theme\",[[1,\"ic-theme\",{\"color\":[1]}]]],[\"ic-input-component-container_3\",[[1,\"ic-menu\",{\"open\":[516],\"options\":[16],\"small\":[516],\"menuId\":[1,\"menu-id\"],\"value\":[1],\"activationType\":[1,\"activation-type\"],\"inputEl\":[16],\"parentEl\":[16],\"inputLabel\":[1,\"input-label\"],\"anchorEl\":[16],\"fullWidth\":[4,\"full-width\"],\"autoFocusOnSelected\":[4,\"auto-focus-on-selected\"],\"keyboardNav\":[32],\"optionHighlighted\":[32],\"focusFromSearchKeypress\":[32],\"initialOptionsListRender\":[32],\"preventIncorrectTabOrder\":[32],\"handleClickOpen\":[64],\"handleKeyboardOpen\":[64],\"handleSetFirstOption\":[64]},[[4,\"icClear\",\"handleClearListener\"],[4,\"icSubmitSearch\",\"handleSubmitSearch\"]]],[4,\"ic-input-component-container\",{\"disabled\":[4],\"readonly\":[4],\"validationStatus\":[1,\"validation-status\"],\"small\":[4],\"multiLine\":[4,\"multi-line\"],\"validationInline\":[4,\"validation-inline\"],\"dark\":[4],\"fullWidth\":[4,\"full-width\"]}],[4,\"ic-input-container\",{\"disabled\":[4],\"readonly\":[4]}]]],[\"ic-input-label_2\",[[4,\"ic-input-validation\",{\"message\":[1],\"for\":[1],\"status\":[1],\"fullWidth\":[4,\"full-width\"],\"ariaLiveMode\":[1,\"aria-live-mode\"]}],[0,\"ic-input-label\",{\"for\":[1],\"required\":[4],\"helperText\":[1,\"helper-text\"],\"label\":[1],\"disabled\":[4],\"readonly\":[4],\"error\":[4],\"dark\":[4]}]]],[\"ic-text-field\",[[1,\"ic-text-field\",{\"inputId\":[1,\"input-id\"],\"label\":[1],\"required\":[4],\"disabled\":[4],\"readonly\":[516],\"placeholder\":[1],\"fullWidth\":[4,\"full-width\"],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"rows\":[2],\"resize\":[4],\"small\":[516],\"value\":[1537],\"maxLength\":[2,\"max-length\"],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"validationInline\":[4,\"validation-inline\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autoFocus\":[4,\"auto-focus\"],\"debounce\":[2],\"type\":[1],\"inputmode\":[1],\"name\":[1],\"spellcheck\":[4],\"ariaActiveDescendant\":[1,\"aria-active-descendant\"],\"truncateValue\":[4,\"truncate-value\"],\"ariaExpanded\":[1,\"aria-expanded\"],\"ariaOwns\":[1,\"aria-owns\"],\"ariaAutocomplete\":[1,\"aria-autocomplete\"],\"role\":[1],\"hiddenInput\":[4,\"hidden-input\"],\"numChars\":[32],\"maxLengthExceeded\":[32],\"initialValue\":[32],\"setFocus\":[64]},[[0,\"keydown\",\"handleKeyDown\"]]]]],[\"ic-button_3\",[[1,\"ic-button\",{\"disabled\":[4],\"loading\":[4],\"type\":[1],\"href\":[1],\"target\":[1],\"rel\":[1],\"download\":[8],\"hreflang\":[1],\"referrerpolicy\":[1],\"variant\":[1],\"size\":[1],\"fullWidth\":[4,\"full-width\"],\"disableTooltip\":[4,\"disable-tooltip\"],\"tooltipPlacement\":[1,\"tooltip-placement\"],\"appearance\":[1025],\"setFocus\":[64],\"updateAriaLabel\":[64]},[[2,\"click\",\"handleHostClick\"],[4,\"themeChange\",\"themeChangeHandler\"]]],[1,\"ic-loading-indicator\",{\"progress\":[2],\"min\":[2],\"max\":[2],\"label\":[1],\"description\":[1],\"innerLabel\":[2,\"inner-label\"],\"labelDuration\":[2,\"label-duration\"],\"size\":[513],\"type\":[513],\"fullWidth\":[516,\"full-width\"],\"appearance\":[1],\"indicatorLabel\":[32],\"indeterminate\":[32],\"showSecond\":[32],\"circularLineWidth\":[32],\"compactStepCircularLineWidth\":[32],\"circularDiameter\":[32]}],[1,\"ic-tooltip\",{\"target\":[513],\"placement\":[1],\"label\":[1],\"disableHover\":[4,\"disable-hover\"]}]]],[\"ic-navigation-menu\",[[1,\"ic-navigation-menu\",{\"version\":[1],\"status\":[1]},[[0,\"navItemClicked\",\"navItemClickHandler\"],[4,\"keydown\",\"handleKeyDown\"]]]]],[\"ic-link\",[[1,\"ic-link\",{\"download\":[8],\"href\":[1],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"target\":[1],\"showIcon\":[4,\"show-icon\"],\"appearance\":[1025]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-breadcrumb\",[[1,\"ic-breadcrumb\",{\"pageTitle\":[1,\"page-title\"],\"href\":[1],\"current\":[4],\"showBackIcon\":[516,\"show-back-icon\"]}]]],[\"ic-divider\",[[2,\"ic-divider\",{\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-section-container\",[[1,\"ic-section-container\",{\"aligned\":[1],\"fullHeight\":[4,\"full-height\"]}]]]]"), options);
17
17
  });
18
18
 
19
19
  //# sourceMappingURL=core.js.map
@@ -359,7 +359,7 @@ const hasValidationStatus = (status, disabled) => {
359
359
  return status !== "" && !disabled;
360
360
  };
361
361
  const isSlotUsed = (element, slotName) => {
362
- return !!element.querySelector(`[slot="${slotName}"]`);
362
+ return Array.from(element.children).some(child => child.getAttribute('slot') === slotName);
363
363
  };
364
364
  // added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update
365
365
  // with a value. Allows a callback function to be executed when this is the case
@@ -476,6 +476,6 @@ const removeFormResetListener = (el, callbackFn) => {
476
476
  }
477
477
  };
478
478
 
479
- export { elementOverflowsX as A, getThemeColorBrightness as B, BLACK_MIN_COLOR_BRIGHTNESS as C, DEVICE_SIZES as D, hexToRgba as E, rgbaStrToObj as F, getSlot as G, isEmptyString as H, IC_DEVICE_SIZES as I, getInputHelperTextID as J, getInputValidationTextID as K, WHITE_MAX_COLOR_BRIGHTNESS as W, onComponentRequiredPropUndefined as a, getThemeFromContext as b, checkResizeObserver as c, addFormResetListener as d, renderHiddenInput as e, removeHiddenInput as f, getCurrentDeviceSize as g, getInputDescribedByText as h, isSlotUsed as i, hasValidationStatus as j, getThemeForegroundColor as k, hasClassificationBanner as l, inheritAttributes as m, IC_INHERITED_ARIA as n, onComponentPropUndefinedChange as o, getNavItemParentDetails as p, getParentElementType as q, removeFormResetListener as r, slotHasContent as s, getSlotContent as t, handleHiddenFormButtonClick as u, getFilteredMenuOptions as v, debounceEvent as w, getLabelFromValue as x, isMobileOrTablet as y, getCssProperty as z };
479
+ export { getThemeColorBrightness as A, BLACK_MIN_COLOR_BRIGHTNESS as B, hexToRgba as C, DEVICE_SIZES as D, rgbaStrToObj as E, getSlot as F, debounceEvent as G, isEmptyString as H, IC_DEVICE_SIZES as I, getInputHelperTextID as J, getInputValidationTextID as K, WHITE_MAX_COLOR_BRIGHTNESS as W, onComponentRequiredPropUndefined as a, getThemeFromContext as b, checkResizeObserver as c, addFormResetListener as d, renderHiddenInput as e, removeHiddenInput as f, getCurrentDeviceSize as g, getInputDescribedByText as h, isSlotUsed as i, hasValidationStatus as j, getThemeForegroundColor as k, hasClassificationBanner as l, inheritAttributes as m, IC_INHERITED_ARIA as n, onComponentPropUndefinedChange as o, getNavItemParentDetails as p, getParentElementType as q, removeFormResetListener as r, slotHasContent as s, getSlotContent as t, handleHiddenFormButtonClick as u, getFilteredMenuOptions as v, getLabelFromValue as w, isMobileOrTablet as x, getCssProperty as y, elementOverflowsX as z };
480
480
 
481
- //# sourceMappingURL=helpers-3d41833c.js.map
481
+ //# sourceMappingURL=helpers-46e5291b.js.map
@@ -0,0 +1 @@
1
+ {"file":"helpers-46e5291b.js","mappings":";;AAAA;MACa,iBAAiB,GAAG;EAC/B,aAAa;EACb,WAAW;EACX,eAAe;EACf,cAAc;EACd,kBAAkB;EAClB,kBAAkB;EAClB,cAAc;EACd,eAAe;EACf,iBAAiB;EACjB,mBAAmB;EACnB,aAAa;EACb,cAAc;EACd,eAAe;EACf,aAAa;EACb,cAAc;EACd,mBAAmB;EACnB,YAAY;EACZ,iBAAiB;EACjB,WAAW;EACX,WAAW;EACX,eAAe;EACf,sBAAsB;EACtB;MAEW,eAAe,GAAG;EAC7B,EAAE,EAAE,GAAG;EACP,CAAC,EAAE,GAAG;EACN,CAAC,EAAE,GAAG;EACN,CAAC,EAAE,IAAI;EACP,EAAE,EAAE,KAAK;EACT;AAEK,MAAM,yBAAyB,GAAG;EACvC,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,oBAAoB;EACpB,UAAU;CACX,CAAC;AAEK,MAAM,yBAAyB,GAAG,CAAC,UAAU,CAAC,CAAC;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ERITED_ARIA = [\n \"aria-atomic\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined) {\n if (always || hasShadowDom(container)) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean =>\n value.trim().length === 0;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[]\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n return ungroupedOptions.find((option) => option.value === value)?.label;\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string => {\n return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = () => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n const themeColorBrightness =\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000;\n return themeColorBrightness;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nconst getSlotElements = (slot: Element) => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(child => child.getAttribute('slot') === slotName);\n};\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n if (document.querySelector(\"ic-classification-banner:not([inline='true'])\")) {\n return true;\n } else {\n return false;\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n) => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n) => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n"],"version":3}
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
2
2
  import { w as warningIcon, e as errorIcon } from './error-icon-6046a380.js';
3
3
  import { s as successIcon } from './success-icon-2f71b115.js';
4
4
  import { c as closeIcon } from './close-icon-2f02b42a.js';
5
- import { i as isSlotUsed } from './helpers-3d41833c.js';
5
+ import { i as isSlotUsed } from './helpers-46e5291b.js';
6
6
  import { I as IcThemeForegroundEnum } from './types-dd515332.js';
7
7
 
8
8
  const neutralIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
@@ -1 +1 @@
1
- {"file":"ic-alert.entry.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAM,UAAU,GAAG,ktJAAktJ;;ACqBruJ,MAAM,IAAI,GAAG;EACX,OAAO,EAAE,WAAW;EACpB,IAAI,EAAE,QAAQ;EACd,OAAO,EAAE,WAAW;EACpB,KAAK,EAAE,SAAS;EAChB,OAAO,EAAE,WAAW;CACrB,CAAC;MAWW,KAAK;;;;;IA8CR,kBAAa,GAAG;MACtB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;MACpB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB,CAAC;mBA3CkC,SAAS;mBAIlB,EAAE;;sBAQE,KAAK;uBAIJ,KAAK;qBAIP,IAAI;mBAEN,IAAI;0BAEG,KAAK;;EAGxC,WAAW;IACT,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;GAC9B;EAgBO,oBAAoB;;IAC1B,MAAM,WAAW,GACf,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,CAAC,0CAAE,YAAY,CAAC;IACjE,IAAI,WAAW,GAAG,EAAE;MAAE,IAAI,CAAC,cAAc,GAAG,IAAI,C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WAAK,KAAK,EAAC,wBAAwB,IACjC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,EACN,WAAK,KAAK,EAAC,wBAAwB,IAChC,WAAW,KACV,iBACE,KAAK,EAAE;QACL,CAAC,eAAe,GAAG,IAAI;QACvB,CAAC,cAAc,GAAG,IAAI;OACvB,EACD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAC,MAAM,EACd,UAAU,EAAE,qBAAqB,CAAC,IAAI,EACtC,KAAK,EAAC,SAAS,GACJ,CACd,CACG,CACF,CACD,CACR,EACD;GACH;;;;;;;","names":[],"sources":["./src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","./src/components/ic-alert/ic-alert.tsx"],"sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n}\n\n.container {\n min-height: 56px;\n border-radius: var(--ic-border-radius);\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.container-neutral {\n background-color: var(--ic-architectural-40);\n}\n\n.container-info {\n background-color: var(--ic-status-info-background);\n}\n\n.container-warning {\n background-color: var(--ic-status-warning-background);\n}\n\n.container-error {\n background-color: var(--ic-status-error-background);\n}\n\n.container-success {\n background-color: var(--ic-status-success-background);\n}\n\n.alert-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n position: absolute;\n}\n\n.divider-neutral {\n background-color: var(--ic-architectural-500);\n}\n\n.divider-info {\n background-color: var(--ic-status-info);\n}\n\n.divider-warning {\n background-color: var(--ic-status-warning-mid);\n}\n\n.divider-error {\n background-color: var(--ic-status-error);\n}\n\n.divider-success {\n background-color: var(--ic-status-success);\n}\n\n.alert-icon {\n height: var(--ic-space-lg);\n width: 22px;\n margin-left: 18px;\n}\n\n.icon-neutral > svg {\n fill: var(--ic-architectural-500);\n}\n\n:host([variant=\"info\"]) .alert-icon svg {\n fill: var(--ic-status-info);\n}\n\n:host([variant=\"warning\"]) .alert-icon svg {\n fill: var(--ic-status-warning-mid);\n}\n\n:host([variant=\"error\"]) .alert-icon svg {\n fill: var(--ic-status-error);\n}\n\n:host([variant=\"success\"]) .alert-icon svg {\n fill: var(--ic-status-success);\n}\n\n.alert-content {\n display: flex;\n align-items: center;\n margin-left: 10px;\n width: 100%;\n}\n\n.alert-message {\n display: flex;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n flex: 1;\n}\n\n.alert-message-title-above {\n display: inline;\n font-size: 0;\n}\n\n.alert-title {\n margin-right: var(--ic-space-xs);\n}\n\n.alert-title-above {\n white-space: normal;\n}\n\n.alert-action-container {\n margin-right: var(--ic-space-xs);\n display: flex;\n align-items: center;\n}\n\n.dismiss-icon {\n margin-right: var(--ic-space-xxxs);\n margin-left: -6px;\n padding: 6px;\n border: none;\n border-radius: 50%;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dismiss-icon svg {\n width: 18px;\n height: 18px;\n}\n\n.dismiss-icon:hover {\n cursor: pointer;\n}\n\n@media (max-width: 628px) {\n .alert-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-message {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n font-size: 1px;\n }\n\n .alert-title {\n white-space: normal;\n }\n\n .alert-action-container {\n margin-bottom: 14px;\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n} from \"@stencil/core\";\nimport neutralIcon from \"../../assets/neutral-icon.svg\";\nimport infoIcon from \"../../assets/info-icon.svg\";\nimport warningIcon from \"../../assets/warning-icon.svg\";\nimport errorIcon from \"../../assets/error-icon.svg\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { IcAlertVariants } from \"./ic-alert.types\";\nimport { isSlotUsed } from \"../../utils/helpers\";\nimport { IcThemeForegroundEnum } from \"../../utils/types\";\n\nconst icon = {\n neutral: neutralIcon,\n info: infoIcon,\n warning: warningIcon,\n error: errorIcon,\n success: successIcon,\n};\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n @Element() el: HTMLIcAlertElement;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant?: IcAlertVariants = \"neutral\";\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading?: string = \"\";\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n /**\n * If `true`, the title and message will appear inline instead of above and below.\n */\n @Prop() titleAbove?: boolean = false;\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced?: boolean = true;\n\n @State() visible: boolean = true;\n\n @State() alertTitleWrap: boolean = false;\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private alertTitleShouldWrap() {\n const titleHeight =\n this.el.shadowRoot.querySelector(\".alert-title\")?.clientHeight;\n if (titleHeight > 24) this.alertTitleWrap = true;\n }\n\n componentDidLoad(): void {\n this.alertTitleShouldWrap();\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n } = this;\n\n return (\n visible && (\n <Host\n role={announced && \"alert\"}\n class={{\n [IcThemeForegroundEnum.Dark]: true,\n }}\n >\n <div\n class={{\n [\"container\"]: true,\n [`container-${variant}`]: true,\n }}\n >\n <div class=\"alert-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={icon[variant]}\n ></span>\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]:\n titleAbove || this.alertTitleWrap,\n }}\n >\n {heading && (\n <ic-typography\n class={{\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }}\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n appearance={IcThemeForegroundEnum.Dark}\n title=\"dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-alert.entry.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAM,UAAU,GAAG,ktJAAktJ;;ACqBruJ,MAAM,IAAI,GAAG;EACX,OAAO,EAAE,WAAW;EACpB,IAAI,EAAE,QAAQ;EACd,OAAO,EAAE,WAAW;EACpB,KAAK,EAAE,SAAS;EAChB,OAAO,EAAE,WAAW;CACrB,CAAC;MAWW,KAAK;;;;;IA8CR,kBAAa,GAAG;MACtB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;MACpB,IAAI,CAA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Ae,GAAG,IAAI;QACvB,CAAC,2BAA2B,GAC1B,UAAU,IAAI,IAAI,CAAC,cAAc;OACpC,IAEA,OAAO,KACN,qBACE,KAAK,EAAE;QACL,CAAC,aAAa,GAAG,IAAI;QACrB,CAAC,mBAAmB,GAAG,UAAU,IAAI,IAAI,CAAC,cAAc;OACzD,EACD,OAAO,EAAC,gBAAgB,IAExB,aAAI,OAAO,CAAK,CACF,CACjB,EACD,YAAM,IAAI,EAAC,SAAS,IAClB,qBAAe,OAAO,EAAC,MAAM,IAAE,OAAO,CAAiB,CAClD,CACH,EACL,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,KAC5B,WAAK,KAAK,EAAC,wBAAwB,IACjC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,EACN,WAAK,KAAK,EAAC,wBAAwB,IAChC,WAAW,KACV,iBACE,KAAK,EAAE;QACL,CAAC,eAAe,GAAG,IAAI;QACvB,CAAC,cAAc,GAAG,IAAI;OACvB,EACD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAC,MAAM,EACd,UAAU,EAAE,qBAAqB,CAAC,IAAI,EACtC,KAAK,EAAC,SAAS,GACJ,CACd,CACG,CACF,CACD,CACR,EACD;GACH;;;;;;;","names":[],"sources":["./src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","./src/components/ic-alert/ic-alert.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n.container {\n min-height: 56px;\n border-radius: var(--ic-border-radius);\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.container-neutral {\n background-color: var(--ic-architectural-40);\n}\n\n.container-info {\n background-color: var(--ic-status-info-background);\n}\n\n.container-warning {\n background-color: var(--ic-status-warning-background);\n}\n\n.container-error {\n background-color: var(--ic-status-error-background);\n}\n\n.container-success {\n background-color: var(--ic-status-success-background);\n}\n\n.alert-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n position: absolute;\n}\n\n.divider-neutral {\n background-color: var(--ic-architectural-500);\n}\n\n.divider-info {\n background-color: var(--ic-status-info);\n}\n\n.divider-warning {\n background-color: var(--ic-status-warning-mid);\n}\n\n.divider-error {\n background-color: var(--ic-status-error);\n}\n\n.divider-success {\n background-color: var(--ic-status-success);\n}\n\n.alert-icon {\n height: var(--ic-space-lg);\n width: 22px;\n margin-left: 18px;\n}\n\n.icon-neutral > svg {\n fill: var(--ic-architectural-500);\n}\n\n:host([variant=\"info\"]) .alert-icon svg {\n fill: var(--ic-status-info);\n}\n\n:host([variant=\"warning\"]) .alert-icon svg {\n fill: var(--ic-status-warning-mid);\n}\n\n:host([variant=\"error\"]) .alert-icon svg {\n fill: var(--ic-status-error);\n}\n\n:host([variant=\"success\"]) .alert-icon svg {\n fill: var(--ic-status-success);\n}\n\n.alert-content {\n display: flex;\n align-items: center;\n margin-left: 10px;\n width: 100%;\n}\n\n.alert-message {\n display: flex;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n flex: 1;\n}\n\n.alert-message-title-above {\n display: inline;\n font-size: 0;\n}\n\n.alert-title {\n margin-right: var(--ic-space-xs);\n}\n\n.alert-title-above {\n white-space: normal;\n}\n\n.alert-action-container {\n margin-right: var(--ic-space-xs);\n display: flex;\n align-items: center;\n}\n\n.dismiss-icon {\n margin-right: var(--ic-space-xxxs);\n margin-left: -6px;\n padding: 6px;\n border: none;\n border-radius: 50%;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dismiss-icon svg {\n width: 18px;\n height: 18px;\n}\n\n.dismiss-icon:hover {\n cursor: pointer;\n}\n\n@media (max-width: 628px) {\n .alert-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-message {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n font-size: 1px;\n }\n\n .alert-title {\n white-space: normal;\n }\n\n .alert-action-container {\n margin-bottom: 14px;\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n} from \"@stencil/core\";\nimport neutralIcon from \"../../assets/neutral-icon.svg\";\nimport infoIcon from \"../../assets/info-icon.svg\";\nimport warningIcon from \"../../assets/warning-icon.svg\";\nimport errorIcon from \"../../assets/error-icon.svg\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { IcAlertVariants } from \"./ic-alert.types\";\nimport { isSlotUsed } from \"../../utils/helpers\";\nimport { IcThemeForegroundEnum } from \"../../utils/types\";\n\nconst icon = {\n neutral: neutralIcon,\n info: infoIcon,\n warning: warningIcon,\n error: errorIcon,\n success: successIcon,\n};\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n @Element() el: HTMLIcAlertElement;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant?: IcAlertVariants = \"neutral\";\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading?: string = \"\";\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n /**\n * If `true`, the title and message will appear inline instead of above and below.\n */\n @Prop() titleAbove?: boolean = false;\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced?: boolean = true;\n\n @State() visible: boolean = true;\n\n @State() alertTitleWrap: boolean = false;\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private alertTitleShouldWrap() {\n const titleHeight =\n this.el.shadowRoot.querySelector(\".alert-title\")?.clientHeight;\n if (titleHeight > 24) this.alertTitleWrap = true;\n }\n\n componentDidLoad(): void {\n this.alertTitleShouldWrap();\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n } = this;\n\n return (\n visible && (\n <Host\n role={announced && \"alert\"}\n class={{\n [IcThemeForegroundEnum.Dark]: true,\n }}\n >\n <div\n class={{\n [\"container\"]: true,\n [`container-${variant}`]: true,\n }}\n >\n <div class=\"alert-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={icon[variant]}\n ></span>\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]:\n titleAbove || this.alertTitleWrap,\n }}\n >\n {heading && (\n <ic-typography\n class={{\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }}\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n appearance={IcThemeForegroundEnum.Dark}\n title=\"dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"],"version":3}