@ukic/web-components 2.24.0 → 2.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  3. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  4. package/dist/cjs/ic-accordion.cjs.entry.js +2 -2
  5. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-back-to-top.cjs.entry.js +7 -1
  7. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-button_3.cjs.entry.js +23 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  15. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  17. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-page-header.cjs.entry.js +3 -3
  23. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -1
  27. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-tab-context.cjs.entry.js +2 -2
  30. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-text-field.cjs.entry.js +2 -3
  34. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  36. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/collection/components/ic-accordion/ic-accordion.css +7 -2
  41. package/dist/collection/components/ic-accordion/ic-accordion.js +1 -1
  42. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  43. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +2 -2
  44. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +1 -1
  45. package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +2 -2
  46. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +7 -1
  47. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
  48. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +1 -1
  49. package/dist/collection/components/ic-button/ic-button.js +14 -1
  50. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  51. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +19 -0
  52. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -1
  53. package/dist/collection/components/ic-card/ic-card.css +7 -2
  54. package/dist/collection/components/ic-footer/ic-footer.js +1 -1
  55. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  56. package/dist/collection/components/ic-footer-link/ic-footer-link.css +1 -1
  57. package/dist/collection/components/ic-footer-link/ic-footer-link.js +1 -1
  58. package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
  59. package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js +2 -18
  60. package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js.map +1 -1
  61. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +2 -2
  62. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
  63. package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js +2 -34
  64. package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js.map +1 -1
  65. package/dist/collection/components/ic-link/ic-link.css +1 -1
  66. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +2 -2
  67. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
  68. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +2 -2
  69. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -1
  70. package/dist/collection/components/ic-page-header/ic-page-header.js +3 -3
  71. package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
  72. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.spec.js +7 -0
  73. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.spec.js.map +1 -1
  74. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js +2 -2
  75. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js.map +1 -1
  76. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +2 -2
  77. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +1 -1
  78. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +1 -1
  79. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  80. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +1 -1
  81. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  82. package/dist/collection/components/ic-status-tag/ic-status-tag.css +10 -0
  83. package/dist/collection/components/ic-status-tag/ic-status-tag.js +5 -4
  84. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  85. package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js +2 -2
  86. package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js.map +1 -1
  87. package/dist/collection/components/ic-stepper/ic-stepper.js +1 -1
  88. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  89. package/dist/collection/components/ic-tab/ic-tab.js +1 -1
  90. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  91. package/dist/collection/components/ic-tab-context/ic-tab-context.js +2 -2
  92. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  93. package/dist/collection/components/ic-text-field/ic-text-field.js +4 -5
  94. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  95. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +2 -2
  96. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +1 -1
  97. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js +4 -4
  98. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +1 -1
  99. package/dist/collection/components/ic-tooltip/ic-tooltip.js +29 -0
  100. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  101. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +2 -2
  102. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  103. package/dist/collection/components/ic-typography/ic-typography.css +1 -1
  104. package/dist/collection/components/ic-typography/test/basic/ic-typography.e2e.js +1 -1
  105. package/dist/collection/components/ic-typography/test/basic/ic-typography.e2e.js.map +1 -1
  106. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js +1 -1
  107. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js.map +1 -1
  108. package/dist/components/ic-accordion-group.js +1 -1
  109. package/dist/components/ic-accordion-group.js.map +1 -1
  110. package/dist/components/ic-accordion.js +2 -2
  111. package/dist/components/ic-accordion.js.map +1 -1
  112. package/dist/components/ic-back-to-top.js +7 -1
  113. package/dist/components/ic-back-to-top.js.map +1 -1
  114. package/dist/components/ic-breadcrumb2.js +1 -1
  115. package/dist/components/ic-breadcrumb2.js.map +1 -1
  116. package/dist/components/ic-button2.js +14 -1
  117. package/dist/components/ic-button2.js.map +1 -1
  118. package/dist/components/ic-card.js +1 -1
  119. package/dist/components/ic-card.js.map +1 -1
  120. package/dist/components/ic-footer-link-group.js +2 -2
  121. package/dist/components/ic-footer-link-group.js.map +1 -1
  122. package/dist/components/ic-footer-link.js +2 -2
  123. package/dist/components/ic-footer-link.js.map +1 -1
  124. package/dist/components/ic-footer.js +1 -1
  125. package/dist/components/ic-footer.js.map +1 -1
  126. package/dist/components/ic-link2.js +1 -1
  127. package/dist/components/ic-link2.js.map +1 -1
  128. package/dist/components/ic-page-header.js +3 -3
  129. package/dist/components/ic-page-header.js.map +1 -1
  130. package/dist/components/ic-side-navigation.js +1 -1
  131. package/dist/components/ic-side-navigation.js.map +1 -1
  132. package/dist/components/ic-status-tag.js +2 -1
  133. package/dist/components/ic-status-tag.js.map +1 -1
  134. package/dist/components/ic-stepper.js.map +1 -1
  135. package/dist/components/ic-tab-context.js +2 -2
  136. package/dist/components/ic-tab-context.js.map +1 -1
  137. package/dist/components/ic-tab.js +1 -1
  138. package/dist/components/ic-tab.js.map +1 -1
  139. package/dist/components/ic-text-field2.js +2 -3
  140. package/dist/components/ic-text-field2.js.map +1 -1
  141. package/dist/components/ic-tooltip2.js +11 -1
  142. package/dist/components/ic-tooltip2.js.map +1 -1
  143. package/dist/components/ic-top-navigation.js +2 -2
  144. package/dist/components/ic-top-navigation.js.map +1 -1
  145. package/dist/components/ic-typography2.js +1 -1
  146. package/dist/components/ic-typography2.js.map +1 -1
  147. package/dist/core/core.esm.js +1 -1
  148. package/dist/core/core.esm.js.map +1 -1
  149. package/dist/core/p-18536c24.entry.js +2 -0
  150. package/dist/core/p-18536c24.entry.js.map +1 -0
  151. package/dist/core/{p-d79a1565.entry.js → p-20f1b05a.entry.js} +2 -2
  152. package/dist/core/p-20f1b05a.entry.js.map +1 -0
  153. package/dist/core/{p-984e07a2.entry.js → p-2c9cf064.entry.js} +2 -2
  154. package/dist/core/{p-984e07a2.entry.js.map → p-2c9cf064.entry.js.map} +1 -1
  155. package/dist/core/{p-a340a923.entry.js → p-3574b7e4.entry.js} +2 -2
  156. package/dist/core/p-3574b7e4.entry.js.map +1 -0
  157. package/dist/core/{p-e3675a83.entry.js → p-52855153.entry.js} +2 -2
  158. package/dist/core/p-52855153.entry.js.map +1 -0
  159. package/dist/core/p-6167880d.entry.js.map +1 -1
  160. package/dist/core/{p-65ddd1b0.entry.js → p-73e5eca2.entry.js} +2 -2
  161. package/dist/core/p-73e5eca2.entry.js.map +1 -0
  162. package/dist/core/p-74e3ca39.entry.js +2 -0
  163. package/dist/core/p-74e3ca39.entry.js.map +1 -0
  164. package/dist/core/{p-4c5eafd6.entry.js → p-88c0dc04.entry.js} +2 -2
  165. package/dist/core/p-88c0dc04.entry.js.map +1 -0
  166. package/dist/core/p-9128a8e0.entry.js.map +1 -1
  167. package/dist/core/{p-96f92fdc.entry.js → p-92c7f4c5.entry.js} +2 -2
  168. package/dist/core/p-92c7f4c5.entry.js.map +1 -0
  169. package/dist/core/p-9ec428cc.entry.js +2 -0
  170. package/dist/core/p-9ec428cc.entry.js.map +1 -0
  171. package/dist/core/p-a10eebcc.entry.js +2 -0
  172. package/dist/core/p-a10eebcc.entry.js.map +1 -0
  173. package/dist/core/{p-d4e6c64e.entry.js → p-a305dc90.entry.js} +2 -2
  174. package/dist/core/p-a305dc90.entry.js.map +1 -0
  175. package/dist/core/p-bf70fe93.entry.js.map +1 -1
  176. package/dist/core/p-c9efaee1.entry.js.map +1 -1
  177. package/dist/core/p-ced03499.entry.js +2 -0
  178. package/dist/core/p-ced03499.entry.js.map +1 -0
  179. package/dist/core/{p-a3fa8e25.entry.js → p-e720925a.entry.js} +2 -2
  180. package/dist/core/p-e720925a.entry.js.map +1 -0
  181. package/dist/core/p-e735d773.entry.js +2 -0
  182. package/dist/core/p-e735d773.entry.js.map +1 -0
  183. package/dist/esm/core.js +1 -1
  184. package/dist/esm/ic-accordion-group.entry.js +1 -1
  185. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  186. package/dist/esm/ic-accordion.entry.js +2 -2
  187. package/dist/esm/ic-accordion.entry.js.map +1 -1
  188. package/dist/esm/ic-back-to-top.entry.js +7 -1
  189. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  190. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  191. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  192. package/dist/esm/ic-button_3.entry.js +23 -1
  193. package/dist/esm/ic-button_3.entry.js.map +1 -1
  194. package/dist/esm/ic-card.entry.js +1 -1
  195. package/dist/esm/ic-card.entry.js.map +1 -1
  196. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  197. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  198. package/dist/esm/ic-footer-link.entry.js +2 -2
  199. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  200. package/dist/esm/ic-footer.entry.js +1 -1
  201. package/dist/esm/ic-footer.entry.js.map +1 -1
  202. package/dist/esm/ic-link.entry.js +1 -1
  203. package/dist/esm/ic-link.entry.js.map +1 -1
  204. package/dist/esm/ic-page-header.entry.js +3 -3
  205. package/dist/esm/ic-page-header.entry.js.map +1 -1
  206. package/dist/esm/ic-side-navigation.entry.js +1 -1
  207. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  208. package/dist/esm/ic-status-tag.entry.js +2 -1
  209. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  210. package/dist/esm/ic-stepper.entry.js.map +1 -1
  211. package/dist/esm/ic-tab-context.entry.js +2 -2
  212. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  213. package/dist/esm/ic-tab.entry.js +1 -1
  214. package/dist/esm/ic-tab.entry.js.map +1 -1
  215. package/dist/esm/ic-text-field.entry.js +2 -3
  216. package/dist/esm/ic-text-field.entry.js.map +1 -1
  217. package/dist/esm/ic-top-navigation.entry.js +2 -2
  218. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  219. package/dist/esm/ic-typography.entry.js +1 -1
  220. package/dist/esm/ic-typography.entry.js.map +1 -1
  221. package/dist/esm/loader.js +1 -1
  222. package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +1 -0
  223. package/dist/types/components/ic-button/ic-button.d.ts +2 -0
  224. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +1 -1
  225. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +2 -2
  226. package/dist/types/components/ic-stepper/ic-stepper.d.ts +1 -1
  227. package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +1 -1
  228. package/dist/types/components/ic-text-field/ic-text-field.d.ts +2 -2
  229. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +4 -0
  230. package/dist/types/components.d.ts +9 -8
  231. package/hydrate/index.js +57 -28
  232. package/package.json +2 -2
  233. package/vscode-data.json +6 -3
  234. package/dist/collection/components/ic-navigation-menu/test/basic/ic-navigation-menu.e2e.js +0 -29
  235. package/dist/collection/components/ic-navigation-menu/test/basic/ic-navigation-menu.e2e.js.map +0 -1
  236. package/dist/core/p-04f98d04.entry.js +0 -2
  237. package/dist/core/p-04f98d04.entry.js.map +0 -1
  238. package/dist/core/p-4c5eafd6.entry.js.map +0 -1
  239. package/dist/core/p-65ddd1b0.entry.js.map +0 -1
  240. package/dist/core/p-7e801198.entry.js +0 -2
  241. package/dist/core/p-7e801198.entry.js.map +0 -1
  242. package/dist/core/p-905e4232.entry.js +0 -2
  243. package/dist/core/p-905e4232.entry.js.map +0 -1
  244. package/dist/core/p-96f92fdc.entry.js.map +0 -1
  245. package/dist/core/p-a2704b98.entry.js +0 -2
  246. package/dist/core/p-a2704b98.entry.js.map +0 -1
  247. package/dist/core/p-a340a923.entry.js.map +0 -1
  248. package/dist/core/p-a3fa8e25.entry.js.map +0 -1
  249. package/dist/core/p-c532b8bd.entry.js +0 -2
  250. package/dist/core/p-c532b8bd.entry.js.map +0 -1
  251. package/dist/core/p-d4e6c64e.entry.js.map +0 -1
  252. package/dist/core/p-d79a1565.entry.js.map +0 -1
  253. package/dist/core/p-defa21f5.entry.js +0 -2
  254. package/dist/core/p-defa21f5.entry.js.map +0 -1
  255. package/dist/core/p-e3675a83.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["icFooterLinkGroupCss","FooterLinkGroup","this","handleKeydown","event","key","toggleExpanded","expanded","DEVICE_SIZES","XL","getThemeForegroundColor","componentWillLoad","small","isSmall","el","componentDidLoad","onComponentRequiredPropUndefined","prop","groupTitle","propName","footerResizeHandler","footerThemeChangeHandler","ev","theme","detail","dropdownIconStyle","mode","e","parentElement","classList","contains","render","h","Host","class","variant","tabIndex","onClick","onKeydown","fullHeight","xmlns","role","width","height","preserveAspectRatio","viewBox","fill","d","transform"],"sources":["src/components/ic-footer-link-group/ic-footer-link-group.css?tag=ic-footer-link-group&encapsulation=shadow","src/components/ic-footer-link-group/ic-footer-link-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.footer-link-group-sparse) {\n --footer-link-group-margin-right: 5.938rem;\n --footer-link-group-border-bottom: 0 solid transparent;\n --footer-link-group-title-margin-top: 0;\n --footer-link-group-title-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-group-small) {\n --footer-link-group-margin-right: 0;\n --footer-link-group-title-margin-top: var(--ic-space-md);\n --footer-link-group-title-margin-bottom: var(--ic-space-md);\n --footer-link-group-links-padding-left: var(--ic-space-md);\n --footer-link-group-links-padding-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-group-light.footer-link-group-small) {\n --footer-link-group-border-bottom: var(--ic-keyline-lighten);\n}\n\n:host(.footer-link-group-dark.footer-link-group-small) {\n --footer-link-group-border-bottom: var(--ic-keyline-darken);\n}\n\n:host(.footer-link-group) {\n margin-right: var(--footer-link-group-margin-right);\n border-bottom: var(--footer-link-group-border-bottom);\n}\n\n:host(.footer-link-group-small.footer-link-group-light:hover) {\n background-color: var(--ic-action-light-bg-hover);\n cursor: pointer;\n}\n\n:host(.footer-link-group-small.footer-link-group-dark:hover) {\n background-color: var(--ic-action-dark-bg-hover);\n cursor: pointer;\n}\n\n:host(.footer-link-group-sparse:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n:host(.footer-link-group-small:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n:host(.footer-link-group-small.footer-link-group-light:active) {\n background-color: var(--ic-action-light-bg-active);\n}\n\n:host(.footer-link-group-small.footer-link-group-dark:active) {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.footer-link-group-title {\n margin-top: var(--footer-link-group-title-margin-top);\n margin-bottom: var(--footer-link-group-title-margin-bottom);\n flex-grow: 1;\n}\n\n.footer-link-group-toggle {\n fill: white !important;\n}\n\n.footer-link-group-links {\n display: flex;\n flex-direction: column;\n}\n\n.footer-link-group-header {\n display: flex;\n align-items: center;\n}\n","import {\n Component,\n Host,\n Element,\n Listen,\n Prop,\n h,\n State,\n} from \"@stencil/core\";\nimport {\n DEVICE_SIZES,\n getThemeForegroundColor,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport { IcTheme } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-footer-link-group\",\n styleUrl: \"ic-footer-link-group.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class FooterLinkGroup {\n @Element() el: HTMLIcFooterLinkGroupElement;\n\n @State() expanded: boolean = false;\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() dropdownIconStyle = getThemeForegroundColor();\n @State() small: boolean = false;\n\n /**\n * The title of the link group to be displayed.\n */\n @Prop() groupTitle!: string;\n\n componentWillLoad(): void {\n this.small = this.isSmall(this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.groupTitle, propName: \"group-title\" }],\n \"Footer Link Group\"\n );\n }\n\n @Listen(\"footerResized\", { target: \"document\" })\n footerResizeHandler(): void {\n this.small = this.isSmall(this.el);\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n footerThemeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.dropdownIconStyle = theme.mode;\n }\n\n private isSmall(e: HTMLElement): boolean {\n if (e.parentElement !== null) {\n if (e.parentElement.classList.contains(\"footer\")) {\n return e.parentElement.classList.contains(\"footer-small\");\n } else {\n return this.isSmall(e.parentElement);\n }\n } else {\n return false;\n }\n }\n\n private handleKeydown = (event: KeyboardEvent): void => {\n if (event.key === \" \" || event.key === \"Enter\") {\n this.toggleExpanded();\n }\n };\n\n private toggleExpanded = (): void => {\n this.expanded = !this.expanded;\n };\n\n render() {\n const { small, groupTitle } = this;\n\n return !small ? (\n <Host\n class={{\n [\"footer-link-group footer-link-group-sparse\"]: true,\n [`footer-link-group-${this.dropdownIconStyle}`]: true,\n }}\n >\n <div class=\"footer-link-group-title\">\n <ic-typography variant=\"subtitle-small\">{groupTitle}</ic-typography>\n </div>\n <div class=\"footer-link-group-links\">\n <slot />\n </div>\n </Host>\n ) : (\n <Host\n class={{\n [\"footer-link-group footer-link-group-small\"]: true,\n [`footer-link-group-${this.dropdownIconStyle}`]: true,\n }}\n tabIndex=\"1\"\n onClick={this.toggleExpanded}\n onKeydown={this.handleKeydown}\n aria-expanded={this.expanded}\n >\n <ic-section-container fullHeight={true}>\n <div class=\"footer-link-group-header\">\n <div class=\"footer-link-group-title\">\n <ic-typography variant=\"label\">{groupTitle}</ic-typography>\n </div>\n {this.expanded ? (\n <svg\n class=\"footer-link-group-toggle\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"img\"\n width=\"1em\"\n height=\"1em\"\n preserveAspectRatio=\"xMidYMid meet\"\n viewBox=\"0 0 1200 1200\"\n >\n <path\n fill=\"currentColor\"\n d=\"M600.002 210.605L421.285 389.336L0 810.559l178.721 178.836l421.281-421.341l421.281 421.341L1200 810.559L778.733 389.336L600.002 210.605z\"\n />\n </svg>\n ) : (\n <svg\n class=\"footer-link-group-toggle\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"img\"\n width=\"1em\"\n height=\"1em\"\n preserveAspectRatio=\"xMidYMid meet\"\n viewBox=\"0 0 1200 1200\"\n >\n <g transform=\"translate(0 1200) scale(1 -1)\">\n <path\n fill=\"currentColor\"\n d=\"M600.002 210.605L421.285 389.336L0 810.559l178.721 178.836l421.281-421.341l421.281 421.341L1200 810.559L778.733 389.336L600.002 210.605z\"\n />\n </g>\n </svg>\n )}\n </div>\n {this.expanded && (\n <div class=\"footer-link-group-links\">\n <slot />\n </div>\n )}\n </ic-section-container>\n </Host>\n );\n }\n}\n"],"mappings":"mIAAA,MAAMA,EAAuB,+zI,MCuBhBC,EAAe,M,yBA+ClBC,KAAAC,cAAiBC,IACvB,GAAIA,EAAMC,MAAQ,KAAOD,EAAMC,MAAQ,QAAS,CAC9CH,KAAKI,gB,GAIDJ,KAAAI,eAAiB,KACvBJ,KAAKK,UAAYL,KAAKK,QAAQ,E,cAnDH,M,gBACCC,EAAaC,G,uBACdC,I,WACH,M,0BAO1B,iBAAAC,GACET,KAAKU,MAAQV,KAAKW,QAAQX,KAAKY,G,CAGjC,gBAAAC,GACEC,EACE,CAAC,CAAEC,KAAMf,KAAKgB,WAAYC,SAAU,gBACpC,oB,CAKJ,mBAAAC,GACElB,KAAKU,MAAQV,KAAKW,QAAQX,KAAKY,G,CAIjC,wBAAAO,CAAyBC,GACvB,MAAMC,EAAiBD,EAAGE,OAC1BtB,KAAKuB,kBAAoBF,EAAMG,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","this","handleKeydown","event","key","toggleExpanded","expanded","DEVICE_SIZES","XL","getThemeForegroundColor","componentWillLoad","small","isSmall","el","componentDidLoad","onComponentRequiredPropUndefined","prop","groupTitle","propName","footerResizeHandler","footerThemeChangeHandler","ev","theme","detail","dropdownIconStyle","mode","e","parentElement","classList","contains","render","h","Host","class","role","variant","tabIndex","onClick","onKeydown","fullHeight","xmlns","width","height","preserveAspectRatio","viewBox","fill","d","transform"],"sources":["src/components/ic-footer-link-group/ic-footer-link-group.css?tag=ic-footer-link-group&encapsulation=shadow","src/components/ic-footer-link-group/ic-footer-link-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.footer-link-group-sparse) {\n --footer-link-group-margin-right: 5.938rem;\n --footer-link-group-border-bottom: 0 solid transparent;\n --footer-link-group-title-margin-top: 0;\n --footer-link-group-title-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-group-small) {\n --footer-link-group-margin-right: 0;\n --footer-link-group-title-margin-top: var(--ic-space-md);\n --footer-link-group-title-margin-bottom: var(--ic-space-md);\n --footer-link-group-links-padding-left: var(--ic-space-md);\n --footer-link-group-links-padding-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-group-light.footer-link-group-small) {\n --footer-link-group-border-bottom: var(--ic-keyline-lighten);\n}\n\n:host(.footer-link-group-dark.footer-link-group-small) {\n --footer-link-group-border-bottom: var(--ic-keyline-darken);\n}\n\n:host(.footer-link-group) {\n margin-right: var(--footer-link-group-margin-right);\n border-bottom: var(--footer-link-group-border-bottom);\n}\n\n:host(.footer-link-group-small.footer-link-group-light:hover) {\n background-color: var(--ic-action-light-bg-hover);\n cursor: pointer;\n}\n\n:host(.footer-link-group-small.footer-link-group-dark:hover) {\n background-color: var(--ic-action-dark-bg-hover);\n cursor: pointer;\n}\n\n:host(.footer-link-group-sparse:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n:host(.footer-link-group-small:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n:host(.footer-link-group-small.footer-link-group-light:active) {\n background-color: var(--ic-action-light-bg-active);\n}\n\n:host(.footer-link-group-small.footer-link-group-dark:active) {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.footer-link-group-title {\n margin-top: var(--footer-link-group-title-margin-top);\n margin-bottom: var(--footer-link-group-title-margin-bottom);\n flex-grow: 1;\n}\n\n.footer-link-group-toggle {\n fill: white !important;\n}\n\n.footer-link-group-links {\n display: flex;\n flex-direction: column;\n}\n\n.footer-link-group-header {\n display: flex;\n align-items: center;\n}\n","import {\n Component,\n Host,\n Element,\n Listen,\n Prop,\n h,\n State,\n} from \"@stencil/core\";\nimport {\n DEVICE_SIZES,\n getThemeForegroundColor,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport { IcTheme } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-footer-link-group\",\n styleUrl: \"ic-footer-link-group.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class FooterLinkGroup {\n @Element() el: HTMLIcFooterLinkGroupElement;\n\n @State() expanded: boolean = false;\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() dropdownIconStyle = getThemeForegroundColor();\n @State() small: boolean = false;\n\n /**\n * The title of the link group to be displayed.\n */\n @Prop() groupTitle!: string;\n\n componentWillLoad(): void {\n this.small = this.isSmall(this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.groupTitle, propName: \"group-title\" }],\n \"Footer Link Group\"\n );\n }\n\n @Listen(\"footerResized\", { target: \"document\" })\n footerResizeHandler(): void {\n this.small = this.isSmall(this.el);\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n footerThemeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.dropdownIconStyle = theme.mode;\n }\n\n private isSmall(e: HTMLElement): boolean {\n if (e.parentElement !== null) {\n if (e.parentElement.classList.contains(\"footer\")) {\n return e.parentElement.classList.contains(\"footer-small\");\n } else {\n return this.isSmall(e.parentElement);\n }\n } else {\n return false;\n }\n }\n\n private handleKeydown = (event: KeyboardEvent): void => {\n if (event.key === \" \" || event.key === \"Enter\") {\n this.toggleExpanded();\n }\n };\n\n private toggleExpanded = (): void => {\n this.expanded = !this.expanded;\n };\n\n render() {\n const { small, groupTitle } = this;\n\n return !small ? (\n <Host\n class={{\n [\"footer-link-group footer-link-group-sparse\"]: true,\n [`footer-link-group-${this.dropdownIconStyle}`]: true,\n }}\n role=\"listitem\"\n >\n <div class=\"footer-link-group-title\">\n <ic-typography variant=\"subtitle-small\">{groupTitle}</ic-typography>\n </div>\n <div class=\"footer-link-group-links\" role=\"list\">\n <slot />\n </div>\n </Host>\n ) : (\n <Host\n class={{\n [\"footer-link-group footer-link-group-small\"]: true,\n [`footer-link-group-${this.dropdownIconStyle}`]: true,\n }}\n tabIndex=\"1\"\n onClick={this.toggleExpanded}\n onKeydown={this.handleKeydown}\n aria-expanded={this.expanded}\n >\n <ic-section-container fullHeight={true}>\n <div class=\"footer-link-group-header\">\n <div class=\"footer-link-group-title\">\n <ic-typography variant=\"label\">{groupTitle}</ic-typography>\n </div>\n {this.expanded ? (\n <svg\n class=\"footer-link-group-toggle\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"img\"\n width=\"1em\"\n height=\"1em\"\n preserveAspectRatio=\"xMidYMid meet\"\n viewBox=\"0 0 1200 1200\"\n >\n <path\n fill=\"currentColor\"\n d=\"M600.002 210.605L421.285 389.336L0 810.559l178.721 178.836l421.281-421.341l421.281 421.341L1200 810.559L778.733 389.336L600.002 210.605z\"\n />\n </svg>\n ) : (\n <svg\n class=\"footer-link-group-toggle\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"img\"\n width=\"1em\"\n height=\"1em\"\n preserveAspectRatio=\"xMidYMid meet\"\n viewBox=\"0 0 1200 1200\"\n >\n <g transform=\"translate(0 1200) scale(1 -1)\">\n <path\n fill=\"currentColor\"\n d=\"M600.002 210.605L421.285 389.336L0 810.559l178.721 178.836l421.281-421.341l421.281 421.341L1200 810.559L778.733 389.336L600.002 210.605z\"\n />\n </g>\n </svg>\n )}\n </div>\n {this.expanded && (\n <div class=\"footer-link-group-links\" role=\"list\">\n <slot />\n </div>\n )}\n </ic-section-container>\n </Host>\n );\n }\n}\n"],"mappings":"mIAAA,MAAMA,EAAuB,+zI,MCuBhBC,EAAe,M,yBA+ClBC,KAAAC,cAAiBC,IACvB,GAAIA,EAAMC,MAAQ,KAAOD,EAAMC,MAAQ,QAAS,CAC9CH,KAAKI,gB,GAIDJ,KAAAI,eAAiB,KACvBJ,KAAKK,UAAYL,KAAKK,QAAQ,E,cAnDH,M,gBACCC,EAAaC,G,uBACdC,I,WACH,M,0BAO1B,iBAAAC,GACET,KAAKU,MAAQV,KAAKW,QAAQX,KAAKY,G,CAGjC,gBAAAC,GACEC,EACE,CAAC,CAAEC,KAAMf,KAAKgB,WAAYC,SAAU,gBACpC,oB,CAKJ,mBAAAC,GACElB,KAAKU,MAAQV,KAAKW,QAAQX,KAAKY,G,CAIjC,wBAAAO,CAAyBC,GACvB,MAAMC,EAAiBD,EAAGE,OAC1BtB,KAAKuB,kBAAoBF,EAAMG,I,CAGzB,OAAAb,CAAQc,GACd,GAAIA,EAAEC,gBAAkB,KAAM,CAC5B,GAAID,EAAEC,cAAcC,UAAUC,SAAS,UAAW,CAChD,OAAOH,EAAEC,cAAcC,UAAUC,SAAS,e,KACrC,CACL,OAAO5B,KAAKW,QAAQc,EAAEC,c,MAEnB,CACL,OAAO,K,EAcX,MAAAG,GACE,MAAMnB,MAAEA,EAAKM,WAAEA,GAAehB,KAE9B,OAAQU,EACNoB,EAACC,EAAI,CACHC,MAAO,CACL,CAAC,8CAA+C,KAChD,CAAC,qBAAqBhC,KAAKuB,qBAAsB,MAEnDU,KAAK,YAELH,EAAA,OAAKE,MAAM,2BACTF,EAAA,iBAAeI,QAAQ,kBAAkBlB,IAE3Cc,EAAA,OAAKE,MAAM,0BAA0BC,KAAK,QACxCH,EAAA,eAIJA,EAACC,EAAI,CACHC,MAAO,CACL,CAAC,6CAA8C,KAC/C,CAAC,qBAAqBhC,KAAKuB,qBAAsB,MAEnDY,SAAS,IACTC,QAASpC,KAAKI,eACdiC,UAAWrC,KAAKC,cAAa,gBACdD,KAAKK,UAEpByB,EAAA,wBAAsBQ,WAAY,MAChCR,EAAA,OAAKE,MAAM,4BACTF,EAAA,OAAKE,MAAM,2BACTF,EAAA,iBAAeI,QAAQ,SAASlB,IAEjChB,KAAKK,SACJyB,EAAA,OACEE,MAAM,2BACNO,MAAM,6BAA4B,cACtB,OACZN,KAAK,MACLO,MAAM,MACNC,OAAO,MACPC,oBAAoB,gBACpBC,QAAQ,iBAERb,EAAA,QACEc,KAAK,eACLC,EAAE,8IAINf,EAAA,OACEE,MAAM,2BACNO,MAAM,6BAA4B,cACtB,OACZN,KAAK,MACLO,MAAM,MACNC,OAAO,MACPC,oBAAoB,gBACpBC,QAAQ,iBAERb,EAAA,KAAGgB,UAAU,iCACXhB,EAAA,QACEc,KAAK,eACLC,EAAE,gJAMX7C,KAAKK,UACJyB,EAAA,OAAKE,MAAM,0BAA0BC,KAAK,QACxCH,EAAA,e"}
