@ukic/web-components 3.0.0-alpha.3 → 3.0.0-alpha.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (722) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-69219f14.js → helpers-529aaa3a.js} +5 -4
  3. package/dist/cjs/helpers-529aaa3a.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +10 -10
  5. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-accordion.cjs.entry.js +5 -5
  7. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-alert.cjs.entry.js +7 -5
  9. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-back-to-top.cjs.entry.js +8 -5
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-badge.cjs.entry.js +2 -2
  13. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +43 -20
  15. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
  17. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-button_3.cjs.entry.js +11 -13
  19. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-card-vertical.cjs.entry.js +25 -26
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-checkbox-group.cjs.entry.js +16 -5
  23. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-checkbox.cjs.entry.js +5 -3
  25. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-dialog.cjs.entry.js +4 -2
  31. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-divider.cjs.entry.js +71 -7
  33. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-footer-link-group.cjs.entry.js +3 -3
  36. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  38. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-footer.cjs.entry.js +2 -2
  40. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-hero.cjs.entry.js +2 -2
  42. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +15 -7
  44. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +14 -25
  46. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-input-label_2.cjs.entry.js +21 -25
  48. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-link.cjs.entry.js +3 -8
  50. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  52. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-menu-item.cjs.entry.js +18 -17
  54. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-navigation-button.cjs.entry.js +7 -3
  56. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-navigation-group.cjs.entry.js +7 -4
  58. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-navigation-item.cjs.entry.js +57 -5
  60. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -4
  62. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-page-header.cjs.entry.js +5 -3
  64. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-pagination-item.cjs.entry.js +8 -11
  66. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-pagination.cjs.entry.js +19 -15
  68. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-popover-menu.cjs.entry.js +9 -9
  70. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-radio-group.cjs.entry.js +14 -5
  72. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-radio-option.cjs.entry.js +8 -4
  74. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-search-bar.cjs.entry.js +12 -9
  76. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-select.cjs.entry.js +10 -12
  78. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-side-navigation.cjs.entry.js +13 -8
  80. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-status-tag.cjs.entry.js +5 -4
  82. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  84. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  85. package/dist/cjs/ic-switch.cjs.entry.js +2 -2
  86. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-tab-context.cjs.entry.js +2 -1
  88. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  89. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -19
  90. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  91. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  92. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  93. package/dist/cjs/ic-text-field.cjs.entry.js +18 -15
  94. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  96. package/dist/cjs/ic-toast.cjs.entry.js +3 -3
  97. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +29 -5
  99. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-toggle-button.cjs.entry.js +9 -6
  101. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-top-navigation.cjs.entry.js +6 -4
  103. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-typography.cjs.entry.js +2 -2
  105. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  106. package/dist/cjs/loader.cjs.js +1 -1
  107. package/dist/collection/ag-theme-icds.css +217 -0
  108. package/dist/collection/collection-manifest.json +1 -1
  109. package/dist/collection/components/ic-accordion/ic-accordion.css +21 -19
  110. package/dist/collection/components/ic-accordion/ic-accordion.js +27 -30
  111. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  112. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +3 -3
  113. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +1 -1
  114. package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +2 -12
  115. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +18 -18
  116. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
  117. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js +3 -3
  118. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js.map +1 -1
  119. package/dist/collection/components/ic-alert/ic-alert.css +29 -18
  120. package/dist/collection/components/ic-alert/ic-alert.js +48 -22
  121. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  122. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +1 -1
  123. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -1
  124. package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +5 -2
  125. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +31 -4
  126. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
  127. package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js +14 -0
  128. package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js.map +1 -1
  129. package/dist/collection/components/ic-badge/ic-badge.css +3 -3
  130. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +4 -7
  131. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +44 -19
  132. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
  133. package/dist/collection/components/ic-button/ic-button.css +658 -421
  134. package/dist/collection/components/ic-button/ic-button.js +51 -35
  135. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  136. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +3 -3
  137. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -1
  138. package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +99 -115
  139. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +50 -27
  140. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -1
  141. package/dist/collection/components/ic-checkbox/ic-checkbox.css +42 -39
  142. package/dist/collection/components/ic-checkbox/ic-checkbox.js +28 -2
  143. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  144. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +15 -2
  145. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +39 -2
  146. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  147. package/dist/collection/components/ic-classification-banner/ic-classification-banner.css +13 -25
  148. package/dist/collection/components/ic-dialog/ic-dialog.css +16 -3
  149. package/dist/collection/components/ic-dialog/ic-dialog.js +26 -0
  150. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  151. package/dist/collection/components/ic-divider/ic-divider.css +341 -4
  152. package/dist/collection/components/ic-divider/ic-divider.js +235 -8
  153. package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
  154. package/dist/collection/components/ic-divider/ic-divider.types.js +2 -0
  155. package/dist/collection/components/ic-divider/ic-divider.types.js.map +1 -0
  156. package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js +89 -4
  157. package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js.map +1 -1
  158. package/dist/collection/components/ic-footer/ic-footer.css +20 -19
  159. package/dist/collection/components/ic-footer-link/ic-footer-link.css +2 -2
  160. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +11 -19
  161. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +1 -1
  162. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
  163. package/dist/collection/components/ic-hero/ic-hero.css +23 -8
  164. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +0 -4
  165. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +62 -6
  166. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
  167. package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js +43 -0
  168. package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js.map +1 -1
  169. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +40 -17
  170. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +8 -38
  171. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  172. package/dist/collection/components/ic-input-label/ic-input-label.css +18 -20
  173. package/dist/collection/components/ic-input-label/ic-input-label.js +11 -33
  174. package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
  175. package/dist/collection/components/ic-input-validation/ic-input-validation.css +12 -3
  176. package/dist/collection/components/ic-input-validation/ic-input-validation.js +7 -7
  177. package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
  178. package/dist/collection/components/ic-link/ic-link.css +0 -24
  179. package/dist/collection/components/ic-link/ic-link.js +3 -8
  180. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  181. package/dist/collection/components/ic-link/test/basic/ic-link.spec.js +2 -2
  182. package/dist/collection/components/ic-link/test/basic/ic-link.spec.js.map +1 -1
  183. package/dist/collection/components/ic-menu/ic-menu.css +35 -19
  184. package/dist/collection/components/ic-menu/ic-menu.js +3 -2
  185. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  186. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  187. package/dist/collection/components/ic-menu-group/ic-menu-group.js.map +1 -1
  188. package/dist/collection/components/ic-menu-item/ic-menu-item.js +58 -25
  189. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  190. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +2 -2
  191. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -1
  192. package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +14 -0
  193. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +29 -1
  194. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  195. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +1 -1
  196. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +1 -1
  197. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +13 -8
  198. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +29 -2
  199. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  200. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +20 -18
  201. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +83 -6
  202. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  203. package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js +12 -0
  204. package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js.map +1 -1
  205. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +9 -6
  206. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +27 -2
  207. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  208. package/dist/collection/components/ic-page-header/ic-page-header.css +2 -1
  209. package/dist/collection/components/ic-page-header/ic-page-header.js +27 -1
  210. package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
  211. package/dist/collection/components/ic-pagination/ic-pagination.css +15 -0
  212. package/dist/collection/components/ic-pagination/ic-pagination.js +59 -37
  213. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  214. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +1 -1
  215. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
  216. package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +26 -6
  217. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +48 -33
  218. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
  219. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +25 -12
  220. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  221. package/dist/collection/components/ic-radio-group/ic-radio-group.css +17 -1
  222. package/dist/collection/components/ic-radio-group/ic-radio-group.js +37 -2
  223. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  224. package/dist/collection/components/ic-radio-option/ic-radio-option.css +34 -25
  225. package/dist/collection/components/ic-radio-option/ic-radio-option.js +30 -2
  226. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  227. package/dist/collection/components/ic-search-bar/ic-search-bar.css +42 -5
  228. package/dist/collection/components/ic-search-bar/ic-search-bar.js +34 -8
  229. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  230. package/dist/collection/components/ic-select/ic-select.css +50 -36
  231. package/dist/collection/components/ic-select/ic-select.js +34 -12
  232. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  233. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +48 -32
  234. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +11 -6
  235. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  236. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +3 -3
  237. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +1 -1
  238. package/dist/collection/components/ic-status-tag/ic-status-tag.css +5 -5
  239. package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
  240. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  241. package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js +15 -32
  242. package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js.map +1 -1
  243. package/dist/collection/components/ic-switch/ic-switch.css +3 -0
  244. package/dist/collection/components/ic-tab-context/ic-tab-context.js +2 -1
  245. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  246. package/dist/collection/components/ic-tab-group/ic-tab-group.css +8 -0
  247. package/dist/collection/components/ic-tab-group/ic-tab-group.js +1 -17
  248. package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
  249. package/dist/collection/components/ic-text-field/ic-text-field.css +61 -8
  250. package/dist/collection/components/ic-text-field/ic-text-field.js +40 -13
  251. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  252. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js +2 -2
  253. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +1 -1
  254. package/dist/collection/components/ic-toast/ic-toast.css +25 -16
  255. package/dist/collection/components/ic-toast/ic-toast.js +1 -2
  256. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  257. package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +12 -12
  258. package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -1
  259. package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +189 -54
  260. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +53 -32
  261. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  262. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +23 -16
  263. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +77 -28
  264. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
  265. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +18 -0
  266. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
  267. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +41 -17
  268. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +28 -2
  269. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  270. package/dist/collection/components/ic-typography/ic-typography.css +4 -6
  271. package/dist/collection/utils/helpers.js +4 -3
  272. package/dist/collection/utils/helpers.js.map +1 -1
  273. package/dist/components/helpers.js +5 -4
  274. package/dist/components/helpers.js.map +1 -1
  275. package/dist/components/ic-accordion-group.js +11 -11
  276. package/dist/components/ic-accordion-group.js.map +1 -1
  277. package/dist/components/ic-accordion.js +5 -5
  278. package/dist/components/ic-accordion.js.map +1 -1
  279. package/dist/components/ic-alert.js +8 -5
  280. package/dist/components/ic-alert.js.map +1 -1
  281. package/dist/components/ic-back-to-top.js +9 -5
  282. package/dist/components/ic-back-to-top.js.map +1 -1
  283. package/dist/components/ic-badge.js +1 -1
  284. package/dist/components/ic-badge.js.map +1 -1
  285. package/dist/components/ic-breadcrumb-group.js +43 -19
  286. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  287. package/dist/components/ic-breadcrumb2.js +1 -1
  288. package/dist/components/ic-breadcrumb2.js.map +1 -1
  289. package/dist/components/ic-button2.js +12 -13
  290. package/dist/components/ic-button2.js.map +1 -1
  291. package/dist/components/ic-card-vertical.js +27 -27
  292. package/dist/components/ic-card-vertical.js.map +1 -1
  293. package/dist/components/ic-checkbox-group.js +18 -5
  294. package/dist/components/ic-checkbox-group.js.map +1 -1
  295. package/dist/components/ic-checkbox.js +5 -2
  296. package/dist/components/ic-checkbox.js.map +1 -1
  297. package/dist/components/ic-classification-banner.js +1 -1
  298. package/dist/components/ic-classification-banner.js.map +1 -1
  299. package/dist/components/ic-dialog.js +4 -1
  300. package/dist/components/ic-dialog.js.map +1 -1
  301. package/dist/components/ic-divider2.js +86 -9
  302. package/dist/components/ic-divider2.js.map +1 -1
  303. package/dist/components/ic-footer-link-group.js +2 -2
  304. package/dist/components/ic-footer-link-group.js.map +1 -1
  305. package/dist/components/ic-footer-link.js +1 -1
  306. package/dist/components/ic-footer-link.js.map +1 -1
  307. package/dist/components/ic-footer.js +1 -1
  308. package/dist/components/ic-footer.js.map +1 -1
  309. package/dist/components/ic-hero.js +1 -1
  310. package/dist/components/ic-hero.js.map +1 -1
  311. package/dist/components/ic-horizontal-scroll2.js +16 -6
  312. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  313. package/dist/components/ic-input-component-container2.js +9 -22
  314. package/dist/components/ic-input-component-container2.js.map +1 -1
  315. package/dist/components/ic-input-label2.js +12 -17
  316. package/dist/components/ic-input-label2.js.map +1 -1
  317. package/dist/components/ic-input-validation2.js +8 -8
  318. package/dist/components/ic-input-validation2.js.map +1 -1
  319. package/dist/components/ic-link2.js +4 -9
  320. package/dist/components/ic-link2.js.map +1 -1
  321. package/dist/components/ic-menu-group.js +1 -1
  322. package/dist/components/ic-menu-group.js.map +1 -1
  323. package/dist/components/ic-menu-item2.js +20 -19
  324. package/dist/components/ic-menu-item2.js.map +1 -1
  325. package/dist/components/ic-menu2.js +4 -3
  326. package/dist/components/ic-menu2.js.map +1 -1
  327. package/dist/components/ic-navigation-button.js +7 -2
  328. package/dist/components/ic-navigation-button.js.map +1 -1
  329. package/dist/components/ic-navigation-group.js +7 -3
  330. package/dist/components/ic-navigation-group.js.map +1 -1
  331. package/dist/components/ic-navigation-item.js +60 -6
  332. package/dist/components/ic-navigation-item.js.map +1 -1
  333. package/dist/components/ic-navigation-menu2.js +6 -4
  334. package/dist/components/ic-navigation-menu2.js.map +1 -1
  335. package/dist/components/ic-page-header.js +5 -2
  336. package/dist/components/ic-page-header.js.map +1 -1
  337. package/dist/components/ic-pagination-item2.js +10 -12
  338. package/dist/components/ic-pagination-item2.js.map +1 -1
  339. package/dist/components/ic-pagination.js +20 -15
  340. package/dist/components/ic-pagination.js.map +1 -1
  341. package/dist/components/ic-popover-menu.js +8 -8
  342. package/dist/components/ic-popover-menu.js.map +1 -1
  343. package/dist/components/ic-radio-group.js +16 -5
  344. package/dist/components/ic-radio-group.js.map +1 -1
  345. package/dist/components/ic-radio-option.js +8 -3
  346. package/dist/components/ic-radio-option.js.map +1 -1
  347. package/dist/components/ic-search-bar.js +13 -9
  348. package/dist/components/ic-search-bar.js.map +1 -1
  349. package/dist/components/ic-select.js +11 -12
  350. package/dist/components/ic-select.js.map +1 -1
  351. package/dist/components/ic-side-navigation.js +13 -8
  352. package/dist/components/ic-side-navigation.js.map +1 -1
  353. package/dist/components/ic-status-tag.js +5 -3
  354. package/dist/components/ic-status-tag.js.map +1 -1
  355. package/dist/components/ic-switch.js +1 -1
  356. package/dist/components/ic-switch.js.map +1 -1
  357. package/dist/components/ic-tab-context.js +2 -1
  358. package/dist/components/ic-tab-context.js.map +1 -1
  359. package/dist/components/ic-tab-group.js +2 -18
  360. package/dist/components/ic-tab-group.js.map +1 -1
  361. package/dist/components/ic-text-field2.js +19 -15
  362. package/dist/components/ic-text-field2.js.map +1 -1
  363. package/dist/components/ic-toast.js +3 -3
  364. package/dist/components/ic-toast.js.map +1 -1
  365. package/dist/components/ic-toggle-button-group.js +36 -7
  366. package/dist/components/ic-toggle-button-group.js.map +1 -1
  367. package/dist/components/ic-toggle-button.js +11 -7
  368. package/dist/components/ic-toggle-button.js.map +1 -1
  369. package/dist/components/ic-top-navigation.js +7 -4
  370. package/dist/components/ic-top-navigation.js.map +1 -1
  371. package/dist/components/ic-typography2.js +1 -1
  372. package/dist/components/ic-typography2.js.map +1 -1
  373. package/dist/core/ag-theme-icds.css +217 -0
  374. package/dist/core/core.css +934 -66
  375. package/dist/core/core.esm.js +1 -1
  376. package/dist/core/core.esm.js.map +1 -1
  377. package/dist/core/p-03dc6b93.entry.js +2 -0
  378. package/dist/core/p-03dc6b93.entry.js.map +1 -0
  379. package/dist/core/p-04339c98.entry.js +2 -0
  380. package/dist/core/p-04339c98.entry.js.map +1 -0
  381. package/dist/core/p-0aec7fab.entry.js +2 -0
  382. package/dist/core/p-0aec7fab.entry.js.map +1 -0
  383. package/dist/core/{p-37dea10d.entry.js → p-0cef50b7.entry.js} +2 -2
  384. package/dist/core/{p-4a3b1f06.entry.js → p-12f72d83.entry.js} +2 -2
  385. package/dist/core/p-12f72d83.entry.js.map +1 -0
  386. package/dist/core/{p-f5b2b26d.entry.js → p-15fd6539.entry.js} +2 -2
  387. package/dist/core/p-175baf98.entry.js +2 -0
  388. package/dist/core/p-175baf98.entry.js.map +1 -0
  389. package/dist/core/{p-726673ee.entry.js → p-2223c7ee.entry.js} +2 -2
  390. package/dist/core/p-2223c7ee.entry.js.map +1 -0
  391. package/dist/core/p-274b1ed7.entry.js +2 -0
  392. package/dist/core/p-274b1ed7.entry.js.map +1 -0
  393. package/dist/core/p-2a300ec7.entry.js +2 -0
  394. package/dist/core/p-2a300ec7.entry.js.map +1 -0
  395. package/dist/core/p-303307bb.entry.js +2 -0
  396. package/dist/core/p-303307bb.entry.js.map +1 -0
  397. package/dist/core/p-3317f083.entry.js +2 -0
  398. package/dist/core/p-3317f083.entry.js.map +1 -0
  399. package/dist/core/p-35bd9d76.entry.js +2 -0
  400. package/dist/core/p-35bd9d76.entry.js.map +1 -0
  401. package/dist/core/p-36f4e0bd.entry.js +2 -0
  402. package/dist/core/p-36f4e0bd.entry.js.map +1 -0
  403. package/dist/core/p-3a4000d8.entry.js +2 -0
  404. package/dist/core/p-3a4000d8.entry.js.map +1 -0
  405. package/dist/core/{p-5cd016e1.entry.js → p-48463a79.entry.js} +2 -2
  406. package/dist/core/p-48463a79.entry.js.map +1 -0
  407. package/dist/core/{p-dd36bf1b.entry.js → p-4fea4610.entry.js} +2 -2
  408. package/dist/core/p-4fea4610.entry.js.map +1 -0
  409. package/dist/core/p-60d458e5.entry.js +2 -0
  410. package/dist/core/p-60d458e5.entry.js.map +1 -0
  411. package/dist/core/{p-690c5e80.entry.js → p-685d6aa9.entry.js} +2 -2
  412. package/dist/core/p-6bb3ef22.entry.js +2 -0
  413. package/dist/core/p-6bb3ef22.entry.js.map +1 -0
  414. package/dist/core/p-6cb1f1da.entry.js +2 -0
  415. package/dist/core/p-6cb1f1da.entry.js.map +1 -0
  416. package/dist/core/{p-c9cf932c.entry.js → p-78f46cf8.entry.js} +2 -2
  417. package/dist/core/p-78f46cf8.entry.js.map +1 -0
  418. package/dist/core/p-79c132e3.entry.js +2 -0
  419. package/dist/core/p-79c132e3.entry.js.map +1 -0
  420. package/dist/core/p-7cba80ac.entry.js +2 -0
  421. package/dist/core/p-7cba80ac.entry.js.map +1 -0
  422. package/dist/core/p-81f80487.entry.js +2 -0
  423. package/dist/core/p-81f80487.entry.js.map +1 -0
  424. package/dist/core/p-85be0268.entry.js +2 -0
  425. package/dist/core/p-85be0268.entry.js.map +1 -0
  426. package/dist/core/p-85d33e38.entry.js +2 -0
  427. package/dist/core/p-85d33e38.entry.js.map +1 -0
  428. package/dist/core/{p-b78f8b8c.entry.js → p-88810080.entry.js} +2 -2
  429. package/dist/core/p-88810080.entry.js.map +1 -0
  430. package/dist/core/{p-b01ffa55.entry.js → p-96b4ca6e.entry.js} +2 -2
  431. package/dist/core/p-96b4ca6e.entry.js.map +1 -0
  432. package/dist/core/p-97e8246c.entry.js +2 -0
  433. package/dist/core/p-97e8246c.entry.js.map +1 -0
  434. package/dist/core/p-98816f52.entry.js +2 -0
  435. package/dist/core/p-98816f52.entry.js.map +1 -0
  436. package/dist/core/p-a01841e2.entry.js +2 -0
  437. package/dist/core/p-a01841e2.entry.js.map +1 -0
  438. package/dist/core/p-a6be333f.entry.js +2 -0
  439. package/dist/core/p-a6be333f.entry.js.map +1 -0
  440. package/dist/core/p-a91b0212.entry.js +2 -0
  441. package/dist/core/p-a91b0212.entry.js.map +1 -0
  442. package/dist/core/p-ae42affc.entry.js +2 -0
  443. package/dist/core/p-ae42affc.entry.js.map +1 -0
  444. package/dist/core/p-b06939fa.entry.js +2 -0
  445. package/dist/core/p-b06939fa.entry.js.map +1 -0
  446. package/dist/core/{p-95f603dd.entry.js → p-ba37e169.entry.js} +2 -2
  447. package/dist/core/p-ba55afea.entry.js +2 -0
  448. package/dist/core/p-ba55afea.entry.js.map +1 -0
  449. package/dist/core/p-bbd2febe.entry.js +2 -0
  450. package/dist/core/p-bbd2febe.entry.js.map +1 -0
  451. package/dist/core/p-c0d5043e.entry.js +2 -0
  452. package/dist/core/p-c0d5043e.entry.js.map +1 -0
  453. package/dist/core/p-c43d676b.entry.js +2 -0
  454. package/dist/core/p-c43d676b.entry.js.map +1 -0
  455. package/dist/core/p-c4f32f77.entry.js +2 -0
  456. package/dist/core/p-c4f32f77.entry.js.map +1 -0
  457. package/dist/core/p-c563d479.entry.js +2 -0
  458. package/dist/core/p-c563d479.entry.js.map +1 -0
  459. package/dist/core/{p-922984cb.entry.js → p-c5d3c71e.entry.js} +2 -2
  460. package/dist/core/p-c7e01fcd.entry.js +2 -0
  461. package/dist/core/p-c7e01fcd.entry.js.map +1 -0
  462. package/dist/core/p-c82240b7.entry.js +2 -0
  463. package/dist/core/p-c82240b7.entry.js.map +1 -0
  464. package/dist/core/{p-7b35de65.entry.js → p-cdbc3414.entry.js} +2 -2
  465. package/dist/core/p-d3263ed9.entry.js +2 -0
  466. package/dist/core/p-d3263ed9.entry.js.map +1 -0
  467. package/dist/core/p-d43e0f4b.entry.js +2 -0
  468. package/dist/core/p-d43e0f4b.entry.js.map +1 -0
  469. package/dist/core/p-d987bdc0.entry.js +2 -0
  470. package/dist/core/p-d987bdc0.entry.js.map +1 -0
  471. package/dist/core/{p-50ead56c.entry.js → p-df957570.entry.js} +2 -2
  472. package/dist/core/p-df957570.entry.js.map +1 -0
  473. package/dist/core/p-e107f362.entry.js +2 -0
  474. package/dist/core/p-e107f362.entry.js.map +1 -0
  475. package/dist/core/{p-ee6dd94c.entry.js → p-ec097c1f.entry.js} +2 -2
  476. package/dist/core/{p-14dfd8db.entry.js → p-f069f50e.entry.js} +2 -2
  477. package/dist/core/p-f069f50e.entry.js.map +1 -0
  478. package/dist/core/{p-acbd15ab.entry.js → p-f580f0ce.entry.js} +2 -2
  479. package/dist/core/{p-b7eb8ef9.js → p-f99576e0.js} +2 -2
  480. package/dist/core/p-f99576e0.js.map +1 -0
  481. package/dist/esm/core.js +1 -1
  482. package/dist/esm/{helpers-e8797e8d.js → helpers-7bf8c67f.js} +6 -5
  483. package/dist/esm/helpers-7bf8c67f.js.map +1 -0
  484. package/dist/esm/ic-accordion-group.entry.js +10 -10
  485. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  486. package/dist/esm/ic-accordion.entry.js +5 -5
  487. package/dist/esm/ic-accordion.entry.js.map +1 -1
  488. package/dist/esm/ic-alert.entry.js +7 -5
  489. package/dist/esm/ic-alert.entry.js.map +1 -1
  490. package/dist/esm/ic-back-to-top.entry.js +9 -6
  491. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  492. package/dist/esm/ic-badge.entry.js +2 -2
  493. package/dist/esm/ic-badge.entry.js.map +1 -1
  494. package/dist/esm/ic-breadcrumb-group.entry.js +43 -20
  495. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  496. package/dist/esm/ic-breadcrumb.entry.js +2 -2
  497. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  498. package/dist/esm/ic-button_3.entry.js +11 -13
  499. package/dist/esm/ic-button_3.entry.js.map +1 -1
  500. package/dist/esm/ic-card-vertical.entry.js +26 -27
  501. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  502. package/dist/esm/ic-checkbox-group.entry.js +16 -5
  503. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  504. package/dist/esm/ic-checkbox.entry.js +5 -3
  505. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  506. package/dist/esm/ic-chip.entry.js +1 -1
  507. package/dist/esm/ic-classification-banner.entry.js +1 -1
  508. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  509. package/dist/esm/ic-data-row.entry.js +1 -1
  510. package/dist/esm/ic-dialog.entry.js +4 -2
  511. package/dist/esm/ic-dialog.entry.js.map +1 -1
  512. package/dist/esm/ic-divider.entry.js +72 -8
  513. package/dist/esm/ic-divider.entry.js.map +1 -1
  514. package/dist/esm/ic-empty-state.entry.js +1 -1
  515. package/dist/esm/ic-footer-link-group.entry.js +3 -3
  516. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  517. package/dist/esm/ic-footer-link.entry.js +2 -2
  518. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  519. package/dist/esm/ic-footer.entry.js +2 -2
  520. package/dist/esm/ic-footer.entry.js.map +1 -1
  521. package/dist/esm/ic-hero.entry.js +2 -2
  522. package/dist/esm/ic-hero.entry.js.map +1 -1
  523. package/dist/esm/ic-horizontal-scroll.entry.js +15 -7
  524. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  525. package/dist/esm/ic-input-component-container_3.entry.js +14 -25
  526. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  527. package/dist/esm/ic-input-label_2.entry.js +21 -25
  528. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  529. package/dist/esm/ic-link.entry.js +3 -8
  530. package/dist/esm/ic-link.entry.js.map +1 -1
  531. package/dist/esm/ic-menu-group.entry.js +2 -2
  532. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  533. package/dist/esm/ic-menu-item.entry.js +18 -17
  534. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  535. package/dist/esm/ic-navigation-button.entry.js +7 -3
  536. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  537. package/dist/esm/ic-navigation-group.entry.js +7 -4
  538. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  539. package/dist/esm/ic-navigation-item.entry.js +58 -6
  540. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  541. package/dist/esm/ic-navigation-menu.entry.js +5 -4
  542. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  543. package/dist/esm/ic-page-header.entry.js +5 -3
  544. package/dist/esm/ic-page-header.entry.js.map +1 -1
  545. package/dist/esm/ic-pagination-item.entry.js +8 -11
  546. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  547. package/dist/esm/ic-pagination.entry.js +19 -15
  548. package/dist/esm/ic-pagination.entry.js.map +1 -1
  549. package/dist/esm/ic-popover-menu.entry.js +9 -9
  550. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  551. package/dist/esm/ic-radio-group.entry.js +14 -5
  552. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  553. package/dist/esm/ic-radio-option.entry.js +8 -4
  554. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  555. package/dist/esm/ic-search-bar.entry.js +12 -9
  556. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  557. package/dist/esm/ic-select.entry.js +10 -12
  558. package/dist/esm/ic-select.entry.js.map +1 -1
  559. package/dist/esm/ic-side-navigation.entry.js +13 -8
  560. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  561. package/dist/esm/ic-status-tag.entry.js +5 -4
  562. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  563. package/dist/esm/ic-step.entry.js +1 -1
  564. package/dist/esm/ic-stepper.entry.js +1 -1
  565. package/dist/esm/ic-switch.entry.js +2 -2
  566. package/dist/esm/ic-switch.entry.js.map +1 -1
  567. package/dist/esm/ic-tab-context.entry.js +2 -1
  568. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  569. package/dist/esm/ic-tab-group.entry.js +3 -19
  570. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  571. package/dist/esm/ic-tab-panel.entry.js +1 -1
  572. package/dist/esm/ic-tab.entry.js +1 -1
  573. package/dist/esm/ic-text-field.entry.js +18 -15
  574. package/dist/esm/ic-text-field.entry.js.map +1 -1
  575. package/dist/esm/ic-theme.entry.js +1 -1
  576. package/dist/esm/ic-toast.entry.js +3 -3
  577. package/dist/esm/ic-toast.entry.js.map +1 -1
  578. package/dist/esm/ic-toggle-button-group.entry.js +29 -5
  579. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  580. package/dist/esm/ic-toggle-button.entry.js +9 -6
  581. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  582. package/dist/esm/ic-top-navigation.entry.js +6 -4
  583. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  584. package/dist/esm/ic-typography.entry.js +2 -2
  585. package/dist/esm/ic-typography.entry.js.map +1 -1
  586. package/dist/esm/loader.js +1 -1
  587. package/dist/types/components/ic-accordion/ic-accordion.d.ts +5 -5
  588. package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +4 -4
  589. package/dist/types/components/ic-alert/ic-alert.d.ts +9 -5
  590. package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +5 -0
  591. package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +1 -0
  592. package/dist/types/components/ic-button/ic-button.d.ts +9 -5
  593. package/dist/types/components/ic-card-vertical/ic-card-vertical.d.ts +8 -4
  594. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +6 -2
  595. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +7 -1
  596. package/dist/types/components/ic-dialog/ic-dialog.d.ts +5 -0
  597. package/dist/types/components/ic-divider/ic-divider.d.ts +31 -1
  598. package/dist/types/components/ic-divider/ic-divider.types.d.ts +3 -0
  599. package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +2 -1
  600. package/dist/types/components/ic-horizontal-scroll/ic-horizontal-scroll.d.ts +7 -1
  601. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +0 -4
  602. package/dist/types/components/ic-input-label/ic-input-label.d.ts +0 -4
  603. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +11 -5
  604. package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +6 -2
  605. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +6 -2
  606. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +13 -2
  607. package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +5 -0
  608. package/dist/types/components/ic-page-header/ic-page-header.d.ts +5 -1
  609. package/dist/types/components/ic-pagination/ic-pagination.d.ts +9 -5
  610. package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +9 -5
  611. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +3 -6
  612. package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +6 -1
  613. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +5 -1
  614. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +5 -1
  615. package/dist/types/components/ic-select/ic-select.d.ts +6 -2
  616. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
  617. package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +0 -4
  618. package/dist/types/components/ic-text-field/ic-text-field.d.ts +5 -1
  619. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +9 -5
  620. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +12 -5
  621. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +5 -1
  622. package/dist/types/components.d.ts +328 -79
  623. package/dist/types/utils/helpers.d.ts +2 -2
  624. package/hydrate/index.js +550 -330
  625. package/package.json +2 -2
  626. package/vscode-data.json +482 -118
  627. package/dist/cjs/helpers-69219f14.js.map +0 -1
  628. package/dist/core/p-0395442c.entry.js +0 -2
  629. package/dist/core/p-0395442c.entry.js.map +0 -1
  630. package/dist/core/p-0d233b0c.entry.js +0 -2
  631. package/dist/core/p-0d233b0c.entry.js.map +0 -1
  632. package/dist/core/p-134def81.entry.js +0 -2
  633. package/dist/core/p-134def81.entry.js.map +0 -1
  634. package/dist/core/p-14dfd8db.entry.js.map +0 -1
  635. package/dist/core/p-1b116dd1.entry.js +0 -2
  636. package/dist/core/p-1b116dd1.entry.js.map +0 -1
  637. package/dist/core/p-21cc87c0.entry.js +0 -2
  638. package/dist/core/p-21cc87c0.entry.js.map +0 -1
  639. package/dist/core/p-2eae9b27.entry.js +0 -2
  640. package/dist/core/p-2eae9b27.entry.js.map +0 -1
  641. package/dist/core/p-31fc8756.entry.js +0 -2
  642. package/dist/core/p-31fc8756.entry.js.map +0 -1
  643. package/dist/core/p-3618ac34.entry.js +0 -2
  644. package/dist/core/p-3618ac34.entry.js.map +0 -1
  645. package/dist/core/p-384d454d.entry.js +0 -2
  646. package/dist/core/p-384d454d.entry.js.map +0 -1
  647. package/dist/core/p-3d417eff.entry.js +0 -2
  648. package/dist/core/p-3d417eff.entry.js.map +0 -1
  649. package/dist/core/p-3d9726a3.entry.js +0 -2
  650. package/dist/core/p-3d9726a3.entry.js.map +0 -1
  651. package/dist/core/p-43256b7c.entry.js +0 -2
  652. package/dist/core/p-43256b7c.entry.js.map +0 -1
  653. package/dist/core/p-4a3b1f06.entry.js.map +0 -1
  654. package/dist/core/p-50ead56c.entry.js.map +0 -1
  655. package/dist/core/p-5cd016e1.entry.js.map +0 -1
  656. package/dist/core/p-5ef8e106.entry.js +0 -2
  657. package/dist/core/p-5ef8e106.entry.js.map +0 -1
  658. package/dist/core/p-6d3e4bb1.entry.js +0 -2
  659. package/dist/core/p-6d3e4bb1.entry.js.map +0 -1
  660. package/dist/core/p-726673ee.entry.js.map +0 -1
  661. package/dist/core/p-72d30c8a.entry.js +0 -2
  662. package/dist/core/p-72d30c8a.entry.js.map +0 -1
  663. package/dist/core/p-76263187.entry.js +0 -2
  664. package/dist/core/p-76263187.entry.js.map +0 -1
  665. package/dist/core/p-7827b5cb.entry.js +0 -2
  666. package/dist/core/p-7827b5cb.entry.js.map +0 -1
  667. package/dist/core/p-79d0be03.entry.js +0 -2
  668. package/dist/core/p-79d0be03.entry.js.map +0 -1
  669. package/dist/core/p-7fbf2d3e.entry.js +0 -2
  670. package/dist/core/p-7fbf2d3e.entry.js.map +0 -1
  671. package/dist/core/p-91cf9b2b.entry.js +0 -2
  672. package/dist/core/p-91cf9b2b.entry.js.map +0 -1
  673. package/dist/core/p-97fb2bdf.entry.js +0 -2
  674. package/dist/core/p-97fb2bdf.entry.js.map +0 -1
  675. package/dist/core/p-ac4b7329.entry.js +0 -2
  676. package/dist/core/p-ac4b7329.entry.js.map +0 -1
  677. package/dist/core/p-b01ffa55.entry.js.map +0 -1
  678. package/dist/core/p-b17c94b7.entry.js +0 -2
  679. package/dist/core/p-b17c94b7.entry.js.map +0 -1
  680. package/dist/core/p-b78f8b8c.entry.js.map +0 -1
  681. package/dist/core/p-b7eb8ef9.js.map +0 -1
  682. package/dist/core/p-b95a72a3.entry.js +0 -2
  683. package/dist/core/p-b95a72a3.entry.js.map +0 -1
  684. package/dist/core/p-b997064c.entry.js +0 -2
  685. package/dist/core/p-b997064c.entry.js.map +0 -1
  686. package/dist/core/p-ba6ecc15.entry.js +0 -2
  687. package/dist/core/p-ba6ecc15.entry.js.map +0 -1
  688. package/dist/core/p-c0fc3d02.entry.js +0 -2
  689. package/dist/core/p-c0fc3d02.entry.js.map +0 -1
  690. package/dist/core/p-c396bd4d.entry.js +0 -2
  691. package/dist/core/p-c396bd4d.entry.js.map +0 -1
  692. package/dist/core/p-c9cf932c.entry.js.map +0 -1
  693. package/dist/core/p-cf7db84a.entry.js +0 -2
  694. package/dist/core/p-cf7db84a.entry.js.map +0 -1
  695. package/dist/core/p-dd36bf1b.entry.js.map +0 -1
  696. package/dist/core/p-e488de54.entry.js +0 -2
  697. package/dist/core/p-e488de54.entry.js.map +0 -1
  698. package/dist/core/p-e4d1839e.entry.js +0 -2
  699. package/dist/core/p-e4d1839e.entry.js.map +0 -1
  700. package/dist/core/p-eb3b4935.entry.js +0 -2
  701. package/dist/core/p-eb3b4935.entry.js.map +0 -1
  702. package/dist/core/p-ebafab37.entry.js +0 -2
  703. package/dist/core/p-ebafab37.entry.js.map +0 -1
  704. package/dist/core/p-f0fc1bf0.entry.js +0 -2
  705. package/dist/core/p-f0fc1bf0.entry.js.map +0 -1
  706. package/dist/core/p-f24984c5.entry.js +0 -2
  707. package/dist/core/p-f24984c5.entry.js.map +0 -1
  708. package/dist/core/p-f60dbd0e.entry.js +0 -2
  709. package/dist/core/p-f60dbd0e.entry.js.map +0 -1
  710. package/dist/core/p-f71c00ce.entry.js +0 -2
  711. package/dist/core/p-f71c00ce.entry.js.map +0 -1
  712. package/dist/core/p-ff4298b1.entry.js +0 -2
  713. package/dist/core/p-ff4298b1.entry.js.map +0 -1
  714. package/dist/esm/helpers-e8797e8d.js.map +0 -1
  715. /package/dist/core/{p-37dea10d.entry.js.map → p-0cef50b7.entry.js.map} +0 -0
  716. /package/dist/core/{p-f5b2b26d.entry.js.map → p-15fd6539.entry.js.map} +0 -0
  717. /package/dist/core/{p-690c5e80.entry.js.map → p-685d6aa9.entry.js.map} +0 -0
  718. /package/dist/core/{p-95f603dd.entry.js.map → p-ba37e169.entry.js.map} +0 -0
  719. /package/dist/core/{p-922984cb.entry.js.map → p-c5d3c71e.entry.js.map} +0 -0
  720. /package/dist/core/{p-7b35de65.entry.js.map → p-cdbc3414.entry.js.map} +0 -0
  721. /package/dist/core/{p-ee6dd94c.entry.js.map → p-ec097c1f.entry.js.map} +0 -0
  722. /package/dist/core/{p-acbd15ab.entry.js.map → p-f580f0ce.entry.js.map} +0 -0
