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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (323) 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 +1 -1
  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 +1 -1
  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-status-tag/ic-status-tag.js +21 -2
  85. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  86. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js +1 -1
  87. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js.map +1 -1
  88. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +7 -2
  89. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +1 -1
  90. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  91. package/dist/collection/normalize.css +440 -0
  92. package/dist/collection/utils/helpers.js +1 -1
  93. package/dist/collection/utils/helpers.js.map +1 -1
  94. package/dist/components/helpers.js +2 -2
  95. package/dist/components/helpers.js.map +1 -1
  96. package/dist/components/ic-alert.js.map +1 -1
  97. package/dist/components/ic-back-to-top.js.map +1 -1
  98. package/dist/components/ic-button2.js.map +1 -1
  99. package/dist/components/ic-card.js +39 -5
  100. package/dist/components/ic-card.js.map +1 -1
  101. package/dist/components/ic-checkbox-group.js.map +1 -1
  102. package/dist/components/ic-checkbox.js.map +1 -1
  103. package/dist/components/ic-chip.js.map +1 -1
  104. package/dist/components/ic-classification-banner.js +1 -1
  105. package/dist/components/ic-classification-banner.js.map +1 -1
  106. package/dist/components/ic-data-entity.js.map +1 -1
  107. package/dist/components/ic-data-row.js.map +1 -1
  108. package/dist/components/ic-footer-link-group.js.map +1 -1
  109. package/dist/components/ic-footer-link.js.map +1 -1
  110. package/dist/components/ic-footer.js.map +1 -1
  111. package/dist/components/ic-hero.js.map +1 -1
  112. package/dist/components/ic-input-label2.js +1 -1
  113. package/dist/components/ic-input-validation2.js +1 -1
  114. package/dist/components/ic-link2.js.map +1 -1
  115. package/dist/components/ic-loading-indicator2.js.map +1 -1
  116. package/dist/components/ic-menu2.js +8 -3
  117. package/dist/components/ic-menu2.js.map +1 -1
  118. package/dist/components/ic-navigation-button.js.map +1 -1
  119. package/dist/components/ic-navigation-group.js.map +1 -1
  120. package/dist/components/ic-navigation-item.js.map +1 -1
  121. package/dist/components/ic-navigation-menu2.js +1 -1
  122. package/dist/components/ic-page-header.js.map +1 -1
  123. package/dist/components/ic-radio-group.js.map +1 -1
  124. package/dist/components/ic-radio-option.js +1 -1
  125. package/dist/components/ic-radio-option.js.map +1 -1
  126. package/dist/components/ic-search-bar.js +16 -19
  127. package/dist/components/ic-search-bar.js.map +1 -1
  128. package/dist/components/ic-section-container2.js.map +1 -1
  129. package/dist/components/ic-select.js +1 -1
  130. package/dist/components/ic-select.js.map +1 -1
  131. package/dist/components/ic-side-navigation.js +1 -1
  132. package/dist/components/ic-skeleton.js.map +1 -1
  133. package/dist/components/ic-status-tag.js +5 -3
  134. package/dist/components/ic-status-tag.js.map +1 -1
  135. package/dist/components/ic-switch.js.map +1 -1
  136. package/dist/components/ic-tab-group.js +1 -1
  137. package/dist/components/ic-tab.js.map +1 -1
  138. package/dist/components/ic-text-field2.js +1 -1
  139. package/dist/components/ic-text-field2.js.map +1 -1
  140. package/dist/components/ic-theme.js +1 -1
  141. package/dist/components/ic-tooltip2.js.map +1 -1
  142. package/dist/components/ic-top-navigation.js +3 -3
  143. package/dist/components/ic-top-navigation.js.map +1 -1
  144. package/dist/components/ic-typography2.js.map +1 -1
  145. package/dist/core/core.css +1 -1
  146. package/dist/core/core.esm.js +1 -1
  147. package/dist/core/core.esm.js.map +1 -1
  148. package/dist/core/normalize.css +440 -0
  149. package/dist/core/{p-5831bb8e.entry.js → p-050e1e7b.entry.js} +2 -2
  150. package/dist/core/{p-5831bb8e.entry.js.map → p-050e1e7b.entry.js.map} +1 -1
  151. package/dist/core/{p-31a8595f.entry.js → p-09592918.entry.js} +2 -2
  152. package/dist/core/{p-31a8595f.entry.js.map → p-09592918.entry.js.map} +0 -0
  153. package/dist/core/{p-bf89bcd3.entry.js → p-0b00f848.entry.js} +2 -2
  154. package/dist/core/{p-bf89bcd3.entry.js.map → p-0b00f848.entry.js.map} +1 -1
  155. package/dist/core/p-16698d3e.entry.js +2 -0
  156. package/dist/core/p-16698d3e.entry.js.map +1 -0
  157. package/dist/core/p-18a9beea.entry.js +2 -0
  158. package/dist/core/p-18a9beea.entry.js.map +1 -0
  159. package/dist/core/{p-3a068a45.entry.js → p-1da1f2f3.entry.js} +2 -2
  160. package/dist/core/{p-3a068a45.entry.js.map → p-1da1f2f3.entry.js.map} +1 -1
  161. package/dist/core/{p-2f114521.entry.js → p-217fa7de.entry.js} +2 -2
  162. package/dist/core/{p-2f114521.entry.js.map → p-217fa7de.entry.js.map} +1 -1
  163. package/dist/core/{p-cc83692e.entry.js → p-23bf0b7a.entry.js} +2 -2
  164. package/dist/core/{p-cc83692e.entry.js.map → p-23bf0b7a.entry.js.map} +1 -1
  165. package/dist/core/{p-7881b94e.entry.js → p-27554319.entry.js} +2 -2
  166. package/dist/core/{p-7881b94e.entry.js.map → p-27554319.entry.js.map} +1 -1
  167. package/dist/core/{p-fbde8a26.entry.js → p-2ca96f69.entry.js} +2 -2
  168. package/dist/core/{p-fbde8a26.entry.js.map → p-2ca96f69.entry.js.map} +1 -1
  169. package/dist/core/{p-dd3c3e3c.entry.js → p-3f4d632c.entry.js} +2 -2
  170. package/dist/core/{p-dd3c3e3c.entry.js.map → p-3f4d632c.entry.js.map} +0 -0
  171. package/dist/core/p-3f9cdcdd.entry.js +2 -0
  172. package/dist/core/{p-c4d3c18c.entry.js.map → p-3f9cdcdd.entry.js.map} +1 -1
  173. package/dist/core/{p-c8ce6147.entry.js → p-4f1a7195.entry.js} +2 -2
  174. package/dist/core/{p-c8ce6147.entry.js.map → p-4f1a7195.entry.js.map} +0 -0
  175. package/dist/core/p-5616cfb8.entry.js +2 -0
  176. package/dist/core/p-5616cfb8.entry.js.map +1 -0
  177. package/dist/core/p-66cad84e.entry.js +2 -0
  178. package/dist/core/p-66cad84e.entry.js.map +1 -0
  179. package/dist/core/p-6be5e06b.entry.js.map +1 -1
  180. package/dist/core/p-6d0eaaeb.entry.js.map +1 -1
  181. package/dist/core/{p-5d76bbad.entry.js → p-6f442942.entry.js} +2 -2
  182. package/dist/core/{p-5d76bbad.entry.js.map → p-6f442942.entry.js.map} +0 -0
  183. package/dist/core/{p-60ffb73e.entry.js → p-789e197b.entry.js} +2 -2
  184. package/dist/core/{p-60ffb73e.entry.js.map → p-789e197b.entry.js.map} +1 -1
  185. package/dist/core/{p-4c72f3a9.entry.js → p-7ba184da.entry.js} +2 -2
  186. package/dist/core/{p-4c72f3a9.entry.js.map → p-7ba184da.entry.js.map} +0 -0
  187. package/dist/core/{p-2b5c9143.entry.js → p-8470c255.entry.js} +2 -2
  188. package/dist/core/{p-2b5c9143.entry.js.map → p-8470c255.entry.js.map} +0 -0
  189. package/dist/core/{p-b24145f7.entry.js → p-89a925f8.entry.js} +2 -2
  190. package/dist/core/{p-b24145f7.entry.js.map → p-89a925f8.entry.js.map} +1 -1
  191. package/dist/core/{p-ecfb2e6b.entry.js → p-930cd4cc.entry.js} +2 -2
  192. package/dist/core/{p-ecfb2e6b.entry.js.map → p-930cd4cc.entry.js.map} +1 -1
  193. package/dist/core/{p-0118400b.entry.js → p-9b4022d7.entry.js} +2 -2
  194. package/dist/core/p-9b4022d7.entry.js.map +1 -0
  195. package/dist/core/{p-5e261268.entry.js → p-9fbceeb2.entry.js} +2 -2
  196. package/dist/core/{p-5e261268.entry.js.map → p-9fbceeb2.entry.js.map} +0 -0
  197. package/dist/core/p-a2d3e955.entry.js.map +1 -1
  198. package/dist/core/{p-9cd04875.entry.js → p-a5948fc3.entry.js} +2 -2
  199. package/dist/core/{p-9cd04875.entry.js.map → p-a5948fc3.entry.js.map} +1 -1
  200. package/dist/core/{p-23831891.js → p-a8ac8f72.js} +2 -2
  201. package/dist/core/p-a8ac8f72.js.map +1 -0
  202. package/dist/core/{p-6b34d98f.entry.js → p-ae02b008.entry.js} +2 -2
  203. package/dist/core/{p-6b34d98f.entry.js.map → p-ae02b008.entry.js.map} +1 -1
  204. package/dist/core/p-bb106092.entry.js +2 -0
  205. package/dist/core/p-bb106092.entry.js.map +1 -0
  206. package/dist/core/{p-6fba90ee.entry.js → p-bbe00cb1.entry.js} +2 -2
  207. package/dist/core/{p-6fba90ee.entry.js.map → p-bbe00cb1.entry.js.map} +1 -1
  208. package/dist/core/{p-b3dec76d.entry.js → p-c1d78a64.entry.js} +2 -2
  209. package/dist/core/{p-b3dec76d.entry.js.map → p-c1d78a64.entry.js.map} +1 -1
  210. package/dist/core/{p-0b125f26.entry.js → p-c320fa70.entry.js} +2 -2
  211. package/dist/core/{p-0b125f26.entry.js.map → p-c320fa70.entry.js.map} +0 -0
  212. package/dist/core/p-cadb531f.entry.js.map +1 -1
  213. package/dist/core/p-d599cf4f.entry.js +2 -0
  214. package/dist/core/p-d599cf4f.entry.js.map +1 -0
  215. package/dist/core/{p-6f6bd657.entry.js → p-e192e25d.entry.js} +2 -2
  216. package/dist/core/{p-6f6bd657.entry.js.map → p-e192e25d.entry.js.map} +1 -1
  217. package/dist/core/{p-7f04e382.entry.js → p-e810f48c.entry.js} +2 -2
  218. package/dist/core/{p-7f04e382.entry.js.map → p-e810f48c.entry.js.map} +1 -1
  219. package/dist/core/p-e93e9aa3.entry.js.map +1 -1
  220. package/dist/core/{p-c85689e3.entry.js → p-eaea567e.entry.js} +2 -2
  221. package/dist/core/{p-c85689e3.entry.js.map → p-eaea567e.entry.js.map} +1 -1
  222. package/dist/core/{p-0d77bd0c.entry.js → p-f5b045a5.entry.js} +2 -2
  223. package/dist/core/{p-0d77bd0c.entry.js.map → p-f5b045a5.entry.js.map} +1 -1
  224. package/dist/core/{p-10da19d2.entry.js → p-f760198e.entry.js} +2 -2
  225. package/dist/core/{p-10da19d2.entry.js.map → p-f760198e.entry.js.map} +0 -0
  226. package/dist/core/{p-66f3f02b.entry.js → p-fd0c6039.entry.js} +2 -2
  227. package/dist/core/{p-66f3f02b.entry.js.map → p-fd0c6039.entry.js.map} +1 -1
  228. package/dist/esm/core.js +1 -1
  229. package/dist/esm/{helpers-3d41833c.js → helpers-46e5291b.js} +3 -3
  230. package/dist/esm/helpers-46e5291b.js.map +1 -0
  231. package/dist/esm/ic-alert.entry.js +1 -1
  232. package/dist/esm/ic-alert.entry.js.map +1 -1
  233. package/dist/esm/ic-back-to-top.entry.js +1 -1
  234. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  235. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  236. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  237. package/dist/esm/ic-button_3.entry.js +1 -1
  238. package/dist/esm/ic-button_3.entry.js.map +1 -1
  239. package/dist/esm/ic-card.entry.js +17 -4
  240. package/dist/esm/ic-card.entry.js.map +1 -1
  241. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  242. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  243. package/dist/esm/ic-checkbox.entry.js +1 -1
  244. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  245. package/dist/esm/ic-chip.entry.js +1 -1
  246. package/dist/esm/ic-chip.entry.js.map +1 -1
  247. package/dist/esm/ic-classification-banner.entry.js +1 -1
  248. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  249. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  250. package/dist/esm/ic-data-row.entry.js +1 -1
  251. package/dist/esm/ic-data-row.entry.js.map +1 -1
  252. package/dist/esm/ic-divider.entry.js +1 -1
  253. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  254. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  255. package/dist/esm/ic-footer-link.entry.js +1 -1
  256. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  257. package/dist/esm/ic-footer.entry.js +1 -1
  258. package/dist/esm/ic-footer.entry.js.map +1 -1
  259. package/dist/esm/ic-hero.entry.js +1 -1
  260. package/dist/esm/ic-hero.entry.js.map +1 -1
  261. package/dist/esm/ic-input-component-container_3.entry.js +9 -4
  262. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  263. package/dist/esm/ic-input-label_2.entry.js +1 -1
  264. package/dist/esm/ic-link.entry.js +1 -1
  265. package/dist/esm/ic-link.entry.js.map +1 -1
  266. package/dist/esm/ic-navigation-button.entry.js +1 -1
  267. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  268. package/dist/esm/ic-navigation-group.entry.js +1 -1
  269. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  270. package/dist/esm/ic-navigation-item.entry.js +1 -1
  271. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  272. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  273. package/dist/esm/ic-page-header.entry.js +1 -1
  274. package/dist/esm/ic-page-header.entry.js.map +1 -1
  275. package/dist/esm/ic-radio-group.entry.js +1 -1
  276. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  277. package/dist/esm/ic-radio-option.entry.js +2 -2
  278. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  279. package/dist/esm/ic-search-bar.entry.js +15 -18
  280. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  281. package/dist/esm/ic-section-container.entry.js.map +1 -1
  282. package/dist/esm/ic-select.entry.js +1 -1
  283. package/dist/esm/ic-select.entry.js.map +1 -1
  284. package/dist/esm/ic-side-navigation.entry.js +1 -1
  285. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  286. package/dist/esm/ic-status-tag.entry.js +4 -3
  287. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  288. package/dist/esm/ic-stepper.entry.js +1 -1
  289. package/dist/esm/ic-switch.entry.js +1 -1
  290. package/dist/esm/ic-switch.entry.js.map +1 -1
  291. package/dist/esm/ic-tab-group.entry.js +1 -1
  292. package/dist/esm/ic-tab.entry.js.map +1 -1
  293. package/dist/esm/ic-text-field.entry.js +1 -1
  294. package/dist/esm/ic-text-field.entry.js.map +1 -1
  295. package/dist/esm/ic-theme.entry.js +1 -1
  296. package/dist/esm/ic-top-navigation.entry.js +3 -3
  297. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  298. package/dist/esm/ic-typography.entry.js.map +1 -1
  299. package/dist/esm/loader.js +1 -1
  300. package/dist/types/components/ic-card/ic-card.d.ts +20 -3
  301. package/dist/types/components/ic-menu/ic-menu.d.ts +1 -0
  302. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -2
  303. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
  304. package/dist/types/components.d.ts +27 -3
  305. package/hydrate/index.js +60 -34
  306. package/package.json +3 -3
  307. package/dist/cjs/helpers-8bc3b6d2.js.map +0 -1
  308. package/dist/core/p-0118400b.entry.js.map +0 -1
  309. package/dist/core/p-07cd789d.entry.js +0 -2
  310. package/dist/core/p-07cd789d.entry.js.map +0 -1
  311. package/dist/core/p-23831891.js.map +0 -1
  312. package/dist/core/p-6308f1f2.entry.js +0 -2
  313. package/dist/core/p-6308f1f2.entry.js.map +0 -1
  314. package/dist/core/p-69650186.entry.js +0 -2
  315. package/dist/core/p-69650186.entry.js.map +0 -1
  316. package/dist/core/p-7f632414.entry.js +0 -2
  317. package/dist/core/p-7f632414.entry.js.map +0 -1
  318. package/dist/core/p-8144e941.entry.js +0 -2
  319. package/dist/core/p-8144e941.entry.js.map +0 -1
  320. package/dist/core/p-c4d3c18c.entry.js +0 -2
  321. package/dist/core/p-fa7bc907.entry.js +0 -2
  322. package/dist/core/p-fa7bc907.entry.js.map +0 -1
  323. package/dist/esm/helpers-3d41833c.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,H as i,g as a}from"./p-f9370be6.js";import{g as s,D as n,c as o,i as r}from"./p-23831891.js";import"./p-6f57b13c.js";const l='/*! 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(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:1px solid var(--ic-architectural-300)}header.tabs{padding-top:var(--ic-space-md)}.breadcrumb-area{margin-bottom:var(--ic-space-md)}.main-content{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"title-area action-area"\n "input-area action-area";-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md);justify-content:space-between;width:100%}.title-area{display:flex;flex-direction:column;flex:1;min-width:304px;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;row-gap:var(--ic-space-xs);-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md)}.heading{display:inline-block;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.subheading.small{margin-top:var(--ic-space-xs)}.action-area{display:flex;gap:var(--ic-space-md);flex-flow:row wrap;justify-self:end;justify-content:flex-end;height:-moz-fit-content;height:fit-content;grid-area:action-area}.input-area,.navigation-area{margin-top:var(--ic-space-md);width:100%}.tabs-slot{display:flex;overflow-x:auto;padding:8px;margin:-8px}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:320px}.main-content{grid-template-areas:"title-area"\n "action-area"\n "input-area";justify-content:flex-start}.title-area{min-width:0}.action-area{min-width:100%;margin-top:var(--ic-space-md);justify-content:start}}@media screen and (min-width: 992px){:host(.sticky-desktop){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}}';const d=class{constructor(e){t(this,e);this.resizeObserver=null;this.resizeObserverCallback=()=>{if(this.reverseOrder){this.applyReverseOrder()}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.applyReverseOrder=()=>{const t=s();if(t!==this.deviceSize){this.deviceSize=t}const e=this.el.shadowRoot.querySelector("div.action-area");const i=[];for(let t=0;t<this.actionContent.length;t++){const e=this.actionContent[t];let a=e.offsetHeight;if(a===undefined){a=0}i.push(a)}const a=Math.max(...i);let o=e.offsetHeight;if(o===undefined){o=0}if(this.deviceSize>n.S&&o<=a&&!this.areButtonsReversed){this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed}else if((this.deviceSize>n.S&&o>a||this.deviceSize<=n.S)&&this.areButtonsReversed){this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed}};this.heading=undefined;this.subheading=undefined;this.aligned="left";this.small=false;this.border=true;this.sticky=false;this.stickyDesktopOnly=false;this.reverseOrder=false;this.deviceSize=n.XL;this.areButtonsReversed=false;this.actionContent=undefined}componentWillLoad(){this.actionContent=Array.from(this.el.querySelectorAll(`[slot="actions"]`))}componentDidLoad(){o(this.runResizeObserver)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}render(){const{small:t,border:a,heading:s,subheading:n,aligned:o,sticky:l,stickyDesktopOnly:d}=this;return e(i,{class:{["sticky"]:l,["sticky-desktop"]:!l&&d}},e("header",{class:{["border-bottom"]:a,["tabs"]:r(this.el,"tabs")}},e("ic-section-container",{aligned:o,fullHeight:r(this.el,"tabs")},r(this.el,"breadcrumbs")&&e("div",{class:"breadcrumb-area"},e("slot",{name:"breadcrumbs"})),e("div",{class:"main-content"},e("div",{class:"title-area"},e("div",{class:"header-content"},e("slot",{name:"heading"},e("ic-typography",{variant:t?"h4":"h2",class:"heading"},e("h2",null,s))),e("slot",{name:"heading-adornment"})),e("div",null,e("slot",{name:"subheading"},n&&e("ic-typography",{variant:"body",class:{["subheading"]:true,["small"]:t}},n)))),r(this.el,"actions")&&e("div",{class:"action-area"},e("slot",{name:"actions"})),r(this.el,"input")&&e("div",{class:"input-area"},e("slot",{name:"input"}))),(r(this.el,"stepper")||r(this.el,"tabs"))&&e("div",{class:"navigation-area"},r(this.el,"stepper")&&!r(this.el,"tabs")&&e("slot",{name:"stepper"}),r(this.el,"tabs")&&e("nav",{class:"tabs-slot","aria-label":"navigation-landmark-page-header"},e("slot",{name:"tabs"}))))))}get el(){return a(this)}};d.style=l;export{d as ic_page_header};
2
- //# sourceMappingURL=p-2f114521.entry.js.map
1
+ import{r as t,h as e,H as i,g as a}from"./p-f9370be6.js";import{g as s,D as n,c as o,i as r}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const l='/*! 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(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:1px solid var(--ic-architectural-300)}header.tabs{padding-top:var(--ic-space-md)}.breadcrumb-area{margin-bottom:var(--ic-space-md)}.main-content{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"title-area action-area"\n "input-area action-area";-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md);justify-content:space-between;width:100%}.title-area{display:flex;flex-direction:column;flex:1;min-width:304px;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;row-gap:var(--ic-space-xs);-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md)}.heading{display:inline-block;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.subheading.small{margin-top:var(--ic-space-xs)}.action-area{display:flex;gap:var(--ic-space-md);flex-flow:row wrap;justify-self:end;justify-content:flex-end;height:-moz-fit-content;height:fit-content;grid-area:action-area}.input-area,.navigation-area{margin-top:var(--ic-space-md);width:100%}.tabs-slot{display:flex;overflow-x:auto;padding:8px;margin:-8px}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:320px}.main-content{grid-template-areas:"title-area"\n "action-area"\n "input-area";justify-content:flex-start}.title-area{min-width:0}.action-area{min-width:100%;margin-top:var(--ic-space-md);justify-content:start}}@media screen and (min-width: 992px){:host(.sticky-desktop){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}}';const d=class{constructor(e){t(this,e);this.resizeObserver=null;this.resizeObserverCallback=()=>{if(this.reverseOrder){this.applyReverseOrder()}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.applyReverseOrder=()=>{const t=s();if(t!==this.deviceSize){this.deviceSize=t}const e=this.el.shadowRoot.querySelector("div.action-area");const i=[];for(let t=0;t<this.actionContent.length;t++){const e=this.actionContent[t];let a=e.offsetHeight;if(a===undefined){a=0}i.push(a)}const a=Math.max(...i);let o=e.offsetHeight;if(o===undefined){o=0}if(this.deviceSize>n.S&&o<=a&&!this.areButtonsReversed){this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed}else if((this.deviceSize>n.S&&o>a||this.deviceSize<=n.S)&&this.areButtonsReversed){this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed}};this.heading=undefined;this.subheading=undefined;this.aligned="left";this.small=false;this.border=true;this.sticky=false;this.stickyDesktopOnly=false;this.reverseOrder=false;this.deviceSize=n.XL;this.areButtonsReversed=false;this.actionContent=undefined}componentWillLoad(){this.actionContent=Array.from(this.el.querySelectorAll(`[slot="actions"]`))}componentDidLoad(){o(this.runResizeObserver)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}render(){const{small:t,border:a,heading:s,subheading:n,aligned:o,sticky:l,stickyDesktopOnly:d}=this;return e(i,{class:{["sticky"]:l,["sticky-desktop"]:!l&&d}},e("header",{class:{["border-bottom"]:a,["tabs"]:r(this.el,"tabs")}},e("ic-section-container",{aligned:o,fullHeight:r(this.el,"tabs")},r(this.el,"breadcrumbs")&&e("div",{class:"breadcrumb-area"},e("slot",{name:"breadcrumbs"})),e("div",{class:"main-content"},e("div",{class:"title-area"},e("div",{class:"header-content"},e("slot",{name:"heading"},e("ic-typography",{variant:t?"h4":"h2",class:"heading"},e("h2",null,s))),e("slot",{name:"heading-adornment"})),e("div",null,e("slot",{name:"subheading"},n&&e("ic-typography",{variant:"body",class:{["subheading"]:true,["small"]:t}},n)))),r(this.el,"actions")&&e("div",{class:"action-area"},e("slot",{name:"actions"})),r(this.el,"input")&&e("div",{class:"input-area"},e("slot",{name:"input"}))),(r(this.el,"stepper")||r(this.el,"tabs"))&&e("div",{class:"navigation-area"},r(this.el,"stepper")&&!r(this.el,"tabs")&&e("slot",{name:"stepper"}),r(this.el,"tabs")&&e("nav",{class:"tabs-slot","aria-label":"navigation-landmark-page-header"},e("slot",{name:"tabs"}))))))}get el(){return a(this)}};d.style=l;export{d as ic_page_header};
2
+ //# sourceMappingURL=p-217fa7de.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-page-header/ic-page-header.css?tag=ic-page-header&encapsulation=shadow","src/components/ic-page-header/ic-page-header.tsx"],"names":["icPageHeaderCss","PageHeader","this","resizeObserver","resizeObserverCallback","reverseOrder","applyReverseOrder","runResizeObserver","ResizeObserver","observe","el","currSize","getCurrentDeviceSize","deviceSize","actionArea","shadowRoot","querySelector","actionHeights","i","actionContent","length","action","actionHeight","offsetHeight","undefined","push","max","Math","actionAreaHeight","DEVICE_SIZES","S","areButtonsReversed","reverse","forEach","btn","append","XL","[object Object]","Array","from","querySelectorAll","checkResizeObserver","disconnect","small","border","heading","subheading","aligned","sticky","stickyDesktopOnly","h","Host","class","isSlotUsed","fullHeight","name","variant","aria-label"],"mappings":"0IAAA,MAAMA,EAAkB,yiIC2BXC,EAAU,+BAyCbC,KAAAC,eAAiC,KAEjCD,KAAAE,uBAAyB,KAC/B,GAAIF,KAAKG,aAAc,CACrBH,KAAKI,sBAIDJ,KAAAK,kBAAoB,KAC1BL,KAAKC,eAAiB,IAAIK,gBAAe,KACvCN,KAAKE,4BAEPF,KAAKC,eAAeM,QAAQP,KAAKQ,KAG3BR,KAAAI,kBAAoB,KAC1B,MAAMK,EAAWC,IACjB,GAAID,IAAaT,KAAKW,WAAY,CAChCX,KAAKW,WAAaF,EAGpB,MAAMG,EAAaZ,KAAKQ,GAAGK,WAAWC,cACpC,mBAEF,MAAMC,EAA0B,GAGhC,IAAK,IAAIC,EAAI,EAAGA,EAAIhB,KAAKiB,cAAcC,OAAQF,IAAK,CAClD,MAAMG,EAASnB,KAAKiB,cAAcD,GAClC,IAAII,EAAeD,EAAOE,aAC1B,GAAID,IAAiBE,UAAW,CAC9BF,EAAe,EAEjBL,EAAcQ,KAAKH,GAGrB,MAAMI,EAAMC,KAAKD,OAAOT,GAGxB,IAAIW,EAAmBd,EAAWS,aAElC,GAAIK,IAAqBJ,UAAW,CAClCI,EAAmB,EAGrB,GACE1B,KAAKW,WAAagB,EAAaC,GAC/BF,GAAoBF,IACnBxB,KAAK6B,mBACN,CACA7B,KAAKiB,cAAgBjB,KAAKiB,cAAca,UACxC9B,KAAKiB,cAAcc,SAASC,IAC1BhC,KAAKQ,GAAGyB,OAAOD,MAEjBhC,KAAK6B,oBAAsB7B,KAAK6B,wBAC3B,IACH7B,KAAKW,WAAagB,EAAaC,GAAKF,EAAmBF,GACvDxB,KAAKW,YAAcgB,EAAaC,IAClC5B,KAAK6B,mBACL,CACA7B,KAAKiB,cAAgBjB,KAAKiB,cAAca,UACxC9B,KAAKiB,cAAcc,SAASC,IAC1BhC,KAAKQ,GAAGyB,OAAOD,MAEjBhC,KAAK6B,oBAAsB7B,KAAK6B,mFA5FJ,kBAIN,kBAIC,iBAIA,6BAIW,wBAIL,sBAEHF,EAAaO,2BAEJ,mCAwEvCC,oBACEnC,KAAKiB,cAAgBmB,MAAMC,KACzBrC,KAAKQ,GAAG8B,iBAAiB,qBAI7BH,mBACEI,EAAoBvC,KAAKK,mBAG3B8B,uBACE,GAAInC,KAAKC,iBAAmB,KAAM,CAChCD,KAAKC,eAAeuC,cAIxBL,SACE,MAAMM,MACJA,EAAKC,OACLA,EAAMC,QACNA,EAAOC,WACPA,EAAUC,QACVA,EAAOC,OACPA,EAAMC,kBACNA,GACE/C,KAEJ,OACEgD,EAACC,EAAI,CACHC,MAAO,CACLf,CAAC,UAAWW,EACZX,CAAC,mBAAoBW,GAAUC,IAGjCC,EAAA,SAAA,CACEE,MAAO,CACLf,CAAC,iBAAkBO,EACnBP,CAAC,QAASgB,EAAWnD,KAAKQ,GAAI,UAGhCwC,EAAA,uBAAA,CACEH,QAASA,EACTO,WAAYD,EAAWnD,KAAKQ,GAAI,SAE/B2C,EAAWnD,KAAKQ,GAAI,gBACnBwC,EAAA,MAAA,CAAKE,MAAM,mBACTF,EAAA,OAAA,CAAMK,KAAK,iBAGfL,EAAA,MAAA,CAAKE,MAAM,gBACTF,EAAA,MAAA,CAAKE,MAAM,cACTF,EAAA,MAAA,CAAKE,MAAM,kBACTF,EAAA,OAAA,CAAMK,KAAK,WACTL,EAAA,gBAAA,CACEM,QAASb,EAAQ,KAAO,KACxBS,MAAM,WAENF,EAAA,KAAA,KAAKL,KAGTK,EAAA,OAAA,CAAMK,KAAK,uBAEbL,EAAA,MAAA,KACEA,EAAA,OAAA,CAAMK,KAAK,cACRT,GACCI,EAAA,gBAAA,CACEM,QAAQ,OACRJ,MAAO,CAAEf,CAAC,cAAe,KAAMA,CAAC,SAAUM,IAEzCG,MAMVO,EAAWnD,KAAKQ,GAAI,YACnBwC,EAAA,MAAA,CAAKE,MAAM,eACTF,EAAA,OAAA,CAAMK,KAAK,aAGdF,EAAWnD,KAAKQ,GAAI,UACnBwC,EAAA,MAAA,CAAKE,MAAM,cACTF,EAAA,OAAA,CAAMK,KAAK,aAKfF,EAAWnD,KAAKQ,GAAI,YACpB2C,EAAWnD,KAAKQ,GAAI,UACpBwC,EAAA,MAAA,CAAKE,MAAM,mBACRC,EAAWnD,KAAKQ,GAAI,aAClB2C,EAAWnD,KAAKQ,GAAI,SAAWwC,EAAA,OAAA,CAAMK,KAAK,YAC5CF,EAAWnD,KAAKQ,GAAI,SACnBwC,EAAA,MAAA,CACEE,MAAM,YAAWK,aACN,mCAEXP,EAAA,OAAA,CAAMK,KAAK","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n}\n\n:host(.sticky) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n}\n\nheader {\n background-color: var(--ic-architectural-40);\n}\n\nheader.border-bottom {\n border-bottom: 1px solid var(--ic-architectural-300);\n}\n\nheader.tabs {\n padding-top: var(--ic-space-md);\n}\n\n.breadcrumb-area {\n margin-bottom: var(--ic-space-md);\n}\n\n.main-content {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas:\n \"title-area action-area\"\n \"input-area action-area\";\n column-gap: var(--ic-space-md);\n justify-content: space-between;\n width: 100%;\n}\n\n.title-area {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 304px;\n grid-area: title-area;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n width: 100%;\n flex-wrap: wrap;\n row-gap: var(--ic-space-xs);\n column-gap: var(--ic-space-md);\n}\n\n.heading {\n display: inline-block;\n overflow-wrap: break-word;\n hyphens: auto;\n}\n\n.subheading.small {\n margin-top: var(--ic-space-xs);\n}\n\n.action-area {\n display: flex;\n gap: var(--ic-space-md);\n flex-flow: row wrap;\n justify-self: end;\n justify-content: flex-end;\n height: fit-content;\n grid-area: action-area;\n}\n\n.input-area,\n.navigation-area {\n margin-top: var(--ic-space-md);\n width: 100%;\n}\n\n.tabs-slot {\n display: flex;\n overflow-x: auto;\n padding: 8px;\n margin: -8px;\n}\n\n.input-area {\n grid-area: input-area;\n}\n\n@media screen and (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n\n max-width: 320px;\n }\n\n .main-content {\n grid-template-areas:\n \"title-area\"\n \"action-area\"\n \"input-area\";\n justify-content: flex-start;\n }\n\n .title-area {\n min-width: 0;\n }\n\n .action-area {\n min-width: 100%;\n margin-top: var(--ic-space-md);\n justify-content: start;\n }\n}\n\n@media screen and (min-width: 992px) {\n :host(.sticky-desktop) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n }\n}\n","import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n if (\n this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n } else if (\n ((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav\n class=\"tabs-slot\"\n aria-label=\"navigation-landmark-page-header\"\n >\n <slot name=\"tabs\" />\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-page-header/ic-page-header.css?tag=ic-page-header&encapsulation=shadow","src/components/ic-page-header/ic-page-header.tsx"],"names":["icPageHeaderCss","PageHeader","this","resizeObserver","resizeObserverCallback","reverseOrder","applyReverseOrder","runResizeObserver","ResizeObserver","observe","el","currSize","getCurrentDeviceSize","deviceSize","actionArea","shadowRoot","querySelector","actionHeights","i","actionContent","length","action","actionHeight","offsetHeight","undefined","push","max","Math","actionAreaHeight","DEVICE_SIZES","S","areButtonsReversed","reverse","forEach","btn","append","XL","[object Object]","Array","from","querySelectorAll","checkResizeObserver","disconnect","small","border","heading","subheading","aligned","sticky","stickyDesktopOnly","h","Host","class","isSlotUsed","fullHeight","name","variant","aria-label"],"mappings":"0IAAA,MAAMA,EAAkB,yiIC2BXC,EAAU,+BAyCbC,KAAAC,eAAiC,KAEjCD,KAAAE,uBAAyB,KAC/B,GAAIF,KAAKG,aAAc,CACrBH,KAAKI,sBAIDJ,KAAAK,kBAAoB,KAC1BL,KAAKC,eAAiB,IAAIK,gBAAe,KACvCN,KAAKE,4BAEPF,KAAKC,eAAeM,QAAQP,KAAKQ,KAG3BR,KAAAI,kBAAoB,KAC1B,MAAMK,EAAWC,IACjB,GAAID,IAAaT,KAAKW,WAAY,CAChCX,KAAKW,WAAaF,EAGpB,MAAMG,EAAaZ,KAAKQ,GAAGK,WAAWC,cACpC,mBAEF,MAAMC,EAA0B,GAGhC,IAAK,IAAIC,EAAI,EAAGA,EAAIhB,KAAKiB,cAAcC,OAAQF,IAAK,CAClD,MAAMG,EAASnB,KAAKiB,cAAcD,GAClC,IAAII,EAAeD,EAAOE,aAC1B,GAAID,IAAiBE,UAAW,CAC9BF,EAAe,EAEjBL,EAAcQ,KAAKH,GAGrB,MAAMI,EAAMC,KAAKD,OAAOT,GAGxB,IAAIW,EAAmBd,EAAWS,aAElC,GAAIK,IAAqBJ,UAAW,CAClCI,EAAmB,EAGrB,GACE1B,KAAKW,WAAagB,EAAaC,GAC/BF,GAAoBF,IACnBxB,KAAK6B,mBACN,CACA7B,KAAKiB,cAAgBjB,KAAKiB,cAAca,UACxC9B,KAAKiB,cAAcc,SAASC,IAC1BhC,KAAKQ,GAAGyB,OAAOD,MAEjBhC,KAAK6B,oBAAsB7B,KAAK6B,wBAC3B,IACH7B,KAAKW,WAAagB,EAAaC,GAAKF,EAAmBF,GACvDxB,KAAKW,YAAcgB,EAAaC,IAClC5B,KAAK6B,mBACL,CACA7B,KAAKiB,cAAgBjB,KAAKiB,cAAca,UACxC9B,KAAKiB,cAAcc,SAASC,IAC1BhC,KAAKQ,GAAGyB,OAAOD,MAEjBhC,KAAK6B,oBAAsB7B,KAAK6B,mFA5FJ,kBAIN,kBAIC,iBAIA,6BAIW,wBAIL,sBAEHF,EAAaO,2BAEJ,mCAwEvCC,oBACEnC,KAAKiB,cAAgBmB,MAAMC,KACzBrC,KAAKQ,GAAG8B,iBAAiB,qBAI7BH,mBACEI,EAAoBvC,KAAKK,mBAG3B8B,uBACE,GAAInC,KAAKC,iBAAmB,KAAM,CAChCD,KAAKC,eAAeuC,cAIxBL,SACE,MAAMM,MACJA,EAAKC,OACLA,EAAMC,QACNA,EAAOC,WACPA,EAAUC,QACVA,EAAOC,OACPA,EAAMC,kBACNA,GACE/C,KAEJ,OACEgD,EAACC,EAAI,CACHC,MAAO,CACLf,CAAC,UAAWW,EACZX,CAAC,mBAAoBW,GAAUC,IAGjCC,EAAA,SAAA,CACEE,MAAO,CACLf,CAAC,iBAAkBO,EACnBP,CAAC,QAASgB,EAAWnD,KAAKQ,GAAI,UAGhCwC,EAAA,uBAAA,CACEH,QAASA,EACTO,WAAYD,EAAWnD,KAAKQ,GAAI,SAE/B2C,EAAWnD,KAAKQ,GAAI,gBACnBwC,EAAA,MAAA,CAAKE,MAAM,mBACTF,EAAA,OAAA,CAAMK,KAAK,iBAGfL,EAAA,MAAA,CAAKE,MAAM,gBACTF,EAAA,MAAA,CAAKE,MAAM,cACTF,EAAA,MAAA,CAAKE,MAAM,kBACTF,EAAA,OAAA,CAAMK,KAAK,WACTL,EAAA,gBAAA,CACEM,QAASb,EAAQ,KAAO,KACxBS,MAAM,WAENF,EAAA,KAAA,KAAKL,KAGTK,EAAA,OAAA,CAAMK,KAAK,uBAEbL,EAAA,MAAA,KACEA,EAAA,OAAA,CAAMK,KAAK,cACRT,GACCI,EAAA,gBAAA,CACEM,QAAQ,OACRJ,MAAO,CAAEf,CAAC,cAAe,KAAMA,CAAC,SAAUM,IAEzCG,MAMVO,EAAWnD,KAAKQ,GAAI,YACnBwC,EAAA,MAAA,CAAKE,MAAM,eACTF,EAAA,OAAA,CAAMK,KAAK,aAGdF,EAAWnD,KAAKQ,GAAI,UACnBwC,EAAA,MAAA,CAAKE,MAAM,cACTF,EAAA,OAAA,CAAMK,KAAK,aAKfF,EAAWnD,KAAKQ,GAAI,YACpB2C,EAAWnD,KAAKQ,GAAI,UACpBwC,EAAA,MAAA,CAAKE,MAAM,mBACRC,EAAWnD,KAAKQ,GAAI,aAClB2C,EAAWnD,KAAKQ,GAAI,SAAWwC,EAAA,OAAA,CAAMK,KAAK,YAC5CF,EAAWnD,KAAKQ,GAAI,SACnBwC,EAAA,MAAA,CACEE,MAAM,YAAWK,aACN,mCAEXP,EAAA,OAAA,CAAMK,KAAK","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n:host(.sticky) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n}\n\nheader {\n background-color: var(--ic-architectural-40);\n}\n\nheader.border-bottom {\n border-bottom: 1px solid var(--ic-architectural-300);\n}\n\nheader.tabs {\n padding-top: var(--ic-space-md);\n}\n\n.breadcrumb-area {\n margin-bottom: var(--ic-space-md);\n}\n\n.main-content {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas:\n \"title-area action-area\"\n \"input-area action-area\";\n column-gap: var(--ic-space-md);\n justify-content: space-between;\n width: 100%;\n}\n\n.title-area {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 304px;\n grid-area: title-area;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n width: 100%;\n flex-wrap: wrap;\n row-gap: var(--ic-space-xs);\n column-gap: var(--ic-space-md);\n}\n\n.heading {\n display: inline-block;\n overflow-wrap: break-word;\n hyphens: auto;\n}\n\n.subheading.small {\n margin-top: var(--ic-space-xs);\n}\n\n.action-area {\n display: flex;\n gap: var(--ic-space-md);\n flex-flow: row wrap;\n justify-self: end;\n justify-content: flex-end;\n height: fit-content;\n grid-area: action-area;\n}\n\n.input-area,\n.navigation-area {\n margin-top: var(--ic-space-md);\n width: 100%;\n}\n\n.tabs-slot {\n display: flex;\n overflow-x: auto;\n padding: 8px;\n margin: -8px;\n}\n\n.input-area {\n grid-area: input-area;\n}\n\n@media screen and (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n\n max-width: 320px;\n }\n\n .main-content {\n grid-template-areas:\n \"title-area\"\n \"action-area\"\n \"input-area\";\n justify-content: flex-start;\n }\n\n .title-area {\n min-width: 0;\n }\n\n .action-area {\n min-width: 100%;\n margin-top: var(--ic-space-md);\n justify-content: start;\n }\n}\n\n@media screen and (min-width: 992px) {\n :host(.sticky-desktop) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n }\n}\n","import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n if (\n this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n } else if (\n ((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav\n class=\"tabs-slot\"\n aria-label=\"navigation-landmark-page-header\"\n >\n <slot name=\"tabs\" />\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as i,H as t,g as n}from"./p-f9370be6.js";import{b as o,m as l,n as r}from"./p-23831891.js";import{I as s}from"./p-6f57b13c.js";const a=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></svg>`;const c='/*! 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(.link) .ic-link,:host(.link) ::slotted(a){color:var(--ic-hyperlink);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}:host(.link.dark) .ic-link.dark,:host(.link.dark) ::slotted(a){color:var(--ic-color-primary-text)}:host(.link.light) .ic-link.light,:host(.link.light) ::slotted(a){color:var(--ic-color-white-text)}:host(.link) .ic-link:visited,:host(.link) ::slotted(a:visited){color:var(--ic-hyperlink-visited)}:host(.link) .ic-link:hover,:host(.link) .ic-link:focus,:host(.link) ::slotted(a:hover),:host(.link) ::slotted(a:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%}:host(.link) .ic-link:hover,:host(.link) ::slotted(a:hover){outline:none}:host(.link) .ic-link:focus,:host(.link) ::slotted(a:focus){outline:var(--ic-hc-focus-outline)}:host(.link) .ic-link:active,:host(.link) .ic-link:focus:active,:host(.link) .ic-link:visited:active,:host(.link) ::slotted(a:active),:host(.link) ::slotted(a:focus:active),:host(.link) ::slotted(a:visited:active){text-decoration:none}.ic-link-open-in-new-icon{vertical-align:middle;margin-left:var(--ic-space-xxs)}.ic-link>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink)}.ic-link.dark>.ic-link-open-in-new-icon{fill:var(--ic-color-primary-text)}.ic-link.light>.ic-link-open-in-new-icon{fill:var(--ic-color-white-text)}.ic-link-open-in-new-icon>svg{width:var(--ic-space-md);height:var(--ic-space-md);fill:currentcolor}.ic-link:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-visited)}.ic-link.light:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-contrast-visited)}:host(.breadcrumb-link) .ic-link{display:var(--breadcrumb-link-display);align-items:var(--breadcrumb-link-align-items);gap:var(--breadcrumb-link-gap)}:host(.breadcrumb-link) .ic-link ::slotted(.back-icon){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.breadcrumb-link.current-page) a,:host(.breadcrumb-link.current-page) ::slotted(a){font-weight:normal;color:inherit;text-decoration:none;display:flex;align-items:center}:host(.breadcrumb-link.current-page) .ic-link,:host(.breadcrumb-link.current-page) ::slotted(a:focus){outline:var(--ic-hc-focus-outline);text-decoration:none}:host(.breadcrumb-link.current-page) .ic-link:visited{color:var(--ic-color-primary-text)}';const d=class{constructor(i){e(this,i);this.inheritedAttributes={};this.download=false;this.href=null;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined;this.showIcon=undefined;this.appearance="default"}themeChangeHandler(e){const i=e.detail;this.updateTheme(i.mode)}updateTheme(e=null){const i=o(this.el,e||null);switch(i){case s.Light:this.appearance=s.Light;break;case s.Dark:this.appearance=s.Dark;break}}componentWillLoad(){this.inheritedAttributes=l(this.el,[...r,"aria-expanded"])}componentDidLoad(){this.updateTheme()}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');if(this.routerSlot){this.routerSlot.ariaLabel=this.routerSlot.textContent}return!!this.routerSlot}render(){const{download:e,href:n,hreflang:o,referrerpolicy:l,rel:r,target:s,showIcon:c,appearance:d}=this;return i(t,{class:{["link"]:true,[`${d}`]:true}},this.hasRouterSlot()?i("slot",{name:"router-item"}):i("a",Object.assign({class:{["ic-link"]:n!==null,[`${d}`]:n!==null},download:e!==false?e:null,href:n,hrefLang:o,referrerPolicy:l,rel:r,target:s,tabindex:n!==null?"0":"-1"},this.inheritedAttributes),i("slot",null),c&&i("span",{class:"ic-link-open-in-new-icon",innerHTML:a})))}get el(){return n(this)}};d.style=c;export{d as ic_link};
2
- //# sourceMappingURL=p-cc83692e.entry.js.map
1
+ import{r as e,h as i,H as t,g as n}from"./p-f9370be6.js";import{b as o,m as l,n as r}from"./p-a8ac8f72.js";import{I as s}from"./p-6f57b13c.js";const a=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></svg>`;const c='/*! 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(.link) .ic-link,:host(.link) ::slotted(a){color:var(--ic-hyperlink);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}:host(.link.dark) .ic-link.dark,:host(.link.dark) ::slotted(a){color:var(--ic-color-primary-text)}:host(.link.light) .ic-link.light,:host(.link.light) ::slotted(a){color:var(--ic-color-white-text)}:host(.link) .ic-link:visited,:host(.link) ::slotted(a:visited){color:var(--ic-hyperlink-visited)}:host(.link) .ic-link:hover,:host(.link) .ic-link:focus,:host(.link) ::slotted(a:hover),:host(.link) ::slotted(a:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%}:host(.link) .ic-link:hover,:host(.link) ::slotted(a:hover){outline:none}:host(.link) .ic-link:focus,:host(.link) ::slotted(a:focus){outline:var(--ic-hc-focus-outline)}:host(.link) .ic-link:active,:host(.link) .ic-link:focus:active,:host(.link) .ic-link:visited:active,:host(.link) ::slotted(a:active),:host(.link) ::slotted(a:focus:active),:host(.link) ::slotted(a:visited:active){text-decoration:none}.ic-link-open-in-new-icon{vertical-align:middle;margin-left:var(--ic-space-xxs)}.ic-link>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink)}.ic-link.dark>.ic-link-open-in-new-icon{fill:var(--ic-color-primary-text)}.ic-link.light>.ic-link-open-in-new-icon{fill:var(--ic-color-white-text)}.ic-link-open-in-new-icon>svg{width:var(--ic-space-md);height:var(--ic-space-md);fill:currentcolor}.ic-link:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-visited)}.ic-link.light:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-contrast-visited)}:host(.breadcrumb-link) .ic-link{display:var(--breadcrumb-link-display);align-items:var(--breadcrumb-link-align-items);gap:var(--breadcrumb-link-gap)}:host(.breadcrumb-link) .ic-link ::slotted(.back-icon){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.breadcrumb-link.current-page) a,:host(.breadcrumb-link.current-page) ::slotted(a){font-weight:normal;color:inherit;text-decoration:none;display:flex;align-items:center}:host(.breadcrumb-link.current-page) .ic-link,:host(.breadcrumb-link.current-page) ::slotted(a:focus){outline:var(--ic-hc-focus-outline);text-decoration:none}:host(.breadcrumb-link.current-page) .ic-link:visited{color:var(--ic-color-primary-text)}';const d=class{constructor(i){e(this,i);this.inheritedAttributes={};this.download=false;this.href=null;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined;this.showIcon=undefined;this.appearance="default"}themeChangeHandler(e){const i=e.detail;this.updateTheme(i.mode)}updateTheme(e=null){const i=o(this.el,e||null);switch(i){case s.Light:this.appearance=s.Light;break;case s.Dark:this.appearance=s.Dark;break}}componentWillLoad(){this.inheritedAttributes=l(this.el,[...r,"aria-expanded"])}componentDidLoad(){this.updateTheme()}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');if(this.routerSlot){this.routerSlot.ariaLabel=this.routerSlot.textContent}return!!this.routerSlot}render(){const{download:e,href:n,hreflang:o,referrerpolicy:l,rel:r,target:s,showIcon:c,appearance:d}=this;return i(t,{class:{["link"]:true,[`${d}`]:true}},this.hasRouterSlot()?i("slot",{name:"router-item"}):i("a",Object.assign({class:{["ic-link"]:n!==null,[`${d}`]:n!==null},download:e!==false?e:null,href:n,hrefLang:o,referrerPolicy:l,rel:r,target:s,tabindex:n!==null?"0":"-1"},this.inheritedAttributes),i("slot",null),c&&i("span",{class:"ic-link-open-in-new-icon",innerHTML:a})))}get el(){return n(this)}};d.style=c;export{d as ic_link};
2
+ //# sourceMappingURL=p-23bf0b7a.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-link/ic-link.css?tag=ic-link&encapsulation=shadow","src/components/ic-link/ic-link.tsx"],"names":["icLinkCss","Link","this","inheritedAttributes","[object Object]","ev","theme","detail","updateTheme","mode","newTheme","getThemeFromContext","el","IcThemeForegroundEnum","Light","appearance","Dark","inheritAttributes","IC_INHERITED_ARIA","routerSlot","querySelector","ariaLabel","textContent","download","href","hreflang","referrerpolicy","rel","target","showIcon","h","Host","class","hasRouterSlot","name","Object","assign","hrefLang","referrerPolicy","tabindex","innerHTML","OpenInNew"],"mappings":"0aAAA,MAAMA,EAAY,ynJCoBLC,EAAI,+BACPC,KAAAC,oBAAgD,iBAQlB,gBAKd,4IA8BkC,UAG1DC,mBAAmBC,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BL,KAAKM,YAAYF,EAAMG,MAGjBL,YAAYM,EAA8B,MAChD,MAAMJ,EAAQK,EAAoBT,KAAKU,GAAIF,GAAY,MAEvD,OAAQJ,GACN,KAAKO,EAAsBC,MACzBZ,KAAKa,WAAaF,EAAsBC,MACxC,MACF,KAAKD,EAAsBG,KACzBd,KAAKa,WAAaF,EAAsBG,KACxC,OAINZ,oBACEF,KAAKC,oBAAsBc,EAAkBf,KAAKU,GAAI,IACjDM,EACH,kBAIJd,mBACEF,KAAKM,cAGCJ,gBACNF,KAAKiB,WAAajB,KAAKU,GAAGQ,cAAc,wBACxC,GAAIlB,KAAKiB,WAAY,CACnBjB,KAAKiB,WAAWE,UAAYnB,KAAKiB,WAAWG,YAE9C,QAASpB,KAAKiB,WAGhBf,SACE,MAAMmB,SACJA,EAAQC,KACRA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,IACdA,EAAGC,OACHA,EAAMC,SACNA,EAAQd,WACRA,GACEb,KAEJ,OACE4B,EAACC,EAAI,CAACC,MAAO,CAAE5B,CAAC,QAAS,KAAMA,CAAC,GAAGW,KAAe,OAC/Cb,KAAK+B,gBACJH,EAAA,OAAA,CAAMI,KAAK,gBAEXJ,EAAA,IAAAK,OAAAC,OAAA,CACEJ,MAAO,CACL5B,CAAC,WAAYoB,IAAS,KACtBpB,CAAC,GAAGW,KAAeS,IAAS,MAE9BD,SAAUA,IAAa,MAAQA,EAAW,KAC1CC,KAAMA,EACNa,SAAUZ,EACVa,eAAgBZ,EAChBC,IAAKA,EACLC,OAAQA,EACRW,SAAUf,IAAS,KAAO,IAAM,MAC5BtB,KAAKC,qBAET2B,EAAA,OAAA,MACCD,GACCC,EAAA,OAAA,CAAME,MAAM,2BAA2BQ,UAAWC","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host(.link) .ic-link,\n:host(.link) ::slotted(a) {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.link.dark) .ic-link.dark,\n:host(.link.dark) ::slotted(a) {\n color: var(--ic-color-primary-text);\n}\n\n:host(.link.light) .ic-link.light,\n:host(.link.light) ::slotted(a) {\n color: var(--ic-color-white-text);\n}\n\n:host(.link) .ic-link:visited,\n:host(.link) ::slotted(a:visited) {\n color: var(--ic-hyperlink-visited);\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:hover),\n:host(.link) ::slotted(a:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) ::slotted(a:hover) {\n outline: none;\n}\n\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.link) .ic-link:active,\n:host(.link) .ic-link:focus:active,\n:host(.link) .ic-link:visited:active,\n:host(.link) ::slotted(a:active),\n:host(.link) ::slotted(a:focus:active),\n:host(.link) ::slotted(a:visited:active) {\n text-decoration: none;\n}\n\n.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink);\n}\n\n.ic-link.dark > .ic-link-open-in-new-icon {\n fill: var(--ic-color-primary-text);\n}\n\n.ic-link.light > .ic-link-open-in-new-icon {\n fill: var(--ic-color-white-text);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: currentcolor;\n}\n\n.ic-link:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-visited);\n}\n\n.ic-link.light:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-contrast-visited);\n}\n\n:host(.breadcrumb-link) .ic-link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .ic-link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link:visited {\n color: var(--ic-color-primary-text);\n}\n","import { Component, Element, Prop, h, Host, Listen } from \"@stencil/core\";\n\nimport OpenInNew from \"./assets/OpenInNew.svg\";\nimport { getThemeFromContext, inheritAttributes } from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\n/**\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n\n@Component({\n tag: \"ic-link\",\n styleUrl: \"ic-link.css\",\n shadow: true,\n})\nexport class Link {\n private inheritedAttributes: { [k: string]: unknown } = {};\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcLinkElement;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string = null;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * If `true`, the 'open in new tab/window' icon will be displayed.\n */\n @Prop() showIcon?: boolean;\n\n /**\n * The appearance of the link, e.g. dark, light, or default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const theme = getThemeFromContext(this.el, newTheme || null);\n\n switch (theme) {\n case IcThemeForegroundEnum.Light:\n this.appearance = IcThemeForegroundEnum.Light;\n break;\n case IcThemeForegroundEnum.Dark:\n this.appearance = IcThemeForegroundEnum.Dark;\n break;\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n ]);\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n render() {\n const {\n download,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n showIcon,\n appearance,\n } = this;\n\n return (\n <Host class={{ [\"link\"]: true, [`${appearance}`]: true }}>\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <a\n class={{\n [\"ic-link\"]: href !== null,\n [`${appearance}`]: href !== null,\n }}\n download={download !== false ? download : null}\n href={href}\n hrefLang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n target={target}\n tabindex={href !== null ? \"0\" : \"-1\"}\n {...this.inheritedAttributes}\n >\n <slot />\n {showIcon && (\n <span class=\"ic-link-open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-link/ic-link.css?tag=ic-link&encapsulation=shadow","src/components/ic-link/ic-link.tsx"],"names":["icLinkCss","Link","this","inheritedAttributes","[object Object]","ev","theme","detail","updateTheme","mode","newTheme","getThemeFromContext","el","IcThemeForegroundEnum","Light","appearance","Dark","inheritAttributes","IC_INHERITED_ARIA","routerSlot","querySelector","ariaLabel","textContent","download","href","hreflang","referrerpolicy","rel","target","showIcon","h","Host","class","hasRouterSlot","name","Object","assign","hrefLang","referrerPolicy","tabindex","innerHTML","OpenInNew"],"mappings":"0aAAA,MAAMA,EAAY,ynJCoBLC,EAAI,+BACPC,KAAAC,oBAAgD,iBAQlB,gBAKd,4IA8BkC,UAG1DC,mBAAmBC,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BL,KAAKM,YAAYF,EAAMG,MAGjBL,YAAYM,EAA8B,MAChD,MAAMJ,EAAQK,EAAoBT,KAAKU,GAAIF,GAAY,MAEvD,OAAQJ,GACN,KAAKO,EAAsBC,MACzBZ,KAAKa,WAAaF,EAAsBC,MACxC,MACF,KAAKD,EAAsBG,KACzBd,KAAKa,WAAaF,EAAsBG,KACxC,OAINZ,oBACEF,KAAKC,oBAAsBc,EAAkBf,KAAKU,GAAI,IACjDM,EACH,kBAIJd,mBACEF,KAAKM,cAGCJ,gBACNF,KAAKiB,WAAajB,KAAKU,GAAGQ,cAAc,wBACxC,GAAIlB,KAAKiB,WAAY,CACnBjB,KAAKiB,WAAWE,UAAYnB,KAAKiB,WAAWG,YAE9C,QAASpB,KAAKiB,WAGhBf,SACE,MAAMmB,SACJA,EAAQC,KACRA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,IACdA,EAAGC,OACHA,EAAMC,SACNA,EAAQd,WACRA,GACEb,KAEJ,OACE4B,EAACC,EAAI,CAACC,MAAO,CAAE5B,CAAC,QAAS,KAAMA,CAAC,GAAGW,KAAe,OAC/Cb,KAAK+B,gBACJH,EAAA,OAAA,CAAMI,KAAK,gBAEXJ,EAAA,IAAAK,OAAAC,OAAA,CACEJ,MAAO,CACL5B,CAAC,WAAYoB,IAAS,KACtBpB,CAAC,GAAGW,KAAeS,IAAS,MAE9BD,SAAUA,IAAa,MAAQA,EAAW,KAC1CC,KAAMA,EACNa,SAAUZ,EACVa,eAAgBZ,EAChBC,IAAKA,EACLC,OAAQA,EACRW,SAAUf,IAAS,KAAO,IAAM,MAC5BtB,KAAKC,qBAET2B,EAAA,OAAA,MACCD,GACCC,EAAA,OAAA,CAAME,MAAM,2BAA2BQ,UAAWC","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.link) .ic-link,\n:host(.link) ::slotted(a) {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.link.dark) .ic-link.dark,\n:host(.link.dark) ::slotted(a) {\n color: var(--ic-color-primary-text);\n}\n\n:host(.link.light) .ic-link.light,\n:host(.link.light) ::slotted(a) {\n color: var(--ic-color-white-text);\n}\n\n:host(.link) .ic-link:visited,\n:host(.link) ::slotted(a:visited) {\n color: var(--ic-hyperlink-visited);\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:hover),\n:host(.link) ::slotted(a:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) ::slotted(a:hover) {\n outline: none;\n}\n\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.link) .ic-link:active,\n:host(.link) .ic-link:focus:active,\n:host(.link) .ic-link:visited:active,\n:host(.link) ::slotted(a:active),\n:host(.link) ::slotted(a:focus:active),\n:host(.link) ::slotted(a:visited:active) {\n text-decoration: none;\n}\n\n.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink);\n}\n\n.ic-link.dark > .ic-link-open-in-new-icon {\n fill: var(--ic-color-primary-text);\n}\n\n.ic-link.light > .ic-link-open-in-new-icon {\n fill: var(--ic-color-white-text);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: currentcolor;\n}\n\n.ic-link:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-visited);\n}\n\n.ic-link.light:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-contrast-visited);\n}\n\n:host(.breadcrumb-link) .ic-link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .ic-link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link:visited {\n color: var(--ic-color-primary-text);\n}\n","import { Component, Element, Prop, h, Host, Listen } from \"@stencil/core\";\n\nimport OpenInNew from \"./assets/OpenInNew.svg\";\nimport { getThemeFromContext, inheritAttributes } from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\n/**\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n\n@Component({\n tag: \"ic-link\",\n styleUrl: \"ic-link.css\",\n shadow: true,\n})\nexport class Link {\n private inheritedAttributes: { [k: string]: unknown } = {};\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcLinkElement;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string = null;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * If `true`, the 'open in new tab/window' icon will be displayed.\n */\n @Prop() showIcon?: boolean;\n\n /**\n * The appearance of the link, e.g. dark, light, or default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const theme = getThemeFromContext(this.el, newTheme || null);\n\n switch (theme) {\n case IcThemeForegroundEnum.Light:\n this.appearance = IcThemeForegroundEnum.Light;\n break;\n case IcThemeForegroundEnum.Dark:\n this.appearance = IcThemeForegroundEnum.Dark;\n break;\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n ]);\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n render() {\n const {\n download,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n showIcon,\n appearance,\n } = this;\n\n return (\n <Host class={{ [\"link\"]: true, [`${appearance}`]: true }}>\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <a\n class={{\n [\"ic-link\"]: href !== null,\n [`${appearance}`]: href !== null,\n }}\n download={download !== false ? download : null}\n href={href}\n hrefLang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n target={target}\n tabindex={href !== null ? \"0\" : \"-1\"}\n {...this.inheritedAttributes}\n >\n <slot />\n {showIcon && (\n <span class=\"ic-link-open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,H as a,g as r}from"./p-f9370be6.js";import{w as s,e as n}from"./p-bf5717ca.js";import{s as o}from"./p-ae6aa67f.js";import{c}from"./p-44512ebe.js";import{i as l}from"./p-23831891.js";import{I as d}from"./p-6f57b13c.js";const p=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/>\n <title>neutral icon</title>\n</svg>`;const u=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>\n <title>info icon</title>\n</svg>`;const m='/*! 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}.container{min-height:56px;border-radius:var(--ic-border-radius);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-architectural-40)}.container-info{background-color:var(--ic-status-info-background)}.container-warning{background-color:var(--ic-status-warning-background)}.container-error{background-color:var(--ic-status-error-background)}.container-success{background-color:var(--ic-status-success-background)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-architectural-500)}.divider-info{background-color:var(--ic-status-info)}.divider-warning{background-color:var(--ic-status-warning-mid)}.divider-error{background-color:var(--ic-status-error)}.divider-success{background-color:var(--ic-status-success)}.alert-icon{height:var(--ic-space-lg);width:22px;margin-left:18px}.icon-neutral>svg{fill:var(--ic-architectural-500)}:host([variant="info"]) .alert-icon svg{fill:var(--ic-status-info)}:host([variant="warning"]) .alert-icon svg{fill:var(--ic-status-warning-mid)}:host([variant="error"]) .alert-icon svg{fill:var(--ic-status-error)}:host([variant="success"]) .alert-icon svg{fill:var(--ic-status-success)}.alert-content{display:flex;align-items:center;margin-left:10px;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1}.alert-message-title-above{display:inline;font-size:0}.alert-title{margin-right:var(--ic-space-xs)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-6px;padding:6px;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon svg{width:18px;height:18px}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start;font-size:1px}.alert-title{white-space:normal}.alert-action-container{margin-bottom:14px}}@media (forced-colors: active){.container{border:var(--ic-hc-border)}}';const h={neutral:p,info:u,warning:s,error:n,success:o};const g=class{constructor(i){e(this,i);this.dismiss=t(this,"dismiss",7);this.icDismiss=t(this,"icDismiss",7);this.dismissAction=()=>{this.dismiss.emit();this.icDismiss.emit()};this.variant="neutral";this.heading="";this.message=undefined;this.titleAbove=false;this.dismissible=false;this.announced=true;this.visible=true;this.alertTitleWrap=false}handleClick(){this.visible=!this.visible}alertTitleShouldWrap(){var e;const t=(e=this.el.shadowRoot.querySelector(".alert-title"))===null||e===void 0?void 0:e.clientHeight;if(t>24)this.alertTitleWrap=true}componentDidLoad(){this.alertTitleShouldWrap()}render(){const{variant:e,heading:t,message:r,titleAbove:s,dismissible:n,announced:o,visible:p}=this;return p&&i(a,{role:o&&"alert",class:{[d.Dark]:true}},i("div",{class:{["container"]:true,[`container-${e}`]:true}},i("div",{class:"alert-icon-container"},i("div",{class:{["divider"]:true,[`divider-${e}`]:true}}),i("span",{class:{["alert-icon"]:true,["svg-container"]:true,[`icon-${e}`]:true},innerHTML:h[e]})),i("div",{class:"alert-content"},i("div",{class:{["alert-message"]:true,["alert-message-title-above"]:s||this.alertTitleWrap}},t&&i("ic-typography",{class:{["alert-title"]:true,["alert-title-above"]:s||this.alertTitleWrap},variant:"subtitle-large"},i("p",null,t)),i("slot",{name:"message"},i("ic-typography",{variant:"body"},r))),l(this.el,"action")&&i("div",{class:"alert-action-container"},i("slot",{name:"action"}))),i("div",{class:"dismiss-icon-container"},n&&i("ic-button",{class:{["svg-container"]:true,["dismiss-icon"]:true},innerHTML:c,onClick:this.dismissAction,variant:"icon",appearance:d.Dark,title:"dismiss"}))))}get el(){return r(this)}};g.style=m;export{g as ic_alert};
2
- //# sourceMappingURL=p-7881b94e.entry.js.map
1
+ import{r as e,c as t,h as i,H as a,g as r}from"./p-f9370be6.js";import{w as s,e as n}from"./p-bf5717ca.js";import{s as o}from"./p-ae6aa67f.js";import{c}from"./p-44512ebe.js";import{i as l}from"./p-a8ac8f72.js";import{I as d}from"./p-6f57b13c.js";const p=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/>\n <title>neutral icon</title>\n</svg>`;const u=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>\n <title>info icon</title>\n</svg>`;const m='/*! 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}.container{min-height:56px;border-radius:var(--ic-border-radius);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-architectural-40)}.container-info{background-color:var(--ic-status-info-background)}.container-warning{background-color:var(--ic-status-warning-background)}.container-error{background-color:var(--ic-status-error-background)}.container-success{background-color:var(--ic-status-success-background)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-architectural-500)}.divider-info{background-color:var(--ic-status-info)}.divider-warning{background-color:var(--ic-status-warning-mid)}.divider-error{background-color:var(--ic-status-error)}.divider-success{background-color:var(--ic-status-success)}.alert-icon{height:var(--ic-space-lg);width:22px;margin-left:18px}.icon-neutral>svg{fill:var(--ic-architectural-500)}:host([variant="info"]) .alert-icon svg{fill:var(--ic-status-info)}:host([variant="warning"]) .alert-icon svg{fill:var(--ic-status-warning-mid)}:host([variant="error"]) .alert-icon svg{fill:var(--ic-status-error)}:host([variant="success"]) .alert-icon svg{fill:var(--ic-status-success)}.alert-content{display:flex;align-items:center;margin-left:10px;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1}.alert-message-title-above{display:inline;font-size:0}.alert-title{margin-right:var(--ic-space-xs)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-6px;padding:6px;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon svg{width:18px;height:18px}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start;font-size:1px}.alert-title{white-space:normal}.alert-action-container{margin-bottom:14px}}@media (forced-colors: active){.container{border:var(--ic-hc-border)}}';const h={neutral:p,info:u,warning:s,error:n,success:o};const g=class{constructor(i){e(this,i);this.dismiss=t(this,"dismiss",7);this.icDismiss=t(this,"icDismiss",7);this.dismissAction=()=>{this.dismiss.emit();this.icDismiss.emit()};this.variant="neutral";this.heading="";this.message=undefined;this.titleAbove=false;this.dismissible=false;this.announced=true;this.visible=true;this.alertTitleWrap=false}handleClick(){this.visible=!this.visible}alertTitleShouldWrap(){var e;const t=(e=this.el.shadowRoot.querySelector(".alert-title"))===null||e===void 0?void 0:e.clientHeight;if(t>24)this.alertTitleWrap=true}componentDidLoad(){this.alertTitleShouldWrap()}render(){const{variant:e,heading:t,message:r,titleAbove:s,dismissible:n,announced:o,visible:p}=this;return p&&i(a,{role:o&&"alert",class:{[d.Dark]:true}},i("div",{class:{["container"]:true,[`container-${e}`]:true}},i("div",{class:"alert-icon-container"},i("div",{class:{["divider"]:true,[`divider-${e}`]:true}}),i("span",{class:{["alert-icon"]:true,["svg-container"]:true,[`icon-${e}`]:true},innerHTML:h[e]})),i("div",{class:"alert-content"},i("div",{class:{["alert-message"]:true,["alert-message-title-above"]:s||this.alertTitleWrap}},t&&i("ic-typography",{class:{["alert-title"]:true,["alert-title-above"]:s||this.alertTitleWrap},variant:"subtitle-large"},i("p",null,t)),i("slot",{name:"message"},i("ic-typography",{variant:"body"},r))),l(this.el,"action")&&i("div",{class:"alert-action-container"},i("slot",{name:"action"}))),i("div",{class:"dismiss-icon-container"},n&&i("ic-button",{class:{["svg-container"]:true,["dismiss-icon"]:true},innerHTML:c,onClick:this.dismissAction,variant:"icon",appearance:d.Dark,title:"dismiss"}))))}get el(){return r(this)}};g.style=m;export{g as ic_alert};
2
+ //# sourceMappingURL=p-27554319.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","src/components/ic-alert/ic-alert.tsx"],"names":["icAlertCss","icon","neutral","neutralIcon","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","Alert","this","dismissAction","dismiss","emit","icDismiss","[object Object]","visible","titleHeight","_a","el","shadowRoot","querySelector","clientHeight","alertTitleWrap","alertTitleShouldWrap","variant","heading","message","titleAbove","dismissible","announced","h","Host","role","class","IcThemeForegroundEnum","Dark","innerHTML","name","isSlotUsed","closeIcon","onClick","appearance","title"],"mappings":"6gCAAA,MAAMA,EAAa,6qJCqBnB,MAAMC,EAAO,CACXC,QAASC,EACTC,KAAMC,EACNC,QAASC,EACTC,MAAOC,EACPC,QAASC,SAYEC,EAAK,qGA8CRC,KAAAC,cAAgB,KACtBD,KAAKE,QAAQC,OACbH,KAAKI,UAAUD,qBA1CmB,uBAIT,0CAQI,uBAIC,qBAIF,kBAEF,yBAEO,MAGnCE,cACEL,KAAKM,SAAWN,KAAKM,QAiBfD,6BACN,MAAME,GACJC,EAAAR,KAAKS,GAAGC,WAAWC,cAAc,mBAAe,MAAAH,SAAA,OAAA,EAAAA,EAAEI,aACpD,GAAIL,EAAc,GAAIP,KAAKa,eAAiB,KAG9CR,mBACEL,KAAKc,uBAGPT,SACE,MAAMU,QACJA,EAAOC,QACPA,EAAOC,QACPA,EAAOC,WACPA,EAAUC,YACVA,EAAWC,UACXA,EAASd,QACTA,GACEN,KAEJ,OACEM,GACEe,EAACC,EAAI,CACHC,KAAMH,GAAa,QACnBI,MAAO,CACLnB,CAACoB,EAAsBC,MAAO,OAGhCL,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,aAAc,KACfA,CAAC,aAAaU,KAAY,OAG5BM,EAAA,MAAA,CAAKG,MAAM,wBACTH,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,WAAY,KACbA,CAAC,WAAWU,KAAY,QAG5BM,EAAA,OAAA,CACEG,MAAO,CACLnB,CAAC,cAAe,KAChBA,CAAC,iBAAkB,KACnBA,CAAC,QAAQU,KAAY,MAEvBY,UAAWvC,EAAK2B,MAGpBM,EAAA,MAAA,CAAKG,MAAM,iBACTH,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,iBAAkB,KACnBA,CAAC,6BACCa,GAAclB,KAAKa,iBAGtBG,GACCK,EAAA,gBAAA,CACEG,MAAO,CACLnB,CAAC,eAAgB,KACjBA,CAAC,qBAAsBa,GAAclB,KAAKa,gBAE5CE,QAAQ,kBAERM,EAAA,IAAA,KAAIL,IAGRK,EAAA,OAAA,CAAMO,KAAK,WACTP,EAAA,gBAAA,CAAeN,QAAQ,QAAQE,KAGlCY,EAAW7B,KAAKS,GAAI,WACnBY,EAAA,MAAA,CAAKG,MAAM,0BACTH,EAAA,OAAA,CAAMO,KAAK,aAIjBP,EAAA,MAAA,CAAKG,MAAM,0BACRL,GACCE,EAAA,YAAA,CACEG,MAAO,CACLnB,CAAC,iBAAkB,KACnBA,CAAC,gBAAiB,MAEpBsB,UAAWG,EACXC,QAAS/B,KAAKC,cACdc,QAAQ,OACRiB,WAAYP,EAAsBC,KAClCO,MAAM","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"]}
1
+ {"version":3,"sources":["src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","src/components/ic-alert/ic-alert.tsx"],"names":["icAlertCss","icon","neutral","neutralIcon","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","Alert","this","dismissAction","dismiss","emit","icDismiss","[object Object]","visible","titleHeight","_a","el","shadowRoot","querySelector","clientHeight","alertTitleWrap","alertTitleShouldWrap","variant","heading","message","titleAbove","dismissible","announced","h","Host","role","class","IcThemeForegroundEnum","Dark","innerHTML","name","isSlotUsed","closeIcon","onClick","appearance","title"],"mappings":"6gCAAA,MAAMA,EAAa,6qJCqBnB,MAAMC,EAAO,CACXC,QAASC,EACTC,KAAMC,EACNC,QAASC,EACTC,MAAOC,EACPC,QAASC,SAYEC,EAAK,qGA8CRC,KAAAC,cAAgB,KACtBD,KAAKE,QAAQC,OACbH,KAAKI,UAAUD,qBA1CmB,uBAIT,0CAQI,uBAIC,qBAIF,kBAEF,yBAEO,MAGnCE,cACEL,KAAKM,SAAWN,KAAKM,QAiBfD,6BACN,MAAME,GACJC,EAAAR,KAAKS,GAAGC,WAAWC,cAAc,mBAAe,MAAAH,SAAA,OAAA,EAAAA,EAAEI,aACpD,GAAIL,EAAc,GAAIP,KAAKa,eAAiB,KAG9CR,mBACEL,KAAKc,uBAGPT,SACE,MAAMU,QACJA,EAAOC,QACPA,EAAOC,QACPA,EAAOC,WACPA,EAAUC,YACVA,EAAWC,UACXA,EAASd,QACTA,GACEN,KAEJ,OACEM,GACEe,EAACC,EAAI,CACHC,KAAMH,GAAa,QACnBI,MAAO,CACLnB,CAACoB,EAAsBC,MAAO,OAGhCL,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,aAAc,KACfA,CAAC,aAAaU,KAAY,OAG5BM,EAAA,MAAA,CAAKG,MAAM,wBACTH,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,WAAY,KACbA,CAAC,WAAWU,KAAY,QAG5BM,EAAA,OAAA,CACEG,MAAO,CACLnB,CAAC,cAAe,KAChBA,CAAC,iBAAkB,KACnBA,CAAC,QAAQU,KAAY,MAEvBY,UAAWvC,EAAK2B,MAGpBM,EAAA,MAAA,CAAKG,MAAM,iBACTH,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,iBAAkB,KACnBA,CAAC,6BACCa,GAAclB,KAAKa,iBAGtBG,GACCK,EAAA,gBAAA,CACEG,MAAO,CACLnB,CAAC,eAAgB,KACjBA,CAAC,qBAAsBa,GAAclB,KAAKa,gBAE5CE,QAAQ,kBAERM,EAAA,IAAA,KAAIL,IAGRK,EAAA,OAAA,CAAMO,KAAK,WACTP,EAAA,gBAAA,CAAeN,QAAQ,QAAQE,KAGlCY,EAAW7B,KAAKS,GAAI,WACnBY,EAAA,MAAA,CAAKG,MAAM,0BACTH,EAAA,OAAA,CAAMO,KAAK,aAIjBP,EAAA,MAAA,CAAKG,MAAM,0BACRL,GACCE,EAAA,YAAA,CACEG,MAAO,CACLnB,CAAC,iBAAkB,KACnBA,CAAC,gBAAiB,MAEpBsB,UAAWG,EACXC,QAAS/B,KAAKC,cACdc,QAAQ,OACRiB,WAAYP,EAAsBC,KAClCO,MAAM","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"]}
@@ -1,2 +1,2 @@
1
- import{r as i,c as e,h as t,g as o}from"./p-f9370be6.js";import{a,i as s}from"./p-23831891.js";import"./p-6f57b13c.js";const n=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>\n</svg>\n`;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{display:inline-block}.chip{display:flex;padding:var(--ic-space-xxs);font-size:14px;border-radius:80px;text-align:center;align-items:center;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}.chip.small{padding:var(--ic-space-xxxs)}.chip.large{padding:var(--ic-space-xs)}.label{padding:0 var(--ic-space-xs)}.chip.hovered:not(:focus-within){background-color:var(--ic-architectural-300)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}.chip.outline.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}ic-tooltip:focus-within{z-index:1}.filled{background-color:var(--ic-architectural-200);color:black;border:none}.filled.disabled{background-color:var(--ic-architectural-100)}.outline{color:var(--ic-architectural-900);border:1px solid var(--ic-architectural-900);padding:calc(var(--ic-space-xxs) - 1px)}.outline.small{padding:calc(var(--ic-space-xxxs) - 1px)}.outline.large{padding:calc(var(--ic-space-xs) - 1px)}.outline.disabled{border:var(--ic-border-disabled);background:none}.chip.disabled ic-typography{color:var(--ic-architectural-200)}.dismiss-icon{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:20px}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-architectural-200)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-architectural-200)}@media (forced-colors: active){.chip{border:var(--ic-hc-border)}.filled.small{padding:calc(var(--ic-space-xxxs) - 1px)}.filled{padding:calc(var(--ic-space-xxxs) + 1px)}.filled.large{padding:calc(var(--ic-space-xs) - 1px)}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}';const c=class{constructor(t){i(this,t);this.dismiss=e(this,"dismiss",7);this.dismissAction=()=>{this.dismiss.emit()};this.mouseEnterHandler=()=>{this.isHovered=true};this.mouseLeaveHandler=()=>{this.isHovered=false};this.label=undefined;this.appearance="filled";this.size="default";this.dismissible=false;this.disabled=false;this.visible=true;this.isHovered=false}handleClick(){this.visible=!this.visible}componentDidLoad(){var i;this.dismissible&&((i=this.el.shadowRoot.querySelector("span.ic-tooltip-label"))===null||i===void 0?void 0:i.setAttribute("aria-hidden","true"));a([{prop:this.label,propName:"label"}],"Chip")}render(){const{label:i,appearance:e,size:o,dismissible:a,visible:r,disabled:c,isHovered:l}=this;return r&&t("div",{class:{["chip"]:true,[`${e}`]:true,[`${o}`]:true,["disabled"]:c,["dismissible"]:a,["hovered"]:l}},s(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("ic-typography",{variant:"label","apply-vertical-margins":false,class:"label"},t("span",null,i)),a&&t("ic-tooltip",{label:"Dismiss",target:"dismiss-icon",class:{["tooltip-disabled"]:c}},t("button",{id:"dismiss-icon",class:{["dismiss-icon"]:true},"aria-label":`Dismiss ${i} chip`,disabled:c,tabindex:c?-1:0,onClick:this.dismissAction,onMouseEnter:this.mouseEnterHandler,onMouseLeave:this.mouseLeaveHandler,innerHTML:n})))}get el(){return o(this)}};c.style=r;export{c as ic_chip};
2
- //# sourceMappingURL=p-fbde8a26.entry.js.map
1
+ import{r as i,c as e,h as t,g as o}from"./p-f9370be6.js";import{a,i as s}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const n=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>\n</svg>\n`;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{display:inline-block}.chip{display:flex;padding:var(--ic-space-xxs);font-size:14px;border-radius:80px;text-align:center;align-items:center;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}.chip.small{padding:var(--ic-space-xxxs)}.chip.large{padding:var(--ic-space-xs)}.label{padding:0 var(--ic-space-xs)}.chip.hovered:not(:focus-within){background-color:var(--ic-architectural-300)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}.chip.outline.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}ic-tooltip:focus-within{z-index:1}.filled{background-color:var(--ic-architectural-200);color:black;border:none}.filled.disabled{background-color:var(--ic-architectural-100)}.outline{color:var(--ic-architectural-900);border:1px solid var(--ic-architectural-900);padding:calc(var(--ic-space-xxs) - 1px)}.outline.small{padding:calc(var(--ic-space-xxxs) - 1px)}.outline.large{padding:calc(var(--ic-space-xs) - 1px)}.outline.disabled{border:var(--ic-border-disabled);background:none}.chip.disabled ic-typography{color:var(--ic-architectural-200)}.dismiss-icon{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:20px}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-architectural-200)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-architectural-200)}@media (forced-colors: active){.chip{border:var(--ic-hc-border)}.filled.small{padding:calc(var(--ic-space-xxxs) - 1px)}.filled{padding:calc(var(--ic-space-xxxs) + 1px)}.filled.large{padding:calc(var(--ic-space-xs) - 1px)}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}';const c=class{constructor(t){i(this,t);this.dismiss=e(this,"dismiss",7);this.dismissAction=()=>{this.dismiss.emit()};this.mouseEnterHandler=()=>{this.isHovered=true};this.mouseLeaveHandler=()=>{this.isHovered=false};this.label=undefined;this.appearance="filled";this.size="default";this.dismissible=false;this.disabled=false;this.visible=true;this.isHovered=false}handleClick(){this.visible=!this.visible}componentDidLoad(){var i;this.dismissible&&((i=this.el.shadowRoot.querySelector("span.ic-tooltip-label"))===null||i===void 0?void 0:i.setAttribute("aria-hidden","true"));a([{prop:this.label,propName:"label"}],"Chip")}render(){const{label:i,appearance:e,size:o,dismissible:a,visible:r,disabled:c,isHovered:l}=this;return r&&t("div",{class:{["chip"]:true,[`${e}`]:true,[`${o}`]:true,["disabled"]:c,["dismissible"]:a,["hovered"]:l}},s(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("ic-typography",{variant:"label","apply-vertical-margins":false,class:"label"},t("span",null,i)),a&&t("ic-tooltip",{label:"Dismiss",target:"dismiss-icon",class:{["tooltip-disabled"]:c}},t("button",{id:"dismiss-icon",class:{["dismiss-icon"]:true},"aria-label":`Dismiss ${i} chip`,disabled:c,tabindex:c?-1:0,onClick:this.dismissAction,onMouseEnter:this.mouseEnterHandler,onMouseLeave:this.mouseLeaveHandler,innerHTML:n})))}get el(){return o(this)}};c.style=r;export{c as ic_chip};
2
+ //# sourceMappingURL=p-2ca96f69.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"names":["icChipCss","Chip","this","dismissAction","dismiss","emit","mouseEnterHandler","isHovered","mouseLeaveHandler","[object Object]","visible","dismissible","_a","el","shadowRoot","querySelector","setAttribute","onComponentRequiredPropUndefined","prop","label","propName","appearance","size","disabled","h","class","isSlotUsed","name","variant","apply-vertical-margins","target","id","aria-label","tabindex","onClick","onMouseEnter","onMouseLeave","innerHTML","dismissIcon"],"mappings":"qdAAA,MAAMA,EAAY,65ICyBLC,EAAI,gEAqCPC,KAAAC,cAAgB,KACtBD,KAAKE,QAAQC,QAGPH,KAAAI,kBAAoB,KAC1BJ,KAAKK,UAAY,MAGXL,KAAAM,kBAAoB,KAC1BN,KAAKK,UAAY,4CApCqB,mBAIX,2BAIG,oBAIH,mBAED,oBAEE,MAG9BE,cACEP,KAAKQ,SAAWR,KAAKQ,QAmBvBD,yBACEP,KAAKS,eACHC,EAAAV,KAAKW,GAAGC,WACLC,cAAc,4BAAwB,MAAAH,SAAA,OAAA,EAAAA,EACrCI,aAAa,cAAe,SAClCC,EACE,CAAC,CAAEC,KAAMhB,KAAKiB,MAAOC,SAAU,UAC/B,QAIJX,SACE,MAAMU,MACJA,EAAKE,WACLA,EAAUC,KACVA,EAAIX,YACJA,EAAWD,QACXA,EAAOa,SACPA,EAAQhB,UACRA,GACEL,KAEJ,OACEQ,GACEc,EAAA,MAAA,CACEC,MAAO,CACLhB,CAAC,QAAS,KACVA,CAAC,GAAGY,KAAe,KACnBZ,CAAC,GAAGa,KAAS,KACbb,CAAC,YAAac,EACdd,CAAC,eAAgBE,EACjBF,CAAC,WAAYF,IAGdmB,EAAWxB,KAAKW,GAAI,SACnBW,EAAA,MAAA,CAAKC,MAAM,QACTD,EAAA,OAAA,CAAMG,KAAK,UAGfH,EAAA,gBAAA,CACEI,QAAQ,QAAOC,yBACS,MACxBJ,MAAM,SAEND,EAAA,OAAA,KAAOL,IAERR,GACCa,EAAA,aAAA,CACEL,MAAM,UACNW,OAAO,eACPL,MAAO,CAAEhB,CAAC,oBAAqBc,IAE/BC,EAAA,SAAA,CACEO,GAAG,eACHN,MAAO,CACLhB,CAAC,gBAAiB,MACnBuB,aACW,WAAWb,SACvBI,SAAUA,EACVU,SAAUV,GAAY,EAAI,EAC1BW,QAAShC,KAAKC,cACdgC,aAAcjC,KAAKI,kBACnB8B,aAAclC,KAAKM,kBACnB6B,UAAWC","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: inline-block;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 14px;\n border-radius: 80px;\n text-align: center;\n align-items: center;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--ic-architectural-200);\n color: black;\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline {\n color: var(--ic-architectural-900);\n border: 1px solid var(--ic-architectural-900);\n padding: calc(var(--ic-space-xxs) - 1px);\n}\n\n.outline.small {\n padding: calc(var(--ic-space-xxxs) - 1px);\n}\n\n.outline.large {\n padding: calc(var(--ic-space-xs) - 1px);\n}\n\n.outline.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-200);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: 20px;\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - 1px);\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + 1px);\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - 1px);\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance, IcChipSizes } from \"./ic-chip.types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: true,\n})\nexport class Chip {\n @Element() el: HTMLIcChipElement;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n /**\n * The emphasis of the chip.\n */\n @Prop() appearance?: IcChipAppearance = \"filled\";\n /**\n * The size of the chip.\n */\n @Prop() size?: IcChipSizes = \"default\";\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n\n @State() visible: boolean = true;\n\n @State() isHovered: boolean = false;\n\n @Listen(\"dismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() dismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.isHovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.isHovered = false;\n };\n\n componentDidLoad(): void {\n this.dismissible &&\n this.el.shadowRoot\n .querySelector(\"span.ic-tooltip-label\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n render() {\n const {\n label,\n appearance,\n size,\n dismissible,\n visible,\n disabled,\n isHovered,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n [\"chip\"]: true,\n [`${appearance}`]: true,\n [`${size}`]: true,\n [\"disabled\"]: disabled,\n [\"dismissible\"]: dismissible,\n [\"hovered\"]: isHovered,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class=\"label\"\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label=\"Dismiss\"\n target=\"dismiss-icon\"\n class={{ [\"tooltip-disabled\"]: disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class={{\n [\"dismiss-icon\"]: true,\n }}\n aria-label={`Dismiss ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n </div>\n )\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"names":["icChipCss","Chip","this","dismissAction","dismiss","emit","mouseEnterHandler","isHovered","mouseLeaveHandler","[object Object]","visible","dismissible","_a","el","shadowRoot","querySelector","setAttribute","onComponentRequiredPropUndefined","prop","label","propName","appearance","size","disabled","h","class","isSlotUsed","name","variant","apply-vertical-margins","target","id","aria-label","tabindex","onClick","onMouseEnter","onMouseLeave","innerHTML","dismissIcon"],"mappings":"qdAAA,MAAMA,EAAY,65ICyBLC,EAAI,gEAqCPC,KAAAC,cAAgB,KACtBD,KAAKE,QAAQC,QAGPH,KAAAI,kBAAoB,KAC1BJ,KAAKK,UAAY,MAGXL,KAAAM,kBAAoB,KAC1BN,KAAKK,UAAY,4CApCqB,mBAIX,2BAIG,oBAIH,mBAED,oBAEE,MAG9BE,cACEP,KAAKQ,SAAWR,KAAKQ,QAmBvBD,yBACEP,KAAKS,eACHC,EAAAV,KAAKW,GAAGC,WACLC,cAAc,4BAAwB,MAAAH,SAAA,OAAA,EAAAA,EACrCI,aAAa,cAAe,SAClCC,EACE,CAAC,CAAEC,KAAMhB,KAAKiB,MAAOC,SAAU,UAC/B,QAIJX,SACE,MAAMU,MACJA,EAAKE,WACLA,EAAUC,KACVA,EAAIX,YACJA,EAAWD,QACXA,EAAOa,SACPA,EAAQhB,UACRA,GACEL,KAEJ,OACEQ,GACEc,EAAA,MAAA,CACEC,MAAO,CACLhB,CAAC,QAAS,KACVA,CAAC,GAAGY,KAAe,KACnBZ,CAAC,GAAGa,KAAS,KACbb,CAAC,YAAac,EACdd,CAAC,eAAgBE,EACjBF,CAAC,WAAYF,IAGdmB,EAAWxB,KAAKW,GAAI,SACnBW,EAAA,MAAA,CAAKC,MAAM,QACTD,EAAA,OAAA,CAAMG,KAAK,UAGfH,EAAA,gBAAA,CACEI,QAAQ,QAAOC,yBACS,MACxBJ,MAAM,SAEND,EAAA,OAAA,KAAOL,IAERR,GACCa,EAAA,aAAA,CACEL,MAAM,UACNW,OAAO,eACPL,MAAO,CAAEhB,CAAC,oBAAqBc,IAE/BC,EAAA,SAAA,CACEO,GAAG,eACHN,MAAO,CACLhB,CAAC,gBAAiB,MACnBuB,aACW,WAAWb,SACvBI,SAAUA,EACVU,SAAUV,GAAY,EAAI,EAC1BW,QAAShC,KAAKC,cACdgC,aAAcjC,KAAKI,kBACnB8B,aAAclC,KAAKM,kBACnB6B,UAAWC","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 14px;\n border-radius: 80px;\n text-align: center;\n align-items: center;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--ic-architectural-200);\n color: black;\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline {\n color: var(--ic-architectural-900);\n border: 1px solid var(--ic-architectural-900);\n padding: calc(var(--ic-space-xxs) - 1px);\n}\n\n.outline.small {\n padding: calc(var(--ic-space-xxxs) - 1px);\n}\n\n.outline.large {\n padding: calc(var(--ic-space-xs) - 1px);\n}\n\n.outline.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-200);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: 20px;\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - 1px);\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + 1px);\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - 1px);\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance, IcChipSizes } from \"./ic-chip.types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: true,\n})\nexport class Chip {\n @Element() el: HTMLIcChipElement;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n /**\n * The emphasis of the chip.\n */\n @Prop() appearance?: IcChipAppearance = \"filled\";\n /**\n * The size of the chip.\n */\n @Prop() size?: IcChipSizes = \"default\";\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n\n @State() visible: boolean = true;\n\n @State() isHovered: boolean = false;\n\n @Listen(\"dismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() dismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.isHovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.isHovered = false;\n };\n\n componentDidLoad(): void {\n this.dismissible &&\n this.el.shadowRoot\n .querySelector(\"span.ic-tooltip-label\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n render() {\n const {\n label,\n appearance,\n size,\n dismissible,\n visible,\n disabled,\n isHovered,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n [\"chip\"]: true,\n [`${appearance}`]: true,\n [`${size}`]: true,\n [\"disabled\"]: disabled,\n [\"dismissible\"]: dismissible,\n [\"hovered\"]: isHovered,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class=\"label\"\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label=\"Dismiss\"\n target=\"dismiss-icon\"\n class={{ [\"tooltip-disabled\"]: disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class={{\n [\"dismiss-icon\"]: true,\n }}\n aria-label={`Dismiss ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n </div>\n )\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as a,H as s,g as e}from"./p-f9370be6.js";import{t as o,G as n,i as r}from"./p-23831891.js";import"./p-6f57b13c.js";const l=":host{display:block}.popout-modal{position:absolute;top:0;right:0;bottom:0;left:0}.popout-menu{position:fixed;top:0;right:0;width:256px;bottom:0;background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);box-shadow:var(--ic-elevation-overlay);overflow-y:auto;overflow-x:hidden;z-index:calc(var(--ic-z-index-overlay) / 2)}:host(.inline) .popout-menu{position:absolute}.menu-close-button-container{position:relative;left:190px;padding:var(--ic-space-md) 0}.nav-group-first{padding-bottom:0}.menu-buttons-container{padding:var(--ic-space-sm) 0;border-bottom:1px solid var(--ic-architectural-200)}.menu-buttons-container-nav-item-above{margin-top:var(--ic-space-md);border-top:1px solid var(--ic-architectural-200)}.menu-status-version-container{display:inline-flex;margin:var(--ic-space-md) var(--ic-space-md) var(--ic-space-xl)}.menu-status{background-color:var(--ic-architectural-500);color:var(--ic-color-white-text);border-radius:80px;width:-moz-fit-content;width:fit-content;padding:var(--ic-space-xxs) var(--ic-space-sm);margin-right:var(--ic-space-xs)}.menu-version{border-radius:16px;background-color:var(--ic-architectural-100);padding:var(--ic-space-xxs) var(--ic-space-sm)}.menu-status-text,.menu-version-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:90px}.navigation-landmark-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden}";const c=class{constructor(a){t(this,a);this.icNavigationMenuClose=i(this,"icNavigationMenuClose",7);this.hasButtons=false;this.hasNavigation=false;this.navItemAboveButtons=false;this.navGroupFirst=false;this.lastTabStop=null;this.closeButton=null;this.closeMenu=()=>{this.icNavigationMenuClose.emit()};this.focusCloseButton=()=>{if(this.closeButton.setFocus){this.closeButton.setFocus()}};this.focusLastTabStop=()=>{let t;if(this.lastTabStop!==null){switch(this.lastTabStop.tagName){case"IC-NAVIGATION-BUTTON":t=this.lastTabStop;t.setFocus();break;case"IC-NAVIGATION-ITEM":t=this.lastTabStop;t.setFocus();break;case"IC-NAVIGATION-GROUP":t=this.lastTabStop;t.setFocus();break;case"A":this.lastTabStop.focus();break}}};this.version="";this.status=""}navItemClickHandler(){this.closeMenu()}handleKeyDown(t){if(t.key==="Tab"){if(t.shiftKey){if(document.activeElement===this.navBarEl){t.preventDefault();this.focusLastTabStop()}}else if(document.activeElement===this.lastTabStop||this.lastTabStop===null){t.preventDefault();this.focusCloseButton()}}else if(t.key==="Escape"){this.closeMenu()}}componentWillLoad(){this.navBarEl=document.querySelector("ic-top-navigation");const t=o(this.el,"navigation");if(t){this.hasNavigation=true;const i=t[t.length-1];if(i.tagName==="IC-NAVIGATION-ITEM"){this.navItemAboveButtons=true}const a=t[0];if(a.tagName==="IC-NAVIGATION-GROUP"){this.navGroupFirst=true}}const i=o(this.el,"buttons");if(i!==null){this.hasButtons=true;this.lastTabStop=i[i.length-1]}else{if(this.hasNavigation){const i=t[t.length-1];const a=n(i,"navigation-item");if(a!==null){this.lastTabStop=a}else{this.lastTabStop=i}}}}componentDidLoad(){this.focusCloseButton()}componentWillRender(){this.hasNavigation=r(this.el,"navigation");this.hasButtons=r(this.el,"buttons")}render(){return a(s,null,a("div",{class:"popout-modal",onClick:this.closeMenu}),a("div",{class:"popout-menu",role:"dialog","aria-modal":"true","aria-label":`${this.hasNavigation?"Navigation":"App"} menu`},a("span",{"aria-hidden":"true",id:"navigation-landmark-text",class:"navigation-landmark-text"},"Main navigation"),a("nav",{"aria-labelledby":"navigation-landmark-text","aria-hidden":this.hasNavigation?"false":"true"},a("div",{class:{["menu-close-button-container"]:true,["nav-group-first"]:this.navGroupFirst}},a("ic-button",{ref:t=>this.closeButton=t,id:"menu-close-button",class:"menu-close-button",variant:"icon",size:"large","aria-label":`Close ${this.hasNavigation?"navigation":"app"} menu`,onClick:this.closeMenu},a("svg",{slot:"icon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z",fill:"#1759BC"})))),this.hasNavigation&&a("slot",{name:"navigation"})),this.hasButtons&&a("div",{class:{["menu-buttons-container"]:true,["menu-buttons-container-nav-item-above"]:this.navItemAboveButtons}},a("slot",{name:"buttons"})),(this.status!==""||this.version!=="")&&a("div",{class:"menu-status-version-container"},this.status!==""&&a("div",{class:"menu-status"},a("ic-typography",{variant:"label-uppercase","aria-label":"app tag",class:"menu-status-text"},this.status)),this.version!==""&&a("div",{class:"menu-version"},a("ic-typography",{variant:"label",class:"menu-version-text","aria-label":"app version"},this.version)))))}get el(){return e(this)}};c.style=l;export{c as ic_navigation_menu};
2
- //# sourceMappingURL=p-dd3c3e3c.entry.js.map
1
+ import{r as t,c as i,h as a,H as s,g as e}from"./p-f9370be6.js";import{t as o,F as n,i as r}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const l=":host{display:block}.popout-modal{position:absolute;top:0;right:0;bottom:0;left:0}.popout-menu{position:fixed;top:0;right:0;width:256px;bottom:0;background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);box-shadow:var(--ic-elevation-overlay);overflow-y:auto;overflow-x:hidden;z-index:calc(var(--ic-z-index-overlay) / 2)}:host(.inline) .popout-menu{position:absolute}.menu-close-button-container{position:relative;left:190px;padding:var(--ic-space-md) 0}.nav-group-first{padding-bottom:0}.menu-buttons-container{padding:var(--ic-space-sm) 0;border-bottom:1px solid var(--ic-architectural-200)}.menu-buttons-container-nav-item-above{margin-top:var(--ic-space-md);border-top:1px solid var(--ic-architectural-200)}.menu-status-version-container{display:inline-flex;margin:var(--ic-space-md) var(--ic-space-md) var(--ic-space-xl)}.menu-status{background-color:var(--ic-architectural-500);color:var(--ic-color-white-text);border-radius:80px;width:-moz-fit-content;width:fit-content;padding:var(--ic-space-xxs) var(--ic-space-sm);margin-right:var(--ic-space-xs)}.menu-version{border-radius:16px;background-color:var(--ic-architectural-100);padding:var(--ic-space-xxs) var(--ic-space-sm)}.menu-status-text,.menu-version-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:90px}.navigation-landmark-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden}";const c=class{constructor(a){t(this,a);this.icNavigationMenuClose=i(this,"icNavigationMenuClose",7);this.hasButtons=false;this.hasNavigation=false;this.navItemAboveButtons=false;this.navGroupFirst=false;this.lastTabStop=null;this.closeButton=null;this.closeMenu=()=>{this.icNavigationMenuClose.emit()};this.focusCloseButton=()=>{if(this.closeButton.setFocus){this.closeButton.setFocus()}};this.focusLastTabStop=()=>{let t;if(this.lastTabStop!==null){switch(this.lastTabStop.tagName){case"IC-NAVIGATION-BUTTON":t=this.lastTabStop;t.setFocus();break;case"IC-NAVIGATION-ITEM":t=this.lastTabStop;t.setFocus();break;case"IC-NAVIGATION-GROUP":t=this.lastTabStop;t.setFocus();break;case"A":this.lastTabStop.focus();break}}};this.version="";this.status=""}navItemClickHandler(){this.closeMenu()}handleKeyDown(t){if(t.key==="Tab"){if(t.shiftKey){if(document.activeElement===this.navBarEl){t.preventDefault();this.focusLastTabStop()}}else if(document.activeElement===this.lastTabStop||this.lastTabStop===null){t.preventDefault();this.focusCloseButton()}}else if(t.key==="Escape"){this.closeMenu()}}componentWillLoad(){this.navBarEl=document.querySelector("ic-top-navigation");const t=o(this.el,"navigation");if(t){this.hasNavigation=true;const i=t[t.length-1];if(i.tagName==="IC-NAVIGATION-ITEM"){this.navItemAboveButtons=true}const a=t[0];if(a.tagName==="IC-NAVIGATION-GROUP"){this.navGroupFirst=true}}const i=o(this.el,"buttons");if(i!==null){this.hasButtons=true;this.lastTabStop=i[i.length-1]}else{if(this.hasNavigation){const i=t[t.length-1];const a=n(i,"navigation-item");if(a!==null){this.lastTabStop=a}else{this.lastTabStop=i}}}}componentDidLoad(){this.focusCloseButton()}componentWillRender(){this.hasNavigation=r(this.el,"navigation");this.hasButtons=r(this.el,"buttons")}render(){return a(s,null,a("div",{class:"popout-modal",onClick:this.closeMenu}),a("div",{class:"popout-menu",role:"dialog","aria-modal":"true","aria-label":`${this.hasNavigation?"Navigation":"App"} menu`},a("span",{"aria-hidden":"true",id:"navigation-landmark-text",class:"navigation-landmark-text"},"Main navigation"),a("nav",{"aria-labelledby":"navigation-landmark-text","aria-hidden":this.hasNavigation?"false":"true"},a("div",{class:{["menu-close-button-container"]:true,["nav-group-first"]:this.navGroupFirst}},a("ic-button",{ref:t=>this.closeButton=t,id:"menu-close-button",class:"menu-close-button",variant:"icon",size:"large","aria-label":`Close ${this.hasNavigation?"navigation":"app"} menu`,onClick:this.closeMenu},a("svg",{slot:"icon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z",fill:"#1759BC"})))),this.hasNavigation&&a("slot",{name:"navigation"})),this.hasButtons&&a("div",{class:{["menu-buttons-container"]:true,["menu-buttons-container-nav-item-above"]:this.navItemAboveButtons}},a("slot",{name:"buttons"})),(this.status!==""||this.version!=="")&&a("div",{class:"menu-status-version-container"},this.status!==""&&a("div",{class:"menu-status"},a("ic-typography",{variant:"label-uppercase","aria-label":"app tag",class:"menu-status-text"},this.status)),this.version!==""&&a("div",{class:"menu-version"},a("ic-typography",{variant:"label",class:"menu-version-text","aria-label":"app version"},this.version)))))}get el(){return e(this)}};c.style=l;export{c as ic_navigation_menu};
2
+ //# sourceMappingURL=p-3f4d632c.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,h as t,H as i,g as n}from"./p-f9370be6.js";import{k as o,m as a,a as s,n as r}from"./p-a8ac8f72.js";import{I as l}from"./p-6f57b13c.js";const d='/*! 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;margin-right:var(--ic-space-xs);list-style:none}:host(.in-side-menu){margin-right:0}';const p=class{constructor(t){e(this,t);this.inheritedAttributes={};this.label=undefined;this.href=undefined;this.target=undefined;this.rel=undefined;this.download=false;this.hreflang=undefined;this.referrerpolicy=undefined;this.mode="navbar";this.initialAppearance=o()}navBarMenuOpenHandler(){this.mode="menu"}navBarMenuCloseHandler(){this.mode="navbar"}themeChangeHandler(e){const t=e.detail;this.initialAppearance=t.mode}async setFocus(){if(this.buttonEl){this.buttonEl.setFocus()}}componentWillLoad(){this.inheritedAttributes=a(this.el,[...r,"title"])}componentDidLoad(){s([{prop:this.label,propName:"label"}],"Navigation Button")}render(){const{href:e,target:n,rel:o,download:a,referrerpolicy:s}=this;let r="";let d="";let p="icon";let b=this.initialAppearance;let u="large";let m=false;if(this.mode==="menu"){r=this.label;p="tertiary";b=l.Default;u="default";m=true;d="popout-menu-button"}const c={variant:p,appearance:b,size:u,href:e,target:n,rel:o,download:a,referrerpolicy:s,fullWidth:m};return t(i,{class:{["in-side-menu"]:this.mode==="menu"}},t("ic-button",Object.assign({class:d,"aria-label":this.label,ref:e=>this.buttonEl=e},c,this.inheritedAttributes),r,t("slot",{slot:"icon",name:"icon"})))}get el(){return n(this)}};p.style=d;export{p as ic_navigation_button};
2
+ //# sourceMappingURL=p-3f9cdcdd.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-navigation-button/ic-navigation-button.css?tag=ic-navigation-button&encapsulation=shadow","src/components/ic-navigation-button/ic-navigation-button.tsx"],"names":["icNavigationButtonCss","NavigationButton","this","inheritedAttributes","getThemeForegroundColor","[object Object]","mode","ev","theme","detail","initialAppearance","buttonEl","setFocus","inheritAttributes","el","IC_INHERITED_ARIA","onComponentRequiredPropUndefined","prop","label","propName","href","target","rel","download","referrerpolicy","className","variant","appearance","size","fullWidth","IcThemeForegroundEnum","Default","buttonProps","h","Host","class","Object","assign","aria-label","ref","slot","name"],"mappings":"iJAAA,MAAMA,EAAwB,k9ECiCjBC,EAAgB,+BAwCnBC,KAAAC,oBAAgD,mGAlBlB,sEAaJ,gCAELC,IAM7BC,wBACEH,KAAKI,KAAO,OAIdD,yBACEH,KAAKI,KAAO,SAIdD,mBAAmBE,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BP,KAAKQ,kBAAoBF,EAAMF,KAOjCD,iBACE,GAAIH,KAAKS,SAAU,CACjBT,KAAKS,SAASC,YAIlBP,oBACEH,KAAKC,oBAAsBU,EAAkBX,KAAKY,GAAI,IACjDC,EACH,UAIJV,mBACEW,EACE,CAAC,CAAEC,KAAMf,KAAKgB,MAAOC,SAAU,UAC/B,qBAIJd,SACE,MAAMe,KAAEA,EAAIC,OAAEA,EAAMC,IAAEA,EAAGC,SAAEA,EAAQC,eAAEA,GAAmBtB,KAExD,IAAIgB,EAAQ,GACZ,IAAIO,EAAY,GAChB,IAAIC,EAA+B,OACnC,IAAIC,EACFzB,KAAKQ,kBACP,IAAIkB,EAA4B,QAChC,IAAIC,EAAY,MAEhB,GAAI3B,KAAKI,OAAS,OAAQ,CACxBY,EAAQhB,KAAKgB,MACbQ,EAAU,WACVC,EAAaG,EAAsBC,QACnCH,EAAO,UACPC,EAAY,KACZJ,EAAY,qBAGd,MAAMO,EAAc,CAClBN,QAAAA,EACAC,WAAAA,EACAC,KAAAA,EACAR,KAAAA,EACAC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,EACAC,eAAAA,EACAK,UAAAA,GAGF,OACEI,EAACC,EAAI,CAACC,MAAO,CAAE9B,CAAC,gBAAiBH,KAAKI,OAAS,SAC7C2B,EAAA,YAAAG,OAAAC,OAAA,CACEF,MAAOV,EAASa,aACJpC,KAAKgB,MACjBqB,IAAMzB,GAAQZ,KAAKS,SAAWG,GAC1BkB,EACA9B,KAAKC,qBAERe,EACDe,EAAA,OAAA,CAAMO,KAAK,OAAOC,KAAK","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n margin-right: var(--ic-space-xs);\n list-style: none;\n}\n\n:host(.in-side-menu) {\n margin-right: 0;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n State,\n h,\n Listen,\n Method,\n} from \"@stencil/core\";\n\nimport {\n getThemeForegroundColor,\n inheritAttributes,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { IcNavButtonModes } from \"./ic-navigation-button.types\";\n\n/**\n * @slot icon - Content will be placed to the left of the button label.\n */\n\n@Component({\n tag: \"ic-navigation-button\",\n styleUrl: \"ic-navigation-button.css\",\n shadow: true,\n})\nexport class NavigationButton {\n @Element() el: HTMLIcNavigationButtonElement;\n\n /**\n * The label info to display.\n */\n @Prop() label!: string;\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The display mode.\n */\n @State() mode: IcNavButtonModes = \"navbar\";\n\n @State() initialAppearance = getThemeForegroundColor();\n\n private buttonEl: HTMLIcButtonElement;\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n @Listen(\"icNavigationMenuOpened\", { target: \"document\" })\n navBarMenuOpenHandler(): void {\n this.mode = \"menu\";\n }\n\n @Listen(\"icNavigationMenuClosed\", { target: \"document\" })\n navBarMenuCloseHandler(): void {\n this.mode = \"navbar\";\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.initialAppearance = theme.mode;\n }\n\n /**\n * Sets focus on the native `button`\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.setFocus();\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n ]);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Navigation Button\"\n );\n }\n\n render() {\n const { href, target, rel, download, referrerpolicy } = this;\n\n let label = \"\";\n let className = \"\";\n let variant: \"icon\" | \"tertiary\" = \"icon\";\n let appearance: IcThemeForeground | IcThemeForegroundEnum.Default =\n this.initialAppearance;\n let size: \"default\" | \"large\" = \"large\";\n let fullWidth = false;\n\n if (this.mode === \"menu\") {\n label = this.label;\n variant = \"tertiary\";\n appearance = IcThemeForegroundEnum.Default;\n size = \"default\";\n fullWidth = true;\n className = \"popout-menu-button\";\n }\n\n const buttonProps = {\n variant,\n appearance,\n size,\n href,\n target,\n rel,\n download,\n referrerpolicy,\n fullWidth,\n };\n\n return (\n <Host class={{ [\"in-side-menu\"]: this.mode === \"menu\" }}>\n <ic-button\n class={className}\n aria-label={this.label}\n ref={(el) => (this.buttonEl = el)}\n {...buttonProps}\n {...this.inheritedAttributes}\n >\n {label}\n <slot slot=\"icon\" name=\"icon\"></slot>\n </ic-button>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-navigation-button/ic-navigation-button.css?tag=ic-navigation-button&encapsulation=shadow","src/components/ic-navigation-button/ic-navigation-button.tsx"],"names":["icNavigationButtonCss","NavigationButton","this","inheritedAttributes","getThemeForegroundColor","[object Object]","mode","ev","theme","detail","initialAppearance","buttonEl","setFocus","inheritAttributes","el","IC_INHERITED_ARIA","onComponentRequiredPropUndefined","prop","label","propName","href","target","rel","download","referrerpolicy","className","variant","appearance","size","fullWidth","IcThemeForegroundEnum","Default","buttonProps","h","Host","class","Object","assign","aria-label","ref","slot","name"],"mappings":"sJAAA,MAAMA,EAAwB,k9ECiCjBC,EAAgB,+BAwCnBC,KAAAC,oBAAgD,mGAlBlB,sEAaJ,gCAELC,IAM7BC,wBACEH,KAAKI,KAAO,OAIdD,yBACEH,KAAKI,KAAO,SAIdD,mBAAmBE,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BP,KAAKQ,kBAAoBF,EAAMF,KAOjCD,iBACE,GAAIH,KAAKS,SAAU,CACjBT,KAAKS,SAASC,YAIlBP,oBACEH,KAAKC,oBAAsBU,EAAkBX,KAAKY,GAAI,IACjDC,EACH,UAIJV,mBACEW,EACE,CAAC,CAAEC,KAAMf,KAAKgB,MAAOC,SAAU,UAC/B,qBAIJd,SACE,MAAMe,KAAEA,EAAIC,OAAEA,EAAMC,IAAEA,EAAGC,SAAEA,EAAQC,eAAEA,GAAmBtB,KAExD,IAAIgB,EAAQ,GACZ,IAAIO,EAAY,GAChB,IAAIC,EAA+B,OACnC,IAAIC,EACFzB,KAAKQ,kBACP,IAAIkB,EAA4B,QAChC,IAAIC,EAAY,MAEhB,GAAI3B,KAAKI,OAAS,OAAQ,CACxBY,EAAQhB,KAAKgB,MACbQ,EAAU,WACVC,EAAaG,EAAsBC,QACnCH,EAAO,UACPC,EAAY,KACZJ,EAAY,qBAGd,MAAMO,EAAc,CAClBN,QAAAA,EACAC,WAAAA,EACAC,KAAAA,EACAR,KAAAA,EACAC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,EACAC,eAAAA,EACAK,UAAAA,GAGF,OACEI,EAACC,EAAI,CAACC,MAAO,CAAE9B,CAAC,gBAAiBH,KAAKI,OAAS,SAC7C2B,EAAA,YAAAG,OAAAC,OAAA,CACEF,MAAOV,EAASa,aACJpC,KAAKgB,MACjBqB,IAAMzB,GAAQZ,KAAKS,SAAWG,GAC1BkB,EACA9B,KAAKC,qBAERe,EACDe,EAAA,OAAA,CAAMO,KAAK,OAAOC,KAAK","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n margin-right: var(--ic-space-xs);\n list-style: none;\n}\n\n:host(.in-side-menu) {\n margin-right: 0;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n State,\n h,\n Listen,\n Method,\n} from \"@stencil/core\";\n\nimport {\n getThemeForegroundColor,\n inheritAttributes,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { IcNavButtonModes } from \"./ic-navigation-button.types\";\n\n/**\n * @slot icon - Content will be placed to the left of the button label.\n */\n\n@Component({\n tag: \"ic-navigation-button\",\n styleUrl: \"ic-navigation-button.css\",\n shadow: true,\n})\nexport class NavigationButton {\n @Element() el: HTMLIcNavigationButtonElement;\n\n /**\n * The label info to display.\n */\n @Prop() label!: string;\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The display mode.\n */\n @State() mode: IcNavButtonModes = \"navbar\";\n\n @State() initialAppearance = getThemeForegroundColor();\n\n private buttonEl: HTMLIcButtonElement;\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n @Listen(\"icNavigationMenuOpened\", { target: \"document\" })\n navBarMenuOpenHandler(): void {\n this.mode = \"menu\";\n }\n\n @Listen(\"icNavigationMenuClosed\", { target: \"document\" })\n navBarMenuCloseHandler(): void {\n this.mode = \"navbar\";\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.initialAppearance = theme.mode;\n }\n\n /**\n * Sets focus on the native `button`\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.setFocus();\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n ]);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Navigation Button\"\n );\n }\n\n render() {\n const { href, target, rel, download, referrerpolicy } = this;\n\n let label = \"\";\n let className = \"\";\n let variant: \"icon\" | \"tertiary\" = \"icon\";\n let appearance: IcThemeForeground | IcThemeForegroundEnum.Default =\n this.initialAppearance;\n let size: \"default\" | \"large\" = \"large\";\n let fullWidth = false;\n\n if (this.mode === \"menu\") {\n label = this.label;\n variant = \"tertiary\";\n appearance = IcThemeForegroundEnum.Default;\n size = \"default\";\n fullWidth = true;\n className = \"popout-menu-button\";\n }\n\n const buttonProps = {\n variant,\n appearance,\n size,\n href,\n target,\n rel,\n download,\n referrerpolicy,\n fullWidth,\n };\n\n return (\n <Host class={{ [\"in-side-menu\"]: this.mode === \"menu\" }}>\n <ic-button\n class={className}\n aria-label={this.label}\n ref={(el) => (this.buttonEl = el)}\n {...buttonProps}\n {...this.inheritedAttributes}\n >\n {label}\n <slot slot=\"icon\" name=\"icon\"></slot>\n </ic-button>\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as o,h as r,H as i}from"./p-f9370be6.js";import{B as s,C as e,W as h,E as c,F as a,k as n}from"./p-23831891.js";import"./p-6f57b13c.js";const l=class{constructor(r){t(this,r);this.themeChange=o(this,"themeChange",7);this.checkThemeColorContrast=()=>{if(s()<e&&s()>h){console.warn(`The theme colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`)}};this.setThemeColor=()=>{if(this.color!==null){let t=null;const o=this.color.slice(0,1);if(o==="#"){t=c(this.color)}else if(o.toLowerCase()==="r"){t=a(this.color)}this.setThemeRGBA(t)}};this.setThemeRGBA=t=>{if(t!==null){const o=document.documentElement;o.style.setProperty("--ic-theme-primary-r",t.r.toString());o.style.setProperty("--ic-theme-primary-g",t.g.toString());o.style.setProperty("--ic-theme-primary-b",t.b.toString());o.style.setProperty("--ic-theme-primary-a",t.a.toString());this.checkThemeColorContrast();const r=n();this.themeChange.emit({mode:r,color:t})}};this.color=null}watchColorPropHandler(){this.setThemeColor()}componentWillLoad(){this.setThemeColor()}render(){return r(i,null)}static get watchers(){return{color:["watchColorPropHandler"]}}};export{l as ic_theme};
2
- //# sourceMappingURL=p-c8ce6147.entry.js.map
1
+ import{r as t,c as o,h as r,H as i}from"./p-f9370be6.js";import{A as s,B as e,W as c,C as h,E as a,k as n}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const l=class{constructor(r){t(this,r);this.themeChange=o(this,"themeChange",7);this.checkThemeColorContrast=()=>{if(s()<e&&s()>c){console.warn(`The theme colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`)}};this.setThemeColor=()=>{if(this.color!==null){let t=null;const o=this.color.slice(0,1);if(o==="#"){t=h(this.color)}else if(o.toLowerCase()==="r"){t=a(this.color)}this.setThemeRGBA(t)}};this.setThemeRGBA=t=>{if(t!==null){const o=document.documentElement;o.style.setProperty("--ic-theme-primary-r",t.r.toString());o.style.setProperty("--ic-theme-primary-g",t.g.toString());o.style.setProperty("--ic-theme-primary-b",t.b.toString());o.style.setProperty("--ic-theme-primary-a",t.a.toString());this.checkThemeColorContrast();const r=n();this.themeChange.emit({mode:r,color:t})}};this.color=null}watchColorPropHandler(){this.setThemeColor()}componentWillLoad(){this.setThemeColor()}render(){return r(i,null)}static get watchers(){return{color:["watchColorPropHandler"]}}};export{l as ic_theme};
2
+ //# sourceMappingURL=p-4f1a7195.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,H as a,g as n}from"./p-f9370be6.js";import{I as s}from"./p-6f57b13c.js";import{F as o,D as r,g as l,k as c,o as h,i as p,c as d,a as m}from"./p-a8ac8f72.js";const u='/*! 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;color:var(--ic-theme-text);width:100%;position:relative}:host .top-navigation{background-color:var(--ic-theme-primary);height:-moz-max-content;height:max-content}:host(.fullwidth-searchbar) slot[name="search"]::slotted(form){width:100%}:host .title-link{display:inline-flex;align-items:center;text-decoration:none;padding:var(--ic-space-xxs);margin-left:calc(-1 * var(--ic-space-xxs));transition:var(--ic-easing-transition-fast)}:host .title-link,:host .title-link:visited,:host .title-link:active{color:var(--ic-theme-text)}:host .title-link:hover:not(:focus){background-color:var(--ic-theme-hover)}:host .title-link:active:not(:focus){background-color:var(--ic-theme-active)}:host .title-link:hover{border-radius:var(--ic-border-radius)}:host .title-link:focus{border-radius:var(--ic-border-radius);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}:host .title-link ic-typography{font-weight:600}:host .nav-panel-container{border-top:var(--ic-keyline-lighten);padding-left:var(--ic-space-lg);margin-left:calc(-1 * var(--section-container-margin));margin-right:calc(-1 * var(--section-container-margin));display:flex}:host(.dark) .nav-panel-container{border-top:var(--ic-keyline-darken)}.top-panel-container{display:flex;padding-top:8px;padding-bottom:8px}.navigation-tabs{margin-top:-1px}.app-details-container{display:flex;align-items:center;flex:1 1 auto;margin-right:var(--ic-space-md)}.app-icon-container{display:flex;padding-right:var(--ic-space-xs)}.icon-buttons-container{display:flex;margin-left:var(--ic-space-md)}.icon-buttons-container ::slotted(nav){display:flex}.title-wrap{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}:host .app-status{border-radius:80px;background-color:var(--ic-architectural-white);color:var(--ic-color-primary-text);padding:var(--ic-space-xxs) var(--ic-space-lg);margin-left:var(--ic-space-md)}:host(.dark) .app-status{background-color:var(--ic-theme-text);color:var(--ic-color-white-text)}:host .app-version{border-radius:16px;background-color:var(--ic-theme-active);padding:var(--ic-space-xxs) var(--ic-space-sm);margin-left:var(--ic-space-xs)}.app-status-text,.app-version-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:96px}slot[name="app-icon"]::slotted(svg){fill:var(--ic-theme-text);width:2em;height:2em}slot[name="toggle-icon"] svg{fill:var(--ic-theme-text)}.search-menu-container{justify-content:right;display:flex;align-items:center;flex:1 auto}.menu-button-container{margin-left:var(--ic-space-md)}.search-actions-container{display:flex}.menu-buttons-slot{display:flex;flex-direction:column}.navigation-landmark-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden}.navigation-item-list{display:flex;list-style:none;height:44px}:host([content-aligned="left"]) .app-details-container{flex-basis:1}:host([content-aligned="left"]) .app-details-container,:host([content-aligned="left"]) .nav-panel-container,:host([content-aligned="center"]) .nav-panel-container,:host([content-aligned="left"]) .search-menu-container,:host([content-aligned="center"]) .search-menu-container{justify-content:flex-start}:host([content-aligned="center"]) .app-details-container{justify-content:flex-end}:host ic-section-container{padding-bottom:0 !important;padding-top:0 !important}@media screen and (min-width: 993px){.app-details-container{margin-right:var(--ic-space-lg)}:host([content-aligned="center"]) .top-navigation{display:flex;justify-content:center}:host([content-aligned="left"]) .top-navigation{display:flex}}@media screen and (max-width: 1200px){:host .nav-panel-container{padding-left:var(--ic-space-md)}}@media screen and (max-width: 992px){:host .nav-panel-container,:host .app-status,:host .app-version{display:none}:host .title-link{margin-right:var(--ic-space-xs)}.search-menu-container{max-width:160px}.search-bar-container{display:flex;justify-content:center;align-items:center;border-top:var(--ic-keyline-darken);height:64px;padding-left:var(--ic-space-md);padding-right:var(--ic-space-md);margin-left:calc(-1 * var(--section-container-margin));margin-right:calc(-1 * var(--section-container-margin))}:host([content-aligned="left"]) .app-details-container,:host([content-aligned="left"]) .search-menu-container,:host([content-aligned="center"]) .search-menu-container,:host([content-aligned="center"]) .app-details-container{justify-content:flex-start}}@media screen and (max-width: 576px){:host .title-link{margin-right:var(--ic-space-xxxs);word-break:break-word;-webkit-hyphens:none;hyphens:none}.top-panel-container{min-height:40px}.searchbox-inline{display:none}.search-bar-container{margin-top:0;height:56px;padding-left:var(--ic-space-xs);padding-right:var(--ic-space-xs)}.menu-button-container{margin-left:var(--ic-space-sm)}slot[name="app-icon"]::slotted(svg){width:1.5em;height:1.5em}slot[name="toggle-icon"] svg{width:1.5em;height:1.5em}}@media (forced-colors: active){:host .top-navigation{border-bottom:var(--ic-hc-border)}.app-status,.app-version{border:var(--ic-hc-border)}slot[name="app-icon"]::slotted(svg){fill:currentcolor}}';const g=class{constructor(i){t(this,i);this.icNavigationMenuOpened=e(this,"icNavigationMenuOpened",7);this.icNavigationMenuClosed=e(this,"icNavigationMenuClosed",7);this.hasAppIcon=false;this.hasNavigation=false;this.hasIconButtons=false;this.hasSearchSlotContent=false;this.searchBar=null;this.initialiseSearchBar=()=>{if(this.hasSearchSlotContent){const t=o(this.el,"search");if(t&&t.tagName==="IC-SEARCH-BAR"){this.searchBar=t}else if(t&&t.tagName==="FORM"){this.searchBar=t.querySelector("ic-search-bar")}if(this.searchBar!==null){this.searchBar.hideLabel=true}}};this.emitTopNavResized=t=>{const e=new CustomEvent("topNavResized",{detail:{size:t}});this.el.dispatchEvent(e)};this.menuButtonClick=()=>{this.showNavMenu(true)};this.searchButtonMouseDownHandler=()=>{this.searchButtonClick=true};this.searchButtonClickHandler=()=>{this.toggleSearchBar();this.searchButtonClick=false};this.resizeObserver=null;this.resizeObserverCallback=t=>{if(t!==this.deviceSize){this.deviceSize=t;if(t>r.L){this.showNavMenu(false);if(this.mobileSearchBarVisible){this.toggleSearchBar()}}this.emitTopNavResized(t);if(document.activeElement!==null&&document.activeElement!==undefined&&document.activeElement.tagName==="IC-SEARCH-BAR"){this.searchBar.setAttribute("hidden","true");this.searchBar.removeAttribute("hidden");setTimeout((()=>{this.searchBar.setFocus()}),100)}}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const t=l();this.resizeObserverCallback(t)}));this.resizeObserver.observe(this.el)};this.appTitle=undefined;this.href="/";this.version="";this.status="";this.contentAligned="full-width";this.inline=false;this.menuOpen=false;this.deviceSize=r.XL;this.mobileSearchBarVisible=false;this.navMenuVisible=false;this.searchValue="";this.mobileSearchHiddenOnBlur=false;this.searchButtonClick=false;this.foregroundColor=c();this.hasFullWidthSearchBar=false}watchPropHandler(t,e){h(e,t,this.initialiseSearchBar)}navBarMenuCloseHandler(){this.showNavMenu(false);const t=this.el.shadowRoot.querySelector("#menu-button");t.setFocus()}searchInputBlurHandler(t){if(t.detail!==null){if(this.mobileSearchBarVisible&&!this.searchButtonClick){this.toggleSearchBar()}this.searchValue=t.detail.value}}searchValueChangeHandler(t){this.searchValue=t.detail.value}themeChangeHandler(t){const e=t.detail;this.foregroundColor=e.mode}toggleSearchBar(){this.mobileSearchBarVisible=!this.mobileSearchBarVisible;if(this.searchBar!==null){if(this.mobileSearchBarVisible){this.mobileSearchButtonEl.updateAriaLabel("Hide search");this.hasFullWidthSearchBar=true;this.searchBar.fullWidth=true;setTimeout((()=>{this.searchBar.setFocus()}),100)}else{this.mobileSearchButtonEl.updateAriaLabel("Show search");this.hasFullWidthSearchBar=false;this.searchBar.fullWidth=false}}}showNavMenu(t){this.navMenuVisible=t;if(t){this.icNavigationMenuOpened.emit()}else{this.icNavigationMenuClosed.emit()}}componentWillLoad(){this.hasAppIcon=p(this.el,"app-icon");this.hasNavigation=p(this.el,"navigation");this.hasIconButtons=p(this.el,"buttons");this.hasSearchSlotContent=p(this.el,"search");this.deviceSize=l();this.initialiseSearchBar()}componentWillRender(){this.hasNavigation=p(this.el,"navigation");this.hasSearchSlotContent=p(this.el,"search");this.hasIconButtons=p(this.el,"buttons");this.hasAppIcon=p(this.el,"app-icon")}componentDidLoad(){d(this.runResizeObserver);m([{prop:this.appTitle,propName:"app-title"}],"Top Navigation")}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}render(){const t=this.hasNavigation||this.hasIconButtons||this.status!==""||this.version!=="";const e=this.deviceSize<=r.S?"default":"large";let n="h3";const o=this.appTitle!==""&&this.appTitle!==undefined;if(this.deviceSize<=r.L){n="h4";if(this.deviceSize<=r.S){n="subtitle-small"}}const l=this.mobileSearchBarVisible?"Hide search":"Show search";const c=this.deviceSize<=r.S?"small":"default";return i(a,{class:{["fullwidth-searchbar"]:this.hasFullWidthSearchBar,[s.Dark]:this.foregroundColor===s.Dark}},i("div",{class:"top-navigation"},i("ic-section-container",{aligned:"full-width","full-height":true},i("header",{role:"banner"},i("div",{class:"top-panel-container"},i("div",{class:"app-details-container"},o&&i("a",{class:"title-link",href:this.href},this.hasAppIcon&&i("div",{class:"app-icon-container","aria-hidden":"true"},i("slot",{name:"app-icon"})),i("ic-typography",{variant:n},i("h1",{class:"title-wrap"},this.appTitle))),this.status!==""&&i("div",{class:"app-status"},i("ic-typography",{"aria-label":"app tag",variant:"label-uppercase",class:"app-status-text"},this.status)),this.version!==""&&i("div",{class:"app-version"},i("ic-typography",{variant:"label",class:"app-version-text","aria-label":"app version"},this.version))),(this.hasSearchSlotContent||t)&&i("div",{class:"search-menu-container"},i("div",{class:"search-actions-container"},this.deviceSize>r.L&&i("slot",{name:"search"}),this.hasSearchSlotContent&&this.deviceSize<=r.L&&i("ic-button",{id:"search-toggle-button",ref:t=>this.mobileSearchButtonEl=t,onMouseDown:this.searchButtonMouseDownHandler,variant:"icon",size:e,"aria-label":l,appearance:this.foregroundColor,onClick:this.searchButtonClickHandler},i("slot",{name:"toggle-icon",slot:"icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#ffffff"},i("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})))),this.hasIconButtons&&this.deviceSize>r.L&&i("div",{class:"icon-buttons-container"},i("slot",{name:"buttons"})),t&&this.deviceSize<=r.L&&i("div",{class:"menu-button-container"},i("nav",{"aria-labelledby":"navigation-landmark-text","aria-hidden":!this.hasNavigation||this.navMenuVisible?"true":"false"},i("ic-button",{id:"menu-button",appearance:this.foregroundColor,variant:"secondary","aria-expanded":this.menuOpen?"true":"false","aria-haspopup":"true","aria-label":`Open ${this.hasNavigation?"navigation":"app"} menu`,size:c,onClick:this.menuButtonClick},"Menu",i("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#ffffff",slot:"icon"},i("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"})))))))),this.mobileSearchBarVisible&&i("div",{class:"search-bar-container"},i("slot",{name:"search"})),this.hasNavigation&&this.deviceSize>r.L&&i("div",{class:"navigation-tabs"},i("span",{id:"navigation-landmark-text",class:"navigation-landmark-text","aria-hidden":"true"},"Main navigation"),i("nav",{"aria-labelledby":"navigation-landmark-text",class:"nav-panel-container"},i("ul",{class:"navigation-item-list"},i("slot",{name:"navigation"}))))))),this.navMenuVisible&&i("ic-navigation-menu",{version:this.version,status:this.status,class:{["inline"]:this.inline}},i("div",{class:"menu-buttons-slot",slot:"buttons"},i("slot",{name:"buttons"})),i("ul",{slot:"navigation"},i("slot",{name:"navigation"}))))}get el(){return n(this)}static get watchers(){return{appTitle:["watchPropHandler"]}}};g.style=u;export{g as ic_top_navigation};
2
+ //# sourceMappingURL=p-5616cfb8.entry.js.map