@ukic/web-components 2.18.0 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-d52cddc1.js → helpers-88e018cf.js} +27 -4
  3. package/dist/cjs/helpers-88e018cf.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +11 -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 +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-badge.cjs.entry.js +18 -17
  10. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-button_3.cjs.entry.js +41 -86
  14. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-chip.cjs.entry.js +25 -2
  19. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-dialog.cjs.entry.js +14 -4
  22. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +4 -4
  31. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-link.cjs.entry.js +33 -15
  34. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-navigation-button.cjs.entry.js +26 -5
  38. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-navigation-group.cjs.entry.js +16 -13
  40. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-navigation-item.cjs.entry.js +29 -33
  42. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +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 +5 -5
  47. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-radio-group.cjs.entry.js +40 -26
  50. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-radio-option.cjs.entry.js +9 -4
  52. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-select.cjs.entry.js +24 -6
  55. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -2
  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 +5 -2
  60. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-stepper.cjs.entry.js +2 -1
  62. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-tab-context.cjs.entry.js +18 -2
  65. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-text-field.cjs.entry.js +26 -7
  70. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-theme.cjs.entry.js +3 -10
  72. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  75. package/dist/cjs/ic-top-navigation.cjs.entry.js +46 -60
  76. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-typography.cjs.entry.js +11 -35
  78. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  79. package/dist/cjs/loader.cjs.js +1 -1
  80. package/dist/cjs/types-dc22e301.js.map +1 -1
  81. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +32 -2
  82. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
  83. package/dist/collection/components/ic-badge/ic-badge.js +20 -19
  84. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  85. package/dist/collection/components/ic-badge/ic-badge.types.js.map +1 -1
  86. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +2 -2
  87. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
  88. package/dist/collection/components/ic-button/ic-button.css +2 -1
  89. package/dist/collection/components/ic-button/ic-button.js +41 -83
  90. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  91. package/dist/collection/components/ic-chip/ic-chip.css +4 -3
  92. package/dist/collection/components/ic-chip/ic-chip.js +51 -1
  93. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  94. package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js +44 -0
  95. package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js.map +1 -1
  96. package/dist/collection/components/ic-dialog/ic-dialog.js +13 -3
  97. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  98. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +50 -0
  99. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -1
  100. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +1 -1
  101. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  102. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +16 -3
  103. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  104. package/dist/collection/components/ic-link/ic-link.js +33 -15
  105. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  106. package/dist/collection/components/ic-link/test/basic/ic-link.spec.js +12 -0
  107. package/dist/collection/components/ic-link/test/basic/ic-link.spec.js.map +1 -1
  108. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +6 -2
  109. package/dist/collection/components/ic-menu/ic-menu.js +2 -2
  110. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  111. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +26 -5
  112. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  113. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +11 -0
  114. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +1 -1
  115. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -0
  116. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +14 -11
  117. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  118. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +1 -0
  119. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +28 -32
  120. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  121. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  122. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  123. package/dist/collection/components/ic-radio-group/ic-radio-group.js +39 -25
  124. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  125. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +30 -0
  126. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +1 -1
  127. package/dist/collection/components/ic-radio-option/ic-radio-option.js +32 -3
  128. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  129. package/dist/collection/components/ic-select/ic-select.js +24 -6
  130. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  131. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +37 -0
  132. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  133. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +2 -2
  134. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  135. package/dist/collection/components/ic-step/ic-step.css +93 -1
  136. package/dist/collection/components/ic-step/ic-step.js +3 -0
  137. package/dist/collection/components/ic-step/ic-step.js.map +1 -1
  138. package/dist/collection/components/ic-stepper/ic-stepper.js +19 -0
  139. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  140. package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js +18 -0
  141. package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js.map +1 -1
  142. package/dist/collection/components/ic-tab/ic-tab.types.js.map +1 -1
  143. package/dist/collection/components/ic-tab-context/ic-tab-context.js +18 -2
  144. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  145. package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.e2e.js +2 -0
  146. package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.e2e.js.map +1 -1
  147. package/dist/collection/components/ic-text-field/ic-text-field.js +26 -7
  148. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  149. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.e2e.js +12 -0
  150. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.e2e.js.map +1 -1
  151. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +11 -0
  152. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +1 -1
  153. package/dist/collection/components/ic-theme/ic-theme.js +3 -10
  154. package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
  155. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +21 -24
  156. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +68 -59
  157. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  158. package/dist/collection/components/ic-typography/ic-typography.css +1 -4
  159. package/dist/collection/components/ic-typography/ic-typography.js +10 -113
  160. package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
  161. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js +0 -25
  162. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js.map +1 -1
  163. package/dist/collection/utils/helpers.js +55 -2
  164. package/dist/collection/utils/helpers.js.map +1 -1
  165. package/dist/collection/utils/types.js.map +1 -1
  166. package/dist/components/helpers.js +26 -3
  167. package/dist/components/helpers.js.map +1 -1
  168. package/dist/components/ic-accordion-group.js +14 -4
  169. package/dist/components/ic-accordion-group.js.map +1 -1
  170. package/dist/components/ic-badge.js +18 -17
  171. package/dist/components/ic-badge.js.map +1 -1
  172. package/dist/components/ic-button2.js +43 -86
  173. package/dist/components/ic-button2.js.map +1 -1
  174. package/dist/components/ic-card.js +1 -1
  175. package/dist/components/ic-checkbox-group.js +1 -1
  176. package/dist/components/ic-checkbox.js +1 -1
  177. package/dist/components/ic-chip.js +29 -3
  178. package/dist/components/ic-chip.js.map +1 -1
  179. package/dist/components/ic-dialog.js +13 -3
  180. package/dist/components/ic-dialog.js.map +1 -1
  181. package/dist/components/ic-input-component-container2.js +1 -1
  182. package/dist/components/ic-input-component-container2.js.map +1 -1
  183. package/dist/components/ic-link2.js +34 -16
  184. package/dist/components/ic-link2.js.map +1 -1
  185. package/dist/components/ic-loading-indicator2.js +1 -1
  186. package/dist/components/ic-loading-indicator2.js.map +1 -1
  187. package/dist/components/ic-menu-item2.js +1 -1
  188. package/dist/components/ic-menu2.js +2 -2
  189. package/dist/components/ic-menu2.js.map +1 -1
  190. package/dist/components/ic-navigation-button.js +26 -5
  191. package/dist/components/ic-navigation-button.js.map +1 -1
  192. package/dist/components/ic-navigation-group.js +15 -12
  193. package/dist/components/ic-navigation-group.js.map +1 -1
  194. package/dist/components/ic-navigation-item.js +29 -33
  195. package/dist/components/ic-navigation-item.js.map +1 -1
  196. package/dist/components/ic-pagination-item2.js +1 -1
  197. package/dist/components/ic-pagination.js +5 -5
  198. package/dist/components/ic-pagination.js.map +1 -1
  199. package/dist/components/ic-radio-group.js +40 -26
  200. package/dist/components/ic-radio-group.js.map +1 -1
  201. package/dist/components/ic-radio-option.js +11 -5
  202. package/dist/components/ic-radio-option.js.map +1 -1
  203. package/dist/components/ic-search-bar.js +1 -1
  204. package/dist/components/ic-select.js +25 -7
  205. package/dist/components/ic-select.js.map +1 -1
  206. package/dist/components/ic-side-navigation.js +1 -1
  207. package/dist/components/ic-side-navigation.js.map +1 -1
  208. package/dist/components/ic-step.js +4 -1
  209. package/dist/components/ic-step.js.map +1 -1
  210. package/dist/components/ic-stepper.js +2 -0
  211. package/dist/components/ic-stepper.js.map +1 -1
  212. package/dist/components/ic-switch.js +1 -1
  213. package/dist/components/ic-tab-context.js +18 -2
  214. package/dist/components/ic-tab-context.js.map +1 -1
  215. package/dist/components/ic-tab.js +1 -1
  216. package/dist/components/ic-text-field2.js +27 -8
  217. package/dist/components/ic-text-field2.js.map +1 -1
  218. package/dist/components/ic-theme.js +3 -10
  219. package/dist/components/ic-theme.js.map +1 -1
  220. package/dist/components/ic-toggle-button.js +1 -1
  221. package/dist/components/ic-top-navigation.js +47 -61
  222. package/dist/components/ic-top-navigation.js.map +1 -1
  223. package/dist/components/ic-typography2.js +12 -38
  224. package/dist/components/ic-typography2.js.map +1 -1
  225. package/dist/components/types.js.map +1 -1
  226. package/dist/core/core.css +1 -1
  227. package/dist/core/core.esm.js +1 -1
  228. package/dist/core/core.esm.js.map +1 -1
  229. package/dist/core/{p-0e2628eb.entry.js → p-00c21dd7.entry.js} +2 -2
  230. package/dist/core/p-00c21dd7.entry.js.map +1 -0
  231. package/dist/core/{p-d5f721ca.entry.js → p-02ad4585.entry.js} +2 -2
  232. package/dist/core/{p-fce3e1aa.entry.js → p-03796d51.entry.js} +2 -2
  233. package/dist/core/p-04cc2b25.entry.js +2 -0
  234. package/dist/core/p-04cc2b25.entry.js.map +1 -0
  235. package/dist/core/p-051583a5.entry.js +2 -0
  236. package/dist/core/p-051583a5.entry.js.map +1 -0
  237. package/dist/core/p-078f7f23.entry.js +2 -0
  238. package/dist/core/p-078f7f23.entry.js.map +1 -0
  239. package/dist/core/p-0c097626.entry.js +2 -0
  240. package/dist/core/p-0c097626.entry.js.map +1 -0
  241. package/dist/core/{p-04506779.entry.js → p-1197f0d4.entry.js} +2 -2
  242. package/dist/core/{p-0038a8fd.entry.js → p-1a6fab3e.entry.js} +2 -2
  243. package/dist/core/p-1b1270a1.entry.js +2 -0
  244. package/dist/core/p-1b1270a1.entry.js.map +1 -0
  245. package/dist/core/{p-2680b736.entry.js → p-1c3b619f.entry.js} +2 -2
  246. package/dist/core/p-24bed047.entry.js +2 -0
  247. package/dist/core/{p-916f4265.entry.js.map → p-24bed047.entry.js.map} +1 -1
  248. package/dist/core/p-26b7b18f.js.map +1 -1
  249. package/dist/core/{p-123b9306.entry.js → p-2b326b17.entry.js} +2 -2
  250. package/dist/core/{p-9c18f048.entry.js → p-2d4e7985.entry.js} +2 -2
  251. package/dist/core/p-2d4e7985.entry.js.map +1 -0
  252. package/dist/core/p-2f91e86a.entry.js +2 -0
  253. package/dist/core/p-2f91e86a.entry.js.map +1 -0
  254. package/dist/core/{p-296b7d74.entry.js → p-328bc6a2.entry.js} +2 -2
  255. package/dist/core/{p-c7c2aa3c.entry.js → p-32e2ae6f.entry.js} +2 -2
  256. package/dist/core/{p-4641518f.entry.js → p-346578e4.entry.js} +2 -2
  257. package/dist/core/p-3f53446c.entry.js +2 -0
  258. package/dist/core/p-3f53446c.entry.js.map +1 -0
  259. package/dist/core/p-44ea7a6d.entry.js +2 -0
  260. package/dist/core/p-44ea7a6d.entry.js.map +1 -0
  261. package/dist/core/{p-c053230d.entry.js → p-498273cb.entry.js} +2 -2
  262. package/dist/core/{p-35b8923f.entry.js → p-4f3fe190.entry.js} +2 -2
  263. package/dist/core/{p-46ecc4c5.entry.js → p-52a4c223.entry.js} +2 -2
  264. package/dist/core/p-52a4c223.entry.js.map +1 -0
  265. package/dist/core/{p-47a9dca9.entry.js → p-5481b048.entry.js} +2 -2
  266. package/dist/core/p-5481b048.entry.js.map +1 -0
  267. package/dist/core/{p-1d352487.entry.js → p-692ccc73.entry.js} +2 -2
  268. package/dist/core/{p-80c3424f.entry.js → p-6f9dcfb5.entry.js} +2 -2
  269. package/dist/core/{p-95d6f3ed.entry.js → p-731515cf.entry.js} +2 -2
  270. package/dist/core/p-74f9082d.entry.js +2 -0
  271. package/dist/core/{p-2f462ec5.entry.js.map → p-74f9082d.entry.js.map} +1 -1
  272. package/dist/core/{p-1ce0d16e.entry.js → p-8153def1.entry.js} +2 -2
  273. package/dist/core/{p-a98f57cf.entry.js → p-8b65be1e.entry.js} +2 -2
  274. package/dist/core/{p-166861e8.entry.js → p-8bc2a670.entry.js} +2 -2
  275. package/dist/core/p-8bc2a670.entry.js.map +1 -0
  276. package/dist/core/{p-dbbea7fa.entry.js → p-8e37e832.entry.js} +2 -2
  277. package/dist/core/p-8ed04819.entry.js +2 -0
  278. package/dist/core/p-8ed04819.entry.js.map +1 -0
  279. package/dist/core/{p-6a9ddb8a.entry.js → p-8fe2b073.entry.js} +2 -2
  280. package/dist/core/{p-d319ddce.entry.js → p-9f29ab99.entry.js} +2 -2
  281. package/dist/core/p-a13236ef.entry.js +2 -0
  282. package/dist/core/{p-a9e1966f.entry.js.map → p-a13236ef.entry.js.map} +1 -1
  283. package/dist/core/{p-8aa9aa25.entry.js → p-adf468f4.entry.js} +2 -2
  284. package/dist/core/{p-b98ce745.entry.js → p-af5eacc1.entry.js} +2 -2
  285. package/dist/core/{p-e4863c93.entry.js → p-b451f27c.entry.js} +2 -2
  286. package/dist/core/{p-5603eec3.entry.js → p-ba1c3cf7.entry.js} +2 -2
  287. package/dist/core/p-ba40f44a.entry.js +2 -0
  288. package/dist/core/p-ba40f44a.entry.js.map +1 -0
  289. package/dist/core/p-bceaf300.entry.js +2 -0
  290. package/dist/core/p-bceaf300.entry.js.map +1 -0
  291. package/dist/core/p-c3acbefe.entry.js +2 -0
  292. package/dist/core/p-c3acbefe.entry.js.map +1 -0
  293. package/dist/core/p-c6ac1a01.entry.js +2 -0
  294. package/dist/core/p-c6ac1a01.entry.js.map +1 -0
  295. package/dist/core/{p-22a682e8.entry.js → p-c919c571.entry.js} +2 -2
  296. package/dist/core/p-d19d157d.entry.js +2 -0
  297. package/dist/core/p-d19d157d.entry.js.map +1 -0
  298. package/dist/core/{p-bc7f99b8.entry.js → p-d7f4779d.entry.js} +2 -2
  299. package/dist/core/p-e4d0d1fb.js +2 -0
  300. package/dist/core/p-e4d0d1fb.js.map +1 -0
  301. package/dist/core/{p-a4e7d123.entry.js → p-e5957ce0.entry.js} +2 -2
  302. package/dist/core/p-e68485ee.entry.js +2 -0
  303. package/dist/core/p-e68485ee.entry.js.map +1 -0
  304. package/dist/core/{p-d9329191.entry.js → p-e8e0fa96.entry.js} +2 -2
  305. package/dist/core/p-f50a57f3.entry.js +2 -0
  306. package/dist/core/p-f50a57f3.entry.js.map +1 -0
  307. package/dist/core/p-f8df0716.entry.js +2 -0
  308. package/dist/core/{p-b781b691.entry.js.map → p-f8df0716.entry.js.map} +1 -1
  309. package/dist/core/p-fd737b7e.entry.js +2 -0
  310. package/dist/core/p-fd737b7e.entry.js.map +1 -0
  311. package/dist/esm/core.js +1 -1
  312. package/dist/esm/{helpers-f1ca9908.js → helpers-24ba0b83.js} +27 -4
  313. package/dist/esm/helpers-24ba0b83.js.map +1 -0
  314. package/dist/esm/ic-accordion-group.entry.js +11 -2
  315. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  316. package/dist/esm/ic-accordion.entry.js +1 -1
  317. package/dist/esm/ic-alert.entry.js +1 -1
  318. package/dist/esm/ic-back-to-top.entry.js +1 -1
  319. package/dist/esm/ic-badge.entry.js +18 -17
  320. package/dist/esm/ic-badge.entry.js.map +1 -1
  321. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  322. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  323. package/dist/esm/ic-button_3.entry.js +41 -86
  324. package/dist/esm/ic-button_3.entry.js.map +1 -1
  325. package/dist/esm/ic-card.entry.js +1 -1
  326. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  327. package/dist/esm/ic-checkbox.entry.js +1 -1
  328. package/dist/esm/ic-chip.entry.js +25 -2
  329. package/dist/esm/ic-chip.entry.js.map +1 -1
  330. package/dist/esm/ic-data-row.entry.js +1 -1
  331. package/dist/esm/ic-dialog.entry.js +14 -4
  332. package/dist/esm/ic-dialog.entry.js.map +1 -1
  333. package/dist/esm/ic-divider.entry.js +1 -1
  334. package/dist/esm/ic-empty-state.entry.js +1 -1
  335. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  336. package/dist/esm/ic-footer-link.entry.js +1 -1
  337. package/dist/esm/ic-footer.entry.js +1 -1
  338. package/dist/esm/ic-hero.entry.js +1 -1
  339. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  340. package/dist/esm/ic-input-component-container_3.entry.js +4 -4
  341. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  342. package/dist/esm/ic-input-label_2.entry.js +1 -1
  343. package/dist/esm/ic-link.entry.js +34 -16
  344. package/dist/esm/ic-link.entry.js.map +1 -1
  345. package/dist/esm/ic-menu-group.entry.js +1 -1
  346. package/dist/esm/ic-menu-item.entry.js +1 -1
  347. package/dist/esm/ic-navigation-button.entry.js +27 -6
  348. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  349. package/dist/esm/ic-navigation-group.entry.js +16 -13
  350. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  351. package/dist/esm/ic-navigation-item.entry.js +29 -33
  352. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  353. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  354. package/dist/esm/ic-page-header.entry.js +1 -1
  355. package/dist/esm/ic-pagination-item.entry.js +1 -1
  356. package/dist/esm/ic-pagination.entry.js +5 -5
  357. package/dist/esm/ic-pagination.entry.js.map +1 -1
  358. package/dist/esm/ic-popover-menu.entry.js +1 -1
  359. package/dist/esm/ic-radio-group.entry.js +40 -26
  360. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  361. package/dist/esm/ic-radio-option.entry.js +9 -4
  362. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  363. package/dist/esm/ic-search-bar.entry.js +1 -1
  364. package/dist/esm/ic-select.entry.js +25 -7
  365. package/dist/esm/ic-select.entry.js.map +1 -1
  366. package/dist/esm/ic-side-navigation.entry.js +2 -2
  367. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  368. package/dist/esm/ic-status-tag.entry.js +1 -1
  369. package/dist/esm/ic-step.entry.js +5 -2
  370. package/dist/esm/ic-step.entry.js.map +1 -1
  371. package/dist/esm/ic-stepper.entry.js +2 -1
  372. package/dist/esm/ic-stepper.entry.js.map +1 -1
  373. package/dist/esm/ic-switch.entry.js +1 -1
  374. package/dist/esm/ic-tab-context.entry.js +18 -2
  375. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  376. package/dist/esm/ic-tab-group.entry.js +1 -1
  377. package/dist/esm/ic-tab-panel.entry.js +1 -1
  378. package/dist/esm/ic-tab.entry.js +1 -1
  379. package/dist/esm/ic-text-field.entry.js +27 -8
  380. package/dist/esm/ic-text-field.entry.js.map +1 -1
  381. package/dist/esm/ic-theme.entry.js +3 -10
  382. package/dist/esm/ic-theme.entry.js.map +1 -1
  383. package/dist/esm/ic-toast.entry.js +1 -1
  384. package/dist/esm/ic-toggle-button.entry.js +1 -1
  385. package/dist/esm/ic-top-navigation.entry.js +46 -60
  386. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  387. package/dist/esm/ic-typography.entry.js +12 -36
  388. package/dist/esm/ic-typography.entry.js.map +1 -1
  389. package/dist/esm/loader.js +1 -1
  390. package/dist/esm/polyfills/core-js.js +0 -0
  391. package/dist/esm/polyfills/dom.js +0 -0
  392. package/dist/esm/polyfills/es5-html-element.js +0 -0
  393. package/dist/esm/polyfills/index.js +0 -0
  394. package/dist/esm/polyfills/system.js +0 -0
  395. package/dist/esm/types-6f6b41a5.js.map +1 -1
  396. package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +6 -0
  397. package/dist/types/components/ic-badge/ic-badge.d.ts +3 -2
  398. package/dist/types/components/ic-badge/ic-badge.types.d.ts +0 -5
  399. package/dist/types/components/ic-button/ic-button.d.ts +3 -10
  400. package/dist/types/components/ic-chip/ic-chip.d.ts +8 -1
  401. package/dist/types/components/ic-dialog/ic-dialog.d.ts +1 -0
  402. package/dist/types/components/ic-link/ic-link.d.ts +6 -2
  403. package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +3 -0
  404. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +2 -2
  405. package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +3 -0
  406. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +4 -0
  407. package/dist/types/components/ic-select/ic-select.d.ts +2 -0
  408. package/dist/types/components/ic-stepper/ic-stepper.d.ts +4 -0
  409. package/dist/types/components/ic-tab/ic-tab.types.d.ts +1 -0
  410. package/dist/types/components/ic-text-field/ic-text-field.d.ts +3 -1
  411. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +10 -5
  412. package/dist/types/components/ic-typography/ic-typography.d.ts +1 -18
  413. package/dist/types/components.d.ts +33 -31
  414. package/dist/types/interface.d.ts +0 -1
  415. package/dist/types/utils/helpers.d.ts +18 -7
  416. package/dist/types/utils/types.d.ts +6 -0
  417. package/hydrate/index.js +402 -330
  418. package/package.json +3 -2
  419. package/vscode-data.json +20 -0
  420. package/dist/cjs/helpers-d52cddc1.js.map +0 -1
  421. package/dist/collection/components/ic-page-header/test/a11y/ic-page-header.test.a11y.js +0 -13
  422. package/dist/collection/components/ic-page-header/test/a11y/ic-page-header.test.a11y.js.map +0 -1
  423. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.e2e.js +0 -177
  424. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.e2e.js.map +0 -1
  425. package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js +0 -18
  426. package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js.map +0 -1
  427. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.e2e.js +0 -128
  428. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.e2e.js.map +0 -1
  429. package/dist/collection/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.js +0 -13
  430. package/dist/collection/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.js.map +0 -1
  431. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js +0 -33
  432. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js.map +0 -1
  433. package/dist/collection/components/ic-typography/ic-typography.types.js +0 -2
  434. package/dist/collection/components/ic-typography/ic-typography.types.js.map +0 -1
  435. package/dist/core/p-0e2628eb.entry.js.map +0 -1
  436. package/dist/core/p-1183031f.entry.js +0 -2
  437. package/dist/core/p-1183031f.entry.js.map +0 -1
  438. package/dist/core/p-166861e8.entry.js.map +0 -1
  439. package/dist/core/p-210412e4.entry.js +0 -2
  440. package/dist/core/p-210412e4.entry.js.map +0 -1
  441. package/dist/core/p-2f462ec5.entry.js +0 -2
  442. package/dist/core/p-46ecc4c5.entry.js.map +0 -1
  443. package/dist/core/p-477cf469.entry.js +0 -2
  444. package/dist/core/p-477cf469.entry.js.map +0 -1
  445. package/dist/core/p-47a9dca9.entry.js.map +0 -1
  446. package/dist/core/p-47d39ce7.entry.js +0 -2
  447. package/dist/core/p-47d39ce7.entry.js.map +0 -1
  448. package/dist/core/p-4ce5abd7.entry.js +0 -2
  449. package/dist/core/p-4ce5abd7.entry.js.map +0 -1
  450. package/dist/core/p-53f2fc84.js +0 -2
  451. package/dist/core/p-53f2fc84.js.map +0 -1
  452. package/dist/core/p-5e729e99.entry.js +0 -2
  453. package/dist/core/p-5e729e99.entry.js.map +0 -1
  454. package/dist/core/p-64705a03.entry.js +0 -2
  455. package/dist/core/p-64705a03.entry.js.map +0 -1
  456. package/dist/core/p-76ee6107.entry.js +0 -2
  457. package/dist/core/p-76ee6107.entry.js.map +0 -1
  458. package/dist/core/p-7b0397ea.entry.js +0 -2
  459. package/dist/core/p-7b0397ea.entry.js.map +0 -1
  460. package/dist/core/p-916f4265.entry.js +0 -2
  461. package/dist/core/p-91768ddf.entry.js +0 -2
  462. package/dist/core/p-91768ddf.entry.js.map +0 -1
  463. package/dist/core/p-9c18f048.entry.js.map +0 -1
  464. package/dist/core/p-a9e1966f.entry.js +0 -2
  465. package/dist/core/p-aa777792.entry.js +0 -2
  466. package/dist/core/p-aa777792.entry.js.map +0 -1
  467. package/dist/core/p-aa878a3c.entry.js +0 -2
  468. package/dist/core/p-aa878a3c.entry.js.map +0 -1
  469. package/dist/core/p-b781b691.entry.js +0 -2
  470. package/dist/core/p-cf798ea7.entry.js +0 -2
  471. package/dist/core/p-cf798ea7.entry.js.map +0 -1
  472. package/dist/core/p-df090fc1.entry.js +0 -2
  473. package/dist/core/p-df090fc1.entry.js.map +0 -1
  474. package/dist/core/p-e68e31ec.entry.js +0 -2
  475. package/dist/core/p-e68e31ec.entry.js.map +0 -1
  476. package/dist/core/p-fbcb77a3.entry.js +0 -2
  477. package/dist/core/p-fbcb77a3.entry.js.map +0 -1
  478. package/dist/core/p-fea1d095.entry.js +0 -2
  479. package/dist/core/p-fea1d095.entry.js.map +0 -1
  480. package/dist/esm/helpers-f1ca9908.js.map +0 -1
  481. package/dist/types/components/ic-page-header/test/a11y/ic-page-header.test.a11y.d.ts +0 -1
  482. package/dist/types/components/ic-pagination/test/a11y/ic-pagination.test.a11y.d.ts +0 -1
  483. package/dist/types/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.d.ts +0 -1
  484. package/dist/types/components/ic-typography/ic-typography.types.d.ts +0 -4
  485. /package/dist/core/{p-d5f721ca.entry.js.map → p-02ad4585.entry.js.map} +0 -0
  486. /package/dist/core/{p-fce3e1aa.entry.js.map → p-03796d51.entry.js.map} +0 -0
  487. /package/dist/core/{p-04506779.entry.js.map → p-1197f0d4.entry.js.map} +0 -0
  488. /package/dist/core/{p-0038a8fd.entry.js.map → p-1a6fab3e.entry.js.map} +0 -0
  489. /package/dist/core/{p-2680b736.entry.js.map → p-1c3b619f.entry.js.map} +0 -0
  490. /package/dist/core/{p-123b9306.entry.js.map → p-2b326b17.entry.js.map} +0 -0
  491. /package/dist/core/{p-296b7d74.entry.js.map → p-328bc6a2.entry.js.map} +0 -0
  492. /package/dist/core/{p-c7c2aa3c.entry.js.map → p-32e2ae6f.entry.js.map} +0 -0
  493. /package/dist/core/{p-4641518f.entry.js.map → p-346578e4.entry.js.map} +0 -0
  494. /package/dist/core/{p-c053230d.entry.js.map → p-498273cb.entry.js.map} +0 -0
  495. /package/dist/core/{p-35b8923f.entry.js.map → p-4f3fe190.entry.js.map} +0 -0
  496. /package/dist/core/{p-1d352487.entry.js.map → p-692ccc73.entry.js.map} +0 -0
  497. /package/dist/core/{p-80c3424f.entry.js.map → p-6f9dcfb5.entry.js.map} +0 -0
  498. /package/dist/core/{p-95d6f3ed.entry.js.map → p-731515cf.entry.js.map} +0 -0
  499. /package/dist/core/{p-1ce0d16e.entry.js.map → p-8153def1.entry.js.map} +0 -0
  500. /package/dist/core/{p-a98f57cf.entry.js.map → p-8b65be1e.entry.js.map} +0 -0
  501. /package/dist/core/{p-dbbea7fa.entry.js.map → p-8e37e832.entry.js.map} +0 -0
  502. /package/dist/core/{p-6a9ddb8a.entry.js.map → p-8fe2b073.entry.js.map} +0 -0
  503. /package/dist/core/{p-d319ddce.entry.js.map → p-9f29ab99.entry.js.map} +0 -0
  504. /package/dist/core/{p-8aa9aa25.entry.js.map → p-adf468f4.entry.js.map} +0 -0
  505. /package/dist/core/{p-b98ce745.entry.js.map → p-af5eacc1.entry.js.map} +0 -0
  506. /package/dist/core/{p-e4863c93.entry.js.map → p-b451f27c.entry.js.map} +0 -0
  507. /package/dist/core/{p-5603eec3.entry.js.map → p-ba1c3cf7.entry.js.map} +0 -0
  508. /package/dist/core/{p-22a682e8.entry.js.map → p-c919c571.entry.js.map} +0 -0
  509. /package/dist/core/{p-bc7f99b8.entry.js.map → p-d7f4779d.entry.js.map} +0 -0
  510. /package/dist/core/{p-a4e7d123.entry.js.map → p-e5957ce0.entry.js.map} +0 -0
  511. /package/dist/core/{p-d9329191.entry.js.map → p-e8e0fa96.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ic-badge.spec.js","sourceRoot":"","sources":["../../../../../src/components/ic-badge/test/basic/ic-badge.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE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AE,KAAK,IAAI,EAAE;QACxE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE,uFAAuF;SAC9F,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;QACzC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;YAC3B,IAAI,EAAE,mFAAmF;SAC1F,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from \"@stencil/core/testing\";\nimport { Badge } from \"../../ic-badge\";\nimport { Button } from \"../../../ic-button/ic-button\";\nimport { Chip } from \"../../../ic-chip/ic-chip\";\nimport { Tab } from \"../../../ic-tab/ic-tab\";\nimport { Card } from \"../../../ic-card/ic-card\";\nimport { NavigationButton } from \"../../../ic-navigation-button/ic-navigation-button\";\nimport { NavigationItem } from \"../../../ic-navigation-item/ic-navigation-item\";\n\ndescribe(\"ic-badge\", () => {\n it(\"should render with text slotted in a button\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render with text slotted in a button\"\n );\n });\n\n it(\"should render light variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"light\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render light variant\");\n });\n\n it(\"should render error variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"error\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render error variant\");\n });\n\n it(\"should render success variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"success\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render success variant\");\n });\n\n it(\"should render warning variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"warning\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render warning variant\");\n });\n it(\"should render info variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"info\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render info variant\");\n });\n\n it(\"should render custom variant with custom colour in hex\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"custom\" text-label=\"1\" custom-color=\"#F8C8DC\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render custom variant with custom colour in hex\"\n );\n });\n\n it(\"should render custom variant with custom colour in rgb\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"custom\" text-label=\"1\" custom-color=\"rgb(248,200,220)\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render custom variant with custom colour in rgb\"\n );\n });\n\n it(\"should render with max number prop set\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"100\" max-number=\"9\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with max number prop set\");\n });\n\n it(\"should render with accessible label\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"1\" accessible-label=\"1 notification found\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with accessible label\");\n });\n\n it(\"should render size small\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"100\" size=\"small\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render size small\");\n });\n\n it(\"should render size large\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"100\" size=\"large\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render size large\");\n });\n\n it(\"should render type dot\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" type=\"dot\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render type dot\");\n });\n\n it(\"should render type icon\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" type=\"icon\">\n <svg slot='badge-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 </ic-badge></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render type icon\");\n });\n\n it(\"should render with visible false\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" visible=\"false\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with visible false\");\n });\n\n it(\"should render slotted in a chip\", async () => {\n const page = await newSpecPage({\n components: [Chip, Badge],\n html: `<ic-chip label=\"Badge\"><ic-badge slot=\"badge\" text-label=\"1\" position=\"near\"/></ic-chip>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render slotted in a chip\");\n });\n\n it(\"should render slotted in a tab\", async () => {\n const page = await newSpecPage({\n components: [Tab, Badge],\n html: `<ic-tab>Tab<ic-badge slot=\"badge\" text-label=\"1\" position=\"inline\"/></ic-tab>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render slotted in a tab\");\n });\n\n it(\"should render slotted in a card\", async () => {\n const page = await newSpecPage({\n components: [Card, Badge],\n html: `<ic-card heading=\"Badge\"><ic-badge slot=\"badge\" text-label=\"1\" position=\"near\"/></ic-card>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render slotted in a card\");\n });\n\n it(\"should render slotted in a navigation button\", async () => {\n const page = await newSpecPage({\n components: [NavigationButton, Badge],\n html: `<ic-navigation-button\n label=\"Button One\"\n slot=\"buttons\"\n href=\"https://www.google.com\"\n target=\"_blank\"\n title=\"Google 1\"\n >\n <svg\n slot=\"icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n fill=\"#000000\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z\"\n />\n </svg>\n <ic-badge\n text-label=\"1\"\n slot=\"badge\"\n position=\"near\"\n variant=\"light\"\n ></ic-badge>\n </ic-navigation-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render slotted in a navigation button\"\n );\n });\n\n it(\"should render slotted in a navigation item\", async () => {\n const page = await newSpecPage({\n components: [NavigationItem, Badge],\n html: `<ic-navigation-item label=\"Navigation\" href=\"/\">\n <ic-badge\n text-label=\"1\"\n slot=\"badge\"\n variant=\"light\"\n position=\"far\"\n ></ic-badge>\n <svg\n slot=\"icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M23 8C23 9.1 22.1 10 21 10C20.82 10 20.65 9.98 20.49 9.93L16.93 13.48C16.98 13.64 17 13.82 17 14C17 15.1 16.1 16 15 16C13.9 16 13 15.1 13 14C13 13.82 13.02 13.64 13.07 13.48L10.52 10.93C10.36 10.98 10.18 11 10 11C9.82 11 9.64 10.98 9.48 10.93L4.93 15.49C4.98 15.65 5 15.82 5 16C5 17.1 4.1 18 3 18C1.9 18 1 17.1 1 16C1 14.9 1.9 14 3 14C3.18 14 3.35 14.02 3.51 14.07L8.07 9.52C8.02 9.36 8 9.18 8 9C8 7.9 8.9 7 10 7C11.1 7 12 7.9 12 9C12 9.18 11.98 9.36 11.93 9.52L14.48 12.07C14.64 12.02 14.82 12 15 12C15.18 12 15.36 12.02 15.52 12.07L19.07 8.51C19.02 8.35 19 8.18 19 8C19 6.9 19.9 6 21 6C22.1 6 23 6.9 23 8Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-navigation-item>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render slotted in a navigation item\"\n );\n });\n\n it(\"should hide and show the badge using visible prop\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"1\"/></ic-button>`,\n });\n\n const badge = document.querySelector(\"ic-badge\");\n\n expect(page.rootInstance.visible).toBe(true);\n\n badge.visible = false;\n await page.waitForChanges();\n\n expect(page.rootInstance.visible).toBe(false);\n\n badge.visible = true;\n await page.waitForChanges();\n\n expect(page.rootInstance.visible).toBe(true);\n });\n\n //To be removed when we remove show and hide methods\n it(\"should hide and show the badge using methods\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"1\"/></ic-button>`,\n });\n\n const badge = document.querySelector(\"ic-badge\");\n\n expect(page.rootInstance.visible).toBe(true);\n\n await badge.hideBadge();\n await page.waitForChanges();\n\n expect(page.rootInstance.visible).toBe(false);\n\n await badge.showBadge();\n await page.waitForChanges();\n\n expect(page.rootInstance.visible).toBe(true);\n });\n\n it(\"should set the correct badge colour\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"custom\" text-label=\"1\" custom-color=\"#F8C8DC\"/></ic-button>`,\n });\n\n await page.rootInstance.setBadgeColour();\n\n expect(page.rootInstance.customColorRGBA).toEqual({\n a: 1,\n b: 220,\n g: 200,\n r: 248,\n });\n });\n\n it(\"should set the correct foreground colour\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"custom\" text-label=\"1\" custom-color=\"#F8C8DC\"/></ic-button>`,\n });\n\n await page.rootInstance.getBadgeForeground();\n\n expect(page.rootInstance.foregroundColour).toBe(\"dark\");\n });\n\n it(\"should set the correct text label when max number is set\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"100\" max-number=\"9\"/></ic-button>`,\n });\n\n expect(page.rootInstance.getTextLabel()).toBe(\"9+\");\n });\n\n it(\"should render with id set\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" id=\"badge-1\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with id\");\n });\n});\n"]}
