@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
@@ -443,6 +443,7 @@ video {
443
443
 
444
444
  :host {
445
445
  display: block;
446
+ position: relative;
446
447
  }
447
448
 
448
449
  :host(.ic-typography-vertical-margins-h1) {
@@ -566,3 +567,41 @@ video {
566
567
  font: inherit;
567
568
  letter-spacing: inherit;
568
569
  }
570
+
571
+ .trunc-wrapper {
572
+ display: -webkit-box;
573
+ -webkit-box-orient: vertical;
574
+ line-clamp: var(--truncation-max-lines, initial);
575
+ -webkit-line-clamp: var(--truncation-max-lines, initial);
576
+ overflow: hidden;
577
+ }
578
+
579
+ .trunc-btn {
580
+ border: none;
581
+ background: none;
582
+ padding: 0;
583
+ color: var(--ic-color-primary-text);
584
+ text-decoration: underline;
585
+ font-weight: var(--ic-font-weight-bold);
586
+ transition: var(--ic-easing-transition-fast);
587
+ }
588
+
589
+ .trunc-btn:hover,
590
+ .trunc-btn.focus {
591
+ outline: none;
592
+ border-bottom: var(--ic-space-xxs) solid !important;
593
+ margin-bottom: calc(-1 * var(--ic-space-xxs)) !important;
594
+ text-decoration: none;
595
+ cursor: pointer;
596
+ }
597
+
598
+ @supports (text-decoration-thickness: 25%) {
599
+ .trunc-btn:hover,
600
+ .trunc-btn.focus {
601
+ text-decoration-line: underline;
602
+ text-decoration-thickness: 25%;
603
+ text-underline-offset: 25%;
604
+ border-bottom: 0 !important;
605
+ margin-bottom: 0 !important;
606
+ }
607
+ }
@@ -0,0 +1,36 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe("ic-typograpghy", () => {
3
+ it("should test truncation", async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent(`<ic-typography max-lines="3">
6
+ Body of text that is truncated to three lines. Click the 'See more' link to
7
+ expand the text, then click 'See less' to truncate the text once more!
8
+ <br>
9
+ This is the text that should appear on a second line but may extend further depending on the viewport size.
10
+ <br>
11
+ And this text should be on a third line.
12
+ </ic-typography>`);
13
+ await page.waitForChanges();
14
+ await page.setViewport({
15
+ width: 640,
16
+ height: 480,
17
+ });
18
+ let truncBtn = await page.find("ic-typography >>> button.trunc-btn");
19
+ let btnText = truncBtn.innerText;
20
+ expect(truncBtn).not.toBeNull();
21
+ expect(btnText).toBe("See more");
22
+ truncBtn.click();
23
+ await page.waitForChanges();
24
+ btnText = truncBtn.innerText;
25
+ expect(btnText).toBe("See less");
26
+ await page.waitForChanges();
27
+ await page.setViewport({
28
+ width: 1600,
29
+ height: 480,
30
+ });
31
+ await page.waitForChanges();
32
+ truncBtn = await page.find("ic-typography >>> button.trunc-btn");
33
+ expect(truncBtn).toBeNull();
34
+ });
35
+ });
36
+ //# sourceMappingURL=ic-typography.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-typography.e2e.js","sourceRoot":"","sources":["../../../src/components/ic-typography/ic-typography.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;EAC9B,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;IACtC,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CAAC;;;;;;;qBAOL,CAAC,CAAC;IAEnB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,IAAI,CAAC,WAAW,CAAC;MACrB,KAAK,EAAE,GAAG;MACV,MAAM,EAAE,GAAG;KACZ,CAAC,CAAC;IAEH,IAAI,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;IAErE,IAAI,OAAO,GAAI,QAAyC,CAAC,SAAS,CAAC;IAEnE,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IAChC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAEjC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACjB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,OAAO,GAAI,QAAyC,CAAC,SAAS,CAAC;IAC/D,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAEjC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,IAAI,CAAC,WAAW,CAAC;MACrB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,GAAG;KACZ,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC5B,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;IAEjE,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;EAC9B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from \"@stencil/core/testing\";\n\ndescribe(\"ic-typograpghy\", () => {\n it(\"should test truncation\", async () => {\n const page = await newE2EPage();\n await page.setContent(`<ic-typography max-lines=\"3\">\n Body of text that is truncated to three lines. Click the 'See more' link to\n expand the text, then click 'See less' to truncate the text once more!\n <br>\n This is the text that should appear on a second line but may extend further depending on the viewport size.\n <br>\n And this text should be on a third line.\n </ic-typography>`);\n\n await page.waitForChanges();\n\n await page.setViewport({\n width: 640,\n height: 480,\n });\n\n let truncBtn = await page.find(\"ic-typography >>> button.trunc-btn\");\n\n let btnText = (truncBtn as unknown as HTMLButtonElement).innerText;\n\n expect(truncBtn).not.toBeNull();\n expect(btnText).toBe(\"See more\");\n\n truncBtn.click();\n await page.waitForChanges();\n\n btnText = (truncBtn as unknown as HTMLButtonElement).innerText;\n expect(btnText).toBe(\"See less\");\n\n await page.waitForChanges();\n\n await page.setViewport({\n width: 1600,\n height: 480,\n });\n\n await page.waitForChanges();\n truncBtn = await page.find(\"ic-typography >>> button.trunc-btn\");\n\n expect(truncBtn).toBeNull();\n });\n});\n"]}
@@ -1,15 +1,103 @@
1
1
  import { h, Host } from "@stencil/core";
2
+ import { checkResizeObserver } from "../../utils/helpers";
2
3
  export class Typography {
3
4
  constructor() {
5
+ this.resizeObserver = null;
6
+ this.lastWidth = 0;
7
+ this.lastMarkerTop = 0;
8
+ this.truncatedHeight = 0;
9
+ this.focusBtnFromKeyboard = true;
10
+ this.toggleExpanded = () => {
11
+ this.expanded = !this.expanded;
12
+ };
13
+ this.checkMaxLines = (height) => {
14
+ //24 is the height of a single line
15
+ const numLines = Math.floor(height / 24);
16
+ if (numLines > this.maxLines) {
17
+ this.el.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`);
18
+ this.truncatedHeight = this.el.clientHeight;
19
+ this.truncated = true;
20
+ }
21
+ };
22
+ this.checkMarkerPosition = (elTop, markerTop) => {
23
+ if (markerTop - elTop < this.truncatedHeight) {
24
+ this.truncated = false;
25
+ this.expanded = false;
26
+ }
27
+ else {
28
+ this.truncated = true;
29
+ }
30
+ };
31
+ this.getElementTop = (el) => {
32
+ return el.getClientRects ? el.getClientRects()[0].top : 0;
33
+ };
34
+ this.runResizeObserver = () => {
35
+ this.resizeObserver = new ResizeObserver(() => {
36
+ clearTimeout(this.resizeInterval);
37
+ this.resizeInterval = window.setTimeout(this.resizeObserverCallback, 50);
38
+ });
39
+ this.resizeObserver.observe(this.truncWrapperEl);
40
+ };
41
+ this.resizeObserverCallback = () => {
42
+ if (this.lastWidth === this.el.clientWidth) {
43
+ return;
44
+ }
45
+ if (this.truncatedHeight === 0) {
46
+ this.checkMaxLines(this.el.clientHeight);
47
+ return;
48
+ }
49
+ const markerTop = this.getElementTop(this.marker);
50
+ if (markerTop === this.lastMarkerTop) {
51
+ return;
52
+ }
53
+ this.checkMarkerPosition(this.getElementTop(this.el), markerTop);
54
+ this.lastMarkerTop = markerTop;
55
+ this.lastWidth = this.el.clientWidth;
56
+ };
57
+ this.truncButtonFocus = () => {
58
+ if (this.focusBtnFromKeyboard) {
59
+ this.truncButtonFocussed = true;
60
+ }
61
+ };
62
+ this.truncButtonBlur = () => {
63
+ this.focusBtnFromKeyboard = true;
64
+ this.truncButtonFocussed = false;
65
+ };
66
+ this.truncButtonFocusFromMouse = () => {
67
+ this.focusBtnFromKeyboard = false;
68
+ };
4
69
  this.variant = "body";
5
70
  this.applyVerticalMargins = false;
71
+ this.maxLines = undefined;
72
+ this.expanded = false;
73
+ this.truncated = false;
74
+ this.truncButtonFocussed = false;
75
+ }
76
+ watchExpandedHandler() {
77
+ this.el.setAttribute("style", `--truncation-max-lines: ${this.expanded ? "initial" : this.maxLines}`);
78
+ }
79
+ componentDidLoad() {
80
+ if (this.variant === "body" && this.maxLines > 0) {
81
+ const marker = document.createElement("span");
82
+ marker.style.visibility = "hidden";
83
+ this.el.appendChild(marker);
84
+ this.marker = marker;
85
+ this.lastWidth = this.el.clientWidth;
86
+ this.checkMaxLines(this.el.clientHeight);
87
+ checkResizeObserver(this.runResizeObserver);
88
+ }
89
+ }
90
+ disconnectedCallback() {
91
+ if (this.resizeObserver !== null) {
92
+ this.resizeObserver.disconnect();
93
+ }
6
94
  }
7
95
  render() {
8
- const { variant, applyVerticalMargins } = this;
96
+ const { variant, applyVerticalMargins, maxLines, truncated, expanded } = this;
9
97
  return (h(Host, { class: {
10
98
  [`ic-typography-${variant}`]: true,
11
99
  [`ic-typography-vertical-margins-${variant}`]: applyVerticalMargins,
12
- } }, h("slot", null)));
100
+ } }, variant === "body" && maxLines > 0 ? (h("div", { class: "trunc-wrapper", ref: (el) => (this.truncWrapperEl = el) }, h("slot", null))) : (h("slot", null)), variant === "body" && maxLines > 0 && truncated && (h("button", { class: { "trunc-btn": true, focus: this.truncButtonFocussed }, onFocus: this.truncButtonFocus, onBlur: this.truncButtonBlur, onMouseDown: this.truncButtonFocusFromMouse, onClick: this.toggleExpanded, "aria-hidden": "true" }, expanded ? "See less" : "See more"))));
13
101
  }
14
102
  static get is() { return "ic-typography"; }
15
103
  static get encapsulation() { return "shadow"; }
@@ -65,9 +153,39 @@ export class Typography {
65
153
  "attribute": "apply-vertical-margins",
66
154
  "reflect": false,
67
155
  "defaultValue": "false"
156
+ },
157
+ "maxLines": {
158
+ "type": "number",
159
+ "mutable": false,
160
+ "complexType": {
161
+ "original": "number",
162
+ "resolved": "number",
163
+ "references": {}
164
+ },
165
+ "required": false,
166
+ "optional": true,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "The number of lines to display before truncating the text, only used for the 'body' variant."
170
+ },
171
+ "attribute": "max-lines",
172
+ "reflect": false
68
173
  }
69
174
  };
70
175
  }
176
+ static get states() {
177
+ return {
178
+ "expanded": {},
179
+ "truncated": {},
180
+ "truncButtonFocussed": {}
181
+ };
182
+ }
71
183
  static get elementRef() { return "el"; }
184
+ static get watchers() {
185
+ return [{
186
+ "propName": "expanded",
187
+ "methodName": "watchExpandedHandler"
188
+ }];
189
+ }
72
190
  }
73
191
  //# sourceMappingURL=ic-typography.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ic-typography.js","sourceRoot":"","sources":["../../../src/components/ic-typography/ic-typography.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AASlE,MAAM,OAAO,UAAU;;mBAMoB,MAAM;gCAKN,KAAK;;EAE9C,MAAM;IACJ,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;IAE/C,OAAO,CACL,EAAC,IAAI,IACH,KAAK,EAAE;QACL,CAAC,iBAAiB,OAAO,EAAE,CAAC,EAAE,IAAI;QAClC,CAAC,kCAAkC,OAAO,EAAE,CAAC,EAAE,oBAAoB;OACpE;MAED,eAAQ,CACH,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, Host } from \"@stencil/core\";\n\nimport { IcTypographyVariants } from \"../../utils/types\";\n\n@Component({\n styleUrl: \"ic-typography.css\",\n tag: \"ic-typography\",\n shadow: true,\n})\nexport class Typography {\n @Element() el: HTMLIcTypographyElement;\n\n /**\n * The ICDS typography style to use.\n */\n @Prop() variant?: IcTypographyVariants = \"body\";\n\n /**\n * If `true`, appropriate top and bottom margins will be applied to the typography.\n */\n @Prop() applyVerticalMargins?: boolean = false;\n\n render() {\n const { variant, applyVerticalMargins } = this;\n\n return (\n <Host\n class={{\n [`ic-typography-${variant}`]: true,\n [`ic-typography-vertical-margins-${variant}`]: applyVerticalMargins,\n }}\n >\n <slot />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ic-typography.js","sourceRoot":"","sources":["../../../src/components/ic-typography/ic-typography.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAO1D,MAAM,OAAO,UAAU;;IAuBb,mBAAc,GAAmB,IAAI,CAAC;IAGtC,cAAS,GAAW,CAAC,CAAC;IACtB,kBAAa,GAAW,CAAC,CAAC;IAC1B,oBAAe,GAAW,CAAC,CAAC;IAE5B,yBAAoB,GAAY,IAAI,CAAC;IAUrC,mBAAc,GAAG,GAAG,EAAE;MAC5B,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjC,CAAC,CAAC;IAEM,kBAAa,GAAG,CAAC,MAAc,EAAE,EAAE;MACzC,mCAAmC;MACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;MACzC,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;QAC5B,IAAI,CAAC,EAAE,CAAC,YAAY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AC,eAAe,EAC5B,WAAW,EAAE,IAAI,CAAC,yBAAyB,EAC3C,OAAO,EAAE,IAAI,CAAC,cAAc,iBAChB,MAAM,IAEjB,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAC5B,CACV,CACI,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, Host, State, Watch } from \"@stencil/core\";\n\nimport { IcTypographyVariants } from \"../../utils/types\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\n\n@Component({\n styleUrl: \"ic-typography.css\",\n tag: \"ic-typography\",\n shadow: true,\n})\nexport class Typography {\n @Element() el: HTMLIcTypographyElement;\n\n /**\n * The ICDS typography style to use.\n */\n @Prop() variant?: IcTypographyVariants = \"body\";\n\n /**\n * If `true`, appropriate top and bottom margins will be applied to the typography.\n */\n @Prop() applyVerticalMargins?: boolean = false;\n\n /**\n * The number of lines to display before truncating the text, only used for the 'body' variant.\n */\n @Prop() maxLines?: number;\n\n @State() expanded: boolean = false;\n @State() truncated: boolean = false;\n @State() truncButtonFocussed: boolean = false;\n\n private truncWrapperEl: Element;\n private resizeObserver: ResizeObserver = null;\n\n private resizeInterval: number;\n private lastWidth: number = 0;\n private lastMarkerTop: number = 0;\n private truncatedHeight: number = 0;\n private marker: HTMLElement;\n private focusBtnFromKeyboard: boolean = true;\n\n @Watch(\"expanded\")\n watchExpandedHandler(): void {\n this.el.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.expanded ? \"initial\" : this.maxLines}`\n );\n }\n\n private toggleExpanded = () => {\n this.expanded = !this.expanded;\n };\n\n private checkMaxLines = (height: number) => {\n //24 is the height of a single line\n const numLines = Math.floor(height / 24);\n if (numLines > this.maxLines) {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.maxLines}`);\n this.truncatedHeight = this.el.clientHeight;\n this.truncated = true;\n }\n };\n\n private checkMarkerPosition = (elTop: number, markerTop: number) => {\n if (markerTop - elTop < this.truncatedHeight) {\n this.truncated = false;\n this.expanded = false;\n } else {\n this.truncated = true;\n }\n };\n\n private getElementTop = (el: HTMLElement) => {\n return el.getClientRects ? el.getClientRects()[0].top : 0;\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeInterval);\n this.resizeInterval = window.setTimeout(this.resizeObserverCallback, 50);\n });\n this.resizeObserver.observe(this.truncWrapperEl);\n };\n\n private resizeObserverCallback = () => {\n if (this.lastWidth === this.el.clientWidth) {\n return;\n }\n\n if (this.truncatedHeight === 0) {\n this.checkMaxLines(this.el.clientHeight);\n return;\n }\n\n const markerTop = this.getElementTop(this.marker);\n if (markerTop === this.lastMarkerTop) {\n return;\n }\n\n this.checkMarkerPosition(this.getElementTop(this.el), markerTop);\n this.lastMarkerTop = markerTop;\n this.lastWidth = this.el.clientWidth;\n };\n\n private truncButtonFocus = (): void => {\n if (this.focusBtnFromKeyboard) {\n this.truncButtonFocussed = true;\n }\n };\n\n private truncButtonBlur = (): void => {\n this.focusBtnFromKeyboard = true;\n this.truncButtonFocussed = false;\n };\n\n private truncButtonFocusFromMouse = (): void => {\n this.focusBtnFromKeyboard = false;\n };\n\n componentDidLoad(): void {\n if (this.variant === \"body\" && this.maxLines > 0) {\n const marker = document.createElement(\"span\");\n marker.style.visibility = \"hidden\";\n this.el.appendChild(marker);\n this.marker = marker;\n this.lastWidth = this.el.clientWidth;\n this.checkMaxLines(this.el.clientHeight);\n checkResizeObserver(this.runResizeObserver);\n }\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const { variant, applyVerticalMargins, maxLines, truncated, expanded } =\n this;\n\n return (\n <Host\n class={{\n [`ic-typography-${variant}`]: true,\n [`ic-typography-vertical-margins-${variant}`]: applyVerticalMargins,\n }}\n >\n {variant === \"body\" && maxLines > 0 ? (\n <div class=\"trunc-wrapper\" ref={(el) => (this.truncWrapperEl = el)}>\n <slot />\n </div>\n ) : (\n <slot />\n )}\n {variant === \"body\" && maxLines > 0 && truncated && (\n <button\n class={{ \"trunc-btn\": true, focus: this.truncButtonFocussed }}\n onFocus={this.truncButtonFocus}\n onBlur={this.truncButtonBlur}\n onMouseDown={this.truncButtonFocusFromMouse}\n onClick={this.toggleExpanded}\n aria-hidden=\"true\"\n >\n {expanded ? \"See less\" : \"See more\"}\n </button>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,296 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { Typography } from "./ic-typography";
3
+ describe("ic-typography component", () => {
4
+ it("should render with default body styles", async () => {
5
+ const page = await newSpecPage({
6
+ components: [Typography],
7
+ html: `<ic-typography>IC Typography Test</ic-typography>`,
8
+ });
9
+ expect(page.root).toMatchSnapshot();
10
+ });
11
+ it("should render h1 with h1 variant", async () => {
12
+ const page = await newSpecPage({
13
+ components: [Typography],
14
+ html: `<ic-typography variant="h1">IC Typography Test</ic-typography>`,
15
+ });
16
+ expect(page.root).toMatchSnapshot();
17
+ });
18
+ it("should render h2 with h2 variant", async () => {
19
+ const page = await newSpecPage({
20
+ components: [Typography],
21
+ html: `<ic-typography variant="h2">IC Typography Test</ic-typography>`,
22
+ });
23
+ expect(page.root).toMatchSnapshot();
24
+ });
25
+ it("should render h3 with h3 variant", async () => {
26
+ const page = await newSpecPage({
27
+ components: [Typography],
28
+ html: `<ic-typography variant="h3">IC Typography Test</ic-typography>`,
29
+ });
30
+ expect(page.root).toMatchSnapshot();
31
+ });
32
+ it("should render h4 with h4 variant", async () => {
33
+ const page = await newSpecPage({
34
+ components: [Typography],
35
+ html: `<ic-typography variant="h4">IC Typography Test</ic-typography>`,
36
+ });
37
+ expect(page.root).toMatchSnapshot();
38
+ });
39
+ it("should render h5 with subtitle-large variant", async () => {
40
+ const page = await newSpecPage({
41
+ components: [Typography],
42
+ html: `<ic-typography variant="subtitle-large">IC Typography Test</ic-typography>`,
43
+ });
44
+ expect(page.root).toMatchSnapshot();
45
+ });
46
+ it("should render h6 with subtitle-small variant", async () => {
47
+ const page = await newSpecPage({
48
+ components: [Typography],
49
+ html: `<ic-typography variant="subtitle-small">IC Typography Test</ic-typography>`,
50
+ });
51
+ expect(page.root).toMatchSnapshot();
52
+ });
53
+ it("should render with body variant", async () => {
54
+ const page = await newSpecPage({
55
+ components: [Typography],
56
+ html: `<ic-typography variant="body">IC Typography Test</ic-typography>`,
57
+ });
58
+ expect(page.root).toMatchSnapshot();
59
+ });
60
+ it("should render caption variant", async () => {
61
+ const page = await newSpecPage({
62
+ components: [Typography],
63
+ html: `<ic-typography variant="caption">IC Typography Test</ic-typography>`,
64
+ });
65
+ expect(page.root).toMatchSnapshot();
66
+ });
67
+ it("should render caption uppercase variant", async () => {
68
+ const page = await newSpecPage({
69
+ components: [Typography],
70
+ html: `<ic-typography variant="caption-uppercase">IC Typography Test</ic-typography>`,
71
+ });
72
+ expect(page.root).toMatchSnapshot();
73
+ });
74
+ it("should render label with label variant", async () => {
75
+ const page = await newSpecPage({
76
+ components: [Typography],
77
+ html: `<ic-typography variant="label">IC Typography Test</ic-typography>`,
78
+ });
79
+ expect(page.root).toMatchSnapshot();
80
+ });
81
+ it("should render label uppercase with label-uppercase variant", async () => {
82
+ const page = await newSpecPage({
83
+ components: [Typography],
84
+ html: `<ic-typography variant="label-uppercase">IC Typography Test</ic-typography>`,
85
+ });
86
+ expect(page.root).toMatchSnapshot();
87
+ });
88
+ it("should render code large with code-large variant", async () => {
89
+ const page = await newSpecPage({
90
+ components: [Typography],
91
+ html: `<ic-typography variant="code-large">IC Typography Test</ic-typography>`,
92
+ });
93
+ expect(page.root).toMatchSnapshot();
94
+ });
95
+ it("should render code small with code-small variant", async () => {
96
+ const page = await newSpecPage({
97
+ components: [Typography],
98
+ html: `<ic-typography variant="code-small">IC Typography Test</ic-typography>`,
99
+ });
100
+ expect(page.root).toMatchSnapshot();
101
+ });
102
+ it("should render code extra small with code-extra-small variant", async () => {
103
+ const page = await newSpecPage({
104
+ components: [Typography],
105
+ html: `<ic-typography variant="code-extra-small">IC Typography Test</ic-typography>`,
106
+ });
107
+ expect(page.root).toMatchSnapshot();
108
+ });
109
+ it("should allow semantic component to be passed in and variant styling applied", async () => {
110
+ const page = await newSpecPage({
111
+ components: [Typography],
112
+ html: `<ic-typography variant="h1"><h3>IC Typography Test</h3></ic-typography>`,
113
+ });
114
+ expect(page.root).toMatchSnapshot();
115
+ });
116
+ it("should apply vertical margins class if vertical margins prop true", async () => {
117
+ const page = await newSpecPage({
118
+ components: [Typography],
119
+ html: `<ic-typography apply-vertical-margins>IC Typography Test</ic-typography>`,
120
+ });
121
+ expect(page.root).toMatchSnapshot();
122
+ });
123
+ it("should apply className provided to root element to typography element", async () => {
124
+ const page = await newSpecPage({
125
+ components: [Typography],
126
+ html: `<ic-typography class="test-class">IC Typography Test</ic-typography>`,
127
+ });
128
+ expect(page.root).toMatchSnapshot();
129
+ });
130
+ it("should render the typography with truncation", async () => {
131
+ const page = await newSpecPage({
132
+ components: [Typography],
133
+ html: `<ic-typography max-lines="3">
134
+ Body of text that is truncated to three lines. Click the 'See more' link to
135
+ expand the text, then click 'See less' to truncate the text once more!
136
+ Dripper caramelization java saucer grounds galão, mocha, and robusta
137
+ kopi-luwak, percolator, instant, qui saucer latte in brewed café au
138
+ lait. Con panna, cup, cream, body americano affogato cup espresso, rich
139
+ milk seasonal saucer grinder spoon that cultivar strong redeye
140
+ frappuccino barista extraction redeye mazagran.
141
+ </ic-typography>`,
142
+ });
143
+ expect(page.root).toMatchSnapshot();
144
+ page.rootInstance.truncated = true;
145
+ await page.waitForChanges();
146
+ expect(page.root).toMatchSnapshot();
147
+ });
148
+ it("should test toggle of see more/less", async () => {
149
+ const page = await newSpecPage({
150
+ components: [Typography],
151
+ html: `<ic-typography max-lines="3">
152
+ Body of text that is truncated to three lines. Click the 'See more' link to
153
+ expand the text, then click 'See less' to truncate the text once more!
154
+ Dripper caramelization java saucer grounds galão, mocha, and robusta
155
+ kopi-luwak, percolator, instant, qui saucer latte in brewed café au
156
+ lait. Con panna, cup, cream, body americano affogato cup espresso, rich
157
+ milk seasonal saucer grinder spoon that cultivar strong redeye
158
+ frappuccino barista extraction redeye mazagran.
159
+ </ic-typography>`,
160
+ });
161
+ page.rootInstance.checkMaxLines(96);
162
+ await page.waitForChanges();
163
+ expect(page.rootInstance.truncated).toBe(true);
164
+ expect(page.rootInstance.expanded).toBe(false);
165
+ const button = page.root.shadowRoot.querySelector("button");
166
+ button.click();
167
+ await page.waitForChanges();
168
+ expect(page.rootInstance.expanded).toBe(true);
169
+ button.click();
170
+ await page.waitForChanges();
171
+ expect(page.rootInstance.expanded).toBe(false);
172
+ });
173
+ it("should test truncation applied when number of lines exceeds max", async () => {
174
+ const page = await newSpecPage({
175
+ components: [Typography],
176
+ html: `<ic-typography max-lines="3">
177
+ Body of text that is truncated to three lines. Click the 'See more' link to
178
+ expand the text, then click 'See less' to truncate the text once more!
179
+ Dripper caramelization java saucer grounds galão, mocha, and robusta
180
+ kopi-luwak, percolator, instant, qui saucer latte in brewed café au
181
+ lait. Con panna, cup, cream, body americano affogato cup espresso, rich
182
+ milk seasonal saucer grinder spoon that cultivar strong redeye
183
+ frappuccino barista extraction redeye mazagran.
184
+ </ic-typography>`,
185
+ });
186
+ page.rootInstance.checkMaxLines(96);
187
+ await page.waitForChanges();
188
+ expect(page.rootInstance.truncated).toBe(true);
189
+ });
190
+ it("should test checkMarkerPosition", async () => {
191
+ const page = await newSpecPage({
192
+ components: [Typography],
193
+ html: `<ic-typography max-lines="3">
194
+ Body of text that is truncated to three lines. Click the 'See more' link to
195
+ expand the text, then click 'See less' to truncate the text once more!
196
+ Dripper caramelization java saucer grounds galão, mocha, and robusta
197
+ kopi-luwak, percolator, instant, qui saucer latte in brewed café au
198
+ lait. Con panna, cup, cream, body americano affogato cup espresso, rich
199
+ milk seasonal saucer grinder spoon that cultivar strong redeye
200
+ frappuccino barista extraction redeye mazagran.
201
+ </ic-typography>`,
202
+ });
203
+ page.rootInstance.truncatedHeight = 300;
204
+ page.rootInstance.checkMarkerPosition(100, 200);
205
+ expect(page.rootInstance.truncated).toBe(false);
206
+ expect(page.rootInstance.expanded).toBe(false);
207
+ page.rootInstance.checkMarkerPosition(100, 500);
208
+ expect(page.rootInstance.truncated).toBe(true);
209
+ });
210
+ it("should test truncation button focus", async () => {
211
+ const page = await newSpecPage({
212
+ components: [Typography],
213
+ html: `<ic-typography max-lines="3">
214
+ Body of text that is truncated to three lines. Click the 'See more' link to
215
+ expand the text, then click 'See less' to truncate the text once more!
216
+ Dripper caramelization java saucer grounds galão, mocha, and robusta
217
+ kopi-luwak, percolator, instant, qui saucer latte in brewed café au
218
+ lait. Con panna, cup, cream, body americano affogato cup espresso, rich
219
+ milk seasonal saucer grinder spoon that cultivar strong redeye
220
+ frappuccino barista extraction redeye mazagran.
221
+ </ic-typography>`,
222
+ });
223
+ page.rootInstance.truncated = true;
224
+ await page.waitForChanges();
225
+ const button = page.root.shadowRoot.querySelector("button");
226
+ button.focus();
227
+ await page.waitForChanges();
228
+ expect(button).toHaveClass("focus");
229
+ button.blur();
230
+ await page.waitForChanges();
231
+ expect(button).not.toHaveClass("focus");
232
+ });
233
+ it("should test truncation button mousedown handler", async () => {
234
+ const page = await newSpecPage({
235
+ components: [Typography],
236
+ html: `<ic-typography max-lines="3">
237
+ Body of text that is truncated to three lines. Click the 'See more' link to
238
+ expand the text, then click 'See less' to truncate the text once more!
239
+ Dripper caramelization java saucer grounds galão, mocha, and robusta
240
+ kopi-luwak, percolator, instant, qui saucer latte in brewed café au
241
+ lait. Con panna, cup, cream, body americano affogato cup espresso, rich
242
+ milk seasonal saucer grinder spoon that cultivar strong redeye
243
+ frappuccino barista extraction redeye mazagran.
244
+ </ic-typography>`,
245
+ });
246
+ page.rootInstance.truncated = true;
247
+ await page.waitForChanges();
248
+ const button = page.root.shadowRoot.querySelector("button");
249
+ const event = new Event("mousedown", {
250
+ bubbles: true,
251
+ cancelable: true,
252
+ });
253
+ button.dispatchEvent(event);
254
+ await page.waitForChanges();
255
+ expect(page.rootInstance.focusBtnFromKeyboard).toBe(false);
256
+ button.focus();
257
+ await page.waitForChanges();
258
+ expect(button).not.toHaveClass("focus");
259
+ });
260
+ it("should test resizeObserver", async () => {
261
+ const page = await newSpecPage({
262
+ components: [Typography],
263
+ html: `<ic-typography max-lines="3">
264
+ Body of text that is truncated to three lines. Click the 'See more' link to
265
+ expand the text, then click 'See less' to truncate the text once more!
266
+ Dripper caramelization java saucer grounds galão, mocha, and robusta
267
+ kopi-luwak, percolator, instant, qui saucer latte in brewed café au
268
+ lait. Con panna, cup, cream, body americano affogato cup espresso, rich
269
+ milk seasonal saucer grinder spoon that cultivar strong redeye
270
+ frappuccino barista extraction redeye mazagran.
271
+ </ic-typography>`,
272
+ });
273
+ page.rootInstance.el.clientHeight = 96;
274
+ page.rootInstance.el.clientWidth = 200;
275
+ page.rootInstance.resizeObserverCallback();
276
+ expect(page.rootInstance.lastWidth).toBe(undefined);
277
+ expect(page.rootInstance.truncated).toBe(true);
278
+ //lastMarkerTop will get overwritten with 0
279
+ page.rootInstance.lastMarkerTop = 120;
280
+ page.rootInstance.resizeObserverCallback();
281
+ expect(page.rootInstance.lastWidth).toBe(200);
282
+ expect(page.rootInstance.lastMarkerTop).toBe(0);
283
+ //test lastMarkerTop not overwritten with 0 as widths should match
284
+ page.rootInstance.lastMarkerTop = 120;
285
+ page.rootInstance.resizeObserverCallback();
286
+ expect(page.rootInstance.lastMarkerTop).toBe(120);
287
+ //test lastWidth not overwritten as merkerTop should match lastMarkerTop
288
+ page.rootInstance.el.clientWidth = 300;
289
+ page.rootInstance.lastMarkerTop = 0;
290
+ page.rootInstance.resizeObserverCallback();
291
+ expect(page.rootInstance.lastWidth).toBe(200);
292
+ //test disconnected callback
293
+ page.setContent("");
294
+ });
295
+ });
296
+ //# sourceMappingURL=ic-typography.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ic-typography.spec.js","sourceRoot":"","sources":["../../../src/components/ic-typography/ic-typography.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;EACvC,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;IACtD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,mDAAmD;KAC1D,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;IAChD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,gEAAgE;KACvE,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;IAChD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,gEAAgE;KACvE,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;IAChD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,gEAAgE;KACv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C,YAAY,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEhD,kEAAkE;IAClE,IAAI,CAAC,YAAY,CAAC,aAAa,GAAG,GAAG,CAAC;IACtC,IAAI,CAAC,YAAY,CAAC,sBAAsB,EAAE,CAAC;IAC3C,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAElD,wEAAwE;IACxE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,WAAW,GAAG,GAAG,CAAC;IACvC,IAAI,CAAC,YAAY,CAAC,aAAa,GAAG,CAAC,CAAC;IACpC,IAAI,CAAC,YAAY,CAAC,sBAAsB,EAAE,CAAC;IAC3C,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE9C,4BAA4B;IAC5B,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;EACtB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from \"@stencil/core/testing\";\nimport { Typography } from \"./ic-typography\";\n\ndescribe(\"ic-typography component\", () => {\n it(\"should render with default body styles\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography>IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render h1 with h1 variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"h1\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render h2 with h2 variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"h2\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render h3 with h3 variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"h3\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render h4 with h4 variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"h4\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render h5 with subtitle-large variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"subtitle-large\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render h6 with subtitle-small variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"subtitle-small\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render with body variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"body\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render caption variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"caption\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render caption uppercase variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"caption-uppercase\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render label with label variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"label\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render label uppercase with label-uppercase variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"label-uppercase\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render code large with code-large variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"code-large\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render code small with code-small variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"code-small\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render code extra small with code-extra-small variant\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"code-extra-small\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should allow semantic component to be passed in and variant styling applied\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography variant=\"h1\"><h3>IC Typography Test</h3></ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should apply vertical margins class if vertical margins prop true\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography apply-vertical-margins>IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should apply className provided to root element to typography element\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography class=\"test-class\">IC Typography Test</ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render the typography with truncation\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography max-lines=\"3\">\n Body of text that is truncated to three lines. Click the 'See more' link to\n expand the text, then click 'See less' to truncate the text once more!\n Dripper caramelization java saucer grounds galão, mocha, and robusta\n kopi-luwak, percolator, instant, qui saucer latte in brewed café au\n lait. Con panna, cup, cream, body americano affogato cup espresso, rich\n milk seasonal saucer grinder spoon that cultivar strong redeye\n frappuccino barista extraction redeye mazagran.\n </ic-typography>`,\n });\n\n expect(page.root).toMatchSnapshot();\n\n page.rootInstance.truncated = true;\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test toggle of see more/less\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography max-lines=\"3\">\n Body of text that is truncated to three lines. Click the 'See more' link to\n expand the text, then click 'See less' to truncate the text once more!\n Dripper caramelization java saucer grounds galão, mocha, and robusta\n kopi-luwak, percolator, instant, qui saucer latte in brewed café au\n lait. Con panna, cup, cream, body americano affogato cup espresso, rich\n milk seasonal saucer grinder spoon that cultivar strong redeye\n frappuccino barista extraction redeye mazagran.\n </ic-typography>`,\n });\n\n page.rootInstance.checkMaxLines(96);\n await page.waitForChanges();\n\n expect(page.rootInstance.truncated).toBe(true);\n expect(page.rootInstance.expanded).toBe(false);\n\n const button = page.root.shadowRoot.querySelector(\"button\");\n\n button.click();\n await page.waitForChanges();\n expect(page.rootInstance.expanded).toBe(true);\n\n button.click();\n await page.waitForChanges();\n expect(page.rootInstance.expanded).toBe(false);\n });\n\n it(\"should test truncation applied when number of lines exceeds max\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography max-lines=\"3\">\n Body of text that is truncated to three lines. Click the 'See more' link to\n expand the text, then click 'See less' to truncate the text once more!\n Dripper caramelization java saucer grounds galão, mocha, and robusta\n kopi-luwak, percolator, instant, qui saucer latte in brewed café au\n lait. Con panna, cup, cream, body americano affogato cup espresso, rich\n milk seasonal saucer grinder spoon that cultivar strong redeye\n frappuccino barista extraction redeye mazagran.\n </ic-typography>`,\n });\n\n page.rootInstance.checkMaxLines(96);\n await page.waitForChanges();\n\n expect(page.rootInstance.truncated).toBe(true);\n });\n\n it(\"should test checkMarkerPosition\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography max-lines=\"3\">\n Body of text that is truncated to three lines. Click the 'See more' link to\n expand the text, then click 'See less' to truncate the text once more!\n Dripper caramelization java saucer grounds galão, mocha, and robusta\n kopi-luwak, percolator, instant, qui saucer latte in brewed café au\n lait. Con panna, cup, cream, body americano affogato cup espresso, rich\n milk seasonal saucer grinder spoon that cultivar strong redeye\n frappuccino barista extraction redeye mazagran.\n </ic-typography>`,\n });\n\n page.rootInstance.truncatedHeight = 300;\n page.rootInstance.checkMarkerPosition(100, 200);\n\n expect(page.rootInstance.truncated).toBe(false);\n expect(page.rootInstance.expanded).toBe(false);\n\n page.rootInstance.checkMarkerPosition(100, 500);\n expect(page.rootInstance.truncated).toBe(true);\n });\n\n it(\"should test truncation button focus\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography max-lines=\"3\">\n Body of text that is truncated to three lines. Click the 'See more' link to\n expand the text, then click 'See less' to truncate the text once more!\n Dripper caramelization java saucer grounds galão, mocha, and robusta\n kopi-luwak, percolator, instant, qui saucer latte in brewed café au\n lait. Con panna, cup, cream, body americano affogato cup espresso, rich\n milk seasonal saucer grinder spoon that cultivar strong redeye\n frappuccino barista extraction redeye mazagran.\n </ic-typography>`,\n });\n\n page.rootInstance.truncated = true;\n await page.waitForChanges();\n\n const button = page.root.shadowRoot.querySelector(\"button\");\n button.focus();\n await page.waitForChanges();\n expect(button).toHaveClass(\"focus\");\n\n button.blur();\n await page.waitForChanges();\n expect(button).not.toHaveClass(\"focus\");\n });\n\n it(\"should test truncation button mousedown handler\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography max-lines=\"3\">\n Body of text that is truncated to three lines. Click the 'See more' link to\n expand the text, then click 'See less' to truncate the text once more!\n Dripper caramelization java saucer grounds galão, mocha, and robusta\n kopi-luwak, percolator, instant, qui saucer latte in brewed café au\n lait. Con panna, cup, cream, body americano affogato cup espresso, rich\n milk seasonal saucer grinder spoon that cultivar strong redeye\n frappuccino barista extraction redeye mazagran.\n </ic-typography>`,\n });\n\n page.rootInstance.truncated = true;\n await page.waitForChanges();\n\n const button = page.root.shadowRoot.querySelector(\"button\");\n\n const event = new Event(\"mousedown\", {\n bubbles: true,\n cancelable: true,\n });\n\n button.dispatchEvent(event);\n await page.waitForChanges();\n expect(page.rootInstance.focusBtnFromKeyboard).toBe(false);\n\n button.focus();\n await page.waitForChanges();\n expect(button).not.toHaveClass(\"focus\");\n });\n\n it(\"should test resizeObserver\", async () => {\n const page = await newSpecPage({\n components: [Typography],\n html: `<ic-typography max-lines=\"3\">\n Body of text that is truncated to three lines. Click the 'See more' link to\n expand the text, then click 'See less' to truncate the text once more!\n Dripper caramelization java saucer grounds galão, mocha, and robusta\n kopi-luwak, percolator, instant, qui saucer latte in brewed café au\n lait. Con panna, cup, cream, body americano affogato cup espresso, rich\n milk seasonal saucer grinder spoon that cultivar strong redeye\n frappuccino barista extraction redeye mazagran.\n </ic-typography>`,\n });\n\n page.rootInstance.el.clientHeight = 96;\n page.rootInstance.el.clientWidth = 200;\n page.rootInstance.resizeObserverCallback();\n expect(page.rootInstance.lastWidth).toBe(undefined);\n expect(page.rootInstance.truncated).toBe(true);\n\n //lastMarkerTop will get overwritten with 0\n page.rootInstance.lastMarkerTop = 120;\n page.rootInstance.resizeObserverCallback();\n expect(page.rootInstance.lastWidth).toBe(200);\n expect(page.rootInstance.lastMarkerTop).toBe(0);\n\n //test lastMarkerTop not overwritten with 0 as widths should match\n page.rootInstance.lastMarkerTop = 120;\n page.rootInstance.resizeObserverCallback();\n expect(page.rootInstance.lastMarkerTop).toBe(120);\n\n //test lastWidth not overwritten as merkerTop should match lastMarkerTop\n page.rootInstance.el.clientWidth = 300;\n page.rootInstance.lastMarkerTop = 0;\n page.rootInstance.resizeObserverCallback();\n expect(page.rootInstance.lastWidth).toBe(200);\n\n //test disconnected callback\n page.setContent(\"\");\n });\n});\n"]}
@@ -39,4 +39,15 @@ export const resizeTo = (windowObj, width, height) => {
39
39
  outerHeight: height,
40
40
  }).dispatchEvent(new windowObj.Event("resize"));
41
41
  };
42
+ export const testKeyboardEvent = (keyboardKey) => {
43
+ return {
44
+ key: `${keyboardKey}`,
45
+ preventDefault: () => null,
46
+ stopImmediatePropagation: () => null,
47
+ shiftKey: false,
48
+ target: {
49
+ id: "key-id",
50
+ },
51
+ };
52
+ };
42
53
  //# sourceMappingURL=testspec.setup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"testspec.setup.js","sourceRoot":"","sources":["../src/testspec.setup.ts"],"names":[],"mappings":"AAAA,O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CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAQ,EAAE;EACnD,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE;IACtC,OAAO,OAAO,KAAK,IAAI,CAAC;EAC1B,CAAC,CAAC,CAAC;EAEH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE;IAClD,KAAK,EAAE,WAAW;GACnB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,IAAmB,EAAE;EAC3D,qDAAqD;EACrD,MAAM,cAAc,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,SAAwB,EACxB,KAAa,EACb,MAAc,EACR,EAAE;EACR,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;IACvB,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,MAAM;GACpB,CAAC,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC","sourcesContent":["import * as helpers from \"./utils/helpers\";\n\n//common setup to be used across all spec tests\nimport { DEVICE_SIZES as device_sizes } from \"./utils/helpers\";\n\nObject.defineProperty(device_sizes, \"XS\", { value: 0 });\nObject.defineProperty(device_sizes, \"S\", { value: 576 });\nObject.defineProperty(device_sizes, \"M\", { value: 768 });\nObject.defineProperty(device_sizes, \"L\", { value: 992 });\nObject.defineProperty(device_sizes, \"XL\", { value: 1200 });\n\n// ResizeObserver isn't available in test environment\nconst mockResizeObserver = jest.fn();\nmockResizeObserver.mockReturnValue({\n observe: jest.fn().mockReturnValue(null),\n unobserve: jest.fn().mockReturnValue(null),\n disconnect: jest.fn().mockReturnValue(null),\n});\nObject.defineProperty(global, \"ResizeObserver\", {\n value: mockResizeObserver,\n});\n\nexport const waitForTimeout = async (ms: number): Promise<void> => {\n await new Promise((r) => setTimeout(r, ms));\n};\n\nexport const mockDeviceSize = (size: number): void => {\n const matchesFunc = jest.fn((devSize) => {\n return devSize === size;\n });\n\n Object.defineProperty(helpers, \"deviceSizeMatches\", {\n value: matchesFunc,\n });\n};\n\nexport const waitForNavGroupLoad = async (): Promise<void> => {\n //delay to account for 50ms delay in componentdidload\n await waitForTimeout(100);\n};\n\nexport const resizeTo = (\n windowObj: typeof window,\n width: number,\n height: number\n): void => {\n Object.assign(windowObj, {\n innerWidth: width,\n innerHeight: height,\n outerWidth: width,\n outerHeight: height,\n }).dispatchEvent(new windowObj.Event(\"resize\"));\n};\n"]}
1
+ {"version":3,"file":"testspec.setup.js","sourceRoot":"","sources":["../src/testspec.setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAE3C,+CAA+C;AAC/C,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;AACxD,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AACzD,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AACzD,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AACzD,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAE3D,qDAAqD;AACrD,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AACrC,kBAAkB,CAAC,eAAe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CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,WAAmB,EAAE,EAAE;EACvD,OAAO;IACL,GAAG,EAAE,GAAG,WAAW,EAAE;IACrB,cAAc,EAAE,GAAS,EAAE,CAAC,IAAI;IAChC,wBAAwB,EAAE,GAAS,EAAE,CAAC,IAAI;IAC1C,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE;MACN,EAAE,EAAE,QAAQ;KACb;GACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import * as helpers from \"./utils/helpers\";\n\n//common setup to be used across all spec tests\nimport { DEVICE_SIZES as device_sizes } from \"./utils/helpers\";\n\nObject.defineProperty(device_sizes, \"XS\", { value: 0 });\nObject.defineProperty(device_sizes, \"S\", { value: 576 });\nObject.defineProperty(device_sizes, \"M\", { value: 768 });\nObject.defineProperty(device_sizes, \"L\", { value: 992 });\nObject.defineProperty(device_sizes, \"XL\", { value: 1200 });\n\n// ResizeObserver isn't available in test environment\nconst mockResizeObserver = jest.fn();\nmockResizeObserver.mockReturnValue({\n observe: jest.fn().mockReturnValue(null),\n unobserve: jest.fn().mockReturnValue(null),\n disconnect: jest.fn().mockReturnValue(null),\n});\nObject.defineProperty(global, \"ResizeObserver\", {\n value: mockResizeObserver,\n});\n\nexport const waitForTimeout = async (ms: number): Promise<void> => {\n await new Promise((r) => setTimeout(r, ms));\n};\n\nexport const mockDeviceSize = (size: number): void => {\n const matchesFunc = jest.fn((devSize) => {\n return devSize === size;\n });\n\n Object.defineProperty(helpers, \"deviceSizeMatches\", {\n value: matchesFunc,\n });\n};\n\nexport const waitForNavGroupLoad = async (): Promise<void> => {\n //delay to account for 50ms delay in componentdidload\n await waitForTimeout(100);\n};\n\nexport const resizeTo = (\n windowObj: typeof window,\n width: number,\n height: number\n): void => {\n Object.assign(windowObj, {\n innerWidth: width,\n innerHeight: height,\n outerWidth: width,\n outerHeight: height,\n }).dispatchEvent(new windowObj.Event(\"resize\"));\n};\n\nexport const testKeyboardEvent = (keyboardKey: string) => {\n return {\n key: `${keyboardKey}`,\n preventDefault: (): void => null,\n stopImmediatePropagation: (): void => null,\n shiftKey: false,\n target: {\n id: \"key-id\",\n },\n };\n};\n"]}