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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (329) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/{helpers-8bc3b6d2.js → helpers-81484ceb.js} +2 -2
  4. package/dist/cjs/helpers-81484ceb.js.map +1 -0
  5. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +17 -4
  14. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +9 -4
  36. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-radio-option.cjs.entry.js +2 -2
  52. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-search-bar.cjs.entry.js +15 -18
  54. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-select.cjs.entry.js +2 -2
  57. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-status-tag.cjs.entry.js +4 -3
  61. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-text-field.cjs.entry.js +2 -2
  68. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-top-navigation.cjs.entry.js +3 -3
  71. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  73. package/dist/cjs/loader.cjs.js +1 -1
  74. package/dist/collection/components/ic-card/ic-card.css +58 -14
  75. package/dist/collection/components/ic-card/ic-card.js +62 -6
  76. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  77. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +1 -1
  78. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  79. package/dist/collection/components/ic-menu/ic-menu.js +8 -3
  80. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  81. package/dist/collection/components/ic-radio-option/ic-radio-option.css +7 -8
  82. package/dist/collection/components/ic-search-bar/ic-search-bar.js +16 -21
  83. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  84. package/dist/collection/components/ic-select/ic-select.css +4 -0
  85. package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
  86. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  87. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js +1 -1
  88. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js.map +1 -1
  89. package/dist/collection/components/ic-text-field/ic-text-field.css +1 -0
  90. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +7 -2
  91. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +1 -1
  92. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  93. package/dist/collection/normalize.css +440 -0
  94. package/dist/collection/utils/helpers.js +1 -1
  95. package/dist/collection/utils/helpers.js.map +1 -1
  96. package/dist/components/helpers.js +2 -2
  97. package/dist/components/helpers.js.map +1 -1
  98. package/dist/components/ic-alert.js.map +1 -1
  99. package/dist/components/ic-back-to-top.js.map +1 -1
  100. package/dist/components/ic-button2.js.map +1 -1
  101. package/dist/components/ic-card.js +39 -5
  102. package/dist/components/ic-card.js.map +1 -1
  103. package/dist/components/ic-checkbox-group.js.map +1 -1
  104. package/dist/components/ic-checkbox.js.map +1 -1
  105. package/dist/components/ic-chip.js.map +1 -1
  106. package/dist/components/ic-classification-banner.js +1 -1
  107. package/dist/components/ic-classification-banner.js.map +1 -1
  108. package/dist/components/ic-data-entity.js.map +1 -1
  109. package/dist/components/ic-data-row.js.map +1 -1
  110. package/dist/components/ic-footer-link-group.js.map +1 -1
  111. package/dist/components/ic-footer-link.js.map +1 -1
  112. package/dist/components/ic-footer.js.map +1 -1
  113. package/dist/components/ic-hero.js.map +1 -1
  114. package/dist/components/ic-input-label2.js +1 -1
  115. package/dist/components/ic-input-validation2.js +1 -1
  116. package/dist/components/ic-link2.js.map +1 -1
  117. package/dist/components/ic-loading-indicator2.js.map +1 -1
  118. package/dist/components/ic-menu2.js +8 -3
  119. package/dist/components/ic-menu2.js.map +1 -1
  120. package/dist/components/ic-navigation-button.js.map +1 -1
  121. package/dist/components/ic-navigation-group.js.map +1 -1
  122. package/dist/components/ic-navigation-item.js.map +1 -1
  123. package/dist/components/ic-navigation-menu2.js +1 -1
  124. package/dist/components/ic-page-header.js.map +1 -1
  125. package/dist/components/ic-radio-group.js.map +1 -1
  126. package/dist/components/ic-radio-option.js +1 -1
  127. package/dist/components/ic-radio-option.js.map +1 -1
  128. package/dist/components/ic-search-bar.js +16 -19
  129. package/dist/components/ic-search-bar.js.map +1 -1
  130. package/dist/components/ic-section-container2.js.map +1 -1
  131. package/dist/components/ic-select.js +2 -2
  132. package/dist/components/ic-select.js.map +1 -1
  133. package/dist/components/ic-side-navigation.js +1 -1
  134. package/dist/components/ic-skeleton.js.map +1 -1
  135. package/dist/components/ic-status-tag.js +5 -3
  136. package/dist/components/ic-status-tag.js.map +1 -1
  137. package/dist/components/ic-switch.js.map +1 -1
  138. package/dist/components/ic-tab-group.js +1 -1
  139. package/dist/components/ic-tab.js.map +1 -1
  140. package/dist/components/ic-text-field2.js +2 -2
  141. package/dist/components/ic-text-field2.js.map +1 -1
  142. package/dist/components/ic-theme.js +1 -1
  143. package/dist/components/ic-tooltip2.js.map +1 -1
  144. package/dist/components/ic-top-navigation.js +3 -3
  145. package/dist/components/ic-top-navigation.js.map +1 -1
  146. package/dist/components/ic-typography2.js.map +1 -1
  147. package/dist/core/core.css +1 -1
  148. package/dist/core/core.esm.js +1 -1
  149. package/dist/core/core.esm.js.map +1 -1
  150. package/dist/core/normalize.css +440 -0
  151. package/dist/core/{p-5831bb8e.entry.js → p-050e1e7b.entry.js} +2 -2
  152. package/dist/core/{p-5831bb8e.entry.js.map → p-050e1e7b.entry.js.map} +1 -1
  153. package/dist/core/{p-31a8595f.entry.js → p-09592918.entry.js} +2 -2
  154. package/dist/core/{p-31a8595f.entry.js.map → p-09592918.entry.js.map} +0 -0
  155. package/dist/core/{p-bf89bcd3.entry.js → p-0b00f848.entry.js} +2 -2
  156. package/dist/core/{p-bf89bcd3.entry.js.map → p-0b00f848.entry.js.map} +1 -1
  157. package/dist/core/p-16698d3e.entry.js +2 -0
  158. package/dist/core/p-16698d3e.entry.js.map +1 -0
  159. package/dist/core/p-18a9beea.entry.js +2 -0
  160. package/dist/core/p-18a9beea.entry.js.map +1 -0
  161. package/dist/core/{p-3a068a45.entry.js → p-1da1f2f3.entry.js} +2 -2
  162. package/dist/core/{p-3a068a45.entry.js.map → p-1da1f2f3.entry.js.map} +1 -1
  163. package/dist/core/p-204f6315.entry.js +2 -0
  164. package/dist/core/p-204f6315.entry.js.map +1 -0
  165. package/dist/core/{p-2f114521.entry.js → p-217fa7de.entry.js} +2 -2
  166. package/dist/core/{p-2f114521.entry.js.map → p-217fa7de.entry.js.map} +1 -1
  167. package/dist/core/{p-cc83692e.entry.js → p-23bf0b7a.entry.js} +2 -2
  168. package/dist/core/{p-cc83692e.entry.js.map → p-23bf0b7a.entry.js.map} +1 -1
  169. package/dist/core/{p-7881b94e.entry.js → p-27554319.entry.js} +2 -2
  170. package/dist/core/{p-7881b94e.entry.js.map → p-27554319.entry.js.map} +1 -1
  171. package/dist/core/{p-fbde8a26.entry.js → p-2ca96f69.entry.js} +2 -2
  172. package/dist/core/{p-fbde8a26.entry.js.map → p-2ca96f69.entry.js.map} +1 -1
  173. package/dist/core/p-3efa7f8b.entry.js +2 -0
  174. package/dist/core/p-3efa7f8b.entry.js.map +1 -0
  175. package/dist/core/{p-dd3c3e3c.entry.js → p-3f4d632c.entry.js} +2 -2
  176. package/dist/core/{p-dd3c3e3c.entry.js.map → p-3f4d632c.entry.js.map} +0 -0
  177. package/dist/core/p-3f9cdcdd.entry.js +2 -0
  178. package/dist/core/{p-c4d3c18c.entry.js.map → p-3f9cdcdd.entry.js.map} +1 -1
  179. package/dist/core/{p-c8ce6147.entry.js → p-4f1a7195.entry.js} +2 -2
  180. package/dist/core/{p-c8ce6147.entry.js.map → p-4f1a7195.entry.js.map} +0 -0
  181. package/dist/core/p-5616cfb8.entry.js +2 -0
  182. package/dist/core/p-5616cfb8.entry.js.map +1 -0
  183. package/dist/core/p-66cad84e.entry.js +2 -0
  184. package/dist/core/p-66cad84e.entry.js.map +1 -0
  185. package/dist/core/p-6be5e06b.entry.js.map +1 -1
  186. package/dist/core/p-6d0eaaeb.entry.js.map +1 -1
  187. package/dist/core/{p-5d76bbad.entry.js → p-6f442942.entry.js} +2 -2
  188. package/dist/core/{p-5d76bbad.entry.js.map → p-6f442942.entry.js.map} +0 -0
  189. package/dist/core/{p-4c72f3a9.entry.js → p-7ba184da.entry.js} +2 -2
  190. package/dist/core/{p-4c72f3a9.entry.js.map → p-7ba184da.entry.js.map} +0 -0
  191. package/dist/core/{p-2b5c9143.entry.js → p-8470c255.entry.js} +2 -2
  192. package/dist/core/{p-2b5c9143.entry.js.map → p-8470c255.entry.js.map} +0 -0
  193. package/dist/core/{p-b24145f7.entry.js → p-89a925f8.entry.js} +2 -2
  194. package/dist/core/{p-b24145f7.entry.js.map → p-89a925f8.entry.js.map} +1 -1
  195. package/dist/core/{p-ecfb2e6b.entry.js → p-930cd4cc.entry.js} +2 -2
  196. package/dist/core/{p-ecfb2e6b.entry.js.map → p-930cd4cc.entry.js.map} +1 -1
  197. package/dist/core/{p-0118400b.entry.js → p-9b4022d7.entry.js} +2 -2
  198. package/dist/core/p-9b4022d7.entry.js.map +1 -0
  199. package/dist/core/{p-5e261268.entry.js → p-9fbceeb2.entry.js} +2 -2
  200. package/dist/core/{p-5e261268.entry.js.map → p-9fbceeb2.entry.js.map} +0 -0
  201. package/dist/core/p-a2d3e955.entry.js.map +1 -1
  202. package/dist/core/{p-9cd04875.entry.js → p-a5948fc3.entry.js} +2 -2
  203. package/dist/core/{p-9cd04875.entry.js.map → p-a5948fc3.entry.js.map} +1 -1
  204. package/dist/core/{p-23831891.js → p-a8ac8f72.js} +2 -2
  205. package/dist/core/p-a8ac8f72.js.map +1 -0
  206. package/dist/core/{p-6b34d98f.entry.js → p-ae02b008.entry.js} +2 -2
  207. package/dist/core/{p-6b34d98f.entry.js.map → p-ae02b008.entry.js.map} +1 -1
  208. package/dist/core/p-bb106092.entry.js +2 -0
  209. package/dist/core/p-bb106092.entry.js.map +1 -0
  210. package/dist/core/{p-6fba90ee.entry.js → p-bbe00cb1.entry.js} +2 -2
  211. package/dist/core/{p-6fba90ee.entry.js.map → p-bbe00cb1.entry.js.map} +1 -1
  212. package/dist/core/{p-b3dec76d.entry.js → p-c1d78a64.entry.js} +2 -2
  213. package/dist/core/{p-b3dec76d.entry.js.map → p-c1d78a64.entry.js.map} +1 -1
  214. package/dist/core/{p-0b125f26.entry.js → p-c320fa70.entry.js} +2 -2
  215. package/dist/core/{p-0b125f26.entry.js.map → p-c320fa70.entry.js.map} +0 -0
  216. package/dist/core/p-cadb531f.entry.js.map +1 -1
  217. package/dist/core/p-d599cf4f.entry.js +2 -0
  218. package/dist/core/p-d599cf4f.entry.js.map +1 -0
  219. package/dist/core/{p-6f6bd657.entry.js → p-e192e25d.entry.js} +2 -2
  220. package/dist/core/{p-6f6bd657.entry.js.map → p-e192e25d.entry.js.map} +1 -1
  221. package/dist/core/{p-7f04e382.entry.js → p-e810f48c.entry.js} +2 -2
  222. package/dist/core/{p-7f04e382.entry.js.map → p-e810f48c.entry.js.map} +1 -1
  223. package/dist/core/p-e93e9aa3.entry.js.map +1 -1
  224. package/dist/core/{p-c85689e3.entry.js → p-eaea567e.entry.js} +2 -2
  225. package/dist/core/{p-c85689e3.entry.js.map → p-eaea567e.entry.js.map} +1 -1
  226. package/dist/core/{p-10da19d2.entry.js → p-f760198e.entry.js} +2 -2
  227. package/dist/core/{p-10da19d2.entry.js.map → p-f760198e.entry.js.map} +0 -0
  228. package/dist/core/{p-66f3f02b.entry.js → p-fd0c6039.entry.js} +2 -2
  229. package/dist/core/{p-66f3f02b.entry.js.map → p-fd0c6039.entry.js.map} +1 -1
  230. package/dist/esm/core.js +1 -1
  231. package/dist/esm/{helpers-3d41833c.js → helpers-46e5291b.js} +3 -3
  232. package/dist/esm/helpers-46e5291b.js.map +1 -0
  233. package/dist/esm/ic-alert.entry.js +1 -1
  234. package/dist/esm/ic-alert.entry.js.map +1 -1
  235. package/dist/esm/ic-back-to-top.entry.js +1 -1
  236. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  237. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  238. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  239. package/dist/esm/ic-button_3.entry.js +1 -1
  240. package/dist/esm/ic-button_3.entry.js.map +1 -1
  241. package/dist/esm/ic-card.entry.js +17 -4
  242. package/dist/esm/ic-card.entry.js.map +1 -1
  243. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  244. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  245. package/dist/esm/ic-checkbox.entry.js +1 -1
  246. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  247. package/dist/esm/ic-chip.entry.js +1 -1
  248. package/dist/esm/ic-chip.entry.js.map +1 -1
  249. package/dist/esm/ic-classification-banner.entry.js +1 -1
  250. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  251. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  252. package/dist/esm/ic-data-row.entry.js +1 -1
  253. package/dist/esm/ic-data-row.entry.js.map +1 -1
  254. package/dist/esm/ic-divider.entry.js +1 -1
  255. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  256. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  257. package/dist/esm/ic-footer-link.entry.js +1 -1
  258. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  259. package/dist/esm/ic-footer.entry.js +1 -1
  260. package/dist/esm/ic-footer.entry.js.map +1 -1
  261. package/dist/esm/ic-hero.entry.js +1 -1
  262. package/dist/esm/ic-hero.entry.js.map +1 -1
  263. package/dist/esm/ic-input-component-container_3.entry.js +9 -4
  264. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  265. package/dist/esm/ic-input-label_2.entry.js +1 -1
  266. package/dist/esm/ic-link.entry.js +1 -1
  267. package/dist/esm/ic-link.entry.js.map +1 -1
  268. package/dist/esm/ic-navigation-button.entry.js +1 -1
  269. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  270. package/dist/esm/ic-navigation-group.entry.js +1 -1
  271. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  272. package/dist/esm/ic-navigation-item.entry.js +1 -1
  273. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  274. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  275. package/dist/esm/ic-page-header.entry.js +1 -1
  276. package/dist/esm/ic-page-header.entry.js.map +1 -1
  277. package/dist/esm/ic-radio-group.entry.js +1 -1
  278. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  279. package/dist/esm/ic-radio-option.entry.js +2 -2
  280. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  281. package/dist/esm/ic-search-bar.entry.js +15 -18
  282. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  283. package/dist/esm/ic-section-container.entry.js.map +1 -1
  284. package/dist/esm/ic-select.entry.js +2 -2
  285. package/dist/esm/ic-select.entry.js.map +1 -1
  286. package/dist/esm/ic-side-navigation.entry.js +1 -1
  287. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  288. package/dist/esm/ic-status-tag.entry.js +4 -3
  289. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  290. package/dist/esm/ic-stepper.entry.js +1 -1
  291. package/dist/esm/ic-switch.entry.js +1 -1
  292. package/dist/esm/ic-switch.entry.js.map +1 -1
  293. package/dist/esm/ic-tab-group.entry.js +1 -1
  294. package/dist/esm/ic-tab.entry.js.map +1 -1
  295. package/dist/esm/ic-text-field.entry.js +2 -2
  296. package/dist/esm/ic-text-field.entry.js.map +1 -1
  297. package/dist/esm/ic-theme.entry.js +1 -1
  298. package/dist/esm/ic-top-navigation.entry.js +3 -3
  299. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  300. package/dist/esm/ic-typography.entry.js.map +1 -1
  301. package/dist/esm/loader.js +1 -1
  302. package/dist/types/components/ic-card/ic-card.d.ts +20 -3
  303. package/dist/types/components/ic-menu/ic-menu.d.ts +1 -0
  304. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -2
  305. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
  306. package/dist/types/components.d.ts +27 -3
  307. package/hydrate/index.js +62 -36
  308. package/package.json +3 -3
  309. package/dist/cjs/helpers-8bc3b6d2.js.map +0 -1
  310. package/dist/core/p-0118400b.entry.js.map +0 -1
  311. package/dist/core/p-07cd789d.entry.js +0 -2
  312. package/dist/core/p-07cd789d.entry.js.map +0 -1
  313. package/dist/core/p-0d77bd0c.entry.js +0 -2
  314. package/dist/core/p-0d77bd0c.entry.js.map +0 -1
  315. package/dist/core/p-23831891.js.map +0 -1
  316. package/dist/core/p-60ffb73e.entry.js +0 -2
  317. package/dist/core/p-60ffb73e.entry.js.map +0 -1
  318. package/dist/core/p-6308f1f2.entry.js +0 -2
  319. package/dist/core/p-6308f1f2.entry.js.map +0 -1
  320. package/dist/core/p-69650186.entry.js +0 -2
  321. package/dist/core/p-69650186.entry.js.map +0 -1
  322. package/dist/core/p-7f632414.entry.js +0 -2
  323. package/dist/core/p-7f632414.entry.js.map +0 -1
  324. package/dist/core/p-8144e941.entry.js +0 -2
  325. package/dist/core/p-8144e941.entry.js.map +0 -1
  326. package/dist/core/p-c4d3c18c.entry.js +0 -2
  327. package/dist/core/p-fa7bc907.entry.js +0 -2
  328. package/dist/core/p-fa7bc907.entry.js.map +0 -1
  329. package/dist/esm/helpers-3d41833c.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{r as i,h as t,H as e,g as o}from"./p-f9370be6.js";import{D as n,k as s,g as a,p as r}from"./p-23831891.js";import{c as d}from"./p-e28af65b.js";import"./p-6f57b13c.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.in-side-menu){border-bottom:1px solid var(--ic-architectural-200);padding:var(--ic-space-md) 0}:host .navigation-group{height:100%;width:-moz-fit-content;width:fit-content;color:var(--ic-theme-text);display:flex;align-items:center;justify-content:center;padding:0 var(--ic-space-md);transition:var(--ic-easing-transition-slow);position:relative;background:none;border:none}:host(.in-side-menu) .navigation-group{height:40px;width:100%;text-align:left}:host(.in-side-menu) .navigation-group .ic-typography-label{width:190px}:host(.in-side-menu) .navigation-group-side-menu{color:var(--ic-action-default);justify-content:flex-start;padding:0 var(--ic-space-md) 0 var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-collapsed,:host(.in-side-menu) .navigation-group-side-menu-expanded{color:var(--ic-action-default);justify-content:flex-start;padding-left:var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-expanded{margin-bottom:var(--ic-space-xs)}:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,:host(.in-side-menu) .navigation-group-side-menu-expanded::after{border-style:solid;border-width:0.125em 0.125em 0 0;content:"";display:inline-block;height:0.45em;left:0.75em;position:relative;top:-0.1em;transform:rotate(135deg);vertical-align:top;width:0.45em}:host(.in-side-menu) .navigation-group-side-menu-expanded::after{top:0.15em;transform:rotate(-45deg)}:host .navigation-group:hover,:host .navigation-group:active,:host .selected{background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);outline:none;cursor:pointer}:host(:not(.in-side-menu)) .navigation-group:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);z-index:1;transition:box-shadow var(--ic-easing-transition-fast)}:host(.in-side-menu) .navigation-group-side-menu:hover,:host(.in-side-menu) .navigation-group-side-menu:active,:host(.in-side-menu) .navigation-group-side-menu:focus{background-color:var(--ic-architectural-20);color:var(--ic-action-default);cursor:auto;box-shadow:none;outline:none}:host(.in-side-menu) .navigation-group-side-menu:focus{outline:var(--ic-hc-focus-outline)}:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus){background-color:var(--ic-action-dark-bg-hover);color:var(--ic-action-default);cursor:pointer}:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus){background-color:var(--ic-action-dark-bg-active);color:var(--ic-action-default)}:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus{color:var(--ic-action-default);box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline)}:host .navigation-group-dropdown{background-color:var(--ic-architectural-20);border-bottom:1px solid var(--ic-architectural-300);position:absolute;left:0;right:0;padding:var(--ic-space-xs) var(--ic-space-md);box-shadow:0 6px 8px -6px rgba(0 0 0 / 20%)}:host .navigation-group-dropdown-items-list{list-style:none;display:flex;flex-flow:column wrap;align-content:flex-start;padding-left:var(--ic-space-md);max-height:264px}:host .chevron-toggle-icon-wrapper{display:flex;align-items:center}:host .chevron-toggle-icon-wrapper svg{transform:rotate(90deg)}:host .chevron-toggle-icon-closed svg{transform:rotate(-90deg)}:host(.expanded) .grouped-links-wrapper{height:var(--navigation-child-items-height, auto);transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.collapsed) .grouped-links-wrapper{height:var(--navigation-child-items-height, 0);transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.navigation-group-side-nav) .navigation-group{height:var(--navigation-group-height);width:var(--navigation-group-width);justify-content:var(--navigation-group-justify-content);padding-right:var(--navigation-group-expand-toggle-padding)}:host(.navigation-group-side-nav) .navigation-group:hover,:host(.navigation-group-side-nav) .navigation-group:active,:host(.navigation-group-side-nav) .selected{background-color:var(--navigation-group-hover);color:var(--navigation-group-text-hover)}:host(.navigation-group-side-nav) .navigation-group:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background:none}:host(.navigation-group-side-nav) .ic-typography-caption{position:var(--navigation-group-title-position);left:var(--navigation-group-title-position-left);white-space:nowrap}.menu-visibility-visible{visibility:visible}.menu-visibility-hidden{visibility:hidden}';const c=class{constructor(e){i(this,e);this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS=50;this.sideNavExpandHandler=()=>{setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)};this.topNavResizedHandler=i=>{const t=i.detail.size;if(t!==this.deviceSize){this.deviceSize=t;this.inTopNavSideMenu=t<=n.L}};this.setGroupedNavItemTabIndex=i=>{this.el.querySelectorAll("ic-navigation-item").forEach((t=>{const e=t.shadowRoot.querySelector("a")||t.querySelector("a");if(e){e.setAttribute("tabindex",i)}}))};this.toggleGroupedLinkWrapperHeight=(i,t)=>{if(i){if(t){i.setAttribute("style",`--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`);this.setGroupedNavItemTabIndex("0")}else{i.setAttribute("style",`--navigation-child-items-height: 0`);this.setGroupedNavItemTabIndex("-1")}}};this.toggleExpanded=()=>{this.expanded=!this.expanded;const i=this.el.shadowRoot.querySelector(".grouped-links-wrapper");this.toggleGroupedLinkWrapperHeight(i,this.expanded)};this.handleClick=i=>{if(this.navigationType==="top"&&i.detail){this.toggleDropdown()}else{this.toggleExpanded()}};this.handleBlur=i=>{const t=i.relatedTarget;if(!this.el.contains(t)){this.hideDropdown()}};this.handleTopNavKeydown=i=>{if(!this.inTopNavSideMenu&&i.key==="Escape"){this.hideDropdown();this.el.blur()}else if(i.key===" "||i.key==="Enter"){this.toggleDropdown()}};this.handleKeydown=i=>{if(i.key==="Enter"||i.key==="Space"){switch(this.navigationType){case"top":this.handleTopNavKeydown(i);break;case"side":this.toggleExpanded();i.preventDefault();break;default:this.toggleExpanded();break}}};this.handleMouseLeave=i=>{const t=i.relatedTarget;if(!this.el.contains(t)&&t!==this.dropdown&&document.activeElement!==this.el&&!this.el.contains(document.activeElement)){this.hideDropdown()}};this.triggerShowDropdown=()=>{this.showDropdown()};this.renderDropdownGroupedLinks=()=>t("div",{class:{["navigation-group-dropdown"]:!this.inTopNavSideMenu,["navigation-group-dropdown-side-menu"]:this.inTopNavSideMenu,["selected"]:this.dropdownOpen&&!this.inTopNavSideMenu},onMouseLeave:!this.inTopNavSideMenu?this.handleMouseLeave:null,ref:i=>this.dropdown=i},t("nav",{class:{["navigation-group-dropdown-items"]:!this.inTopNavSideMenu}},t("ul",null,t("slot",null))));this.renderGroupedLinks=()=>t("ul",{class:"grouped-links-wrapper"},t("slot",null));this.getNavigationChildItemsHeight=()=>{const i=this.el.querySelectorAll("ic-navigation-item").length||0;const t=this.el.querySelector("ic-navigation-item")||null;if(this.navigationType==="side"&&!!i&&t){return`${parseInt(getComputedStyle(t).height)*i}px`}return"auto"};this.setInitialGroupedLinksWrapperHeight=()=>{const i=this.el.shadowRoot.querySelector(".grouped-links-wrapper");if(i&&this.expanded){i.setAttribute("style",`--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`)}};this.renderNavigationItems=()=>{if(this.dropdownOpen||this.inTopNavSideMenu&&!this.expandable){return this.renderDropdownGroupedLinks()}if(this.navigationType!=="top"){return this.renderGroupedLinks()}return null};this.label=undefined;this.expandable=false;this.dropdownOpen=false;this.inTopNavSideMenu=false;this.deviceSize=n.XL;this.focusStyle=s();this.navigationType=undefined;this.parentEl=undefined;this.expanded=true}childBlurHandler(){this.hideDropdown()}navItemClickHandler(){this.hideDropdown()}themeChangeHandler(i){const t=i.detail;this.focusStyle=t.mode}async setFocus(){if(this.groupEl){this.groupEl.focus()}}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}showDropdown(){if(!this.dropdownOpen){this.toggleDropdown()}}hideDropdown(){if(this.dropdownOpen){this.toggleDropdown()}}componentWillLoad(){this.deviceSize=a();const i=r(this.el);this.navigationType=i.navType;this.parentEl=i.parent;if(this.deviceSize<=n.L&&this.navigationType==="top"){this.inTopNavSideMenu=true}if(this.navigationType==="side"){this.parentEl.addEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.addEventListener("topNavResized",this.topNavResizedHandler)}}componentDidLoad(){setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}disconnectedCallback(){if(this.navigationType==="side"){this.parentEl.removeEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.removeEventListener("topNavResized",this.topNavResizedHandler)}}render(){const{label:i,dropdownOpen:o,inTopNavSideMenu:n,expandable:s}=this;const a=!n||s?"button":"div";return t(e,{class:{["in-side-menu"]:n,expanded:this.expanded,collapsed:!this.expanded,["navigation-group-side-nav"]:this.navigationType==="side"},role:"listitem"},t(a,{tabindex:n&&!s?"-1":"0",onMouseOver:!n&&this.navigationType==="top"?this.triggerShowDropdown:null,onMouseLeave:this.navigationType==="top"&&this.handleMouseLeave,onBlur:this.handleBlur,onClick:s?this.handleClick:null,onKeyDown:this.handleKeydown,class:{["navigation-group"]:true,[this.focusStyle]:!n,["navigation-group-side-menu"]:n&&!s,["navigation-group-side-menu-collapsed"]:n&&s&&!o,["navigation-group-side-menu-expanded"]:n&&s&&o,["selected"]:o&&!n},ref:i=>this.groupEl=i,"aria-expanded":o||this.expanded?"true":"false","aria-haspopup":!n&&this.navigationType==="top"?"true":"false"},t("ic-typography",{variant:this.navigationType==="side"?"caption":"label"},i),this.navigationType==="side"&&s&&t("div",{class:{"chevron-toggle-icon-wrapper":true,"chevron-toggle-icon-closed":this.expanded},innerHTML:d})),this.renderNavigationItems())}get el(){return o(this)}};c.style=h;export{c as ic_navigation_group};
