@ukic/web-components 3.10.0 → 3.11.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 (645) hide show
  1. package/dist/cjs/constants-8354f6e6.js +189 -0
  2. package/dist/cjs/constants-8354f6e6.js.map +1 -0
  3. package/dist/cjs/core.cjs.js +1 -1
  4. package/dist/cjs/{helpers-a0e78e2e.js → helpers-ffe1c2d9.js} +6 -187
  5. package/dist/cjs/helpers-ffe1c2d9.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +2 -1
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +2 -1
  9. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-action-chip.cjs.entry.js +2 -1
  11. package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-alert.cjs.entry.js +4 -3
  13. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -1
  15. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-badge.cjs.entry.js +2 -1
  17. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -1
  19. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -1
  21. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-button_3.cjs.entry.js +27 -20
  23. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -1
  25. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-checkbox-group.cjs.entry.js +4 -3
  27. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-checkbox.cjs.entry.js +5 -4
  29. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-chip.cjs.entry.js +2 -1
  31. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
  33. package/dist/cjs/ic-data-row.cjs.entry.js +4 -3
  34. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-dialog.cjs.entry.js +7 -4
  36. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-divider.cjs.entry.js +2 -1
  38. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-empty-state.cjs.entry.js +4 -3
  40. package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -1
  42. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-footer-link.cjs.entry.js +4 -3
  44. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-footer.cjs.entry.js +10 -9
  46. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-hero.cjs.entry.js +6 -5
  48. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +7 -6
  50. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +12 -11
  52. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-input-label_2.cjs.entry.js +26 -12
  54. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-layout-grid-item.cjs.entry.js +2 -2
  56. package/dist/cjs/ic-layout-grid.cjs.entry.js +2 -2
  57. package/dist/cjs/ic-link.cjs.entry.js +5 -4
  58. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-menu-group.cjs.entry.js +3 -2
  60. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-menu-item.cjs.entry.js +2 -1
  62. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -2
  64. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -2
  66. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -1
  68. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-navigation-menu.cjs.entry.js +6 -5
  70. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-page-header.cjs.entry.js +8 -7
  72. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-pagination-item.cjs.entry.js +3 -2
  74. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-pagination.cjs.entry.js +6 -5
  76. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -5
  78. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-radio-group.cjs.entry.js +6 -5
  80. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-radio-option.cjs.entry.js +6 -5
  82. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-search-bar.cjs.entry.js +11 -10
  84. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  86. package/dist/cjs/ic-select.cjs.entry.js +12 -11
  87. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-side-navigation.cjs.entry.js +6 -5
  89. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  91. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  92. package/dist/cjs/ic-status-tag.cjs.entry.js +4 -3
  93. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-step.cjs.entry.js +15 -14
  95. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  96. package/dist/cjs/ic-stepper.cjs.entry.js +4 -3
  97. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-switch.cjs.entry.js +6 -5
  99. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-tab-context.cjs.entry.js +10 -2
  101. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-tab-group.cjs.entry.js +4 -3
  103. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  105. package/dist/cjs/ic-tab.cjs.entry.js +2 -1
  106. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  107. package/dist/cjs/ic-text-field.cjs.entry.js +32 -23
  108. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  109. package/dist/cjs/ic-theme.cjs.entry.js +5 -4
  110. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  111. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  112. package/dist/cjs/ic-toast.cjs.entry.js +7 -6
  113. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  114. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +4 -3
  115. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  116. package/dist/cjs/ic-toggle-button.cjs.entry.js +4 -3
  117. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  118. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -1
  119. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  120. package/dist/cjs/ic-typography.cjs.entry.js +4 -3
  121. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  122. package/dist/cjs/index.cjs.js +15 -0
  123. package/dist/cjs/index.cjs.js.map +1 -1
  124. package/dist/cjs/loader.cjs.js +1 -1
  125. package/dist/collection/assets/ai-icon.svg +1 -1
  126. package/dist/collection/assets/error-icon.svg +4 -4
  127. package/dist/collection/assets/info-icon.svg +4 -4
  128. package/dist/collection/assets/neutral-icon.svg +4 -4
  129. package/dist/collection/assets/success-icon.svg +4 -4
  130. package/dist/collection/assets/warning-icon.svg +4 -4
  131. package/dist/collection/components/ic-alert/ic-alert.js +1 -1
  132. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  133. package/dist/collection/components/ic-button/ic-button.js +14 -8
  134. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  135. package/dist/collection/components/ic-button/ic-button.stories.js +191 -0
  136. package/dist/collection/components/ic-card-vertical/ic-card-vertical.stories.js +10 -10
  137. package/dist/collection/components/ic-checkbox/ic-checkbox.css +5 -0
  138. package/dist/collection/components/ic-checkbox/ic-checkbox.js +2 -2
  139. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  140. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +2 -2
  141. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +11 -28
  142. package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
  143. package/dist/collection/components/ic-data-list/ic-data-list.stories.js +30 -6
  144. package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
  145. package/dist/collection/components/ic-dialog/ic-dialog.js +5 -3
  146. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  147. package/dist/collection/components/ic-dialog/ic-dialog.stories.js +40 -1
  148. package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
  149. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
  150. package/dist/collection/components/ic-hero/ic-hero.js +4 -4
  151. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
  152. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
  153. package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
  154. package/dist/collection/components/ic-input-label/ic-input-label.js +2 -2
  155. package/dist/collection/components/ic-input-validation/ic-input-validation.css +5 -0
  156. package/dist/collection/components/ic-input-validation/ic-input-validation.js +22 -6
  157. package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
  158. package/dist/collection/components/ic-input-validation/ic-input-validation.types.js.map +1 -1
  159. package/dist/collection/components/ic-layout-grid/ic-layout-grid.js +2 -2
  160. package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.js +2 -2
  161. package/dist/collection/components/ic-link/ic-link.js +1 -1
  162. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +5 -5
  163. package/dist/collection/components/ic-menu/ic-menu.css +2 -2
  164. package/dist/collection/components/ic-menu/ic-menu.js +4 -4
  165. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  166. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  167. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
  168. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
  169. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  170. package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
  171. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  172. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
  173. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
  174. package/dist/collection/components/ic-radio-group/ic-radio-group.js +4 -4
  175. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  176. package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +14 -15
  177. package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
  178. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  179. package/dist/collection/components/ic-search-bar/ic-search-bar.js +9 -9
  180. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  181. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  182. package/dist/collection/components/ic-select/ic-select.js +9 -9
  183. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  184. package/dist/collection/components/ic-select/ic-select_(multi).stories.js +8 -6
  185. package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +6 -3
  186. package/dist/collection/components/ic-select/ic-select_(single).stories.js +8 -6
  187. package/dist/collection/components/ic-select/test/a11y/ic-select.test.a11y.js +60 -0
  188. package/dist/collection/components/ic-select/test/a11y/ic-select.test.a11y.js.map +1 -0
  189. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +4 -4
  190. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  191. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  192. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  193. package/dist/collection/components/ic-step/ic-step.js +13 -13
  194. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  195. package/dist/collection/components/ic-switch/ic-switch.js +4 -4
  196. package/dist/collection/components/ic-tab-context/ic-tab-context.js +27 -2
  197. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  198. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  199. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  200. package/dist/collection/components/ic-text-field/ic-text-field.css +4 -0
  201. package/dist/collection/components/ic-text-field/ic-text-field.js +53 -19
  202. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  203. package/dist/collection/components/ic-text-field/ic-text-field.stories.js +102 -4
  204. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  205. package/dist/collection/components/ic-toast/ic-toast.js +3 -3
  206. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  207. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  208. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
  209. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  210. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
  211. package/dist/collection/components/ic-tooltip/ic-tooltip.js +6 -4
  212. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  213. package/dist/collection/components/ic-typography/ic-typography.js +2 -2
  214. package/dist/collection/index.js +1 -1
  215. package/dist/collection/index.js.map +1 -1
  216. package/dist/collection/utils/types.js.map +1 -1
  217. package/dist/components/constants.js +176 -0
  218. package/dist/components/constants.js.map +1 -0
  219. package/dist/components/helpers.js +2 -174
  220. package/dist/components/helpers.js.map +1 -1
  221. package/dist/components/ic-action-chip.js +1 -1
  222. package/dist/components/ic-alert.js +3 -2
  223. package/dist/components/ic-alert.js.map +1 -1
  224. package/dist/components/ic-back-to-top.js +1 -1
  225. package/dist/components/ic-badge.js +1 -1
  226. package/dist/components/ic-breadcrumb-group.js +1 -1
  227. package/dist/components/ic-breadcrumb2.js +1 -1
  228. package/dist/components/ic-button2.js +17 -11
  229. package/dist/components/ic-button2.js.map +1 -1
  230. package/dist/components/ic-card-vertical.js +1 -1
  231. package/dist/components/ic-checkbox-group.js +3 -3
  232. package/dist/components/ic-checkbox.js +4 -4
  233. package/dist/components/ic-checkbox.js.map +1 -1
  234. package/dist/components/ic-chip.js +1 -1
  235. package/dist/components/ic-data-list.js +2 -2
  236. package/dist/components/ic-data-row.js +3 -3
  237. package/dist/components/ic-dialog.js +6 -4
  238. package/dist/components/ic-dialog.js.map +1 -1
  239. package/dist/components/ic-divider2.js +1 -1
  240. package/dist/components/ic-empty-state.js +3 -3
  241. package/dist/components/ic-footer-link-group.js +1 -1
  242. package/dist/components/ic-footer-link.js +3 -3
  243. package/dist/components/ic-footer.js +2 -1
  244. package/dist/components/ic-footer.js.map +1 -1
  245. package/dist/components/ic-hero.js +5 -5
  246. package/dist/components/ic-horizontal-scroll2.js +6 -6
  247. package/dist/components/ic-input-component-container2.js +5 -4
  248. package/dist/components/ic-input-component-container2.js.map +1 -1
  249. package/dist/components/ic-input-container2.js +2 -2
  250. package/dist/components/ic-input-label2.js +3 -3
  251. package/dist/components/ic-input-validation2.js +23 -7
  252. package/dist/components/ic-input-validation2.js.map +1 -1
  253. package/dist/components/ic-layout-grid-item.js +2 -2
  254. package/dist/components/ic-layout-grid.js +2 -2
  255. package/dist/components/ic-link2.js +3 -2
  256. package/dist/components/ic-link2.js.map +1 -1
  257. package/dist/components/ic-loading-indicator2.js +5 -5
  258. package/dist/components/ic-menu-group.js +2 -2
  259. package/dist/components/ic-menu-item2.js +1 -1
  260. package/dist/components/ic-menu2.js +6 -6
  261. package/dist/components/ic-menu2.js.map +1 -1
  262. package/dist/components/ic-navigation-button.js +2 -1
  263. package/dist/components/ic-navigation-button.js.map +1 -1
  264. package/dist/components/ic-navigation-group.js +2 -2
  265. package/dist/components/ic-navigation-item.js +1 -1
  266. package/dist/components/ic-navigation-menu2.js +5 -5
  267. package/dist/components/ic-navigation-menu2.js.map +1 -1
  268. package/dist/components/ic-page-header.js +7 -7
  269. package/dist/components/ic-pagination-item2.js +2 -2
  270. package/dist/components/ic-pagination.js +4 -4
  271. package/dist/components/ic-popover-menu.js +5 -5
  272. package/dist/components/ic-popover-menu.js.map +1 -1
  273. package/dist/components/ic-radio-group.js +5 -5
  274. package/dist/components/ic-radio-group.js.map +1 -1
  275. package/dist/components/ic-radio-option.js +5 -5
  276. package/dist/components/ic-radio-option.js.map +1 -1
  277. package/dist/components/ic-search-bar.js +10 -10
  278. package/dist/components/ic-search-bar.js.map +1 -1
  279. package/dist/components/ic-section-container2.js +2 -2
  280. package/dist/components/ic-select.js +11 -10
  281. package/dist/components/ic-select.js.map +1 -1
  282. package/dist/components/ic-side-navigation.js +5 -5
  283. package/dist/components/ic-side-navigation.js.map +1 -1
  284. package/dist/components/ic-skeleton.js +2 -2
  285. package/dist/components/ic-skip-link.js +2 -2
  286. package/dist/components/ic-status-tag.js +2 -2
  287. package/dist/components/ic-step.js +14 -14
  288. package/dist/components/ic-step.js.map +1 -1
  289. package/dist/components/ic-stepper.js +2 -2
  290. package/dist/components/ic-switch.js +5 -5
  291. package/dist/components/ic-tab-context.js +11 -2
  292. package/dist/components/ic-tab-context.js.map +1 -1
  293. package/dist/components/ic-tab-group.js +2 -2
  294. package/dist/components/ic-tab-panel.js +2 -2
  295. package/dist/components/ic-text-field.js +31 -21
  296. package/dist/components/ic-text-field.js.map +1 -1
  297. package/dist/components/ic-theme.js +3 -2
  298. package/dist/components/ic-theme.js.map +1 -1
  299. package/dist/components/ic-toast-region.js +1 -1
  300. package/dist/components/ic-toast.js +5 -4
  301. package/dist/components/ic-toast.js.map +1 -1
  302. package/dist/components/ic-toggle-button-group.js +2 -2
  303. package/dist/components/ic-toggle-button.js +3 -3
  304. package/dist/components/ic-toggle-button.js.map +1 -1
  305. package/dist/components/ic-tooltip2.js +6 -4
  306. package/dist/components/ic-tooltip2.js.map +1 -1
  307. package/dist/components/ic-top-navigation.js +1 -1
  308. package/dist/components/ic-typography2.js +2 -2
  309. package/dist/components/index.js +1 -0
  310. package/dist/components/index.js.map +1 -1
  311. package/dist/core/core.css +32 -4
  312. package/dist/core/core.esm.js +1 -1
  313. package/dist/core/core.esm.js.map +1 -1
  314. package/dist/core/index.esm.js +1 -1
  315. package/dist/core/p-01aeffca.entry.js +2 -0
  316. package/dist/core/{p-b52000d9.entry.js.map → p-01aeffca.entry.js.map} +1 -1
  317. package/dist/core/p-0201abbf.entry.js +2 -0
  318. package/dist/core/{p-ea778379.entry.js.map → p-0201abbf.entry.js.map} +1 -1
  319. package/dist/core/p-02c2c31f.entry.js +2 -0
  320. package/dist/core/{p-6a576a8b.entry.js.map → p-02c2c31f.entry.js.map} +1 -1
  321. package/dist/core/p-0809aff4.entry.js +2 -0
  322. package/dist/core/{p-1e2f40b0.entry.js.map → p-0809aff4.entry.js.map} +1 -1
  323. package/dist/core/p-19366be6.entry.js +2 -0
  324. package/dist/core/{p-19cf2327.entry.js.map → p-19366be6.entry.js.map} +1 -1
  325. package/dist/core/p-1ab63899.entry.js +2 -0
  326. package/dist/core/{p-ef4b5469.entry.js.map → p-1ab63899.entry.js.map} +1 -1
  327. package/dist/core/p-1d4dfef1.entry.js +2 -0
  328. package/dist/core/{p-661ae402.entry.js.map → p-1d4dfef1.entry.js.map} +1 -1
  329. package/dist/core/p-1dab47b1.entry.js +2 -0
  330. package/dist/core/{p-72a9909c.entry.js.map → p-1dab47b1.entry.js.map} +1 -1
  331. package/dist/core/p-23b223bf.entry.js +2 -0
  332. package/dist/core/{p-f309d3af.entry.js.map → p-23b223bf.entry.js.map} +1 -1
  333. package/dist/core/p-35ee7c53.entry.js +2 -0
  334. package/dist/core/{p-9eeb5e85.entry.js.map → p-35ee7c53.entry.js.map} +1 -1
  335. package/dist/core/{p-287e5c17.entry.js → p-37d217b5.entry.js} +2 -2
  336. package/dist/core/{p-df88ff5b.entry.js → p-37daa8fe.entry.js} +2 -2
  337. package/dist/core/p-3a78bf6e.entry.js +2 -0
  338. package/dist/core/{p-2f4f392f.entry.js.map → p-3a78bf6e.entry.js.map} +1 -1
  339. package/dist/core/p-3f55bb5b.entry.js +2 -0
  340. package/dist/core/{p-0c0c6a9e.entry.js.map → p-3f55bb5b.entry.js.map} +1 -1
  341. package/dist/core/p-402813c9.entry.js +2 -0
  342. package/dist/core/{p-9323c234.entry.js.map → p-402813c9.entry.js.map} +1 -1
  343. package/dist/core/p-402c2455.entry.js +2 -0
  344. package/dist/core/{p-bb4ce810.entry.js.map → p-402c2455.entry.js.map} +1 -1
  345. package/dist/core/p-46423f42.entry.js +2 -0
  346. package/dist/core/{p-b0d488d0.entry.js.map → p-46423f42.entry.js.map} +1 -1
  347. package/dist/core/{p-45dd12ee.entry.js → p-4747c39f.entry.js} +2 -2
  348. package/dist/core/p-4747c39f.entry.js.map +1 -0
  349. package/dist/core/{p-ffac41d6.entry.js → p-492fcb51.entry.js} +2 -2
  350. package/dist/core/p-4a2c02b2.entry.js +2 -0
  351. package/dist/core/{p-711bfeed.entry.js.map → p-4a2c02b2.entry.js.map} +1 -1
  352. package/dist/core/p-4dd8add9.entry.js +2 -0
  353. package/dist/core/{p-6ed0ac48.entry.js.map → p-4dd8add9.entry.js.map} +1 -1
  354. package/dist/core/p-515ded3f.entry.js +2 -0
  355. package/dist/core/{p-41f92698.entry.js.map → p-515ded3f.entry.js.map} +1 -1
  356. package/dist/core/p-52a2f800.entry.js +2 -0
  357. package/dist/core/p-52a2f800.entry.js.map +1 -0
  358. package/dist/core/{p-6e8ef73c.entry.js → p-57721431.entry.js} +2 -2
  359. package/dist/core/p-57803949.entry.js +2 -0
  360. package/dist/core/{p-f6a02202.entry.js.map → p-57803949.entry.js.map} +1 -1
  361. package/dist/core/p-58b8d154.entry.js +2 -0
  362. package/dist/core/{p-cbe0d1bb.entry.js.map → p-58b8d154.entry.js.map} +1 -1
  363. package/dist/core/p-5c6efed3.entry.js +2 -0
  364. package/dist/core/{p-3dc54847.entry.js.map → p-5c6efed3.entry.js.map} +1 -1
  365. package/dist/core/{p-5fbc8e62.entry.js → p-5fcfcfb6.entry.js} +2 -2
  366. package/dist/core/p-641c26c4.js +2 -0
  367. package/dist/core/p-641c26c4.js.map +1 -0
  368. package/dist/core/p-65a3c216.entry.js +2 -0
  369. package/dist/core/{p-15dbccc2.entry.js.map → p-65a3c216.entry.js.map} +1 -1
  370. package/dist/core/p-69412f61.entry.js +2 -0
  371. package/dist/core/{p-21cf2beb.entry.js.map → p-69412f61.entry.js.map} +1 -1
  372. package/dist/core/p-69cc0f7d.entry.js +2 -0
  373. package/dist/core/{p-6014ab64.entry.js.map → p-69cc0f7d.entry.js.map} +1 -1
  374. package/dist/core/p-6ceedfa8.js +2 -0
  375. package/dist/core/p-6ceedfa8.js.map +1 -0
  376. package/dist/core/p-75a9b2e4.entry.js +2 -0
  377. package/dist/core/p-75a9b2e4.entry.js.map +1 -0
  378. package/dist/core/p-75e0278a.entry.js +2 -0
  379. package/dist/core/{p-4ca782eb.entry.js.map → p-75e0278a.entry.js.map} +1 -1
  380. package/dist/core/p-8326db29.entry.js +2 -0
  381. package/dist/core/{p-3e5d7a3d.entry.js.map → p-8326db29.entry.js.map} +1 -1
  382. package/dist/core/p-8af9413c.entry.js +2 -0
  383. package/dist/core/p-8af9413c.entry.js.map +1 -0
  384. package/dist/core/p-8d1fbbeb.entry.js +2 -0
  385. package/dist/core/{p-7cd4f6a6.entry.js.map → p-8d1fbbeb.entry.js.map} +1 -1
  386. package/dist/core/p-8d29c0fa.entry.js +2 -0
  387. package/dist/core/{p-52748d5c.entry.js.map → p-8d29c0fa.entry.js.map} +1 -1
  388. package/dist/core/{p-ea061ccf.entry.js → p-9a8bcb78.entry.js} +2 -2
  389. package/dist/core/{p-8b5022bc.entry.js → p-9cf6ccfd.entry.js} +2 -2
  390. package/dist/core/p-a468df37.entry.js +2 -0
  391. package/dist/core/{p-fc3b1155.entry.js.map → p-a468df37.entry.js.map} +1 -1
  392. package/dist/core/p-a48b581a.entry.js +2 -0
  393. package/dist/core/{p-9f36791b.entry.js.map → p-a48b581a.entry.js.map} +1 -1
  394. package/dist/core/p-a4e67ab8.entry.js +2 -0
  395. package/dist/core/{p-4d1a3036.entry.js.map → p-a4e67ab8.entry.js.map} +1 -1
  396. package/dist/core/p-aab838e5.entry.js +2 -0
  397. package/dist/core/{p-9c013333.entry.js.map → p-aab838e5.entry.js.map} +1 -1
  398. package/dist/core/p-abb9dccb.entry.js +2 -0
  399. package/dist/core/{p-af9c391d.entry.js.map → p-abb9dccb.entry.js.map} +1 -1
  400. package/dist/core/{p-999f0a5d.entry.js → p-b4a2f6fa.entry.js} +2 -2
  401. package/dist/core/p-b80d408f.entry.js +2 -0
  402. package/dist/core/p-b80d408f.entry.js.map +1 -0
  403. package/dist/core/p-b9018261.entry.js +2 -0
  404. package/dist/core/{p-0d680d19.entry.js.map → p-b9018261.entry.js.map} +1 -1
  405. package/dist/core/p-c81ffadd.entry.js +2 -0
  406. package/dist/core/{p-595a4d06.entry.js.map → p-c81ffadd.entry.js.map} +1 -1
  407. package/dist/core/p-cd63bcf2.entry.js +2 -0
  408. package/dist/core/p-cd63bcf2.entry.js.map +1 -0
  409. package/dist/core/p-cdd04ec2.entry.js +2 -0
  410. package/dist/core/{p-41ef74a7.entry.js.map → p-cdd04ec2.entry.js.map} +1 -1
  411. package/dist/core/p-d27e46ac.entry.js +2 -0
  412. package/dist/core/{p-cf631191.entry.js.map → p-d27e46ac.entry.js.map} +1 -1
  413. package/dist/core/p-d35f8bd4.entry.js +2 -0
  414. package/dist/core/{p-493eaabb.entry.js.map → p-d35f8bd4.entry.js.map} +1 -1
  415. package/dist/core/p-d6b3e02f.entry.js +2 -0
  416. package/dist/core/p-d6b3e02f.entry.js.map +1 -0
  417. package/dist/core/p-d7bd5aa0.entry.js +2 -0
  418. package/dist/core/p-d7bd5aa0.entry.js.map +1 -0
  419. package/dist/core/p-ed69f110.entry.js +2 -0
  420. package/dist/core/p-ed69f110.entry.js.map +1 -0
  421. package/dist/core/p-eddc5517.entry.js +2 -0
  422. package/dist/core/{p-313a8a2f.entry.js.map → p-eddc5517.entry.js.map} +1 -1
  423. package/dist/core/p-f045f59d.entry.js +2 -0
  424. package/dist/core/{p-317e005f.entry.js.map → p-f045f59d.entry.js.map} +1 -1
  425. package/dist/core/p-f086d6df.entry.js +2 -0
  426. package/dist/core/{p-43324339.entry.js.map → p-f086d6df.entry.js.map} +1 -1
  427. package/dist/core/p-f17e1525.entry.js +2 -0
  428. package/dist/core/{p-a77364f5.entry.js.map → p-f17e1525.entry.js.map} +1 -1
  429. package/dist/core/p-f78f34ce.entry.js +2 -0
  430. package/dist/core/{p-1d37ac1c.entry.js.map → p-f78f34ce.entry.js.map} +1 -1
  431. package/dist/core/p-fd488ed7.entry.js +2 -0
  432. package/dist/core/{p-a602a8e1.entry.js.map → p-fd488ed7.entry.js.map} +1 -1
  433. package/dist/core/p-ffc608a1.entry.js +2 -0
  434. package/dist/core/{p-8a4b12e4.entry.js.map → p-ffc608a1.entry.js.map} +1 -1
  435. package/dist/esm/constants-48759bda.js +176 -0
  436. package/dist/esm/constants-48759bda.js.map +1 -0
  437. package/dist/esm/core.js +1 -1
  438. package/dist/esm/{helpers-56631aa0.js → helpers-d8189e9d.js} +3 -175
  439. package/dist/esm/helpers-d8189e9d.js.map +1 -0
  440. package/dist/esm/ic-accordion-group.entry.js +2 -1
  441. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  442. package/dist/esm/ic-accordion.entry.js +2 -1
  443. package/dist/esm/ic-accordion.entry.js.map +1 -1
  444. package/dist/esm/ic-action-chip.entry.js +2 -1
  445. package/dist/esm/ic-action-chip.entry.js.map +1 -1
  446. package/dist/esm/ic-alert.entry.js +3 -2
  447. package/dist/esm/ic-alert.entry.js.map +1 -1
  448. package/dist/esm/ic-back-to-top.entry.js +2 -1
  449. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  450. package/dist/esm/ic-badge.entry.js +2 -1
  451. package/dist/esm/ic-badge.entry.js.map +1 -1
  452. package/dist/esm/ic-breadcrumb-group.entry.js +2 -1
  453. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  454. package/dist/esm/ic-breadcrumb.entry.js +2 -1
  455. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  456. package/dist/esm/ic-button_3.entry.js +25 -18
  457. package/dist/esm/ic-button_3.entry.js.map +1 -1
  458. package/dist/esm/ic-card-vertical.entry.js +2 -1
  459. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  460. package/dist/esm/ic-checkbox-group.entry.js +4 -3
  461. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  462. package/dist/esm/ic-checkbox.entry.js +5 -4
  463. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  464. package/dist/esm/ic-chip.entry.js +2 -1
  465. package/dist/esm/ic-chip.entry.js.map +1 -1
  466. package/dist/esm/ic-data-list.entry.js +2 -2
  467. package/dist/esm/ic-data-row.entry.js +4 -3
  468. package/dist/esm/ic-data-row.entry.js.map +1 -1
  469. package/dist/esm/ic-dialog.entry.js +7 -4
  470. package/dist/esm/ic-dialog.entry.js.map +1 -1
  471. package/dist/esm/ic-divider.entry.js +2 -1
  472. package/dist/esm/ic-divider.entry.js.map +1 -1
  473. package/dist/esm/ic-empty-state.entry.js +4 -3
  474. package/dist/esm/ic-empty-state.entry.js.map +1 -1
  475. package/dist/esm/ic-footer-link-group.entry.js +2 -1
  476. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  477. package/dist/esm/ic-footer-link.entry.js +4 -3
  478. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  479. package/dist/esm/ic-footer.entry.js +2 -1
  480. package/dist/esm/ic-footer.entry.js.map +1 -1
  481. package/dist/esm/ic-hero.entry.js +6 -5
  482. package/dist/esm/ic-hero.entry.js.map +1 -1
  483. package/dist/esm/ic-horizontal-scroll.entry.js +7 -6
  484. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  485. package/dist/esm/ic-input-component-container_3.entry.js +12 -11
  486. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  487. package/dist/esm/ic-input-label_2.entry.js +23 -9
  488. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  489. package/dist/esm/ic-layout-grid-item.entry.js +2 -2
  490. package/dist/esm/ic-layout-grid.entry.js +2 -2
  491. package/dist/esm/ic-link.entry.js +3 -2
  492. package/dist/esm/ic-link.entry.js.map +1 -1
  493. package/dist/esm/ic-menu-group.entry.js +3 -2
  494. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  495. package/dist/esm/ic-menu-item.entry.js +2 -1
  496. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  497. package/dist/esm/ic-navigation-button.entry.js +2 -1
  498. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  499. package/dist/esm/ic-navigation-group.entry.js +3 -2
  500. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  501. package/dist/esm/ic-navigation-item.entry.js +2 -1
  502. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  503. package/dist/esm/ic-navigation-menu.entry.js +6 -5
  504. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  505. package/dist/esm/ic-page-header.entry.js +8 -7
  506. package/dist/esm/ic-page-header.entry.js.map +1 -1
  507. package/dist/esm/ic-pagination-item.entry.js +3 -2
  508. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  509. package/dist/esm/ic-pagination.entry.js +6 -5
  510. package/dist/esm/ic-pagination.entry.js.map +1 -1
  511. package/dist/esm/ic-popover-menu.entry.js +6 -5
  512. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  513. package/dist/esm/ic-radio-group.entry.js +6 -5
  514. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  515. package/dist/esm/ic-radio-option.entry.js +6 -5
  516. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  517. package/dist/esm/ic-search-bar.entry.js +11 -10
  518. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  519. package/dist/esm/ic-section-container.entry.js +2 -2
  520. package/dist/esm/ic-select.entry.js +11 -10
  521. package/dist/esm/ic-select.entry.js.map +1 -1
  522. package/dist/esm/ic-side-navigation.entry.js +6 -5
  523. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  524. package/dist/esm/ic-skeleton.entry.js +2 -2
  525. package/dist/esm/ic-skip-link.entry.js +2 -2
  526. package/dist/esm/ic-status-tag.entry.js +4 -3
  527. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  528. package/dist/esm/ic-step.entry.js +15 -14
  529. package/dist/esm/ic-step.entry.js.map +1 -1
  530. package/dist/esm/ic-stepper.entry.js +4 -3
  531. package/dist/esm/ic-stepper.entry.js.map +1 -1
  532. package/dist/esm/ic-switch.entry.js +6 -5
  533. package/dist/esm/ic-switch.entry.js.map +1 -1
  534. package/dist/esm/ic-tab-context.entry.js +10 -2
  535. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  536. package/dist/esm/ic-tab-group.entry.js +4 -3
  537. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  538. package/dist/esm/ic-tab-panel.entry.js +2 -2
  539. package/dist/esm/ic-tab.entry.js +2 -1
  540. package/dist/esm/ic-tab.entry.js.map +1 -1
  541. package/dist/esm/ic-text-field.entry.js +30 -21
  542. package/dist/esm/ic-text-field.entry.js.map +1 -1
  543. package/dist/esm/ic-theme.entry.js +3 -2
  544. package/dist/esm/ic-theme.entry.js.map +1 -1
  545. package/dist/esm/ic-toast-region.entry.js +1 -1
  546. package/dist/esm/ic-toast.entry.js +5 -4
  547. package/dist/esm/ic-toast.entry.js.map +1 -1
  548. package/dist/esm/ic-toggle-button-group.entry.js +4 -3
  549. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  550. package/dist/esm/ic-toggle-button.entry.js +4 -3
  551. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  552. package/dist/esm/ic-top-navigation.entry.js +2 -1
  553. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  554. package/dist/esm/ic-typography.entry.js +4 -3
  555. package/dist/esm/ic-typography.entry.js.map +1 -1
  556. package/dist/esm/index.js +1 -1
  557. package/dist/esm/loader.js +1 -1
  558. package/dist/types/components/ic-button/ic-button.d.ts +1 -0
  559. package/dist/types/components/ic-dialog/ic-dialog.d.ts +1 -0
  560. package/dist/types/components/ic-input-validation/ic-input-validation.d.ts +2 -0
  561. package/dist/types/components/ic-input-validation/ic-input-validation.types.d.ts +1 -1
  562. package/dist/types/components/ic-select/test/a11y/ic-select.test.a11y.d.ts +1 -0
  563. package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +4 -0
  564. package/dist/types/components/ic-text-field/ic-text-field.d.ts +6 -1
  565. package/dist/types/components.d.ts +14 -2
  566. package/dist/types/index.d.ts +1 -0
  567. package/dist/types/utils/types.d.ts +1 -0
  568. package/hydrate/index.js +242 -203
  569. package/hydrate/index.mjs +242 -203
  570. package/package.json +3 -3
  571. package/vscode-data.json +21 -0
  572. package/dist/cjs/helpers-a0e78e2e.js.map +0 -1
  573. package/dist/core/p-0c0c6a9e.entry.js +0 -2
  574. package/dist/core/p-0d680d19.entry.js +0 -2
  575. package/dist/core/p-15dbccc2.entry.js +0 -2
  576. package/dist/core/p-19cf2327.entry.js +0 -2
  577. package/dist/core/p-1d37ac1c.entry.js +0 -2
  578. package/dist/core/p-1e2f40b0.entry.js +0 -2
  579. package/dist/core/p-21cf2beb.entry.js +0 -2
  580. package/dist/core/p-25007ec9.js +0 -2
  581. package/dist/core/p-25007ec9.js.map +0 -1
  582. package/dist/core/p-28efe829.entry.js +0 -2
  583. package/dist/core/p-28efe829.entry.js.map +0 -1
  584. package/dist/core/p-2f4f392f.entry.js +0 -2
  585. package/dist/core/p-313a8a2f.entry.js +0 -2
  586. package/dist/core/p-317e005f.entry.js +0 -2
  587. package/dist/core/p-3dc54847.entry.js +0 -2
  588. package/dist/core/p-3e5d7a3d.entry.js +0 -2
  589. package/dist/core/p-41ef74a7.entry.js +0 -2
  590. package/dist/core/p-41f92698.entry.js +0 -2
  591. package/dist/core/p-43324339.entry.js +0 -2
  592. package/dist/core/p-45dd12ee.entry.js.map +0 -1
  593. package/dist/core/p-47f6dac2.entry.js +0 -2
  594. package/dist/core/p-47f6dac2.entry.js.map +0 -1
  595. package/dist/core/p-493eaabb.entry.js +0 -2
  596. package/dist/core/p-4ca782eb.entry.js +0 -2
  597. package/dist/core/p-4d1a3036.entry.js +0 -2
  598. package/dist/core/p-52748d5c.entry.js +0 -2
  599. package/dist/core/p-595a4d06.entry.js +0 -2
  600. package/dist/core/p-5f68f62b.entry.js +0 -2
  601. package/dist/core/p-5f68f62b.entry.js.map +0 -1
  602. package/dist/core/p-6014ab64.entry.js +0 -2
  603. package/dist/core/p-661ae402.entry.js +0 -2
  604. package/dist/core/p-6a576a8b.entry.js +0 -2
  605. package/dist/core/p-6ed0ac48.entry.js +0 -2
  606. package/dist/core/p-711bfeed.entry.js +0 -2
  607. package/dist/core/p-72a9909c.entry.js +0 -2
  608. package/dist/core/p-742a9181.entry.js +0 -2
  609. package/dist/core/p-742a9181.entry.js.map +0 -1
  610. package/dist/core/p-7cd4f6a6.entry.js +0 -2
  611. package/dist/core/p-8a4b12e4.entry.js +0 -2
  612. package/dist/core/p-9323c234.entry.js +0 -2
  613. package/dist/core/p-97b93ddf.entry.js +0 -2
  614. package/dist/core/p-97b93ddf.entry.js.map +0 -1
  615. package/dist/core/p-9c013333.entry.js +0 -2
  616. package/dist/core/p-9eeb5e85.entry.js +0 -2
  617. package/dist/core/p-9f36791b.entry.js +0 -2
  618. package/dist/core/p-a602a8e1.entry.js +0 -2
  619. package/dist/core/p-a77364f5.entry.js +0 -2
  620. package/dist/core/p-af9c391d.entry.js +0 -2
  621. package/dist/core/p-b0d488d0.entry.js +0 -2
  622. package/dist/core/p-b52000d9.entry.js +0 -2
  623. package/dist/core/p-bb4ce810.entry.js +0 -2
  624. package/dist/core/p-cbe0d1bb.entry.js +0 -2
  625. package/dist/core/p-ceea1712.entry.js +0 -2
  626. package/dist/core/p-ceea1712.entry.js.map +0 -1
  627. package/dist/core/p-cf631191.entry.js +0 -2
  628. package/dist/core/p-e652ab09.entry.js +0 -2
  629. package/dist/core/p-e652ab09.entry.js.map +0 -1
  630. package/dist/core/p-e876e47c.entry.js +0 -2
  631. package/dist/core/p-e876e47c.entry.js.map +0 -1
  632. package/dist/core/p-ea778379.entry.js +0 -2
  633. package/dist/core/p-ef4b5469.entry.js +0 -2
  634. package/dist/core/p-f309d3af.entry.js +0 -2
  635. package/dist/core/p-f6a02202.entry.js +0 -2
  636. package/dist/core/p-fc3b1155.entry.js +0 -2
  637. package/dist/esm/helpers-56631aa0.js.map +0 -1
  638. /package/dist/core/{p-287e5c17.entry.js.map → p-37d217b5.entry.js.map} +0 -0
  639. /package/dist/core/{p-df88ff5b.entry.js.map → p-37daa8fe.entry.js.map} +0 -0
  640. /package/dist/core/{p-ffac41d6.entry.js.map → p-492fcb51.entry.js.map} +0 -0
  641. /package/dist/core/{p-6e8ef73c.entry.js.map → p-57721431.entry.js.map} +0 -0
  642. /package/dist/core/{p-5fbc8e62.entry.js.map → p-5fcfcfb6.entry.js.map} +0 -0
  643. /package/dist/core/{p-ea061ccf.entry.js.map → p-9a8bcb78.entry.js.map} +0 -0
  644. /package/dist/core/{p-8b5022bc.entry.js.map → p-9cf6ccfd.entry.js.map} +0 -0
  645. /package/dist/core/{p-999f0a5d.entry.js.map → p-b4a2f6fa.entry.js.map} +0 -0