1
+ {"version":3,"file":"ic-badge.spec.js","sourceRoot":"","sources":["../../../../../src/components/ic-badge/test/basic/ic-badge.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAA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AAK,IAAI,EAAE;QACxE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE,uFAAuF;SAC9F,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;QACzC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;YAC3B,IAAI,EAAE,mFAAmF;SAC1F,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from \"@stencil/core/testing\";\nimport { Badge } from \"../../ic-badge\";\nimport { Button } from \"../../../ic-button/ic-button\";\nimport { Chip } from \"../../../ic-chip/ic-chip\";\nimport { Tab } from \"../../../ic-tab/ic-tab\";\nimport { Card } from \"../../../ic-card/ic-card\";\nimport { NavigationButton } from \"../../../ic-navigation-button/ic-navigation-button\";\nimport { NavigationItem } from \"../../../ic-navigation-item/ic-navigation-item\";\n\ndescribe(\"ic-badge\", () => {\n it(\"should render with text slotted in a button\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render with text slotted in a button\"\n );\n });\n\n it(\"should render light variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"light\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render light variant\");\n });\n\n it(\"should render error variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"error\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render error variant\");\n });\n\n it(\"should render success variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"success\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render success variant\");\n });\n\n it(\"should render warning variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"warning\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render warning variant\");\n });\n it(\"should render info variant\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"info\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render info variant\");\n });\n\n it(\"should render custom variant with custom colour in hex\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"custom\" text-label=\"1\" custom-color=\"#F8C8DC\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render custom variant with custom colour in hex\"\n );\n });\n\n it(\"should render custom variant with custom colour in rgb\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"custom\" text-label=\"1\" custom-color=\"rgb(248,200,220)\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render custom variant with custom colour in rgb\"\n );\n });\n\n it(\"should render with max number prop set\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"100\" max-number=\"9\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with max number prop set\");\n });\n\n it(\"should render with accessible label\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"1\" accessible-label=\"1 notification found\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with accessible label\");\n });\n\n it(\"should render size small\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"100\" size=\"small\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render size small\");\n });\n\n it(\"should render size large\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"100\" size=\"large\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render size large\");\n });\n\n it(\"should render type dot\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" type=\"dot\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render type dot\");\n });\n\n it(\"should render type icon\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" type=\"icon\">\n <svg slot='badge-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 </ic-badge></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render type icon\");\n });\n\n it(\"should render with visible false\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" visible=\"false\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with visible false\");\n });\n\n it(\"should render slotted in a chip\", async () => {\n const page = await newSpecPage({\n components: [Chip, Badge],\n html: `<ic-chip label=\"Badge\"><ic-badge slot=\"badge\" text-label=\"1\" position=\"near\"/></ic-chip>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render slotted in a chip\");\n });\n\n it(\"should render slotted in a tab with aria-label set on badge\", async () => {\n const page = await newSpecPage({\n components: [Tab, Badge],\n html: `<ic-tab>Tab<ic-badge slot=\"badge\" text-label=\"1\" position=\"inline\"/></ic-tab>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render slotted in a tab\");\n });\n\n it(\"should render slotted in a card with aria-label set on badge\", async () => {\n const page = await newSpecPage({\n components: [Card, Badge],\n html: `<ic-card heading=\"Badge\"><ic-badge slot=\"badge\" text-label=\"1\" position=\"near\"/></ic-card>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render slotted in a card\");\n });\n\n it(\"should render slotted in a navigation button\", async () => {\n const page = await newSpecPage({\n components: [NavigationButton, Badge],\n html: `<ic-navigation-button\n label=\"Button One\"\n slot=\"buttons\"\n href=\"https://www.google.com\"\n target=\"_blank\"\n title=\"Google 1\"\n >\n <svg\n slot=\"icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n fill=\"#000000\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z\"\n />\n </svg>\n <ic-badge\n text-label=\"1\"\n slot=\"badge\"\n position=\"near\"\n variant=\"light\"\n ></ic-badge>\n </ic-navigation-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render slotted in a navigation button\"\n );\n });\n\n it(\"should render slotted in a navigation item\", async () => {\n const page = await newSpecPage({\n components: [NavigationItem, Badge],\n html: `<ic-navigation-item label=\"Navigation\" href=\"/\">\n <ic-badge\n text-label=\"1\"\n slot=\"badge\"\n variant=\"light\"\n position=\"far\"\n ></ic-badge>\n <svg\n slot=\"icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M23 8C23 9.1 22.1 10 21 10C20.82 10 20.65 9.98 20.49 9.93L16.93 13.48C16.98 13.64 17 13.82 17 14C17 15.1 16.1 16 15 16C13.9 16 13 15.1 13 14C13 13.82 13.02 13.64 13.07 13.48L10.52 10.93C10.36 10.98 10.18 11 10 11C9.82 11 9.64 10.98 9.48 10.93L4.93 15.49C4.98 15.65 5 15.82 5 16C5 17.1 4.1 18 3 18C1.9 18 1 17.1 1 16C1 14.9 1.9 14 3 14C3.18 14 3.35 14.02 3.51 14.07L8.07 9.52C8.02 9.36 8 9.18 8 9C8 7.9 8.9 7 10 7C11.1 7 12 7.9 12 9C12 9.18 11.98 9.36 11.93 9.52L14.48 12.07C14.64 12.02 14.82 12 15 12C15.18 12 15.36 12.02 15.52 12.07L19.07 8.51C19.02 8.35 19 8.18 19 8C19 6.9 19.9 6 21 6C22.1 6 23 6.9 23 8Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-navigation-item>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render slotted in a navigation item\"\n );\n });\n\n it(\"should hide and show the badge using visible prop\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"1\"/></ic-button>`,\n });\n\n const badge = document.querySelector(\"ic-badge\");\n\n expect(page.rootInstance.visible).toBe(true);\n\n badge.visible = false;\n await page.waitForChanges();\n\n expect(page.rootInstance.visible).toBe(false);\n\n badge.visible = true;\n await page.waitForChanges();\n\n expect(page.rootInstance.visible).toBe(true);\n });\n\n //To be removed when we remove show and hide methods\n it(\"should hide and show the badge using methods\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"1\"/></ic-button>`,\n });\n\n const badge = document.querySelector(\"ic-badge\");\n\n expect(page.rootInstance.visible).toBe(true);\n\n await badge.hideBadge();\n await page.waitForChanges();\n\n expect(page.rootInstance.visible).toBe(false);\n\n await badge.showBadge();\n await page.waitForChanges();\n\n expect(page.rootInstance.visible).toBe(true);\n });\n\n it(\"should set the correct badge colour\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"custom\" text-label=\"1\" custom-color=\"#F8C8DC\"/></ic-button>`,\n });\n\n await page.rootInstance.setBadgeColour();\n\n expect(page.rootInstance.customColorRGBA).toEqual({\n a: 1,\n b: 220,\n g: 200,\n r: 248,\n });\n });\n\n it(\"should set the correct foreground colour\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" variant=\"custom\" text-label=\"1\" custom-color=\"#F8C8DC\"/></ic-button>`,\n });\n\n await page.rootInstance.getBadgeForeground();\n\n expect(page.rootInstance.foregroundColour).toBe(\"dark\");\n });\n\n it(\"should set the correct text label when max number is set\", async () => {\n const page = await newSpecPage({\n components: [Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" text-label=\"100\" max-number=\"9\"/></ic-button>`,\n });\n\n expect(page.rootInstance.getTextLabel()).toBe(\"9+\");\n });\n\n it(\"should render with id set\", async () => {\n const page = await newSpecPage({\n components: [Button, Badge],\n html: `<ic-button>Button<ic-badge slot=\"badge\" id=\"badge-1\" text-label=\"1\"/></ic-button>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with id\");\n });\n});\n"]}
@@ -921,7 +921,8 @@ div.right-icon {
921
921
  margin: 0 var(--ic-space-xxs);
922
922
  }
