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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (805) 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-2021e212.js → helpers-eb53c416.js} +25 -25
  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 +15 -15
  8. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-breadcrumb.cjs.entry.js +6 -5
  10. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js +33 -36
  12. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +4 -3
  14. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -2
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +7 -5
  18. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js +5 -2
  20. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-data-entity.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
  24. package/dist/cjs/ic-dialog.cjs.entry.js +296 -0
  25. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -0
  26. package/dist/cjs/ic-divider.cjs.entry.js +2 -2
  27. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  28. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  29. package/dist/cjs/ic-footer.cjs.entry.js +4 -4
  30. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-hero.cjs.entry.js +2 -2
  32. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +2 -2
  33. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +69 -27
  34. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-input-label_2.cjs.entry.js +3 -3
  36. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-link.cjs.entry.js +2 -2
  38. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-menu-item.cjs.entry.js +6 -4
  40. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
  42. package/dist/cjs/ic-navigation-group.cjs.entry.js +50 -21
  43. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-navigation-item.cjs.entry.js +3 -3
  45. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-navigation-menu.cjs.entry.js +2 -8
  47. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-page-header.cjs.entry.js +12 -15
  49. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-pagination-item.cjs.entry.js +6 -1
  51. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-pagination.cjs.entry.js +14 -2
  53. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-popover-menu.cjs.entry.js +7 -6
  55. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-radio-group.cjs.entry.js +16 -5
  57. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-radio-option.cjs.entry.js +5 -11
  59. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-search-bar.cjs.entry.js +6 -3
  61. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-select.cjs.entry.js +35 -34
  64. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-side-navigation.cjs.entry.js +70 -57
  66. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-skeleton.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  69. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-step.cjs.entry.js +3 -3
  71. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
  73. package/dist/cjs/ic-switch.cjs.entry.js +4 -3
  74. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-tab-context.cjs.entry.js +8 -6
  76. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  78. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-tab-panel.cjs.entry.js +4 -2
  80. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-tab.cjs.entry.js +8 -2
  82. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-text-field.cjs.entry.js +9 -18
  84. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-theme.cjs.entry.js +2 -2
  86. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  87. package/dist/cjs/ic-toast.cjs.entry.js +2 -2
  88. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  89. package/dist/cjs/ic-typography.cjs.entry.js +96 -4
  90. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  91. package/dist/cjs/{index-a62312a7.js → index-014e3058.js} +222 -43
  92. package/dist/cjs/index-014e3058.js.map +1 -0
  93. package/dist/cjs/loader.cjs.js +4 -3
  94. package/dist/cjs/loader.cjs.js.map +1 -1
  95. package/dist/collection/collection-manifest.json +13 -12
  96. package/dist/collection/components/ic-alert/ic-alert.e2e.js +16 -0
  97. package/dist/collection/components/ic-alert/ic-alert.e2e.js.map +1 -0
  98. package/dist/collection/components/ic-alert/ic-alert.spec.js +182 -0
  99. package/dist/collection/components/ic-alert/ic-alert.spec.js.map +1 -0
  100. package/dist/collection/components/ic-back-to-top/ic-back-to-top.e2e.js +68 -0
  101. package/dist/collection/components/ic-back-to-top/ic-back-to-top.e2e.js.map +1 -0
  102. package/dist/collection/components/ic-back-to-top/ic-back-to-top.spec.js +123 -0
  103. package/dist/collection/components/ic-back-to-top/ic-back-to-top.spec.js.map +1 -0
  104. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +4 -3
  105. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
  106. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.spec.js +118 -0
  107. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.spec.js.map +1 -0
  108. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.e2e.js +41 -0
  109. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.e2e.js.map +1 -0
  110. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +13 -13
  111. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
  112. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.spec.js +181 -0
  113. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.spec.js.map +1 -0
  114. package/dist/collection/components/ic-button/ic-button.e2e.js +173 -0
  115. package/dist/collection/components/ic-button/ic-button.e2e.js.map +1 -0
  116. package/dist/collection/components/ic-button/ic-button.js +4 -6
  117. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  118. package/dist/collection/components/ic-button/ic-button.spec.js +230 -0
  119. package/dist/collection/components/ic-button/ic-button.spec.js.map +1 -0
  120. package/dist/collection/components/ic-card/ic-card.css +3 -2
  121. package/dist/collection/components/ic-card/ic-card.e2e.js +23 -0
  122. package/dist/collection/components/ic-card/ic-card.e2e.js.map +1 -0
  123. package/dist/collection/components/ic-card/ic-card.js +2 -1
  124. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  125. package/dist/collection/components/ic-card/ic-card.spec.js +152 -0
  126. package/dist/collection/components/ic-card/ic-card.spec.js.map +1 -0
  127. package/dist/collection/components/ic-checkbox/ic-checkbox.js +6 -4
  128. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  129. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.e2e.js +201 -0
  130. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.e2e.js.map +1 -0
  131. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +4 -1
  132. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  133. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.spec.js +175 -0
  134. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.spec.js.map +1 -0
  135. package/dist/collection/components/ic-chip/ic-chip.js +4 -1
  136. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  137. package/dist/collection/components/ic-chip/ic-chip.spec.js +110 -0
  138. package/dist/collection/components/ic-chip/ic-chip.spec.js.map +1 -0
  139. package/dist/collection/components/ic-classification-banner/ic-classification-banner.spec.js +140 -0
  140. package/dist/collection/components/ic-classification-banner/ic-classification-banner.spec.js.map +1 -0
  141. package/dist/collection/components/ic-data-entity/ic-data-entity.spec.js +161 -0
  142. package/dist/collection/components/ic-data-entity/ic-data-entity.spec.js.map +1 -0
  143. package/dist/collection/components/ic-data-row/ic-data-row.spec.js +185 -0
  144. package/dist/collection/components/ic-data-row/ic-data-row.spec.js.map +1 -0
  145. package/dist/collection/components/ic-dialog/ic-dialog.css +595 -0
  146. package/dist/collection/components/ic-dialog/ic-dialog.e2e.js +204 -0
  147. package/dist/collection/components/ic-dialog/ic-dialog.e2e.js.map +1 -0
  148. package/dist/collection/components/ic-dialog/ic-dialog.js +641 -0
  149. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -0
  150. package/dist/collection/components/ic-dialog/ic-dialog.spec.js +520 -0
  151. package/dist/collection/components/ic-dialog/ic-dialog.spec.js.map +1 -0
  152. package/dist/collection/components/ic-dialog/ic-dialog.test.a11y.js +28 -0
  153. package/dist/collection/components/ic-dialog/ic-dialog.test.a11y.js.map +1 -0
  154. package/dist/collection/components/ic-divider/ic-divider.spec.js +24 -0
  155. package/dist/collection/components/ic-divider/ic-divider.spec.js.map +1 -0
  156. package/dist/collection/components/ic-footer/ic-footer.css +2 -2
  157. package/dist/collection/components/ic-footer/ic-footer.e2e.js +50 -0
  158. package/dist/collection/components/ic-footer/ic-footer.e2e.js.map +1 -0
  159. package/dist/collection/components/ic-footer/ic-footer.js +1 -1
  160. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  161. package/dist/collection/components/ic-footer/ic-footer.spec.js +140 -0
  162. package/dist/collection/components/ic-footer/ic-footer.spec.js.map +1 -0
  163. package/dist/collection/components/ic-footer-link/ic-footer-link.spec.js +62 -0
  164. package/dist/collection/components/ic-footer-link/ic-footer-link.spec.js.map +1 -0
  165. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.spec.js +98 -0
  166. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.spec.js.map +1 -0
  167. package/dist/collection/components/ic-hero/ic-hero.spec.js +76 -0
  168. package/dist/collection/components/ic-hero/ic-hero.spec.js.map +1 -0
  169. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.spec.js +180 -0
  170. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.spec.js.map +1 -0
  171. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +32 -4
  172. package/dist/collection/components/ic-input-component-container/ic-input-component-container.spec.js +117 -0
  173. package/dist/collection/components/ic-input-component-container/ic-input-component-container.spec.js.map +1 -0
  174. package/dist/collection/components/ic-input-container/ic-input-container.spec.js +38 -0
  175. package/dist/collection/components/ic-input-container/ic-input-container.spec.js.map +1 -0
  176. package/dist/collection/components/ic-input-label/ic-input-label.spec.js +98 -0
  177. package/dist/collection/components/ic-input-label/ic-input-label.spec.js.map +1 -0
  178. package/dist/collection/components/ic-input-validation/ic-input-validation.css +0 -8
  179. package/dist/collection/components/ic-input-validation/ic-input-validation.spec.js +89 -0
  180. package/dist/collection/components/ic-input-validation/ic-input-validation.spec.js.map +1 -0
  181. package/dist/collection/components/ic-link/ic-link.spec.js +203 -0
  182. package/dist/collection/components/ic-link/ic-link.spec.js.map +1 -0
  183. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +1 -1
  184. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.e2e.js +34 -0
  185. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.e2e.js.map +1 -0
  186. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.spec.js +141 -0
  187. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.spec.js.map +1 -0
  188. package/dist/collection/components/ic-menu/ic-menu.css +9 -1
  189. package/dist/collection/components/ic-menu/ic-menu.js +89 -23
  190. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  191. package/dist/collection/components/ic-menu/ic-menu.spec.js +650 -0
  192. package/dist/collection/components/ic-menu/ic-menu.spec.js.map +1 -0
  193. package/dist/collection/components/ic-menu-group/ic-menu-group.spec.js +94 -0
  194. package/dist/collection/components/ic-menu-group/ic-menu-group.spec.js.map +1 -0
  195. package/dist/collection/components/ic-menu-item/ic-menu-item.css +2 -2
  196. package/dist/collection/components/ic-menu-item/ic-menu-item.js +4 -2
  197. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  198. package/dist/collection/components/ic-menu-item/ic-menu-item.spec.js +105 -0
  199. package/dist/collection/components/ic-menu-item/ic-menu-item.spec.js.map +1 -0
  200. package/dist/collection/components/ic-navigation-button/ic-navigation-button.spec.js +84 -0
  201. package/dist/collection/components/ic-navigation-button/ic-navigation-button.spec.js.map +1 -0
  202. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -1
  203. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +47 -18
  204. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  205. package/dist/collection/components/ic-navigation-group/ic-navigation-group.spec.js +309 -0
  206. package/dist/collection/components/ic-navigation-group/ic-navigation-group.spec.js.map +1 -0
  207. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +13 -7
  208. package/dist/collection/components/ic-navigation-item/ic-navigation-item.spec.js +118 -0
  209. package/dist/collection/components/ic-navigation-item/ic-navigation-item.spec.js.map +1 -0
  210. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.e2e.js +29 -0
  211. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.e2e.js.map +1 -0
  212. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +0 -6
  213. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  214. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.spec.js +176 -0
  215. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.spec.js.map +1 -0
  216. package/dist/collection/components/ic-page-header/ic-page-header.css +1 -1
  217. package/dist/collection/components/ic-page-header/ic-page-header.e2e.js +177 -0
  218. package/dist/collection/components/ic-page-header/ic-page-header.e2e.js.map +1 -0
  219. package/dist/collection/components/ic-page-header/ic-page-header.js +9 -12
  220. package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
  221. package/dist/collection/components/ic-page-header/ic-page-header.spec.js +284 -0
  222. package/dist/collection/components/ic-page-header/ic-page-header.spec.js.map +1 -0
  223. package/dist/collection/components/ic-pagination/ic-pagination.e2e.js +128 -0
  224. package/dist/collection/components/ic-pagination/ic-pagination.e2e.js.map +1 -0
  225. package/dist/collection/components/ic-pagination/ic-pagination.js +55 -3
  226. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  227. package/dist/collection/components/ic-pagination/ic-pagination.spec.js +325 -0
  228. package/dist/collection/components/ic-pagination/ic-pagination.spec.js.map +1 -0
  229. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +5 -1
  230. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
  231. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +1 -1
  232. package/dist/collection/components/ic-popover-menu/ic-popover-menu.e2e.js +30 -0
  233. package/dist/collection/components/ic-popover-menu/ic-popover-menu.e2e.js.map +1 -0
  234. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -3
  235. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  236. package/dist/collection/components/ic-popover-menu/ic-popover-menu.spec.js +381 -0
  237. package/dist/collection/components/ic-popover-menu/ic-popover-menu.spec.js.map +1 -0
  238. package/dist/collection/components/ic-radio-group/ic-radio-group.e2e.js +343 -0
  239. package/dist/collection/components/ic-radio-group/ic-radio-group.e2e.js.map +1 -0
  240. package/dist/collection/components/ic-radio-group/ic-radio-group.js +19 -8
  241. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  242. package/dist/collection/components/ic-radio-group/ic-radio-group.spec.js +303 -0
  243. package/dist/collection/components/ic-radio-group/ic-radio-group.spec.js.map +1 -0
  244. package/dist/collection/components/ic-radio-group/ic-radio-group.types.js +2 -0
  245. package/dist/collection/components/ic-radio-group/ic-radio-group.types.js.map +1 -0
  246. package/dist/collection/components/ic-radio-option/ic-radio-option.css +1 -1
  247. package/dist/collection/components/ic-radio-option/ic-radio-option.js +5 -14
  248. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  249. package/dist/collection/components/ic-search-bar/ic-search-bar.e2e.js +1054 -0
  250. package/dist/collection/components/ic-search-bar/ic-search-bar.e2e.js.map +1 -0
  251. package/dist/collection/components/ic-search-bar/ic-search-bar.js +12 -9
  252. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  253. package/dist/collection/components/ic-search-bar/ic-search-bar.spec.js +570 -0
  254. package/dist/collection/components/ic-search-bar/ic-search-bar.spec.js.map +1 -0
  255. package/dist/collection/components/ic-search-bar/ic-search-bar.types.js.map +1 -1
  256. package/dist/collection/components/ic-section-container/ic-section-container.spec.js +69 -0
  257. package/dist/collection/components/ic-section-container/ic-section-container.spec.js.map +1 -0
  258. package/dist/collection/components/ic-select/ic-select.e2e.js +1765 -0
  259. package/dist/collection/components/ic-select/ic-select.e2e.js.map +1 -0
  260. package/dist/collection/components/ic-select/ic-select.js +46 -45
  261. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  262. package/dist/collection/components/ic-select/ic-select.spec.js +1276 -0
  263. package/dist/collection/components/ic-select/ic-select.spec.js.map +1 -0
  264. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +0 -7
  265. package/dist/collection/components/ic-side-navigation/ic-side-navigation.e2e.js +412 -0
  266. package/dist/collection/components/ic-side-navigation/ic-side-navigation.e2e.js.map +1 -0
  267. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +67 -54
  268. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  269. package/dist/collection/components/ic-side-navigation/ic-side-navigation.spec.js +470 -0
  270. package/dist/collection/components/ic-side-navigation/ic-side-navigation.spec.js.map +1 -0
  271. package/dist/collection/components/ic-skeleton/ic-skeleton.spec.js +89 -0
  272. package/dist/collection/components/ic-skeleton/ic-skeleton.spec.js.map +1 -0
  273. package/dist/collection/components/ic-status-tag/ic-status-tag.css +2 -6
  274. package/dist/collection/components/ic-status-tag/ic-status-tag.spec.js +43 -0
  275. package/dist/collection/components/ic-status-tag/ic-status-tag.spec.js.map +1 -0
  276. package/dist/collection/components/ic-step/ic-step.css +5 -5
  277. package/dist/collection/components/ic-step/ic-step.js +1 -1
  278. package/dist/collection/components/ic-step/ic-step.js.map +1 -1
  279. package/dist/collection/components/ic-step/ic-step.spec.js +176 -0
  280. package/dist/collection/components/ic-step/ic-step.spec.js.map +1 -0
  281. package/dist/collection/components/ic-stepper/ic-stepper.e2e.js +49 -0
  282. package/dist/collection/components/ic-stepper/ic-stepper.e2e.js.map +1 -0
  283. package/dist/collection/components/ic-stepper/ic-stepper.spec.js +706 -0
  284. package/dist/collection/components/ic-stepper/ic-stepper.spec.js.map +1 -0
  285. package/dist/collection/components/ic-switch/ic-switch.css +1 -1
  286. package/dist/collection/components/ic-switch/ic-switch.js +2 -1
  287. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  288. package/dist/collection/components/ic-switch/ic-switch.spec.js +104 -0
  289. package/dist/collection/components/ic-switch/ic-switch.spec.js.map +1 -0
  290. package/dist/collection/components/ic-tab/ic-tab.e2e.js +32 -0
  291. package/dist/collection/components/ic-tab/ic-tab.e2e.js.map +1 -0
  292. package/dist/collection/components/ic-tab/ic-tab.js +7 -1
  293. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  294. package/dist/collection/components/ic-tab/ic-tab.spec.js +159 -0
  295. package/dist/collection/components/ic-tab/ic-tab.spec.js.map +1 -0
  296. package/dist/collection/components/ic-tab-context/ic-tab-context.e2e.js +317 -0
  297. package/dist/collection/components/ic-tab-context/ic-tab-context.e2e.js.map +1 -0
  298. package/dist/collection/components/ic-tab-context/ic-tab-context.js +7 -5
  299. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  300. package/dist/collection/components/ic-tab-context/ic-tab-context.spec.js +369 -0
  301. package/dist/collection/components/ic-tab-context/ic-tab-context.spec.js.map +1 -0
  302. package/dist/collection/components/ic-tab-group/ic-tab-group.css +2 -2
  303. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +3 -1
  304. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
  305. package/dist/collection/components/ic-tab-panel/ic-tab-panel.spec.js +65 -0
  306. package/dist/collection/components/ic-tab-panel/ic-tab-panel.spec.js.map +1 -0
  307. package/dist/collection/components/ic-text-field/ic-text-field.css +0 -4
  308. package/dist/collection/components/ic-text-field/ic-text-field.e2e.js +98 -0
  309. package/dist/collection/components/ic-text-field/ic-text-field.e2e.js.map +1 -0
  310. package/dist/collection/components/ic-text-field/ic-text-field.input.spec.js +236 -0
  311. package/dist/collection/components/ic-text-field/ic-text-field.input.spec.js.map +1 -0
  312. package/dist/collection/components/ic-text-field/ic-text-field.js +16 -25
  313. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  314. package/dist/collection/components/ic-text-field/ic-text-field.textarea.spec.js +310 -0
  315. package/dist/collection/components/ic-text-field/ic-text-field.textarea.spec.js.map +1 -0
  316. package/dist/collection/components/ic-theme/ic-theme.e2e.js +72 -0
  317. package/dist/collection/components/ic-theme/ic-theme.e2e.js.map +1 -0
  318. package/dist/collection/components/ic-theme/ic-theme.spec.js +77 -0
  319. package/dist/collection/components/ic-theme/ic-theme.spec.js.map +1 -0
  320. package/dist/collection/components/ic-toast/ic-toast.e2e.js +82 -0
  321. package/dist/collection/components/ic-toast/ic-toast.e2e.js.map +1 -0
  322. package/dist/collection/components/ic-toast/ic-toast.spec.js +278 -0
  323. package/dist/collection/components/ic-toast/ic-toast.spec.js.map +1 -0
  324. package/dist/collection/components/ic-toast-region/ic-toast-region.spec.js +62 -0
  325. package/dist/collection/components/ic-toast-region/ic-toast-region.spec.js.map +1 -0
  326. package/dist/collection/components/ic-tooltip/ic-tooltip.css +22 -8
  327. package/dist/collection/components/ic-tooltip/ic-tooltip.e2e.js +115 -0
  328. package/dist/collection/components/ic-tooltip/ic-tooltip.e2e.js.map +1 -0
  329. package/dist/collection/components/ic-tooltip/ic-tooltip.js +26 -27
  330. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  331. package/dist/collection/components/ic-tooltip/ic-tooltip.spec.js +128 -0
  332. package/dist/collection/components/ic-tooltip/ic-tooltip.spec.js.map +1 -0
  333. package/dist/collection/components/ic-top-navigation/ic-top-navigation.e2e.js +42 -0
  334. package/dist/collection/components/ic-top-navigation/ic-top-navigation.e2e.js.map +1 -0
  335. package/dist/collection/components/ic-top-navigation/ic-top-navigation.mobile.e2e.js +242 -0
  336. package/dist/collection/components/ic-top-navigation/ic-top-navigation.mobile.e2e.js.map +1 -0
  337. package/dist/collection/components/ic-top-navigation/ic-top-navigation.spec.js +286 -0
  338. package/dist/collection/components/ic-top-navigation/ic-top-navigation.spec.js.map +1 -0
  339. package/dist/collection/components/ic-typography/ic-typography.css +39 -0
  340. package/dist/collection/components/ic-typography/ic-typography.e2e.js +36 -0
  341. package/dist/collection/components/ic-typography/ic-typography.e2e.js.map +1 -0
  342. package/dist/collection/components/ic-typography/ic-typography.js +120 -2
  343. package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
  344. package/dist/collection/components/ic-typography/ic-typography.spec.js +296 -0
  345. package/dist/collection/components/ic-typography/ic-typography.spec.js.map +1 -0
  346. package/dist/collection/testspec.setup.js +11 -0
  347. package/dist/collection/testspec.setup.js.map +1 -1
  348. package/dist/collection/utils/helpers.js +23 -24
  349. package/dist/collection/utils/helpers.js.map +1 -1
  350. package/dist/components/helpers.js +24 -25
  351. package/dist/components/helpers.js.map +1 -1
  352. package/dist/components/ic-alert.js +1 -113
  353. package/dist/components/ic-alert.js.map +1 -1
  354. package/dist/components/ic-alert2.js +117 -0
  355. package/dist/components/ic-alert2.js.map +1 -0
  356. package/dist/components/ic-back-to-top.js +2 -2
  357. package/dist/components/ic-breadcrumb-group.js +15 -15
  358. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  359. package/dist/components/ic-breadcrumb2.js +5 -4
  360. package/dist/components/ic-breadcrumb2.js.map +1 -1
  361. package/dist/components/ic-button2.js +5 -7
  362. package/dist/components/ic-button2.js.map +1 -1
  363. package/dist/components/ic-card.js +4 -3
  364. package/dist/components/ic-card.js.map +1 -1
  365. package/dist/components/ic-checkbox-group.js +5 -2
  366. package/dist/components/ic-checkbox-group.js.map +1 -1
  367. package/dist/components/ic-checkbox.js +7 -5
  368. package/dist/components/ic-checkbox.js.map +1 -1
  369. package/dist/components/ic-chip.js +5 -2
  370. package/dist/components/ic-chip.js.map +1 -1
  371. package/dist/components/ic-classification-banner.js +1 -1
  372. package/dist/components/ic-data-entity.js +1 -1
  373. package/dist/components/ic-data-row.js +2 -2
  374. package/dist/components/ic-dialog.d.ts +11 -0
  375. package/dist/components/ic-dialog.js +357 -0
  376. package/dist/components/ic-dialog.js.map +1 -0
  377. package/dist/components/ic-divider2.js +2 -2
  378. package/dist/components/ic-footer-link-group.js +2 -2
  379. package/dist/components/ic-footer-link.js +2 -2
  380. package/dist/components/ic-footer.js +4 -4
  381. package/dist/components/ic-footer.js.map +1 -1
  382. package/dist/components/ic-hero.js +2 -2
  383. package/dist/components/ic-horizontal-scroll2.js +2 -2
  384. package/dist/components/ic-input-component-container2.js +3 -3
  385. package/dist/components/ic-input-component-container2.js.map +1 -1
  386. package/dist/components/ic-input-container2.js +1 -1
  387. package/dist/components/ic-input-label2.js +2 -2
  388. package/dist/components/ic-input-validation2.js +3 -3
  389. package/dist/components/ic-input-validation2.js.map +1 -1
  390. package/dist/components/ic-link2.js +2 -2
  391. package/dist/components/ic-loading-indicator2.js +2 -2
  392. package/dist/components/ic-loading-indicator2.js.map +1 -1
  393. package/dist/components/ic-menu-group.js +1 -1
  394. package/dist/components/ic-menu-item2.js +6 -4
  395. package/dist/components/ic-menu-item2.js.map +1 -1
  396. package/dist/components/ic-menu2.js +69 -27
  397. package/dist/components/ic-menu2.js.map +1 -1
  398. package/dist/components/ic-navigation-button.js +2 -2
  399. package/dist/components/ic-navigation-group.js +50 -21
  400. package/dist/components/ic-navigation-group.js.map +1 -1
  401. package/dist/components/ic-navigation-item.js +3 -3
  402. package/dist/components/ic-navigation-item.js.map +1 -1
  403. package/dist/components/ic-navigation-menu2.js +2 -8
  404. package/dist/components/ic-navigation-menu2.js.map +1 -1
  405. package/dist/components/ic-page-header.js +12 -15
  406. package/dist/components/ic-page-header.js.map +1 -1
  407. package/dist/components/ic-pagination-item2.js +5 -1
  408. package/dist/components/ic-pagination-item2.js.map +1 -1
  409. package/dist/components/ic-pagination.js +17 -4
  410. package/dist/components/ic-pagination.js.map +1 -1
  411. package/dist/components/ic-popover-menu.js +7 -6
  412. package/dist/components/ic-popover-menu.js.map +1 -1
  413. package/dist/components/ic-radio-group.js +16 -5
  414. package/dist/components/ic-radio-group.js.map +1 -1
  415. package/dist/components/ic-radio-option.js +5 -11
  416. package/dist/components/ic-radio-option.js.map +1 -1
  417. package/dist/components/ic-search-bar.js +6 -3
  418. package/dist/components/ic-search-bar.js.map +1 -1
  419. package/dist/components/ic-section-container2.js +1 -1
  420. package/dist/components/ic-select.js +35 -34
  421. package/dist/components/ic-select.js.map +1 -1
  422. package/dist/components/ic-side-navigation.js +70 -57
  423. package/dist/components/ic-side-navigation.js.map +1 -1
  424. package/dist/components/ic-skeleton.js +1 -1
  425. package/dist/components/ic-status-tag.js +3 -3
  426. package/dist/components/ic-status-tag.js.map +1 -1
  427. package/dist/components/ic-step.js +3 -3
  428. package/dist/components/ic-step.js.map +1 -1
  429. package/dist/components/ic-stepper.js +2 -2
  430. package/dist/components/ic-switch.js +4 -3
  431. package/dist/components/ic-switch.js.map +1 -1
  432. package/dist/components/ic-tab-context.js +8 -6
  433. package/dist/components/ic-tab-context.js.map +1 -1
  434. package/dist/components/ic-tab-group.js +3 -3
  435. package/dist/components/ic-tab-group.js.map +1 -1
  436. package/dist/components/ic-tab-panel.js +4 -2
  437. package/dist/components/ic-tab-panel.js.map +1 -1
  438. package/dist/components/ic-tab.js +8 -2
  439. package/dist/components/ic-tab.js.map +1 -1
  440. package/dist/components/ic-text-field2.js +9 -18
  441. package/dist/components/ic-text-field2.js.map +1 -1
  442. package/dist/components/ic-theme.js +2 -2
  443. package/dist/components/ic-toast-region.js +1 -1
  444. package/dist/components/ic-toast.js +2 -2
  445. package/dist/components/ic-tooltip2.js +29 -30
  446. package/dist/components/ic-tooltip2.js.map +1 -1
  447. package/dist/components/ic-top-navigation.js +2 -2
  448. package/dist/components/ic-typography2.js +100 -5
  449. package/dist/components/ic-typography2.js.map +1 -1
  450. package/dist/components/index.d.ts +9 -60
  451. package/dist/components/index.js +1 -58
  452. package/dist/components/index.js.map +1 -1
  453. package/dist/core/core.css +41 -2
  454. package/dist/core/core.esm.js +1 -1
  455. package/dist/core/core.esm.js.map +1 -1
  456. package/dist/core/index.esm.js.map +1 -1
  457. package/dist/core/{p-de45134c.entry.js → p-04d626ee.entry.js} +2 -2
  458. package/dist/core/p-04d626ee.entry.js.map +1 -0
  459. package/dist/core/p-06321d19.js.map +1 -1
  460. package/dist/core/{p-0575a77f.entry.js → p-0d325b4c.entry.js} +2 -2
  461. package/dist/core/p-0d325b4c.entry.js.map +1 -0
  462. package/dist/core/{p-6a77992e.entry.js → p-249af8ab.entry.js} +2 -2
  463. package/dist/core/p-249af8ab.entry.js.map +1 -0
  464. package/dist/core/{p-d5d9923a.entry.js → p-29d9fea1.entry.js} +2 -2
  465. package/dist/core/p-29d9fea1.entry.js.map +1 -0
  466. package/dist/core/p-2e051e1e.entry.js +2 -0
  467. package/dist/core/p-2e051e1e.entry.js.map +1 -0
  468. package/dist/core/{p-3a67718c.entry.js → p-2ec49a7e.entry.js} +2 -2
  469. package/dist/core/p-2ec49a7e.entry.js.map +1 -0
  470. package/dist/core/{p-223a214f.entry.js → p-3114a4b3.entry.js} +2 -2
  471. package/dist/core/p-3114a4b3.entry.js.map +1 -0
  472. package/dist/core/p-311c38b3.entry.js +2 -0
  473. package/dist/core/p-311c38b3.entry.js.map +1 -0
  474. package/dist/core/p-31ccdd50.entry.js +2 -0
  475. package/dist/core/p-31ccdd50.entry.js.map +1 -0
  476. package/dist/core/p-31e80ccb.entry.js +2 -0
  477. package/dist/core/p-31e80ccb.entry.js.map +1 -0
  478. package/dist/core/p-323bce82.entry.js +2 -0
  479. package/dist/core/p-323bce82.entry.js.map +1 -0
  480. package/dist/core/{p-52fd3533.entry.js → p-3918c27a.entry.js} +2 -2
  481. package/dist/core/p-3918c27a.entry.js.map +1 -0
  482. package/dist/core/p-3ce0aa02.entry.js +2 -0
  483. package/dist/core/p-3ce0aa02.entry.js.map +1 -0
  484. package/dist/core/p-44512ebe.js.map +1 -1
  485. package/dist/core/p-4a385752.js +2 -0
  486. package/dist/core/p-4a385752.js.map +1 -0
  487. package/dist/core/{p-312c10b0.entry.js → p-4c4fa082.entry.js} +2 -2
  488. package/dist/core/p-4c4fa082.entry.js.map +1 -0
  489. package/dist/core/{p-fc7dce3d.entry.js → p-4f7b34ed.entry.js} +2 -2
  490. package/dist/core/p-4f7b34ed.entry.js.map +1 -0
  491. package/dist/core/p-524557bc.entry.js +2 -0
  492. package/dist/core/p-524557bc.entry.js.map +1 -0
  493. package/dist/core/p-551986d1.entry.js +2 -0
  494. package/dist/core/p-551986d1.entry.js.map +1 -0
  495. package/dist/core/p-57460fa3.entry.js +2 -0
  496. package/dist/core/p-57460fa3.entry.js.map +1 -0
  497. package/dist/core/p-5fcd965f.entry.js +2 -0
  498. package/dist/core/p-5fcd965f.entry.js.map +1 -0
  499. package/dist/core/{p-e41e701a.entry.js → p-617950f8.entry.js} +2 -2
  500. package/dist/core/p-617950f8.entry.js.map +1 -0
  501. package/dist/core/{p-e384aaee.entry.js → p-68308ecd.entry.js} +2 -2
  502. package/dist/core/p-68308ecd.entry.js.map +1 -0
  503. package/dist/core/p-6c76c6ba.entry.js +2 -0
  504. package/dist/core/p-6c76c6ba.entry.js.map +1 -0
  505. package/dist/core/p-6f57b13c.js.map +1 -1
  506. package/dist/core/p-79914e0c.entry.js +2 -0
  507. package/dist/core/p-79914e0c.entry.js.map +1 -0
  508. package/dist/core/p-820e4c17.entry.js +2 -0
  509. package/dist/core/p-820e4c17.entry.js.map +1 -0
  510. package/dist/core/{p-3fb307e6.entry.js → p-84c8c4c7.entry.js} +2 -2
  511. package/dist/core/p-84c8c4c7.entry.js.map +1 -0
  512. package/dist/core/p-8911656b.entry.js +2 -0
  513. package/dist/core/p-8911656b.entry.js.map +1 -0
  514. package/dist/core/p-8c7f4343.js.map +1 -1
  515. package/dist/core/p-8d4f7027.js.map +1 -1
  516. package/dist/core/p-97286148.entry.js +2 -0
  517. package/dist/core/p-97286148.entry.js.map +1 -0
  518. package/dist/core/{p-454b1ecd.entry.js → p-97fd0cc1.entry.js} +2 -2
  519. package/dist/core/p-97fd0cc1.entry.js.map +1 -0
  520. package/dist/core/p-a74b8476.entry.js +2 -0
  521. package/dist/core/p-a74b8476.entry.js.map +1 -0
  522. package/dist/core/{p-9413d639.entry.js → p-a9de9aba.entry.js} +2 -2
  523. package/dist/core/p-a9de9aba.entry.js.map +1 -0
  524. package/dist/core/p-ad6c4c02.entry.js +2 -0
  525. package/dist/core/p-ad6c4c02.entry.js.map +1 -0
  526. package/dist/core/{p-a0f4e641.entry.js → p-aeef3c9d.entry.js} +2 -2
  527. package/dist/core/p-aeef3c9d.entry.js.map +1 -0
  528. package/dist/core/p-b03bd9c6.entry.js +2 -0
  529. package/dist/core/p-b03bd9c6.entry.js.map +1 -0
  530. package/dist/core/p-b0685167.entry.js +2 -0
  531. package/dist/core/p-b0685167.entry.js.map +1 -0
  532. package/dist/core/p-b35a9909.entry.js +2 -0
  533. package/dist/core/p-b35a9909.entry.js.map +1 -0
  534. package/dist/core/p-bad10f6c.entry.js +2 -0
  535. package/dist/core/p-bad10f6c.entry.js.map +1 -0
  536. package/dist/core/{p-002a63e9.entry.js → p-bda4414e.entry.js} +2 -2
  537. package/dist/core/p-bda4414e.entry.js.map +1 -0
  538. package/dist/core/p-c0333310.entry.js +2 -0
  539. package/dist/core/p-c0333310.entry.js.map +1 -0
  540. package/dist/core/p-c3f9fb1d.entry.js +2 -0
  541. package/dist/core/p-c3f9fb1d.entry.js.map +1 -0
  542. package/dist/core/{p-5d077cf7.entry.js → p-ca6820dc.entry.js} +2 -2
  543. package/dist/core/p-ca6820dc.entry.js.map +1 -0
  544. package/dist/core/p-d6694b41.entry.js +2 -0
  545. package/dist/core/p-d6694b41.entry.js.map +1 -0
  546. package/dist/core/{p-1eb0992b.entry.js → p-da4c1409.entry.js} +2 -2
  547. package/dist/core/p-da4c1409.entry.js.map +1 -0
  548. package/dist/core/p-dbe06c3b.entry.js +2 -0
  549. package/dist/core/p-dbe06c3b.entry.js.map +1 -0
  550. package/dist/core/{p-28bc3bf0.entry.js → p-df67b151.entry.js} +2 -2
  551. package/dist/core/p-df67b151.entry.js.map +1 -0
  552. package/dist/core/{p-546b620e.entry.js → p-dfd31e28.entry.js} +2 -2
  553. package/dist/core/p-dfd31e28.entry.js.map +1 -0
  554. package/dist/core/{p-dc0b9e80.entry.js → p-e3e6308b.entry.js} +2 -2
  555. package/dist/core/p-e3e6308b.entry.js.map +1 -0
  556. package/dist/core/p-ea233813.entry.js +2 -0
  557. package/dist/core/p-ea233813.entry.js.map +1 -0
  558. package/dist/core/p-ec26fc38.js.map +1 -1
  559. package/dist/core/{p-f3e10149.entry.js → p-ecdcae46.entry.js} +2 -2
  560. package/dist/core/p-ecdcae46.entry.js.map +1 -0
  561. package/dist/core/p-ef91c17e.entry.js +2 -0
  562. package/dist/core/p-ef91c17e.entry.js.map +1 -0
  563. package/dist/core/{p-a33a04b2.entry.js → p-f0714432.entry.js} +2 -2
  564. package/dist/core/p-f0714432.entry.js.map +1 -0
  565. package/dist/core/p-f3053872.js +3 -0
  566. package/dist/core/p-f3053872.js.map +1 -0
  567. package/dist/core/{p-47b0ed42.entry.js → p-f381e93f.entry.js} +2 -2
  568. package/dist/core/p-f381e93f.entry.js.map +1 -0
  569. package/dist/core/p-fd482bd7.entry.js +2 -0
  570. package/dist/core/p-fd482bd7.entry.js.map +1 -0
  571. package/dist/core/p-fe2c4009.entry.js +2 -0
  572. package/dist/core/p-fe2c4009.entry.js.map +1 -0
  573. package/dist/esm/core.js +7 -3
  574. package/dist/esm/core.js.map +1 -1
  575. package/dist/esm/{helpers-b2b47a7d.js → helpers-8e57082b.js} +25 -26
  576. package/dist/esm/helpers-8e57082b.js.map +1 -0
  577. package/dist/esm/ic-alert.entry.js +2 -2
  578. package/dist/esm/ic-back-to-top.entry.js +2 -2
  579. package/dist/esm/ic-breadcrumb-group.entry.js +15 -15
  580. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  581. package/dist/esm/ic-breadcrumb.entry.js +6 -5
  582. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  583. package/dist/esm/ic-button_3.entry.js +33 -36
  584. package/dist/esm/ic-button_3.entry.js.map +1 -1
  585. package/dist/esm/ic-card.entry.js +4 -3
  586. package/dist/esm/ic-card.entry.js.map +1 -1
  587. package/dist/esm/ic-checkbox-group.entry.js +5 -2
  588. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  589. package/dist/esm/ic-checkbox.entry.js +7 -5
  590. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  591. package/dist/esm/ic-chip.entry.js +5 -2
  592. package/dist/esm/ic-chip.entry.js.map +1 -1
  593. package/dist/esm/ic-classification-banner.entry.js +1 -1
  594. package/dist/esm/ic-data-entity.entry.js +1 -1
  595. package/dist/esm/ic-data-row.entry.js +2 -2
  596. package/dist/esm/ic-dialog.entry.js +292 -0
  597. package/dist/esm/ic-dialog.entry.js.map +1 -0
  598. package/dist/esm/ic-divider.entry.js +2 -2
  599. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  600. package/dist/esm/ic-footer-link.entry.js +2 -2
  601. package/dist/esm/ic-footer.entry.js +4 -4
  602. package/dist/esm/ic-footer.entry.js.map +1 -1
  603. package/dist/esm/ic-hero.entry.js +2 -2
  604. package/dist/esm/ic-horizontal-scroll.entry.js +2 -2
  605. package/dist/esm/ic-input-component-container_3.entry.js +69 -27
  606. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  607. package/dist/esm/ic-input-label_2.entry.js +3 -3
  608. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  609. package/dist/esm/ic-link.entry.js +2 -2
  610. package/dist/esm/ic-menu-group.entry.js +1 -1
  611. package/dist/esm/ic-menu-item.entry.js +6 -4
  612. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  613. package/dist/esm/ic-navigation-button.entry.js +2 -2
  614. package/dist/esm/ic-navigation-group.entry.js +50 -21
  615. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  616. package/dist/esm/ic-navigation-item.entry.js +3 -3
  617. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  618. package/dist/esm/ic-navigation-menu.entry.js +2 -8
  619. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  620. package/dist/esm/ic-page-header.entry.js +12 -15
  621. package/dist/esm/ic-page-header.entry.js.map +1 -1
  622. package/dist/esm/ic-pagination-item.entry.js +6 -1
  623. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  624. package/dist/esm/ic-pagination.entry.js +14 -2
  625. package/dist/esm/ic-pagination.entry.js.map +1 -1
  626. package/dist/esm/ic-popover-menu.entry.js +7 -6
  627. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  628. package/dist/esm/ic-radio-group.entry.js +16 -5
  629. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  630. package/dist/esm/ic-radio-option.entry.js +5 -11
  631. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  632. package/dist/esm/ic-search-bar.entry.js +6 -3
  633. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  634. package/dist/esm/ic-section-container.entry.js +1 -1
  635. package/dist/esm/ic-select.entry.js +35 -34
  636. package/dist/esm/ic-select.entry.js.map +1 -1
  637. package/dist/esm/ic-side-navigation.entry.js +70 -57
  638. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  639. package/dist/esm/ic-skeleton.entry.js +1 -1
  640. package/dist/esm/ic-status-tag.entry.js +3 -3
  641. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  642. package/dist/esm/ic-step.entry.js +3 -3
  643. package/dist/esm/ic-step.entry.js.map +1 -1
  644. package/dist/esm/ic-stepper.entry.js +2 -2
  645. package/dist/esm/ic-switch.entry.js +4 -3
  646. package/dist/esm/ic-switch.entry.js.map +1 -1
  647. package/dist/esm/ic-tab-context.entry.js +8 -6
  648. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  649. package/dist/esm/ic-tab-group.entry.js +3 -3
  650. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  651. package/dist/esm/ic-tab-panel.entry.js +4 -2
  652. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  653. package/dist/esm/ic-tab.entry.js +8 -2
  654. package/dist/esm/ic-tab.entry.js.map +1 -1
  655. package/dist/esm/ic-text-field.entry.js +9 -18
  656. package/dist/esm/ic-text-field.entry.js.map +1 -1
  657. package/dist/esm/ic-theme.entry.js +2 -2
  658. package/dist/esm/ic-toast-region.entry.js +1 -1
  659. package/dist/esm/ic-toast.entry.js +2 -2
  660. package/dist/esm/ic-top-navigation.entry.js +2 -2
  661. package/dist/esm/ic-typography.entry.js +96 -4
  662. package/dist/esm/ic-typography.entry.js.map +1 -1
  663. package/dist/esm/{index-3b144b17.js → index-a77644e1.js} +222 -44
  664. package/dist/esm/index-a77644e1.js.map +1 -0
  665. package/dist/esm/loader.js +4 -3
  666. package/dist/esm/loader.js.map +1 -1
  667. package/dist/esm/polyfills/css-shim.js +1 -1
  668. package/dist/types/components/ic-breadcrumb/ic-breadcrumb.types.d.ts +1 -1
  669. package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +3 -0
  670. package/dist/types/components/ic-button/ic-button.types.d.ts +4 -4
  671. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +1 -0
  672. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
  673. package/dist/types/components/ic-chip/ic-chip.d.ts +1 -0
  674. package/dist/types/components/ic-chip/ic-chip.types.d.ts +2 -2
  675. package/dist/types/components/ic-classification-banner/ic-classification-banner.types.d.ts +1 -1
  676. package/dist/types/components/ic-dialog/ic-dialog.d.ts +123 -0
  677. package/dist/types/components/ic-dialog/ic-dialog.test.a11y.d.ts +1 -0
  678. package/dist/types/components/ic-footer/ic-footer.types.d.ts +1 -1
  679. package/dist/types/components/ic-footer-link/ic-footer-link.d.ts +1 -1
  680. package/dist/types/components/ic-hero/ic-hero.types.d.ts +1 -1
  681. package/dist/types/components/ic-input-validation/ic-input-validation.types.d.ts +1 -1
  682. package/dist/types/components/ic-loading-indicator/ic-loading-indicator.types.d.ts +2 -2
  683. package/dist/types/components/ic-menu/ic-menu.d.ts +7 -0
  684. package/dist/types/components/ic-menu-item/ic-menu-item.types.d.ts +1 -1
  685. package/dist/types/components/ic-navigation-button/ic-navigation-button.types.d.ts +1 -1
  686. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +4 -1
  687. package/dist/types/components/ic-pagination/ic-pagination.d.ts +8 -1
  688. package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +1 -1
  689. package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +2 -1
  690. package/dist/types/components/ic-pagination-item/ic-pagination-item.types.d.ts +1 -1
  691. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +1 -0
  692. package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +4 -3
  693. package/dist/types/components/ic-radio-group/ic-radio-group.types.d.ts +7 -0
  694. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +1 -3
  695. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -1
  696. package/dist/types/components/ic-search-bar/ic-search-bar.types.d.ts +1 -1
  697. package/dist/types/components/ic-select/ic-select.d.ts +14 -14
  698. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +1 -0
  699. package/dist/types/components/ic-skeleton/ic-skeleton.types.d.ts +1 -1
  700. package/dist/types/components/ic-status-tag/ic-status-tag.types.d.ts +2 -2
  701. package/dist/types/components/ic-step/ic-step.types.d.ts +3 -3
  702. package/dist/types/components/ic-stepper/ic-stepper.types.d.ts +1 -1
  703. package/dist/types/components/ic-tab/ic-tab.d.ts +1 -0
  704. package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -1
  705. package/dist/types/components/ic-text-field/ic-text-field.types.d.ts +3 -3
  706. package/dist/types/components/ic-toast/ic-toast.types.d.ts +1 -1
  707. package/dist/types/components/ic-tooltip/ic-tooltip.types.d.ts +1 -1
  708. package/dist/types/components/ic-typography/ic-typography.d.ts +27 -0
  709. package/dist/types/components.d.ts +222 -42
  710. package/dist/types/stencil-public-runtime.d.ts +72 -15
  711. package/dist/types/testspec.setup.d.ts +9 -0
  712. package/dist/types/utils/helpers.d.ts +1 -0
  713. package/dist/types/utils/types.d.ts +22 -22
  714. package/hydrate/index.d.ts +17 -16
  715. package/hydrate/index.js +920 -384
  716. package/loader/index.d.ts +9 -0
  717. package/package.json +5 -5
  718. package/dist/cjs/helpers-2021e212.js.map +0 -1
  719. package/dist/cjs/index-a62312a7.js.map +0 -1
  720. package/dist/core/p-002a63e9.entry.js.map +0 -1
  721. package/dist/core/p-0575a77f.entry.js.map +0 -1
  722. package/dist/core/p-0a41c3cb.entry.js +0 -2
  723. package/dist/core/p-0a41c3cb.entry.js.map +0 -1
  724. package/dist/core/p-100dbcec.entry.js +0 -2
  725. package/dist/core/p-100dbcec.entry.js.map +0 -1
  726. package/dist/core/p-14835d6f.entry.js +0 -2
  727. package/dist/core/p-14835d6f.entry.js.map +0 -1
  728. package/dist/core/p-1eb0992b.entry.js.map +0 -1
  729. package/dist/core/p-223a214f.entry.js.map +0 -1
  730. package/dist/core/p-276f7ecb.entry.js +0 -2
  731. package/dist/core/p-276f7ecb.entry.js.map +0 -1
  732. package/dist/core/p-28bc3bf0.entry.js.map +0 -1
  733. package/dist/core/p-2e949135.entry.js +0 -2
  734. package/dist/core/p-2e949135.entry.js.map +0 -1
  735. package/dist/core/p-312c10b0.entry.js.map +0 -1
  736. package/dist/core/p-3845b769.entry.js +0 -2
  737. package/dist/core/p-3845b769.entry.js.map +0 -1
  738. package/dist/core/p-3a67718c.entry.js.map +0 -1
  739. package/dist/core/p-3c23f963.entry.js +0 -2
  740. package/dist/core/p-3c23f963.entry.js.map +0 -1
  741. package/dist/core/p-3dc2ff7b.entry.js +0 -2
  742. package/dist/core/p-3dc2ff7b.entry.js.map +0 -1
  743. package/dist/core/p-3dea2867.js +0 -2
  744. package/dist/core/p-3dea2867.js.map +0 -1
  745. package/dist/core/p-3e5eb873.entry.js +0 -2
  746. package/dist/core/p-3e5eb873.entry.js.map +0 -1
  747. package/dist/core/p-3fb307e6.entry.js.map +0 -1
  748. package/dist/core/p-454b1ecd.entry.js.map +0 -1
  749. package/dist/core/p-4595f48f.entry.js +0 -2
  750. package/dist/core/p-4595f48f.entry.js.map +0 -1
  751. package/dist/core/p-47b0ed42.entry.js.map +0 -1
  752. package/dist/core/p-4b87445b.entry.js +0 -2
  753. package/dist/core/p-4b87445b.entry.js.map +0 -1
  754. package/dist/core/p-4c8fcfe6.entry.js +0 -2
  755. package/dist/core/p-4c8fcfe6.entry.js.map +0 -1
  756. package/dist/core/p-52fd3533.entry.js.map +0 -1
  757. package/dist/core/p-546b620e.entry.js.map +0 -1
  758. package/dist/core/p-56fe91ad.entry.js +0 -2
  759. package/dist/core/p-56fe91ad.entry.js.map +0 -1
  760. package/dist/core/p-589f6dd3.js +0 -3
  761. package/dist/core/p-589f6dd3.js.map +0 -1
  762. package/dist/core/p-5d077cf7.entry.js.map +0 -1
  763. package/dist/core/p-6a77992e.entry.js.map +0 -1
  764. package/dist/core/p-6b39f8b4.entry.js +0 -2
  765. package/dist/core/p-6b39f8b4.entry.js.map +0 -1
  766. package/dist/core/p-80eff050.entry.js +0 -2
  767. package/dist/core/p-80eff050.entry.js.map +0 -1
  768. package/dist/core/p-8780890e.entry.js +0 -2
  769. package/dist/core/p-8780890e.entry.js.map +0 -1
  770. package/dist/core/p-895bda21.entry.js +0 -2
  771. package/dist/core/p-895bda21.entry.js.map +0 -1
  772. package/dist/core/p-92c4fa7f.entry.js +0 -2
  773. package/dist/core/p-92c4fa7f.entry.js.map +0 -1
  774. package/dist/core/p-9413d639.entry.js.map +0 -1
  775. package/dist/core/p-a0f4e641.entry.js.map +0 -1
  776. package/dist/core/p-a33a04b2.entry.js.map +0 -1
  777. package/dist/core/p-a5bee11f.entry.js +0 -2
  778. package/dist/core/p-a5bee11f.entry.js.map +0 -1
  779. package/dist/core/p-a7fdb9a8.entry.js +0 -2
  780. package/dist/core/p-a7fdb9a8.entry.js.map +0 -1
  781. package/dist/core/p-b61e76e2.entry.js +0 -2
  782. package/dist/core/p-b61e76e2.entry.js.map +0 -1
  783. package/dist/core/p-c0813424.entry.js +0 -2
  784. package/dist/core/p-c0813424.entry.js.map +0 -1
  785. package/dist/core/p-cb437317.entry.js +0 -2
  786. package/dist/core/p-cb437317.entry.js.map +0 -1
  787. package/dist/core/p-d5d9923a.entry.js.map +0 -1
  788. package/dist/core/p-dc0b9e80.entry.js.map +0 -1
  789. package/dist/core/p-de45134c.entry.js.map +0 -1
  790. package/dist/core/p-de891d3d.entry.js +0 -2
  791. package/dist/core/p-de891d3d.entry.js.map +0 -1
  792. package/dist/core/p-e0f24ccd.entry.js +0 -2
  793. package/dist/core/p-e0f24ccd.entry.js.map +0 -1
  794. package/dist/core/p-e384aaee.entry.js.map +0 -1
  795. package/dist/core/p-e41e701a.entry.js.map +0 -1
  796. package/dist/core/p-e839e5dc.entry.js +0 -2
  797. package/dist/core/p-e839e5dc.entry.js.map +0 -1
  798. package/dist/core/p-ea526b54.entry.js +0 -2
  799. package/dist/core/p-ea526b54.entry.js.map +0 -1
  800. package/dist/core/p-ec8b228c.entry.js +0 -2
  801. package/dist/core/p-ec8b228c.entry.js.map +0 -1
  802. package/dist/core/p-f3e10149.entry.js.map +0 -1
  803. package/dist/core/p-fc7dce3d.entry.js.map +0 -1
  804. package/dist/esm/helpers-b2b47a7d.js.map +0 -1
  805. package/dist/esm/index-3b144b17.js.map +0 -1
