@ukic/web-components 2.1.0-beta.15 → 2.1.0-beta.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (744) hide show
  1. package/dist/cjs/core.cjs.js +10 -3
  2. package/dist/cjs/core.cjs.js.map +1 -1
  3. package/dist/cjs/{helpers-d6b5880e.js → helpers-eb53c416.js} +7 -1
  4. package/dist/cjs/helpers-eb53c416.js.map +1 -0
  5. package/dist/cjs/ic-alert.cjs.entry.js +2 -2
  6. package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -2
  7. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -2
  8. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
  9. package/dist/cjs/ic-button_3.cjs.entry.js +31 -31
  10. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-card.cjs.entry.js +4 -3
  12. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -2
  14. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox.cjs.entry.js +3 -2
  16. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-chip.cjs.entry.js +5 -2
  18. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-data-entity.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
  22. package/dist/cjs/ic-dialog.cjs.entry.js +296 -0
  23. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -0
  24. package/dist/cjs/ic-divider.cjs.entry.js +2 -2
  25. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  26. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  27. package/dist/cjs/ic-footer.cjs.entry.js +3 -3
  28. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-hero.cjs.entry.js +2 -2
  30. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +2 -2
  31. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +65 -26
  32. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-input-label_2.cjs.entry.js +3 -3
  34. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-link.cjs.entry.js +2 -2
  36. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-menu-item.cjs.entry.js +4 -3
  38. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
  40. package/dist/cjs/ic-navigation-group.cjs.entry.js +44 -18
  41. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -2
  43. package/dist/cjs/ic-navigation-menu.cjs.entry.js +2 -2
  44. package/dist/cjs/ic-page-header.cjs.entry.js +3 -3
  45. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-pagination-item.cjs.entry.js +6 -1
  47. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-pagination.cjs.entry.js +3 -2
  49. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-popover-menu.cjs.entry.js +3 -3
  51. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-radio-group.cjs.entry.js +16 -5
  53. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-radio-option.cjs.entry.js +5 -11
  55. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-search-bar.cjs.entry.js +6 -3
  57. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-select.cjs.entry.js +34 -32
  60. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-side-navigation.cjs.entry.js +51 -42
  62. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-skeleton.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  65. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
  68. package/dist/cjs/ic-switch.cjs.entry.js +4 -3
  69. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  72. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-tab.cjs.entry.js +5 -1
  75. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-text-field.cjs.entry.js +4 -5
  77. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-theme.cjs.entry.js +2 -2
  79. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  80. package/dist/cjs/ic-toast.cjs.entry.js +2 -2
  81. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  82. package/dist/cjs/ic-typography.cjs.entry.js +2 -2
  83. package/dist/cjs/{index-a62312a7.js → index-014e3058.js} +222 -43
  84. package/dist/cjs/index-014e3058.js.map +1 -0
  85. package/dist/cjs/loader.cjs.js +4 -3
  86. package/dist/cjs/loader.cjs.js.map +1 -1
  87. package/dist/collection/collection-manifest.json +13 -12
  88. package/dist/collection/components/ic-alert/ic-alert.e2e.js +16 -0
  89. package/dist/collection/components/ic-alert/ic-alert.e2e.js.map +1 -0
  90. package/dist/collection/components/ic-alert/ic-alert.spec.js +182 -0
  91. package/dist/collection/components/ic-alert/ic-alert.spec.js.map +1 -0
  92. package/dist/collection/components/ic-back-to-top/ic-back-to-top.e2e.js +68 -0
  93. package/dist/collection/components/ic-back-to-top/ic-back-to-top.e2e.js.map +1 -0
  94. package/dist/collection/components/ic-back-to-top/ic-back-to-top.spec.js +123 -0
  95. package/dist/collection/components/ic-back-to-top/ic-back-to-top.spec.js.map +1 -0
  96. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.spec.js +118 -0
  97. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.spec.js.map +1 -0
  98. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.e2e.js +41 -0
  99. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.e2e.js.map +1 -0
  100. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.spec.js +181 -0
  101. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.spec.js.map +1 -0
  102. package/dist/collection/components/ic-button/ic-button.e2e.js +173 -0
  103. package/dist/collection/components/ic-button/ic-button.e2e.js.map +1 -0
  104. package/dist/collection/components/ic-button/ic-button.js +3 -2
  105. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  106. package/dist/collection/components/ic-button/ic-button.spec.js +230 -0
  107. package/dist/collection/components/ic-button/ic-button.spec.js.map +1 -0
  108. package/dist/collection/components/ic-card/ic-card.css +3 -2
  109. package/dist/collection/components/ic-card/ic-card.e2e.js +23 -0
  110. package/dist/collection/components/ic-card/ic-card.e2e.js.map +1 -0
  111. package/dist/collection/components/ic-card/ic-card.js +2 -1
  112. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  113. package/dist/collection/components/ic-card/ic-card.spec.js +152 -0
  114. package/dist/collection/components/ic-card/ic-card.spec.js.map +1 -0
  115. package/dist/collection/components/ic-checkbox/ic-checkbox.js +2 -1
  116. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  117. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.e2e.js +201 -0
  118. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.e2e.js.map +1 -0
  119. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +4 -1
  120. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  121. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.spec.js +175 -0
  122. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.spec.js.map +1 -0
  123. package/dist/collection/components/ic-chip/ic-chip.js +4 -1
  124. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  125. package/dist/collection/components/ic-chip/ic-chip.spec.js +110 -0
  126. package/dist/collection/components/ic-chip/ic-chip.spec.js.map +1 -0
  127. package/dist/collection/components/ic-classification-banner/ic-classification-banner.spec.js +140 -0
  128. package/dist/collection/components/ic-classification-banner/ic-classification-banner.spec.js.map +1 -0
  129. package/dist/collection/components/ic-data-entity/ic-data-entity.spec.js +161 -0
  130. package/dist/collection/components/ic-data-entity/ic-data-entity.spec.js.map +1 -0
  131. package/dist/collection/components/ic-data-row/ic-data-row.spec.js +185 -0
  132. package/dist/collection/components/ic-data-row/ic-data-row.spec.js.map +1 -0
  133. package/dist/collection/components/ic-dialog/ic-dialog.css +595 -0
  134. package/dist/collection/components/ic-dialog/ic-dialog.e2e.js +204 -0
  135. package/dist/collection/components/ic-dialog/ic-dialog.e2e.js.map +1 -0
  136. package/dist/collection/components/ic-dialog/ic-dialog.js +641 -0
  137. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -0
  138. package/dist/collection/components/ic-dialog/ic-dialog.spec.js +520 -0
  139. package/dist/collection/components/ic-dialog/ic-dialog.spec.js.map +1 -0
  140. package/dist/collection/components/ic-dialog/ic-dialog.test.a11y.js +28 -0
  141. package/dist/collection/components/ic-dialog/ic-dialog.test.a11y.js.map +1 -0
  142. package/dist/collection/components/ic-divider/ic-divider.spec.js +24 -0
  143. package/dist/collection/components/ic-divider/ic-divider.spec.js.map +1 -0
  144. package/dist/collection/components/ic-footer/ic-footer.e2e.js +50 -0
  145. package/dist/collection/components/ic-footer/ic-footer.e2e.js.map +1 -0
  146. package/dist/collection/components/ic-footer/ic-footer.js +1 -1
  147. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  148. package/dist/collection/components/ic-footer/ic-footer.spec.js +140 -0
  149. package/dist/collection/components/ic-footer/ic-footer.spec.js.map +1 -0
  150. package/dist/collection/components/ic-footer-link/ic-footer-link.spec.js +62 -0
  151. package/dist/collection/components/ic-footer-link/ic-footer-link.spec.js.map +1 -0
  152. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.spec.js +98 -0
  153. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.spec.js.map +1 -0
  154. package/dist/collection/components/ic-hero/ic-hero.spec.js +76 -0
  155. package/dist/collection/components/ic-hero/ic-hero.spec.js.map +1 -0
  156. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.spec.js +180 -0
  157. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.spec.js.map +1 -0
  158. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +32 -4
  159. package/dist/collection/components/ic-input-component-container/ic-input-component-container.spec.js +117 -0
  160. package/dist/collection/components/ic-input-component-container/ic-input-component-container.spec.js.map +1 -0
  161. package/dist/collection/components/ic-input-container/ic-input-container.spec.js +38 -0
  162. package/dist/collection/components/ic-input-container/ic-input-container.spec.js.map +1 -0
  163. package/dist/collection/components/ic-input-label/ic-input-label.spec.js +98 -0
  164. package/dist/collection/components/ic-input-label/ic-input-label.spec.js.map +1 -0
  165. package/dist/collection/components/ic-input-validation/ic-input-validation.css +0 -8
  166. package/dist/collection/components/ic-input-validation/ic-input-validation.spec.js +89 -0
  167. package/dist/collection/components/ic-input-validation/ic-input-validation.spec.js.map +1 -0
  168. package/dist/collection/components/ic-link/ic-link.spec.js +203 -0
  169. package/dist/collection/components/ic-link/ic-link.spec.js.map +1 -0
  170. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.e2e.js +34 -0
  171. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.e2e.js.map +1 -0
  172. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.spec.js +141 -0
  173. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.spec.js.map +1 -0
  174. package/dist/collection/components/ic-menu/ic-menu.css +9 -1
  175. package/dist/collection/components/ic-menu/ic-menu.js +85 -22
  176. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  177. package/dist/collection/components/ic-menu/ic-menu.spec.js +650 -0
  178. package/dist/collection/components/ic-menu/ic-menu.spec.js.map +1 -0
  179. package/dist/collection/components/ic-menu-group/ic-menu-group.spec.js +94 -0
  180. package/dist/collection/components/ic-menu-group/ic-menu-group.spec.js.map +1 -0
  181. package/dist/collection/components/ic-menu-item/ic-menu-item.css +2 -2
  182. package/dist/collection/components/ic-menu-item/ic-menu-item.js +2 -1
  183. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  184. package/dist/collection/components/ic-menu-item/ic-menu-item.spec.js +105 -0
  185. package/dist/collection/components/ic-menu-item/ic-menu-item.spec.js.map +1 -0
  186. package/dist/collection/components/ic-navigation-button/ic-navigation-button.spec.js +84 -0
  187. package/dist/collection/components/ic-navigation-button/ic-navigation-button.spec.js.map +1 -0
  188. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -1
  189. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +41 -15
  190. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  191. package/dist/collection/components/ic-navigation-group/ic-navigation-group.spec.js +309 -0
  192. package/dist/collection/components/ic-navigation-group/ic-navigation-group.spec.js.map +1 -0
  193. package/dist/collection/components/ic-navigation-item/ic-navigation-item.spec.js +118 -0
  194. package/dist/collection/components/ic-navigation-item/ic-navigation-item.spec.js.map +1 -0
  195. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.e2e.js +29 -0
  196. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.e2e.js.map +1 -0
  197. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.spec.js +176 -0
  198. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.spec.js.map +1 -0
  199. package/dist/collection/components/ic-page-header/ic-page-header.css +1 -1
  200. package/dist/collection/components/ic-page-header/ic-page-header.e2e.js +177 -0
  201. package/dist/collection/components/ic-page-header/ic-page-header.e2e.js.map +1 -0
  202. package/dist/collection/components/ic-page-header/ic-page-header.spec.js +284 -0
  203. package/dist/collection/components/ic-page-header/ic-page-header.spec.js.map +1 -0
  204. package/dist/collection/components/ic-pagination/ic-pagination.e2e.js +128 -0
  205. package/dist/collection/components/ic-pagination/ic-pagination.e2e.js.map +1 -0
  206. package/dist/collection/components/ic-pagination/ic-pagination.js +3 -2
  207. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  208. package/dist/collection/components/ic-pagination/ic-pagination.spec.js +325 -0
  209. package/dist/collection/components/ic-pagination/ic-pagination.spec.js.map +1 -0
  210. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +5 -1
  211. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
  212. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +1 -1
  213. package/dist/collection/components/ic-popover-menu/ic-popover-menu.e2e.js +30 -0
  214. package/dist/collection/components/ic-popover-menu/ic-popover-menu.e2e.js.map +1 -0
  215. package/dist/collection/components/ic-popover-menu/ic-popover-menu.spec.js +381 -0
  216. package/dist/collection/components/ic-popover-menu/ic-popover-menu.spec.js.map +1 -0
  217. package/dist/collection/components/ic-radio-group/ic-radio-group.e2e.js +343 -0
  218. package/dist/collection/components/ic-radio-group/ic-radio-group.e2e.js.map +1 -0
  219. package/dist/collection/components/ic-radio-group/ic-radio-group.js +19 -8
  220. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  221. package/dist/collection/components/ic-radio-group/ic-radio-group.spec.js +303 -0
  222. package/dist/collection/components/ic-radio-group/ic-radio-group.spec.js.map +1 -0
  223. package/dist/collection/components/ic-radio-group/ic-radio-group.types.js +2 -0
  224. package/dist/collection/components/ic-radio-group/ic-radio-group.types.js.map +1 -0
  225. package/dist/collection/components/ic-radio-option/ic-radio-option.css +1 -1
  226. package/dist/collection/components/ic-radio-option/ic-radio-option.js +5 -14
  227. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  228. package/dist/collection/components/ic-search-bar/ic-search-bar.e2e.js +1054 -0
  229. package/dist/collection/components/ic-search-bar/ic-search-bar.e2e.js.map +1 -0
  230. package/dist/collection/components/ic-search-bar/ic-search-bar.js +12 -9
  231. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  232. package/dist/collection/components/ic-search-bar/ic-search-bar.spec.js +570 -0
  233. package/dist/collection/components/ic-search-bar/ic-search-bar.spec.js.map +1 -0
  234. package/dist/collection/components/ic-search-bar/ic-search-bar.types.js.map +1 -1
  235. package/dist/collection/components/ic-section-container/ic-section-container.spec.js +69 -0
  236. package/dist/collection/components/ic-section-container/ic-section-container.spec.js.map +1 -0
  237. package/dist/collection/components/ic-select/ic-select.e2e.js +1765 -0
  238. package/dist/collection/components/ic-select/ic-select.e2e.js.map +1 -0
  239. package/dist/collection/components/ic-select/ic-select.js +35 -33
  240. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  241. package/dist/collection/components/ic-select/ic-select.spec.js +1276 -0
  242. package/dist/collection/components/ic-select/ic-select.spec.js.map +1 -0
  243. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +0 -7
  244. package/dist/collection/components/ic-side-navigation/ic-side-navigation.e2e.js +412 -0
  245. package/dist/collection/components/ic-side-navigation/ic-side-navigation.e2e.js.map +1 -0
  246. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +48 -39
  247. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  248. package/dist/collection/components/ic-side-navigation/ic-side-navigation.spec.js +470 -0
  249. package/dist/collection/components/ic-side-navigation/ic-side-navigation.spec.js.map +1 -0
  250. package/dist/collection/components/ic-skeleton/ic-skeleton.spec.js +89 -0
  251. package/dist/collection/components/ic-skeleton/ic-skeleton.spec.js.map +1 -0
  252. package/dist/collection/components/ic-status-tag/ic-status-tag.css +2 -6
  253. package/dist/collection/components/ic-status-tag/ic-status-tag.spec.js +43 -0
  254. package/dist/collection/components/ic-status-tag/ic-status-tag.spec.js.map +1 -0
  255. package/dist/collection/components/ic-step/ic-step.spec.js +176 -0
  256. package/dist/collection/components/ic-step/ic-step.spec.js.map +1 -0
  257. package/dist/collection/components/ic-stepper/ic-stepper.e2e.js +49 -0
  258. package/dist/collection/components/ic-stepper/ic-stepper.e2e.js.map +1 -0
  259. package/dist/collection/components/ic-stepper/ic-stepper.spec.js +706 -0
  260. package/dist/collection/components/ic-stepper/ic-stepper.spec.js.map +1 -0
  261. package/dist/collection/components/ic-switch/ic-switch.css +1 -1
  262. package/dist/collection/components/ic-switch/ic-switch.js +2 -1
  263. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  264. package/dist/collection/components/ic-switch/ic-switch.spec.js +104 -0
  265. package/dist/collection/components/ic-switch/ic-switch.spec.js.map +1 -0
  266. package/dist/collection/components/ic-tab/ic-tab.e2e.js +32 -0
  267. package/dist/collection/components/ic-tab/ic-tab.e2e.js.map +1 -0
  268. package/dist/collection/components/ic-tab/ic-tab.js +4 -0
  269. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  270. package/dist/collection/components/ic-tab/ic-tab.spec.js +159 -0
  271. package/dist/collection/components/ic-tab/ic-tab.spec.js.map +1 -0
  272. package/dist/collection/components/ic-tab-context/ic-tab-context.e2e.js +317 -0
  273. package/dist/collection/components/ic-tab-context/ic-tab-context.e2e.js.map +1 -0
  274. package/dist/collection/components/ic-tab-context/ic-tab-context.spec.js +369 -0
  275. package/dist/collection/components/ic-tab-context/ic-tab-context.spec.js.map +1 -0
  276. package/dist/collection/components/ic-tab-group/ic-tab-group.css +2 -2
  277. package/dist/collection/components/ic-tab-panel/ic-tab-panel.spec.js +65 -0
  278. package/dist/collection/components/ic-tab-panel/ic-tab-panel.spec.js.map +1 -0
  279. package/dist/collection/components/ic-text-field/ic-text-field.css +0 -4
  280. package/dist/collection/components/ic-text-field/ic-text-field.e2e.js +98 -0
  281. package/dist/collection/components/ic-text-field/ic-text-field.e2e.js.map +1 -0
  282. package/dist/collection/components/ic-text-field/ic-text-field.input.spec.js +236 -0
  283. package/dist/collection/components/ic-text-field/ic-text-field.input.spec.js.map +1 -0
  284. package/dist/collection/components/ic-text-field/ic-text-field.js +11 -12
  285. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  286. package/dist/collection/components/ic-text-field/ic-text-field.textarea.spec.js +310 -0
  287. package/dist/collection/components/ic-text-field/ic-text-field.textarea.spec.js.map +1 -0
  288. package/dist/collection/components/ic-theme/ic-theme.e2e.js +72 -0
  289. package/dist/collection/components/ic-theme/ic-theme.e2e.js.map +1 -0
  290. package/dist/collection/components/ic-theme/ic-theme.spec.js +77 -0
  291. package/dist/collection/components/ic-theme/ic-theme.spec.js.map +1 -0
  292. package/dist/collection/components/ic-toast/ic-toast.e2e.js +82 -0
  293. package/dist/collection/components/ic-toast/ic-toast.e2e.js.map +1 -0
  294. package/dist/collection/components/ic-toast/ic-toast.spec.js +278 -0
  295. package/dist/collection/components/ic-toast/ic-toast.spec.js.map +1 -0
  296. package/dist/collection/components/ic-toast-region/ic-toast-region.spec.js +62 -0
  297. package/dist/collection/components/ic-toast-region/ic-toast-region.spec.js.map +1 -0
  298. package/dist/collection/components/ic-tooltip/ic-tooltip.css +22 -8
  299. package/dist/collection/components/ic-tooltip/ic-tooltip.e2e.js +115 -0
  300. package/dist/collection/components/ic-tooltip/ic-tooltip.e2e.js.map +1 -0
  301. package/dist/collection/components/ic-tooltip/ic-tooltip.js +26 -27
  302. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  303. package/dist/collection/components/ic-tooltip/ic-tooltip.spec.js +128 -0
  304. package/dist/collection/components/ic-tooltip/ic-tooltip.spec.js.map +1 -0
  305. package/dist/collection/components/ic-top-navigation/ic-top-navigation.e2e.js +42 -0
  306. package/dist/collection/components/ic-top-navigation/ic-top-navigation.e2e.js.map +1 -0
  307. package/dist/collection/components/ic-top-navigation/ic-top-navigation.mobile.e2e.js +242 -0
  308. package/dist/collection/components/ic-top-navigation/ic-top-navigation.mobile.e2e.js.map +1 -0
  309. package/dist/collection/components/ic-top-navigation/ic-top-navigation.spec.js +286 -0
  310. package/dist/collection/components/ic-top-navigation/ic-top-navigation.spec.js.map +1 -0
  311. package/dist/collection/components/ic-typography/ic-typography.e2e.js +36 -0
  312. package/dist/collection/components/ic-typography/ic-typography.e2e.js.map +1 -0
  313. package/dist/collection/components/ic-typography/ic-typography.spec.js +296 -0
  314. package/dist/collection/components/ic-typography/ic-typography.spec.js.map +1 -0
  315. package/dist/collection/testspec.setup.js +11 -0
  316. package/dist/collection/testspec.setup.js.map +1 -1
  317. package/dist/collection/utils/helpers.js +5 -0
  318. package/dist/collection/utils/helpers.js.map +1 -1
  319. package/dist/components/helpers.js +6 -1
  320. package/dist/components/helpers.js.map +1 -1
  321. package/dist/components/ic-alert.js +1 -113
  322. package/dist/components/ic-alert.js.map +1 -1
  323. package/dist/components/ic-alert2.js +117 -0
  324. package/dist/components/ic-alert2.js.map +1 -0
  325. package/dist/components/ic-back-to-top.js +2 -2
  326. package/dist/components/ic-breadcrumb-group.js +2 -2
  327. package/dist/components/ic-breadcrumb2.js +1 -1
  328. package/dist/components/ic-button2.js +4 -3
  329. package/dist/components/ic-button2.js.map +1 -1
  330. package/dist/components/ic-card.js +4 -3
  331. package/dist/components/ic-card.js.map +1 -1
  332. package/dist/components/ic-checkbox-group.js +5 -2
  333. package/dist/components/ic-checkbox-group.js.map +1 -1
  334. package/dist/components/ic-checkbox.js +3 -2
  335. package/dist/components/ic-checkbox.js.map +1 -1
  336. package/dist/components/ic-chip.js +5 -2
  337. package/dist/components/ic-chip.js.map +1 -1
  338. package/dist/components/ic-classification-banner.js +1 -1
  339. package/dist/components/ic-data-entity.js +1 -1
  340. package/dist/components/ic-data-row.js +2 -2
  341. package/dist/components/ic-dialog.d.ts +11 -0
  342. package/dist/components/ic-dialog.js +357 -0
  343. package/dist/components/ic-dialog.js.map +1 -0
  344. package/dist/components/ic-divider2.js +2 -2
  345. package/dist/components/ic-footer-link-group.js +2 -2
  346. package/dist/components/ic-footer-link.js +2 -2
  347. package/dist/components/ic-footer.js +3 -3
  348. package/dist/components/ic-footer.js.map +1 -1
  349. package/dist/components/ic-hero.js +2 -2
  350. package/dist/components/ic-horizontal-scroll2.js +2 -2
  351. package/dist/components/ic-input-component-container2.js +3 -3
  352. package/dist/components/ic-input-component-container2.js.map +1 -1
  353. package/dist/components/ic-input-container2.js +1 -1
  354. package/dist/components/ic-input-label2.js +2 -2
  355. package/dist/components/ic-input-validation2.js +3 -3
  356. package/dist/components/ic-input-validation2.js.map +1 -1
  357. package/dist/components/ic-link2.js +2 -2
  358. package/dist/components/ic-loading-indicator2.js +1 -1
  359. package/dist/components/ic-menu-group.js +1 -1
  360. package/dist/components/ic-menu-item2.js +4 -3
  361. package/dist/components/ic-menu-item2.js.map +1 -1
  362. package/dist/components/ic-menu2.js +65 -26
  363. package/dist/components/ic-menu2.js.map +1 -1
  364. package/dist/components/ic-navigation-button.js +2 -2
  365. package/dist/components/ic-navigation-group.js +44 -18
  366. package/dist/components/ic-navigation-group.js.map +1 -1
  367. package/dist/components/ic-navigation-item.js +2 -2
  368. package/dist/components/ic-navigation-menu2.js +2 -2
  369. package/dist/components/ic-page-header.js +3 -3
  370. package/dist/components/ic-page-header.js.map +1 -1
  371. package/dist/components/ic-pagination-item2.js +5 -1
  372. package/dist/components/ic-pagination-item2.js.map +1 -1
  373. package/dist/components/ic-pagination.js +3 -2
  374. package/dist/components/ic-pagination.js.map +1 -1
  375. package/dist/components/ic-popover-menu.js +3 -3
  376. package/dist/components/ic-popover-menu.js.map +1 -1
  377. package/dist/components/ic-radio-group.js +16 -5
  378. package/dist/components/ic-radio-group.js.map +1 -1
  379. package/dist/components/ic-radio-option.js +5 -11
  380. package/dist/components/ic-radio-option.js.map +1 -1
  381. package/dist/components/ic-search-bar.js +6 -3
  382. package/dist/components/ic-search-bar.js.map +1 -1
  383. package/dist/components/ic-section-container2.js +1 -1
  384. package/dist/components/ic-select.js +34 -32
  385. package/dist/components/ic-select.js.map +1 -1
  386. package/dist/components/ic-side-navigation.js +51 -42
  387. package/dist/components/ic-side-navigation.js.map +1 -1
  388. package/dist/components/ic-skeleton.js +1 -1
  389. package/dist/components/ic-status-tag.js +3 -3
  390. package/dist/components/ic-status-tag.js.map +1 -1
  391. package/dist/components/ic-step.js +1 -1
  392. package/dist/components/ic-stepper.js +2 -2
  393. package/dist/components/ic-switch.js +4 -3
  394. package/dist/components/ic-switch.js.map +1 -1
  395. package/dist/components/ic-tab-context.js +1 -1
  396. package/dist/components/ic-tab-group.js +3 -3
  397. package/dist/components/ic-tab-group.js.map +1 -1
  398. package/dist/components/ic-tab-panel.js +1 -1
  399. package/dist/components/ic-tab.js +5 -1
  400. package/dist/components/ic-tab.js.map +1 -1
  401. package/dist/components/ic-text-field2.js +4 -5
  402. package/dist/components/ic-text-field2.js.map +1 -1
  403. package/dist/components/ic-theme.js +2 -2
  404. package/dist/components/ic-toast-region.js +1 -1
  405. package/dist/components/ic-toast.js +2 -2
  406. package/dist/components/ic-tooltip2.js +29 -30
  407. package/dist/components/ic-tooltip2.js.map +1 -1
  408. package/dist/components/ic-top-navigation.js +2 -2
  409. package/dist/components/ic-typography2.js +1 -1
  410. package/dist/components/index.d.ts +9 -60
  411. package/dist/components/index.js +1 -58
  412. package/dist/components/index.js.map +1 -1
  413. package/dist/core/core.css +41 -2
  414. package/dist/core/core.esm.js +1 -1
  415. package/dist/core/core.esm.js.map +1 -1
  416. package/dist/core/index.esm.js.map +1 -1
  417. package/dist/core/{p-de45134c.entry.js → p-04d626ee.entry.js} +2 -2
  418. package/dist/core/p-04d626ee.entry.js.map +1 -0
  419. package/dist/core/p-06321d19.js.map +1 -1
  420. package/dist/core/{p-050dbce8.entry.js → p-0d325b4c.entry.js} +2 -2
  421. package/dist/core/p-0d325b4c.entry.js.map +1 -0
  422. package/dist/core/{p-46371c05.entry.js → p-249af8ab.entry.js} +2 -2
  423. package/dist/core/p-249af8ab.entry.js.map +1 -0
  424. package/dist/core/{p-36e0671f.entry.js → p-29d9fea1.entry.js} +2 -2
  425. package/dist/core/p-29d9fea1.entry.js.map +1 -0
  426. package/dist/core/p-2e051e1e.entry.js +2 -0
  427. package/dist/core/p-2e051e1e.entry.js.map +1 -0
  428. package/dist/core/{p-bffa2e1a.entry.js → p-2ec49a7e.entry.js} +2 -2
  429. package/dist/core/p-2ec49a7e.entry.js.map +1 -0
  430. package/dist/core/{p-223a214f.entry.js → p-3114a4b3.entry.js} +2 -2
  431. package/dist/core/p-3114a4b3.entry.js.map +1 -0
  432. package/dist/core/{p-50421f27.entry.js → p-311c38b3.entry.js} +2 -2
  433. package/dist/core/p-311c38b3.entry.js.map +1 -0
  434. package/dist/core/p-31ccdd50.entry.js +2 -0
  435. package/dist/core/p-31ccdd50.entry.js.map +1 -0
  436. package/dist/core/p-31e80ccb.entry.js +2 -0
  437. package/dist/core/p-31e80ccb.entry.js.map +1 -0
  438. package/dist/core/p-323bce82.entry.js +2 -0
  439. package/dist/core/p-323bce82.entry.js.map +1 -0
  440. package/dist/core/{p-a9184841.entry.js → p-3918c27a.entry.js} +2 -2
  441. package/dist/core/p-3918c27a.entry.js.map +1 -0
  442. package/dist/core/p-3ce0aa02.entry.js +2 -0
  443. package/dist/core/p-3ce0aa02.entry.js.map +1 -0
  444. package/dist/core/p-44512ebe.js.map +1 -1
  445. package/dist/core/{p-471820e6.js → p-4a385752.js} +2 -2
  446. package/dist/core/p-4a385752.js.map +1 -0
  447. package/dist/core/{p-312c10b0.entry.js → p-4c4fa082.entry.js} +2 -2
  448. package/dist/core/p-4c4fa082.entry.js.map +1 -0
  449. package/dist/core/{p-fc7dce3d.entry.js → p-4f7b34ed.entry.js} +2 -2
  450. package/dist/core/p-4f7b34ed.entry.js.map +1 -0
  451. package/dist/core/{p-c85476c0.entry.js → p-524557bc.entry.js} +2 -2
  452. package/dist/core/p-524557bc.entry.js.map +1 -0
  453. package/dist/core/p-551986d1.entry.js +2 -0
  454. package/dist/core/p-551986d1.entry.js.map +1 -0
  455. package/dist/core/p-57460fa3.entry.js +2 -0
  456. package/dist/core/p-57460fa3.entry.js.map +1 -0
  457. package/dist/core/p-5fcd965f.entry.js +2 -0
  458. package/dist/core/p-5fcd965f.entry.js.map +1 -0
  459. package/dist/core/{p-68547339.entry.js → p-617950f8.entry.js} +2 -2
  460. package/dist/core/p-617950f8.entry.js.map +1 -0
  461. package/dist/core/{p-af815dfb.entry.js → p-68308ecd.entry.js} +2 -2
  462. package/dist/core/p-68308ecd.entry.js.map +1 -0
  463. package/dist/core/p-6c76c6ba.entry.js +2 -0
  464. package/dist/core/p-6c76c6ba.entry.js.map +1 -0
  465. package/dist/core/p-6f57b13c.js.map +1 -1
  466. package/dist/core/p-79914e0c.entry.js +2 -0
  467. package/dist/core/p-79914e0c.entry.js.map +1 -0
  468. package/dist/core/{p-e6217f40.entry.js → p-820e4c17.entry.js} +2 -2
  469. package/dist/core/p-820e4c17.entry.js.map +1 -0
  470. package/dist/core/{p-1585e5c1.entry.js → p-84c8c4c7.entry.js} +2 -2
  471. package/dist/core/p-84c8c4c7.entry.js.map +1 -0
  472. package/dist/core/{p-29ea6f88.entry.js → p-8911656b.entry.js} +2 -2
  473. package/dist/core/p-8911656b.entry.js.map +1 -0
  474. package/dist/core/p-8c7f4343.js.map +1 -1
  475. package/dist/core/p-8d4f7027.js.map +1 -1
  476. package/dist/core/p-97286148.entry.js +2 -0
  477. package/dist/core/p-97286148.entry.js.map +1 -0
  478. package/dist/core/{p-454b1ecd.entry.js → p-97fd0cc1.entry.js} +2 -2
  479. package/dist/core/p-97fd0cc1.entry.js.map +1 -0
  480. package/dist/core/p-a74b8476.entry.js +2 -0
  481. package/dist/core/p-a74b8476.entry.js.map +1 -0
  482. package/dist/core/{p-4dd0eb6a.entry.js → p-a9de9aba.entry.js} +2 -2
  483. package/dist/core/p-a9de9aba.entry.js.map +1 -0
  484. package/dist/core/p-ad6c4c02.entry.js +2 -0
  485. package/dist/core/p-ad6c4c02.entry.js.map +1 -0
  486. package/dist/core/{p-ca20c9c3.entry.js → p-aeef3c9d.entry.js} +2 -2
  487. package/dist/core/p-aeef3c9d.entry.js.map +1 -0
  488. package/dist/core/p-b03bd9c6.entry.js +2 -0
  489. package/dist/core/p-b03bd9c6.entry.js.map +1 -0
  490. package/dist/core/p-b0685167.entry.js +2 -0
  491. package/dist/core/p-b0685167.entry.js.map +1 -0
  492. package/dist/core/p-b35a9909.entry.js +2 -0
  493. package/dist/core/p-b35a9909.entry.js.map +1 -0
  494. package/dist/core/p-bad10f6c.entry.js +2 -0
  495. package/dist/core/p-bad10f6c.entry.js.map +1 -0
  496. package/dist/core/{p-a18c0672.entry.js → p-bda4414e.entry.js} +2 -2
  497. package/dist/core/p-bda4414e.entry.js.map +1 -0
  498. package/dist/core/p-c0333310.entry.js +2 -0
  499. package/dist/core/p-c0333310.entry.js.map +1 -0
  500. package/dist/core/{p-2e63f202.entry.js → p-c3f9fb1d.entry.js} +2 -2
  501. package/dist/core/p-c3f9fb1d.entry.js.map +1 -0
  502. package/dist/core/{p-fb5861c6.entry.js → p-ca6820dc.entry.js} +2 -2
  503. package/dist/core/p-ca6820dc.entry.js.map +1 -0
  504. package/dist/core/p-d6694b41.entry.js +2 -0
  505. package/dist/core/p-d6694b41.entry.js.map +1 -0
  506. package/dist/core/{p-70124e59.entry.js → p-da4c1409.entry.js} +2 -2
  507. package/dist/core/p-da4c1409.entry.js.map +1 -0
  508. package/dist/core/p-dbe06c3b.entry.js +2 -0
  509. package/dist/core/p-dbe06c3b.entry.js.map +1 -0
  510. package/dist/core/{p-28bc3bf0.entry.js → p-df67b151.entry.js} +2 -2
  511. package/dist/core/p-df67b151.entry.js.map +1 -0
  512. package/dist/core/{p-df1b0f17.entry.js → p-dfd31e28.entry.js} +2 -2
  513. package/dist/core/p-dfd31e28.entry.js.map +1 -0
  514. package/dist/core/{p-5e896163.entry.js → p-e3e6308b.entry.js} +2 -2
  515. package/dist/core/p-e3e6308b.entry.js.map +1 -0
  516. package/dist/core/{p-b7cf6411.entry.js → p-ea233813.entry.js} +2 -2
  517. package/dist/core/p-ea233813.entry.js.map +1 -0
  518. package/dist/core/p-ec26fc38.js.map +1 -1
  519. package/dist/core/{p-d2d5132d.entry.js → p-ecdcae46.entry.js} +2 -2
  520. package/dist/core/p-ecdcae46.entry.js.map +1 -0
  521. package/dist/core/{p-443052a7.entry.js → p-ef91c17e.entry.js} +2 -2
  522. package/dist/core/p-ef91c17e.entry.js.map +1 -0
  523. package/dist/core/{p-cee45622.entry.js → p-f0714432.entry.js} +2 -2
  524. package/dist/core/p-f0714432.entry.js.map +1 -0
  525. package/dist/core/p-f3053872.js +3 -0
  526. package/dist/core/p-f3053872.js.map +1 -0
  527. package/dist/core/{p-a8dc8196.entry.js → p-f381e93f.entry.js} +2 -2
  528. package/dist/core/p-f381e93f.entry.js.map +1 -0
  529. package/dist/core/p-fd482bd7.entry.js +2 -0
  530. package/dist/core/p-fd482bd7.entry.js.map +1 -0
  531. package/dist/core/p-fe2c4009.entry.js +2 -0
  532. package/dist/core/p-fe2c4009.entry.js.map +1 -0
  533. package/dist/esm/core.js +7 -3
  534. package/dist/esm/core.js.map +1 -1
  535. package/dist/esm/{helpers-73666f14.js → helpers-8e57082b.js} +7 -2
  536. package/dist/esm/helpers-8e57082b.js.map +1 -0
  537. package/dist/esm/ic-alert.entry.js +2 -2
  538. package/dist/esm/ic-back-to-top.entry.js +2 -2
  539. package/dist/esm/ic-breadcrumb-group.entry.js +2 -2
  540. package/dist/esm/ic-breadcrumb.entry.js +2 -2
  541. package/dist/esm/ic-button_3.entry.js +31 -31
  542. package/dist/esm/ic-button_3.entry.js.map +1 -1
  543. package/dist/esm/ic-card.entry.js +4 -3
  544. package/dist/esm/ic-card.entry.js.map +1 -1
  545. package/dist/esm/ic-checkbox-group.entry.js +5 -2
  546. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  547. package/dist/esm/ic-checkbox.entry.js +3 -2
  548. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  549. package/dist/esm/ic-chip.entry.js +5 -2
  550. package/dist/esm/ic-chip.entry.js.map +1 -1
  551. package/dist/esm/ic-classification-banner.entry.js +1 -1
  552. package/dist/esm/ic-data-entity.entry.js +1 -1
  553. package/dist/esm/ic-data-row.entry.js +2 -2
  554. package/dist/esm/ic-dialog.entry.js +292 -0
  555. package/dist/esm/ic-dialog.entry.js.map +1 -0
  556. package/dist/esm/ic-divider.entry.js +2 -2
  557. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  558. package/dist/esm/ic-footer-link.entry.js +2 -2
  559. package/dist/esm/ic-footer.entry.js +3 -3
  560. package/dist/esm/ic-footer.entry.js.map +1 -1
  561. package/dist/esm/ic-hero.entry.js +2 -2
  562. package/dist/esm/ic-horizontal-scroll.entry.js +2 -2
  563. package/dist/esm/ic-input-component-container_3.entry.js +65 -26
  564. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  565. package/dist/esm/ic-input-label_2.entry.js +3 -3
  566. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  567. package/dist/esm/ic-link.entry.js +2 -2
  568. package/dist/esm/ic-menu-group.entry.js +1 -1
  569. package/dist/esm/ic-menu-item.entry.js +4 -3
  570. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  571. package/dist/esm/ic-navigation-button.entry.js +2 -2
  572. package/dist/esm/ic-navigation-group.entry.js +44 -18
  573. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  574. package/dist/esm/ic-navigation-item.entry.js +2 -2
  575. package/dist/esm/ic-navigation-menu.entry.js +2 -2
  576. package/dist/esm/ic-page-header.entry.js +3 -3
  577. package/dist/esm/ic-page-header.entry.js.map +1 -1
  578. package/dist/esm/ic-pagination-item.entry.js +6 -1
  579. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  580. package/dist/esm/ic-pagination.entry.js +3 -2
  581. package/dist/esm/ic-pagination.entry.js.map +1 -1
  582. package/dist/esm/ic-popover-menu.entry.js +3 -3
  583. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  584. package/dist/esm/ic-radio-group.entry.js +16 -5
  585. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  586. package/dist/esm/ic-radio-option.entry.js +5 -11
  587. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  588. package/dist/esm/ic-search-bar.entry.js +6 -3
  589. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  590. package/dist/esm/ic-section-container.entry.js +1 -1
  591. package/dist/esm/ic-select.entry.js +34 -32
  592. package/dist/esm/ic-select.entry.js.map +1 -1
  593. package/dist/esm/ic-side-navigation.entry.js +51 -42
  594. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  595. package/dist/esm/ic-skeleton.entry.js +1 -1
  596. package/dist/esm/ic-status-tag.entry.js +3 -3
  597. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  598. package/dist/esm/ic-step.entry.js +1 -1
  599. package/dist/esm/ic-stepper.entry.js +2 -2
  600. package/dist/esm/ic-switch.entry.js +4 -3
  601. package/dist/esm/ic-switch.entry.js.map +1 -1
  602. package/dist/esm/ic-tab-context.entry.js +1 -1
  603. package/dist/esm/ic-tab-group.entry.js +3 -3
  604. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  605. package/dist/esm/ic-tab-panel.entry.js +1 -1
  606. package/dist/esm/ic-tab.entry.js +5 -1
  607. package/dist/esm/ic-tab.entry.js.map +1 -1
  608. package/dist/esm/ic-text-field.entry.js +4 -5
  609. package/dist/esm/ic-text-field.entry.js.map +1 -1
  610. package/dist/esm/ic-theme.entry.js +2 -2
  611. package/dist/esm/ic-toast-region.entry.js +1 -1
  612. package/dist/esm/ic-toast.entry.js +2 -2
  613. package/dist/esm/ic-top-navigation.entry.js +2 -2
  614. package/dist/esm/ic-typography.entry.js +2 -2
  615. package/dist/esm/{index-3b144b17.js → index-a77644e1.js} +222 -44
  616. package/dist/esm/index-a77644e1.js.map +1 -0
  617. package/dist/esm/loader.js +4 -3
  618. package/dist/esm/loader.js.map +1 -1
  619. package/dist/esm/polyfills/css-shim.js +1 -1
  620. package/dist/types/components/ic-breadcrumb/ic-breadcrumb.types.d.ts +1 -1
  621. package/dist/types/components/ic-button/ic-button.types.d.ts +4 -4
  622. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
  623. package/dist/types/components/ic-chip/ic-chip.d.ts +1 -0
  624. package/dist/types/components/ic-chip/ic-chip.types.d.ts +2 -2
  625. package/dist/types/components/ic-classification-banner/ic-classification-banner.types.d.ts +1 -1
  626. package/dist/types/components/ic-dialog/ic-dialog.d.ts +123 -0
  627. package/dist/types/components/ic-dialog/ic-dialog.test.a11y.d.ts +1 -0
  628. package/dist/types/components/ic-footer/ic-footer.types.d.ts +1 -1
  629. package/dist/types/components/ic-footer-link/ic-footer-link.d.ts +1 -1
  630. package/dist/types/components/ic-hero/ic-hero.types.d.ts +1 -1
  631. package/dist/types/components/ic-input-validation/ic-input-validation.types.d.ts +1 -1
  632. package/dist/types/components/ic-loading-indicator/ic-loading-indicator.types.d.ts +2 -2
  633. package/dist/types/components/ic-menu/ic-menu.d.ts +6 -0
  634. package/dist/types/components/ic-menu-item/ic-menu-item.types.d.ts +1 -1
  635. package/dist/types/components/ic-navigation-button/ic-navigation-button.types.d.ts +1 -1
  636. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +3 -1
  637. package/dist/types/components/ic-pagination/ic-pagination.d.ts +1 -1
  638. package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +1 -1
  639. package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +2 -1
  640. package/dist/types/components/ic-pagination-item/ic-pagination-item.types.d.ts +1 -1
  641. package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +4 -3
  642. package/dist/types/components/ic-radio-group/ic-radio-group.types.d.ts +7 -0
  643. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +1 -3
  644. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -1
  645. package/dist/types/components/ic-search-bar/ic-search-bar.types.d.ts +1 -1
  646. package/dist/types/components/ic-select/ic-select.d.ts +3 -3
  647. package/dist/types/components/ic-skeleton/ic-skeleton.types.d.ts +1 -1
  648. package/dist/types/components/ic-status-tag/ic-status-tag.types.d.ts +2 -2
  649. package/dist/types/components/ic-step/ic-step.types.d.ts +3 -3
  650. package/dist/types/components/ic-stepper/ic-stepper.types.d.ts +1 -1
  651. package/dist/types/components/ic-tab/ic-tab.d.ts +1 -0
  652. package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -1
  653. package/dist/types/components/ic-text-field/ic-text-field.types.d.ts +3 -3
  654. package/dist/types/components/ic-toast/ic-toast.types.d.ts +1 -1
  655. package/dist/types/components/ic-tooltip/ic-tooltip.types.d.ts +1 -1
  656. package/dist/types/components.d.ts +187 -27
  657. package/dist/types/stencil-public-runtime.d.ts +72 -15
  658. package/dist/types/testspec.setup.d.ts +9 -0
  659. package/dist/types/utils/helpers.d.ts +1 -0
  660. package/dist/types/utils/types.d.ts +22 -22
  661. package/hydrate/index.d.ts +17 -16
  662. package/hydrate/index.js +699 -262
  663. package/loader/index.d.ts +9 -0
  664. package/package.json +5 -5
  665. package/dist/cjs/helpers-d6b5880e.js.map +0 -1
  666. package/dist/cjs/index-a62312a7.js.map +0 -1
  667. package/dist/core/p-050dbce8.entry.js.map +0 -1
  668. package/dist/core/p-06962e10.entry.js +0 -2
  669. package/dist/core/p-06962e10.entry.js.map +0 -1
  670. package/dist/core/p-0969a95a.entry.js +0 -2
  671. package/dist/core/p-0969a95a.entry.js.map +0 -1
  672. package/dist/core/p-0a11ec35.entry.js +0 -2
  673. package/dist/core/p-0a11ec35.entry.js.map +0 -1
  674. package/dist/core/p-0f153569.entry.js +0 -2
  675. package/dist/core/p-0f153569.entry.js.map +0 -1
  676. package/dist/core/p-1585e5c1.entry.js.map +0 -1
  677. package/dist/core/p-223a214f.entry.js.map +0 -1
  678. package/dist/core/p-28bc3bf0.entry.js.map +0 -1
  679. package/dist/core/p-29ea6f88.entry.js.map +0 -1
  680. package/dist/core/p-2e63f202.entry.js.map +0 -1
  681. package/dist/core/p-2e6ea6d3.entry.js +0 -2
  682. package/dist/core/p-2e6ea6d3.entry.js.map +0 -1
  683. package/dist/core/p-2fb97a1b.entry.js +0 -2
  684. package/dist/core/p-2fb97a1b.entry.js.map +0 -1
  685. package/dist/core/p-312c10b0.entry.js.map +0 -1
  686. package/dist/core/p-31b4b684.entry.js +0 -2
  687. package/dist/core/p-31b4b684.entry.js.map +0 -1
  688. package/dist/core/p-32cc8827.entry.js +0 -2
  689. package/dist/core/p-32cc8827.entry.js.map +0 -1
  690. package/dist/core/p-3498db0b.entry.js +0 -2
  691. package/dist/core/p-3498db0b.entry.js.map +0 -1
  692. package/dist/core/p-36e0671f.entry.js.map +0 -1
  693. package/dist/core/p-443052a7.entry.js.map +0 -1
  694. package/dist/core/p-454b1ecd.entry.js.map +0 -1
  695. package/dist/core/p-46371c05.entry.js.map +0 -1
  696. package/dist/core/p-471820e6.js.map +0 -1
  697. package/dist/core/p-4dd0eb6a.entry.js.map +0 -1
  698. package/dist/core/p-50421f27.entry.js.map +0 -1
  699. package/dist/core/p-559b3d17.entry.js +0 -2
  700. package/dist/core/p-559b3d17.entry.js.map +0 -1
  701. package/dist/core/p-589f6dd3.js +0 -3
  702. package/dist/core/p-589f6dd3.js.map +0 -1
  703. package/dist/core/p-5a3f3f37.entry.js +0 -2
  704. package/dist/core/p-5a3f3f37.entry.js.map +0 -1
  705. package/dist/core/p-5e896163.entry.js.map +0 -1
  706. package/dist/core/p-68547339.entry.js.map +0 -1
  707. package/dist/core/p-6f2be5bd.entry.js +0 -2
  708. package/dist/core/p-6f2be5bd.entry.js.map +0 -1
  709. package/dist/core/p-70124e59.entry.js.map +0 -1
  710. package/dist/core/p-80164baa.entry.js +0 -2
  711. package/dist/core/p-80164baa.entry.js.map +0 -1
  712. package/dist/core/p-80eff050.entry.js +0 -2
  713. package/dist/core/p-80eff050.entry.js.map +0 -1
  714. package/dist/core/p-8edd3a9b.entry.js +0 -2
  715. package/dist/core/p-8edd3a9b.entry.js.map +0 -1
  716. package/dist/core/p-9715ec62.entry.js +0 -2
  717. package/dist/core/p-9715ec62.entry.js.map +0 -1
  718. package/dist/core/p-983cb33c.entry.js +0 -2
  719. package/dist/core/p-983cb33c.entry.js.map +0 -1
  720. package/dist/core/p-a18c0672.entry.js.map +0 -1
  721. package/dist/core/p-a8dc8196.entry.js.map +0 -1
  722. package/dist/core/p-a9184841.entry.js.map +0 -1
  723. package/dist/core/p-af815dfb.entry.js.map +0 -1
  724. package/dist/core/p-b69226d2.entry.js +0 -2
  725. package/dist/core/p-b69226d2.entry.js.map +0 -1
  726. package/dist/core/p-b7cf6411.entry.js.map +0 -1
  727. package/dist/core/p-bffa2e1a.entry.js.map +0 -1
  728. package/dist/core/p-c85476c0.entry.js.map +0 -1
  729. package/dist/core/p-ca20c9c3.entry.js.map +0 -1
  730. package/dist/core/p-cee45622.entry.js.map +0 -1
  731. package/dist/core/p-d2d5132d.entry.js.map +0 -1
  732. package/dist/core/p-de45134c.entry.js.map +0 -1
  733. package/dist/core/p-df1b0f17.entry.js.map +0 -1
  734. package/dist/core/p-e16e817e.entry.js +0 -2
  735. package/dist/core/p-e16e817e.entry.js.map +0 -1
  736. package/dist/core/p-e6217f40.entry.js.map +0 -1
  737. package/dist/core/p-faeedfd1.entry.js +0 -2
  738. package/dist/core/p-faeedfd1.entry.js.map +0 -1
  739. package/dist/core/p-fb5861c6.entry.js.map +0 -1
  740. package/dist/core/p-fc7dce3d.entry.js.map +0 -1
  741. package/dist/core/p-fd18d7a3.entry.js +0 -2
  742. package/dist/core/p-fd18d7a3.entry.js.map +0 -1
  743. package/dist/esm/helpers-73666f14.js.map +0 -1
  744. package/dist/esm/index-3b144b17.js.map +0 -1