923
923
 
924
- :host(.clear-button) .button:focus {
924
+ :host(.clear-button) .button:focus,
925
+ :host(.calendar-button) .button:focus {
925
926
  box-shadow: none;
926
927
  }
927
928
 
@@ -33,24 +33,16 @@ export class Button {
33
33
  this.describedById = null;
34
34
  this.mutationObserver = null;
35
35
  this.hostMutationObserver = null;
36
- this.setViewBox = () => {
37
- let iconEl;
38
- if (this.hasLeftIconSlot()) {
39
- iconEl = this.el.querySelector(`[slot="left-icon"]`);
40
- }
41
- else if (this.hasRightIconSlot()) {
42
- iconEl = this.el.querySelector(`[slot="right-icon"]`);
43
- }
44
- else {
45
- iconEl = null;
46
- }
47
- return iconEl;
48
- };
49
36
  this.handleClick = () => {
50
37
  if ((this.el.type === "submit" || this.el.type === "reset") &&
51
38
  !this.hasRouterSlot() &&
52
39
  !!this.el.closest("FORM")) {
53
- this.handleHiddenFormButtonClick(this.el.closest("FORM"));
40
+ const hiddenFormButton = document.createElement("button");
41
+ hiddenFormButton.setAttribute("type", this.el.type);
42
+ hiddenFormButton.style.display = "none";
43
+ this.el.closest("FORM").appendChild(hiddenFormButton);
44
+ hiddenFormButton.click();
45
+ hiddenFormButton.remove();
54
46
  }
55
47
  };
56
48
  this.onFocus = () => {
@@ -59,11 +51,6 @@ export class Button {
59
51
  this.onBlur = () => {
60
52
  this.icBlur.emit();
61
53
  };
62
- this.loadingWidth = () => {
63
- if (this.loading) {
64
- this.el.style.setProperty("--min-width", `${this.el.getBoundingClientRect().width}px`);
65
- }
66
- };
67
54
  // triggered when text content of sibling element in light DOM changes
68
55
  this.mutationCallback = () => {
69
56
  this.describedByContent = this.describedByEl.innerText;
@@ -90,23 +77,6 @@ export class Button {
90
77
  this.hasTooltip =
91
78
  !this.disableTooltip && (!!this.title || this.variant === "icon");
92
79
  };
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
- };
97
- this.isTooltipSilent = () => {
98
- if (this.variant === "icon") {
99
- if (this.title)
100
- return true;
101
- else if (this.ariaLabel)
102
- return true;
103
- else
104
- return false;
105
- }
106
- else {
107
- return false;
108
- }
109
- };
110
80
  this.ariaLabel = null;
111
81
  this.describedByContent = null;
112
82
  this.title = null;
@@ -142,6 +112,9 @@ export class Button {
142
112
  this.type = "button";
143
113
  this.variant = "primary";
144
114
  }
115
+ watchDisabledHandler() {
116
+ removeDisabledFalse(this.disabled, this.el);
117
+ }
145
118
  disconnectedCallback() {
146
119
  if (this.mutationObserver !== null && this.mutationObserver !== undefined) {
147
120
  this.mutationObserver.disconnect();
@@ -152,29 +125,26 @@ export class Button {
152
125
  }
153
126
  }
154
127
  componentWillUpdate() {
155
- this.loadingWidth();
128
+ if (this.loading) {
129
+ this.el.style.setProperty("--min-width", `${this.el.getBoundingClientRect().width}px`);
130
+ }
156
131
  this.setHasTooltip();
157
132
  }
158
133
  componentWillLoad() {
159
- const allInheritedAttributes = inheritAttributes(this.el, [
160
- ...IC_INHERITED_ARIA,
161
- "title",
162
- ]);
163
- const { title, "aria-label": ariaLabel } = allInheritedAttributes, restInheritedAttributes = __rest(allInheritedAttributes, ["title", "aria-label"]);
134
+ const _a = inheritAttributes(this.el, [...IC_INHERITED_ARIA, "title"]), { title, "aria-label": ariaLabel } = _a, restInheritedAttributes = __rest(_a, ["title", "aria-label"]);
164
135
  this.title = title;
165
136
  this.ariaLabel = ariaLabel;
166
137
  this.inheritedAttributes = restInheritedAttributes;
167
138
  removeDisabledFalse(this.disabled, this.el);
168
139
  this.el.setAttribute("exportparts", "button");
169
- const id = this.el.id;
170
- this.id = id !== undefined ? id : null;
140
+ this.id = this.el.id || null;
171
141
  this.setHasTooltip();
172
142
  if (!this.hasTooltip) {
173
143
  const describedById = this.inheritedAttributes["aria-describedby"];
174
144
  if (describedById !== undefined) {
175
145
  this.describedById = describedById;
176
146
  const el = this.el.parentElement.querySelector(`#${describedById}`);
177
- if (el !== undefined && el !== null) {
147
+ if (el) {
178
148
  this.describedByContent = el.innerText;
179
149
  this.describedByEl = el;
180
150
  }
@@ -199,13 +169,17 @@ export class Button {
199
169
  }
200
170
  }
201
171
  componentWillRender() {
202
- var _a;
203
- (_a = this.setViewBox()) === null || _a === void 0 ? void 0 : _a.setAttribute("viewBox", "0 0 24 24");
172
+ const iconEl = this.hasIconSlot("left")
173
+ ? this.el.querySelector(`[slot="left-icon"]`)
174
+ : this.hasIconSlot("right")
175
+ ? this.el.querySelector(`[slot="right-icon"]`)
176
+ : null;
177
+ iconEl === null || iconEl === void 0 ? void 0 : iconEl.setAttribute("viewBox", "0 0 24 24");
204
178
  }
205
179
  handleHostClick(event) {
206
180
  if (!this.hasRouterSlot()) {
207
181
  if (this.fileUpload) {
208
- this.openFileExplorer();
182
+ renderFileHiddenInput(this.icFileSelection, this.el, this.multiple, this.fileInputName, this.selectedFiles, this.disabled, this.accept);
209
183
  }
210
184
  if (this.disabled || this.loading) {
211
185
  event.stopImmediatePropagation();
@@ -215,33 +189,19 @@ export class Button {
215
189
  }
216
190
  }
217
191
  }
218
- themeChangeHandler(ev) {
219
- const theme = ev.detail;
220
- this.updateTheme(theme.mode);
192
+ themeChangeHandler({ detail }) {
193
+ this.updateTheme(detail.mode);
221
194
  }
222
195
  /**
223
196
  * Sets focus on the native `button`.
224
197
  */
225
198
  async setFocus() {
226
- if (this.buttonEl) {
227
- this.buttonEl.focus();
228
- }
229
- }
230
- hasIconSlot() {
231
- const iconEl = this.el.querySelector(`[slot="icon"]`);
232
- return iconEl !== null;
233
- }
234
- hasLeftIconSlot() {
235
- const iconEl = this.el.querySelector(`[slot="left-icon"]`);
236
- return iconEl !== null;
237
- }
238
- hasTopIconSlot() {
239
- const iconEl = this.el.querySelector(`[slot="top-icon"]`);
240
- return iconEl !== null;
199
+ var _a;
200
+ (_a = this.buttonEl) === null || _a === void 0 ? void 0 : _a.focus();
241
201
  }
242
- hasRightIconSlot() {
243
- const iconEl = this.el.querySelector(`[slot="right-icon"]`);
244
- return iconEl !== null;
202
+ hasIconSlot(position) {
203
+ const selectorPrefix = position ? `${position}-` : "";
204
+ return this.el.querySelector(`[slot="${selectorPrefix}icon"]`) !== null;
245
205
  }
246
206
  hasRouterSlot() {
247
207
  this.routerSlot = this.el.querySelector('[slot="router-item"]');
@@ -250,16 +210,8 @@ export class Button {
250
210
  }
251
211
  return !!this.routerSlot;
252
212
  }
253
- handleHiddenFormButtonClick(form) {
254
- const hiddenFormButton = document.createElement("button");
255
- hiddenFormButton.setAttribute("type", this.el.type);
256
- hiddenFormButton.style.display = "none";
257
- form.appendChild(hiddenFormButton);
258
- hiddenFormButton.click();
259
- hiddenFormButton.remove();
260
- }
261
213
  updateTheme(newTheme = null) {
262
- const foregroundColor = getThemeFromContext(this.el, newTheme || null);
214
+ const foregroundColor = getThemeFromContext(this.el, newTheme);
263
215
  if (foregroundColor !== IcThemeForegroundEnum.Default) {
264
216
  this.appearance = foregroundColor;
265
217
  }
@@ -302,15 +254,15 @@ export class Button {
302
254
  describedBy = this.describedById;
303
255
  }
304
256
  const ButtonContent = () => {
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() &&
306
- !this.hasLeftIconSlot() &&
307
- !this.hasRightIconSlot() &&
257
+ 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.hasIconSlot("left") && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "left-icon" }))), this.hasIconSlot("top") &&
258
+ !this.hasIconSlot("left") &&
259
+ !this.hasIconSlot("right") &&
308
260
  !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" ||
309
261
  this.variant === "destructive" ||
310
262
  this.appearance === IcThemeForegroundEnum.Dark ||
311
263
  this.appearance === IcThemeForegroundEnum.Light
312
264
  ? "light"
313
- : "dark" }))) : (h("slot", null)), this.hasRightIconSlot() && !this.loading && !this.dropdown && (h("div", { class: { "icon-container": true, "right-icon": true } }, h("slot", { name: "right-icon" }))), this.dropdown &&
265
+ : "dark" }))) : (h("slot", null)), this.hasIconSlot("right") && !this.loading && !this.dropdown && (h("div", { class: { "icon-container": true, "right-icon": true } }, h("slot", { name: "right-icon" }))), this.dropdown &&
314
266
  !this.loading &&
315
267
  this.variant !== "icon" &&
316
268
  this.variant !== "destructive" && (h("span", { class: {
@@ -334,7 +286,7 @@ export class Button {
334
286
  ["white-background"]: this.variant === "secondary" &&
335
287
  !this.transparentBackground &&
336
288
  this.appearance !== "light",
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 &&
289
+ }, 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.variant === "icon" && (!!title || !!ariaLabel) }, this.hasRouterSlot() ? (h("slot", { name: "router-item" })) : (h(ButtonContent, null)))), isSlotUsed(this.el, "badge") && h("slot", { name: "badge" }), !this.hasTooltip &&
338
290
  (this.hasRouterSlot() ? (h("slot", { name: "router-item" })) : (h(ButtonContent, null))), this.describedByContent && (h("span", { id: describedBy, class: "ic-button-describedby" }, this.describedByContent))));
