@ukic/web-components 2.17.0 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (389) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-3d0705ed.js → helpers-d52cddc1.js} +2 -7
  3. package/dist/cjs/helpers-d52cddc1.js.map +1 -0
  4. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-badge.cjs.entry.js +8 -16
  8. package/dist/cjs/ic-badge.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 +2 -8
  12. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  15. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-dialog.cjs.entry.js +2 -3
  19. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +4 -4
  28. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-navigation-group.cjs.entry.js +13 -16
  37. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-navigation-item.cjs.entry.js +32 -28
  39. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-pagination.cjs.entry.js +5 -5
  44. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-select.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-top-navigation.cjs.entry.js +60 -46
  65. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-typography.cjs.entry.js +35 -11
  67. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  68. package/dist/cjs/loader.cjs.js +1 -1
  69. package/dist/cjs/types-dc22e301.js.map +1 -1
  70. package/dist/collection/components/ic-badge/ic-badge.js +7 -15
  71. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  72. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +2 -2
  73. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
  74. package/dist/collection/components/ic-button/ic-button.css +1 -2
  75. package/dist/collection/components/ic-button/ic-button.js +0 -9
  76. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  77. package/dist/collection/components/ic-dialog/ic-dialog.js +1 -2
  78. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  79. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +1 -1
  80. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  81. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +3 -16
  82. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  83. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  84. package/dist/collection/components/ic-menu/ic-menu.js +2 -2
  85. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  86. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  87. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +0 -1
  88. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +11 -14
  89. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  90. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +32 -28
  91. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  92. package/dist/collection/components/ic-page-header/test/a11y/ic-page-header.test.a11y.js +13 -0
  93. package/dist/collection/components/ic-page-header/test/a11y/ic-page-header.test.a11y.js.map +1 -0
  94. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.e2e.js +177 -0
  95. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.e2e.js.map +1 -0
  96. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  97. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  98. package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js +18 -0
  99. package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js.map +1 -0
  100. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.e2e.js +128 -0
  101. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.e2e.js.map +1 -0
  102. package/dist/collection/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.js +13 -0
  103. package/dist/collection/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.js.map +1 -0
  104. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js +33 -0
  105. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js.map +1 -0
  106. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  107. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  108. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +24 -21
  109. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +59 -68
  110. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  111. package/dist/collection/components/ic-typography/ic-typography.css +4 -1
  112. package/dist/collection/components/ic-typography/ic-typography.js +113 -10
  113. package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
  114. package/dist/collection/components/ic-typography/ic-typography.types.js +2 -0
  115. package/dist/collection/components/ic-typography/ic-typography.types.js.map +1 -0
  116. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js +25 -0
  117. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js.map +1 -1
  118. package/dist/collection/utils/helpers.js +1 -36
  119. package/dist/collection/utils/helpers.js.map +1 -1
  120. package/dist/collection/utils/types.js.map +1 -1
  121. package/dist/components/helpers.js +2 -7
  122. package/dist/components/helpers.js.map +1 -1
  123. package/dist/components/ic-badge.js +8 -16
  124. package/dist/components/ic-badge.js.map +1 -1
  125. package/dist/components/ic-button2.js +3 -11
  126. package/dist/components/ic-button2.js.map +1 -1
  127. package/dist/components/ic-card.js +1 -1
  128. package/dist/components/ic-checkbox-group.js +1 -1
  129. package/dist/components/ic-checkbox.js +1 -1
  130. package/dist/components/ic-chip.js +1 -1
  131. package/dist/components/ic-dialog.js +1 -2
  132. package/dist/components/ic-dialog.js.map +1 -1
  133. package/dist/components/ic-input-component-container2.js +1 -1
  134. package/dist/components/ic-input-component-container2.js.map +1 -1
  135. package/dist/components/ic-link2.js +1 -1
  136. package/dist/components/ic-link2.js.map +1 -1
  137. package/dist/components/ic-menu-item2.js +1 -1
  138. package/dist/components/ic-menu2.js +2 -2
  139. package/dist/components/ic-menu2.js.map +1 -1
  140. package/dist/components/ic-navigation-button.js +1 -1
  141. package/dist/components/ic-navigation-button.js.map +1 -1
  142. package/dist/components/ic-navigation-group.js +12 -15
  143. package/dist/components/ic-navigation-group.js.map +1 -1
  144. package/dist/components/ic-navigation-item.js +32 -28
  145. package/dist/components/ic-navigation-item.js.map +1 -1
  146. package/dist/components/ic-pagination-item2.js +1 -1
  147. package/dist/components/ic-pagination.js +5 -5
  148. package/dist/components/ic-pagination.js.map +1 -1
  149. package/dist/components/ic-radio-group.js +1 -1
  150. package/dist/components/ic-radio-option.js +1 -1
  151. package/dist/components/ic-search-bar.js +1 -1
  152. package/dist/components/ic-select.js +1 -1
  153. package/dist/components/ic-side-navigation.js.map +1 -1
  154. package/dist/components/ic-switch.js +1 -1
  155. package/dist/components/ic-tab.js +1 -1
  156. package/dist/components/ic-text-field2.js +1 -1
  157. package/dist/components/ic-text-field2.js.map +1 -1
  158. package/dist/components/ic-toggle-button.js +1 -1
  159. package/dist/components/ic-top-navigation.js +61 -47
  160. package/dist/components/ic-top-navigation.js.map +1 -1
  161. package/dist/components/ic-typography2.js +38 -12
  162. package/dist/components/ic-typography2.js.map +1 -1
  163. package/dist/components/types.js.map +1 -1
  164. package/dist/core/core.css +1 -1
  165. package/dist/core/core.esm.js +1 -1
  166. package/dist/core/core.esm.js.map +1 -1
  167. package/dist/core/{p-83d1a0e1.entry.js → p-0038a8fd.entry.js} +2 -2
  168. package/dist/core/{p-4c992683.entry.js → p-04506779.entry.js} +2 -2
  169. package/dist/core/p-0e2628eb.entry.js +2 -0
  170. package/dist/core/p-0e2628eb.entry.js.map +1 -0
  171. package/dist/core/{p-01da2341.entry.js → p-1183031f.entry.js} +2 -2
  172. package/dist/core/{p-edbb9e9d.entry.js → p-123b9306.entry.js} +2 -2
  173. package/dist/core/{p-63d6ce35.entry.js → p-1ce0d16e.entry.js} +2 -2
  174. package/dist/core/{p-9870bc1a.entry.js → p-1d352487.entry.js} +2 -2
  175. package/dist/core/{p-eacc562b.entry.js → p-210412e4.entry.js} +2 -2
  176. package/dist/core/{p-76d82d3c.entry.js → p-22a682e8.entry.js} +2 -2
  177. package/dist/core/{p-1cca9f24.entry.js → p-2680b736.entry.js} +2 -2
  178. package/dist/core/p-26b7b18f.js.map +1 -1
  179. package/dist/core/{p-e21263d5.entry.js → p-296b7d74.entry.js} +2 -2
  180. package/dist/core/{p-625a06af.entry.js → p-2f462ec5.entry.js} +2 -2
  181. package/dist/core/{p-e6eafc88.entry.js → p-35b8923f.entry.js} +2 -2
  182. package/dist/core/{p-3aa1b3c7.entry.js → p-4641518f.entry.js} +2 -2
  183. package/dist/core/{p-72621de7.entry.js → p-46ecc4c5.entry.js} +2 -2
  184. package/dist/core/p-477cf469.entry.js +2 -0
  185. package/dist/core/p-477cf469.entry.js.map +1 -0
  186. package/dist/core/{p-2499416a.entry.js → p-47a9dca9.entry.js} +2 -2
  187. package/dist/core/p-47a9dca9.entry.js.map +1 -0
  188. package/dist/core/p-47d39ce7.entry.js +2 -0
  189. package/dist/core/p-47d39ce7.entry.js.map +1 -0
  190. package/dist/core/{p-fcf42a0a.entry.js → p-4ce5abd7.entry.js} +2 -2
  191. package/dist/core/p-4ce5abd7.entry.js.map +1 -0
  192. package/dist/core/p-53f2fc84.js +2 -0
  193. package/dist/core/p-53f2fc84.js.map +1 -0
  194. package/dist/core/{p-b8a82735.entry.js → p-5603eec3.entry.js} +2 -2
  195. package/dist/core/{p-91527032.entry.js → p-5e729e99.entry.js} +2 -2
  196. package/dist/core/p-64705a03.entry.js +2 -0
  197. package/dist/core/p-64705a03.entry.js.map +1 -0
  198. package/dist/core/p-6a9ddb8a.entry.js +2 -0
  199. package/dist/core/{p-67f670b2.entry.js.map → p-6a9ddb8a.entry.js.map} +1 -1
  200. package/dist/core/p-76ee6107.entry.js +2 -0
  201. package/dist/core/p-76ee6107.entry.js.map +1 -0
  202. package/dist/core/p-7b0397ea.entry.js +2 -0
  203. package/dist/core/p-7b0397ea.entry.js.map +1 -0
  204. package/dist/core/{p-c37bf1c6.entry.js → p-80c3424f.entry.js} +2 -2
  205. package/dist/core/{p-55f7eecc.entry.js → p-8aa9aa25.entry.js} +2 -2
  206. package/dist/core/{p-6d623125.entry.js → p-916f4265.entry.js} +2 -2
  207. package/dist/core/p-91768ddf.entry.js +2 -0
  208. package/dist/core/p-91768ddf.entry.js.map +1 -0
  209. package/dist/core/{p-917abbfa.entry.js → p-95d6f3ed.entry.js} +2 -2
  210. package/dist/core/{p-c8538a01.entry.js → p-9c18f048.entry.js} +2 -2
  211. package/dist/core/{p-b0892084.entry.js → p-a4e7d123.entry.js} +2 -2
  212. package/dist/core/{p-ef21f737.entry.js → p-a98f57cf.entry.js} +2 -2
  213. package/dist/core/{p-2f973f6a.entry.js → p-a9e1966f.entry.js} +2 -2
  214. package/dist/core/p-aa777792.entry.js +2 -0
  215. package/dist/core/p-aa777792.entry.js.map +1 -0
  216. package/dist/core/{p-a14b672a.entry.js → p-aa878a3c.entry.js} +2 -2
  217. package/dist/core/{p-a14b672a.entry.js.map → p-aa878a3c.entry.js.map} +1 -1
  218. package/dist/core/{p-91dd1555.entry.js → p-b781b691.entry.js} +2 -2
  219. package/dist/core/{p-d192a1e4.entry.js → p-b98ce745.entry.js} +2 -2
  220. package/dist/core/{p-19247a5a.entry.js → p-bc7f99b8.entry.js} +2 -2
  221. package/dist/core/{p-573186d7.entry.js → p-c053230d.entry.js} +2 -2
  222. package/dist/core/{p-14a0c9a9.entry.js → p-c7c2aa3c.entry.js} +2 -2
  223. package/dist/core/{p-ec1c7ecd.entry.js → p-d319ddce.entry.js} +2 -2
  224. package/dist/core/{p-c4ff9e66.entry.js → p-d5f721ca.entry.js} +2 -2
  225. package/dist/core/{p-af5931f4.entry.js → p-d9329191.entry.js} +2 -2
  226. package/dist/core/{p-0c679975.entry.js → p-dbbea7fa.entry.js} +2 -2
  227. package/dist/core/p-df090fc1.entry.js +2 -0
  228. package/dist/core/p-df090fc1.entry.js.map +1 -0
  229. package/dist/core/{p-901eacb8.entry.js → p-e4863c93.entry.js} +2 -2
  230. package/dist/core/p-e68e31ec.entry.js +2 -0
  231. package/dist/core/{p-87ec0cef.entry.js.map → p-e68e31ec.entry.js.map} +1 -1
  232. package/dist/core/{p-389d8200.entry.js → p-fbcb77a3.entry.js} +2 -2
  233. package/dist/core/{p-7e636a51.entry.js → p-fce3e1aa.entry.js} +2 -2
  234. package/dist/core/{p-034723b0.entry.js → p-fea1d095.entry.js} +2 -2
  235. package/dist/core/p-fea1d095.entry.js.map +1 -0
  236. package/dist/esm/core.js +1 -1
  237. package/dist/esm/{helpers-8cc07380.js → helpers-f1ca9908.js} +3 -8
  238. package/dist/esm/helpers-f1ca9908.js.map +1 -0
  239. package/dist/esm/ic-accordion.entry.js +1 -1
  240. package/dist/esm/ic-alert.entry.js +1 -1
  241. package/dist/esm/ic-back-to-top.entry.js +1 -1
  242. package/dist/esm/ic-badge.entry.js +8 -16
  243. package/dist/esm/ic-badge.entry.js.map +1 -1
  244. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  245. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  246. package/dist/esm/ic-button_3.entry.js +2 -8
  247. package/dist/esm/ic-button_3.entry.js.map +1 -1
  248. package/dist/esm/ic-card.entry.js +1 -1
  249. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  250. package/dist/esm/ic-checkbox.entry.js +1 -1
  251. package/dist/esm/ic-chip.entry.js +1 -1
  252. package/dist/esm/ic-data-row.entry.js +1 -1
  253. package/dist/esm/ic-dialog.entry.js +2 -3
  254. package/dist/esm/ic-dialog.entry.js.map +1 -1
  255. package/dist/esm/ic-divider.entry.js +1 -1
  256. package/dist/esm/ic-empty-state.entry.js +1 -1
  257. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  258. package/dist/esm/ic-footer-link.entry.js +1 -1
  259. package/dist/esm/ic-footer.entry.js +1 -1
  260. package/dist/esm/ic-hero.entry.js +1 -1
  261. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  262. package/dist/esm/ic-input-component-container_3.entry.js +4 -4
  263. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  264. package/dist/esm/ic-input-label_2.entry.js +1 -1
  265. package/dist/esm/ic-link.entry.js +1 -1
  266. package/dist/esm/ic-link.entry.js.map +1 -1
  267. package/dist/esm/ic-menu-group.entry.js +1 -1
  268. package/dist/esm/ic-menu-item.entry.js +1 -1
  269. package/dist/esm/ic-navigation-button.entry.js +1 -1
  270. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  271. package/dist/esm/ic-navigation-group.entry.js +13 -16
  272. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  273. package/dist/esm/ic-navigation-item.entry.js +32 -28
  274. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  275. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  276. package/dist/esm/ic-page-header.entry.js +1 -1
  277. package/dist/esm/ic-pagination-item.entry.js +1 -1
  278. package/dist/esm/ic-pagination.entry.js +5 -5
  279. package/dist/esm/ic-pagination.entry.js.map +1 -1
  280. package/dist/esm/ic-popover-menu.entry.js +1 -1
  281. package/dist/esm/ic-radio-group.entry.js +1 -1
  282. package/dist/esm/ic-radio-option.entry.js +1 -1
  283. package/dist/esm/ic-search-bar.entry.js +1 -1
  284. package/dist/esm/ic-select.entry.js +1 -1
  285. package/dist/esm/ic-side-navigation.entry.js +1 -1
  286. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  287. package/dist/esm/ic-status-tag.entry.js +1 -1
  288. package/dist/esm/ic-step.entry.js +1 -1
  289. package/dist/esm/ic-stepper.entry.js +1 -1
  290. package/dist/esm/ic-switch.entry.js +1 -1
  291. package/dist/esm/ic-tab-group.entry.js +1 -1
  292. package/dist/esm/ic-tab-panel.entry.js +1 -1
  293. package/dist/esm/ic-tab.entry.js +1 -1
  294. package/dist/esm/ic-text-field.entry.js +1 -1
  295. package/dist/esm/ic-text-field.entry.js.map +1 -1
  296. package/dist/esm/ic-theme.entry.js +1 -1
  297. package/dist/esm/ic-toast.entry.js +1 -1
  298. package/dist/esm/ic-toggle-button.entry.js +1 -1
  299. package/dist/esm/ic-top-navigation.entry.js +60 -46
  300. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  301. package/dist/esm/ic-typography.entry.js +36 -12
  302. package/dist/esm/ic-typography.entry.js.map +1 -1
  303. package/dist/esm/loader.js +1 -1
  304. package/dist/esm/polyfills/core-js.js +0 -0
  305. package/dist/esm/polyfills/dom.js +0 -0
  306. package/dist/esm/polyfills/es5-html-element.js +0 -0
  307. package/dist/esm/polyfills/index.js +0 -0
  308. package/dist/esm/polyfills/system.js +0 -0
  309. package/dist/esm/types-6f6b41a5.js.map +1 -1
  310. package/dist/types/components/ic-badge/ic-badge.d.ts +0 -1
  311. package/dist/types/components/ic-button/ic-button.d.ts +0 -1
  312. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +2 -2
  313. package/dist/types/components/ic-page-header/test/a11y/ic-page-header.test.a11y.d.ts +1 -0
  314. package/dist/types/components/ic-pagination/test/a11y/ic-pagination.test.a11y.d.ts +1 -0
  315. package/dist/types/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.d.ts +1 -0
  316. package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -1
  317. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +5 -10
  318. package/dist/types/components/ic-typography/ic-typography.d.ts +18 -1
  319. package/dist/types/components/ic-typography/ic-typography.types.d.ts +4 -0
  320. package/dist/types/components.d.ts +29 -10
  321. package/dist/types/interface.d.ts +1 -0
  322. package/dist/types/utils/helpers.d.ts +7 -13
  323. package/dist/types/utils/types.d.ts +0 -1
  324. package/hydrate/index.js +157 -136
  325. package/package.json +2 -3
  326. package/vscode-data.json +0 -4
  327. package/dist/cjs/helpers-3d0705ed.js.map +0 -1
  328. package/dist/core/p-034723b0.entry.js.map +0 -1
  329. package/dist/core/p-196511f4.entry.js +0 -2
  330. package/dist/core/p-196511f4.entry.js.map +0 -1
  331. package/dist/core/p-227761a5.entry.js +0 -2
  332. package/dist/core/p-227761a5.entry.js.map +0 -1
  333. package/dist/core/p-2499416a.entry.js.map +0 -1
  334. package/dist/core/p-40a59fd5.entry.js +0 -2
  335. package/dist/core/p-40a59fd5.entry.js.map +0 -1
  336. package/dist/core/p-47b1ec8a.entry.js +0 -2
  337. package/dist/core/p-47b1ec8a.entry.js.map +0 -1
  338. package/dist/core/p-4cefa844.js +0 -2
  339. package/dist/core/p-4cefa844.js.map +0 -1
  340. package/dist/core/p-67f670b2.entry.js +0 -2
  341. package/dist/core/p-87ec0cef.entry.js +0 -2
  342. package/dist/core/p-99db319c.entry.js +0 -2
  343. package/dist/core/p-99db319c.entry.js.map +0 -1
  344. package/dist/core/p-a98506a6.entry.js +0 -2
  345. package/dist/core/p-a98506a6.entry.js.map +0 -1
  346. package/dist/core/p-d93267e0.entry.js +0 -2
  347. package/dist/core/p-d93267e0.entry.js.map +0 -1
  348. package/dist/core/p-dd8861c0.entry.js +0 -2
  349. package/dist/core/p-dd8861c0.entry.js.map +0 -1
  350. package/dist/core/p-fc20178a.entry.js +0 -2
  351. package/dist/core/p-fc20178a.entry.js.map +0 -1
  352. package/dist/core/p-fcf42a0a.entry.js.map +0 -1
  353. package/dist/esm/helpers-8cc07380.js.map +0 -1
  354. /package/dist/core/{p-83d1a0e1.entry.js.map → p-0038a8fd.entry.js.map} +0 -0
  355. /package/dist/core/{p-4c992683.entry.js.map → p-04506779.entry.js.map} +0 -0
  356. /package/dist/core/{p-01da2341.entry.js.map → p-1183031f.entry.js.map} +0 -0
  357. /package/dist/core/{p-edbb9e9d.entry.js.map → p-123b9306.entry.js.map} +0 -0
  358. /package/dist/core/{p-63d6ce35.entry.js.map → p-1ce0d16e.entry.js.map} +0 -0
  359. /package/dist/core/{p-9870bc1a.entry.js.map → p-1d352487.entry.js.map} +0 -0
  360. /package/dist/core/{p-eacc562b.entry.js.map → p-210412e4.entry.js.map} +0 -0
  361. /package/dist/core/{p-76d82d3c.entry.js.map → p-22a682e8.entry.js.map} +0 -0
  362. /package/dist/core/{p-1cca9f24.entry.js.map → p-2680b736.entry.js.map} +0 -0
  363. /package/dist/core/{p-e21263d5.entry.js.map → p-296b7d74.entry.js.map} +0 -0
  364. /package/dist/core/{p-625a06af.entry.js.map → p-2f462ec5.entry.js.map} +0 -0
  365. /package/dist/core/{p-e6eafc88.entry.js.map → p-35b8923f.entry.js.map} +0 -0
  366. /package/dist/core/{p-3aa1b3c7.entry.js.map → p-4641518f.entry.js.map} +0 -0
  367. /package/dist/core/{p-72621de7.entry.js.map → p-46ecc4c5.entry.js.map} +0 -0
  368. /package/dist/core/{p-b8a82735.entry.js.map → p-5603eec3.entry.js.map} +0 -0
  369. /package/dist/core/{p-91527032.entry.js.map → p-5e729e99.entry.js.map} +0 -0
  370. /package/dist/core/{p-c37bf1c6.entry.js.map → p-80c3424f.entry.js.map} +0 -0
  371. /package/dist/core/{p-55f7eecc.entry.js.map → p-8aa9aa25.entry.js.map} +0 -0
  372. /package/dist/core/{p-6d623125.entry.js.map → p-916f4265.entry.js.map} +0 -0
  373. /package/dist/core/{p-917abbfa.entry.js.map → p-95d6f3ed.entry.js.map} +0 -0
  374. /package/dist/core/{p-c8538a01.entry.js.map → p-9c18f048.entry.js.map} +0 -0
  375. /package/dist/core/{p-b0892084.entry.js.map → p-a4e7d123.entry.js.map} +0 -0
  376. /package/dist/core/{p-ef21f737.entry.js.map → p-a98f57cf.entry.js.map} +0 -0
  377. /package/dist/core/{p-2f973f6a.entry.js.map → p-a9e1966f.entry.js.map} +0 -0
  378. /package/dist/core/{p-91dd1555.entry.js.map → p-b781b691.entry.js.map} +0 -0
  379. /package/dist/core/{p-d192a1e4.entry.js.map → p-b98ce745.entry.js.map} +0 -0
  380. /package/dist/core/{p-19247a5a.entry.js.map → p-bc7f99b8.entry.js.map} +0 -0
  381. /package/dist/core/{p-573186d7.entry.js.map → p-c053230d.entry.js.map} +0 -0
  382. /package/dist/core/{p-14a0c9a9.entry.js.map → p-c7c2aa3c.entry.js.map} +0 -0
  383. /package/dist/core/{p-ec1c7ecd.entry.js.map → p-d319ddce.entry.js.map} +0 -0
  384. /package/dist/core/{p-c4ff9e66.entry.js.map → p-d5f721ca.entry.js.map} +0 -0
  385. /package/dist/core/{p-af5931f4.entry.js.map → p-d9329191.entry.js.map} +0 -0
  386. /package/dist/core/{p-0c679975.entry.js.map → p-dbbea7fa.entry.js.map} +0 -0
  387. /package/dist/core/{p-901eacb8.entry.js.map → p-e4863c93.entry.js.map} +0 -0
  388. /package/dist/core/{p-389d8200.entry.js.map → p-fbcb77a3.entry.js.map} +0 -0
  389. /package/dist/core/{p-7e636a51.entry.js.map → p-fce3e1aa.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"helpers.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;MACa,aAAa,GAAG;IAC3B,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,sBAAsB;KAClC;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,OAAO;KACnB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;EACD;AAEF;MACa,iBAAiB,GAAG;IAC/B,aAAa;IACb,mBAAmB;IACnB,WAAW;IACX,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;IACf,aAAa;IACb,cAAc;IACd,eAAe;IACf,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,WAAW;IACX,WAAW;IACX,eAAe;IACf,sBAAsB;EACtB;MAEW,eAAe,GAAG;IAC7B,EAAE,EAAE,GAAG;IACP,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,IAAI;IACP,EAAE,EAAE,KAAK;EACT;AAEK,MAAM,yBAAyB,GAAG;IACvC,SAAS;IACT,mBAAmB;IACnB,WAAW;IACX,oBAAoB;IACpB,UAAU;CACX,CAAC;AAEK,MAAM,yBAAyB,GAAG,CAAC,UAAU,CAAC,CAAC;AAM/C,MAAM,yBAAyB,GAAsB;IAC1D,UAAU,EAAE,C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,KACpD,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,YAAY;AAE5C;;;;;MAKa,oBAAoB,GAAG,CAAC,KAAkB,KACrD,KAAK,CAAC,aAAa,CAAC,QAAQ;MAEjB,gBAAgB,GAAG,CAAC,KAAkB,KACjD,KAAK,CAAC,cAAc;MAET,uBAAuB,GAAG,MACrC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,+CAA+C,EAAE;AAErE,MAAM,OAAO,GAAG,CAAC,EAAe,KAAsB,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;MAEnE,oBAAoB,GAAG,CAClC,EAAe,EACf,UAAsC;IAEtC,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;IACzB,IAAI,IAAI,KAAK,IAAI,EAAE;QACjB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;KAC5C;AACH,EAAE;MAEW,uBAAuB,GAAG,CACrC,EAAe,EACf,UAAsC;IAEtC,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;IACzB,IAAI,IAAI,KAAK,IAAI,EAAE;QACjB,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;KAC/C;AACH,EAAE;MAEW,OAAO,GAAG,CAAC,EAAU,EAAE,IAAI,GAAG,EAAE,KAC3C,GAAG,CAAC,CAAC,GAAG,IAAI,IAAI,QAAQ,CAAC,EAAE,CAAC,MAAM;MAEvB,mBAAmB,GAAG,CACjC,QAAiB,EACjB,OAAoB;IAEpB,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;KACrC;AACH;;;;","names":[],"sources":["src/utils/constants.ts","src/utils/helpers.ts"],"sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\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-expanded\",\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 IcDeviceSizes,\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;\nconst icInput = \"ic-input\";\nconst linkIcInput = \"input.ic-input\";\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\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 | Date | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(linkIcInput);\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(icInput);\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : null;\n } else {\n input.value = value || \"\";\n }\n }\n};\n\n/**\n * This method is used to add a hidden file input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n name: string,\n value: FileList | undefined | null,\n disabled: boolean,\n accept: string\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n const inputs = container.querySelectorAll(linkIcInput);\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.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.files = value;\n input.disabled = disabled;\n input.accept = accept;\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\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 !!el.shadowRoot && !!el.attachShadow;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns 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 \"maxTouchPoints\" in navigator ? navigator.maxTouchPoints > 0 : false;\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 ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === \"anywhere\"\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\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 return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\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 getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\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\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | 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(\n getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 0\n S: Number(\n getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 576\n M: Number(\n getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 768\n L: Number(\n getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 992\n XL: Number(\n getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean =>\n Array.from(element.children).some(\n (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 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 !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const getForm = (el: HTMLElement): HTMLFormElement => el.closest(\"FORM\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\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): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean => {\n return window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n};\n\nexport const isNumeric = (value: string): boolean => {\n return /^-?\\d+$/.test(value);\n};\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n"],"version":3}