@@ -0,0 +1,77 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { Theme } from "./ic-theme";
3
+ import * as helpers from "../../utils/helpers";
4
+ import { BLACK_MIN_COLOR_BRIGHTNESS, WHITE_MAX_COLOR_BRIGHTNESS, } from "../../utils/constants";
5
+ //mocked as getThemeColorBrightness is NaN when run in test context
6
+ //instead we return a value which will trigger the console warning about theme color contrast
7
+ const mockThemeColorContrastFail = () => {
8
+ const func = jest.fn(() => {
9
+ return (BLACK_MIN_COLOR_BRIGHTNESS + WHITE_MAX_COLOR_BRIGHTNESS) / 2;
10
+ });
11
+ Object.defineProperty(helpers, "getThemeColorBrightness", {
12
+ value: func,
13
+ });
14
+ };
15
+ const expectRGBToBe = (page, expectR, expectG, expectB) => {
16
+ const r = page.doc.documentElement.style.getPropertyValue("--ic-theme-primary-r");
17
+ const g = page.doc.documentElement.style.getPropertyValue("--ic-theme-primary-g");
18
+ const b = page.doc.documentElement.style.getPropertyValue("--ic-theme-primary-b");
19
+ expect(r).toBe(expectR);
20
+ expect(g).toBe(expectG);
21
+ expect(b).toBe(expectB);
22
+ };
23
+ beforeAll(() => {
24
+ jest.spyOn(console, "warn").mockImplementation(jest.fn());
25
+ });
26
+ describe("ic-theme", () => {
27
+ it("should render", async () => {
28
+ const page = await newSpecPage({
29
+ components: [Theme],
30
+ html: `<ic-theme></ic-theme>`,
31
+ });
32
+ expect(page.root).toEqualHtml(`
33
+ <ic-theme>
34
+ <mock:shadow-root></mock:shadow-root>
35
+ </ic-theme>
36
+ `);
37
+ });
38
+ it("should set theme colour with hex", async () => {
39
+ const page = await newSpecPage({
40
+ components: [Theme],
41
+ html: `<ic-theme color="#FFC0CB"></ic-theme>`,
42
+ });
43
+ expectRGBToBe(page, "255", "192", "203");
44
+ });
45
+ it("should set theme colour with 3 character hex", async () => {
46
+ const page = await newSpecPage({
47
+ components: [Theme],
48
+ html: `<ic-theme color="#FFF"></ic-theme>`,
49
+ });
50
+ expectRGBToBe(page, "255", "255", "255");
51
+ });
52
+ it("should set theme colour with rgb", async () => {
53
+ const page = await newSpecPage({
54
+ components: [Theme],
55
+ html: `<ic-theme color="rgb(159, 43, 104)"></ic-theme>`,
56
+ });
57
+ expectRGBToBe(page, "159", "43", "104");
58
+ });
59
+ it("should set theme colour with rgba", async () => {
60
+ const page = await newSpecPage({
61
+ components: [Theme],
62
+ html: `<ic-theme color="rgba(159, 43, 104, 1)"></ic-theme>`,
63
+ });
64
+ expectRGBToBe(page, "159", "43", "104");
65
+ });
66
+ it("should test updating theme color", async () => {
67
+ mockThemeColorContrastFail();
68
+ const page = await newSpecPage({
69
+ components: [Theme],
70
+ html: `<ic-theme color="rgba(159, 43, 104)"></ic-theme>`,
71
+ });
72
+ page.root.color = "rgba(133, 133, 133, 1)";
73
+ await page.waitForChanges();
74
+ expectRGBToBe(page, "133", "133", "133");
75
+ });
76
+ });
77
+ //# sourceMappingURL=ic-theme.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-theme.spec.js","sourceRoot":"","sources":["../../../src/components/ic-theme/ic-theme.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAY,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAE/B,mEAAmE;AACnE,6FAA6F;AAC7F,MAAM,0BAA0B,GAAG,GAAG,EAAE;EACtC,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;IACxB,OAAO,CAAC,0BAA0B,GAAG,0BAA0B,CAAC,GAAG,CAAC,CAAC;EACvE,CAAC,CAAC,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K,CAAC;MACnB,IAAI,EAAE,kDAAkD;KACzD,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,wBAAwB,CAAC;IAC3C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;EAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage, SpecPage } from \"@stencil/core/testing\";\nimport { Theme } from \"./ic-theme\";\nimport * as helpers from \"../../utils/helpers\";\nimport {\n BLACK_MIN_COLOR_BRIGHTNESS,\n WHITE_MAX_COLOR_BRIGHTNESS,\n} from \"../../utils/constants\";\n\n//mocked as getThemeColorBrightness is NaN when run in test context\n//instead we return a value which will trigger the console warning about theme color contrast\nconst mockThemeColorContrastFail = () => {\n const func = jest.fn(() => {\n return (BLACK_MIN_COLOR_BRIGHTNESS + WHITE_MAX_COLOR_BRIGHTNESS) / 2;\n });\n\n Object.defineProperty(helpers, \"getThemeColorBrightness\", {\n value: func,\n });\n};\n\nconst expectRGBToBe = (\n page: SpecPage,\n expectR: string,\n expectG: string,\n expectB: string\n) => {\n const r = page.doc.documentElement.style.getPropertyValue(\n \"--ic-theme-primary-r\"\n );\n const g = page.doc.documentElement.style.getPropertyValue(\n \"--ic-theme-primary-g\"\n );\n const b = page.doc.documentElement.style.getPropertyValue(\n \"--ic-theme-primary-b\"\n );\n\n expect(r).toBe(expectR);\n expect(g).toBe(expectG);\n expect(b).toBe(expectB);\n};\n\nbeforeAll(() => {\n jest.spyOn(console, \"warn\").mockImplementation(jest.fn());\n});\n\ndescribe(\"ic-theme\", () => {\n it(\"should render\", async () => {\n const page = await newSpecPage({\n components: [Theme],\n html: `<ic-theme></ic-theme>`,\n });\n expect(page.root).toEqualHtml(`\n <ic-theme>\n <mock:shadow-root></mock:shadow-root>\n </ic-theme>\n `);\n });\n\n it(\"should set theme colour with hex\", async () => {\n const page = await newSpecPage({\n components: [Theme],\n html: `<ic-theme color=\"#FFC0CB\"></ic-theme>`,\n });\n\n expectRGBToBe(page, \"255\", \"192\", \"203\");\n });\n\n it(\"should set theme colour with 3 character hex\", async () => {\n const page = await newSpecPage({\n components: [Theme],\n html: `<ic-theme color=\"#FFF\"></ic-theme>`,\n });\n\n expectRGBToBe(page, \"255\", \"255\", \"255\");\n });\n\n it(\"should set theme colour with rgb\", async () => {\n const page = await newSpecPage({\n components: [Theme],\n html: `<ic-theme color=\"rgb(159, 43, 104)\"></ic-theme>`,\n });\n\n expectRGBToBe(page, \"159\", \"43\", \"104\");\n });\n\n it(\"should set theme colour with rgba\", async () => {\n const page = await newSpecPage({\n components: [Theme],\n html: `<ic-theme color=\"rgba(159, 43, 104, 1)\"></ic-theme>`,\n });\n expectRGBToBe(page, \"159\", \"43\", \"104\");\n });\n\n it(\"should test updating theme color\", async () => {\n mockThemeColorContrastFail();\n\n const page = await newSpecPage({\n components: [Theme],\n html: `<ic-theme color=\"rgba(159, 43, 104)\"></ic-theme>`,\n });\n\n page.root.color = \"rgba(133, 133, 133, 1)\";\n await page.waitForChanges();\n\n expectRGBToBe(page, \"133\", \"133\", \"133\");\n });\n});\n"]}
@@ -0,0 +1,82 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe("ic-toast component", () => {
3
+ it("should close on dismiss icon click", async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent(`<ic-toast heading="Heading"></ic-toast>`);
6
+ await page.waitForChanges();
7
+ let toast = await page.find("ic-toast");
8
+ await toast.callMethod("setVisible");
9
+ await page.waitForChanges();
10
+ expect(toast).not.toHaveClass("hidden");
11
+ const dismissButton = await page.find("ic-toast >>> ic-button");
12
+ expect(dismissButton).not.toBeNull();
13
+ await dismissButton.click();
14
+ toast = await page.find("ic-toast");
15
+ expect(toast).toHaveClass("hidden");
16
+ });
17
+ it("should focus slotted action element when opened if an action is provided", async () => {
18
+ const page = await newE2EPage();
19
+ await page.setContent(`<ic-toast heading="Heading"><ic-button id="button1" slot="action">Button</ic-button></ic-toast>`);
20
+ await page.waitForChanges();
21
+ const toast = await page.find("ic-toast");
22
+ await toast.callMethod("setVisible");
23
+ await page.waitForChanges();
24
+ await page.waitForTimeout(300);
25
+ const slottedButton = await page.find("ic-button");
26
+ expect(slottedButton).not.toBeNull;
27
+ const activeElement = await page.evaluate(() => document.activeElement.id);
28
+ expect(activeElement).toBe("button1");
29
+ });
30
+ it("should focus the dismiss button when opened if no action is provided", async () => {
31
+ const page = await newE2EPage();
32
+ await page.setContent(`<ic-toast heading="Heading"></ic-toast>`);
33
+ await page.waitForChanges();
34
+ const toast = await page.find("ic-toast");
35
+ await toast.callMethod("setVisible");
36
+ await page.waitForChanges();
37
+ await page.waitForTimeout(300);
38
+ const activeElement = await page.$eval("ic-toast", (el) => el.shadowRoot.activeElement.id);
39
+ expect(activeElement).toBe("dismiss-button");
40
+ });
41
+ it("should set the dimissMode to manual if the action slot is used on an autoDismiss toast", async () => {
42
+ const page = await newE2EPage();
43
+ await page.setContent(`<ic-toast heading="Heading" dismiss-mode="automatic"><ic-button slot="action">Button</ic-button></ic-toast>`);
44
+ await page.waitForChanges();
45
+ const dismissMode = await page.$eval("ic-toast", (el) => el.dismissMode);
46
+ expect(dismissMode).toBe("manual");
47
+ });
48
+ it("should set the variant to neutral if the neutral-icon slot is used when the variant isn't set", async () => {
49
+ const page = await newE2EPage();
50
+ await page.setContent(`<ic-toast heading="Heading">
51
+ <svg
52
+ slot="neutral-icon"
53
+ width="24"
54
+ height="24"
55
+ viewBox="0 0 24 24"
56
+ fill="none"
57
+ xmlns="http://www.w3.org/2000/svg"
58
+ >
59
+ <path
60
+ d="M8.79502 15.875L4.62502 11.705L3.20502 13.115L8.79502 18.705L20.795 6.70501L19.385 5.29501L8.79502 15.875Z"
61
+ />
62
+ </svg></ic-toast>`);
63
+ await page.waitForChanges();
64
+ const variant = await page.$eval("ic-toast", (el) => el.variant);
65
+ expect(variant).toBe("neutral");
66
+ });
67
+ it("should set the autoDismissTimeout to 5000ms if the prop provided is below", async () => {
68
+ const page = await newE2EPage();
69
+ await page.setContent(`<ic-toast heading="Heading" auto-dismiss-timeout="100"></ic-toast>`);
70
+ await page.waitForChanges();
71
+ const variant = await page.$eval("ic-toast", (el) => el.autoDismissTimeout);
72
+ expect(variant).toBe(5000);
73
+ });
74
+ it("should not render an icon if the variant is neutral and the neutral-icon slot is not used", async () => {
75
+ const page = await newE2EPage();
76
+ await page.setContent(`<ic-toast heading="Heading" variant="neutral"></ic-toast>`);
77
+ await page.waitForChanges();
78
+ const icon = await page.find("ic-toast >>> span");
79
+ expect(icon).toBeNull();
80
+ });
81
+ });
82
+ //# sourceMappingURL=ic-toast.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-toast.e2e.js","sourceRoot":"","sources":["../../../src/components/ic-toast/ic-toast.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;EAClC,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;IAClD,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CAAC,yCAAyC,CAAC,CAAC;IACjE,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,IAAI,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,MAAM,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAErC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC5B,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAExC,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAChE,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,C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AAS,CAAC,CAAC;EAClC,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,2EAA2E,EAAE,KAAK,IAAI,EAAE;IACzF,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CACnB,oEAAoE,CACrE,CAAC;IACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,CAC9B,UAAU,EACV,CAAC,EAAE,EAAE,EAAE,CAAE,EAAyB,CAAC,kBAAkB,CACtD,CAAC;IACF,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EAC7B,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,2FAA2F,EAAE,KAAK,IAAI,EAAE;IACzG,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CACnB,2DAA2D,CAC5D,CAAC;IACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAClD,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;EAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from \"@stencil/core/testing\";\n\ndescribe(\"ic-toast component\", () => {\n it(\"should close on dismiss icon click\", async () => {\n const page = await newE2EPage();\n await page.setContent(`<ic-toast heading=\"Heading\"></ic-toast>`);\n await page.waitForChanges();\n\n let toast = await page.find(\"ic-toast\");\n await toast.callMethod(\"setVisible\");\n\n await page.waitForChanges();\n expect(toast).not.toHaveClass(\"hidden\");\n\n const dismissButton = await page.find(\"ic-toast >>> ic-button\");\n expect(dismissButton).not.toBeNull();\n\n await dismissButton.click();\n\n toast = await page.find(\"ic-toast\");\n expect(toast).toHaveClass(\"hidden\");\n });\n\n it(\"should focus slotted action element when opened if an action is provided\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `<ic-toast heading=\"Heading\"><ic-button id=\"button1\" slot=\"action\">Button</ic-button></ic-toast>`\n );\n await page.waitForChanges();\n\n const toast = await page.find(\"ic-toast\");\n await toast.callMethod(\"setVisible\");\n\n await page.waitForChanges();\n await page.waitForTimeout(300);\n\n const slottedButton = await page.find(\"ic-button\");\n expect(slottedButton).not.toBeNull;\n\n const activeElement = await page.evaluate(() => document.activeElement.id);\n expect(activeElement).toBe(\"button1\");\n });\n\n it(\"should focus the dismiss button when opened if no action is provided\", async () => {\n const page = await newE2EPage();\n await page.setContent(`<ic-toast heading=\"Heading\"></ic-toast>`);\n await page.waitForChanges();\n\n const toast = await page.find(\"ic-toast\");\n await toast.callMethod(\"setVisible\");\n\n await page.waitForChanges();\n await page.waitForTimeout(300);\n\n const activeElement = await page.$eval(\n \"ic-toast\",\n (el) => el.shadowRoot.activeElement.id\n );\n expect(activeElement).toBe(\"dismiss-button\");\n });\n\n it(\"should set the dimissMode to manual if the action slot is used on an autoDismiss toast\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `<ic-toast heading=\"Heading\" dismiss-mode=\"automatic\"><ic-button slot=\"action\">Button</ic-button></ic-toast>`\n );\n await page.waitForChanges();\n\n const dismissMode = await page.$eval(\n \"ic-toast\",\n (el) => (el as HTMLIcToastElement).dismissMode\n );\n expect(dismissMode).toBe(\"manual\");\n });\n\n it(\"should set the variant to neutral if the neutral-icon slot is used when the variant isn't set\", async () => {\n const page = await newE2EPage();\n await page.setContent(`<ic-toast heading=\"Heading\">\n <svg\n slot=\"neutral-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.79502 15.875L4.62502 11.705L3.20502 13.115L8.79502 18.705L20.795 6.70501L19.385 5.29501L8.79502 15.875Z\"\n />\n </svg></ic-toast>`);\n await page.waitForChanges();\n\n const variant = await page.$eval(\n \"ic-toast\",\n (el) => (el as HTMLIcToastElement).variant\n );\n expect(variant).toBe(\"neutral\");\n });\n\n it(\"should set the autoDismissTimeout to 5000ms if the prop provided is below\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `<ic-toast heading=\"Heading\" auto-dismiss-timeout=\"100\"></ic-toast>`\n );\n await page.waitForChanges();\n\n const variant = await page.$eval(\n \"ic-toast\",\n (el) => (el as HTMLIcToastElement).autoDismissTimeout\n );\n expect(variant).toBe(5000);\n });\n\n it(\"should not render an icon if the variant is neutral and the neutral-icon slot is not used\", async () => {\n const page = await newE2EPage();\n await page.setContent(\n `<ic-toast heading=\"Heading\" variant=\"neutral\"></ic-toast>`\n );\n await page.waitForChanges();\n\n const icon = await page.find(\"ic-toast >>> span\");\n expect(icon).toBeNull();\n });\n});\n"]}
@@ -0,0 +1,278 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { waitForTimeout } from "../../testspec.setup";
3
+ import { Button } from "../ic-button/ic-button";
4
+ import { Link } from "../ic-link/ic-link";
5
+ import { Toast } from "./ic-toast";
6
+ describe("ic-toast component", () => {
7
+ it("should render when heading is supplied", async () => {
8
+ const page = await newSpecPage({
9
+ components: [Toast],
10
+ html: `<ic-toast heading="Heading"></ic-toast>`,
11
+ });
12
+ page.rootInstance.setVisible();
13
+ await page.waitForChanges();
14
+ expect(page.root)
15
+ .toEqualHtml(`<ic-toast aria-label="Heading" heading="Heading" role="dialog">
16
+ <mock:shadow-root>
17
+ <div class="container">
18
+ <div class="toast-content">
19
+ <div class="toast-message">
20
+ <ic-typography variant="subtitle-large">
21
+ <h5>
22
+ Heading
23
+ </h5>
24
+ </ic-typography>
25
+ </div>
26
+ </div>
27
+ <ic-button appearance="light" id="dismiss-button" aria-label="dismiss" variant="icon">
28
+ svg
29
+ </ic-button>
30
+ </div>
31
+ </mock:shadow-root>
32
+ </ic-toast>`);
33
+ });
34
+ it("should render when a heading and message is supplied", async () => {
35
+ const page = await newSpecPage({
36
+ components: [Toast],
37
+ html: `<ic-toast heading="Heading" message="toast message"></ic-toast>`,
38
+ });
39
+ page.rootInstance.setVisible();
40
+ await page.waitForChanges();
41
+ expect(page.root)
42
+ .toEqualHtml(`<ic-toast aria-label="Heading" aria-description="toast message" message="toast message" heading="Heading" role="dialog">
43
+ <mock:shadow-root>
44
+ <div class="container">
45
+ <div class="toast-content">
46
+ <div class="toast-message">
47
+ <ic-typography variant="subtitle-large">
48
+ <h5>
49
+ Heading
50
+ </h5>
51
+ </ic-typography>
52
+ <ic-typography variant="body">
53
+ <p>
54
+ toast message
55
+ </p>
56
+ </ic-typography>
57
+ </div>
58
+ </div>
59
+ <ic-button appearance="light" id="dismiss-button" aria-label="dismiss" variant="icon">
60
+ svg
61
+ </ic-button>
62
+ </div>
63
+ </mock:shadow-root>
64
+ </ic-toast>`);
65
+ });
66
+ it("should render a variant icon and banner when a variant is supplied", async () => {
67
+ const page = await newSpecPage({
68
+ components: [Toast],
69
+ html: `<ic-toast heading="Heading" variant="success"></ic-toast>`,
70
+ });
71
+ page.rootInstance.setVisible();
72
+ await page.waitForChanges();
73
+ expect(page.root)
74
+ .toEqualHtml(`<ic-toast aria-label="Success" aria-description="Heading" heading="Heading" role="dialog" variant="success">
75
+ <mock:shadow-root>
76
+ <div class="container">
77
+ <div class="toast-icon-container">
78
+ <div class="divider divider-success"></div>
79
+ <span class="toast-icon">
80
+ svg
81
+ </span>
82
+ </div>
83
+ <div class="toast-content">
84
+ <div class="toast-message">
85
+ <ic-typography variant="subtitle-large">
86
+ <h5>
87
+ Heading
88
+ </h5>
89
+ </ic-typography>
90
+ </div>
91
+ </div>
92
+ <ic-button appearance="light" id="dismiss-button" aria-label="dismiss" variant="icon">
93
+ svg
94
+ </ic-button>
95
+ </div>
96
+ </mock:shadow-root>
97
+ </ic-toast>`);
98
+ });
99
+ it("should render a loading indicator instead of a dismiss button when dismissMode is automatic", async () => {
100
+ const page = await newSpecPage({
101
+ components: [Toast],
102
+ html: `<ic-toast heading="Heading" dismiss-mode="automatic"></ic-toast>`,
103
+ });
104
+ page.rootInstance.setVisible();
105
+ await page.waitForChanges();
106
+ expect(page.root)
107
+ .toEqualHtml(`<ic-toast heading="Heading" role="status" dismiss-mode="automatic">
108
+ <mock:shadow-root>
109
+ <div class="container">
110
+ <div class="toast-content">
111
+ <div class="toast-message">
112
+ <ic-typography variant="subtitle-large">
113
+ <h5>
114
+ Heading
115
+ </h5>
116
+ </ic-typography>
117
+ </div>
118
+ </div>
119
+ <ic-loading-indicator appearance="light" class="toast-dismiss-timer" progress="100" size="icon"></ic-loading-indicator>
120
+ </div>
121
+ </mock:shadow-root>
122
+ </ic-toast>`);
123
+ });
124
+ it("should display the toast when setVisible is ran", async () => {
125
+ const page = await newSpecPage({
126
+ components: [Toast, Button],
127
+ html: `<ic-toast heading="Heading"></ic-toast>`,
128
+ });
129
+ expect(page.root.classList.contains("hidden")).toBeTruthy();
130
+ page.rootInstance.setVisible();
131
+ await page.waitForChanges();
132
+ expect(page.root.classList.contains("hidden")).toBeFalsy();
133
+ });
134
+ it("should emit the icDismiss event when dismissed with by clicking the button", async () => {
135
+ const page = await newSpecPage({
136
+ components: [Toast, Button],
137
+ html: `<ic-toast heading="Heading"></ic-toast>`,
138
+ });
139
+ const callbackFn = jest.fn();
140
+ page.doc.addEventListener("icDismiss", callbackFn);
141
+ page.rootInstance.setVisible();
142
+ await page.waitForChanges();
143
+ const dismissButton = page.root.shadowRoot.querySelector("ic-button");
144
+ dismissButton.click();
145
+ await page.waitForChanges();
146
+ expect(callbackFn).toHaveBeenCalled();
147
+ });
148
+ it("should emit the icDismiss event when dismissed with by pressing Escape", async () => {
149
+ const page = await newSpecPage({
150
+ components: [Toast, Button],
151
+ html: `<ic-toast heading="Heading"></ic-toast>`,
152
+ });
153
+ const callbackFn = jest.fn();
154
+ page.doc.addEventListener("icDismiss", callbackFn);
155
+ page.rootInstance.setVisible();
156
+ await page.waitForChanges();
157
+ const event = new KeyboardEvent("keydown", { key: "Escape" });
158
+ page.rootInstance.handleKeyboard(event);
159
+ await page.waitForChanges();
160
+ expect(callbackFn).toHaveBeenCalled();
161
+ });
162
+ it("should emit icDismiss after the timer expires when an auto dismiss toast is made visible", async () => {
163
+ const page = await newSpecPage({
164
+ components: [Toast],
165
+ html: `<ic-toast heading="Heading" dismiss-mode="automatic"></ic-toast>`,
166
+ });
167
+ const callbackFn = jest.fn();
168
+ page.doc.addEventListener("icDismiss", callbackFn);
169
+ page.rootInstance.setVisible();
170
+ await page.waitForChanges();
171
+ expect(callbackFn).not.toHaveBeenCalled();
172
+ await waitForTimeout(6000);
173
+ expect(callbackFn).toHaveBeenCalled();
174
+ });
175
+ it("should pause timer when mouse is hovered over, and resume when mouse leaves", async () => {
176
+ const page = await newSpecPage({
177
+ components: [Toast],
178
+ html: `<ic-toast heading="Heading" dismiss-mode="automatic" auto-dismiss-timeout="10000"></ic-toast>`,
179
+ });
180
+ const intervalCb = jest.spyOn(window, "setInterval");
181
+ const clearCb = jest.spyOn(window, "clearInterval");
182
+ page.rootInstance.setVisible();
183
+ await page.waitForChanges();
184
+ await waitForTimeout(3000);
185
+ expect(intervalCb).toHaveBeenCalledTimes(1);
186
+ page.rootInstance.handleTimer({ type: "mouseenter" });
187
+ await page.waitForChanges();
188
+ expect(clearCb).toHaveBeenCalled();
189
+ page.rootInstance.handleTimer({ type: "mouseleave" });
190
+ await page.waitForChanges();
191
+ await waitForTimeout(1000);
192
+ expect(intervalCb).toHaveBeenCalledTimes(2);
193
+ page.setContent("");
194
+ });
195
+ it("should post a console error message if the message or header is too long", async () => {
196
+ const longText = "lorem donec massa sapien faucibus et molestie ac feugiat sed lectus vestibulum mattis ullamcorper velit sed ullamcorper morbi tincidunt ornare massa eget egestas purus viverra accumsan in nisl nisi scelerisque eu ultrices vitae auctor eu augue ut lectus arcu bibendum at varius vel pharetra vel turpis nunc eget lorem dolor";
197
+ const consoleCb = jest
198
+ .spyOn(console, "error")
199
+ .mockImplementation(jest.fn());
200
+ await newSpecPage({
201
+ components: [Toast],
202
+ html: `<ic-toast heading="${longText}" message="${longText}"></ic-toast>`,
203
+ });
204
+ expect(consoleCb).toHaveBeenCalledTimes(1);
205
+ });
206
+ it("should only focus the two interactive elements in the manual toast when using tab", async () => {
207
+ const page = await newSpecPage({
208
+ components: [Toast, Button],
209
+ html: `<ic-toast heading="Heading"><ic-button id="slottedButton" slot="action">Click me</ic-button></ic-toast>`,
210
+ });
211
+ const focusCallback = jest.spyOn(Button.prototype, "setFocus");
212
+ page.rootInstance.setVisible();
213
+ await page.waitForChanges();
214
+ await waitForTimeout(300);
215
+ expect(focusCallback).toHaveBeenCalledTimes(1);
216
+ page.rootInstance.handleKeyboard({
217
+ key: "Tab",
218
+ shiftKey: false,
219
+ preventDefault: () => null,
220
+ });
221
+ await page.waitForChanges();
222
+ expect(focusCallback).toHaveBeenCalledTimes(2);
223
+ page.rootInstance.handleKeyboard({
224
+ key: "Tab",
225
+ shiftKey: false,
226
+ preventDefault: () => null,
227
+ });
228
+ await page.waitForChanges();
229
+ expect(focusCallback).toHaveBeenCalledTimes(3);
230
+ page.rootInstance.handleKeyboard({
231
+ key: "Tab",
232
+ shiftKey: false,
233
+ preventDefault: () => null,
234
+ });
235
+ await page.waitForChanges();
236
+ expect(focusCallback).toHaveBeenCalledTimes(4);
237
+ page.rootInstance.handleKeyboard({
238
+ key: "Tab",
239
+ shiftKey: true,
240
+ preventDefault: () => null,
241
+ });
242
+ await page.waitForChanges();
243
+ expect(focusCallback).toHaveBeenCalledTimes(5);
244
+ page.rootInstance.handleKeyboard({
245
+ key: "Tab",
246
+ shiftKey: true,
247
+ preventDefault: () => null,
248
+ });
249
+ await page.waitForChanges();
250
+ expect(focusCallback).toHaveBeenCalledTimes(6);
251
+ page.rootInstance.handleKeyboard({
252
+ key: "Tab",
253
+ shiftKey: true,
254
+ preventDefault: () => null,
255
+ });
256
+ await page.waitForChanges();
257
+ expect(focusCallback).toHaveBeenCalledTimes(7);
258
+ });
259
+ it("should focus a link element that has been slotted into the action slot", async () => {
260
+ const page = await newSpecPage({
261
+ components: [Toast, Link],
262
+ html: `<ic-toast heading="Heading"><ic-link href="/" slot="action">Text</ic-link></ic-toast>`,
263
+ });
264
+ const focusCallback = jest.spyOn(Link.prototype, "setFocus");
265
+ page.rootInstance.setVisible();
266
+ await page.waitForChanges();
267
+ await waitForTimeout(300);
268
+ expect(focusCallback).toHaveBeenCalledTimes(1);
269
+ });
270
+ it("should update the dialog's label if the prop neutralIconAriaLabel prop is provided", async () => {
271
+ const page = await newSpecPage({
272
+ components: [Toast],
273
+ html: `<ic-toast variant="neutral" neutral-icon-aria-label="Hello World" heading="Heading"></ic-toast>`,
274
+ });
275
+ expect(page.root.getAttribute("aria-label")).toBe("Hello World");
276
+ });
277
+ });
278
+ //# sourceMappingURL=ic-toast.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-toast.spec.js","sourceRoot":"","sources":["../../../src/components/ic-toast/ic-toast.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;EAClC,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;IACtD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;MACnB,IAAI,EAAE,yCAAyC;KAChD,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;IAC/B,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,I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W,CAAC;MAC7B,UAAU,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;MACzB,IAAI,EAAE,uFAAuF;KAC9F,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAE7D,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;IAC/B,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC5B,MAAM,cAAc,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,CAAC,aAAa,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;EACjD,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,oFAAoF,EAAE,KAAK,IAAI,EAAE;IAClG,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;MACnB,IAAI,EAAE,iGAAiG;KACxG,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;EACnE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from \"@stencil/core/testing\";\nimport { waitForTimeout } from \"../../testspec.setup\";\nimport { Button } from \"../ic-button/ic-button\";\nimport { Link } from \"../ic-link/ic-link\";\nimport { Toast } from \"./ic-toast\";\n\ndescribe(\"ic-toast component\", () => {\n it(\"should render when heading is supplied\", async () => {\n const page = await newSpecPage({\n components: [Toast],\n html: `<ic-toast heading=\"Heading\"></ic-toast>`,\n });\n\n page.rootInstance.setVisible();\n await page.waitForChanges();\n\n expect(page.root)\n .toEqualHtml(`<ic-toast aria-label=\"Heading\" heading=\"Heading\" role=\"dialog\">\n <mock:shadow-root>\n <div class=\"container\">\n <div class=\"toast-content\">\n <div class=\"toast-message\">\n <ic-typography variant=\"subtitle-large\">\n <h5>\n Heading\n </h5>\n </ic-typography>\n </div>\n </div>\n <ic-button appearance=\"light\" id=\"dismiss-button\" aria-label=\"dismiss\" variant=\"icon\">\n svg\n </ic-button>\n </div>\n </mock:shadow-root>\n </ic-toast>`);\n });\n\n it(\"should render when a heading and message is supplied\", async () => {\n const page = await newSpecPage({\n components: [Toast],\n html: `<ic-toast heading=\"Heading\" message=\"toast message\"></ic-toast>`,\n });\n\n page.rootInstance.setVisible();\n await page.waitForChanges();\n\n expect(page.root)\n .toEqualHtml(`<ic-toast aria-label=\"Heading\" aria-description=\"toast message\" message=\"toast message\" heading=\"Heading\" role=\"dialog\">\n <mock:shadow-root>\n <div class=\"container\">\n <div class=\"toast-content\">\n <div class=\"toast-message\">\n <ic-typography variant=\"subtitle-large\">\n <h5>\n Heading\n </h5>\n </ic-typography>\n <ic-typography variant=\"body\">\n <p>\n toast message\n </p>\n </ic-typography>\n </div>\n </div>\n <ic-button appearance=\"light\" id=\"dismiss-button\" aria-label=\"dismiss\" variant=\"icon\">\n svg\n </ic-button>\n </div>\n </mock:shadow-root>\n </ic-toast>`);\n });\n\n it(\"should render a variant icon and banner when a variant is supplied\", async () => {\n const page = await newSpecPage({\n components: [Toast],\n html: `<ic-toast heading=\"Heading\" variant=\"success\"></ic-toast>`,\n });\n\n page.rootInstance.setVisible();\n await page.waitForChanges();\n\n expect(page.root)\n .toEqualHtml(`<ic-toast aria-label=\"Success\" aria-description=\"Heading\" heading=\"Heading\" role=\"dialog\" variant=\"success\">\n <mock:shadow-root>\n <div class=\"container\">\n <div class=\"toast-icon-container\">\n <div class=\"divider divider-success\"></div>\n <span class=\"toast-icon\">\n svg\n </span>\n </div>\n <div class=\"toast-content\">\n <div class=\"toast-message\">\n <ic-typography variant=\"subtitle-large\">\n <h5>\n Heading\n </h5>\n </ic-typography>\n </div>\n </div>\n <ic-button appearance=\"light\" id=\"dismiss-button\" aria-label=\"dismiss\" variant=\"icon\">\n svg\n </ic-button>\n </div>\n </mock:shadow-root>\n </ic-toast>`);\n });\n\n it(\"should render a loading indicator instead of a dismiss button when dismissMode is automatic\", async () => {\n const page = await newSpecPage({\n components: [Toast],\n html: `<ic-toast heading=\"Heading\" dismiss-mode=\"automatic\"></ic-toast>`,\n });\n\n page.rootInstance.setVisible();\n await page.waitForChanges();\n\n expect(page.root)\n .toEqualHtml(`<ic-toast heading=\"Heading\" role=\"status\" dismiss-mode=\"automatic\">\n <mock:shadow-root>\n <div class=\"container\">\n <div class=\"toast-content\">\n <div class=\"toast-message\">\n <ic-typography variant=\"subtitle-large\">\n <h5>\n Heading\n </h5>\n </ic-typography>\n </div>\n </div>\n <ic-loading-indicator appearance=\"light\" class=\"toast-dismiss-timer\" progress=\"100\" size=\"icon\"></ic-loading-indicator>\n </div>\n </mock:shadow-root>\n </ic-toast>`);\n });\n\n it(\"should display the toast when setVisible is ran\", async () => {\n const page = await newSpecPage({\n components: [Toast, Button],\n html: `<ic-toast heading=\"Heading\"></ic-toast>`,\n });\n\n expect(page.root.classList.contains(\"hidden\")).toBeTruthy();\n\n page.rootInstance.setVisible();\n await page.waitForChanges();\n expect(page.root.classList.contains(\"hidden\")).toBeFalsy();\n });\n\n it(\"should emit the icDismiss event when dismissed with by clicking the button\", async () => {\n const page = await newSpecPage({\n components: [Toast, Button],\n html: `<ic-toast heading=\"Heading\"></ic-toast>`,\n });\n\n const callbackFn = jest.fn();\n page.doc.addEventListener(\"icDismiss\", callbackFn);\n page.rootInstance.setVisible();\n await page.waitForChanges();\n\n const dismissButton = page.root.shadowRoot.querySelector(\"ic-button\");\n dismissButton.click();\n await page.waitForChanges();\n\n expect(callbackFn).toHaveBeenCalled();\n });\n\n it(\"should emit the icDismiss event when dismissed with by pressing Escape\", async () => {\n const page = await newSpecPage({\n components: [Toast, Button],\n html: `<ic-toast heading=\"Heading\"></ic-toast>`,\n });\n\n const callbackFn = jest.fn();\n page.doc.addEventListener(\"icDismiss\", callbackFn);\n page.rootInstance.setVisible();\n await page.waitForChanges();\n\n const event = new KeyboardEvent(\"keydown\", { key: \"Escape\" });\n page.rootInstance.handleKeyboard(event);\n await page.waitForChanges();\n\n expect(callbackFn).toHaveBeenCalled();\n });\n\n it(\"should emit icDismiss after the timer expires when an auto dismiss toast is made visible\", async () => {\n const page = await newSpecPage({\n components: [Toast],\n html: `<ic-toast heading=\"Heading\" dismiss-mode=\"automatic\"></ic-toast>`,\n });\n\n const callbackFn = jest.fn();\n page.doc.addEventListener(\"icDismiss\", callbackFn);\n page.rootInstance.setVisible();\n await page.waitForChanges();\n expect(callbackFn).not.toHaveBeenCalled();\n\n await waitForTimeout(6000);\n expect(callbackFn).toHaveBeenCalled();\n });\n\n it(\"should pause timer when mouse is hovered over, and resume when mouse leaves\", async () => {\n const page = await newSpecPage({\n components: [Toast],\n html: `<ic-toast heading=\"Heading\" dismiss-mode=\"automatic\" auto-dismiss-timeout=\"10000\"></ic-toast>`,\n });\n\n const intervalCb = jest.spyOn(window, \"setInterval\");\n const clearCb = jest.spyOn(window, \"clearInterval\");\n\n page.rootInstance.setVisible();\n await page.waitForChanges();\n\n await waitForTimeout(3000);\n expect(intervalCb).toHaveBeenCalledTimes(1);\n\n page.rootInstance.handleTimer({ type: \"mouseenter\" });\n await page.waitForChanges();\n expect(clearCb).toHaveBeenCalled();\n\n page.rootInstance.handleTimer({ type: \"mouseleave\" });\n await page.waitForChanges();\n await waitForTimeout(1000);\n expect(intervalCb).toHaveBeenCalledTimes(2);\n page.setContent(\"\");\n });\n\n it(\"should post a console error message if the message or header is too long\", async () => {\n const longText =\n \"lorem donec massa sapien faucibus et molestie ac feugiat sed lectus vestibulum mattis ullamcorper velit sed ullamcorper morbi tincidunt ornare massa eget egestas purus viverra accumsan in nisl nisi scelerisque eu ultrices vitae auctor eu augue ut lectus arcu bibendum at varius vel pharetra vel turpis nunc eget lorem dolor\";\n const consoleCb = jest\n .spyOn(console, \"error\")\n .mockImplementation(jest.fn());\n await newSpecPage({\n components: [Toast],\n html: `<ic-toast heading=\"${longText}\" message=\"${longText}\"></ic-toast>`,\n });\n expect(consoleCb).toHaveBeenCalledTimes(1);\n });\n\n it(\"should only focus the two interactive elements in the manual toast when using tab\", async () => {\n const page = await newSpecPage({\n components: [Toast, Button],\n html: `<ic-toast heading=\"Heading\"><ic-button id=\"slottedButton\" slot=\"action\">Click me</ic-button></ic-toast>`,\n });\n const focusCallback = jest.spyOn(Button.prototype, \"setFocus\");\n\n page.rootInstance.setVisible();\n await page.waitForChanges();\n await waitForTimeout(300);\n expect(focusCallback).toHaveBeenCalledTimes(1);\n\n page.rootInstance.handleKeyboard({\n key: \"Tab\",\n shiftKey: false,\n preventDefault: (): void => null,\n });\n await page.waitForChanges();\n expect(focusCallback).toHaveBeenCalledTimes(2);\n\n page.rootInstance.handleKeyboard({\n key: \"Tab\",\n shiftKey: false,\n preventDefault: (): void => null,\n });\n await page.waitForChanges();\n expect(focusCallback).toHaveBeenCalledTimes(3);\n\n page.rootInstance.handleKeyboard({\n key: \"Tab\",\n shiftKey: false,\n preventDefault: (): void => null,\n });\n await page.waitForChanges();\n expect(focusCallback).toHaveBeenCalledTimes(4);\n\n page.rootInstance.handleKeyboard({\n key: \"Tab\",\n shiftKey: true,\n preventDefault: (): void => null,\n });\n await page.waitForChanges();\n expect(focusCallback).toHaveBeenCalledTimes(5);\n\n page.rootInstance.handleKeyboard({\n key: \"Tab\",\n shiftKey: true,\n preventDefault: (): void => null,\n });\n await page.waitForChanges();\n expect(focusCallback).toHaveBeenCalledTimes(6);\n\n page.rootInstance.handleKeyboard({\n key: \"Tab\",\n shiftKey: true,\n preventDefault: (): void => null,\n });\n await page.waitForChanges();\n expect(focusCallback).toHaveBeenCalledTimes(7);\n });\n\n it(\"should focus a link element that has been slotted into the action slot\", async () => {\n const page = await newSpecPage({\n components: [Toast, Link],\n html: `<ic-toast heading=\"Heading\"><ic-link href=\"/\" slot=\"action\">Text</ic-link></ic-toast>`,\n });\n const focusCallback = jest.spyOn(Link.prototype, \"setFocus\");\n\n page.rootInstance.setVisible();\n await page.waitForChanges();\n await waitForTimeout(300);\n expect(focusCallback).toHaveBeenCalledTimes(1);\n });\n\n it(\"should update the dialog's label if the prop neutralIconAriaLabel prop is provided\", async () => {\n const page = await newSpecPage({\n components: [Toast],\n html: `<ic-toast variant=\"neutral\" neutral-icon-aria-label=\"Hello World\" heading=\"Heading\"></ic-toast>`,\n });\n\n expect(page.root.getAttribute(\"aria-label\")).toBe(\"Hello World\");\n });\n});\n"]}
@@ -0,0 +1,62 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { Button } from "../ic-button/ic-button";
3
+ import { Toast } from "../ic-toast/ic-toast";
4
+ import { ToastRegion } from "./ic-toast-region";
5
+ describe("ic-toast-region component", () => {
6
+ it("should render", async () => {
7
+ const page = await newSpecPage({
8
+ components: [ToastRegion, Toast],
9
+ html: `<ic-toast-region>
10
+ <ic-toast heading="Heading"></ic-toast>
11
+ </ic-toast-region>`,
12
+ });
13
+ expect(page.root).toMatchSnapshot();
14
+ });
15
+ it("should test showing and hiding toasts", async () => {
16
+ const page = await newSpecPage({
17
+ components: [ToastRegion, Toast],
18
+ html: `<ic-toast-region>
19
+ <ic-toast heading="Heading"></ic-toast>
20
+ <ic-toast heading="Heading"></ic-toast>
21
+ </ic-toast-region>`,
22
+ });
23
+ const toasts = page.root.querySelectorAll("ic-toast");
24
+ await page.root.setVisible(toasts[0]);
25
+ expect(page.rootInstance.pendingVisibility.length).toBe(1);
26
+ await page.root.setVisible(toasts[1]);
27
+ expect(page.rootInstance.pendingVisibility.length).toBe(2);
28
+ await page.rootInstance.handleDismissedToast();
29
+ expect(page.rootInstance.pendingVisibility.length).toBe(1);
30
+ await page.rootInstance.handleDismissedToast();
31
+ expect(page.rootInstance.pendingVisibility.length).toBe(0);
32
+ await page.rootInstance.handleDismissedToast();
33
+ expect(page.rootInstance.pendingVisibility.length).toBe(0);
34
+ });
35
+ it("should test previouslyFocused", async () => {
36
+ const page = await newSpecPage({
37
+ components: [ToastRegion, Toast, Button],
38
+ html: `<ic-toast-region>
39
+ <ic-button>Click Me</ic-button>
40
+ <ic-toast heading="Heading"></ic-toast>
41
+ </ic-toast-region>`,
42
+ });
43
+ const button = page.root.querySelector("ic-button");
44
+ page.rootInstance.previouslyFocused = button;
45
+ await page.rootInstance.handleDismissedToast();
46
+ expect(page.rootInstance.pendingVisibility.length).toBe(0);
47
+ });
48
+ it("should test previously focused - standard element", async () => {
49
+ const page = await newSpecPage({
50
+ components: [ToastRegion, Toast],
51
+ html: `<ic-toast-region>
52
+ <button>Click Me</button>
53
+ <ic-toast heading="Heading"></ic-toast>
54
+ </ic-toast-region>`,
55
+ });
56
+ const button = page.root.querySelector("button");
57
+ page.rootInstance.previouslyFocused = button;
58
+ await page.rootInstance.handleDismissedToast();
59
+ expect(page.rootInstance.pendingVisibility.length).toBe(0);
60
+ });
61
+ });
62
+ //# sourceMappingURL=ic-toast-region.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-toast-region.spec.js","sourceRoot":"","sources":["../../../src/components/ic-toast-region/ic-toast-region.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;EACzC,EAAE,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE;IAC7B,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC;MAChC,IAAI,EAAE;;yBAEa;KACpB,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;I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C,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC;MACxC,IAAI,EAAE;;;yBAGa;KACpB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACpD,IAAI,CAAC,YAAY,CAAC,iBAAiB,GAAG,MAAM,CAAC;IAE7C,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,CAAC;IAC/C,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;EAC7D,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;IACjE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC;MAChC,IAAI,EAAE;;;yBAGa;KACpB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,CAAC,YAAY,CAAC,iBAAiB,GAAG,MAAM,CAAC;IAE7C,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,CAAC;IAC/C,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;EAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from \"@stencil/core/testing\";\nimport { Button } from \"../ic-button/ic-button\";\nimport { Toast } from \"../ic-toast/ic-toast\";\nimport { ToastRegion } from \"./ic-toast-region\";\n\ndescribe(\"ic-toast-region component\", () => {\n it(\"should render\", async () => {\n const page = await newSpecPage({\n components: [ToastRegion, Toast],\n html: `<ic-toast-region>\n <ic-toast heading=\"Heading\"></ic-toast>\n </ic-toast-region>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test showing and hiding toasts\", async () => {\n const page = await newSpecPage({\n components: [ToastRegion, Toast],\n html: `<ic-toast-region>\n <ic-toast heading=\"Heading\"></ic-toast>\n <ic-toast heading=\"Heading\"></ic-toast>\n </ic-toast-region>`,\n });\n\n const toasts = page.root.querySelectorAll(\"ic-toast\");\n\n await page.root.setVisible(toasts[0]);\n\n expect(page.rootInstance.pendingVisibility.length).toBe(1);\n\n await page.root.setVisible(toasts[1]);\n\n expect(page.rootInstance.pendingVisibility.length).toBe(2);\n\n await page.rootInstance.handleDismissedToast();\n expect(page.rootInstance.pendingVisibility.length).toBe(1);\n\n await page.rootInstance.handleDismissedToast();\n expect(page.rootInstance.pendingVisibility.length).toBe(0);\n\n await page.rootInstance.handleDismissedToast();\n expect(page.rootInstance.pendingVisibility.length).toBe(0);\n });\n\n it(\"should test previouslyFocused\", async () => {\n const page = await newSpecPage({\n components: [ToastRegion, Toast, Button],\n html: `<ic-toast-region>\n <ic-button>Click Me</ic-button>\n <ic-toast heading=\"Heading\"></ic-toast>\n </ic-toast-region>`,\n });\n\n const button = page.root.querySelector(\"ic-button\");\n page.rootInstance.previouslyFocused = button;\n\n await page.rootInstance.handleDismissedToast();\n expect(page.rootInstance.pendingVisibility.length).toBe(0);\n });\n\n it(\"should test previously focused - standard element\", async () => {\n const page = await newSpecPage({\n components: [ToastRegion, Toast],\n html: `<ic-toast-region>\n <button>Click Me</button>\n <ic-toast heading=\"Heading\"></ic-toast>\n </ic-toast-region>`,\n });\n\n const button = page.root.querySelector(\"button\");\n page.rootInstance.previouslyFocused = button;\n\n await page.rootInstance.handleDismissedToast();\n expect(page.rootInstance.pendingVisibility.length).toBe(0);\n });\n});\n"]}