@ukic/canary-web-components 2.0.0-canary.0 → 2.0.0-canary.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (736) hide show
  1. package/README.md +31 -12
  2. package/dist/cjs/{OpenInNew-f9958725.js → OpenInNew-d5d30e77.js} +1 -1
  3. package/dist/cjs/OpenInNew-d5d30e77.js.map +1 -0
  4. package/dist/cjs/{check-icon-b2f60716.js → check-icon-7225d79b.js} +1 -1
  5. package/dist/cjs/check-icon-7225d79b.js.map +1 -0
  6. package/dist/cjs/{chevron-icon-2bb3a907.js → chevron-icon-3bf07531.js} +1 -1
  7. package/dist/cjs/chevron-icon-3bf07531.js.map +1 -0
  8. package/dist/cjs/{close-icon-8ccb0163.js → close-icon-7f6ef8e4.js} +2 -2
  9. package/dist/cjs/close-icon-7f6ef8e4.js.map +1 -0
  10. package/dist/cjs/core.cjs.js +3 -6
  11. package/dist/cjs/core.cjs.js.map +1 -1
  12. package/dist/cjs/{helpers-3811d14b.js → helpers-d166f875.js} +27 -10
  13. package/dist/cjs/helpers-d166f875.js.map +1 -0
  14. package/dist/cjs/ic-alert.cjs.entry.js +4 -4
  15. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-back-to-top.cjs.entry.js +3 -3
  17. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +3 -3
  19. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-breadcrumb.cjs.entry.js +4 -4
  21. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-button_3.cjs.entry.js +228 -20
  23. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-card.cjs.entry.js +4 -4
  25. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-checkbox-group.cjs.entry.js +3 -3
  27. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-checkbox.cjs.entry.js +3 -3
  29. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-chip.cjs.entry.js +3 -3
  31. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-data-entity.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
  37. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  38. package/dist/cjs/{ic-unstable-data-table.cjs.entry.js → ic-data-table.cjs.entry.js} +3 -3
  39. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -0
  40. package/dist/cjs/ic-dialog.cjs.entry.js +5 -5
  41. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-divider.cjs.entry.js +3 -3
  43. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-empty-state.cjs.entry.js +37 -0
  45. package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -0
  46. package/dist/cjs/ic-footer-link-group.cjs.entry.js +3 -3
  47. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-footer-link.cjs.entry.js +4 -4
  49. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-footer.cjs.entry.js +7 -4
  51. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-hero.cjs.entry.js +3 -3
  53. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +3 -3
  55. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +43 -37
  57. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-input-label_2.cjs.entry.js +3 -3
  59. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-link.cjs.entry.js +4 -4
  61. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-menu-item.cjs.entry.js +5 -5
  65. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-navigation-button.cjs.entry.js +9 -5
  67. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-navigation-group.cjs.entry.js +5 -5
  69. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-navigation-item.cjs.entry.js +5 -5
  71. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-navigation-menu.cjs.entry.js +4 -4
  73. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-page-header.cjs.entry.js +3 -3
  75. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-pagination-bar.cjs.entry.js +3 -3
  77. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-pagination_4.cjs.entry.js +71 -17
  79. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-popover-menu.cjs.entry.js +68 -16
  81. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-radio-group.cjs.entry.js +3 -3
  83. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-radio-option.cjs.entry.js +3 -3
  85. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-search-bar.cjs.entry.js +35 -19
  87. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  89. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-side-navigation.cjs.entry.js +6 -6
  91. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  92. package/dist/cjs/ic-skeleton.cjs.entry.js +1 -1
  93. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  95. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  96. package/dist/cjs/ic-step.cjs.entry.js +2 -2
  97. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
  99. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-switch.cjs.entry.js +3 -3
  101. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-tab-context.cjs.entry.js +2 -2
  103. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  105. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  106. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  107. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  108. package/dist/cjs/ic-tab.cjs.entry.js +3 -3
  109. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  110. package/dist/cjs/ic-theme.cjs.entry.js +3 -3
  111. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  112. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  113. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  114. package/dist/cjs/ic-toast.cjs.entry.js +4 -4
  115. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  116. package/dist/cjs/ic-top-navigation.cjs.entry.js +4 -4
  117. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  118. package/dist/cjs/ic-typography.cjs.entry.js +4 -4
  119. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  120. package/dist/cjs/{index-4f4d2b43.js → index-990b968b.js} +150 -44
  121. package/dist/cjs/index-990b968b.js.map +1 -0
  122. package/dist/cjs/loader.cjs.js +3 -12
  123. package/dist/cjs/loader.cjs.js.map +1 -1
  124. package/dist/cjs/{popper-d7adcfc6.js → popper-31badbf8.js} +1 -1
  125. package/dist/cjs/popper-31badbf8.js.map +1 -0
  126. package/dist/cjs/{types-3eb02246.js → types-7d67439f.js} +1 -1
  127. package/dist/cjs/types-7d67439f.js.map +1 -0
  128. package/dist/collection/assets/close-icon.svg +1 -1
  129. package/dist/collection/assets/hamburger-menu-icon.svg +1 -1
  130. package/dist/collection/collection-manifest.json +63 -62
  131. package/dist/collection/components/ic-alert/ic-alert.js +2 -1
  132. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  133. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +5 -1
  134. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
  135. package/dist/collection/components/ic-button/ic-button.css +15 -7
  136. package/dist/collection/components/ic-button/ic-button.js +55 -13
  137. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  138. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +17 -2
  139. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -1
  140. package/dist/collection/components/ic-card/ic-card.js +4 -2
  141. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  142. package/dist/collection/components/ic-checkbox/ic-checkbox.js +8 -4
  143. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  144. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +6 -3
  145. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  146. package/dist/collection/components/ic-chip/ic-chip.js +6 -3
  147. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  148. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +2 -1
  149. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  150. package/dist/collection/components/ic-data-table/ic-data-table.js +13 -7
  151. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  152. package/dist/collection/components/ic-data-table/story-data.js +559 -0
  153. package/dist/collection/components/ic-data-table/story-data.js.map +1 -0
  154. package/dist/collection/components/ic-data-table/test/a11y/ic-data-table.test.a11y.js +3 -3
  155. package/dist/collection/components/ic-data-table/test/a11y/ic-data-table.test.a11y.js.map +1 -1
  156. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +14 -14
  157. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  158. package/dist/collection/components/ic-dialog/ic-dialog.js +14 -5
  159. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  160. package/dist/collection/components/ic-empty-state/ic-empty-state.css +49 -0
  161. package/dist/collection/components/ic-empty-state/ic-empty-state.js +160 -0
  162. package/dist/collection/components/ic-empty-state/ic-empty-state.js.map +1 -0
  163. package/dist/collection/components/ic-empty-state/ic-empty-state.types.js +2 -0
  164. package/dist/collection/components/ic-empty-state/ic-empty-state.types.js.map +1 -0
  165. package/dist/collection/components/ic-empty-state/test/a11y/ic-empty-state.test.a11y.js +38 -0
  166. package/dist/collection/components/ic-empty-state/test/a11y/ic-empty-state.test.a11y.js.map +1 -0
  167. package/dist/collection/components/ic-empty-state/test/basic/ic-empty-state.spec.js +86 -0
  168. package/dist/collection/components/ic-empty-state/test/basic/ic-empty-state.spec.js.map +1 -0
  169. package/dist/collection/components/ic-footer/ic-footer.js +8 -3
  170. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  171. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -1
  172. package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
  173. package/dist/collection/components/ic-hero/ic-hero.js +4 -2
  174. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  175. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +4 -2
  176. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
  177. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +2 -1
  178. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  179. package/dist/collection/components/ic-input-validation/ic-input-validation.js +4 -2
  180. package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
  181. package/dist/collection/components/ic-link/ic-link.js +6 -3
  182. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  183. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +6 -3
  184. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
  185. package/dist/collection/components/ic-menu/ic-menu.css +17 -0
  186. package/dist/collection/components/ic-menu/ic-menu.js +107 -48
  187. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  188. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +13 -2
  189. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
  190. package/dist/collection/components/ic-menu-item/ic-menu-item.js +4 -2
  191. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  192. package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +1 -0
  193. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +9 -3
  194. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  195. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +1 -1
  196. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +1 -1
  197. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +2 -1
  198. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +2 -1
  199. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  200. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +4 -2
  201. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  202. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +2 -2
  203. package/dist/collection/components/ic-page-header/ic-page-header.js +2 -1
  204. package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
  205. package/dist/collection/components/ic-pagination/ic-pagination.js +8 -4
  206. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  207. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +8 -4
  208. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  209. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +4 -2
  210. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
  211. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +12 -0
  212. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +69 -14
  213. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  214. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.spec.js +14 -0
  215. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.spec.js.map +1 -1
  216. package/dist/collection/components/ic-radio-group/ic-radio-group.js +6 -3
  217. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  218. package/dist/collection/components/ic-radio-option/ic-radio-option.js +8 -4
  219. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  220. package/dist/collection/components/ic-search-bar/ic-search-bar.js +100 -32
  221. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  222. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -1
  223. package/dist/collection/components/ic-section-container/ic-section-container.js.map +1 -1
  224. package/dist/collection/components/ic-select/ic-select.js +85 -22
  225. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  226. package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js +30 -0
  227. package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js.map +1 -1
  228. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +51 -3
  229. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  230. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -1
  231. package/dist/collection/components/ic-skeleton/ic-skeleton.js.map +1 -1
  232. package/dist/collection/components/ic-status-tag/ic-status-tag.js +4 -2
  233. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  234. package/dist/collection/components/ic-step/ic-step.js +8 -4
  235. package/dist/collection/components/ic-step/ic-step.js.map +1 -1
  236. package/dist/collection/components/ic-stepper/ic-stepper.js +4 -2
  237. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  238. package/dist/collection/components/ic-switch/ic-switch.js +4 -2
  239. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  240. package/dist/collection/components/ic-tab/ic-tab.js +10 -5
  241. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  242. package/dist/collection/components/ic-tab-context/ic-tab-context.js +10 -5
  243. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  244. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -1
  245. package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
  246. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +4 -2
  247. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
  248. package/dist/collection/components/ic-text-field/ic-text-field.js +26 -13
  249. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  250. package/dist/collection/components/ic-theme/ic-theme.js +2 -1
  251. package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
  252. package/dist/collection/components/ic-toast/ic-toast.js +8 -4
  253. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  254. package/dist/collection/components/ic-toast-region/ic-toast-region.js +4 -2
  255. package/dist/collection/components/ic-toast-region/ic-toast-region.js.map +1 -1
  256. package/dist/collection/components/ic-tooltip/ic-tooltip.css +9 -0
  257. package/dist/collection/components/ic-tooltip/ic-tooltip.js +191 -13
  258. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  259. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js +2 -0
  260. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js.map +1 -1
  261. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.spec.js +160 -1
  262. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.spec.js.map +1 -1
  263. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +3 -2
  264. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  265. package/dist/collection/components/ic-typography/ic-typography.css +10 -10
  266. package/dist/collection/components/ic-typography/ic-typography.js +3 -2
  267. package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
  268. package/dist/collection/utils/helpers.js +25 -8
  269. package/dist/collection/utils/helpers.js.map +1 -1
  270. package/dist/collection/utils/types.js.map +1 -1
  271. package/dist/components/close-icon.js +1 -1
  272. package/dist/components/helpers.js +26 -9
  273. package/dist/components/helpers.js.map +1 -1
  274. package/dist/components/ic-alert2.js.map +1 -1
  275. package/dist/components/ic-back-to-top.js +2 -0
  276. package/dist/components/ic-back-to-top.js.map +1 -1
  277. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  278. package/dist/components/ic-breadcrumb2.js.map +1 -1
  279. package/dist/components/ic-button2.js +37 -5
  280. package/dist/components/ic-button2.js.map +1 -1
  281. package/dist/components/ic-card.js.map +1 -1
  282. package/dist/components/ic-checkbox-group.js.map +1 -1
  283. package/dist/components/ic-checkbox.js.map +1 -1
  284. package/dist/components/ic-chip.js.map +1 -1
  285. package/dist/components/ic-classification-banner.js.map +1 -1
  286. package/dist/components/ic-data-entity.js.map +1 -1
  287. package/dist/components/ic-data-row.js.map +1 -1
  288. package/dist/components/{ic-unstable-data-table.d.ts → ic-data-table.d.ts} +4 -4
  289. package/dist/components/{ic-unstable-data-table.js → ic-data-table.js} +6 -6
  290. package/dist/components/ic-data-table.js.map +1 -0
  291. package/dist/components/ic-dialog.js +4 -2
  292. package/dist/components/ic-dialog.js.map +1 -1
  293. package/dist/components/ic-divider2.js +1 -1
  294. package/dist/components/ic-divider2.js.map +1 -1
  295. package/dist/components/ic-empty-state.d.ts +11 -0
  296. package/dist/components/ic-empty-state.js +63 -0
  297. package/dist/components/ic-empty-state.js.map +1 -0
  298. package/dist/components/ic-footer-link-group.js +1 -1
  299. package/dist/components/ic-footer-link-group.js.map +1 -1
  300. package/dist/components/ic-footer-link.js +1 -1
  301. package/dist/components/ic-footer-link.js.map +1 -1
  302. package/dist/components/ic-footer.js +5 -2
  303. package/dist/components/ic-footer.js.map +1 -1
  304. package/dist/components/ic-hero.js +1 -1
  305. package/dist/components/ic-hero.js.map +1 -1
  306. package/dist/components/ic-horizontal-scroll2.js +1 -1
  307. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  308. package/dist/components/ic-input-component-container2.js.map +1 -1
  309. package/dist/components/ic-input-container2.js.map +1 -1
  310. package/dist/components/ic-input-label2.js.map +1 -1
  311. package/dist/components/ic-input-validation2.js.map +1 -1
  312. package/dist/components/ic-link2.js.map +1 -1
  313. package/dist/components/ic-loading-indicator2.js +3 -0
  314. package/dist/components/ic-loading-indicator2.js.map +1 -1
  315. package/dist/components/ic-menu-group.js.map +1 -1
  316. package/dist/components/ic-menu-item2.js +1 -1
  317. package/dist/components/ic-menu-item2.js.map +1 -1
  318. package/dist/components/ic-menu2.js +43 -32
  319. package/dist/components/ic-menu2.js.map +1 -1
  320. package/dist/components/ic-navigation-button.js +7 -3
  321. package/dist/components/ic-navigation-button.js.map +1 -1
  322. package/dist/components/ic-navigation-group.js +2 -2
  323. package/dist/components/ic-navigation-group.js.map +1 -1
  324. package/dist/components/ic-navigation-item.js +1 -1
  325. package/dist/components/ic-navigation-item.js.map +1 -1
  326. package/dist/components/ic-navigation-menu2.js +2 -2
  327. package/dist/components/ic-navigation-menu2.js.map +1 -1
  328. package/dist/components/ic-page-header.js.map +1 -1
  329. package/dist/components/ic-pagination-bar2.js.map +1 -1
  330. package/dist/components/ic-pagination-item2.js.map +1 -1
  331. package/dist/components/ic-pagination2.js +4 -1
  332. package/dist/components/ic-pagination2.js.map +1 -1
  333. package/dist/components/ic-popover-menu.js +68 -14
  334. package/dist/components/ic-popover-menu.js.map +1 -1
  335. package/dist/components/ic-radio-group.js.map +1 -1
  336. package/dist/components/ic-radio-option.js +4 -2
  337. package/dist/components/ic-radio-option.js.map +1 -1
  338. package/dist/components/ic-search-bar.js +41 -18
  339. package/dist/components/ic-search-bar.js.map +1 -1
  340. package/dist/components/ic-section-container2.js.map +1 -1
  341. package/dist/components/ic-select2.js +75 -15
  342. package/dist/components/ic-select2.js.map +1 -1
  343. package/dist/components/ic-side-navigation.js +2 -2
  344. package/dist/components/ic-side-navigation.js.map +1 -1
  345. package/dist/components/ic-skeleton.js.map +1 -1
  346. package/dist/components/ic-status-tag.js.map +1 -1
  347. package/dist/components/ic-step.js +2 -0
  348. package/dist/components/ic-step.js.map +1 -1
  349. package/dist/components/ic-stepper.js.map +1 -1
  350. package/dist/components/ic-switch.js.map +1 -1
  351. package/dist/components/ic-tab-context.js +3 -1
  352. package/dist/components/ic-tab-context.js.map +1 -1
  353. package/dist/components/ic-tab-group.js.map +1 -1
  354. package/dist/components/ic-tab-panel.js.map +1 -1
  355. package/dist/components/ic-tab.js +2 -0
  356. package/dist/components/ic-tab.js.map +1 -1
  357. package/dist/components/ic-text-field2.js +5 -2
  358. package/dist/components/ic-text-field2.js.map +1 -1
  359. package/dist/components/ic-theme.js +3 -1
  360. package/dist/components/ic-theme.js.map +1 -1
  361. package/dist/components/ic-toast-region.js.map +1 -1
  362. package/dist/components/ic-toast.js +1 -1
  363. package/dist/components/ic-toast.js.map +1 -1
  364. package/dist/components/ic-tooltip2.js +190 -12
  365. package/dist/components/ic-tooltip2.js.map +1 -1
  366. package/dist/components/ic-top-navigation.js +5 -3
  367. package/dist/components/ic-top-navigation.js.map +1 -1
  368. package/dist/components/ic-typography2.js +3 -1
  369. package/dist/components/ic-typography2.js.map +1 -1
  370. package/dist/components/index.d.ts +6 -0
  371. package/dist/components/index.js +1 -1
  372. package/dist/components/types.js.map +1 -1
  373. package/dist/core/core.css +10 -7
  374. package/dist/core/core.esm.js +1 -1
  375. package/dist/core/core.esm.js.map +1 -1
  376. package/dist/core/{p-df0b02b4.entry.js → p-00f7f8e8.entry.js} +2 -2
  377. package/dist/core/p-00f7f8e8.entry.js.map +1 -0
  378. package/dist/core/p-03935e89.js +3 -0
  379. package/dist/core/p-03935e89.js.map +1 -0
  380. package/dist/core/p-061283d4.entry.js +2 -0
  381. package/dist/core/p-061283d4.entry.js.map +1 -0
  382. package/dist/core/{p-4ddbc685.entry.js → p-0729b492.entry.js} +2 -2
  383. package/dist/core/p-0729b492.entry.js.map +1 -0
  384. package/dist/core/{p-cc15dfdc.entry.js → p-0929b7c4.entry.js} +2 -2
  385. package/dist/core/p-0929b7c4.entry.js.map +1 -0
  386. package/dist/core/p-0eba1ec4.entry.js +2 -0
  387. package/dist/core/p-0eba1ec4.entry.js.map +1 -0
  388. package/dist/core/{p-bdb10987.entry.js → p-12d99423.entry.js} +2 -2
  389. package/dist/core/p-12d99423.entry.js.map +1 -0
  390. package/dist/core/{p-0584ebc5.entry.js → p-151cef1f.entry.js} +2 -2
  391. package/dist/core/p-151cef1f.entry.js.map +1 -0
  392. package/dist/core/p-241baaac.entry.js +2 -0
  393. package/dist/core/p-241baaac.entry.js.map +1 -0
  394. package/dist/core/{p-7232b2f0.entry.js → p-2d1ba7d5.entry.js} +2 -2
  395. package/dist/core/p-2d1ba7d5.entry.js.map +1 -0
  396. package/dist/core/{p-7b475a6c.entry.js → p-2f737489.entry.js} +2 -2
  397. package/dist/core/p-2f737489.entry.js.map +1 -0
  398. package/dist/core/{p-b7d521e9.entry.js → p-385ae861.entry.js} +2 -2
  399. package/dist/core/p-385ae861.entry.js.map +1 -0
  400. package/dist/core/{p-06321d19.js → p-3b185c32.js} +1 -1
  401. package/dist/core/{p-7dda131b.entry.js → p-3c50e682.entry.js} +2 -2
  402. package/dist/core/p-3c50e682.entry.js.map +1 -0
  403. package/dist/core/{p-5d89cfab.entry.js → p-3c545222.entry.js} +2 -2
  404. package/dist/core/p-3c545222.entry.js.map +1 -0
  405. package/dist/core/{p-fef750a3.entry.js → p-3e3afba6.entry.js} +2 -2
  406. package/dist/core/p-3e3afba6.entry.js.map +1 -0
  407. package/dist/core/{p-f0fd1444.entry.js → p-4259972b.entry.js} +2 -2
  408. package/dist/core/p-4259972b.entry.js.map +1 -0
  409. package/dist/core/{p-8d4f7027.js → p-426ec638.js} +1 -1
  410. package/dist/core/{p-7adfd23a.entry.js → p-4ec6d80b.entry.js} +2 -2
  411. package/dist/core/p-4ec6d80b.entry.js.map +1 -0
  412. package/dist/core/{p-d77c0936.entry.js → p-517968cb.entry.js} +2 -2
  413. package/dist/core/p-517968cb.entry.js.map +1 -0
  414. package/dist/core/{p-b36723c5.entry.js → p-55127131.entry.js} +2 -2
  415. package/dist/core/p-55127131.entry.js.map +1 -0
  416. package/dist/core/{p-5f6b0c72.entry.js → p-5536d26c.entry.js} +2 -2
  417. package/dist/core/p-5536d26c.entry.js.map +1 -0
  418. package/dist/core/p-5b39831f.entry.js +2 -0
  419. package/dist/core/p-5b39831f.entry.js.map +1 -0
  420. package/dist/core/{p-6f57b13c.js → p-613aa265.js} +1 -1
  421. package/dist/core/p-613aa265.js.map +1 -0
  422. package/dist/core/{p-fdcf4f5d.entry.js → p-649442b9.entry.js} +2 -2
  423. package/dist/core/p-649442b9.entry.js.map +1 -0
  424. package/dist/core/{p-b6e9eab9.entry.js → p-65a1ff78.entry.js} +2 -2
  425. package/dist/core/p-65a1ff78.entry.js.map +1 -0
  426. package/dist/core/{p-f91432bf.entry.js → p-6622567a.entry.js} +2 -2
  427. package/dist/core/p-6622567a.entry.js.map +1 -0
  428. package/dist/core/p-689a5bb3.entry.js +2 -0
  429. package/dist/core/p-689a5bb3.entry.js.map +1 -0
  430. package/dist/core/{p-7c0dcd00.js → p-68a5aaff.js} +1 -1
  431. package/dist/core/p-68a5aaff.js.map +1 -0
  432. package/dist/core/p-6da62e08.entry.js +2 -0
  433. package/dist/core/p-6da62e08.entry.js.map +1 -0
  434. package/dist/core/{p-095d3352.entry.js → p-72815d65.entry.js} +2 -2
  435. package/dist/core/p-72815d65.entry.js.map +1 -0
  436. package/dist/core/{p-10fd8931.entry.js → p-7799016a.entry.js} +2 -2
  437. package/dist/core/p-7799016a.entry.js.map +1 -0
  438. package/dist/core/p-786020b0.entry.js +2 -0
  439. package/dist/core/p-786020b0.entry.js.map +1 -0
  440. package/dist/core/{p-4efac9a5.entry.js → p-892ddab1.entry.js} +2 -2
  441. package/dist/core/p-892ddab1.entry.js.map +1 -0
  442. package/dist/core/{p-3b686a68.entry.js → p-8a4c5eb8.entry.js} +2 -2
  443. package/dist/core/p-8a4c5eb8.entry.js.map +1 -0
  444. package/dist/core/{p-d0fccb05.entry.js → p-8d8ba4d7.entry.js} +2 -2
  445. package/dist/core/p-8d8ba4d7.entry.js.map +1 -0
  446. package/dist/core/{p-92a9c0f7.entry.js → p-90608dc5.entry.js} +2 -2
  447. package/dist/core/p-90608dc5.entry.js.map +1 -0
  448. package/dist/core/{p-1b5f5bf2.entry.js → p-932a1a61.entry.js} +2 -2
  449. package/dist/core/p-932a1a61.entry.js.map +1 -0
  450. package/dist/core/p-94f255ff.entry.js +2 -0
  451. package/dist/core/p-94f255ff.entry.js.map +1 -0
  452. package/dist/core/{p-d19b9d1b.entry.js → p-9c792bb9.entry.js} +2 -2
  453. package/dist/core/p-9c792bb9.entry.js.map +1 -0
  454. package/dist/core/{p-ed9bc07a.entry.js → p-a10968a4.entry.js} +2 -2
  455. package/dist/core/p-a10968a4.entry.js.map +1 -0
  456. package/dist/core/{p-11833706.entry.js → p-a471cf70.entry.js} +2 -2
  457. package/dist/core/p-a471cf70.entry.js.map +1 -0
  458. package/dist/core/{p-55278403.entry.js → p-a7c7d85a.entry.js} +2 -2
  459. package/dist/core/p-a7c7d85a.entry.js.map +1 -0
  460. package/dist/core/{p-57839a76.entry.js → p-b1568cf3.entry.js} +2 -2
  461. package/dist/core/p-b1568cf3.entry.js.map +1 -0
  462. package/dist/core/{p-7b1dea48.entry.js → p-b4d2d905.entry.js} +2 -2
  463. package/dist/core/p-b4d2d905.entry.js.map +1 -0
  464. package/dist/core/p-ba27b1e2.js +2 -0
  465. package/dist/core/p-ba27b1e2.js.map +1 -0
  466. package/dist/core/{p-e948ffe5.entry.js → p-ba3f9d1b.entry.js} +2 -2
  467. package/dist/core/p-ba3f9d1b.entry.js.map +1 -0
  468. package/dist/core/p-c2281c7d.entry.js +2 -0
  469. package/dist/core/p-c2281c7d.entry.js.map +1 -0
  470. package/dist/core/{p-8c7f4343.js → p-c2e091d7.js} +1 -1
  471. package/dist/core/{p-4208e336.entry.js → p-c95e4edb.entry.js} +2 -2
  472. package/dist/core/p-c95e4edb.entry.js.map +1 -0
  473. package/dist/core/p-cda2ecbb.entry.js +2 -0
  474. package/dist/core/p-cda2ecbb.entry.js.map +1 -0
  475. package/dist/core/{p-b9c3598b.entry.js → p-ced76d36.entry.js} +2 -2
  476. package/dist/core/p-ced76d36.entry.js.map +1 -0
  477. package/dist/core/{p-83adbb69.entry.js → p-dcfc7f79.entry.js} +2 -2
  478. package/dist/core/p-dcfc7f79.entry.js.map +1 -0
  479. package/dist/core/p-de37ac0e.entry.js +2 -0
  480. package/dist/core/p-de37ac0e.entry.js.map +1 -0
  481. package/dist/core/{p-019688bf.entry.js → p-e565964f.entry.js} +2 -2
  482. package/dist/core/p-e565964f.entry.js.map +1 -0
  483. package/dist/core/{p-2c6f2aad.entry.js → p-e6028d7a.entry.js} +2 -2
  484. package/dist/core/p-e6028d7a.entry.js.map +1 -0
  485. package/dist/core/{p-80c4fdfb.entry.js → p-ebd83ea6.entry.js} +2 -2
  486. package/dist/core/p-ebd83ea6.entry.js.map +1 -0
  487. package/dist/core/{p-ad3102a5.entry.js → p-ed35b2d0.entry.js} +2 -2
  488. package/dist/core/p-ed35b2d0.entry.js.map +1 -0
  489. package/dist/core/p-f074ef5b.js +2 -0
  490. package/dist/core/{p-5914df44.entry.js → p-f8d7bda8.entry.js} +2 -2
  491. package/dist/core/p-f8d7bda8.entry.js.map +1 -0
  492. package/dist/core/p-fd8780e2.entry.js +2 -0
  493. package/dist/core/p-fd8780e2.entry.js.map +1 -0
  494. package/dist/esm/{OpenInNew-67a881e0.js → OpenInNew-cdeed5ce.js} +1 -1
  495. package/dist/esm/OpenInNew-cdeed5ce.js.map +1 -0
  496. package/dist/esm/{check-icon-abb210ec.js → check-icon-4a9f8371.js} +1 -1
  497. package/dist/esm/check-icon-4a9f8371.js.map +1 -0
  498. package/dist/esm/{chevron-icon-7927f709.js → chevron-icon-589e3b46.js} +1 -1
  499. package/dist/esm/chevron-icon-589e3b46.js.map +1 -0
  500. package/dist/esm/{close-icon-2f02b42a.js → close-icon-539ec8d1.js} +2 -2
  501. package/dist/esm/close-icon-539ec8d1.js.map +1 -0
  502. package/dist/esm/core.js +4 -7
  503. package/dist/esm/core.js.map +1 -1
  504. package/dist/esm/{helpers-8617aaa0.js → helpers-10f9f399.js} +27 -10
  505. package/dist/esm/helpers-10f9f399.js.map +1 -0
  506. package/dist/esm/ic-alert.entry.js +4 -4
  507. package/dist/esm/ic-alert.entry.js.map +1 -1
  508. package/dist/esm/ic-back-to-top.entry.js +3 -3
  509. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  510. package/dist/esm/ic-breadcrumb-group.entry.js +3 -3
  511. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  512. package/dist/esm/ic-breadcrumb.entry.js +4 -4
  513. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  514. package/dist/esm/ic-button_3.entry.js +228 -20
  515. package/dist/esm/ic-button_3.entry.js.map +1 -1
  516. package/dist/esm/ic-card.entry.js +4 -4
  517. package/dist/esm/ic-card.entry.js.map +1 -1
  518. package/dist/esm/ic-checkbox-group.entry.js +3 -3
  519. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  520. package/dist/esm/ic-checkbox.entry.js +3 -3
  521. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  522. package/dist/esm/ic-chip.entry.js +3 -3
  523. package/dist/esm/ic-chip.entry.js.map +1 -1
  524. package/dist/esm/ic-classification-banner.entry.js +1 -1
  525. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  526. package/dist/esm/ic-data-entity.entry.js +1 -1
  527. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  528. package/dist/esm/ic-data-row.entry.js +3 -3
  529. package/dist/esm/ic-data-row.entry.js.map +1 -1
  530. package/dist/esm/{ic-unstable-data-table.entry.js → ic-data-table.entry.js} +3 -3
  531. package/dist/esm/ic-data-table.entry.js.map +1 -0
  532. package/dist/esm/ic-dialog.entry.js +5 -5
  533. package/dist/esm/ic-dialog.entry.js.map +1 -1
  534. package/dist/esm/ic-divider.entry.js +3 -3
  535. package/dist/esm/ic-divider.entry.js.map +1 -1
  536. package/dist/esm/ic-empty-state.entry.js +33 -0
  537. package/dist/esm/ic-empty-state.entry.js.map +1 -0
  538. package/dist/esm/ic-footer-link-group.entry.js +3 -3
  539. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  540. package/dist/esm/ic-footer-link.entry.js +4 -4
  541. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  542. package/dist/esm/ic-footer.entry.js +7 -4
  543. package/dist/esm/ic-footer.entry.js.map +1 -1
  544. package/dist/esm/ic-hero.entry.js +3 -3
  545. package/dist/esm/ic-hero.entry.js.map +1 -1
  546. package/dist/esm/ic-horizontal-scroll.entry.js +3 -3
  547. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  548. package/dist/esm/ic-input-component-container_3.entry.js +43 -37
  549. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  550. package/dist/esm/ic-input-label_2.entry.js +3 -3
  551. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  552. package/dist/esm/ic-link.entry.js +4 -4
  553. package/dist/esm/ic-link.entry.js.map +1 -1
  554. package/dist/esm/ic-menu-group.entry.js +1 -1
  555. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  556. package/dist/esm/ic-menu-item.entry.js +5 -5
  557. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  558. package/dist/esm/ic-navigation-button.entry.js +9 -5
  559. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  560. package/dist/esm/ic-navigation-group.entry.js +5 -5
  561. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  562. package/dist/esm/ic-navigation-item.entry.js +5 -5
  563. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  564. package/dist/esm/ic-navigation-menu.entry.js +4 -4
  565. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  566. package/dist/esm/ic-page-header.entry.js +3 -3
  567. package/dist/esm/ic-page-header.entry.js.map +1 -1
  568. package/dist/esm/ic-pagination-bar.entry.js +3 -3
  569. package/dist/esm/ic-pagination-bar.entry.js.map +1 -1
  570. package/dist/esm/ic-pagination_4.entry.js +71 -17
  571. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  572. package/dist/esm/ic-popover-menu.entry.js +68 -16
  573. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  574. package/dist/esm/ic-radio-group.entry.js +3 -3
  575. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  576. package/dist/esm/ic-radio-option.entry.js +3 -3
  577. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  578. package/dist/esm/ic-search-bar.entry.js +35 -19
  579. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  580. package/dist/esm/ic-section-container.entry.js +1 -1
  581. package/dist/esm/ic-section-container.entry.js.map +1 -1
  582. package/dist/esm/ic-side-navigation.entry.js +6 -6
  583. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  584. package/dist/esm/ic-skeleton.entry.js +1 -1
  585. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  586. package/dist/esm/ic-status-tag.entry.js +3 -3
  587. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  588. package/dist/esm/ic-step.entry.js +2 -2
  589. package/dist/esm/ic-step.entry.js.map +1 -1
  590. package/dist/esm/ic-stepper.entry.js +3 -3
  591. package/dist/esm/ic-stepper.entry.js.map +1 -1
  592. package/dist/esm/ic-switch.entry.js +3 -3
  593. package/dist/esm/ic-switch.entry.js.map +1 -1
  594. package/dist/esm/ic-tab-context.entry.js +2 -2
  595. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  596. package/dist/esm/ic-tab-group.entry.js +3 -3
  597. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  598. package/dist/esm/ic-tab-panel.entry.js +2 -2
  599. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  600. package/dist/esm/ic-tab.entry.js +3 -3
  601. package/dist/esm/ic-tab.entry.js.map +1 -1
  602. package/dist/esm/ic-theme.entry.js +3 -3
  603. package/dist/esm/ic-theme.entry.js.map +1 -1
  604. package/dist/esm/ic-toast-region.entry.js +1 -1
  605. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  606. package/dist/esm/ic-toast.entry.js +4 -4
  607. package/dist/esm/ic-toast.entry.js.map +1 -1
  608. package/dist/esm/ic-top-navigation.entry.js +4 -4
  609. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  610. package/dist/esm/ic-typography.entry.js +4 -4
  611. package/dist/esm/ic-typography.entry.js.map +1 -1
  612. package/dist/esm/{index-36ab8165.js → index-5e4f5b3b.js} +150 -44
  613. package/dist/esm/index-5e4f5b3b.js.map +1 -0
  614. package/dist/esm/loader.js +4 -13
  615. package/dist/esm/loader.js.map +1 -1
  616. package/dist/esm/{popper-15e448b4.js → popper-0fbeff6d.js} +1 -1
  617. package/dist/esm/popper-0fbeff6d.js.map +1 -0
  618. package/dist/esm/{types-dd515332.js → types-b2398b37.js} +1 -1
  619. package/dist/esm/types-b2398b37.js.map +1 -0
  620. package/dist/types/components/ic-breadcrumb/ic-breadcrumb.d.ts +3 -3
  621. package/dist/types/components/ic-button/ic-button.d.ts +9 -1
  622. package/dist/types/components/ic-data-table/ic-data-table.d.ts +1 -1
  623. package/dist/types/components/ic-data-table/story-data.d.ts +105 -0
  624. package/dist/types/components/ic-dialog/ic-dialog.d.ts +5 -5
  625. package/dist/types/components/ic-empty-state/ic-empty-state.d.ts +35 -0
  626. package/dist/types/components/ic-empty-state/ic-empty-state.types.d.ts +1 -0
  627. package/dist/types/components/ic-empty-state/test/a11y/ic-empty-state.test.a11y.d.ts +1 -0
  628. package/dist/types/components/ic-menu/ic-menu.d.ts +8 -0
  629. package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +1 -0
  630. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +3 -0
  631. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +8 -0
  632. package/dist/types/components/ic-select/ic-select.d.ts +14 -0
  633. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +10 -0
  634. package/dist/types/components/ic-typography/ic-typography.d.ts +2 -1
  635. package/dist/types/components.d.ts +230 -135
  636. package/dist/types/stencil-public-runtime.d.ts +17 -5
  637. package/dist/types/utils/helpers.d.ts +2 -2
  638. package/dist/types/utils/types.d.ts +11 -2
  639. package/hydrate/index.d.ts +6 -6
  640. package/hydrate/index.js +662 -218
  641. package/loader/index.d.ts +1 -1
  642. package/package.json +11 -9
  643. package/dist/cjs/OpenInNew-f9958725.js.map +0 -1
  644. package/dist/cjs/check-icon-b2f60716.js.map +0 -1
  645. package/dist/cjs/chevron-icon-2bb3a907.js.map +0 -1
  646. package/dist/cjs/close-icon-8ccb0163.js.map +0 -1
  647. package/dist/cjs/helpers-3811d14b.js.map +0 -1
  648. package/dist/cjs/ic-unstable-data-table.cjs.entry.js.map +0 -1
  649. package/dist/cjs/index-4f4d2b43.js.map +0 -1
  650. package/dist/cjs/popper-d7adcfc6.js.map +0 -1
  651. package/dist/cjs/types-3eb02246.js.map +0 -1
  652. package/dist/components/ic-unstable-data-table.js.map +0 -1
  653. package/dist/core/p-019688bf.entry.js.map +0 -1
  654. package/dist/core/p-0584ebc5.entry.js.map +0 -1
  655. package/dist/core/p-095d3352.entry.js.map +0 -1
  656. package/dist/core/p-10fd8931.entry.js.map +0 -1
  657. package/dist/core/p-11833706.entry.js.map +0 -1
  658. package/dist/core/p-1af8f256.js +0 -3
  659. package/dist/core/p-1af8f256.js.map +0 -1
  660. package/dist/core/p-1b5f5bf2.entry.js.map +0 -1
  661. package/dist/core/p-1e0eb83a.entry.js +0 -2
  662. package/dist/core/p-1e0eb83a.entry.js.map +0 -1
  663. package/dist/core/p-2138a75e.entry.js +0 -2
  664. package/dist/core/p-2138a75e.entry.js.map +0 -1
  665. package/dist/core/p-29d35210.entry.js +0 -2
  666. package/dist/core/p-29d35210.entry.js.map +0 -1
  667. package/dist/core/p-2c6f2aad.entry.js.map +0 -1
  668. package/dist/core/p-35b9f898.entry.js +0 -2
  669. package/dist/core/p-35b9f898.entry.js.map +0 -1
  670. package/dist/core/p-3b686a68.entry.js.map +0 -1
  671. package/dist/core/p-4208e336.entry.js.map +0 -1
  672. package/dist/core/p-44512ebe.js +0 -2
  673. package/dist/core/p-4ddbc685.entry.js.map +0 -1
  674. package/dist/core/p-4efac9a5.entry.js.map +0 -1
  675. package/dist/core/p-5278461f.entry.js +0 -2
  676. package/dist/core/p-5278461f.entry.js.map +0 -1
  677. package/dist/core/p-55278403.entry.js.map +0 -1
  678. package/dist/core/p-57839a76.entry.js.map +0 -1
  679. package/dist/core/p-5914df44.entry.js.map +0 -1
  680. package/dist/core/p-5d89cfab.entry.js.map +0 -1
  681. package/dist/core/p-5f6b0c72.entry.js.map +0 -1
  682. package/dist/core/p-633cb50b.entry.js +0 -2
  683. package/dist/core/p-633cb50b.entry.js.map +0 -1
  684. package/dist/core/p-6f57b13c.js.map +0 -1
  685. package/dist/core/p-7232b2f0.entry.js.map +0 -1
  686. package/dist/core/p-7adfd23a.entry.js.map +0 -1
  687. package/dist/core/p-7b1dea48.entry.js.map +0 -1
  688. package/dist/core/p-7b475a6c.entry.js.map +0 -1
  689. package/dist/core/p-7c0dcd00.js.map +0 -1
  690. package/dist/core/p-7dda131b.entry.js.map +0 -1
  691. package/dist/core/p-80c4fdfb.entry.js.map +0 -1
  692. package/dist/core/p-83adbb69.entry.js.map +0 -1
  693. package/dist/core/p-8ae9fdd1.entry.js +0 -2
  694. package/dist/core/p-8ae9fdd1.entry.js.map +0 -1
  695. package/dist/core/p-92a9c0f7.entry.js.map +0 -1
  696. package/dist/core/p-a3b86ed0.entry.js +0 -2
  697. package/dist/core/p-a3b86ed0.entry.js.map +0 -1
  698. package/dist/core/p-a9e4e5f8.entry.js +0 -2
  699. package/dist/core/p-a9e4e5f8.entry.js.map +0 -1
  700. package/dist/core/p-ad3102a5.entry.js.map +0 -1
  701. package/dist/core/p-b36723c5.entry.js.map +0 -1
  702. package/dist/core/p-b5c0b75c.js +0 -2
  703. package/dist/core/p-b5c0b75c.js.map +0 -1
  704. package/dist/core/p-b6e9eab9.entry.js.map +0 -1
  705. package/dist/core/p-b7d521e9.entry.js.map +0 -1
  706. package/dist/core/p-b9c3598b.entry.js.map +0 -1
  707. package/dist/core/p-bdb10987.entry.js.map +0 -1
  708. package/dist/core/p-c571e57c.entry.js +0 -2
  709. package/dist/core/p-c571e57c.entry.js.map +0 -1
  710. package/dist/core/p-cc15dfdc.entry.js.map +0 -1
  711. package/dist/core/p-cc2b961d.entry.js +0 -2
  712. package/dist/core/p-cc2b961d.entry.js.map +0 -1
  713. package/dist/core/p-d0fccb05.entry.js.map +0 -1
  714. package/dist/core/p-d19b9d1b.entry.js.map +0 -1
  715. package/dist/core/p-d77c0936.entry.js.map +0 -1
  716. package/dist/core/p-df0b02b4.entry.js.map +0 -1
  717. package/dist/core/p-e948ffe5.entry.js.map +0 -1
  718. package/dist/core/p-ed9bc07a.entry.js.map +0 -1
  719. package/dist/core/p-f0fd1444.entry.js.map +0 -1
  720. package/dist/core/p-f91432bf.entry.js.map +0 -1
  721. package/dist/core/p-fdcf4f5d.entry.js.map +0 -1
  722. package/dist/core/p-fef750a3.entry.js.map +0 -1
  723. package/dist/esm/OpenInNew-67a881e0.js.map +0 -1
  724. package/dist/esm/check-icon-abb210ec.js.map +0 -1
  725. package/dist/esm/chevron-icon-7927f709.js.map +0 -1
  726. package/dist/esm/close-icon-2f02b42a.js.map +0 -1
  727. package/dist/esm/helpers-8617aaa0.js.map +0 -1
  728. package/dist/esm/ic-unstable-data-table.entry.js.map +0 -1
  729. package/dist/esm/index-36ab8165.js.map +0 -1
  730. package/dist/esm/polyfills/css-shim.js +0 -1
  731. package/dist/esm/popper-15e448b4.js.map +0 -1
  732. package/dist/esm/types-dd515332.js.map +0 -1
  733. /package/dist/core/{p-06321d19.js.map → p-3b185c32.js.map} +0 -0
  734. /package/dist/core/{p-44512ebe.js.map → p-426ec638.js.map} +0 -0
  735. /package/dist/core/{p-8c7f4343.js.map → p-c2e091d7.js.map} +0 -0
  736. /package/dist/core/{p-8d4f7027.js.map → p-f074ef5b.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"ic-breadcrumb-group.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,qgBAAqgB;;MCcrhB,eAAe;;;;;IAClB,oBAAe,GAAG,EAAE,CAAC;IAMrB,kBAAa,GAAW,eAAe,CAAC;IACxC,mBAAc,GAAmB,IAAI,CAAC;IACtC,mBAAc,GAAW,gBAAgB,CAAC;IAgD1C,sBAAiB,GAAG;MAC1B,IAAI,IAAI,CAAC,kBAAkB,EAAE;QAC3B,IAAI,CAAC,qBAAqB,EAAE,CAAC;OAC9B;KACF,CAAC;IAEM,0BAAqB,GAAG;MAC9B,IAAI,IAA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AAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;GAC5E;EAsLD,MAAM;IACJ,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,IAAI,EAAE,IAAI,CAAC,kBAAkB;QAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;OAC1B,IAED,yBAAgB,aAAa,IAC3B,cACE,eAAQ,CACL,CACD,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/ic-breadcrumb-group/ic-breadcrumb-group.css?tag=ic-breadcrumb-group&encapsulation=shadow","./src/components/ic-breadcrumb-group/ic-breadcrumb-group.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n:host ol {\n display: flex;\n list-style-type: none;\n align-items: center;\n flex-wrap: wrap;\n padding: 0;\n margin: 0;\n}\n\n:host(.back) ol ::slotted(ic-breadcrumb) {\n display: none;\n}\n\n:host(.back) ol ::slotted(ic-breadcrumb.show) {\n display: flex;\n}\n\n:host(.collapsed) ol ::slotted(ic-breadcrumb.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n\n:host(.collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden) {\n display: block;\n opacity: 0;\n transition: all var(--ic-easing-transition-slow);\n}\n\n:host(.collapsed) ol ::slotted(ic-breadcrumb.fade) {\n opacity: 1;\n}\n","import { Component, Host, h, Element, Prop, State } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n} from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-breadcrumb-group\",\n styleUrl: \"ic-breadcrumb-group.css\",\n shadow: true,\n})\n\n// Added ResizeObserver to find out width of breadcrumbs and parents. Use side navigation long title for ref.\nexport class BreadcrumbGroup {\n private ADD_CLASS_DELAY = 50;\n private breadcrumb: HTMLIcBreadcrumbElement;\n private breadcrumbs: HTMLIcBreadcrumbElement[];\n private collapsedBreadcrumbEl: HTMLButtonElement;\n private collapsedBreadcrumbs: HTMLIcBreadcrumbElement[];\n private collapsedBreadcrumbWrapper: HTMLIcBreadcrumbElement;\n private IC_BREADCRUMB: string = \"ic-breadcrumb\";\n private resizeObserver: ResizeObserver = null;\n private SHOW_BACK_ICON: string = \"show-back-icon\";\n\n @Element() el: HTMLIcBreadcrumbGroupElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() expandedBreadcrumbs: boolean = false;\n\n /**\n * If `true`, display only a single breadcrumb for the parent page with a back icon.\n */\n @Prop() backBreadcrumbOnly: boolean = false;\n /**\n * If `true`, all breadcrumbs between the first and last breadcrumb will be collapsed.\n */\n @Prop() collapsed: boolean = false;\n\n componentWillLoad(): void {\n const allBreadcrumbs = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n\n if (this.backBreadcrumbOnly) {\n this.setBackBreadcrumb();\n } else {\n checkResizeObserver(this.runResizeObserver);\n }\n\n if (this.collapsed) {\n this.collapsedBreadcrumbWrapper = this.renderCollapsedBreadcrumb();\n\n if (allBreadcrumbs.length > 2) {\n if (getCurrentDeviceSize() === DEVICE_SIZES.S) {\n this.setLastParentCollapsedBackBreadcrumb();\n } else {\n this.setCollapsed();\n }\n }\n }\n }\n\n disconnectedCallback(): void {\n this.breadcrumb.removeEventListener(\n \"transitionend\",\n this.transitionendHandler\n );\n this.collapsedBreadcrumbEl.removeEventListener(\"click\", this.clickHandler);\n }\n\n private setBackBreadcrumb = () => {\n if (this.backBreadcrumbOnly) {\n this.setBackBreadcrumbAttr();\n }\n };\n\n private setBackBreadcrumbAttr = () => {\n if (this.lastParentBreadcrumb) {\n this.lastParentBreadcrumb.classList.add(\"show\");\n this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON, \"true\");\n }\n };\n\n private getLastParentBreadcrumb = (): HTMLIcBreadcrumbElement | null => {\n const allBreadcrumbs: HTMLIcBreadcrumbElement[] = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n\n if (allBreadcrumbs.length === 1) {\n return null;\n }\n\n this.breadcrumbs = allBreadcrumbs.filter(\n (breadcrumb) => !breadcrumb.getAttribute(\"current\")\n );\n this.breadcrumb = this.breadcrumbs[this.breadcrumbs.length - 1];\n\n return this.breadcrumb;\n };\n\n private lastParentBreadcrumb = this.getLastParentBreadcrumb();\n\n private setDefaultBreadcrumbs = () => {\n const allBreadcrumbs = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n allBreadcrumbs.forEach((breadcrumb) => {\n breadcrumb.setAttribute(this.SHOW_BACK_ICON, \"false\");\n });\n };\n\n private setCollapsed = () => {\n if (this.collapsed) {\n const allBreadcrumbs: HTMLIcBreadcrumbElement[] = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n this.collapsedBreadcrumbs = allBreadcrumbs\n .splice(1, allBreadcrumbs.length - 2)\n .filter(\n (breadcrumb) =>\n !breadcrumb.classList.contains(\"collapsed-breadcrumb-wrapper\")\n );\n\n this.collapsedBreadcrumbs.forEach((breadcrumb) =>\n breadcrumb.classList.add(\"hide\")\n );\n\n const firstBreadcrumb = allBreadcrumbs[0];\n\n if (firstBreadcrumb) {\n firstBreadcrumb.insertAdjacentElement(\n \"afterend\",\n this.collapsedBreadcrumbWrapper\n );\n }\n }\n };\n\n private clickHandler = () => {\n this.handleHiddenCollapsedBreadcrumbs(this.collapsedBreadcrumbWrapper);\n };\n\n private renderCollapsedBreadcrumb = () => {\n this.collapsedBreadcrumbWrapper = document.createElement(\"ic-breadcrumb\");\n this.collapsedBreadcrumbWrapper.classList.add(\n \"collapsed-breadcrumb-wrapper\"\n );\n this.collapsedBreadcrumbEl = document.createElement(\"button\");\n\n const ariaLabel = document.createElement(\"span\");\n ariaLabel.id = \"collapsed-button-label\";\n ariaLabel.innerText = \"Collapsed breadcrumbs\";\n ariaLabel.className = \"hide\";\n this.collapsedBreadcrumbEl.setAttribute(\n \"aria-labelledby\",\n \"collapsed-button-label\"\n );\n\n const ariaDescribed = document.createElement(\"span\");\n ariaDescribed.id = \"collapsed-button-described\";\n ariaDescribed.innerText = \"Select to view collapsed breadcrumbs\";\n ariaDescribed.className = \"hide\";\n this.collapsedBreadcrumbEl.setAttribute(\n \"aria-describedby\",\n \"collapsed-button-described\"\n );\n\n this.collapsedBreadcrumbEl.id = \"collapsed-ellipsis\";\n this.collapsedBreadcrumbEl.innerText = \"...\";\n this.collapsedBreadcrumbEl.classList.add(\"collapsed-breadcrumb\");\n this.collapsedBreadcrumbEl.addEventListener(\"click\", this.clickHandler);\n\n this.collapsedBreadcrumbWrapper.append(ariaDescribed);\n this.collapsedBreadcrumbWrapper.append(ariaLabel);\n this.collapsedBreadcrumbWrapper.append(this.collapsedBreadcrumbEl);\n\n return this.collapsedBreadcrumbWrapper;\n };\n\n private handleHiddenCollapsedBreadcrumbs = (\n collapsedBreadcrumbWrapper: HTMLIcBreadcrumbElement\n ) => {\n collapsedBreadcrumbWrapper.remove();\n this.collapsedBreadcrumbs.forEach((breadcrumb) => {\n breadcrumb.classList.add(\"visuallyhidden\");\n breadcrumb.classList.remove(\"hide\");\n setTimeout(() => {\n breadcrumb.classList.add(\"fade\");\n }, this.ADD_CLASS_DELAY);\n\n this.removeVisuallyHiddenClass(breadcrumb);\n });\n this.expandedBreadcrumbs = true;\n };\n\n private transitionendHandler = (event: TransitionEvent) => {\n if (event.propertyName === \"opacity\") {\n (event.target as HTMLElement).classList.remove(\"visuallyhidden\");\n }\n };\n\n private removeVisuallyHiddenClass = (breadcrumb: HTMLIcBreadcrumbElement) => {\n breadcrumb.addEventListener(\"transitionend\", this.transitionendHandler);\n };\n\n private setLastParentCollapsedBackBreadcrumb = () => {\n this.setBackBreadcrumbAttr();\n this.lastParentBreadcrumb.classList.remove(\"hide\");\n };\n\n private revertLastParentCollapsedBreadcrumb = () => {\n this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON, \"false\");\n };\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n\n if (this.deviceSize <= DEVICE_SIZES.S) {\n this.el.setAttribute(\"back-breadcrumb-only\", \"true\");\n if (this.collapsed) {\n this.setLastParentCollapsedBackBreadcrumb();\n } else {\n this.setBackBreadcrumb();\n }\n } else {\n this.el.setAttribute(\"back-breadcrumb-only\", \"false\");\n if (this.collapsed && this.breadcrumbs && this.breadcrumbs.length > 2) {\n this.revertLastParentCollapsedBreadcrumb();\n if (this.expandedBreadcrumbs) {\n this.setDefaultBreadcrumbs();\n } else {\n this.setCollapsed();\n }\n } else {\n this.setDefaultBreadcrumbs();\n }\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n return (\n <Host\n class={{\n back: this.backBreadcrumbOnly,\n collapsed: this.collapsed,\n }}\n >\n <nav aria-label=\"breadcrumbs\">\n <ol>\n <slot />\n </ol>\n </nav>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-breadcrumb-group.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,qgBAAqgB;;MCcrhB,eAAe;;;;;IAClB,oBAAe,GAAG,EAAE,CAAC;IAMrB,kBAAa,GAAW,eAAe,CAAC;IACxC,mBAAc,GAAmB,IAAI,CAAC;IACtC,mBAAc,GAAW,gBAAgB,CAAC;IAgD1C,sBAAiB,GAAG;MAC1B,IAAI,IAAI,CAAC,kBAAkB,EAAE;QAC3B,IAAI,CAAC,qBAAqB,EAAE,CAAC;OAC9B;KACF,CAAC;IAEM,0BAAqB,GAAG;MAC9B,IAAI,IAAI,CAAC,oBAAoB,EAAE;QAC7B,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC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CAAC,SAAS;OAC1B,IAED,yBAAgB,aAAa,IAC3B,cACE,eAAQ,CACL,CACD,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-breadcrumb-group/ic-breadcrumb-group.css?tag=ic-breadcrumb-group&encapsulation=shadow","src/components/ic-breadcrumb-group/ic-breadcrumb-group.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n:host ol {\n display: flex;\n list-style-type: none;\n align-items: center;\n flex-wrap: wrap;\n padding: 0;\n margin: 0;\n}\n\n:host(.back) ol ::slotted(ic-breadcrumb) {\n display: none;\n}\n\n:host(.back) ol ::slotted(ic-breadcrumb.show) {\n display: flex;\n}\n\n:host(.collapsed) ol ::slotted(ic-breadcrumb.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n\n:host(.collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden) {\n display: block;\n opacity: 0;\n transition: all var(--ic-easing-transition-slow);\n}\n\n:host(.collapsed) ol ::slotted(ic-breadcrumb.fade) {\n opacity: 1;\n}\n","import { Component, Host, h, Element, Prop, State } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n} from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-breadcrumb-group\",\n styleUrl: \"ic-breadcrumb-group.css\",\n shadow: true,\n})\n\n// Added ResizeObserver to find out width of breadcrumbs and parents. Use side navigation long title for ref.\nexport class BreadcrumbGroup {\n private ADD_CLASS_DELAY = 50;\n private breadcrumb: HTMLIcBreadcrumbElement;\n private breadcrumbs: HTMLIcBreadcrumbElement[];\n private collapsedBreadcrumbEl: HTMLButtonElement;\n private collapsedBreadcrumbs: HTMLIcBreadcrumbElement[];\n private collapsedBreadcrumbWrapper: HTMLIcBreadcrumbElement;\n private IC_BREADCRUMB: string = \"ic-breadcrumb\";\n private resizeObserver: ResizeObserver = null;\n private SHOW_BACK_ICON: string = \"show-back-icon\";\n\n @Element() el: HTMLIcBreadcrumbGroupElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() expandedBreadcrumbs: boolean = false;\n\n /**\n * If `true`, display only a single breadcrumb for the parent page with a back icon.\n */\n @Prop() backBreadcrumbOnly: boolean = false;\n /**\n * If `true`, all breadcrumbs between the first and last breadcrumb will be collapsed.\n */\n @Prop() collapsed: boolean = false;\n\n componentWillLoad(): void {\n const allBreadcrumbs = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n\n if (this.backBreadcrumbOnly) {\n this.setBackBreadcrumb();\n } else {\n checkResizeObserver(this.runResizeObserver);\n }\n\n if (this.collapsed) {\n this.collapsedBreadcrumbWrapper = this.renderCollapsedBreadcrumb();\n\n if (allBreadcrumbs.length > 2) {\n if (getCurrentDeviceSize() === DEVICE_SIZES.S) {\n this.setLastParentCollapsedBackBreadcrumb();\n } else {\n this.setCollapsed();\n }\n }\n }\n }\n\n disconnectedCallback(): void {\n this.breadcrumb.removeEventListener(\n \"transitionend\",\n this.transitionendHandler\n );\n this.collapsedBreadcrumbEl.removeEventListener(\"click\", this.clickHandler);\n }\n\n private setBackBreadcrumb = () => {\n if (this.backBreadcrumbOnly) {\n this.setBackBreadcrumbAttr();\n }\n };\n\n private setBackBreadcrumbAttr = () => {\n if (this.lastParentBreadcrumb) {\n this.lastParentBreadcrumb.classList.add(\"show\");\n this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON, \"true\");\n }\n };\n\n private getLastParentBreadcrumb = (): HTMLIcBreadcrumbElement | null => {\n const allBreadcrumbs: HTMLIcBreadcrumbElement[] = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n\n if (allBreadcrumbs.length === 1) {\n return null;\n }\n\n this.breadcrumbs = allBreadcrumbs.filter(\n (breadcrumb) => !breadcrumb.getAttribute(\"current\")\n );\n this.breadcrumb = this.breadcrumbs[this.breadcrumbs.length - 1];\n\n return this.breadcrumb;\n };\n\n private lastParentBreadcrumb = this.getLastParentBreadcrumb();\n\n private setDefaultBreadcrumbs = () => {\n const allBreadcrumbs = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n allBreadcrumbs.forEach((breadcrumb) => {\n breadcrumb.setAttribute(this.SHOW_BACK_ICON, \"false\");\n });\n };\n\n private setCollapsed = () => {\n if (this.collapsed) {\n const allBreadcrumbs: HTMLIcBreadcrumbElement[] = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n this.collapsedBreadcrumbs = allBreadcrumbs\n .splice(1, allBreadcrumbs.length - 2)\n .filter(\n (breadcrumb) =>\n !breadcrumb.classList.contains(\"collapsed-breadcrumb-wrapper\")\n );\n\n this.collapsedBreadcrumbs.forEach((breadcrumb) =>\n breadcrumb.classList.add(\"hide\")\n );\n\n const firstBreadcrumb = allBreadcrumbs[0];\n\n if (firstBreadcrumb) {\n firstBreadcrumb.insertAdjacentElement(\n \"afterend\",\n this.collapsedBreadcrumbWrapper\n );\n }\n }\n };\n\n private clickHandler = () => {\n this.handleHiddenCollapsedBreadcrumbs(this.collapsedBreadcrumbWrapper);\n };\n\n private renderCollapsedBreadcrumb = () => {\n this.collapsedBreadcrumbWrapper = document.createElement(\"ic-breadcrumb\");\n this.collapsedBreadcrumbWrapper.classList.add(\n \"collapsed-breadcrumb-wrapper\"\n );\n this.collapsedBreadcrumbEl = document.createElement(\"button\");\n\n const ariaLabel = document.createElement(\"span\");\n ariaLabel.id = \"collapsed-button-label\";\n ariaLabel.innerText = \"Collapsed breadcrumbs\";\n ariaLabel.className = \"hide\";\n this.collapsedBreadcrumbEl.setAttribute(\n \"aria-labelledby\",\n \"collapsed-button-label\"\n );\n\n const ariaDescribed = document.createElement(\"span\");\n ariaDescribed.id = \"collapsed-button-described\";\n ariaDescribed.innerText = \"Select to view collapsed breadcrumbs\";\n ariaDescribed.className = \"hide\";\n this.collapsedBreadcrumbEl.setAttribute(\n \"aria-describedby\",\n \"collapsed-button-described\"\n );\n\n this.collapsedBreadcrumbEl.id = \"collapsed-ellipsis\";\n this.collapsedBreadcrumbEl.innerText = \"...\";\n this.collapsedBreadcrumbEl.classList.add(\"collapsed-breadcrumb\");\n this.collapsedBreadcrumbEl.addEventListener(\"click\", this.clickHandler);\n\n this.collapsedBreadcrumbWrapper.append(ariaDescribed);\n this.collapsedBreadcrumbWrapper.append(ariaLabel);\n this.collapsedBreadcrumbWrapper.append(this.collapsedBreadcrumbEl);\n\n return this.collapsedBreadcrumbWrapper;\n };\n\n private handleHiddenCollapsedBreadcrumbs = (\n collapsedBreadcrumbWrapper: HTMLIcBreadcrumbElement\n ) => {\n collapsedBreadcrumbWrapper.remove();\n this.collapsedBreadcrumbs.forEach((breadcrumb) => {\n breadcrumb.classList.add(\"visuallyhidden\");\n breadcrumb.classList.remove(\"hide\");\n setTimeout(() => {\n breadcrumb.classList.add(\"fade\");\n }, this.ADD_CLASS_DELAY);\n\n this.removeVisuallyHiddenClass(breadcrumb);\n });\n this.expandedBreadcrumbs = true;\n };\n\n private transitionendHandler = (event: TransitionEvent) => {\n if (event.propertyName === \"opacity\") {\n (event.target as HTMLElement).classList.remove(\"visuallyhidden\");\n }\n };\n\n private removeVisuallyHiddenClass = (breadcrumb: HTMLIcBreadcrumbElement) => {\n breadcrumb.addEventListener(\"transitionend\", this.transitionendHandler);\n };\n\n private setLastParentCollapsedBackBreadcrumb = () => {\n this.setBackBreadcrumbAttr();\n this.lastParentBreadcrumb.classList.remove(\"hide\");\n };\n\n private revertLastParentCollapsedBreadcrumb = () => {\n this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON, \"false\");\n };\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n\n if (this.deviceSize <= DEVICE_SIZES.S) {\n this.el.setAttribute(\"back-breadcrumb-only\", \"true\");\n if (this.collapsed) {\n this.setLastParentCollapsedBackBreadcrumb();\n } else {\n this.setBackBreadcrumb();\n }\n } else {\n this.el.setAttribute(\"back-breadcrumb-only\", \"false\");\n if (this.collapsed && this.breadcrumbs && this.breadcrumbs.length > 2) {\n this.revertLastParentCollapsedBreadcrumb();\n if (this.expandedBreadcrumbs) {\n this.setDefaultBreadcrumbs();\n } else {\n this.setCollapsed();\n }\n } else {\n this.setDefaultBreadcrumbs();\n }\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n return (\n <Host\n class={{\n back: this.backBreadcrumbOnly,\n collapsed: this.collapsed,\n }}\n >\n <nav aria-label=\"breadcrumbs\">\n <ol>\n <slot />\n </ol>\n </nav>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"ic-breadcrumb2.js","mappings":";;;;;;;;;;AAAA,MAAM,eAAe,GAAG,k1DAAk1D;;MCc71D,UAAU;;;;;IAyCb,4BAAuB,GAAG,CAChC,OAAgB,EAChB,SAAiB,EACjB,aAAqB,EACrB,IAAY;MAEZ,MAAM,YAAY,GAChB,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,EAAE,CAAC;MAEpE,IAAI,OAAO,IAAI,YAAY,EAAE;QAC3B,QACE,YACE,KAAK,EAAE;YACL,wBAAwB,EAAE,OAAO;WAClC,IAEA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,YAAM,IAAI,EAAC,MAAM,GAAQ,EACxD,SAAS,CACL,EACP;OACH;MAED,QACE,eACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,iBAAiB,sBACL,IAAI,CAAC,YAAY,IAAI,aAAa,IAAI,aAAa,IAEpE,IAAI,CAAC,YAAY,KAChB,WAAK,KAAK,EAAC,WAAW,EAAC,SAAS,EAAE,QAAQ,GAAQ,CACnD,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI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EnE,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,IAAI,EAAE,IAAI,CAAC,YAAY;OACxB,kBACa,OAAO,IAAI,MAAM,EAC/B,IAAI,EAAC,UAAU,IAEf,WAAK,KAAK,EAAC,YAAY,IACrB,YAAM,SAAS,EAAE,WAAW,EAAE,KAAK,EAAC,SAAS,iBAAa,MAAM,GAAG,EAClE,IAAI,CAAC,YAAY,IAAI,aAAa,KACjC,YACE,EAAE,EAAE,aAAa,EACjB,KAAK,EAAC,MAAM,IACZ,WAAW,SAAS,EAAE,CAAQ,CACjC,EACA,YAAY,IAAI,OAAO,IACtB,IAAI,CAAC,uBAAuB,CAC1B,OAAO,EACP,SAAS,EACT,aAAa,EACb,IAAI,CACL,KAED,eAAQ,CACT,CACG,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","./src/components/ic-breadcrumb/ic-breadcrumb.tsx"],"sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg {\n color: var(--ic-architectural-400);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: var(--ic-hyperlink);\n}\n\n:host(.back) {\n display: flex;\n align-items: center;\n}\n\n:host(.back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: inline-flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n\n@supports (text-decoration-thickness: 25%) {\n ic-link {\n --breadcrumb-link-display: flex;\n }\n\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import { Component, Host, Prop, h, Element, Method } from \"@stencil/core\";\nimport { IcBreadcrumbDefault } from \"./ic-breadcrumb.types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { isSlotUsed } from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-breadcrumb\",\n styleUrl: \"ic-breadcrumb.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Breadcrumb {\n @Element() el: HTMLIcBreadcrumbElement;\n\n /**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\n\n /**\n * If `true`, aria-current will be set on the breadcrumb.\n */\n @Prop() current?: boolean = false;\n\n /**\n * The URL that the breadcrumb link points to.\n */\n @Prop() href?: string;\n\n /**\n * The title of the breadcrumb.\n */\n @Prop() pageTitle!: string;\n\n /**\n * @internal If `true`, back icon will be displayed.\n */\n @Prop({ reflect: true }) showBackIcon: boolean = false;\n\n componentWillRender(): void {\n this.setSlottedCurrentPageClass();\n }\n\n /**\n * Sets focus on the breadcrumb.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"ic-link\")) {\n this.el.shadowRoot.querySelector(\"ic-link\").focus();\n }\n }\n\n private renderDefaultBreadcrumb = (\n current: boolean,\n pageTitle: string,\n describedById: string,\n href: string\n ): IcBreadcrumbDefault => {\n const hasPageTitle =\n pageTitle !== null && pageTitle !== undefined && pageTitle !== \"\";\n\n if (current && hasPageTitle) {\n return (\n <span\n class={{\n \"current-page-container\": current,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n {pageTitle}\n </span>\n );\n }\n\n return (\n <ic-link\n href={href}\n class=\"breadcrumb-link\"\n aria-describedby={this.showBackIcon && describedById && describedById}\n >\n {this.showBackIcon && (\n <div class=\"back-icon\" innerHTML={backIcon}></div>\n )}\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n {pageTitle}\n </ic-link>\n );\n };\n\n private setSlottedCurrentPageClass = () => {\n const icLink = this.el.querySelector(\"ic-link\");\n const currentPage = \"current-page\";\n if (icLink) {\n icLink.classList.remove(currentPage);\n if (this.current) {\n const hasCurrentPageClass = icLink.classList.contains(currentPage);\n if (!hasCurrentPageClass) {\n icLink.classList.add(\"breadcrumb-link\", currentPage);\n }\n }\n }\n };\n\n render() {\n const { current, href, pageTitle } = this;\n const describedById = `${\n pageTitle && pageTitle.toLowerCase().replace(\" \", \"-\")\n }-describedby`;\n\n const hasPageTitle =\n pageTitle !== null && pageTitle !== undefined && pageTitle !== \"\";\n const hasHref = href !== null && href !== undefined && href !== \"\";\n\n return (\n <Host\n class={{\n back: this.showBackIcon,\n }}\n aria-current={current && \"page\"}\n role=\"listitem\"\n >\n <div class=\"breadcrumb\">\n <span innerHTML={chevronIcon} class=\"chevron\" aria-hidden=\"true\" />\n {this.showBackIcon && describedById && (\n <span\n id={describedById}\n class=\"hide\"\n >{`Back to ${pageTitle}`}</span>\n )}\n {hasPageTitle && hasHref ? (\n this.renderDefaultBreadcrumb(\n current,\n pageTitle,\n describedById,\n href\n )\n ) : (\n <slot />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-breadcrumb2.js","mappings":";;;;;;;;;;AAAA,MAAM,eAAe,GAAG,k1DAAk1D;;MCiB71D,UAAU;;;;;IAqCb,4BAAuB,GAAG,CAChC,OAAgB,EAChB,SAAiB,EACjB,aAAqB,EACrB,IAAY;MAEZ,MAAM,YAAY,GAChB,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,EAAE,CAAC;MAEpE,IAAI,OAAO,IAAI,YAAY,EAAE;QAC3B,QACE,YACE,KAAK,EAAE;YACL,wBAAwB,EAAE,OAAO;WAClC,IAEA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,YAAM,IAAI,EAAC,MAAM,GAAQ,EACxD,SAAS,CACL,EACP;OACH;MAED,QACE,eACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,iBAAiB,sBACL,IAAI,CAAC,YAAY,IAAI,aAAa,IAAI,aAAa,IAEpE,IAAI,CAAC,YAAY,KAChB,WAAK,KAAK,EAAC,WAAW,EAAC,SAAS,EAAE,QAAQ,GAAQ,CACnD,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,YAAM,IAAI,EAAC,MAAM,GAAQ,EACxD,SAAS,CACF,EACV;KACH,CAAC;IAEM,+BAA0B,GAAG;MACnC,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;MAChD,MAAM,WAAW,GAAG,cAAc,CAAC;M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EAAC,SAAS,iBAAa,MAAM,GAAG,EAClE,IAAI,CAAC,YAAY,IAAI,aAAa,KACjC,YACE,EAAE,EAAE,aAAa,EACjB,KAAK,EAAC,MAAM,IACZ,WAAW,SAAS,EAAE,CAAQ,CACjC,EACA,YAAY,IAAI,OAAO,IACtB,IAAI,CAAC,uBAAuB,CAC1B,OAAO,EACP,SAAS,EACT,aAAa,EACb,IAAI,CACL,KAED,eAAQ,CACT,CACG,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","src/components/ic-breadcrumb/ic-breadcrumb.tsx"],"sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg {\n color: var(--ic-architectural-400);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: var(--ic-hyperlink);\n}\n\n:host(.back) {\n display: flex;\n align-items: center;\n}\n\n:host(.back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: inline-flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n\n@supports (text-decoration-thickness: 25%) {\n ic-link {\n --breadcrumb-link-display: flex;\n }\n\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import { Component, Host, Prop, h, Element, Method } from \"@stencil/core\";\nimport { IcBreadcrumbDefault } from \"./ic-breadcrumb.types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { isSlotUsed } from \"../../utils/helpers\";\n\n/**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\n@Component({\n tag: \"ic-breadcrumb\",\n styleUrl: \"ic-breadcrumb.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Breadcrumb {\n @Element() el: HTMLIcBreadcrumbElement;\n\n /**\n * If `true`, aria-current will be set on the breadcrumb.\n */\n @Prop() current?: boolean = false;\n\n /**\n * The URL that the breadcrumb link points to.\n */\n @Prop() href?: string;\n\n /**\n * The title of the breadcrumb.\n */\n @Prop() pageTitle!: string;\n\n /**\n * @internal If `true`, back icon will be displayed.\n */\n @Prop({ reflect: true }) showBackIcon: boolean = false;\n\n componentWillRender(): void {\n this.setSlottedCurrentPageClass();\n }\n\n /**\n * Sets focus on the breadcrumb.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"ic-link\")) {\n this.el.shadowRoot.querySelector(\"ic-link\").focus();\n }\n }\n\n private renderDefaultBreadcrumb = (\n current: boolean,\n pageTitle: string,\n describedById: string,\n href: string\n ): IcBreadcrumbDefault => {\n const hasPageTitle =\n pageTitle !== null && pageTitle !== undefined && pageTitle !== \"\";\n\n if (current && hasPageTitle) {\n return (\n <span\n class={{\n \"current-page-container\": current,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n {pageTitle}\n </span>\n );\n }\n\n return (\n <ic-link\n href={href}\n class=\"breadcrumb-link\"\n aria-describedby={this.showBackIcon && describedById && describedById}\n >\n {this.showBackIcon && (\n <div class=\"back-icon\" innerHTML={backIcon}></div>\n )}\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n {pageTitle}\n </ic-link>\n );\n };\n\n private setSlottedCurrentPageClass = () => {\n const icLink = this.el.querySelector(\"ic-link\");\n const currentPage = \"current-page\";\n if (icLink) {\n icLink.classList.remove(currentPage);\n if (this.current) {\n const hasCurrentPageClass = icLink.classList.contains(currentPage);\n if (!hasCurrentPageClass) {\n icLink.classList.add(\"breadcrumb-link\", currentPage);\n }\n }\n }\n };\n\n render() {\n const { current, href, pageTitle } = this;\n const describedById = `${\n pageTitle && pageTitle.toLowerCase().replace(\" \", \"-\")\n }-describedby`;\n\n const hasPageTitle =\n pageTitle !== null && pageTitle !== undefined && pageTitle !== \"\";\n const hasHref = href !== null && href !== undefined && href !== \"\";\n\n return (\n <Host\n class={{\n back: this.showBackIcon,\n }}\n aria-current={current && \"page\"}\n role=\"listitem\"\n >\n <div class=\"breadcrumb\">\n <span innerHTML={chevronIcon} class=\"chevron\" aria-hidden=\"true\" />\n {this.showBackIcon && describedById && (\n <span\n id={describedById}\n class=\"hide\"\n >{`Back to ${pageTitle}`}</span>\n )}\n {hasPageTitle && hasHref ? (\n this.renderDefaultBreadcrumb(\n current,\n pageTitle,\n describedById,\n href\n )\n ) : (\n <slot />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ import { d as defineCustomElement$3 } from './ic-loading-indicator2.js';
5
5
  import { d as defineCustomElement$2 } from './ic-tooltip2.js';
6
6
  import { d as defineCustomElement$1 } from './ic-typography2.js';
7
7
 
8
- const icButtonCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;--button-default:var(--ic-action-default);--button-default-hover:var(--ic-action-default-hover);--button-default-active:var(--ic-action-default-active);--button-default-background-hover:var(--ic-action-default-bg-hover);--button-default-background-active:var(--ic-action-default-bg-active);--icon-width:100%;--icon-height:100%}.button{font-family:var(--ic-font-body-family);text-decoration:none;font-weight:600;font-size:0.875rem;transition:var(--ic-easing-transition-fast);border-radius:var(--ic-border-radius);min-width:var(--min-width, 6.25rem);display:inline-flex;gap:var(--ic-space-xs);flex-direction:row;justify-content:center;align-items:center;background:none;border:none;box-sizing:border-box;white-space:nowrap;vertical-align:middle}:host(.with-badge) .button{border-radius:0.2188rem}.button:hover{cursor:pointer}.button:focus,:host .button:focus{box-shadow:var(--ic-border-focus)}:host(.light) .button:focus{box-shadow:var(--ic-border-focus)}.button:focus-visible{outline:var(--ic-hc-focus-outline)}:host(.dark) .button{--button-default:var(--ic-action-dark);--button-default-hover:var(--ic-action-dark);--button-default-active:var(--ic-action-dark);--button-default-background-hover:var(--ic-action-dark-bg-hover);--button-default-background-active:var(--ic-action-dark-bg-active)}:host(.light) .button{--button-default:var(--ic-action-light);--button-default-hover:var(--ic-action-light);--button-default-active:var(--ic-action-light);--button-default-background-hover:var(--ic-action-light-bg-hover);--button-default-background-active:var(--ic-action-light-bg-active)}:host(.button-variant-primary.light) .button{color:var(--ic-color-primary-text);--button-default-hover:var(--ic-action-light-hover);--button-default-active:var(--ic-action-light-active)}:host(.button-variant-primary.dark) .button{--button-default-hover:var(--ic-action-dark-hover);--button-default-active:var(--ic-action-dark-active)}:host(.disabled),:host(.disabled) .button,:host(.loading),:host(.loading) .button{pointer-events:none}:host(.loading-with-icon) .button{min-width:var(--min-width, 8.25rem)}:host(.button-variant-primary) .button{color:var(--ic-architectural-white);background-color:var(--button-default)}:host(.button-variant-primary) .button:hover:not(:focus){background-color:var(--button-default-hover)}:host(.button-variant-primary) .button:active:not(:focus),:host(.button-variant-primary.loading) .button{background-color:var(--button-default-active)}:host(.button-variant-primary.disabled) .button{background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-variant-primary.light.disabled) .button{background:var(--ic-architectural-600);color:var(--ic-architectural-500)}:host(.button-variant-secondary) .button{border:var(--ic-space-1px) solid var(--button-default);color:var(--button-default)}:host(.button-variant-secondary) .button:hover:not(:focus){background-color:var(--button-default-background-hover);border-color:var(--button-default-hover);color:var(--button-default-hover)}:host(.button-variant-secondary) .button:active:not(:focus){border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.loading) .button{border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.disabled) .button,:host(.button-variant-secondary.disabled) .button:hover,:host(.button-variant-secondary.disabled) .button:active{border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-secondary.light.disabled) .button,:host(.button-variant-secondary.light.disabled) .button:hover,:host(.button-variant-secondary.light.disabled) .button:active{border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-tertiary) .button{color:var(--button-default)}:host(.button-variant-tertiary) .button:hover:not(:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-tertiary) .button:active:not(:focus),:host(.button-variant-tertiary.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-tertiary.disabled) .button,:host(.button-variant-tertiary.disabled) .button:hover,:host(.button-variant-tertiary.disabled) .button:active{border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-tertiary.light.disabled) .button,:host(.button-variant-tertiary.light.disabled) .button:hover,:host(.button-variant-tertiary.light.disabled) .button:active{border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-icon) .button{color:var(--button-default);min-width:0}:host(.button-variant-icon) .button:hover:not(:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-icon) .button:active:not(:focus),:host(.button-variant-icon.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-icon.disabled) .button,:host(.button-variant-icon.disabled) .button:hover,:host(.button-variant-icon.disabled) .button:active{color:var(--ic-architectural-300);background:none}:host(.button-variant-destructive) .button{color:var(--ic-architectural-white);background-color:var(--ic-action-destructive);text-transform:uppercase}:host(.button-variant-destructive) .button:hover:not(:focus){background-color:var(--ic-action-destructive-hover)}:host(.button-variant-destructive) .button:active:not(:focus),:host(.button-variant-destructive.loading) .button{background-color:var(--ic-action-destructive-active)}:host(.button-variant-destructive.disabled) .button{background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-size-default) .button{height:var(--height, 2.5rem);padding:var(--ic-space-xs) var(--ic-space-md)}:host(.button-size-small) .button{height:var(--height, var(--ic-space-xl));padding:var(--ic-space-xxs) var(--ic-space-md)}:host(.button-size-large) .button{height:var(--height, var(--ic-space-xxl));padding:var(--ic-space-sm) var(--ic-space-md)}:host(.button-size-default.button-variant-icon) .button{height:var(--height, var(--ic-space-xl));width:var(--ic-space-xl);padding:0.375rem}:host(.button-size-small.button-variant-icon) .button{height:var(--height, var(--ic-space-lg));width:var(--ic-space-lg);padding:var(--ic-space-xxs)}:host(.button-size-large.button-variant-icon) .button{height:var(--height, 2.5rem);width:2.5rem;padding:var(--ic-space-xs)}:host(.full-width),:host(.full-width) .button{width:100%}div.loading-container{position:relative;align-items:center;width:100%}ic-loading-indicator{--outer-color:transparent}@keyframes loading-animation{0%{width:0%;left:0%}25%{width:0%;left:0%;opacity:0}50%{width:100%;left:0%;opacity:1}75%{width:0%;left:100%}100%{width:0%;left:100%;opacity:0}}div.icon-container{box-sizing:border-box;width:var(--ic-space-lg);height:var(--ic-space-lg);display:flex;justify-content:center;align-items:center}::slotted(*){width:var(--icon-width) !important;height:var(--icon-height) !important;fill:currentcolor !important;pointer-events:none}:host(.button-variant-icon) .button .icon-container{margin:0;pointer-events:none}:host(.search-submit-button) ::slotted(svg){--icon-height:1.25rem;--icon-width:1.25rem}:host(.search-submit-button-small) ::slotted(svg){--icon-height:1rem;--icon-width:1rem}:host(.clear-button){margin:0 var(--ic-space-xxs)}:host(.clear-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:not(:active):focus{box-shadow:none;background-color:var(--ic-action-default-bg-hover)}:host(.search-submit-button){display:flex;align-items:center;margin:0 var(--ic-space-xxs)}:host(.menu-close-button) ::slotted(svg){--icon-height:0.875rem;--icon-width:0.875rem}:host(.popout-menu-button) .button{justify-content:left;border-radius:0;white-space:pre-line;text-align:start}:host(.popout-menu-button) div.icon-container{flex:none}:host(.popout-menu-button) .button:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset)}.ic-button-describedby{display:none}:host .ic-tooltip{display:block}@media (forced-colors: active){.button{border:0.125rem solid transparent}}:host(.flip) ::slotted(svg){transform:scaleX(-1)}";
8
+ const icButtonCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;--button-default:var(--ic-action-default);--button-default-hover:var(--ic-action-default-hover);--button-default-active:var(--ic-action-default-active);--button-default-background-hover:var(--ic-action-default-bg-hover);--button-default-background-active:var(--ic-action-default-bg-active);--icon-width:100%;--icon-height:100%}.button{font-family:var(--ic-font-body-family);text-decoration:none;font-weight:600;font-size:0.875rem;transition:var(--ic-easing-transition-fast);border-radius:var(--ic-border-radius);min-width:var(--min-width, 6.25rem);display:inline-flex;gap:var(--ic-space-xxs);flex-direction:row;justify-content:center;align-items:center;background:none;border:none;box-sizing:border-box;white-space:nowrap;vertical-align:middle}:host(.with-badge) .button{border-radius:0.2188rem}.button:hover{cursor:pointer}.button:focus,:host .button:focus{box-shadow:var(--ic-border-focus)}:host(.light) .button:focus{box-shadow:var(--ic-border-focus)}.button:focus-visible{outline:var(--ic-hc-focus-outline)}:host(.dark) .button{--button-default:var(--ic-action-dark);--button-default-hover:var(--ic-action-dark);--button-default-active:var(--ic-action-dark);--button-default-background-hover:var(--ic-action-dark-bg-hover);--button-default-background-active:var(--ic-action-dark-bg-active)}:host(.light) .button{--button-default:var(--ic-action-light);--button-default-hover:var(--ic-action-light);--button-default-active:var(--ic-action-light);--button-default-background-hover:var(--ic-action-light-bg-hover);--button-default-background-active:var(--ic-action-light-bg-active)}:host(.button-variant-primary.light) .button{color:var(--ic-color-primary-text);--button-default-hover:var(--ic-action-light-hover);--button-default-active:var(--ic-action-light-active)}:host(.button-variant-primary.dark) .button{--button-default-hover:var(--ic-action-dark-hover);--button-default-active:var(--ic-action-dark-active)}:host(.disabled),:host(.disabled) .button,:host(.loading),:host(.loading) .button{pointer-events:none}:host(.button-variant-primary) .button{color:var(--ic-architectural-white);background-color:var(--button-default)}:host(.button-variant-primary) .button:hover:not(:focus){background-color:var(--button-default-hover)}:host(.button-variant-primary) .button:active:not(:focus),:host(.button-variant-primary.loading) .button{background-color:var(--button-default-active)}:host(.button-variant-primary.disabled) .button{background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-variant-primary.light.disabled) .button{background:var(--ic-architectural-600);color:var(--ic-architectural-500)}:host(.button-variant-secondary) .button{border:var(--ic-space-1px) solid var(--button-default);color:var(--button-default)}:host(.button-variant-secondary) .button:hover:not(:focus){background-color:var(--button-default-background-hover);border-color:var(--button-default-hover);color:var(--button-default-hover)}:host(.button-variant-secondary) .button:active:not(:focus){border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.loading) .button{border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.disabled) .button,:host(.button-variant-secondary.disabled) .button:hover,:host(.button-variant-secondary.disabled) .button:active{border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-secondary.light.disabled) .button,:host(.button-variant-secondary.light.disabled) .button:hover,:host(.button-variant-secondary.light.disabled) .button:active{border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-tertiary) .button{color:var(--button-default)}:host(.button-variant-tertiary) .button:hover:not(:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-tertiary) .button:active:not(:focus),:host(.button-variant-tertiary.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-tertiary.disabled) .button,:host(.button-variant-tertiary.disabled) .button:hover,:host(.button-variant-tertiary.disabled) .button:active{border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-tertiary.light.disabled) .button,:host(.button-variant-tertiary.light.disabled) .button:hover,:host(.button-variant-tertiary.light.disabled) .button:active{border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-icon) .button{color:var(--button-default);min-width:0;gap:var(--ic-space-xs)}:host(.button-variant-icon) .icon-container{width:var(--ic-space-lg) !important;height:var(--ic-space-lg) !important}:host(.button-variant-icon) .button:hover:not(:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-icon) .button:active:not(:focus),:host(.button-variant-icon.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-icon.disabled) .button,:host(.button-variant-icon.disabled) .button:hover,:host(.button-variant-icon.disabled) .button:active{color:var(--ic-architectural-300);background:none}:host(.button-variant-destructive) .button{color:var(--ic-architectural-white);background-color:var(--ic-action-destructive);text-transform:uppercase}:host(.button-variant-destructive) .button:hover:not(:focus){background-color:var(--ic-action-destructive-hover)}:host(.button-variant-destructive) .button:active:not(:focus),:host(.button-variant-destructive.loading) .button{background-color:var(--ic-action-destructive-active)}:host(.button-variant-destructive.disabled) .button{background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-size-default) .button{height:var(--height, 2.5rem);padding:var(--ic-space-xs) var(--ic-space-md)}:host(.button-size-small) .button{height:var(--height, var(--ic-space-xl));padding:var(--ic-space-xxs) var(--ic-space-md)}:host(.button-size-large) .button{height:var(--height, var(--ic-space-xxl));gap:var(--ic-space-xs);padding:var(--ic-space-sm) var(--ic-space-md)}:host(.button-size-default.button-variant-icon) .button{height:var(--height, var(--ic-space-xl));width:var(--ic-space-xl);padding:0.375rem}:host(.button-size-small.button-variant-icon) .button{height:var(--height, var(--ic-space-lg));width:var(--ic-space-lg);padding:var(--ic-space-xxs)}:host(.button-size-large.button-variant-icon) .button{height:var(--height, 2.5rem);width:2.5rem;padding:var(--ic-space-xs)}:host(.full-width),:host(.full-width) .button{width:100%}div.loading-container{position:relative;align-items:center;width:100%}ic-loading-indicator{--outer-color:transparent}@keyframes loading-animation{0%{width:0%;left:0%}25%{width:0%;left:0%;opacity:0}50%{width:100%;left:0%;opacity:1}75%{width:0%;left:100%}100%{width:0%;left:100%;opacity:0}}div.icon-container{box-sizing:border-box;width:var(--ic-space-md);height:var(--ic-space-md);display:flex;justify-content:center;align-items:center}:host(.button-size-large) div.icon-container{width:calc(var(--ic-space-md) + var(--ic-space-xxs));height:calc(var(--ic-space-md) + var(--ic-space-xxs))}::slotted(*){width:var(--icon-width) !important;height:var(--icon-height) !important;fill:currentcolor !important;pointer-events:none}:host(.button-variant-icon) .button .icon-container{margin:0;pointer-events:none}:host(.search-submit-button) ::slotted(svg){--icon-height:1.25rem;--icon-width:1.25rem}:host(.search-submit-button-small) ::slotted(svg){--icon-height:1rem;--icon-width:1rem}:host(.clear-button){margin:0 var(--ic-space-xxs)}:host(.clear-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:not(:active):focus{box-shadow:none;background-color:var(--ic-action-default-bg-hover)}:host(.search-submit-button){display:flex;align-items:center;margin:0 var(--ic-space-xxs)}:host(.menu-close-button) ::slotted(svg){--icon-height:0.875rem;--icon-width:0.875rem}:host(.popout-menu-button) .button{justify-content:left;border-radius:0;white-space:pre-line;text-align:start}:host(.popout-menu-button) div.icon-container{flex:none}:host(.popout-menu-button) .button:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset)}.ic-button-describedby{display:none}:host .ic-tooltip{display:block}@media (forced-colors: active){.button{border:0.125rem solid transparent}}:host(.flip) ::slotted(svg){transform:scaleX(-1)}";
9
9
 
