@ukic/web-components 2.13.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (377) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-81e0057b.js → helpers-d52cddc1.js} +2 -2
  3. package/dist/cjs/helpers-d52cddc1.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +6 -2
  5. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-badge.cjs.entry.js +4 -3
  10. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-button_3.cjs.entry.js +23 -12
  14. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-card.cjs.entry.js +5 -6
  16. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
  21. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
  23. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +12 -10
  33. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-pagination.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-select.cjs.entry.js +21 -13
  53. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +184 -0
  66. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
  67. package/dist/cjs/ic-toggle-button.cjs.entry.js +6 -3
  68. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  71. package/dist/cjs/index-f982899d.js +4 -0
  72. package/dist/cjs/loader.cjs.js +1 -1
  73. package/dist/cjs/types-dc22e301.js.map +1 -1
  74. package/dist/collection/collection-manifest.json +2 -1
  75. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +24 -2
  76. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
  77. package/dist/collection/components/ic-badge/ic-badge.js +3 -2
  78. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  79. package/dist/collection/components/ic-button/ic-button.css +227 -35
  80. package/dist/collection/components/ic-button/ic-button.js +22 -10
  81. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  82. package/dist/collection/components/ic-card/ic-card.css +44 -0
  83. package/dist/collection/components/ic-card/ic-card.js +3 -4
  84. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  85. package/dist/collection/components/ic-data-entity/ic-data-entity.js +3 -6
  86. package/dist/collection/components/ic-data-entity/ic-data-entity.js.map +1 -1
  87. package/dist/collection/components/ic-data-row/ic-data-row.js +20 -34
  88. package/dist/collection/components/ic-data-row/ic-data-row.js.map +1 -1
  89. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +4 -0
  90. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +9 -8
  91. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  92. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +8 -8
  93. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  94. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.spec.js +7 -0
  95. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.spec.js.map +1 -1
  96. package/dist/collection/components/ic-menu/ic-menu.css +13 -7
  97. package/dist/collection/components/ic-menu/ic-menu.js +8 -7
  98. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  99. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +1 -1
  100. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  101. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  102. package/dist/collection/components/ic-search-bar/ic-search-bar.js +1 -1
  103. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  104. package/dist/collection/components/ic-select/ic-select.js +54 -17
  105. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  106. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +23 -1
  107. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  108. package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +62 -2
  109. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +4 -1
  110. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  111. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +516 -0
  112. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +431 -0
  113. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -0
  114. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.types.js +2 -0
  115. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.types.js.map +1 -0
  116. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +150 -0
  117. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -0
  118. package/dist/collection/utils/helpers.js +4 -1
  119. package/dist/collection/utils/helpers.js.map +1 -1
  120. package/dist/collection/utils/types.js.map +1 -1
  121. package/dist/components/helpers.js +1 -1
  122. package/dist/components/helpers.js.map +1 -1
  123. package/dist/components/ic-accordion-group.js +7 -2
  124. package/dist/components/ic-accordion-group.js.map +1 -1
  125. package/dist/components/ic-badge.js +3 -2
  126. package/dist/components/ic-badge.js.map +1 -1
  127. package/dist/components/ic-button2.js +22 -11
  128. package/dist/components/ic-button2.js.map +1 -1
  129. package/dist/components/ic-card.js +5 -18
  130. package/dist/components/ic-card.js.map +1 -1
  131. package/dist/components/ic-data-entity.js +3 -6
  132. package/dist/components/ic-data-entity.js.map +1 -1
  133. package/dist/components/ic-data-row.js +20 -34
  134. package/dist/components/ic-data-row.js.map +1 -1
  135. package/dist/components/ic-input-component-container2.js +6 -5
  136. package/dist/components/ic-input-component-container2.js.map +1 -1
  137. package/dist/components/ic-menu2.js +5 -4
  138. package/dist/components/ic-menu2.js.map +1 -1
  139. package/dist/components/ic-popover-menu.js +1 -1
  140. package/dist/components/ic-popover-menu.js.map +1 -1
  141. package/dist/components/ic-radio-group.js.map +1 -1
  142. package/dist/components/ic-search-bar.js.map +1 -1
  143. package/dist/components/ic-select.js +22 -13
  144. package/dist/components/ic-select.js.map +1 -1
  145. package/dist/components/ic-toggle-button-group.d.ts +11 -0
  146. package/dist/components/ic-toggle-button-group.js +210 -0
  147. package/dist/components/ic-toggle-button-group.js.map +1 -0
  148. package/dist/components/ic-toggle-button.js +5 -2
  149. package/dist/components/ic-toggle-button.js.map +1 -1
  150. package/dist/components/types.js.map +1 -1
  151. package/dist/core/core.css +1 -1
  152. package/dist/core/core.esm.js +1 -1
  153. package/dist/core/core.esm.js.map +1 -1
  154. package/dist/core/{p-c5e71983.entry.js → p-0038a8fd.entry.js} +2 -2
  155. package/dist/core/{p-dce01eea.entry.js → p-04506779.entry.js} +2 -2
  156. package/dist/core/p-0d0070b3.entry.js +2 -0
  157. package/dist/core/p-0d0070b3.entry.js.map +1 -0
  158. package/dist/core/{p-50df74fb.entry.js → p-0e2628eb.entry.js} +2 -2
  159. package/dist/core/p-0e2628eb.entry.js.map +1 -0
  160. package/dist/core/{p-0df94b9d.entry.js → p-1183031f.entry.js} +2 -2
  161. package/dist/core/p-1183031f.entry.js.map +1 -0
  162. package/dist/core/{p-2fbb52cd.entry.js → p-123b9306.entry.js} +2 -2
  163. package/dist/core/{p-4421203e.entry.js → p-166861e8.entry.js} +2 -2
  164. package/dist/core/p-166861e8.entry.js.map +1 -0
  165. package/dist/core/{p-77a9c4fd.entry.js → p-1ce0d16e.entry.js} +2 -2
  166. package/dist/core/{p-9c835bd7.entry.js → p-1d352487.entry.js} +2 -2
  167. package/dist/core/{p-7ef4f806.entry.js → p-210412e4.entry.js} +2 -2
  168. package/dist/core/{p-596c702b.entry.js → p-22a682e8.entry.js} +2 -2
  169. package/dist/core/{p-8b9d5e1f.entry.js → p-2680b736.entry.js} +2 -2
  170. package/dist/core/p-2680b736.entry.js.map +1 -0
  171. package/dist/core/p-26b7b18f.js.map +1 -1
  172. package/dist/core/{p-898a35c5.entry.js → p-296b7d74.entry.js} +2 -2
  173. package/dist/core/{p-45fb7128.entry.js → p-2f462ec5.entry.js} +2 -2
  174. package/dist/core/{p-85601b9f.entry.js → p-35b8923f.entry.js} +2 -2
  175. package/dist/core/{p-5bbbb507.entry.js → p-4641518f.entry.js} +2 -2
  176. package/dist/core/{p-911592a7.entry.js → p-46ecc4c5.entry.js} +2 -2
  177. package/dist/core/{p-8c55b011.entry.js → p-47a9dca9.entry.js} +2 -2
  178. package/dist/core/p-47d39ce7.entry.js +2 -0
  179. package/dist/core/p-47d39ce7.entry.js.map +1 -0
  180. package/dist/core/{p-dae0cfd0.entry.js → p-4ce5abd7.entry.js} +2 -2
  181. package/dist/core/p-53f2fc84.js +2 -0
  182. package/dist/core/p-53f2fc84.js.map +1 -0
  183. package/dist/core/{p-5bce919a.entry.js → p-5603eec3.entry.js} +2 -2
  184. package/dist/core/{p-584f15f9.entry.js → p-5e729e99.entry.js} +2 -2
  185. package/dist/core/p-5e729e99.entry.js.map +1 -0
  186. package/dist/core/{p-daf7e227.entry.js → p-64705a03.entry.js} +2 -2
  187. package/dist/core/{p-bfbf4c5b.entry.js → p-6a9ddb8a.entry.js} +2 -2
  188. package/dist/core/p-6fae929c.entry.js +2 -0
  189. package/dist/core/p-6fae929c.entry.js.map +1 -0
  190. package/dist/core/{p-b7a2e604.entry.js → p-7438ab1f.entry.js} +2 -2
  191. package/dist/core/p-7438ab1f.entry.js.map +1 -0
  192. package/dist/core/{p-d3059083.entry.js → p-7606c930.entry.js} +2 -2
  193. package/dist/core/{p-231a7230.entry.js → p-76ee6107.entry.js} +2 -2
  194. package/dist/core/{p-77b56204.entry.js → p-7b0397ea.entry.js} +2 -2
  195. package/dist/core/{p-e8d77f95.entry.js → p-80c3424f.entry.js} +2 -2
  196. package/dist/core/{p-3784f352.entry.js → p-8aa9aa25.entry.js} +2 -2
  197. package/dist/core/p-916f4265.entry.js +2 -0
  198. package/dist/core/p-916f4265.entry.js.map +1 -0
  199. package/dist/core/{p-7384a191.entry.js → p-91768ddf.entry.js} +2 -2
  200. package/dist/core/{p-10448c8d.entry.js → p-95d6f3ed.entry.js} +2 -2
  201. package/dist/core/{p-4ece659b.entry.js → p-9c18f048.entry.js} +2 -2
  202. package/dist/core/{p-881be3d5.entry.js → p-a4e7d123.entry.js} +2 -2
  203. package/dist/core/{p-c0e003dc.entry.js → p-a98f57cf.entry.js} +2 -2
  204. package/dist/core/{p-2db45025.entry.js → p-a9e1966f.entry.js} +2 -2
  205. package/dist/core/{p-7a62bb2f.entry.js → p-aa878a3c.entry.js} +2 -2
  206. package/dist/core/{p-4cf909ad.entry.js → p-b781b691.entry.js} +2 -2
  207. package/dist/core/{p-792d194d.entry.js → p-b98ce745.entry.js} +2 -2
  208. package/dist/core/{p-8c0f0a88.entry.js → p-bc7f99b8.entry.js} +2 -2
  209. package/dist/core/p-bc7f99b8.entry.js.map +1 -0
  210. package/dist/core/{p-9d66dd4c.entry.js → p-c053230d.entry.js} +2 -2
  211. package/dist/core/p-c053230d.entry.js.map +1 -0
  212. package/dist/core/{p-89a4057e.entry.js → p-c2789113.entry.js} +2 -2
  213. package/dist/core/{p-6724e9fd.entry.js → p-c7c2aa3c.entry.js} +2 -2
  214. package/dist/core/{p-d01d69a3.entry.js → p-d319ddce.entry.js} +2 -2
  215. package/dist/core/{p-5a243837.entry.js → p-d5f721ca.entry.js} +2 -2
  216. package/dist/core/{p-83f58174.entry.js → p-d9329191.entry.js} +2 -2
  217. package/dist/core/{p-42f5f86d.entry.js → p-dbbea7fa.entry.js} +2 -2
  218. package/dist/core/p-dbbea7fa.entry.js.map +1 -0
  219. package/dist/core/{p-b723f883.entry.js → p-e4863c93.entry.js} +2 -2
  220. package/dist/core/{p-87933302.entry.js → p-e68e31ec.entry.js} +2 -2
  221. package/dist/core/{p-263da6f8.entry.js → p-fbcb77a3.entry.js} +2 -2
  222. package/dist/core/{p-c73081df.entry.js → p-fce3e1aa.entry.js} +2 -2
  223. package/dist/core/{p-eadb62d5.entry.js → p-fea1d095.entry.js} +2 -2
  224. package/dist/esm/core.js +1 -1
  225. package/dist/esm/{helpers-5c2846f4.js → helpers-f1ca9908.js} +2 -2
  226. package/dist/esm/helpers-f1ca9908.js.map +1 -0
  227. package/dist/esm/ic-accordion-group.entry.js +6 -2
  228. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  229. package/dist/esm/ic-accordion.entry.js +1 -1
  230. package/dist/esm/ic-alert.entry.js +1 -1
  231. package/dist/esm/ic-back-to-top.entry.js +1 -1
  232. package/dist/esm/ic-badge.entry.js +4 -3
  233. package/dist/esm/ic-badge.entry.js.map +1 -1
  234. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  235. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  236. package/dist/esm/ic-button_3.entry.js +23 -12
  237. package/dist/esm/ic-button_3.entry.js.map +1 -1
  238. package/dist/esm/ic-card.entry.js +5 -6
  239. package/dist/esm/ic-card.entry.js.map +1 -1
  240. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  241. package/dist/esm/ic-checkbox.entry.js +1 -1
  242. package/dist/esm/ic-chip.entry.js +1 -1
  243. package/dist/esm/ic-data-entity.entry.js +3 -6
  244. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  245. package/dist/esm/ic-data-row.entry.js +21 -35
  246. package/dist/esm/ic-data-row.entry.js.map +1 -1
  247. package/dist/esm/ic-dialog.entry.js +1 -1
  248. package/dist/esm/ic-divider.entry.js +1 -1
  249. package/dist/esm/ic-empty-state.entry.js +1 -1
  250. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  251. package/dist/esm/ic-footer-link.entry.js +1 -1
  252. package/dist/esm/ic-footer.entry.js +1 -1
  253. package/dist/esm/ic-hero.entry.js +1 -1
  254. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  255. package/dist/esm/ic-input-component-container_3.entry.js +12 -10
  256. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  257. package/dist/esm/ic-input-label_2.entry.js +1 -1
  258. package/dist/esm/ic-link.entry.js +1 -1
  259. package/dist/esm/ic-menu-group.entry.js +1 -1
  260. package/dist/esm/ic-menu-item.entry.js +1 -1
  261. package/dist/esm/ic-navigation-button.entry.js +1 -1
  262. package/dist/esm/ic-navigation-group.entry.js +1 -1
  263. package/dist/esm/ic-navigation-item.entry.js +1 -1
  264. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  265. package/dist/esm/ic-page-header.entry.js +1 -1
  266. package/dist/esm/ic-pagination-item.entry.js +1 -1
  267. package/dist/esm/ic-pagination.entry.js +1 -1
  268. package/dist/esm/ic-popover-menu.entry.js +1 -1
  269. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  270. package/dist/esm/ic-radio-group.entry.js +1 -1
  271. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  272. package/dist/esm/ic-radio-option.entry.js +1 -1
  273. package/dist/esm/ic-search-bar.entry.js +1 -1
  274. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  275. package/dist/esm/ic-select.entry.js +21 -13
  276. package/dist/esm/ic-select.entry.js.map +1 -1
  277. package/dist/esm/ic-side-navigation.entry.js +1 -1
  278. package/dist/esm/ic-status-tag.entry.js +1 -1
  279. package/dist/esm/ic-step.entry.js +1 -1
  280. package/dist/esm/ic-stepper.entry.js +1 -1
  281. package/dist/esm/ic-switch.entry.js +1 -1
  282. package/dist/esm/ic-tab-group.entry.js +1 -1
  283. package/dist/esm/ic-tab-panel.entry.js +1 -1
  284. package/dist/esm/ic-tab.entry.js +1 -1
  285. package/dist/esm/ic-text-field.entry.js +1 -1
  286. package/dist/esm/ic-theme.entry.js +1 -1
  287. package/dist/esm/ic-toast.entry.js +1 -1
  288. package/dist/esm/ic-toggle-button-group.entry.js +180 -0
  289. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
  290. package/dist/esm/ic-toggle-button.entry.js +6 -3
  291. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  292. package/dist/esm/ic-top-navigation.entry.js +1 -1
  293. package/dist/esm/ic-typography.entry.js +1 -1
  294. package/dist/esm/index-d1d2c456.js +4 -0
  295. package/dist/esm/loader.js +1 -1
  296. package/dist/esm/types-6f6b41a5.js.map +1 -1
  297. package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +5 -0
  298. package/dist/types/components/ic-button/ic-button.d.ts +3 -0
  299. package/dist/types/components/ic-data-row/ic-data-row.d.ts +1 -6
  300. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +2 -2
  301. package/dist/types/components/ic-menu/ic-menu.d.ts +2 -2
  302. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -1
  303. package/dist/types/components/ic-select/ic-select.d.ts +12 -3
  304. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +1 -0
  305. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +68 -0
  306. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.types.d.ts +7 -0
  307. package/dist/types/components.d.ts +144 -12
  308. package/dist/types/utils/helpers.d.ts +2 -1
  309. package/dist/types/utils/types.d.ts +2 -0
  310. package/hydrate/index.js +294 -86
  311. package/package.json +3 -3
  312. package/vscode-data.json +121 -2
  313. package/dist/cjs/helpers-81e0057b.js.map +0 -1
  314. package/dist/collection/components/ic-loading-indicator/test/a11y/ic-loading-indicator.test.a11y.js +0 -11
  315. package/dist/collection/components/ic-loading-indicator/test/a11y/ic-loading-indicator.test.a11y.js.map +0 -1
  316. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.e2e.js +0 -34
  317. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.e2e.js.map +0 -1
  318. package/dist/core/p-0df94b9d.entry.js.map +0 -1
  319. package/dist/core/p-42f5f86d.entry.js.map +0 -1
  320. package/dist/core/p-4421203e.entry.js.map +0 -1
  321. package/dist/core/p-50df74fb.entry.js.map +0 -1
  322. package/dist/core/p-56c41889.entry.js +0 -2
  323. package/dist/core/p-56c41889.entry.js.map +0 -1
  324. package/dist/core/p-573322c6.entry.js +0 -2
  325. package/dist/core/p-573322c6.entry.js.map +0 -1
  326. package/dist/core/p-584f15f9.entry.js.map +0 -1
  327. package/dist/core/p-8b9d5e1f.entry.js.map +0 -1
  328. package/dist/core/p-8c0f0a88.entry.js.map +0 -1
  329. package/dist/core/p-9d66dd4c.entry.js.map +0 -1
  330. package/dist/core/p-a741d16f.entry.js +0 -2
  331. package/dist/core/p-a741d16f.entry.js.map +0 -1
  332. package/dist/core/p-b34eb829.js +0 -2
  333. package/dist/core/p-b34eb829.js.map +0 -1
  334. package/dist/core/p-b7a2e604.entry.js.map +0 -1
  335. package/dist/esm/helpers-5c2846f4.js.map +0 -1
  336. package/dist/types/components/ic-loading-indicator/test/a11y/ic-loading-indicator.test.a11y.d.ts +0 -1
  337. /package/dist/core/{p-c5e71983.entry.js.map → p-0038a8fd.entry.js.map} +0 -0
  338. /package/dist/core/{p-dce01eea.entry.js.map → p-04506779.entry.js.map} +0 -0
  339. /package/dist/core/{p-2fbb52cd.entry.js.map → p-123b9306.entry.js.map} +0 -0
  340. /package/dist/core/{p-77a9c4fd.entry.js.map → p-1ce0d16e.entry.js.map} +0 -0
  341. /package/dist/core/{p-9c835bd7.entry.js.map → p-1d352487.entry.js.map} +0 -0
  342. /package/dist/core/{p-7ef4f806.entry.js.map → p-210412e4.entry.js.map} +0 -0
  343. /package/dist/core/{p-596c702b.entry.js.map → p-22a682e8.entry.js.map} +0 -0
  344. /package/dist/core/{p-898a35c5.entry.js.map → p-296b7d74.entry.js.map} +0 -0
  345. /package/dist/core/{p-45fb7128.entry.js.map → p-2f462ec5.entry.js.map} +0 -0
  346. /package/dist/core/{p-85601b9f.entry.js.map → p-35b8923f.entry.js.map} +0 -0
  347. /package/dist/core/{p-5bbbb507.entry.js.map → p-4641518f.entry.js.map} +0 -0
  348. /package/dist/core/{p-911592a7.entry.js.map → p-46ecc4c5.entry.js.map} +0 -0
  349. /package/dist/core/{p-8c55b011.entry.js.map → p-47a9dca9.entry.js.map} +0 -0
  350. /package/dist/core/{p-dae0cfd0.entry.js.map → p-4ce5abd7.entry.js.map} +0 -0
  351. /package/dist/core/{p-5bce919a.entry.js.map → p-5603eec3.entry.js.map} +0 -0
  352. /package/dist/core/{p-daf7e227.entry.js.map → p-64705a03.entry.js.map} +0 -0
  353. /package/dist/core/{p-bfbf4c5b.entry.js.map → p-6a9ddb8a.entry.js.map} +0 -0
  354. /package/dist/core/{p-d3059083.entry.js.map → p-7606c930.entry.js.map} +0 -0
  355. /package/dist/core/{p-231a7230.entry.js.map → p-76ee6107.entry.js.map} +0 -0
  356. /package/dist/core/{p-77b56204.entry.js.map → p-7b0397ea.entry.js.map} +0 -0
  357. /package/dist/core/{p-e8d77f95.entry.js.map → p-80c3424f.entry.js.map} +0 -0
  358. /package/dist/core/{p-3784f352.entry.js.map → p-8aa9aa25.entry.js.map} +0 -0
  359. /package/dist/core/{p-7384a191.entry.js.map → p-91768ddf.entry.js.map} +0 -0
  360. /package/dist/core/{p-10448c8d.entry.js.map → p-95d6f3ed.entry.js.map} +0 -0
  361. /package/dist/core/{p-4ece659b.entry.js.map → p-9c18f048.entry.js.map} +0 -0
  362. /package/dist/core/{p-881be3d5.entry.js.map → p-a4e7d123.entry.js.map} +0 -0
  363. /package/dist/core/{p-c0e003dc.entry.js.map → p-a98f57cf.entry.js.map} +0 -0
  364. /package/dist/core/{p-2db45025.entry.js.map → p-a9e1966f.entry.js.map} +0 -0
  365. /package/dist/core/{p-7a62bb2f.entry.js.map → p-aa878a3c.entry.js.map} +0 -0
  366. /package/dist/core/{p-4cf909ad.entry.js.map → p-b781b691.entry.js.map} +0 -0
  367. /package/dist/core/{p-792d194d.entry.js.map → p-b98ce745.entry.js.map} +0 -0
  368. /package/dist/core/{p-89a4057e.entry.js.map → p-c2789113.entry.js.map} +0 -0
  369. /package/dist/core/{p-6724e9fd.entry.js.map → p-c7c2aa3c.entry.js.map} +0 -0
  370. /package/dist/core/{p-d01d69a3.entry.js.map → p-d319ddce.entry.js.map} +0 -0
  371. /package/dist/core/{p-5a243837.entry.js.map → p-d5f721ca.entry.js.map} +0 -0
  372. /package/dist/core/{p-83f58174.entry.js.map → p-d9329191.entry.js.map} +0 -0
  373. /package/dist/core/{p-b723f883.entry.js.map → p-e4863c93.entry.js.map} +0 -0
  374. /package/dist/core/{p-87933302.entry.js.map → p-e68e31ec.entry.js.map} +0 -0
  375. /package/dist/core/{p-263da6f8.entry.js.map → p-fbcb77a3.entry.js.map} +0 -0
  376. /package/dist/core/{p-c73081df.entry.js.map → p-fce3e1aa.entry.js.map} +0 -0
  377. /package/dist/core/{p-eadb62d5.entry.js.map → p-fea1d095.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,f as o,h as e,H as a,g as r}from"./p-6b5e91e2.js";import{x as n,T as s,w as c,j as l,k as h,i as d,d as u,a as b}from"./p-b34eb829.js";import{I as p}from"./p-26b7b18f.js";import{c as v}from"./p-68a5aaff.js";const f=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>\n</svg>`;const g='/*! 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;position:relative;--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;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,: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(.white-background) .button{--button-default-background-hover:var(--ic-action-default-bg-hover-no-alpha);--button-default-background-active:var(\n --ic-action-default-bg-active-no-alpha\n );background-color:var(--ic-architectural-white)}:host(.white-background.dark) .button{--button-default-background-hover:var(--ic-action-dark-bg-hover-no-alpha);--button-default-background-active:var(--ic-action-dark-bg-active-no-alpha)}: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(.top-icon) .button{flex-direction:column;--height:fit-content}:host(.top-icon) .button .icon-container{margin-right:0}: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:hover:focus{background-color:var(--button-default-hover);border-color:var(--button-default-hover)}:host(.button-variant-primary:not(.light)) .button:hover:focus{color:var(--ic-architectural-white)}:host(.button-variant-primary) .button:active:not(:focus),:host(.button-variant-primary.loading) .button{background-color:var(--button-default-active)}:host(.button-variant-primary) .button:active:focus{background-color:var(--button-default-active)}:host(.button-variant-primary) .button:active{background-color:var(--button-default-active)}:host(.button-variant-primary:not(.light)) .button:active{color:var(--ic-architectural-white)}: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-border-width) solid var(--button-default);color:var(--button-default)}:host(.button-variant-secondary) .button:hover:not(:focus),:host(.button-variant-secondary) .button:hover: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),:host(.button-variant-secondary) .button:active:focus,:host(.button-variant-secondary) .button:active{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),:host(.button-variant-tertiary) .button:hover: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) .button:active:focus,:host(.button-variant-tertiary) .button:active,: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);margin:var(--ic-space-1px) 0}: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),:host(.button-variant-icon) .button:hover: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),:host(.button-variant-destructive) .button:hover:focus{background-color:var(--ic-action-destructive-hover)}:host(.button-variant-destructive) .button:active:not(:focus),:host(.button-variant-destructive) .button:active: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;margin-right:var(--ic-space-xs)}div.right-icon{margin-right:auto;margin-left:var(--ic-space-xs)}::slotted(:not(ic-badge)){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{height:var(--height);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}:host .arrow-dropdown{margin-top:auto}:host .dropdown-expanded{transform:rotate(180deg);margin-bottom:var(--ic-space-xxxs)}:host(.dropdown-no-icon) .button{padding-right:var(--ic-space-xs)}@media (forced-colors: active){.button{border:0.125rem solid transparent}}:host(.flip) ::slotted(svg){transform:scaleX(-1)}';var m=undefined&&undefined.__rest||function(t,i){var o={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0)o[e]=t[e];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var a=0,e=Object.getOwnPropertySymbols(t);a<e.length;a++){if(i.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(t,e[a]))o[e[a]]=t[e[a]]}return o};let y=0;const w=class{constructor(e){t(this,e);this.icBlur=i(this,"icBlur",7);this.icFileSelection=i(this,"icFileSelection",7);this.icFocus=i(this,"icFocus",7);this.buttonIdNum=y++;this.hasTooltip=false;this.inheritedAttributes={};this.describedByEl=null;this.describedById=null;this.mutationObserver=null;this.hostMutationObserver=null;this.setViewBox=()=>{let t;if(this.hasLeftIconSlot()){t=this.el.querySelector(`[slot="left-icon"]`)}else if(this.hasRightIconSlot()){t=this.el.querySelector(`[slot="right-icon"]`)}else{t=null}return t};this.handleClick=()=>{if((this.el.type==="submit"||this.el.type==="reset")&&!!this.el.closest("FORM")){this.handleHiddenFormButtonClick(this.el.closest("FORM"))}};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=()=>{this.icBlur.emit()};this.loadingWidth=()=>{if(this.loading){this.el.style.setProperty("--min-width",`${this.el.getBoundingClientRect().width}px`)}};this.mutationCallback=()=>{this.describedByContent=this.describedByEl.innerText};this.hostMutationCallback=t=>{let i=false;t.forEach((({attributeName:t})=>{const o=this.el.getAttribute(t);if(t==="title")this.title=o;else if(t==="aria-label")this.ariaLabel=o;if(n.includes(t)){this.inheritedAttributes[t]=o;i=true}}));if(i){o(this)}};this.setHasTooltip=()=>{this.hasTooltip=!this.disableTooltip&&(!!this.title||this.variant==="icon")};this.openFileExplorer=()=>{s(this.icFileSelection,this.el,this.multiple,this.fileInputName,this.selectedFiles,this.disabled,this.accept)};this.isTooltipSilent=()=>{if(this.variant==="icon"){if(this.title)return true;else if(this.ariaLabel)return true;else return false}else{return false}};this.ariaLabel=null;this.describedByContent=null;this.title=null;this.accept="*";this.appearance="default";this.ariaControlsId=undefined;this.ariaOwnsId=undefined;this.disabled=false;this.disableTooltip=false;this.download=false;this.dropdown=false;this.dropdownExpanded=false;this.fileUpload=false;this.fileInputName=`ic-button-file-upload-input-${y++}`;this.form=undefined;this.formaction=undefined;this.formenctype=undefined;this.formmethod=undefined;this.formnovalidate=undefined;this.formtarget=undefined;this.fullWidth=false;this.href=undefined;this.hreflang=undefined;this.loading=false;this.multiple=false;this.referrerpolicy=undefined;this.rel=undefined;this.selectedFiles=undefined;this.size="default";this.target=undefined;this.tooltipPlacement="bottom";this.transparentBackground=true;this.type="button";this.variant="primary"}disconnectedCallback(){if(this.mutationObserver!==null&&this.mutationObserver!==undefined){this.mutationObserver.disconnect()}if(this.hostMutationObserver!==null&&this.hostMutationObserver!==undefined){this.hostMutationObserver.disconnect()}}componentWillUpdate(){this.loadingWidth();this.setHasTooltip()}componentWillLoad(){const t=c(this.el,[...n,"title"]);const{title:i,"aria-label":o}=t,e=m(t,["title","aria-label"]);this.title=i;this.ariaLabel=o;this.inheritedAttributes=e;l(this.disabled,this.el);this.el.setAttribute("exportparts","button");const a=this.el.id;this.id=a!==undefined?a:null;this.setHasTooltip();if(!this.hasTooltip){const t=this.inheritedAttributes["aria-describedby"];if(t!==undefined){this.describedById=t;const i=this.el.parentElement.querySelector(`#${t}`);if(i!==undefined&&i!==null){this.describedByContent=i.innerText;this.describedByEl=i}}}}componentDidLoad(){this.updateTheme();if(typeof MutationObserver!=="undefined"){if(this.describedById){this.mutationObserver=new MutationObserver(this.mutationCallback);this.mutationObserver.observe(this.describedByEl,{characterData:true,childList:true,subtree:true})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true})}}componentWillRender(){var t;(t=this.setViewBox())===null||t===void 0?void 0:t.setAttribute("viewBox","0 0 24 24")}handleHostClick(t){if(this.fileUpload){this.openFileExplorer()}if(this.disabled||this.loading){t.stopImmediatePropagation()}if(this.dropdown){this.dropdownExpanded=!this.dropdownExpanded}}themeChangeHandler(t){const i=t.detail;this.updateTheme(i.mode)}async setFocus(){if(this.buttonEl){this.buttonEl.focus()}}hasIconSlot(){const t=this.el.querySelector(`[slot="icon"]`);return t!==null}hasLeftIconSlot(){const t=this.el.querySelector(`[slot="left-icon"]`);return t!==null}hasTopIconSlot(){const t=this.el.querySelector(`[slot="top-icon"]`);return t!==null}hasRightIconSlot(){const t=this.el.querySelector(`[slot="right-icon"]`);return t!==null}handleHiddenFormButtonClick(t){const i=document.createElement("button");i.setAttribute("type",this.el.type);i.style.display="none";t.appendChild(i);i.click();i.remove()}updateTheme(t=null){const i=h(this.el,t||null);if(i!==p.Default){this.appearance=i}}render(){const t=this.href&&"a"||"button";const{title:i,ariaLabel:o,inheritedAttributes:r}=this;const n=t==="button"?{type:this.type,disabled:this.disabled,form:this.form,formaction:this.formaction,formenctype:this.formenctype,formmethod:this.formmethod,formnovalidate:this.formnovalidate,formtarget:this.formtarget}:{download:this.download!==false?this.download:null,href:this.href,rel:this.rel,target:this.target,referrerpolicy:this.referrerpolicy,hreflang:this.hreflang};let s=null;let c=null;if(this.hasTooltip){c=this.id!==null?`ic-button-with-tooltip-${this.id}`:`ic-button-with-tooltip-${this.buttonIdNum}`;s=this.variant==="icon"&&!!o?null:`ic-tooltip-${c}`}else{s=this.describedById}const l=()=>e(t,Object.assign({class:"button","aria-disabled":this.loading||this.disabled?"true":null,"aria-label":this.loading?"Loading":o},n,r,{onFocus:this.onFocus,onBlur:this.onBlur,ref:t=>this.buttonEl=t,"aria-describedby":s,part:"button"}),this.hasIconSlot()&&!this.loading&&e("div",{class:"icon-container"},e("slot",{name:"icon"})),this.hasLeftIconSlot()&&!this.loading&&e("div",{class:"icon-container"},e("slot",{name:"left-icon"})),this.hasTopIconSlot()&&!this.hasLeftIconSlot()&&!this.hasRightIconSlot()&&!this.loading&&e("div",{class:"icon-container"},e("slot",{name:"top-icon"})),this.loading?e("div",{class:"loading-container"},e("ic-loading-indicator",{type:"linear",appearance:this.variant==="primary"||this.variant==="destructive"||this.appearance===p.Dark||this.appearance===p.Light?"light":"dark"})):e("slot",null),this.hasRightIconSlot()&&!this.loading&&!this.dropdown&&e("div",{class:{"icon-container":true,"right-icon":true}},e("slot",{name:"right-icon"})),this.dropdown&&!this.loading&&this.variant!=="icon"&&this.variant!=="destructive"&&e("span",{class:{["arrow-dropdown"]:!this.dropdownExpanded,["dropdown-expanded"]:this.dropdownExpanded},innerHTML:f}));return e(a,{class:{["disabled"]:this.disabled&&!this.loading,[`button-variant-${this.variant}`]:true,[`button-size-${this.size}`]:true,["loading"]:this.loading,["dark"]:this.appearance===p.Dark,["light"]:this.appearance===p.Light,["full-width"]:this.fullWidth,["with-badge"]:d(this.el,"badge"),["dropdown-no-icon"]:this.dropdown&&!d(this.el,"icon")&&!d(this.el,"left-icon"),["top-icon"]:d(this.el,"top-icon"),["white-background"]:this.variant==="secondary"&&!this.transparentBackground&&this.appearance!=="light"},onClick:this.handleClick,"aria-owns":this.ariaOwnsId,"aria-controls":this.ariaControlsId,"aria-expanded":this.dropdown&&`${this.dropdownExpanded}`},this.hasTooltip&&e("ic-tooltip",{id:s,label:i||o,target:c,placement:this.tooltipPlacement,silent:this.isTooltipSilent()},e(l,null)),d(this.el,"badge")&&e("slot",{name:"badge"}),!this.hasTooltip&&e(l,null),this.describedByContent&&e("span",{id:s,class:"ic-button-describedby"},this.describedByContent))}static get delegatesFocus(){return true}get el(){return r(this)}};w.style=g;const x='/*! 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:block;--linear-border-radius:0.25rem;--inner-color:var(--ic-action-default);--outer-color:var(--ic-architectural-100);--label-color:var(--ic-color-primary-text);--margin:none;--linear-line-height:var(--ic-space-xs)}:host(.light){--inner-color:var(--ic-architectural-white);--outer-color:var(--ic-architectural-800);--label-color:var(--ic-architectural-white)}.ic-loading-container{display:flex;flex-direction:column;justify-content:center;align-items:center}:host([size="small"]){--circular-diameter:2.5rem;--linear-line-height:var(--ic-space-xxs)}:host([size="default"]){--circular-diameter:5rem}:host([size="large"]){--circular-diameter:7.5rem}:host([size="icon"]){display:inline-block;--margin:var(--ic-space-xxxs);--circular-diameter:1.25rem}:host(.label){--margin:0 0 var(--ic-space-xs) 0}.ic-loading-label{white-space:nowrap;color:var(--label-color);margin-left:var(--label-margin-left)}.ic-loading-circular-outer{height:var(--circular-diameter);width:var(--circular-diameter)}.ic-loading-circular-outer.indeterminate{animation:circular-animation 1s linear;animation-iteration-count:infinite}@keyframes circular-animation{100%{transform:rotate(360deg)}}.ic-loading-circular-outer,.ic-loading-linear-outer{margin:var(--margin)}.ic-loading-linear-outer{background-color:var(--outer-color);height:var(--linear-line-height);width:100%;border-radius:var(--linear-border-radius);overflow:hidden}.ic-loading-linear-inner{position:relative;height:100%;background-color:var(--inner-color);border-radius:var(--linear-border-radius)}.indeterminate>.ic-loading-linear-inner{animation:linear-animation 2s infinite}.determinate>.ic-loading-linear-inner{transition:width 0.5s;width:var(--linear-width)}:host(.full-width){--linear-border-radius:none}@keyframes linear-animation{0%{width:0%;left:-1%}25%{width:0%;left:-1%}50%{width:101%;left:-1%}75%{width:0%;left:101%}100%{width:0%;left:101%}}.ic-loading-circular-svg{position:relative;width:100%;height:100%;transform:rotate(-90deg)}.ic-loading-circular-svg circle{width:100%;height:100%;fill:none;stroke:var(--outer-color);stroke-width:var(--circular-line-width);stroke-linecap:round}.ic-loading-circular-svg circle:nth-child(2){--circular-indeterminate:calc(\n (0.25 * var(--stroke-dasharray)) - var(--stroke-dasharray)\n );stroke-dasharray:var(--stroke-dasharray), var(--stroke-dasharray);stroke-dashoffset:var(--stroke-dashoffset, var(--circular-indeterminate));stroke:var(--compact-step-inner-color, var(--inner-color))}:host(.inner-label) .ic-loading-circular-inner{display:grid}:host(.inner-label) .ic-loading-circular-svg,.inner-text{grid-column:1;grid-row:1}:host(.not-required.compact-step-progress-indicator) .ic-loading-circular-svg circle:nth-child(2){stroke:var(--ic-architectural-300)}.inner-text{display:flex;align-items:center;justify-content:center;width:var(--ic-space-lg);height:inherit;overflow:hidden;margin:auto;color:var(--ic-status-info)}:host(.not-required.compact-step-progress-indicator) .inner-text{color:var(--ic-color-tertiary-text)}@media (forced-colors: active){.indeterminate>.ic-loading-circular-inner{forced-color-adjust:none}.ic-loading-linear-outer{border:var(--ic-hc-border)}.ic-loading-linear-inner{background-color:canvastext}.ic-loading-circular-svg circle{stroke:Background}.ic-loading-circular-svg circle:nth-child(2){stroke:canvastext}:host(.not-required.compact-step-progress-indicator) .ic-loading-circular-svg circle:nth-child(2){stroke:GrayText}}';const k=class{constructor(i){t(this,i);this.updateCircularProgressMeter=()=>{if(!this.indeterminate){this.circularMeter.style.setProperty("--progress-value",String(this.progress))}};this.getLabel=(t,i)=>new Promise((()=>{this.interval=setInterval((()=>{if(t<this.labelList.length-1){t++}else{t=0}i(this.labelList[t])}),this.labelDuration)}));this.getLabelVariant=()=>{var t;let i="h4";const o=(t=this.outerElement)===null||t===void 0?void 0:t.offsetWidth;if(this.size==="small"||this.type==="circular"&&o<60){i="label"}else if(this.size==="large"||this.type==="circular"&&o>=120){i="h2"}return i};this.setCircleLineWidth=()=>{const{offsetWidth:t}=this.outerElement;const i=this.el.classList.contains("compact-step-progress-indicator")?40:0;const o=this.el.classList.contains("toast-dismiss-timer")?20:0;if(t||i||o){this.circularLineWidth=(i||o||t)*.1;this.circularDiameter=i||o||t;this.outerElement.style.setProperty("--circular-line-width",`${this.circularLineWidth}px`)}};this.setLinearDeterminateWidth=()=>{if(!this.innerElement)return;const t=Math.min(this.max,Math.max(this.min,this.progress));const i=(t-this.min)/(this.max-this.min);this.showSecond=i>.5;if(this.showSecond){this.innerElement.classList.remove("clip")}else{this.innerElement.classList.add("clip")}this.innerElement.style.setProperty("--linear-width",`${i*100}%`)};this.calcOuterClass=()=>{let t=`ic-loading-${this.type}-outer`;t+=this.indeterminate?" indeterminate":" determinate";return t};this.updateLabel=()=>{if(u(this.label)){this.labelList=this.label.split("/");const t=0;this.indicatorLabel=this.labelList[t];if(this.labelList.length>1){this.getLabel(t,(t=>{this.indicatorLabel=t}))}}};this.setCircleXY=()=>{if(this.circularDiameter>0){const t=this.circularDiameter/2;const i=t;const o=t;const e=t-this.circularLineWidth/2;this.setDashSteps(e);return{x:i,y:o,r:e}}return{x:0,y:0,r:0}};this.setDashSteps=t=>{const i=2*Math.PI*t;const o=Math.min(Math.max(this.progress,this.min),this.max);const e=-1-(o-this.min)/(this.max-this.min);this.circularMeter.style.setProperty("--stroke-dasharray",`${i}px`);if(!this.indeterminate){this.circularMeter.style.setProperty("--circular-steps-max",String(this.max));this.circularMeter.style.setProperty("--stroke-dashoffset",`${e*i}px`)}};this.circularDiameter=undefined;this.circularLineWidth=undefined;this.indeterminate=undefined;this.indicatorLabel=undefined;this.showSecond=false;this.appearance="dark";this.description="Loading";this.fullWidth=false;this.innerLabel=undefined;this.labelDuration=8e3;this.max=100;this.min=0;this.size="default";this.type="circular";this.label=undefined;this.progress=undefined}watchPropHandler(){this.updateLabel()}watchProgressHandler(){if(this.type==="circular"){this.updateCircularProgressMeter()}}disconnectedCallback(){clearInterval(this.interval)}componentWillLoad(){this.indeterminate=this.progress===undefined;this.updateLabel();this.el.setAttribute("exportparts","ic-loading-container")}componentDidLoad(){if(this.type==="circular"){this.setCircleLineWidth();this.circularMeter=this.el.shadowRoot.querySelector(".ic-loading-circular-svg circle:nth-child(2)");this.updateCircularProgressMeter()}if(Number(this.progress)>=0&&this.type==="linear"){this.setLinearDeterminateWidth()}}componentWillUpdate(){this.indeterminate=this.progress===undefined}componentDidUpdate(){if(Number(this.progress)>=0&&this.type==="linear"){this.setLinearDeterminateWidth()}}render(){const{appearance:t,label:i,description:o,size:r,fullWidth:n,innerLabel:s}=this;const{x:c,y:l,r:h}=this.setCircleXY();return e(a,{class:{["light"]:t===p.Light,["label"]:!!i,["full-width"]:n,["inner-label"]:!!s}},e("div",{class:"ic-loading-container",part:"ic-loading-container"},e("div",{ref:t=>this.outerElement=t,class:this.calcOuterClass(),role:"progressbar","aria-labelledby":this.label&&this.size!=="icon"&&"ic-loading-label","aria-label":o,"aria-valuenow":this.progress,"aria-valuemin":this.min,"aria-valuemax":this.max},e("div",{ref:t=>this.innerElement=t,class:`ic-loading-${this.type}-inner`},this.innerLabel&&this.innerLabel!==undefined&&this.size==="small"&&e("ic-typography",{variant:"subtitle-small",class:"inner-text"},this.innerLabel),this.type==="circular"&&e("svg",{class:"ic-loading-circular-svg",viewBox:`0 0 ${this.circularDiameter||0} ${this.circularDiameter||0}`},e("circle",{cx:`${c}`,cy:`${l}`,r:`${h}`}),e("circle",{cx:`${c}`,cy:`${l}`,r:`${h}`})))),i&&r!=="icon"&&e("ic-typography",{id:"ic-loading-label",class:"ic-loading-label",role:"status",variant:this.getLabelVariant()},e("p",null,this.indicatorLabel))))}get el(){return r(this)}static get watchers(){return{label:["watchPropHandler"],progress:["watchProgressHandler"]}}};k.style=x;const z='/*! 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(.ic-tooltip) .ic-tooltip-container{background-color:var(--ic-architectural-800);color:#ffff;text-align:center;padding:var(--ic-space-xxxs) var(--ic-space-xs);border-radius:var(--ic-border-radius);border:var(--ic-border-width) solid var(--ic-architectural-40);position:absolute;max-width:20rem;display:none;z-index:var(--ic-z-index-tooltip);box-shadow:var(--ic-elevation-overlay)}:host(.tooltip-navigation-item:not(.tooltip-navigation-item-side-nav-collapsed)) .ic-tooltip-container,:host(.tooltip-disabled) .ic-tooltip-container{display:none !important}:host(.tooltip-long-label-navigation-item-side-nav-expanded) .ic-tooltip-container[data-show]{display:block !important}:host(.ic-tooltip) .ic-tooltip-arrow,:host(.ic-tooltip) .ic-tooltip-arrow::before{position:absolute;background:inherit}:host(.ic-tooltip) .ic-tooltip-arrow{visibility:hidden;width:var(--ic-space-md);height:var(--ic-space-md)}:host(.ic-tooltip) .ic-tooltip-arrow::before{visibility:visible;content:"";border:var(--ic-border-width) solid var(--ic-architectural-40);width:100%;height:100%}:host(.ic-tooltip) .ic-tooltip-container[data-show]{display:block}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="top"]>.ic-tooltip-arrow{height:var(--ic-space-xxxs)}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="top"]>.ic-tooltip-arrow::before{border-radius:0 0 var(--ic-border-radius) var(--ic-border-radius);left:0;top:var(--ic-space-xxxs);border-top:0;transform:translateX(var(--tooltip-arrow-translate))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="bottom"]>.ic-tooltip-arrow{top:calc(-1 * var(--ic-space-xxs));height:var(--ic-space-xxxs)}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="bottom"]>.ic-tooltip-arrow::before{border-radius:var(--ic-border-radius) var(--ic-border-radius) 0 0;left:0;top:var(--ic-space-1px);border-bottom:0;transform:translateX(var(--tooltip-arrow-translate))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="left"]>.ic-tooltip-arrow{width:var(--ic-space-xxxs);right:calc(-1 * var(--ic-space-1px))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="left"]>.ic-tooltip-arrow::before{border-radius:0 var(--ic-border-radius) var(--ic-border-radius) 0;border-left:0;top:calc(-1 * var(--ic-space-1px))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="right"]>.ic-tooltip-arrow{width:var(--ic-space-xxxs);left:calc(-1 * var(--ic-space-xxs))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="right"]>.ic-tooltip-arrow::before{border-radius:var(--ic-border-radius) 0 0 var(--ic-border-radius);border-right:0;top:calc(-1 * var(--ic-space-1px))}:host(.on-dialog) .ic-tooltip-container{transform:translate(\n var(--tooltip-translate-x),\n var(--tooltip-translate-y)\n ) !important}@media screen and (max-width: 576px){:host(.ic-tooltip) .ic-tooltip-container{max-width:18.875rem}}@media (forced-colors: active){:host(.ic-tooltip) .ic-tooltip-container,:host(.ic-tooltip) .ic-tooltip-arrow::before{border:var(--ic-hc-border)}}';const $=class{constructor(i){t(this,i);this.delayedHideEvents=["mouseleave"];this.dialogOverflow=false;this.instantHideEvents=["focusout"];this.mouseOverTool=false;this.persistTooltip=false;this.onDialog=false;this.showEvents=[!this.disableHover&&"mouseenter",!this.disableHover&&"focusin",!this.disableClick&&"click"];this.getTooltipTranslate=t=>{const i=this.el.children[0].getBoundingClientRect();let o;let e;switch(this.placement){case"bottom":o=i.left-t.left-.5*i.width;e=i.bottom-t.top;break;case"bottom-start":o=i.left-t.left;e=i.bottom-t.top;break;case"bottom-end":o=i.right-t.right;e=i.bottom-t.top;break;case"top":o=i.left-t.left-.5*i.width;e=i.top-t.bottom;break;case"top-start":o=i.left-t.left;e=i.top-t.bottom;break;case"top-end":o=i.right-t.right;e=i.top-t.bottom;break;case"left":case"left-start":o=i.right-t.right-i.width;e=i.bottom-t.top-i.height;break;case"left-end":o=i.right-t.right-i.width;e=i.top-t.bottom+i.height;break;case"right":case"right-start":o=i.left-t.left+i.width;e=i.bottom-t.top-i.height;break;case"right-end":o=i.left-t.left+i.width;e=i.top-t.bottom+i.height;break}if(this.dialogOverflow&&o<0){if(this.placement.includes("top")||this.placement.includes("bottom")){this.toolTip.style.setProperty("--tooltip-arrow-translate",`${o}px`);o=i.left-t.left}if(this.placement.includes("left")){this.placement="right";o=i.left-t.left+i.width}}this.toolTip.style.setProperty("--tooltip-translate-x",`${o}px`);this.toolTip.style.setProperty("--tooltip-translate-y",`${e}px`)};this.show=()=>{if(this.label){this.toolTip.setAttribute("data-show","");if(this.onDialog){this.el.classList.add("on-dialog");const t=this.icDialogEl.shadowRoot.querySelector("dialog").getBoundingClientRect();this.getTooltipTranslate(t)}this.popperInstance=v(this.el,this.toolTip,{placement:this.placement,modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"arrow",options:{element:this.arrow}},{name:"eventListeners",options:{scroll:false,resize:false}}]})}else{console.warn(`Tooltip can't display without prop 'label' set`)}};this.hide=()=>{this.toolTip.removeAttribute("data-show");this.persistTooltip=false};this.checkCloseTooltip=()=>{setTimeout((()=>{if(!this.mouseOverTool&&!this.persistTooltip){this.hide()}}),100)};this.mouseEnterTooltip=()=>{this.mouseOverTool=true};this.mouseLeaveTooltip=()=>{this.mouseOverTool=false;this.checkCloseTooltip()};this.handleKeyDown=t=>{if(t.key==="Escape"&&!this.persistTooltip){this.hide()}};this.manageEventListeners=t=>{const i=t==="add"?"addEventListener":"removeEventListener";this.showEvents.forEach((t=>{this.el[i](t,this.show);if(this.toolTip!==undefined){this.toolTip[i](t,this.mouseEnterTooltip)}}));if(!this.persistTooltip){this.instantHideEvents.forEach((t=>{this.el[i](t,this.hide)}))}this.delayedHideEvents.forEach((t=>{this.el[i](t,this.checkCloseTooltip);if(this.toolTip!==undefined){this.toolTip[i](t,this.mouseLeaveTooltip)}}));document[i]("keydown",this.handleKeyDown)};this.disableClick=false;this.disableHover=false;this.maxLines=undefined;this.placement="bottom";this.silent=false;this.target=undefined;this.label=undefined}disconnectedCallback(){this.manageEventListeners("remove");if(this.popperInstance!==undefined){this.popperInstance.destroy()}}componentDidLoad(){var t;this.manageEventListeners("add");this.icDialogEl=this.el.closest("ic-dialog");this.dialogOverflow=((t=this.icDialogEl)===null||t===void 0?void 0:t.getAttribute("data-overflow"))==="true";this.onDialog=this.icDialogEl!==null;b([{prop:this.label,propName:"label"}],"Tooltip")}componentDidRender(){const t=this.el.shadowRoot.querySelector(".ic-tooltip-container > ic-typography");this.maxLines>0&&t.setAttribute("style",`--truncation-max-lines: ${this.maxLines}`)}async displayTooltip(t,i){this.persistTooltip=i;t?this.show():this.hide()}render(){const{label:t,maxLines:i,silent:o}=this;return e(a,{class:{"ic-tooltip":true}},e("div",{ref:t=>this.toolTip=t,role:"tooltip",class:"ic-tooltip-container","aria-hidden":`${o}`},e("ic-typography",{maxLines:i,variant:"caption"},t),e("div",{ref:t=>this.arrow=t,class:"ic-tooltip-arrow"})),e("slot",null))}get el(){return r(this)}};$.style=z;export{w as ic_button,k as ic_loading_indicator,$ as ic_tooltip};