@@ -0,0 +1,173 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe("ic-button component", () => {
3
+ it("Should have the correct text", async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent(`<ic-button>Button</ic-button>`);
6
+ await page.waitForChanges();
7
+ const button = await page.find("ic-button");
8
+ const text = button.innerText;
9
+ expect(text).toBe("Button");
10
+ });
11
+ it("Should have loading bar when loading", async () => {
12
+ const page = await newE2EPage();
13
+ await page.setContent(`<ic-button loading>Button</ic-button>`);
14
+ await page.waitForChanges();
15
+ const loadingBar = await page.find("ic-button >>> ic-loading-indicator");
16
+ expect(loadingBar).not.toBeNull();
17
+ });
18
+ it("Should be clickable with onclick", async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent(`
21
+ <ic-button id='ic-button' onclick='change()'>Button</ic-button>
22
+ <script>
23
+ function change() {
24
+ document.getElementById("ic-button").innerText = 'Test';
25
+ }
26
+ </script>
27
+ `);
28
+ const button = await page.find("#ic-button");
29
+ await button.click();
30
+ expect(button.innerText).toBe("Test");
31
+ });
32
+ it("Should not be clickable when disabled", async () => {
33
+ const page = await newE2EPage();
34
+ await page.setContent(`
35
+ <ic-button id='ic-button' onclick='change()' disabled>Button</ic-button>
36
+ <script>
37
+ function change() {
38
+ document.getElementById("ic-button").innerText = 'Test';
39
+ }
40
+ </script>
41
+ `);
42
+ const button = await page.find("#ic-button");
43
+ await button.click();
44
+ expect(button.innerText).toBe("Button");
45
+ });
46
+ it("Should not be clickable when loading", async () => {
47
+ const page = await newE2EPage();
48
+ await page.setContent(`
49
+ <ic-button id='ic-button' onclick='change()' loading>Button</ic-button>
50
+ <script>
51
+ function change() {
52
+ document.getElementById("ic-button").innerText = 'Test';
53
+ }
54
+ </script>
55
+ `);
56
+ const button = await page.find("#ic-button");
57
+ await button.click();
58
+ expect(button.innerText).toBe("Button");
59
+ });
60
+ it("should pass onclick method", async () => {
61
+ const page = await newE2EPage();
62
+ await page.setContent(`
63
+ <ic-button id='ic-button' onclick='updateText()'>Button</ic-button>
64
+ <p id="text"></p>
65
+ <script>
66
+ function updateText() {
67
+ document.getElementById('text').innerText = "Demo"
68
+ }
69
+ </script>
70
+ `);
71
+ const p = await page.find("#text");
72
+ const button = await page.find("#ic-button");
73
+ await button.click();
74
+ expect(p.innerText).toBe("Demo");
75
+ });
76
+ it("should clear text field value when reset button inside form tag", async () => {
77
+ const page = await newE2EPage();
78
+ await page.setContent(`
79
+ <form>
80
+ <input type="text" id="name" />
81
+ <ic-button id='ic-button' type="reset">Reset</ic-button>
82
+ </form>
83
+ `);
84
+ const textfield = await page.find("#name");
85
+ const button = await page.find("#ic-button");
86
+ await textfield.press("f");
87
+ await textfield.press("o");
88
+ await textfield.press("o");
89
+ expect(await textfield.getProperty("value")).toBe("foo");
90
+ await button.click();
91
+ expect(await textfield.getProperty("value")).toBe("");
92
+ });
93
+ it("should not clear text field value if reset button outside of form tag", async () => {
94
+ const page = await newE2EPage();
95
+ await page.setContent(`
96
+ <div>
97
+ <form>
98
+ <input type="text" id="name" />
99
+ </form>
100
+ <ic-button id='ic-button' type="reset">Reset</ic-button>
101
+ </div>
102
+ `);
103
+ const textfield = await page.find("#name");
104
+ const button = await page.find("#ic-button");
105
+ await textfield.press("f");
106
+ await textfield.press("o");
107
+ await textfield.press("o");
108
+ await button.click();
109
+ expect(await textfield.getProperty("value")).toBe("foo");
110
+ });
111
+ it("should submit form on submit button click if submit button inside form tag", async () => {
112
+ const page = await newE2EPage();
113
+ await page.setContent(`
114
+ <form>
115
+ <input type="text" id="name" />
116
+ <ic-button id='ic-button' type="submit">Submit</ic-button>
117
+ </form>
118
+ <p id="text"></p>
119
+ <script>
120
+ document.addEventListener('submit', (ev) => {
121
+ ev.preventDefault();
122
+ document.getElementById('text').innerText = 'submitted';
123
+ })
124
+ </script>
125
+ `);
126
+ const button = await page.find("#ic-button");
127
+ const p = await page.find("#text");
128
+ await button.click();
129
+ expect(p.innerText).toBe("submitted");
130
+ });
131
+ it("should not submit form on submit button click outside of form tag", async () => {
132
+ const page = await newE2EPage();
133
+ await page.setContent(`
134
+ <form>
135
+ <input type="text" id="name" />
136
+ </form>
137
+ <ic-button id='ic-button' type="submit">Submit</ic-button>
138
+ <p id="text">idle</p>
139
+ <script>
140
+ document.addEventListener('submit', (ev) => {
141
+ ev.preventDefault();
142
+ document.getElementById('text').innerText = 'submitted';
143
+ })
144
+ </script>
145
+ `);
146
+ const button = await page.find("#ic-button");
147
+ const p = await page.find("#text");
148
+ await button.click();
149
+ expect(p.innerText).toBe("idle");
150
+ });
151
+ it("should emit icFocus on focus event", async () => {
152
+ const page = await newE2EPage();
153
+ await page.setContent(`<ic-button>Button</ic-button>`);
154
+ const button = await page.find("ic-button");
155
+ const spy = await page.spyOnEvent("icFocus");
156
+ await button.callMethod("setFocus");
157
+ await page.waitForChanges();
158
+ expect(spy).toHaveReceivedEvent();
159
+ });
160
+ it("should emit icBlur on blur event", async () => {
161
+ const page = await newE2EPage();
162
+ await page.setContent(`<ic-button>Button</ic-button>
163
+ <button id="secondary-button">Secondary</button>`);
164
+ const button = await page.find("ic-button");
165
+ const secButton = await page.find("#secondary-button");
166
+ const spy = await page.spyOnEvent("icBlur");
167
+ await button.callMethod("setFocus");
168
+ await secButton.click();
169
+ await page.waitForChanges();
170
+ expect(spy).toHaveReceivedEvent();
171
+ });
172
+ });
173
+ //# sourceMappingURL=ic-button.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-button.e2e.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ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IAC5C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAE7C,MAAM,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,GAAG,CAAC,CAAC,mBAAmB,EAAE,CAAC;EACpC,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;IAChD,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CACnB;uDACiD,CAClD,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACvD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAE5C,MAAM,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;IACxB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,GAAG,CAAC,CAAC,mBAAmB,EAAE,CAAC;EACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from \"@stencil/core/testing\";\n\ndescribe(\"ic-button component\", () => {\n it(\"Should have the correct text\", async () => {\n const page = await newE2EPage();\n await page.setContent(`<ic-button>Button</ic-button>`);\n await page.waitForChanges();\n\n const button = await page.find(\"ic-button\");\n const text = button.innerText;\n\n expect(text).toBe(\"Button\");\n });\n\n it(\"Should have loading bar when loading\", async () => {\n const page = await newE2EPage();\n await page.setContent(`<ic-button loading>Button</ic-button>`);\n await page.waitForChanges();\n\n const loadingBar = await page.find(\"ic-button >>> ic-loading-indicator\");\n\n expect(loadingBar).not.toBeNull();\n });\n\n it(\"Should be clickable with onclick\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `\n <ic-button id='ic-button' onclick='change()'>Button</ic-button>\n <script>\n function change() {\n document.getElementById(\"ic-button\").innerText = 'Test';\n }\n </script>\n `\n );\n const button = await page.find(\"#ic-button\");\n\n await button.click();\n\n expect(button.innerText).toBe(\"Test\");\n });\n\n it(\"Should not be clickable when disabled\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `\n <ic-button id='ic-button' onclick='change()' disabled>Button</ic-button>\n <script>\n function change() {\n document.getElementById(\"ic-button\").innerText = 'Test';\n }\n </script>\n `\n );\n const button = await page.find(\"#ic-button\");\n\n await button.click();\n\n expect(button.innerText).toBe(\"Button\");\n });\n\n it(\"Should not be clickable when loading\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `\n <ic-button id='ic-button' onclick='change()' loading>Button</ic-button>\n <script>\n function change() {\n document.getElementById(\"ic-button\").innerText = 'Test';\n }\n </script>\n `\n );\n const button = await page.find(\"#ic-button\");\n\n await button.click();\n\n expect(button.innerText).toBe(\"Button\");\n });\n\n it(\"should pass onclick method\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `\n <ic-button id='ic-button' onclick='updateText()'>Button</ic-button>\n <p id=\"text\"></p>\n <script>\n function updateText() {\n document.getElementById('text').innerText = \"Demo\"\n }\n </script>\n `\n );\n\n const p = await page.find(\"#text\");\n const button = await page.find(\"#ic-button\");\n\n await button.click();\n\n expect(p.innerText).toBe(\"Demo\");\n });\n\n it(\"should clear text field value when reset button inside form tag\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `\n <form>\n <input type=\"text\" id=\"name\" />\n <ic-button id='ic-button' type=\"reset\">Reset</ic-button>\n </form>\n `\n );\n\n const textfield = await page.find(\"#name\");\n const button = await page.find(\"#ic-button\");\n\n await textfield.press(\"f\");\n await textfield.press(\"o\");\n await textfield.press(\"o\");\n\n expect(await textfield.getProperty(\"value\")).toBe(\"foo\");\n\n await button.click();\n\n expect(await textfield.getProperty(\"value\")).toBe(\"\");\n });\n\n it(\"should not clear text field value if reset button outside of form tag\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `\n <div>\n <form>\n <input type=\"text\" id=\"name\" />\n </form>\n <ic-button id='ic-button' type=\"reset\">Reset</ic-button>\n </div>\n `\n );\n\n const textfield = await page.find(\"#name\");\n const button = await page.find(\"#ic-button\");\n\n await textfield.press(\"f\");\n await textfield.press(\"o\");\n await textfield.press(\"o\");\n\n await button.click();\n\n expect(await textfield.getProperty(\"value\")).toBe(\"foo\");\n });\n\n it(\"should submit form on submit button click if submit button inside form tag\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `\n <form>\n <input type=\"text\" id=\"name\" />\n <ic-button id='ic-button' type=\"submit\">Submit</ic-button>\n </form>\n <p id=\"text\"></p>\n <script>\n document.addEventListener('submit', (ev) => {\n ev.preventDefault();\n document.getElementById('text').innerText = 'submitted';\n })\n </script>\n `\n );\n\n const button = await page.find(\"#ic-button\");\n const p = await page.find(\"#text\");\n\n await button.click();\n\n expect(p.innerText).toBe(\"submitted\");\n });\n\n it(\"should not submit form on submit button click outside of form tag\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `\n <form>\n <input type=\"text\" id=\"name\" />\n </form>\n <ic-button id='ic-button' type=\"submit\">Submit</ic-button>\n <p id=\"text\">idle</p>\n <script>\n document.addEventListener('submit', (ev) => {\n ev.preventDefault();\n document.getElementById('text').innerText = 'submitted';\n })\n </script>\n `\n );\n\n const button = await page.find(\"#ic-button\");\n const p = await page.find(\"#text\");\n\n await button.click();\n\n expect(p.innerText).toBe(\"idle\");\n });\n\n it(\"should emit icFocus on focus event\", async () => {\n const page = await newE2EPage();\n await page.setContent(`<ic-button>Button</ic-button>`);\n\n const button = await page.find(\"ic-button\");\n const spy = await page.spyOnEvent(\"icFocus\");\n\n await button.callMethod(\"setFocus\");\n await page.waitForChanges();\n\n expect(spy).toHaveReceivedEvent();\n });\n\n it(\"should emit icBlur on blur event\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `<ic-button>Button</ic-button>\n <button id=\"secondary-button\">Secondary</button>`\n );\n\n const button = await page.find(\"ic-button\");\n const secButton = await page.find(\"#secondary-button\");\n const spy = await page.spyOnEvent(\"icBlur\");\n\n await button.callMethod(\"setFocus\");\n await secButton.click();\n await page.waitForChanges();\n\n expect(spy).toHaveReceivedEvent();\n });\n});\n"]}
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  return t;
12
12
  };