@@ -1,6 +1,6 @@
1
- <svg aria-labelledby="info-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">
2
- <title id="info-title">For your information</title>
3
- <g id="info">
4
- <path id="Vector" d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 17C11.45 17 11 16.55 11 16V12C11 11.45 11.45 11 12 11C12.55 11 13 11.45 13 12V16C13 16.55 12.55 17 12 17ZM13 9H11V7H13V9Z" />
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">
2
+ <title>For your information</title>
3
+ <g>
4
+ <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 17C11.45 17 11 16.55 11 16V12C11 11.45 11.45 11 12 11C12.55 11 13 11.45 13 12V16C13 16.55 12.55 17 12 17ZM13 9H11V7H13V9Z" />
5
5
  </g>
6
6
  </svg>
@@ -1,6 +1,6 @@
1
- <svg aria-labelledby="neutral-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">
2
- <title id="neutral-title">Neutral</title>
3
- <g id="Icon">
4
- <path id="Vector" d="M19.5 3H5.5C4.4 3 3.5 3.9 3.5 5V19C3.5 20.1 4.4 21 5.5 21H19.5C20.6 21 21.5 20.1 21.5 19V5C21.5 3.9 20.6 3 19.5 3ZM12.51 18C11.81 18 11.25 17.44 11.25 16.74C11.25 16.03 11.81 15.49 12.51 15.49C13.22 15.49 13.76 16.03 13.76 16.74C13.75 17.43 13.22 18 12.51 18ZM15.52 10.6C14.76 11.71 14.04 12.06 13.65 12.77C13.55 12.95 13.49 13.09 13.46 13.4C13.41 13.85 13.01 14.18 12.56 14.18H12.5C11.98 14.18 11.57 13.74 11.62 13.22C11.65 12.88 11.73 12.53 11.92 12.19C12.41 11.32 13.34 10.8 13.88 10.03C14.45 9.22 14.13 7.7 12.51 7.7C11.8 7.7 11.33 8.06 11.04 8.49C10.79 8.85 10.35 9.02 9.94 8.85C9.41 8.64 9.22 8 9.54 7.54C10.15 6.65 11.17 6 12.49 6C13.97 6 14.98 6.67 15.5 7.52C15.94 8.24 16.2 9.59 15.52 10.6Z" />
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">
2
+ <title>Neutral</title>
3
+ <g>
4
+ <path d="M19.5 3H5.5C4.4 3 3.5 3.9 3.5 5V19C3.5 20.1 4.4 21 5.5 21H19.5C20.6 21 21.5 20.1 21.5 19V5C21.5 3.9 20.6 3 19.5 3ZM12.51 18C11.81 18 11.25 17.44 11.25 16.74C11.25 16.03 11.81 15.49 12.51 15.49C13.22 15.49 13.76 16.03 13.76 16.74C13.75 17.43 13.22 18 12.51 18ZM15.52 10.6C14.76 11.71 14.04 12.06 13.65 12.77C13.55 12.95 13.49 13.09 13.46 13.4C13.41 13.85 13.01 14.18 12.56 14.18H12.5C11.98 14.18 11.57 13.74 11.62 13.22C11.65 12.88 11.73 12.53 11.92 12.19C12.41 11.32 13.34 10.8 13.88 10.03C14.45 9.22 14.13 7.7 12.51 7.7C11.8 7.7 11.33 8.06 11.04 8.49C10.79 8.85 10.35 9.02 9.94 8.85C9.41 8.64 9.22 8 9.54 7.54C10.15 6.65 11.17 6 12.49 6C13.97 6 14.98 6.67 15.5 7.52C15.94 8.24 16.2 9.59 15.52 10.6Z" />
5
5
  </g>