10
10
  var __rest = (undefined && undefined.__rest) || function (s, e) {
11
11
  var t = {};
@@ -33,6 +33,19 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
33
33
  this.describedByEl = null;
34
34
  this.describedById = null;
35
35
  this.mutationObserver = null;
36
+ this.setViewBox = () => {
37
+ let iconEl;
38
+ if (this.hasLeftIconSlot()) {
39
+ iconEl = this.el.querySelector(`[slot="left-icon"]`);
40
+ }
41
+ else if (this.hasRightIconSlot()) {
42
+ iconEl = this.el.querySelector(`[slot="right-icon"]`);
43
+ }
44
+ else {
45
+ iconEl = null;
46
+ }
47
+ return iconEl;
48
+ };
36
49
  this.handleClick = () => {
37
50
  if ((this.el.type === "submit" || this.el.type === "reset") &&
38
51
  !!this.el.closest("FORM")) {
@@ -45,6 +58,11 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
45
58
  this.onBlur = () => {
46
59
  this.icBlur.emit();
47
60
  };
61
+ this.loadingWidth = () => {
62
+ if (this.loading) {
63
+ this.el.style.setProperty("--min-width", `${this.el.getBoundingClientRect().width}px`);
64
+ }
65
+ };
48
66
  // triggered when text content of sibling element in light DOM changes
49
67
  this.mutationCallback = () => {
50
68
  this.describedByContent = this.describedByEl.innerText;
@@ -77,6 +95,9 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
77
95
  this.mutationObserver.disconnect();
78
96
  }
79
97
  }
98
+ componentWillUpdate() {
99
+ this.loadingWidth();
100
+ }
80
101
  componentWillLoad() {
81
102
  this.inheritedAttributes = inheritAttributes(this.el, [
82
103
  ...IC_INHERITED_ARIA,
@@ -109,6 +130,10 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
109
130
  });
110
131
  }
111
132
  }
133
+ componentWillRender() {
134
+ var _a;
135
+ (_a = this.setViewBox()) === null || _a === void 0 ? void 0 : _a.setAttribute("viewBox", "0 0 24 24");
136
+ }
112
137
  handleHostClick(event) {
113
138
  if (this.disabled || this.loading) {
114
139
  event.stopImmediatePropagation();
@@ -132,7 +157,7 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
132
157
  async updateAriaLabel(newValue) {
133
158
  if (this.hasTooltip) {
134
159
  this.tooltipEl.label = newValue;
135
- this.buttonEl.removeAttribute("aria-label");
160
+ this.buttonEl.setAttribute("aria-label", null);
136
161
  }
137
162
  else {
138
163
  this.buttonEl.setAttribute("aria-label", newValue);
@@ -142,6 +167,14 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
142
167
  const iconEl = this.el.querySelector(`[slot="icon"]`);
143
168
  return iconEl !== null;
144
169
  }
170
+ hasLeftIconSlot() {
171
+ const iconEl = this.el.querySelector(`[slot="left-icon"]`);
172
+ return iconEl !== null;
173
+ }
174
+ hasRightIconSlot() {
175
+ const iconEl = this.el.querySelector(`[slot="right-icon"]`);
176
+ return iconEl !== null;
177
+ }
145
178
  handleHiddenFormButtonClick(form) {
146
179
  const hiddenFormButton = document.createElement("button");
147
180
  hiddenFormButton.setAttribute("type", this.el.type);
@@ -202,19 +235,18 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
202
235
  describedBy = this.describedById;
203
236
  }
204
237
  const ButtonContent = () => {
205
- return (h(TagType, Object.assign({ class: "button", "aria-disabled": this.loading || this.disabled ? "true" : null, "aria-label": this.loading ? "Loading" : ariaLabel }, buttonAttrs, restInheritedAttributes, titleAttr, { onFocus: this.onFocus, onBlur: this.onBlur, ref: (el) => (this.buttonEl = el), id: buttonId, "aria-describedby": this.hasTooltip && ariaLabel ? null : describedBy, part: "button" }), this.hasIconSlot() && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "icon" }))), this.loading ? (h("div", { class: "loading-container" }, h("ic-loading-indicator", { type: "linear", appearance: this.variant === "primary" ||
238
+ return (h(TagType, Object.assign({ class: "button", "aria-disabled": this.loading || this.disabled ? "true" : null, "aria-label": this.loading ? "Loading" : ariaLabel }, buttonAttrs, restInheritedAttributes, titleAttr, { onFocus: this.onFocus, onBlur: this.onBlur, ref: (el) => (this.buttonEl = el), id: buttonId, "aria-describedby": this.hasTooltip && ariaLabel ? null : describedBy, part: "button" }), this.hasIconSlot() && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "icon" }))), this.hasLeftIconSlot() && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "left-icon" }))), this.loading ? (h("div", { class: "loading-container" }, h("ic-loading-indicator", { type: "linear", appearance: this.variant === "primary" ||
206
239
  this.variant === "destructive" ||
207
240
  this.appearance === IcThemeForegroundEnum.Dark ||
208
241
  this.appearance === IcThemeForegroundEnum.Light
209
242
  ? "light"
210
- : "dark" }))) : (h("slot", null))));
243
+ : "dark" }))) : (h("slot", null)), this.hasRightIconSlot() && !this.loading && (h("div", { class: "icon-container" }, h("slot", { name: "right-icon" })))));
211
244
  };