@@ -88,7 +88,6 @@ export class Button {
88
88
  this.describedByContent = null;
89
89
  this.title = null;
90
90
  this.accept = "*";
91
- this.appearance = "default";
92
91
  this.ariaControlsId = undefined;
93
92
  this.ariaOwnsId = undefined;
94
93
  this.disabled = false;
@@ -108,12 +107,14 @@ export class Button {
108
107
  this.href = undefined;
109
108
  this.hreflang = undefined;
110
109
  this.loading = false;
110
+ this.monochrome = false;
111
111
  this.multiple = false;
112
112
  this.referrerpolicy = undefined;
113
113
  this.rel = undefined;
114
114
  this.selectedFiles = undefined;
115
115
  this.size = "medium";
116
116
  this.target = undefined;
117
+ this.theme = "inherit";
117
118
  this.tooltipPlacement = "bottom";
118
119
  this.transparentBackground = true;
119
120
  this.type = "button";
@@ -228,7 +229,8 @@ export class Button {
228
229
  updateTheme(newTheme = null) {
229
230
  const foregroundColor = getThemeFromContext(this.el, newTheme);
230
231
  if (foregroundColor !== IcThemeForegroundEnum.Default) {
231
- this.appearance = foregroundColor;
232
+ this.theme = foregroundColor;
233
+ this.monochrome = true;
232
234
  }
233
235
  }
234
236
  render() {
@@ -269,14 +271,10 @@ export class Button {
269
271
  describedby = this.describedById;
270
272
  }
271
273
  const ButtonContent = () => {
272
- const darkAppearance = this.variant.includes("primary") ||
273
- this.variant.includes("destructive") ||
274
- this.appearance === IcThemeForegroundEnum.Dark ||
275
- this.appearance === IcThemeForegroundEnum.Light;
276
274
  return (h(TagType, Object.assign({ class: "button", "aria-disabled": this.loading || this.disabled ? "true" : null, "aria-label": this.loading ? "Loading" : ariaLabel, "aria-expanded": this.dropdown && `${this.dropdownExpanded}` }, buttonAttrs, inheritedAttributes, { onFocus: this.onFocus, onBlur: this.onBlur, ref: (el) => (this.buttonEl = el), "aria-describedby": describedby, part: "button" }), this.hasIconSlot("left") && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "left-icon" }))), this.hasIconSlot("top") &&
277
275
  !this.hasIconSlot("left") &&
278
276
  !this.hasIconSlot("right") &&
279
- !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "top-icon" }))), this.loading ? (h("div", { class: "loading-container" }, h("ic-loading-indicator", { type: "linear", monochrome: darkAppearance, theme: darkAppearance ? "dark" : "light" }))) : (h("slot", null)), this.hasIconSlot("right") && !this.loading && !this.dropdown && (h("div", { class: { "icon-container": true, "right-icon": true } }, h("slot", { name: "right-icon" }))), this.dropdown &&
277
+ !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "top-icon" }))), this.loading ? (h("div", { class: "loading-container" }, h("ic-loading-indicator", { type: "linear", monochrome: this.monochrome, theme: this.theme }))) : (h("slot", null)), this.hasIconSlot("right") && !this.loading && !this.dropdown && (h("div", { class: { "icon-container": true, "right-icon": true } }, h("slot", { name: "right-icon" }))), this.dropdown &&
280
278
  !this.loading &&