2
- //# sourceMappingURL=p-56c41889.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icButtonCss","buttonIds","Button","this","buttonIdNum","hasTooltip","inheritedAttributes","describedByEl","describedById","mutationObserver","hostMutationObserver","setViewBox","iconEl","hasLeftIconSlot","el","querySelector","hasRightIconSlot","handleClick","type","closest","handleHiddenFormButtonClick","onFocus","icFocus","emit","onBlur","icBlur","loadingWidth","loading","style","setProperty","getBoundingClientRect","width","mutationCallback","describedByContent","innerText","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","attribute","getAttribute","title","ariaLabel","IC_INHERITED_ARIA","includes","forceUpdate","setHasTooltip","disableTooltip","variant","openFileExplorer","renderFileHiddenInput","icFileSelection","multiple","fileInputName","selectedFiles","disabled","accept","isTooltipSilent","disconnectedCallback","undefined","disconnect","componentWillUpdate","componentWillLoad","allInheritedAttributes","inheritAttributes","restInheritedAttributes","__rest","removeDisabledFalse","setAttribute","id","parentElement","componentDidLoad","updateTheme","MutationObserver","observe","characterData","childList","subtree","attributes","componentWillRender","_a","handleHostClick","event","fileUpload","stopImmediatePropagation","dropdown","dropdownExpanded","themeChangeHandler","ev","theme","detail","mode","setFocus","buttonEl","focus","hasIconSlot","hasTopIconSlot","form","hiddenFormButton","document","createElement","display","appendChild","click","remove","newTheme","foregroundColor","getThemeFromContext","IcThemeForegroundEnum","Default","appearance","render","TagType","href","buttonAttrs","formaction","formenctype","formmethod","formnovalidate","formtarget","download","rel","target","referrerpolicy","hreflang","describedBy","buttonId","ButtonContent","h","Object","assign","class","ref","part","name","Dark","Light","innerHTML","arrowDropdown","Host","size","fullWidth","isSlotUsed","transparentBackground","onClick","ariaOwnsId","ariaControlsId","label","placement","tooltipPlacement","silent","icLoadingIndicatorCss","LoadingIndicator","updateCircularProgressMeter","indeterminate","circularMeter","String","progress","getLabel","labelIndex","setLabel","Promise","interval","setInterval","labelList","length","labelDuration","getLabelVariant","outerElement","offsetWidth","setCircleLineWidth","compactStepCircularLineWidth","classList","contains","toastDismissTimerCircularLineWidth","circularLineWidth","circularDiameter","setLinearDeterminateWidth","innerElement","Math","min","max","proportion","showSecond","add","calcOuterClass","cls","updateLabel","isPropDefined","split","indicatorLabel","setCircleXY","r","x","y","nextRadius","setDashSteps","radius","dashArray","PI","watchPropHandler","watchProgressHandler","clearInterval","shadowRoot","Number","componentDidUpdate","description","innerLabel","role","viewBox","cx","cy","icTooltipCss","Tooltip","delayedHideEvents","dialogOverflow","instantHideEvents","mouseOverTool","persistTooltip","onDialog","showEvents","disableHover","disableClick","getTooltipTranslate","dialogEl","child","children","tooltipX","tooltipY","left","bottom","top","right","height","toolTip","show","icDialogEl","popperInstance","createPopper","modifiers","options","offset","element","arrow","scroll","resize","console","warn","hide","removeAttribute","checkCloseTooltip","setTimeout","mouseEnterTooltip","mouseLeaveTooltip","handleKeyDown","key","manageEventListeners","action","method","destroy","onComponentRequiredPropUndefined","prop","propName","componentDidRender","typographyEl","maxLines","displayTooltip"],"sources":["src/components/ic-button/ic-button.css?tag=ic-button&encapsulation=shadow","src/components/ic-button/ic-button.tsx","src/components/ic-loading-indicator/ic-loading-indicator.css?tag=ic-loading-indicator&encapsulation=shadow","src/components/ic-loading-indicator/ic-loading-indicator.tsx","src/components/ic-tooltip/ic-tooltip.css?tag=ic-tooltip&encapsulation=shadow","src/components/ic-tooltip/ic-tooltip.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 position: relative;\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 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: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(.white-background) .button {\n --button-default-background-hover: var(--ic-action-default-bg-hover-no-alpha);\n --button-default-background-active: var(\n --ic-action-default-bg-active-no-alpha\n );\n\n background-color: var(--ic-architectural-white);\n}\n\n:host(.white-background.dark) .button {\n --button-default-background-hover: var(--ic-action-dark-bg-hover-no-alpha);\n --button-default-background-active: var(--ic-action-dark-bg-active-no-alpha);\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(.top-icon) .button {\n flex-direction: column;\n --height: fit-content;\n}\n\n:host(.top-icon) .button .icon-container {\n margin-right: 0;\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:hover:focus {\n background-color: var(--button-default-hover);\n border-color: var(--button-default-hover);\n}\n\n:host(.button-variant-primary:not(.light)) .button:hover:focus {\n color: var(--ic-architectural-white);\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) .button:active:focus {\n background-color: var(--button-default-active);\n}\n\n:host(.button-variant-primary) .button:active {\n background-color: var(--button-default-active);\n}\n\n:host(.button-variant-primary:not(.light)) .button:active {\n color: var(--ic-architectural-white);\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-border-width) solid var(--button-default);\n color: var(--button-default);\n}\n\n:host(.button-variant-secondary) .button:hover:not(:focus),\n:host(.button-variant-secondary) .button:hover: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:host(.button-variant-secondary) .button:active:focus,\n:host(.button-variant-secondary) .button:active {\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:host(.button-variant-tertiary) .button:hover: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) .button:active:focus,\n:host(.button-variant-tertiary) .button:active,\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 margin: var(--ic-space-1px) 0;\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:host(.button-variant-icon) .button:hover: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:host(.button-variant-destructive) .button:hover: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) .button:active: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 margin-right: var(--ic-space-xs);\n}\n\ndiv.right-icon {\n margin-right: auto;\n margin-left: var(--ic-space-xs);\n}\n\n::slotted(:not(ic-badge)) {\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 height: var(--height);\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/** Dropdown **/\n:host .arrow-dropdown {\n margin-top: auto;\n}\n\n:host .dropdown-expanded {\n transform: rotate(180deg);\n margin-bottom: var(--ic-space-xxxs);\n}\n\n:host(.dropdown-no-icon) .button {\n padding-right: var(--ic-space-xs);\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 forceUpdate,\n h,\n} from \"@stencil/core\";\n\nimport {\n getThemeFromContext,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcSizes,\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot icon - Deprecated. This slot should not be used anymore. Use left-icon or right-icon slot instead.\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n * @slot top-icon - Content will be placed above the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip: boolean = false;\n private id: string;\n private inheritedAttributes: { [k: string]: unknown } = {};\n private describedByEl: HTMLElement = null;\n private describedById: string = null;\n private mutationObserver: MutationObserver = null;\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel: string = null;\n @State() describedByContent: string = null;\n @State() title: string = null;\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept?: string = \"*\";\n\n /**\n * The appearance of the button, e.g. dark, light, or the default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaControlsId: string | boolean;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwnsId: string | boolean;\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * If `true`, the button will show a dropdown icon.\n */\n @Prop() dropdown?: boolean = false;\n\n /**\n * If `true`, the aria-expanded value will be set to true. This is only applied if the dropdown prop is also true.\n */\n @Prop({ mutable: true, reflect: true }) dropdownExpanded?: boolean = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload?: boolean = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName: string = `ic-button-file-upload-input-${buttonIds++}`;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement?: IcButtonTooltipPlacement = \"bottom\";\n\n /**\n * If `true`, the secondary variant of button will have a transparent background rather than white.\n */\n @Prop() transparentBackground?: boolean = true;\n\n /**\n * The type of the button.\n */\n @Prop() type?: IcButtonTypes = \"button\";\n\n /**\n * The variant of the button to be displayed.\n */\n @Prop() variant?: IcButtonVariants = \"primary\";\n\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * If `fileUpload` is set to `true`, this will be emitted when a file is selected in the native explorer.\n */\n @Event() icFileSelection!: EventEmitter<FileList>;\n\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.mutationObserver !== null && this.mutationObserver !== undefined) {\n this.mutationObserver.disconnect();\n }\n if (\n this.hostMutationObserver !== null &&\n this.hostMutationObserver !== undefined\n ) {\n this.hostMutationObserver.disconnect();\n }\n }\n\n componentWillUpdate(): void {\n this.loadingWidth();\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const allInheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n ]);\n\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = allInheritedAttributes;\n\n this.title = title as string;\n this.ariaLabel = ariaLabel as string;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n const id = this.el.id;\n this.id = id !== undefined ? id : null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\n \"aria-describedby\"\n ] as string;\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector(\n `#${describedById}`\n ) as HTMLElement;\n if (el !== undefined && el !== null) {\n this.describedByContent = el.innerText;\n this.describedByEl = el;\n }\n }\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (typeof MutationObserver !== \"undefined\") {\n if (this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedByEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n }\n\n componentWillRender(): void {\n this.setViewBox()?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.fileUpload) {\n this.openFileExplorer();\n }\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n if (this.dropdown) {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n\n private hasIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n return iconEl !== null;\n }\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"left-icon\"]`);\n return iconEl !== null;\n }\n\n private hasTopIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"top-icon\"]`);\n return iconEl !== null;\n }\n\n private hasRightIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"right-icon\"]`);\n return iconEl !== null;\n }\n\n private setViewBox = () => {\n let iconEl;\n if (this.hasLeftIconSlot()) {\n iconEl = this.el.querySelector(`[slot=\"left-icon\"]`);\n } else if (this.hasRightIconSlot()) {\n iconEl = this.el.querySelector(`[slot=\"right-icon\"]`);\n } else {\n iconEl = null;\n }\n return iconEl;\n };\n\n private handleHiddenFormButtonClick(form: HTMLFormElement): void {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !!this.el.closest(\"FORM\")\n ) {\n this.handleHiddenFormButtonClick(this.el.closest(\"FORM\"));\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private loadingWidth = () => {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\n }\n };\n\n // triggered when text content of sibling element in light DOM changes\n private mutationCallback = (): void => {\n this.describedByContent = this.describedByEl.innerText;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n const attribute = this.el.getAttribute(attributeName);\n if (attributeName === \"title\") this.title = attribute;\n else if (attributeName === \"aria-label\") this.ariaLabel = attribute;\n\n if (IC_INHERITED_ARIA.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = (): void => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || this.variant === \"icon\");\n };\n\n // file explorer is only opened if the property fileUpload is set to 'true'\n private openFileExplorer = () => {\n renderFileHiddenInput(\n this.icFileSelection,\n this.el,\n this.multiple,\n this.fileInputName,\n this.selectedFiles,\n this.disabled,\n this.accept\n );\n };\n\n private isTooltipSilent = (): boolean => {\n if (this.variant === \"icon\") {\n if (this.title) return true;\n else if (this.ariaLabel) return true;\n else return false;\n } else {\n return false;\n }\n };\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const { title, ariaLabel, inheritedAttributes } = this;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n\n let describedBy: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedBy =\n this.variant === \"icon\" && !!ariaLabel\n ? null\n : `ic-tooltip-${buttonId}`;\n } else {\n describedBy = this.describedById;\n }\n\n const ButtonContent = () => {\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedBy}\n part=\"button\"\n >\n {this.hasIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.hasLeftIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n {this.hasTopIconSlot() &&\n !this.hasLeftIconSlot() &&\n !this.hasRightIconSlot() &&\n !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"top-icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n appearance={\n this.variant === \"primary\" ||\n this.variant === \"destructive\" ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light\n ? \"light\"\n : \"dark\"\n }\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n {this.hasRightIconSlot() && !this.loading && !this.dropdown && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )}\n {this.dropdown &&\n !this.loading &&\n this.variant !== \"icon\" &&\n this.variant !== \"destructive\" && (\n <span\n class={{\n [\"arrow-dropdown\"]: !this.dropdownExpanded,\n [\"dropdown-expanded\"]: this.dropdownExpanded,\n }}\n innerHTML={arrowDropdown}\n />\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled && !this.loading,\n [`button-variant-${this.variant}`]: true,\n [`button-size-${this.size}`]: true,\n [\"loading\"]: this.loading,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"full-width\"]: this.fullWidth,\n [\"with-badge\"]: isSlotUsed(this.el, \"badge\"),\n [\"dropdown-no-icon\"]:\n this.dropdown &&\n !isSlotUsed(this.el, \"icon\") &&\n !isSlotUsed(this.el, \"left-icon\"),\n [\"top-icon\"]: isSlotUsed(this.el, \"top-icon\"),\n [\"white-background\"]:\n this.variant === \"secondary\" &&\n !this.transparentBackground &&\n this.appearance !== \"light\",\n }}\n onClick={this.handleClick}\n aria-owns={this.ariaOwnsId}\n aria-controls={this.ariaControlsId}\n aria-expanded={this.dropdown && `${this.dropdownExpanded}`}\n >\n {this.hasTooltip && (\n <ic-tooltip\n id={describedBy}\n label={title || ariaLabel}\n target={buttonId}\n placement={this.tooltipPlacement}\n silent={this.isTooltipSilent()}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!this.hasTooltip && <ButtonContent />}\n {this.describedByContent && (\n <span id={describedBy} class=\"ic-button-describedby\">\n {this.describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n","@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --circular-diameter: Diameter of the circular-indicator\n */\n\n display: block;\n\n --linear-border-radius: 0.25rem;\n --inner-color: var(--ic-action-default);\n --outer-color: var(--ic-architectural-100);\n --label-color: var(--ic-color-primary-text);\n --margin: none;\n --linear-line-height: var(--ic-space-xs);\n}\n\n:host(.light) {\n --inner-color: var(--ic-architectural-white);\n --outer-color: var(--ic-architectural-800);\n --label-color: var(--ic-architectural-white);\n}\n\n.ic-loading-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n:host([size=\"small\"]) {\n --circular-diameter: 2.5rem;\n --linear-line-height: var(--ic-space-xxs);\n}\n\n:host([size=\"default\"]) {\n --circular-diameter: 5rem;\n}\n\n:host([size=\"large\"]) {\n --circular-diameter: 7.5rem;\n}\n\n:host([size=\"icon\"]) {\n display: inline-block;\n\n --margin: var(--ic-space-xxxs);\n --circular-diameter: 1.25rem;\n}\n\n:host(.label) {\n --margin: 0 0 var(--ic-space-xs) 0;\n}\n\n.ic-loading-label {\n white-space: nowrap;\n color: var(--label-color);\n margin-left: var(--label-margin-left);\n}\n\n.ic-loading-circular-outer {\n height: var(--circular-diameter);\n width: var(--circular-diameter);\n}\n\n.ic-loading-circular-outer.indeterminate {\n animation: circular-animation 1s linear;\n animation-iteration-count: infinite;\n}\n\n@keyframes circular-animation {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.ic-loading-circular-outer,\n.ic-loading-linear-outer {\n margin: var(--margin);\n}\n\n.ic-loading-linear-outer {\n background-color: var(--outer-color);\n height: var(--linear-line-height);\n width: 100%;\n border-radius: var(--linear-border-radius);\n overflow: hidden;\n}\n\n.ic-loading-linear-inner {\n position: relative;\n height: 100%;\n background-color: var(--inner-color);\n border-radius: var(--linear-border-radius);\n}\n\n.indeterminate > .ic-loading-linear-inner {\n animation: linear-animation 2s infinite;\n}\n\n.determinate > .ic-loading-linear-inner {\n transition: width 0.5s;\n width: var(--linear-width);\n}\n\n:host(.full-width) {\n --linear-border-radius: none;\n}\n\n@keyframes linear-animation {\n 0% {\n width: 0%;\n left: -1%;\n }\n\n 25% {\n width: 0%;\n left: -1%;\n }\n\n 50% {\n width: 101%;\n left: -1%;\n }\n\n 75% {\n width: 0%;\n left: 101%;\n }\n\n 100% {\n width: 0%;\n left: 101%;\n }\n}\n\n.ic-loading-circular-svg {\n position: relative;\n width: 100%;\n height: 100%;\n transform: rotate(-90deg);\n}\n\n.ic-loading-circular-svg circle {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: var(--outer-color);\n stroke-width: var(--circular-line-width);\n stroke-linecap: round;\n}\n\n/* --stroke-dash-array calculated via dashArray method */\n.ic-loading-circular-svg circle:nth-child(2) {\n --circular-indeterminate: calc(\n (0.25 * var(--stroke-dasharray)) - var(--stroke-dasharray)\n );\n\n stroke-dasharray: var(--stroke-dasharray), var(--stroke-dasharray);\n stroke-dashoffset: var(--stroke-dashoffset, var(--circular-indeterminate));\n stroke: var(--compact-step-inner-color, var(--inner-color));\n}\n\n:host(.inner-label) .ic-loading-circular-inner {\n display: grid;\n}\n\n:host(.inner-label) .ic-loading-circular-svg,\n.inner-text {\n grid-column: 1;\n grid-row: 1;\n}\n\n:host(.not-required.compact-step-progress-indicator)\n .ic-loading-circular-svg\n circle:nth-child(2) {\n stroke: var(--ic-architectural-300);\n}\n\n.inner-text {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--ic-space-lg);\n height: inherit;\n overflow: hidden;\n margin: auto;\n color: var(--ic-status-info);\n}\n\n:host(.not-required.compact-step-progress-indicator) .inner-text {\n color: var(--ic-color-tertiary-text);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .indeterminate > .ic-loading-circular-inner {\n forced-color-adjust: none;\n }\n\n .ic-loading-linear-outer {\n border: var(--ic-hc-border);\n }\n\n .ic-loading-linear-inner {\n background-color: canvastext;\n }\n\n .ic-loading-circular-svg circle {\n stroke: Background;\n }\n\n .ic-loading-circular-svg circle:nth-child(2) {\n stroke: canvastext;\n }\n\n :host(.not-required.compact-step-progress-indicator)\n .ic-loading-circular-svg\n circle:nth-child(2) {\n stroke: GrayText;\n }\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from \"@stencil/core\";\nimport {\n IcLoadingCircleXYR,\n IcLoadingSizes,\n IcLoadingTypes,\n} from \"./ic-loading-indicator.types\";\nimport {\n IcThemeForegroundEnum,\n IcThemeForegroundNoDefault,\n} from \"../../utils/types\";\nimport { isPropDefined } from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-loading-indicator\",\n styleUrl: \"ic-loading-indicator.css\",\n shadow: true,\n})\nexport class LoadingIndicator {\n private circularMeter: SVGCircleElement;\n private innerElement?: HTMLDivElement;\n private interval: ReturnType<typeof setInterval>;\n private labelList: string[];\n private outerElement?: HTMLDivElement;\n\n @Element() el: HTMLIcLoadingIndicatorElement;\n\n @State() circularDiameter: number;\n @State() circularLineWidth: number;\n @State() indeterminate: boolean;\n @State() indicatorLabel: string;\n @State() showSecond: boolean = false;\n\n /**\n * The appearance of the loading indicator, e.g. dark or light.\n */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n /**\n * The description that will be set as the aria-label of the loading indicator when not using a visible label.\n */\n @Prop() description?: string = \"Loading\";\n\n /**\n * If `true`, when linear, the full-width variant (i.e. without a border radius) will be displayed.\n */\n @Prop({ reflect: true }) fullWidth?: boolean = false;\n\n /**\n * @internal The step number of a compact step, managed by ic-step.\n */\n @Prop() innerLabel?: number;\n\n /**\n * The time in milliseconds before the label changes.\n */\n @Prop() labelDuration?: number = 8000;\n\n /**\n * The maximum value that the progress value can take.\n * Used to calculate the proportional width of the progress bar.\n */\n @Prop() max?: number = 100;\n\n /**\n * The minimum value that the progress value can take.\n * Used to calculate the proportional width of the progress bar.\n */\n @Prop() min?: number = 0;\n\n /**\n * The size of the loading indicator.\n */\n @Prop({ reflect: true }) size?: IcLoadingSizes = \"default\";\n\n /**\n * The type of indicator, either linear or circular.\n */\n @Prop({ reflect: true }) type?: IcLoadingTypes = \"circular\";\n\n /**\n * The label to be displayed beneath the loading indicator.\n * Display a changing label by separating multiple messages with forward slashes.\n */\n @Prop() label?: string;\n\n @Watch(\"label\")\n watchPropHandler(): void {\n this.updateLabel();\n }\n\n /**\n * The current amount of progress made.\n * If not provided, component acts as an indeterminate loading indicator.\n */\n @Prop() progress?: number;\n\n @Watch(\"progress\")\n watchProgressHandler(): void {\n if (this.type === \"circular\") {\n this.updateCircularProgressMeter();\n }\n }\n\n disconnectedCallback(): void {\n clearInterval(this.interval);\n }\n\n componentWillLoad(): void {\n this.indeterminate = this.progress === undefined;\n this.updateLabel();\n this.el.setAttribute(\"exportparts\", \"ic-loading-container\");\n }\n\n componentDidLoad(): void {\n if (this.type === \"circular\") {\n this.setCircleLineWidth();\n this.circularMeter = this.el.shadowRoot.querySelector(\n \".ic-loading-circular-svg circle:nth-child(2)\"\n );\n this.updateCircularProgressMeter();\n }\n\n if (Number(this.progress) >= 0 && this.type === \"linear\") {\n this.setLinearDeterminateWidth();\n }\n }\n\n componentWillUpdate(): void {\n this.indeterminate = this.progress === undefined;\n }\n\n componentDidUpdate(): void {\n if (Number(this.progress) >= 0 && this.type === \"linear\") {\n this.setLinearDeterminateWidth();\n }\n }\n\n private updateCircularProgressMeter = () => {\n if (!this.indeterminate) {\n this.circularMeter.style.setProperty(\n \"--progress-value\",\n String(this.progress)\n );\n }\n };\n\n private getLabel = (\n labelIndex: number,\n setLabel: (label: string) => void\n ) => {\n return new Promise(() => {\n this.interval = setInterval(() => {\n if (labelIndex < this.labelList.length - 1) {\n labelIndex++;\n } else {\n labelIndex = 0;\n }\n setLabel(this.labelList[labelIndex]);\n }, this.labelDuration);\n });\n };\n\n private getLabelVariant = () => {\n let variant: \"label\" | \"h4\" | \"h2\" = \"h4\";\n const width = this.outerElement?.offsetWidth;\n if (this.size === \"small\" || (this.type === \"circular\" && width < 60)) {\n variant = \"label\";\n } else if (\n this.size === \"large\" ||\n (this.type === \"circular\" && width >= 120)\n ) {\n variant = \"h2\";\n }\n return variant;\n };\n\n // Sets the circular indicator line width - accounting for the circle size being altered using the CSS custom property\n private setCircleLineWidth = () => {\n const { offsetWidth: width } = this.outerElement;\n\n const compactStepCircularLineWidth = this.el.classList.contains(\n \"compact-step-progress-indicator\"\n )\n ? 40\n : 0;\n const toastDismissTimerCircularLineWidth = this.el.classList.contains(\n \"toast-dismiss-timer\"\n )\n ? 20\n : 0;\n\n if (\n width ||\n compactStepCircularLineWidth ||\n toastDismissTimerCircularLineWidth\n ) {\n this.circularLineWidth =\n (compactStepCircularLineWidth ||\n toastDismissTimerCircularLineWidth ||\n width) * 0.1;\n this.circularDiameter =\n compactStepCircularLineWidth ||\n toastDismissTimerCircularLineWidth ||\n width;\n this.outerElement.style.setProperty(\n \"--circular-line-width\",\n `${this.circularLineWidth}px`\n );\n }\n };\n\n private setLinearDeterminateWidth = () => {\n if (!this.innerElement) return;\n // Ensure progress cannot be out of bounds\n\n const progress = Math.min(this.max, Math.max(this.min, this.progress));\n const proportion = (progress - this.min) / (this.max - this.min);\n this.showSecond = proportion > 0.5;\n if (this.showSecond) {\n this.innerElement.classList.remove(\"clip\");\n } else {\n this.innerElement.classList.add(\"clip\");\n }\n this.innerElement.style.setProperty(\n \"--linear-width\",\n `${proportion * 100}%`\n );\n };\n\n private calcOuterClass = (): string => {\n let cls = `ic-loading-${this.type}-outer`;\n cls += this.indeterminate ? \" indeterminate\" : \" determinate\";\n return cls;\n };\n\n private updateLabel = (): void => {\n if (isPropDefined(this.label)) {\n this.labelList = this.label.split(\"/\");\n const labelIndex = 0;\n this.indicatorLabel = this.labelList[labelIndex];\n if (this.labelList.length > 1) {\n this.getLabel(labelIndex, (label) => {\n this.indicatorLabel = label;\n });\n }\n }\n };\n\n private setCircleXY = (): IcLoadingCircleXYR => {\n if (this.circularDiameter > 0) {\n const r = this.circularDiameter / 2;\n const x = r;\n const y = r;\n const nextRadius = r - this.circularLineWidth / 2;\n this.setDashSteps(nextRadius);\n\n return { x, y, r: nextRadius };\n }\n return { x: 0, y: 0, r: 0 };\n };\n\n private setDashSteps = (radius: number) => {\n const dashArray = 2 * Math.PI * radius;\n const progress = Math.min(Math.max(this.progress, this.min), this.max);\n const proportion = -1 - (progress - this.min) / (this.max - this.min);\n\n this.circularMeter.style.setProperty(\n \"--stroke-dasharray\",\n `${dashArray}px`\n );\n\n if (!this.indeterminate) {\n this.circularMeter.style.setProperty(\n \"--circular-steps-max\",\n String(this.max)\n );\n this.circularMeter.style.setProperty(\n \"--stroke-dashoffset\",\n `${proportion * dashArray}px`\n );\n }\n };\n\n render() {\n const { appearance, label, description, size, fullWidth, innerLabel } =\n this;\n const { x, y, r } = this.setCircleXY();\n\n return (\n <Host\n class={{\n [\"light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"label\"]: !!label,\n [\"full-width\"]: fullWidth,\n [\"inner-label\"]: !!innerLabel,\n }}\n >\n <div class=\"ic-loading-container\" part=\"ic-loading-container\">\n <div\n ref={(el) => (this.outerElement = el as HTMLDivElement)}\n class={this.calcOuterClass()}\n role=\"progressbar\"\n aria-labelledby={\n this.label && this.size !== \"icon\" && \"ic-loading-label\"\n }\n aria-label={description}\n aria-valuenow={this.progress}\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n >\n <div\n ref={(el) => (this.innerElement = el as HTMLDivElement)}\n class={`ic-loading-${this.type}-inner`}\n >\n {this.innerLabel &&\n this.innerLabel !== undefined &&\n this.size === \"small\" && (\n <ic-typography variant=\"subtitle-small\" class=\"inner-text\">\n {this.innerLabel}\n </ic-typography>\n )}\n {this.type === \"circular\" && (\n <svg\n class=\"ic-loading-circular-svg\"\n viewBox={`0 0 ${this.circularDiameter || 0} ${\n this.circularDiameter || 0\n }`}\n >\n <circle cx={`${x}`} cy={`${y}`} r={`${r}`}></circle>\n <circle cx={`${x}`} cy={`${y}`} r={`${r}`}></circle>\n </svg>\n )}\n </div>\n </div>\n {label && size !== \"icon\" && (\n <ic-typography\n id=\"ic-loading-label\"\n class=\"ic-loading-label\"\n role=\"status\"\n variant={this.getLabelVariant()}\n >\n <p>{this.indicatorLabel}</p>\n </ic-typography>\n )}\n </div>\n </Host>\n );\n }\n}\n","@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-tooltip: z-index of tooltip\n */\n\n:host(.ic-tooltip) .ic-tooltip-container {\n background-color: var(--ic-architectural-800);\n color: #ffff;\n text-align: center;\n padding: var(--ic-space-xxxs) var(--ic-space-xs);\n border-radius: var(--ic-border-radius);\n border: var(--ic-border-width) solid var(--ic-architectural-40);\n position: absolute;\n max-width: 20rem;\n display: none;\n z-index: var(--ic-z-index-tooltip);\n box-shadow: var(--ic-elevation-overlay);\n}\n\n:host(.tooltip-navigation-item:not(.tooltip-navigation-item-side-nav-collapsed))\n .ic-tooltip-container,\n:host(.tooltip-disabled) .ic-tooltip-container {\n display: none !important;\n}\n\n:host(.tooltip-long-label-navigation-item-side-nav-expanded)\n .ic-tooltip-container[data-show] {\n display: block !important;\n}\n\n:host(.ic-tooltip) .ic-tooltip-arrow,\n:host(.ic-tooltip) .ic-tooltip-arrow::before {\n position: absolute;\n background: inherit;\n}\n\n:host(.ic-tooltip) .ic-tooltip-arrow {\n visibility: hidden;\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n:host(.ic-tooltip) .ic-tooltip-arrow::before {\n visibility: visible;\n content: \"\";\n border: var(--ic-border-width) solid var(--ic-architectural-40);\n width: 100%;\n height: 100%;\n}\n\n:host(.ic-tooltip) .ic-tooltip-container[data-show] {\n display: block;\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"top\"]\n > .ic-tooltip-arrow {\n height: var(--ic-space-xxxs);\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"top\"]\n > .ic-tooltip-arrow::before {\n border-radius: 0 0 var(--ic-border-radius) var(--ic-border-radius);\n left: 0;\n top: var(--ic-space-xxxs);\n border-top: 0;\n transform: translateX(var(--tooltip-arrow-translate));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"bottom\"]\n > .ic-tooltip-arrow {\n top: calc(-1 * var(--ic-space-xxs));\n height: var(--ic-space-xxxs);\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"bottom\"]\n > .ic-tooltip-arrow::before {\n border-radius: var(--ic-border-radius) var(--ic-border-radius) 0 0;\n left: 0;\n top: var(--ic-space-1px);\n border-bottom: 0;\n transform: translateX(var(--tooltip-arrow-translate));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"left\"]\n > .ic-tooltip-arrow {\n width: var(--ic-space-xxxs);\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"left\"]\n > .ic-tooltip-arrow::before {\n border-radius: 0 var(--ic-border-radius) var(--ic-border-radius) 0;\n border-left: 0;\n top: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"right\"]\n > .ic-tooltip-arrow {\n width: var(--ic-space-xxxs);\n left: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"right\"]\n > .ic-tooltip-arrow::before {\n border-radius: var(--ic-border-radius) 0 0 var(--ic-border-radius);\n border-right: 0;\n top: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.on-dialog) .ic-tooltip-container {\n transform: translate(\n var(--tooltip-translate-x),\n var(--tooltip-translate-y)\n ) !important;\n}\n\n@media screen and (max-width: 576px) {\n :host(.ic-tooltip) .ic-tooltip-container {\n max-width: 18.875rem;\n }\n}\n\n@media (forced-colors: active) {\n :host(.ic-tooltip) .ic-tooltip-container,\n :host(.ic-tooltip) .ic-tooltip-arrow::before {\n border: var(--ic-hc-border);\n }\n}\n","import { Component, Element, Host, Prop, h, Method } from \"@stencil/core\";\nimport { Instance, createPopper } from \"@popperjs/core\";\nimport { IcTooltipPlacements } from \"./ic-tooltip.types\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-tooltip\",\n styleUrl: \"ic-tooltip.css\",\n shadow: true,\n})\nexport class Tooltip {\n private arrow: HTMLDivElement;\n private delayedHideEvents = [\"mouseleave\"];\n private dialogOverflow = false;\n private icDialogEl: HTMLIcDialogElement;\n private instantHideEvents = [\"focusout\"];\n private mouseOverTool: boolean = false;\n private persistTooltip = false;\n private popperInstance: Instance;\n private onDialog: boolean = false;\n private showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n private toolTip: HTMLDivElement;\n\n @Element() el: HTMLIcTooltipElement;\n\n /**\n * @internal If `true`, the tooltip will not be displayed on click, it will require hover or using the display method.\n */\n @Prop() disableClick?: boolean = false;\n\n /**\n * If `true`, the tooltip will not be displayed on hover, it will require a click.\n */\n @Prop() disableHover?: boolean = false;\n\n /**\n * The number of lines to display before truncating the text.\n */\n @Prop() maxLines?: number;\n\n /**\n * The position of the tooltip in relation to the parent element.\n */\n @Prop({ mutable: true }) placement?: IcTooltipPlacements = \"bottom\";\n\n /**\n * @internal Sets the tooltip to aria-hidden, when used as part of components that are already announced.\n */\n @Prop() silent?: boolean = false;\n\n /**\n * The ID of the element the tooltip is describing - for when aria-labelledby or aria-describedby is used.\n */\n @Prop({ reflect: true }) target?: string;\n\n /**\n * The text to display on the tooltip.\n */\n @Prop() label!: string;\n\n disconnectedCallback(): void {\n this.manageEventListeners(\"remove\");\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n }\n\n componentDidLoad(): void {\n this.manageEventListeners(\"add\");\n\n this.icDialogEl = this.el.closest(\"ic-dialog\");\n this.dialogOverflow =\n this.icDialogEl?.getAttribute(\"data-overflow\") === \"true\";\n\n this.onDialog = this.icDialogEl !== null;\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tooltip\"\n );\n }\n\n componentDidRender(): void {\n const typographyEl = this.el.shadowRoot.querySelector(\n \".ic-tooltip-container > ic-typography\"\n );\n this.maxLines > 0 &&\n typographyEl.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.maxLines}`\n );\n }\n /**\n * Method to programmatically show/hide the tooltip without needing to interact with an anchor element\n * @param show Whether to show or hide the tooltip\n * @param persistTooltip Whether the tooltip should stay on the screen when actions are performed that would previously dismiss the tooltip, such as on hover\n */\n @Method()\n async displayTooltip(show: boolean, persistTooltip?: boolean): Promise<void> {\n this.persistTooltip = persistTooltip;\n show ? this.show() : this.hide();\n }\n\n private getTooltipTranslate = (dialogEl: DOMRect) => {\n const child = this.el.children[0].getBoundingClientRect();\n let tooltipX;\n let tooltipY;\n switch (this.placement) {\n case \"bottom\":\n tooltipX = child.left - dialogEl.left - 0.5 * child.width;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"bottom-start\":\n tooltipX = child.left - dialogEl.left;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"bottom-end\":\n tooltipX = child.right - dialogEl.right;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"top\":\n tooltipX = child.left - dialogEl.left - 0.5 * child.width;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"top-start\":\n tooltipX = child.left - dialogEl.left;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"top-end\":\n tooltipX = child.right - dialogEl.right;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"left\":\n case \"left-start\":\n tooltipX = child.right - dialogEl.right - child.width;\n tooltipY = child.bottom - dialogEl.top - child.height;\n break;\n case \"left-end\":\n tooltipX = child.right - dialogEl.right - child.width;\n tooltipY = child.top - dialogEl.bottom + child.height;\n break;\n case \"right\":\n case \"right-start\":\n tooltipX = child.left - dialogEl.left + child.width;\n tooltipY = child.bottom - dialogEl.top - child.height;\n break;\n case \"right-end\":\n tooltipX = child.left - dialogEl.left + child.width;\n tooltipY = child.top - dialogEl.bottom + child.height;\n break;\n }\n if (this.dialogOverflow && tooltipX < 0) {\n if (this.placement.includes(\"top\") || this.placement.includes(\"bottom\")) {\n this.toolTip.style.setProperty(\n \"--tooltip-arrow-translate\",\n `${tooltipX}px`\n );\n tooltipX = child.left - dialogEl.left;\n }\n if (this.placement.includes(\"left\")) {\n this.placement = \"right\";\n tooltipX = child.left - dialogEl.left + child.width;\n }\n }\n\n this.toolTip.style.setProperty(\"--tooltip-translate-x\", `${tooltipX}px`);\n this.toolTip.style.setProperty(\"--tooltip-translate-y\", `${tooltipY}px`);\n };\n\n private show = () => {\n if (this.label) {\n this.toolTip.setAttribute(\"data-show\", \"\");\n\n if (this.onDialog) {\n this.el.classList.add(\"on-dialog\");\n const dialogEl = this.icDialogEl.shadowRoot\n .querySelector(\"dialog\")\n .getBoundingClientRect();\n\n this.getTooltipTranslate(dialogEl);\n }\n\n this.popperInstance = createPopper(this.el, this.toolTip, {\n placement: this.placement,\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 10],\n },\n },\n {\n name: \"arrow\",\n options: {\n element: this.arrow,\n },\n },\n {\n name: \"eventListeners\",\n options: { scroll: false, resize: false },\n },\n ],\n });\n } else {\n console.warn(`Tooltip can't display without prop 'label' set`);\n }\n };\n\n private hide = () => {\n this.toolTip.removeAttribute(\"data-show\");\n this.persistTooltip = false;\n };\n\n private checkCloseTooltip = () => {\n setTimeout(() => {\n if (!this.mouseOverTool && !this.persistTooltip) {\n this.hide();\n }\n }, 100);\n };\n\n private mouseEnterTooltip = () => {\n this.mouseOverTool = true;\n };\n\n private mouseLeaveTooltip = () => {\n this.mouseOverTool = false;\n this.checkCloseTooltip();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\" && !this.persistTooltip) {\n this.hide();\n }\n };\n\n private manageEventListeners = (action: \"add\" | \"remove\") => {\n const method =\n action === \"add\" ? \"addEventListener\" : \"removeEventListener\";\n\n this.showEvents.forEach((event) => {\n this.el[method](event, this.show);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseEnterTooltip);\n }\n });\n\n if (!this.persistTooltip) {\n this.instantHideEvents.forEach((event) => {\n this.el[method](event, this.hide);\n });\n }\n\n this.delayedHideEvents.forEach((event) => {\n this.el[method](event, this.checkCloseTooltip);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseLeaveTooltip);\n }\n });\n\n document[method](\"keydown\", this.handleKeyDown);\n };\n\n render() {\n const { label, maxLines, silent } = this;\n return (\n <Host class={{ \"ic-tooltip\": true }}>\n <div\n ref={(el) => (this.toolTip = el as HTMLDivElement)}\n role=\"tooltip\"\n class=\"ic-tooltip-container\"\n aria-hidden={`${silent}`}\n >\n <ic-typography maxLines={maxLines} variant=\"caption\">\n {label}\n </ic-typography>\n <div\n ref={(el) => (this.arrow = el as HTMLDivElement)}\n class=\"ic-tooltip-arrow\"\n ></div>\n </div>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"oZAAA,MAAMA,EAAc,kqZ,8WCmCpB,IAAIC,EAAY,E,MAgBHC,EAAM,M,0IAETC,KAAAC,YAAcH,IACdE,KAAAE,WAAsB,MAEtBF,KAAAG,oBAAgD,GAChDH,KAAAI,cAA6B,KAC7BJ,KAAAK,cAAwB,KACxBL,KAAAM,iBAAqC,KACrCN,KAAAO,qBAAyC,KAuTzCP,KAAAQ,WAAa,KACnB,IAAIC,EACJ,GAAIT,KAAKU,kBAAmB,CAC1BD,EAAST,KAAKW,GAAGC,cAAc,qB,MAC1B,GAAIZ,KAAKa,mBAAoB,CAClCJ,EAAST,KAAKW,GAAGC,cAAc,sB,KAC1B,CACLH,EAAS,I,CAEX,OAAOA,CAAM,EAePT,KAAAc,YAAc,KACpB,IACGd,KAAKW,GAAGI,OAAS,UAAYf,KAAKW,GAAGI,OAAS,YAC7Cf,KAAKW,GAAGK,QAAQ,QAClB,CACAhB,KAAKiB,4BAA4BjB,KAAKW,GAAGK,QAAQ,Q,GAI7ChB,KAAAkB,QAAU,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,M,2CAY3B,oBAAApM,GACExD,KAAK8P,qBAAqB,UAC1B,GAAI9P,KAAK2O,iBAAmBlL,UAAW,CACrCzD,KAAK2O,eAAesB,S,EAIxB,gBAAA5L,G,MACErE,KAAK8P,qBAAqB,OAE1B9P,KAAK0O,WAAa1O,KAAKW,GAAGK,QAAQ,aAClChB,KAAKqN,iBACHvI,EAAA9E,KAAK0O,cAAU,MAAA5J,SAAA,SAAAA,EAAExC,aAAa,oBAAqB,OAErDtC,KAAKyN,SAAWzN,KAAK0O,aAAe,KAEpCwB,EACE,CAAC,CAAEC,KAAMnQ,KAAKiJ,MAAOmH,SAAU,UAC/B,U,CAIJ,kBAAAC,GACE,MAAMC,EAAetQ,KAAKW,GAAG8L,WAAW7L,cACtC,yCAEFZ,KAAKuQ,SAAW,GACdD,EAAapM,aACX,QACA,2BAA2BlE,KAAKuQ,W,CAStC,oBAAMC,CAAe/B,EAAejB,GAClCxN,KAAKwN,eAAiBA,EACtBiB,EAAOzO,KAAKyO,OAASzO,KAAKsP,M,CAmK5B,MAAAzI,GACE,MAAMoC,MAAEA,EAAKsH,SAAEA,EAAQnH,OAAEA,GAAWpJ,KACpC,OACE8H,EAACW,EAAI,CAACR,MAAO,CAAE,aAAc,OAC3BH,EAAA,OACEI,IAAMvH,GAAQX,KAAKwO,QAAU7N,EAC7BmM,KAAK,UACL7E,MAAM,uBAAsB,cACf,GAAGmB,KAEhBtB,EAAA,iBAAeyI,SAAUA,EAAUzN,QAAQ,WACxCmG,GAEHnB,EAAA,OACEI,IAAMvH,GAAQX,KAAKiP,MAAQtO,EAC3BsH,MAAM,sBAGVH,EAAA,a"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as o,H as i,g as a}from"./p-6b5e91e2.js";import{j as c,a as r,i as n}from"./p-b34eb829.js";import"./p-26b7b18f.js";const s='/*! 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(.checked) ::part(button){background-color:var(--ic-action-default);color:var(--ic-architectural-white);box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white)}:host(.checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus)}:host(.checked) ::part(button):hover{background-color:var(--button-default-hover)}:host(.checked) ::part(button):active,:host(.icon.checked) ::part(button):active{background-color:var(--ic-action-default-active)}:host(.dark.checked) ::part(button){background-color:var(--ic-action-dark)}:host(.dark.checked) ::part(button):hover{background-color:var(--ic-action-dark-hover)}:host(.dark.checked) ::part(button):active,:host(.icon.dark.checked) ::part(button):active{background-color:var(--ic-action-dark-active)}:host(.light.checked) ::part(button){background-color:var(--ic-action-light);color:var(--ic-color-primary-text);box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black)}:host(.light.checked) ::part(button):hover{background-color:var(--ic-action-light-hover)}:host(.light.checked) ::part(button):active,:host(.icon.light.checked) ::part(button):active{background-color:var(--ic-action-light-active)}:host(.light.checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus)}:host(.disabled) ::part(button),:host(.icon.disabled) ::part(button){border:var(--ic-border-disabled)}:host(.disabled.checked) ::part(button),:host(.icon.disabled.checked) ::part(button){background-color:transparent}:host(.disabled.checked) ::part(button),:host(.icon.disabled.checked) ::part(button)::before{background-image:radial-gradient(var(--ic-architectural-400) 95%, white 20%);background-repeat:no-repeat}:host(.icon) ::part(button){border:var(--ic-border-width) solid var(--button-default);height:calc(var(--ic-space-xl) + var(--ic-space-xs));width:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.icon) ::part(button):active{background-color:var(--ic-action-default-bg-active)}:host(.icon.dark) ::part(button):active{background-color:var(--ic-action-dark-bg-active)}:host(.icon.light) ::part(button):active{background-color:var(--ic-action-light-bg-active)}:host(.icon.small) ::part(button){height:var(--ic-space-xl);width:var(--ic-space-xl)}:host(.icon.large) ::part(button){height:var(--ic-space-xxl);width:var(--ic-space-xxl)}:host(.checked.loading) ::part(button){background-color:var(--button-default-active)}:host(.loading) ::part(ic-loading-container){--inner-color:var(--ic-architectural-white)}:host(.checked.loading.light) ::part(button){background-color:var(--ic-action-light-active)}:host(.checked.loading.dark) ::part(button){background-color:var(--ic-action-dark-active)}';const d=class{constructor(o){t(this,o);this.icToggleChecked=e(this,"icToggleChecked",7);this.handleClick=()=>{!this.loading&&!this.disabled&&this.icToggleChecked.emit({checked:this.toggleChecked})};this.accessibleLabel=undefined;this.appearance="default";this.disabled=false;this.fullWidth=false;this.iconPlacement=undefined;this.label=undefined;this.loading=false;this.size="default";this.toggleChecked=false;this.variant="default"}componentWillLoad(){c(this.disabled,this.el)}componentDidLoad(){r([{prop:this.variant==="icon"?this.accessibleLabel:this.label,propName:this.variant==="icon"?"accessible-label":"label"}],"Toggle button")}handleHostClick(t){if(this.disabled){t.stopImmediatePropagation()}else if(!this.loading){this.toggleChecked=!this.toggleChecked}}render(){return o(i,{class:{["disabled"]:this.disabled,["checked"]:this.toggleChecked,[`${this.appearance}`]:true,["icon"]:this.variant==="icon",[`${this.size}`]:true,["loading"]:this.loading}},o("ic-button",{role:"checkbox","aria-checked":this.toggleChecked?"true":"false",variant:this.variant==="icon"?"icon":"secondary",onClick:this.handleClick,title:this.accessibleLabel,"aria-label":`${this.accessibleLabel?this.accessibleLabel:this.label}, ${this.toggleChecked?"ticked":"unticked"}`,disabled:this.disabled,appearance:this.appearance,size:this.size,fullWidth:this.fullWidth,loading:this.loading,"aria-disabled":`${this.disabled}`},this.variant!=="icon"&&this.label,o("slot",null),n(this.el,"icon")&&o("slot",{name:"icon",slot:`${this.iconPlacement?`${this.iconPlacement}-icon`:"icon"}`}),n(this.el,"badge")&&o("slot",{name:"badge",slot:"badge"})))}static get delegatesFocus(){return true}get el(){return a(this)}};d.style=s;export{d as ic_toggle_button};
2
- //# sourceMappingURL=p-573322c6.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icToggleButtonCss","ToggleButton","this","handleClick","loading","disabled","icToggleChecked","emit","checked","toggleChecked","componentWillLoad","removeDisabledFalse","el","componentDidLoad","onComponentRequiredPropUndefined","prop","variant","accessibleLabel","label","propName","handleHostClick","e","stopImmediatePropagation","render","h","Host","class","appearance","size","role","onClick","title","fullWidth","isSlotUsed","name","slot","iconPlacement"],"sources":["src/components/ic-toggle-button/ic-toggle-button.css?tag=ic-toggle-button&encapsulation=shadow","src/components/ic-toggle-button/ic-toggle-button.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.checked) ::part(button) {\n background-color: var(--ic-action-default);\n color: var(--ic-architectural-white);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white);\n}\n\n:host(.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus);\n}\n\n:host(.checked) ::part(button):hover {\n background-color: var(--button-default-hover);\n}\n\n:host(.checked) ::part(button):active,\n:host(.icon.checked) ::part(button):active {\n background-color: var(--ic-action-default-active);\n}\n\n:host(.dark.checked) ::part(button) {\n background-color: var(--ic-action-dark);\n}\n\n:host(.dark.checked) ::part(button):hover {\n background-color: var(--ic-action-dark-hover);\n}\n\n:host(.dark.checked) ::part(button):active,\n:host(.icon.dark.checked) ::part(button):active {\n background-color: var(--ic-action-dark-active);\n}\n\n:host(.light.checked) ::part(button) {\n background-color: var(--ic-action-light);\n color: var(--ic-color-primary-text);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black);\n}\n\n:host(.light.checked) ::part(button):hover {\n background-color: var(--ic-action-light-hover);\n}\n\n:host(.light.checked) ::part(button):active,\n:host(.icon.light.checked) ::part(button):active {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.light.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus);\n}\n\n:host(.disabled) ::part(button),\n:host(.icon.disabled) ::part(button) {\n border: var(--ic-border-disabled);\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button) {\n background-color: transparent;\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button)::before {\n background-image: radial-gradient(var(--ic-architectural-400) 95%, white 20%);\n background-repeat: no-repeat;\n}\n\n:host(.icon) ::part(button) {\n border: var(--ic-border-width) solid var(--button-default);\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n width: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.icon) ::part(button):active {\n background-color: var(--ic-action-default-bg-active);\n}\n\n:host(.icon.dark) ::part(button):active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.icon.light) ::part(button):active {\n background-color: var(--ic-action-light-bg-active);\n}\n\n:host(.icon.small) ::part(button) {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n:host(.icon.large) ::part(button) {\n height: var(--ic-space-xxl);\n width: var(--ic-space-xxl);\n}\n\n:host(.checked.loading) ::part(button) {\n background-color: var(--button-default-active);\n}\n\n:host(.loading) ::part(ic-loading-container) {\n --inner-color: var(--ic-architectural-white);\n}\n\n:host(.checked.loading.light) ::part(button) {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.checked.loading.dark) ::part(button) {\n background-color: var(--ic-action-dark-active);\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n Event,\n EventEmitter,\n Listen,\n h,\n} from \"@stencil/core\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSizes, IcThemeForeground } from \"../../utils/types\";\n\n/**\n * @slot icon - Content will be displayed alongside the toggle button label.\n * @slot badge - Badge component overlaying the top right of the toggle button.\n */\n\n@Component({\n tag: \"ic-toggle-button\",\n styleUrl: \"ic-toggle-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ToggleButton {\n @Element() el: HTMLIcToggleButtonElement;\n\n /**\n * The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons.\n */\n @Prop() accessibleLabel?: string;\n\n /**\n * The appearance of the toggle button.\n */\n @Prop() appearance?: IcThemeForeground = \"default\";\n\n /**\n * If `true`, the toggle button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the toggle button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The placement of the icon in relation to the toggle button label.\n */\n @Prop() iconPlacement?: \"left\" | \"right\" | \"top\";\n\n /**\n * The label to display in the toggle button. This is required for the default variant of toggle buttons.\n */\n @Prop() label?: string;\n\n /**\n * If `true`, the toggle button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * The size of the toggle button to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * If `true`, the toggle button will be in a checked state.\n */\n @Prop({ mutable: true, reflect: true }) toggleChecked: boolean = false;\n\n /**\n * The variant of the toggle button.\n */\n @Prop({ reflect: true }) variant: \"default\" | \"icon\" = \"default\";\n\n /**\n * Emitted when the user clicks a toggle button.\n */\n @Event() icToggleChecked: EventEmitter<{\n checked: boolean;\n }>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n {\n prop: this.variant === \"icon\" ? this.accessibleLabel : this.label,\n propName: this.variant === \"icon\" ? \"accessible-label\" : \"label\",\n },\n ],\n \"Toggle button\"\n );\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(e: Event): void {\n if (this.disabled) {\n e.stopImmediatePropagation();\n } else if (!this.loading) {\n this.toggleChecked = !this.toggleChecked;\n }\n }\n\n private handleClick = (): void => {\n !this.loading &&\n !this.disabled &&\n this.icToggleChecked.emit({\n checked: this.toggleChecked,\n });\n };\n\n render() {\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled,\n [\"checked\"]: this.toggleChecked,\n [`${this.appearance}`]: true,\n [\"icon\"]: this.variant === \"icon\",\n [`${this.size}`]: true,\n [\"loading\"]: this.loading,\n }}\n >\n <ic-button\n role=\"checkbox\"\n aria-checked={this.toggleChecked ? \"true\" : \"false\"}\n variant={this.variant === \"icon\" ? \"icon\" : \"secondary\"}\n onClick={this.handleClick}\n title={this.accessibleLabel}\n aria-label={`${\n this.accessibleLabel ? this.accessibleLabel : this.label\n }, ${this.toggleChecked ? \"ticked\" : \"unticked\"}`}\n disabled={this.disabled}\n appearance={this.appearance}\n size={this.size}\n fullWidth={this.fullWidth}\n loading={this.loading}\n aria-disabled={`${this.disabled}`}\n >\n {this.variant !== \"icon\" && this.label}\n <slot />\n {isSlotUsed(this.el, \"icon\") && (\n <slot\n name=\"icon\"\n slot={`${\n this.iconPlacement ? `${this.iconPlacement}-icon` : \"icon\"\n }`}\n ></slot>\n )}\n {isSlotUsed(this.el, \"badge\") && (\n <slot name=\"badge\" slot=\"badge\"></slot>\n )}\n </ic-button>\n </Host>\n );\n }\n}\n"],"mappings":"0IAAA,MAAMA,EAAoB,+kK,MC6BbC,EAAY,M,0EAqFfC,KAAAC,YAAc,MACnBD,KAAKE,UACHF,KAAKG,UACNH,KAAKI,gBAAgBC,KAAK,CACxBC,QAASN,KAAKO,eACd,E,+CA/EmC,U,cAKZ,M,eAKC,M,+DAeF,M,UAKH,U,mBAKwC,M,aAKV,S,CASvD,iBAAAC,GACEC,EAAoBT,KAAKG,SAAUH,KAAKU,G,CAG1C,gBAAAC,GACEC,EACE,CACE,CACEC,KAAMb,KAAKc,UAAY,OAASd,KAAKe,gBAAkBf,KAAKgB,MAC5DC,SAAUjB,KAAKc,UAAY,OAAS,mBAAqB,UAG7D,gB,CAKJ,eAAAI,CAAgBC,GACd,GAAInB,KAAKG,SAAU,CACjBgB,EAAEC,0B,MACG,IAAKpB,KAAKE,QAAS,CACxBF,KAAKO,eAAiBP,KAAKO,a,EAY/B,MAAAc,GACE,OACEC,EAACC,EAAI,CACHC,MAAO,CACL,CAAC,YAAaxB,KAAKG,SACnB,CAAC,WAAYH,KAAKO,cAClB,CAAC,GAAGP,KAAKyB,cAAe,KACxB,CAAC,QAASzB,KAAKc,UAAY,OAC3B,CAAC,GAAGd,KAAK0B,QAAS,KAClB,CAAC,WAAY1B,KAAKE,UAGpBoB,EAAA,aACEK,KAAK,WAAU,eACD3B,KAAKO,cAAgB,OAAS,QAC5CO,QAASd,KAAKc,UAAY,OAAS,OAAS,YAC5Cc,QAAS5B,KAAKC,YACd4B,MAAO7B,KAAKe,gBAAe,aACf,GACVf,KAAKe,gBAAkBf,KAAKe,gBAAkBf,KAAKgB,UAChDhB,KAAKO,cAAgB,SAAW,aACrCJ,SAAUH,KAAKG,SACfsB,WAAYzB,KAAKyB,WACjBC,KAAM1B,KAAK0B,KACXI,UAAW9B,KAAK8B,UAChB5B,QAASF,KAAKE,QAAO,gBACN,GAAGF,KAAKG,YAEtBH,KAAKc,UAAY,QAAUd,KAAKgB,MACjCM,EAAA,aACCS,EAAW/B,KAAKU,GAAI,SACnBY,EAAA,QACEU,KAAK,OACLC,KAAM,GACJjC,KAAKkC,cAAgB,GAAGlC,KAAKkC,qBAAuB,WAIzDH,EAAW/B,KAAKU,GAAI,UACnBY,EAAA,QAAMU,KAAK,QAAQC,KAAK,W"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icSelectCss","inputIds","Select","this","hasSetDefaultValue","inheritedAttributes","initialOptionsEmpty","inputId","menuId","searchableMenuItemSelected","ungroupedOptions","handleRetry","ev","detail","keyPressed","_a","searchableSelectElement","focus","blurredBecauseButtonPressed","retryButtonClick","icRetryLoad","emit","value","hiddenInputValue","emitIcChange","searchable","clearTimeout","debounceIcChange","window","setTimeout","icChange","currDebounce","emitImmediateIcChange","deduplicateOptions","options","uniqueValues","dedupedOptions","dedupedChildren","forEach","option","children","child","includes","console","warn","label","push","modifiedParent","Object","assign","setOptionsValuesFromLabels","length","map","setUngroupedOptions","event","setTextColor","nativeSelectElement","selectedIndex","className","setMenuChange","open","getLabelFromValue","uniqueOptions","getFilteredChildMenuOptions","getFilteredMenuOptions","includeDescriptionsInSearch","searchableSelectInputValue","searchMatchPosition","pressedCharacters","newOption","handleNativeSelectChange","icOptionSelect","handleCustomSelectChange","emptyOptionListText","currValue","inputValueToFilter","getValueFromLabel","ariaActiveDescendant","optionId","handleMenuChange","handleFocusIndicatorDisplay","handleMenuKeyPress","cancelBubble","handleCharacterKeyDown","key","handleMenuValueChange","focusIndicator","el","shadowRoot","querySelector","classList","add","remove","handleMouseDown","preventDefault","isExternalFiltering","disableFilter","handleClick","menu","filteredOptions","hasTimedOut","loading","noOptions","handleClickOpen","handleExpandIconMouseDown","disabled","handleClear","stopPropagation","timeoutTimer","icClear","customSelectElement","characterKeyPressTimer","handleFilter","handleNativeSelectKeyDown","handleKeyDown","isArrowKey","handleKeyboardOpen","handleClearButtonFocus","clearButtonFocused","handleClearButtonBlur","retryButton","relatedTarget","isGrouped","newFilteredOptions","menuOptionsFiltered","includeGroupTitlesInSearch","indexOf","noChildOptionsWhenFiltered","triggerLoading","loadingLabel","timeout","loadingErrorLabel","timedOut","find","handleSearchableSelectInput","target","icInput","debounceAriaLiveUpdate","updateSearchableSelectResultAriaLive","searchableSelectResultsStatusEl","innerText","getDefaultValue","onFocus","icFocus","onBlur","tagName","isSearchableAndNoFocusedInternalElements","Array","from","querySelectorAll","clearButton","icBlur","onTimeoutBlur","handleFormReset","initialValue","debounce","loadingHandler","newValue","watchOptionsHandler","setDefaultValue","debounceChangedHandler","updateOnChangeDebounce","valueChangedHandler","disconnectedCallback","removeFormResetListener","componentWillLoad","inheritAttributes","IC_INHERITED_ARIA","removeDisabledFalse","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentDidRender","setFocus","debounceAria","render","small","size","fullWidth","helperText","hideLabel","name","placeholder","readonly","required","showClearButton","validationStatus","validationText","renderHiddenInput","invalid","IcInformationStatus","Error","describedBy","getInputDescribedByText","hasValidationStatus","trim","h","Host","class","for","ref","anchorEl","isMobileOrTablet","onChange","id","onKeyDown","form","selected","role","autocomplete","onInput","onClick","formaction","formenctype","formmethod","formnovalidate","formtarget","innerHTML","Clear","variant","appearance","IcThemeForegroundEnum","Light","Dark","onMouseDown","Expand","undefined","inputEl","inputLabel","selectOnEnter","onMenuStateChange","onMenuOptionSelect","onMenuKeyPress","onMenuValueChange","onUngroupedOptionsSet","onRetryButtonClicked","parentEl","activationType","ariaLiveMode","status","message"],"sources":["src/components/ic-select/ic-select.css?tag=ic-select&encapsulation=shadow","src/components/ic-select/ic-select.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --input-width: Width of the input field\n * @prop --ic-z-index-menu: z-index of select menu\n */\n\n:host {\n display: block;\n position: relative;\n}\n\n:host(.full-width) {\n width: 100%;\n}\n\nic-input-component-container:hover {\n --border-color: var(--ic-action-dark-hover);\n}\n\nic-input-component-container:active {\n --border-color: var(--ic-action-dark-active);\n\n color: var(--ic-action-dark-active);\n}\n\nic-input-component-container.menu-open {\n --border-color: var(--ic-architectural-400);\n\n color: var(--ic-action-dark);\n}\n\nic-input-validation .status-icon,\nic-input-validation .statustext {\n visibility: visible;\n}\n\nic-input-validation.menu-open .status-icon,\nic-input-validation.menu-open .statustext {\n visibility: hidden;\n transition: visibility 0s;\n}\n\nic-input-label {\n margin-bottom: var(--ic-space-xs) !important;\n}\n\nselect {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n color: var(--ic-color-primary-text);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n height: 100%;\n padding-left: 0.375rem;\n appearance: none;\n background-repeat: no-repeat;\n background-position: right 0.375rem center;\n background-image: url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\");\n}\n\nselect option,\n.select-option-selected {\n color: var(--ic-color-primary-text);\n}\n\nselect:disabled {\n color: var(--ic-architectural-200);\n background-image: url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\");\n}\n\nselect:focus {\n border: 0;\n outline: 0;\n}\n\nselect:not([disabled]) {\n cursor: pointer;\n}\n\n.select-container {\n width: 100%;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.select-input {\n width: 100%;\n height: 100%;\n padding: 0 0.375rem;\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n background: none;\n border: none;\n}\n\n.select-input:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(:not(.disabled)) ic-input-component-container:hover .select-input {\n background-color: var(--ic-architectural-white);\n}\n\n.select-input[disabled] {\n pointer-events: none;\n}\n\n:host(.searchable) .select-input {\n cursor: auto;\n}\n\n.searchable-select-container {\n align-items: center;\n display: flex;\n width: 100%;\n position: relative;\n}\n\n.expand-icon {\n height: var(--ic-space-lg);\n padding-left: var(--ic-space-xs);\n color: var(--ic-action-dark);\n}\n\n.expand-icon > svg {\n display: inline-block;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host(.disabled) .expand-icon,\n:host(.disabled) .expand-icon > svg > path {\n color: var(--ic-architectural-200);\n}\n\n:host(.searchable) .expand-icon {\n padding-left: var(--ic-space-xxs);\n height: 2.25rem;\n}\n\n:host(.searchable) .expand-icon > svg {\n height: 2.25rem;\n padding: 0 0.375rem;\n}\n\n:host(.searchable:not(.disabled)) .expand-icon > svg {\n cursor: pointer;\n}\n\n.expand-icon-open {\n color: var(--ic-action-dark);\n}\n\n.expand-icon-filled {\n color: var(--ic-action-dark);\n}\n\n.expand-icon-open,\n:host(.searchable) .expand-icon-open {\n transform: rotateX(180deg);\n}\n\n:host(.disabled) .value-text,\n.placeholder {\n color: var(--ic-color-tertiary-text);\n}\n\n.select-input-end {\n display: flex;\n align-items: center;\n}\n\n.clear-button-container {\n display: flex;\n gap: var(--ic-space-xxs);\n padding-left: 2.375rem;\n align-items: center;\n}\n\n:host(.small) .clear-button-container {\n padding-left: 1.875rem;\n}\n\n.divider {\n width: var(--ic-border-width);\n background-color: var(--ic-architectural-400);\n margin: var(--ic-space-xxs) 0;\n border-radius: var(--ic-space-1px);\n height: var(--ic-space-lg);\n}\n\n:host(.small) .divider {\n height: var(--ic-space-md);\n}\n\n.clear-button {\n position: absolute;\n right: 2.75rem;\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n}\n\n.clear-button:focus {\n background-color: var(--ic-focus-blue);\n box-shadow: inset 0 0 0 0.125rem var(--ic-focus-glow);\n border-radius: 0.25rem;\n}\n\n.clear-button:focus * {\n fill: white;\n}\n\n.searchable-select-results-status {\n border: 0;\n clip: rect(0, 0, 0, 0, 0);\n height: var(--ic-space-1px);\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: var(--ic-space-1px);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n h,\n State,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n getInputDescribedByText,\n getLabelFromValue,\n hasValidationStatus,\n inheritAttributes,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n isMobileOrTablet,\n getFilteredMenuOptions,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcThemeForegroundEnum,\n IcMenuOption,\n IcSearchMatchPositions,\n IcValueEventDetail,\n IcSizesNoLarge,\n} from \"../../utils/types\";\nimport Expand from \"./assets/Expand.svg\";\nimport Clear from \"./assets/Clear.svg\";\nimport { IcOptionSelectEventDetail } from \"../ic-menu/ic-menu.types\";\n\nlet inputIds = 0;\n\n@Component({\n tag: \"ic-select\",\n styleUrl: \"ic-select.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class Select {\n private anchorEl: HTMLElement;\n private blurredBecauseButtonPressed: boolean;\n private characterKeyPressTimer: number;\n private clearButton: HTMLIcButtonElement;\n private customSelectElement: HTMLButtonElement;\n private debounceAria: number;\n private hasSetDefaultValue = false;\n private hasTimedOut: boolean;\n private inheritedAttributes: { [k: string]: unknown } = {};\n private initialOptionsEmpty = false;\n private inputId = `ic-select-input-${inputIds++}`;\n private menu: HTMLIcMenuElement;\n private menuId = `${this.inputId}-menu`;\n private nativeSelectElement: HTMLSelectElement;\n private retryButtonClick: boolean;\n private searchableMenuItemSelected: boolean = false;\n private searchableSelectElement: HTMLInputElement;\n private timeoutTimer: number;\n private ungroupedOptions: IcMenuOption[] = [];\n\n @Element() el!: HTMLIcSelectElement;\n\n @State() ariaActiveDescendant: string;\n @State() clearButtonFocused: boolean = false;\n @State() debounceIcChange: number;\n @State() hiddenInputValue: string;\n @State() noOptions: IcMenuOption[] = null;\n @State() open: boolean = false;\n @State() pressedCharacters: string = \"\";\n @State() searchableSelectInputValue: string = null;\n\n /**\n * @deprecated This prop should not be used anymore.\n */\n @Prop() charactersUntilSuggestions?: number = 0;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source.\n */\n @Prop() disableFilter?: boolean = false;\n\n /**\n * The text displayed when there are no options in the option list.\n */\n @Prop() emptyOptionListText = \"No results found\";\n\n /**\n * The <form> element to associate the select with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the select. It overrides the action attribute of the select's form owner. Does nothing if there is no form owner.\n * This prop should only be used with searchable select and will only be applied if searchable is true.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded. This prop should only be used with searchable select and will only be applied if searchable is true.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form. This prop should only be used with searchable select and will only be applied if searchable is true.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted. This prop should only be used with searchable select and will only be applied if searchable is true.\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 select's form owner.\n * This prop should only be used with searchable select and will only be applied if searchable is true.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the select element will fill the width of the container. This prop should only be used with searchable select and will only be applied if searchable is true.\n */\n @Prop() fullWidth: 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 * If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeDescriptionsInSearch?: boolean = false;\n\n /**\n * If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeGroupTitlesInSearch?: boolean = false;\n\n /**\n * The label for the select.\n */\n @Prop() label!: string;\n\n /**\n * The message displayed when external loading times out.\n */\n @Prop() loadingErrorLabel?: string = \"Loading Error\";\n\n /**\n * The message displayed whilst the options are being loaded externally.\n */\n @Prop() loadingLabel?: string = \"Loading...\";\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder?: string = \"Select an option\";\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly?: boolean = false;\n\n /**\n * If `true`, the select will require a value.\n */\n @Prop() required?: boolean = false;\n\n /**\n * If `true`, a searchable variant of the select will be displayed which can be typed in to filter options.\n */\n @Prop() searchable?: boolean = false;\n\n /**\n * Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering.\n */\n @Prop() searchMatchPosition?: IcSearchMatchPositions = \"anywhere\";\n\n /**\n * If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown.\n */\n @Prop() selectOnEnter?: boolean = false;\n\n /**\n * If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select.\n */\n @Prop() showClearButton?: boolean = false;\n\n /**\n * The size of the select component.\n */\n @Prop() size?: IcSizesNoLarge = \"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 * If using external filtering, set a timeout for when loading takes too long.\n */\n @Prop() timeout?: number;\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus?: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText?: string = \"\";\n\n /**\n * If `true`, the loading state will be triggered when fetching options asyncronously.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n newValue && this.triggerLoading();\n }\n\n /**\n * The possible selection options.\n */\n @Prop() options?: IcMenuOption[] = [];\n @State() filteredOptions: IcMenuOption[] = this.options;\n @State() uniqueOptions: IcMenuOption[] = this.options;\n\n @Watch(\"options\")\n watchOptionsHandler(): void {\n if (!this.hasTimedOut) {\n this.loading = false;\n clearTimeout(this.timeoutTimer);\n if (this.isExternalFiltering()) {\n if (this.options.length > 0) {\n this.setOptionsValuesFromLabels();\n this.noOptions = null;\n this.uniqueOptions = this.deduplicateOptions(this.options);\n this.filteredOptions = this.uniqueOptions;\n } else {\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.uniqueOptions = this.noOptions;\n this.filteredOptions = this.noOptions;\n }\n this.updateSearchableSelectResultAriaLive();\n this.setDefaultValue();\n } else {\n this.setOptionsValuesFromLabels();\n this.uniqueOptions = this.deduplicateOptions(this.options);\n this.filteredOptions = this.uniqueOptions;\n if (this.initialOptionsEmpty) {\n this.setDefaultValue();\n this.initialOptionsEmpty = false;\n }\n }\n } else {\n if (!this.searchable) this.options = this.noOptions;\n }\n }\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce?: number = 0;\n @State() currDebounce = this.debounce;\n\n @Watch(\"debounce\")\n debounceChangedHandler(newValue: number): void {\n this.updateOnChangeDebounce(newValue);\n }\n\n /**\n * The value of the select, reflected by the value of the currently selected option. For the searchable variant, the value is also reflected by the user input.\n */\n @Prop({ mutable: true }) value?: string;\n @State() initialValue = this.value;\n @State() inputValueToFilter = this.value;\n @State() currValue = this.value;\n\n @Watch(\"value\")\n valueChangedHandler(): void {\n if (this.value !== this.currValue) {\n this.currValue = this.value;\n }\n\n if (this.searchable) {\n this.searchableSelectInputValue =\n this.getLabelFromValue(this.currValue) || this.currValue;\n }\n }\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the value changes.\n */\n @Event() icChange!: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the clear button is clicked.\n */\n @Event() icClear!: EventEmitter<void>;\n\n /**\n * Emitted when the select gains focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when an option is highlighted within the menu.\n * Highlighting a menu item will also trigger an `icChange/onIcChange` due to the value being updated.\n */\n @Event() icOptionSelect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when the 'retry loading' button is clicked for a searchable variant.\n */\n @Event() icRetryLoad: EventEmitter<IcValueEventDetail>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"tabindex\",\n \"title\",\n ]);\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.setOptionsValuesFromLabels();\n\n addFormResetListener(this.el, this.handleFormReset);\n\n if (!this.options.length) {\n this.initialOptionsEmpty = true;\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.uniqueOptions = this.noOptions;\n this.filteredOptions = this.noOptions;\n } else {\n this.setDefaultValue();\n this.uniqueOptions = this.deduplicateOptions(this.options);\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Select\"\n );\n\n if (this.loading) {\n this.triggerLoading();\n }\n this.hiddenInputValue = this.searchable && this.currValue;\n }\n\n componentDidRender(): void {\n if (this.nativeSelectElement && !this.disabled) {\n this.setTextColor();\n }\n }\n\n /**\n * Sets focus on the input box.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.focus();\n } else if (this.customSelectElement) {\n this.customSelectElement.focus();\n } else if (this.searchableSelectElement) {\n this.searchableSelectElement.focus();\n }\n }\n\n private handleRetry = (ev: CustomEvent<IcValueEventDetail>) => {\n if (ev.detail.keyPressed) this.searchableSelectElement?.focus();\n this.blurredBecauseButtonPressed = true;\n this.retryButtonClick = true;\n this.hasSetDefaultValue = true;\n this.icRetryLoad.emit({ value: this.hiddenInputValue });\n };\n\n private updateOnChangeDebounce(newValue: number) {\n if (this.currDebounce !== newValue) {\n this.currDebounce = newValue;\n }\n }\n\n private emitIcChange = (value: string) => {\n if (!this.searchable) {\n this.value = value;\n }\n\n clearTimeout(this.debounceIcChange);\n this.debounceIcChange = window.setTimeout(() => {\n this.icChange.emit({ value: value });\n }, this.currDebounce);\n };\n\n private emitImmediateIcChange = (value: string) => {\n this.value = value;\n clearTimeout(this.debounceIcChange);\n this.icChange.emit({ value: value });\n };\n\n /**\n * Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn\n * @param options array of IcMenuOptions\n * @returns a new options object, with all entries possessing a duplicate 'value' field removed\n */\n private deduplicateOptions = (options: IcMenuOption[]): IcMenuOption[] => {\n const uniqueValues: string[] = [];\n const dedupedOptions: IcMenuOption[] = [];\n let dedupedChildren: IcMenuOption[];\n\n options.forEach((option: IcMenuOption) => {\n if (option.children) {\n //If an option has children, we will loop through them\n dedupedChildren = [];\n option.children.forEach((child) => {\n if (uniqueValues.includes(child.value)) {\n console.warn(\n `ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`\n );\n } else {\n uniqueValues.push(child.value);\n dedupedChildren.push(child);\n }\n });\n // construct a modified option, inserting the deduplicated children alongside the original information\n const modifiedParent: IcMenuOption = {\n ...option,\n children: dedupedChildren,\n };\n dedupedOptions.push(modifiedParent);\n } else {\n // If an option does not have children, assess to see if it's value has been included already\n if (uniqueValues.includes(option.value)) {\n console.warn(\n `ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`\n );\n } else {\n uniqueValues.push(option.value);\n dedupedOptions.push(option);\n }\n }\n });\n return dedupedOptions;\n };\n\n /**\n * Loop through options array and for all options with no value, infer it from the label\n */\n private setOptionsValuesFromLabels = (): void => {\n if (this.options.length > 0 && this.options.map) {\n this.options.map((option) => {\n if (!option.value) {\n option.value = option.label;\n }\n });\n }\n };\n\n private setUngroupedOptions = (event: CustomEvent): void => {\n this.ungroupedOptions = event.detail.options;\n };\n\n private setTextColor = (): void => {\n if (this.nativeSelectElement.selectedIndex === 0) {\n this.nativeSelectElement.className = \"placeholder\";\n } else {\n this.nativeSelectElement.className = \"select-option-selected\";\n }\n };\n\n private setMenuChange = (open: boolean) => {\n if (this.open !== open) {\n this.open = open;\n }\n };\n\n private getLabelFromValue = (value: string): string | undefined => {\n return getLabelFromValue(value, this.uniqueOptions);\n };\n\n private getFilteredChildMenuOptions = (option: IcMenuOption) => {\n let children = option.children;\n\n if (this.searchable) {\n children = getFilteredMenuOptions(\n option.children,\n this.includeDescriptionsInSearch,\n this.searchableSelectInputValue,\n this.searchMatchPosition\n );\n } else {\n children = getFilteredMenuOptions(\n option.children,\n false,\n this.pressedCharacters,\n \"start\"\n );\n }\n\n const newOption = { ...option };\n newOption.children = children;\n return newOption;\n };\n\n private handleNativeSelectChange = (): void => {\n this.icOptionSelect.emit({ value: this.nativeSelectElement.value });\n this.emitImmediateIcChange(this.nativeSelectElement.value);\n this.setTextColor();\n };\n\n private handleCustomSelectChange = (event: CustomEvent): void => {\n if (this.searchable && event.detail.label === this.emptyOptionListText) {\n this.searchableSelectElement.focus();\n return;\n }\n\n if (this.searchable) {\n this.value = event.detail.value;\n this.searchableMenuItemSelected = true;\n\n // After editing the input, if selecting the same option as before, set the input value to label again\n if (this.value === this.currValue) {\n this.searchableSelectInputValue = this.getLabelFromValue(this.value);\n }\n\n this.inputValueToFilter = null;\n this.hiddenInputValue = this.getValueFromLabel(\n this.searchableSelectInputValue\n );\n }\n\n this.ariaActiveDescendant = event.detail.optionId;\n this.icOptionSelect.emit({ value: event.detail.value });\n this.emitIcChange(event.detail.value);\n };\n\n private handleMenuChange = (event: CustomEvent): void => {\n this.open = event.detail.open;\n this.pressedCharacters = \"\";\n\n this.searchable && this.handleFocusIndicatorDisplay();\n };\n\n // clears the debounce delay when navigating the menu with arrow keys etc\n // to prevent delay in change event, which should only occur when typing in input\n private handleMenuKeyPress = (ev: CustomEvent): void => {\n ev.cancelBubble = true;\n this.handleCharacterKeyDown(ev.detail.key);\n };\n\n private handleMenuValueChange = (ev: CustomEvent): void => {\n this.value = ev.detail.value;\n };\n\n private handleFocusIndicatorDisplay = () => {\n const focusIndicator = this.el.shadowRoot.querySelector(\".focus-indicator\");\n\n if (this.open) {\n focusIndicator.classList.add(\"focus-indicator-enabled\");\n } else {\n focusIndicator.classList.remove(\"focus-indicator-enabled\");\n }\n };\n\n private handleMouseDown = (event: Event): void => {\n if (!this.open) {\n event.preventDefault();\n }\n };\n\n private isExternalFiltering = (): boolean =>\n this.searchable && this.disableFilter;\n\n private handleClick = (event: MouseEvent): void => {\n if (!this.open) {\n if (this.isExternalFiltering()) {\n this.menu.options = this.filteredOptions;\n } else if (\n !this.hasTimedOut &&\n !this.loading &&\n !this.noOptions?.length &&\n (!this.searchable || this.searchableMenuItemSelected)\n ) {\n this.noOptions = null;\n this.menu.options = this.uniqueOptions;\n }\n }\n\n if (event.detail !== 0) {\n this.menu.handleClickOpen();\n }\n };\n\n private handleExpandIconMouseDown = (event: MouseEvent) => {\n if (!this.disabled) {\n event.preventDefault();\n this.searchableSelectElement.focus();\n this.handleClick(event);\n }\n };\n\n private handleClear = (event: Event): void => {\n event.stopPropagation();\n this.hasTimedOut = false;\n clearTimeout(this.timeoutTimer);\n this.noOptions = null;\n this.emitImmediateIcChange(null);\n this.icClear.emit();\n\n if (this.searchable) {\n this.searchableSelectElement.value = null;\n this.searchableSelectInputValue = null;\n this.filteredOptions = this.uniqueOptions;\n this.hiddenInputValue = null;\n this.searchableSelectElement.focus();\n } else {\n this.customSelectElement.focus();\n }\n };\n\n private handleCharacterKeyDown = (key: string) => {\n // Only close menu when space is pressed if not being used alongside character keys to quickly select options\n if (\n this.open &&\n key === \" \" &&\n this.pressedCharacters.length === 0 &&\n !this.hasTimedOut &&\n !this.loading\n ) {\n this.setMenuChange(false);\n }\n\n if (key.length === 1 && !this.searchable) {\n window.clearTimeout(this.characterKeyPressTimer);\n this.characterKeyPressTimer = window.setTimeout(\n () => (this.pressedCharacters = \"\"),\n 1000\n );\n\n this.pressedCharacters += key;\n this.handleFilter();\n\n if (!this.noOptions) {\n this.emitImmediateIcChange(this.filteredOptions[0].value);\n }\n } else {\n this.pressedCharacters = \"\";\n }\n };\n\n private handleNativeSelectKeyDown = (event: KeyboardEvent) => {\n if ((event.key !== \"Escape\" && event.key !== \"Tab\") || this.open) {\n event.cancelBubble = true;\n }\n this.handleCharacterKeyDown(event.key);\n };\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n if ((event.key !== \"Escape\" && event.key !== \"Tab\") || this.open) {\n event.cancelBubble = true;\n }\n const isArrowKey = event.key === \"ArrowDown\" || event.key === \"ArrowUp\";\n\n if (!this.open) {\n if (this.isExternalFiltering() && (event.key === \"Enter\" || isArrowKey)) {\n this.menu.options = this.filteredOptions;\n } else {\n if (!this.hasTimedOut) {\n this.noOptions = null;\n this.menu.options = this.uniqueOptions;\n }\n }\n }\n\n if (this.open && event.key === \"Enter\") {\n this.setMenuChange(false);\n } else {\n if (!(isArrowKey && this.noOptions !== null)) {\n if (!(event.key === \" \" && this.pressedCharacters.length > 0)) {\n // Keyboard events get passed onto ic-menu\n this.menu.handleKeyboardOpen(event);\n }\n this.handleCharacterKeyDown(event.key);\n }\n }\n };\n\n private handleClearButtonFocus = (): void => {\n this.clearButtonFocused = true;\n };\n\n private handleClearButtonBlur = (ev: FocusEvent): void => {\n const retryButton = this.menu?.querySelector(\"#retry-button\");\n if (\n !(\n this.searchableSelectElement &&\n ev.relatedTarget === this.searchableSelectElement\n ) &&\n !(retryButton && ev.relatedTarget === retryButton)\n ) {\n this.setMenuChange(false);\n this.handleFocusIndicatorDisplay();\n }\n this.clearButtonFocused = false;\n };\n\n private handleFilter = (): void => {\n const options = this.deduplicateOptions(\n this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions\n );\n\n let isGrouped = false;\n let newFilteredOptions: IcMenuOption[] = [];\n\n options.map((option) => {\n if (option.children) isGrouped = true;\n });\n\n let menuOptionsFiltered: IcMenuOption[];\n\n if (this.searchable) {\n menuOptionsFiltered = getFilteredMenuOptions(\n options,\n this.includeDescriptionsInSearch,\n this.inputValueToFilter,\n this.searchMatchPosition\n );\n this.searchableMenuItemSelected = false;\n } else {\n menuOptionsFiltered = getFilteredMenuOptions(\n options,\n false,\n this.pressedCharacters,\n \"start\"\n );\n }\n\n if (\n !isGrouped &&\n menuOptionsFiltered[0]?.label !== this.emptyOptionListText\n ) {\n newFilteredOptions = menuOptionsFiltered;\n } else if (isGrouped) {\n options.map((option) => {\n if (this.includeGroupTitlesInSearch) {\n if (menuOptionsFiltered.indexOf(option) !== -1) {\n newFilteredOptions.push(option);\n } else {\n newFilteredOptions.push(this.getFilteredChildMenuOptions(option));\n }\n } else {\n newFilteredOptions.push(this.getFilteredChildMenuOptions(option));\n }\n });\n }\n\n let noChildOptionsWhenFiltered = false;\n\n if (isGrouped) {\n noChildOptionsWhenFiltered = true;\n newFilteredOptions.map((option) => {\n if (option.children.length > 0) {\n noChildOptionsWhenFiltered = false;\n }\n });\n }\n\n if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {\n this.noOptions = null;\n this.filteredOptions = newFilteredOptions;\n } else {\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.filteredOptions = this.noOptions;\n }\n };\n\n /**\n * Put the select component into loading state.\n * Replace options with the loading message. If timeout is enabled, set the timeout and once passed, replace options with the loading error message\n */\n private triggerLoading = () => {\n this.hasTimedOut = false;\n this.noOptions = [{ label: this.loadingLabel, value: \"\", loading: true }];\n if (this.filteredOptions !== this.noOptions && this.searchable) {\n this.filteredOptions = this.noOptions;\n } else if (this.uniqueOptions !== this.noOptions && !this.searchable) {\n this.uniqueOptions = this.noOptions;\n }\n if (this.timeout) {\n this.timeoutTimer = window.setTimeout(() => {\n this.loading = false;\n this.hasTimedOut = true;\n this.noOptions = [\n { label: this.loadingErrorLabel, value: \"\", timedOut: true },\n ];\n this.filteredOptions = this.noOptions;\n if (!this.searchable) this.uniqueOptions = this.noOptions;\n }, this.timeout);\n }\n };\n\n private getValueFromLabel = (label: string): string | undefined => {\n return this.uniqueOptions.find((option) => option.label === label)?.value;\n };\n\n private handleSearchableSelectInput = (event: Event): void => {\n this.searchableSelectInputValue = (event.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.searchableSelectInputValue });\n this.emitIcChange(this.searchableSelectInputValue);\n\n this.hiddenInputValue = this.searchableSelectInputValue;\n this.inputValueToFilter = this.searchableSelectInputValue;\n this.setMenuChange(true);\n\n if (!this.disableFilter) {\n this.handleFilter();\n this.debounceAriaLiveUpdate();\n }\n };\n\n private updateSearchableSelectResultAriaLive = (): void => {\n const searchableSelectResultsStatusEl = this.el.shadowRoot.querySelector(\n \".searchable-select-results-status\"\n ) as HTMLDivElement;\n\n if (searchableSelectResultsStatusEl) {\n if (this.noOptions !== null) {\n searchableSelectResultsStatusEl.innerText = this.emptyOptionListText;\n } else {\n searchableSelectResultsStatusEl.innerText = \"\";\n }\n }\n };\n\n private debounceAriaLiveUpdate() {\n clearTimeout(this.debounceAria);\n\n window.setTimeout(() => {\n this.updateSearchableSelectResultAriaLive();\n }, 800);\n }\n\n private getDefaultValue = (value: string): string | null =>\n this.getLabelFromValue(value) || value || null;\n\n private setDefaultValue() {\n if (!this.hasSetDefaultValue && this.currValue) {\n this.searchableSelectInputValue = this.getDefaultValue(this.currValue);\n this.initialValue = this.currValue;\n this.hasSetDefaultValue = true;\n }\n }\n\n private onFocus = (): void => {\n this.icFocus.emit();\n };\n\n private onBlur = (event: FocusEvent): void => {\n const target = event.relatedTarget as HTMLElement;\n if (\n target !== null &&\n target.tagName === \"UL\" &&\n target.className.includes(\"menu\")\n ) {\n return;\n }\n\n const retryButton = this.menu?.querySelector(\"#retry-button\");\n const isSearchableAndNoFocusedInternalElements =\n this.searchable &&\n event.relatedTarget !== this.menu &&\n !Array.from(this.menu.querySelectorAll(\"[role='option']\")).includes(\n event.relatedTarget as Element\n ) &&\n !(this.clearButton && event.relatedTarget === this.clearButton) &&\n !(retryButton && event.relatedTarget === retryButton);\n\n if (isSearchableAndNoFocusedInternalElements) {\n if (!this.retryButtonClick) {\n this.setMenuChange(false);\n }\n this.handleFocusIndicatorDisplay();\n }\n\n this.retryButtonClick = false;\n this.icBlur.emit();\n };\n\n private onTimeoutBlur = (ev: CustomEvent) => {\n if (\n (ev.detail.ev as FocusEvent).relatedTarget !==\n this.searchableSelectElement &&\n !this.blurredBecauseButtonPressed\n ) {\n this.setMenuChange(false);\n this.handleFocusIndicatorDisplay();\n this.icBlur.emit();\n }\n this.blurredBecauseButtonPressed = false;\n };\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n if (this.searchable) {\n this.searchableSelectInputValue = this.getDefaultValue(this.value);\n this.hiddenInputValue = this.value;\n }\n };\n\n render() {\n const {\n small,\n size,\n disabled,\n fullWidth,\n helperText,\n hideLabel,\n label,\n menuId,\n name,\n options,\n placeholder,\n readonly,\n required,\n searchable,\n showClearButton,\n validationStatus,\n validationText,\n currValue,\n } = this;\n\n renderHiddenInput(\n true,\n this.el,\n name,\n this.searchable ? this.hiddenInputValue : currValue,\n disabled\n );\n\n const invalid =\n validationStatus === IcInformationStatus.Error ? \"true\" : \"false\";\n\n const describedBy = getInputDescribedByText(\n this.inputId,\n helperText !== \"\",\n hasValidationStatus(this.validationStatus, this.disabled)\n ).trim();\n\n return (\n <Host\n class={{\n disabled: disabled,\n searchable: searchable,\n small: small || size === \"small\",\n \"full-width\": fullWidth,\n }}\n onBlur={this.onBlur}\n >\n <ic-input-container readonly={readonly}>\n {!hideLabel && (\n <ic-input-label\n for={this.inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n readonly={readonly}\n ></ic-input-label>\n )}\n <ic-input-component-container\n ref={(el) => (this.anchorEl = el)}\n class={{ \"menu-open\": this.open }}\n small={small || size === \"small\"}\n fullWidth={fullWidth}\n disabled={disabled}\n readonly={readonly}\n validationStatus={validationStatus}\n >\n {readonly ? (\n <ic-typography>\n <p>{this.getLabelFromValue(currValue)}</p>\n </ic-typography>\n ) : isMobileOrTablet() ? (\n <select\n ref={(el) => (this.nativeSelectElement = el)}\n disabled={disabled}\n onChange={this.handleNativeSelectChange}\n required={required}\n id={this.inputId}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.handleNativeSelectKeyDown}\n form={this.form}\n {...this.inheritedAttributes}\n >\n <option value=\"\" selected disabled={!showClearButton}>\n {placeholder}\n </option>\n {options.map((option) => {\n if (option.children) {\n return (\n <optgroup label={option.label}>\n {option.children.map((option) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === currValue}\n >\n {option.label}\n </option>\n ))}\n </optgroup>\n );\n } else {\n return (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === currValue}\n >\n {option.label}\n </option>\n );\n }\n })}\n </select>\n ) : searchable ? (\n <div class=\"searchable-select-container\">\n <input\n class=\"select-input\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-label={label}\n aria-describedby={describedBy}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-autocomplete=\"list\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-invalid={invalid}\n aria-required={required ? \"true\" : \"false\"}\n aria-controls={menuId}\n ref={(el) => (this.searchableSelectElement = el)}\n id={this.inputId}\n value={this.searchableSelectInputValue}\n placeholder={placeholder}\n disabled={disabled}\n onInput={this.handleSearchableSelectInput}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\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 ></input>\n {this.searchableSelectInputValue &&\n (showClearButton || searchable) && (\n <div class=\"clear-button-container\">\n <ic-button\n id=\"clear-button\"\n ref={(el) => (this.clearButton = el)}\n aria-label={\n this.searchableSelectInputValue && currValue === null\n ? \"Clear input\"\n : \"Clear selection\"\n }\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={size}\n variant=\"icon\"\n appearance={\n this.clearButtonFocused\n ? IcThemeForegroundEnum.Light\n : IcThemeForegroundEnum.Dark\n }\n ></ic-button>\n <div class=\"divider\"></div>\n </div>\n )}\n <span\n onMouseDown={this.handleExpandIconMouseDown}\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n \"expand-icon-filled\": !(\n currValue == null || currValue === \"\"\n ),\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n <div\n aria-live=\"polite\"\n role=\"status\"\n class=\"searchable-select-results-status\"\n ></div>\n </div>\n ) : (\n <div class=\"select-container\">\n <button\n class=\"select-input\"\n ref={(el) => (this.customSelectElement = el)}\n id={this.inputId}\n aria-label={`${label}, ${\n this.getLabelFromValue(currValue) || placeholder\n }${required ? \", required\" : \"\"}`}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-haspopup=\"listbox\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-owns={menuId}\n aria-controls={menuId}\n disabled={disabled}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.handleClick}\n onMouseDown={this.handleMouseDown}\n onKeyDown={this.handleKeyDown}\n >\n <ic-typography\n variant=\"body\"\n class={{\n \"value-text\": true,\n placeholder:\n this.getLabelFromValue(currValue) === undefined,\n }}\n >\n <p>{this.getLabelFromValue(currValue) || placeholder}</p>\n </ic-typography>\n <div class=\"select-input-end\">\n {currValue && showClearButton && (\n <div class=\"divider\"></div>\n )}\n <span\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n \"expand-icon-filled\": !(\n currValue == null || currValue === \"\"\n ),\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n </div>\n </button>\n {currValue && showClearButton && (\n <ic-button\n id=\"clear-button\"\n aria-label=\"Clear selection\"\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={size}\n variant=\"icon\"\n appearance={\n this.clearButtonFocused\n ? IcThemeForegroundEnum.Light\n : IcThemeForegroundEnum.Dark\n }\n ></ic-button>\n )}\n </div>\n )}\n </ic-input-component-container>\n {!isMobileOrTablet() && (\n <ic-menu\n class={{\n \"no-results\":\n this.loading ||\n this.hasTimedOut ||\n (this.noOptions !== null &&\n this.noOptions[0] &&\n this.noOptions[0].label === this.emptyOptionListText),\n }}\n ref={(el) => (this.menu = el)}\n inputEl={\n searchable\n ? this.searchableSelectElement\n : this.customSelectElement\n }\n inputLabel={label}\n anchorEl={this.anchorEl}\n small={small || size === \"small\"}\n menuId={menuId}\n open={this.open}\n options={searchable ? this.filteredOptions : this.uniqueOptions}\n value={currValue}\n fullWidth={fullWidth}\n selectOnEnter={this.selectOnEnter}\n onMenuStateChange={this.handleMenuChange}\n onMenuOptionSelect={this.handleCustomSelectChange}\n onMenuKeyPress={this.handleMenuKeyPress}\n onMenuValueChange={this.handleMenuValueChange}\n onUngroupedOptionsSet={this.setUngroupedOptions}\n onRetryButtonClicked={this.handleRetry}\n parentEl={this.el}\n onTimeoutBlur={this.onTimeoutBlur}\n activationType={\n this.searchable || this.selectOnEnter ? \"manual\" : \"automatic\"\n }\n ></ic-menu>\n )}\n {hasValidationStatus(this.validationStatus, this.disabled) && (\n <ic-input-validation\n class={{ \"menu-open\": this.open }}\n ariaLiveMode=\"polite\"\n status={validationStatus}\n message={validationText}\n for={this.inputId}\n ></ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"osBAAA,MAAMA,EAAc,muMCwCpB,IAAIC,EAAW,E,MAUFC,EAAM,M,sRAOTC,KAAAC,mBAAqB,MAErBD,KAAAE,oBAAgD,GAChDF,KAAAG,oBAAsB,MACtBH,KAAAI,QAAU,mBAAmBN,MAE7BE,KAAAK,OAAS,GAAGL,KAAKI,eAGjBJ,KAAAM,2BAAsC,MAGtCN,KAAAO,iBAAmC,GA0VnCP,KAAAQ,YAAeC,I,MACrB,GAAIA,EAAGC,OAAOC,YAAYC,EAAAZ,KAAKa,2BAAuB,MAAAD,SAAA,SAAAA,EAAEE,QACxDd,KAAKe,4BAA8B,KACnCf,KAAKgB,iBAAmB,KACxBhB,KAAKC,mBAAqB,KAC1BD,KAAKiB,YAAYC,KAAK,CAAEC,MAAOnB,KAAKoB,kBAAmB,EASjDpB,KAAAqB,aAAgBF,IACtB,IAAKnB,KAAKsB,WAAY,CACpBtB,KAAKmB,MAAQA,C,CAGfI,aAAavB,K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UAAWC,EACXP,QAASlN,KAAKuG,YACdoC,QAAS3I,KAAKkH,uBACd2B,OAAQ7I,KAAKoH,sBACb4D,KAAMA,EACN0C,QAAQ,OACRC,WACE3N,KAAKmH,mBACDyG,EAAsBC,MACtBD,EAAsBE,UAOpCrB,KACAN,EAAA,WACEE,MAAO,CACL,aACErM,KAAKkG,SACLlG,KAAKiG,aACJjG,KAAKmG,YAAc,MAClBnG,KAAKmG,UAAU,IACfnG,KAAKmG,UAAU,GAAGzD,QAAU1C,KAAKsE,qBAEvCiI,IAAMnH,GAAQpF,KAAK+F,KAAOX,EAC1B8I,QACE5M,EACItB,KAAKa,wBACLb,KAAK2G,oBAEXwH,WAAYzL,EACZ8J,SAAUxM,KAAKwM,SACfzB,MAAOA,GAASC,IAAS,QACzB3K,OAAQA,EACRoD,KAAMzD,KAAKyD,KACX1B,QAAST,EAAatB,KAAKgG,gBAAkBhG,KAAK2D,cAClDxC,MAAOoD,EACP0G,UAAWA,EACXmD,cAAepO,KAAKoO,cACpBC,kBAAmBrO,KAAK4E,iBACxB0J,mBAAoBtO,KAAKqE,yBACzBkK,eAAgBvO,KAAK8E,mBACrB0J,kBAAmBxO,KAAKkF,sBACxBuJ,sBAAuBzO,KAAKkD,oBAC5BwL,qBAAsB1O,KAAKQ,YAC3BmO,SAAU3O,KAAKoF,GACfiE,cAAerJ,KAAKqJ,cACpBuF,eACE5O,KAAKsB,YAActB,KAAKoO,cAAgB,SAAW,cAIxDnC,EAAoBjM,KAAKyL,iBAAkBzL,KAAKsG,WAC/C6F,EAAA,uBACEE,MAAO,CAAE,YAAarM,KAAKyD,MAC3BoL,aAAa,SACbC,OAAQrD,EACRsD,QAASrD,EACTY,IAAKtM,KAAKI,W"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icCardCss","Card","this","parentFocussed","isFocussed","parentBlurred","toggleExpanded","areaExpanded","disconnectedCallback","parentIsAnchorTag","parentEl","removeEventListener","componentWillLoad","el","parentElement","tagName","clickable","classList","add","addEventListener","removeDisabledFalse","disabled","componentDidLoad","isSlotUsed","onComponentRequiredPropUndefined","prop","heading","propName","updateTheme","handleHostClick","event","stopImmediatePropagation","themeChangeHandler","ev","theme","detail","mode","setFocus","shadowRoot","querySelector","focus","newTheme","foregroundColor","getThemeFromContext","IcThemeForegroundEnum","Default","appearance","render","expandable","message","href","hreflang","referrerpolicy","rel","subheading","target","fullWidth","Component","undefined","attrs","hrefLang","referrerPolicy","h","Object","assign","class","Dark","tabindex","name","variant","size","onClick","innerHTML","chevronIcon","id"],"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 width: inherit;\n position: relative;\n}\n\n.dark.card,\n.dark.card.clickable {\n border: var(--ic-border-width) 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\n/** High Contrast **/\n@media (forced-colors: active) {\n .card ::slotted(svg) {\n fill: currentcolor;\n }\n\n .card.disabled ::slotted(svg) {\n fill: GrayText !important;\n }\n\n .card.disabled {\n border-color: GrayText !important;\n }\n\n .card.disabled .card-message,\n .card.disabled .subheading,\n .card.disabled .card-title {\n color: GrayText;\n }\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 * @slot badge - Badge component overlaying the top right of the card.\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. This is required, unless a slotted heading is used.\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 !isSlotUsed(this.el, \"heading\") &&\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 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 {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </Component>\n );\n }\n}\n"],"mappings":"mLAAA,MAAMA,EAAY,8gL,MCwCLC,EAAI,M,yBA2HPC,KAAAC,eAAiB,KACvBD,KAAKE,WAAa,IAAI,EAGhBF,KAAAG,cAAgB,KACtBH,KAAKE,WAAa,KAAK,EAWjBF,KAAAI,eAAiB,K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,aACTH,EAAA,QAAMM,KAAK,eAGd7C,EAAWrB,KAAKW,GAAI,cACnBiD,EAAA,OAAKG,MAAM,aACTH,EAAA,QAAMM,KAAK,gBAGbnB,GAAW1B,EAAWrB,KAAKW,GAAI,aAC/BiD,EAAA,OACEG,MAAO,CACL,CAAC,gBAAiB,OAGnBhB,GAAWa,EAAA,iBAAeO,QAAQ,QAAQpB,GAC1C1B,EAAWrB,KAAKW,GAAI,YAAciD,EAAA,QAAMM,KAAK,cAGhD7C,EAAWrB,KAAKW,GAAI,yBAA2BmC,IAC/Cc,EAAA,OAAKG,MAAM,oBACTH,EAAA,OAAKG,MAAM,wBACTH,EAAA,QAAMM,KAAK,0BAEZpB,GACCc,EAAA,aACEG,MAAO,CACL,CAAC,iBAAkB,KACnB,CAAC,yBAA0B/D,KAAKK,aAChC,CAAC,0BAA2BL,KAAKK,cAEnC8D,QAAQ,OACRC,KAAK,QAAO,aACD,yBAAwB,gBACpBpE,KAAKK,aAAY,gBAClB,wBACdgE,QAASrE,KAAKI,eACdkE,UAAWC,KAKlBlD,EAAWrB,KAAKW,GAAI,qBAAuBX,KAAKK,cAC/CuD,EAAA,OAAKG,MAAM,mBAAmBS,GAAG,yBAC/BZ,EAAA,QAAMM,KAAK,sBAGd7C,EAAWrB,KAAKW,GAAI,UAAYiD,EAAA,QAAMM,KAAK,U"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icDataRowCss","DataRow","this","hasEndComponent","resizeObserver","runResizeObserver","ResizeObserver","checkLabelAbove","observe","el","renderLabel","label","isSlotUsed","h","class","name","variant","entitySize","DEVICE_SIZES","XL","disconnectedCallback","disconnect","componentWillLoad","deviceSize","getCurrentDeviceSize","slotHasContent","componentDidLoad","checkResizeObserver","labelEndComponent","rowSize","_a","shadowRoot","querySelector","clientWidth","S","M","component","querySelectorAll","forEach","child","setAttribute","render","value","small","size","Host","role"],"sources":["src/components/ic-data-row/ic-data-row.css?tag=ic-data-row&encapsulation=shadow","src/components/ic-data-row/ic-data-row.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n position: relative;\n display: block;\n}\n\n.data {\n display: flex;\n align-items: center;\n}\n\n.text-cells {\n display: flex;\n flex-grow: 1;\n min-width: 0;\n}\n\n.label {\n width: 12.5rem;\n min-width: 12.5rem;\n margin-right: var(--ic-space-md);\n color: var(--ic-color-tertiary-text);\n}\n\n.value {\n flex-grow: 1;\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xxs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]) {\n margin-top: calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs));\n}\n\n.end-component {\n width: fit-content;\n margin-left: 3.5rem;\n}\n\n.divider {\n margin-top: var(--ic-space-md);\n height: var(--ic-border-width);\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-xs);\n}\n\n:host(.breakpoint-medium) .label {\n width: 10rem;\n min-width: 10rem;\n}\n\n:host(.breakpoint-xs) .text-cells {\n flex-direction: column;\n}\n\n:host(.breakpoint-xs) .label {\n width: 8rem;\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.breakpoint-xs) .value {\n max-width: 95%;\n}\n\n:host(.breakpoint-xs) .end-component {\n margin-left: 0;\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n isSlotUsed,\n slotHasContent,\n} from \"../../utils/helpers\";\nimport { IcSizesNoLarge } from \"../../utils/types\";\n\n/**\n * @slot label - Content will be rendered in the leftmost cell.\n * @slot value - Content will be rendered to the right of the label.\n * @slot end-component - Content will be displayed in the rightmost cell.\n */\n@Component({\n tag: \"ic-data-row\",\n styleUrl: \"ic-data-row.css\",\n shadow: true,\n})\nexport class DataRow {\n private hasEndComponent: boolean = false;\n private resizeObserver: ResizeObserver = null;\n\n @Element() el: HTMLIcDataRowElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() entitySize: \"xl\" | \"m\" | \"xs\";\n\n /**\n * The label in the leftmost cell of the row.\n */\n @Prop() label: string;\n\n /**\n * The size of the data row component.\n */\n @Prop() size?: IcSizesNoLarge = \"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 value of the middle (right if no end-component supplied) cell of the row.\n */\n @Prop() value: string;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n this.hasEndComponent = slotHasContent(this.el, \"end-component\");\n this.checkLabelAbove();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n if (this.hasEndComponent) {\n this.labelEndComponent();\n }\n }\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkLabelAbove();\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n private checkLabelAbove() {\n const rowSize = this.el.shadowRoot.querySelector(\".data\")?.clientWidth;\n if (rowSize) {\n if (rowSize + 46 < DEVICE_SIZES.S) {\n this.entitySize = \"xs\";\n } else if (rowSize + 46 < DEVICE_SIZES.M) {\n this.entitySize = \"m\";\n } else {\n this.entitySize = \"xl\";\n }\n }\n }\n\n /**\n * Renders the label either as a ic-typography or slot. Slotted content takes precedence.\n * @param label string - label of value\n * @returns HTMLDivElement - returns label as slot or ic-typography with label as textContent\n */\n private renderLabel = (label: string) => {\n if (isSlotUsed(this.el, \"label\")) {\n return (\n <div class=\"label\">\n <slot name=\"label\"></slot>\n </div>\n );\n } else if (label) {\n return (\n <div class=\"label\">\n <ic-typography\n variant={this.entitySize === \"xs\" ? \"label\" : \"subtitle-large\"}\n >\n {label}\n </ic-typography>\n </div>\n );\n }\n\n return null;\n };\n\n private labelEndComponent(): void {\n const component = this.el.shadowRoot.querySelectorAll(\n \"slot[name=end-component]\"\n );\n\n component.forEach((child: HTMLElement) =>\n child.setAttribute(\"aria-label\", \"for \" + this.label + \" row\")\n );\n }\n\n render() {\n const { label, value, small, size } = this;\n\n return (\n <Host\n class={{\n [\"small\"]: small || size === \"small\",\n [\"breakpoint-medium\"]: this.entitySize === \"m\",\n [\"breakpoint-xs\"]: this.entitySize === \"xs\",\n }}\n role=\"listitem\"\n >\n <div class=\"data\">\n <div class=\"text-cells\">\n {this.renderLabel(label)}\n <div class=\"value\">\n <slot name=\"value\">\n <ic-typography variant=\"body\">{value}</ic-typography>\n </slot>\n </div>\n </div>\n {this.hasEndComponent && (\n <div class=\"end-component\">\n <div role=\"cell\">\n <slot name=\"end-component\"></slot>\n </div>\n </div>\n )}\n </div>\n <div class=\"divider\" />\n </Host>\n );\n }\n}\n"],"mappings":"iJAAA,MAAMA,EAAe,shH,MCoBRC,EAAO,M,yBACVC,KAAAC,gBAA2B,MAC3BD,KAAAE,eAAiC,KA8CjCF,KAAAG,kBAAoB,KAC1BH,KAAKE,eAAiB,IAAIE,gBAAe,KACvCJ,KAAKK,iBAAiB,IAGxBL,KAAKE,eAAeI,QAAQN,KAAKO,GAAG,EAqB9BP,KAAAQ,YAAeC,IACrB,GAAIC,EAAWV,KAAKO,GAAI,SAAU,CAChC,OACEI,EAAA,OAAKC,MAAM,SACTD,EAAA,QAAME,KAAK,U,MAGV,GAAIJ,EAAO,CAChB,OACEE,EAAA,OAAKC,MAAM,SACTD,EAAA,iBACEG,QAASd,KAAKe,aAAe,KAAO,QAAU,kBAE7CN,G,CAMT,OAAO,IAAI,E,gBAvFiBO,EAAaC,G,yDAWX,U,WAKN,M,qBAO1B,oBAAAC,GACE,GAAIlB,KAAKE,iBAAmB,KAAM,CAChCF,KAAKE,eAA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