@ukic/web-components 2.12.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-56e80cc9.js → helpers-d52cddc1.js} +45 -4
  3. package/dist/cjs/helpers-d52cddc1.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +6 -2
  5. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +2 -2
  8. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-badge.cjs.entry.js +4 -3
  11. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-button_3.cjs.entry.js +34 -10
  15. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-card.cjs.entry.js +7 -7
  17. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
  22. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
  24. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-dialog.cjs.entry.js +4 -2
  26. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +12 -10
  35. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-pagination.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-select.cjs.entry.js +21 -13
  55. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -5
  57. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +184 -0
  69. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
  70. package/dist/cjs/ic-toggle-button.cjs.entry.js +6 -3
  71. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  74. package/dist/cjs/index-f982899d.js +4 -0
  75. package/dist/cjs/loader.cjs.js +1 -1
  76. package/dist/cjs/types-dc22e301.js.map +1 -1
  77. package/dist/collection/collection-manifest.json +2 -1
  78. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +24 -2
  79. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
  80. package/dist/collection/components/ic-alert/ic-alert.js +1 -1
  81. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  82. package/dist/collection/components/ic-badge/ic-badge.js +3 -2
  83. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  84. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +7 -0
  85. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
  86. package/dist/collection/components/ic-button/ic-button.css +227 -35
  87. package/dist/collection/components/ic-button/ic-button.js +144 -8
  88. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  89. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +6 -5
  90. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -1
  91. package/dist/collection/components/ic-card/ic-card.css +44 -0
  92. package/dist/collection/components/ic-card/ic-card.js +8 -8
  93. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  94. package/dist/collection/components/ic-data-entity/ic-data-entity.js +3 -6
  95. package/dist/collection/components/ic-data-entity/ic-data-entity.js.map +1 -1
  96. package/dist/collection/components/ic-data-row/ic-data-row.js +20 -34
  97. package/dist/collection/components/ic-data-row/ic-data-row.js.map +1 -1
  98. package/dist/collection/components/ic-dialog/ic-dialog.css +1 -1
  99. package/dist/collection/components/ic-dialog/ic-dialog.js +20 -0
  100. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  101. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +8 -0
  102. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -1
  103. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +4 -0
  104. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +9 -8
  105. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  106. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +8 -8
  107. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  108. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.spec.js +7 -0
  109. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.spec.js.map +1 -1
  110. package/dist/collection/components/ic-menu/ic-menu.css +13 -7
  111. package/dist/collection/components/ic-menu/ic-menu.js +8 -7
  112. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  113. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +1 -1
  114. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  115. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  116. package/dist/collection/components/ic-search-bar/ic-search-bar.js +1 -1
  117. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  118. package/dist/collection/components/ic-select/ic-select.js +54 -17
  119. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  120. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +23 -1
  121. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  122. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +0 -4
  123. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  124. package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +62 -2
  125. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +4 -1
  126. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  127. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +516 -0
  128. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +431 -0
  129. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -0
  130. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.types.js +2 -0
  131. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.types.js.map +1 -0
  132. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +150 -0
  133. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -0
  134. package/dist/collection/components/ic-tooltip/ic-tooltip.js +1 -1
  135. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  136. package/dist/collection/utils/helpers.js +46 -3
  137. package/dist/collection/utils/helpers.js.map +1 -1
  138. package/dist/collection/utils/types.js.map +1 -1
  139. package/dist/components/helpers.js +44 -4
  140. package/dist/components/helpers.js.map +1 -1
  141. package/dist/components/ic-accordion-group.js +7 -2
  142. package/dist/components/ic-accordion-group.js.map +1 -1
  143. package/dist/components/ic-alert2.js +1 -1
  144. package/dist/components/ic-alert2.js.map +1 -1
  145. package/dist/components/ic-back-to-top.js +1 -1
  146. package/dist/components/ic-badge.js +4 -3
  147. package/dist/components/ic-badge.js.map +1 -1
  148. package/dist/components/ic-breadcrumb-group.js +1 -1
  149. package/dist/components/ic-breadcrumb2.js +1 -1
  150. package/dist/components/ic-button2.js +38 -9
  151. package/dist/components/ic-button2.js.map +1 -1
  152. package/dist/components/ic-card.js +8 -20
  153. package/dist/components/ic-card.js.map +1 -1
  154. package/dist/components/ic-checkbox-group.js +1 -1
  155. package/dist/components/ic-checkbox.js +1 -1
  156. package/dist/components/ic-chip.js +1 -1
  157. package/dist/components/ic-data-entity.js +3 -6
  158. package/dist/components/ic-data-entity.js.map +1 -1
  159. package/dist/components/ic-data-row.js +21 -35
  160. package/dist/components/ic-data-row.js.map +1 -1
  161. package/dist/components/ic-dialog.js +5 -2
  162. package/dist/components/ic-dialog.js.map +1 -1
  163. package/dist/components/ic-divider2.js +1 -1
  164. package/dist/components/ic-footer-link-group.js +1 -1
  165. package/dist/components/ic-footer-link.js +1 -1
  166. package/dist/components/ic-footer.js +1 -1
  167. package/dist/components/ic-hero.js +1 -1
  168. package/dist/components/ic-horizontal-scroll2.js +1 -1
  169. package/dist/components/ic-input-component-container2.js +7 -6
  170. package/dist/components/ic-input-component-container2.js.map +1 -1
  171. package/dist/components/ic-input-label2.js +1 -1
  172. package/dist/components/ic-input-validation2.js +1 -1
  173. package/dist/components/ic-loading-indicator2.js +1 -1
  174. package/dist/components/ic-menu-group.js +1 -1
  175. package/dist/components/ic-menu-item2.js +1 -1
  176. package/dist/components/ic-menu2.js +5 -4
  177. package/dist/components/ic-menu2.js.map +1 -1
  178. package/dist/components/ic-navigation-button.js +1 -1
  179. package/dist/components/ic-navigation-group.js +1 -1
  180. package/dist/components/ic-navigation-item.js +1 -1
  181. package/dist/components/ic-navigation-menu2.js +1 -1
  182. package/dist/components/ic-page-header.js +1 -1
  183. package/dist/components/ic-pagination-item2.js +1 -1
  184. package/dist/components/ic-pagination.js +1 -1
  185. package/dist/components/ic-popover-menu.js +2 -2
  186. package/dist/components/ic-popover-menu.js.map +1 -1
  187. package/dist/components/ic-radio-group.js +1 -1
  188. package/dist/components/ic-radio-group.js.map +1 -1
  189. package/dist/components/ic-radio-option.js +1 -1
  190. package/dist/components/ic-search-bar.js +1 -1
  191. package/dist/components/ic-search-bar.js.map +1 -1
  192. package/dist/components/ic-select.js +23 -14
  193. package/dist/components/ic-select.js.map +1 -1
  194. package/dist/components/ic-side-navigation.js +1 -5
  195. package/dist/components/ic-side-navigation.js.map +1 -1
  196. package/dist/components/ic-step.js +1 -1
  197. package/dist/components/ic-stepper.js +1 -1
  198. package/dist/components/ic-switch.js +1 -1
  199. package/dist/components/ic-tab-panel.js +1 -1
  200. package/dist/components/ic-tab.js +1 -1
  201. package/dist/components/ic-text-field2.js +1 -1
  202. package/dist/components/ic-theme.js +1 -1
  203. package/dist/components/ic-toast.js +1 -1
  204. package/dist/components/ic-toggle-button-group.d.ts +11 -0
  205. package/dist/components/ic-toggle-button-group.js +210 -0
  206. package/dist/components/ic-toggle-button-group.js.map +1 -0
  207. package/dist/components/ic-toggle-button.js +6 -3
  208. package/dist/components/ic-toggle-button.js.map +1 -1
  209. package/dist/components/ic-tooltip2.js +1 -1
  210. package/dist/components/ic-tooltip2.js.map +1 -1
  211. package/dist/components/ic-top-navigation.js +1 -1
  212. package/dist/components/types.js.map +1 -1
  213. package/dist/core/core.css +1 -1
  214. package/dist/core/core.esm.js +1 -1
  215. package/dist/core/core.esm.js.map +1 -1
  216. package/dist/core/{p-19c28c65.entry.js → p-0038a8fd.entry.js} +2 -2
  217. package/dist/core/{p-19c28c65.entry.js.map → p-0038a8fd.entry.js.map} +1 -1
  218. package/dist/core/{p-de87d585.entry.js → p-04506779.entry.js} +2 -2
  219. package/dist/core/p-0d0070b3.entry.js +2 -0
  220. package/dist/core/p-0d0070b3.entry.js.map +1 -0
  221. package/dist/core/{p-c786d62f.entry.js → p-0e2628eb.entry.js} +2 -2
  222. package/dist/core/p-0e2628eb.entry.js.map +1 -0
  223. package/dist/core/{p-59c4bc0a.entry.js → p-1183031f.entry.js} +2 -2
  224. package/dist/core/p-1183031f.entry.js.map +1 -0
  225. package/dist/core/{p-5e6ad4a5.entry.js → p-123b9306.entry.js} +2 -2
  226. package/dist/core/{p-4421203e.entry.js → p-166861e8.entry.js} +2 -2
  227. package/dist/core/p-166861e8.entry.js.map +1 -0
  228. package/dist/core/{p-8be3ec3d.entry.js → p-1ce0d16e.entry.js} +2 -2
  229. package/dist/core/{p-9184e385.entry.js → p-1d352487.entry.js} +2 -2
  230. package/dist/core/{p-c75d6022.entry.js → p-210412e4.entry.js} +2 -2
  231. package/dist/core/{p-42c0e318.entry.js → p-22a682e8.entry.js} +2 -2
  232. package/dist/core/{p-357eaebe.entry.js → p-2680b736.entry.js} +2 -2
  233. package/dist/core/p-2680b736.entry.js.map +1 -0
  234. package/dist/core/p-26b7b18f.js.map +1 -1
  235. package/dist/core/{p-525323ab.entry.js → p-296b7d74.entry.js} +2 -2
  236. package/dist/core/{p-26334b3a.entry.js → p-2f462ec5.entry.js} +2 -2
  237. package/dist/core/{p-8c2322a9.entry.js → p-35b8923f.entry.js} +2 -2
  238. package/dist/core/{p-003c44bd.entry.js → p-4641518f.entry.js} +2 -2
  239. package/dist/core/{p-8a66cab4.entry.js → p-46ecc4c5.entry.js} +2 -2
  240. package/dist/core/{p-32a480d5.entry.js → p-47a9dca9.entry.js} +2 -2
  241. package/dist/core/{p-32a480d5.entry.js.map → p-47a9dca9.entry.js.map} +1 -1
  242. package/dist/core/p-47d39ce7.entry.js +2 -0
  243. package/dist/core/p-47d39ce7.entry.js.map +1 -0
  244. package/dist/core/{p-38bf02aa.entry.js → p-4ce5abd7.entry.js} +2 -2
  245. package/dist/core/p-53f2fc84.js +2 -0
  246. package/dist/core/p-53f2fc84.js.map +1 -0
  247. package/dist/core/{p-b74f92b6.entry.js → p-5603eec3.entry.js} +2 -2
  248. package/dist/core/{p-d3e54a29.entry.js → p-5e729e99.entry.js} +2 -2
  249. package/dist/core/p-5e729e99.entry.js.map +1 -0
  250. package/dist/core/{p-bf93455b.entry.js → p-64705a03.entry.js} +2 -2
  251. package/dist/core/{p-783c2ced.entry.js → p-6a9ddb8a.entry.js} +2 -2
  252. package/dist/core/p-6fae929c.entry.js +2 -0
  253. package/dist/core/p-6fae929c.entry.js.map +1 -0
  254. package/dist/core/{p-b7a2e604.entry.js → p-7438ab1f.entry.js} +2 -2
  255. package/dist/core/p-7438ab1f.entry.js.map +1 -0
  256. package/dist/core/{p-2e7f22af.entry.js → p-7606c930.entry.js} +2 -2
  257. package/dist/core/p-76ee6107.entry.js +2 -0
  258. package/dist/core/p-76ee6107.entry.js.map +1 -0
  259. package/dist/core/{p-3f07c471.entry.js → p-7b0397ea.entry.js} +2 -2
  260. package/dist/core/{p-9808f7c9.entry.js → p-80c3424f.entry.js} +2 -2
  261. package/dist/core/{p-3c752bca.entry.js → p-8aa9aa25.entry.js} +2 -2
  262. package/dist/core/p-916f4265.entry.js +2 -0
  263. package/dist/core/p-916f4265.entry.js.map +1 -0
  264. package/dist/core/{p-8f97463f.entry.js → p-91768ddf.entry.js} +2 -2
  265. package/dist/core/{p-171e25c9.entry.js → p-95d6f3ed.entry.js} +2 -2
  266. package/dist/core/{p-0a0b748c.entry.js → p-9c18f048.entry.js} +2 -2
  267. package/dist/core/{p-c7a08024.entry.js → p-a4e7d123.entry.js} +2 -2
  268. package/dist/core/{p-049bf5e3.entry.js → p-a98f57cf.entry.js} +2 -2
  269. package/dist/core/{p-4f8b7aa3.entry.js → p-a9e1966f.entry.js} +2 -2
  270. package/dist/core/{p-bb1a0018.entry.js → p-aa878a3c.entry.js} +2 -2
  271. package/dist/core/{p-7c724f2c.entry.js → p-b781b691.entry.js} +2 -2
  272. package/dist/core/{p-6bbe0550.entry.js → p-b98ce745.entry.js} +2 -2
  273. package/dist/core/{p-e4d827d4.entry.js → p-bc7f99b8.entry.js} +2 -2
  274. package/dist/core/p-bc7f99b8.entry.js.map +1 -0
  275. package/dist/core/{p-23980b58.entry.js → p-c053230d.entry.js} +2 -2
  276. package/dist/core/p-c053230d.entry.js.map +1 -0
  277. package/dist/core/{p-0d2eb765.entry.js → p-c2789113.entry.js} +2 -2
  278. package/dist/core/{p-330e1439.entry.js → p-c7c2aa3c.entry.js} +2 -2
  279. package/dist/core/{p-0713230f.entry.js → p-d319ddce.entry.js} +2 -2
  280. package/dist/core/{p-1e809ecd.entry.js → p-d5f721ca.entry.js} +2 -2
  281. package/dist/core/{p-0ee13da0.entry.js → p-d9329191.entry.js} +2 -2
  282. package/dist/core/{p-bb41b637.entry.js → p-dbbea7fa.entry.js} +2 -2
  283. package/dist/core/p-dbbea7fa.entry.js.map +1 -0
  284. package/dist/core/{p-4f1792a6.entry.js → p-e4863c93.entry.js} +2 -2
  285. package/dist/core/{p-29b812c0.entry.js → p-e68e31ec.entry.js} +2 -2
  286. package/dist/core/{p-eb2d06c1.entry.js → p-fbcb77a3.entry.js} +2 -2
  287. package/dist/core/{p-9ee138e7.entry.js → p-fce3e1aa.entry.js} +2 -2
  288. package/dist/core/{p-8146336b.entry.js → p-fea1d095.entry.js} +2 -2
  289. package/dist/esm/core.js +1 -1
  290. package/dist/esm/{helpers-821dcdf2.js → helpers-f1ca9908.js} +45 -5
  291. package/dist/esm/helpers-f1ca9908.js.map +1 -0
  292. package/dist/esm/ic-accordion-group.entry.js +6 -2
  293. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  294. package/dist/esm/ic-accordion.entry.js +1 -1
  295. package/dist/esm/ic-alert.entry.js +2 -2
  296. package/dist/esm/ic-alert.entry.js.map +1 -1
  297. package/dist/esm/ic-back-to-top.entry.js +1 -1
  298. package/dist/esm/ic-badge.entry.js +4 -3
  299. package/dist/esm/ic-badge.entry.js.map +1 -1
  300. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  301. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  302. package/dist/esm/ic-button_3.entry.js +34 -10
  303. package/dist/esm/ic-button_3.entry.js.map +1 -1
  304. package/dist/esm/ic-card.entry.js +7 -7
  305. package/dist/esm/ic-card.entry.js.map +1 -1
  306. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  307. package/dist/esm/ic-checkbox.entry.js +1 -1
  308. package/dist/esm/ic-chip.entry.js +1 -1
  309. package/dist/esm/ic-data-entity.entry.js +3 -6
  310. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  311. package/dist/esm/ic-data-row.entry.js +21 -35
  312. package/dist/esm/ic-data-row.entry.js.map +1 -1
  313. package/dist/esm/ic-dialog.entry.js +4 -2
  314. package/dist/esm/ic-dialog.entry.js.map +1 -1
  315. package/dist/esm/ic-divider.entry.js +1 -1
  316. package/dist/esm/ic-empty-state.entry.js +1 -1
  317. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  318. package/dist/esm/ic-footer-link.entry.js +1 -1
  319. package/dist/esm/ic-footer.entry.js +1 -1
  320. package/dist/esm/ic-hero.entry.js +1 -1
  321. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  322. package/dist/esm/ic-input-component-container_3.entry.js +12 -10
  323. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  324. package/dist/esm/ic-input-label_2.entry.js +1 -1
  325. package/dist/esm/ic-link.entry.js +1 -1
  326. package/dist/esm/ic-menu-group.entry.js +1 -1
  327. package/dist/esm/ic-menu-item.entry.js +1 -1
  328. package/dist/esm/ic-navigation-button.entry.js +1 -1
  329. package/dist/esm/ic-navigation-group.entry.js +1 -1
  330. package/dist/esm/ic-navigation-item.entry.js +1 -1
  331. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  332. package/dist/esm/ic-page-header.entry.js +1 -1
  333. package/dist/esm/ic-pagination-item.entry.js +1 -1
  334. package/dist/esm/ic-pagination.entry.js +1 -1
  335. package/dist/esm/ic-popover-menu.entry.js +1 -1
  336. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  337. package/dist/esm/ic-radio-group.entry.js +1 -1
  338. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  339. package/dist/esm/ic-radio-option.entry.js +1 -1
  340. package/dist/esm/ic-search-bar.entry.js +1 -1
  341. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  342. package/dist/esm/ic-select.entry.js +21 -13
  343. package/dist/esm/ic-select.entry.js.map +1 -1
  344. package/dist/esm/ic-side-navigation.entry.js +1 -5
  345. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  346. package/dist/esm/ic-status-tag.entry.js +1 -1
  347. package/dist/esm/ic-step.entry.js +1 -1
  348. package/dist/esm/ic-stepper.entry.js +1 -1
  349. package/dist/esm/ic-switch.entry.js +1 -1
  350. package/dist/esm/ic-tab-group.entry.js +1 -1
  351. package/dist/esm/ic-tab-panel.entry.js +1 -1
  352. package/dist/esm/ic-tab.entry.js +1 -1
  353. package/dist/esm/ic-text-field.entry.js +1 -1
  354. package/dist/esm/ic-theme.entry.js +1 -1
  355. package/dist/esm/ic-toast.entry.js +1 -1
  356. package/dist/esm/ic-toggle-button-group.entry.js +180 -0
  357. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
  358. package/dist/esm/ic-toggle-button.entry.js +6 -3
  359. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  360. package/dist/esm/ic-top-navigation.entry.js +1 -1
  361. package/dist/esm/ic-typography.entry.js +1 -1
  362. package/dist/esm/index-d1d2c456.js +4 -0
  363. package/dist/esm/loader.js +1 -1
  364. package/dist/esm/types-6f6b41a5.js.map +1 -1
  365. package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +5 -0
  366. package/dist/types/components/ic-button/ic-button.d.ts +28 -0
  367. package/dist/types/components/ic-card/ic-card.d.ts +2 -2
  368. package/dist/types/components/ic-data-row/ic-data-row.d.ts +1 -6
  369. package/dist/types/components/ic-dialog/ic-dialog.d.ts +4 -0
  370. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +2 -2
  371. package/dist/types/components/ic-menu/ic-menu.d.ts +2 -2
  372. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -1
  373. package/dist/types/components/ic-select/ic-select.d.ts +12 -3
  374. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +1 -0
  375. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +68 -0
  376. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.types.d.ts +7 -0
  377. package/dist/types/components.d.ts +201 -16
  378. package/dist/types/utils/helpers.d.ts +17 -1
  379. package/dist/types/utils/types.d.ts +2 -0
  380. package/hydrate/index.js +359 -93
  381. package/package.json +5 -3
  382. package/vscode-data.json +142 -3
  383. package/dist/cjs/helpers-56e80cc9.js.map +0 -1
  384. package/dist/collection/components/ic-loading-indicator/test/a11y/ic-loading-indicator.test.a11y.js +0 -11
  385. package/dist/collection/components/ic-loading-indicator/test/a11y/ic-loading-indicator.test.a11y.js.map +0 -1
  386. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.e2e.js +0 -34
  387. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.e2e.js.map +0 -1
  388. package/dist/core/p-23980b58.entry.js.map +0 -1
  389. package/dist/core/p-357eaebe.entry.js.map +0 -1
  390. package/dist/core/p-3ebe5fa3.entry.js +0 -2
  391. package/dist/core/p-3ebe5fa3.entry.js.map +0 -1
  392. package/dist/core/p-4421203e.entry.js.map +0 -1
  393. package/dist/core/p-59c4bc0a.entry.js.map +0 -1
  394. package/dist/core/p-671b7cac.js +0 -2
  395. package/dist/core/p-671b7cac.js.map +0 -1
  396. package/dist/core/p-8931210a.entry.js +0 -2
  397. package/dist/core/p-8931210a.entry.js.map +0 -1
  398. package/dist/core/p-9e4c8a09.entry.js +0 -2
  399. package/dist/core/p-9e4c8a09.entry.js.map +0 -1
  400. package/dist/core/p-b7a2e604.entry.js.map +0 -1
  401. package/dist/core/p-bb41b637.entry.js.map +0 -1
  402. package/dist/core/p-c1109ec7.entry.js +0 -2
  403. package/dist/core/p-c1109ec7.entry.js.map +0 -1
  404. package/dist/core/p-c786d62f.entry.js.map +0 -1
  405. package/dist/core/p-d3e54a29.entry.js.map +0 -1
  406. package/dist/core/p-e4d827d4.entry.js.map +0 -1
  407. package/dist/esm/helpers-821dcdf2.js.map +0 -1
  408. package/dist/types/components/ic-loading-indicator/test/a11y/ic-loading-indicator.test.a11y.d.ts +0 -1
  409. /package/dist/core/{p-de87d585.entry.js.map → p-04506779.entry.js.map} +0 -0
  410. /package/dist/core/{p-5e6ad4a5.entry.js.map → p-123b9306.entry.js.map} +0 -0
  411. /package/dist/core/{p-8be3ec3d.entry.js.map → p-1ce0d16e.entry.js.map} +0 -0
  412. /package/dist/core/{p-9184e385.entry.js.map → p-1d352487.entry.js.map} +0 -0
  413. /package/dist/core/{p-c75d6022.entry.js.map → p-210412e4.entry.js.map} +0 -0
  414. /package/dist/core/{p-42c0e318.entry.js.map → p-22a682e8.entry.js.map} +0 -0
  415. /package/dist/core/{p-525323ab.entry.js.map → p-296b7d74.entry.js.map} +0 -0
  416. /package/dist/core/{p-26334b3a.entry.js.map → p-2f462ec5.entry.js.map} +0 -0
  417. /package/dist/core/{p-8c2322a9.entry.js.map → p-35b8923f.entry.js.map} +0 -0
  418. /package/dist/core/{p-003c44bd.entry.js.map → p-4641518f.entry.js.map} +0 -0
  419. /package/dist/core/{p-8a66cab4.entry.js.map → p-46ecc4c5.entry.js.map} +0 -0
  420. /package/dist/core/{p-38bf02aa.entry.js.map → p-4ce5abd7.entry.js.map} +0 -0
  421. /package/dist/core/{p-b74f92b6.entry.js.map → p-5603eec3.entry.js.map} +0 -0
  422. /package/dist/core/{p-bf93455b.entry.js.map → p-64705a03.entry.js.map} +0 -0
  423. /package/dist/core/{p-783c2ced.entry.js.map → p-6a9ddb8a.entry.js.map} +0 -0
  424. /package/dist/core/{p-2e7f22af.entry.js.map → p-7606c930.entry.js.map} +0 -0
  425. /package/dist/core/{p-3f07c471.entry.js.map → p-7b0397ea.entry.js.map} +0 -0
  426. /package/dist/core/{p-9808f7c9.entry.js.map → p-80c3424f.entry.js.map} +0 -0
  427. /package/dist/core/{p-3c752bca.entry.js.map → p-8aa9aa25.entry.js.map} +0 -0
  428. /package/dist/core/{p-8f97463f.entry.js.map → p-91768ddf.entry.js.map} +0 -0
  429. /package/dist/core/{p-171e25c9.entry.js.map → p-95d6f3ed.entry.js.map} +0 -0
  430. /package/dist/core/{p-0a0b748c.entry.js.map → p-9c18f048.entry.js.map} +0 -0
  431. /package/dist/core/{p-c7a08024.entry.js.map → p-a4e7d123.entry.js.map} +0 -0
  432. /package/dist/core/{p-049bf5e3.entry.js.map → p-a98f57cf.entry.js.map} +0 -0
  433. /package/dist/core/{p-4f8b7aa3.entry.js.map → p-a9e1966f.entry.js.map} +0 -0
  434. /package/dist/core/{p-bb1a0018.entry.js.map → p-aa878a3c.entry.js.map} +0 -0
  435. /package/dist/core/{p-7c724f2c.entry.js.map → p-b781b691.entry.js.map} +0 -0
  436. /package/dist/core/{p-6bbe0550.entry.js.map → p-b98ce745.entry.js.map} +0 -0
  437. /package/dist/core/{p-0d2eb765.entry.js.map → p-c2789113.entry.js.map} +0 -0
  438. /package/dist/core/{p-330e1439.entry.js.map → p-c7c2aa3c.entry.js.map} +0 -0
  439. /package/dist/core/{p-0713230f.entry.js.map → p-d319ddce.entry.js.map} +0 -0
  440. /package/dist/core/{p-1e809ecd.entry.js.map → p-d5f721ca.entry.js.map} +0 -0
  441. /package/dist/core/{p-0ee13da0.entry.js.map → p-d9329191.entry.js.map} +0 -0
  442. /package/dist/core/{p-4f1792a6.entry.js.map → p-e4863c93.entry.js.map} +0 -0
  443. /package/dist/core/{p-29b812c0.entry.js.map → p-e68e31ec.entry.js.map} +0 -0
  444. /package/dist/core/{p-eb2d06c1.entry.js.map → p-fbcb77a3.entry.js.map} +0 -0
  445. /package/dist/core/{p-9ee138e7.entry.js.map → p-fce3e1aa.entry.js.map} +0 -0
  446. /package/dist/core/{p-8146336b.entry.js.map → p-fea1d095.entry.js.map} +0 -0
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  return t;
12
12
  };