339
291
  }
340
292
  static get is() { return "ic-button"; }
@@ -1024,6 +976,12 @@ export class Button {
1024
976
  };
1025
977
  }
1026
978
  static get elementRef() { return "el"; }
979
+ static get watchers() {
980
+ return [{
981
+ "propName": "disabled",
982
+ "methodName": "watchDisabledHandler"
983
+ }];
984
+ }
1027
985
  static get listeners() {
1028
986
  return [{
1029
987
  "name": "click",
@@ -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,EACnB,qBAAqB,GACtB,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;;;;;;;GAOG;AAQH,MAAM,OAAO,MAAM;;QAET,gBAAW,GAAG,SAAS,EAAE,CAAC;QAC1B,eAAU,GAAY,KAAK,CAAC;QAE5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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 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
+ {"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n forceUpdate,\n h,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n getThemeFromContext,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcSizes,\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot 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]: string } = {};\n private describedByEl: HTMLElement = null;\n private describedById: string = null;\n private mutationObserver: MutationObserver = null;\n private hostMutationObserver: MutationObserver = null;\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel: string = null;\n @State() describedByContent: string = null;\n @State() title: string = null;\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept?: string = \"*\";\n\n /**\n * The appearance of the button, e.g. dark, light, or the default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaControlsId: string | boolean;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwnsId: string | boolean;\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * If `true`, the button will show a dropdown icon.\n */\n @Prop() dropdown?: boolean = false;\n\n /**\n * If `true`, the aria-expanded value will be set to true. This is only applied if the dropdown prop is also true.\n */\n @Prop({ mutable: true, reflect: true }) dropdownExpanded?: boolean = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload?: boolean = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName: string = `ic-button-file-upload-input-${buttonIds++}`;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcSizes = \"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 if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\n }\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = inheritAttributes(this.el, [...IC_INHERITED_ARIA, \"title\"]);\n\n this.title = title;\n this.ariaLabel = ariaLabel;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n this.id = this.el.id || null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\"aria-describedby\"];\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector<HTMLElement>(\n `#${describedById}`\n );\n if (el) {\n this.describedByContent = el.innerText;\n this.describedByEl = el;\n }\n }\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (typeof MutationObserver !== \"undefined\") {\n if (this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedByEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n }\n\n componentWillRender(): void {\n const iconEl = this.hasIconSlot(\"left\")\n ? this.el.querySelector(`[slot=\"left-icon\"]`)\n : this.hasIconSlot(\"right\")\n ? this.el.querySelector(`[slot=\"right-icon\"]`)\n : null;\n iconEl?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (!this.hasRouterSlot()) {\n if (this.fileUpload) {\n renderFileHiddenInput(\n this.icFileSelection,\n this.el,\n this.multiple,\n this.fileInputName,\n this.selectedFiles,\n this.disabled,\n this.accept\n );\n }\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n if (this.dropdown) {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler({ detail }: CustomEvent<IcTheme>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private hasIconSlot(position?: \"left\" | \"right\" | \"top\"): boolean {\n const selectorPrefix = position ? `${position}-` : \"\";\n return this.el.querySelector(`[slot=\"${selectorPrefix}icon\"]`) !== null;\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n !!this.el.closest(\"FORM\")\n ) {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n this.el.closest(\"FORM\").appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n // triggered when text content of sibling element in light DOM changes\n private mutationCallback = (): void => {\n this.describedByContent = this.describedByEl.innerText;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n const attribute = this.el.getAttribute(attributeName);\n if (attributeName === \"title\") this.title = attribute;\n else if (attributeName === \"aria-label\") this.ariaLabel = attribute;\n\n if (IC_INHERITED_ARIA.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = (): void => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || this.variant === \"icon\");\n };\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const { title, ariaLabel, inheritedAttributes } = this;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n\n let describedBy: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedBy =\n this.variant === \"icon\" && !!ariaLabel\n ? null\n : `ic-tooltip-${buttonId}`;\n } else {\n describedBy = this.describedById;\n }\n\n const ButtonContent = () => {\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n aria-expanded={this.dropdown && `${this.dropdownExpanded}`}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedBy}\n part=\"button\"\n >\n {this.hasIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.hasIconSlot(\"left\") && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n {this.hasIconSlot(\"top\") &&\n !this.hasIconSlot(\"left\") &&\n !this.hasIconSlot(\"right\") &&\n !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"top-icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n 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.hasIconSlot(\"right\") && !this.loading && !this.dropdown && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )}\n {this.dropdown &&\n !this.loading &&\n this.variant !== \"icon\" &&\n this.variant !== \"destructive\" && (\n <span\n class={{\n [\"arrow-dropdown\"]: !this.dropdownExpanded,\n [\"dropdown-expanded\"]: this.dropdownExpanded,\n }}\n innerHTML={arrowDropdown}\n />\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [\"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.variant === \"icon\" && (!!title || !!ariaLabel)}\n >\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <ButtonContent />\n )}\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!this.hasTooltip &&\n (this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <ButtonContent />\n ))}\n {this.describedByContent && (\n <span id={describedBy} class=\"ic-button-describedby\">\n {this.describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -490,8 +490,8 @@ ic-tooltip:focus-within {
490
490
  }
491
491
 
492
492
  .filled {
493
- background-color: var(--ic-architectural-200);
494
- color: black;
493
+ background-color: var(--chip-custom-color, var(--ic-architectural-200));
494
+ color: var(--chip-custom-foreground-color, black);
495
495
  border: none;
496
496
  }
497
497
 
@@ -502,7 +502,8 @@ ic-tooltip:focus-within {
502
502
  .outline,
503
503
  .outlined {
504
504
  color: var(--ic-architectural-900);
505
- border: var(--ic-border-width) solid var(--ic-architectural-900);
505
+ border: var(--ic-border-width) solid
506
+ var(--chip-custom-color, var(--ic-architectural-900));
506
507
  padding: calc(var(--ic-space-xxs) - var(--ic-space-1px));
507
508
  }
508
509
 
@@ -1,5 +1,5 @@
1
1
  import { h, } from "@stencil/core";
2
- import { onComponentRequiredPropUndefined, isSlotUsed, removeDisabledFalse, } from "../../utils/helpers";
2
+ import { onComponentRequiredPropUndefined, isSlotUsed, removeDisabledFalse, convertToRGBA, } from "../../utils/helpers";
3
3
  import dismissIcon from "../../assets/dismiss-icon.svg";
4
4
  /**
5
5
  * @slot icon - Content will be rendered at the start of the chip.
@@ -17,9 +17,21 @@ export class Chip {
17
17
  this.mouseLeaveHandler = () => {
18
18
  this.isHovered = false;
19
19
  };
20
+ this.setChipColour = () => {
21
+ if (convertToRGBA(this.customColor) !== null) {
22
+ const colorRGBA = convertToRGBA(this.customColor);
23
+ const rgbaValue = `rgba(${colorRGBA.r.toString()}, ${colorRGBA.g.toString()}, ${colorRGBA.b.toString()}, ${colorRGBA.a.toString()})`;
24
+ const brightness = (colorRGBA.r * 299 + colorRGBA.g * 587 + colorRGBA.b * 114) / 1000;
25
+ const foregroundColour = brightness > 133.3505
26
+ ? "var(--ic-architectural-black)"
27
+ : "var(--ic-architectural-white)";
28
+ this.el.setAttribute("style", `--chip-custom-color: ${rgbaValue}; --chip-custom-foreground-color: ${foregroundColour};`);
29
+ }
30
+ };
20
31
  this.isHovered = false;
21
32
  this.visible = true;
22
33
  this.appearance = undefined;
34
+ this.customColor = null;
23
35
  this.disabled = false;
24
36
  this.dismissible = false;
25
37
  this.label = undefined;
@@ -27,8 +39,16 @@ export class Chip {
27
39
  this.transparentBackground = true;
28
40
  this.variant = "filled";
29
41
  }
42
+ customColorHandler() {
43
+ if (!this.dismissible && this.customColor !== null) {
44
+ this.setChipColour();
45
+ }
46
+ }
30
47
  componentWillLoad() {
31
48
  removeDisabledFalse(this.disabled, this.el);
49
+ if (!this.dismissible && this.customColor !== null) {
50
+ this.setChipColour();
51
+ }
32
52
  if (this.appearance === "outline") {
33
53
  this.variant = "outlined";
34
54
  }
@@ -107,6 +127,30 @@ export class Chip {
107
127
  "attribute": "appearance",
108
128
  "reflect": false
109
129
  },
130
+ "customColor": {
131
+ "type": "string",
132
+ "mutable": false,
133
+ "complexType": {
134
+ "original": "IcColor",
135
+ "resolved": "`#${string}` | `rgb(${string})` | `rgba(${string})`",
136
+ "references": {
137
+ "IcColor": {
138
+ "location": "import",
139
+ "path": "../../utils/types",
140
+ "id": "src/utils/types.ts::IcColor"
141
+ }
142
+ }
143
+ },
144
+ "required": false,
145
+ "optional": true,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": "The custom chip colour. This prop will be applied to the chip component if `dismissible` is set to `false`.\nCan be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\"."
149
+ },
150
+ "attribute": "custom-color",
151
+ "reflect": false,
152
+ "defaultValue": "null"
153
+ },
110
154
  "disabled": {
111
155
  "type": "boolean",
112
156
  "mutable": false,
@@ -292,6 +336,12 @@ export class Chip {
292
336
  };
293
337
  }
294
338
  static get elementRef() { return "el"; }
339
+ static get watchers() {
340
+ return [{
341
+ "propName": "customColor",
342
+ "methodName": "customColorHandler"
343
+ }];
344
+ }
295
345
  static get listeners() {
296
346
  return [{
297
347
  "name": "icDismiss",