281
279
  this.variant !== "icon" &&
282
280
  this.variant !== "destructive" && (h("span", { class: {
@@ -285,21 +283,21 @@ export class Button {
285
283
  }, innerHTML: arrowDropdown }))));
286
284
  };
287
285
  return (h(Host, { class: {
286
+ [`ic-theme-${this.theme}`]: this.theme !== "inherit",
287
+ [`monochrome`]: this.monochrome,
288
288
  ["ic-button-disabled"]: this.disabled && !this.loading,
289
289
  [`ic-button-variant-${this.variant}`]: true,
290
290
  [`ic-button-size-${this.size}`]: true,
291
291
  ["ic-button-loading"]: this.loading,
292
- ["ic-button-dark"]: this.appearance === IcThemeForegroundEnum.Dark,
293
- ["ic-button-light"]: this.appearance === IcThemeForegroundEnum.Light,
294
292
  ["ic-button-full-width"]: this.fullWidth,
295
293
  ["with-badge"]: isSlotUsed(this.el, "badge"),
296
294
  ["dropdown-no-icon"]: this.dropdown &&
297
295
  !isSlotUsed(this.el, "icon") &&
298
296
  !isSlotUsed(this.el, "left-icon"),
299
297
  ["top-icon"]: isSlotUsed(this.el, "top-icon"),
300
- ["white-background"]: this.variant === "secondary" &&
298
+ ["background"]: this.variant === "secondary" &&
301
299
  !this.transparentBackground &&
302
- this.appearance !== "light",
300
+ this.theme === "light",
303
301
  }, onClick: this.handleClick, onKeyDown: this.handleKeyDown, "aria-owns": this.ariaOwnsId, "aria-controls": this.ariaControlsId, "aria-expanded": this.dropdown && `${this.dropdownExpanded}` }, this.hasTooltip && (h("ic-tooltip", { id: describedby, label: title || ariaLabel, target: buttonId, placement: this.tooltipPlacement, silent: this.isIconVariant() && !!ariaLabel }, this.hasRouterSlot() ? (h("slot", { name: "router-item" })) : (h(ButtonContent, null)))), isSlotUsed(this.el, "badge") && h("slot", { name: "badge" }), !this.hasTooltip &&
304
302
  (this.hasRouterSlot() ? (h("slot", { name: "router-item" })) : (h(ButtonContent, null))), this.describedByContent && (h("span", { id: describedby, class: "ic-button-describedby" }, this.describedByContent))));