6
6
  </svg>
@@ -1,6 +1,6 @@
1
- <svg aria-labelledby="success-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">
2
- <title id="success-title">Success</title>
3
- <g id="check_circle">
4
- <path id="Vector" d="M12.5 2C6.98 2 2.5 6.48 2.5 12C2.5 17.52 6.98 22 12.5 22C18.02 22 22.5 17.52 22.5 12C22.5 6.48 18.02 2 12.5 2ZM9.79 16.29L6.2 12.7C5.81 12.31 5.81 11.68 6.2 11.29C6.59 10.9 7.22 10.9 7.61 11.29L10.5 14.17L17.38 7.29C17.77 6.9 18.4 6.9 18.79 7.29C19.18 7.68 19.18 8.31 18.79 8.7L11.2 16.29C10.82 16.68 10.18 16.68 9.79 16.29Z" />
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">
2
+ <title>Success</title>
3
+ <g>
4
+ <path d="M12.5 2C6.98 2 2.5 6.48 2.5 12C2.5 17.52 6.98 22 12.5 22C18.02 22 22.5 17.52 22.5 12C22.5 6.48 18.02 2 12.5 2ZM9.79 16.29L6.2 12.7C5.81 12.31 5.81 11.68 6.2 11.29C6.59 10.9 7.22 10.9 7.61 11.29L10.5 14.17L17.38 7.29C17.77 6.9 18.4 6.9 18.79 7.29C19.18 7.68 19.18 8.31 18.79 8.7L11.2 16.29C10.82 16.68 10.18 16.68 9.79 16.29Z" />
5
5
  </g>