13
13
  import { Host, forceUpdate, h, } from "@stencil/core";
14
- import { getThemeFromContext, inheritAttributes, isSlotUsed, removeDisabledFalse, } from "../../utils/helpers";
14
+ import { getThemeFromContext, inheritAttributes, isSlotUsed, removeDisabledFalse, renderFileHiddenInput, } from "../../utils/helpers";
15
15
  import { IC_INHERITED_ARIA } from "../../utils/constants";
16
16
  import { IcThemeForegroundEnum, } from "../../utils/types";
17
17
  import arrowDropdown from "../../assets/arrow-dropdown.svg";
@@ -22,6 +22,7 @@ let buttonIds = 0;
22
22
  * @slot right-icon - Content will be placed to the right of the button label.
23
23
  * @slot top-icon - Content will be placed above the button label.
24
24
  * @slot badge - Badge component overlaying the top right of the button.
25
+ * @slot router-item - Handle routing by nesting your routes in this slot. Setting loading to true will have no impact on this slot.
25
26
  */
26
27
  export class Button {
27
28
  constructor() {
@@ -47,6 +48,7 @@ export class Button {
47
48
  };
48
49
  this.handleClick = () => {
49
50
  if ((this.el.type === "submit" || this.el.type === "reset") &&
51
+ !this.hasRouterSlot() &&
50
52
  !!this.el.closest("FORM")) {
51
53
  this.handleHiddenFormButtonClick(this.el.closest("FORM"));
52
54
  }
@@ -88,6 +90,10 @@ export class Button {
88
90
  this.hasTooltip =
89
91
  !this.disableTooltip && (!!this.title || this.variant === "icon");
90
92
  };
93
+ // file explorer is only opened if the property fileUpload is set to 'true'
94
+ this.openFileExplorer = () => {
95
+ renderFileHiddenInput(this.icFileSelection, this.el, this.multiple, this.fileInputName, this.selectedFiles, this.disabled, this.accept);
96
+ };
91
97
  this.isTooltipSilent = () => {
92
98
  if (this.variant === "icon") {
93
99
  if (this.title)
@@ -104,6 +110,7 @@ export class Button {
104
110
  this.ariaLabel = null;
105
111
  this.describedByContent = null;
106
112
  this.title = null;
113
+ this.accept = "*";
107
114
  this.appearance = "default";
108
115
  this.ariaControlsId = undefined;
109
116
  this.ariaOwnsId = undefined;
@@ -112,6 +119,8 @@ export class Button {
112
119
  this.download = false;
113
120
  this.dropdown = false;
114
121
  this.dropdownExpanded = false;
122
+ this.fileUpload = false;
123
+ this.fileInputName = `ic-button-file-upload-input-${buttonIds++}`;
115
124
  this.form = undefined;
116
125
  this.formaction = undefined;
117
126
  this.formenctype = undefined;
@@ -122,8 +131,10 @@ export class Button {
122
131
  this.href = undefined;
123
132
  this.hreflang = undefined;
124
133
  this.loading = false;
134
+ this.multiple = false;
125
135
  this.referrerpolicy = undefined;
126
136
  this.rel = undefined;
137
+ this.selectedFiles = undefined;
127
138
  this.size = "default";
128
139
  this.target = undefined;
129
140
  this.tooltipPlacement = "bottom";
@@ -192,11 +203,16 @@ export class Button {
192
203
  (_a = this.setViewBox()) === null || _a === void 0 ? void 0 : _a.setAttribute("viewBox", "0 0 24 24");
193
204
  }
194
205
  handleHostClick(event) {
195
- if (this.disabled || this.loading) {
196
- event.stopImmediatePropagation();
197
- }
198
- if (this.dropdown) {
199
- this.dropdownExpanded = !this.dropdownExpanded;
206
+ if (!this.hasRouterSlot()) {
207
+ if (this.fileUpload) {
208
+ this.openFileExplorer();
209
+ }
210
+ if (this.disabled || this.loading) {
211
+ event.stopImmediatePropagation();
212
+ }
213
+ if (this.dropdown) {
214
+ this.dropdownExpanded = !this.dropdownExpanded;
215
+ }
200
216
  }
201
217
  }
202
218
  themeChangeHandler(ev) {
@@ -227,6 +243,13 @@ export class Button {
227
243
  const iconEl = this.el.querySelector(`[slot="right-icon"]`);
228
244
  return iconEl !== null;
229
245
  }
246
+ hasRouterSlot() {
247
+ this.routerSlot = this.el.querySelector('[slot="router-item"]');
248
+ if (this.routerSlot) {
249
+ this.routerSlot.ariaLabel = this.routerSlot.textContent;
250
+ }
251
+ return !!this.routerSlot;
252
+ }
230
253
  handleHiddenFormButtonClick(form) {
231
254
  const hiddenFormButton = document.createElement("button");
232
255
  hiddenFormButton.setAttribute("type", this.el.type);
@@ -279,7 +302,7 @@ export class Button {
279
302
  describedBy = this.describedById;
280
303
  }
281
304
  const ButtonContent = () => {
282
- return (h(TagType, Object.assign({ class: "button", "aria-disabled": this.loading || this.disabled ? "true" : null, "aria-label": this.loading ? "Loading" : ariaLabel }, buttonAttrs, inheritedAttributes, { onFocus: this.onFocus, onBlur: this.onBlur, ref: (el) => (this.buttonEl = el), "aria-describedby": describedBy, part: "button" }), this.hasIconSlot() && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "icon" }))), this.hasLeftIconSlot() && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "left-icon" }))), this.hasTopIconSlot() &&
305
+ 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() && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "icon" }))), this.hasLeftIconSlot() && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "left-icon" }))), this.hasTopIconSlot() &&
283
306
  !this.hasLeftIconSlot() &&