305
303
  }
@@ -336,30 +334,6 @@ export class Button {
336
334
  "reflect": false,
337
335
  "defaultValue": "\"*\""
338
336
  },
339
- "appearance": {
340
- "type": "string",
341
- "mutable": true,
342
- "complexType": {
343
- "original": "IcThemeForeground",
344
- "resolved": "\"dark\" | \"default\" | \"light\"",
345
- "references": {
346
- "IcThemeForeground": {
347
- "location": "import",
348
- "path": "../../utils/types",
349
- "id": "src/utils/types.ts::IcThemeForeground"
350
- }
351
- }
352
- },
353
- "required": false,
354
- "optional": true,
355
- "docs": {
356
- "tags": [],
357
- "text": "The appearance of the button, e.g. dark, light, or the default."
358
- },
359
- "attribute": "appearance",
360
- "reflect": false,
361
- "defaultValue": "\"default\""
362
- },
363
337
  "ariaControlsId": {
364
338
  "type": "any",
365
339
  "mutable": false,
@@ -698,6 +672,24 @@ export class Button {
698
672
  "reflect": false,
699
673
  "defaultValue": "false"
700
674
  },
675
+ "monochrome": {
676
+ "type": "boolean",
677
+ "mutable": true,
678
+ "complexType": {
679
+ "original": "boolean",
680
+ "resolved": "boolean",
681
+ "references": {}
682
+ },
683
+ "required": false,
684
+ "optional": true,
685
+ "docs": {
686
+ "tags": [],
687
+ "text": "If `true`, the button will display as monochromatic in either `light` or `dark` theme."
688
+ },
689
+ "attribute": "monochrome",
690
+ "reflect": false,
691
+ "defaultValue": "false"
692
+ },
701
693
  "multiple": {
702
694
  "type": "boolean",
703
695
  "mutable": false,
@@ -816,6 +808,30 @@ export class Button {
816
808
  "attribute": "target",
817
809
  "reflect": false
818
810
  },
811
+ "theme": {
812
+ "type": "string",
813
+ "mutable": true,
814
+ "complexType": {
815
+ "original": "IcThemeMode",
816
+ "resolved": "\"dark\" | \"inherit\" | \"light\"",
817
+ "references": {
818
+ "IcThemeMode": {
819
+ "location": "import",
820
+ "path": "../../utils/types",
821
+ "id": "src/utils/types.ts::IcThemeMode"
822
+ }
823
+ }
824
+ },
825
+ "required": false,
826
+ "optional": true,
827
+ "docs": {
828
+ "tags": [],
829
+ "text": "Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component."
830
+ },
831
+ "attribute": "theme",
832
+ "reflect": false,
833
+ "defaultValue": "\"inherit\""
834
+ },
819
835
  "tooltipPlacement": {
820
836
  "type": "string",
821
837
  "mutable": false,
@@ -1 +1 @@
1
- {"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,CAAC,EACD,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n forceUpdate,\n h,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n getThemeFromContext,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcSizes,\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n * @slot top-icon - Content will be placed above the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n * @slot router-item - Handle routing by nesting your routes in this slot. Setting loading to true will have no impact on this slot.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip: boolean = false;\n private id: string;\n private inheritedAttributes: { [k: string]: string } = {};\n private describedbyEl: HTMLElement = null;\n private describedById: string = null;\n private mutationObserver: MutationObserver = null;\n private hostMutationObserver: MutationObserver = null;\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel: string = null;\n @State() describedByContent: string = null;\n @State() title: string = null;\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept?: string = \"*\";\n\n /**\n * The appearance of the button, e.g. dark, light, or the default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaControlsId: string | boolean;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwnsId: string | boolean;\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * If `true`, the button will show a dropdown icon.\n */\n @Prop() dropdown?: boolean = false;\n\n /**\n * If `true`, the aria-expanded value will be set to true. This is only applied if the dropdown prop is also true.\n */\n @Prop({ mutable: true, reflect: true }) dropdownExpanded?: boolean = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload?: boolean = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName: string = `ic-button-file-upload-input-${buttonIds++}`;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement?: IcButtonTooltipPlacement = \"bottom\";\n\n /**\n * If `true`, the secondary variant of button will have a transparent background rather than white.\n */\n @Prop() transparentBackground?: boolean = true;\n\n /**\n * The type of the button.\n */\n @Prop() type?: IcButtonTypes = \"button\";\n\n /**\n * The variant of the button to be displayed.\n */\n @Prop() variant?: IcButtonVariants = \"primary\";\n\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * If `fileUpload` is set to `true`, this will be emitted when a file is selected in the native explorer.\n */\n @Event() icFileSelection!: EventEmitter<FileList>;\n\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.mutationObserver !== null && this.mutationObserver !== undefined) {\n this.mutationObserver.disconnect();\n }\n if (\n this.hostMutationObserver !== null &&\n this.hostMutationObserver !== undefined\n ) {\n this.hostMutationObserver.disconnect();\n }\n }\n\n componentWillUpdate(): void {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\n }\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = inheritAttributes(this.el, [...IC_INHERITED_ARIA, \"title\"]);\n\n this.title = title;\n this.ariaLabel = ariaLabel;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n this.id = this.el.id || null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\"aria-describedby\"];\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector<HTMLElement>(\n `#${describedById}`\n );\n if (el) {\n this.describedByContent = el.innerText;\n this.describedbyEl = el;\n }\n }\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (typeof MutationObserver !== \"undefined\") {\n if (this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedbyEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n }\n\n componentWillRender(): void {\n const iconEl = this.hasIconSlot(\"left\")\n ? this.el.querySelector(`[slot=\"left-icon\"]`)\n : this.hasIconSlot(\"right\")\n ? this.el.querySelector(`[slot=\"right-icon\"]`)\n : null;\n iconEl?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (!this.hasRouterSlot()) {\n if (this.fileUpload) {\n renderFileHiddenInput(\n this.icFileSelection,\n this.el,\n this.multiple,\n this.fileInputName,\n this.selectedFiles,\n this.disabled,\n this.accept\n );\n }\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n if (this.dropdown) {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler({ detail }: CustomEvent<IcTheme>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private async closeButtonTooltip(ev: KeyboardEvent): Promise<void> {\n const tooltip = this.el.shadowRoot.querySelector(\"ic-tooltip\");\n if (await tooltip.isTooltipVisible()) {\n tooltip.displayTooltip(false);\n ev.preventDefault();\n ev.stopImmediatePropagation();\n }\n }\n\n private hasIconSlot(position?: \"left\" | \"right\" | \"top\"): boolean {\n const selectorPrefix = position ? `${position}-` : \"\";\n return this.el.querySelector(`[slot=\"${selectorPrefix}icon\"]`) !== null;\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n !!this.el.closest(\"FORM\")\n ) {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n this.el.closest(\"FORM\").appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n };\n\n private handleKeyDown = (ev: KeyboardEvent): void => {\n if (ev.key === \"Escape\" && this.hasTooltip) {\n this.closeButtonTooltip(ev);\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n // triggered when text content of sibling element in light DOM changes\n private mutationCallback = (): void => {\n this.describedByContent = this.describedbyEl.innerText;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n const attribute = this.el.getAttribute(attributeName);\n if (attributeName === \"title\") this.title = attribute;\n else if (attributeName === \"aria-label\") this.ariaLabel = attribute;\n\n if (IC_INHERITED_ARIA.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = (): void => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || this.isIconVariant());\n };\n\n private isIconVariant = (): boolean => {\n return this.variant.startsWith(\"icon\");\n };\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const { title, ariaLabel, inheritedAttributes } = this;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n\n let describedby: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedby =\n this.variant === \"icon\" && !!ariaLabel\n ? null\n : `ic-tooltip-${buttonId}`;\n } else {\n describedby = this.describedById;\n }\n\n const ButtonContent = () => {\n const darkAppearance =\n this.variant.includes(\"primary\") ||\n this.variant.includes(\"destructive\") ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light;\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n aria-expanded={this.dropdown && `${this.dropdownExpanded}`}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedby}\n part=\"button\"\n >\n {this.hasIconSlot(\"left\") && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n {this.hasIconSlot(\"top\") &&\n !this.hasIconSlot(\"left\") &&\n !this.hasIconSlot(\"right\") &&\n !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"top-icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n monochrome={darkAppearance}\n theme={darkAppearance ? \"dark\" : \"light\"}\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n {this.hasIconSlot(\"right\") && !this.loading && !this.dropdown && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )}\n {this.dropdown &&\n !this.loading &&\n this.variant !== \"icon\" &&\n this.variant !== \"destructive\" && (\n <span\n class={{\n [\"arrow-dropdown\"]: !this.dropdownExpanded,\n [\"dropdown-expanded\"]: this.dropdownExpanded,\n }}\n innerHTML={arrowDropdown}\n />\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [\"ic-button-disabled\"]: this.disabled && !this.loading,\n [`ic-button-variant-${this.variant}`]: true,\n [`ic-button-size-${this.size}`]: true,\n [\"ic-button-loading\"]: this.loading,\n [\"ic-button-dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"ic-button-light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"ic-button-full-width\"]: this.fullWidth,\n [\"with-badge\"]: isSlotUsed(this.el, \"badge\"),\n [\"dropdown-no-icon\"]:\n this.dropdown &&\n !isSlotUsed(this.el, \"icon\") &&\n !isSlotUsed(this.el, \"left-icon\"),\n [\"top-icon\"]: isSlotUsed(this.el, \"top-icon\"),\n [\"white-background\"]:\n this.variant === \"secondary\" &&\n !this.transparentBackground &&\n this.appearance !== \"light\",\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n aria-owns={this.ariaOwnsId}\n aria-controls={this.ariaControlsId}\n aria-expanded={this.dropdown && `${this.dropdownExpanded}`}\n >\n {this.hasTooltip && (\n <ic-tooltip\n id={describedby}\n label={title || ariaLabel}\n target={buttonId}\n placement={this.tooltipPlacement}\n silent={this.isIconVariant() && !!ariaLabel}\n >\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <ButtonContent />\n )}\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!this.hasTooltip &&\n (this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <ButtonContent />\n ))}\n {this.describedByContent && (\n <span id={describedby} class=\"ic-button-describedby\">\n {this.describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,CAAC,EACD,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAM1D,OAAO,EAIL,qBAAqB,GAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAE5D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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n forceUpdate,\n h,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n getThemeFromContext,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcSizes,\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n IcThemeMode,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n * @slot top-icon - Content will be placed above the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n * @slot router-item - Handle routing by nesting your routes in this slot. Setting loading to true will have no impact on this slot.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip: boolean = false;\n private id: string;\n private inheritedAttributes: { [k: string]: string } = {};\n private describedbyEl: HTMLElement = null;\n private describedById: string = null;\n private mutationObserver: MutationObserver = null;\n private hostMutationObserver: MutationObserver = null;\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel: string = null;\n @State() describedByContent: string = null;\n @State() title: string = null;\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept?: string = \"*\";\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaControlsId: string | boolean;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwnsId: string | boolean;\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * If `true`, the button will show a dropdown icon.\n */\n @Prop() dropdown?: boolean = false;\n\n /**\n * If `true`, the aria-expanded value will be set to true. This is only applied if the dropdown prop is also true.\n */\n @Prop({ mutable: true, reflect: true }) dropdownExpanded?: boolean = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload?: boolean = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName: string = `ic-button-file-upload-input-${buttonIds++}`;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * If `true`, the button will display as monochromatic in either `light` or `dark` theme.\n */\n @Prop({ mutable: true }) monochrome?: boolean = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop({ mutable: true }) theme?: IcThemeMode = \"inherit\";\n\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement?: IcButtonTooltipPlacement = \"bottom\";\n\n /**\n * If `true`, the secondary variant of button will have a transparent background rather than white.\n */\n @Prop() transparentBackground?: boolean = true;\n\n /**\n * The type of the button.\n */\n @Prop() type?: IcButtonTypes = \"button\";\n\n /**\n * The variant of the button to be displayed.\n */\n @Prop() variant?: IcButtonVariants = \"primary\";\n\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * If `fileUpload` is set to `true`, this will be emitted when a file is selected in the native explorer.\n */\n @Event() icFileSelection!: EventEmitter<FileList>;\n\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.mutationObserver !== null && this.mutationObserver !== undefined) {\n this.mutationObserver.disconnect();\n }\n if (\n this.hostMutationObserver !== null &&\n this.hostMutationObserver !== undefined\n ) {\n this.hostMutationObserver.disconnect();\n }\n }\n\n componentWillUpdate(): void {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\n }\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = inheritAttributes(this.el, [...IC_INHERITED_ARIA, \"title\"]);\n\n this.title = title;\n this.ariaLabel = ariaLabel;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n this.id = this.el.id || null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\"aria-describedby\"];\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector<HTMLElement>(\n `#${describedById}`\n );\n if (el) {\n this.describedByContent = el.innerText;\n this.describedbyEl = el;\n }\n }\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (typeof MutationObserver !== \"undefined\") {\n if (this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedbyEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n }\n\n componentWillRender(): void {\n const iconEl = this.hasIconSlot(\"left\")\n ? this.el.querySelector(`[slot=\"left-icon\"]`)\n : this.hasIconSlot(\"right\")\n ? this.el.querySelector(`[slot=\"right-icon\"]`)\n : null;\n iconEl?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (!this.hasRouterSlot()) {\n if (this.fileUpload) {\n renderFileHiddenInput(\n this.icFileSelection,\n this.el,\n this.multiple,\n this.fileInputName,\n this.selectedFiles,\n this.disabled,\n this.accept\n );\n }\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n if (this.dropdown) {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler({ detail }: CustomEvent<IcTheme>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private async closeButtonTooltip(ev: KeyboardEvent): Promise<void> {\n const tooltip = this.el.shadowRoot.querySelector(\"ic-tooltip\");\n if (await tooltip.isTooltipVisible()) {\n tooltip.displayTooltip(false);\n ev.preventDefault();\n ev.stopImmediatePropagation();\n }\n }\n\n private hasIconSlot(position?: \"left\" | \"right\" | \"top\"): boolean {\n const selectorPrefix = position ? `${position}-` : \"\";\n return this.el.querySelector(`[slot=\"${selectorPrefix}icon\"]`) !== null;\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n !!this.el.closest(\"FORM\")\n ) {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n this.el.closest(\"FORM\").appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n };\n\n private handleKeyDown = (ev: KeyboardEvent): void => {\n if (ev.key === \"Escape\" && this.hasTooltip) {\n this.closeButtonTooltip(ev);\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme);\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.theme = foregroundColor;\n this.monochrome = true;\n }\n }\n\n // triggered when text content of sibling element in light DOM changes\n private mutationCallback = (): void => {\n this.describedByContent = this.describedbyEl.innerText;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n const attribute = this.el.getAttribute(attributeName);\n if (attributeName === \"title\") this.title = attribute;\n else if (attributeName === \"aria-label\") this.ariaLabel = attribute;\n\n if (IC_INHERITED_ARIA.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = (): void => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || this.isIconVariant());\n };\n\n private isIconVariant = (): boolean => {\n return this.variant.startsWith(\"icon\");\n };\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const { title, ariaLabel, inheritedAttributes } = this;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n\n let describedby: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedby =\n this.variant === \"icon\" && !!ariaLabel\n ? null\n : `ic-tooltip-${buttonId}`;\n } else {\n describedby = this.describedById;\n }\n\n const ButtonContent = () => {\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n aria-expanded={this.dropdown && `${this.dropdownExpanded}`}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedby}\n part=\"button\"\n >\n {this.hasIconSlot(\"left\") && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n {this.hasIconSlot(\"top\") &&\n !this.hasIconSlot(\"left\") &&\n !this.hasIconSlot(\"right\") &&\n !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"top-icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n monochrome={this.monochrome}\n theme={this.theme}\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n {this.hasIconSlot(\"right\") && !this.loading && !this.dropdown && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )}\n {this.dropdown &&\n !this.loading &&\n this.variant !== \"icon\" &&\n this.variant !== \"destructive\" && (\n <span\n class={{\n [\"arrow-dropdown\"]: !this.dropdownExpanded,\n [\"dropdown-expanded\"]: this.dropdownExpanded,\n }}\n innerHTML={arrowDropdown}\n />\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n [`monochrome`]: this.monochrome,\n [\"ic-button-disabled\"]: this.disabled && !this.loading,\n [`ic-button-variant-${this.variant}`]: true,\n [`ic-button-size-${this.size}`]: true,\n [\"ic-button-loading\"]: this.loading,\n [\"ic-button-full-width\"]: this.fullWidth,\n [\"with-badge\"]: isSlotUsed(this.el, \"badge\"),\n [\"dropdown-no-icon\"]:\n this.dropdown &&\n !isSlotUsed(this.el, \"icon\") &&\n !isSlotUsed(this.el, \"left-icon\"),\n [\"top-icon\"]: isSlotUsed(this.el, \"top-icon\"),\n [\"background\"]:\n this.variant === \"secondary\" &&\n !this.transparentBackground &&\n this.theme === \"light\",\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n aria-owns={this.ariaOwnsId}\n aria-controls={this.ariaControlsId}\n aria-expanded={this.dropdown && `${this.dropdownExpanded}`}\n >\n {this.hasTooltip && (\n <ic-tooltip\n id={describedby}\n label={title || ariaLabel}\n target={buttonId}\n placement={this.tooltipPlacement}\n silent={this.isIconVariant() && !!ariaLabel}\n >\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <ButtonContent />\n )}\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!this.hasTooltip &&\n (this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <ButtonContent />\n ))}\n {this.describedByContent && (\n <span id={describedby} class=\"ic-button-describedby\">\n {this.describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -118,11 +118,11 @@ describe("button component", () => {
118
118
  });
119
119
  expect(page.root).toMatchSnapshot();
120
120
  });
121
- it("should render correct HTML when loading - appearance light", async () => {
121
+ it("should render correct HTML when loading - theme light", async () => {
122
122
  const page = await newSpecPage({
123
123
  components: [Button],
124
124
  html: `
125
- <ic-button loading appearance="light">Button</ic-button>
125
+ <ic-button loading theme="light">Button</ic-button>
126
126
  `,
127
127
  });
128
128
  expect(page.root).toMatchSnapshot();
@@ -267,7 +267,7 @@ describe("button component", () => {
267
267
  detail: { mode: "light" },
268
268
  });
269
269
  await page.waitForChanges();
270
- expect(page.rootInstance.appearance).toEqual("light");
270
+ expect(page.rootInstance.theme).toEqual("light");
271
271
  });
272
272
  it("should test button as submit button on form", async () => {
273
273
  const page = await newSpecPage({
@@ -1 +1 @@
1
- {"version":3,"file":"ic-button.spec.js","sourceRoot":"","sources":["../../../../../src/components/ic-button/test/basic/ic-button.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,SAAS,CAAC,GAAG,EAAE;IACb,IAAI,CAAC,K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G,KAAK,CAAC;QACjC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;QACxC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,MAAM,CAAC;YACpB,IAAI,EAAE,8CAA8C;SACrD,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAE9C,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { Button } from \"../../ic-button\";\nimport { newSpecPage } from \"@stencil/core/testing\";\nimport * as helpers from \"../../../../utils/helpers\";\nimport { testKeyboardEvent as keyboardEvent } from \"../../../../testspec.setup\";\nimport { Tooltip } from \"../../../ic-tooltip/ic-tooltip\";\n\nbeforeAll(() => {\n jest.spyOn(console, \"warn\").mockImplementation(jest.fn());\n});\n\n//mocked as getThemeFromContext is always default when run in test context\nconst mockGetThemeFromContext = () => {\n const func = jest.fn(() => {\n return \"light\";\n });\n\n Object.defineProperty(helpers, \"getThemeFromContext\", {\n value: func,\n });\n};\n\ndescribe(\"button component\", () => {\n it(\"should correctly render with text\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button>Button</ic-button>\",\n supportsShadowDom: true,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should correctly render with custom text\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button>Click Me</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for secondary variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='secondary'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for tertiary variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='tertiary'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for destructive variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='destructive'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML with left icon\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button>\n <svg slot='left-icon' xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n <path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/>\n </svg>\n Button\n </ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML with right icon\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button>\n <svg slot='right-icon' xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n <path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/>\n </svg>\n Button\n </ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - secondary\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"secondary\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - tertiary\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"tertiary\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - destructive\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"destructive\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - appearance light\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading appearance=\"light\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"render with correct button type when defined\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button type='reset'>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it('should render with \"a\" tag when href is passed', async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button href = '#'>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it('should render with defined \"a\" tag props', async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button href = '#' download rel=\"nofollow\" target=\"_blank\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' id='test-button'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip based on title\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' id='test-button' title='Tooltip text'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip based on aria-label\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' id='test-button' aria-label='Tooltip text' tooltip-placement='top'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should disable tooltip when prop set\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button' disable-tooltip>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should update aria-label when attribute changed\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button'>Button</ic-button>\",\n });\n\n expect(page.root).toMatchSnapshot();\n\n page.root.setAttribute(\"aria-label\", \"New tooltip text\");\n await page.waitForChanges();\n\n page.rootInstance.hostMutationCallback([{ attributeName: \"aria-label\" }]);\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should update aria-expanded when attribute changed\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' aria-expanded='false' id='test-button'>Button</ic-button>\",\n });\n\n expect(page.root).toMatchSnapshot();\n\n page.root.setAttribute(\"aria-expanded\", \"true\");\n await page.waitForChanges();\n\n page.rootInstance.hostMutationCallback([\n { attributeName: \"aria-expanded\" },\n ]);\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should update tooltip label when title attribute changed\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' title='Tooltip text' id='test-button'>Button</ic-button>\",\n });\n\n expect(page.root).toMatchSnapshot();\n\n page.root.setAttribute(\"title\", \"New tooltip text\");\n await page.waitForChanges();\n\n page.rootInstance.hostMutationCallback([{ attributeName: \"title\" }]);\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should hide tooltip when escape key pressed\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' id='test-button' title='Tooltip text'>Button</ic-button>\",\n });\n\n const tooltip = page.root.shadowRoot.querySelector(\"ic-tooltip\");\n const tooltipContainer = tooltip.shadowRoot.querySelector(\n \".ic-tooltip-container\"\n );\n\n let tooltipVisible = tooltipContainer.getAttribute(\"data-show\");\n expect(tooltipVisible).toBeNull();\n\n await tooltip.displayTooltip(true);\n await page.waitForChanges();\n\n tooltipVisible = tooltipContainer.getAttribute(\"data-show\");\n expect(tooltipVisible).toBe(\"\");\n\n page.rootInstance.handleKeyDown(keyboardEvent(\"Escape\"));\n await page.waitForChanges();\n\n tooltipVisible = tooltipContainer.getAttribute(\"data-show\");\n expect(tooltipVisible).toBeNull();\n });\n\n it(\"should stop immediate propagation of a click event when disabled\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button id='test-button' disabled=true onclick='alert('test')'>Button</ic-button>\",\n });\n\n jest.spyOn(window, \"alert\").mockImplementation();\n\n const element = document.getElementById(\"test-button\");\n\n element.click();\n\n await page.waitForChanges();\n\n expect(window.alert).not.toHaveBeenCalled;\n });\n\n it(\"should call 'setFocus' when button is focussed\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button id='ic-button'>Button</ic-button>\",\n });\n\n //Can't expect anything in this test - this is to increase code coverage only\n await page.rootInstance.setFocus().toHaveBeenCalled;\n });\n\n it(\"should test theme change\", async () => {\n mockGetThemeFromContext();\n\n const page = await newSpecPage({\n components: [Button],\n html: `<ic-button id='ic-button'>Button</ic-button>`,\n });\n\n await page.rootInstance.themeChangeHandler({\n detail: { mode: \"light\" },\n });\n await page.waitForChanges();\n\n expect(page.rootInstance.appearance).toEqual(\"light\");\n });\n\n it(\"should test button as submit button on form\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<form id=\"new-form\"><form><ic-button id='ic-button' type=\"submit\" form=\"new-form\">Button</ic-button>`,\n });\n\n const btn = document.getElementById(\"ic-button\");\n btn.click();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test aria-describedby is set\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<span id=\"button-description\">\n This is the button description\n </span>\n <ic-button id='ic-button' aria-describedby=\"button-description\">Button</ic-button>\n `,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test aria-describedby is updated\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<span id=\"button-description\">\n This is the button description\n </span>\n <ic-button id='ic-button' aria-describedby=\"button-description\">Button</ic-button>\n `,\n });\n\n (document.querySelector(\"#button-description\") as HTMLElement).innerText =\n \"This is the new description\";\n page.rootInstance.mutationCallback();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test tooltip visibility changes when disable tooltip prop changes\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n\n page.root.disableTooltip = true;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n page.root.disableTooltip = false;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test blur handler\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<ic-button id='ic-button'>Button</ic-button>`,\n });\n\n const eventSpy = jest.fn();\n page.win.addEventListener(\"icBlur\", eventSpy);\n\n await page.rootInstance.onBlur();\n await page.waitForChanges();\n expect(eventSpy).toHaveBeenCalled();\n });\n});\n"]}
1
+ {"version":3,"file":"ic-button.spec.js","sourceRoot":"","sources":["../../../../../src/components/ic-button/test/basic/ic-button.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;A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CAAC;QAEpC,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QACjC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;QACxC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,MAAM,CAAC;YACpB,IAAI,EAAE,8CAA8C;SACrD,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAE9C,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { Button } from \"../../ic-button\";\nimport { newSpecPage } from \"@stencil/core/testing\";\nimport * as helpers from \"../../../../utils/helpers\";\nimport { testKeyboardEvent as keyboardEvent } from \"../../../../testspec.setup\";\nimport { Tooltip } from \"../../../ic-tooltip/ic-tooltip\";\n\nbeforeAll(() => {\n jest.spyOn(console, \"warn\").mockImplementation(jest.fn());\n});\n\n//mocked as getThemeFromContext is always default when run in test context\nconst mockGetThemeFromContext = () => {\n const func = jest.fn(() => {\n return \"light\";\n });\n\n Object.defineProperty(helpers, \"getThemeFromContext\", {\n value: func,\n });\n};\n\ndescribe(\"button component\", () => {\n it(\"should correctly render with text\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button>Button</ic-button>\",\n supportsShadowDom: true,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should correctly render with custom text\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button>Click Me</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for secondary variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='secondary'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for tertiary variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='tertiary'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML for destructive variant\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='destructive'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML with left icon\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button>\n <svg slot='left-icon' xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n <path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/>\n </svg>\n Button\n </ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML with right icon\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button>\n <svg slot='right-icon' xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n <path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/>\n </svg>\n Button\n </ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - secondary\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"secondary\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - tertiary\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"tertiary\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - destructive\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading variant=\"destructive\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render correct HTML when loading - theme light\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button loading theme=\"light\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"render with correct button type when defined\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button type='reset'>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it('should render with \"a\" tag when href is passed', async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button href = '#'>Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it('should render with defined \"a\" tag props', async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `\n <ic-button href = '#' download rel=\"nofollow\" target=\"_blank\">Button</ic-button>\n `,\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' id='test-button'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip based on title\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' id='test-button' title='Tooltip text'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip based on aria-label\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' id='test-button' aria-label='Tooltip text' tooltip-placement='top'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should disable tooltip when prop set\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button' disable-tooltip>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should update aria-label when attribute changed\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button'>Button</ic-button>\",\n });\n\n expect(page.root).toMatchSnapshot();\n\n page.root.setAttribute(\"aria-label\", \"New tooltip text\");\n await page.waitForChanges();\n\n page.rootInstance.hostMutationCallback([{ attributeName: \"aria-label\" }]);\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should update aria-expanded when attribute changed\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' aria-expanded='false' id='test-button'>Button</ic-button>\",\n });\n\n expect(page.root).toMatchSnapshot();\n\n page.root.setAttribute(\"aria-expanded\", \"true\");\n await page.waitForChanges();\n\n page.rootInstance.hostMutationCallback([\n { attributeName: \"aria-expanded\" },\n ]);\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should update tooltip label when title attribute changed\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' title='Tooltip text' id='test-button'>Button</ic-button>\",\n });\n\n expect(page.root).toMatchSnapshot();\n\n page.root.setAttribute(\"title\", \"New tooltip text\");\n await page.waitForChanges();\n\n page.rootInstance.hostMutationCallback([{ attributeName: \"title\" }]);\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should hide tooltip when escape key pressed\", async () => {\n const page = await newSpecPage({\n components: [Button, Tooltip],\n html: \"<ic-button variant='icon' id='test-button' title='Tooltip text'>Button</ic-button>\",\n });\n\n const tooltip = page.root.shadowRoot.querySelector(\"ic-tooltip\");\n const tooltipContainer = tooltip.shadowRoot.querySelector(\n \".ic-tooltip-container\"\n );\n\n let tooltipVisible = tooltipContainer.getAttribute(\"data-show\");\n expect(tooltipVisible).toBeNull();\n\n await tooltip.displayTooltip(true);\n await page.waitForChanges();\n\n tooltipVisible = tooltipContainer.getAttribute(\"data-show\");\n expect(tooltipVisible).toBe(\"\");\n\n page.rootInstance.handleKeyDown(keyboardEvent(\"Escape\"));\n await page.waitForChanges();\n\n tooltipVisible = tooltipContainer.getAttribute(\"data-show\");\n expect(tooltipVisible).toBeNull();\n });\n\n it(\"should stop immediate propagation of a click event when disabled\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button id='test-button' disabled=true onclick='alert('test')'>Button</ic-button>\",\n });\n\n jest.spyOn(window, \"alert\").mockImplementation();\n\n const element = document.getElementById(\"test-button\");\n\n element.click();\n\n await page.waitForChanges();\n\n expect(window.alert).not.toHaveBeenCalled;\n });\n\n it(\"should call 'setFocus' when button is focussed\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button id='ic-button'>Button</ic-button>\",\n });\n\n //Can't expect anything in this test - this is to increase code coverage only\n await page.rootInstance.setFocus().toHaveBeenCalled;\n });\n\n it(\"should test theme change\", async () => {\n mockGetThemeFromContext();\n\n const page = await newSpecPage({\n components: [Button],\n html: `<ic-button id='ic-button'>Button</ic-button>`,\n });\n\n await page.rootInstance.themeChangeHandler({\n detail: { mode: \"light\" },\n });\n await page.waitForChanges();\n\n expect(page.rootInstance.theme).toEqual(\"light\");\n });\n\n it(\"should test button as submit button on form\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<form id=\"new-form\"><form><ic-button id='ic-button' type=\"submit\" form=\"new-form\">Button</ic-button>`,\n });\n\n const btn = document.getElementById(\"ic-button\");\n btn.click();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test aria-describedby is set\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<span id=\"button-description\">\n This is the button description\n </span>\n <ic-button id='ic-button' aria-describedby=\"button-description\">Button</ic-button>\n `,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test aria-describedby is updated\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<span id=\"button-description\">\n This is the button description\n </span>\n <ic-button id='ic-button' aria-describedby=\"button-description\">Button</ic-button>\n `,\n });\n\n (document.querySelector(\"#button-description\") as HTMLElement).innerText =\n \"This is the new description\";\n page.rootInstance.mutationCallback();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test tooltip visibility changes when disable tooltip prop changes\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n\n page.root.disableTooltip = true;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n page.root.disableTooltip = false;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should test blur handler\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: `<ic-button id='ic-button'>Button</ic-button>`,\n });\n\n const eventSpy = jest.fn();\n page.win.addEventListener(\"icBlur\", eventSpy);\n\n await page.rootInstance.onBlur();\n await page.waitForChanges();\n expect(eventSpy).toHaveBeenCalled();\n });\n});\n"]}