6
6
  </svg>
@@ -1,6 +1,6 @@
1
- <svg aria-labelledby="warning-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">
2
- <title id="warning-title">Warning</title>
3
- <g id="warning">
4
- <path id="Vector" d="M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z" />
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">
2
+ <title>Warning</title>
3
+ <g>
4
+ <path d="M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z" />
5
5
  </g>
6
6
  </svg>
@@ -116,7 +116,7 @@ export class Alert {
116
116
  }, ref: (el) => (this.messageEl = el) }, heading && (h("ic-typography", { class: {
117
117
  "alert-title": true,
118
118
  "alert-title-above": titleAbove || alertTitleWrap,
119
- }, variant: "subtitle-large", ref: (el) => (this.titleEl = el) }, h("p", null, heading))), h("slot", { name: "message" }, h("ic-typography", { variant: "body" }, message))), isSlotUsed(this.el, "action") && (h("div", { class: "alert-action-container" }, h("slot", { name: "action" })))), h("div", { class: "dismiss-icon-container" }, dismissible && (h("ic-button", { class: { "svg-container": true, "dismiss-icon": true }, innerHTML: closeIcon, onClick: dismissAction, variant: "icon", theme: "dark", title: "Dismiss" })))))));
119
+ }, variant: "subtitle-large", ref: (el) => (this.titleEl = el) }, h("p", null, heading))), h("slot", { name: "message" }, h("ic-typography", { variant: "body" }, message))), isSlotUsed(this.el, "action") && (h("div", { class: "alert-action-container" }, h("slot", { name: "action" })))), h("div", { class: "dismiss-icon-container" }, dismissible && (h("ic-button", { class: { "svg-container": true, "dismiss-icon": true }, innerHTML: closeIcon, onClick: dismissAction, variant: "icon-tertiary", theme: "dark", title: "Dismiss" })))))));
120
120
  }