2
- //# sourceMappingURL=p-ecfb2e6b.entry.js.map
1
+ import{r as i,h as t,H as e,g as o}from"./p-f9370be6.js";import{D as n,k as s,g as a,p as r}from"./p-a8ac8f72.js";import{c as d}from"./p-e28af65b.js";import"./p-6f57b13c.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.in-side-menu){border-bottom:1px solid var(--ic-architectural-200);padding:var(--ic-space-md) 0}:host .navigation-group{height:100%;width:-moz-fit-content;width:fit-content;color:var(--ic-theme-text);display:flex;align-items:center;justify-content:center;padding:0 var(--ic-space-md);transition:var(--ic-easing-transition-slow);position:relative;background:none;border:none}:host(.in-side-menu) .navigation-group{height:40px;width:100%;text-align:left}:host(.in-side-menu) .navigation-group .ic-typography-label{width:190px}:host(.in-side-menu) .navigation-group-side-menu{color:var(--ic-action-default);justify-content:flex-start;padding:0 var(--ic-space-md) 0 var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-collapsed,:host(.in-side-menu) .navigation-group-side-menu-expanded{color:var(--ic-action-default);justify-content:flex-start;padding-left:var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-expanded{margin-bottom:var(--ic-space-xs)}:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,:host(.in-side-menu) .navigation-group-side-menu-expanded::after{border-style:solid;border-width:0.125em 0.125em 0 0;content:"";display:inline-block;height:0.45em;left:0.75em;position:relative;top:-0.1em;transform:rotate(135deg);vertical-align:top;width:0.45em}:host(.in-side-menu) .navigation-group-side-menu-expanded::after{top:0.15em;transform:rotate(-45deg)}:host .navigation-group:hover,:host .navigation-group:active,:host .selected{background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);outline:none;cursor:pointer}:host(:not(.in-side-menu)) .navigation-group:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);z-index:1;transition:box-shadow var(--ic-easing-transition-fast)}:host(.in-side-menu) .navigation-group-side-menu:hover,:host(.in-side-menu) .navigation-group-side-menu:active,:host(.in-side-menu) .navigation-group-side-menu:focus{background-color:var(--ic-architectural-20);color:var(--ic-action-default);cursor:auto;box-shadow:none;outline:none}:host(.in-side-menu) .navigation-group-side-menu:focus{outline:var(--ic-hc-focus-outline)}:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus){background-color:var(--ic-action-dark-bg-hover);color:var(--ic-action-default);cursor:pointer}:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus){background-color:var(--ic-action-dark-bg-active);color:var(--ic-action-default)}:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus{color:var(--ic-action-default);box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline)}:host .navigation-group-dropdown{background-color:var(--ic-architectural-20);border-bottom:1px solid var(--ic-architectural-300);position:absolute;left:0;right:0;padding:var(--ic-space-xs) var(--ic-space-md);box-shadow:0 6px 8px -6px rgba(0 0 0 / 20%)}:host .navigation-group-dropdown-items-list{list-style:none;display:flex;flex-flow:column wrap;align-content:flex-start;padding-left:var(--ic-space-md);max-height:264px}:host .chevron-toggle-icon-wrapper{display:flex;align-items:center}:host .chevron-toggle-icon-wrapper svg{transform:rotate(90deg)}:host .chevron-toggle-icon-closed svg{transform:rotate(-90deg)}:host(.expanded) .grouped-links-wrapper{height:var(--navigation-child-items-height, auto);transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.collapsed) .grouped-links-wrapper{height:var(--navigation-child-items-height, 0);transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.navigation-group-side-nav) .navigation-group{height:var(--navigation-group-height);width:var(--navigation-group-width);justify-content:var(--navigation-group-justify-content);padding-right:var(--navigation-group-expand-toggle-padding)}:host(.navigation-group-side-nav) .navigation-group:hover,:host(.navigation-group-side-nav) .navigation-group:active,:host(.navigation-group-side-nav) .selected{background-color:var(--navigation-group-hover);color:var(--navigation-group-text-hover)}:host(.navigation-group-side-nav) .navigation-group:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background:none}:host(.navigation-group-side-nav) .ic-typography-caption{position:var(--navigation-group-title-position);left:var(--navigation-group-title-position-left);white-space:nowrap}.menu-visibility-visible{visibility:visible}.menu-visibility-hidden{visibility:hidden}';const c=class{constructor(e){i(this,e);this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS=50;this.sideNavExpandHandler=()=>{setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)};this.topNavResizedHandler=i=>{const t=i.detail.size;if(t!==this.deviceSize){this.deviceSize=t;this.inTopNavSideMenu=t<=n.L}};this.setGroupedNavItemTabIndex=i=>{this.el.querySelectorAll("ic-navigation-item").forEach((t=>{const e=t.shadowRoot.querySelector("a")||t.querySelector("a");if(e){e.setAttribute("tabindex",i)}}))};this.toggleGroupedLinkWrapperHeight=(i,t)=>{if(i){if(t){i.setAttribute("style",`--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`);this.setGroupedNavItemTabIndex("0")}else{i.setAttribute("style",`--navigation-child-items-height: 0`);this.setGroupedNavItemTabIndex("-1")}}};this.toggleExpanded=()=>{this.expanded=!this.expanded;const i=this.el.shadowRoot.querySelector(".grouped-links-wrapper");this.toggleGroupedLinkWrapperHeight(i,this.expanded)};this.handleClick=i=>{if(this.navigationType==="top"&&i.detail){this.toggleDropdown()}else{this.toggleExpanded()}};this.handleBlur=i=>{const t=i.relatedTarget;if(!this.el.contains(t)){this.hideDropdown()}};this.handleTopNavKeydown=i=>{if(!this.inTopNavSideMenu&&i.key==="Escape"){this.hideDropdown();this.el.blur()}else if(i.key===" "||i.key==="Enter"){this.toggleDropdown()}};this.handleKeydown=i=>{if(i.key==="Enter"||i.key==="Space"){switch(this.navigationType){case"top":this.handleTopNavKeydown(i);break;case"side":this.toggleExpanded();i.preventDefault();break;default:this.toggleExpanded();break}}};this.handleMouseLeave=i=>{const t=i.relatedTarget;if(!this.el.contains(t)&&t!==this.dropdown&&document.activeElement!==this.el&&!this.el.contains(document.activeElement)){this.hideDropdown()}};this.triggerShowDropdown=()=>{this.showDropdown()};this.renderDropdownGroupedLinks=()=>t("div",{class:{["navigation-group-dropdown"]:!this.inTopNavSideMenu,["navigation-group-dropdown-side-menu"]:this.inTopNavSideMenu,["selected"]:this.dropdownOpen&&!this.inTopNavSideMenu},onMouseLeave:!this.inTopNavSideMenu?this.handleMouseLeave:null,ref:i=>this.dropdown=i},t("nav",{class:{["navigation-group-dropdown-items"]:!this.inTopNavSideMenu}},t("ul",null,t("slot",null))));this.renderGroupedLinks=()=>t("ul",{class:"grouped-links-wrapper"},t("slot",null));this.getNavigationChildItemsHeight=()=>{const i=this.el.querySelectorAll("ic-navigation-item").length||0;const t=this.el.querySelector("ic-navigation-item")||null;if(this.navigationType==="side"&&!!i&&t){return`${parseInt(getComputedStyle(t).height)*i}px`}return"auto"};this.setInitialGroupedLinksWrapperHeight=()=>{const i=this.el.shadowRoot.querySelector(".grouped-links-wrapper");if(i&&this.expanded){i.setAttribute("style",`--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`)}};this.renderNavigationItems=()=>{if(this.dropdownOpen||this.inTopNavSideMenu&&!this.expandable){return this.renderDropdownGroupedLinks()}if(this.navigationType!=="top"){return this.renderGroupedLinks()}return null};this.label=undefined;this.expandable=false;this.dropdownOpen=false;this.inTopNavSideMenu=false;this.deviceSize=n.XL;this.focusStyle=s();this.navigationType=undefined;this.parentEl=undefined;this.expanded=true}childBlurHandler(){this.hideDropdown()}navItemClickHandler(){this.hideDropdown()}themeChangeHandler(i){const t=i.detail;this.focusStyle=t.mode}async setFocus(){if(this.groupEl){this.groupEl.focus()}}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}showDropdown(){if(!this.dropdownOpen){this.toggleDropdown()}}hideDropdown(){if(this.dropdownOpen){this.toggleDropdown()}}componentWillLoad(){this.deviceSize=a();const i=r(this.el);this.navigationType=i.navType;this.parentEl=i.parent;if(this.deviceSize<=n.L&&this.navigationType==="top"){this.inTopNavSideMenu=true}if(this.navigationType==="side"){this.parentEl.addEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.addEventListener("topNavResized",this.topNavResizedHandler)}}componentDidLoad(){setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}disconnectedCallback(){if(this.navigationType==="side"){this.parentEl.removeEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.removeEventListener("topNavResized",this.topNavResizedHandler)}}render(){const{label:i,dropdownOpen:o,inTopNavSideMenu:n,expandable:s}=this;const a=!n||s?"button":"div";return t(e,{class:{["in-side-menu"]:n,expanded:this.expanded,collapsed:!this.expanded,["navigation-group-side-nav"]:this.navigationType==="side"},role:"listitem"},t(a,{tabindex:n&&!s?"-1":"0",onMouseOver:!n&&this.navigationType==="top"?this.triggerShowDropdown:null,onMouseLeave:this.navigationType==="top"&&this.handleMouseLeave,onBlur:this.handleBlur,onClick:s?this.handleClick:null,onKeyDown:this.handleKeydown,class:{["navigation-group"]:true,[this.focusStyle]:!n,["navigation-group-side-menu"]:n&&!s,["navigation-group-side-menu-collapsed"]:n&&s&&!o,["navigation-group-side-menu-expanded"]:n&&s&&o,["selected"]:o&&!n},ref:i=>this.groupEl=i,"aria-expanded":o||this.expanded?"true":"false","aria-haspopup":!n&&this.navigationType==="top"?"true":"false"},t("ic-typography",{variant:this.navigationType==="side"?"caption":"label"},i),this.navigationType==="side"&&s&&t("div",{class:{"chevron-toggle-icon-wrapper":true,"chevron-toggle-icon-closed":this.expanded},innerHTML:d})),this.renderNavigationItems())}get el(){return o(this)}};c.style=h;export{c as ic_navigation_group};
2
+ //# sourceMappingURL=p-930cd4cc.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-navigation-group/ic-navigation-group.css?tag=ic-navigation-group&encapsulation=shadow","src/components/ic-navigation-group/ic-navigation-group.tsx"],"names":["icNavigationGroupCss","NavigationGroup","this","DYNAMIC_GROUPED_LINKS_HEIGHT_MS","sideNavExpandHandler","setTimeout","setInitialGroupedLinksWrapperHeight","topNavResizedHandler","ev","newSize","detail","size","deviceSize","inTopNavSideMenu","DEVICE_SIZES","L","setGroupedNavItemTabIndex","tabIndexValue","el","querySelectorAll","forEach","navigationItem","navItem","shadowRoot","querySelector","setAttribute","toggleGroupedLinkWrapperHeight","wrapper","expanded","getNavigationChildItemsHeight","toggleExpanded","linkWrapper","handleClick","navigationType","toggleDropdown","handleBlur","target","relatedTarget","contains","hideDropdown","handleTopNavKeydown","key","blur","handleKeydown","preventDefault","handleMouseLeave","dropdown","document","activeElement","triggerShowDropdown","showDropdown","renderDropdownGroupedLinks","h","class","[object Object]","dropdownOpen","onMouseLeave","ref","renderGroupedLinks","navigationItemLength","length","parseInt","getComputedStyle","height","renderNavigationItems","expandable","XL","getThemeForegroundColor","theme","focusStyle","mode","groupEl","focus","getCurrentDeviceSize","navParentDetails","getNavItemParentDetails","navType","parentEl","parent","addEventListener","removeEventListener","label","NavigationGroupElement","Host","collapsed","role","tabindex","onMouseOver","onBlur","onClick","onKeyDown","aria-expanded","aria-haspopup","variant","chevron-toggle-icon-wrapper","chevron-toggle-icon-closed","innerHTML","chevronIcon"],"mappings":"8KAAA,MAAMA,EAAuB,miOC0BhBC,EAAe,+BA6BlBC,KAAAC,gCAAkC,GA4BlCD,KAAAE,qBAAuB,KAC7BC,YACE,IAAMH,KAAKI,uCACXJ,KAAKC,kCAIDD,KAAAK,qBAAwBC,IAC9B,MAAMC,EAAUD,EAAGE,OAAOC,KAC1B,GAAIF,IAAYP,KAAKU,WAAY,CAC/BV,KAAKU,WAAaH,EAClBP,KAAKW,iBAAmBJ,GAAWK,EAAaC,IAQ5Cb,KAAAc,0BAA6BC,IACnCf,KAAKgB,GAAGC,iBAAiB,sBAAsBC,SAASC,IACtD,MAAMC,EACJD,EAAeE,WAAWC,cAAc,MACxCH,EAAeG,cAAc,KAC/B,GAAIF,EAAS,CACXA,EAAQG,aAAa,WAAYR,QAK/Bf,KAAAwB,+BAAiC,CACvCC,EACAC,KAEA,GAAID,EAAS,CACX,GAAIC,EAAU,CACZD,EAAQF,aACN,QACA,oCAAoCvB,KAAK2B,mC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AAS/B,KAAK2C,iBACpD2C,OAAQtF,KAAKiC,WACbsD,QAASxB,EAAa/D,KAAK8B,YAAc,KACzC0D,UAAWxF,KAAKyC,cAChBU,MAAO,CACLC,CAAC,oBAAqB,KACtBA,CAACpD,KAAKmE,aAAcxD,EACpByC,CAAC,8BAA+BzC,IAAqBoD,EACrDX,CAAC,wCACCzC,GAAoBoD,IAAeV,EACrCD,CAAC,uCACCzC,GAAoBoD,GAAcV,EACpCD,CAAC,YAAaC,IAAiB1C,GAEjC4C,IAAMvC,GAAQhB,KAAKqE,QAAUrD,EAAGyE,gBACjBpC,GAAgBrD,KAAK0B,SAAW,OAAS,QAAOgE,iBAE5D/E,GAAoBX,KAAK+B,iBAAmB,MACzC,OACA,SAGNmB,EAAA,gBAAA,CACEyC,QAAS3F,KAAK+B,iBAAmB,OAAS,UAAY,SAErDgD,GAEF/E,KAAK+B,iBAAmB,QAAUgC,GACjCb,EAAA,MAAA,CACEC,MAAO,CACLyC,8BAA+B,KAC/BC,6BAA8B7F,KAAK0B,UAErCoE,UAAWC,KAIhB/F,KAAK8D","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n}\n\n:host(.in-side-menu) {\n border-bottom: 1px solid var(--ic-architectural-200);\n padding: var(--ic-space-md) 0;\n}\n\n:host .navigation-group {\n height: 100%;\n width: fit-content;\n color: var(--ic-theme-text);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 var(--ic-space-md);\n transition: var(--ic-easing-transition-slow);\n position: relative;\n background: none;\n border: none;\n}\n\n:host(.in-side-menu) .navigation-group {\n height: 40px;\n width: 100%;\n text-align: left;\n}\n\n:host(.in-side-menu) .navigation-group .ic-typography-label {\n width: 190px;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu {\n color: var(--ic-action-default);\n justify-content: flex-start;\n padding: 0 var(--ic-space-md) 0 var(--ic-space-md);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-collapsed,\n:host(.in-side-menu) .navigation-group-side-menu-expanded {\n color: var(--ic-action-default);\n justify-content: flex-start;\n padding-left: var(--ic-space-md);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded {\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,\n:host(.in-side-menu) .navigation-group-side-menu-expanded::after {\n border-style: solid;\n border-width: 0.125em 0.125em 0 0;\n content: \"\";\n display: inline-block;\n height: 0.45em;\n left: 0.75em;\n position: relative;\n top: -0.1em;\n transform: rotate(135deg);\n vertical-align: top;\n width: 0.45em;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded::after {\n top: 0.15em;\n transform: rotate(-45deg);\n}\n\n:host .navigation-group:hover,\n:host .navigation-group:active,\n:host .selected {\n background-color: var(--ic-architectural-20);\n color: var(--ic-color-primary-text);\n outline: none;\n cursor: pointer;\n}\n\n:host(:not(.in-side-menu)) .navigation-group:focus {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n transition: box-shadow var(--ic-easing-transition-fast);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu:hover,\n:host(.in-side-menu) .navigation-group-side-menu:active,\n:host(.in-side-menu) .navigation-group-side-menu:focus {\n background-color: var(--ic-architectural-20);\n color: var(--ic-action-default);\n cursor: auto;\n box-shadow: none;\n outline: none;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus) {\n background-color: var(--ic-action-dark-bg-hover);\n color: var(--ic-action-default);\n cursor: pointer;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus) {\n background-color: var(--ic-action-dark-bg-active);\n color: var(--ic-action-default);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus {\n color: var(--ic-action-default);\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host .navigation-group-dropdown {\n background-color: var(--ic-architectural-20);\n border-bottom: 1px solid var(--ic-architectural-300);\n position: absolute;\n left: 0;\n right: 0;\n padding: var(--ic-space-xs) var(--ic-space-md);\n box-shadow: 0 6px 8px -6px rgba(0 0 0 / 20%);\n}\n\n:host .navigation-group-dropdown-items-list {\n list-style: none;\n display: flex;\n flex-flow: column wrap;\n align-content: flex-start;\n padding-left: var(--ic-space-md);\n max-height: 264px;\n}\n\n:host .chevron-toggle-icon-wrapper {\n display: flex;\n align-items: center;\n}\n\n:host .chevron-toggle-icon-wrapper svg {\n transform: rotate(90deg);\n}\n\n:host .chevron-toggle-icon-closed svg {\n transform: rotate(-90deg);\n}\n\n:host(.expanded) .grouped-links-wrapper {\n height: var(--navigation-child-items-height, auto);\n transition: var(--ic-easing-transition-slow);\n overflow: hidden;\n}\n\n:host(.collapsed) .grouped-links-wrapper {\n height: var(--navigation-child-items-height, 0);\n transition: var(--ic-easing-transition-slow);\n overflow: hidden;\n}\n\n:host(.navigation-group-side-nav) .navigation-group {\n height: var(--navigation-group-height);\n width: var(--navigation-group-width);\n justify-content: var(--navigation-group-justify-content);\n padding-right: var(--navigation-group-expand-toggle-padding);\n}\n\n:host(.navigation-group-side-nav) .navigation-group:hover,\n:host(.navigation-group-side-nav) .navigation-group:active,\n:host(.navigation-group-side-nav) .selected {\n background-color: var(--navigation-group-hover);\n color: var(--navigation-group-text-hover);\n}\n\n:host(.navigation-group-side-nav) .navigation-group:focus {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n background: none;\n}\n\n:host(.navigation-group-side-nav) .ic-typography-caption {\n position: var(--navigation-group-title-position);\n left: var(--navigation-group-title-position-left);\n white-space: nowrap;\n}\n\n.menu-visibility-visible {\n visibility: visible;\n}\n\n.menu-visibility-hidden {\n visibility: hidden;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n State,\n Listen,\n h,\n Method,\n} from \"@stencil/core\";\n\nimport {\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getThemeForegroundColor,\n getNavItemParentDetails,\n} from \"../../utils/helpers\";\nimport { IcNavType, IcTheme } from \"../../utils/types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n@Component({\n tag: \"ic-navigation-group\",\n styleUrl: \"ic-navigation-group.css\",\n shadow: true,\n})\nexport class NavigationGroup {\n @Element() el: HTMLIcNavigationGroupElement;\n\n /**\n * The label to display on the group.\n */\n @Prop() label: string;\n\n /**\n * If `true`, the group will be expandable in the side menu.\n */\n @Prop() expandable: boolean = false;\n\n @State() dropdownOpen: boolean = false;\n\n @State() inTopNavSideMenu: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() focusStyle = getThemeForegroundColor();\n\n @State() navigationType: IcNavType | \"\";\n\n @State() parentEl: HTMLElement;\n\n @State() expanded: boolean = true;\n\n private groupEl: HTMLElement;\n private dropdown: HTMLElement;\n private DYNAMIC_GROUPED_LINKS_HEIGHT_MS = 50;\n\n @Listen(\"childBlur\")\n childBlurHandler(): void {\n this.hideDropdown();\n }\n\n @Listen(\"navItemClicked\")\n navItemClickHandler(): void {\n this.hideDropdown();\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.focusStyle = theme.mode;\n }\n\n /**\n * Sets focus on the nav item\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.groupEl) {\n this.groupEl.focus();\n }\n }\n\n private sideNavExpandHandler = (): void => {\n setTimeout(\n () => this.setInitialGroupedLinksWrapperHeight(),\n this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS\n );\n };\n\n private topNavResizedHandler = (ev: CustomEvent): void => {\n const newSize = ev.detail.size;\n if (newSize !== this.deviceSize) {\n this.deviceSize = newSize;\n this.inTopNavSideMenu = newSize <= DEVICE_SIZES.L;\n }\n };\n\n private toggleDropdown() {\n this.dropdownOpen = !this.dropdownOpen;\n }\n\n private setGroupedNavItemTabIndex = (tabIndexValue: string) => {\n this.el.querySelectorAll(\"ic-navigation-item\").forEach((navigationItem) => {\n const navItem =\n navigationItem.shadowRoot.querySelector(\"a\") ||\n navigationItem.querySelector(\"a\");\n if (navItem) {\n navItem.setAttribute(\"tabindex\", tabIndexValue);\n }\n });\n };\n\n private toggleGroupedLinkWrapperHeight = (\n wrapper: HTMLElement,\n expanded: boolean\n ) => {\n if (wrapper) {\n if (expanded) {\n wrapper.setAttribute(\n \"style\",\n `--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`\n );\n this.setGroupedNavItemTabIndex(\"0\");\n } else {\n wrapper.setAttribute(\"style\", `--navigation-child-items-height: 0`);\n this.setGroupedNavItemTabIndex(\"-1\");\n }\n }\n };\n\n private toggleExpanded = () => {\n this.expanded = !this.expanded;\n const linkWrapper = this.el.shadowRoot.querySelector(\n \".grouped-links-wrapper\"\n ) as HTMLElement;\n\n this.toggleGroupedLinkWrapperHeight(linkWrapper, this.expanded);\n };\n\n private showDropdown() {\n if (!this.dropdownOpen) {\n this.toggleDropdown();\n }\n }\n\n private hideDropdown() {\n if (this.dropdownOpen) {\n this.toggleDropdown();\n }\n }\n\n private handleClick = (ev: MouseEvent) => {\n if (this.navigationType === \"top\" && ev.detail) {\n this.toggleDropdown();\n } else {\n this.toggleExpanded();\n }\n };\n\n private handleBlur = (ev: FocusEvent) => {\n const target = ev.relatedTarget as HTMLElement;\n if (!this.el.contains(target)) {\n this.hideDropdown();\n }\n };\n\n private handleTopNavKeydown = (ev: KeyboardEvent) => {\n if (!this.inTopNavSideMenu && ev.key === \"Escape\") {\n this.hideDropdown();\n this.el.blur();\n } else if (ev.key === \" \" || ev.key === \"Enter\") {\n this.toggleDropdown();\n }\n };\n\n private handleKeydown = (ev: KeyboardEvent) => {\n if (ev.key === \"Enter\" || ev.key === \"Space\") {\n switch (this.navigationType) {\n case \"top\":\n this.handleTopNavKeydown(ev as KeyboardEvent);\n break;\n case \"side\":\n this.toggleExpanded();\n ev.preventDefault();\n break;\n default:\n this.toggleExpanded();\n break;\n }\n }\n };\n\n private handleMouseLeave = (ev: MouseEvent) => {\n const target = ev.relatedTarget as HTMLElement;\n if (\n !this.el.contains(target) &&\n target !== this.dropdown &&\n document.activeElement !== this.el &&\n !this.el.contains(document.activeElement)\n ) {\n this.hideDropdown();\n }\n };\n\n private triggerShowDropdown = () => {\n this.showDropdown();\n };\n\n private renderDropdownGroupedLinks = (): HTMLDivElement => (\n <div\n class={{\n [\"navigation-group-dropdown\"]: !this.inTopNavSideMenu,\n [\"navigation-group-dropdown-side-menu\"]: this.inTopNavSideMenu,\n [\"selected\"]: this.dropdownOpen && !this.inTopNavSideMenu,\n }}\n onMouseLeave={!this.inTopNavSideMenu ? this.handleMouseLeave : null}\n ref={(el) => (this.dropdown = el)}\n >\n <nav\n class={{\n [\"navigation-group-dropdown-items\"]: !this.inTopNavSideMenu,\n }}\n >\n <ul>\n <slot></slot>\n </ul>\n </nav>\n </div>\n );\n\n private renderGroupedLinks = (): HTMLDivElement => (\n <ul class=\"grouped-links-wrapper\">\n <slot></slot>\n </ul>\n );\n\n /**\n * Gets the total height of navigation links to improve\n * smoothness of expand/collapse animations\n */\n private getNavigationChildItemsHeight = (): string => {\n const navigationItemLength =\n this.el.querySelectorAll(\"ic-navigation-item\").length || 0;\n const navigationItem = this.el.querySelector(\"ic-navigation-item\") || null;\n\n if (\n this.navigationType === \"side\" &&\n !!navigationItemLength &&\n navigationItem\n ) {\n return `${\n parseInt(getComputedStyle(navigationItem).height) * navigationItemLength\n }px`;\n }\n\n return \"auto\";\n };\n\n private setInitialGroupedLinksWrapperHeight = () => {\n const linkWrapper = this.el.shadowRoot.querySelector(\n \".grouped-links-wrapper\"\n ) as HTMLElement;\n\n if (linkWrapper && this.expanded) {\n linkWrapper.setAttribute(\n \"style\",\n `--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`\n );\n }\n };\n\n private renderNavigationItems = (): HTMLDivElement | null => {\n if (this.dropdownOpen || (this.inTopNavSideMenu && !this.expandable)) {\n return this.renderDropdownGroupedLinks();\n }\n\n if (this.navigationType !== \"top\") {\n return this.renderGroupedLinks();\n }\n\n return null;\n };\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n const navParentDetails = getNavItemParentDetails(this.el);\n this.navigationType = navParentDetails.navType;\n this.parentEl = navParentDetails.parent;\n if (this.deviceSize <= DEVICE_SIZES.L && this.navigationType === \"top\") {\n this.inTopNavSideMenu = true;\n }\n\n if (this.navigationType === \"side\") {\n this.parentEl.addEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.addEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n }\n\n componentDidLoad(): void {\n /**\n * debounce is required as the incorrect height was retrieved instantly after\n * componentDidLoad is invoked.\n */\n setTimeout(\n () => this.setInitialGroupedLinksWrapperHeight(),\n this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS\n );\n }\n\n disconnectedCallback(): void {\n if (this.navigationType === \"side\") {\n this.parentEl.removeEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.removeEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n }\n\n render() {\n const { label, dropdownOpen, inTopNavSideMenu, expandable } = this;\n\n const NavigationGroupElement =\n !inTopNavSideMenu || expandable ? \"button\" : \"div\";\n\n return (\n <Host\n class={{\n [\"in-side-menu\"]: inTopNavSideMenu,\n expanded: this.expanded,\n collapsed: !this.expanded,\n [\"navigation-group-side-nav\"]: this.navigationType === \"side\",\n }}\n role=\"listitem\"\n >\n <NavigationGroupElement\n tabindex={inTopNavSideMenu && !expandable ? \"-1\" : \"0\"}\n onMouseOver={\n !inTopNavSideMenu && this.navigationType === \"top\"\n ? this.triggerShowDropdown\n : null\n }\n onMouseLeave={this.navigationType === \"top\" && this.handleMouseLeave}\n onBlur={this.handleBlur}\n onClick={expandable ? this.handleClick : null}\n onKeyDown={this.handleKeydown}\n class={{\n [\"navigation-group\"]: true,\n [this.focusStyle]: !inTopNavSideMenu,\n [\"navigation-group-side-menu\"]: inTopNavSideMenu && !expandable,\n [\"navigation-group-side-menu-collapsed\"]:\n inTopNavSideMenu && expandable && !dropdownOpen,\n [\"navigation-group-side-menu-expanded\"]:\n inTopNavSideMenu && expandable && dropdownOpen,\n [\"selected\"]: dropdownOpen && !inTopNavSideMenu,\n }}\n ref={(el) => (this.groupEl = el)}\n aria-expanded={dropdownOpen || this.expanded ? \"true\" : \"false\"}\n aria-haspopup={\n !inTopNavSideMenu && this.navigationType === \"top\"\n ? \"true\"\n : \"false\"\n }\n >\n <ic-typography\n variant={this.navigationType === \"side\" ? \"caption\" : \"label\"}\n >\n {label}\n </ic-typography>\n {this.navigationType === \"side\" && expandable && (\n <div\n class={{\n \"chevron-toggle-icon-wrapper\": true,\n \"chevron-toggle-icon-closed\": this.expanded,\n }}\n innerHTML={chevronIcon}\n ></div>\n )}\n </NavigationGroupElement>\n {this.renderNavigationItems()}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-navigation-group/ic-navigation-group.css?tag=ic-navigation-group&encapsulation=shadow","src/components/ic-navigation-group/ic-navigation-group.tsx"],"names":["icNavigationGroupCss","NavigationGroup","this","DYNAMIC_GROUPED_LINKS_HEIGHT_MS","sideNavExpandHandler","setTimeout","setInitialGroupedLinksWrapperHeight","topNavResizedHandler","ev","newSize","detail","size","deviceSize","inTopNavSideMenu","DEVICE_SIZES","L","setGroupedNavItemTabIndex","tabIndexValue","el","querySelectorAll","forEach","navigationItem","navItem","shadowRoot","querySelector","setAttribute","toggleGroupedLinkWrapperHeight","wrapper","expanded","getNavigationChildItemsHeight","toggleExpanded","linkWrapper","handleClick","navigationType","toggleDropdown","handleBlur","target","relatedTarget","contains","hideDropdown","handleTopNavKeydown","key","blur","handleKeydown","preventDefault","handleMouseLeave","dropdown","document","activeElement","triggerShowDropdown","showDropdown","renderDropdownGroupedLinks","h","class","[object Object]","dropdownOpen","onMouseLeave","ref","renderGroupedLinks","navigationItemLength","length","parseInt","getComputedStyle","height","renderNavigationItems","expandable","XL","getThemeForegroundColor","theme","focusStyle","mode","groupEl","focus","getCurrentDeviceSize","navParentDetails","getNavItemParentDetails","navType","parentEl","parent","addEventListener","removeEventListener","label","NavigationGroupElement","Host","collapsed","role","tabindex","onMouseOver","onBlur","onClick","onKeyDown","aria-expanded","aria-haspopup","variant","chevron-toggle-icon-wrapper","chevron-toggle-icon-closed","innerHTML","chevronIcon"],"mappings":"8KAAA,MAAMA,EAAuB,miOC0BhBC,EAAe,+BA6BlBC,KAAAC,gCAAkC,GA4BlCD,KAAAE,qBAAuB,KAC7BC,YACE,IAAMH,KAAKI,uCACXJ,KAAKC,kCAIDD,KAAAK,qBAAwBC,IAC9B,MAAMC,EAAUD,EAAGE,OAAOC,KAC1B,GAAIF,IAAYP,KAAKU,WAAY,CAC/BV,KAAKU,WAAaH,EAClBP,KAAKW,iBAAmBJ,GAAWK,EAAaC,IAQ5Cb,KAAAc,0BAA6BC,IACnCf,KAAKgB,GAAGC,iBAAiB,sBAAsBC,SAASC,IACtD,MAAMC,EACJD,EAAeE,WAAWC,cAAc,MACxCH,EAAeG,cAAc,KAC/B,GAAIF,EAAS,CACXA,EAAQG,aAAa,WAAYR,QAK/Bf,KAAAwB,+BAAiC,CACvCC,EACAC,KAEA,GAAID,EAAS,CACX,GAAIC,EAAU,CACZD,EAAQF,aACN,QACA,oCAAoCvB,KAAK2B,mCAE3C3B,KAAKc,0BAA0B,SAC1B,CACLW,EAAQF,aAAa,QAAS,sCAC9BvB,KAAKc,0BAA0B,SAK7Bd,KAAA4B,eAAiB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ChBU,MAAO,CACLC,CAAC,oBAAqB,KACtBA,CAACpD,KAAKmE,aAAcxD,EACpByC,CAAC,8BAA+BzC,IAAqBoD,EACrDX,CAAC,wCACCzC,GAAoBoD,IAAeV,EACrCD,CAAC,uCACCzC,GAAoBoD,GAAcV,EACpCD,CAAC,YAAaC,IAAiB1C,GAEjC4C,IAAMvC,GAAQhB,KAAKqE,QAAUrD,EAAGyE,gBACjBpC,GAAgBrD,KAAK0B,SAAW,OAAS,QAAOgE,iBAE5D/E,GAAoBX,KAAK+B,iBAAmB,MACzC,OACA,SAGNmB,EAAA,gBAAA,CACEyC,QAAS3F,KAAK+B,iBAAmB,OAAS,UAAY,SAErDgD,GAEF/E,KAAK+B,iBAAmB,QAAUgC,GACjCb,EAAA,MAAA,CACEC,MAAO,CACLyC,8BAA+B,KAC/BC,6BAA8B7F,KAAK0B,UAErCoE,UAAWC,KAIhB/F,KAAK8D","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n:host(.in-side-menu) {\n border-bottom: 1px solid var(--ic-architectural-200);\n padding: var(--ic-space-md) 0;\n}\n\n:host .navigation-group {\n height: 100%;\n width: fit-content;\n color: var(--ic-theme-text);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 var(--ic-space-md);\n transition: var(--ic-easing-transition-slow);\n position: relative;\n background: none;\n border: none;\n}\n\n:host(.in-side-menu) .navigation-group {\n height: 40px;\n width: 100%;\n text-align: left;\n}\n\n:host(.in-side-menu) .navigation-group .ic-typography-label {\n width: 190px;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu {\n color: var(--ic-action-default);\n justify-content: flex-start;\n padding: 0 var(--ic-space-md) 0 var(--ic-space-md);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-collapsed,\n:host(.in-side-menu) .navigation-group-side-menu-expanded {\n color: var(--ic-action-default);\n justify-content: flex-start;\n padding-left: var(--ic-space-md);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded {\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,\n:host(.in-side-menu) .navigation-group-side-menu-expanded::after {\n border-style: solid;\n border-width: 0.125em 0.125em 0 0;\n content: \"\";\n display: inline-block;\n height: 0.45em;\n left: 0.75em;\n position: relative;\n top: -0.1em;\n transform: rotate(135deg);\n vertical-align: top;\n width: 0.45em;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded::after {\n top: 0.15em;\n transform: rotate(-45deg);\n}\n\n:host .navigation-group:hover,\n:host .navigation-group:active,\n:host .selected {\n background-color: var(--ic-architectural-20);\n color: var(--ic-color-primary-text);\n outline: none;\n cursor: pointer;\n}\n\n:host(:not(.in-side-menu)) .navigation-group:focus {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n transition: box-shadow var(--ic-easing-transition-fast);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu:hover,\n:host(.in-side-menu) .navigation-group-side-menu:active,\n:host(.in-side-menu) .navigation-group-side-menu:focus {\n background-color: var(--ic-architectural-20);\n color: var(--ic-action-default);\n cursor: auto;\n box-shadow: none;\n outline: none;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus) {\n background-color: var(--ic-action-dark-bg-hover);\n color: var(--ic-action-default);\n cursor: pointer;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus) {\n background-color: var(--ic-action-dark-bg-active);\n color: var(--ic-action-default);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus {\n color: var(--ic-action-default);\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host .navigation-group-dropdown {\n background-color: var(--ic-architectural-20);\n border-bottom: 1px solid var(--ic-architectural-300);\n position: absolute;\n left: 0;\n right: 0;\n padding: var(--ic-space-xs) var(--ic-space-md);\n box-shadow: 0 6px 8px -6px rgba(0 0 0 / 20%);\n}\n\n:host .navigation-group-dropdown-items-list {\n list-style: none;\n display: flex;\n flex-flow: column wrap;\n align-content: flex-start;\n padding-left: var(--ic-space-md);\n max-height: 264px;\n}\n\n:host .chevron-toggle-icon-wrapper {\n display: flex;\n align-items: center;\n}\n\n:host .chevron-toggle-icon-wrapper svg {\n transform: rotate(90deg);\n}\n\n:host .chevron-toggle-icon-closed svg {\n transform: rotate(-90deg);\n}\n\n:host(.expanded) .grouped-links-wrapper {\n height: var(--navigation-child-items-height, auto);\n transition: var(--ic-easing-transition-slow);\n overflow: hidden;\n}\n\n:host(.collapsed) .grouped-links-wrapper {\n height: var(--navigation-child-items-height, 0);\n transition: var(--ic-easing-transition-slow);\n overflow: hidden;\n}\n\n:host(.navigation-group-side-nav) .navigation-group {\n height: var(--navigation-group-height);\n width: var(--navigation-group-width);\n justify-content: var(--navigation-group-justify-content);\n padding-right: var(--navigation-group-expand-toggle-padding);\n}\n\n:host(.navigation-group-side-nav) .navigation-group:hover,\n:host(.navigation-group-side-nav) .navigation-group:active,\n:host(.navigation-group-side-nav) .selected {\n background-color: var(--navigation-group-hover);\n color: var(--navigation-group-text-hover);\n}\n\n:host(.navigation-group-side-nav) .navigation-group:focus {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n background: none;\n}\n\n:host(.navigation-group-side-nav) .ic-typography-caption {\n position: var(--navigation-group-title-position);\n left: var(--navigation-group-title-position-left);\n white-space: nowrap;\n}\n\n.menu-visibility-visible {\n visibility: visible;\n}\n\n.menu-visibility-hidden {\n visibility: hidden;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n State,\n Listen,\n h,\n Method,\n} from \"@stencil/core\";\n\nimport {\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getThemeForegroundColor,\n getNavItemParentDetails,\n} from \"../../utils/helpers\";\nimport { IcNavType, IcTheme } from \"../../utils/types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n@Component({\n tag: \"ic-navigation-group\",\n styleUrl: \"ic-navigation-group.css\",\n shadow: true,\n})\nexport class NavigationGroup {\n @Element() el: HTMLIcNavigationGroupElement;\n\n /**\n * The label to display on the group.\n */\n @Prop() label: string;\n\n /**\n * If `true`, the group will be expandable in the side menu.\n */\n @Prop() expandable: boolean = false;\n\n @State() dropdownOpen: boolean = false;\n\n @State() inTopNavSideMenu: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() focusStyle = getThemeForegroundColor();\n\n @State() navigationType: IcNavType | \"\";\n\n @State() parentEl: HTMLElement;\n\n @State() expanded: boolean = true;\n\n private groupEl: HTMLElement;\n private dropdown: HTMLElement;\n private DYNAMIC_GROUPED_LINKS_HEIGHT_MS = 50;\n\n @Listen(\"childBlur\")\n childBlurHandler(): void {\n this.hideDropdown();\n }\n\n @Listen(\"navItemClicked\")\n navItemClickHandler(): void {\n this.hideDropdown();\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.focusStyle = theme.mode;\n }\n\n /**\n * Sets focus on the nav item\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.groupEl) {\n this.groupEl.focus();\n }\n }\n\n private sideNavExpandHandler = (): void => {\n setTimeout(\n () => this.setInitialGroupedLinksWrapperHeight(),\n this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS\n );\n };\n\n private topNavResizedHandler = (ev: CustomEvent): void => {\n const newSize = ev.detail.size;\n if (newSize !== this.deviceSize) {\n this.deviceSize = newSize;\n this.inTopNavSideMenu = newSize <= DEVICE_SIZES.L;\n }\n };\n\n private toggleDropdown() {\n this.dropdownOpen = !this.dropdownOpen;\n }\n\n private setGroupedNavItemTabIndex = (tabIndexValue: string) => {\n this.el.querySelectorAll(\"ic-navigation-item\").forEach((navigationItem) => {\n const navItem =\n navigationItem.shadowRoot.querySelector(\"a\") ||\n navigationItem.querySelector(\"a\");\n if (navItem) {\n navItem.setAttribute(\"tabindex\", tabIndexValue);\n }\n });\n };\n\n private toggleGroupedLinkWrapperHeight = (\n wrapper: HTMLElement,\n expanded: boolean\n ) => {\n if (wrapper) {\n if (expanded) {\n wrapper.setAttribute(\n \"style\",\n `--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`\n );\n this.setGroupedNavItemTabIndex(\"0\");\n } else {\n wrapper.setAttribute(\"style\", `--navigation-child-items-height: 0`);\n this.setGroupedNavItemTabIndex(\"-1\");\n }\n }\n };\n\n private toggleExpanded = () => {\n this.expanded = !this.expanded;\n const linkWrapper = this.el.shadowRoot.querySelector(\n \".grouped-links-wrapper\"\n ) as HTMLElement;\n\n this.toggleGroupedLinkWrapperHeight(linkWrapper, this.expanded);\n };\n\n private showDropdown() {\n if (!this.dropdownOpen) {\n this.toggleDropdown();\n }\n }\n\n private hideDropdown() {\n if (this.dropdownOpen) {\n this.toggleDropdown();\n }\n }\n\n private handleClick = (ev: MouseEvent) => {\n if (this.navigationType === \"top\" && ev.detail) {\n this.toggleDropdown();\n } else {\n this.toggleExpanded();\n }\n };\n\n private handleBlur = (ev: FocusEvent) => {\n const target = ev.relatedTarget as HTMLElement;\n if (!this.el.contains(target)) {\n this.hideDropdown();\n }\n };\n\n private handleTopNavKeydown = (ev: KeyboardEvent) => {\n if (!this.inTopNavSideMenu && ev.key === \"Escape\") {\n this.hideDropdown();\n this.el.blur();\n } else if (ev.key === \" \" || ev.key === \"Enter\") {\n this.toggleDropdown();\n }\n };\n\n private handleKeydown = (ev: KeyboardEvent) => {\n if (ev.key === \"Enter\" || ev.key === \"Space\") {\n switch (this.navigationType) {\n case \"top\":\n this.handleTopNavKeydown(ev as KeyboardEvent);\n break;\n case \"side\":\n this.toggleExpanded();\n ev.preventDefault();\n break;\n default:\n this.toggleExpanded();\n break;\n }\n }\n };\n\n private handleMouseLeave = (ev: MouseEvent) => {\n const target = ev.relatedTarget as HTMLElement;\n if (\n !this.el.contains(target) &&\n target !== this.dropdown &&\n document.activeElement !== this.el &&\n !this.el.contains(document.activeElement)\n ) {\n this.hideDropdown();\n }\n };\n\n private triggerShowDropdown = () => {\n this.showDropdown();\n };\n\n private renderDropdownGroupedLinks = (): HTMLDivElement => (\n <div\n class={{\n [\"navigation-group-dropdown\"]: !this.inTopNavSideMenu,\n [\"navigation-group-dropdown-side-menu\"]: this.inTopNavSideMenu,\n [\"selected\"]: this.dropdownOpen && !this.inTopNavSideMenu,\n }}\n onMouseLeave={!this.inTopNavSideMenu ? this.handleMouseLeave : null}\n ref={(el) => (this.dropdown = el)}\n >\n <nav\n class={{\n [\"navigation-group-dropdown-items\"]: !this.inTopNavSideMenu,\n }}\n >\n <ul>\n <slot></slot>\n </ul>\n </nav>\n </div>\n );\n\n private renderGroupedLinks = (): HTMLDivElement => (\n <ul class=\"grouped-links-wrapper\">\n <slot></slot>\n </ul>\n );\n\n /**\n * Gets the total height of navigation links to improve\n * smoothness of expand/collapse animations\n */\n private getNavigationChildItemsHeight = (): string => {\n const navigationItemLength =\n this.el.querySelectorAll(\"ic-navigation-item\").length || 0;\n const navigationItem = this.el.querySelector(\"ic-navigation-item\") || null;\n\n if (\n this.navigationType === \"side\" &&\n !!navigationItemLength &&\n navigationItem\n ) {\n return `${\n parseInt(getComputedStyle(navigationItem).height) * navigationItemLength\n }px`;\n }\n\n return \"auto\";\n };\n\n private setInitialGroupedLinksWrapperHeight = () => {\n const linkWrapper = this.el.shadowRoot.querySelector(\n \".grouped-links-wrapper\"\n ) as HTMLElement;\n\n if (linkWrapper && this.expanded) {\n linkWrapper.setAttribute(\n \"style\",\n `--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`\n );\n }\n };\n\n private renderNavigationItems = (): HTMLDivElement | null => {\n if (this.dropdownOpen || (this.inTopNavSideMenu && !this.expandable)) {\n return this.renderDropdownGroupedLinks();\n }\n\n if (this.navigationType !== \"top\") {\n return this.renderGroupedLinks();\n }\n\n return null;\n };\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n const navParentDetails = getNavItemParentDetails(this.el);\n this.navigationType = navParentDetails.navType;\n this.parentEl = navParentDetails.parent;\n if (this.deviceSize <= DEVICE_SIZES.L && this.navigationType === \"top\") {\n this.inTopNavSideMenu = true;\n }\n\n if (this.navigationType === \"side\") {\n this.parentEl.addEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.addEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n }\n\n componentDidLoad(): void {\n /**\n * debounce is required as the incorrect height was retrieved instantly after\n * componentDidLoad is invoked.\n */\n setTimeout(\n () => this.setInitialGroupedLinksWrapperHeight(),\n this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS\n );\n }\n\n disconnectedCallback(): void {\n if (this.navigationType === \"side\") {\n this.parentEl.removeEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.removeEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n }\n\n render() {\n const { label, dropdownOpen, inTopNavSideMenu, expandable } = this;\n\n const NavigationGroupElement =\n !inTopNavSideMenu || expandable ? \"button\" : \"div\";\n\n return (\n <Host\n class={{\n [\"in-side-menu\"]: inTopNavSideMenu,\n expanded: this.expanded,\n collapsed: !this.expanded,\n [\"navigation-group-side-nav\"]: this.navigationType === \"side\",\n }}\n role=\"listitem\"\n >\n <NavigationGroupElement\n tabindex={inTopNavSideMenu && !expandable ? \"-1\" : \"0\"}\n onMouseOver={\n !inTopNavSideMenu && this.navigationType === \"top\"\n ? this.triggerShowDropdown\n : null\n }\n onMouseLeave={this.navigationType === \"top\" && this.handleMouseLeave}\n onBlur={this.handleBlur}\n onClick={expandable ? this.handleClick : null}\n onKeyDown={this.handleKeydown}\n class={{\n [\"navigation-group\"]: true,\n [this.focusStyle]: !inTopNavSideMenu,\n [\"navigation-group-side-menu\"]: inTopNavSideMenu && !expandable,\n [\"navigation-group-side-menu-collapsed\"]:\n inTopNavSideMenu && expandable && !dropdownOpen,\n [\"navigation-group-side-menu-expanded\"]:\n inTopNavSideMenu && expandable && dropdownOpen,\n [\"selected\"]: dropdownOpen && !inTopNavSideMenu,\n }}\n ref={(el) => (this.groupEl = el)}\n aria-expanded={dropdownOpen || this.expanded ? \"true\" : \"false\"}\n aria-haspopup={\n !inTopNavSideMenu && this.navigationType === \"top\"\n ? \"true\"\n : \"false\"\n }\n >\n <ic-typography\n variant={this.navigationType === \"side\" ? \"caption\" : \"label\"}\n >\n {label}\n </ic-typography>\n {this.navigationType === \"side\" && expandable && (\n <div\n class={{\n \"chevron-toggle-icon-wrapper\": true,\n \"chevron-toggle-icon-closed\": this.expanded,\n }}\n innerHTML={chevronIcon}\n ></div>\n )}\n </NavigationGroupElement>\n {this.renderNavigationItems()}\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,H as i}from"./p-f9370be6.js";const o='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:fixed;left:0;bottom:0;width:100%;height:var(--ic-space-lg);z-index:var(--ic-z-index-overlay)}:host(.inline){position:static;left:auto;bottom:auto}.classification-banner{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:var(--ic-space-xxxs) var(--ic-space-md)}.default{background-color:var(--ic-classification-not-set);color:var(--ic-classification-not-set-foreground)}.official,.official-sensitive{background-color:var(--ic-classification-official);color:var(--ic-classification-official-foreground)}.secret{background-color:var(--ic-classification-secret);color:var(--ic-classification-secret-foreground)}.top-secret{background-color:var(--ic-classification-top-secret);color:var(--ic-classification-top-secret-foreground)}.offscreen{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}@media (forced-colors: active){.classification-banner{border:var(--ic-hc-border)}}';const n={default:"protective marking not set",official:"official","official-sensitive":"official sensitive",secret:"secret","top-secret":"top secret"};const a=class{constructor(t){e(this,t);this.additionalSelectors="";this.classification="default";this.country="uk";this.inline=false;this.upTo=false}render(){const{classification:e,inline:o,country:a,upTo:r,additionalSelectors:s}=this;return t(i,{class:{["inline"]:o}},t("banner",{"aria-label":"Protective marking",class:{["classification-banner"]:true,[`${e}`]:e},role:"contentinfo"},e!=="default"?t("span",{class:"offscreen"},"The protective marking of this page is:"," "):null,t("ic-typography",{variant:"caption-uppercase"},e==="default"?n[e]:`${r?"up to":""} \n ${a!==""?a:""} \n ${n[e]} \n ${s!==""?s:""}`)))}};a.style=o;export{a as ic_classification_banner};
2
- //# sourceMappingURL=p-0118400b.entry.js.map
1
+ import{r as e,h as t,H as i}from"./p-f9370be6.js";const o='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:fixed;left:0;bottom:0;width:100%;height:var(--ic-space-lg);z-index:var(--ic-z-index-overlay)}:host(.inline){position:static;left:auto;bottom:auto}.classification-banner{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:var(--ic-space-xxxs) var(--ic-space-md)}.default{background-color:var(--ic-classification-not-set);color:var(--ic-classification-not-set-foreground)}.official,.official-sensitive{background-color:var(--ic-classification-official);color:var(--ic-classification-official-foreground)}.secret{background-color:var(--ic-classification-secret);color:var(--ic-classification-secret-foreground)}.top-secret{background-color:var(--ic-classification-top-secret);color:var(--ic-classification-top-secret-foreground)}.offscreen{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}@media (forced-colors: active){.classification-banner{border:var(--ic-hc-border)}}';const n={default:"protective marking not set",official:"official","official-sensitive":"official sensitive",secret:"secret","top-secret":"top secret"};const a=class{constructor(t){e(this,t);this.additionalSelectors="";this.classification="default";this.country="uk";this.inline=false;this.upTo=false}render(){const{classification:e,inline:o,country:a,upTo:r,additionalSelectors:s}=this;return t(i,{class:{["inline"]:o}},t("banner",{"aria-label":"Protective marking",class:{["classification-banner"]:true,[`${e}`]:e}},e!=="default"?t("span",{class:"offscreen"},"The protective marking of this page is:"," "):null,t("ic-typography",{variant:"caption-uppercase"},e==="default"?n[e]:`${r?"up to":""} \n ${a!==""?a:""} \n ${n[e]} \n ${s!==""?s:""}`)))}};a.style=o;export{a as ic_classification_banner};
2
+ //# sourceMappingURL=p-9b4022d7.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/ic-classification-banner/ic-classification-banner.css?tag=ic-classification-banner&encapsulation=shadow","src/components/ic-classification-banner/ic-classification-banner.tsx"],"names":["icClassificationBannerCss","classificationText","default","official","official-sensitive","secret","top-secret","ClassificationBanner","[object Object]","classification","inline","country","upTo","additionalSelectors","this","h","Host","class","aria-label","variant"],"mappings":"kDAAA,MAAMA,EAA4B,wxGCGlC,MAAMC,EAAqB,CACzBC,QAAS,6BACTC,SAAU,WACVC,qBAAsB,qBACtBC,OAAQ,SACRC,aAAc,oBAQHC,EAAoB,wDAIQ,uBAIS,uBAIrB,iBAIA,gBAIF,MAEzBC,SACE,MAAMC,eAAEA,EAAcC,OAAEA,EAAMC,QAAEA,EAAOC,KAAEA,EAAIC,oBAAEA,GAAwBC,KAEvE,OACEC,EAACC,EAAI,CAACC,MAAO,CAAET,CAAC,UAAWE,IACzBK,EAAA,SAAA,CAAAG,aACa,qBACXD,MAAO,CACLT,CAAC,yBAA0B,KAC3BA,CAAC,GAAGC,KAAmBA,IAGxBA,IAAmB,UAClBM,EAAA,OAAA,CAAME,MAAM,aAAW,0CACmB,KAExC,KACJF,EAAA,gBAAA,CAAeI,QAAQ,qBACpBV,IAAmB,UAChBR,EAAmBQ,GACnB,GAAGG,EAAO,QAAU,uBACnBD,IAAY,GAAKA,EAAU,uBAC3BV,EAAmBQ,uBACnBI,IAAwB,GAAKA,EAAsB","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n position: fixed;\n left: 0;\n bottom: 0;\n width: 100%;\n height: var(--ic-space-lg);\n z-index: var(--ic-z-index-overlay);\n}\n\n:host(.inline) {\n position: static;\n left: auto;\n bottom: auto;\n}\n\n.classification-banner {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: var(--ic-space-xxxs) var(--ic-space-md);\n}\n\n.default {\n background-color: var(--ic-classification-not-set);\n color: var(--ic-classification-not-set-foreground);\n}\n\n.official,\n.official-sensitive {\n background-color: var(--ic-classification-official);\n color: var(--ic-classification-official-foreground);\n}\n\n.secret {\n background-color: var(--ic-classification-secret);\n color: var(--ic-classification-secret-foreground);\n}\n\n.top-secret {\n background-color: var(--ic-classification-top-secret);\n color: var(--ic-classification-top-secret-foreground);\n}\n\n.offscreen {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n\n@media (forced-colors: active) {\n .classification-banner {\n border: var(--ic-hc-border);\n }\n}\n","import { Component, Prop, h, Host } from \"@stencil/core\";\nimport { IcProtectiveMarkings } from \"./ic-classification-banner.types\";\n\nconst classificationText = {\n default: \"protective marking not set\",\n official: \"official\",\n \"official-sensitive\": \"official sensitive\",\n secret: \"secret\",\n \"top-secret\": \"top secret\",\n};\n\n@Component({\n tag: \"ic-classification-banner\",\n styleUrl: \"ic-classification-banner.css\",\n shadow: true,\n})\nexport class ClassificationBanner {\n /**\n * The additional information that will be displayed after the classification.\n */\n @Prop() additionalSelectors?: string = \"\";\n /**\n * The classification level to be displayed - also determines the banner and text colour.\n */\n @Prop() classification?: IcProtectiveMarkings = \"default\";\n /**\n * The optional text that will be displayed before classification to specify relevant country/countries.\n */\n @Prop() country?: string = \"uk\";\n /**\n * If `true`, the banner will appear inline with the page, instead of sticking to the bottom of the page.\n */\n @Prop() inline?: boolean = false;\n /**\n * If `true`, \"Up to\" will be displayed before the classification and country.\n */\n @Prop() upTo?: boolean = false;\n\n render() {\n const { classification, inline, country, upTo, additionalSelectors } = this;\n\n return (\n <Host class={{ [\"inline\"]: inline }}>\n <banner\n aria-label=\"Protective marking\"\n class={{\n [\"classification-banner\"]: true,\n [`${classification}`]: classification,\n }}\n >\n {classification !== \"default\" ? (\n <span class=\"offscreen\">\n The protective marking of this page is:{\" \"}\n </span>\n ) : null}\n <ic-typography variant=\"caption-uppercase\">\n {classification === \"default\"\n ? classificationText[classification]\n : `${upTo ? \"up to\" : \"\"} \n ${country !== \"\" ? country : \"\"} \n ${classificationText[classification]} \n ${additionalSelectors !== \"\" ? additionalSelectors : \"\"}`}\n </ic-typography>\n </banner>\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as s,g as r}from"./p-f9370be6.js";import{A as l,c as a,a as o}from"./p-23831891.js";import{I as e}from"./p-6f57b13c.js";const c=`<svg width="8" height="10" viewBox="0 0 8 10" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.0876 1.175L5.9126 0L0.912598 5L5.9126 10L7.0876 8.825L3.27093 5L7.0876 1.175Z"/>\n</svg>`;const n=`<svg width="8" height="10" viewBox="0 0 8 10" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.0876 0L0.912598 1.175L4.72926 5L0.912598 8.825L2.0876 10L7.0876 5L2.0876 0Z"/>\n</svg>\n`;const h=":host{--border-bottom-color:var(--ic-architectural-300);--splitter-color:var(--ic-architectural-100);--tab-scroll-focus:var(--ic-border-focus);--tab-scroll-fill:var(--ic-action-default);--tab-scroll-disabled-fill:var(--ic-architectural-300);--tab-scroll-hover:var(--ic-action-default-bg-hover);--tab-scroll-active:var(--ic-action-default-bg-active);display:block;margin-bottom:var(--ic-space-md);margin-left:calc(-1 * var(--ic-space-xs))}:host(.light){--splitter-color:var(--ic-architectural-white);--tab-scroll-focus:var(--ic-border-focus-dark);--tab-scroll-fill:var(--ic-action-light);--tab-scroll-disabled-fill:var(--ic-architectural-500);--tab-scroll-hover:var(--ic-action-dark-bg-hover);--tab-scroll-active:var(--ic-action-dark-bg-active)}:host([inline]){margin-bottom:0}.tabs-container{display:flex;flex-direction:row;overflow-y:hidden;overflow-x:scroll;height:100%;align-items:center;padding:var(--ic-space-xs);scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none;margin:calc(-1 * var(--ic-space-xs)) 0}.tabs-container::-webkit-scrollbar{display:none}.ic-tab-group-container{display:flex;align-items:center}:host(.light.ic-tab-group-not-inline){--border-bottom-color:var(--ic-architectural-white)}.scroll-container{display:flex}.scroll-container.hidden{display:none}.scroll-container:first-child{margin-left:var(--ic-space-xs)}.scroll-arrow{display:flex;width:36px;height:36px;margin:var(--ic-space-xxs) var(--ic-space-xxxs);align-items:center;justify-content:center;fill:var(--tab-scroll-fill);cursor:pointer}.scroll-arrow:focus{outline:var(--ic-hc-focus-outline)}.scroll-arrow:hover{background-color:var(--tab-scroll-hover)}.scroll-arrow:active{background-color:var(--tab-scroll-active)}.scroll-container.disabled .scroll-arrow{fill:var(--tab-scroll-disabled-fill);cursor:default}.scroll-container.disabled .scroll-arrow:hover,.scroll-container.disabled .scroll-arrow:active,.scroll-container.disabled .scroll-arrow:focus{background-color:unset;box-shadow:none}.scroll-container.disabled .ic-tooltip-container{display:none !important}.scroll-splitter-left,.scroll-splitter-right{display:flex;height:var(--ic-space-lg);width:1px;margin-top:10px;background-color:var(--splitter-color)}.scroll-splitter-left{margin-left:var(--ic-space-xxxs)}.scroll-splitter-right{margin-right:var(--ic-space-xxxs)}.scroll-container.disabled .scroll-splitter-left,.scroll-container.disabled .scroll-splitter-right{display:none}.ic-tab-splitter{display:block;background-color:var(--border-bottom-color);height:1px;right:0;left:0;margin-left:var(--ic-space-xs)}.ic-tab-splitter.hidden{height:0}";const d=200;const b=class{constructor(i){t(this,i);this.buttonStateSet=false;this.resizeObserverCallback=()=>{if(this.tabGroupEl===null||this.tabGroupEl===undefined){this.tabGroupEl=this.host.shadowRoot.querySelector(".tabs-container")}this.tabOverflow=l(this.tabGroupEl);if(this.tabOverflow){this.lastTabVisible=this.tabGroupEl.offsetWidth+this.tabGroupEl.scrollLeft>=this.tabGroupEl.scrollWidth}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.splitterEl)};this.scrollLeft=()=>{this.scrollTabIntoView(this.getCurrentLeftTab()-1)};this.scrollRight=()=>{this.scrollTabIntoView(this.getCurrentLeftTab()+1)};this.longScrollRight=()=>{this.scrollRight();this.scrollDelay=window.setTimeout(this.longScrollRight,d)};this.longScrollLeft=()=>{this.scrollLeft();this.scrollDelay=window.setTimeout(this.longScrollLeft,d)};this.leftArrowMouseDownHandler=()=>{this.scrollDelay=window.setTimeout(this.longScrollLeft,d)};this.rightArrowMouseDownHandler=()=>{this.scrollDelay=window.setTimeout(this.longScrollRight,d)};this.arrowMouseUpHandler=()=>{window.clearTimeout(this.scrollDelay)};this.getCurrentLeftTab=()=>{const t=this.tabOffsets.findIndex((t=>t>this.tabGroupEl.scrollLeft));return t<0?0:t};this.scrollHandler=()=>{window.clearTimeout(this.isScrolling);this.isScrolling=window.setTimeout(this.scrollStopped,50)};this.scrollStopped=()=>{if(this.buttonStateSet===false){this.firstTabVisible=this.tabGroupEl.scrollLeft===0;this.lastTabVisible=this.tabGroupEl.offsetWidth+this.tabGroupEl.scrollLeft>=this.tabGroupEl.scrollWidth}this.buttonStateSet=false};this.contextId="default";this.inline=false;this.label=undefined;this.appearance="dark";this.firstTabVisible=true;this.lastTabVisible=false;this.tabOverflow=false}async scrollTabIntoView(t){this.firstTabVisible=t<=0;const i=t<=0?0:this.tabOffsets[t-1];this.lastTabVisible=this.tabGroupEl.offsetWidth+i>=this.tabGroupEl.scrollWidth;this.buttonStateSet=true;this.tabGroupEl.scrollLeft=i}tabFocusHandler(t){if(this.tabOverflow){this.scrollTabIntoView(t.detail.position)}}componentDidLoad(){this.tabs=Array.from(this.host.querySelectorAll("ic-tab"));let t=0;this.tabOffsets=this.tabs.map((i=>{t+=i.offsetWidth;return t}));a(this.runResizeObserver);o([{prop:this.label,propName:"label"}],"Tab List")}disconnectedCallback(){this.resizeObserver.disconnect()}render(){const{inline:t,appearance:r,label:l,firstTabVisible:a,lastTabVisible:o,tabOverflow:h}=this;return i(s,{role:"tablist","aria-label":l,class:{["light"]:r===e.Light,["ic-tab-group-not-inline"]:!t}},i("div",{class:"ic-tab-group-container"},this.tabOverflow&&i("div",{"aria-hidden":"true",id:"scroll-container-left",class:{["scroll-container"]:true,["hidden"]:!h,["disabled"]:a}},i("ic-tooltip",{placement:"bottom-start",label:"Scroll left",target:"left-arrow"},i("span",{id:"left-arrow",class:"scroll-arrow",innerHTML:c,onClick:this.scrollLeft,onMouseDown:this.leftArrowMouseDownHandler,onMouseUp:this.arrowMouseUpHandler})),i("span",{class:"scroll-splitter-left"})),i("div",{class:"tabs-container",ref:t=>this.tabGroupEl=t,onScroll:this.scrollHandler},i("slot",null)),this.tabOverflow&&i("div",{"aria-hidden":"true",id:"scroll-container-right",class:{["scroll-container"]:true,["hidden"]:!h,["disabled"]:o}},i("span",{class:"scroll-splitter-right"}),i("ic-tooltip",{placement:"bottom-start",label:"Scroll right",target:"right-arrow"},i("span",{id:"right-arrow",class:"scroll-arrow",innerHTML:n,onClick:this.scrollRight,onMouseDown:this.rightArrowMouseDownHandler,onMouseUp:this.arrowMouseUpHandler})))),i("div",{"aria-hidden":"true",class:{["ic-tab-splitter"]:true,["hidden"]:t},ref:t=>this.splitterEl=t}))}get host(){return r(this)}};b.style=h;export{b as ic_tab_group};
2
- //# sourceMappingURL=p-5e261268.entry.js.map
1
+ import{r as t,h as i,H as s,g as r}from"./p-f9370be6.js";import{z as l,c as a,a as o}from"./p-a8ac8f72.js";import{I as e}from"./p-6f57b13c.js";const c=`<svg width="8" height="10" viewBox="0 0 8 10" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.0876 1.175L5.9126 0L0.912598 5L5.9126 10L7.0876 8.825L3.27093 5L7.0876 1.175Z"/>\n</svg>`;const n=`<svg width="8" height="10" viewBox="0 0 8 10" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.0876 0L0.912598 1.175L4.72926 5L0.912598 8.825L2.0876 10L7.0876 5L2.0876 0Z"/>\n</svg>\n`;const h=":host{--border-bottom-color:var(--ic-architectural-300);--splitter-color:var(--ic-architectural-100);--tab-scroll-focus:var(--ic-border-focus);--tab-scroll-fill:var(--ic-action-default);--tab-scroll-disabled-fill:var(--ic-architectural-300);--tab-scroll-hover:var(--ic-action-default-bg-hover);--tab-scroll-active:var(--ic-action-default-bg-active);display:block;margin-bottom:var(--ic-space-md);margin-left:calc(-1 * var(--ic-space-xs))}:host(.light){--splitter-color:var(--ic-architectural-white);--tab-scroll-focus:var(--ic-border-focus-dark);--tab-scroll-fill:var(--ic-action-light);--tab-scroll-disabled-fill:var(--ic-architectural-500);--tab-scroll-hover:var(--ic-action-dark-bg-hover);--tab-scroll-active:var(--ic-action-dark-bg-active)}:host([inline]){margin-bottom:0}.tabs-container{display:flex;flex-direction:row;overflow-y:hidden;overflow-x:scroll;height:100%;align-items:center;padding:var(--ic-space-xs);scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none;margin:calc(-1 * var(--ic-space-xs)) 0}.tabs-container::-webkit-scrollbar{display:none}.ic-tab-group-container{display:flex;align-items:center}:host(.light.ic-tab-group-not-inline){--border-bottom-color:var(--ic-architectural-white)}.scroll-container{display:flex}.scroll-container.hidden{display:none}.scroll-container:first-child{margin-left:var(--ic-space-xs)}.scroll-arrow{display:flex;width:36px;height:36px;margin:var(--ic-space-xxs) var(--ic-space-xxxs);align-items:center;justify-content:center;fill:var(--tab-scroll-fill);cursor:pointer}.scroll-arrow:focus{outline:var(--ic-hc-focus-outline)}.scroll-arrow:hover{background-color:var(--tab-scroll-hover)}.scroll-arrow:active{background-color:var(--tab-scroll-active)}.scroll-container.disabled .scroll-arrow{fill:var(--tab-scroll-disabled-fill);cursor:default}.scroll-container.disabled .scroll-arrow:hover,.scroll-container.disabled .scroll-arrow:active,.scroll-container.disabled .scroll-arrow:focus{background-color:unset;box-shadow:none}.scroll-container.disabled .ic-tooltip-container{display:none !important}.scroll-splitter-left,.scroll-splitter-right{display:flex;height:var(--ic-space-lg);width:1px;margin-top:10px;background-color:var(--splitter-color)}.scroll-splitter-left{margin-left:var(--ic-space-xxxs)}.scroll-splitter-right{margin-right:var(--ic-space-xxxs)}.scroll-container.disabled .scroll-splitter-left,.scroll-container.disabled .scroll-splitter-right{display:none}.ic-tab-splitter{display:block;background-color:var(--border-bottom-color);height:1px;right:0;left:0;margin-left:var(--ic-space-xs)}.ic-tab-splitter.hidden{height:0}";const d=200;const b=class{constructor(i){t(this,i);this.buttonStateSet=false;this.resizeObserverCallback=()=>{if(this.tabGroupEl===null||this.tabGroupEl===undefined){this.tabGroupEl=this.host.shadowRoot.querySelector(".tabs-container")}this.tabOverflow=l(this.tabGroupEl);if(this.tabOverflow){this.lastTabVisible=this.tabGroupEl.offsetWidth+this.tabGroupEl.scrollLeft>=this.tabGroupEl.scrollWidth}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.splitterEl)};this.scrollLeft=()=>{this.scrollTabIntoView(this.getCurrentLeftTab()-1)};this.scrollRight=()=>{this.scrollTabIntoView(this.getCurrentLeftTab()+1)};this.longScrollRight=()=>{this.scrollRight();this.scrollDelay=window.setTimeout(this.longScrollRight,d)};this.longScrollLeft=()=>{this.scrollLeft();this.scrollDelay=window.setTimeout(this.longScrollLeft,d)};this.leftArrowMouseDownHandler=()=>{this.scrollDelay=window.setTimeout(this.longScrollLeft,d)};this.rightArrowMouseDownHandler=()=>{this.scrollDelay=window.setTimeout(this.longScrollRight,d)};this.arrowMouseUpHandler=()=>{window.clearTimeout(this.scrollDelay)};this.getCurrentLeftTab=()=>{const t=this.tabOffsets.findIndex((t=>t>this.tabGroupEl.scrollLeft));return t<0?0:t};this.scrollHandler=()=>{window.clearTimeout(this.isScrolling);this.isScrolling=window.setTimeout(this.scrollStopped,50)};this.scrollStopped=()=>{if(this.buttonStateSet===false){this.firstTabVisible=this.tabGroupEl.scrollLeft===0;this.lastTabVisible=this.tabGroupEl.offsetWidth+this.tabGroupEl.scrollLeft>=this.tabGroupEl.scrollWidth}this.buttonStateSet=false};this.contextId="default";this.inline=false;this.label=undefined;this.appearance="dark";this.firstTabVisible=true;this.lastTabVisible=false;this.tabOverflow=false}async scrollTabIntoView(t){this.firstTabVisible=t<=0;const i=t<=0?0:this.tabOffsets[t-1];this.lastTabVisible=this.tabGroupEl.offsetWidth+i>=this.tabGroupEl.scrollWidth;this.buttonStateSet=true;this.tabGroupEl.scrollLeft=i}tabFocusHandler(t){if(this.tabOverflow){this.scrollTabIntoView(t.detail.position)}}componentDidLoad(){this.tabs=Array.from(this.host.querySelectorAll("ic-tab"));let t=0;this.tabOffsets=this.tabs.map((i=>{t+=i.offsetWidth;return t}));a(this.runResizeObserver);o([{prop:this.label,propName:"label"}],"Tab List")}disconnectedCallback(){this.resizeObserver.disconnect()}render(){const{inline:t,appearance:r,label:l,firstTabVisible:a,lastTabVisible:o,tabOverflow:h}=this;return i(s,{role:"tablist","aria-label":l,class:{["light"]:r===e.Light,["ic-tab-group-not-inline"]:!t}},i("div",{class:"ic-tab-group-container"},this.tabOverflow&&i("div",{"aria-hidden":"true",id:"scroll-container-left",class:{["scroll-container"]:true,["hidden"]:!h,["disabled"]:a}},i("ic-tooltip",{placement:"bottom-start",label:"Scroll left",target:"left-arrow"},i("span",{id:"left-arrow",class:"scroll-arrow",innerHTML:c,onClick:this.scrollLeft,onMouseDown:this.leftArrowMouseDownHandler,onMouseUp:this.arrowMouseUpHandler})),i("span",{class:"scroll-splitter-left"})),i("div",{class:"tabs-container",ref:t=>this.tabGroupEl=t,onScroll:this.scrollHandler},i("slot",null)),this.tabOverflow&&i("div",{"aria-hidden":"true",id:"scroll-container-right",class:{["scroll-container"]:true,["hidden"]:!h,["disabled"]:o}},i("span",{class:"scroll-splitter-right"}),i("ic-tooltip",{placement:"bottom-start",label:"Scroll right",target:"right-arrow"},i("span",{id:"right-arrow",class:"scroll-arrow",innerHTML:n,onClick:this.scrollRight,onMouseDown:this.rightArrowMouseDownHandler,onMouseUp:this.arrowMouseUpHandler})))),i("div",{"aria-hidden":"true",class:{["ic-tab-splitter"]:true,["hidden"]:t},ref:t=>this.splitterEl=t}))}get host(){return r(this)}};b.style=h;export{b as ic_tab_group};
2
+ //# sourceMappingURL=p-9fbceeb2.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-skeleton/ic-skeleton.css?tag=ic-skeleton&encapsulation=shadow","src/components/ic-skeleton/ic-skeleton.tsx"],"names":["icSkeletonCss","Skeleton","[object Object]","this","el","style","height","width","default","heightOnly","widthOnly","variant","light","hasChild","firstElementChild","defaultSkeletonStyle","heightSetStyle","widthSetStyle","h","Host","class","aria-disabled"],"mappings":"yDAAA,MAAMA,EAAgB,uqGCQTC,EAAQ,4CAKoB,uBAIb,wGAU1BC,oBACE,GAAIC,KAAKC,GAAGC,MAAMC,SAAW,IAAMH,KAAKC,GAAGC,MAAME,QAAU,GAAI,CAC7DJ,KAAKK,QAAU,UACV,KAAML,KAAKC,GAAGC,MAAMC,SAAW,KAAOH,KAAKC,GAAGC,MAAME,QAAU,GAAI,CACvEJ,KAAKM,WAAa,UACb,KAAMN,KAAKC,GAAGC,MAAME,QAAU,KAAOJ,KAAKC,GAAGC,MAAMC,SAAW,GAAI,CACvEH,KAAKO,UAAY,MAIrBR,SACE,MAAMS,QAAEA,EAAOC,MAAEA,GAAUT,KAE3BA,KAAKU,WAAaV,KAAKC,GAAGU,kBAE1B,MAAMC,EAAuB,CAC3BT,OAAQK,GAAW,OAAS,MAAQA,GAAW,SAAW,OAAS,OACnEJ,MAAOI,GAAW,SAAW,OAAS,SAGxC,MAAMK,EAAiB,CACrBV,OAAQH,KAAKC,GAAGC,MAAMC,OACtBC,MAAOI,GAAW,SAAW,OAAS,SAGxC,MAAMM,EAAgB,CACpBX,OAAQK,GAAW,OAAS,MAAQA,GAAW,SAAW,OAAS,OACnEJ,MAAOJ,KAAKC,GAAGC,MAAME,OAGvB,OACEW,EAACC,EAAI,CACHC,MAAO,CACLlB,CAAC,YAAa,KACdA,CAAC,UAAWS,GAAW,SACvBT,CAAC,SAAUU,GAEbP,OACIF,KAAKU,UAAYV,KAAKK,SAAWO,GAClCZ,KAAKM,YAAcO,GACnBb,KAAKO,WAAaO,EAAcI,gBAErB,QAEdH,EAAA,OAAA","sourcesContent":["@import \"../../global/normalise.css\";\n\n@keyframes loading {\n 0% {\n background-color: var(--ic-architectural-100);\n }\n\n 50% {\n background-color: var(--ic-architectural-200);\n }\n\n 100% {\n background-color: var(--ic-architectural-100);\n }\n}\n\n@keyframes loading-light {\n 0% {\n background-color: var(--ic-architectural-600);\n }\n\n 50% {\n background-color: var(--ic-architectural-400);\n }\n\n 100% {\n background-color: var(--ic-architectural-600);\n }\n}\n\n:host {\n display: inline-block;\n}\n\n:host(.skeleton) {\n background-color: var(--ic-architectural-100);\n border-radius: var(--ic-border-radius);\n animation: loading 1200ms infinite;\n display: inline-block;\n}\n\n:host(.skeleton) > * {\n opacity: 0;\n visibility: hidden;\n}\n\n:host(.circle) {\n border-radius: 50%;\n}\n\n:host(.light) {\n background-color: var(--ic-architectural-600);\n animation: loading-light 1200ms infinite;\n}\n\n@media (forced-colors: active) {\n :host(.skeleton) {\n -ms-high-contrast-adjust: none;\n forced-color-adjust: none;\n background: currentcolor;\n }\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport { IcSkeletonVariants } from \"./ic-skeleton.types\";\n\n@Component({\n tag: \"ic-skeleton\",\n styleUrl: \"ic-skeleton.css\",\n shadow: true,\n})\nexport class Skeleton {\n @Element() el: HTMLIcSkeletonElement;\n /**\n * The variant of the skeleton that will be displayed.\n */\n @Prop() variant?: IcSkeletonVariants = \"rectangle\";\n /**\n * If `true`, the skeleton will be set to the light variant.\n */\n @Prop() light?: boolean = false;\n\n @State() hasChild: boolean;\n\n @State() default: boolean;\n\n @State() heightOnly: boolean;\n\n @State() widthOnly: boolean;\n\n componentWillLoad(): void {\n if (this.el.style.height === \"\" && this.el.style.width === \"\") {\n this.default = true;\n } else if (!(this.el.style.height === \"\") && this.el.style.width === \"\") {\n this.heightOnly = true;\n } else if (!(this.el.style.width === \"\") && this.el.style.height === \"\") {\n this.widthOnly = true;\n }\n }\n\n render() {\n const { variant, light } = this;\n\n this.hasChild = !!this.el.firstElementChild;\n\n const defaultSkeletonStyle = {\n height: variant == \"text\" ? \"1em\" : variant == \"circle\" ? \"25px\" : \"93px\",\n width: variant == \"circle\" ? \"25px\" : \"260px\",\n };\n\n const heightSetStyle = {\n height: this.el.style.height,\n width: variant == \"circle\" ? \"25px\" : \"260px\",\n };\n\n const widthSetStyle = {\n height: variant == \"text\" ? \"1em\" : variant == \"circle\" ? \"25px\" : \"93px\",\n width: this.el.style.width,\n };\n\n return (\n <Host\n class={{\n [\"skeleton\"]: true,\n [\"circle\"]: variant == \"circle\",\n [\"light\"]: light,\n }}\n style={\n (!this.hasChild && this.default && defaultSkeletonStyle) ||\n (this.heightOnly && heightSetStyle) ||\n (this.widthOnly && widthSetStyle)\n }\n aria-disabled=\"true\"\n >\n <slot />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-skeleton/ic-skeleton.css?tag=ic-skeleton&encapsulation=shadow","src/components/ic-skeleton/ic-skeleton.tsx"],"names":["icSkeletonCss","Skeleton","[object Object]","this","el","style","height","width","default","heightOnly","widthOnly","variant","light","hasChild","firstElementChild","defaultSkeletonStyle","heightSetStyle","widthSetStyle","h","Host","class","aria-disabled"],"mappings":"yDAAA,MAAMA,EAAgB,uqGCQTC,EAAQ,4CAKoB,uBAIb,wGAU1BC,oBACE,GAAIC,KAAKC,GAAGC,MAAMC,SAAW,IAAMH,KAAKC,GAAGC,MAAME,QAAU,GAAI,CAC7DJ,KAAKK,QAAU,UACV,KAAML,KAAKC,GAAGC,MAAMC,SAAW,KAAOH,KAAKC,GAAGC,MAAME,QAAU,GAAI,CACvEJ,KAAKM,WAAa,UACb,KAAMN,KAAKC,GAAGC,MAAME,QAAU,KAAOJ,KAAKC,GAAGC,MAAMC,SAAW,GAAI,CACvEH,KAAKO,UAAY,MAIrBR,SACE,MAAMS,QAAEA,EAAOC,MAAEA,GAAUT,KAE3BA,KAAKU,WAAaV,KAAKC,GAAGU,kBAE1B,MAAMC,EAAuB,CAC3BT,OAAQK,GAAW,OAAS,MAAQA,GAAW,SAAW,OAAS,OACnEJ,MAAOI,GAAW,SAAW,OAAS,SAGxC,MAAMK,EAAiB,CACrBV,OAAQH,KAAKC,GAAGC,MAAMC,OACtBC,MAAOI,GAAW,SAAW,OAAS,SAGxC,MAAMM,EAAgB,CACpBX,OAAQK,GAAW,OAAS,MAAQA,GAAW,SAAW,OAAS,OACnEJ,MAAOJ,KAAKC,GAAGC,MAAME,OAGvB,OACEW,EAACC,EAAI,CACHC,MAAO,CACLlB,CAAC,YAAa,KACdA,CAAC,UAAWS,GAAW,SACvBT,CAAC,SAAUU,GAEbP,OACIF,KAAKU,UAAYV,KAAKK,SAAWO,GAClCZ,KAAKM,YAAcO,GACnBb,KAAKO,WAAaO,EAAcI,gBAErB,QAEdH,EAAA,OAAA","sourcesContent":["@import \"../../global/normalize.css\";\n\n@keyframes loading {\n 0% {\n background-color: var(--ic-architectural-100);\n }\n\n 50% {\n background-color: var(--ic-architectural-200);\n }\n\n 100% {\n background-color: var(--ic-architectural-100);\n }\n}\n\n@keyframes loading-light {\n 0% {\n background-color: var(--ic-architectural-600);\n }\n\n 50% {\n background-color: var(--ic-architectural-400);\n }\n\n 100% {\n background-color: var(--ic-architectural-600);\n }\n}\n\n:host {\n display: inline-block;\n}\n\n:host(.skeleton) {\n background-color: var(--ic-architectural-100);\n border-radius: var(--ic-border-radius);\n animation: loading 1200ms infinite;\n display: inline-block;\n}\n\n:host(.skeleton) > * {\n opacity: 0;\n visibility: hidden;\n}\n\n:host(.circle) {\n border-radius: 50%;\n}\n\n:host(.light) {\n background-color: var(--ic-architectural-600);\n animation: loading-light 1200ms infinite;\n}\n\n@media (forced-colors: active) {\n :host(.skeleton) {\n -ms-high-contrast-adjust: none;\n forced-color-adjust: none;\n background: currentcolor;\n }\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport { IcSkeletonVariants } from \"./ic-skeleton.types\";\n\n@Component({\n tag: \"ic-skeleton\",\n styleUrl: \"ic-skeleton.css\",\n shadow: true,\n})\nexport class Skeleton {\n @Element() el: HTMLIcSkeletonElement;\n /**\n * The variant of the skeleton that will be displayed.\n */\n @Prop() variant?: IcSkeletonVariants = \"rectangle\";\n /**\n * If `true`, the skeleton will be set to the light variant.\n */\n @Prop() light?: boolean = false;\n\n @State() hasChild: boolean;\n\n @State() default: boolean;\n\n @State() heightOnly: boolean;\n\n @State() widthOnly: boolean;\n\n componentWillLoad(): void {\n if (this.el.style.height === \"\" && this.el.style.width === \"\") {\n this.default = true;\n } else if (!(this.el.style.height === \"\") && this.el.style.width === \"\") {\n this.heightOnly = true;\n } else if (!(this.el.style.width === \"\") && this.el.style.height === \"\") {\n this.widthOnly = true;\n }\n }\n\n render() {\n const { variant, light } = this;\n\n this.hasChild = !!this.el.firstElementChild;\n\n const defaultSkeletonStyle = {\n height: variant == \"text\" ? \"1em\" : variant == \"circle\" ? \"25px\" : \"93px\",\n width: variant == \"circle\" ? \"25px\" : \"260px\",\n };\n\n const heightSetStyle = {\n height: this.el.style.height,\n width: variant == \"circle\" ? \"25px\" : \"260px\",\n };\n\n const widthSetStyle = {\n height: variant == \"text\" ? \"1em\" : variant == \"circle\" ? \"25px\" : \"93px\",\n width: this.el.style.width,\n };\n\n return (\n <Host\n class={{\n [\"skeleton\"]: true,\n [\"circle\"]: variant == \"circle\",\n [\"light\"]: light,\n }}\n style={\n (!this.hasChild && this.default && defaultSkeletonStyle) ||\n (this.heightOnly && heightSetStyle) ||\n (this.widthOnly && widthSetStyle)\n }\n aria-disabled=\"true\"\n >\n <slot />\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,H as s,g as o}from"./p-f9370be6.js";import{a as n,e as r,j as a}from"./p-23831891.js";import"./p-6f57b13c.js";const l='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}ic-input-label.error{color:var(--ic-status-error)}ic-input-label ic-typography{margin-bottom:var(--ic-space-sm)}';const h=class{constructor(i){t(this,i);this.icChange=e(this,"icChange",7);this.handleKeyDown=t=>{switch(t.key){case"ArrowDown":case"ArrowRight":this.radioOptions[this.getNextItemToSelect(this.selectedChild,true)].selected=true;t.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.radioOptions[this.getNextItemToSelect(this.selectedChild,false)].selected=true;t.preventDefault()}};this.getNextItemToSelect=(t,e)=>{const i=this.radioOptions.length-1;if(t<1){t=0}let s=e?t+1:t-1;if(s<0){s=i}else if(s>i){s=0}if(this.radioOptions[s].disabled){s=this.getNextItemToSelect(s,e)}return s};this.label=undefined;this.name=undefined;this.required=false;this.hideLabel=false;this.disabled=false;this.helperText=undefined;this.small=false;this.validationStatus="";this.validationText="";this.checkedValue="";this.selectedChild=-1}selectHandler(t){this.checkedValue=t.detail.value;this.icChange.emit({value:this.checkedValue});if(this.radioOptions!==undefined){this.radioOptions.forEach(((t,e)=>{t.selected=this.checkedValue===t.value;if(t.selected){this.selectedChild=e}}));this.radioOptions[0].shadowRoot.querySelector("input").tabIndex=this.selectedChild>0?-1:0}}componentDidLoad(){this.radioOptions=Array.from(this.host.querySelectorAll("ic-radio-option"));this.radioOptions.forEach(((t,e)=>{if(!t.selected){t.selected=this.checkedValue===t.value}t.name=this.name;t.groupLabel=this.label;if(t.selected){this.selectedChild=e;this.checkedValue=t.value}}));this.radioOptions[0].shadowRoot.querySelector("input").tabIndex=this.selectedChild>0?-1:0;n([{prop:this.label,propName:"label"},{prop:this.name,propName:"name"}],"Radio Group")}render(){const t=a(this.validationStatus,this.disabled);r(true,this.host,this.name,this.checkedValue,this.disabled);return i(s,{onKeyDown:this.handleKeyDown},i("div",{role:"radiogroup","aria-label":`${this.label}${this.required?", required":""}`},!this.hideLabel&&i("ic-input-label",{class:{[`${this.validationStatus}`]:true},label:this.label,helperText:this.helperText,required:this.required,disabled:this.disabled}),i("slot",null)),i("ic-input-validation",{ariaLiveMode:"polite",status:t?this.validationStatus:"",message:t?this.validationText:""}))}get host(){return o(this)}};h.style=l;export{h as ic_radio_group};
2
- //# sourceMappingURL=p-9cd04875.entry.js.map
1
+ import{r as t,c as e,h as i,H as s,g as o}from"./p-f9370be6.js";import{a as n,e as a,j as r}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const l='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}ic-input-label.error{color:var(--ic-status-error)}ic-input-label ic-typography{margin-bottom:var(--ic-space-sm)}';const h=class{constructor(i){t(this,i);this.icChange=e(this,"icChange",7);this.handleKeyDown=t=>{switch(t.key){case"ArrowDown":case"ArrowRight":this.radioOptions[this.getNextItemToSelect(this.selectedChild,true)].selected=true;t.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.radioOptions[this.getNextItemToSelect(this.selectedChild,false)].selected=true;t.preventDefault()}};this.getNextItemToSelect=(t,e)=>{const i=this.radioOptions.length-1;if(t<1){t=0}let s=e?t+1:t-1;if(s<0){s=i}else if(s>i){s=0}if(this.radioOptions[s].disabled){s=this.getNextItemToSelect(s,e)}return s};this.label=undefined;this.name=undefined;this.required=false;this.hideLabel=false;this.disabled=false;this.helperText=undefined;this.small=false;this.validationStatus="";this.validationText="";this.checkedValue="";this.selectedChild=-1}selectHandler(t){this.checkedValue=t.detail.value;this.icChange.emit({value:this.checkedValue});if(this.radioOptions!==undefined){this.radioOptions.forEach(((t,e)=>{t.selected=this.checkedValue===t.value;if(t.selected){this.selectedChild=e}}));this.radioOptions[0].shadowRoot.querySelector("input").tabIndex=this.selectedChild>0?-1:0}}componentDidLoad(){this.radioOptions=Array.from(this.host.querySelectorAll("ic-radio-option"));this.radioOptions.forEach(((t,e)=>{if(!t.selected){t.selected=this.checkedValue===t.value}t.name=this.name;t.groupLabel=this.label;if(t.selected){this.selectedChild=e;this.checkedValue=t.value}}));this.radioOptions[0].shadowRoot.querySelector("input").tabIndex=this.selectedChild>0?-1:0;n([{prop:this.label,propName:"label"},{prop:this.name,propName:"name"}],"Radio Group")}render(){const t=r(this.validationStatus,this.disabled);a(true,this.host,this.name,this.checkedValue,this.disabled);return i(s,{onKeyDown:this.handleKeyDown},i("div",{role:"radiogroup","aria-label":`${this.label}${this.required?", required":""}`},!this.hideLabel&&i("ic-input-label",{class:{[`${this.validationStatus}`]:true},label:this.label,helperText:this.helperText,required:this.required,disabled:this.disabled}),i("slot",null)),i("ic-input-validation",{ariaLiveMode:"polite",status:t?this.validationStatus:"",message:t?this.validationText:""}))}get host(){return o(this)}};h.style=l;export{h as ic_radio_group};
2
+ //# sourceMappingURL=p-a5948fc3.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-radio-group/ic-radio-group.css?tag=ic-radio-group&encapsulation=shadow","src/components/ic-radio-group/ic-radio-group.tsx"],"names":["icRadioGroupCss","RadioGroup","this","handleKeyDown","event","key","radioOptions","getNextItemToSelect","selectedChild","selected","preventDefault","currentItem","movingDown","numRadios","length","nextItem","disabled","[object Object]","checkedValue","detail","value","icChange","emit","undefined","forEach","radioOption","index","shadowRoot","querySelector","tabIndex","Array","from","host","querySelectorAll","name","groupLabel","label","onComponentRequiredPropUndefined","prop","propName","hadValidationStatus","hasValidationStatus","validationStatus","renderHiddenInput","h","Host","onKeyDown","role","aria-label","required","hideLabel","class","helperText","ariaLiveMode","status","message","validationText"],"mappings":"0IAAA,MAAMA,EAAkB,8+ECwBXC,EAAU,kEA2EbC,KAAAC,cAAiBC,IACvB,OAAQA,EAAMC,KACZ,IAAK,YACL,IAAK,aACHH,KAAKI,aACHJ,KAAKK,oBAAoBL,KAAKM,cAAe,OAC7CC,SAAW,KACbL,EAAMM,iBACN,MACF,IAAK,UACL,IAAK,YACHR,KAAKI,aACHJ,KAAKK,oBAAoBL,KAAKM,cAAe,QAC7CC,SAAW,KACbL,EAAMM,mBAIJR,KAAAK,oBAAsB,CAC5BI,EACAC,KAEA,MAAMC,EAAYX,KAAKI,aAAaQ,OAAS,EAE7C,GAAIH,EAAc,EAAG,CACnBA,EAAc,EAGhB,IAAII,EAAWH,EAAaD,EAAc,EAAIA,EAAc,EAG5D,GAAII,EAAW,EAAG,CAChBA,EAAWF,OACN,GAAIE,EAAWF,EAAW,CAC/BE,EAAW,EAIb,GAAIb,KAAKI,aAAaS,GAAUC,SAAU,CACxCD,EAAWb,KAAKK,oBAAoBQ,EAAUH,GAGhD,OAAOG,0DAnGmB,qBAKC,oBAKD,2CAUH,4BAI8B,uBAItB,qBAID,uBACE,EAQlCE,cAAcb,GACZF,KAAKgB,aAAed,EAAMe,OAAOC,MACjClB,KAAKmB,SAASC,KAAK,CAAEF,MAAOlB,KAAKgB,eAEjC,GAAIhB,KAAKI,eAAiBiB,UAAW,CACnCrB,KAAKI,aAAakB,SAAQ,CAACC,EAAaC,KACtCD,EAAYhB,SAAWP,KAAKgB,eAAiBO,EAAYL,MACzD,GAAIK,EAAYhB,SAAU,CACxBP,KAAKM,cAAgBkB,MAGzBxB,KAAKI,aAAa,GAAGqB,WAAWC,cAAc,SAASC,SACrD3B,KAAKM,cAAgB,GAAK,EAAI,GAiDpCS,mBACEf,KAAKI,aAAewB,MAAMC,KACxB7B,KAAK8B,KAAKC,iBAAiB,oBAG7B/B,KAAKI,aAAakB,SAAQ,CAACC,EAAaC,KACtC,IAAKD,EAAYhB,SAAU,CACzBgB,EAAYhB,SAAWP,KAAKgB,eAAiBO,EAAYL,MAE3DK,EAAYS,KAAOhC,KAAKgC,KACxBT,EAAYU,WAAajC,KAAKkC,MAC9B,GAAIX,EAAYhB,SAAU,CACxBP,KAAKM,cAAgBkB,EACrBxB,KAAKgB,aAAeO,EAAYL,UAGpClB,KAAKI,aAAa,GAAGqB,WAAWC,cAAc,SAASC,SACrD3B,KAAKM,cAAgB,GAAK,EAAI,EAEhC6B,EACE,CACE,CAAEC,KAAMpC,KAAKkC,MAAOG,SAAU,SAC9B,CAAED,KAAMpC,KAAKgC,KAAMK,SAAU,SAE/B,eAIJtB,SACE,MAAMuB,EAAsBC,EAC1BvC,KAAKwC,iBACLxC,KAAKc,UAGP2B,EACE,KACAzC,KAAK8B,KACL9B,KAAKgC,KACLhC,KAAKgB,aACLhB,KAAKc,UAGP,OACE4B,EAACC,EAAI,CAACC,UAAW5C,KAAKC,eACpByC,EAAA,MAAA,CACEG,KAAK,aAAYC,aACL,GAAG9C,KAAKkC,QAAQlC,KAAK+C,SAAW,aAAe,OAEzD/C,KAAKgD,WACLN,EAAA,iBAAA,CACEO,MAAO,CAAElC,CAAC,GAAGf,KAAKwC,oBAAqB,MACvCN,MAAOlC,KAAKkC,MACZgB,WAAYlD,KAAKkD,WACjBH,SAAU/C,KAAK+C,SACfjC,SAAUd,KAAKc,WAGnB4B,EAAA,OAAA,OAEFA,EAAA,sBAAA,CACES,aAAa,SACbC,OAAQd,EAAsBtC,KAAKwC,iBAAmB,GACtDa,QAASf,EAAsBtC,KAAKsD,eAAiB","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty } from \"../../utils/types\";\nimport { IcValueEventDetail } from \"../../interface\";\n\n@Component({\n tag: \"ic-radio-group\",\n styleUrl: \"ic-radio-group.css\",\n shadow: true,\n})\nexport class RadioGroup {\n private radioOptions: HTMLIcRadioOptionElement[];\n\n @Element() host: HTMLIcRadioGroupElement;\n\n /**\n * The label for the radio group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the radio group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n /**\n * If `true`, the radio group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string;\n\n /**\n * If `true`, the small styling will be applied to the radio group.\n */\n @Prop() small: boolean = false;\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n /**\n * The checked state.\n */\n @State() checkedValue: string = \"\";\n @State() selectedChild: number = -1;\n\n /**\n * Emitted when a user selects a radio.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n @Listen(\"icCheck\")\n selectHandler(event: CustomEvent<IcValueEventDetail>): void {\n this.checkedValue = event.detail.value;\n this.icChange.emit({ value: this.checkedValue });\n\n if (this.radioOptions !== undefined) {\n this.radioOptions.forEach((radioOption, index) => {\n radioOption.selected = this.checkedValue === radioOption.value;\n if (radioOption.selected) {\n this.selectedChild = index;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, true)\n ].selected = true;\n event.preventDefault();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, false)\n ].selected = true;\n event.preventDefault();\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numRadios = this.radioOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n //check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numRadios;\n } else if (nextItem > numRadios) {\n nextItem = 0;\n }\n\n //if next item is disabled then find next\n if (this.radioOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n componentDidLoad(): void {\n this.radioOptions = Array.from(\n this.host.querySelectorAll(\"ic-radio-option\")\n );\n\n this.radioOptions.forEach((radioOption, index) => {\n if (!radioOption.selected) {\n radioOption.selected = this.checkedValue === radioOption.value;\n }\n radioOption.name = this.name;\n radioOption.groupLabel = this.label;\n if (radioOption.selected) {\n this.selectedChild = index;\n this.checkedValue = radioOption.value;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Radio Group\"\n );\n }\n\n render() {\n const hadValidationStatus = hasValidationStatus(\n this.validationStatus,\n this.disabled\n );\n\n renderHiddenInput(\n true,\n this.host,\n this.name,\n this.checkedValue,\n this.disabled\n );\n\n return (\n <Host onKeyDown={this.handleKeyDown}>\n <div\n role=\"radiogroup\"\n aria-label={`${this.label}${this.required ? \", required\" : \"\"}`}\n >\n {!this.hideLabel && (\n <ic-input-label\n class={{ [`${this.validationStatus}`]: true }}\n label={this.label}\n helperText={this.helperText}\n required={this.required}\n disabled={this.disabled}\n ></ic-input-label>\n )}\n <slot></slot>\n </div>\n <ic-input-validation\n ariaLiveMode=\"polite\"\n status={hadValidationStatus ? this.validationStatus : \"\"}\n message={hadValidationStatus ? this.validationText : \"\"}\n ></ic-input-validation>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-radio-group/ic-radio-group.css?tag=ic-radio-group&encapsulation=shadow","src/components/ic-radio-group/ic-radio-group.tsx"],"names":["icRadioGroupCss","RadioGroup","this","handleKeyDown","event","key","radioOptions","getNextItemToSelect","selectedChild","selected","preventDefault","currentItem","movingDown","numRadios","length","nextItem","disabled","[object Object]","checkedValue","detail","value","icChange","emit","undefined","forEach","radioOption","index","shadowRoot","querySelector","tabIndex","Array","from","host","querySelectorAll","name","groupLabel","label","onComponentRequiredPropUndefined","prop","propName","hadValidationStatus","hasValidationStatus","validationStatus","renderHiddenInput","h","Host","onKeyDown","role","aria-label","required","hideLabel","class","helperText","ariaLiveMode","status","message","validationText"],"mappings":"0IAAA,MAAMA,EAAkB,8+ECwBXC,EAAU,kEA2EbC,KAAAC,cAAiBC,IACvB,OAAQA,EAAMC,KACZ,IAAK,YACL,IAAK,aACHH,KAAKI,aACHJ,KAAKK,oBAAoBL,KAAKM,cAAe,OAC7CC,SAAW,KACbL,EAAMM,iBACN,MACF,IAAK,UACL,IAAK,YACHR,KAAKI,aACHJ,KAAKK,oBAAoBL,KAAKM,cAAe,QAC7CC,SAAW,KACbL,EAAMM,mBAIJR,KAAAK,oBAAsB,CAC5BI,EACAC,KAEA,MAAMC,EAAYX,KAAKI,aAAaQ,OAAS,EAE7C,GAAIH,EAAc,EAAG,CACnBA,EAAc,EAGhB,IAAII,EAAWH,EAAaD,EAAc,EAAIA,EAAc,EAG5D,GAAII,EAAW,E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gB,aACLhB,KAAKc,UAGP,OACE4B,EAACC,EAAI,CAACC,UAAW5C,KAAKC,eACpByC,EAAA,MAAA,CACEG,KAAK,aAAYC,aACL,GAAG9C,KAAKkC,QAAQlC,KAAK+C,SAAW,aAAe,OAEzD/C,KAAKgD,WACLN,EAAA,iBAAA,CACEO,MAAO,CAAElC,CAAC,GAAGf,KAAKwC,oBAAqB,MACvCN,MAAOlC,KAAKkC,MACZgB,WAAYlD,KAAKkD,WACjBH,SAAU/C,KAAK+C,SACfjC,SAAUd,KAAKc,WAGnB4B,EAAA,OAAA,OAEFA,EAAA,sBAAA,CACES,aAAa,SACbC,OAAQd,EAAsBtC,KAAKwC,iBAAmB,GACtDa,QAASf,EAAsBtC,KAAKsD,eAAiB","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty } from \"../../utils/types\";\nimport { IcValueEventDetail } from \"../../interface\";\n\n@Component({\n tag: \"ic-radio-group\",\n styleUrl: \"ic-radio-group.css\",\n shadow: true,\n})\nexport class RadioGroup {\n private radioOptions: HTMLIcRadioOptionElement[];\n\n @Element() host: HTMLIcRadioGroupElement;\n\n /**\n * The label for the radio group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the radio group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n /**\n * If `true`, the radio group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string;\n\n /**\n * If `true`, the small styling will be applied to the radio group.\n */\n @Prop() small: boolean = false;\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n /**\n * The checked state.\n */\n @State() checkedValue: string = \"\";\n @State() selectedChild: number = -1;\n\n /**\n * Emitted when a user selects a radio.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n @Listen(\"icCheck\")\n selectHandler(event: CustomEvent<IcValueEventDetail>): void {\n this.checkedValue = event.detail.value;\n this.icChange.emit({ value: this.checkedValue });\n\n if (this.radioOptions !== undefined) {\n this.radioOptions.forEach((radioOption, index) => {\n radioOption.selected = this.checkedValue === radioOption.value;\n if (radioOption.selected) {\n this.selectedChild = index;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, true)\n ].selected = true;\n event.preventDefault();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, false)\n ].selected = true;\n event.preventDefault();\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numRadios = this.radioOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n //check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numRadios;\n } else if (nextItem > numRadios) {\n nextItem = 0;\n }\n\n //if next item is disabled then find next\n if (this.radioOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n componentDidLoad(): void {\n this.radioOptions = Array.from(\n this.host.querySelectorAll(\"ic-radio-option\")\n );\n\n this.radioOptions.forEach((radioOption, index) => {\n if (!radioOption.selected) {\n radioOption.selected = this.checkedValue === radioOption.value;\n }\n radioOption.name = this.name;\n radioOption.groupLabel = this.label;\n if (radioOption.selected) {\n this.selectedChild = index;\n this.checkedValue = radioOption.value;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Radio Group\"\n );\n }\n\n render() {\n const hadValidationStatus = hasValidationStatus(\n this.validationStatus,\n this.disabled\n );\n\n renderHiddenInput(\n true,\n this.host,\n this.name,\n this.checkedValue,\n this.disabled\n );\n\n return (\n <Host onKeyDown={this.handleKeyDown}>\n <div\n role=\"radiogroup\"\n aria-label={`${this.label}${this.required ? \", required\" : \"\"}`}\n >\n {!this.hideLabel && (\n <ic-input-label\n class={{ [`${this.validationStatus}`]: true }}\n label={this.label}\n helperText={this.helperText}\n required={this.required}\n disabled={this.disabled}\n ></ic-input-label>\n )}\n <slot></slot>\n </div>\n <ic-input-validation\n ariaLiveMode=\"polite\"\n status={hadValidationStatus ? this.validationStatus : \"\"}\n message={hadValidationStatus ? this.validationText : \"\"}\n ></ic-input-validation>\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{I as n}from"./p-6f57b13c.js";const t=["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"];const e={XS:576,S:768,M:992,L:1200,XL:99999};const r=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"];const s=["ic-alert"];const a={"ic-alert":["ic-link"]};const o=136.701;const i=130;const c=133.3505;const l=(n,t=[])=>{const e={};t.forEach((t=>{if(n.hasAttribute(t)){const r=n.getAttribute(t);if(r!==null){e[t]=n.getAttribute(t)}n.removeAttribute(t)}}));return e};const u=(n,t)=>{const e=n._original||n;return{_original:n,emit:p(e.emit.bind(e),t)}};const p=(n,t=0)=>{let e;return(...r)=>{clearTimeout(e);e=setTimeout(n,t,...r)}};const d=(n,t,e,r,s)=>{if(e!==undefined){if(n||b(t)){const n=t.querySelectorAll("input.ic-input");const a=Array.from(n);const o=a.filter((n=>t===n.parentElement));let i=o[0];if(i===null||i===undefined){i=t.ownerDocument.createElement("input");i.type="hidden";i.classList.add("ic-input");t.appendChild(i)}i.disabled=s;i.name=e;i.value=r||""}}};const f=n=>{const t=n.querySelectorAll("input.ic-input");const e=Array.from(t);const r=e.filter((t=>n===t.parentElement));const s=r[0];s===null||s===void 0?void 0:s.remove()};const b=n=>!!n.shadowRoot&&!!n.attachShadow;const m=n=>n+"-helper-text";const v=n=>n+"-validation-text";const N=(n,t,e)=>`${t?m(n):""} ${e?v(n):""}`.trim();const y=(t,e=null)=>{var o;const i=t.parentElement||t.getRootNode().host.parentElement;const c=i.closest(r.join(","));if(c!==null){const r=c.tagName.toLowerCase();const i=t.tagName.toLowerCase();if((o=a[r])===null||o===void 0?void 0:o.includes(i)){return n.Default}else if(e!==null&&!s.includes(r)){return e}else if(c.classList.contains(n.Dark)){return n.Dark}return n.Light}return n.Default};const g=()=>{let n=false;if("maxTouchPoints"in navigator){n=navigator.maxTouchPoints>0}return n};const I=(n,t)=>{const e=document.createElement("button");e.setAttribute("type",t.type);e.style.display="none";n.appendChild(e);e.click();e.remove()};const h=n=>n.trim().length===0;const x=(n,t)=>{var e;const r=[];if(t.length>0){t.map((n=>{if(n.children){n.children.map((n=>r.push(n)))}else{r.push(n)}}));return(e=r.find((t=>t.value===n)))===null||e===void 0?void 0:e.label}return undefined};const w=(n,t,e,r)=>{let s;if(r==="anywhere"){s=n.filter((n=>{var r;if(t){return n.label.toLowerCase().includes(e.toLowerCase())||((r=n.description)===null||r===void 0?void 0:r.toLowerCase().includes(e.toLowerCase()))}else{return n.label.toLowerCase().includes(e.toLowerCase())}}))}else{s=n.filter((n=>{var r;if(t){return n.label.toLowerCase().startsWith(e.toLowerCase())||((r=n.description)===null||r===void 0?void 0:r.toLowerCase().startsWith(e.toLowerCase()))}else{return n.label.toLowerCase().startsWith(e.toLowerCase())}}))}return s};const k=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const A=()=>{if(k(L.S)){return L.S}if(k(L.M)){return L.M}if(k(L.L)){return L.L}if(k(L.XL)){return L.XL}return L.UNDEFINED};const T=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const $=()=>{const n=T("--ic-theme-primary-r");const t=T("--ic-theme-primary-g");const e=T("--ic-theme-primary-b");const r=(parseInt(n)*299+parseInt(t)*587+parseInt(e)*114)/1e3;return r};const E=()=>$()>c?n.Dark:n.Light;const C=(n,t)=>{if(n&&n.querySelector){return n.querySelector(`[slot="${t}"]`)}return null};const G=(n,t)=>C(n,t)!==null;const O=(n,t)=>{const e=C(n,t);if(e){return S(e)}return null};const S=n=>{const t=n.firstElementChild;if(t!==null){const n=t.assignedElements?t.assignedElements():t.childNodes;return n.length?n:null}else{return n===null?null:[n]}};const D=n=>{let t={navType:"",parent:null};switch(z(n)){case"IC-NAVIGATION-GROUP":t=D(n.parentElement);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:B(n)};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:B(n)};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}return t};const L={XS:Number(T("--ic-breakpoint-xs").replace("px","")),S:Number(T("--ic-breakpoint-sm").replace("px","")),M:Number(T("--ic-breakpoint-md").replace("px","")),L:Number(T("--ic-breakpoint-lg").replace("px","")),XL:Number(T("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const P=(n,t)=>n!==""&&!t;const X=(n,t)=>!!n.querySelector(`[slot="${t}"]`);const F=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const M=(n,t)=>{for(let e=0;e<n.length;e++){const{prop:r,propName:s}=n[e];if(r===null||r===undefined){console.error(`No ${s} specified for ${t} component - prop '${s}' (web components) / '${R(s)}' (react) required`)}}};const R=n=>{n=n.toLowerCase();const t=n.split("-");let e=t[0];for(let n=1;n<t.length;n++){e+=t[n].substring(0,1).toUpperCase()+t[n].substring(1)}return e};const V=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const j=function(n){return parseInt(n,16)};const q=n=>{let t;if(n.length===4){t=n.replace("#","").split("");return{r:j(t[0]+t[0]),g:j(t[1]+t[1]),b:j(t[2]+t[2]),a:1}}else{return{r:j(n.slice(1,3)),g:j(n.slice(3,5)),b:j(n.slice(5)),a:1}}};const H=n=>{const t=n.slice(3,4);let e;if(t.toLowerCase()==="a"){e={r:null,g:null,b:null,a:null};const t=n.substring(5,n.length-1).replace(/ /g,"").split(",");e.r=Number(t[0]);e.g=Number(t[1]);e.b=Number(t[2]);e.a=Number(t[3])}else{e={r:null,g:null,b:null,a:1};const t=n.substring(4,n.length-1).replace(/ /g,"").split(",");e.r=Number(t[0]);e.g=Number(t[1]);e.b=Number(t[2])}return e};const U=n=>n.scrollWidth>n.clientWidth;const z=n=>n.parentElement.tagName;const B=n=>n.parentElement;const J=()=>{if(document.querySelector("ic-classification-banner:not([inline='true'])")){return true}else{return false}};const K=n=>n.closest("FORM");const W=(n,t)=>{const e=K(n);if(e!==null){e.addEventListener("reset",t)}};const _=(n,t)=>{const e=K(n);if(e!==null){e.removeEventListener("reset",t)}};export{U as A,$ as B,o as C,L as D,q as E,H as F,C as G,h as H,e as I,m as J,v as K,i as W,M as a,y as b,V as c,W as d,d as e,f,A as g,N as h,X as i,P as j,E as k,J as l,l as m,t as n,F as o,D as p,z as q,_ as r,G as s,O as t,I as u,w as v,u as w,x,g as y,T as z};
2
- //# sourceMappingURL=p-23831891.js.map
1
+ import{I as n}from"./p-6f57b13c.js";const t=["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"];const e={XS:576,S:768,M:992,L:1200,XL:99999};const r=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"];const s=["ic-alert"];const a={"ic-alert":["ic-link"]};const o=136.701;const i=130;const c=133.3505;const l=(n,t=[])=>{const e={};t.forEach((t=>{if(n.hasAttribute(t)){const r=n.getAttribute(t);if(r!==null){e[t]=n.getAttribute(t)}n.removeAttribute(t)}}));return e};const u=(n,t)=>{const e=n._original||n;return{_original:n,emit:p(e.emit.bind(e),t)}};const p=(n,t=0)=>{let e;return(...r)=>{clearTimeout(e);e=setTimeout(n,t,...r)}};const d=(n,t,e,r,s)=>{if(e!==undefined){if(n||b(t)){const n=t.querySelectorAll("input.ic-input");const a=Array.from(n);const o=a.filter((n=>t===n.parentElement));let i=o[0];if(i===null||i===undefined){i=t.ownerDocument.createElement("input");i.type="hidden";i.classList.add("ic-input");t.appendChild(i)}i.disabled=s;i.name=e;i.value=r||""}}};const f=n=>{const t=n.querySelectorAll("input.ic-input");const e=Array.from(t);const r=e.filter((t=>n===t.parentElement));const s=r[0];s===null||s===void 0?void 0:s.remove()};const b=n=>!!n.shadowRoot&&!!n.attachShadow;const m=n=>n+"-helper-text";const v=n=>n+"-validation-text";const N=(n,t,e)=>`${t?m(n):""} ${e?v(n):""}`.trim();const y=(t,e=null)=>{var o;const i=t.parentElement||t.getRootNode().host.parentElement;const c=i.closest(r.join(","));if(c!==null){const r=c.tagName.toLowerCase();const i=t.tagName.toLowerCase();if((o=a[r])===null||o===void 0?void 0:o.includes(i)){return n.Default}else if(e!==null&&!s.includes(r)){return e}else if(c.classList.contains(n.Dark)){return n.Dark}return n.Light}return n.Default};const g=()=>{let n=false;if("maxTouchPoints"in navigator){n=navigator.maxTouchPoints>0}return n};const I=(n,t)=>{const e=document.createElement("button");e.setAttribute("type",t.type);e.style.display="none";n.appendChild(e);e.click();e.remove()};const h=n=>n.trim().length===0;const x=(n,t)=>{var e;const r=[];if(t.length>0){t.map((n=>{if(n.children){n.children.map((n=>r.push(n)))}else{r.push(n)}}));return(e=r.find((t=>t.value===n)))===null||e===void 0?void 0:e.label}return undefined};const w=(n,t,e,r)=>{let s;if(r==="anywhere"){s=n.filter((n=>{var r;if(t){return n.label.toLowerCase().includes(e.toLowerCase())||((r=n.description)===null||r===void 0?void 0:r.toLowerCase().includes(e.toLowerCase()))}else{return n.label.toLowerCase().includes(e.toLowerCase())}}))}else{s=n.filter((n=>{var r;if(t){return n.label.toLowerCase().startsWith(e.toLowerCase())||((r=n.description)===null||r===void 0?void 0:r.toLowerCase().startsWith(e.toLowerCase()))}else{return n.label.toLowerCase().startsWith(e.toLowerCase())}}))}return s};const k=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const A=()=>{if(k(L.S)){return L.S}if(k(L.M)){return L.M}if(k(L.L)){return L.L}if(k(L.XL)){return L.XL}return L.UNDEFINED};const T=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const $=()=>{const n=T("--ic-theme-primary-r");const t=T("--ic-theme-primary-g");const e=T("--ic-theme-primary-b");const r=(parseInt(n)*299+parseInt(t)*587+parseInt(e)*114)/1e3;return r};const E=()=>$()>c?n.Dark:n.Light;const C=(n,t)=>{if(n&&n.querySelector){return n.querySelector(`[slot="${t}"]`)}return null};const G=(n,t)=>C(n,t)!==null;const O=(n,t)=>{const e=C(n,t);if(e){return S(e)}return null};const S=n=>{const t=n.firstElementChild;if(t!==null){const n=t.assignedElements?t.assignedElements():t.childNodes;return n.length?n:null}else{return n===null?null:[n]}};const D=n=>{let t={navType:"",parent:null};switch(z(n)){case"IC-NAVIGATION-GROUP":t=D(n.parentElement);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:B(n)};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:B(n)};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}return t};const L={XS:Number(T("--ic-breakpoint-xs").replace("px","")),S:Number(T("--ic-breakpoint-sm").replace("px","")),M:Number(T("--ic-breakpoint-md").replace("px","")),L:Number(T("--ic-breakpoint-lg").replace("px","")),XL:Number(T("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const P=(n,t)=>n!==""&&!t;const X=(n,t)=>Array.from(n.children).some((n=>n.getAttribute("slot")===t));const F=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const M=(n,t)=>{for(let e=0;e<n.length;e++){const{prop:r,propName:s}=n[e];if(r===null||r===undefined){console.error(`No ${s} specified for ${t} component - prop '${s}' (web components) / '${R(s)}' (react) required`)}}};const R=n=>{n=n.toLowerCase();const t=n.split("-");let e=t[0];for(let n=1;n<t.length;n++){e+=t[n].substring(0,1).toUpperCase()+t[n].substring(1)}return e};const V=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const j=function(n){return parseInt(n,16)};const q=n=>{let t;if(n.length===4){t=n.replace("#","").split("");return{r:j(t[0]+t[0]),g:j(t[1]+t[1]),b:j(t[2]+t[2]),a:1}}else{return{r:j(n.slice(1,3)),g:j(n.slice(3,5)),b:j(n.slice(5)),a:1}}};const H=n=>{const t=n.slice(3,4);let e;if(t.toLowerCase()==="a"){e={r:null,g:null,b:null,a:null};const t=n.substring(5,n.length-1).replace(/ /g,"").split(",");e.r=Number(t[0]);e.g=Number(t[1]);e.b=Number(t[2]);e.a=Number(t[3])}else{e={r:null,g:null,b:null,a:1};const t=n.substring(4,n.length-1).replace(/ /g,"").split(",");e.r=Number(t[0]);e.g=Number(t[1]);e.b=Number(t[2])}return e};const U=n=>n.scrollWidth>n.clientWidth;const z=n=>n.parentElement.tagName;const B=n=>n.parentElement;const J=()=>{if(document.querySelector("ic-classification-banner:not([inline='true'])")){return true}else{return false}};const K=n=>n.closest("FORM");const W=(n,t)=>{const e=K(n);if(e!==null){e.addEventListener("reset",t)}};const _=(n,t)=>{const e=K(n);if(e!==null){e.removeEventListener("reset",t)}};export{$ as A,o as B,q as C,L as D,H as E,C as F,u as G,h as H,e as I,m as J,v as K,i as W,M as a,y as b,V as c,W as d,d as e,f,A as g,N as h,X as i,P as j,E as k,J as l,l as m,t as n,F as o,D as p,z as q,_ as r,G as s,O as t,I as u,w as v,x as w,g as x,T as y,U as z};
2
+ //# sourceMappingURL=p-a8ac8f72.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/utils/constants.ts","src/utils/helpers.ts"],"names":["IC_INHERITED_ARIA","IC_DEVICE_SIZES","XS","S","M","L","XL","IC_BLOCK_COLOR_COMPONENTS","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","ic-alert","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","DARK_MODE_THRESHOLD","inheritAttributes","element","attributes","attributeObject","forEach","attr","hasAttribute","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","always","container","name","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","removeHiddenInput","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","trim","getThemeFromContext","themeFromEvent","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","_a","includes","IcThemeForegroundEnum","Default","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","handleHiddenFormButtonClick","form","button","hiddenFormButton","document","setAttribute","style","display","click","isEmptyString","length","getLabelFromValue","options","ungroupedOptions","map","option","children","push","find","label","getFilteredMenuOptions","includeDescriptions","searchString","position","rawFilteredOptions","description","startsWith","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getThemeColorBrightness","themeRed","themeGreen","themeBlue","themeColorBrightness","parseInt","getThemeForegroundColor","getSlot","querySelector","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","getParentElementType","getParentElement","Number","replace","hasValidationStatus","status","isSlotUsed","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","i","prop","propName","console","error","kebabToCamelCase","kebabCase","individualWords","split","camelCase","substring","toUpperCase","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","c","r","g","b","a","slice","rgbaStrToObj","rgbaStr","fourthChar","colorRGBA","rgba","rgb","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","getForm","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener"],"mappings":"0CACaA,EAAoB,CAC/B,cACA,YACA,gBACA,eACA,mBACA,mBACA,eACA,gBACA,kBACA,oBACA,cACA,eACA,gBACA,cACA,eACA,oBACA,aACA,kBACA,YACA,YACA,gBACA,8BAGWC,EAAkB,CAC7BC,GAAI,IACJC,EAAG,IACHC,EAAG,IACHC,EAAG,KACHC,GAAI,OAGC,MAAMC,EAA4B,CACvC,UACA,oBACA,YACA,qBACA,YAGK,MAAMC,EAA4B,CAAC,YAMnC,MAAMC,EAA+C,CAC1DC,WAAY,CAAC,kBAUFC,EAA6B,cAC7BC,EAA6B,ICvC1C,MAAMC,EAAsB,eASfC,EAAoB,CAC/BC,EACAC,EAAuB,MAEvB,MAAMC,EAA8C,GAEpDD,EAAWE,SAASC,IAClB,GAAIJ,EAAQK,aAAaD,GAAO,CAC9B,MAAME,EAAQN,EAAQO,aAAaH,GACnC,GAAIE,IAAU,KAAM,CAClBJ,EAAgBE,GAAQJ,EAAQO,aAAaH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AS,KAAM,CACjBA,EAAKoH,oBAAoB,QAAS1B","sourcesContent":["// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined) {\n if (always || hasShadowDom(container)) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean =>\n value.trim().length === 0;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[]\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n return ungroupedOptions.find((option) => option.value === value)?.label;\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string => {\n return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = () => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n const themeColorBrightness =\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000;\n return themeColorBrightness;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nconst getSlotElements = (slot: Element) => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(child => child.getAttribute('slot') === slotName);\n};\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n if (document.querySelector(\"ic-classification-banner:not([inline='true'])\")) {\n return true;\n } else {\n return false;\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n) => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n) => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n"]}
@@ -1,2 +1,2 @@
1
- import{r as o,h as t,H as e,g as r}from"./p-f9370be6.js";import{k as i,D as n,a as l}from"./p-23831891.js";import"./p-6f57b13c.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-group-sparse){--footer-link-group-margin-right:95px;--footer-link-group-border-bottom:0 solid transparent;--footer-link-group-title-margin-top:0;--footer-link-group-title-margin-bottom:var(--ic-space-md)}:host(.footer-link-group-small){--footer-link-group-margin-right:0;--footer-link-group-title-margin-top:var(--ic-space-md);--footer-link-group-title-margin-bottom:var(--ic-space-md);--footer-link-group-links-padding-left:var(--ic-space-md);--footer-link-group-links-padding-bottom:var(--ic-space-md)}:host(.footer-link-group-light.footer-link-group-small){--footer-link-group-border-bottom:var(--ic-keyline-lighten)}:host(.footer-link-group-dark.footer-link-group-small){--footer-link-group-border-bottom:var(--ic-keyline-darken)}:host(.footer-link-group){margin-right:var(--footer-link-group-margin-right);border-bottom:var(--footer-link-group-border-bottom)}:host(.footer-link-group-small.footer-link-group-light:hover){background-color:var(--ic-action-light-bg-hover);cursor:pointer}:host(.footer-link-group-small.footer-link-group-dark:hover){background-color:var(--ic-action-dark-bg-hover);cursor:pointer}:host(.footer-link-group-sparse:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);z-index:1}:host(.footer-link-group-small:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);z-index:1}:host(.footer-link-group-small.footer-link-group-light:active){background-color:var(--ic-action-light-bg-active)}:host(.footer-link-group-small.footer-link-group-dark:active){background-color:var(--ic-action-dark-bg-active)}.footer-link-group-title{margin-top:var(--footer-link-group-title-margin-top);margin-bottom:var(--footer-link-group-title-margin-bottom);flex-grow:1}.footer-link-group-toggle{fill:white !important}.footer-link-group-links{display:flex;flex-direction:column}.footer-link-group-header{display:flex;align-items:center}';const s=class{constructor(t){o(this,t);this.handleKeydown=o=>{if(o.key===" "||o.key==="Enter"){this.toggleExpanded()}};this.toggleExpanded=()=>{this.expanded=!this.expanded};this.groupTitle=undefined;this.small=false;this.expanded=false;this.dropdownIconStyle=i();this.deviceSize=n.XL}isSmall(o){if(o.parentElement!==null){if(o.parentElement.classList.contains("footer")){return o.parentElement.classList.contains("footer-small")}else{return this.isSmall(o.parentElement)}}else{return false}}footerResizeHandler(){this.small=this.isSmall(this.el)}footerThemeChangeHandler(o){const t=o.detail;this.dropdownIconStyle=t.mode}componentWillLoad(){this.small=this.isSmall(this.el)}componentDidLoad(){l([{prop:this.groupTitle,propName:"group-title"}],"Footer Link Group")}render(){const{small:o,groupTitle:r}=this;return!o?t(e,{class:{["footer-link-group footer-link-group-sparse"]:true,[`footer-link-group-${this.dropdownIconStyle}`]:true}},t("div",{class:"footer-link-group-title"},t("ic-typography",{variant:"subtitle-small"},r)),t("div",{class:"footer-link-group-links"},t("slot",null))):t(e,{class:{["footer-link-group footer-link-group-small"]:true,[`footer-link-group-${this.dropdownIconStyle}`]:true},tabIndex:"1",onClick:this.toggleExpanded,onKeydown:this.handleKeydown,"aria-haspopup":"true","aria-expanded":this.expanded},t("ic-section-container",{fullHeight:true},t("div",{class:"footer-link-group-header"},t("div",{class:"footer-link-group-title"},t("ic-typography",{variant:"label"},r)),this.expanded?t("svg",{class:"footer-link-group-toggle",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1200 1200"},t("path",{fill:"currentColor",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"})):t("svg",{class:"footer-link-group-toggle",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1200 1200"},t("g",{transform:"translate(0 1200) scale(1 -1)"},t("path",{fill:"currentColor",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"})))),this.expanded&&t("div",{class:"footer-link-group-links"},t("slot",null))))}get el(){return r(this)}};s.style=a;export{s as ic_footer_link_group};
2
- //# sourceMappingURL=p-6b34d98f.entry.js.map
1
+ import{r as o,h as t,H as e,g as r}from"./p-f9370be6.js";import{k as i,D as n,a as l}from"./p-a8ac8f72.js";import"./p-6f57b13c.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-group-sparse){--footer-link-group-margin-right:95px;--footer-link-group-border-bottom:0 solid transparent;--footer-link-group-title-margin-top:0;--footer-link-group-title-margin-bottom:var(--ic-space-md)}:host(.footer-link-group-small){--footer-link-group-margin-right:0;--footer-link-group-title-margin-top:var(--ic-space-md);--footer-link-group-title-margin-bottom:var(--ic-space-md);--footer-link-group-links-padding-left:var(--ic-space-md);--footer-link-group-links-padding-bottom:var(--ic-space-md)}:host(.footer-link-group-light.footer-link-group-small){--footer-link-group-border-bottom:var(--ic-keyline-lighten)}:host(.footer-link-group-dark.footer-link-group-small){--footer-link-group-border-bottom:var(--ic-keyline-darken)}:host(.footer-link-group){margin-right:var(--footer-link-group-margin-right);border-bottom:var(--footer-link-group-border-bottom)}:host(.footer-link-group-small.footer-link-group-light:hover){background-color:var(--ic-action-light-bg-hover);cursor:pointer}:host(.footer-link-group-small.footer-link-group-dark:hover){background-color:var(--ic-action-dark-bg-hover);cursor:pointer}:host(.footer-link-group-sparse:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);z-index:1}:host(.footer-link-group-small:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);z-index:1}:host(.footer-link-group-small.footer-link-group-light:active){background-color:var(--ic-action-light-bg-active)}:host(.footer-link-group-small.footer-link-group-dark:active){background-color:var(--ic-action-dark-bg-active)}.footer-link-group-title{margin-top:var(--footer-link-group-title-margin-top);margin-bottom:var(--footer-link-group-title-margin-bottom);flex-grow:1}.footer-link-group-toggle{fill:white !important}.footer-link-group-links{display:flex;flex-direction:column}.footer-link-group-header{display:flex;align-items:center}';const s=class{constructor(t){o(this,t);this.handleKeydown=o=>{if(o.key===" "||o.key==="Enter"){this.toggleExpanded()}};this.toggleExpanded=()=>{this.expanded=!this.expanded};this.groupTitle=undefined;this.small=false;this.expanded=false;this.dropdownIconStyle=i();this.deviceSize=n.XL}isSmall(o){if(o.parentElement!==null){if(o.parentElement.classList.contains("footer")){return o.parentElement.classList.contains("footer-small")}else{return this.isSmall(o.parentElement)}}else{return false}}footerResizeHandler(){this.small=this.isSmall(this.el)}footerThemeChangeHandler(o){const t=o.detail;this.dropdownIconStyle=t.mode}componentWillLoad(){this.small=this.isSmall(this.el)}componentDidLoad(){l([{prop:this.groupTitle,propName:"group-title"}],"Footer Link Group")}render(){const{small:o,groupTitle:r}=this;return!o?t(e,{class:{["footer-link-group footer-link-group-sparse"]:true,[`footer-link-group-${this.dropdownIconStyle}`]:true}},t("div",{class:"footer-link-group-title"},t("ic-typography",{variant:"subtitle-small"},r)),t("div",{class:"footer-link-group-links"},t("slot",null))):t(e,{class:{["footer-link-group footer-link-group-small"]:true,[`footer-link-group-${this.dropdownIconStyle}`]:true},tabIndex:"1",onClick:this.toggleExpanded,onKeydown:this.handleKeydown,"aria-haspopup":"true","aria-expanded":this.expanded},t("ic-section-container",{fullHeight:true},t("div",{class:"footer-link-group-header"},t("div",{class:"footer-link-group-title"},t("ic-typography",{variant:"label"},r)),this.expanded?t("svg",{class:"footer-link-group-toggle",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1200 1200"},t("path",{fill:"currentColor",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"})):t("svg",{class:"footer-link-group-toggle",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1200 1200"},t("g",{transform:"translate(0 1200) scale(1 -1)"},t("path",{fill:"currentColor",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"})))),this.expanded&&t("div",{class:"footer-link-group-links"},t("slot",null))))}get el(){return r(this)}};s.style=a;export{s as ic_footer_link_group};
2
+ //# sourceMappingURL=p-ae02b008.entry.js.map