284
307
  !this.hasRightIconSlot() &&
285
308
  !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", appearance: this.variant === "primary" ||
@@ -311,7 +334,8 @@ export class Button {
311
334
  ["white-background"]: this.variant === "secondary" &&
312
335
  !this.transparentBackground &&
313
336
  this.appearance !== "light",
314
- }, onClick: this.handleClick, "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.isTooltipSilent() }, h(ButtonContent, null))), isSlotUsed(this.el, "badge") && h("slot", { name: "badge" }), !this.hasTooltip && h(ButtonContent, null), this.describedByContent && (h("span", { id: describedBy, class: "ic-button-describedby" }, this.describedByContent))));
337
+ }, onClick: this.handleClick, "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.isTooltipSilent() }, this.hasRouterSlot() ? (h("slot", { name: "router-item" })) : (h(ButtonContent, null)))), isSlotUsed(this.el, "badge") && h("slot", { name: "badge" }), !this.hasTooltip &&
338
+ (this.hasRouterSlot() ? (h("slot", { name: "router-item" })) : (h(ButtonContent, null))), this.describedByContent && (h("span", { id: describedBy, class: "ic-button-describedby" }, this.describedByContent))));
315
339
  }
316
340
  static get is() { return "ic-button"; }
317
341
  static get encapsulation() { return "shadow"; }