121
121
  static get is() { return "ic-alert"; }
122
122
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"ic-alert.js","sourceRoot":"","sources":["../../../src/components/ic-alert/ic-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,IAAI,EACJ,CAAC,EACD,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EACL,UAAU,EACV,OAAO,EACP,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;GAIG;AAMH,MAAM,OAAO,KAAK;IALlB;QAMU,yBAAoB,GAA4B,IAAI,CAAC;QACrD,wBAAmB,GAA0B,IAAI,CAAC;QAClD,aAAQ,GAAY,KAAK,CAAC;QAMzB,mBAAc,GAAY,KAAK,CAAC;QAChC,YAAO,GAAY,IAAI,CAAC;QAEjC;;WAEG;QACK,cAAS,GAAY,IAAI,CAAC;QAElC;;WAEG;QACK,gBAAW,GAAY,KAAK,CAAC;QAErC;;WAEG;QACK,YAAO,GAAW,EAAE,CAAC;QAO7B;;WAEG;QACK,oBAAe,GAAY,IAAI,CAAC;QAExC;;WAEG;QACK,UAAK,GAAgB,SAAS,CAAC;QAMvC;;WAEG;QACK,eAAU,GAAY,KAAK,CAAC;QAEpC;;WAEG;QACK,YAAO,GAAqB,SAAS,CAAC;QA6DtC,kBAAa,GAAG,GAAS,EAAE;YACjC,IAAI,CAAC,SAAS,CAAC,IAAI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;6BAClD,EACD,OAAO,EAAC,gBAAgB,EACxB,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;4BAEhC,aAAI,OAAO,CAAK,CACF,CACjB;wBACD,YAAM,IAAI,EAAC,SAAS;4BAClB,qBAAe,OAAO,EAAC,MAAM,IAAE,OAAO,CAAiB,CAClD,CACH;oBACL,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAChC,WAAK,KAAK,EAAC,wBAAwB;wBACjC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG;gBACN,WAAK,KAAK,EAAC,wBAAwB,IAChC,WAAW,IAAI,CACd,iBACE,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,EACtD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,aAAa,EACtB,OAAO,EAAC,MAAM,EACd,KAAK,EAAC,MAAM,EACZ,KAAK,EAAC,SAAS,GACJ,CACd,CACG,CACF,CACD,CACR,CACF,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n Watch,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport {\n isSlotUsed,\n pxToRem,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcStatusVariants,\n IcThemeMode,\n IcThemeSettings,\n} from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n * @slot neutral-icon - A custom neutral icon is placed to the left of the title. This will override the default icon if used.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n private hostMutationObserver: MutationObserver | null = null;\n private systemThemeObserver: MediaQueryList | null = null;\n private darkMode: boolean = false;\n private messageEl?: HTMLDivElement;\n private titleEl?: HTMLIcTypographyElement;\n\n @Element() el: HTMLIcAlertElement;\n\n @State() alertTitleWrap: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced: boolean = true;\n\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible: boolean = false;\n\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading: string = \"\";\n\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n\n /**\n * If `true`, the default icon for the neutral variant will appear on the left of the alert.\n */\n @Prop() showDefaultIcon: boolean = true;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n themeChangeHandler(): void {\n if (this.theme !== \"inherit\") this.darkMode = this.theme === \"dark\";\n }\n\n /**\n * If `true`, the title and message will appear above and below instead of inline.\n */\n @Prop() titleAbove: boolean = false;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant: IcStatusVariants = \"neutral\";\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n this.systemThemeObserver?.removeEventListener(\n \"change\",\n this.darkModeChangeHandler\n );\n }\n\n componentWillLoad(): void {\n if (!this.el.closest(\"ic-theme\")) {\n this.systemThemeObserver = window.matchMedia(\n \"(prefers-color-scheme: dark)\"\n );\n this.systemThemeObserver.addEventListener(\n \"change\",\n this.darkModeChangeHandler\n );\n this.darkMode = this.systemThemeObserver.matches;\n }\n\n this.themeChangeHandler();\n }\n\n componentDidLoad(): void {\n if (Number(this.titleEl?.clientHeight) > 24) this.alertTitleWrap = true;\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"action\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n\n this.calculateMinHeight();\n }\n\n componentDidUpdate(): void {\n this.calculateMinHeight();\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n @Listen(\"icThemeChange\", { target: \"document\", capture: true })\n darkModeChangeHandler(\n ev: CustomEvent<IcThemeSettings> | MediaQueryListEvent\n ): void {\n this.darkMode = \"detail\" in ev ? ev.detail === \"dark\" : ev.matches;\n\n this.calculateMinHeight();\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private calculateMinHeight(): void {\n const contentHeight = Number(this.messageEl?.clientHeight);\n\n const minHeight = pxToRem(\n `${(contentHeight > 40 ? contentHeight : 52) + (this.darkMode ? 0 : 4)}`\n );\n\n if (this.el.style.getPropertyValue(\"--ic-alert-min-height\") !== minHeight)\n this.el.style.setProperty(\"--ic-alert-min-height\", minHeight);\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n showDefaultIcon,\n theme,\n alertTitleWrap,\n dismissAction,\n } = this;\n\n const Icon = () => {\n const iconClass = {\n \"alert-icon\": true,\n \"svg-container\": true,\n [`icon-${variant}`]: true,\n };\n\n if (variant === \"neutral\") {\n if (isSlotUsed(this.el, \"neutral-icon\")) {\n return (\n <div class={iconClass}>\n <slot name=\"neutral-icon\"></slot>\n </div>\n );\n } else if (!showDefaultIcon) {\n return <div class=\"icon-placeholder\"></div>;\n }\n }\n\n return (\n <span class={iconClass} innerHTML={VARIANT_ICONS[variant].icon}></span>\n );\n };\n\n return (\n visible && (\n <Host\n role={announced ? \"alert\" : null}\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div class={{ container: true, [`container-${variant}`]: true }}>\n <div class=\"alert-icon-container\">\n <div\n class={{ divider: true, [`divider-${variant}`]: true }}\n ></div>\n <Icon />\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n \"alert-message\": true,\n \"alert-message-title-above\": titleAbove || alertTitleWrap,\n }}\n ref={(el) => (this.messageEl = el)}\n >\n {heading && (\n <ic-typography\n class={{\n \"alert-title\": true,\n \"alert-title-above\": titleAbove || alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n ref={(el) => (this.titleEl = el)}\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{ \"svg-container\": true, \"dismiss-icon\": true }}\n innerHTML={closeIcon}\n onClick={dismissAction}\n variant=\"icon\"\n theme=\"dark\"\n title=\"Dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ic-alert.js","sourceRoot":"","sources":["../../../src/components/ic-alert/ic-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,IAAI,EACJ,CAAC,EACD,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EACL,UAAU,EACV,OAAO,EACP,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;GAIG;AAMH,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,CACR,CACF,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n Watch,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport {\n isSlotUsed,\n pxToRem,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcStatusVariants,\n IcThemeMode,\n IcThemeSettings,\n} from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n * @slot neutral-icon - A custom neutral icon is placed to the left of the title. This will override the default icon if used.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n private hostMutationObserver: MutationObserver | null = null;\n private systemThemeObserver: MediaQueryList | null = null;\n private darkMode: boolean = false;\n private messageEl?: HTMLDivElement;\n private titleEl?: HTMLIcTypographyElement;\n\n @Element() el: HTMLIcAlertElement;\n\n @State() alertTitleWrap: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced: boolean = true;\n\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible: boolean = false;\n\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading: string = \"\";\n\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n\n /**\n * If `true`, the default icon for the neutral variant will appear on the left of the alert.\n */\n @Prop() showDefaultIcon: boolean = true;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n themeChangeHandler(): void {\n if (this.theme !== \"inherit\") this.darkMode = this.theme === \"dark\";\n }\n\n /**\n * If `true`, the title and message will appear above and below instead of inline.\n */\n @Prop() titleAbove: boolean = false;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant: IcStatusVariants = \"neutral\";\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n this.systemThemeObserver?.removeEventListener(\n \"change\",\n this.darkModeChangeHandler\n );\n }\n\n componentWillLoad(): void {\n if (!this.el.closest(\"ic-theme\")) {\n this.systemThemeObserver = window.matchMedia(\n \"(prefers-color-scheme: dark)\"\n );\n this.systemThemeObserver.addEventListener(\n \"change\",\n this.darkModeChangeHandler\n );\n this.darkMode = this.systemThemeObserver.matches;\n }\n\n this.themeChangeHandler();\n }\n\n componentDidLoad(): void {\n if (Number(this.titleEl?.clientHeight) > 24) this.alertTitleWrap = true;\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"action\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n\n this.calculateMinHeight();\n }\n\n componentDidUpdate(): void {\n this.calculateMinHeight();\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n @Listen(\"icThemeChange\", { target: \"document\", capture: true })\n darkModeChangeHandler(\n ev: CustomEvent<IcThemeSettings> | MediaQueryListEvent\n ): void {\n this.darkMode = \"detail\" in ev ? ev.detail === \"dark\" : ev.matches;\n\n this.calculateMinHeight();\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private calculateMinHeight(): void {\n const contentHeight = Number(this.messageEl?.clientHeight);\n\n const minHeight = pxToRem(\n `${(contentHeight > 40 ? contentHeight : 52) + (this.darkMode ? 0 : 4)}`\n );\n\n if (this.el.style.getPropertyValue(\"--ic-alert-min-height\") !== minHeight)\n this.el.style.setProperty(\"--ic-alert-min-height\", minHeight);\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n showDefaultIcon,\n theme,\n alertTitleWrap,\n dismissAction,\n } = this;\n\n const Icon = () => {\n const iconClass = {\n \"alert-icon\": true,\n \"svg-container\": true,\n [`icon-${variant}`]: true,\n };\n\n if (variant === \"neutral\") {\n if (isSlotUsed(this.el, \"neutral-icon\")) {\n return (\n <div class={iconClass}>\n <slot name=\"neutral-icon\"></slot>\n </div>\n );\n } else if (!showDefaultIcon) {\n return <div class=\"icon-placeholder\"></div>;\n }\n }\n\n return (\n <span class={iconClass} innerHTML={VARIANT_ICONS[variant].icon}></span>\n );\n };\n\n return (\n visible && (\n <Host\n role={announced ? \"alert\" : null}\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div class={{ container: true, [`container-${variant}`]: true }}>\n <div class=\"alert-icon-container\">\n <div\n class={{ divider: true, [`divider-${variant}`]: true }}\n ></div>\n <Icon />\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n \"alert-message\": true,\n \"alert-message-title-above\": titleAbove || alertTitleWrap,\n }}\n ref={(el) => (this.messageEl = el)}\n >\n {heading && (\n <ic-typography\n class={{\n \"alert-title\": true,\n \"alert-title-above\": titleAbove || alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n ref={(el) => (this.titleEl = el)}\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{ \"svg-container\": true, \"dismiss-icon\": true }}\n innerHTML={closeIcon}\n onClick={dismissAction}\n variant=\"icon-tertiary\"\n theme=\"dark\"\n title=\"Dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"]}
@@ -229,6 +229,10 @@ export class Button {
229
229
  watchDisabledHandler() {
230
230
  removeDisabledFalse(this.disabled, this.el);
231
231
  }
232
+ watchVariantHandler(newVariant) {
233
+ if (newVariant === "icon")
234
+ this.variant = "icon-tertiary";
235
+ }
232
236
  disconnectedCallback() {
233
237
  var _a, _b;
234
238
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
@@ -261,6 +265,9 @@ export class Button {
261
265
  }
262
266
  }
263
267
  }
268
+ if (this.variant === "icon") {
269
+ this.variant = "icon-tertiary";
270
+ }
264
271
  }
265
272
  componentDidLoad() {
266
273
  this.updateTheme();
@@ -359,11 +366,7 @@ export class Button {
359
366
  const buttonId = hasTooltip
360
367
  ? `ic-button-with-tooltip-${id || buttonIdNum}`
361
368
  : undefined;
362
- const describedby = !hasTooltip
363
- ? describedById
364
- : variant !== "icon" || !ariaLabel
365
- ? `ic-tooltip-${buttonId}`
366
- : undefined;
369
+ const describedby = !hasTooltip ? describedById : `ic-tooltip-${buttonId}`;
367
370
  const hasLeftIcon = !!this.getSlottedIcon("left");
368
371
  const hasRightIcon = !!this.getSlottedIcon("right");
369
372
  const ButtonContent = () => this.hasRouterSlot() ? (h("slot", { name: "router-item" })) : (h(TagType, Object.assign({ class: "button", tabindex: 0, "aria-disabled": loading || disabled ? "true" : null, "aria-label": loading ? "Loading" : ariaLabel, "aria-expanded": dropdown && `${dropdownExpanded}` }, buttonAttrs, inheritedAttributes, { onFocus: onFocus, onBlur: onBlur, ref: (el) => (this.buttonEl = el), "aria-describedby": describedby, part: "button" }), loading ? (h("div", { class: "loading-container" }, h("ic-loading-indicator", { type: "linear", monochrome: monochrome, theme: theme }))) : (h(Fragment, null, (hasLeftIcon ||
@@ -373,7 +376,7 @@ export class Button {
373
376
  variant !== "destructive" && (h("span", { class: dropdownExpanded
374
377
  ? "dropdown-expanded"
375
378
  : "arrow-dropdown", innerHTML: arrowDropdown }))))));
376
- return (h(Host, { key: '93677b4fa42904890e9fa3b33297734b895f04a4', class: {
379
+ return (h(Host, { key: '1f58739b62e290b1b86fa82c9153e04711196367', class: {
377
380
  "ic-button-disabled": disabled && !loading,
378
381
  "ic-button-full-width": fullWidth,
379
382
  "ic-button-loading": loading,
@@ -389,7 +392,7 @@ export class Button {
389
392
  monochrome,
390
393
  "top-icon": isSlotUsed(this.el, "top-icon"),
391
394
  "with-badge": isSlotUsed(this.el, "badge"),
392
- }, onClick: handleClick, onKeyDown: handleKeyDown, "aria-owns": ariaOwnsId, "aria-controls": ariaControlsId, "aria-expanded": dropdown && `${dropdownExpanded}` }, hasTooltip && (h("ic-tooltip", { key: '273a8bb9c3146fc8fb2b177d842f6ac17a0db0fb', id: describedby, label: title || ariaLabel, target: buttonId, placement: tooltipPlacement, fixedPositioning: tooltipFixedPositioning, silent: isIconVariant() && !!ariaLabel }, h(ButtonContent, { key: '092785c68429f1458a74e2f9aa611179ce5d490c' }))), isSlotUsed(this.el, "badge") && h("slot", { key: '002e2fd22a45138708c9a188f87cb37c6c6c386d', name: "badge" }), !hasTooltip && h(ButtonContent, { key: '3d3634e2078b0d52e687cc4068e5e80f6ff8a8a2' }), describedByContent && (h("span", { key: '6e134f3c30402bb3217c284df65d72aca696043c', id: describedby, class: "ic-button-describedby" }, describedByContent))));
395
+ }, onClick: handleClick, onKeyDown: handleKeyDown, "aria-owns": ariaOwnsId, "aria-controls": ariaControlsId, "aria-expanded": dropdown && `${dropdownExpanded}` }, hasTooltip && (h("ic-tooltip", { key: 'fa067eeedb2f960436c693a0d8978a46eea9cc68', id: describedby, label: title || ariaLabel, target: buttonId, placement: tooltipPlacement, fixedPositioning: tooltipFixedPositioning, silent: isIconVariant() && !!ariaLabel }, h(ButtonContent, { key: 'a3565789687668d376a8c6e6044a0c3b1e864532' }))), isSlotUsed(this.el, "badge") && h("slot", { key: '1bacc47dfc65cce6880600906512a9262b6773cc', name: "badge" }), !hasTooltip && h(ButtonContent, { key: 'd00dc87862ffc939fc5c8341c686dddbc642eb02' }), describedByContent && (h("span", { key: '1d25a9c513d23e6a23e2e1d81ad036d1df47363c', id: describedby, class: "ic-button-describedby" }, describedByContent))));
393
396
  }
394
397
  static get is() { return "ic-button"; }
395
398
  static get encapsulation() { return "shadow"; }
@@ -1072,7 +1075,7 @@ export class Button {
1072
1075
  },
1073
1076
  "variant": {
1074
1077
  "type": "string",
1075
- "mutable": false,
1078
+ "mutable": true,
1076
1079
  "complexType": {
1077
1080
  "original": "IcButtonVariants",
1078
1081
  "resolved": "\"destructive\" | \"icon\" | \"icon-destructive\" | \"icon-primary\" | \"icon-secondary\" | \"icon-tertiary\" | \"primary\" | \"secondary\" | \"tertiary\"",
@@ -1184,6 +1187,9 @@ export class Button {
1184
1187
  return [{
1185
1188
  "propName": "disabled",
1186
1189
  "methodName": "watchDisabledHandler"
1190
+ }, {
1191
+ "propName": "variant",
1192
+ "methodName": "watchVariantHandler"
1187
1193
  }];
1188
1194
  }
1189
1195
  static get listeners() {
@@ -1 +1 @@
1
- {"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,CAAC,EACD,KAAK,EACL,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAIL,qBAAqB,GAItB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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 Fragment,\n} from \"@stencil/core\";\n\nimport {\n getBrandFromContext,\n handleHiddenFormButtonClick,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport { IcButtonTypes, IcButtonVariants } from \"./ic-button.types\";\nimport {\n IcSizes,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n IcButtonTooltipPlacement,\n IcIconPlacementOptions,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n * @slot top-icon - Content will be placed above the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n * @slot router-item - Handle routing by nesting your routes in this slot. Setting loading to true will have no impact on this slot.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl?: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip = false;\n private id: string | null;\n private inheritedAttributes: { [k: string]: string } = {};\n private describedbyEl: HTMLElement | null = null;\n private describedById?: string;\n private mutationObserver: MutationObserver | null = null;\n private hostMutationObserver: MutationObserver | null = null;\n private routerSlot: HTMLElement | null;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel = \"\";\n @State() describedByContent? = \"\";\n @State() title = \"\";\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept = \"*\";\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 = 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 = 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 = 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 = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName = `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 = 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 = false;\n\n /**\n * If `true`, the button will display as monochromatic in either `light` or `dark` theme.\n */\n @Prop({ mutable: true }) monochrome = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles?: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop({ mutable: true }) theme: IcThemeMode = \"inherit\";\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() tooltipFixedPositioning: boolean = false;\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 & tertiary variants of button will have a transparent background when not hovered, pressed or loading.\n */\n @Prop() transparentBackground = 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 this.mutationObserver?.disconnect();\n this.hostMutationObserver?.disconnect();\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) {\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.describedbyEl && 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 if (this.hasRouterSlot()) this.arrangeRouterItem();\n }\n }\n\n componentWillRender(): void {\n const iconEl = this.getSlottedIcon(\"left\") || this.getSlottedIcon(\"right\");\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.disabled,\n this.accept,\n this.fileInputName,\n this.selectedFiles\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(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail }: CustomEvent<IcBrand>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private async closeButtonTooltip(ev: KeyboardEvent) {\n const tooltip = this.el.shadowRoot?.querySelector(\"ic-tooltip\");\n if (tooltip && (await tooltip.isTooltipVisible())) {\n tooltip.displayTooltip(false);\n ev.preventDefault();\n ev.stopImmediatePropagation();\n }\n }\n\n private getSlottedIcon = (position: IcIconPlacementOptions) =>\n this.el.querySelector(`[slot=\"${position}-icon\"]`);\n\n private hasRouterSlot() {\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 = () => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n (this.form || !!this.el.closest(\"FORM\"))\n ) {\n const form = this.form\n ? document.querySelector<HTMLFormElement>(`form[id=${this.form}]`)\n : this.el.closest<HTMLFormElement>(\"FORM\");\n\n handleHiddenFormButtonClick(form, this.el);\n }\n };\n\n private handleKeyDown = (ev: KeyboardEvent) => {\n if (ev.key === \"Escape\" && this.hasTooltip) {\n this.closeButtonTooltip(ev);\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(mode: IcBrandForeground | null = null) {\n const foregroundColor = getBrandFromContext(this.el, mode);\n if (foregroundColor !== IcBrandForegroundEnum.Default) {\n this.theme =\n foregroundColor === IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n this.monochrome = true;\n }\n }\n\n /**\n * Triggered when text content of sibling element in light DOM changes\n */\n private mutationCallback = () => {\n this.describedByContent = this.describedbyEl?.innerText;\n };\n\n /**\n * Triggered when attributes of host element change\n * @param mutationList the list of changes made to the host element\n */\n private hostMutationCallback = (mutationList: MutationRecord[]) => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute) {\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 }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = () => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || !!this.isIconVariant());\n };\n\n private isIconVariant = () => this.variant.startsWith(\"icon\");\n\n private arrangeRouterItem = () => {\n const setStyles = (\n element: HTMLElement | SVGElement,\n styles: { [key: string]: string }\n ) => {\n Object.entries(styles).forEach(([key, value]) => {\n element.style.setProperty(key, value);\n });\n };\n\n if (this.routerSlot) {\n const icTypography = document.createElement(\"ic-typography\");\n\n setStyles(icTypography, {\n \"font-family\": \"var(--ic-font-body-family)\",\n \"font-size\": \"0.875rem\",\n \"font-weight\": \"600\",\n });\n setStyles(this.routerSlot, {\n gap: \"0\",\n });\n\n const icon = this.routerSlot.querySelector(\"svg\");\n const iconSlot = icon?.getAttribute(\"slot\");\n const iconWrapper = document.createElement(\"div\");\n\n if (icon) {\n setStyles(icon, {\n fill: \"currentcolor\",\n });\n\n if (iconSlot === \"top-icon\") {\n setStyles(this.routerSlot, {\n display: \"flex\",\n \"flex-direction\": \"column\",\n \"--height\": \"fit-content\",\n });\n } else if (iconSlot) {\n const marginPlacement = iconSlot === \"left-icon\" ? \"right\" : \"left\";\n setStyles(iconWrapper, {\n [`margin-${marginPlacement}`]: \"var(--ic-space-xs)\",\n });\n }\n\n iconWrapper.append(icon);\n }\n\n const badge = this.routerSlot.querySelector(\"ic-badge\");\n const label = this.routerSlot.textContent?.trim();\n\n if (badge) iconWrapper.append(badge);\n if (label) icTypography.textContent = label;\n\n this.routerSlot.textContent = \"\";\n\n if (iconSlot === \"right-icon\") {\n this.routerSlot.append(icTypography);\n this.routerSlot.append(iconWrapper);\n } else {\n this.routerSlot.append(iconWrapper);\n this.routerSlot.append(icTypography);\n }\n }\n };\n\n render() {\n const {\n ariaControlsId,\n ariaLabel,\n ariaOwnsId,\n buttonIdNum,\n describedByContent,\n describedById,\n disabled,\n download,\n dropdown,\n dropdownExpanded,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n fullWidth,\n handleClick,\n handleKeyDown,\n hasTooltip,\n href,\n hreflang,\n id,\n inheritedAttributes,\n isIconVariant,\n loading,\n monochrome,\n onBlur,\n onFocus,\n referrerpolicy,\n rel,\n size,\n target,\n theme,\n title,\n tooltipFixedPositioning,\n tooltipPlacement,\n transparentBackground,\n type,\n variant,\n } = this;\n\n const TagType = href ? \"a\" : \"button\";\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type,\n disabled,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n }\n : {\n download: download !== false ? download : null,\n href,\n rel,\n target,\n referrerpolicy,\n hreflang,\n };\n\n const buttonId = hasTooltip\n ? `ic-button-with-tooltip-${id || buttonIdNum}`\n : undefined;\n\n const describedby = !hasTooltip\n ? describedById\n : variant !== \"icon\" || !ariaLabel\n ? `ic-tooltip-${buttonId}`\n : undefined;\n\n const hasLeftIcon = !!this.getSlottedIcon(\"left\");\n const hasRightIcon = !!this.getSlottedIcon(\"right\");\n\n const ButtonContent = () =>\n this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <TagType\n class=\"button\"\n tabindex={0}\n aria-disabled={loading || disabled ? \"true\" : null}\n aria-label={loading ? \"Loading\" : ariaLabel}\n aria-expanded={dropdown && `${dropdownExpanded}`}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={onFocus}\n onBlur={onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedby}\n part=\"button\"\n >\n {loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n monochrome={monochrome}\n theme={theme}\n ></ic-loading-indicator>\n </div>\n ) : (\n <Fragment>\n {(hasLeftIcon ||\n (!!this.getSlottedIcon(\"top\") && !hasRightIcon)) && (\n <div class=\"icon-container\">\n <slot name={`${hasLeftIcon ? \"left\" : \"top\"}-icon`} />\n </div>\n )}\n <slot />\n {!dropdown\n ? hasRightIcon && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )\n : variant !== \"icon\" &&\n variant !== \"destructive\" && (\n <span\n class={\n dropdownExpanded\n ? \"dropdown-expanded\"\n : \"arrow-dropdown\"\n }\n innerHTML={arrowDropdown}\n />\n )}\n </Fragment>\n )}\n </TagType>\n );\n\n return (\n <Host\n class={{\n \"ic-button-disabled\": disabled && !loading,\n \"ic-button-full-width\": fullWidth,\n \"ic-button-loading\": loading,\n [`ic-button-size-${size}`]: true,\n [`ic-button-variant-${variant}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n background:\n (variant === \"secondary\" || variant === \"tertiary\") &&\n !transparentBackground &&\n !disabled,\n \"dropdown-no-icon\":\n dropdown &&\n !isSlotUsed(this.el, \"icon\") &&\n !isSlotUsed(this.el, \"left-icon\"),\n monochrome,\n \"top-icon\": isSlotUsed(this.el, \"top-icon\"),\n \"with-badge\": isSlotUsed(this.el, \"badge\"),\n }}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n aria-owns={ariaOwnsId}\n aria-controls={ariaControlsId}\n aria-expanded={dropdown && `${dropdownExpanded}`}\n >\n {hasTooltip && (\n <ic-tooltip\n id={describedby}\n label={title || ariaLabel}\n target={buttonId}\n placement={tooltipPlacement}\n fixedPositioning={tooltipFixedPositioning}\n silent={isIconVariant() && !!ariaLabel}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!hasTooltip && <ButtonContent />}\n {describedByContent && (\n <span id={describedby} class=\"ic-button-describedby\">\n {describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,CAAC,EACD,KAAK,EACL,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAIL,qBAAqB,GAItB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAE5D,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB;;;;;;GAMG;AAQH,MAAM,OAAO,MAAM;IAPnB;QASU,gBAAW,G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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 Fragment,\n} from \"@stencil/core\";\n\nimport {\n getBrandFromContext,\n handleHiddenFormButtonClick,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport { IcButtonTypes, IcButtonVariants } from \"./ic-button.types\";\nimport {\n IcSizes,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n IcButtonTooltipPlacement,\n IcIconPlacementOptions,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n * @slot top-icon - Content will be placed above the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n * @slot router-item - Handle routing by nesting your routes in this slot. Setting loading to true will have no impact on this slot.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl?: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip = false;\n private id: string | null;\n private inheritedAttributes: { [k: string]: string } = {};\n private describedbyEl: HTMLElement | null = null;\n private describedById?: string;\n private mutationObserver: MutationObserver | null = null;\n private hostMutationObserver: MutationObserver | null = null;\n private routerSlot: HTMLElement | null;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel = \"\";\n @State() describedByContent? = \"\";\n @State() title = \"\";\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept = \"*\";\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 = 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 = 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 = 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 = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName = `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 = 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 = false;\n\n /**\n * If `true`, the button will display as monochromatic in either `light` or `dark` theme.\n */\n @Prop({ mutable: true }) monochrome = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles?: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop({ mutable: true }) theme: IcThemeMode = \"inherit\";\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() tooltipFixedPositioning: boolean = false;\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 & tertiary variants of button will have a transparent background when not hovered, pressed or loading.\n */\n @Prop() transparentBackground = 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({ mutable: true }) variant: IcButtonVariants = \"primary\";\n @Watch(\"variant\")\n watchVariantHandler(newVariant: IcButtonVariants): void {\n if (newVariant === \"icon\") this.variant = \"icon-tertiary\";\n }\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 this.mutationObserver?.disconnect();\n this.hostMutationObserver?.disconnect();\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) {\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 if (this.variant === \"icon\") {\n this.variant = \"icon-tertiary\";\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (typeof MutationObserver !== \"undefined\") {\n if (this.describedbyEl && 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 if (this.hasRouterSlot()) this.arrangeRouterItem();\n }\n }\n\n componentWillRender(): void {\n const iconEl = this.getSlottedIcon(\"left\") || this.getSlottedIcon(\"right\");\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.disabled,\n this.accept,\n this.fileInputName,\n this.selectedFiles\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(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail }: CustomEvent<IcBrand>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private async closeButtonTooltip(ev: KeyboardEvent) {\n const tooltip = this.el.shadowRoot?.querySelector(\"ic-tooltip\");\n if (tooltip && (await tooltip.isTooltipVisible())) {\n tooltip.displayTooltip(false);\n ev.preventDefault();\n ev.stopImmediatePropagation();\n }\n }\n\n private getSlottedIcon = (position: IcIconPlacementOptions) =>\n this.el.querySelector(`[slot=\"${position}-icon\"]`);\n\n private hasRouterSlot() {\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 = () => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n (this.form || !!this.el.closest(\"FORM\"))\n ) {\n const form = this.form\n ? document.querySelector<HTMLFormElement>(`form[id=${this.form}]`)\n : this.el.closest<HTMLFormElement>(\"FORM\");\n\n handleHiddenFormButtonClick(form, this.el);\n }\n };\n\n private handleKeyDown = (ev: KeyboardEvent) => {\n if (ev.key === \"Escape\" && this.hasTooltip) {\n this.closeButtonTooltip(ev);\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(mode: IcBrandForeground | null = null) {\n const foregroundColor = getBrandFromContext(this.el, mode);\n if (foregroundColor !== IcBrandForegroundEnum.Default) {\n this.theme =\n foregroundColor === IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n this.monochrome = true;\n }\n }\n\n /**\n * Triggered when text content of sibling element in light DOM changes\n */\n private mutationCallback = () => {\n this.describedByContent = this.describedbyEl?.innerText;\n };\n\n /**\n * Triggered when attributes of host element change\n * @param mutationList the list of changes made to the host element\n */\n private hostMutationCallback = (mutationList: MutationRecord[]) => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute) {\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 }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = () => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || !!this.isIconVariant());\n };\n\n private isIconVariant = () => this.variant.startsWith(\"icon\");\n\n private arrangeRouterItem = () => {\n const setStyles = (\n element: HTMLElement | SVGElement,\n styles: { [key: string]: string }\n ) => {\n Object.entries(styles).forEach(([key, value]) => {\n element.style.setProperty(key, value);\n });\n };\n\n if (this.routerSlot) {\n const icTypography = document.createElement(\"ic-typography\");\n\n setStyles(icTypography, {\n \"font-family\": \"var(--ic-font-body-family)\",\n \"font-size\": \"0.875rem\",\n \"font-weight\": \"600\",\n });\n setStyles(this.routerSlot, {\n gap: \"0\",\n });\n\n const icon = this.routerSlot.querySelector(\"svg\");\n const iconSlot = icon?.getAttribute(\"slot\");\n const iconWrapper = document.createElement(\"div\");\n\n if (icon) {\n setStyles(icon, {\n fill: \"currentcolor\",\n });\n\n if (iconSlot === \"top-icon\") {\n setStyles(this.routerSlot, {\n display: \"flex\",\n \"flex-direction\": \"column\",\n \"--height\": \"fit-content\",\n });\n } else if (iconSlot) {\n const marginPlacement = iconSlot === \"left-icon\" ? \"right\" : \"left\";\n setStyles(iconWrapper, {\n [`margin-${marginPlacement}`]: \"var(--ic-space-xs)\",\n });\n }\n\n iconWrapper.append(icon);\n }\n\n const badge = this.routerSlot.querySelector(\"ic-badge\");\n const label = this.routerSlot.textContent?.trim();\n\n if (badge) iconWrapper.append(badge);\n if (label) icTypography.textContent = label;\n\n this.routerSlot.textContent = \"\";\n\n if (iconSlot === \"right-icon\") {\n this.routerSlot.append(icTypography);\n this.routerSlot.append(iconWrapper);\n } else {\n this.routerSlot.append(iconWrapper);\n this.routerSlot.append(icTypography);\n }\n }\n };\n\n render() {\n const {\n ariaControlsId,\n ariaLabel,\n ariaOwnsId,\n buttonIdNum,\n describedByContent,\n describedById,\n disabled,\n download,\n dropdown,\n dropdownExpanded,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n fullWidth,\n handleClick,\n handleKeyDown,\n hasTooltip,\n href,\n hreflang,\n id,\n inheritedAttributes,\n isIconVariant,\n loading,\n monochrome,\n onBlur,\n onFocus,\n referrerpolicy,\n rel,\n size,\n target,\n theme,\n title,\n tooltipFixedPositioning,\n tooltipPlacement,\n transparentBackground,\n type,\n variant,\n } = this;\n\n const TagType = href ? \"a\" : \"button\";\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type,\n disabled,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n }\n : {\n download: download !== false ? download : null,\n href,\n rel,\n target,\n referrerpolicy,\n hreflang,\n };\n\n const buttonId = hasTooltip\n ? `ic-button-with-tooltip-${id || buttonIdNum}`\n : undefined;\n\n const describedby = !hasTooltip ? describedById : `ic-tooltip-${buttonId}`;\n\n const hasLeftIcon = !!this.getSlottedIcon(\"left\");\n const hasRightIcon = !!this.getSlottedIcon(\"right\");\n\n const ButtonContent = () =>\n this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <TagType\n class=\"button\"\n tabindex={0}\n aria-disabled={loading || disabled ? \"true\" : null}\n aria-label={loading ? \"Loading\" : ariaLabel}\n aria-expanded={dropdown && `${dropdownExpanded}`}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={onFocus}\n onBlur={onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedby}\n part=\"button\"\n >\n {loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n monochrome={monochrome}\n theme={theme}\n ></ic-loading-indicator>\n </div>\n ) : (\n <Fragment>\n {(hasLeftIcon ||\n (!!this.getSlottedIcon(\"top\") && !hasRightIcon)) && (\n <div class=\"icon-container\">\n <slot name={`${hasLeftIcon ? \"left\" : \"top\"}-icon`} />\n </div>\n )}\n <slot />\n {!dropdown\n ? hasRightIcon && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )\n : variant !== \"icon\" &&\n variant !== \"destructive\" && (\n <span\n class={\n dropdownExpanded\n ? \"dropdown-expanded\"\n : \"arrow-dropdown\"\n }\n innerHTML={arrowDropdown}\n />\n )}\n </Fragment>\n )}\n </TagType>\n );\n\n return (\n <Host\n class={{\n \"ic-button-disabled\": disabled && !loading,\n \"ic-button-full-width\": fullWidth,\n \"ic-button-loading\": loading,\n [`ic-button-size-${size}`]: true,\n [`ic-button-variant-${variant}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n background:\n (variant === \"secondary\" || variant === \"tertiary\") &&\n !transparentBackground &&\n !disabled,\n \"dropdown-no-icon\":\n dropdown &&\n !isSlotUsed(this.el, \"icon\") &&\n !isSlotUsed(this.el, \"left-icon\"),\n monochrome,\n \"top-icon\": isSlotUsed(this.el, \"top-icon\"),\n \"with-badge\": isSlotUsed(this.el, \"badge\"),\n }}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n aria-owns={ariaOwnsId}\n aria-controls={ariaControlsId}\n aria-expanded={dropdown && `${dropdownExpanded}`}\n >\n {hasTooltip && (\n <ic-tooltip\n id={describedby}\n label={title || ariaLabel}\n target={buttonId}\n placement={tooltipPlacement}\n fixedPositioning={tooltipFixedPositioning}\n silent={isIconVariant() && !!ariaLabel}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!hasTooltip && <ButtonContent />}\n {describedByContent && (\n <span id={describedby} class=\"ic-button-describedby\">\n {describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -539,6 +539,20 @@ export const IconVariants = {
539
539
  />
540
540
  </svg>
541
541
  </ic-button>
542
+ <ic-button variant="icon" aria-label="refresh" id="testbutton">
543
+ <svg
544
+ xmlns="http://www.w3.org/2000/svg"
545
+ height="24px"
546
+ viewBox="0 0 24 24"
547
+ width="24px"
548
+ fill="#000000"
549
+ >
550
+ <path d="M0 0h24v24H0V0z" fill="none" />
551
+ <path
552
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
553
+ />
554
+ </svg>
555
+ </ic-button>
542
556
  <ic-button
543
557
  variant="icon-destructive"
544
558
  aria-label="refresh"
@@ -863,6 +877,25 @@ export const IconVariants = {
863
877
  />
864
878
  </svg>
865
879
  </ic-button>
880
+ <ic-button
881
+ variant="icon"
882
+ aria-label="refresh"
883
+ id="testbutton"
884
+ disabled
885
+ >
886
+ <svg
887
+ xmlns="http://www.w3.org/2000/svg"
888
+ height="24px"
889
+ viewBox="0 0 24 24"
890
+ width="24px"
891
+ fill="#000000"
892
+ >
893
+ <path d="M0 0h24v24H0V0z" fill="none" />
894
+ <path
895
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
896
+ />
897
+ </svg>
898
+ </ic-button>
866
899
  <ic-button
867
900
  variant="icon-destructive"
868
901
  aria-label="refresh"
@@ -949,6 +982,26 @@ export const IconVariants = {
949
982
  />
950
983
  </svg>
951
984
  </ic-button>
985
+ <ic-button
986
+ variant="icon"
987
+ aria-label="refresh"
988
+ id="testbutton"
989
+ theme="light"
990
+ monochrome
991
+ >
992
+ <svg
993
+ xmlns="http://www.w3.org/2000/svg"
994
+ height="24px"
995
+ viewBox="0 0 24 24"
996
+ width="24px"
997
+ fill="#000000"
998
+ >
999
+ <path d="M0 0h24v24H0V0z" fill="none" />
1000
+ <path
1001
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
1002
+ />
1003
+ </svg>
1004
+ </ic-button>
952
1005
  <ic-button
953
1006
  variant="icon-primary"
954
1007
  aria-label="refresh"
@@ -1076,6 +1129,25 @@ export const IconVariants = {
1076
1129
  />
1077
1130
  </svg>
1078
1131
  </ic-button>
1132
+ <ic-button
1133
+ variant="icon"
1134
+ aria-label="refresh"
1135
+ id="testbutton"
1136
+ theme="dark"
1137
+ >
1138
+ <svg
1139
+ xmlns="http://www.w3.org/2000/svg"
1140
+ height="24px"
1141
+ viewBox="0 0 24 24"
1142
+ width="24px"
1143
+ fill="#000000"
1144
+ >
1145
+ <path d="M0 0h24v24H0V0z" fill="none" />
1146
+ <path
1147
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
1148
+ />
1149
+ </svg>
1150
+ </ic-button>
1079
1151
  <ic-button
1080
1152
  variant="icon-destructive"
1081
1153
  aria-label="refresh"
@@ -1162,6 +1234,26 @@ export const IconVariants = {
1162
1234
  />
1163
1235
  </svg>
1164
1236
  </ic-button>
1237
+ <ic-button
1238
+ variant="icon"
1239
+ aria-label="refresh"
1240
+ id="testbutton"
1241
+ theme="dark"
1242
+ loading
1243
+ >
1244
+ <svg
1245
+ xmlns="http://www.w3.org/2000/svg"
1246
+ height="24px"
1247
+ viewBox="0 0 24 24"
1248
+ width="24px"
1249
+ fill="#000000"
1250
+ >
1251
+ <path d="M0 0h24v24H0V0z" fill="none" />
1252
+ <path
1253
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
1254
+ />
1255
+ </svg>
1256
+ </ic-button>
1165
1257
  <ic-button
1166
1258
  variant="icon-destructive"
1167
1259
  aria-label="refresh"
@@ -1249,6 +1341,26 @@ export const IconVariants = {
1249
1341
  />
1250
1342
  </svg>
1251
1343
  </ic-button>
1344
+ <ic-button
1345
+ variant="icon"
1346
+ aria-label="refresh"
1347
+ id="testbutton"
1348
+ theme="dark"
1349
+ monochrome
1350
+ >
1351
+ <svg
1352
+ xmlns="http://www.w3.org/2000/svg"
1353
+ height="24px"
1354
+ viewBox="0 0 24 24"
1355
+ width="24px"
1356
+ fill="#000000"
1357
+ >
1358
+ <path d="M0 0h24v24H0V0z" fill="none" />
1359
+ <path
1360
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
1361
+ />
1362
+ </svg>
1363
+ </ic-button>
1252
1364
  <ic-button
1253
1365
  variant="icon-primary"
1254
1366
  aria-label="refresh"
@@ -1312,6 +1424,27 @@ export const IconVariants = {
1312
1424
  />
1313
1425
  </svg>
1314
1426
  </ic-button>
1427
+ <ic-button
1428
+ variant="icon"
1429
+ aria-label="refresh"
1430
+ id="testbutton"
1431
+ theme="dark"
1432
+ loading
1433
+ monochrome
1434
+ >
1435
+ <svg
1436
+ xmlns="http://www.w3.org/2000/svg"
1437
+ height="24px"
1438
+ viewBox="0 0 24 24"
1439
+ width="24px"
1440
+ fill="#000000"
1441
+ >
1442
+ <path d="M0 0h24v24H0V0z" fill="none" />
1443
+ <path
1444
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
1445
+ />
1446
+ </svg>
1447
+ </ic-button>
1315
1448
  </div>
1316
1449
  </div>
1317
1450
  </div>`,
@@ -1622,6 +1755,25 @@ export const Dropdown = {
1622
1755
  >Button</ic-button
1623
1756
  >
1624
1757
  </div>
1758
+ <div style="padding: 6px">
1759
+ <ic-button dropdown="true" variant="icon">
1760
+ <svg
1761
+ xmlns="http://www.w3.org/2000/svg"
1762
+ height="24px"
1763
+ viewBox="0 0 24 24"
1764
+ width="24px"
1765
+ fill="#000000"
1766
+ >
1767
+ <path d="M0 0h24v24H0V0z" fill="none" />
1768
+ <path
1769
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
1770
+ />
1771
+ </svg>
1772
+ </ic-button>
1773
+ <ic-button dropdown="true" variant="icon-primary"> </ic-button>
1774
+ <ic-button dropdown="true" variant="icon-secondary"> </ic-button>
1775
+ <ic-button dropdown="true" variant="icon-tertiary"> </ic-button>
1776
+ </div>
1625
1777
  </div>`,
1626
1778
 
1627
1779
  name: "Dropdown",
@@ -2210,6 +2362,45 @@ export const Tooltips = {
2210
2362
  d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
2211
2363
  /></svg
2212
2364
  ></ic-button>
2365
+ <ic-button variant="icon-primary" aria-label="primary" id="testbutton"
2366
+ ><svg
2367
+ xmlns="http://www.w3.org/2000/svg"
2368
+ height="24px"
2369
+ viewBox="0 0 24 24"
2370
+ width="24px"
2371
+ fill="#000000"
2372
+ >
2373
+ <path d="M0 0h24v24H0V0z" fill="none" />
2374
+ <path
2375
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
2376
+ /></svg
2377
+ ></ic-button>
2378
+ <ic-button variant="icon-secondary" aria-label="secondary" id="testbutton"
2379
+ ><svg
2380
+ xmlns="http://www.w3.org/2000/svg"
2381
+ height="24px"
2382
+ viewBox="0 0 24 24"
2383
+ width="24px"
2384
+ fill="#000000"
2385
+ >
2386
+ <path d="M0 0h24v24H0V0z" fill="none" />
2387
+ <path
2388
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
2389
+ /></svg
2390
+ ></ic-button>
2391
+ <ic-button variant="icon-tertiary" aria-label="tertiary" id="testbutton"
2392
+ ><svg
2393
+ xmlns="http://www.w3.org/2000/svg"
2394
+ height="24px"
2395
+ viewBox="0 0 24 24"
2396
+ width="24px"
2397
+ fill="#000000"
2398
+ >
2399
+ <path d="M0 0h24v24H0V0z" fill="none" />
2400
+ <path
2401
+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
2402
+ /></svg
2403
+ ></ic-button>
2213
2404
  <ic-button
2214
2405
  variant="icon"
2215
2406
  aria-label="you can disable tooltips on icon buttons"