13
13
  import { Host, h, } from "@stencil/core";
14
- import { getThemeFromContext, inheritAttributes } from "../../utils/helpers";
14
+ import { getThemeFromContext, inheritAttributes, removeDisabledFalse, } from "../../utils/helpers";
15
15
  import { IC_INHERITED_ARIA } from "../../utils/constants";
16
16
  import { IcThemeForegroundEnum, } from "../../utils/types";
17
17
  let buttonIds = 0;
@@ -107,10 +107,11 @@ export class Button {
107
107
  "aria-expanded",
108
108
  "title",
109
109
  ]);
110
+ removeDisabledFalse(this.disabled, this.el);
110
111
  this.el.setAttribute("exportparts", "button");
111
112
  const id = this.el.id;
112
113
  this.id = id !== undefined ? id : null;
113
- this.hasTooltip = this.variant === "icon";
114
+ this.hasTooltip = this.variant === "icon" && this.disableTooltip === false;
114
115
  }
115
116
  componentDidLoad() {
116
117
  this.updateTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,CAAC,GACF,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D,OAAO,EAGL,qBAAqB,GACtB,MAAM,mBAAmB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I,CAAC,cAAc,EAAE,EACpD,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAClC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,QAAQ,EAChB,SAAS,EAAE,IAAI,CAAC,gBAAgB;QAEhC,EAAC,aAAa,OAAG,CACN,CACd;MAEA,CAAC,IAAI,CAAC,UAAU,IAAI,EAAC,aAAa,OAAG,CACjC,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n h,\n} from \"@stencil/core\";\n\nimport { getThemeFromContext, inheritAttributes } from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonSizes,\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\nlet buttonIds = 0;\n\n/**\n * @slot icon - Content will be placed to the left of the button label.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n @Element() el: HTMLIcButtonElement;\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n /**\n * The type of the button.\n */\n @Prop() type?: IcButtonTypes = \"button\";\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n /**\n * The variant of the button to be displayed.\n */\n @Prop() variant?: IcButtonVariants = \"primary\";\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcButtonSizes = \"default\";\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement?: IcButtonTooltipPlacement = \"bottom\";\n /**\n * The appearance of the button, e.g. dark, light, or the default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n private inheritedAttributes: { [k: string]: unknown } = {};\n private buttonEl: HTMLElement;\n private hasTooltip: boolean = false;\n private buttonIdNum = buttonIds++;\n private tooltipEl: HTMLIcTooltipElement;\n private id: string;\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n\n /**\n * @internal Updates tooltip/aria-label text - needed as can't watch an ARIA attribute change.\n */\n @Method()\n async updateAriaLabel(newValue: string): Promise<void> {\n if (this.hasTooltip) {\n this.tooltipEl.label = newValue;\n this.buttonEl.setAttribute(\"aria-label\", newValue);\n }\n }\n\n private hasIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n return iconEl !== null;\n }\n\n private handleHiddenFormButtonClick(form: HTMLFormElement): void {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !!this.el.closest(\"FORM\")\n ) {\n this.handleHiddenFormButtonClick(this.el.closest(\"FORM\"));\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n \"title\",\n ]);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n const id = this.el.id;\n this.id = id !== undefined ? id : null;\n this.hasTooltip = this.variant === \"icon\";\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n }\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = this.inheritedAttributes;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n const newTitle = title && (title as string);\n const titleAttr = this.hasTooltip ? {} : { title: newTitle };\n let tooltipText = \"\";\n if (this.hasTooltip) {\n if (newTitle !== undefined) {\n tooltipText = newTitle;\n } else if (ariaLabel !== null) {\n tooltipText = ariaLabel as string;\n }\n }\n\n let describedBy: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedBy = `ic-tooltip-${buttonId}`;\n }\n\n const ButtonContent = () => {\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n {...buttonAttrs}\n {...restInheritedAttributes}\n {...titleAttr}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n id={buttonId}\n aria-describedby={describedBy}\n part=\"button\"\n >\n {this.hasIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n appearance={\n this.variant === \"primary\" ||\n this.variant === \"destructive\" ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light\n ? \"light\"\n : \"dark\"\n }\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled && !this.loading,\n [`button-variant-${this.variant}`]: true,\n [`button-size-${this.size}`]: true,\n [\"loading\"]: this.loading,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"full-width\"]: this.fullWidth,\n }}\n onClick={this.handleClick}\n >\n {this.hasTooltip && (\n <ic-tooltip\n class={{ [\"tooltip-disabled\"]: this.disableTooltip }}\n ref={(el) => (this.tooltipEl = el)}\n label={tooltipText}\n target={buttonId}\n placement={this.tooltipPlacement}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n\n {!this.hasTooltip && <ButtonContent />}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,CAAC,GACF,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC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eFromContext,\n inheritAttributes,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonSizes,\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\nlet buttonIds = 0;\n\n/**\n * @slot icon - Content will be placed to the left of the button label.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n @Element() el: HTMLIcButtonElement;\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n /**\n * The type of the button.\n */\n @Prop() type?: IcButtonTypes = \"button\";\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n /**\n * The variant of the button to be displayed.\n */\n @Prop() variant?: IcButtonVariants = \"primary\";\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcButtonSizes = \"default\";\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement?: IcButtonTooltipPlacement = \"bottom\";\n /**\n * The appearance of the button, e.g. dark, light, or the default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n private inheritedAttributes: { [k: string]: unknown } = {};\n private buttonEl: HTMLElement;\n private hasTooltip: boolean = false;\n private buttonIdNum = buttonIds++;\n private tooltipEl: HTMLIcTooltipElement;\n private id: string;\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n\n /**\n * @internal Updates tooltip/aria-label text - needed as can't watch an ARIA attribute change.\n */\n @Method()\n async updateAriaLabel(newValue: string): Promise<void> {\n if (this.hasTooltip) {\n this.tooltipEl.label = newValue;\n this.buttonEl.setAttribute(\"aria-label\", newValue);\n }\n }\n\n private hasIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n return iconEl !== null;\n }\n\n private handleHiddenFormButtonClick(form: HTMLFormElement): void {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !!this.el.closest(\"FORM\")\n ) {\n this.handleHiddenFormButtonClick(this.el.closest(\"FORM\"));\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n \"title\",\n ]);\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n const id = this.el.id;\n this.id = id !== undefined ? id : null;\n this.hasTooltip = this.variant === \"icon\" && this.disableTooltip === false;\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n }\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = this.inheritedAttributes;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n const newTitle = title && (title as string);\n const titleAttr = this.hasTooltip ? {} : { title: newTitle };\n let tooltipText = \"\";\n if (this.hasTooltip) {\n if (newTitle !== undefined) {\n tooltipText = newTitle;\n } else if (ariaLabel !== null) {\n tooltipText = ariaLabel as string;\n }\n }\n\n let describedBy: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedBy = `ic-tooltip-${buttonId}`;\n }\n\n const ButtonContent = () => {\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n {...buttonAttrs}\n {...restInheritedAttributes}\n {...titleAttr}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n id={buttonId}\n aria-describedby={describedBy}\n part=\"button\"\n >\n {this.hasIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n appearance={\n this.variant === \"primary\" ||\n this.variant === \"destructive\" ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light\n ? \"light\"\n : \"dark\"\n }\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled && !this.loading,\n [`button-variant-${this.variant}`]: true,\n [`button-size-${this.size}`]: true,\n [\"loading\"]: this.loading,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"full-width\"]: this.fullWidth,\n }}\n onClick={this.handleClick}\n >\n {this.hasTooltip && (\n <ic-tooltip\n class={{ [\"tooltip-disabled\"]: this.disableTooltip }}\n ref={(el) => (this.tooltipEl = el)}\n label={tooltipText}\n target={buttonId}\n placement={this.tooltipPlacement}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n\n {!this.hasTooltip && <ButtonContent />}\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,230 @@