@@ -328,6 +352,24 @@ export class Button {
328
352
  }
329
353
  static get properties() {
330
354
  return {
355
+ "accept": {
356
+ "type": "string",
357
+ "mutable": false,
358
+ "complexType": {
359
+ "original": "string",
360
+ "resolved": "string",
361
+ "references": {}
362
+ },
363
+ "required": false,
364
+ "optional": true,
365
+ "docs": {
366
+ "tags": [],
367
+ "text": "If `fileUpload` is set to `true`, this is the accepted list of file types."
368
+ },
369
+ "attribute": "accept",
370
+ "reflect": false,
371
+ "defaultValue": "\"*\""
372
+ },
331
373
  "appearance": {
332
374
  "type": "string",
333
375
  "mutable": true,
@@ -482,6 +524,42 @@ export class Button {
482
524
  "reflect": true,
483
525
  "defaultValue": "false"
484
526
  },
527
+ "fileUpload": {
528
+ "type": "boolean",
529
+ "mutable": false,
530
+ "complexType": {
531
+ "original": "boolean",
532
+ "resolved": "boolean",
533
+ "references": {}
534
+ },
535
+ "required": false,
536
+ "optional": true,
537
+ "docs": {
538
+ "tags": [],
539
+ "text": "If `true`, when the button is clicked the native file explorer will be launched."
540
+ },
541
+ "attribute": "file-upload",
542
+ "reflect": false,
543
+ "defaultValue": "false"
544
+ },
545
+ "fileInputName": {
546
+ "type": "string",
547
+ "mutable": false,
548
+ "complexType": {
549
+ "original": "string",
550
+ "resolved": "string",
551
+ "references": {}
552
+ },
553
+ "required": false,
554
+ "optional": false,
555
+ "docs": {
556
+ "tags": [],
557
+ "text": "The name of the control for the file input, which is submitted with the form data."
558
+ },
559
+ "attribute": "file-input-name",
560
+ "reflect": false,
561
+ "defaultValue": "`ic-button-file-upload-input-${buttonIds++}`"
562
+ },
485
563
  "form": {
486
564
  "type": "string",
487
565
  "mutable": false,
@@ -654,6 +732,24 @@ export class Button {
654
732
  "reflect": false,
655
733
  "defaultValue": "false"
656
734
  },
735
+ "multiple": {
736
+ "type": "boolean",
737
+ "mutable": false,
738
+ "complexType": {
739
+ "original": "boolean",
740
+ "resolved": "boolean",
741
+ "references": {}
742
+ },
743
+ "required": false,
744
+ "optional": true,
745
+ "docs": {
746
+ "tags": [],
747
+ "text": "If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted."
748
+ },
749
+ "attribute": "multiple",
750
+ "reflect": false,
751
+ "defaultValue": "false"
752
+ },
657
753
  "referrerpolicy": {
658
754
  "type": "string",
659
755
  "mutable": false,
@@ -693,6 +789,26 @@ export class Button {
693
789
  "attribute": "rel",
694
790
  "reflect": false
695
791
  },
792
+ "selectedFiles": {
793
+ "type": "unknown",
794
+ "mutable": false,
795
+ "complexType": {
796
+ "original": "FileList",
797
+ "resolved": "FileList",
798
+ "references": {
799
+ "FileList": {
800
+ "location": "global",
801
+ "id": "global::FileList"
802
+ }
803
+ }
804
+ },
805
+ "required": false,
806
+ "optional": false,
807
+ "docs": {
808
+ "tags": [],
809
+ "text": "The list of the files that have been selected by a user."
810
+ }
811
+ },
696
812
  "size": {
697
813
  "type": "string",
698
814
  "mutable": false,
@@ -849,6 +965,26 @@ export class Button {
849
965
  "resolved": "void",
850
966
  "references": {}
851
967
  }
968
+ }, {
969
+ "method": "icFileSelection",
970
+ "name": "icFileSelection",
971
+ "bubbles": true,
972
+ "cancelable": true,
973
+ "composed": true,
974
+ "docs": {
975
+ "tags": [],
976
+ "text": "If `fileUpload` is set to `true`, this will be emitted when a file is selected in the native explorer."
977
+ },
978
+ "complexType": {
979
+ "original": "FileList",
980
+ "resolved": "FileList",
981
+ "references": {
982
+ "FileList": {
983
+ "location": "global",
984
+ "id": "global::FileList"
985
+ }
986
+ }
987
+ }
852
988
  }, {
853
989
  "method": "icFocus",
854
990
  "name": "icFocus",
@@ -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,GACF,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAM1D,OAAO,EAIL,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAE5D,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB;;;;;;GAMG;AAQH,MAAM,OAAO,MAAM;;QAET,gBAAW,GAAG,SAAS,EAAE,CAAC;QAC1B,eAAU,GAAY,KAAK,CAAC;QAE5B,wBAAmB,GAA6B,EAAE,CAAC;QACnD,kBAAa,GAAgB,IAAI,CAAC;QAClC,kBAAa,GAAW,IAAI,CAAC;QAC7B,qBAAgB,GAAqB,IAAI,CAAC;QAC1C,yBAAoB,GAAqB,IAAI,CAAC;QAsR9C,eAAU,GAAG,GAAG,EAAE;YACxB,IAAI,MAAM,CAAC;YACX,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;gBAC3B,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,aAA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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} from \"@stencil/core\";\n\nimport {\n getThemeFromContext,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\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 icon - Deprecated. This slot should not be used anymore. Use left-icon or right-icon slot instead.\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 */\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]: unknown } = {};\n private describedByEl: HTMLElement = null;\n private describedById: string = null;\n private mutationObserver: MutationObserver = null;\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel: string = null;\n @State() describedByContent: string = null;\n @State() title: string = null;\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\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 * 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 * 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 size of the button to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\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 * 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 this.loadingWidth();\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const allInheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n ]);\n\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = allInheritedAttributes;\n\n this.title = title as string;\n this.ariaLabel = ariaLabel as string;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n const id = this.el.id;\n this.id = id !== undefined ? id : null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\n \"aria-describedby\"\n ] as string;\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector(\n `#${describedById}`\n ) as HTMLElement;\n if (el !== undefined && el !== null) {\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 this.setViewBox()?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n if (this.dropdown) {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n\n private hasIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n return iconEl !== null;\n }\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"left-icon\"]`);\n return iconEl !== null;\n }\n\n private hasTopIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"top-icon\"]`);\n return iconEl !== null;\n }\n\n private hasRightIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"right-icon\"]`);\n return iconEl !== null;\n }\n\n private setViewBox = () => {\n let iconEl;\n if (this.hasLeftIconSlot()) {\n iconEl = this.el.querySelector(`[slot=\"left-icon\"]`);\n } else if (this.hasRightIconSlot()) {\n iconEl = this.el.querySelector(`[slot=\"right-icon\"]`);\n } else {\n iconEl = null;\n }\n return iconEl;\n };\n\n private handleHiddenFormButtonClick(form: HTMLFormElement): void {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !!this.el.closest(\"FORM\")\n ) {\n this.handleHiddenFormButtonClick(this.el.closest(\"FORM\"));\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private loadingWidth = () => {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\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.variant === \"icon\");\n };\n\n private isTooltipSilent = (): boolean => {\n if (this.variant === \"icon\") {\n if (this.title) return true;\n else if (this.ariaLabel) return true;\n else return false;\n } else {\n return false;\n }\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 {...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() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.hasLeftIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n {this.hasTopIconSlot() &&\n !this.hasLeftIconSlot() &&\n !this.hasRightIconSlot() &&\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 appearance={\n this.variant === \"primary\" ||\n this.variant === \"destructive\" ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light\n ? \"light\"\n : \"dark\"\n }\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n {this.hasRightIconSlot() && !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 [\"disabled\"]: this.disabled && !this.loading,\n [`button-variant-${this.variant}`]: true,\n [`button-size-${this.size}`]: true,\n [\"loading\"]: this.loading,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"full-width\"]: this.fullWidth,\n [\"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 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.isTooltipSilent()}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!this.hasTooltip && <ButtonContent />}\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,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,CAAC,CACF,EAAC,aAAa,OAAG,CAClB,CAAC;YACH,IAAI,CAAC,kBAAkB,IAAI,CAC1B,YAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAC,uBAAuB,IACjD,IAAI,CAAC,kBAAkB,CACnB,CACR,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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} 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 icon - Deprecated. This slot should not be used anymore. Use left-icon or right-icon slot instead.\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]: unknown } = {};\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\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 = \"default\";\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 this.loadingWidth();\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const allInheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n ]);\n\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = allInheritedAttributes;\n\n this.title = title as string;\n this.ariaLabel = ariaLabel as string;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n const id = this.el.id;\n this.id = id !== undefined ? id : null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\n \"aria-describedby\"\n ] as string;\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector(\n `#${describedById}`\n ) as HTMLElement;\n if (el !== undefined && el !== null) {\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 this.setViewBox()?.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 this.openFileExplorer();\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(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n\n private hasIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n return iconEl !== null;\n }\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"left-icon\"]`);\n return iconEl !== null;\n }\n\n private hasTopIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"top-icon\"]`);\n return iconEl !== null;\n }\n\n private hasRightIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"right-icon\"]`);\n return iconEl !== 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 setViewBox = () => {\n let iconEl;\n if (this.hasLeftIconSlot()) {\n iconEl = this.el.querySelector(`[slot=\"left-icon\"]`);\n } else if (this.hasRightIconSlot()) {\n iconEl = this.el.querySelector(`[slot=\"right-icon\"]`);\n } else {\n iconEl = null;\n }\n return iconEl;\n };\n\n private handleHiddenFormButtonClick(form: HTMLFormElement): void {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n !!this.el.closest(\"FORM\")\n ) {\n this.handleHiddenFormButtonClick(this.el.closest(\"FORM\"));\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private loadingWidth = () => {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\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.variant === \"icon\");\n };\n\n // file explorer is only opened if the property fileUpload is set to 'true'\n private openFileExplorer = () => {\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\n private isTooltipSilent = (): boolean => {\n if (this.variant === \"icon\") {\n if (this.title) return true;\n else if (this.ariaLabel) return true;\n else return false;\n } else {\n return false;\n }\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() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.hasLeftIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n {this.hasTopIconSlot() &&\n !this.hasLeftIconSlot() &&\n !this.hasRightIconSlot() &&\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 appearance={\n this.variant === \"primary\" ||\n this.variant === \"destructive\" ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light\n ? \"light\"\n : \"dark\"\n }\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n {this.hasRightIconSlot() && !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 [\"disabled\"]: this.disabled && !this.loading,\n [`button-variant-${this.variant}`]: true,\n [`button-size-${this.size}`]: true,\n [\"loading\"]: this.loading,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"full-width\"]: this.fullWidth,\n [\"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 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.isTooltipSilent()}\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,6 +1,7 @@
1
1
  import { Button } from "../../ic-button";
2
2
  import { newSpecPage } from "@stencil/core/testing";
3
3
  import * as helpers from "../../../../utils/helpers";
4
+ import { Tooltip } from "../../../ic-tooltip/ic-tooltip";
4
5
  beforeAll(() => {
5
6
  jest.spyOn(console, "warn").mockImplementation(jest.fn());
6
7
  });
@@ -154,35 +155,35 @@ describe("button component", () => {
154
155
  });
155
156
  it("should render icon variant with a tooltip", async () => {
156
157
  const page = await newSpecPage({
157
- components: [Button],
158
+ components: [Button, Tooltip],
158
159
  html: "<ic-button variant='icon' id='test-button'>Button</ic-button>",
159
160
  });
160
161
  expect(page.root).toMatchSnapshot();
161
162
  });
162
163
  it("should render icon variant with a tooltip based on title", async () => {
163
164
  const page = await newSpecPage({
164
- components: [Button],
165
+ components: [Button, Tooltip],
165
166
  html: "<ic-button variant='icon' id='test-button' title='Tooltip text'>Button</ic-button>",
166
167
  });
167
168
  expect(page.root).toMatchSnapshot();
168
169
  });
169
170
  it("should render icon variant with a tooltip based on aria-label", async () => {
170
171
  const page = await newSpecPage({
171
- components: [Button],
172
+ components: [Button, Tooltip],
172
173
  html: "<ic-button variant='icon' id='test-button' aria-label='Tooltip text' tooltip-placement='top'>Button</ic-button>",
173
174
  });
174
175
  expect(page.root).toMatchSnapshot();
175
176
  });
176
177
  it("should disable tooltip when prop set", async () => {
177
178
  const page = await newSpecPage({
178
- components: [Button],
179
+ components: [Button, Tooltip],
179
180
  html: "<ic-button variant='icon' aria-label='Tooltip text' id='test-button' disable-tooltip>Button</ic-button>",
180
181
  });
181
182
  expect(page.root).toMatchSnapshot();
182
183
  });
183
184
  it("should update aria-label when attribute changed", async () => {
184
185
  const page = await newSpecPage({
185
- components: [Button],
186
+ components: [Button, Tooltip],
186
187
  html: "<ic-button variant='icon' aria-label='Tooltip text' id='test-button'>Button</ic-button>",
187
188
  });
188
189
  expect(page.root).toMatchSnapshot();
@@ -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;AAErD,SAAS,CAAC,GAAG,EAAE;IACb,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC;AAEH,0EAA0E;AAC1E,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACnC,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;QACxB,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE;QACpD,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QACjD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,MAAM,CAAC;YACpB,IAAI,E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AG,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\";\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],\n html: \"<ic-button variant='icon' id='test-button'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip based on title\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' id='test-button' title='Tooltip text'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should render icon variant with a tooltip based on aria-label\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' id='test-button' aria-label='Tooltip text' tooltip-placement='top'>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should disable tooltip when prop set\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button' disable-tooltip>Button</ic-button>\",\n });\n expect(page.root).toMatchSnapshot();\n });\n\n it(\"should update aria-label when attribute changed\", async () => {\n const page = await newSpecPage({\n components: [Button],\n html: \"<ic-button variant='icon' aria-label='Tooltip text' id='test-button'>Button</ic-button>\",\n });\n\n expect(page.root).toMatchSnapshot();\n\n 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 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,E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AAC,0EAA0E,EAAE,KAAK,IAAI,EAAE;QACxF,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,MAAM,CAAC;YACpB,IAAI,EAAE,yFAAyF;SAChG,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;QAEpC,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAChC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,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 { 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 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"]}
@@ -606,7 +606,51 @@ button {
606
606
  }
607
607
 
608
608
  .toggle-button {
609
+ color: var(--ic-action-default);
610
+ width: 2.5rem;
611
+ height: 2.5rem;
612
+ padding: var(--ic-space-xs);
613
+ margin: var(--ic-space-1px) 0;
614
+ min-width: 0;
615
+ cursor: pointer;
616
+ transition: var(--ic-easing-transition-fast);
617
+ border-radius: var(--ic-border-radius);
618
+ display: inline-flex;
619
+ flex-direction: row;
620
+ justify-content: center;
621
+ align-items: center;
622
+ background: none;
623
+ border: none;
624
+ box-sizing: border-box;
625
+ white-space: nowrap;
626
+ vertical-align: middle;
627
+ }
628
+
629
+ #ic-tooltip-expand-button {
609
630
  margin-left: auto;
631
+ position: relative;
632
+ }
633
+
634
+ .toggle-button:hover,
635
+ .toggle-button:hover:focus {
636
+ background-color: var(--ic-action-default-bg-hover);
637
+ color: var(--ic-action-default-hover);
638
+ }
639
+
640
+ .toggle-button:focus {
641
+ box-shadow: var(--ic-border-focus);
642
+ }
643
+
644
+ .toggle-button:active:not(:focus) {
645
+ background-color: var(--ic-action-default-bg-active);
646
+ color: var(--ic-action-default-active);
647
+ }
648
+
649
+ .toggle-button svg {
650
+ pointer-events: none;
651
+ width: 100% !important;
652
+ height: 100% !important;
653
+ fill: currentcolor !important;
610
654
  }
611
655
 
612
656
  .toggle-button-closed svg {