@@ -1,2 +1,2 @@
1
- import{r as t,h as o,H as e,g as i}from"./p-6b5e91e2.js";import{D as n,b as r}from"./p-a5dd7065.js";import{O as s}from"./p-426ec638.js";import"./p-26b7b18f.js";const a='/*! 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(.footer-link-ungrouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:2.5rem;--footer-link-margin-bottom:0}:host(.footer-link-ungrouped-small){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-small){--footer-link-margin-left:var(--ic-space-md);--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link){margin-left:var(--footer-link-margin-left);margin-right:var(--footer-link-margin-right);margin-bottom:var(--footer-link-margin-bottom)}:host(.footer-link) a,:host(.footer-link) a ::slotted(a){display:flex;align-items:flex-end;font-weight:var(--ic-font-weight-bold);color:inherit;width:-moz-fit-content;width:fit-content;font-size:var(--ic-font-size-regular)}:host(.footer-link) a:link,:host(.footer-link) a ::slotted(a:link){color:inherit;text-decoration:underline;font-weight:var(--ic-font-weight-bold)}:host(.footer-link) a:link>::slotted(svg),:host(.footer-link) a:link>::slotted(img),:host(.footer-link) a ::slotted(a:link>::slotted(svg)),:host(.footer-link) a ::slotted(a:link>::slotted(img)){padding:var(--ic-space-xxxs);pointer-events:none;transition:var(--ic-easing-transition-fast)}:host(.footer-link-light) ::slotted(svg){fill:var(--ic-architectural-white)}:host(.footer-link-dark) ::slotted(svg){fill:var(--ic-architectural-black)}:host(.footer-link) a:link:hover,:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:hover),:host(.footer-link) a ::slotted(a:link:focus){border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}@supports (text-decoration-thickness: 25%){:host(.footer-link) a:link:hover,:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:hover),:host(.footer-link) a ::slotted(a:link:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}:host(.footer-link) a:link:hover,:host(.footer-link) a ::slotted(a:link:hover){outline:none}:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:focus){outline:none}:host(.footer-link) a:link:focus>::slotted(svg),:host(.footer-link) a:link:focus>::slotted(img),:host(.footer-link) a ::slotted(a:link:focus>::slotted(svg)),:host(.footer-link) a ::slotted(a:link:focus>::slotted(img)){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius)}:host(.footer-link) a:focus,:host(.footer-link) a ::slotted(a:focus){outline:none;transition:var(--ic-transition-duration-fast)}:host(.footer-link) a:link:active,:host(.footer-link) a:link:focus:active,:host(.footer-link) a:link:visited:active,:host(.footer-link) a ::slotted(a:link:active),:host(.footer-link) a ::slotted(a:link:focus:active),:host(.footer-link) a ::slotted(a:link:visited:active){color:inherit;text-decoration:none}:host(.footer-link) a:hover,:host(.footer-link) a ::slotted(a:hover){text-decoration:none}.open-in-new-icon{padding-left:var(--ic-space-xxs)}.open-in-new-icon,.open-in-new-icon svg{height:var(--ic-space-md);width:var(--ic-space-md)}:host(.footer-link-light) .open-in-new-icon svg{fill:var(--ic-architectural-white)}:host(.footer-link-dark) .open-in-new-icon svg{fill:var(--ic-architectural-black)}@media screen and (min-width: 769px){:host(.footer-link.footer-link-ungrouped-sparse:last-of-type){margin-right:0}}@media (forced-colors: active){:host(.footer-link-light) ::slotted(svg),:host(.footer-link-dark) ::slotted(svg){fill:currentcolor}}';const l=class{constructor(o){t(this,o);this.deviceSize=n.XL;this.footerConfig={small:false,grouped:false};this.foregroundColor=r();this.download=false;this.href=null;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined}componentWillLoad(){this.footerConfig=this.inferConfig(this.el)}footerResizeHandler(){this.footerConfig=this.inferConfig(this.el)}footerThemeChangeHandler(t){const o=t.detail;this.foregroundColor=o.mode}inferConfig(t){if(t.parentElement!==null){if(t.parentElement.classList.contains("footer")){return{small:t.parentElement.classList.contains("footer-small"),grouped:t.parentElement.classList.contains("footer-grouped")}}else{return this.inferConfig(t.parentElement)}}else{return{small:false,grouped:false}}}render(){const{footerConfig:t,href:i,hreflang:n,referrerpolicy:r,rel:a,target:l,download:f}=this;const{small:d,grouped:c}=t;return o(e,{class:{"footer-link":true,[`footer-link-${c?"grouped":"ungrouped"}-${d?"small":"sparse"}`]:true,[`footer-link-${this.foregroundColor}`]:true}},o("a",{href:i,hreflang:n,referrerPolicy:r,rel:a,download:f!==false?f:null,target:l},o("slot",null),l==="_blank"&&o("span",{class:"open-in-new-icon",innerHTML:s})))}static get delegatesFocus(){return true}get el(){return i(this)}};l.style=a;export{l as ic_footer_link};
2
- //# sourceMappingURL=p-a340a923.entry.js.map
1
+ import{r as t,h as o,H as e,g as i}from"./p-6b5e91e2.js";import{D as n,b as r}from"./p-a5dd7065.js";import{O as s}from"./p-426ec638.js";import"./p-26b7b18f.js";const a='/*! 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(.footer-link-ungrouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:2.5rem;--footer-link-margin-bottom:0}:host(.footer-link-ungrouped-small){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-small){--footer-link-margin-left:var(--ic-space-md);--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link){margin-left:var(--footer-link-margin-left);margin-right:var(--footer-link-margin-right);margin-bottom:var(--footer-link-margin-bottom)}:host(.footer-link) a,:host(.footer-link) a ::slotted(a){display:flex;align-items:flex-end;font-weight:var(--ic-font-weight-bold);color:inherit;width:-moz-fit-content;width:fit-content;font-size:var(--ic-font-size-regular)}:host(.footer-link) a:link,:host(.footer-link) a ::slotted(a:link){color:inherit;text-decoration:underline;font-weight:var(--ic-font-weight-bold)}:host(.footer-link) a:link>::slotted(svg),:host(.footer-link) a:link>::slotted(img),:host(.footer-link) a ::slotted(a:link>::slotted(svg)),:host(.footer-link) a ::slotted(a:link>::slotted(img)){padding:var(--ic-space-xxxs);pointer-events:none;transition:var(--ic-easing-transition-fast)}:host(.footer-link-light) ::slotted(svg){fill:var(--ic-architectural-white)}:host(.footer-link-dark) ::slotted(svg){fill:var(--ic-architectural-black)}:host(.footer-link) a:link:hover,:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:hover),:host(.footer-link) a ::slotted(a:link:focus){border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}@supports (text-underline-offset: 25%){:host(.footer-link) a:link:hover,:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:hover),:host(.footer-link) a ::slotted(a:link:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}:host(.footer-link) a:link:hover,:host(.footer-link) a ::slotted(a:link:hover){outline:none}:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:focus){outline:none}:host(.footer-link) a:link:focus>::slotted(svg),:host(.footer-link) a:link:focus>::slotted(img),:host(.footer-link) a ::slotted(a:link:focus>::slotted(svg)),:host(.footer-link) a ::slotted(a:link:focus>::slotted(img)){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius)}:host(.footer-link) a:focus,:host(.footer-link) a ::slotted(a:focus){outline:none;transition:var(--ic-transition-duration-fast)}:host(.footer-link) a:link:active,:host(.footer-link) a:link:focus:active,:host(.footer-link) a:link:visited:active,:host(.footer-link) a ::slotted(a:link:active),:host(.footer-link) a ::slotted(a:link:focus:active),:host(.footer-link) a ::slotted(a:link:visited:active){color:inherit;text-decoration:none}:host(.footer-link) a:hover,:host(.footer-link) a ::slotted(a:hover){text-decoration:none}.open-in-new-icon{padding-left:var(--ic-space-xxs)}.open-in-new-icon,.open-in-new-icon svg{height:var(--ic-space-md);width:var(--ic-space-md)}:host(.footer-link-light) .open-in-new-icon svg{fill:var(--ic-architectural-white)}:host(.footer-link-dark) .open-in-new-icon svg{fill:var(--ic-architectural-black)}@media screen and (min-width: 769px){:host(.footer-link.footer-link-ungrouped-sparse:last-of-type){margin-right:0}}@media (forced-colors: active){:host(.footer-link-light) ::slotted(svg),:host(.footer-link-dark) ::slotted(svg){fill:currentcolor}}';const l=class{constructor(o){t(this,o);this.deviceSize=n.XL;this.footerConfig={small:false,grouped:false};this.foregroundColor=r();this.download=false;this.href=null;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined}componentWillLoad(){this.footerConfig=this.inferConfig(this.el)}footerResizeHandler(){this.footerConfig=this.inferConfig(this.el)}footerThemeChangeHandler(t){const o=t.detail;this.foregroundColor=o.mode}inferConfig(t){if(t.parentElement!==null){if(t.parentElement.classList.contains("footer")){return{small:t.parentElement.classList.contains("footer-small"),grouped:t.parentElement.classList.contains("footer-grouped")}}else{return this.inferConfig(t.parentElement)}}else{return{small:false,grouped:false}}}render(){const{footerConfig:t,href:i,hreflang:n,referrerpolicy:r,rel:a,target:l,download:f}=this;const{small:d,grouped:c}=t;return o(e,{class:{"footer-link":true,[`footer-link-${c?"grouped":"ungrouped"}-${d?"small":"sparse"}`]:true,[`footer-link-${this.foregroundColor}`]:true},role:"listitem"},o("a",{href:i,hreflang:n,referrerPolicy:r,rel:a,download:f!==false?f:null,target:l},o("slot",null),l==="_blank"&&o("span",{class:"open-in-new-icon",innerHTML:s})))}static get delegatesFocus(){return true}get el(){return i(this)}};l.style=a;export{l as ic_footer_link};
2
+ //# sourceMappingURL=p-3574b7e4.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icFooterLinkCss","FooterLink","DEVICE_SIZES","XL","small","grouped","getThemeForegroundColor","componentWillLoad","this","footerConfig","inferConfig","el","footerResizeHandler","footerThemeChangeHandler","ev","theme","detail","foregroundColor","mode","e","parentElement","classList","contains","render","href","hreflang","referrerpolicy","rel","target","download","h","Host","class","role","referrerPolicy","innerHTML","OpenInNew"],"sources":["src/components/ic-footer-link/ic-footer-link.css?tag=ic-footer-link&encapsulation=shadow","src/components/ic-footer-link/ic-footer-link.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.footer-link-ungrouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 2.5rem;\n --footer-link-margin-bottom: 0;\n}\n\n:host(.footer-link-ungrouped-small) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-grouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-grouped-small) {\n --footer-link-margin-left: var(--ic-space-md);\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link) {\n margin-left: var(--footer-link-margin-left);\n margin-right: var(--footer-link-margin-right);\n margin-bottom: var(--footer-link-margin-bottom);\n}\n\n/* Link styling */\n\n:host(.footer-link) a,\n:host(.footer-link) a ::slotted(a) {\n display: flex;\n align-items: flex-end;\n font-weight: var(--ic-font-weight-bold);\n color: inherit;\n width: fit-content;\n font-size: var(--ic-font-size-regular);\n}\n\n:host(.footer-link) a:link,\n:host(.footer-link) a ::slotted(a:link) {\n color: inherit;\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n}\n\n:host(.footer-link) a:link > ::slotted(svg),\n:host(.footer-link) a:link > ::slotted(img),\n:host(.footer-link) a ::slotted(a:link > ::slotted(svg)),\n:host(.footer-link) a ::slotted(a:link > ::slotted(img)) {\n padding: var(--ic-space-xxxs);\n pointer-events: none;\n transition: var(--ic-easing-transition-fast);\n}\n\n/*\nThere's an apparent defect in Chrome that means this isn't always re-rendered if changed.\nNot an issue in Safari. Line 73-79 implement the same function but less clean.\n\na:link > ::slotted(svg) ,\na:link:visited > ::slotted(svg) {\n fill: var(--ic-theme-text);\n}\n*/\n\n:host(.footer-link-light) ::slotted(svg) {\n fill: var(--ic-architectural-white);\n}\n\n:host(.footer-link-dark) ::slotted(svg) {\n fill: var(--ic-architectural-black);\n}\n\n:host(.footer-link) a:link:hover,\n:host(.footer-link) a:link:focus,\n:host(.footer-link) a ::slotted(a:link:hover),\n:host(.footer-link) a ::slotted(a:link:focus) {\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n@supports (text-underline-offset: 25%) {\n :host(.footer-link) a:link:hover,\n :host(.footer-link) a:link:focus,\n :host(.footer-link) a ::slotted(a:link:hover),\n :host(.footer-link) a ::slotted(a:link:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n\n:host(.footer-link) a:link:hover,\n:host(.footer-link) a ::slotted(a:link:hover) {\n outline: none;\n}\n\n:host(.footer-link) a:link:focus,\n:host(.footer-link) a ::slotted(a:link:focus) {\n outline: none;\n}\n\n:host(.footer-link) a:link:focus > ::slotted(svg),\n:host(.footer-link) a:link:focus > ::slotted(img),\n:host(.footer-link) a ::slotted(a:link:focus > ::slotted(svg)),\n:host(.footer-link) a ::slotted(a:link:focus > ::slotted(img)) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.footer-link) a:focus,\n:host(.footer-link) a ::slotted(a:focus) {\n outline: none;\n transition: var(--ic-transition-duration-fast);\n}\n\n:host(.footer-link) a:link:active,\n:host(.footer-link) a:link:focus:active,\n:host(.footer-link) a:link:visited:active,\n:host(.footer-link) a ::slotted(a:link:active),\n:host(.footer-link) a ::slotted(a:link:focus:active),\n:host(.footer-link) a ::slotted(a:link:visited:active) {\n color: inherit;\n text-decoration: none;\n}\n\n:host(.footer-link) a:hover,\n:host(.footer-link) a ::slotted(a:hover) {\n text-decoration: none;\n}\n\n.open-in-new-icon {\n padding-left: var(--ic-space-xxs);\n}\n\n.open-in-new-icon,\n.open-in-new-icon svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n:host(.footer-link-light) .open-in-new-icon svg {\n fill: var(--ic-architectural-white);\n}\n\n:host(.footer-link-dark) .open-in-new-icon svg {\n fill: var(--ic-architectural-black);\n}\n\n@media screen and (min-width: 769px) {\n :host(.footer-link.footer-link-ungrouped-sparse:last-of-type) {\n margin-right: 0;\n }\n}\n\n@media (forced-colors: active) {\n :host(.footer-link-light) ::slotted(svg),\n :host(.footer-link-dark) ::slotted(svg) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Listen,\n Prop,\n h,\n State,\n} from \"@stencil/core\";\nimport { DEVICE_SIZES, getThemeForegroundColor } from \"../../utils/helpers\";\nimport { IcTheme, IcThemeForeground } from \"../../utils/types\";\n\nimport OpenInNew from \"../../assets/OpenInNew.svg\";\n\ntype FooterConfig = { small: boolean; grouped: boolean };\n\n@Component({\n tag: \"ic-footer-link\",\n styleUrl: \"ic-footer-link.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class FooterLink {\n @Element() el: HTMLIcFooterLinkElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() footerConfig: FooterConfig = { small: false, grouped: false };\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\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 componentWillLoad(): void {\n this.footerConfig = this.inferConfig(this.el);\n }\n\n @Listen(\"footerResized\", { target: \"document\" })\n footerResizeHandler(): void {\n this.footerConfig = this.inferConfig(this.el);\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n footerThemeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.foregroundColor = theme.mode;\n }\n\n private inferConfig(e: HTMLElement): FooterConfig {\n if (e.parentElement !== null) {\n if (e.parentElement.classList.contains(\"footer\")) {\n return {\n small: e.parentElement.classList.contains(\"footer-small\"),\n grouped: e.parentElement.classList.contains(\"footer-grouped\"),\n };\n } else {\n return this.inferConfig(e.parentElement);\n }\n } else {\n return { small: false, grouped: false };\n }\n }\n\n render() {\n const {\n footerConfig,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n download,\n } = this;\n const { small, grouped } = footerConfig;\n\n return (\n <Host\n class={{\n \"footer-link\": true,\n [`footer-link-${grouped ? \"grouped\" : \"ungrouped\"}-${\n small ? \"small\" : \"sparse\"\n }`]: true,\n [`footer-link-${this.foregroundColor}`]: true,\n }}\n role=\"listitem\"\n >\n <a\n href={href}\n hreflang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n download={download !== false ? download : null}\n target={target}\n >\n <slot />\n {target === \"_blank\" && (\n <span class=\"open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n </Host>\n );\n }\n}\n"],"mappings":"gKAAA,MAAMA,EAAkB,u7L,MCuBXC,EAAU,M,yCAGSC,EAAaC,G,kBACL,CAAEC,MAAO,MAAOC,QAAS,O,qBACjBC,I,cAKR,M,UAKd,K,+FAsBxB,iBAAAC,GACEC,KAAKC,aAAeD,KAAKE,YAAYF,KAAKG,G,CAI5C,mBAAAC,GACEJ,KAAKC,aAAeD,KAAKE,YAAYF,KAAKG,G,CAI5C,wBAAAE,CAAyBC,GACvB,MAAMC,EAAiBD,EAAGE,OAC1BR,KAAKS,gBAAkBF,EAAMG,I,CAGvB,WAAAR,CAAYS,GAClB,GAAIA,EAAEC,gBAAkB,KAAM,CAC5B,GAAID,EAAEC,cAAcC,UAAUC,SAAS,UAAW,CAChD,MAAO,CACLlB,MAAOe,EAAEC,cAAcC,UAAUC,SAAS,gBAC1CjB,QAASc,EAAEC,cAAcC,UAAUC,SAAS,kB,KAEzC,CACL,OAAOd,KAAKE,YAAYS,EAAEC,c,MAEvB,CACL,MAAO,CAAEhB,MAAO,MAAOC,QAAS,M,EAIpC,MAAAkB,GACE,MAAMd,aACJA,EAAYe,KACZA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,IACdA,EAAGC,OACHA,EAAMC,SACNA,GACErB,KACJ,MAAMJ,MAAEA,EAAKC,QAAEA,GAAYI,EAE3B,OACEqB,EAACC,EAAI,CACHC,MAAO,CACL,cAAe,KACf,CAAC,eAAe3B,EAAU,UAAY,eACpCD,EAAQ,QAAU,YACf,KACL,CAAC,eAAeI,KAAKS,mBAAoB,MAE3CgB,KAAK,YAELH,EAAA,KACEN,KAAMA,EACNC,SAAUA,EACVS,eAAgBR,EAChBC,IAAKA,EACLE,SAAUA,IAAa,MAAQA,EAAW,KAC1CD,OAAQA,GAERE,EAAA,aACCF,IAAW,UACVE,EAAA,QAAME,MAAM,mBAAmBG,UAAWC,K"}
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,H as a}from"./p-6b5e91e2.js";import{a as i}from"./p-a5dd7065.js";import"./p-26b7b18f.js";const r='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}.tag{padding:var(--ic-space-xxs) var(--ic-space-sm);font-size:0.875rem;border-radius:var(--ic-space-md);display:inline-block;min-width:2.5rem;text-align:center;color:var(--ic-color-primary-text)}.small{padding:var(--ic-space-xxxs) var(--ic-space-sm);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.filled-neutral{background-color:var(--ic-architectural-700);color:var(--ic-architectural-white)}.filled-success{background-color:var(--ic-status-success);color:var(--ic-architectural-white)}.filled-warning{background-color:var(--ic-status-warning-contrast)}.filled-danger{background-color:var(--ic-status-error);color:var(--ic-architectural-white)}.outlined{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px))}.outlined.small{padding:var(--ic-space-1px) calc(var(--ic-space-sm) - var(--ic-space-1px))}.outlined-neutral{background-color:var(--ic-architectural-200);border:var(--ic-border-width) solid var(--ic-architectural-400)}.outlined-success{background-color:var(--ic-status-success-light);border:var(--ic-border-width) solid var(--ic-status-success)}.outlined-warning{background-color:var(--ic-status-warning-light);border:var(--ic-border-width) solid var(--ic-status-warning-dark)}.outlined-danger{background-color:var(--ic-status-error-light);border:var(--ic-border-width) solid var(--ic-status-error)}@media (forced-colors: active){.tag{border:var(--ic-hc-border);-ms-high-contrast-adjust:none;forced-color-adjust:none}}';const o=class{constructor(t){e(this,t);this.announced=false;this.appearance=undefined;this.label=undefined;this.size="default";this.small=false;this.status="neutral";this.variant="filled"}componentWillLoad(){if(this.appearance==="outlined"){this.variant="outlined"}}componentDidLoad(){i([{prop:this.label,propName:"label"}],"Status Tag")}render(){const{label:e,status:i,appearance:r,variant:o,small:n,size:s,announced:c}=this;return t(a,{role:c?"status":null,"aria-label":"Status"},t("strong",{class:{["tag"]:true,[`${r}-${i}`]:r!==undefined,[`${o}-${i}`]:true,["outlined"]:o==="outlined",["small"]:n||s==="small"}},t("ic-typography",{variant:"label-uppercase","apply-vertical-margins":false},t("span",null,e))))}};o.style=r;export{o as ic_status_tag};
2
- //# sourceMappingURL=p-e3675a83.entry.js.map
1
+ import{r as e,h as t,H as a}from"./p-6b5e91e2.js";import{a as i}from"./p-a5dd7065.js";import"./p-26b7b18f.js";const r='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}.tag{padding:var(--ic-space-xxs) var(--ic-space-sm);font-size:0.875rem;border-radius:var(--ic-space-md);display:inline-block;min-width:2.5rem;text-align:center;color:var(--ic-color-primary-text)}.small{padding:var(--ic-space-xxxs) var(--ic-space-sm);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.large{padding:var(--ic-space-xs) var(--ic-space-sm);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}.filled-neutral{background-color:var(--ic-architectural-700);color:var(--ic-architectural-white)}.filled-success{background-color:var(--ic-status-success);color:var(--ic-architectural-white)}.filled-warning{background-color:var(--ic-status-warning-contrast)}.filled-danger{background-color:var(--ic-status-error);color:var(--ic-architectural-white)}.outlined{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px))}.outlined.small{padding:var(--ic-space-1px) calc(var(--ic-space-sm) - var(--ic-space-1px))}.outlined.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px))}.outlined-neutral{background-color:var(--ic-architectural-200);border:var(--ic-border-width) solid var(--ic-architectural-400)}.outlined-success{background-color:var(--ic-status-success-light);border:var(--ic-border-width) solid var(--ic-status-success)}.outlined-warning{background-color:var(--ic-status-warning-light);border:var(--ic-border-width) solid var(--ic-status-warning-dark)}.outlined-danger{background-color:var(--ic-status-error-light);border:var(--ic-border-width) solid var(--ic-status-error)}@media (forced-colors: active){.tag{border:var(--ic-hc-border);-ms-high-contrast-adjust:none;forced-color-adjust:none}}';const o=class{constructor(t){e(this,t);this.announced=false;this.appearance=undefined;this.label=undefined;this.size="default";this.small=false;this.status="neutral";this.variant="filled"}componentWillLoad(){if(this.appearance==="outlined"){this.variant="outlined"}}componentDidLoad(){i([{prop:this.label,propName:"label"}],"Status Tag")}render(){const{label:e,status:i,appearance:r,variant:o,small:s,size:n,announced:c}=this;return t(a,{role:c?"status":null,"aria-label":"Status"},t("strong",{class:{["tag"]:true,[`${r}-${i}`]:r!==undefined,[`${o}-${i}`]:true,["outlined"]:o==="outlined",["small"]:s||n==="small",[`${n}`]:true}},t("ic-typography",{variant:"label-uppercase","apply-vertical-margins":false},t("span",null,e))))}};o.style=r;export{o as ic_status_tag};
2
+ //# sourceMappingURL=p-52855153.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icStatusTagCss","StatusTag","componentWillLoad","this","appearance","variant","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","render","status","small","size","announced","h","Host","role","class","undefined"],"sources":["src/components/ic-status-tag/ic-status-tag.css?tag=ic-status-tag&encapsulation=shadow","src/components/ic-status-tag/ic-status-tag.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n.tag {\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n display: inline-block;\n min-width: 2.5rem;\n text-align: center;\n color: var(--ic-color-primary-text);\n}\n\n.small {\n padding: var(--ic-space-xxxs) var(--ic-space-sm);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.large {\n padding: var(--ic-space-xs) var(--ic-space-sm);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.filled-neutral {\n background-color: var(--ic-architectural-700);\n color: var(--ic-architectural-white);\n}\n\n.filled-success {\n background-color: var(--ic-status-success);\n color: var(--ic-architectural-white);\n}\n\n.filled-warning {\n background-color: var(--ic-status-warning-contrast);\n}\n\n.filled-danger {\n background-color: var(--ic-status-error);\n color: var(--ic-architectural-white);\n}\n\n.outlined {\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined.small {\n padding: var(--ic-space-1px) calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined-neutral {\n background-color: var(--ic-architectural-200);\n border: var(--ic-border-width) solid var(--ic-architectural-400);\n}\n\n.outlined-success {\n background-color: var(--ic-status-success-light);\n border: var(--ic-border-width) solid var(--ic-status-success);\n}\n\n.outlined-warning {\n background-color: var(--ic-status-warning-light);\n border: var(--ic-border-width) solid var(--ic-status-warning-dark);\n}\n\n.outlined-danger {\n background-color: var(--ic-status-error-light);\n border: var(--ic-border-width) solid var(--ic-status-error);\n}\n\n@media (forced-colors: active) {\n .tag {\n border: var(--ic-hc-border);\n -ms-high-contrast-adjust: none;\n forced-color-adjust: none;\n }\n}\n","import { Component, Host, h, Prop } from \"@stencil/core\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport {\n IcStatusTagStatuses,\n IcStatusTagAppearance,\n} from \"./ic-status-tag.types\";\nimport { IcEmphasisType, IcSizes } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-status-tag\",\n styleUrl: \"ic-status-tag.css\",\n shadow: true,\n})\nexport class StatusTag {\n /**\n * If `true`, role='status' is added to the component and it will act as an 'aria-live' region.\n * Screen readers will announce changes to the `label`, but not the initial value.\n */\n @Prop() announced?: boolean = false;\n\n /**\n * @deprecated This prop should not be used anymore. Use variant prop instead.\n */\n @Prop() appearance?: IcStatusTagAppearance;\n\n /**\n * The content rendered within the status tag.\n */\n @Prop() label!: string;\n\n /**\n * The size of the status tag component.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * The colour of the status tag.\n */\n @Prop() status?: IcStatusTagStatuses = \"neutral\";\n\n /**\n * The emphasis of the status tag.\n */\n @Prop() variant?: IcEmphasisType = \"filled\";\n\n componentWillLoad(): void {\n if (this.appearance === \"outlined\") {\n this.variant = \"outlined\";\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Status Tag\"\n );\n }\n\n render() {\n const { label, status, appearance, variant, small, size, announced } = this;\n return (\n <Host role={announced ? \"status\" : null} aria-label=\"Status\">\n <strong\n class={{\n [\"tag\"]: true,\n [`${appearance}-${status}`]: appearance !== undefined,\n [`${variant}-${status}`]: true,\n [\"outlined\"]: variant === \"outlined\",\n [\"small\"]: small || size === \"small\",\n [`${size}`]: true,\n }}\n >\n <ic-typography\n variant=\"label-uppercase\"\n apply-vertical-margins={false}\n >\n <span>{label}</span>\n </ic-typography>\n </strong>\n </Host>\n );\n }\n}\n"],"mappings":"8GAAA,MAAMA,EAAiB,2iI,MCaVC,EAAS,M,wCAKU,M,yDAeL,U,WAKC,M,YAKa,U,aAKJ,Q,CAEnC,iBAAAC,GACE,GAAIC,KAAKC,aAAe,WAAY,CAClCD,KAAKE,QAAU,U,EAInB,gBAAAC,GACEC,EACE,CAAC,CAAEC,KAAML,KAAKM,MAAOC,SAAU,UAC/B,a,CAIJ,MAAAC,GACE,MAAMF,MAAEA,EAAKG,OAAEA,EAAMR,WAAEA,EAAUC,QAAEA,EAAOQ,MAAEA,EAAKC,KAAEA,EAAIC,UAAEA,GAAcZ,KACvE,OACEa,EAACC,EAAI,CAACC,KAAMH,EAAY,SAAW,KAAI,aAAa,UAClDC,EAAA,UACEG,MAAO,CACL,CAAC,OAAQ,KACT,CAAC,GAAGf,KAAcQ,KAAWR,IAAegB,UAC5C,CAAC,GAAGf,KAAWO,KAAW,KAC1B,CAAC,YAAaP,IAAY,WAC1B,CAAC,SAAUQ,GAASC,IAAS,QAC7B,CAAC,GAAGA,KAAS,OAGfE,EAAA,iBACEX,QAAQ,kBAAiB,yBACD,OAExBW,EAAA,YAAOP,K"}
@@ -1 +1 @@
1
- {"version":3,"names":["icStepperCss","Stepper","this","resizeObserver","visuallyHidden","getChildren","steps","Array","from","el","querySelectorAll","stepsWithStepTitles","checkStepTitles","length","variantOverride","variant","noOfResizes","console","error","setStepTypes","stepTypes","i","push","setStepperWidth","alignedFullWidth","aligned","lastStep","style","maxWidth","stepperWidth","offsetWidth","pxToRem","lastStepWidth","initialiseStepStates","forEach","step","index","stepNum","lastStepNum","stepType","current","stepTitleArea","shadowRoot","querySelector","autoSetStepTitles","stepTitle","setAttribute","undefined","removeAttribute","classList","remove","add","contains","nextStepTitle","progress","hideStepInfo","compactStepStyling","width","minWidth","connectorWidth","stepConnect","setHideStepInfo","_a","_b","overrideVariant","minDefaultStepperWidth","clientWidth","resizeObserverCallback","runResizeObserver","ResizeObserver","observe","document","getBoundingClientRect","handlePropChange","disconnectedCallback","disconnect","componentWillLoad","componentWillRender","componentDidLoad","checkResizeObserver","render","h","Host","class"],"sources":["src/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","src/components/ic-stepper/ic-stepper.tsx"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.default:not(.aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Component, Element, Host, Prop, h, State, Watch } from \"@stencil/core\";\nimport { checkResizeObserver, pxToRem } from \"../../utils/helpers\";\nimport { IcStepperAlignment } from \"./ic-stepper.types\";\nimport { IcStepTypes, IcStepVariants } from \"../ic-step/ic-step.types\";\n\n@Component({\n tag: \"ic-stepper\",\n styleUrl: \"ic-stepper.css\",\n shadow: true,\n})\nexport class Stepper {\n private resizeObserver: ResizeObserver = null;\n private steps: HTMLIcStepElement[];\n private stepsWithStepTitles: HTMLIcStepElement[];\n private visuallyHidden: string = \"visually-hidden\";\n\n @Element() el: HTMLIcStepperElement;\n\n @State() alignedFullWidth: boolean = true;\n @State() autoSetStepTitles: boolean = true;\n @State() lastStepWidth: number = 0;\n @State() noOfResizes?: number = 0;\n @State() stepperWidth: number = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n @State() stepTypes: IcStepTypes[] = [];\n @State() variantOverride?: boolean = this.variant !== \"compact\";\n\n /**\n * The alignment of the default stepper within its container.\n */\n @Prop() aligned?: IcStepperAlignment = \"full-width\";\n\n /**\n * The appearance of the stepper.\n */\n @Prop() appearance?: \"light\" | \"default\" = \"default\";\n\n /**\n * The length of the connnector between each step in pixels. Minimum length is 100px.\n */\n @Prop() connectorWidth?: number = 100;\n\n /**\n * If `true`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\n */\n @Prop() hideStepInfo?: boolean = false;\n\n /**\n * The variant of the stepper.\n */\n @Prop({ mutable: true }) variant?: IcStepVariants = \"default\";\n\n @Watch(\"hideStepInfo\")\n @Watch(\"variant\")\n handlePropChange(): void {\n this.setHideStepInfo();\n this.getChildren();\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.setStepTypes();\n\n if (this.variant === \"compact\") {\n this.variantOverride = false;\n }\n }\n\n componentWillRender(): void {\n this.initialiseStepStates();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n // Get all steps currently within this stepper\n private getChildren = (): void => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n\n this.stepsWithStepTitles = Array.from(\n this.el.querySelectorAll(\"ic-step[step-title]\")\n );\n };\n\n // Inform the user that stepTitles are required on all steps in a compact stepper\n private checkStepTitles = (): void => {\n if (\n this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\"\n ) {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(\n `The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`\n );\n }\n }\n };\n\n private setStepTypes = (): void => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n\n private setStepperWidth = (): void => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = pxToRem(\n `${this.stepperWidth / this.steps.length}px`\n );\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n\n private initialiseStepStates = (): void => {\n this.steps.forEach((step, index) => {\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n\n if (step.stepType !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.stepType;\n } else {\n step.current = true;\n }\n\n const stepTitleArea =\n step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .step-title-area\");\n\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.stepTitle = \"Step \" + step.stepNum;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .setAttribute(\"aria-hidden\", \"true\");\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.stepTitle = undefined;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .removeAttribute(\"aria-hidden\");\n }\n }\n }\n\n if (this.variant === \"compact\") {\n if (step.current === true || step.stepType === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n } else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n\n if (!step.lastStep) {\n step.nextStepTitle = this.steps[index + 1].stepTitle;\n step.progress = (step.stepNum / this.steps.length) * 100;\n } else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n } else {\n step.progress = 100;\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(this.visuallyHidden);\n }\n\n step.compactStepStyling = this.stepTypes[index];\n }\n\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth) {\n step.style.width = pxToRem(\n `${\n (this.stepperWidth - this.lastStepWidth) /\n (this.steps.length - 1)\n }px`\n );\n step.style.minWidth = pxToRem(\"148px\");\n }\n } else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n } else {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n }\n }\n\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n const stepConnect = step.shadowRoot.querySelector(\n \".step > .step-top > .step-connect\"\n ) as HTMLElement;\n\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth}px`)\n : pxToRem(\"100px\");\n }\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(this.visuallyHidden);\n }\n }\n });\n };\n\n private setHideStepInfo = (): void => {\n this.steps.forEach((step) => {\n const stepTitleArea = step.shadowRoot.querySelector(\n \".step > .step-title-area\"\n );\n\n if (stepTitleArea !== null) {\n if (this.hideStepInfo) {\n stepTitleArea.classList?.add(this.visuallyHidden);\n } else {\n stepTitleArea.classList?.remove(this.visuallyHidden);\n }\n }\n });\n };\n\n private overrideVariant = () => {\n if (this.variantOverride) {\n let minDefaultStepperWidth = 148 * this.steps.length;\n\n if (this.aligned === \"left\" && this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n } else {\n this.variant = \"default\";\n }\n }\n };\n\n private resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n return (\n <Host\n class={{\n [`${this.variant}`]: true,\n [\"aligned-left\"]:\n this.variant === \"default\" && this.aligned === \"left\",\n }}\n >\n <ul class=\"step-item-list\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"mappings":"4HAAA,MAAMA,EAAe,6U,MCURC,EAAO,M,yBACVC,KAAAC,eAAiC,KAGjCD,KAAAE,eAAyB,kBAqEzBF,KAAAG,YAAc,KACpBH,KAAKI,MAAQC,MAAMC,KAAKN,KAAKO,GAAGC,iBAAiB,YAEjDR,KAAKS,oBAAsBJ,MAAMC,KAC/BN,KAAKO,GAAGC,iBAAiB,uBAC1B,EAIKR,KAAAU,gBAAkB,KACxB,GACEV,KAAKS,oBAAoBE,OAASX,KAAKI,MAAMO,QAC7CX,KAAKY,iBACLZ,KAAKa,UAAY,UACjB,CACAb,KAAKc,YAAcd,KAAKc,YAAc,EACtC,GAAId,KAAKc,cAAgB,EAAG,CAC1BC,QAAQC,MACN,oI,IAMAhB,KAAAiB,aAAe,KACrBjB,KAAKG,cACLH,KAAKkB,UAAY,GACjB,IAAK,IAAIC,EAAI,EAAGA,EAAInB,KAAKI,MAAMO,OAAQQ,IAAK,CAC1CnB,KAAKkB,UAAUE,KAAK,S,GAIhBpB,KAAAqB,gBAAkB,KACxBrB,KAAKsB,iBACHtB,KAAKa,UAAY,WAAab,KAAKuB,UAAY,aAEjD,MAAMC,EAAWxB,KAAKI,MAAMJ,KAAKI,MAAMO,OAAS,GAChDa,EAASC,MAAMC,SAAW,OAE1B,GAAI1B,KAAKsB,iBAAkB,CACzBtB,KAAK2B,aAAe3B,KAAKO,GAAGqB,YAC5BJ,EAASC,MAAMC,SAAWG,EACxB,GAAG7B,KAAK2B,aAAe3B,KAAKI,MAAMO,YAEpCX,KAAK8B,cAAgBN,EAASI,W,GAI1B5B,KAAA+B,qBAAuB,KAC7B/B,K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Ka,WAAY,KACrB,CAAC,gBACCb,KAAKa,UAAY,WAAab,KAAKuB,UAAY,SAGnDwD,EAAA,MAAIE,MAAM,kBACRF,EAAA,c"}
1
+ {"version":3,"names":["icStepperCss","Stepper","this","resizeObserver","visuallyHidden","getChildren","steps","Array","from","el","querySelectorAll","stepsWithStepTitles","checkStepTitles","length","variantOverride","variant","noOfResizes","console","error","setStepTypes","stepTypes","i","push","setStepperWidth","alignedFullWidth","aligned","lastStep","style","maxWidth","stepperWidth","offsetWidth","pxToRem","lastStepWidth","initialiseStepStates","forEach","step","index","stepNum","lastStepNum","stepType","current","stepTitleArea","shadowRoot","querySelector","autoSetStepTitles","stepTitle","setAttribute","undefined","removeAttribute","classList","remove","add","contains","nextStepTitle","progress","hideStepInfo","compactStepStyling","width","minWidth","connectorWidth","stepConnect","setHideStepInfo","_a","_b","overrideVariant","minDefaultStepperWidth","clientWidth","resizeObserverCallback","runResizeObserver","ResizeObserver","observe","document","getBoundingClientRect","handlePropChange","disconnectedCallback","disconnect","componentWillLoad","componentWillRender","componentDidLoad","checkResizeObserver","render","h","Host","class"],"sources":["src/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","src/components/ic-stepper/ic-stepper.tsx"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.default:not(.aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Component, Element, Host, Prop, h, State, Watch } from \"@stencil/core\";\nimport { checkResizeObserver, pxToRem } from \"../../utils/helpers\";\nimport { IcStepperAlignment } from \"./ic-stepper.types\";\nimport { IcStepTypes, IcStepVariants } from \"../ic-step/ic-step.types\";\n\n@Component({\n tag: \"ic-stepper\",\n styleUrl: \"ic-stepper.css\",\n shadow: true,\n})\nexport class Stepper {\n private resizeObserver: ResizeObserver = null;\n private steps: HTMLIcStepElement[];\n private stepsWithStepTitles: HTMLIcStepElement[];\n private visuallyHidden: string = \"visually-hidden\";\n\n @Element() el: HTMLIcStepperElement;\n\n @State() alignedFullWidth: boolean = true;\n @State() autoSetStepTitles: boolean = true;\n @State() lastStepWidth: number = 0;\n @State() noOfResizes?: number = 0;\n @State() stepperWidth: number = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n @State() stepTypes: IcStepTypes[] = [];\n @State() variantOverride?: boolean = this.variant !== \"compact\";\n\n /**\n * The alignment of the default stepper within its container.\n */\n @Prop() aligned?: IcStepperAlignment = \"full-width\";\n\n /**\n * The appearance of the stepper.\n */\n @Prop() appearance?: \"light\" | \"default\" = \"default\";\n\n /**\n * The length of the connector between each step in pixels. Minimum length is 100px.\n */\n @Prop() connectorWidth?: number = 100;\n\n /**\n * If `true`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\n */\n @Prop() hideStepInfo?: boolean = false;\n\n /**\n * The variant of the stepper.\n */\n @Prop({ mutable: true }) variant?: IcStepVariants = \"default\";\n\n @Watch(\"hideStepInfo\")\n @Watch(\"variant\")\n handlePropChange(): void {\n this.setHideStepInfo();\n this.getChildren();\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.setStepTypes();\n\n if (this.variant === \"compact\") {\n this.variantOverride = false;\n }\n }\n\n componentWillRender(): void {\n this.initialiseStepStates();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n // Get all steps currently within this stepper\n private getChildren = (): void => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n\n this.stepsWithStepTitles = Array.from(\n this.el.querySelectorAll(\"ic-step[step-title]\")\n );\n };\n\n // Inform the user that stepTitles are required on all steps in a compact stepper\n private checkStepTitles = (): void => {\n if (\n this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\"\n ) {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(\n `The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`\n );\n }\n }\n };\n\n private setStepTypes = (): void => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n\n private setStepperWidth = (): void => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = pxToRem(\n `${this.stepperWidth / this.steps.length}px`\n );\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n\n private initialiseStepStates = (): void => {\n this.steps.forEach((step, index) => {\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n\n if (step.stepType !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.stepType;\n } else {\n step.current = true;\n }\n\n const stepTitleArea =\n step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .step-title-area\");\n\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.stepTitle = \"Step \" + step.stepNum;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .setAttribute(\"aria-hidden\", \"true\");\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.stepTitle = undefined;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .removeAttribute(\"aria-hidden\");\n }\n }\n }\n\n if (this.variant === \"compact\") {\n if (step.current === true || step.stepType === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n } else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n\n if (!step.lastStep) {\n step.nextStepTitle = this.steps[index + 1].stepTitle;\n step.progress = (step.stepNum / this.steps.length) * 100;\n } else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n } else {\n step.progress = 100;\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(this.visuallyHidden);\n }\n\n step.compactStepStyling = this.stepTypes[index];\n }\n\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth) {\n step.style.width = pxToRem(\n `${\n (this.stepperWidth - this.lastStepWidth) /\n (this.steps.length - 1)\n }px`\n );\n step.style.minWidth = pxToRem(\"148px\");\n }\n } else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n } else {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n }\n }\n\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n const stepConnect = step.shadowRoot.querySelector(\n \".step > .step-top > .step-connect\"\n ) as HTMLElement;\n\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth}px`)\n : pxToRem(\"100px\");\n }\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(this.visuallyHidden);\n }\n }\n });\n };\n\n private setHideStepInfo = (): void => {\n this.steps.forEach((step) => {\n const stepTitleArea = step.shadowRoot.querySelector(\n \".step > .step-title-area\"\n );\n\n if (stepTitleArea !== null) {\n if (this.hideStepInfo) {\n stepTitleArea.classList?.add(this.visuallyHidden);\n } else {\n stepTitleArea.classList?.remove(this.visuallyHidden);\n }\n }\n });\n };\n\n private overrideVariant = () => {\n if (this.variantOverride) {\n let minDefaultStepperWidth = 148 * this.steps.length;\n\n if (this.aligned === \"left\" && this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n } else {\n this.variant = \"default\";\n }\n }\n };\n\n private resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n return (\n <Host\n class={{\n [`${this.variant}`]: true,\n [\"aligned-left\"]:\n this.variant === \"default\" && this.aligned === \"left\",\n }}\n >\n <ul class=\"step-item-list\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"mappings":"4HAAA,MAAMA,EAAe,6U,MCURC,EAAO,M,yBACVC,KAAAC,eAAiC,KAGjCD,KAAAE,eAAyB,kBAqEzBF,KAAAG,YAAc,KACpBH,KAAKI,MAAQC,MAAMC,KAAKN,KAAKO,GAAGC,iBAAiB,YAEjDR,KAAKS,oBAAsBJ,MAAMC,KAC/BN,KAAKO,GAAGC,iBAAiB,uBAC1B,EAIKR,KAAAU,gBAAkB,KACxB,GACEV,KAAKS,oBAAoBE,OAASX,KAAKI,MAAMO,QAC7CX,KAAKY,iBACLZ,KAAKa,UAAY,UACjB,CACAb,KAAKc,YAAcd,KAAKc,YAAc,EACtC,GAAId,KAAKc,cAAgB,EAAG,CAC1BC,QAAQC,MACN,oI,IAMAhB,KAAAiB,aAAe,KACrBjB,KAAKG,cACLH,KAAKkB,UAAY,GACjB,IAAK,IAAIC,EAAI,EAAGA,EAAInB,KAAKI,M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G,qBACCvD,KAAKa,UAAY,U,aAKf,a,gBAKI,U,oBAKT,I,kBAKD,M,aAKmB,S,CAIpD,gBAAA0D,GACEvE,KAAK2D,kBACL3D,KAAKG,a,CAGP,oBAAAqE,GACE,GAAIxE,KAAKC,iBAAmB,KAAM,CAChCD,KAAKC,eAAewE,Y,EAIxB,iBAAAC,GACE1E,KAAKiB,eAEL,GAAIjB,KAAKa,UAAY,UAAW,CAC9Bb,KAAKY,gBAAkB,K,EAI3B,mBAAA+D,GACE3E,KAAK+B,sB,CAGP,gBAAA6C,GACEC,EAAoB7E,KAAKkE,kB,CAsN3B,MAAAY,GACE,OACEC,EAACC,EAAI,CACHC,MAAO,CACL,CAAC,GAAGjF,KAAKa,WAAY,KACrB,CAAC,gBACCb,KAAKa,UAAY,WAAab,KAAKuB,UAAY,SAGnDwD,EAAA,MAAIE,MAAM,kBACRF,EAAA,c"}
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,H as i,g as a}from"./p-6b5e91e2.js";import{i as s,e as n,D as o,f as r}from"./p-a5dd7065.js";import"./p-26b7b18f.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;z-index:var(--ic-z-index-page-header)}:host(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay);z-index:var(--ic-z-index-sticky-page-header)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:var(--ic-border-default)}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:19rem;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;margin-bottom: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:0.5rem;margin:-0.5rem}.tabs-slot::-webkit-scrollbar{display:none}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:20rem}.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);z-index:var(--ic-z-index-sticky-page-header)}}';const d=class{constructor(e){t(this,e);this.resizeObserver=null;this.resizeObserverCallback=()=>{if(this.reverseOrder&&s(this.el,"actions")){this.applyReverseOrder()}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.applyReverseOrder=()=>{const t=n();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 s=e.offsetHeight;if(s===undefined){s=0}const r=()=>{this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed};if(this.deviceSize>o.S&&s<=a&&!this.areButtonsReversed||(this.deviceSize>o.S&&s>a||this.deviceSize<=o.S)&&this.areButtonsReversed){r()}};this.actionContent=undefined;this.areButtonsReversed=false;this.deviceSize=o.XL;this.aligned="left";this.border=true;this.heading=undefined;this.reverseOrder=false;this.size="default";this.small=false;this.sticky=false;this.stickyDesktopOnly=false;this.subheading=undefined}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.actionContent=Array.from(this.el.querySelectorAll(`[slot="actions"]`))}componentDidLoad(){r(this.runResizeObserver)}render(){const{small:t,size:a,border:n,heading:o,subheading:r,aligned:l,sticky:d,stickyDesktopOnly:c}=this;const p=o?`${o} page sections`:"navigation-landmark-page-header";return e(i,{class:{["sticky"]:d,["sticky-desktop"]:!d&&c}},e("header",{class:{["border-bottom"]:n,["tabs"]:s(this.el,"tabs")}},e("ic-section-container",{aligned:l,fullHeight:s(this.el,"tabs")},s(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||a==="small"?"h4":"h2",class:"heading"},e("h2",null,o))),e("slot",{name:"heading-adornment"})),e("div",null,e("slot",{name:"subheading"},r&&e("ic-typography",{variant:"body",class:{["subheading"]:true,["small"]:t||a==="small"}},r)))),s(this.el,"actions")&&e("div",{class:"action-area"},e("slot",{name:"actions"})),s(this.el,"input")&&e("div",{class:"input-area"},e("slot",{name:"input"}))),(s(this.el,"stepper")||s(this.el,"tabs"))&&e("div",{class:"navigation-area"},s(this.el,"stepper")&&!s(this.el,"tabs")&&e("slot",{name:"stepper"}),s(this.el,"tabs")&&e("nav",{"aria-label":p},e("ic-horizontal-scroll",null,e("ul",{class:"tabs-slot"},e("slot",{name:"tabs"}))))))))}get el(){return a(this)}};d.style=l;export{d as ic_page_header};
2
- //# sourceMappingURL=p-65ddd1b0.entry.js.map
1
+ import{r as t,h as e,H as i,g as a}from"./p-6b5e91e2.js";import{i as s,e as n,D as o,f as r}from"./p-a5dd7065.js";import"./p-26b7b18f.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;z-index:var(--ic-z-index-page-header)}:host(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay);z-index:var(--ic-z-index-sticky-page-header)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:var(--ic-border-default)}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:19rem;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;margin-bottom: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:0.5rem;margin:-0.5rem}.tabs-slot::-webkit-scrollbar{display:none}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:20rem}.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);z-index:var(--ic-z-index-sticky-page-header)}}';const d=class{constructor(e){t(this,e);this.resizeObserver=null;this.resizeObserverCallback=()=>{if(this.reverseOrder&&s(this.el,"actions")){this.applyReverseOrder()}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.applyReverseOrder=()=>{const t=n();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 s=e.offsetHeight;if(s===undefined){s=0}const r=()=>{this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed};if(this.deviceSize>o.S&&s<=a&&!this.areButtonsReversed||(this.deviceSize>o.S&&s>a||this.deviceSize<=o.S)&&this.areButtonsReversed){r()}};this.actionContent=undefined;this.areButtonsReversed=false;this.deviceSize=o.XL;this.aligned="left";this.border=true;this.heading=undefined;this.reverseOrder=false;this.size="default";this.small=false;this.sticky=false;this.stickyDesktopOnly=false;this.subheading=undefined}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.actionContent=Array.from(this.el.querySelectorAll(`[slot="actions"]`))}componentDidLoad(){r(this.runResizeObserver)}render(){const{small:t,size:a,border:n,heading:o,subheading:r,aligned:l,sticky:d,stickyDesktopOnly:c}=this;const p=o?`${o} page sections`:"navigation-landmark-page-header";return e(i,{class:{["sticky"]:d,["sticky-desktop"]:!d&&c},"aria-label":this.el.ariaLabel||"page header"},e("header",{class:{["border-bottom"]:n,["tabs"]:s(this.el,"tabs")},role:"presentation"},e("ic-section-container",{aligned:l,fullHeight:s(this.el,"tabs")},s(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||a==="small"?"h4":"h2",class:"heading"},e("h2",null,o))),e("slot",{name:"heading-adornment"})),e("div",null,e("slot",{name:"subheading"},r&&e("ic-typography",{variant:"body",class:{["subheading"]:true,["small"]:t||a==="small"}},r)))),s(this.el,"actions")&&e("div",{class:"action-area"},e("slot",{name:"actions"})),s(this.el,"input")&&e("div",{class:"input-area"},e("slot",{name:"input"}))),(s(this.el,"stepper")||s(this.el,"tabs"))&&e("div",{class:"navigation-area"},s(this.el,"stepper")&&!s(this.el,"tabs")&&e("slot",{name:"stepper"}),s(this.el,"tabs")&&e("nav",{"aria-label":p},e("ic-horizontal-scroll",null,e("ul",{class:"tabs-slot"},e("slot",{name:"tabs"}))))))))}get el(){return a(this)}};d.style=l;export{d as ic_page_header};
2
+ //# sourceMappingURL=p-73e5eca2.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icPageHeaderCss","PageHeader","this","resizeObserver","resizeObserverCallback","reverseOrder","isSlotUsed","el","applyReverseOrder","runResizeObserver","ResizeObserver","observe","currSize","getCurrentDeviceSize","deviceSize","actionArea","shadowRoot","querySelector","actionHeights","i","actionContent","length","action","actionHeight","offsetHeight","undefined","push","max","Math","actionAreaHeight","appendActionContent","reverse","forEach","btn","append","areButtonsReversed","DEVICE_SIZES","S","XL","disconnectedCallback","disconnect","componentWillLoad","Array","from","querySelectorAll","componentDidLoad","checkResizeObserver","render","small","size","border","heading","subheading","aligned","sticky","stickyDesktopOnly","navAriaLabel","h","Host","class","ariaLabel","role","fullHeight","name","variant"],"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"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-page-header: z-index of page-header\n */\n\n:host {\n display: block;\n z-index: var(--ic-z-index-page-header);\n}\n\n:host(.sticky) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n z-index: var(--ic-z-index-sticky-page-header);\n}\n\nheader {\n background-color: var(--ic-architectural-40);\n}\n\nheader.border-bottom {\n border-bottom: var(--ic-border-default);\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: 19rem;\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 margin-bottom: 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: 0.5rem;\n margin: -0.5rem;\n}\n\n.tabs-slot::-webkit-scrollbar {\n display: none;\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: 20rem;\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 z-index: var(--ic-z-index-sticky-page-header);\n }\n}\n","import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment, IcSizesNoLarge } 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 private resizeObserver: ResizeObserver = null;\n\n @Element() el: HTMLIcPageHeaderElement;\n\n @State() actionContent: Node[];\n @State() areButtonsReversed: boolean = false;\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n\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 /**\n * The size of the page header component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n\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 /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\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 private resizeObserverCallback = () => {\n if (this.reverseOrder && isSlotUsed(this.el, \"actions\")) {\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 breakpoint 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 const appendActionContent = () => {\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 if (\n (this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed) ||\n (((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed)\n ) {\n appendActionContent();\n }\n };\n\n render() {\n const {\n small,\n size,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n const navAriaLabel = heading\n ? `${heading} page sections`\n : \"navigation-landmark-page-header\";\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n aria-label={this.el.ariaLabel || \"page header\"}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n role=\"presentation\"\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 || size === \"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={{\n [\"subheading\"]: true,\n [\"small\"]: small || size === \"small\",\n }}\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 aria-label={navAriaLabel}>\n <ic-horizontal-scroll>\n <ul class=\"tabs-slot\">\n <slot name=\"tabs\" />\n </ul>\n </ic-horizontal-scroll>\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"],"mappings":"0IAAA,MAAMA,EAAkB,6sI,MC2BXC,EAAU,M,yBACbC,KAAAC,eAAiC,KAqEjCD,KAAAE,uBAAyB,KAC/B,GAAIF,KAAKG,cAAgBC,EAAWJ,KAAKK,GAAI,WAAY,CACvDL,KAAKM,mB,GAIDN,KAAAO,kBAAoB,KAC1BP,KAAKC,eAAiB,IAAIO,gBAAe,KACvCR,KAAKE,wBAAwB,IAE/BF,KAAKC,eAAeQ,QAAQT,KAAKK,GAAG,EAG9BL,KAAAM,kBAAoB,KAC1B,MAAMI,EAAWC,IACjB,GAAID,IAAaV,KAAKY,WAAY,CAChCZ,KAAKY,WAAaF,C,CAGpB,MAAMG,EAAab,KAAKK,GAAGS,WAAWC,cACpC,mBAEF,MAAMC,EAA0B,GAGhC,IAAK,IAAIC,EAAI,EAAGA,EAAIjB,KAAKkB,cAAcC,OAAQF,IAAK,CAClD,MAAMG,EAASpB,KAAKkB,cAAcD,GAClC,IAAII,EAAeD,EAAOE,aAC1B,GAAID,IAAiBE,UAAW,CAC9BF,EAAe,C,CAEjBL,EAAcQ,KAAKH,E,CAGrB,MAAMI,EAAMC,KAAKD,OAAOT,GAGxB,IAAIW,EAAmBd,EAAWS,aAElC,GAAIK,IAAqBJ,UAAW,CAClCI,EAAmB,C,CAGrB,MAAMC,EAAsB,KAC1B5B,KAAKkB,cAAgBlB,KAAKkB,cAAcW,UACxC7B,KAAKkB,cAAcY,SAASC,IAC1B/B,KAAKK,GAAG2B,OAAOD,EAAI,IAErB/B,KAAKiC,oBAAsBjC,KAAKiC,kBAAkB,EAGpD,GACGjC,KAAKY,WAAasB,EAAaC,GAC9BR,GAAoBF,IACnBzB,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EAAA,iBACEO,QAAQ,OACRL,MAAO,CACL,CAAC,cAAe,KAChB,CAAC,SAAUX,GAASC,IAAS,UAG9BG,MAMV9C,EAAWJ,KAAKK,GAAI,YACnBkD,EAAA,OAAKE,MAAM,eACTF,EAAA,QAAMM,KAAK,aAGdzD,EAAWJ,KAAKK,GAAI,UACnBkD,EAAA,OAAKE,MAAM,cACTF,EAAA,QAAMM,KAAK,aAKfzD,EAAWJ,KAAKK,GAAI,YACpBD,EAAWJ,KAAKK,GAAI,UACpBkD,EAAA,OAAKE,MAAM,mBACRrD,EAAWJ,KAAKK,GAAI,aAClBD,EAAWJ,KAAKK,GAAI,SAAWkD,EAAA,QAAMM,KAAK,YAC5CzD,EAAWJ,KAAKK,GAAI,SACnBkD,EAAA,oBAAiBD,GACfC,EAAA,4BACEA,EAAA,MAAIE,MAAM,aACRF,EAAA,QAAMM,KAAK,e"}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as e,g as i}from"./p-6b5e91e2.js";import{j as a,i as o,a as r,k as n}from"./p-a5dd7065.js";import{I as s}from"./p-26b7b18f.js";import{C as c}from"./p-3b185c32.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:flex}a{text-decoration:none !important;color:var(--ic-architechtural-black) !important}button{border:none;background-color:transparent;outline:var(--ic-hc-focus-outline)}.card,.card.clickable{display:flex;flex-direction:column;border:var(--ic-border-default);border-radius:var(--ic-border-radius);box-sizing:border-box;padding:var(--ic-space-md);text-align:left;color:var(--ic-architechtural-black);transition:var(--ic-easing-transition-fast);position:relative;width:inherit;min-width:-moz-fit-content;min-width:fit-content;height:-moz-fit-content;height:fit-content;min-height:100%}.dark.card,.dark.card.clickable{border:var(--ic-border-width) solid var(--ic-architectural-700)}.card.clickable:hover{background-color:var(--ic-action-default-bg-hover);border:var(--ic-border-hover);cursor:pointer}.card.clickable:focus,.card.clickable.focussed{background-color:var(--ic-action-default-bg-hover);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border:var(--ic-border-pressed)}.card.clickable:active{background-color:var(--ic-action-default-bg-active);box-shadow:var(--ic-border-focus)}.card.disabled{border:var(--ic-border-disabled)}.card.fullwidth{width:100%}.card-header{display:flex;align-items:center}.icon{display:flex;align-items:center;padding-right:var(--ic-space-xs)}.card.disabled ::slotted(svg){fill:var(--ic-color-tertiary-text)}.card.clickable .card-title{color:var(--ic-hyperlink);text-decoration:underline;text-decoration-thickness:var(--ic-space-1px)}.card.clickable:hover .card-title,.card.clickable:focus .card-title,.card.clickable.focussed .card-title{display:inline-block;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}@supports (text-underline-offset: 25%){.card.clickable:hover .card-title,.card.clickable:focus .card-title,.card.clickable.focussed .card-title{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}.card.clickable:active .card-title{text-decoration:none}.card.disabled .card-title{text-decoration:underline;text-decoration-thickness:var(--ic-space-1px);text-decoration-color:var(--ic-color-tertiary-text);color:var(--ic-color-tertiary-text)}.subheading{margin-top:var(--ic-space-xxs)}.adornment{margin-top:var(--ic-space-xxs)}.card-message{margin-top:var(--ic-space-md);align-items:left}.card.disabled .card-message,.card.disabled .subheading{color:var(--ic-color-tertiary-text)}.interaction-button{margin-left:auto}.image-top{margin-bottom:var(--ic-space-md);display:flex;justify-content:center}.image-mid{margin-top:var(--ic-space-md);display:flex;justify-content:center}.interaction-area{display:flex;flex-grow:1;gap:var(--ic-space-md);margin-top:var(--ic-space-md);align-items:flex-end}.interaction-controls{display:flex;align-items:center;flex-wrap:wrap;gap:var(--ic-space-sm)}.toggle-button{color:var(--ic-action-default);width:2.5rem;height:2.5rem;padding:var(--ic-space-xs);margin:var(--ic-space-1px) 0;min-width:0;cursor:pointer;transition:var(--ic-easing-transition-fast);border-radius:var(--ic-border-radius);display:inline-flex;flex-direction:row;justify-content:center;align-items:center;background:none;border:none;box-sizing:border-box;white-space:nowrap;vertical-align:middle}#ic-tooltip-expand-button{margin-left:auto;position:relative}.toggle-button:hover,.toggle-button:hover:focus{background-color:var(--ic-action-default-bg-hover);color:var(--ic-action-default-hover)}.toggle-button:focus{box-shadow:var(--ic-border-focus)}.toggle-button:active:not(:focus){background-color:var(--ic-action-default-bg-active);color:var(--ic-action-default-active)}.toggle-button svg{pointer-events:none;width:100% !important;height:100% !important;fill:currentcolor !important}.toggle-button-closed svg{transform:rotate(90deg)}.toggle-button-expanded svg{transform:rotate(-90deg)}.expanded-content{margin-top:var(--ic-space-md)}@media (forced-colors: active){.card ::slotted(svg){fill:currentcolor}.card.disabled ::slotted(svg){fill:GrayText !important}.card.disabled{border-color:GrayText !important}.card.disabled .card-message,.card.disabled .subheading,.card.disabled .card-title{color:GrayText}}';const l=class{constructor(e){t(this,e);this.parentFocussed=()=>{this.isFocussed=true};this.parentBlurred=()=>{this.isFocussed=false};this.toggleExpanded=()=>{this.areaExpanded=!this.areaExpanded};this.appearance="default";this.areaExpanded=false;this.isFocussed=false;this.parentEl=null;this.parentIsAnchorTag=false;this.clickable=false;this.disabled=false;this.expandable=false;this.fullWidth=false;this.heading=undefined;this.href=undefined;this.hreflang="";this.message="";this.referrerpolicy=undefined;this.rel=undefined;this.subheading=undefined;this.target=undefined}disconnectedCallback(){if(this.parentIsAnchorTag){this.parentEl.removeEventListener("focus",this.parentFocussed);this.parentEl.removeEventListener("blur",this.parentBlurred)}}componentWillLoad(){this.parentEl=this.el.parentElement;if(this.parentEl.tagName==="A"){this.clickable=true;this.parentIsAnchorTag=true;this.parentEl.classList.add("ic-card-wrapper-link");this.parentEl.addEventListener("focus",this.parentFocussed);this.parentEl.addEventListener("blur",this.parentBlurred)}a(this.disabled,this.el)}componentDidLoad(){!o(this.el,"heading")&&r([{prop:this.heading,propName:"heading"}],"Card");this.updateTheme()}handleHostClick(t){if(this.disabled){t.stopImmediatePropagation()}}themeChangeHandler(t){const e=t.detail;this.updateTheme(e.mode)}async setFocus(){if(this.el.shadowRoot.querySelector("a")){this.el.shadowRoot.querySelector("a").focus()}else if(this.el.shadowRoot.querySelector("button")){this.el.shadowRoot.querySelector("button").focus()}}updateTheme(t=null){const e=n(this.el,t||null);if(e!==s.Default){this.appearance=e}}render(){const{clickable:t,disabled:i,expandable:a,heading:r,message:n,href:d,hreflang:l,referrerpolicy:b,rel:u,subheading:h,target:p,fullWidth:m,parentIsAnchorTag:g,isFocussed:f}=this;const v=g?"div":t?this.href===undefined?"button":"a":"div";const x=v=="a"&&{href:d,hrefLang:l,referrerPolicy:b,rel:u,target:p};return e(v,Object.assign({class:{["card"]:true,["clickable"]:t&&!i,["disabled"]:i,["fullwidth"]:m,["focussed"]:f,["dark"]:this.appearance===s.Dark},tabindex:t&&!g?0:null,"aria-disabled":i?"true":null,disabled:i?true:null},x),o(this.el,"image-top")&&e("div",{class:"image-top"},e("slot",{name:"image-top"})),e("div",{class:"card-header"},o(this.el,"icon")&&e("div",{class:"icon"},e("slot",{name:"icon"})),e("div",{class:"card-title"},e("slot",{name:"heading"},e("ic-typography",{variant:"h4"},e("p",null,r)))),o(this.el,"interaction-button")&&e("div",{class:"interaction-button"},e("slot",{name:"interaction-button"}))),(h||o(this.el,"subheading"))&&e("div",{class:"subheading"},e("slot",{name:"subheading"},e("ic-typography",{variant:"subtitle-small"},h))),o(this.el,"adornment")&&e("div",{class:"adornment"},e("slot",{name:"adornment"})),o(this.el,"image-mid")&&e("div",{class:"image-mid"},e("slot",{name:"image-mid"})),(n||o(this.el,"message"))&&e("div",{class:{["card-message"]:true}},n&&e("ic-typography",{variant:"body"},n),o(this.el,"message")&&e("slot",{name:"message"})),(o(this.el,"interaction-controls")||a)&&e("div",{class:"interaction-area"},e("div",{class:"interaction-controls"},e("slot",{name:"interaction-controls"})),a&&e("ic-tooltip",{id:"ic-tooltip-expand-button",label:"Toggle expandable area",silent:true},e("button",{class:{["toggle-button"]:true,[`toggle-button-${this.areaExpanded?"expanded":"closed"}`]:true},"aria-label":"Toggle expandable area","aria-expanded":`${this.areaExpanded}`,"aria-controls":this.areaExpanded?"expanded-content-area":null,onClick:this.toggleExpanded,innerHTML:c}))),o(this.el,"expanded-content")&&this.areaExpanded&&e("div",{class:"expanded-content",id:"expanded-content-area"},e("slot",{name:"expanded-content"})),o(this.el,"badge")&&e("slot",{name:"badge"}))}get el(){return i(this)}};l.style=d;export{l as ic_card};
2
+ //# sourceMappingURL=p-74e3ca39.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icCardCss","Card","this","parentFocussed","isFocussed","parentBlurred","toggleExpanded","areaExpanded","disconnectedCallback","parentIsAnchorTag","parentEl","removeEventListener","componentWillLoad","el","parentElement","tagName","clickable","classList","add","addEventListener","removeDisabledFalse","disabled","componentDidLoad","isSlotUsed","onComponentRequiredPropUndefined","prop","heading","propName","updateTheme","handleHostClick","event","stopImmediatePropagation","themeChangeHandler","ev","theme","detail","mode","setFocus","shadowRoot","querySelector","focus","newTheme","foregroundColor","getThemeFromContext","IcThemeForegroundEnum","Default","appearance","render","expandable","message","href","hreflang","referrerpolicy","rel","subheading","target","fullWidth","Component","undefined","attrs","hrefLang","referrerPolicy","h","Object","assign","class","Dark","tabindex","name","variant","id","label","silent","onClick","innerHTML","chevronIcon"],"sources":["src/components/ic-card/ic-card.css?tag=ic-card&encapsulation=shadow","src/components/ic-card/ic-card.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-architechtural-black) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card,\n.card.clickable {\n display: flex;\n flex-direction: column;\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-architechtural-black);\n transition: var(--ic-easing-transition-fast);\n position: relative;\n width: inherit;\n min-width: fit-content;\n height: fit-content;\n min-height: 100%;\n}\n\n.dark.card,\n.dark.card.clickable {\n border: var(--ic-border-width) solid var(--ic-architectural-700);\n}\n\n.card.clickable:hover {\n background-color: var(--ic-action-default-bg-hover);\n border: var(--ic-border-hover);\n cursor: pointer;\n}\n\n.card.clickable:focus,\n.card.clickable.focussed {\n background-color: var(--ic-action-default-bg-hover);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n border: var(--ic-border-pressed);\n}\n\n.card.clickable:active {\n background-color: var(--ic-action-default-bg-active);\n box-shadow: var(--ic-border-focus);\n}\n\n.card.disabled {\n border: var(--ic-border-disabled);\n}\n\n.card.fullwidth {\n width: 100%;\n}\n\n.card-header {\n display: flex;\n align-items: center;\n}\n\n.icon {\n display: flex;\n align-items: center;\n padding-right: var(--ic-space-xs);\n}\n\n.card.disabled ::slotted(svg) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.card.clickable .card-title {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n}\n\n.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title {\n display: inline-block;\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n@supports (text-underline-offset: 25%) {\n .card.clickable:hover .card-title,\n .card.clickable:focus .card-title,\n .card.clickable.focussed .card-title {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n\n.card.clickable:active .card-title {\n text-decoration: none;\n}\n\n.card.disabled .card-title {\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n text-decoration-color: var(--ic-color-tertiary-text);\n color: var(--ic-color-tertiary-text);\n}\n\n.subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n.adornment {\n margin-top: var(--ic-space-xxs);\n}\n\n.card-message {\n margin-top: var(--ic-space-md);\n align-items: left;\n}\n\n.card.disabled .card-message,\n.card.disabled .subheading {\n color: var(--ic-color-tertiary-text);\n}\n\n.interaction-button {\n margin-left: auto;\n}\n\n.image-top {\n margin-bottom: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.image-mid {\n margin-top: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.interaction-area {\n display: flex;\n flex-grow: 1;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-md);\n align-items: flex-end;\n}\n\n.interaction-controls {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--ic-space-sm);\n}\n\n.toggle-button {\n color: var(--ic-action-default);\n width: 2.5rem;\n height: 2.5rem;\n padding: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n min-width: 0;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n}\n\n#ic-tooltip-expand-button {\n margin-left: auto;\n position: relative;\n}\n\n.toggle-button:hover,\n.toggle-button:hover:focus {\n background-color: var(--ic-action-default-bg-hover);\n color: var(--ic-action-default-hover);\n}\n\n.toggle-button:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.toggle-button:active:not(:focus) {\n background-color: var(--ic-action-default-bg-active);\n color: var(--ic-action-default-active);\n}\n\n.toggle-button svg {\n pointer-events: none;\n width: 100% !important;\n height: 100% !important;\n fill: currentcolor !important;\n}\n\n.toggle-button-closed svg {\n transform: rotate(90deg);\n}\n\n.toggle-button-expanded svg {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n margin-top: var(--ic-space-md);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .card ::slotted(svg) {\n fill: currentcolor;\n }\n\n .card.disabled ::slotted(svg) {\n fill: GrayText !important;\n }\n\n .card.disabled {\n border-color: GrayText !important;\n }\n\n .card.disabled .card-message,\n .card.disabled .subheading,\n .card.disabled .card-title {\n color: GrayText;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n ::slotted([slot=\"icon\"]) {\n fill: var(--ic-architectural-white);\n }\n} */\n","import {\n Component,\n Element,\n Listen,\n Prop,\n State,\n h,\n Method,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getThemeFromContext,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot heading - Content will be placed at the top of the card to the right of the icon.\n * @slot message - Content will be placed in the main body of the card.\n * @slot subheading - Content will be placed below the card heading.\n * @slot adornment - Content will be placed below the card subheading.\n * @slot image-top - Content will be placed at the top of the card above all other content.\n * @slot image-mid - Content will be placed below the card heading section.\n * @slot icon - Content will be placed to the left of the card heading.\n * @slot interaction-button - Content will be placed in the top right corner of the heading section.\n * @slot interaction-controls - Content will be placed below the card message.\n * @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.\n * @slot badge - Badge component overlaying the top right of the card.\n */\n@Component({\n tag: \"ic-card\",\n styleUrl: \"ic-card.css\",\n shadow: true,\n})\nexport class Card {\n @Element() el: HTMLIcCardElement;\n\n @State() appearance?: IcThemeForeground = \"default\";\n @State() areaExpanded: boolean = false;\n @State() isFocussed: boolean = false;\n @State() parentEl: HTMLElement | null = null;\n @State() parentIsAnchorTag: boolean = false;\n\n /**\n * If `true`, the card will be a clickable variant, instead of static.\n */\n @Prop({ mutable: true }) clickable?: boolean = false;\n\n /**\n * If `true`, the card will be disabled if it is clickable.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the card will have an expandable area and expansion toggle button.\n */\n @Prop() expandable?: boolean = false;\n\n /**\n * If `true`, the card will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The heading for the card. This is required, unless a slotted heading is used.\n */\n @Prop() heading?: string;\n\n /**\n * The URL that the clickable card link points to. If set, the clickable card will render as an \"a\" tag, otherwise it will render as a button.\n */\n @Prop() href?: string | undefined;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n\n /**\n * The main body message of the card.\n */\n @Prop() message?: string = \"\";\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The subheading for the card.\n */\n @Prop() subheading?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n disconnectedCallback(): void {\n if (this.parentIsAnchorTag) {\n this.parentEl.removeEventListener(\"focus\", this.parentFocussed);\n this.parentEl.removeEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n componentWillLoad(): void {\n this.parentEl = this.el.parentElement;\n\n if (this.parentEl.tagName === \"A\") {\n this.clickable = true;\n this.parentIsAnchorTag = true;\n this.parentEl.classList.add(\"ic-card-wrapper-link\");\n this.parentEl.addEventListener(\"focus\", this.parentFocussed);\n this.parentEl.addEventListener(\"blur\", this.parentBlurred);\n }\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Card\"\n );\n this.updateTheme();\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled) {\n event.stopImmediatePropagation();\n }\n }\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 /**\n * Sets focus on the card.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"a\")) {\n this.el.shadowRoot.querySelector(\"a\").focus();\n } else if (this.el.shadowRoot.querySelector(\"button\")) {\n this.el.shadowRoot.querySelector(\"button\").focus();\n }\n }\n\n private parentFocussed = (): void => {\n this.isFocussed = true;\n };\n\n private parentBlurred = (): void => {\n this.isFocussed = false;\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private toggleExpanded = (): void => {\n this.areaExpanded = !this.areaExpanded;\n };\n\n render() {\n const {\n clickable,\n disabled,\n expandable,\n heading,\n message,\n href,\n hreflang,\n referrerpolicy,\n rel,\n subheading,\n target,\n fullWidth,\n parentIsAnchorTag,\n isFocussed,\n } = this;\n\n const Component = parentIsAnchorTag\n ? \"div\"\n : clickable\n ? this.href === undefined\n ? \"button\"\n : \"a\"\n : \"div\";\n\n const attrs = Component == \"a\" && {\n href: href,\n hrefLang: hreflang,\n referrerPolicy: referrerpolicy,\n rel: rel,\n target: target,\n };\n\n return (\n <Component\n class={{\n [\"card\"]: true,\n [\"clickable\"]: clickable && !disabled,\n [\"disabled\"]: disabled,\n [\"fullwidth\"]: fullWidth,\n [\"focussed\"]: isFocussed,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n }}\n tabindex={clickable && !parentIsAnchorTag ? 0 : null}\n aria-disabled={disabled ? \"true\" : null}\n disabled={disabled ? true : null}\n {...attrs}\n >\n {isSlotUsed(this.el, \"image-top\") && (\n <div class=\"image-top\">\n <slot name=\"image-top\"></slot>\n </div>\n )}\n <div class=\"card-header\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <div class=\"card-title\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">\n <p>{heading}</p>\n </ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"interaction-button\") && (\n <div class=\"interaction-button\">\n <slot name=\"interaction-button\"></slot>\n </div>\n )}\n </div>\n {(subheading || isSlotUsed(this.el, \"subheading\")) && (\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">\n {subheading}\n </ic-typography>\n </slot>\n </div>\n )}\n {isSlotUsed(this.el, \"adornment\") && (\n <div class=\"adornment\">\n <slot name=\"adornment\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"image-mid\") && (\n <div class=\"image-mid\">\n <slot name=\"image-mid\"></slot>\n </div>\n )}\n {(message || isSlotUsed(this.el, \"message\")) && (\n <div\n class={{\n [\"card-message\"]: true,\n }}\n >\n {message && <ic-typography variant=\"body\">{message}</ic-typography>}\n {isSlotUsed(this.el, \"message\") && <slot name=\"message\"></slot>}\n </div>\n )}\n {(isSlotUsed(this.el, \"interaction-controls\") || expandable) && (\n <div class=\"interaction-area\">\n <div class=\"interaction-controls\">\n <slot name=\"interaction-controls\"></slot>\n </div>\n {expandable && (\n <ic-tooltip\n id=\"ic-tooltip-expand-button\"\n label=\"Toggle expandable area\"\n silent\n >\n <button\n class={{\n [\"toggle-button\"]: true,\n [`toggle-button-${\n this.areaExpanded ? \"expanded\" : \"closed\"\n }`]: true,\n }}\n aria-label=\"Toggle expandable area\"\n aria-expanded={`${this.areaExpanded}`}\n aria-controls={\n this.areaExpanded ? \"expanded-content-area\" : null\n }\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></button>\n </ic-tooltip>\n )}\n </div>\n )}\n {isSlotUsed(this.el, \"expanded-content\") && this.areaExpanded && (\n <div class=\"expanded-content\" id=\"expanded-content-area\">\n <slot name=\"expanded-content\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </Component>\n );\n }\n}\n"],"mappings":"mLAAA,MAAMA,EAAY,y9M,MCwCLC,EAAI,M,yBA2HPC,KAAAC,eAAiB,KACvBD,KAAKE,WAAa,IAAI,EAGhBF,KA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ACpBf,KAKR/B,EAAWrB,KAAKW,GAAI,cACnBiD,EAAA,OAAKG,MAAM,aACTH,EAAA,QAAMM,KAAK,eAGd7C,EAAWrB,KAAKW,GAAI,cACnBiD,EAAA,OAAKG,MAAM,aACTH,EAAA,QAAMM,KAAK,gBAGbnB,GAAW1B,EAAWrB,KAAKW,GAAI,aAC/BiD,EAAA,OACEG,MAAO,CACL,CAAC,gBAAiB,OAGnBhB,GAAWa,EAAA,iBAAeO,QAAQ,QAAQpB,GAC1C1B,EAAWrB,KAAKW,GAAI,YAAciD,EAAA,QAAMM,KAAK,cAGhD7C,EAAWrB,KAAKW,GAAI,yBAA2BmC,IAC/Cc,EAAA,OAAKG,MAAM,oBACTH,EAAA,OAAKG,MAAM,wBACTH,EAAA,QAAMM,KAAK,0BAEZpB,GACCc,EAAA,cACEQ,GAAG,2BACHC,MAAM,yBACNC,OAAM,MAENV,EAAA,UACEG,MAAO,CACL,CAAC,iBAAkB,KACnB,CAAC,iBACC/D,KAAKK,aAAe,WAAa,YAC9B,MACN,aACU,yBAAwB,gBACpB,GAAGL,KAAKK,eAAc,gBAEnCL,KAAKK,aAAe,wBAA0B,KAEhDkE,QAASvE,KAAKI,eACdoE,UAAWC,MAMpBpD,EAAWrB,KAAKW,GAAI,qBAAuBX,KAAKK,cAC/CuD,EAAA,OAAKG,MAAM,mBAAmBK,GAAG,yBAC/BR,EAAA,QAAMM,KAAK,sBAGd7C,EAAWrB,KAAKW,GAAI,UAAYiD,EAAA,QAAMM,KAAK,U"}
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as e,g as o}from"./p-6b5e91e2.js";import{f as a}from"./p-a5dd7065.js";import"./p-26b7b18f.js";const s='/*! 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;position:relative}:host(.ic-typography-vertical-margins-h1){margin:0 0 var(--ic-space-xl)}:host(.ic-typography-vertical-margins-h2){margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}:host(.ic-typography-vertical-margins-h3){margin:var(--ic-space-xl) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-h4){margin:var(--ic-space-lg) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-subtitle-large),:host(.ic-typography-vertical-margins-subtitle-small),:host(.ic-typography-vertical-margins-body),:host(.ic-typography-vertical-margins-code-large),:host(.ic-typography-vertical-margins-code-small),:host(.ic-typography-vertical-margins-code-extra-small){margin:0 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-caption),:host(.ic-typography-vertical-margins-caption-uppercase){margin:0 0 var(--ic-space-xs)}:host(.ic-typography-vertical-margins-h2:first-child),:host(.ic-typography-vertical-margins-h3:first-child),:host(.ic-typography-vertical-margins-h4:first-child){margin-top:0}:host(.ic-typography-h1){font:var(--ic-font-h1) !important}:host(.ic-typography-h2){font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-h3){font:var(--ic-font-h3)}:host(.ic-typography-h4){font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-large){font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-small){font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-body){font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-caption){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-caption-uppercase){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}:host(.ic-typography-label){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-label-uppercase){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}:host(.ic-typography-code-large){font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-code-small){font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-code-extra-small){font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-badge){font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-badge-small){font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-no-wrap){white-space:nowrap}:host ::slotted(h1),:host ::slotted(h2),:host ::slotted(h3),:host ::slotted(h4),:host ::slotted(h5),:host ::slotted(h6),:host ::slotted(p),:host ::slotted(label){font:inherit;letter-spacing:inherit}.trunc-wrapper{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden}.trunc-btn{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}.trunc-btn:hover,.trunc-btn.focus{outline:none;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none;cursor:pointer}:host(.strikethrough){text-decoration:line-through}:host(.underline){text-decoration:underline}:host(.underline.strikethrough){text-decoration:line-through underline}:host(.italic){font-style:italic !important}:host(.bold){font-weight:var(--ic-font-weight-bold)}@supports (text-decoration-thickness: 25%){.trunc-btn:hover,.trunc-btn.focus{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}';const n=class{constructor(i){t(this,i);this.focusBtnFromKeyboard=true;this.lastMarkerTop=0;this.lastWidth=0;this.resizeObserver=null;this.truncatedHeight=0;this.toggleExpanded=()=>{this.expanded=!this.expanded};this.checkMaxLines=t=>{const i=Math.floor(t/24);if(i>this.maxLines){this.el.setAttribute("style",`--truncation-max-lines: ${this.maxLines}`);this.truncatedHeight=this.el.clientHeight;this.truncated=true}};this.checkMarkerPosition=(t,i)=>{if(i-t<this.truncatedHeight){this.truncated=false;this.expanded=false}else{this.truncated=true}};this.getElementTop=t=>t.getClientRects?t.getClientRects()[0].top:0;this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeInterval);this.resizeInterval=window.setTimeout(this.resizeObserverCallback,50)}));this.resizeObserver.observe(this.truncWrapperEl)};this.resizeObserverCallback=()=>{if(this.lastWidth===this.el.clientWidth){return}if(this.truncatedHeight===0){this.checkMaxLines(this.el.clientHeight);return}const t=this.getElementTop(this.marker);if(t===this.lastMarkerTop){return}this.checkMarkerPosition(this.getElementTop(this.el),t);this.lastMarkerTop=t;this.lastWidth=this.el.clientWidth};this.truncButtonFocus=()=>{if(this.focusBtnFromKeyboard){this.truncButtonFocussed=true}};this.truncButtonBlur=()=>{this.focusBtnFromKeyboard=true;this.truncButtonFocussed=false};this.truncButtonFocusFromMouse=()=>{this.focusBtnFromKeyboard=false};this.truncated=false;this.truncButtonFocussed=false;this.applyVerticalMargins=false;this.bold=false;this.italic=false;this.maxLines=undefined;this.strikethrough=false;this.underline=false;this.variant="body";this.expanded=false}watchExpandedHandler(){this.el.setAttribute("style",`--truncation-max-lines: ${this.expanded?"initial":this.maxLines}`)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentDidLoad(){var t,i;if((this.variant==="body"||((i=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||i===void 0?void 0:i.tagName)==="IC-TOOLTIP")&&this.maxLines>0){const t=document.createElement("span");t.style.visibility="hidden";this.el.appendChild(t);this.marker=t;this.lastWidth=this.el.clientWidth;this.checkMaxLines(this.el.clientHeight);a(this.runResizeObserver)}}render(){var t,o;const{variant:a,applyVerticalMargins:s,maxLines:n,truncated:r,expanded:c,strikethrough:l,underline:h,italic:p,bold:d}=this;return i(e,{class:{[`ic-typography-${a}`]:true,[`ic-typography-vertical-margins-${a}`]:s,["bold"]:d,["italic"]:p,["strikethrough"]:l,["underline"]:h}},(a==="body"||((o=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||o===void 0?void 0:o.tagName)==="IC-TOOLTIP")&&n>0?i("div",{class:"trunc-wrapper",ref:t=>this.truncWrapperEl=t},i("slot",null)):i("slot",null),a==="body"&&n>0&&r&&i("button",{class:{"trunc-btn":true,focus:this.truncButtonFocussed},onFocus:this.truncButtonFocus,onBlur:this.truncButtonBlur,onMouseDown:this.truncButtonFocusFromMouse,onClick:this.toggleExpanded},c?"See less":"See more"))}get el(){return o(this)}static get watchers(){return{expanded:["watchExpandedHandler"]}}};n.style=s;export{n as ic_typography};
2
- //# sourceMappingURL=p-4c5eafd6.entry.js.map
1
+ import{r as t,h as i,H as e,g as o}from"./p-6b5e91e2.js";import{f as a}from"./p-a5dd7065.js";import"./p-26b7b18f.js";const s='/*! 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;position:relative}:host(.ic-typography-vertical-margins-h1){margin:0 0 var(--ic-space-xl)}:host(.ic-typography-vertical-margins-h2){margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}:host(.ic-typography-vertical-margins-h3){margin:var(--ic-space-xl) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-h4){margin:var(--ic-space-lg) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-subtitle-large),:host(.ic-typography-vertical-margins-subtitle-small),:host(.ic-typography-vertical-margins-body),:host(.ic-typography-vertical-margins-code-large),:host(.ic-typography-vertical-margins-code-small),:host(.ic-typography-vertical-margins-code-extra-small){margin:0 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-caption),:host(.ic-typography-vertical-margins-caption-uppercase){margin:0 0 var(--ic-space-xs)}:host(.ic-typography-vertical-margins-h2:first-child),:host(.ic-typography-vertical-margins-h3:first-child),:host(.ic-typography-vertical-margins-h4:first-child){margin-top:0}:host(.ic-typography-h1){font:var(--ic-font-h1) !important}:host(.ic-typography-h2){font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-h3){font:var(--ic-font-h3)}:host(.ic-typography-h4){font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-large){font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-small){font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-body){font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-caption){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-caption-uppercase){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}:host(.ic-typography-label){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-label-uppercase){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}:host(.ic-typography-code-large){font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-code-small){font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-code-extra-small){font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-badge){font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-badge-small){font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-no-wrap){white-space:nowrap}:host ::slotted(h1),:host ::slotted(h2),:host ::slotted(h3),:host ::slotted(h4),:host ::slotted(h5),:host ::slotted(h6),:host ::slotted(p),:host ::slotted(label){font:inherit;letter-spacing:inherit}.trunc-wrapper{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden}.trunc-btn{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}.trunc-btn:hover,.trunc-btn.focus{outline:none;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none;cursor:pointer}:host(.strikethrough){text-decoration:line-through}:host(.underline){text-decoration:underline}:host(.underline.strikethrough){text-decoration:line-through underline}:host(.italic){font-style:italic !important}:host(.bold){font-weight:var(--ic-font-weight-bold)}@supports (text-underline-offset: 25%){.trunc-btn:hover,.trunc-btn.focus{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}';const n=class{constructor(i){t(this,i);this.focusBtnFromKeyboard=true;this.lastMarkerTop=0;this.lastWidth=0;this.resizeObserver=null;this.truncatedHeight=0;this.toggleExpanded=()=>{this.expanded=!this.expanded};this.checkMaxLines=t=>{const i=Math.floor(t/24);if(i>this.maxLines){this.el.setAttribute("style",`--truncation-max-lines: ${this.maxLines}`);this.truncatedHeight=this.el.clientHeight;this.truncated=true}};this.checkMarkerPosition=(t,i)=>{if(i-t<this.truncatedHeight){this.truncated=false;this.expanded=false}else{this.truncated=true}};this.getElementTop=t=>t.getClientRects?t.getClientRects()[0].top:0;this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeInterval);this.resizeInterval=window.setTimeout(this.resizeObserverCallback,50)}));this.resizeObserver.observe(this.truncWrapperEl)};this.resizeObserverCallback=()=>{if(this.lastWidth===this.el.clientWidth){return}if(this.truncatedHeight===0){this.checkMaxLines(this.el.clientHeight);return}const t=this.getElementTop(this.marker);if(t===this.lastMarkerTop){return}this.checkMarkerPosition(this.getElementTop(this.el),t);this.lastMarkerTop=t;this.lastWidth=this.el.clientWidth};this.truncButtonFocus=()=>{if(this.focusBtnFromKeyboard){this.truncButtonFocussed=true}};this.truncButtonBlur=()=>{this.focusBtnFromKeyboard=true;this.truncButtonFocussed=false};this.truncButtonFocusFromMouse=()=>{this.focusBtnFromKeyboard=false};this.truncated=false;this.truncButtonFocussed=false;this.applyVerticalMargins=false;this.bold=false;this.italic=false;this.maxLines=undefined;this.strikethrough=false;this.underline=false;this.variant="body";this.expanded=false}watchExpandedHandler(){this.el.setAttribute("style",`--truncation-max-lines: ${this.expanded?"initial":this.maxLines}`)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentDidLoad(){var t,i;if((this.variant==="body"||((i=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||i===void 0?void 0:i.tagName)==="IC-TOOLTIP")&&this.maxLines>0){const t=document.createElement("span");t.style.visibility="hidden";this.el.appendChild(t);this.marker=t;this.lastWidth=this.el.clientWidth;this.checkMaxLines(this.el.clientHeight);a(this.runResizeObserver)}}render(){var t,o;const{variant:a,applyVerticalMargins:s,maxLines:n,truncated:r,expanded:l,strikethrough:c,underline:h,italic:p,bold:d}=this;return i(e,{class:{[`ic-typography-${a}`]:true,[`ic-typography-vertical-margins-${a}`]:s,["bold"]:d,["italic"]:p,["strikethrough"]:c,["underline"]:h}},(a==="body"||((o=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||o===void 0?void 0:o.tagName)==="IC-TOOLTIP")&&n>0?i("div",{class:"trunc-wrapper",ref:t=>this.truncWrapperEl=t},i("slot",null)):i("slot",null),a==="body"&&n>0&&r&&i("button",{class:{"trunc-btn":true,focus:this.truncButtonFocussed},onFocus:this.truncButtonFocus,onBlur:this.truncButtonBlur,onMouseDown:this.truncButtonFocusFromMouse,onClick:this.toggleExpanded},l?"See less":"See more"))}get el(){return o(this)}static get watchers(){return{expanded:["watchExpandedHandler"]}}};n.style=s;export{n as ic_typography};
2
+ //# sourceMappingURL=p-88c0dc04.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icTypographyCss","Typography","this","focusBtnFromKeyboard","lastMarkerTop","lastWidth","resizeObserver","truncatedHeight","toggleExpanded","expanded","checkMaxLines","height","numLines","Math","floor","maxLines","el","setAttribute","clientHeight","truncated","checkMarkerPosition","elTop","markerTop","getElementTop","getClientRects","top","runResizeObserver","ResizeObserver","clearTimeout","resizeInterval","window","setTimeout","resizeObserverCallback","observe","truncWrapperEl","clientWidth","marker","truncButtonFocus","truncButtonFocussed","truncButtonBlur","truncButtonFocusFromMouse","watchExpandedHandler","disconnectedCallback","disconnect","componentDidLoad","variant","_b","_a","getRootNode","host","tagName","document","createElement","style","visibility","appendChild","checkResizeObserver","render","applyVerticalMargins","strikethrough","underline","italic","bold","h","Host","class","ref","focus","onFocus","onBlur","onMouseDown","onClick"],"sources":["src/components/ic-typography/ic-typography.css?tag=ic-typography&encapsulation=shadow","src/components/ic-typography/ic-typography.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n position: relative;\n}\n\n:host(.ic-typography-vertical-margins-h1) {\n margin: 0 0 var(--ic-space-xl);\n}\n\n:host(.ic-typography-vertical-margins-h2) {\n margin: var(--ic-space-xxl) 0 var(--ic-space-lg);\n}\n\n:host(.ic-typography-vertical-margins-h3) {\n margin: var(--ic-space-xl) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-h4) {\n margin: var(--ic-space-lg) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small) {\n margin: 0 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase) {\n margin: 0 0 var(--ic-space-xs);\n}\n\n:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child) {\n margin-top: 0;\n}\n\n:host(.ic-typography-h1) {\n font: var(--ic-font-h1) !important;\n}\n\n:host(.ic-typography-h2) {\n font: var(--ic-font-h2);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-h3) {\n font: var(--ic-font-h3);\n}\n\n:host(.ic-typography-h4) {\n font: var(--ic-font-h4);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-large) {\n font: var(--ic-font-subtitle-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-small) {\n font: var(--ic-font-subtitle-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-body) {\n font: var(--ic-font-body);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-caption) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-caption-uppercase) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-label) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-label-uppercase) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-code-large) {\n font: var(--ic-font-code-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-code-small) {\n font: var(--ic-font-code-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-code-extra-small) {\n font: var(--ic-font-code-extra-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-badge) {\n font: var(--ic-font-badge);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-badge-small) {\n font: var(--ic-font-badge-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-no-wrap) {\n white-space: nowrap;\n}\n\n:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label) {\n font: inherit;\n letter-spacing: inherit;\n}\n\n.trunc-wrapper {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n line-clamp: var(--truncation-max-lines, initial);\n -webkit-line-clamp: var(--truncation-max-lines, initial);\n overflow: hidden;\n}\n\n.trunc-btn {\n border: none;\n background: none;\n padding: 0;\n color: var(--ic-color-primary-text);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n.trunc-btn:hover,\n.trunc-btn.focus {\n outline: none;\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n cursor: pointer;\n}\n\n:host(.strikethrough) {\n text-decoration: line-through;\n}\n\n:host(.underline) {\n text-decoration: underline;\n}\n\n:host(.underline.strikethrough) {\n text-decoration: line-through underline;\n}\n\n:host(.italic) {\n font-style: italic !important;\n}\n\n:host(.bold) {\n font-weight: var(--ic-font-weight-bold);\n}\n\n@supports (text-underline-offset: 25%) {\n .trunc-btn:hover,\n .trunc-btn.focus {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host,\n .trunc-btn {\n color: var(--ic-architectural-white);\n }\n} */\n","import { Component, Prop, h, Element, Host, State, Watch } from \"@stencil/core\";\n\nimport { IcTypographyVariants } from \"../../utils/types\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\n\n@Component({\n styleUrl: \"ic-typography.css\",\n tag: \"ic-typography\",\n shadow: true,\n})\nexport class Typography {\n private focusBtnFromKeyboard: boolean = true;\n private lastMarkerTop: number = 0;\n private lastWidth: number = 0;\n private marker: HTMLElement;\n private resizeInterval: number;\n private resizeObserver: ResizeObserver = null;\n private truncatedHeight: number = 0;\n private truncWrapperEl: Element;\n\n @Element() el: HTMLIcTypographyElement;\n\n @State() truncated: boolean = false;\n @State() truncButtonFocussed: boolean = false;\n\n /**\n * If `true`, appropriate top and bottom margins will be applied to the typography.\n */\n @Prop() applyVerticalMargins?: boolean = false;\n\n /**\n * If `true`, the typography will have a bold font weight.\n * Note: This will have no impact on variants that already use an equivalent or higher font weight (h1, h2, and subtitle-large).\n */\n @Prop() bold?: boolean = false;\n\n /**\n * If `true`, the typography will have an italic font style.\n */\n @Prop() italic?: boolean = false;\n\n /**\n * The number of lines to display before truncating the text, only used for the 'body' variant.\n */\n @Prop() maxLines?: number;\n\n /**\n * If `true`, the typography will have a line through it.\n */\n @Prop() strikethrough?: boolean = false;\n\n /**\n * If `true`, the typography will have a line under it.\n */\n @Prop() underline?: boolean = false;\n\n /**\n * The ICDS typography style to use.\n */\n @Prop() variant?: IcTypographyVariants = \"body\";\n\n @State() expanded: boolean = false;\n\n @Watch(\"expanded\")\n watchExpandedHandler(): void {\n this.el.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.expanded ? \"initial\" : this.maxLines}`\n );\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentDidLoad(): void {\n if (\n (this.variant === \"body\" ||\n (this.el.getRootNode() as ShadowRoot)?.host?.tagName ===\n \"IC-TOOLTIP\") &&\n this.maxLines > 0\n ) {\n const marker = document.createElement(\"span\");\n marker.style.visibility = \"hidden\";\n this.el.appendChild(marker);\n this.marker = marker;\n this.lastWidth = this.el.clientWidth;\n this.checkMaxLines(this.el.clientHeight);\n checkResizeObserver(this.runResizeObserver);\n }\n }\n\n private toggleExpanded = () => {\n this.expanded = !this.expanded;\n };\n\n private checkMaxLines = (height: number) => {\n //24 is the height of a single line\n const numLines = Math.floor(height / 24);\n if (numLines > this.maxLines) {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.maxLines}`);\n this.truncatedHeight = this.el.clientHeight;\n this.truncated = true;\n }\n };\n\n private checkMarkerPosition = (elTop: number, markerTop: number) => {\n if (markerTop - elTop < this.truncatedHeight) {\n this.truncated = false;\n this.expanded = false;\n } else {\n this.truncated = true;\n }\n };\n\n private getElementTop = (el: HTMLElement) => {\n return el.getClientRects ? el.getClientRects()[0].top : 0;\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeInterval);\n this.resizeInterval = window.setTimeout(this.resizeObserverCallback, 50);\n });\n this.resizeObserver.observe(this.truncWrapperEl);\n };\n\n private resizeObserverCallback = () => {\n if (this.lastWidth === this.el.clientWidth) {\n return;\n }\n\n if (this.truncatedHeight === 0) {\n this.checkMaxLines(this.el.clientHeight);\n return;\n }\n\n const markerTop = this.getElementTop(this.marker);\n if (markerTop === this.lastMarkerTop) {\n return;\n }\n\n this.checkMarkerPosition(this.getElementTop(this.el), markerTop);\n this.lastMarkerTop = markerTop;\n this.lastWidth = this.el.clientWidth;\n };\n\n private truncButtonFocus = (): void => {\n if (this.focusBtnFromKeyboard) {\n this.truncButtonFocussed = true;\n }\n };\n\n private truncButtonBlur = (): void => {\n this.focusBtnFromKeyboard = true;\n this.truncButtonFocussed = false;\n };\n\n private truncButtonFocusFromMouse = (): void => {\n this.focusBtnFromKeyboard = false;\n };\n\n render() {\n const {\n variant,\n applyVerticalMargins,\n maxLines,\n truncated,\n expanded,\n strikethrough,\n underline,\n italic,\n bold,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-typography-${variant}`]: true,\n [`ic-typography-vertical-margins-${variant}`]: applyVerticalMargins,\n [\"bold\"]: bold,\n [\"italic\"]: italic,\n [\"strikethrough\"]: strikethrough,\n [\"underline\"]: underline,\n }}\n >\n {(variant === \"body\" ||\n (this.el.getRootNode() as ShadowRoot)?.host?.tagName ===\n \"IC-TOOLTIP\") &&\n maxLines > 0 ? (\n <div class=\"trunc-wrapper\" ref={(el) => (this.truncWrapperEl = el)}>\n <slot />\n </div>\n ) : (\n <slot />\n )}\n {variant === \"body\" && maxLines > 0 && truncated && (\n <button\n class={{ \"trunc-btn\": true, focus: this.truncButtonFocussed }}\n onFocus={this.truncButtonFocus}\n onBlur={this.truncButtonBlur}\n onMouseDown={this.truncButtonFocusFromMouse}\n onClick={this.toggleExpanded}\n >\n {expanded ? \"See less\" : \"See more\"}\n </button>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"qHAAA,MAAMA,EAAkB,syM,MCUXC,EAAU,M,yBACbC,KAAAC,qBAAgC,KAChCD,KAAAE,cAAwB,EACxBF,KAAAG,UAAoB,EAGpBH,KAAAI,eAAiC,KACjCJ,KAAAK,gBAA0B,EA6E1BL,KAAAM,eAAiB,KACvBN,KAAKO,UAAYP,KAAKO,QAAQ,EAGxBP,KAAAQ,cAAiBC,IAEvB,MAAMC,EAAWC,KAAKC,MAAMH,EAAS,IACrC,GAAIC,EAAWV,KAAKa,SAAU,CAC5Bb,KAAKc,GAAGC,aAAa,QAAS,2BAA2Bf,KAAKa,YAC9Db,KAAKK,gBAAkBL,KAAKc,GAAGE,aAC/BhB,KAAKiB,UAAY,I,GAIbjB,KAAAkB,oBAAsB,CAACC,EAAeC,KAC5C,GAAIA,EAAYD,EAAQnB,KAAKK,gBAAiB,CAC5CL,KAAKiB,UAAY,MACjBjB,KAAKO,SAAW,K,KACX,CACLP,KAAKiB,UAAY,I,GAIbjB,KAAAqB,cAAiBP,GAChBA,EAAGQ,eAAiBR,EAAGQ,iBAAiB,GAAGC,IAAM,EAGlDvB,KAAAwB,kBAAoB,KAC1BxB,KAAKI,eAAi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,cAAc,QACtChB,EAAOiB,MAAMC,WAAa,SAC1BpD,KAAKc,GAAGuC,YAAYnB,GACpBlC,KAAKkC,OAASA,EACdlC,KAAKG,UAAYH,KAAKc,GAAGmB,YACzBjC,KAAKQ,cAAcR,KAAKc,GAAGE,cAC3BsC,EAAoBtD,KAAKwB,kB,EA0E7B,MAAA+B,G,QACE,MAAMZ,QACJA,EAAOa,qBACPA,EAAoB3C,SACpBA,EAAQI,UACRA,EAASV,SACTA,EAAQkD,cACRA,EAAaC,UACbA,EAASC,OACTA,EAAMC,KACNA,GACE5D,KAEJ,OACE6D,EAACC,EAAI,CACHC,MAAO,CACL,CAAC,iBAAiBpB,KAAY,KAC9B,CAAC,kCAAkCA,KAAYa,EAC/C,CAAC,QAASI,EACV,CAAC,UAAWD,EACZ,CAAC,iBAAkBF,EACnB,CAAC,aAAcC,KAGff,IAAY,UACZC,GAAAC,EAAC7C,KAAKc,GAAGgC,iBAA4B,MAAAD,SAAA,SAAAA,EAAEE,QAAI,MAAAH,SAAA,SAAAA,EAAEI,WAC3C,eACJnC,EAAW,EACTgD,EAAA,OAAKE,MAAM,gBAAgBC,IAAMlD,GAAQd,KAAKgC,eAAiBlB,GAC7D+C,EAAA,cAGFA,EAAA,aAEDlB,IAAY,QAAU9B,EAAW,GAAKI,GACrC4C,EAAA,UACEE,MAAO,CAAE,YAAa,KAAME,MAAOjE,KAAKoC,qBACxC8B,QAASlE,KAAKmC,iBACdgC,OAAQnE,KAAKqC,gBACb+B,YAAapE,KAAKsC,0BAClB+B,QAASrE,KAAKM,gBAEbC,EAAW,WAAa,Y"}
@@ -1 +1 @@
1
- {"version":3,"names":["icTabCss","Tab","this","focusFromClick","isInitialRender","handleClick","tabClick","emit","tabId","contextId","position","tabPosition","tabFocus","handleFocus","focusTabId","handleMouseDown","disabledWatchHandler","tabEnabled","connectedCallback","tabCreated","el","disconnectedCallback","tabContext","document","querySelector","tabRemovedHandler","componentWillLoad","removeDisabledFalse","disabled","componentDidUpdate","setFocus","focus","render","selected","appearance","h","Host","class","IcThemeForegroundEnum","Light","role","onClick","onFocus","onMouseDown","tabindex","name","variant","isSlotUsed"],"sources":["src/components/ic-tab/ic-tab.css?tag=ic-tab&encapsulation=shadow","src/components/ic-tab/ic-tab.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --indicator-initial-color: rgba(23 89 188 / 0%);\n --indicator-color: var(--ic-action-default);\n --focus-indicator: var(--ic-border-focus);\n --label-color: var(--ic-color-primary-text);\n --background-color-hover: var(--ic-action-default-bg-hover);\n --background-color-active: var(--ic-action-default-bg-active);\n\n display: flex;\n align-items: center;\n border-radius: 0;\n color: var(--label-color);\n height: 2.5rem;\n padding: 0 var(--ic-space-md);\n cursor: pointer;\n position: relative;\n border-bottom: var(--ic-space-xxs) solid var(--indicator-initial-color);\n gap: var(--ic-space-xs);\n transition: all var(--ic-easing-transition-fast);\n}\n\n:host(:focus) {\n box-shadow: var(--focus-indicator);\n border-radius: var(--ic-border-radius);\n}\n\n:host(:focus-visible) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(:hover) {\n background-color: var(--background-color-hover);\n}\n\n:host(:active) {\n background-color: var(--background-color-active);\n}\n\n:host(.ic-tab-light) {\n --indicator-initial-color: rgb(255 255 255 / 0%);\n --indicator-color: rgb(255 255 255 / 100%);\n --focus-indicator: var(--ic-border-focus);\n --label-color: white;\n --background-color-hover: var(--ic-action-dark-bg-hover);\n --background-color-active: var(--ic-action-dark-bg-active);\n}\n\n:host(.selected) {\n border-bottom: var(--ic-space-xxs) solid var(--indicator-color);\n}\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--ic-architectural-300);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.selected.with-transition) {\n transition: all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow);\n }\n}\n\n.ic-tab-label {\n pointer-events: none;\n text-wrap: nowrap;\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n :host {\n border-bottom: var(--ic-space-xxs) solid canvas;\n }\n\n :host(.disabled) {\n color: GrayText;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host(ic-tab) .ic-tab-label {\n color: var(--ic-architectural-white);\n }\n :host(ic-tab.disabled) .ic-tab-label {\n color: inherit;\n }\n} */\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n h,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport { IcTabClickEventDetail } from \"./ic-tab.types\";\nimport {\n IcThemeForegroundNoDefault,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\n\n/**\n * @slot icon - Content will be rendered next to the tab label.\n * @slot badge - Badge component displayed inline with the tab.\n */\n@Component({\n tag: \"ic-tab\",\n styleUrl: \"ic-tab.css\",\n shadow: true,\n})\nexport class Tab {\n private focusFromClick: boolean = false;\n private focusTabId: string;\n private isInitialRender: boolean = true;\n\n @Element() el: HTMLIcTabElement;\n\n /** @internal Determines whether the light or dark variant of the tabs should be displayed. */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n /** @internal The unique context needed if using multiple tabs inside one another i.e. rendering another tabs inside a tab panel. */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /** @internal If `true`, the tab will display with a selected indicator and tabIndex will be set. */\n @Prop({ reflect: true }) selected?: boolean = false;\n\n /** @internal The shared ID between panel and tab. */\n @Prop({ reflect: true }) tabId?: string;\n\n /** @internal The position of the tab inside the tabs array in context. */\n @Prop() tabPosition?: number;\n\n @Watch(\"disabled\")\n disabledWatchHandler(): void {\n this.tabEnabled.emit();\n }\n\n /**\n * @internal Emitted when a tab is selected.\n */\n @Event() tabClick: EventEmitter<IcTabClickEventDetail>;\n\n /**\n * @internal Emitted when a tab is dynamically created.\n */\n @Event() tabCreated: EventEmitter<HTMLIcTabElement>;\n\n /**\n * @internal Emitted when a tab's disabled prop changes\n */\n @Event() tabEnabled: EventEmitter<void>;\n\n /**\n * @internal Emitted when a tab is focussed.\n */\n @Event() tabFocus: EventEmitter<IcTabClickEventDetail>;\n\n /**\n * @internal Emitted when a tab is unmounted.\n */\n @Event() tabRemoved: EventEmitter<void>;\n\n connectedCallback(): void {\n this.tabCreated.emit(this.el);\n }\n\n disconnectedCallback(): void {\n const tabContext = document.querySelector(\n `ic-tab-context[context-id=${this.contextId}]`\n ) as HTMLIcTabContextElement;\n if (tabContext) {\n tabContext.tabRemovedHandler(!!this.focusTabId);\n }\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidUpdate(): void {\n this.isInitialRender = false;\n }\n\n /**\n * Sets focus on the tab.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el) {\n this.el.focus();\n }\n }\n\n private handleClick = () => {\n this.tabClick.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n if (this.focusFromClick) {\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n this.focusFromClick = false;\n }\n };\n\n private handleFocus = () => {\n if (!this.focusFromClick) {\n this.focusTabId = this.tabId;\n\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n }\n };\n\n private handleMouseDown = () => {\n //set flag so that focus gets handled after click\n //there is a timing issue where a long click only causes focus to happen & not the click\n //the focus does need to be a seperate event though to handle focus from keyboard\n this.focusFromClick = true;\n };\n\n render() {\n const { disabled, selected, appearance } = this;\n return (\n <Host\n class={{\n [\"with-transition\"]: !this.isInitialRender,\n [\"ic-tab-light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"selected\"]: selected,\n [\"disabled\"]: disabled,\n }}\n role=\"tab\"\n aria-selected={selected ? \"true\" : \"false\"}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n aria-disabled={disabled ? \"true\" : \"false\"}\n tabindex={this.selected ? 0 : -1}\n >\n {this.el.querySelector('[slot=\"icon\"]') && <slot name=\"icon\"></slot>}\n <ic-typography class=\"ic-tab-label\" variant=\"label\">\n <span>\n <slot></slot>\n </span>\n </ic-typography>\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </Host>\n );\n }\n}\n"],"mappings":"+IAAA,MAAMA,EAAW,q/H,MC4BJC,EAAG,M,oNACNC,KAAAC,eAA0B,MAE1BD,KAAAE,gBAA2B,KAqF3BF,KAAAG,YAAc,KACpBH,KAAKI,SAASC,KAAK,CACjBC,MAAON,KAAKM,MACZC,UAAWP,KAAKO,UAChBC,SAAUR,KAAKS,cAEjB,GAAIT,KAAKC,eAAgB,CACvBD,KAAKU,SAASL,KAAK,CACjBC,MAAON,KAAKM,MACZC,UAAWP,KAAKO,UAChBC,SAAUR,KAAKS,cAEjBT,KAAKC,eAAiB,K,GAIlBD,KAAAW,YAAc,KACpB,IAAKX,KAAKC,eAAgB,CACxBD,KAAKY,WAAaZ,KAAKM,MAEvBN,KAAKU,SAASL,KAAK,CACjBC,MAAON,KAAKM,MACZC,UAAWP,KAAKO,UAChBC,SAAUR,KAAKS,a,GAKbT,KAAAa,gBAAkB,KAIxBb,KAAKC,eAAiB,IAAI,E,gBAhHsB,O,eAGJ,U,cAKjB,M,cAGiB,M,gDAS9C,oBAAAa,GACEd,KAAKe,WAAWV,M,CA4BlB,iBAAAW,GACEhB,KAAKiB,WAAWZ,KAAKL,KAAKkB,G,CAG5B,oBAAAC,GACE,MAAMC,EAAaC,SAASC,cAC1B,6BAA6BtB,KAAKO,cAEpC,GAAIa,EAAY,CACdA,EAAWG,oBAAoBvB,KAAKY,W,EAIxC,iBAAAY,GACEC,EAAoBzB,KAAK0B,SAAU1B,KAAKkB,G,CAG1C,kBAAAS,GACE3B,KAAKE,gBAAkB,K,CAOzB,cAAM0B,GACJ,GAAI5B,KAAKkB,GAAI,CACXlB,KAAKkB,GAAGW,O,EAuCZ,MAAAC,GACE,MAAMJ,SAAEA,EAAQK,SAAEA,EAAQC,WAAEA,GAAehC,KAC3C,OACEiC,EAACC,EAAI,CACHC,MAAO,CACL,CAAC,oBAAqBnC,KAAKE,gBAC3B,CAAC,gBAAiB8B,IAAeI,EAAsBC,MACvD,CAAC,YAAaN,EACd,CAAC,YAAaL,GAEhBY,KAAK,MAAK,gBACKP,EAAW,OAAS,QACnCQ,QAASvC,KAAKG,YACdqC,QAASxC,KAAKW,YACd8B,YAAazC,KAAKa,gBAAe,gBAClBa,EAAW,OAAS,QACnCgB,SAAU1C,KAAK+B,SAAW,GAAK,GAE9B/B,KAAKkB,GAAGI,cAAc,kBAAoBW,EAAA,QAAMU,KAAK,SACtDV,EAAA,iBAAeE,MAAM,eAAeS,QAAQ,SAC1CX,EAAA,YACEA,EAAA,eAGHY,EAAW7C,KAAKkB,GAAI,UAAYe,EAAA,QAAMU,KAAK,U"}
1
+ {"version":3,"names":["icTabCss","Tab","this","focusFromClick","isInitialRender","handleClick","tabClick","emit","tabId","contextId","position","tabPosition","tabFocus","handleFocus","focusTabId","handleMouseDown","disabledWatchHandler","tabEnabled","connectedCallback","tabCreated","el","disconnectedCallback","tabContext","document","querySelector","tabRemovedHandler","componentWillLoad","removeDisabledFalse","disabled","componentDidUpdate","setFocus","focus","render","selected","appearance","h","Host","class","IcThemeForegroundEnum","Light","role","onClick","onFocus","onMouseDown","tabindex","name","variant","isSlotUsed"],"sources":["src/components/ic-tab/ic-tab.css?tag=ic-tab&encapsulation=shadow","src/components/ic-tab/ic-tab.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --indicator-initial-color: rgba(23 89 188 / 0%);\n --indicator-color: var(--ic-action-default);\n --focus-indicator: var(--ic-border-focus);\n --label-color: var(--ic-color-primary-text);\n --background-color-hover: var(--ic-action-default-bg-hover);\n --background-color-active: var(--ic-action-default-bg-active);\n\n display: flex;\n align-items: center;\n border-radius: 0;\n color: var(--label-color);\n height: 2.5rem;\n padding: 0 var(--ic-space-md);\n cursor: pointer;\n position: relative;\n border-bottom: var(--ic-space-xxs) solid var(--indicator-initial-color);\n gap: var(--ic-space-xs);\n transition: all var(--ic-easing-transition-fast);\n}\n\n:host(:focus) {\n box-shadow: var(--focus-indicator);\n border-radius: var(--ic-border-radius);\n}\n\n:host(:focus-visible) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(:hover) {\n background-color: var(--background-color-hover);\n}\n\n:host(:active) {\n background-color: var(--background-color-active);\n}\n\n:host(.ic-tab-light) {\n --indicator-initial-color: rgb(255 255 255 / 0%);\n --indicator-color: rgb(255 255 255 / 100%);\n --focus-indicator: var(--ic-border-focus);\n --label-color: white;\n --background-color-hover: var(--ic-action-dark-bg-hover);\n --background-color-active: var(--ic-action-dark-bg-active);\n}\n\n:host(.selected) {\n border-bottom: var(--ic-space-xxs) solid var(--indicator-color);\n}\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--ic-architectural-300);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.selected.with-transition) {\n transition: all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow);\n }\n}\n\n.ic-tab-label {\n pointer-events: none;\n text-wrap: nowrap;\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n :host {\n border-bottom: var(--ic-space-xxs) solid canvas;\n }\n\n :host(.disabled) {\n color: GrayText;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host(ic-tab) .ic-tab-label {\n color: var(--ic-architectural-white);\n }\n :host(ic-tab.disabled) .ic-tab-label {\n color: inherit;\n }\n} */\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n h,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport { IcTabClickEventDetail } from \"./ic-tab.types\";\nimport {\n IcThemeForegroundNoDefault,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\n\n/**\n * @slot icon - Content will be rendered next to the tab label.\n * @slot badge - Badge component displayed inline with the tab.\n */\n@Component({\n tag: \"ic-tab\",\n styleUrl: \"ic-tab.css\",\n shadow: true,\n})\nexport class Tab {\n private focusFromClick: boolean = false;\n private focusTabId: string;\n private isInitialRender: boolean = true;\n\n @Element() el: HTMLIcTabElement;\n\n /** @internal Determines whether the light or dark variant of the tabs should be displayed. */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n /** @internal The unique context needed if using multiple tabs inside one another i.e. rendering another tabs inside a tab panel. */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /** @internal If `true`, the tab will display with a selected indicator and tabIndex will be set. */\n @Prop({ reflect: true }) selected?: boolean = false;\n\n /** @internal The shared ID between panel and tab. */\n @Prop({ reflect: true }) tabId?: string;\n\n /** @internal The position of the tab inside the tabs array in context. */\n @Prop() tabPosition?: number;\n\n @Watch(\"disabled\")\n disabledWatchHandler(): void {\n this.tabEnabled.emit();\n }\n\n /**\n * @internal Emitted when a tab is selected.\n */\n @Event() tabClick: EventEmitter<IcTabClickEventDetail>;\n\n /**\n * @internal Emitted when a tab is dynamically created.\n */\n @Event() tabCreated: EventEmitter<HTMLIcTabElement>;\n\n /**\n * @internal Emitted when a tab's disabled prop changes\n */\n @Event() tabEnabled: EventEmitter<void>;\n\n /**\n * @internal Emitted when a tab is focussed.\n */\n @Event() tabFocus: EventEmitter<IcTabClickEventDetail>;\n\n /**\n * @internal Emitted when a tab is unmounted.\n */\n @Event() tabRemoved: EventEmitter<void>;\n\n connectedCallback(): void {\n this.tabCreated.emit(this.el);\n }\n\n disconnectedCallback(): void {\n const tabContext = document.querySelector(\n `ic-tab-context[context-id=${this.contextId}]`\n ) as HTMLIcTabContextElement;\n if (tabContext) {\n tabContext.tabRemovedHandler(!!this.focusTabId);\n }\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidUpdate(): void {\n this.isInitialRender = false;\n }\n\n /**\n * Sets focus on the tab.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el) {\n this.el.focus();\n }\n }\n\n private handleClick = () => {\n this.tabClick.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n if (this.focusFromClick) {\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n this.focusFromClick = false;\n }\n };\n\n private handleFocus = () => {\n if (!this.focusFromClick) {\n this.focusTabId = this.tabId;\n\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n }\n };\n\n private handleMouseDown = () => {\n //set flag so that focus gets handled after click\n //there is a timing issue where a long click only causes focus to happen & not the click\n //the focus does need to be a separate event though to handle focus from keyboard\n this.focusFromClick = true;\n };\n\n render() {\n const { disabled, selected, appearance } = this;\n return (\n <Host\n class={{\n [\"with-transition\"]: !this.isInitialRender,\n [\"ic-tab-light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"selected\"]: selected,\n [\"disabled\"]: disabled,\n }}\n role=\"tab\"\n aria-selected={selected ? \"true\" : \"false\"}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n aria-disabled={disabled ? \"true\" : \"false\"}\n tabindex={this.selected ? 0 : -1}\n >\n {this.el.querySelector('[slot=\"icon\"]') && <slot name=\"icon\"></slot>}\n <ic-typography class=\"ic-tab-label\" variant=\"label\">\n <span>\n <slot></slot>\n </span>\n </ic-typography>\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </Host>\n );\n }\n}\n"],"mappings":"+IAAA,MAAMA,EAAW,q/H,MC4BJC,EAAG,M,oNACNC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