1
+ import { Button } from "./ic-button";
2
+ import { newSpecPage } from "@stencil/core/testing";
3
+ import * as helpers from "../../utils/helpers";
4
+ beforeAll(() => {
5
+ jest.spyOn(console, "warn").mockImplementation(jest.fn());
6
+ });
7
+ //mocked as getThemeFromContext is always default when run in test context
8
+ const mockGetThemeFromContext = () => {
9
+ const func = jest.fn(() => {
10
+ return "light";
11
+ });
12
+ Object.defineProperty(helpers, "getThemeFromContext", {
13
+ value: func,
14
+ });
15
+ };
16
+ describe("button component", () => {
17
+ it("should correctly render with text", async () => {
18
+ const page = await newSpecPage({
19
+ components: [Button],
20
+ html: "<ic-button>Button</ic-button>",
21
+ supportsShadowDom: true,
22
+ });
23
+ expect(page.root).toMatchSnapshot();
24
+ });
25
+ it("should correctly render with custom text", async () => {
26
+ const page = await newSpecPage({
27
+ components: [Button],
28
+ html: "<ic-button>Click Me</ic-button>",
29
+ });
30
+ expect(page.root).toMatchSnapshot();
31
+ });
32
+ it("should render correct HTML for secondary variant", async () => {
33
+ const page = await newSpecPage({
34
+ components: [Button],
35
+ html: "<ic-button variant='secondary'>Button</ic-button>",
36
+ });
37
+ expect(page.root).toMatchSnapshot();
38
+ });
39
+ it("should render correct HTML for tertiary variant", async () => {
40
+ const page = await newSpecPage({
41
+ components: [Button],
42
+ html: "<ic-button variant='tertiary'>Button</ic-button>",
43
+ });
44
+ expect(page.root).toMatchSnapshot();
45
+ });
46
+ it("should render correct HTML for destructive variant", async () => {
47
+ const page = await newSpecPage({
48
+ components: [Button],
49
+ html: "<ic-button variant='destructive'>Button</ic-button>",
50
+ });
51
+ expect(page.root).toMatchSnapshot();
52
+ });
53
+ it("should render correct HTML with Icon", async () => {
54
+ const page = await newSpecPage({
55
+ components: [Button],
56
+ html: `
57
+ <ic-button>
58
+ <svg slot='icon' xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
59
+ <path d="M0 0h24v24H0V0z" fill="none"/>
60
+ <path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
61
+ </svg>
62
+ Button
63
+ </ic-button>
64
+ `,
65
+ });
66
+ expect(page.root).toMatchSnapshot();
67
+ });
68
+ it("should render correct HTML when loading", async () => {
69
+ const page = await newSpecPage({
70
+ components: [Button],
71
+ html: `
72
+ <ic-button loading>Button</ic-button>
73
+ `,
74
+ });
75
+ expect(page.root).toMatchSnapshot();
76
+ });
77
+ it("should render correct HTML when loading - secondary", async () => {
78
+ const page = await newSpecPage({
79
+ components: [Button],
80
+ html: `
81
+ <ic-button loading variant="secondary">Button</ic-button>
82
+ `,
83
+ });
84
+ expect(page.root).toMatchSnapshot();
85
+ });
86
+ it("should render correct HTML when loading - tertiary", async () => {
87
+ const page = await newSpecPage({
88
+ components: [Button],
89
+ html: `
90
+ <ic-button loading variant="tertiary">Button</ic-button>
91
+ `,
92
+ });
93
+ expect(page.root).toMatchSnapshot();
94
+ });
95
+ it("should render correct HTML when loading - destructive", async () => {
96
+ const page = await newSpecPage({
97
+ components: [Button],
98
+ html: `
99
+ <ic-button loading variant="destructive">Button</ic-button>
100
+ `,
101
+ });
102
+ expect(page.root).toMatchSnapshot();
103
+ });
104
+ it("should render correct HTML when loading - appearance light", async () => {
105
+ const page = await newSpecPage({
106
+ components: [Button],
107
+ html: `
108
+ <ic-button loading appearance="light">Button</ic-button>
109
+ `,
110
+ });
111
+ expect(page.root).toMatchSnapshot();
112
+ });
113
+ it("render with correct button type when defined", async () => {
114
+ const page = await newSpecPage({
115
+ components: [Button],
116
+ html: `
117
+ <ic-button type='reset'>Button</ic-button>
118
+ `,
119
+ });
120
+ expect(page.root).toMatchSnapshot();
121
+ });
122
+ it('should render with "a" tag when href is passed', async () => {
123
+ const page = await newSpecPage({
124
+ components: [Button],
125
+ html: `
126
+ <ic-button href = '#'>Button</ic-button>
127
+ `,
128
+ });
129
+ expect(page.root).toMatchSnapshot();
130
+ });
131
+ it('should render with defined "a" tag props', async () => {
132
+ const page = await newSpecPage({
133
+ components: [Button],
134
+ html: `
135
+ <ic-button href = '#' download rel="nofollow" target="_blank">Button</ic-button>
136
+ `,
137
+ });
138
+ expect(page.root).toMatchSnapshot();
139
+ });
140
+ it("should render icon variant with a tooltip", async () => {
141
+ const page = await newSpecPage({
142
+ components: [Button],
143
+ html: "<ic-button variant='icon' id='test-button'>Button</ic-button>",
144
+ });
145
+ expect(page.root).toMatchSnapshot();
146
+ });
147
+ it("should render icon variant with a tooltip based on title", async () => {
148
+ const page = await newSpecPage({
149
+ components: [Button],
150
+ html: "<ic-button variant='icon' id='test-button' title='Tooltip text'>Button</ic-button>",
151
+ });
152
+ expect(page.root).toMatchSnapshot();
153
+ });
154
+ it("should render icon variant with a tooltip based on aria-label", async () => {
155
+ const page = await newSpecPage({
156
+ components: [Button],
157
+ html: "<ic-button variant='icon' id='test-button' aria-label='Tooltip text' tooltip-placement='top'>Button</ic-button>",
158
+ });
159
+ expect(page.root).toMatchSnapshot();
160
+ });
161
+ it("should disable tooltip when prop set", async () => {
162
+ const page = await newSpecPage({
163
+ components: [Button],
164
+ html: "<ic-button variant='icon' aria-label='Tooltip text' id='test-button' disable-tooltip>Button</ic-button>",
165
+ });
166
+ expect(page.root).toMatchSnapshot();
167
+ });
168
+ it("should update when method called", async () => {
169
+ const page = await newSpecPage({
170
+ components: [Button],
171
+ html: "<ic-button variant='icon' aria-label='Tooltip text' id='test-button'>Button</ic-button>",
172
+ });
173
+ expect(page.root).toMatchSnapshot();
174
+ await page.root.updateAriaLabel("New tooltip text");
175
+ await page.waitForChanges();
176
+ expect(page.root).toMatchSnapshot();
177
+ });
178
+ it("should stop immediate propagation of a click event when disabled", async () => {
179
+ const page = await newSpecPage({
180
+ components: [Button],
181
+ html: "<ic-button id='test-button' disabled=true onclick='alert('test')'>Button</ic-button>",
182
+ });
183
+ jest.spyOn(window, "alert").mockImplementation();
184
+ const element = document.getElementById("test-button");
185
+ element.click();
186
+ await page.waitForChanges();
187
+ expect(window.alert).not.toHaveBeenCalled;
188
+ });
189
+ it("should call 'setFocus' when button is focussed", async () => {
190
+ const page = await newSpecPage({
191
+ components: [Button],
192
+ html: "<ic-button id='ic-button'>Button</ic-button>",
193
+ });
194
+ //Can't expect anything in this test - this is to increase code coverage only
195
+ await page.rootInstance.setFocus().toHaveBeenCalled;
196
+ });
197
+ it("should test theme change", async () => {
198
+ mockGetThemeFromContext();
199
+ const page = await newSpecPage({
200
+ components: [Button],
201
+ html: `<ic-button id='ic-button'>Button</ic-button>`,
202
+ });
203
+ await page.rootInstance.themeChangeHandler({
204
+ detail: { mode: "light" },
205
+ });
206
+ await page.waitForChanges();
207
+ expect(page.rootInstance.appearance).toEqual("light");
208
+ });
209
+ it("should test button as submit button on form", async () => {
210
+ const page = await newSpecPage({
211
+ components: [Button],
212
+ html: `<form id="new-form"><form><ic-button id='ic-button' type="submit" form="new-form">Button</ic-button>`,
213
+ });
214
+ const btn = document.getElementById("ic-button");
215
+ btn.click();
216
+ expect(page.root).toMatchSnapshot();
217
+ });
218
+ it("should test blur handler", async () => {
219
+ const page = await newSpecPage({
220
+ components: [Button],
221
+ html: `<ic-button id='ic-button'>Button</ic-button>`,
222
+ });
223
+ const eventSpy = jest.fn();
224
+ page.win.addEventListener("icBlur", eventSpy);
225
+ await page.rootInstance.onBlur();
226
+ await page.waitForChanges();
227
+ expect(eventSpy).toHaveBeenCalled();
228
+ });
229
+ });
230
+ //# sourceMappingURL=ic-button.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-button.spec.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAE/C,SAAS,CAAC,GAAG,EAAE;EACb,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,kBAA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8CAA8C;KACrD,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC3B,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAE9C,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;IACjC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC,gBAAgB,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { Button } from \"./ic-button\";\nimport { newSpecPage } from \"@stencil/core/testing\";\nimport * as helpers from \"../../utils/helpers\";\n\nbeforeAll(() => {\n jest.spyOn(console, \"warn\").mockImplementation(jest.fn());\n});\n\n//mocked as getThemeFromContext is always default when run in test context\nconst mockGetThemeFromContext = () => {\n const func = jest.fn(() => {\n return \"light\";\n });\n\n Object.defineProperty(helpers, \"getThemeFromContext\", {\n value: func,\n });\n};\n\ndescribe(\"button component\", () => {\n it(\"should correctly render with text\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button>Button</ic-button>\",\n supportsShadowDom: true,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should correctly render with custom text\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button>Click Me</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for secondary variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='secondary'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for tertiary variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='tertiary'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for destructive variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='destructive'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML with Icon\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button>\n <svg slot='icon' xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n <path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/>\n </svg>\n Button\n </ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - secondary\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"secondary\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - tertiary\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"tertiary\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - destructive\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"destructive\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - appearance light\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading appearance=\"light\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"render with correct button type when defined\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button type='reset'>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it('should render with \"a\" tag when href is passed', async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button href = '#'>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it('should render with defined \"a\" tag props', async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button href = '#' download rel=\"nofollow\" target=\"_blank\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' id='test-button'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip based on title\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' id='test-button' title='Tooltip text'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip based on aria-label\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' id='test-button' aria-label='Tooltip text' tooltip-placement='top'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should disable tooltip when prop set\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button' disable-tooltip>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should update when method called\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button'>Button</ic-button>\",\n });\n\n expect(page.root).toMatchSnapshot();\n\n await page.root.updateAriaLabel(\"New tooltip text\");\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should stop immediate propagation of a click event when disabled\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button id='test-button' disabled=true onclick='alert('test')'>Button</ic-button>\",\n });\n\n jest.spyOn(window, \"alert\").mockImplementation();\n\n const element = document.getElementById(\"test-button\");\n\n element.click();\n\n await page.waitForChanges();\n\n expect(window.alert).not.toHaveBeenCalled;\n });\n\n it(\"should call 'setFocus' when button is focussed\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button id='ic-button'>Button</ic-button>\",\n });\n\n //Can't expect anything in this test - this is to increase code coverage only\n await page.rootInstance.setFocus().toHaveBeenCalled;\n });\n\n it(\"should test theme change\", async () => {\n mockGetThemeFromContext();\n\n const page = await newSpecPage({\n components: [Button],\n html: `<ic-button id='ic-button'>Button</ic-button>`,\n });\n\n await page.rootInstance.themeChangeHandler({\n detail: { mode: \"light\" },\n });\n await page.waitForChanges();\n\n expect(page.rootInstance.appearance).toEqual(\"light\");\n });\n\n it(\"should test button as submit button on form\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<form id=\"new-form\"><form><ic-button id='ic-button' type=\"submit\" form=\"new-form\">Button</ic-button>`,\n });\n\n const btn = document.getElementById(\"ic-button\");\n btn.click();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test blur handler\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<ic-button id='ic-button'>Button</ic-button>`,\n });\n\n const eventSpy = jest.fn();\n page.win.addEventListener(\"icBlur\", eventSpy);\n\n await page.rootInstance.onBlur();\n await page.waitForChanges();\n expect(eventSpy).toHaveBeenCalled();\n });\n});\n"]}
@@ -460,7 +460,7 @@ button {
460
460
  .card.clickable {
461
461
  display: flex;
462
462
  flex-direction: column;
463
- border: var(--ic-space-1px) solid var(--ic-architectural-300);
463
+ border: var(--ic-border-default);
464
464
  border-radius: var(--ic-border-radius);
465
465
  box-sizing: border-box;
466
466
  padding: var(--ic-space-md);
@@ -476,7 +476,7 @@ button {
476
476
 
477
477
  .card.clickable:hover {
478
478
  background-color: var(--ic-action-default-bg-hover);
479
- border-color: var(--ic-action-default-hover);
479
+ border: var(--ic-border-hover);
480
480
  cursor: pointer;
481
481
  }
482
482
 
@@ -485,6 +485,7 @@ button {
485
485
  background-color: var(--ic-action-default-bg-hover);
486
486
  box-shadow: var(--ic-border-focus);
487
487
  outline: var(--ic-hc-focus-outline);
488
+ border: var(--ic-border-pressed);
488
489
  }
489
490
 
490
491
  .card.clickable:active {
@@ -0,0 +1,23 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe("ic-card", () => {
3
+ it("renders", async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent(`<a href="/"><ic-card heading="Card" message="This is a static card"></ic-card></a>`);
6
+ await page.waitForChanges();
7
+ const element = await page.find("ic-card");
8
+ expect(element).toHaveClass("hydrated");
9
+ const link = await page.find("a");
10
+ expect(link).toHaveClass("ic-card-wrapper-link");
11
+ });
12
+ it("should get focussed class applied when parent link focussed", async () => {
13
+ const page = await newE2EPage();
14
+ await page.setContent(`<a href="/"><ic-card heading="Card" message="This is a static card"></ic-card></a>`);
15
+ await page.waitForChanges();
16
+ const link = await page.find("a");
17
+ link.focus();
18
+ await page.waitForChanges();
19
+ const element = await page.find("ic-card >>> div.focussed");
20
+ expect(element).not.toBeNull;
21
+ });
22
+ });
23
+ //# sourceMappingURL=ic-card.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-card.e2e.js","sourceRoot":"","sources":["../../../src/components/ic-card/ic-card.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;EACvB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CACnB,oFAAoF,CACrF,CAAC;IACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAExC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;EACnD,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;IAC3E,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CACnB,oFAAoF,CACrF,CAAC;IACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK,EAAE,CAAC;IAEb,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC5D,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;EAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from \"@stencil/core/testing\";\n\ndescribe(\"ic-card\", () => {\n it(\"renders\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `<a href=\"/\"><ic-card heading=\"Card\" message=\"This is a static card\"></ic-card></a>`\n );\n await page.waitForChanges();\n\n const element = await page.find(\"ic-card\");\n expect(element).toHaveClass(\"hydrated\");\n\n const link = await page.find(\"a\");\n expect(link).toHaveClass(\"ic-card-wrapper-link\");\n });\n\n it(\"should get focussed class applied when parent link focussed\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `<a href=\"/\"><ic-card heading=\"Card\" message=\"This is a static card\"></ic-card></a>`\n );\n await page.waitForChanges();\n\n const link = await page.find(\"a\");\n link.focus();\n\n await page.waitForChanges();\n\n const element = await page.find(\"ic-card >>> div.focussed\");\n expect(element).not.toBeNull;\n });\n});\n"]}