1
+ {"file":"helpers.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;MACa,aAAa,GAAG;IAC3B,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,sBAAsB;KAClC;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,OAAO;KACnB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;EACD;AAEF;MACa,iBAAiB,GAAG;IAC/B,aAAa;IACb,mBAAmB;IACnB,WAAW;IACX,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;IACf,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I,QAAQ,CAAC,EAAE,CAAC,MAAM;MAEvB,mBAAmB,GAAG,CACjC,QAAiB,EACjB,OAAoB;IAEpB,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;KACrC;AACH;;;;","names":[],"sources":["src/utils/constants.ts","src/utils/helpers.ts"],"sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\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-expanded\",\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;\nconst icInput = \"ic-input\";\nconst linkIcInput = \"input.ic-input\";\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\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 && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(linkIcInput);\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(icInput);\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\n }\n};\n\n/**\n * This method is used to add a hidden file input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n name: string,\n value: FileList | undefined | null,\n disabled: boolean,\n accept: string\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n const inputs = container.querySelectorAll(linkIcInput);\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.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.files = value;\n input.disabled = disabled;\n input.accept = accept;\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\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 !!el.shadowRoot && !!el.attachShadow;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns 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 \"maxTouchPoints\" in navigator ? navigator.maxTouchPoints > 0 : false;\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 ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === \"anywhere\"\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\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 return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\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 getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\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\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | 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 Array.from(element.children).some(\n (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 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 !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const getForm = (el: HTMLElement): HTMLFormElement => el.closest(\"FORM\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\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): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean => {\n return window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n};\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { I as IcThemeForegroundEnum } from './types.js';
3
- import { h as hexToRgba, f as rgbaStrToObj, j as getCssProperty, k as getParentElement, d as isPropDefined, o as onComponentRequiredPropUndefined, l as getParentElementType } from './helpers.js';
3
+ import { h as hexToRgba, f as rgbaStrToObj, j as getCssProperty, k as getParentElement, l as getParentElementType, d as isPropDefined, o as onComponentRequiredPropUndefined } from './helpers.js';
4
4
  import { d as defineCustomElement$2 } from './ic-typography2.js';
5
5
 
6
6
  const icBadgeCss = "@media (prefers-reduced-motion: no-preference){:host(.show){animation:expand var(--ic-transition-duration-slow)}:host(.hide){animation:shrink var(--ic-transition-duration-slow)}}:host{display:flex;height:var(--ic-space-md);min-width:var(--ic-space-md);width:-moz-fit-content;width:fit-content;border-radius:calc(2 * var(--ic-space-xxl));position:absolute}:host(.neutral){background-color:var(--ic-architectural-500)}:host(.light){background-color:var(--ic-architectural-40)}:host(.info){background-color:var(--ic-status-info)}:host(.warning){background-color:var(--ic-status-warning-mid)}:host(.error){background-color:var(--ic-status-error)}:host(.success){background-color:var(--ic-status-success)}:host(.small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.dot.default){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.dot.small){height:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));min-width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs))}:host(.dot.large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.foreground-dark) ::slotted(*){fill:var(--ic-color-primary-text)}:host(.foreground-light) ::slotted(*){fill:white}:host(.foreground-dark) ic-typography{color:var(--ic-color-primary-text)}:host(.foreground-light) ic-typography{color:white}:host(.text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.text.small) ic-typography{padding:0 0.2132rem}:host(.text.large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.icon.small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.icon.large) ::slotted(svg){width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));height:calc(var(--ic-space-sm) + var(--ic-space-xxxs));padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}:host(.far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.far.small),:host(.dot.far.large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.dot.far),:host(.dot.far.small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.near){top:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));right:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)))}:host(.dot.near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.inline){position:static}:host(.hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}@keyframes expand{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes shrink{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}";
@@ -10,7 +10,6 @@ const Badge = /*@__PURE__*/ proxyCustomElement(class Badge extends HTMLElement {
10
10
  super();
11
11
  this.__registerHost();
12
12
  this.__attachShadow();
13
- this.ariaLabel = null;
14
13
  this.setBadgeColour = () => {
15
14
  let colorRGBA = null;
16
15
  if (this.customColor !== null) {
@@ -93,22 +92,13 @@ const Badge = /*@__PURE__*/ proxyCustomElement(class Badge extends HTMLElement {
93
92
  }
94
93
  return label;
95
94
  };
96
- // Set aria-label on badge and / or parent element
97
- // Aria-describedby seems to not work, probably due to shadow DOM
98
95
  this.setAccessibleLabel = () => {
99
- const parentElType = getParentElementType(this.el);
100
- const parentElAriaLabel = getParentElement(this.el).ariaLabel;
101
- const defaultAriaLabel = this.isAccessibleLabelDefined()
102
- ? this.accessibleLabel
103
- : this.textLabel || "with badge being displayed";
104
96
  if (getParentElement(this.el) !== null) {
105
- if (parentElType !== "IC-CARD" &&
106
- (parentElType !== "IC-TAB" ||
107
- (parentElType === "IC-TAB" && parentElAriaLabel))) {
108
- getParentElement(this.el).ariaLabel = `${parentElAriaLabel ? `${parentElAriaLabel} ,` : ""} ${defaultAriaLabel}`;
97
+ if (getParentElementType(this.el) === "IC-TAB") {
98
+ getParentElement(this.el).setAttribute("aria-describedby", "badge");
109
99
  }
110
100
  else {
111
- this.ariaLabel = `, ${defaultAriaLabel}`;
101
+ getParentElement(this.el).ariaLabel = `badge displaying ${this.accessibleLabel}`;
112
102
  }
113
103
  }
114
104
  };
@@ -128,7 +118,7 @@ const Badge = /*@__PURE__*/ proxyCustomElement(class Badge extends HTMLElement {
128
118
  componentWillLoad() {
129
119
  this.variant === "custom" && this.setBadgeColour();
130
120
  this.getBadgeForeground();
131
- this.setAccessibleLabel();
121
+ this.isAccessibleLabelDefined() && this.setAccessibleLabel();
132
122
  }
133
123
  componentDidLoad() {
134
124
  this.type === "text" &&
@@ -156,7 +146,9 @@ const Badge = /*@__PURE__*/ proxyCustomElement(class Badge extends HTMLElement {
156
146
  [`foreground-${foregroundColour}`]: foregroundColour !== null,
157
147
  ["show"]: visible,
158
148
  ["hide"]: !visible,
159
- }, id: this.el.id || null, "aria-label": this.ariaLabel, role: "status" }, type === "icon" && h("slot", { name: "badge-icon" }), type === "text" && (h("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, this.getTextLabel()))));
149
+ }, id: this.el.id || null, "aria-label": this.isAccessibleLabelDefined()
150
+ ? `badge displaying ${this.accessibleLabel}`
151
+ : "badge being displayed", role: "status" }, type === "icon" && h("slot", { name: "badge-icon" }), type === "text" && (h("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, this.getTextLabel()))));
160
152
  }
161
153
  static get delegatesFocus() { return true; }
162
154
  get el() { return this; }
@@ -1 +1 @@
1
- {"file":"ic-badge.js","mappings":";;;;;AAAA,MAAM,UAAU,GAAG,s/FAAs/F;;MCiC5/F,KAAK;;;;;QACR,cAAS,GAAW,IAAI,CAAC;QAqFzB,mBAAc,GAAG;YACvB,IAAI,SAAS,GAAG,IAAI,CAAC;YACrB,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,EAAE;gBAC7B,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC/C,IAAI,SAAS,KAAK,GAAG,EAAE;oBACrB,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBACzC;qBAAM,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE;oBAC1C,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC5C;gBACD,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;gBACjC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,SAAS,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css?tag=ic-badge&encapsulation=shadow","src/components/ic-badge/ic-badge.tsx"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host(.neutral) {\n background-color: var(--ic-architectural-500);\n}\n\n:host(.light) {\n background-color: var(--ic-architectural-40);\n}\n\n:host(.info) {\n background-color: var(--ic-status-info);\n}\n\n:host(.warning) {\n background-color: var(--ic-status-warning-mid);\n}\n\n:host(.error) {\n background-color: var(--ic-status-error);\n}\n\n:host(.success) {\n background-color: var(--ic-status-success);\n}\n\n:host(.small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.dot.default) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.dot.small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.dot.large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.foreground-dark) ::slotted(*) {\n fill: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.foreground-dark) ic-typography {\n color: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ic-typography {\n color: white;\n}\n\n:host(.text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.text.small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.text.large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.icon.small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.icon.large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.far.small),\n:host(.dot.far.large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.dot.far),\n:host(.dot.far.small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.dot.near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.inline) {\n position: static;\n}\n\n:host(.hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import { Component, Element, Host, Method, Prop, h } from \"@stencil/core\";\nimport {\n IcBadgePositions,\n IcBadgeTypes,\n IcBadgeVariants,\n IcColor,\n} from \"./ic-badge.types\";\nimport {\n IcColorRGBA,\n IcSizes,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport {\n getCssProperty,\n getParentElement,\n getParentElementType,\n hexToRgba,\n isPropDefined,\n onComponentRequiredPropUndefined,\n rgbaStrToObj,\n} from \"../../utils/helpers\";\n\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\n@Component({\n tag: \"ic-badge\",\n styleUrl: \"ic-badge.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Badge {\n private ariaLabel: string = null;\n private customColorRGBA: IcColorRGBA;\n private foregroundColour: IcThemeForeground;\n\n @Element() el: HTMLIcBadgeElement;\n\n /**\n * The accessible label of the badge component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string;\n\n /**\n * The custom badge colour. This will only style the badge component if variant=\"custom\".\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor = null;\n\n /**\n * The maximum number shown on the badge appended with a +.\n * This will only be displayed if type=\"text\" and textLabel is not empty.\n */\n @Prop() maxNumber?: number;\n\n /**\n * The positioning of the badge in reference to the parent element.\n */\n @Prop() position?: IcBadgePositions = \"far\";\n\n /**\n * The size of the badge to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The text displayed in the badge. This will only be displayed if type=\"text\".\n */\n @Prop() textLabel?: string;\n\n /**\n * The type of badge to be displayed.\n */\n @Prop() type?: IcBadgeTypes = \"text\";\n\n /**\n * The variant of the badge to be displayed.\n */\n @Prop() variant?: IcBadgeVariants = \"neutral\";\n\n /**\n * If `true`, the badge will be displayed.\n */\n @Prop({ mutable: true }) visible: boolean = true;\n\n componentWillLoad(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n\n this.getBadgeForeground();\n\n this.setAccessibleLabel();\n }\n\n componentDidLoad(): void {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined(\n [{ prop: this.textLabel, propName: \"text-label\" }],\n \"Badge\"\n );\n }\n\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n @Method()\n async showBadge(): Promise<void> {\n this.visible = true;\n }\n\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n @Method()\n async hideBadge(): Promise<void> {\n this.visible = false;\n }\n\n private setBadgeColour = () => {\n let colorRGBA = null;\n if (this.customColor !== null) {\n const firstChar = this.customColor.slice(0, 1);\n if (firstChar === \"#\") {\n colorRGBA = hexToRgba(this.customColor);\n } else if (firstChar.toLowerCase() === \"r\") {\n colorRGBA = rgbaStrToObj(this.customColor);\n }\n this.customColorRGBA = colorRGBA;\n this.el.style.backgroundColor = `rgba(${colorRGBA.r.toString()}, ${colorRGBA.g.toString()}, ${colorRGBA.b.toString()}, ${colorRGBA.a.toString()})`;\n }\n };\n\n private getBadgeForeground = () => {\n let red: number;\n let green: number;\n let blue: number;\n\n switch (this.variant) {\n case \"custom\":\n red = this.customColorRGBA.r;\n green = this.customColorRGBA.g;\n blue = this.customColorRGBA.b;\n break;\n case \"error\":\n red = parseInt(getCssProperty(\"--ic-status-error-r\"));\n green = parseInt(getCssProperty(\"--ic-status-error-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-error-b\"));\n break;\n case \"success\":\n red = parseInt(getCssProperty(\"--ic-status-success-r\"));\n green = parseInt(getCssProperty(\"--ic-status-success-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-success-b\"));\n break;\n case \"warning\":\n red = parseInt(getCssProperty(\"--ic-status-warning-r\"));\n green = parseInt(getCssProperty(\"--ic-status-warning-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-warning-b\"));\n break;\n case \"info\": {\n const info = hexToRgba(getCssProperty(\"--ic-status-info\"));\n red = info.r;\n green = info.g;\n blue = info.b;\n break;\n }\n case \"neutral\": {\n const neutral = hexToRgba(getCssProperty(\"--ic-architectural-500\"));\n red = neutral.r;\n green = neutral.g;\n blue = neutral.b;\n break;\n }\n case \"light\": {\n const light = hexToRgba(getCssProperty(\"--ic-architectural-40\"));\n red = light.r;\n green = light.g;\n blue = light.b;\n break;\n }\n }\n\n const brightness = (red * 299 + green * 587 + blue * 114) / 1000;\n this.foregroundColour =\n brightness > 133.3505\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n };\n\n private getTextLabel = () => {\n let label;\n if (this.textLabel !== null) {\n if (this.maxNumber !== null) {\n label =\n Number(this.textLabel) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.textLabel;\n } else {\n label = this.textLabel;\n }\n }\n return label;\n };\n\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n private setAccessibleLabel = () => {\n const parentElType = getParentElementType(this.el);\n const parentElAriaLabel = getParentElement(this.el).ariaLabel;\n const defaultAriaLabel = this.isAccessibleLabelDefined()\n ? this.accessibleLabel\n : this.textLabel || \"with badge being displayed\";\n\n if (getParentElement(this.el) !== null) {\n if (\n parentElType !== \"IC-CARD\" &&\n (parentElType !== \"IC-TAB\" ||\n (parentElType === \"IC-TAB\" && parentElAriaLabel))\n ) {\n getParentElement(this.el).ariaLabel = `${\n parentElAriaLabel ? `${parentElAriaLabel} ,` : \"\"\n } ${defaultAriaLabel}`;\n } else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n\n private isAccessibleLabelDefined = () => {\n return isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n };\n\n render() {\n const { position, size, type, variant, foregroundColour, visible } = this;\n\n return (\n <Host\n class={{\n [`${position}`]: true,\n [`${size}`]: true,\n [`${variant}`]: true,\n [`${type}`]: true,\n [`foreground-${foregroundColour}`]: foregroundColour !== null,\n [\"show\"]: visible,\n [\"hide\"]: !visible,\n }}\n id={this.el.id || null}\n aria-label={this.ariaLabel}\n role=\"status\"\n >\n {type === \"icon\" && <slot name=\"badge-icon\"></slot>}\n {type === \"text\" && (\n <ic-typography variant={size === \"small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GAAG,CAAC,OAAO;aACnB,EACD,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,IAAI,gBAEpB,IAAI,CAAC,wBAAwB,EAAE;kBAC3B,oBAAoB,IAAI,CAAC,eAAe,EAAE;kBAC1C,uBAAuB,EAE7B,IAAI,EAAC,QAAQ,IAEZ,IAAI,KAAK,MAAM,IAAI,YAAM,IAAI,EAAC,YAAY,GAAQ,EAClD,IAAI,KAAK,MAAM,KACd,qBAAe,OAAO,EAAE,IAAI,KAAK,OAAO,GAAG,aAAa,GAAG,OAAO,IAC/D,IAAI,CAAC,YAAY,EAAE,CACN,CACjB,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","src/components/ic-badge/ic-badge.tsx"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host(.neutral) {\n background-color: var(--ic-architectural-500);\n}\n\n:host(.light) {\n background-color: var(--ic-architectural-40);\n}\n\n:host(.info) {\n background-color: var(--ic-status-info);\n}\n\n:host(.warning) {\n background-color: var(--ic-status-warning-mid);\n}\n\n:host(.error) {\n background-color: var(--ic-status-error);\n}\n\n:host(.success) {\n background-color: var(--ic-status-success);\n}\n\n:host(.small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.dot.default) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.dot.small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.dot.large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.foreground-dark) ::slotted(*) {\n fill: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.foreground-dark) ic-typography {\n color: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ic-typography {\n color: white;\n}\n\n:host(.text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.text.small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.text.large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.icon.small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.icon.large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.far.small),\n:host(.dot.far.large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.dot.far),\n:host(.dot.far.small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.dot.near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.inline) {\n position: static;\n}\n\n:host(.hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import { Component, Element, Host, Method, Prop, h } from \"@stencil/core\";\nimport {\n IcBadgePositions,\n IcBadgeTypes,\n IcBadgeVariants,\n IcColor,\n} from \"./ic-badge.types\";\nimport {\n IcColorRGBA,\n IcSizes,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport {\n getCssProperty,\n getParentElement,\n getParentElementType,\n hexToRgba,\n isPropDefined,\n onComponentRequiredPropUndefined,\n rgbaStrToObj,\n} from \"../../utils/helpers\";\n\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\n@Component({\n tag: \"ic-badge\",\n styleUrl: \"ic-badge.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Badge {\n private customColorRGBA: IcColorRGBA;\n private foregroundColour: IcThemeForeground;\n\n @Element() el: HTMLIcBadgeElement;\n\n /**\n * The accessible label of the badge component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string;\n\n /**\n * The custom badge colour. This will only style the badge component if variant=\"custom\".\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor = null;\n\n /**\n * The maximum number shown on the badge appended with a +.\n * This will only be displayed if type=\"text\" and textLabel is not empty.\n */\n @Prop() maxNumber?: number;\n\n /**\n * The positioning of the badge in reference to the parent element.\n */\n @Prop() position?: IcBadgePositions = \"far\";\n\n /**\n * The size of the badge to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The text displayed in the badge. This will only be displayed if type=\"text\".\n */\n @Prop() textLabel?: string;\n\n /**\n * The type of badge to be displayed.\n */\n @Prop() type?: IcBadgeTypes = \"text\";\n\n /**\n * The variant of the badge to be displayed.\n */\n @Prop() variant?: IcBadgeVariants = \"neutral\";\n\n /**\n * If `true`, the badge will be displayed.\n */\n @Prop({ mutable: true }) visible: boolean = true;\n\n componentWillLoad(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n\n this.getBadgeForeground();\n\n this.isAccessibleLabelDefined() && this.setAccessibleLabel();\n }\n\n componentDidLoad(): void {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined(\n [{ prop: this.textLabel, propName: \"text-label\" }],\n \"Badge\"\n );\n }\n\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n @Method()\n async showBadge(): Promise<void> {\n this.visible = true;\n }\n\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n @Method()\n async hideBadge(): Promise<void> {\n this.visible = false;\n }\n\n private setBadgeColour = () => {\n let colorRGBA = null;\n if (this.customColor !== null) {\n const firstChar = this.customColor.slice(0, 1);\n if (firstChar === \"#\") {\n colorRGBA = hexToRgba(this.customColor);\n } else if (firstChar.toLowerCase() === \"r\") {\n colorRGBA = rgbaStrToObj(this.customColor);\n }\n this.customColorRGBA = colorRGBA;\n this.el.style.backgroundColor = `rgba(${colorRGBA.r.toString()}, ${colorRGBA.g.toString()}, ${colorRGBA.b.toString()}, ${colorRGBA.a.toString()})`;\n }\n };\n\n private getBadgeForeground = () => {\n let red: number;\n let green: number;\n let blue: number;\n\n switch (this.variant) {\n case \"custom\":\n red = this.customColorRGBA.r;\n green = this.customColorRGBA.g;\n blue = this.customColorRGBA.b;\n break;\n case \"error\":\n red = parseInt(getCssProperty(\"--ic-status-error-r\"));\n green = parseInt(getCssProperty(\"--ic-status-error-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-error-b\"));\n break;\n case \"success\":\n red = parseInt(getCssProperty(\"--ic-status-success-r\"));\n green = parseInt(getCssProperty(\"--ic-status-success-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-success-b\"));\n break;\n case \"warning\":\n red = parseInt(getCssProperty(\"--ic-status-warning-r\"));\n green = parseInt(getCssProperty(\"--ic-status-warning-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-warning-b\"));\n break;\n case \"info\": {\n const info = hexToRgba(getCssProperty(\"--ic-status-info\"));\n red = info.r;\n green = info.g;\n blue = info.b;\n break;\n }\n case \"neutral\": {\n const neutral = hexToRgba(getCssProperty(\"--ic-architectural-500\"));\n red = neutral.r;\n green = neutral.g;\n blue = neutral.b;\n break;\n }\n case \"light\": {\n const light = hexToRgba(getCssProperty(\"--ic-architectural-40\"));\n red = light.r;\n green = light.g;\n blue = light.b;\n break;\n }\n }\n\n const brightness = (red * 299 + green * 587 + blue * 114) / 1000;\n this.foregroundColour =\n brightness > 133.3505\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n };\n\n private getTextLabel = () => {\n let label;\n if (this.textLabel !== null) {\n if (this.maxNumber !== null) {\n label =\n Number(this.textLabel) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.textLabel;\n } else {\n label = this.textLabel;\n }\n }\n return label;\n };\n\n private setAccessibleLabel = () => {\n if (getParentElement(this.el) !== null) {\n if (getParentElementType(this.el) === \"IC-TAB\") {\n getParentElement(this.el).setAttribute(\"aria-describedby\", \"badge\");\n } else {\n getParentElement(\n this.el\n ).ariaLabel = `badge displaying ${this.accessibleLabel}`;\n }\n }\n };\n\n private isAccessibleLabelDefined = () => {\n return isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n };\n\n render() {\n const { position, size, type, variant, foregroundColour, visible } = this;\n\n return (\n <Host\n class={{\n [`${position}`]: true,\n [`${size}`]: true,\n [`${variant}`]: true,\n [`${type}`]: true,\n [`foreground-${foregroundColour}`]: foregroundColour !== null,\n [\"show\"]: visible,\n [\"hide\"]: !visible,\n }}\n id={this.el.id || null}\n aria-label={\n this.isAccessibleLabelDefined()\n ? `badge displaying ${this.accessibleLabel}`\n : \"badge being displayed\"\n }\n role=\"status\"\n >\n {type === \"icon\" && <slot name=\"badge-icon\"></slot>}\n {type === \"text\" && (\n <ic-typography variant={size === \"small\" ? \"badge-small\" : \"badge\"}>\n {this.getTextLabel()}\n </ic-typography>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
2
- import { I as IC_INHERITED_ARIA, r as renderFileHiddenInput, a as removeDisabledFalse, b as inheritAttributes, g as getThemeFromContext, i as isSlotUsed } from './helpers.js';
2
+ import { I as IC_INHERITED_ARIA, r as renderFileHiddenInput, a as inheritAttributes, b as removeDisabledFalse, g as getThemeFromContext, i as isSlotUsed } from './helpers.js';
3
3
  import { I as IcThemeForegroundEnum } from './types.js';
4
4
  import { d as defineCustomElement$3 } from './ic-loading-indicator2.js';
5
5
  import { d as defineCustomElement$2 } from './ic-tooltip2.js';
@@ -9,7 +9,7 @@ const arrowDropdown = `<svg width="24" height="24" viewBox="0 0 24 24" fill="non
9
9
  <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>
10
10
  </svg>`;
11
11
 
12
- const icButtonCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;position:relative;--button-default:var(--ic-action-default);--button-default-hover:var(--ic-action-default-hover);--button-default-active:var(--ic-action-default-active);--button-default-background-hover:var(--ic-action-default-bg-hover);--button-default-background-active:var(--ic-action-default-bg-active);--icon-width:100%;--icon-height:100%}.button,::slotted(a){font-family:var(--ic-font-body-family);text-decoration:none;font-weight:600;font-size:0.875rem;transition:var(--ic-easing-transition-fast);border-radius:var(--ic-border-radius);min-width:var(--min-width, 6.25rem);display:inline-flex;flex-direction:row;justify-content:center;align-items:center;background:none;border:none;box-sizing:border-box;white-space:nowrap;vertical-align:middle}:host(.with-badge) .button{border-radius:0.2188rem}.button:hover,::slotted(a:hover){cursor:pointer}.button:focus,:host .button:focus,:host(.light) .button:focus,::slotted(a:focus){box-shadow:var(--ic-border-focus)}.button:focus-visible,::slotted(a:focus-visible){outline:var(--ic-hc-focus-outline)}:host(.dark) .button,:host(.dark) ::slotted(a){--button-default:var(--ic-action-dark);--button-default-hover:var(--ic-action-dark);--button-default-active:var(--ic-action-dark);--button-default-background-hover:var(--ic-action-dark-bg-hover);--button-default-background-active:var(--ic-action-dark-bg-active)}:host(.light) .button,:host(.light) ::slotted(a){--button-default:var(--ic-action-light);--button-default-hover:var(--ic-action-light);--button-default-active:var(--ic-action-light);--button-default-background-hover:var(--ic-action-light-bg-hover);--button-default-background-active:var(--ic-action-light-bg-active)}:host(.white-background) .button,:host(.white-background) ::slotted(a){--button-default-background-hover:var(--ic-action-default-bg-hover-no-alpha);--button-default-background-active:var(\n --ic-action-default-bg-active-no-alpha\n );background-color:var(--ic-architectural-white)}:host(.white-background.dark) .button,:host(.white-background.dark) ::slotted(a){--button-default-background-hover:var(--ic-action-dark-bg-hover-no-alpha);--button-default-background-active:var(--ic-action-dark-bg-active-no-alpha)}:host(.button-variant-primary.light) .button,:host(.button-variant-primary.light) ::slotted(a){color:var(--ic-color-primary-text);--button-default-hover:var(--ic-action-light-hover);--button-default-active:var(--ic-action-light-active)}:host(.button-variant-primary.dark) .button,:host(.button-variant-primary.dark) ::slotted(a){--button-default-hover:var(--ic-action-dark-hover);--button-default-active:var(--ic-action-dark-active)}:host(.disabled),:host(.disabled) .button,:host(.disabled) ::slotted(a),:host(.loading),:host(.loading) .button{pointer-events:none}:host(.top-icon) .button{flex-direction:column;--height:fit-content}:host(.top-icon) .button .icon-container{margin-right:0}:host(.button-variant-primary) .button,:host(.button-variant-primary) ::slotted(a){color:var(--ic-architectural-white);background-color:var(--button-default)}:host(.button-variant-primary) .button:hover:not(:focus){background-color:var(--button-default-hover)}:host(.button-variant-primary) .button:hover:focus{background-color:var(--button-default-hover);border-color:var(--button-default-hover)}:host(.button-variant-primary:not(.light)) .button:hover:focus,:host(.button-variant-primary:not(.light)) ::slotted(a:hover:focus){color:var(--ic-architectural-white)}:host(.button-variant-primary) .button:active:not(:focus),:host(.button-variant-primary.loading) .button{background-color:var(--button-default-active)}:host(.button-variant-primary) .button:active:focus{background-color:var(--button-default-active)}:host(.button-variant-primary) .button:active{background-color:var(--button-default-active)}:host(.button-variant-primary:not(.light)) .button:active,:host(.button-variant-primary:not(.light)) ::slotted(a:active){color:var(--ic-architectural-white)}:host(.button-variant-primary.disabled) .button,:host(.button-variant-primary.disabled) ::slotted(a){background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-variant-primary.light.disabled) .button,:host(.button-variant-primary.light.disabled) ::slotted(a){background:var(--ic-architectural-600);color:var(--ic-architectural-500)}:host(.button-variant-secondary) .button,:host(.button-variant-secondary) ::slotted(a){border:var(--ic-border-width) solid var(--button-default);color:var(--button-default)}:host(.button-variant-secondary) .button:hover:not(:focus),:host(.button-variant-secondary) .button:hover:focus,:host(.button-variant-secondary) ::slotted(a:hover:not(:focus)),:host(.button-variant-secondary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);border-color:var(--button-default-hover);color:var(--button-default-hover)}:host(.button-variant-secondary) .button:active:not(:focus),:host(.button-variant-secondary) .button:active:focus,:host(.button-variant-secondary) .button:active,:host(.button-variant-secondary) ::slotted(a:active:not(:focus)),:host(.button-variant-secondary) ::slotted(a:active:focus),:host(.button-variant-secondary) ::slotted(a:active){border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.loading) .button{border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.disabled) .button,:host(.button-variant-secondary.disabled) .button:hover,:host(.button-variant-secondary.disabled) .button:active,:host(.button-variant-secondary.disabled) ::slotted(a),:host(.button-variant-secondary.disabled) ::slotted(a:hover),:host(.button-variant-secondary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-secondary.light.disabled) .button,:host(.button-variant-secondary.light.disabled) .button:hover,:host(.button-variant-secondary.light.disabled) .button:active,:host(.button-variant-secondary.light.disabled) ::slotted(a),:host(.button-variant-secondary.light.disabled) ::slotted(a:hover),:host(.button-variant-secondary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-tertiary) .button,:host(.button-variant-tertiary) ::slotted(a){color:var(--button-default)}:host(.button-variant-tertiary) .button:hover:not(:focus),:host(.button-variant-tertiary) .button:hover:focus,:host(.button-variant-tertiary) ::slotted(a:hover:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-tertiary) .button:active:not(:focus),:host(.button-variant-tertiary) .button:active:focus,:host(.button-variant-tertiary) .button:active,:host(.button-variant-tertiary) ::slotted(a:active:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:active:focus),:host(.button-variant-tertiary) ::slotted(a:active),:host(.button-variant-tertiary.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-tertiary.disabled) .button,:host(.button-variant-tertiary.disabled) .button:hover,:host(.button-variant-tertiary.disabled) .button:active,:host(.button-variant-tertiary.disabled) ::slotted(a),:host(.button-variant-tertiary.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-tertiary.light.disabled) .button,:host(.button-variant-tertiary.light.disabled) .button:hover,:host(.button-variant-tertiary.light.disabled) .button:active,:host(.button-variant-tertiary.light.disabled) ::slotted(a),:host(.button-variant-tertiary.light.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-icon) .button,:host(.button-variant-icon) ::slotted(a){color:var(--button-default);min-width:0;gap:var(--ic-space-xs);margin:var(--ic-space-1px) 0}:host(.button-variant-icon) .icon-container{width:var(--ic-space-lg) !important;height:var(--ic-space-lg) !important}:host(.button-variant-icon) .button:hover:not(:focus),:host(.button-variant-icon) .button:hover:focus,:host(.button-variant-icon) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-icon) .button:active:not(:focus),:host(.button-variant-icon) ::slotted(a:active:not(:focus)),:host(.button-variant-icon.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-icon.disabled) .button,:host(.button-variant-icon.disabled) .button:hover,:host(.button-variant-icon.disabled) .button:active,:host(.button-variant-icon.disabled) ::slotted(a),:host(.button-variant-icon.disabled) ::slotted(a:hover),:host(.button-variant-icon.disabled) ::slotted(a:active){color:var(--ic-architectural-300);background:none}:host(.button-variant-destructive) .button,:host(.button-variant-destructive) ::slotted(a){color:var(--ic-architectural-white);background-color:var(--ic-action-destructive);text-transform:uppercase}:host(.button-variant-destructive) .button:hover:not(:focus),:host(.button-variant-destructive) .button:hover:focus{background-color:var(--ic-action-destructive-hover)}:host(.button-variant-destructive) .button:active:not(:focus),:host(.button-variant-destructive) .button:active:focus,:host(.button-variant-destructive.loading) .button{background-color:var(--ic-action-destructive-active)}:host(.button-variant-destructive.disabled) .button,:host(.button-variant-destructive.disabled) ::slotted(a){background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-size-default) .button{height:var(--height, 2.5rem);padding:var(--ic-space-xs) var(--ic-space-md)}:host(.button-size-small) .button{height:var(--height, var(--ic-space-xl));padding:var(--ic-space-xxs) var(--ic-space-md)}:host(.button-size-large) .button{height:var(--height, var(--ic-space-xxl));padding:var(--ic-space-sm) var(--ic-space-md)}:host(.button-size-default.button-variant-icon) .button,:host(.button-size-default.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-xl));width:var(--ic-space-xl);padding:0.375rem}:host(.button-size-small.button-variant-icon) .button,:host(.button-size-small.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-lg));width:var(--ic-space-lg);padding:var(--ic-space-xxs)}:host(.button-size-large.button-variant-icon) .button,:host(.button-size-large.button-variant-icon) ::slotted(a){height:var(--height, 2.5rem);width:2.5rem;padding:var(--ic-space-xs)}:host(.full-width),:host(.full-width) .button,:host(.full-width) ::slotted(a){width:100%}div.loading-container{position:relative;align-items:center;width:100%}ic-loading-indicator{--outer-color:transparent}@keyframes loading-animation{0%{width:0%;left:0%}25%{width:0%;left:0%;opacity:0}50%{width:100%;left:0%;opacity:1}75%{width:0%;left:100%}100%{width:0%;left:100%;opacity:0}}div.icon-container{box-sizing:border-box;width:var(--ic-space-lg);height:var(--ic-space-lg);display:flex;justify-content:center;align-items:center;margin-right:var(--ic-space-xs)}div.right-icon{margin-right:auto;margin-left:var(--ic-space-xs)}::slotted(:not(ic-badge)){width:var(--icon-width) !important;height:var(--icon-height) !important;fill:currentcolor !important;pointer-events:none}:host(.button-variant-icon) .button .icon-container{margin:0;pointer-events:none}:host(.search-submit-button) ::slotted(svg){--icon-height:1.25rem;--icon-width:1.25rem}:host(.search-submit-button-small) ::slotted(svg){--icon-height:1rem;--icon-width:1rem}:host(.clear-button){margin:0 var(--ic-space-xxs)}:host(.clear-button) .button:focus,:host(.calendar-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:not(:active):focus{box-shadow:none;background-color:var(--ic-action-default-bg-hover)}:host(.search-submit-button){display:flex;align-items:center;margin:0 var(--ic-space-xxs)}:host(.menu-close-button) ::slotted(svg){--icon-height:0.875rem;--icon-width:0.875rem}:host(.popout-menu-button) .button{height:var(--height);justify-content:left;border-radius:0;white-space:pre-line;text-align:start}:host(.popout-menu-button) div.icon-container{flex:none}:host(.popout-menu-button) .button:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset)}.ic-button-describedby{display:none}:host .ic-tooltip{display:block}:host .arrow-dropdown{margin-top:auto}:host .dropdown-expanded{transform:rotate(180deg);margin-bottom:var(--ic-space-xxxs)}:host(.dropdown-no-icon) .button{padding-right:var(--ic-space-xs)}slot[name=\"router-item\"]::slotted(a){pointer-events:all}::slotted(a){font-size:0.875rem !important;border:none !important;vertical-align:middle !important}:host(.white-background) ::slotted(a){background-color:var(--ic-architectural-white) !important}:host(.button-variant-primary) ::slotted(a){background-color:var(--button-default) !important}:host(.button-variant-primary) ::slotted(a:hover:not(:focus)),:host(.button-variant-primary) ::slotted(a:hover:focus){background-color:var(--button-default-hover) !important}:host(.button-variant-primary) ::slotted(a:active:not(:focus)),:host(.button-variant-primary) ::slotted(a:active),:host(.button-variant-primary) ::sloted(a:active:focus){background-color:var(--button-default-active) !important}:host(.button-variant-primary.disabled) ::slotted(a),:host(.button-variant-destructive.disabled) ::slotted(a){background:var(--ic-architectural-200) !important}:host(.button-variant-primary.light.disabled) ::slotted(a){background:var(--ic-architectural-600) !important}:host(.button-variant-secondary) ::slotted(a){border:var(--ic-border-width) solid var(--button-default) !important}:host(.button-variant-secondary) ::slotted(a:hover:not(:focus)),:host(.button-variant-secondary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover) !important;border-color:var(--button-default-hover) !important}:host(.button-variant-secondary) ::slotted(a:active:not(:focus)),:host(.button-variant-secondary) ::slotted(a:active:focus),:host(.button-variant-secondary) ::slotted(a:active){border-color:var(--button-default-active) !important;background-color:var(--button-default-background-active) !important}:host(.button-variant-secondary.disabled) ::slotted(a),:host(.button-variant-secondary.disabled) ::slotted(a:hover),:host(.button-variant-secondary.disabled) ::slotted(a:active),:host(.button-variant-tertiary.disabled) ::slotted(a),:host(.button-variant-tertiary.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300) !important;background:none !important}:host(.button-variant-secondary.light.disabled) ::slotted(a),:host(.button-variant-secondary.light.disabled) ::slotted(a:hover),:host(.button-variant-secondary.light.disabled) ::slotted(a:active),:host(.button-variant-tertiary.light.disabled) ::slotted(a),:host(.button-variant-tertiary.light.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500) !important;background:none !important}:host(.button-variant-tertiary) ::slotted(a:hover:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:hover:focus),:host(.button-variant-icon) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover) !important}:host(.button-variant-tertiary) ::slotted(a:active:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:active:focus),:host(.button-variant-tertiary) ::slotted(a:active),:host(.button-variant-icon) ::slotted(a:active:not(:focus)){background-color:var(--button-default-background-active) !important}:host(.button-variant-icon.disabled) ::slotted(a),:host(.button-variant-icon.disabled) ::slotted(a:hover),:host(.button-variant-icon.disabled) ::slotted(a:active){background:none !important}:host(.button-variant-destructive) ::slotted(a){background-color:var(--ic-action-destructive) !important}:host(.button-variant-destructive) ::slotted(a:hover:not(:focus)),:host(.button-variant-destructive) ::slotted(a:hover:focus){background-color:var(--ic-action-destructive-hover) !important}:host(.button-variant-destructive) ::slotted(a:active:not(:focus)),:host(.button-variant-destructive) ::slotted(a:active:focus){background-color:var(--ic-action-destructive-active) !important}:host(.button-size-default) ::slotted(a){height:var(--height, 2.5rem) !important;padding:var(--ic-space-xs) var(--ic-space-md) !important}:host(.button-size-small) ::slotted(a){height:var(--height, var(--ic-space-xl)) !important;padding:var(--ic-space-xxs) var(--ic-space-md) !important}:host(.button-size-large) ::slotted(a){height:var(--height, var(--ic-space-xxl)) !important;padding:var(--ic-space-sm) var(--ic-space-md) !important}:host(.button-size-default.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-xl)) !important;padding:0.375rem !important}:host(.button-size-small.button-variant-icon) ::slotted(a){padding:var(--ic-space-xxs) !important}:host(.button-size-large.button-variant-icon) ::slotted(a){padding:var(--ic-space-xs) !important}@media (forced-colors: active){.button,::slotted(a){border:0.125rem solid transparent !important}}:host(.flip) ::slotted(svg){transform:scaleX(-1)}";
12
+ const icButtonCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;position:relative;--button-default:var(--ic-action-default);--button-default-hover:var(--ic-action-default-hover);--button-default-active:var(--ic-action-default-active);--button-default-background-hover:var(--ic-action-default-bg-hover);--button-default-background-active:var(--ic-action-default-bg-active);--icon-width:100%;--icon-height:100%}.button,::slotted(a){font-family:var(--ic-font-body-family);text-decoration:none;font-weight:600;font-size:0.875rem;transition:var(--ic-easing-transition-fast);border-radius:var(--ic-border-radius);min-width:var(--min-width, 6.25rem);display:inline-flex;flex-direction:row;justify-content:center;align-items:center;background:none;border:none;box-sizing:border-box;white-space:nowrap;vertical-align:middle}:host(.with-badge) .button{border-radius:0.2188rem}.button:hover,::slotted(a:hover){cursor:pointer}.button:focus,:host .button:focus,:host(.light) .button:focus,::slotted(a:focus){box-shadow:var(--ic-border-focus)}.button:focus-visible,::slotted(a:focus-visible){outline:var(--ic-hc-focus-outline)}:host(.dark) .button,:host(.dark) ::slotted(a){--button-default:var(--ic-action-dark);--button-default-hover:var(--ic-action-dark);--button-default-active:var(--ic-action-dark);--button-default-background-hover:var(--ic-action-dark-bg-hover);--button-default-background-active:var(--ic-action-dark-bg-active)}:host(.light) .button,:host(.light) ::slotted(a){--button-default:var(--ic-action-light);--button-default-hover:var(--ic-action-light);--button-default-active:var(--ic-action-light);--button-default-background-hover:var(--ic-action-light-bg-hover);--button-default-background-active:var(--ic-action-light-bg-active)}:host(.white-background) .button,:host(.white-background) ::slotted(a){--button-default-background-hover:var(--ic-action-default-bg-hover-no-alpha);--button-default-background-active:var(\n --ic-action-default-bg-active-no-alpha\n );background-color:var(--ic-architectural-white)}:host(.white-background.dark) .button,:host(.white-background.dark) ::slotted(a){--button-default-background-hover:var(--ic-action-dark-bg-hover-no-alpha);--button-default-background-active:var(--ic-action-dark-bg-active-no-alpha)}:host(.button-variant-primary.light) .button,:host(.button-variant-primary.light) ::slotted(a){color:var(--ic-color-primary-text);--button-default-hover:var(--ic-action-light-hover);--button-default-active:var(--ic-action-light-active)}:host(.button-variant-primary.dark) .button,:host(.button-variant-primary.dark) ::slotted(a){--button-default-hover:var(--ic-action-dark-hover);--button-default-active:var(--ic-action-dark-active)}:host(.disabled),:host(.disabled) .button,:host(.disabled) ::slotted(a),:host(.loading),:host(.loading) .button{pointer-events:none}:host(.top-icon) .button{flex-direction:column;--height:fit-content}:host(.top-icon) .button .icon-container{margin-right:0}:host(.button-variant-primary) .button,:host(.button-variant-primary) ::slotted(a){color:var(--ic-architectural-white);background-color:var(--button-default)}:host(.button-variant-primary) .button:hover:not(:focus){background-color:var(--button-default-hover)}:host(.button-variant-primary) .button:hover:focus{background-color:var(--button-default-hover);border-color:var(--button-default-hover)}:host(.button-variant-primary:not(.light)) .button:hover:focus,:host(.button-variant-primary:not(.light)) ::slotted(a:hover:focus){color:var(--ic-architectural-white)}:host(.button-variant-primary) .button:active:not(:focus),:host(.button-variant-primary.loading) .button{background-color:var(--button-default-active)}:host(.button-variant-primary) .button:active:focus{background-color:var(--button-default-active)}:host(.button-variant-primary) .button:active{background-color:var(--button-default-active)}:host(.button-variant-primary:not(.light)) .button:active,:host(.button-variant-primary:not(.light)) ::slotted(a:active){color:var(--ic-architectural-white)}:host(.button-variant-primary.disabled) .button,:host(.button-variant-primary.disabled) ::slotted(a){background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-variant-primary.light.disabled) .button,:host(.button-variant-primary.light.disabled) ::slotted(a){background:var(--ic-architectural-600);color:var(--ic-architectural-500)}:host(.button-variant-secondary) .button,:host(.button-variant-secondary) ::slotted(a){border:var(--ic-border-width) solid var(--button-default);color:var(--button-default)}:host(.button-variant-secondary) .button:hover:not(:focus),:host(.button-variant-secondary) .button:hover:focus,:host(.button-variant-secondary) ::slotted(a:hover:not(:focus)),:host(.button-variant-secondary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);border-color:var(--button-default-hover);color:var(--button-default-hover)}:host(.button-variant-secondary) .button:active:not(:focus),:host(.button-variant-secondary) .button:active:focus,:host(.button-variant-secondary) .button:active,:host(.button-variant-secondary) ::slotted(a:active:not(:focus)),:host(.button-variant-secondary) ::slotted(a:active:focus),:host(.button-variant-secondary) ::slotted(a:active){border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.loading) .button{border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.disabled) .button,:host(.button-variant-secondary.disabled) .button:hover,:host(.button-variant-secondary.disabled) .button:active,:host(.button-variant-secondary.disabled) ::slotted(a),:host(.button-variant-secondary.disabled) ::slotted(a:hover),:host(.button-variant-secondary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-secondary.light.disabled) .button,:host(.button-variant-secondary.light.disabled) .button:hover,:host(.button-variant-secondary.light.disabled) .button:active,:host(.button-variant-secondary.light.disabled) ::slotted(a),:host(.button-variant-secondary.light.disabled) ::slotted(a:hover),:host(.button-variant-secondary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-tertiary) .button,:host(.button-variant-tertiary) ::slotted(a){color:var(--button-default)}:host(.button-variant-tertiary) .button:hover:not(:focus),:host(.button-variant-tertiary) .button:hover:focus,:host(.button-variant-tertiary) ::slotted(a:hover:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-tertiary) .button:active:not(:focus),:host(.button-variant-tertiary) .button:active:focus,:host(.button-variant-tertiary) .button:active,:host(.button-variant-tertiary) ::slotted(a:active:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:active:focus),:host(.button-variant-tertiary) ::slotted(a:active),:host(.button-variant-tertiary.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-tertiary.disabled) .button,:host(.button-variant-tertiary.disabled) .button:hover,:host(.button-variant-tertiary.disabled) .button:active,:host(.button-variant-tertiary.disabled) ::slotted(a),:host(.button-variant-tertiary.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-tertiary.light.disabled) .button,:host(.button-variant-tertiary.light.disabled) .button:hover,:host(.button-variant-tertiary.light.disabled) .button:active,:host(.button-variant-tertiary.light.disabled) ::slotted(a),:host(.button-variant-tertiary.light.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-icon) .button,:host(.button-variant-icon) ::slotted(a){color:var(--button-default);min-width:0;gap:var(--ic-space-xs);margin:var(--ic-space-1px) 0}:host(.button-variant-icon) .icon-container{width:var(--ic-space-lg) !important;height:var(--ic-space-lg) !important}:host(.button-variant-icon) .button:hover:not(:focus),:host(.button-variant-icon) .button:hover:focus,:host(.button-variant-icon) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-icon) .button:active:not(:focus),:host(.button-variant-icon) ::slotted(a:active:not(:focus)),:host(.button-variant-icon.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-icon.disabled) .button,:host(.button-variant-icon.disabled) .button:hover,:host(.button-variant-icon.disabled) .button:active,:host(.button-variant-icon.disabled) ::slotted(a),:host(.button-variant-icon.disabled) ::slotted(a:hover),:host(.button-variant-icon.disabled) ::slotted(a:active){color:var(--ic-architectural-300);background:none}:host(.button-variant-destructive) .button,:host(.button-variant-destructive) ::slotted(a){color:var(--ic-architectural-white);background-color:var(--ic-action-destructive);text-transform:uppercase}:host(.button-variant-destructive) .button:hover:not(:focus),:host(.button-variant-destructive) .button:hover:focus{background-color:var(--ic-action-destructive-hover)}:host(.button-variant-destructive) .button:active:not(:focus),:host(.button-variant-destructive) .button:active:focus,:host(.button-variant-destructive.loading) .button{background-color:var(--ic-action-destructive-active)}:host(.button-variant-destructive.disabled) .button,:host(.button-variant-destructive.disabled) ::slotted(a){background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-size-default) .button{height:var(--height, 2.5rem);padding:var(--ic-space-xs) var(--ic-space-md)}:host(.button-size-small) .button{height:var(--height, var(--ic-space-xl));padding:var(--ic-space-xxs) var(--ic-space-md)}:host(.button-size-large) .button{height:var(--height, var(--ic-space-xxl));padding:var(--ic-space-sm) var(--ic-space-md)}:host(.button-size-default.button-variant-icon) .button,:host(.button-size-default.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-xl));width:var(--ic-space-xl);padding:0.375rem}:host(.button-size-small.button-variant-icon) .button,:host(.button-size-small.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-lg));width:var(--ic-space-lg);padding:var(--ic-space-xxs)}:host(.button-size-large.button-variant-icon) .button,:host(.button-size-large.button-variant-icon) ::slotted(a){height:var(--height, 2.5rem);width:2.5rem;padding:var(--ic-space-xs)}:host(.full-width),:host(.full-width) .button,:host(.full-width) ::slotted(a){width:100%}div.loading-container{position:relative;align-items:center;width:100%}ic-loading-indicator{--outer-color:transparent}@keyframes loading-animation{0%{width:0%;left:0%}25%{width:0%;left:0%;opacity:0}50%{width:100%;left:0%;opacity:1}75%{width:0%;left:100%}100%{width:0%;left:100%;opacity:0}}div.icon-container{box-sizing:border-box;width:var(--ic-space-lg);height:var(--ic-space-lg);display:flex;justify-content:center;align-items:center;margin-right:var(--ic-space-xs)}div.right-icon{margin-right:auto;margin-left:var(--ic-space-xs)}::slotted(:not(ic-badge)){width:var(--icon-width) !important;height:var(--icon-height) !important;fill:currentcolor !important;pointer-events:none}:host(.button-variant-icon) .button .icon-container{margin:0;pointer-events:none}:host(.search-submit-button) ::slotted(svg){--icon-height:1.25rem;--icon-width:1.25rem}:host(.search-submit-button-small) ::slotted(svg){--icon-height:1rem;--icon-width:1rem}:host(.clear-button){margin:0 var(--ic-space-xxs)}:host(.clear-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:not(:active):focus{box-shadow:none;background-color:var(--ic-action-default-bg-hover)}:host(.search-submit-button){display:flex;align-items:center;margin:0 var(--ic-space-xxs)}:host(.menu-close-button) ::slotted(svg){--icon-height:0.875rem;--icon-width:0.875rem}:host(.popout-menu-button) .button{height:var(--height);justify-content:left;border-radius:0;white-space:pre-line;text-align:start}:host(.popout-menu-button) div.icon-container{flex:none}:host(.popout-menu-button) .button:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset)}.ic-button-describedby{display:none}:host .ic-tooltip{display:block}:host .arrow-dropdown{margin-top:auto}:host .dropdown-expanded{transform:rotate(180deg);margin-bottom:var(--ic-space-xxxs)}:host(.dropdown-no-icon) .button{padding-right:var(--ic-space-xs)}slot[name=\"router-item\"]::slotted(a){pointer-events:all}::slotted(a){font-size:0.875rem !important;border:none !important;vertical-align:middle !important}:host(.white-background) ::slotted(a){background-color:var(--ic-architectural-white) !important}:host(.button-variant-primary) ::slotted(a){background-color:var(--button-default) !important}:host(.button-variant-primary) ::slotted(a:hover:not(:focus)),:host(.button-variant-primary) ::slotted(a:hover:focus){background-color:var(--button-default-hover) !important}:host(.button-variant-primary) ::slotted(a:active:not(:focus)),:host(.button-variant-primary) ::slotted(a:active),:host(.button-variant-primary) ::sloted(a:active:focus){background-color:var(--button-default-active) !important}:host(.button-variant-primary.disabled) ::slotted(a),:host(.button-variant-destructive.disabled) ::slotted(a){background:var(--ic-architectural-200) !important}:host(.button-variant-primary.light.disabled) ::slotted(a){background:var(--ic-architectural-600) !important}:host(.button-variant-secondary) ::slotted(a){border:var(--ic-border-width) solid var(--button-default) !important}:host(.button-variant-secondary) ::slotted(a:hover:not(:focus)),:host(.button-variant-secondary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover) !important;border-color:var(--button-default-hover) !important}:host(.button-variant-secondary) ::slotted(a:active:not(:focus)),:host(.button-variant-secondary) ::slotted(a:active:focus),:host(.button-variant-secondary) ::slotted(a:active){border-color:var(--button-default-active) !important;background-color:var(--button-default-background-active) !important}:host(.button-variant-secondary.disabled) ::slotted(a),:host(.button-variant-secondary.disabled) ::slotted(a:hover),:host(.button-variant-secondary.disabled) ::slotted(a:active),:host(.button-variant-tertiary.disabled) ::slotted(a),:host(.button-variant-tertiary.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300) !important;background:none !important}:host(.button-variant-secondary.light.disabled) ::slotted(a),:host(.button-variant-secondary.light.disabled) ::slotted(a:hover),:host(.button-variant-secondary.light.disabled) ::slotted(a:active),:host(.button-variant-tertiary.light.disabled) ::slotted(a),:host(.button-variant-tertiary.light.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500) !important;background:none !important}:host(.button-variant-tertiary) ::slotted(a:hover:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:hover:focus),:host(.button-variant-icon) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover) !important}:host(.button-variant-tertiary) ::slotted(a:active:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:active:focus),:host(.button-variant-tertiary) ::slotted(a:active),:host(.button-variant-icon) ::slotted(a:active:not(:focus)){background-color:var(--button-default-background-active) !important}:host(.button-variant-icon.disabled) ::slotted(a),:host(.button-variant-icon.disabled) ::slotted(a:hover),:host(.button-variant-icon.disabled) ::slotted(a:active){background:none !important}:host(.button-variant-destructive) ::slotted(a){background-color:var(--ic-action-destructive) !important}:host(.button-variant-destructive) ::slotted(a:hover:not(:focus)),:host(.button-variant-destructive) ::slotted(a:hover:focus){background-color:var(--ic-action-destructive-hover) !important}:host(.button-variant-destructive) ::slotted(a:active:not(:focus)),:host(.button-variant-destructive) ::slotted(a:active:focus){background-color:var(--ic-action-destructive-active) !important}:host(.button-size-default) ::slotted(a){height:var(--height, 2.5rem) !important;padding:var(--ic-space-xs) var(--ic-space-md) !important}:host(.button-size-small) ::slotted(a){height:var(--height, var(--ic-space-xl)) !important;padding:var(--ic-space-xxs) var(--ic-space-md) !important}:host(.button-size-large) ::slotted(a){height:var(--height, var(--ic-space-xxl)) !important;padding:var(--ic-space-sm) var(--ic-space-md) !important}:host(.button-size-default.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-xl)) !important;padding:0.375rem !important}:host(.button-size-small.button-variant-icon) ::slotted(a){padding:var(--ic-space-xxs) !important}:host(.button-size-large.button-variant-icon) ::slotted(a){padding:var(--ic-space-xs) !important}@media (forced-colors: active){.button,::slotted(a){border:0.125rem solid transparent !important}}:host(.flip) ::slotted(svg){transform:scaleX(-1)}";
13
13
 
14
14
  var __rest = (undefined && undefined.__rest) || function (s, e) {
15
15
  var t = {};
@@ -148,9 +148,6 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
148
148
  this.type = "button";
149
149
  this.variant = "primary";
150
150
  }
151
- watchDisabledHandler() {
152
- removeDisabledFalse(this.disabled, this.el);
153
- }
154
151
  disconnectedCallback() {
155
152
  if (this.mutationObserver !== null && this.mutationObserver !== undefined) {
156
153
  this.mutationObserver.disconnect();
@@ -348,9 +345,6 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
348
345
  }
349
346
  static get delegatesFocus() { return true; }
350
347
  get el() { return this; }
351
- static get watchers() { return {
352
- "disabled": ["watchDisabledHandler"]
353
- }; }
354
348
  static get style() { return icButtonCss; }
355
349
  }, [17, "ic-button", {
356
350
  "accept": [1],
@@ -388,9 +382,7 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
388
382
  "describedByContent": [32],
389
383
  "title": [32],
390
384
  "setFocus": [64]
391
- }, [[2, "click", "handleHostClick"], [4, "themeChange", "themeChangeHandler"]], {
392
- "disabled": ["watchDisabledHandler"]
393
- }]);
385
+ }, [[2, "click", "handleHostClick"], [4, "themeChange", "themeChangeHandler"]]]);
394
386
  function defineCustomElement() {
395
387
  if (typeof customElements === "undefined") {
396
388
  return;