212
245
  return (h(Host, { class: {
213
246
  ["disabled"]: this.disabled && !this.loading,
214
247
  [`button-variant-${this.variant}`]: true,
215
248
  [`button-size-${this.size}`]: true,
216
249
  ["loading"]: this.loading,
217
- ["loading-with-icon"]: this.loading && this.hasIconSlot(),
218
250
  ["dark"]: this.appearance === IcThemeForegroundEnum.Dark,
219
251
  ["light"]: this.appearance === IcThemeForegroundEnum.Light,
220
252
  ["full-width"]: this.fullWidth,
@@ -1 +1 @@
1
- {"file":"ic-button2.js","mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,yzVAAyzV;;;;;;;;;;;;;;ACgC70V,IAAI,SAAS,GAAG,CAAC,CAAC;MAYL,MAAM;;;;;;;IAET,gBAAW,GAAG,SAAS,EAAE,CAAC;IAC1B,eAAU,GAAY,KAAK,CAAC;IAE5B,wBAAmB,GAA6B,EAAE,CAAC;IAEnD,kBAAa,GAAgB,IAAI,CAAC;IAClC,kBAAa,GAAW,IAAI,CAAC;IAC7B,qBAAgB,GAAqB,IAAI,CAAC;IA+N1C,gBAAW,GAAG;MACpB,IACE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,OAAO;QACtD,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EACzB;QACA,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;OAC3D;KACF,CAAC;IAEM,YAAO,GAAG;MAChB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;KACrB,CAAC;IAEM,WAAM,GAAG;MACf,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KACpB,CAAC;;IAWM,qBAAgB,GAAG;MACzB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;KACxD,CAAC;8BAvPoC,IAAI;sBAKgB,SAAS;oBAKtC,KAAK;0BAKC,KAAK;oBAKF,KAAK;;;;;;;qBAmCb,KAAK;;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U,KACd,kBACE,KAAK,EAAE,EAAE,CAAC,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,EACpD,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAClC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,QAAQ,EAChB,SAAS,EAAE,IAAI,CAAC,gBAAgB,IAEhC,EAAC,aAAa,OAAG,CACN,CACd,EAEA,CAAC,IAAI,CAAC,UAAU,IAAI,EAAC,aAAa,OAAG,EACrC,IAAI,CAAC,kBAAkB,KACtB,YAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAC,uBAAuB,IACjD,IAAI,CAAC,kBAAkB,CACnB,CACR,CACI,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/ic-button/ic-button.css?tag=ic-button&encapsulation=shadow","./src/components/ic-button/ic-button.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --min-width: Minimum width of the button.\n* @prop --height: The height of the button.\n*/\n\n:host {\n display: inline-block;\n\n --button-default: var(--ic-action-default);\n --button-default-hover: var(--ic-action-default-hover);\n --button-default-active: var(--ic-action-default-active);\n --button-default-background-hover: var(--ic-action-default-bg-hover);\n --button-default-background-active: var(--ic-action-default-bg-active);\n --icon-width: 100%;\n --icon-height: 100%;\n}\n\n.button {\n font-family: var(--ic-font-body-family);\n text-decoration: none;\n font-weight: 600;\n font-size: 0.875rem;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\n min-width: var(--min-width, 6.25rem);\n display: inline-flex;\n gap: var(--ic-space-xs);\n flex-direction: row;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n}\n\n:host(.with-badge) .button {\n border-radius: 0.2188rem;\n}\n\n.button:hover {\n cursor: pointer;\n}\n\n.button:focus,\n:host .button:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n:host(.light) .button:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.button:focus-visible {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.dark) .button {\n --button-default: var(--ic-action-dark);\n --button-default-hover: var(--ic-action-dark);\n --button-default-active: var(--ic-action-dark);\n --button-default-background-hover: var(--ic-action-dark-bg-hover);\n --button-default-background-active: var(--ic-action-dark-bg-active);\n}\n\n:host(.light) .button {\n --button-default: var(--ic-action-light);\n --button-default-hover: var(--ic-action-light);\n --button-default-active: var(--ic-action-light);\n --button-default-background-hover: var(--ic-action-light-bg-hover);\n --button-default-background-active: var(--ic-action-light-bg-active);\n}\n\n:host(.button-variant-primary.light) .button {\n color: var(--ic-color-primary-text);\n\n --button-default-hover: var(--ic-action-light-hover);\n --button-default-active: var(--ic-action-light-active);\n}\n\n:host(.button-variant-primary.dark) .button {\n --button-default-hover: var(--ic-action-dark-hover);\n --button-default-active: var(--ic-action-dark-active);\n}\n\n:host(.disabled),\n:host(.disabled) .button,\n:host(.loading),\n:host(.loading) .button {\n pointer-events: none;\n}\n\n:host(.loading-with-icon) .button {\n min-width: var(--min-width, 8.25rem);\n}\n\n/* Variants */\n\n/* Primary */\n\n:host(.button-variant-primary) .button {\n color: var(--ic-architectural-white);\n background-color: var(--button-default);\n}\n\n:host(.button-variant-primary) .button:hover:not(:focus) {\n background-color: var(--button-default-hover);\n}\n\n:host(.button-variant-primary) .button:active:not(:focus),\n:host(.button-variant-primary.loading) .button {\n background-color: var(--button-default-active);\n}\n\n:host(.button-variant-primary.disabled) .button {\n background: var(--ic-architectural-200);\n color: var(--ic-architectural-300);\n}\n\n:host(.button-variant-primary.light.disabled) .button {\n background: var(--ic-architectural-600);\n color: var(--ic-architectural-500);\n}\n\n/* Secondary */\n\n:host(.button-variant-secondary) .button {\n border: var(--ic-space-1px) solid var(--button-default);\n color: var(--button-default);\n}\n\n:host(.button-variant-secondary) .button:hover:not(:focus) {\n background-color: var(--button-default-background-hover);\n border-color: var(--button-default-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-secondary) .button:active:not(:focus) {\n border-color: var(--button-default-active);\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-secondary.loading) .button {\n border-color: var(--button-default-active);\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-secondary.disabled) .button,\n:host(.button-variant-secondary.disabled) .button:hover,\n:host(.button-variant-secondary.disabled) .button:active {\n border-color: var(--ic-architectural-300);\n color: var(--ic-architectural-300);\n background: none;\n}\n\n:host(.button-variant-secondary.light.disabled) .button,\n:host(.button-variant-secondary.light.disabled) .button:hover,\n:host(.button-variant-secondary.light.disabled) .button:active {\n border-color: var(--ic-architectural-500);\n color: var(--ic-architectural-500);\n background: none;\n}\n\n/* Tertiary */\n\n:host(.button-variant-tertiary) .button {\n color: var(--button-default);\n}\n\n:host(.button-variant-tertiary) .button:hover:not(:focus) {\n background-color: var(--button-default-background-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-tertiary) .button:active:not(:focus),\n:host(.button-variant-tertiary.loading) .button {\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-tertiary.disabled) .button,\n:host(.button-variant-tertiary.disabled) .button:hover,\n:host(.button-variant-tertiary.disabled) .button:active {\n border-color: var(--ic-architectural-300);\n color: var(--ic-architectural-300);\n background: none;\n}\n\n:host(.button-variant-tertiary.light.disabled) .button,\n:host(.button-variant-tertiary.light.disabled) .button:hover,\n:host(.button-variant-tertiary.light.disabled) .button:active {\n border-color: var(--ic-architectural-500);\n color: var(--ic-architectural-500);\n background: none;\n}\n\n/* Icon */\n\n:host(.button-variant-icon) .button {\n color: var(--button-default);\n min-width: 0;\n}\n\n:host(.button-variant-icon) .button:hover:not(:focus) {\n background-color: var(--button-default-background-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-icon) .button:active:not(:focus),\n:host(.button-variant-icon.loading) .button {\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-icon.disabled) .button,\n:host(.button-variant-icon.disabled) .button:hover,\n:host(.button-variant-icon.disabled) .button:active {\n color: var(--ic-architectural-300);\n background: none;\n}\n\n/* Destructive */\n\n:host(.button-variant-destructive) .button {\n color: var(--ic-architectural-white);\n background-color: var(--ic-action-destructive);\n text-transform: uppercase;\n}\n\n:host(.button-variant-destructive) .button:hover:not(:focus) {\n background-color: var(--ic-action-destructive-hover);\n}\n\n:host(.button-variant-destructive) .button:active:not(:focus),\n:host(.button-variant-destructive.loading) .button {\n background-color: var(--ic-action-destructive-active);\n}\n\n:host(.button-variant-destructive.disabled) .button {\n background: var(--ic-architectural-200);\n color: var(--ic-architectural-300);\n}\n\n/* Sizing */\n\n:host(.button-size-default) .button {\n height: var(--height, 2.5rem);\n padding: var(--ic-space-xs) var(--ic-space-md);\n}\n\n:host(.button-size-small) .button {\n height: var(--height, var(--ic-space-xl));\n padding: var(--ic-space-xxs) var(--ic-space-md);\n}\n\n:host(.button-size-large) .button {\n height: var(--height, var(--ic-space-xxl));\n padding: var(--ic-space-sm) var(--ic-space-md);\n}\n\n:host(.button-size-default.button-variant-icon) .button {\n height: var(--height, var(--ic-space-xl));\n width: var(--ic-space-xl);\n padding: 0.375rem;\n}\n\n:host(.button-size-small.button-variant-icon) .button {\n height: var(--height, var(--ic-space-lg));\n width: var(--ic-space-lg);\n padding: var(--ic-space-xxs);\n}\n\n:host(.button-size-large.button-variant-icon) .button {\n height: var(--height, 2.5rem);\n width: 2.5rem;\n padding: var(--ic-space-xs);\n}\n\n/* Width */\n:host(.full-width),\n:host(.full-width) .button {\n width: 100%;\n}\n\n/* Loading */\n\ndiv.loading-container {\n position: relative;\n align-items: center;\n width: 100%;\n}\n\nic-loading-indicator {\n --outer-color: transparent;\n}\n\n@keyframes loading-animation {\n 0% {\n width: 0%;\n left: 0%;\n }\n\n 25% {\n width: 0%;\n left: 0%;\n opacity: 0;\n }\n\n 50% {\n width: 100%;\n left: 0%;\n opacity: 1;\n }\n\n 75% {\n width: 0%;\n left: 100%;\n }\n\n 100% {\n width: 0%;\n left: 100%;\n opacity: 0;\n }\n}\n\n/* Icons */\n\ndiv.icon-container {\n box-sizing: border-box;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n::slotted(*) {\n width: var(--icon-width) !important;\n height: var(--icon-height) !important;\n fill: currentcolor !important;\n pointer-events: none;\n}\n\n:host(.button-variant-icon) .button .icon-container {\n margin: 0;\n pointer-events: none;\n}\n\n/** SEARCH **/\n\n:host(.search-submit-button) ::slotted(svg) {\n --icon-height: 1.25rem;\n --icon-width: 1.25rem;\n}\n\n:host(.search-submit-button-small) ::slotted(svg) {\n --icon-height: 1rem;\n --icon-width: 1rem;\n}\n\n:host(.clear-button) {\n margin: 0 var(--ic-space-xxs);\n}\n\n:host(.clear-button) .button:focus {\n box-shadow: none;\n}\n\n:host(.search-submit-button) .button:focus {\n box-shadow: none;\n}\n\n:host(.search-submit-button) .button:not(:active):focus {\n box-shadow: none;\n background-color: var(--ic-action-default-bg-hover);\n}\n\n:host(.search-submit-button) {\n display: flex;\n align-items: center;\n margin: 0 var(--ic-space-xxs);\n}\n\n:host(.menu-close-button) ::slotted(svg) {\n --icon-height: 0.875rem;\n --icon-width: 0.875rem;\n}\n\n:host(.popout-menu-button) .button {\n justify-content: left;\n border-radius: 0;\n white-space: pre-line;\n text-align: start;\n}\n\n:host(.popout-menu-button) div.icon-container {\n flex: none;\n}\n\n:host(.popout-menu-button) .button:focus {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n}\n\n.ic-button-describedby {\n display: none;\n}\n\n:host .ic-tooltip {\n display: block;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .button {\n border: 0.125rem solid transparent;\n }\n}\n\n/** Pagination **/\n\n:host(.flip) ::slotted(svg) {\n transform: scaleX(-1);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n h,\n} from \"@stencil/core\";\n\nimport {\n getThemeFromContext,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n IcSizes,\n} from \"../../utils/types\";\n\nlet buttonIds = 0;\n\n/**\n * @slot icon - Content will be placed to the left of the button label.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip: boolean = false;\n private id: string;\n private inheritedAttributes: { [k: string]: unknown } = {};\n private tooltipEl: HTMLIcTooltipElement;\n private describedByEl: HTMLElement = null;\n private describedById: string = null;\n private mutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() describedByContent: string = null;\n\n /**\n * The appearance of the button, e.g. dark, light, or the default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement?: IcButtonTooltipPlacement = \"bottom\";\n\n /**\n * The type of the button.\n */\n @Prop() type?: IcButtonTypes = \"button\";\n\n /**\n * The variant of the button to be displayed.\n */\n @Prop() variant?: IcButtonVariants = \"primary\";\n\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.mutationObserver !== null && this.mutationObserver !== undefined) {\n this.mutationObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n \"title\",\n ]);\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n const id = this.el.id;\n this.id = id !== undefined ? id : null;\n this.hasTooltip = this.variant === \"icon\" && this.disableTooltip === false;\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\n \"aria-describedby\"\n ] as string;\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector(\n `#${describedById}`\n ) as HTMLElement;\n this.describedByContent = el.innerText;\n this.describedByEl = el;\n }\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedByEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n\n /**\n * @internal Updates tooltip/aria-label text - needed as can't watch an ARIA attribute change.\n */\n @Method()\n async updateAriaLabel(newValue: string): Promise<void> {\n if (this.hasTooltip) {\n this.tooltipEl.label = newValue;\n this.buttonEl.removeAttribute(\"aria-label\");\n } else {\n this.buttonEl.setAttribute(\"aria-label\", newValue);\n }\n }\n\n private hasIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n return iconEl !== null;\n }\n\n private handleHiddenFormButtonClick(form: HTMLFormElement): void {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !!this.el.closest(\"FORM\")\n ) {\n this.handleHiddenFormButtonClick(this.el.closest(\"FORM\"));\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n // triggered when text content of sibling element in light DOM changes\n private mutationCallback = (): void => {\n this.describedByContent = this.describedByEl.innerText;\n };\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = this.inheritedAttributes;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n const newTitle = title && (title as string);\n const titleAttr = this.hasTooltip ? {} : { title: newTitle };\n let tooltipText = \"\";\n if (this.hasTooltip) {\n if (newTitle !== undefined) {\n tooltipText = newTitle;\n } else if (ariaLabel !== null) {\n tooltipText = ariaLabel as string;\n }\n }\n\n let describedBy: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedBy = `ic-tooltip-${buttonId}`;\n } else {\n describedBy = this.describedById;\n }\n\n const ButtonContent = () => {\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n {...buttonAttrs}\n {...restInheritedAttributes}\n {...titleAttr}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n id={buttonId}\n aria-describedby={this.hasTooltip && ariaLabel ? null : describedBy}\n part=\"button\"\n >\n {this.hasIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n appearance={\n this.variant === \"primary\" ||\n this.variant === \"destructive\" ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light\n ? \"light\"\n : \"dark\"\n }\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled && !this.loading,\n [`button-variant-${this.variant}`]: true,\n [`button-size-${this.size}`]: true,\n [\"loading\"]: this.loading,\n [\"loading-with-icon\"]: this.loading && this.hasIconSlot(),\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"full-width\"]: this.fullWidth,\n [\"with-badge\"]: isSlotUsed(this.el, \"badge\"),\n }}\n onClick={this.handleClick}\n >\n {this.hasTooltip && (\n <ic-tooltip\n class={{ [\"tooltip-disabled\"]: this.disableTooltip }}\n ref={(el) => (this.tooltipEl = el)}\n label={tooltipText}\n target={buttonId}\n placement={this.tooltipPlacement}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n\n {!this.hasTooltip && <ButtonContent />}\n {this.describedByContent && (\n <span id={describedBy} class=\"ic-button-describedby\">\n {this.describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-button2.js","mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,+iWAA+iW;;;;;;;;;;;;;;ACgCnkW,IAAI,SAAS,GAAG,CAAC,CAAC;MAcL,MAAM;;;;;;;IAET,gBAAW,GAAG,SAAS,EAAE,CAAC;IAC1B,eAAU,GAAY,KAAK,CAAC;IAE5B,wBAAmB,GAA6B,EAAE,CAAC;IAEnD,kBAAa,GAAgB,IAAI,CAAC;IAClC,kBAAa,GAAW,IAAI,CAAC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"sources":["src/components/ic-button/ic-button.css?tag=ic-button&encapsulation=shadow","src/components/ic-button/ic-button.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --min-width: Minimum width of the button.\n* @prop --height: The height of the button.\n*/\n\n:host {\n display: inline-block;\n\n --button-default: var(--ic-action-default);\n --button-default-hover: var(--ic-action-default-hover);\n --button-default-active: var(--ic-action-default-active);\n --button-default-background-hover: var(--ic-action-default-bg-hover);\n --button-default-background-active: var(--ic-action-default-bg-active);\n --icon-width: 100%;\n --icon-height: 100%;\n}\n\n.button {\n font-family: var(--ic-font-body-family);\n text-decoration: none;\n font-weight: 600;\n font-size: 0.875rem;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\n min-width: var(--min-width, 6.25rem);\n display: inline-flex;\n gap: var(--ic-space-xxs);\n flex-direction: row;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n}\n\n:host(.with-badge) .button {\n border-radius: 0.2188rem;\n}\n\n.button:hover {\n cursor: pointer;\n}\n\n.button:focus,\n:host .button:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n:host(.light) .button:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.button:focus-visible {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.dark) .button {\n --button-default: var(--ic-action-dark);\n --button-default-hover: var(--ic-action-dark);\n --button-default-active: var(--ic-action-dark);\n --button-default-background-hover: var(--ic-action-dark-bg-hover);\n --button-default-background-active: var(--ic-action-dark-bg-active);\n}\n\n:host(.light) .button {\n --button-default: var(--ic-action-light);\n --button-default-hover: var(--ic-action-light);\n --button-default-active: var(--ic-action-light);\n --button-default-background-hover: var(--ic-action-light-bg-hover);\n --button-default-background-active: var(--ic-action-light-bg-active);\n}\n\n:host(.button-variant-primary.light) .button {\n color: var(--ic-color-primary-text);\n\n --button-default-hover: var(--ic-action-light-hover);\n --button-default-active: var(--ic-action-light-active);\n}\n\n:host(.button-variant-primary.dark) .button {\n --button-default-hover: var(--ic-action-dark-hover);\n --button-default-active: var(--ic-action-dark-active);\n}\n\n:host(.disabled),\n:host(.disabled) .button,\n:host(.loading),\n:host(.loading) .button {\n pointer-events: none;\n}\n\n/* Variants */\n\n/* Primary */\n\n:host(.button-variant-primary) .button {\n color: var(--ic-architectural-white);\n background-color: var(--button-default);\n}\n\n:host(.button-variant-primary) .button:hover:not(:focus) {\n background-color: var(--button-default-hover);\n}\n\n:host(.button-variant-primary) .button:active:not(:focus),\n:host(.button-variant-primary.loading) .button {\n background-color: var(--button-default-active);\n}\n\n:host(.button-variant-primary.disabled) .button {\n background: var(--ic-architectural-200);\n color: var(--ic-architectural-300);\n}\n\n:host(.button-variant-primary.light.disabled) .button {\n background: var(--ic-architectural-600);\n color: var(--ic-architectural-500);\n}\n\n/* Secondary */\n\n:host(.button-variant-secondary) .button {\n border: var(--ic-space-1px) solid var(--button-default);\n color: var(--button-default);\n}\n\n:host(.button-variant-secondary) .button:hover:not(:focus) {\n background-color: var(--button-default-background-hover);\n border-color: var(--button-default-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-secondary) .button:active:not(:focus) {\n border-color: var(--button-default-active);\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-secondary.loading) .button {\n border-color: var(--button-default-active);\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-secondary.disabled) .button,\n:host(.button-variant-secondary.disabled) .button:hover,\n:host(.button-variant-secondary.disabled) .button:active {\n border-color: var(--ic-architectural-300);\n color: var(--ic-architectural-300);\n background: none;\n}\n\n:host(.button-variant-secondary.light.disabled) .button,\n:host(.button-variant-secondary.light.disabled) .button:hover,\n:host(.button-variant-secondary.light.disabled) .button:active {\n border-color: var(--ic-architectural-500);\n color: var(--ic-architectural-500);\n background: none;\n}\n\n/* Tertiary */\n\n:host(.button-variant-tertiary) .button {\n color: var(--button-default);\n}\n\n:host(.button-variant-tertiary) .button:hover:not(:focus) {\n background-color: var(--button-default-background-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-tertiary) .button:active:not(:focus),\n:host(.button-variant-tertiary.loading) .button {\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-tertiary.disabled) .button,\n:host(.button-variant-tertiary.disabled) .button:hover,\n:host(.button-variant-tertiary.disabled) .button:active {\n border-color: var(--ic-architectural-300);\n color: var(--ic-architectural-300);\n background: none;\n}\n\n:host(.button-variant-tertiary.light.disabled) .button,\n:host(.button-variant-tertiary.light.disabled) .button:hover,\n:host(.button-variant-tertiary.light.disabled) .button:active {\n border-color: var(--ic-architectural-500);\n color: var(--ic-architectural-500);\n background: none;\n}\n\n/* Icon */\n\n:host(.button-variant-icon) .button {\n color: var(--button-default);\n min-width: 0;\n gap: var(--ic-space-xs);\n}\n\n:host(.button-variant-icon) .icon-container {\n width: var(--ic-space-lg) !important;\n height: var(--ic-space-lg) !important;\n}\n\n:host(.button-variant-icon) .button:hover:not(:focus) {\n background-color: var(--button-default-background-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-icon) .button:active:not(:focus),\n:host(.button-variant-icon.loading) .button {\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-icon.disabled) .button,\n:host(.button-variant-icon.disabled) .button:hover,\n:host(.button-variant-icon.disabled) .button:active {\n color: var(--ic-architectural-300);\n background: none;\n}\n\n/* Destructive */\n\n:host(.button-variant-destructive) .button {\n color: var(--ic-architectural-white);\n background-color: var(--ic-action-destructive);\n text-transform: uppercase;\n}\n\n:host(.button-variant-destructive) .button:hover:not(:focus) {\n background-color: var(--ic-action-destructive-hover);\n}\n\n:host(.button-variant-destructive) .button:active:not(:focus),\n:host(.button-variant-destructive.loading) .button {\n background-color: var(--ic-action-destructive-active);\n}\n\n:host(.button-variant-destructive.disabled) .button {\n background: var(--ic-architectural-200);\n color: var(--ic-architectural-300);\n}\n\n/* Sizing */\n\n:host(.button-size-default) .button {\n height: var(--height, 2.5rem);\n padding: var(--ic-space-xs) var(--ic-space-md);\n}\n\n:host(.button-size-small) .button {\n height: var(--height, var(--ic-space-xl));\n padding: var(--ic-space-xxs) var(--ic-space-md);\n}\n\n:host(.button-size-large) .button {\n height: var(--height, var(--ic-space-xxl));\n gap: var(--ic-space-xs);\n padding: var(--ic-space-sm) var(--ic-space-md);\n}\n\n:host(.button-size-default.button-variant-icon) .button {\n height: var(--height, var(--ic-space-xl));\n width: var(--ic-space-xl);\n padding: 0.375rem;\n}\n\n:host(.button-size-small.button-variant-icon) .button {\n height: var(--height, var(--ic-space-lg));\n width: var(--ic-space-lg);\n padding: var(--ic-space-xxs);\n}\n\n:host(.button-size-large.button-variant-icon) .button {\n height: var(--height, 2.5rem);\n width: 2.5rem;\n padding: var(--ic-space-xs);\n}\n\n/* Width */\n:host(.full-width),\n:host(.full-width) .button {\n width: 100%;\n}\n\n/* Loading */\n\ndiv.loading-container {\n position: relative;\n align-items: center;\n width: 100%;\n}\n\nic-loading-indicator {\n --outer-color: transparent;\n}\n\n@keyframes loading-animation {\n 0% {\n width: 0%;\n left: 0%;\n }\n\n 25% {\n width: 0%;\n left: 0%;\n opacity: 0;\n }\n\n 50% {\n width: 100%;\n left: 0%;\n opacity: 1;\n }\n\n 75% {\n width: 0%;\n left: 100%;\n }\n\n 100% {\n width: 0%;\n left: 100%;\n opacity: 0;\n }\n}\n\n/* Icons */\n\ndiv.icon-container {\n box-sizing: border-box;\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host(.button-size-large) div.icon-container {\n width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n::slotted(*) {\n width: var(--icon-width) !important;\n height: var(--icon-height) !important;\n fill: currentcolor !important;\n pointer-events: none;\n}\n\n:host(.button-variant-icon) .button .icon-container {\n margin: 0;\n pointer-events: none;\n}\n\n/** SEARCH **/\n\n:host(.search-submit-button) ::slotted(svg) {\n --icon-height: 1.25rem;\n --icon-width: 1.25rem;\n}\n\n:host(.search-submit-button-small) ::slotted(svg) {\n --icon-height: 1rem;\n --icon-width: 1rem;\n}\n\n:host(.clear-button) {\n margin: 0 var(--ic-space-xxs);\n}\n\n:host(.clear-button) .button:focus {\n box-shadow: none;\n}\n\n:host(.search-submit-button) .button:focus {\n box-shadow: none;\n}\n\n:host(.search-submit-button) .button:not(:active):focus {\n box-shadow: none;\n background-color: var(--ic-action-default-bg-hover);\n}\n\n:host(.search-submit-button) {\n display: flex;\n align-items: center;\n margin: 0 var(--ic-space-xxs);\n}\n\n:host(.menu-close-button) ::slotted(svg) {\n --icon-height: 0.875rem;\n --icon-width: 0.875rem;\n}\n\n:host(.popout-menu-button) .button {\n justify-content: left;\n border-radius: 0;\n white-space: pre-line;\n text-align: start;\n}\n\n:host(.popout-menu-button) div.icon-container {\n flex: none;\n}\n\n:host(.popout-menu-button) .button:focus {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n}\n\n.ic-button-describedby {\n display: none;\n}\n\n:host .ic-tooltip {\n display: block;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .button {\n border: 0.125rem solid transparent;\n }\n}\n\n/** Pagination **/\n\n:host(.flip) ::slotted(svg) {\n transform: scaleX(-1);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n h,\n} from \"@stencil/core\";\n\nimport {\n getThemeFromContext,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n IcSizes,\n} from \"../../utils/types\";\n\nlet buttonIds = 0;\n\n/**\n * @slot icon - Deprecated. This slot should not be used anymore. Use left-icon or right-icon slot instead.\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip: boolean = false;\n private id: string;\n private inheritedAttributes: { [k: string]: unknown } = {};\n private tooltipEl: HTMLIcTooltipElement;\n private describedByEl: HTMLElement = null;\n private describedById: string = null;\n private mutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() describedByContent: string = null;\n\n /**\n * The appearance of the button, e.g. dark, light, or the default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement?: IcButtonTooltipPlacement = \"bottom\";\n\n /**\n * The type of the button.\n */\n @Prop() type?: IcButtonTypes = \"button\";\n\n /**\n * The variant of the button to be displayed.\n */\n @Prop() variant?: IcButtonVariants = \"primary\";\n\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.mutationObserver !== null && this.mutationObserver !== undefined) {\n this.mutationObserver.disconnect();\n }\n }\n\n componentWillUpdate(): void {\n this.loadingWidth();\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n \"title\",\n ]);\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n const id = this.el.id;\n this.id = id !== undefined ? id : null;\n this.hasTooltip = this.variant === \"icon\" && this.disableTooltip === false;\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\n \"aria-describedby\"\n ] as string;\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector(\n `#${describedById}`\n ) as HTMLElement;\n this.describedByContent = el.innerText;\n this.describedByEl = el;\n }\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedByEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n }\n\n componentWillRender(): void {\n this.setViewBox()?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n\n /**\n * @internal Updates tooltip/aria-label text - needed as can't watch an ARIA attribute change.\n */\n @Method()\n async updateAriaLabel(newValue: string): Promise<void> {\n if (this.hasTooltip) {\n this.tooltipEl.label = newValue;\n this.buttonEl.setAttribute(\"aria-label\", null);\n } else {\n this.buttonEl.setAttribute(\"aria-label\", newValue);\n }\n }\n\n private hasIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n return iconEl !== null;\n }\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"left-icon\"]`);\n return iconEl !== null;\n }\n\n private hasRightIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"right-icon\"]`);\n return iconEl !== null;\n }\n\n private setViewBox = () => {\n let iconEl;\n if (this.hasLeftIconSlot()) {\n iconEl = this.el.querySelector(`[slot=\"left-icon\"]`);\n } else if (this.hasRightIconSlot()) {\n iconEl = this.el.querySelector(`[slot=\"right-icon\"]`);\n } else {\n iconEl = null;\n }\n return iconEl;\n };\n\n private handleHiddenFormButtonClick(form: HTMLFormElement): void {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !!this.el.closest(\"FORM\")\n ) {\n this.handleHiddenFormButtonClick(this.el.closest(\"FORM\"));\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private loadingWidth = () => {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\n }\n };\n\n // triggered when text content of sibling element in light DOM changes\n private mutationCallback = (): void => {\n this.describedByContent = this.describedByEl.innerText;\n };\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = this.inheritedAttributes;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n const newTitle = title && (title as string);\n const titleAttr = this.hasTooltip ? {} : { title: newTitle };\n let tooltipText = \"\";\n if (this.hasTooltip) {\n if (newTitle !== undefined) {\n tooltipText = newTitle;\n } else if (ariaLabel !== null) {\n tooltipText = ariaLabel as string;\n }\n }\n\n let describedBy: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedBy = `ic-tooltip-${buttonId}`;\n } else {\n describedBy = this.describedById;\n }\n\n const ButtonContent = () => {\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n {...buttonAttrs}\n {...restInheritedAttributes}\n {...titleAttr}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n id={buttonId}\n aria-describedby={this.hasTooltip && ariaLabel ? null : describedBy}\n part=\"button\"\n >\n {this.hasIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.hasLeftIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n appearance={\n this.variant === \"primary\" ||\n this.variant === \"destructive\" ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light\n ? \"light\"\n : \"dark\"\n }\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n {this.hasRightIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"right-icon\" />\n </div>\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled && !this.loading,\n [`button-variant-${this.variant}`]: true,\n [`button-size-${this.size}`]: true,\n [\"loading\"]: this.loading,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"full-width\"]: this.fullWidth,\n [\"with-badge\"]: isSlotUsed(this.el, \"badge\"),\n }}\n onClick={this.handleClick}\n >\n {this.hasTooltip && (\n <ic-tooltip\n class={{ [\"tooltip-disabled\"]: this.disableTooltip }}\n ref={(el) => (this.tooltipEl = el)}\n label={tooltipText}\n target={buttonId}\n placement={this.tooltipPlacement}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n\n {!this.hasTooltip && <ButtonContent />}\n {this.describedByContent && (\n <span id={describedBy} class=\"ic-button-describedby\">\n {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L,CAAC,eAAe,GAAG,IAAI;QACvB,CAAC,sBAAsB,GAAG,CAAC,IAAI,CAAC,YAAY;QAC5C,CAAC,wBAAwB,GAAG,IAAI,CAAC,YAAY;OAC9C,EACD,OAAO,EAAC,MAAM,EACd,IAAI,EAAC,OAAO,EACZ,cAAc,sBACH,wBAAwB,mBACpB,IAAI,CAAC,YAAY,mBAClB,uBAAuB,EACrC,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,SAAS,EAAE,WAAW,GACX,CACd,CACG,CACP,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,IAAI,CAAC,YAAY,KAC3D,WAAK,KAAK,EAAC,kBAAkB,EAAC,EAAE,EAAC,uBAAuB,IACtD,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACP,CACS,EACZ;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/ic-card/ic-card.css?tag=ic-card&encapsulation=shadow","./src/components/ic-card/ic-card.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-architechtural-black) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card,\n.card.clickable {\n display: flex;\n flex-direction: column;\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-architechtural-black);\n transition: var(--ic-easing-transition-fast);\n}\n\n.dark.card,\n.dark.card.clickable {\n border: var(--ic-space-1px) solid var(--ic-architectural-700);\n}\n\n.card.clickable:hover {\n background-color: var(--ic-action-default-bg-hover);\n border: var(--ic-border-hover);\n cursor: pointer;\n}\n\n.card.clickable:focus,\n.card.clickable.focussed {\n background-color: var(--ic-action-default-bg-hover);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n border: var(--ic-border-pressed);\n}\n\n.card.clickable:active {\n background-color: var(--ic-action-default-bg-active);\n box-shadow: var(--ic-border-focus);\n}\n\n.card.disabled {\n border: var(--ic-border-disabled);\n}\n\n.card.fullwidth {\n width: 100%;\n}\n\n.card-header {\n display: flex;\n align-items: center;\n}\n\n.icon {\n display: flex;\n align-items: center;\n padding-right: var(--ic-space-xs);\n}\n\n.card.disabled ::slotted(svg) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.card.clickable .card-title {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n}\n\n.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title {\n display: inline-block;\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n@supports (text-decoration-thickness: 25%) {\n .card.clickable:hover .card-title,\n .card.clickable:focus .card-title,\n .card.clickable.focussed .card-title {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n\n.card.clickable:active .card-title {\n text-decoration: none;\n}\n\n.card.disabled .card-title {\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n text-decoration-color: var(--ic-color-tertiary-text);\n color: var(--ic-color-tertiary-text);\n}\n\n.subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n.adornment {\n margin-top: var(--ic-space-xxs);\n}\n\n.card-message {\n margin-top: var(--ic-space-md);\n align-items: left;\n}\n\n.card.disabled .card-message,\n.card.disabled .subheading {\n color: var(--ic-color-tertiary-text);\n}\n\n.interaction-button {\n margin-left: auto;\n}\n\n.image-top {\n margin-bottom: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.image-mid {\n margin-top: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.interaction-area {\n display: flex;\n flex-grow: 1;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-md);\n align-items: flex-end;\n}\n\n.interaction-controls {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--ic-space-sm);\n}\n\n.toggle-button {\n margin-left: auto;\n}\n\n.toggle-button-closed svg {\n transform: rotate(90deg);\n}\n\n.toggle-button-expanded svg {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n margin-top: var(--ic-space-md);\n}\n","import {\n Component,\n Element,\n Listen,\n Prop,\n State,\n h,\n Method,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getThemeFromContext,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot heading - Content will be placed at the top of the card to the right of the icon.\n * @slot message - Content will be placed in the main body of the card.\n * @slot subheading - Content will be placed below the card heading.\n * @slot adornment - Content will be placed below the card subheading.\n * @slot image-top - Content will be placed at the top of the card above all other content.\n * @slot image-mid - Content will be placed below the card heading section.\n * @slot icon - Content will be placed to the left of the card heading.\n * @slot interaction-button - Content will be placed in the top right corner of the heading section.\n * @slot interaction-controls - Content will be placed below the card message.\n * @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.\n */\n@Component({\n tag: \"ic-card\",\n styleUrl: \"ic-card.css\",\n shadow: true,\n})\nexport class Card {\n @Element() el: HTMLIcCardElement;\n\n @State() appearance?: IcThemeForeground = \"default\";\n @State() areaExpanded: boolean = false;\n @State() isFocussed: boolean = false;\n @State() parentEl: HTMLElement | null = null;\n @State() parentIsAnchorTag: boolean = false;\n\n /**\n * If `true`, the card will be a clickable variant, instead of static.\n */\n @Prop({ mutable: true }) clickable?: boolean = false;\n\n /**\n * If `true`, the card will be disabled if it is clickable.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the card will have an expandable area and expansion toggle button.\n */\n @Prop() expandable?: boolean = false;\n\n /**\n * If `true`, the card will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The heading for the card.\n */\n @Prop() heading!: string;\n\n /**\n * The URL that the clickable card link points to. If set, the clickable card will render as an \"a\" tag, otherwise it will render as a button.\n */\n @Prop() href?: string | undefined;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n\n /**\n * The main body message of the card.\n */\n @Prop() message?: string = \"\";\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 subheading for the card.\n */\n @Prop() subheading?: string;\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 disconnectedCallback(): void {\n if (this.parentIsAnchorTag) {\n this.parentEl.removeEventListener(\"focus\", this.parentFocussed);\n this.parentEl.removeEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n componentWillLoad(): void {\n this.parentEl = this.el.parentElement;\n\n if (this.parentEl.tagName === \"A\") {\n this.clickable = true;\n this.parentIsAnchorTag = true;\n this.parentEl.classList.add(\"ic-card-wrapper-link\");\n this.parentEl.addEventListener(\"focus\", this.parentFocussed);\n this.parentEl.addEventListener(\"blur\", this.parentBlurred);\n }\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Card\"\n );\n this.updateTheme();\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the card.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"a\")) {\n this.el.shadowRoot.querySelector(\"a\").focus();\n } else if (this.el.shadowRoot.querySelector(\"button\")) {\n this.el.shadowRoot.querySelector(\"button\").focus();\n }\n }\n\n private parentFocussed = (): void => {\n this.isFocussed = true;\n };\n\n private parentBlurred = (): void => {\n this.isFocussed = false;\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private toggleExpanded = (): void => {\n this.areaExpanded = !this.areaExpanded;\n };\n\n render() {\n const {\n clickable,\n disabled,\n expandable,\n heading,\n message,\n href,\n hreflang,\n referrerpolicy,\n rel,\n subheading,\n target,\n fullWidth,\n parentIsAnchorTag,\n isFocussed,\n } = this;\n\n const Component = parentIsAnchorTag\n ? \"div\"\n : clickable\n ? this.href === undefined\n ? \"button\"\n : \"a\"\n : \"div\";\n\n const attrs = Component == \"a\" && {\n href: href,\n hrefLang: hreflang,\n referrerPolicy: referrerpolicy,\n rel: rel,\n target: target,\n };\n\n return (\n <Component\n class={{\n [\"card\"]: true,\n [\"clickable\"]: clickable && !disabled,\n [\"disabled\"]: disabled,\n [\"fullwidth\"]: fullWidth,\n [\"focussed\"]: isFocussed,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n }}\n tabindex={clickable && !parentIsAnchorTag ? 0 : null}\n aria-disabled={disabled ? \"true\" : null}\n disabled={disabled ? true : null}\n {...attrs}\n >\n {isSlotUsed(this.el, \"image-top\") && (\n <div class=\"image-top\">\n <slot name=\"image-top\"></slot>\n </div>\n )}\n <div class=\"card-header\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <div class=\"card-title\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">\n <p>{heading}</p>\n </ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"interaction-button\") && (\n <div class=\"interaction-button\">\n <slot name=\"interaction-button\"></slot>\n </div>\n )}\n </div>\n {(subheading || isSlotUsed(this.el, \"subheading\")) && (\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">\n {subheading}\n </ic-typography>\n </slot>\n </div>\n )}\n {isSlotUsed(this.el, \"adornment\") && (\n <div class=\"adornment\">\n <slot name=\"adornment\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"image-mid\") && (\n <div class=\"image-mid\">\n <slot name=\"image-mid\"></slot>\n </div>\n )}\n {(message || isSlotUsed(this.el, \"message\")) && (\n <div\n class={{\n [\"card-message\"]: true,\n }}\n >\n {message && <ic-typography variant=\"body\">{message}</ic-typography>}\n {isSlotUsed(this.el, \"message\") && <slot name=\"message\"></slot>}\n </div>\n )}\n {(isSlotUsed(this.el, \"interaction-controls\") || expandable) && (\n <div class=\"interaction-area\">\n <div class=\"interaction-controls\">\n <slot name=\"interaction-controls\"></slot>\n </div>\n {expandable && (\n <ic-button\n class={{\n [\"toggle-button\"]: true,\n [\"toggle-button-closed\"]: !this.areaExpanded,\n [\"toggle-button-expanded\"]: this.areaExpanded,\n }}\n variant=\"icon\"\n size=\"large\"\n disableTooltip\n aria-label=\"Toggle expandable area\"\n aria-expanded={this.areaExpanded}\n aria-controls=\"expanded-content-area\"\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></ic-button>\n )}\n </div>\n )}\n {isSlotUsed(this.el, \"expanded-content\") && this.areaExpanded && (\n <div class=\"expanded-content\" id=\"expanded-content-area\">\n <slot name=\"expanded-content\"></slot>\n </div>\n )}\n </Component>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-card.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,wvKAAwvK;;MCuC7vK,IAAI;;;;;IA0HP,mBAAc,GAAG;MACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;KACxB,CAAC;IAEM,kBAAa,GAAG;MACtB,IAAI,CAAC,UAAU,GAAG,KAAK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B,SAAS,EAAE,WAAW,GACX,CACd,CACG,CACP,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,IAAI,CAAC,YAAY,KAC3D,WAAK,KAAK,EAAC,kBAAkB,EAAC,EAAE,EAAC,uBAAuB,IACtD,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACP,CACS,EACZ;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-card/ic-card.css?tag=ic-card&encapsulation=shadow","src/components/ic-card/ic-card.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-architechtural-black) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card,\n.card.clickable {\n display: flex;\n flex-direction: column;\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-architechtural-black);\n transition: var(--ic-easing-transition-fast);\n}\n\n.dark.card,\n.dark.card.clickable {\n border: var(--ic-space-1px) solid var(--ic-architectural-700);\n}\n\n.card.clickable:hover {\n background-color: var(--ic-action-default-bg-hover);\n border: var(--ic-border-hover);\n cursor: pointer;\n}\n\n.card.clickable:focus,\n.card.clickable.focussed {\n background-color: var(--ic-action-default-bg-hover);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n border: var(--ic-border-pressed);\n}\n\n.card.clickable:active {\n background-color: var(--ic-action-default-bg-active);\n box-shadow: var(--ic-border-focus);\n}\n\n.card.disabled {\n border: var(--ic-border-disabled);\n}\n\n.card.fullwidth {\n width: 100%;\n}\n\n.card-header {\n display: flex;\n align-items: center;\n}\n\n.icon {\n display: flex;\n align-items: center;\n padding-right: var(--ic-space-xs);\n}\n\n.card.disabled ::slotted(svg) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.card.clickable .card-title {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n}\n\n.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title {\n display: inline-block;\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n@supports (text-decoration-thickness: 25%) {\n .card.clickable:hover .card-title,\n .card.clickable:focus .card-title,\n .card.clickable.focussed .card-title {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n\n.card.clickable:active .card-title {\n text-decoration: none;\n}\n\n.card.disabled .card-title {\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n text-decoration-color: var(--ic-color-tertiary-text);\n color: var(--ic-color-tertiary-text);\n}\n\n.subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n.adornment {\n margin-top: var(--ic-space-xxs);\n}\n\n.card-message {\n margin-top: var(--ic-space-md);\n align-items: left;\n}\n\n.card.disabled .card-message,\n.card.disabled .subheading {\n color: var(--ic-color-tertiary-text);\n}\n\n.interaction-button {\n margin-left: auto;\n}\n\n.image-top {\n margin-bottom: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.image-mid {\n margin-top: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.interaction-area {\n display: flex;\n flex-grow: 1;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-md);\n align-items: flex-end;\n}\n\n.interaction-controls {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--ic-space-sm);\n}\n\n.toggle-button {\n margin-left: auto;\n}\n\n.toggle-button-closed svg {\n transform: rotate(90deg);\n}\n\n.toggle-button-expanded svg {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n margin-top: var(--ic-space-md);\n}\n","import {\n Component,\n Element,\n Listen,\n Prop,\n State,\n h,\n Method,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getThemeFromContext,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot heading - Content will be placed at the top of the card to the right of the icon.\n * @slot message - Content will be placed in the main body of the card.\n * @slot subheading - Content will be placed below the card heading.\n * @slot adornment - Content will be placed below the card subheading.\n * @slot image-top - Content will be placed at the top of the card above all other content.\n * @slot image-mid - Content will be placed below the card heading section.\n * @slot icon - Content will be placed to the left of the card heading.\n * @slot interaction-button - Content will be placed in the top right corner of the heading section.\n * @slot interaction-controls - Content will be placed below the card message.\n * @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.\n */\n@Component({\n tag: \"ic-card\",\n styleUrl: \"ic-card.css\",\n shadow: true,\n})\nexport class Card {\n @Element() el: HTMLIcCardElement;\n\n @State() appearance?: IcThemeForeground = \"default\";\n @State() areaExpanded: boolean = false;\n @State() isFocussed: boolean = false;\n @State() parentEl: HTMLElement | null = null;\n @State() parentIsAnchorTag: boolean = false;\n\n /**\n * If `true`, the card will be a clickable variant, instead of static.\n */\n @Prop({ mutable: true }) clickable?: boolean = false;\n\n /**\n * If `true`, the card will be disabled if it is clickable.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the card will have an expandable area and expansion toggle button.\n */\n @Prop() expandable?: boolean = false;\n\n /**\n * If `true`, the card will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The heading for the card.\n */\n @Prop() heading!: string;\n\n /**\n * The URL that the clickable card link points to. If set, the clickable card will render as an \"a\" tag, otherwise it will render as a button.\n */\n @Prop() href?: string | undefined;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n\n /**\n * The main body message of the card.\n */\n @Prop() message?: string = \"\";\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 subheading for the card.\n */\n @Prop() subheading?: string;\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 disconnectedCallback(): void {\n if (this.parentIsAnchorTag) {\n this.parentEl.removeEventListener(\"focus\", this.parentFocussed);\n this.parentEl.removeEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n componentWillLoad(): void {\n this.parentEl = this.el.parentElement;\n\n if (this.parentEl.tagName === \"A\") {\n this.clickable = true;\n this.parentIsAnchorTag = true;\n this.parentEl.classList.add(\"ic-card-wrapper-link\");\n this.parentEl.addEventListener(\"focus\", this.parentFocussed);\n this.parentEl.addEventListener(\"blur\", this.parentBlurred);\n }\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Card\"\n );\n this.updateTheme();\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the card.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"a\")) {\n this.el.shadowRoot.querySelector(\"a\").focus();\n } else if (this.el.shadowRoot.querySelector(\"button\")) {\n this.el.shadowRoot.querySelector(\"button\").focus();\n }\n }\n\n private parentFocussed = (): void => {\n this.isFocussed = true;\n };\n\n private parentBlurred = (): void => {\n this.isFocussed = false;\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private toggleExpanded = (): void => {\n this.areaExpanded = !this.areaExpanded;\n };\n\n render() {\n const {\n clickable,\n disabled,\n expandable,\n heading,\n message,\n href,\n hreflang,\n referrerpolicy,\n rel,\n subheading,\n target,\n fullWidth,\n parentIsAnchorTag,\n isFocussed,\n } = this;\n\n const Component = parentIsAnchorTag\n ? \"div\"\n : clickable\n ? this.href === undefined\n ? \"button\"\n : \"a\"\n : \"div\";\n\n const attrs = Component == \"a\" && {\n href: href,\n hrefLang: hreflang,\n referrerPolicy: referrerpolicy,\n rel: rel,\n target: target,\n };\n\n return (\n <Component\n class={{\n [\"card\"]: true,\n [\"clickable\"]: clickable && !disabled,\n [\"disabled\"]: disabled,\n [\"fullwidth\"]: fullWidth,\n [\"focussed\"]: isFocussed,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n }}\n tabindex={clickable && !parentIsAnchorTag ? 0 : null}\n aria-disabled={disabled ? \"true\" : null}\n disabled={disabled ? true : null}\n {...attrs}\n >\n {isSlotUsed(this.el, \"image-top\") && (\n <div class=\"image-top\">\n <slot name=\"image-top\"></slot>\n </div>\n )}\n <div class=\"card-header\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <div class=\"card-title\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">\n <p>{heading}</p>\n </ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"interaction-button\") && (\n <div class=\"interaction-button\">\n <slot name=\"interaction-button\"></slot>\n </div>\n )}\n </div>\n {(subheading || isSlotUsed(this.el, \"subheading\")) && (\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">\n {subheading}\n </ic-typography>\n </slot>\n </div>\n )}\n {isSlotUsed(this.el, \"adornment\") && (\n <div class=\"adornment\">\n <slot name=\"adornment\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"image-mid\") && (\n <div class=\"image-mid\">\n <slot name=\"image-mid\"></slot>\n </div>\n )}\n {(message || isSlotUsed(this.el, \"message\")) && (\n <div\n class={{\n [\"card-message\"]: true,\n }}\n >\n {message && <ic-typography variant=\"body\">{message}</ic-typography>}\n {isSlotUsed(this.el, \"message\") && <slot name=\"message\"></slot>}\n </div>\n )}\n {(isSlotUsed(this.el, \"interaction-controls\") || expandable) && (\n <div class=\"interaction-area\">\n <div class=\"interaction-controls\">\n <slot name=\"interaction-controls\"></slot>\n </div>\n {expandable && (\n <ic-button\n class={{\n [\"toggle-button\"]: true,\n [\"toggle-button-closed\"]: !this.areaExpanded,\n [\"toggle-button-expanded\"]: this.areaExpanded,\n }}\n variant=\"icon\"\n size=\"large\"\n disableTooltip\n aria-label=\"Toggle expandable area\"\n aria-expanded={this.areaExpanded}\n aria-controls=\"expanded-content-area\"\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></ic-button>\n )}\n </div>\n )}\n {isSlotUsed(this.el, \"expanded-content\") && this.areaExpanded && (\n <div class=\"expanded-content\" id=\"expanded-content-area\">\n <slot name=\"expanded-content\"></slot>\n </div>\n )}\n </Component>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"ic-checkbox-group.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,y9FAAy9F;;MCyBv+F,aAAa;;;;;;oBAMI,KAAK;sBAKJ,EAAE;qBAKF,KAAK;;;oBAeN,KAAK;gBAKR,SAAS;iBAKT,KAAK;4BAKyB,EAAE;0BAKxB,EAAE;;EAOnC,iBAAiB;IACf,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;GAC/C;EAED,gBAAgB;IACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAC3D,CAAC,QAAQ;MACP,IAAI,CAAC,QAAQ,CAAC,IAAI;QAAE,QAAQ,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/ic-checkbox-group/ic-checkbox-group.css?tag=ic-checkbox-group&encapsulation=shadow","./src/components/ic-checkbox-group/ic-checkbox-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-label ic-typography {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\nic-input-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.small) .checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxxs));\n}\n\n.screen-reader-only-text {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty, IcSizes } from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-checkbox-group.types\";\n\n@Component({\n tag: \"ic-checkbox-group\",\n styleUrl: \"ic-checkbox-group.css\",\n shadow: true,\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class CheckboxGroup {\n @Element() host: HTMLIcCheckboxGroupElement;\n\n /**\n * If `true`, the checkbox group will be set to the disabled state.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The label for the checkbox group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n /**\n * If `true`, the checkbox group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The size of the checkboxes to be displayed. This does not affect the font size of the label.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small: boolean = false;\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * Emitted when a checkbox is checked.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.host);\n }\n\n componentDidLoad(): void {\n Array.from(this.host.querySelectorAll(\"ic-checkbox\")).forEach(\n (checkbox) => {\n if (!checkbox.name) checkbox.name = this.name;\n checkbox.groupLabel = this.label;\n }\n );\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Checkbox Group\"\n );\n }\n\n @Listen(\"icCheck\")\n selectHandler(ev: CustomEvent): void {\n const checkedOptions = Array.from(\n this.host.querySelectorAll(\"ic-checkbox\")\n ).filter((checkbox) => checkbox.checked && !checkbox.disabled);\n this.icChange.emit({\n value: checkedOptions.map((opt) => opt.value),\n checkedOptions: checkedOptions.map((opt) => ({\n checkbox: opt,\n textFieldValue: opt.querySelector(\"ic-text-field\")?.value,\n })),\n selectedOption: ev.target as HTMLIcCheckboxElement,\n });\n }\n\n render() {\n const describedBy = getInputDescribedByText(\n this.name,\n this.helperText !== \"\",\n this.validationStatus !== \"\"\n );\n const hadValidationStatus = hasValidationStatus(\n this.validationStatus,\n this.disabled\n );\n\n return (\n <Host class={{ [\"small\"]: this.small, [`${this.size}`]: true }}>\n {(this.validationStatus === \"error\" ||\n this.required ||\n this.hideLabel) && (\n <span\n id=\"screenReaderOnlyText\"\n class=\"screen-reader-only-text\"\n aria-hidden=\"true\"\n >\n {this.label}{\" \"}\n {this.validationStatus === \"error\" ? \"invalid data \" : null}{\" \"}\n {this.required ? \"required\" : null}\n </span>\n )}\n <fieldset\n id={this.name}\n aria-labelledby={`${\n this.validationStatus === \"error\" || this.required || this.hideLabel\n ? \"screenReaderOnlyText\"\n : \"\"\n } ${describedBy}`.trim()}\n disabled={this.disabled}\n >\n {!this.hideLabel && (\n <legend>\n <ic-input-label\n class={{ [`${this.validationStatus}`]: true }}\n label={this.label}\n helperText={this.helperText}\n required={this.required}\n disabled={this.disabled}\n for={this.name}\n ></ic-input-label>\n </legend>\n )}\n <div class=\"checkboxes-container\">\n <slot></slot>\n </div>\n </fieldset>\n {hadValidationStatus && (\n <ic-input-validation\n for={this.name}\n ariaLiveMode=\"polite\"\n status={this.validationStatus}\n message={this.validationText}\n ></ic-input-validation>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-checkbox-group.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,y9FAAy9F;;MCyBv+F,aAAa;;;;;;oBAMI,KAAK;sBAKJ,EAAE;qBAKF,KAAK;;;oBAeN,KAAK;gBAKR,SAAS;iBAKT,KAAK;4BAKyB,EAAE;0BAKxB,EAAE;;EAOnC,iBAAiB;IACf,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;GAC/C;EAED,gBAAgB;IACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAC3D,CAAC,QAAQ;MACP,IAAI,CAAC,QAAQ,CAAC,IAAI;QAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;MAC9C,QAAQ,CAAC,UAAU,GAAG,IAAI,C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ic-checkbox-group.css?tag=ic-checkbox-group&encapsulation=shadow","src/components/ic-checkbox-group/ic-checkbox-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-label ic-typography {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\nic-input-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.small) .checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxxs));\n}\n\n.screen-reader-only-text {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty, IcSizes } from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-checkbox-group.types\";\n\n@Component({\n tag: \"ic-checkbox-group\",\n styleUrl: \"ic-checkbox-group.css\",\n shadow: true,\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class CheckboxGroup {\n @Element() host: HTMLIcCheckboxGroupElement;\n\n /**\n * If `true`, the checkbox group will be set to the disabled state.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The label for the checkbox group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n /**\n * If `true`, the checkbox group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The size of the checkboxes to be displayed. This does not affect the font size of the label.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small: boolean = false;\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * Emitted when a checkbox is checked.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.host);\n }\n\n componentDidLoad(): void {\n Array.from(this.host.querySelectorAll(\"ic-checkbox\")).forEach(\n (checkbox) => {\n if (!checkbox.name) checkbox.name = this.name;\n checkbox.groupLabel = this.label;\n }\n );\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Checkbox Group\"\n );\n }\n\n @Listen(\"icCheck\")\n selectHandler(ev: CustomEvent): void {\n const checkedOptions = Array.from(\n this.host.querySelectorAll(\"ic-checkbox\")\n ).filter((checkbox) => checkbox.checked && !checkbox.disabled);\n this.icChange.emit({\n value: checkedOptions.map((opt) => opt.value),\n checkedOptions: checkedOptions.map((opt) => ({\n checkbox: opt,\n textFieldValue: opt.querySelector(\"ic-text-field\")?.value,\n })),\n selectedOption: ev.target as HTMLIcCheckboxElement,\n });\n }\n\n render() {\n const describedBy = getInputDescribedByText(\n this.name,\n this.helperText !== \"\",\n this.validationStatus !== \"\"\n );\n const hadValidationStatus = hasValidationStatus(\n this.validationStatus,\n this.disabled\n );\n\n return (\n <Host class={{ [\"small\"]: this.small, [`${this.size}`]: true }}>\n {(this.validationStatus === \"error\" ||\n this.required ||\n this.hideLabel) && (\n <span\n id=\"screenReaderOnlyText\"\n class=\"screen-reader-only-text\"\n aria-hidden=\"true\"\n >\n {this.label}{\" \"}\n {this.validationStatus === \"error\" ? \"invalid data \" : null}{\" \"}\n {this.required ? \"required\" : null}\n </span>\n )}\n <fieldset\n id={this.name}\n aria-labelledby={`${\n this.validationStatus === \"error\" || this.required || this.hideLabel\n ? \"screenReaderOnlyText\"\n : \"\"\n } ${describedBy}`.trim()}\n disabled={this.disabled}\n >\n {!this.hideLabel && (\n <legend>\n <ic-input-label\n class={{ [`${this.validationStatus}`]: true }}\n label={this.label}\n helperText={this.helperText}\n required={this.required}\n disabled={this.disabled}\n for={this.name}\n ></ic-input-label>\n </legend>\n )}\n <div class=\"checkboxes-container\">\n <slot></slot>\n </div>\n </fieldset>\n {hadValidationStatus && (\n <ic-input-validation\n for={this.name}\n ariaLiveMode=\"polite\"\n status={this.validationStatus}\n message={this.validationText}\n ></ic-input-validation>\n )}\n </Host>\n );\n }\n}\n"],"version":3}